PageSourceSearch

https://valtioneuvosto.fi/o/frontend-js-aui-web/aui/aui/aui.js

js valtioneuvosto.fi collected 2026-09-24 08:37:07 UTC 414,842 bytes, 14,342 lines download raw bytes

1/**
2The YUI module contains the components required for building the YUI seed file.
3This includes the script loading mechanism, a simple queue, and the core
4utilities for the library.
5
6@module yui
7@main yui
8@submodule yui-base
9**/
10
11/*jshint eqeqeq: false*/
12if (typeof YUI != 'undefined') {
13    YUI._YUI = YUI;
14}
15
16/**
17The YUI global namespace object. This is the constructor for all YUI instances.
18
19This is a self-instantiable factory function, meaning you don't need to precede
20it with the `new` operator. You can invoke it directly like this:
21
22    YUI().use('*', function (Y) {
23        // Y is a new YUI instance.
24    });
25
26But it also works like this:
27
28    var Y = YUI();
29
30The `YUI` constructor accepts an optional config object, like this:
31
32    YUI({
33        debug: true,
34        combine: false
35    }).use('node', function (Y) {
36        // Y.Node is ready to use.
37    });
38
39See the API docs for the <a href="config.html">Config</a> class for the complete
40list of supported configuration properties accepted by the YUI constuctor.
41
42If a global `YUI` object is already defined, the existing YUI object will not be
43overwritten, to ensure that defined namespaces are preserved.
44
45Each YUI instance has full custom event support, but only if the event system is
46available.
47
48@class YUI
49@uses EventTarget
50@constructor
51@global
52@param {Object} [config]* Zero or more optional configuration objects. Config
53    values are stored in the `Y.config` property. See the
54    <a href="config.html">Config</a> docs for the list of supported properties.
55**/
56
57    /*global YUI*/
58    /*global YUI_config*/
59    var YUI = function() {
60        var i = 0,
61            Y = this,
62            args = arguments,
63            l = args.length,
64            instanceOf = function(o, type) {
65                return (o && o.hasOwnProperty && (o instanceof type));
66            },
67            gconf = (typeof YUI_config !== 'undefined') && YUI_config;
68
69        if (!(instanceOf(Y, YUI))) {
70            Y = new YUI();
71        } else {
72            // set up the core environment
73            Y._init();
74
75            /**
76            Master configuration that might span multiple contexts in a non-
77            browser environment. It is applied first to all instances in all
78            contexts.
79
80            @example
81
82                YUI.GlobalConfig = {
83                    filter: 'debug'
84                };
85
86                YUI().use('node', function (Y) {
87                    // debug files used here
88                });
89
90                YUI({
91                    filter: 'min'
92                }).use('node', function (Y) {
93                    // min files used here
94                });
95
96            @property {Object} GlobalConfig
97            @global
98            @static
99            **/
100            if (YUI.GlobalConfig) {
101                Y.applyConfig(YUI.GlobalConfig);
102            }
103
104            /**
105            Page-level config applied to all YUI instances created on the
106            current page. This is applied after `YUI.GlobalConfig` and before
107            any instance-level configuration.
108
109            @example
110
111                // Single global var to include before YUI seed file
112                YUI_config = {
113                    filter: 'debug'
114                };
115
116                YUI().use('node', function (Y) {
117                    // debug files used here
118                });
119
120                YUI({
121                    filter: 'min'
122                }).use('node', function (Y) {
123                    // min files used here
124                });
125
126            @property {Object} YUI_config
127            @global
128            **/
129            if (gconf) {
130                Y.applyConfig(gconf);
131            }
132
133            // bind the specified additional modules for this instance
134            if (!l) {
135                Y._afterConfig();
136                Y._setup();
137            }
138        }
139
140        if (l) {
141            // Each instance can accept one or more configuration objects.
142            // These are applied after YUI.GlobalConfig and YUI_Config,
143            // overriding values set in those config files if there is a
144            // matching property.
145            for (; i < l; i++) {
146                Y.applyConfig(args[i]);
147            }
148
149            Y._afterConfig();
150            Y._setup();
151        }
152
153        Y.instanceOf = instanceOf;
154
155        return Y;
156    };
157
158(function() {
159
160    var proto, prop,
161        VERSION = 'patched-v3.18.7',
162        PERIOD = '.',
163        BASE = 'http://yui.yahooapis.com/',
164        /*
165            These CSS class names can't be generated by
166            getClassName since it is not available at the
167            time they are being used.
168        */
169        DOC_LABEL = 'yui3-js-enabled',
170        CSS_STAMP_EL = 'yui3-css-stamp',
171        NOOP = function() {},
172        SLICE = Array.prototype.slice,
173        APPLY_TO_AUTH = { 'io.xdrReady': 1,   // the functions applyTo
174                          'io.xdrResponse': 1,   // can call. this should
175                          'SWF.eventHandler': 1 }, // be done at build time
176        hasWin = (typeof window != 'undefined'),
177        win = (hasWin) ? window : null,
178        doc = (hasWin) ? win.document : null,
179        docEl = doc && doc.documentElement,
180        docClass = docEl && docEl.className,
181        instances = {},
182        time = new Date().getTime(),
183        add = function(el, type, fn, capture) {
184            if (el && el.addEventListener) {
185                el.addEventListener(type, fn, capture);
186            } else if (el && el.attachEvent) {
187                el.attachEvent('on' + type, fn);
188            }
189        },
190        remove = function(el, type, fn, capture) {
191            if (el && el.removeEventListener) {
192                // this can throw an uncaught exception in FF
193                try {
194                    el.removeEventListener(type, fn, capture);
195                } catch (ex) {}
196            } else if (el && el.detachEvent) {
197                el.detachEvent('on' + type, fn);
198            }
199        },
200        handleReady = function() {
201            YUI.Env.DOMReady = true;
202            if (hasWin) {
203                remove(doc, 'DOMContentLoaded', handleReady);
204            }
205            if (doc && doc.body && YUI.Env.cssStampEl && (!doc.body.contains(YUI.Env.cssStampEl))) {
206                doc.body.appendChild(YUI.Env.cssStampEl);
207            }
208        },
209        handleLoad = function() {
210            YUI.Env.windowLoaded = true;
211            YUI.Env.DOMReady = true;
212            if (hasWin) {
213                remove(window, 'load', handleLoad);
214            }
215        },
216        getLoader = function(Y, o) {
217            var loader = Y.Env._loader,
218                lCore = [ 'loader-base' ],
219                G_ENV = YUI.Env,
220                mods = G_ENV.mods;
221
222            if (loader) {
223                //loader._config(Y.config);
224                loader.ignoreRegistered = false;
225                loader.onEnd = null;
226                loader.data = null;
227                loader.required = [];
228                loader.loadType = null;
229            } else {
230                loader = new Y.Loader(Y.config);
231                Y.Env._loader = loader;
232            }
233            if (mods && mods.loader) {
234                lCore = [].concat(lCore, YUI.Env.loaderExtras);
235            }
236            YUI.Env.core = Y.Array.dedupe([].concat(YUI.Env.core, lCore));
237
238            return loader;
239        },
240
241        clobber = function(r, s) {
242            for (var i in s) {
243                if (s.hasOwnProperty(i)) {
244                    r[i] = s[i];
245                }
246            }
247        },
248
249        ALREADY_DONE = { success: true };
250
251//  Stamp the documentElement (HTML) with a class of "yui-loaded" to
252//  enable styles that need to key off of JS being enabled.
253if (docEl && docClass.indexOf(DOC_LABEL) == -1) {
254    if (docClass) {
255        docClass += ' ';
256    }
257    docClass += DOC_LABEL;
258    docEl.className = docClass;
259}
260
261if (VERSION.indexOf('@') > -1) {
262    VERSION = '3.5.0'; // dev time hack for cdn test
263}
264
265proto = {
266    /**
267    Applies a new configuration object to the config of this YUI instance. This
268    will merge new group/module definitions, and will also update the loader
269    cache if necessary. Updating `Y.config` directly will not update the cache.
270
271    @method applyConfig
272    @param {Object} o the configuration object.
273    @since 3.2.0
274    **/
275    applyConfig: function(o) {
276
277        o = o || NOOP;
278
279        var attr,
280            name,
281            // detail,
282            config = this.config,
283            mods = config.modules,
284            groups = config.groups,
285            aliases = config.aliases,
286            loader = this.Env._loader;
287
288        for (name in o) {
289            if (o.hasOwnProperty(name)) {
290                attr = o[name];
291                if (mods && name == 'modules') {
292                    clobber(mods, attr);
293                } else if (aliases && name == 'aliases') {
294                    clobber(aliases, attr);
295                } else if (groups && name == 'groups') {
296                    clobber(groups, attr);
297                } else if (name == 'win') {
298                    config[name] = (attr && attr.contentWindow) || attr;
299                    config.doc = config[name] ? config[name].document : null;
300                } else if (name == '_yuid') {
301                    // preserve the guid
302                } else {
303                    config[name] = attr;
304                }
305            }
306        }
307
308        if (loader) {
309            loader._config(o);
310        }
311
312    },
313
314    /**
315    Old way to apply a config to this instance (calls `applyConfig` under the
316    hood).
317
318    @private
319    @method _config
320    @param {Object} o The config to apply
321    **/
322    _config: function(o) {
323        this.applyConfig(o);
324    },
325
326    /**
327    Initializes this YUI instance.
328
329    @private
330    @method _init
331    **/
332    _init: function() {
333        var filter, el,
334            Y = this,
335            G_ENV = YUI.Env,
336            Env = Y.Env,
337            prop;
338
339        /**
340        The version number of this YUI instance.
341
342        This value is typically updated by a script when a YUI release is built,
343        so it may not reflect the correct version number when YUI is run from
344        the development source tree.
345
346        @property {String} version
347        **/
348        Y.version = VERSION;
349
350        if (!Env) {
351            Y.Env = {
352                core: ['get', 'features', 'intl-base', 'yui-log', 'yui-later', 'loader-base', 'loader-rollup', 'loader-yui3'],
353                loaderExtras: ['loader-rollup', 'loader-yui3'],
354                mods: {}, // flat module map
355                versions: {}, // version module map
356                base: BASE,
357                cdn: BASE + VERSION + '/',
358                // bootstrapped: false,
359                _idx: 0,
360                _used: {},
361                _attached: {},
362                _exported: {},
363                _missed: [],
364                _yidx: 0,
365                _uidx: 0,
366                _guidp: 'y',
367                _loaded: {},
368                // serviced: {},
369                // Regex in English:
370                // I'll start at the \b(yui).
371                // 1. Look in the test string for "yui" or
372                //    "yui-base" or "yui-davglass" or "yui-foobar" that comes after a word break.  That is, it
373                //    can't match "foyui" or "i_heart_yui". This can be anywhere in the string.
374                // 2. After #1 must come a forward slash followed by the string matched in #1, so
375                //    "yui-base/yui-base" or "yui-pants/yui-pants".
376                // 3. The second occurence of the #1 token can optionally be followed by "-debug" or "-min",
377                //    so "yui/yui-min", "yui/yui-debug", "yui-base/yui-base-debug". NOT "yui/yui-tshirt".
378                // 4. This is followed by ".js", so "yui/yui.js".
379                // 0. Going back to the beginning, now. If all that stuff in 1-4 comes after a "?" in the string,
380                //    then capture the junk between the LAST "&" and the string in 1-4.  So
381                //    "blah?foo/yui/yui.js" will capture "foo/" and "blah?some/thing.js&3.3.0/build/yui-davglass/yui-davglass.js"
382                //    will capture "3.3.0/build/"
383                //
384                // Regex Exploded:
385                // (?:\?             Find a ?
386                //   (?:[^&]*&)      followed by 0..n characters followed by an &
387                //   *               in fact, find as many sets of characters followed by a & as you can
388                //   ([^&]*)         capture the stuff after the last & in \1
389                // )?                but it's ok if all this ?junk&more_junk stuff isn't even there
390                // \b(               after a word break find either the string
391                //    yui(?:-\w+)?   "yui" optionally followed by a -, then more characters
392                // )                 and store the yui-* string in \2
393                // \/\2              then comes a / followed by the yui-* string in \2
394                // (?:-(min|debug))? optionally followed by "-min" or "-debug"
395                // .js               and ending in ".js"
396                _BASE_RE: /(?:\?(?:[^&]*&)*([^&]*))?\b(aui|yui(?:-\w+)?)\/\2(?:-(min|debug))?\.js/,
397                parseBasePath: function(src, pattern) {
398                    var match = src.match(pattern),
399                        path, filter;
400
401                    if (match) {
402                        path = RegExp.leftContext || src.slice(0, src.indexOf(match[0]));
403
404                        // this is to set up the path to the loader.  The file
405                        // filter for loader should match the yui include.
406                        filter = match[3];
407
408                        // extract correct path for mixed combo urls
409                        // http://yuilibrary.com/projects/yui3/ticket/2528423
410                        if (match[1]) {
411                            path += '?' + match[1];
412                        }
413                        path = {
414                            filter: filter,
415                            path: path
416                        };
417                    }
418                    return path;
419                },
420                getBase: G_ENV && G_ENV.getBase ||
421                        function(pattern) {
422                            var nodes = (doc && doc.getElementsByTagName('script')) || [],
423                                path = Env.cdn, parsed,
424                                i, len, src;
425
426                            for (i = 0, len = nodes.length; i < len; ++i) {
427                                src = nodes[i].src;
428                                if (src) {
429                                    parsed = Y.Env.parseBasePath(src, pattern);
430                                    if (parsed) {
431                                        filter = parsed.filter;
432                                        path = parsed.path;
433                                        break;
434                                    }
435                                }
436                            }
437
438                            // use CDN default
439                            return path;
440                        }
441
442            };
443
444            Env = Y.Env;
445
446            Env._loaded[VERSION] = {};
447
448            if (G_ENV && Y !== YUI) {
449                Env._yidx = ++G_ENV._yidx;
450                Env._guidp = ('yui_' + VERSION + '_' +
451                             Env._yidx + '_' + time).replace(/[^a-z0-9_]+/g, '_');
452            } else if (YUI._YUI) {
453
454                G_ENV = YUI._YUI.Env;
455                Env._yidx += G_ENV._yidx;
456                Env._uidx += G_ENV._uidx;
457
458                for (prop in G_ENV) {
459                    if (!(prop in Env)) {
460                        Env[prop] = G_ENV[prop];
461                    }
462                }
463
464                delete YUI._YUI;
465            }
466
467            Y.id = Y.stamp(Y);
468            instances[Y.id] = Y;
469
470        }
471
472        Y.constructor = YUI;
473
474        // configuration defaults
475        Y.config = Y.config || {
476            bootstrap: true,
477            cacheUse: true,
478            debug: true,
479            doc: doc,
480            fetchCSS: true,
481            throwFail: true,
482            useBrowserConsole: true,
483            useNativeES5: true,
484            win: win
485        };
486
487        //Register the CSS stamp element
488        if (doc && !doc.getElementById(CSS_STAMP_EL)) {
489            el = doc.createElement('div');
490            el.innerHTML = '<div id="' + CSS_STAMP_EL + '" style="position: absolute !important; visibility: hidden !important"></div>';
491            YUI.Env.cssStampEl = el.firstChild;
492            if (doc.body) {
493                doc.body.appendChild(YUI.Env.cssStampEl);
494            } else {
495                docEl.insertBefore(YUI.Env.cssStampEl, docEl.firstChild);
496            }
497        } else if (doc && doc.getElementById(CSS_STAMP_EL) && !YUI.Env.cssStampEl) {
498            YUI.Env.cssStampEl = doc.getElementById(CSS_STAMP_EL);
499        }
500
501        Y.config.lang = Y.config.lang || 'en-US';
502
503        Y.config.base = YUI.config.base ||
504                (YUI.config.defaultBase && YUI.config.root && YUI.config.defaultBase + YUI.config.root) ||
505                Y.Env.getBase(Y.Env._BASE_RE);
506
507        if (!filter || (!('mindebug').indexOf(filter))) {
508            filter = 'min';
509        }
510        filter = (filter) ? '-' + filter : filter;
511        Y.config.loaderPath = YUI.config.loaderPath || 'loader/loader' + filter + '.js';
512
513    },
514
515    /**
516    This method is called after all other configuration has been applied to
517    the YUI instance.
518
519    @method _afterConfig
520    @private
521    **/
522    _afterConfig: function () {
523        var Y = this;
524
525        // We need to set up Y.config.global after the rest of the configuration
526        // so that setting it in user configuration prevents the library from
527        // using eval(). This is critical for Content Security Policy enabled
528        // sites and other environments like Chrome extensions
529        if (!Y.config.hasOwnProperty('global')) {
530            Y.config.global = Function('return this')();
531        }
532    },
533
534    /**
535    Finishes the instance setup. Attaches whatever YUI modules were defined
536    at the time that this instance was created.
537
538    @method _setup
539    @private
540    **/
541    _setup: function() {
542        var i, Y = this,
543            core = [],
544            mods = YUI.Env.mods,
545            extendedCore = Y.config.extendedCore || [],
546            extras = Y.config.core || [].concat(YUI.Env.core).concat(extendedCore); //Clone it..
547
548        for (i = 0; i < extras.length; i++) {
549            if (mods[extras[i]]) {
550                core.push(extras[i]);
551            }
552        }
553
554        Y._attach(['yui-base']);
555        Y._attach(core);
556
557        if (Y.Loader) {
558            getLoader(Y);
559        }
560
561    },
562
563    /**
564    Executes the named method on the specified YUI instance if that method is
565    whitelisted.
566
567    @method applyTo
568    @param {String} id YUI instance id.
569    @param {String} method Name of the method to execute. For example:
570        'Object.keys'.
571    @param {Array} args Arguments to apply to the method.
572    @return {Mixed} Return value from the applied method, or `null` if the
573        specified instance was not found or the method was not whitelisted.
574    **/
575    applyTo: function(id, method, args) {
576        if (!(method in APPLY_TO_AUTH)) {
577            this.log(method + ': applyTo not allowed', 'warn', 'yui');
578            return null;
579        }
580
581        var instance = instances[id], nest, m, i;
582        if (instance) {
583            nest = method.split('.');
584            m = instance;
585            for (i = 0; i < nest.length; i = i + 1) {
586                m = m[nest[i]];
587                if (!m) {
588                    this.log('applyTo not found: ' + method, 'warn', 'yui');
589                }
590            }
591            return m && m.apply(instance, args);
592        }
593
594        return null;
595    },
596
597/**
598Registers a YUI module and makes it available for use in a `YUI().use()` call or
599as a dependency for other modules.
600
601The easiest way to create a first-class YUI module is to use
602<a href="http://yui.github.com/shifter/">Shifter</a>, the YUI component build
603tool.
604
605Shifter will automatically wrap your module code in a `YUI.add()` call along
606with any configuration info required for the module.
607
608@example
609
610    YUI.add('davglass', function (Y) {
611        Y.davglass = function () {
612        };
613    }, '3.4.0', {
614        requires: ['harley-davidson', 'mt-dew']
615    });
616
617@method add
618@param {String} name Module name.
619@param {Function} fn Function containing module code. This function will be
620    executed whenever the module is attached to a specific YUI instance.
621
622    @param {YUI} fn.Y The YUI instance to which this module is attached.
623    @param {String} fn.name Name of the module
624
625@param {String} version Module version number. This is currently used only for
626    informational purposes, and is not used internally by YUI.
627
628@param {Object} [details] Module config.
629    @param {Array} [details.requires] Array of other module names that must be
630        attached before this module can be attached.
631    @param {Array} [details.optional] Array of optional module names that should
632        be attached before this module is attached if they've already been
633        loaded. If the `loadOptional` YUI option is `true`, optional modules
634        that have not yet been loaded will be loaded just as if they were hard
635        requirements.
636    @param {Array} [details.use] Array of module names that are included within
637        or otherwise provided by this module, and which should be attached
638        automatically when this module is attached. This makes it possible to
639        create "virtual rollup" modules that simply attach a collection of other
640        modules or submodules.
641
642@return {YUI} This YUI instance.
643**/
644    add: function(name, fn, version, details) {
645        details = details || {};
646        var env = YUI.Env,
647            mod = {
648                name: name,
649                fn: fn,
650                version: version,
651                details: details
652            },
653            //Instance hash so we don't apply it to the same instance twice
654            applied = {},
655            loader, inst, modInfo,
656            i, versions = env.versions;
657
658        env.mods[name] = mod;
659        versions[version] = versions[version] || {};
660        versions[version][name] = mod;
661
662        for (i in instances) {
663            if (instances.hasOwnProperty(i)) {
664                inst = instances[i];
665                if (!applied[inst.id]) {
666                    applied[inst.id] = true;
667                    loader = inst.Env._loader;
668                    if (loader) {
669                        modInfo = loader.getModuleInfo(name);
670                        if (!modInfo || modInfo.temp) {
671                            loader.addModule(details, name);
672                        }
673                    }
674                }
675            }
676        }
677
678        return this;
679    },
680
681    /**
682    Executes the callback function associated with each required module,
683    attaching the module to this YUI instance.
684
685    @method _attach
686    @param {Array} r The array of modules to attach
687    @param {Boolean} [moot=false] If `true`, don't throw a warning if the module
688        is not attached.
689    @private
690    **/
691    _attach: function(r, moot) {
692        var i, name, mod, details, req, use, after,
693            mods = YUI.Env.mods,
694            aliases = YUI.Env.aliases,
695            Y = this, j,
696            cache = YUI.Env._renderedMods,
697            loader = Y.Env._loader,
698            done = Y.Env._attached,
699            exported = Y.Env._exported,
700            len = r.length, loader, def, go,
701            c = [],
702            modArgs, esCompat, reqlen, modInfo,
703            condition,
704            __exports__, __imports__;
705
706        //Check for conditional modules (in a second+ instance) and add their requirements
707        //TODO I hate this entire method, it needs to be fixed ASAP (3.5.0) ^davglass
708        for (i = 0; i < len; i++) {
709            name = r[i];
710            mod = mods[name];
711            c.push(name);
712            if (loader && loader.conditions[name]) {
713                for (j in loader.conditions[name]) {
714                    if (loader.conditions[name].hasOwnProperty(j)) {
715                        def = loader.conditions[name][j];
716                        go = def && ((def.ua && Y.UA[def.ua]) || (def.test && def.test(Y)));
717                        if (go) {
718                            c.push(def.name);
719                        }
720                    }
721                }
722            }
723        }
724        r = c;
725        len = r.length;
726
727        for (i = 0; i < len; i++) {
728            if (!done[r[i]]) {
729                name = r[i];
730                mod = mods[name];
731
732                if (aliases && aliases[name] && !mod) {
733                    Y._attach(aliases[name]);
734                    continue;
735                }
736                if (!mod) {
737                    modInfo = loader && loader.getModuleInfo(name);
738                    if (modInfo) {
739                        mod = modInfo;
740                        moot = true;
741                    }
742
743
744                    //if (!loader || !loader.moduleInfo[name]) {
745                    //if ((!loader || !loader.moduleInfo[name]) && !moot) {
746                    if (!moot && name) {
747                        if ((name.indexOf('skin-') === -1) && (name.indexOf('css') === -1)) {
748                            Y.Env._missed.push(name);
749                            Y.Env._missed = Y.Array.dedupe(Y.Env._missed);
750                            Y.message('NOT loaded: ' + name, 'warn', 'yui');
751                        }
752                    }
753                } else {
754                    done[name] = true;
755                    //Don't like this, but in case a mod was asked for once, then we fetch it
756                    //We need to remove it from the missed list ^davglass
757                    for (j = 0; j < Y.Env._missed.length; j++) {
758                        if (Y.Env._missed[j] === name) {
759                            Y.message('Found: ' + name + ' (was reported as missing earlier)', 'warn', 'yui');
760                            Y.Env._missed.splice(j, 1);
761                        }
762                    }
763
764                    // Optional dependencies normally work by modifying the
765                    // dependency list of a module. If the dependency's test
766                    // passes it is added to the list. If not, it's not loaded.
767                    // This following check ensures that optional dependencies
768                    // are not attached when they were already loaded into the
769                    // page (when bundling for example)
770                    if (loader && !loader._canBeAttached(name)) {
771                        return true;
772                    }
773
774                    /*
775                        If it's a temp module, we need to redo it's requirements if it's already loaded
776                        since it may have been loaded by another instance and it's dependencies might
777                        have been redefined inside the fetched file.
778                    */
779                    if (loader && cache && cache[name] && cache[name].temp) {
780                        loader.getRequires(cache[name]);
781                        req = [];
782                        modInfo = loader.getModuleInfo(name);
783                        for (j in modInfo.expanded_map) {
784                            if (modInfo.expanded_map.hasOwnProperty(j)) {
785                                req.push(j);
786                            }
787                        }
788                        Y._attach(req);
789                    }
790
791                    details = mod.details;
792                    req = details.requires;
793                    esCompat = details.es;
794                    use = details.use;
795                    after = details.after;
796                    //Force Intl load if there is a language (Loader logic) @todo fix this shit
797                    if (details.lang) {
798                        req = req || [];
799                        req.unshift('intl');
800                    }
801
802                    if (req) {
803                        reqlen = req.length;
804                        for (j = 0; j < reqlen; j++) {
805                            if (!done[req[j]]) {
806                                if (!Y._attach(req)) {
807                                    return false;
808                                }
809                                break;
810                            }
811                        }
812                    }
813
814                    if (after) {
815                        for (j = 0; j < after.length; j++) {
816                            if (!done[after[j]]) {
817                                if (!Y._attach(after, true)) {
818                                    return false;
819                                }
820                                break;
821                            }
822                        }
823                    }
824
825                    if (mod.fn) {
826                        modArgs = [Y, name];
827                        if (esCompat) {
828                            __imports__ = {};
829                            __exports__ = {};
830                            // passing `exports` and `imports` onto the module function
831                            modArgs.push(__imports__, __exports__);
832                            if (req) {
833                                reqlen = req.length;
834                                for (j = 0; j < reqlen; j++) {
835                                    __imports__[req[j]] = exported.hasOwnProperty(req[j]) ? exported[req[j]] : Y;
836                                }
837                            }
838                        }
839                        if (Y.config.throwFail) {
840                            __exports__ = mod.fn.apply(esCompat ? undefined : mod, modArgs);
841                        } else {
842                            try {
843                                __exports__ = mod.fn.apply(esCompat ? undefined : mod, modArgs);
844                            } catch (e) {
845                                Y.error('Attach error: ' + name, e, name);
846                                return false;
847                            }
848                        }
849                        if (esCompat) {
850                            // store the `exports` in case others `es` modules requires it
851                            exported[name] = __exports__;
852
853                            // If an ES module is conditionally loaded and set
854                            // to be used "instead" another module, replace the
855                            // trigger module's content with the conditionally
856                            // loaded one so the values returned by require()
857                            // still makes sense
858                            condition = mod.details.condition;
859                            if (condition && condition.when === 'instead') {
860                                exported[condition.trigger] = __exports__;
861                            }
862                        }
863                    }
864
865                    if (use) {
866                        for (j = 0; j < use.length; j++) {
867                            if (!done[use[j]]) {
868                                if (!Y._attach(use)) {
869                                    return false;
870                                }
871                                break;
872                            }
873                        }
874                    }
875
876
877
878                }
879            }
880        }
881
882        return true;
883    },
884
885    /**
886    Delays the `use` callback until another event has taken place such as
887    `window.onload`, `domready`, `contentready`, or `available`.
888
889    @private
890    @method _delayCallback
891    @param {Function} cb The original `use` callback.
892    @param {String|Object} until Either an event name ('load', 'domready', etc.)
893        or an object containing event/args keys for contentready/available.
894    @return {Function}
895    **/
896    _delayCallback: function(cb, until) {
897
898        var Y = this,
899            mod = ['event-base'];
900
901        until = (Y.Lang.isObject(until) ? until : { event: until });
902
903        if (until.event === 'load') {
904            mod.push('event-synthetic');
905        }
906
907        return function() {
908            var args = arguments;
909            Y._use(mod, function() {
910                Y.on(until.event, function() {
911                    args[1].delayUntil = until.event;
912                    cb.apply(Y, args);
913                }, until.args);
914            });
915        };
916    },
917
918    /**
919    Attaches one or more modules to this YUI instance. When this is executed,
920    the requirements of the desired modules are analyzed, and one of several
921    things can happen:
922
923
924      * All required modules have already been loaded, and just need to be
925        attached to this YUI instance. In this case, the `use()` callback will
926        be executed synchronously after the modules are attached.
927
928      * One or more modules have not yet been loaded, or the Get utility is not
929        available, or the `bootstrap` config option is `false`. In this case,
930        a warning is issued indicating that modules are missing, but all
931        available modules will still be attached and the `use()` callback will
932        be executed synchronously.
933
934      * One or more modules are missing and the Loader is not available but the
935        Get utility is, and `bootstrap` is not `false`. In this case, the Get
936        utility will be used to load the Loader, and we will then proceed to
937        the following state:
938
939      * One or more modules are missing and the Loader is available. In this
940        case, the Loader will be used to resolve the dependency tree for the
941        missing modules and load them and their dependencies. When the Loader is
942        finished loading modules, the `use()` callback will be executed
943        asynchronously.
944
945    @example
946
947        // Loads and attaches dd and its dependencies.
948        YUI().use('dd', function (Y) {
949            // ...
950        });
951
952        // Loads and attaches dd and node as well as all of their dependencies.
953        YUI().use(['dd', 'node'], function (Y) {
954            // ...
955        });
956
957        // Attaches all modules that have already been loaded.
958        YUI().use('*', function (Y) {
959            // ...
960        });
961
962        // Attaches a gallery module.
963        YUI().use('gallery-yql', function (Y) {
964            // ...
965        });
966
967        // Attaches a YUI 2in3 module.
968        YUI().use('yui2-datatable', function (Y) {
969            // ...
970        });
971
972    @method use
973    @param {String|Array} modules* One or more module names to attach.
974    @param {Function} [callback] Callback function to be executed once all
975        specified modules and their dependencies have been attached.
976    @param {YUI} callback.Y The YUI instance created for this sandbox.
977    @param {Object} callback.status Object containing `success`, `msg` and
978        `data` properties.
979    @chainable
980    **/
981    use: function() {
982        var args = SLICE.call(arguments, 0),
983            callback = args[args.length - 1],
984            Y = this,
985            i = 0,
986            name,
987            Env = Y.Env,
988            provisioned = true;
989
990        // The last argument supplied to use can be a load complete callback
991        if (Y.Lang.isFunction(callback)) {
992            args.pop();
993            if (Y.config.delayUntil) {
994                callback = Y._delayCallback(callback, Y.config.delayUntil);
995            }
996        } else {
997            callback = null;
998        }
999        if (Y.Lang.isArray(args[0])) {
1000            args = args[0];
1001        }
1002
1003        if (Y.config.cacheUse) {
1004            while ((name = args[i++])) {
1005                if (!Env._attached[name]) {
1006                    provisioned = false;
1007                    break;
1008                }
1009            }
1010
1011            if (provisioned) {
1012                if (args.length) {
1013                }
1014                Y._notify(callback, ALREADY_DONE, args);
1015                return Y;
1016            }
1017        }
1018
1019        if (Y._loading) {
1020            Y._useQueue = Y._useQueue || new Y.Queue();
1021            Y._useQueue.add([args, callback]);
1022        } else {
1023            Y._use(args, function(Y, response) {
1024                Y._notify(callback, response, args);
1025            });
1026        }
1027
1028        return Y;
1029    },
1030
1031    /**
1032    Sugar for loading both legacy and ES6-based YUI modules.
1033
1034    @method require
1035    @param {String} [modules*] List of module names to import or a single
1036        module name.
1037    @param {Function} callback Callback that gets called once all the modules
1038        were loaded. Each parameter of the callback is the export value of the
1039        corresponding module in the list. If the module is a legacy YUI module,
1040        the YUI instance is used instead of the module exports.
1041    @example
1042    ```
1043    YUI().require(['es6-set'], function (Y, imports) {
1044        var Set = imports.Set,
1045            set = new Set();
1046    });
1047    ```
1048    **/
1049    require: function () {
1050        var args = SLICE.call(arguments),
1051            callback;
1052
1053        if (typeof args[args.length - 1] === 'function') {
1054            callback = args.pop();
1055
1056            // only add the callback if one was provided
1057            // YUI().require('foo'); is valid
1058            args.push(function (Y) {
1059                var i, length = args.length,
1060                    exported = Y.Env._exported,
1061                    __imports__ = {};
1062
1063                // Get only the imports requested as arguments
1064                for (i = 0; i < length; i++) {
1065                    if (exported.hasOwnProperty(args[i])) {
1066                        __imports__[args[i]] = exported[args[i]];
1067                    }
1068                }
1069
1070                // Using `undefined` because:
1071                // - Using `Y.config.global` would force the value of `this` to be
1072                //   the global object even in strict mode
1073                // - Using `Y` goes against the goal of moving away from a shared
1074                //   object and start thinking in terms of imported and exported
1075                //   objects
1076                callback.call(undefined, Y, __imports__);
1077            });
1078        }
1079        // Do not return the Y object. This makes it hard to follow this
1080        // traditional pattern:
1081        //   var Y = YUI().use(...);
1082        // This is a good idea in the light of ES6 modules, to avoid working
1083        // in the global scope.
1084        // This also leaves the door open for returning a promise, once the
1085        // YUI loader is based on the ES6 loader which uses
1086        // loader.import(...).then(...)
1087        this.use.apply(this, args);
1088    },
1089
1090    /**
1091    Handles Loader notifications about attachment/load errors.
1092
1093    @method _notify
1094    @param {Function} callback Callback to pass to `Y.config.loadErrorFn`.
1095    @param {Object} response Response returned from Loader.
1096    @param {Array} args Arguments passed from Loader.
1097    @private
1098    **/
1099    _notify: function(callback, response, args) {
1100        if (!response.success && this.config.loadErrorFn) {
1101            this.config.loadErrorFn.call(this, this, callback, response, args);
1102        } else if (callback) {
1103            if (this.Env._missed && this.Env._missed.length) {
1104                response.msg = 'Missing modules: ' + this.Env._missed.join();
1105                response.success = false;
1106            }
1107            if (this.config.throwFail) {
1108                callback(this, response);
1109            } else {
1110                try {
1111                    callback(this, response);
1112                } catch (e) {
1113                    this.error('use callback error', e, args);
1114                }
1115            }
1116        }
1117    },
1118
1119    /**
1120    Called from the `use` method queue to ensure that only one set of loading
1121    logic is performed at a time.
1122
1123    @method _use
1124    @param {String} args* One or more modules to attach.
1125    @param {Function} [callback] Function to call once all required modules have
1126        been attached.
1127    @private
1128    **/
1129    _use: function(args, callback) {
1130
1131        if (!this.Array) {
1132            this._attach(['yui-base']);
1133        }
1134
1135        var len, loader, handleBoot,
1136            Y = this,
1137            G_ENV = YUI.Env,
1138            mods = G_ENV.mods,
1139            Env = Y.Env,
1140            used = Env._used,
1141            aliases = G_ENV.aliases,
1142            queue = G_ENV._loaderQueue,
1143            firstArg = args[0],
1144            YArray = Y.Array,
1145            config = Y.config,
1146            boot = config.bootstrap,
1147            missing = [],
1148            i,
1149            r = [],
1150            ret = true,
1151            fetchCSS = config.fetchCSS,
1152            process = function(names, skip) {
1153
1154                var i = 0, a = [], name, len, m, req, use;
1155
1156                if (!names.length) {
1157                    return;
1158                }
1159
1160                if (aliases) {
1161                    len = names.length;
1162                    for (i = 0; i < len; i++) {
1163                        if (aliases[names[i]] && !mods[names[i]]) {
1164                            a = [].concat(a, aliases[names[i]]);
1165                        } else {
1166                            a.push(names[i]);
1167                        }
1168                    }
1169                    names = a;
1170                }
1171
1172                len = names.length;
1173
1174                for (i = 0; i < len; i++) {
1175                    name = names[i];
1176                    if (!skip) {
1177                        r.push(name);
1178                    }
1179
1180                    // only attach a module once
1181                    if (used[name]) {
1182                        continue;
1183                    }
1184
1185                    m = mods[name];
1186                    req = null;
1187                    use = null;
1188
1189                    if (m) {
1190                        used[name] = true;
1191                        req = m.details.requires;
1192                        use = m.details.use;
1193                    } else {
1194                        // CSS files don't register themselves, see if it has
1195                        // been loaded
1196                        if (!G_ENV._loaded[VERSION][name]) {
1197                            missing.push(name);
1198                        } else {
1199                            used[name] = true; // probably css
1200                        }
1201                    }
1202
1203                    // make sure requirements are attached
1204                    if (req && req.length) {
1205                        process(req);
1206                    }
1207
1208                    // make sure we grab the submodule dependencies too
1209                    if (use && use.length) {
1210                        process(use, 1);
1211                    }
1212                }
1213
1214            },
1215
1216            handleLoader = function(fromLoader) {
1217                var response = fromLoader || {
1218                        success: true,
1219                        msg: 'not dynamic'
1220                    },
1221                    redo, origMissing,
1222                    ret = true,
1223                    data = response.data;
1224
1225                Y._loading = false;
1226
1227                if (data) {
1228                    origMissing = missing;
1229                    missing = [];
1230                    r = [];
1231                    process(data);
1232                    redo = missing.length;
1233                    if (redo) {
1234                        if ([].concat(missing).sort().join() ==
1235                                origMissing.sort().join()) {
1236                            redo = false;
1237                        }
1238                    }
1239                }
1240
1241                if (redo && data) {
1242                    Y._loading = true;
1243                    Y._use(missing, function() {
1244                        if (Y._attach(data)) {
1245                            Y._notify(callback, response, data);
1246                        }
1247                    });
1248                } else {
1249                    if (data) {
1250                        ret = Y._attach(data);
1251                    }
1252                    if (ret) {
1253                        Y._notify(callback, response, args);
1254                    }
1255                }
1256
1257                if (Y._useQueue && Y._useQueue.size() && !Y._loading) {
1258                    Y._use.apply(Y, Y._useQueue.next());
1259                }
1260
1261            };
1262
1263
1264        // YUI().use('*'); // bind everything available
1265        if (firstArg === '*') {
1266            args = [];
1267            for (i in mods) {
1268                if (mods.hasOwnProperty(i)) {
1269                    args.push(i);
1270                }
1271            }
1272            ret = Y._attach(args);
1273            if (ret) {
1274                handleLoader();
1275            }
1276            return Y;
1277        }
1278
1279        if ((mods.loader || mods['loader-base']) && !Y.Loader) {
1280            Y._attach(['loader' + ((!mods.loader) ? '-base' : '')]);
1281        }
1282
1283
1284        // use loader to expand dependencies and sort the
1285        // requirements if it is available.
1286        if (boot && Y.Loader && args.length) {
1287            loader = getLoader(Y);
1288            loader.require(args);
1289            loader.ignoreRegistered = true;
1290            loader._boot = true;
1291            loader.calculate(null, (fetchCSS) ? null : 'js');
1292            args = loader.sorted;
1293            loader._boot = false;
1294        }
1295
1296        process(args);
1297
1298        len = missing.length;
1299
1300
1301        if (len) {
1302            missing = YArray.dedupe(missing);
1303            len = missing.length;
1304        }
1305
1306
1307        // dynamic load
1308        if (boot && len && Y.Loader) {
1309            Y._loading = true;
1310            loader = getLoader(Y);
1311            loader.onEnd = handleLoader;
1312            loader.context = Y;
1313            loader.data = args;
1314            loader.ignoreRegistered = false;
1315            loader.require(missing);
1316            loader.insert(null, (fetchCSS) ? null : 'js');
1317
1318        } else if (boot && len && Y.Get && !Env.bootstrapped) {
1319
1320            Y._loading = true;
1321
1322            handleBoot = function() {
1323                Y._loading = false;
1324                queue.running = false;
1325                Env.bootstrapped = true;
1326                G_ENV._bootstrapping = false;
1327                if (Y._attach(['loader'])) {
1328                    Y._use(args, callback);
1329                }
1330            };
1331
1332            if (G_ENV._bootstrapping) {
1333                queue.add(handleBoot);
1334            } else {
1335                G_ENV._bootstrapping = true;
1336                Y.Get.script(config.base + config.loaderPath, {
1337                    onEnd: handleBoot
1338                });
1339            }
1340
1341        } else {
1342            ret = Y._attach(args);
1343            if (ret) {
1344                handleLoader();
1345            }
1346        }
1347
1348        return Y;
1349    },
1350
1351
1352    /**
1353    Utility method for safely creating namespaces if they don't already exist.
1354    May be called statically on the YUI global object or as a method on a YUI
1355    instance.
1356
1357    When called statically, a namespace will be created on the YUI global
1358    object:
1359
1360        // Create `YUI.your.namespace.here` as nested objects, preserving any
1361        // objects that already exist instead of overwriting them.
1362        YUI.namespace('your.namespace.here');
1363
1364    When called as a method on a YUI instance, a namespace will be created on
1365    that instance:
1366
1367        // Creates `Y.property.package`.
1368        Y.namespace('property.package');
1369
1370    Dots in the input string cause `namespace` to create nested objects for each
1371    token. If any part of the requested namespace already exists, the current
1372    object will be left in place and will not be overwritten. This allows
1373    multiple calls to `namespace` to preserve existing namespaced properties.
1374
1375    If the first token in the namespace string is "YAHOO", that token is
1376    discarded. This is legacy behavior for backwards compatibility with YUI 2.
1377
1378    Be careful with namespace tokens. Reserved words may work in some browsers
1379    and not others. For instance, the following will fail in some browsers
1380    because the supported version of JavaScript reserves the word "long":
1381
1382        Y.namespace('really.long.nested.namespace');
1383
1384    Note: If you pass multiple arguments to create multiple namespaces, only the
1385    last one created is returned from this function.
1386
1387    @method namespace
1388    @param {String} namespace* One or more namespaces to create.
1389    @return {Object} Reference to the last namespace object created.
1390    **/
1391    namespace: function() {
1392        var a = arguments, o, i = 0, j, d, arg;
1393
1394        for (; i < a.length; i++) {
1395            o = this; //Reset base object per argument or it will get reused from the last
1396            arg = a[i];
1397            if (arg.indexOf(PERIOD) > -1) { //Skip this if no "." is present
1398                d = arg.split(PERIOD);
1399                for (j = (d[0] == 'YAHOO') ? 1 : 0; j < d.length; j++) {
1400                    o[d[j]] = o[d[j]] || {};
1401                    o = o[d[j]];
1402                }
1403            } else {
1404                o[arg] = o[arg] || {};
1405                o = o[arg]; //Reset base object to the new object so it's returned
1406            }
1407        }
1408        return o;
1409    },
1410
1411    // this is replaced if the log module is included
1412    log: NOOP,
1413    message: NOOP,
1414    // this is replaced if the dump module is included
1415    dump: function (o) { return ''+o; },
1416
1417    /**
1418    Reports an error.
1419
1420    The reporting mechanism is controlled by the `throwFail` configuration
1421    attribute. If `throwFail` is falsy, the message is logged. If `throwFail` is
1422    truthy, a JS exception is thrown.
1423
1424    If an `errorFn` is specified in the config it must return `true` to indicate
1425    that the exception was handled and keep it from being thrown.
1426
1427    @method error
1428    @param {String} msg Error message.
1429    @param {Error|String} [e] JavaScript error object or an error string.
1430    @param {String} [src] Source of the error (such as the name of the module in
1431        which the error occurred).
1432    @chainable
1433    **/
1434    error: function(msg, e, src) {
1435        //TODO Add check for window.onerror here
1436
1437        var Y = this, ret;
1438
1439        if (Y.config.errorFn) {
1440            ret = Y.config.errorFn.apply(Y, arguments);
1441        }
1442
1443        if (!ret) {
1444            throw (e || new Error(msg));
1445        } else {
1446            Y.message(msg, 'error', ''+src); // don't scrub this one
1447        }
1448
1449        return Y;
1450    },
1451
1452    /**
1453    Generates an id string that is unique among all YUI instances in this
1454    execution context.
1455
1456    @method guid
1457    @param {String} [pre] Prefix.
1458    @return {String} Unique id.
1459    **/
1460    guid: function(pre) {
1461        var id = this.Env._guidp + '_' + (++this.Env._uidx);
1462        return (pre) ? (pre + id) : id;
1463    },
1464
1465    /**
1466    Returns a unique id associated with the given object and (if *readOnly* is
1467    falsy) stamps the object with that id so it can be identified in the future.
1468
1469    Stamping an object involves adding a `_yuid` property to it that contains
1470    the object's id. One exception to this is that in Internet Explorer, DOM
1471    nodes have a `uniqueID` property that contains a browser-generated unique
1472    id, which will be used instead of a YUI-generated id when available.
1473
1474    @method stamp
1475    @param {Object} o Object to stamp.
1476    @param {Boolean} readOnly If truthy and the given object has not already
1477        been stamped, the object will not be modified and `null` will be
1478        returned.
1479    @return {String} Object's unique id, or `null` if *readOnly* was truthy and
1480        the given object was not already stamped.
1481    **/
1482    stamp: function(o, readOnly) {
1483        var uid;
1484        if (!o) {
1485            return o;
1486        }
1487
1488        // IE generates its own unique ID for dom nodes
1489        // The uniqueID property of a document node returns a new ID
1490        if (o.uniqueID && o.nodeType && o.nodeType !== 9) {
1491            uid = o.uniqueID;
1492        } else {
1493            uid = (typeof o === 'string') ? o : o._yuid;
1494        }
1495
1496        if (!uid) {
1497            uid = this.guid();
1498            if (!readOnly) {
1499                try {
1500                    o._yuid = uid;
1501                } catch (e) {
1502                    uid = null;
1503                }
1504            }
1505        }
1506        return uid;
1507    },
1508
1509    /**
1510    Destroys this YUI instance.
1511
1512    @method destroy
1513    @since 3.3.0
1514    **/
1515    destroy: function() {
1516        var Y = this;
1517        if (Y.Event) {
1518            Y.Event._unload();
1519        }
1520        delete instances[Y.id];
1521        delete Y.Env;
1522        delete Y.config;
1523    }
1524
1525    /**
1526    Safe `instanceof` wrapper that works around a memory leak in IE when the
1527    object being tested is `window` or `document`.
1528
1529    Unless you are testing objects that may be `window` or `document`, you
1530    should use the native `instanceof` operator instead of this method.
1531
1532    @method instanceOf
1533    @param {Object} o Object to check.
1534    @param {Object} type Class to check against.
1535    @since 3.3.0
1536    **/
1537};
1538
1539    YUI.prototype = proto;
1540
1541    // inheritance utilities are not available yet
1542    for (prop in proto) {
1543        if (proto.hasOwnProperty(prop)) {
1544            YUI[prop] = proto[prop];
1545        }
1546    }
1547
1548    /**
1549    Applies a configuration to all YUI instances in this execution context.
1550
1551    The main use case for this method is in "mashups" where several third-party
1552    scripts need to write to a global YUI config, but cannot share a single
1553    centrally-managed config object. This way they can all call
1554    `YUI.applyConfig({})` instead of overwriting the single global config.
1555
1556    @example
1557
1558        YUI.applyConfig({
1559            modules: {
1560                davglass: {
1561                    fullpath: './davglass.js'
1562                }
1563            }
1564        });
1565
1566        YUI.applyConfig({
1567            modules: {
1568                foo: {
1569                    fullpath: './foo.js'
1570                }
1571            }
1572        });
1573
1574        YUI().use('davglass', function (Y) {
1575            // Module davglass will be available here.
1576        });
1577
1578    @method applyConfig
1579    @param {Object} o Configuration object to apply.
1580    @static
1581    @since 3.5.0
1582    **/
1583    YUI.applyConfig = function(o) {
1584        if (!o) {
1585            return;
1586        }
1587        //If there is a GlobalConfig, apply it first to set the defaults
1588        if (YUI.GlobalConfig) {
1589            this.prototype.applyConfig.call(this, YUI.GlobalConfig);
1590        }
1591        //Apply this config to it
1592        this.prototype.applyConfig.call(this, o);
1593        //Reset GlobalConfig to the combined config
1594        YUI.GlobalConfig = this.config;
1595    };
1596
1597    // set up the environment
1598    YUI._init();
1599
1600    if (hasWin) {
1601        add(doc, 'DOMContentLoaded', handleReady);
1602
1603        // add a window load event at load time so we can capture
1604        // the case where it fires before dynamic loading is
1605        // complete.
1606        add(window, 'load', handleLoad);
1607    } else {
1608        handleReady();
1609        handleLoad();
1610    }
1611
1612    YUI.Env.add = add;
1613    YUI.Env.remove = remove;
1614
1615    /*global exports*/
1616    // Support the CommonJS method for exporting our single global
1617    if (typeof exports == 'object') {
1618        exports.YUI = YUI;
1619        /**
1620        * Set a method to be called when `Get.script` is called in Node.js
1621        * `Get` will open the file, then pass it's content and it's path
1622        * to this method before attaching it. Commonly used for code coverage
1623        * instrumentation. <strong>Calling this multiple times will only
1624        * attach the last hook method</strong>. This method is only
1625        * available in Node.js.
1626        * @method setLoadHook
1627        * @static
1628        * @param {Function} fn The function to set
1629        * @param {String} fn.data The content of the file
1630        * @param {String} fn.path The file path of the file
1631        */
1632        YUI.setLoadHook = function(fn) {
1633            YUI._getLoadHook = fn;
1634        };
1635        /**
1636        * Load hook for `Y.Get.script` in Node.js, see `YUI.setLoadHook`
1637        * @method _getLoadHook
1638        * @private
1639        * @param {String} data The content of the file
1640        * @param {String} path The file path of the file
1641        */
1642        YUI._getLoadHook = null;
1643    }
1644
1645    YUI.Env[VERSION] = {};
1646}());
1647
1648
1649/**
1650Config object that contains all of the configuration options for
1651this `YUI` instance.
1652
1653This object is supplied by the implementer when instantiating YUI. Some
1654properties have default values if they are not supplied by the implementer.
1655
1656This object should not be updated directly because some values are cached. Use
1657`applyConfig()` to update the config object on a YUI instance that has already
1658been configured.
1659
1660@class config
1661@static
1662**/
1663
1664/**
1665If `true` (the default), YUI will "bootstrap" the YUI Loader and module metadata
1666if they're needed to load additional dependencies and aren't already available.
1667
1668Setting this to `false` will prevent YUI from automatically loading the Loader
1669and module metadata, so you will need to manually ensure that they're available
1670or handle dependency resolution yourself.
1671
1672@property {Boolean} bootstrap
1673@default true
1674**/
1675
1676/**
1677
1678@property {Object} filters
1679**/
1680
1681/**
1682If `true`, YUI will use a combo handler to load multiple modules in as few
1683requests as possible.
1684
1685The YUI CDN (which YUI uses by default) supports combo handling, but other
1686servers may not. If the server from which you're loading YUI does not support
1687combo handling, set this to `false`.
1688
1689Providing a value for the `base` config property will cause `combine` to default
1690to `false` instead of `true`.
1691
1692@property {Boolean} combine
1693@default true
1694*/
1695
1696/**
1697Array of module names that should never be dynamically loaded.
1698
1699@property {String[]} ignore
1700**/
1701
1702/**
1703Array of module names that should always be loaded when required, even if
1704already present on the page.
1705
1706@property {String[]} force
1707**/
1708
1709/**
1710DOM element or id that should be used as the insertion point for dynamically
1711added `<script>` and `<link>` nodes.
1712
1713@property {HTMLElement|String} insertBefore
1714**/
1715
1716/**
1717Object hash containing attributes to add to dynamically added `<script>` nodes.
1718
1719@property {Object} jsAttributes
1720**/
1721
1722/**
1723Object hash containing attributes to add to dynamically added `<link>` nodes.
1724
1725@property {Object} cssAttributes
1726**/
1727
1728/**
1729Timeout in milliseconds before a dynamic JS or CSS request will be considered a
1730failure. If not set, no timeout will be enforced.
1731
1732@property {Number} timeout
1733**/
1734
1735/**
1736A hash of module definitions to add to the list of available YUI modules. These
1737modules can then be dynamically loaded via the `use()` method.
1738
1739This is a hash in which keys are module names and values are objects containing
1740module metadata.
1741
1742See `Loader.addModule()` for the supported module metadata fields. Also see
1743`groups`, which provides a way to configure the base and combo spec for a set of
1744modules.
1745
1746@example
1747
1748    modules: {
1749        mymod1: {
1750            requires: ['node'],
1751            fullpath: '/mymod1/mymod1.js'
1752        },
1753
1754        mymod2: {
1755            requires: ['mymod1'],
1756            fullpath: '/mymod2/mymod2.js'
1757        },
1758
1759        mymod3: '/js/mymod3.js',
1760        mycssmod: '/css/mycssmod.css'
1761    }
1762
1763@property {Object} modules
1764**/
1765
1766/**
1767Aliases are dynamic groups of modules that can be used as shortcuts.
1768
1769@example
1770
1771    YUI({
1772        aliases: {
1773            davglass: [ 'node', 'yql', 'dd' ],
1774            mine: [ 'davglass', 'autocomplete']
1775        }
1776    }).use('mine', function (Y) {
1777        // Node, YQL, DD & AutoComplete available here.
1778    });
1779
1780@property {Object} aliases
1781**/
1782
1783/**
1784A hash of module group definitions.
1785
1786For each group you can specify a list of modules and the base path and
1787combo spec to use when dynamically loading the modules.
1788
1789@example
1790
1791    groups: {
1792        yui2: {
1793            // specify whether or not this group has a combo service
1794            combine: true,
1795
1796            // The comboSeperator to use with this group's combo handler
1797            comboSep: ';',
1798
1799            // The maxURLLength for this server
1800            maxURLLength: 500,
1801
1802            // the base path for non-combo paths
1803            base: 'http://yui.yahooapis.com/2.8.0r4/build/',
1804
1805            // the path to the combo service
1806            comboBase: 'http://yui.yahooapis.com/combo?',
1807
1808            // a fragment to prepend to the path attribute when
1809            // when building combo urls
1810            root: '2.8.0r4/build/',
1811
1812            // the module definitions
1813            modules:  {
1814                yui2_yde: {
1815                    path: "yahoo-dom-event/yahoo-dom-event.js"
1816                },
1817                yui2_anim: {
1818                    path: "animation/animation.js",
1819                    requires: ['yui2_yde']
1820                }
1821            }
1822        }
1823    }
1824
1825@property {Object} groups
1826**/
1827
1828/**
1829Path to the Loader JS file, relative to the `base` path.
1830
1831This is used to dynamically bootstrap the Loader when it's needed and isn't yet
1832available.
1833
1834@property {String} loaderPath
1835@default "loader/loader-min.js"
1836**/
1837
1838/**
1839If `true`, YUI will attempt to load CSS dependencies and skins. Set this to
1840`false` to prevent YUI from loading any CSS, or set it to the string `"force"`
1841to force CSS dependencies to be loaded even if their associated JS modules are
1842already loaded.
1843
1844@property {Boolean|String} fetchCSS
1845@default true
1846**/
1847
1848/**
1849Default gallery version used to build gallery module urls.
1850
1851@property {String} gallery
1852@since 3.1.0
1853**/
1854
1855/**
1856Default YUI 2 version used to build YUI 2 module urls.
1857
1858This is used for intrinsic YUI 2 support via the 2in3 project. Also see the
1859`2in3` config for pulling different revisions of the wrapped YUI 2 modules.
1860
1861@property {String} yui2
1862@default "2.9.0"
1863@since 3.1.0
1864**/
1865
1866/**
1867Revision number of YUI 2in3 modules that should be used when loading YUI 2in3.
1868
1869@property {String} 2in3
1870@default "4"
1871@since 3.1.0
1872**/
1873
1874/**
1875Alternate console log function that should be used in environments without a
1876supported native console. This function is executed with the YUI instance as its
1877`this` object.
1878
1879@property {Function} logFn
1880@since 3.1.0
1881**/
1882
1883/**
1884The minimum log level to log messages for. Log levels are defined
1885incrementally. Messages greater than or equal to the level specified will
1886be shown. All others will be discarded. The order of log levels in
1887increasing priority is:
1888
1889    debug
1890    info
1891    warn
1892    error
1893
1894@property {String} logLevel
1895@default 'debug'
1896@since 3.10.0
1897**/
1898
1899/**
1900Callback to execute when `Y.error()` is called. It receives the error message
1901and a JavaScript error object if one was provided.
1902
1903This function is executed with the YUI instance as its `this` object.
1904
1905Returning `true` from this function will prevent an exception from being thrown.
1906
1907@property {Function} errorFn
1908@param {String} errorFn.msg Error message
1909@param {Object} [errorFn.err] Error object (if one was provided).
1910@since 3.2.0
1911**/
1912
1913/**
1914A callback to execute when Loader fails to load one or more resources.
1915
1916This could be because of a script load failure. It could also be because a
1917module fails to register itself when the `requireRegistration` config is `true`.
1918
1919If this function is defined, the `use()` callback will only be called when the
1920loader succeeds. Otherwise, `use()` will always executes unless there was a
1921JavaScript error when attaching a module.
1922
1923@property {Function} loadErrorFn
1924@since 3.3.0
1925**/
1926
1927/**
1928If `true`, Loader will expect all loaded scripts to be first-class YUI modules
1929that register themselves with the YUI global, and will trigger a failure if a
1930loaded script does not register a YUI module.
1931
1932@property {Boolean} requireRegistration
1933@default false
1934@since 3.3.0
1935**/
1936
1937/**
1938Cache serviced use() requests.
1939
1940@property {Boolean} cacheUse
1941@default true
1942@since 3.3.0
1943@deprecated No longer used.
1944**/
1945
1946/**
1947Whether or not YUI should use native ES5 functionality when available for
1948features like `Y.Array.each()`, `Y.Object()`, etc.
1949
1950When `false`, YUI will always use its own fallback implementations instead of
1951relying on ES5 functionality, even when ES5 functionality is available.
1952
1953@property {Boolean} useNativeES5
1954@default true
1955@since 3.5.0
1956**/
1957
1958/**
1959 * Leverage native JSON stringify if the browser has a native
1960 * implementation.  In general, this is a good idea.  See the Known Issues
1961 * section in the JSON user guide for caveats.  The default value is true
1962 * for browsers with native JSON support.
1963 *
1964 * @property useNativeJSONStringify
1965 * @type Boolean
1966 * @default true
1967 * @since 3.8.0
1968 */
1969
1970 /**
1971 * Leverage native JSON parse if the browser has a native implementation.
1972 * In general, this is a good idea.  See the Known Issues section in the
1973 * JSON user guide for caveats.  The default value is true for browsers with
1974 * native JSON support.
1975 *
1976 * @property useNativeJSONParse
1977 * @type Boolean
1978 * @default true
1979 * @since 3.8.0
1980 */
1981
1982/**
1983Delay the `use` callback until a specific event has passed (`load`, `domready`, `contentready` or `available`)
1984
1985@property {Object|String} delayUntil
1986@since 3.6.0
1987@example
1988
1989You can use `load` or `domready` strings by default:
1990
1991    YUI({
1992        delayUntil: 'domready'
1993    }, function (Y) {
1994        // This will not execute until 'domeready' occurs.
1995    });
1996
1997Or you can delay until a node is available (with `available` or `contentready`):
1998
1999    YUI({
2000        delayUntil: {
2001            event: 'available',
2002            args : '#foo'
2003        }
2004    }, function (Y) {
2005        // This will not execute until a node matching the selector "#foo" is
2006        // available in the DOM.
2007    });
2008
2009**/
2010YUI.add('yui-base', function (Y, NAME) {
2011
2012/*
2013 * YUI stub
2014 * @module yui
2015 * @submodule yui-base
2016 */
2017/**
2018 * The YUI module contains the components required for building the YUI
2019 * seed file.  This includes the script loading mechanism, a simple queue,
2020 * and the core utilities for the library.
2021 * @module yui
2022 * @submodule yui-base
2023 */
2024
2025/**
2026 * Provides core language utilites and extensions used throughout YUI.
2027 *
2028 * @class Lang
2029 * @static
2030 */
2031
2032var L = Y.Lang || (Y.Lang = {}),
2033
2034STRING_PROTO = String.prototype,
2035TOSTRING     = Object.prototype.toString,
2036
2037TYPES = {
2038    'undefined'        : 'undefined',
2039    'number'           : 'number',
2040    'boolean'          : 'boolean',
2041    'string'           : 'string',
2042    '[object Function]': 'function',
2043    '[object RegExp]'  : 'regexp',
2044    '[object Array]'   : 'array',
2045    '[object Date]'    : 'date',
2046    '[object Error]'   : 'error'
2047},
2048
2049SUBREGEX         = /\{\s*([^|}]+?)\s*(?:\|([^}]*))?\s*\}/g,
2050
2051WHITESPACE       = "\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\uFEFF",
2052WHITESPACE_CLASS = "[\x09-\x0D\x20\xA0\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+",
2053TRIM_LEFT_REGEX  = new RegExp("^" + WHITESPACE_CLASS),
2054TRIM_RIGHT_REGEX = new RegExp(WHITESPACE_CLASS + "$"),
2055TRIMREGEX        = new RegExp(TRIM_LEFT_REGEX.source + "|" + TRIM_RIGHT_REGEX.source, "g"),
2056
2057NATIVE_FN_REGEX  = /\{\s*\[(?:native code|function)\]\s*\}/i;
2058
2059// -- Protected Methods --------------------------------------------------------
2060
2061/**
2062Returns `true` if the given function appears to be implemented in native code,
2063`false` otherwise. Will always return `false` -- even in ES5-capable browsers --
2064if the `useNativeES5` YUI config option is set to `false`.
2065
2066This isn't guaranteed to be 100% accurate and won't work for anything other than
2067functions, but it can be useful for determining whether a function like
2068`Array.prototype.forEach` is native or a JS shim provided by another library.
2069
2070There's a great article by @kangax discussing certain flaws with this technique:
2071<http://perfectionkills.com/detecting-built-in-host-methods/>
2072
2073While his points are valid, it's still possible to benefit from this function
2074as long as it's used carefully and sparingly, and in such a way that false
2075negatives have minimal consequences. It's used internally to avoid using
2076potentially broken non-native ES5 shims that have been added to the page b
2076y
2077other libraries.
2078
2079@method _isNative
2080@param {Function} fn Function to test.
2081@return {Boolean} `true` if _fn_ appears to be native, `false` otherwise.
2082@static
2083@protected
2084@since 3.5.0
2085**/
2086L._isNative = function (fn) {
2087    return !!(Y.config.useNativeES5 && fn && NATIVE_FN_REGEX.test(fn));
2088};
2089
2090// -- Public Methods -----------------------------------------------------------
2091
2092/**
2093 * Determines whether or not the provided item is an array.
2094 *
2095 * Returns `false` for array-like collections such as the function `arguments`
2096 * collection or `HTMLElement` collections. Use `Y.Array.test()` if you want to
2097 * test for an array-like collection.
2098 *
2099 * @method isArray
2100 * @param o The object to test.
2101 * @return {boolean} true if o is an array.
2102 * @static
2103 */
2104L.isArray = L._isNative(Array.isArray) ? Array.isArray : function (o) {
2105    return L.type(o) === 'array';
2106};
2107
2108/**
2109 * Determines whether or not the provided item is a boolean.
2110 * @method isBoolean
2111 * @static
2112 * @param o The object to test.
2113 * @return {boolean} true if o is a boolean.
2114 */
2115L.isBoolean = function(o) {
2116    return typeof o === 'boolean';
2117};
2118
2119/**
2120 * Determines whether or not the supplied item is a date instance.
2121 * @method isDate
2122 * @static
2123 * @param o The object to test.
2124 * @return {boolean} true if o is a date.
2125 */
2126L.isDate = function(o) {
2127    return L.type(o) === 'date' && o.toString() !== 'Invalid Date' && !isNaN(o);
2128};
2129
2130/**
2131 * <p>
2132 * Determines whether or not the provided item is a function.
2133 * Note: Internet Explorer thinks certain functions are objects:
2134 * </p>
2135 *
2136 * <pre>
2137 * var obj = document.createElement("object");
2138 * Y.Lang.isFunction(obj.getAttribute) // reports false in IE
2139 * &nbsp;
2140 * var input = document.createElement("input"); // append to body
2141 * Y.Lang.isFunction(input.focus) // reports false in IE
2142 * </pre>
2143 *
2144 * <p>
2145 * You will have to implement additional tests if these functions
2146 * matter to you.
2147 * </p>
2148 *
2149 * @method isFunction
2150 * @static
2151 * @param o The object to test.
2152 * @return {boolean} true if o is a function.
2153 */
2154L.isFunction = function(o) {
2155    return L.type(o) === 'function';
2156};
2157
2158/**
2159 * Determines whether or not the provided item is null.
2160 * @method isNull
2161 * @static
2162 * @param o The object to test.
2163 * @return {boolean} true if o is null.
2164 */
2165L.isNull = function(o) {
2166    return o === null;
2167};
2168
2169/**
2170 * Determines whether or not the provided item is a legal number.
2171 * @method isNumber
2172 * @static
2173 * @param o The object to test.
2174 * @return {boolean} true if o is a number.
2175 */
2176L.isNumber = function(o) {
2177    return typeof o === 'number' && isFinite(o);
2178};
2179
2180/**
2181 * Determines whether or not the provided item is of type object
2182 * or function. Note that arrays are also objects, so
2183 * <code>Y.Lang.isObject([]) === true</code>.
2184 * @method isObject
2185 * @static
2186 * @param o The object to test.
2187 * @param failfn {boolean} fail if the input is a function.
2188 * @return {boolean} true if o is an object.
2189 * @see isPlainObject
2190 */
2191L.isObject = function(o, failfn) {
2192    var t = typeof o;
2193    return (o && (t === 'object' ||
2194        (!failfn && (t === 'function' || L.isFunction(o))))) || false;
2195};
2196
2197/**
2198 * Determines whether or not the provided value is a regexp.
2199 * @method isRegExp
2200 * @static
2201 * @param value The value or object to test.
2202 * @return {boolean} true if value is a regexp.
2203 */
2204L.isRegExp = function(value) {
2205    return L.type(value) === 'regexp';
2206};
2207
2208/**
2209 * Determines whether or not the provided item is a string.
2210 * @method isString
2211 * @static
2212 * @param o The object to test.
2213 * @return {boolean} true if o is a string.
2214 */
2215L.isString = function(o) {
2216    return typeof o === 'string';
2217};
2218
2219/**
2220 * Determines whether or not the provided item is undefined.
2221 * @method isUndefined
2222 * @static
2223 * @param o The object to test.
2224 * @return {boolean} true if o is undefined.
2225 */
2226L.isUndefined = function(o) {
2227    return typeof o === 'undefined';
2228};
2229
2230/**
2231 * A convenience method for detecting a legitimate non-null value.
2232 * Returns false for null/undefined/NaN, true for other values,
2233 * including 0/false/''
2234 * @method isValue
2235 * @static
2236 * @param o The item to test.
2237 * @return {boolean} true if it is not null/undefined/NaN || false.
2238 */
2239L.isValue = function(o) {
2240    var t = L.type(o);
2241
2242    switch (t) {
2243        case 'number':
2244            return isFinite(o);
2245
2246        case 'null': // fallthru
2247        case 'undefined':
2248            return false;
2249
2250        default:
2251            return !!t;
2252    }
2253};
2254
2255/**
2256 * Returns the current time in milliseconds.
2257 *
2258 * @method now
2259 * @return {Number} Current time in milliseconds.
2260 * @static
2261 * @since 3.3.0
2262 */
2263L.now = Date.now || function () {
2264    return new Date().getTime();
2265};
2266
2267/**
2268 * Performs `{placeholder}` substitution on a string. The object passed as the
2269 * second parameter provides values to replace the `{placeholder}`s.
2270 * `{placeholder}` token names must match property names of the object. For example,
2271 *
2272 *`var greeting = Y.Lang.sub("Hello, {who}!", { who: "World" });`
2273 *
2274 * `{placeholder}` tokens that are undefined on the object map will be left
2275 * in tact (leaving unsightly `{placeholder}`'s in the output string).
2276 *
2277 * @method sub
2278 * @param {string} s String to be modified.
2279 * @param {object} o Object containing replacement values.
2280 * @return {string} the substitute result.
2281 * @static
2282 * @since 3.2.0
2283 */
2284L.sub = function(s, o) {
2285
2286    /**
2287    Finds the value of `key` in given object.
2288    If the key has a 'dot' notation e.g. 'foo.bar.baz', the function will
2289    try to resolve this path if it doesn't exist as a property
2290    @example
2291        value({ 'a.b': 1, a: { b: 2 } }, 'a.b'); // 1
2292        value({ a: { b: 2 } }          , 'a.b'); // 2
2293    @param {Object} obj A key/value pairs object
2294    @param {String} key
2295    @return {Any}
2296    @private
2297    **/
2298    function value(obj, key) {
2299
2300        var subkey;
2301
2302        if ( typeof obj[key] !== 'undefined' ) {
2303            return obj[key];
2304        }
2305
2306        key    = key.split('.');         // given 'a.b.c'
2307        subkey = key.slice(1).join('.'); // 'b.c'
2308        key    = key[0];                 // 'a'
2309
2310        // special case for null as typeof returns object and we don't want that.
2311        if ( subkey && typeof obj[key] === 'object' && obj[key] !== null ) {
2312            return value(obj[key], subkey);
2313        }
2314    }
2315
2316    return s.replace ? s.replace(SUBREGEX, function (match, key) {
2317        var val = key.indexOf('.')>-1 ? value(o, key) : o[key];
2318        return typeof val === 'undefined' ? match : val;
2319    }) : s;
2320};
2321
2322/**
2323 * Returns a string without any leading or trailing whitespace.  If
2324 * the input is not a string, the input will be returned untouched.
2325 * @method trim
2326 * @static
2327 * @param s {string} the string to trim.
2328 * @return {string} the trimmed string.
2329 */
2330L.trim = L._isNative(STRING_PROTO.trim) && !WHITESPACE.trim() ? function(s) {
2331    return s && s.trim ? s.trim() : s;
2332} : function (s) {
2333    try {
2334        return s.replace(TRIMREGEX, '');
2335    } catch (e) {
2336        return s;
2337    }
2338};
2339
2340/**
2341 * Returns a string without any leading whitespace.
2342 * @method trimLeft
2343 * @static
2344 * @param s {string} the string to trim.
2345 * @return {string} the trimmed string.
2346 */
2347L.trimLeft = L._isNative(STRING_PROTO.trimLeft) && !WHITESPACE.trimLeft() ? function (s) {
2348    return s.trimLeft();
2349} : function (s) {
2350    return s.replace(TRIM_LEFT_REGEX, '');
2351};
2352
2353/**
2354 * Returns a string without any trailing whitespace.
2355 * @method trimRight
2356 * @static
2357 * @param s {string} the string to trim.
2358 * @return {string} the trimmed string.
2359 */
2360L.trimRight = L._isNative(STRING_PROTO.trimRight) && !WHITESPACE.trimRight() ? function (s) {
2361    return s.trimRight();
2362} : function (s) {
2363    return s.replace(TRIM_RIGHT_REGEX, '');
2364};
2365
2366/**
2367Returns one of the following strings, representing the type of the item passed
2368in:
2369
2370 * "array"
2371 * "boolean"
2372 * "date"
2373 * "error"
2374 * "function"
2375 * "null"
2376 * "number"
2377 * "object"
2378 * "regexp"
2379 * "string"
2380 * "undefined"
2381
2382Known issues:
2383
2384 * `typeof HTMLElementCollection` returns function in Safari, but
2385    `Y.Lang.type()` reports "object", which could be a good thing --
2386    but it actually caused the logic in <code>Y.Lang.isObject</code> to fail.
2387
2388@method type
2389@param o the item to test.
2390@return {string} the detected type.
2391@static
2392**/
2393L.type = function(o) {
2394    return TYPES[typeof o] || TYPES[TOSTRING.call(o)] || (o ? 'object' : 'null');
2395};
2396/**
2397@module yui
2398@submodule yui-base
2399*/
2400
2401var Lang   = Y.Lang,
2402    Native = Array.prototype,
2403
2404    hasOwn = Object.prototype.hasOwnProperty;
2405
2406/**
2407Provides utility methods for working with arrays. Additional array helpers can
2408be found in the `collection` and `array-extras` modules.
2409
2410`Y.Array(thing)` returns a native array created from _thing_. Depending on
2411_thing_'s type, one of the following will happen:
2412
2413  * Arrays are returned unmodified unless a non-zero _startIndex_ is
2414    specified.
2415  * Array-like collections (see `Array.test()`) are converted to arrays.
2416  * For everything else, a new array is created with _thing_ as the sole
2417    item.
2418
2419Note: elements that are also collections, such as `<form>` and `<select>`
2420elements, are not automatically converted to arrays. To force a conversion,
2421pass `true` as the value of the _force_ parameter.
2422
2423@class Array
2424@constructor
2425@param {Any} thing The thing to arrayify.
2426@param {Number} [startIndex=0] If non-zero and _thing_ is an array or array-like
2427  collection, a subset of items starting at the specified index will be
2428  returned.
2429@param {Boolean} [force=false] If `true`, _thing_ will be treated as an
2430  array-like collection no matter what.
2431@return {Array} A native array created from _thing_, according to the rules
2432  described above.
2433**/
2434function YArray(thing, startIndex, force) {
2435    var len, result;
2436
2437    /*jshint expr: true*/
2438    startIndex || (startIndex = 0);
2439
2440    if (force || YArray.test(thing)) {
2441        // IE throws when trying to slice HTMLElement collections.
2442        try {
2443            return Native.slice.call(thing, startIndex);
2444        } catch (ex) {
2445            result = [];
2446
2447            for (len = thing.length; startIndex < len; ++startIndex) {
2448                result.push(thing[startIndex]);
2449            }
2450
2451            return result;
2452        }
2453    }
2454
2455    return [thing];
2456}
2457
2458Y.Array = YArray;
2459
2460/**
2461Dedupes an array of strings, returning an array that's guaranteed to contain
2462only one copy of a given string.
2463
2464This method differs from `Array.unique()` in that it's optimized for use only
2465with arrays consisting entirely of strings or entirely of numbers, whereas
2466`unique` may be used with other value types (but is slower).
2467
2468Using `dedupe()` with values other than strings or numbers, or with arrays
2469containing a mix of strings and numbers, may result in unexpected behavior.
2470
2471@method dedupe
2472@param {String[]|Number[]} array Array of strings or numbers to dedupe.
2473@return {Array} Copy of _array_ containing no duplicate values.
2474@static
2475@since 3.4.0
2476**/
2477YArray.dedupe = Lang._isNative(Object.create) ? function (array) {
2478    var hash    = Object.create(null),
2479        results = [],
2480        i, item, len;
2481
2482    for (i = 0, len = array.length; i < len; ++i) {
2483        item = array[i];
2484
2485        if (!hash[item]) {
2486            hash[item] = 1;
2487            results.push(item);
2488        }
2489    }
2490
2491    return results;
2492} : function (array) {
2493    var hash    = {},
2494        results = [],
2495        i, item, len;
2496
2497    for (i = 0, len = array.length; i < len; ++i) {
2498        item = array[i];
2499
2500        if (!hasOwn.call(hash, item)) {
2501            hash[item] = 1;
2502            results.push(item);
2503        }
2504    }
2505
2506    return results;
2507};
2508
2509/**
2510Executes the supplied function on each item in the array. This method wraps
2511the native ES5 `Array.forEach()` method if available.
2512
2513@method each
2514@param {Array} array Array to iterate.
2515@param {Function} fn Function to execute on each item in the array. The function
2516  will receive the following arguments:
2517    @param {Any} fn.item Current array item.
2518    @param {Number} fn.index Current array index.
2519    @param {Array} fn.array Array being iterated.
2520@param {Object} [thisObj] `this` object to use when calling _fn_.
2521@return {YUI} The YUI instance.
2522@static
2523**/
2524YArray.each = YArray.forEach = Lang._isNative(Native.forEach) ? function (array, fn, thisObj) {
2525    Native.forEach.call(array || [], fn, thisObj || Y);
2526    return Y;
2527} : function (array, fn, thisObj) {
2528    for (var i = 0, len = (array && array.length) || 0; i < len; ++i) {
2529        if (i in array) {
2530            fn.call(thisObj || Y, array[i], i, array);
2531        }
2532    }
2533
2534    return Y;
2535};
2536
2537/**
2538Alias for `each()`.
2539
2540@method forEach
2541@static
2542**/
2543
2544/**
2545Returns an object using the first array as keys and the second as values. If
2546the second array is not provided, or if it doesn't contain the same number of
2547values as the first array, then `true` will be used in place of the missing
2548values.
2549
2550@example
2551
2552    Y.Array.hash(['a', 'b', 'c'], ['foo', 'bar']);
2553    // => {a: 'foo', b: 'bar', c: true}
2554
2555@method hash
2556@param {String[]} keys Array of strings to use as keys.
2557@param {Array} [values] Array to use as values.
2558@return {Object} Hash using the first array as keys and the second as values.
2559@static
2560**/
2561YArray.hash = function (keys, values) {
2562    var hash = {},
2563        vlen = (values && values.length) || 0,
2564        i, len;
2565
2566    for (i = 0, len = keys.length; i < len; ++i) {
2567        if (i in keys) {
2568            hash[keys[i]] = vlen > i && i in values ? values[i] : true;
2569        }
2570    }
2571
2572    return hash;
2573};
2574
2575/**
2576Returns the index of the first item in the array that's equal (using a strict
2577equality check) to the specified _value_, or `-1` if the value isn't found.
2578
2579This method wraps the native ES5 `Array.indexOf()` method if available.
2580
2581@method indexOf
2582@param {Array} array Array to search.
2583@param {Any} value Value to search for.
2584@param {Number} [from=0] The index at which to begin the search.
2585@return {Number} Index of the item strictly equal to _value_, or `-1` if not
2586    found.
2587@static
2588**/
2589YArray.indexOf = Lang._isNative(Native.indexOf) ? function (array, value, from) {
2590    return Native.indexOf.call(array, value, from);
2591} : function (array, value, from) {
2592    // http://es5.github.com/#x15.4.4.14
2593    var len = array.length;
2594
2595    from = +from || 0;
2596    from = (from > 0 || -1) * Math.floor(Math.abs(from));
2597
2598    if (from < 0) {
2599        from += len;
2600
2601        if (from < 0) {
2602            from = 0;
2603        }
2604    }
2605
2606    for (; from < len; ++from) {
2607        if (from in array && array[from] === value) {
2608            return from;
2609        }
2610    }
2611
2612    return -1;
2613};
2614
2615/**
2616Numeric sort convenience function.
2617
2618The native `Array.prototype.sort()` function converts values to strings and
2619sorts them in lexicographic order, which is unsuitable for sorting numeric
2620values. Provide `Array.numericSort` as a custom sort function when you want
2621to sort values in numeric order.
2622
2623@example
2624
2625    [42, 23, 8, 16, 4, 15].sort(Y.Array.numericSort);
2626    // => [4, 8, 15, 16, 23, 42]
2627
2628@method numericSort
2629@param {Number} a First value to compare.
2630@param {Number} b Second value to compare.
2631@return {Number} Difference between _a_ and _b_.
2632@static
2633**/
2634YArray.numericSort = function (a, b) {
2635    return a - b;
2636};
2637
2638/**
2639Executes the supplied function on each item in the array. Returning a truthy
2640value from the function will stop the processing of remaining items.
2641
2642@method some
2643@param {Array} array Array to iterate over.
2644@param {Function} fn Function to execute on each item. The function will receive
2645  the following arguments:
2646    @param {Any} fn.value Current array item.
2647    @param {Number} fn.index Current array index.
2648    @param {Array} fn.array Array being iterated over.
2649@param {Object} [thisObj] `this` object to use when calling _fn_.
2650@return {Boolean} `true` if the function returns a truthy value on any of the
2651  items in the array; `false` otherwise.
2652@static
2653**/
2654YArray.some = Lang._isNative(Native.some) ? function (array, fn, thisObj) {
2655    return Native.some.call(array, fn, thisObj);
2656} : function (array, fn, thisObj) {
2657    for (var i = 0, len = array.length; i < len; ++i) {
2658        if (i in array && fn.call(thisObj, array[i], i, array)) {
2659            return true;
2660        }
2661    }
2662
2663    return false;
2664};
2665
2666/**
2667Evaluates _obj_ to determine if it's an array, an array-like collection, or
2668something else. This is useful when working with the function `arguments`
2669collection and `HTMLElement` collections.
2670
2671Note: This implementation doesn't consider elements that are also
2672collections, such as `<form>` and `<select>`, to be array-like.
2673
2674@method test
2675@param {Object} obj Object to test.
2676@return {Number} A number indicating the results of the test:
2677
2678  * 0: Neither an array nor an array-like collection.
2679  * 1: Real array.
2680  * 2: Array-like collection.
2681
2682@static
2683**/
2684YArray.test = function (obj) {
2685    var result = 0;
2686
2687    if (Lang.isArray(obj)) {
2688        result = 1;
2689    } else if (Lang.isObject(obj)) {
2690        try {
2691            // indexed, but no tagName (element) or scrollTo/document (window. From DOM.isWindow test which we can't use here),
2692            // or functions without apply/call (Safari
2693            // HTMLElementCollection bug).
2694            if ('length' in obj && !obj.tagName && !(obj.scrollTo && obj.document) && !obj.apply) {
2695                result = 2;
2696            }
2697        } catch (ex) {}
2698    }
2699
2700    return result;
2701};
2702/**
2703 * The YUI module contains the components required for building the YUI
2704 * seed file.  This includes the script loading mechanism, a simple queue,
2705 * and the core utilities for the library.
2706 * @module yui
2707 * @submodule yui-base
2708 */
2709
2710/**
2711 * A simple FIFO queue.  Items are added to the Queue with add(1..n items) and
2712 * removed using next().
2713 *
2714 * @class Queue
2715 * @constructor
2716 * @param {MIXED} item* 0..n items to seed the queue.
2717 */
2718function Queue() {
2719    this._init();
2720    this.add.apply(this, arguments);
2721}
2722
2723Queue.prototype = {
2724    /**
2725     * Initialize the queue
2726     *
2727     * @method _init
2728     * @protected
2729     */
2730    _init: function() {
2731        /**
2732         * The collection of enqueued items
2733         *
2734         * @property _q
2735         * @type Array
2736         * @protected
2737         */
2738        this._q = [];
2739    },
2740
2741    /**
2742     * Get the next item in the queue. FIFO support
2743     *
2744     * @method next
2745     * @return {MIXED} the next item in the queue.
2746     */
2747    next: function() {
2748        return this._q.shift();
2749    },
2750
2751    /**
2752     * Get the last in the queue. LIFO support.
2753     *
2754     * @method last
2755     * @return {MIXED} the last item in the queue.
2756     */
2757    last: function() {
2758        return this._q.pop();
2759    },
2760
2761    /**
2762     * Add 0..n items to the end of the queue.
2763     *
2764     * @method add
2765     * @param {MIXED} item* 0..n items.
2766     * @return {object} this queue.
2767     */
2768    add: function() {
2769        this._q.push.apply(this._q, arguments);
2770
2771        return this;
2772    },
2773
2774    /**
2775     * Returns the current number of queued items.
2776     *
2777     * @method size
2778     * @return {Number} The size.
2779     */
2780    size: function() {
2781        return this._q.length;
2782    }
2783};
2784
2785Y.Queue = Queue;
2786
2787YUI.Env._loaderQueue = YUI.Env._loaderQueue || new Queue();
2788
2789/**
2790The YUI module contains the components required for building the YUI seed file.
2791This includes the script loading mechanism, a simple queue, and the core
2792utilities for the library.
2793
2794@module yui
2795@submodule yui-base
2796**/
2797
2798var CACHED_DELIMITER = '__',
2799
2800    hasOwn   = Object.prototype.hasOwnProperty,
2801    isObject = Y.Lang.isObject;
2802
2803/**
2804Returns a wrapper for a function which caches the return value of that function,
2805keyed off of the combined string representation of the argument values provided
2806when the wrapper is called.
2807
2808Calling this function again with the same arguments will return the cached value
2809rather than executing the wrapped function.
2810
2811Note that since the cache is keyed off of the string representation of arguments
2812passed to the wrapper function, arguments that aren't strings and don't provide
2813a meaningful `toString()` method may result in unexpected caching behavior. For
2814example, the objects `{}` and `{foo: 'bar'}` would both be converted to the
2815string `[object Object]` when used as a cache key.
2816
2817@method cached
2818@param {Function} source The function to memoize.
2819@param {Object} [cache={}] Object in which to store cached values. You may seed
2820  this object with pre-existing cached values if desired.
2821@param {any} [refetch] If supplied, this value is compared with the cached value
2822  using a `==` comparison. If the values are equal, the wrapped function is
2823  executed again even though a cached value exists.
2824@return {Function} Wrapped function.
2825@for YUI
2826**/
2827Y.cached = function (source, cache, refetch) {
2828    /*jshint expr: true*/
2829    cache || (cache = {});
2830
2831    return function (arg) {
2832        var key = arguments.length > 1 ?
2833                Array.prototype.join.call(arguments, CACHED_DELIMITER) :
2834                String(arg);
2835
2836        /*jshint eqeqeq: false*/
2837        if (!(key in cache) || (refetch && cache[key] == refetch)) {
2838            cache[key] = source.apply(source, arguments);
2839        }
2840
2841        return cache[key];
2842    };
2843};
2844
2845/**
2846Returns the `location` object from the window/frame in which this YUI instance
2847operates, or `undefined` when executing in a non-browser environment
2848(e.g. Node.js).
2849
2850It is _not_ recommended to hold references to the `window.location` object
2851outside of the scope of a function in which its properties are being accessed or
2852its methods are being called. This is because of a nasty bug/issue that exists
2853in both Safari and MobileSafari browsers:
2854[WebKit Bug 34679](https://bugs.webkit.org/show_bug.cgi?id=34679).
2855
2856@method getLocation
2857@return {location} The `location` object from the window/frame in which this YUI
2858    instance operates.
2859@since 3.5.0
2860**/
2861Y.getLocation = function () {
2862    // It is safer to look this up every time because yui-base is attached to a
2863    // YUI instance before a user's config is applied; i.e. `Y.config.win` does
2864    // not point the correct window object when this file is loaded.
2865    var win = Y.config.win;
2866
2867    // It is not safe to hold a reference to the `location` object outside the
2868    // scope in which it is being used. The WebKit engine used in Safari and
2869    // MobileSafari will "disconnect" the `location` object from the `window`
2870    // when a page is restored from back/forward history cache.
2871    return win && win.location;
2872};
2873
2874/**
2875Returns a new object containing all of the properties of all the supplied
2876objects. The properties from later objects will overwrite those in earlier
2877objects.
2878
2879Passing in a single object will create a shallow copy of it. For a deep copy,
2880use `clone()`.
2881
2882@method merge
2883@param {Object} objects* One or more objects to merge.
2884@return {Object} A new merged object.
2885**/
2886Y.merge = function () {
2887    var i      = 0,
2888        len    = arguments.length,
2889        result = {},
2890        key,
2891        obj;
2892
2893    for (; i < len; ++i) {
2894        obj = arguments[i];
2895
2896        for (key in obj) {
2897            if (hasOwn.call(obj, key)) {
2898                result[key] = obj[key];
2899            }
2900        }
2901    }
2902
2903    return result;
2904};
2905
2906/**
2907Mixes _supplier_'s properties into _receiver_.
2908
2909Properties on _receiver_ or _receiver_'s prototype will not be overwritten or
2910shadowed unless the _overwrite_ parameter is `true`, and will not be merged
2911unless the _merge_ parameter is `true`.
2912
2913In the default mode (0), only properties the supplier owns are copied (prototype
2914properties are not copied). The following copying modes are available:
2915
2916  * `0`: _Default_. Object to object.
2917  * `1`: Prototype to prototype.
2918  * `2`: Prototype to prototype and object to object.
2919  * `3`: Prototype to object.
2920  * `4`: Object to prototype.
2921
2922@method mix
2923@param {Function|Object} receiver The object or function to receive the mixed
2924  properties.
2925@param {Function|Object} supplier The object or function supplying the
2926  properties to be mixed.
2927@param {Boolean} [overwrite=false] If `true`, properties that already exist
2928  on the receiver will be overwritten with properties from the supplier.
2929@param {String[]} [whitelist] An array of property names to copy. If
2930  specified, only the whitelisted properties will be copied, and all others
2931  will be ignored.
2932@param {Number} [mode=0] Mix mode to use. See above for available modes.
2933@param {Boolean} [merge=false] If `true`, objects and arrays that already
2934  exist on the receiver will have the corresponding object/array from the
2935  supplier merged into them, rather than being skipped or overwritten. When
2936  both _overwrite_ and _merge_ are `true`, _merge_ takes precedence.
2937@return {Function|Object|YUI} The receiver, or the YUI instance if the
2938  specified receiver is falsy.
2939**/
2940Y.mix = function(receiver, supplier, overwrite, whitelist, mode, merge) {
2941    var alwaysOverwrite, exists, from, i, key, len, to;
2942
2943    // If no supplier is given, we return the receiver. If no receiver is given,
2944    // we return Y. Returning Y doesn't make much sense to me, but it's
2945    // grandfathered in for backcompat reasons.
2946    if (!receiver || !supplier) {
2947        return receiver || Y;
2948    }
2949
2950    if (mode) {
2951        // In mode 2 (prototype to prototype and object to object), we recurse
2952        // once to do the proto to proto mix. The object to object mix will be
2953        // handled later on.
2954        if (mode === 2) {
2955            Y.mix(receiver.prototype, supplier.prototype, overwrite,
2956                    whitelist, 0, merge);
2957        }
2958
2959        // Depending on which mode is specified, we may be copying from or to
2960        // the prototypes of the supplier and receiver.
2961        from = mode === 1 || mode === 3 ? supplier.prototype : supplier;
2962        to   = mode === 1 || mode === 4 ? receiver.prototype : receiver;
2963
2964        // If either the supplier or receiver doesn't actually have a
2965        // prototype property, then we could end up with an undefined `from`
2966        // or `to`. If that happens, we abort and return the receiver.
2967        if (!from || !to) {
2968            return receiver;
2969        }
2970    } else {
2971        from = supplier;
2972        to   = receiver;
2973    }
2974
2975    // If `overwrite` is truthy and `merge` is falsy, then we can skip a
2976    // property existence check on each iteration and save some time.
2977    alwaysOverwrite = overwrite && !merge;
2978
2979    if (whitelist) {
2980        for (i = 0, len = whitelist.length; i < len; ++i) {
2981            key = whitelist[i];
2982
2983            // We call `Object.prototype.hasOwnProperty` instead of calling
2984            // `hasOwnProperty` on the object itself, since the object's
2985            // `hasOwnProperty` method may have been overridden or removed.
2986            // Also, some native objects don't implement a `hasOwnProperty`
2987            // method.
2988            if (!hasOwn.call(from, key)) {
2989                continue;
2990            }
2991
2992            // The `key in to` check here is (sadly) intentional for backwards
2993            // compatibility reasons. It prevents undesired shadowing of
2994            // prototype members on `to`.
2995            exists = alwaysOverwrite ? false : key in to;
2996
2997            if (merge && exists && isObject(to[key], true)
2998                    && isObject(from[key], true)) {
2999                // If we're in merge mode, and the key is present on both
3000                // objects, and the value on both objects is either an object or
3001                // an array (but not a function), then we recurse to merge the
3002                // `from` value into the `to` value instead of overwriting it.
3003                //
3004                // Note: It's intentional that the whitelist isn't passed to the
3005                // recursive call here. This is legacy behavior that lots of
3006                // code still depends on.
3007                Y.mix(to[key], from[key], overwrite, null, 0, merge);
3008            } else if (overwrite || !exists) {
3009                // We're not in merge mode, so we'll only copy the `from` value
3010                // to the `to` value if we're in overwrite mode or if the
3011                // current key doesn't exist on the `to` object.
3012                to[key] = from[key];
3013            }
3014        }
3015    } else {
3016        for (key in from) {
3017            // The code duplication here is for runtime performance reasons.
3018            // Combining whitelist and non-whitelist operations into a single
3019            // loop or breaking the shared logic out into a function both result
3020            // in worse performance, and Y.mix is critical enough that the byte
3021            // tradeoff is worth it.
3022            if (!hasOwn.call(from, key)) {
3023                continue;
3024            }
3025
3026            // The `key in to` check here is (sadly) intentional for backwards
3027            // compatibility reasons. It prevents undesired shadowing of
3028            // prototype members on `to`.
3029            exists = alwaysOverwrite ? false : key in to;
3030
3031            if (merge && exists && isObject(to[key], true)
3032                    && isObject(from[key], true)) {
3033                Y.mix(to[key], from[key], overwrite, null, 0, merge);
3034            } else if (overwrite || !exists) {
3035                to[key] = from[key];
3036            }
3037        }
3038
3039        // If this is an IE browser with the JScript enumeration bug, force
3040        // enumeration of the buggy properties by making a recursive call with
3041        // the buggy properties as the whitelist.
3042        if (Y.Object._hasEnumBug) {
3043            Y.mix(to, from, overwrite, Y.Object._forceEnum, mode, merge);
3044        }
3045    }
3046
3047    return receiver;
3048};
3049/**
3050 * The YUI module contains the components required for building the YUI
3051 * seed file.  This includes the script loading mechanism, a simple queue,
3052 * and the core utilities for the library.
3053 * @module yui
3054 * @submodule yui-base
3055 */
3056
3057/**
3058 * Adds utilities to the YUI instance for working with objects.
3059 *
3060 * @class Object
3061 */
3062
3063var Lang   = Y.Lang,
3064    hasOwn = Object.prototype.hasOwnProperty,
3065
3066    UNDEFINED, // <-- Note the comma. We're still declaring vars.
3067
3068/**
3069 * Returns a new object that uses _obj_ as its prototype. This method wraps the
3070 * native ES5 `Object.create()` method if available, but doesn't currently
3071 * pass through `Object.create()`'s second argument (properties) in order to
3072 * ensure compatibility with older browsers.
3073 *
3074 * @method ()
3075 * @param {Object} obj Prototype object.
3076 * @return {Object} New object using _obj_ as its prototype.
3077 * @static
3078 */
3079O = Y.Object = Lang._isNative(Object.create) ? function (obj) {
3080    // We currently wrap the native Object.create instead of simply aliasing it
3081    // to ensure consistency with our fallback shim, which currently doesn't
3082    // support Object.create()'s second argument (properties). Once we have a
3083    // safe fallback for the properties arg, we can stop wrapping
3084    // Object.create().
3085    return Object.create(obj);
3086} : (function () {
3087    // Reusable constructor function for the Object.create() shim.
3088    function F() {}
3089
3090    // The actual shim.
3091    return function (obj) {
3092        F.prototype = obj;
3093        return new F();
3094    };
3095}()),
3096
3097/**
3098 * Property names that IE doesn't enumerate in for..in loops, even when they
3099 * should be enumerable. When `_hasEnumBug` is `true`, it's necessary to
3100 * manually enumerate these properties.
3101 *
3102 * @property _forceEnum
3103 * @type String[]
3104 * @protected
3105 * @static
3106 */
3107forceEnum = O._forceEnum = [
3108    'hasOwnProperty',
3109    'isPrototypeOf',
3110    'propertyIsEnumerable',
3111    'toString',
3112    'toLocaleString',
3113    'valueOf'
3114],
3115
3116/**
3117 * `true` if this browser has the JScript enumeration bug that prevents
3118 * enumeration of the properties named in the `_forceEnum` array, `false`
3119 * otherwise.
3120 *
3121 * See:
3122 *   - <https://developer.mozilla.org/en/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug>
3123 *   - <http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation>
3124 *
3125 * @property _hasEnumBug
3126 * @type Boolean
3127 * @protected
3128 * @static
3129 */
3130hasEnumBug = O._hasEnumBug = !{valueOf: 0}.propertyIsEnumerable('valueOf'),
3131
3132/**
3133 * `true` if this browser incorrectly considers the `prototype` property of
3134 * functions to be enumerable. Currently known to affect Opera 11.50 and Android 2.3.x.
3135 *
3136 * @property _hasProtoEnumBug
3137 * @type Boolean
3138 * @protected
3139 * @static
3140 */
3141hasProtoEnumBug = O._hasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'),
3142
3143/**
3144 * Returns `true` if _key_ exists on _obj_, `false` if _key_ doesn't exist or
3145 * exists only on _obj_'s prototype. This is essentially a safer version of
3146 * `obj.hasOwnProperty()`.
3147 *
3148 * @method owns
3149 * @param {Object} obj Object to test.
3150 * @param {String} key Property name to look for.
3151 * @return {Boolean} `true` if _key_ exists on _obj_, `false` otherwise.
3152 * @static
3153 */
3154owns = O.owns = function (obj, key) {
3155    return !!obj && hasOwn.call(obj, key);
3156}; // <-- End of var declarations.
3157
3158/**
3159 * Alias for `owns()`.
3160 *
3161 * @method hasKey
3162 * @param {Object} obj Object to test.
3163 * @param {String} key Property name to look for.
3164 * @return {Boolean} `true` if _key_ exists on _obj_, `false` otherwise.
3165 * @static
3166 */
3167O.hasKey = owns;
3168
3169/**
3170 * Returns an array containing the object's enumerable keys. Does not include
3171 * prototype keys or non-enumerable keys.
3172 *
3173 * Note that keys are returned in enumeration order (that is, in the same order
3174 * that they would be enumerated by a `for-in` loop), which may not be the same
3175 * as the order in which they were defined.
3176 *
3177 * This method is an alias for the native ES5 `Object.keys()` method if
3178 * available and non-buggy. The Opera 11.50 and Android 2.3.x versions of
3179 * `Object.keys()` have an inconsistency as they consider `prototype` to be
3180 * enumerable, so a non-native shim is used to rectify the difference.
3181 *
3182 * @example
3183 *
3184 *     Y.Object.keys({a: 'foo', b: 'bar', c: 'baz'});
3185 *     // => ['a', 'b', 'c']
3186 *
3187 * @method keys
3188 * @param {Object} obj An object.
3189 * @return {String[]} Array of keys.
3190 * @static
3191 */
3192O.keys = Lang._isNative(Object.keys) && !hasProtoEnumBug ? Object.keys : function (obj) {
3193    if (!Lang.isObject(obj)) {
3194        throw new TypeError('Object.keys called on a non-object');
3195    }
3196
3197    var keys = [],
3198        i, key, len;
3199
3200    if (hasProtoEnumBug && typeof obj === 'function') {
3201        for (key in obj) {
3202            if (owns(obj, key) && key !== 'prototype') {
3203                keys.push(key);
3204            }
3205        }
3206    } else {
3207        for (key in obj) {
3208            if (owns(obj, key)) {
3209                keys.push(key);
3210            }
3211        }
3212    }
3213
3214    if (hasEnumBug) {
3215        for (i = 0, len = forceEnum.length; i < len; ++i) {
3216            key = forceEnum[i];
3217
3218            if (owns(obj, key)) {
3219                keys.push(key);
3220            }
3221        }
3222    }
3223
3224    return keys;
3225};
3226
3227/**
3228 * Returns an array containing the values of the object's enumerable keys.
3229 *
3230 * Note that values are returned in enumeration order (that is, in the same
3231 * order that they would be enumerated by a `for-in` loop), which may not be the
3232 * same as the order in which they were defined.
3233 *
3234 * @example
3235 *
3236 *     Y.Object.values({a: 'foo', b: 'bar', c: 'baz'});
3237 *     // => ['foo', 'bar', 'baz']
3238 *
3239 * @method values
3240 * @param {Object} obj An object.
3241 * @return {Array} Array of values.
3242 * @static
3243 */
3244O.values = function (obj) {
3245    var keys   = O.keys(obj),
3246        i      = 0,
3247        len    = keys.length,
3248        values = [];
3249
3250    for (; i < len; ++i) {
3251        values.push(obj[keys[i]]);
3252    }
3253
3254    return values;
3255};
3256
3257/**
3258 * Returns the number of enumerable keys owned by an object.
3259 *
3260 * @method size
3261 * @param {Object} obj An object.
3262 * @return {Number} The object's size.
3263 * @static
3264 */
3265O.size = function (obj) {
3266    try {
3267        return O.keys(obj).length;
3268    } catch (ex) {
3269        return 0; // Legacy behavior for non-objects.
3270    }
3271};
3272
3273/**
3274 * Returns `true` if the object owns an enumerable property with the specified
3275 * value.
3276 *
3277 * @method hasValue
3278 * @param {Object} obj An object.
3279 * @param {any} value The value to search for.
3280 * @return {Boolean} `true` if _obj_ contains _value_, `false` otherwise.
3281 * @static
3282 */
3283O.hasValue = function (obj, value) {
3284    return Y.Array.indexOf(O.values(obj), value) > -1;
3285};
3286
3287/**
3288 * Executes a function on each enumerable property in _obj_. The function
3289 * receives the value, the key, and the object itself as parameters (in that
3290 * order).
3291 *
3292 * By default, only properties owned by _obj_ are enumerated. To include
3293 * prototype properties, set the _proto_ parameter to `true`.
3294 *
3295 * @method each
3296 * @param {Object} obj Object to enumerate.
3297 * @param {Function} fn Function to execute on each enumerable property.
3298 *   @param {mixed} fn.value Value of the current property.
3299 *   @param {String} fn.key Key of the current property.
3300 *   @param {Object} fn.obj Object being enumerated.
3301 * @param {Object} [thisObj] `this` object to use when calling _fn_.
3302 * @param {Boolean} [proto=false] Include prototype properties.
3303 * @return {YUI} the YUI instance.
3304 * @chainable
3305 * @static
3306 */
3307O.each = function (obj, fn, thisObj, proto) {
3308    var key;
3309
3310    for (key in obj) {
3311        if (proto || owns(obj, key)) {
3312            fn.call(thisObj || Y, obj[key], key, obj);
3313        }
3314    }
3315
3316    return Y;
3317};
3318
3319/**
3320 * Executes a function on each enumerable property in _obj_, but halts if the
3321 * function returns a truthy value. The function receives the value, the key,
3322 * and the object itself as paramters (in that order).
3323 *
3324 * By default, only properties owned by _obj_ are enumerated. To include
3325 * prototype properties, set the _proto_ parameter to `true`.
3326 *
3327 * @method some
3328 * @param {Object} obj Object to enumerate.
3329 * @param {Function} fn Function to execute on each enumerable property.
3330 *   @param {mixed} fn.value Value of the current property.
3331 *   @param {String} fn.key Key of the current property.
3332 *   @param {Object} fn.obj Object being enumerated.
3333 * @param {Object} [thisObj] `this` object to use when calling _fn_.
3334 * @param {Boolean} [proto=false] Include prototype properties.
3335 * @return {Boolean} `true` if any execution of _fn_ returns a truthy value,
3336 *   `false` otherwise.
3337 * @static
3338 */
3339O.some = function (obj, fn, thisObj, proto) {
3340    var key;
3341
3342    for (key in obj) {
3343        if (proto || owns(obj, key)) {
3344            if (fn.call(thisObj || Y, obj[key], key, obj)) {
3345                return true;
3346            }
3347        }
3348    }
3349
3350    return false;
3351};
3352
3353/**
3354 * Retrieves the sub value at the provided path,
3355 * from the value object provided.
3356 *
3357 * @method getValue
3358 * @static
3359 * @param o The object from which to extract the property value.
3360 * @param path {Array} A path array, specifying the object traversal path
3361 * from which to obtain the sub value.
3362 * @return {Any} The value stored in the path, undefined if not found,
3363 * undefined if the source is not an object.  Returns the source object
3364 * if an empty path is provided.
3365 */
3366O.getValue = function(o, path) {
3367    if (!Lang.isObject(o)) {
3368        return UNDEFINED;
3369    }
3370
3371    var i,
3372        p = Y.Array(path),
3373        l = p.length;
3374
3375    for (i = 0; o !== UNDEFINED && i < l; i++) {
3376        o = o[p[i]];
3377    }
3378
3379    return o;
3380};
3381
3382/**
3383 * Sets the sub-attribute value at the provided path on the
3384 * value object.  Returns the modified value object, or
3385 * undefined if the path is invalid.
3386 *
3387 * @method setValue
3388 * @static
3389 * @param o             The object on which to set the sub value.
3390 * @param path {Array}  A path array, specifying the object traversal path
3391 *                      at which to set the sub value.
3392 * @param val {Any}     The new value for the sub-attribute.
3393 * @return {Object}     The modified object, with the new sub value set, or
3394 *                      undefined, if the path was invalid.
3395 */
3396O.setValue = function(o, path, val) {
3397    var i,
3398        p = Y.Array(path),
3399        leafIdx = p.length - 1,
3400        ref = o;
3401
3402    if (leafIdx >= 0) {
3403        for (i = 0; ref !== UNDEFINED && i < leafIdx; i++) {
3404            ref = ref[p[i]];
3405        }
3406
3407        if (ref !== UNDEFINED) {
3408            ref[p[i]] = val;
3409        } else {
3410            return UNDEFINED;
3411        }
3412    }
3413
3414    return o;
3415};
3416
3417/**
3418 * Returns `true` if the object has no enumerable properties of its own.
3419 *
3420 * @method isEmpty
3421 * @param {Object} obj An object.
3422 * @return {Boolean} `true` if the object is empty.
3423 * @static
3424 * @since 3.2.0
3425 */
3426O.isEmpty = function (obj) {
3427    return !O.keys(Object(obj)).length;
3428};
3429/**
3430 * The YUI module contains the components required for building the YUI seed
3431 * file.  This includes the script loading mechanism, a simple queue, and the
3432 * core utilities for the library.
3433 * @module yui
3434 * @submodule yui-base
3435 */
3436
3437/**
3438 * YUI user agent detection.
3439 * Do not fork for a browser if it can be avoided.  Use feature detection when
3440 * you can.  Use the user agent as a last resort.  For all fields listed
3441 * as @type float, UA stores a version number for the browser engine,
3442 * 0 otherwise.  This value may or may not map to the version number of
3443 * the browser using the engine.  The value is presented as a float so
3444 * that it can easily be used for boolean evaluation as well as for
3445 * looking for a particular range of versions.  Because of this,
3446 * some of the granularity of the version info may be lost.  The fields that
3447 * are @type string default to null.  The API docs list the values that
3448 * these fields can have.
3449 * @class UA
3450 * @static
3451 */
3452
3453/**
3454* Static method on `YUI.Env` for parsing a UA string.  Called at instantiation
3455* to populate `Y.UA`.
3456*
3457* @static
3458* @method parseUA
3459* @param {String} [subUA=navigator.userAgent] UA string to parse
3460* @return {Object} The Y.UA object
3461*/
3462YUI.Env.parseUA = function(subUA) {
3463
3464    var numberify = function(s) {
3465            var c = 0;
3466            return parseFloat(s.replace(/\./g, function() {
3467                return (c++ === 1) ? '' : '.';
3468            }));
3469        },
3470
3471        win = Y.config.win,
3472
3473        nav = win && win.navigator,
3474
3475        o = {
3476
3477        /**
3478         * Internet Explorer version number or 0.  Example: 6
3479         * @property ie
3480         * @type float
3481         * @static
3482         */
3483        ie: 0,
3484
3485        /**
3486         * Opera version number or 0.  Example: 9.2
3487         * @property opera
3488         * @type float
3489         * @static
3490         */
3491        opera: 0,
3492
3493        /**
3494         * Gecko engine revision number.  Will evaluate to 1 if Gecko
3495         * is detected but the revision could not be found. Other browsers
3496         * will be 0.  Example: 1.8
3497         * <pre>
3498         * Firefox 1.0.0.4: 1.7.8   <-- Reports 1.7
3499         * Firefox 1.5.0.9: 1.8.0.9 <-- 1.8
3500         * Firefox 2.0.0.3: 1.8.1.3 <-- 1.81
3501         * Firefox 3.0   <-- 1.9
3502         * Firefox 3.5   <-- 1.91
3503         * </pre>
3504         * @property gecko
3505         * @type float
3506         * @static
3507         */
3508        gecko: 0,
3509
3510        /**
3511         * AppleWebKit version.  KHTML browsers that are not WebKit browsers
3512         * will evaluate to 1, other browsers 0.  Example: 418.9
3513         * <pre>
3514         * Safari 1.3.2 (312.6): 312.8.1 <-- Reports 312.8 -- currently the
3515         *                                   latest available for Mac OSX 10.3.
3516         * Safari 2.0.2:         416     <-- hasOwnProperty introduced
3517         * Safari 2.0.4:         418     <-- preventDefault fixed
3518         * Safari 2.0.4 (419.3): 418.9.1 <-- One version of Safari may run
3519         *                                   different versions of webkit
3520         * Safari 2.0.4 (419.3): 419     <-- Tiger installations that have been
3521         *                                   updated, but not updated
3522         *                                   to the latest patch.
3523         * Webkit 212 nightly:   522+    <-- Safari 3.0 precursor (with native
3524         * SVG and many major issues fixed).
3525         * Safari 3.0.4 (523.12) 523.12  <-- First Tiger release - automatic
3526         * update from 2.x via the 10.4.11 OS patch.
3527         * Webkit nightly 1/2008:525+    <-- Supports DOMContentLoaded event.
3528         *                                   yahoo.com user agent hack removed.
3529         * </pre>
3530         * http://en.wikipedia.org/wiki/Safari_version_history
3531         * @property webkit
3532         * @type float
3533         * @static
3534         */
3535        webkit: 0,
3536
3537        /**
3538         * Safari will be detected as webkit, but this property will also
3539         * be populated with the Safari version number
3540         * @property safari
3541         * @type float
3542         * @static
3543         */
3544        safari: 0,
3545
3546        /**
3547         * Chrome will be detected as webkit, but this property will also
3548         * be populated with the Chrome version number
3549         * @property chrome
3550         * @type float
3551         * @static
3552         */
3553        chrome: 0,
3554
3555        /**
3556         * The mobile property will be set to a string containing any relevant
3557         * user agent information when a modern mobile browser is detected.
3558         * Currently limited to Safari on the iPhone/iPod Touch, Nokia N-series
3559         * devices with the WebKit-based browser, and Opera Mini.
3560         * @property mobile
3561         * @type string
3562         * @default null
3563         * @static
3564         */
3565        mobile: null,
3566
3567        /**
3568         * Adobe AIR version number or 0.  Only populated if webkit is detected.
3569         * Example: 1.0
3570         * @property air
3571         * @type float
3572         */
3573        air: 0,
3574        /**
3575         * PhantomJS version number or 0.  Only populated if webkit is detected.
3576         * Example: 1.0
3577         * @property phantomjs
3578         * @type float
3579         */
3580        phantomjs: 0,
3581        /**
3582         * Detects Apple iPad's OS version
3583         * @property ipad
3584         * @type float
3585         * @static
3586         */
3587        ipad: 0,
3588        /**
3589         * Detects Apple iPhone's OS version
3590         * @property iphone
3591         * @type float
3592         * @static
3593         */
3594        iphone: 0,
3595        /**
3596         * Detects Apples iPod's OS version
3597         * @property ipod
3598         * @type float
3599         * @static
3600         */
3601        ipod: 0,
3602        /**
3603         * General truthy check for iPad, iPhone or iPod
3604         * @property ios
3605         * @type Boolean
3606         * @default null
3607         * @static
3608         */
3609        ios: null,
3610        /**
3611         * Detects Googles Android OS version
3612         * @property android
3613         * @type float
3614         * @static
3615         */
3616        android: 0,
3617        /**
3618         * Detects Kindle Silk
3619         * @property silk
3620         * @type float
3621         * @static
3622         */
3623        silk: 0,
3624        /**
3625         * Detects Ubuntu version
3626         * @property ubuntu
3627         * @type float
3628         * @static
3629         */
3630        ubuntu: 0,
3631        /**
3632         * Detects Kindle Silk Acceleration
3633         * @property accel
3634         * @type Boolean
3635         * @static
3636         */
3637        accel: false,
3638        /**
3639         * Detects Palms WebOS version
3640         * @property webos
3641         * @type float
3642         * @static
3643         */
3644        webos: 0,
3645
3646        /**
3647         * Google Caja version number or 0.
3648         * @property caja
3649         * @type float
3650         */
3651        caja: nav && nav.cajaVersion,
3652
3653        /**
3654         * Set to true if the page appears to be in SSL
3655         * @property secure
3656         * @type boolean
3657         * @static
3658         */
3659        secure: false,
3660
3661        /**
3662         * The operating system.
3663         *
3664         * Possible values are `windows`, `macintosh`, `android`, `symbos`, `linux`, `rhino` and `ios`.
3665         *
3666         * @property os
3667         * @type string
3668         * @default null
3669         * @static
3670         */
3671        os: null,
3672
3673        /**
3674         * The Nodejs Version
3675         * @property nodejs
3676         * @type float
3677         * @default 0
3678         * @static
3679         */
3680        nodejs: 0,
3681        /**
3682        * Window8/IE10 Application host environment
3683        * @property winjs
3684        * @type Boolean
3685        * @static
3686        */
3687        winjs: !!((typeof Windows !== "undefined") && Windows.System),
3688        /**
3689        * Are touch/msPointer events available on this device
3690        * @property touchEnabled
3691        * @type Boolean
3692        * @static
3693        */
3694        touchEnabled: false
3695    },
3696
3697    ua = subUA || nav && nav.userAgent,
3698
3699    loc = win && win.location,
3700
3701    href = loc && loc.href,
3702
3703    m;
3704
3705    /**
3706    * The User Agent string that was parsed
3707    * @property userAgent
3708    * @type String
3709    * @static
3710    */
3711    o.userAgent = ua;
3712
3713
3714    o.secure = href && (href.toLowerCase().indexOf('https') === 0);
3715
3716    if (ua) {
3717
3718        if ((/windows|win32/i).test(ua)) {
3719            o.os = 'windows';
3720        } else if ((/macintosh|mac_powerpc/i).test(ua)) {
3721            o.os = 'macintosh';
3722        } else if ((/android/i).test(ua)) {
3723            o.os = 'android';
3724        } else if ((/symbos/i).test(ua)) {
3725            o.os = 'symbos';
3726        } else if ((/linux/i).test(ua)) {
3727            o.os = 'linux';
3728        } else if ((/rhino/i).test(ua)) {
3729            o.os = 'rhino';
3730        }
3731
3732        // Modern KHTML browsers should qualify as Safari X-Grade
3733        if ((/KHTML/).test(ua)) {
3734            o.webkit = 1;
3735        }
3736        if ((/IEMobile|XBLWP7/).test(ua)) {
3737            o.mobile = 'windows';
3738        }
3739        if ((/Fennec/).test(ua)) {
3740            o.mobile = 'gecko';
3741        }
3742        // Modern WebKit browsers are at least X-Grade
3743        m = ua.match(/AppleWebKit\/([^\s]*)/);
3744        if (m && m[1]) {
3745            o.webkit = numberify(m[1]);
3746            o.safari = o.webkit;
3747
3748            if (/PhantomJS/.test(ua)) {
3749                m = ua.match(/PhantomJS\/([^\s]*)/);
3750                if (m && m[1]) {
3751                    o.phantomjs = numberify(m[1]);
3752                }
3753            }
3754
3755            // Mobile browser check
3756            if (/ Mobile\//.test(ua) || (/iPad|iPod|iPhone/).test(ua)) {
3757                o.mobile = 'Apple'; // iPhone or iPod Touch
3758
3759                m = ua.match(/OS ([^\s]*)/);
3760                if (m && m[1]) {
3761                    m = numberify(m[1].replace('_', '.'));
3762                }
3763                o.ios = m;
3764                o.os = 'ios';
3765                o.ipad = o.ipod = o.iphone = 0;
3766
3767                m = ua.match(/iPad|iPod|iPhone/);
3768                if (m && m[0]) {
3769                    o[m[0].toLowerCase()] = o.ios;
3770                }
3771            } else {
3772                m = ua.match(/NokiaN[^\/]*|webOS\/\d\.\d/);
3773                if (m) {
3774                    // Nokia N-series, webOS, ex: NokiaN95
3775                    o.mobile = m[0];
3776                }
3777                if (/webOS/.test(ua)) {
3778                    o.mobile = 'WebOS';
3779                    m = ua.match(/webOS\/([^\s]*);/);
3780                    if (m && m[1]) {
3781                        o.webos = numberify(m[1]);
3782                    }
3783                }
3784                if (/ Android/.test(ua)) {
3785                    o.mobile = 'Android';
3786                    m = ua.match(/Android ([^\s]*);/);
3787                    if (m && m[1]) {
3788                        o.android = numberify(m[1]);
3789                    }
3790
3791                }
3792                if (/Silk/.test(ua)) {
3793                    m = ua.match(/Silk\/([^\s]*)/);
3794                    if (m && m[1]) {
3795                        o.silk = numberify(m[1]);
3796                    }
3797                    if (!o.android) {
3798                        o.android = 2.34; //Hack for desktop mode in Kindle
3799                        o.os = 'Android';
3800                    }
3801                    if (/Accelerated=true/.test(ua)) {
3802                        o.accel = true;
3803                    }
3804                }
3805            }
3806
3807            m = ua.match(/OPR\/(\d+\.\d+)/);
3808
3809            if (m && m[1]) {
3810                // Opera 15+ with Blink (pretends to be both Chrome and Safari)
3811                o.opera = numberify(m[1]);
3812            } else {
3813                m = ua.match(/(Chrome|CrMo|CriOS)\/([^\s]*)/);
3814
3815                if (m && m[1] && m[2]) {
3816                    o.chrome = numberify(m[2]); // Chrome
3817                    o.safari = 0; //Reset safari back to 0
3818                    if (m[1] === 'CrMo') {
3819                        o.mobile = 'chrome';
3820                    }
3821                } else {
3822                    m = ua.match(/AdobeAIR\/([^\s]*)/);
3823                    if (m) {
3824                        o.air = m[0]; // Adobe AIR 1.0 or better
3825                    }
3826                }
3827            }
3828        }
3829
3830        m = ua.match(/Ubuntu\ (\d+\.\d+)/);
3831        if (m && m[1]) {
3832
3833            o.os = 'linux';
3834            o.ubuntu = numberify(m[1]);
3835
3836            m = ua.match(/\ WebKit\/([^\s]*)/);
3837            if (m && m[1]) {
3838                o.webkit = numberify(m[1]);
3839            }
3840            m = ua.match(/\ Chromium\/([^\s]*)/);
3841            if (m && m[1]) {
3842                o.chrome = numberify(m[1]);
3843            }
3844            if (/ Mobile$/.test(ua)) {
3845                o.mobile = 'Ubuntu';
3846            }
3847        }
3848
3849        if (!o.webkit) { // not webkit
3850// @todo check Opera/8.01 (J2ME/MIDP; Opera Mini/2.0.4509/1316; fi; U; ssr)
3851            if (/Opera/.test(ua)) {
3852                m = ua.match(/Opera[\s\/]([^\s]*)/);
3853                if (m && m[1]) {
3854                    o.opera = numberify(m[1]);
3855                }
3856                m = ua.match(/Version\/([^\s]*)/);
3857                if (m && m[1]) {
3858                    o.opera = numberify(m[1]); // opera 10+
3859                }
3860
3861                if (/Opera Mobi/.test(ua)) {
3862                    o.mobile = 'opera';
3863                    m = ua.replace('Opera Mobi', '').match(/Opera ([^\s]*)/);
3864                    if (m && m[1]) {
3865                        o.opera = numberify(m[1]);
3866                    }
3867                }
3868                m = ua.match(/Opera Mini[^;]*/);
3869
3870                if (m) {
3871                    o.mobile = m[0]; // ex: Opera Mini/2.0.4509/1316
3872                }
3873            } else { // not opera or webkit
3874                m = ua.match(/MSIE ([^;]*)|Trident.*; rv:([0-9.]+)/);
3875
3876                if (m && (m[1] || m[2])) {
3877                    o.ie = numberify(m[1] || m[2]);
3878                } else { // not opera, webkit, or ie
3879                    m = ua.match(/Gecko\/([^\s]*)/);
3880
3881                    if (m) {
3882                        o.gecko = 1; // Gecko detected, look for revision
3883                        m = ua.match(/rv:([^\s\)]*)/);
3884                        if (m && m[1]) {
3885                            o.gecko = numberify(m[1]);
3886                            if (/Mobile|Tablet/.test(ua)) {
3887                                o.mobile = "ffos";
3888                            }
3889                        }
3890                    }
3891                }
3892            }
3893        }
3894    }
3895
3896    //Check for known properties to tell if touch events are enabled on this device or if
3897    //the number of MSPointer touchpoints on this device is greater than 0.
3898    if (win && nav && !(o.chrome && o.chrome < 6)) {
3899        o.touchEnabled = (("ontouchstart" in win) || (("msMaxTouchPoints" in nav) && (nav.msMaxTouchPoints > 0)));
3900    }
3901
3902    //It was a parsed UA, do not assign the global value.
3903    if (!subUA) {
3904
3905        if (typeof process === 'object') {
3906
3907            if (process.versions && process.versions.node) {
3908                //NodeJS
3909                o.os = process.platform;
3910                o.nodejs = numberify(process.versions.node);
3911            }
3912        }
3913
3914        YUI.Env.UA = o;
3915
3916    }
3917
3918    return o;
3919};
3920
3921
3922Y.UA = YUI.Env.UA || YUI.Env.parseUA();
3923
3924/**
3925Performs a simple comparison between two version numbers, accounting for
3926standard versioning logic such as the fact that "535.8" is a lower version than
3927"535.24", even though a simple numerical comparison would indicate that it's
3928greater. Also accounts for cases such as "1.1" vs. "1.1.0", which are
3929considered equivalent.
3930
3931Returns -1 if version _a_ is lower than version _b_, 0 if they're equivalent,
39321 if _a_ is higher than _b_.
3933
3934Versions may be numbers or strings containing numbers and dots. For example,
3935both `535` and `"535.8.10"` are acceptable. A version string containing
3936non-numeric characters, like `"535.8.beta"`, may produce unexpected results.
3937
3938@method compareVersions
3939@param {Number|String} a First version number to compare.
3940@param {Number|String} b Second version number to compare.
3941@return -1 if _a_ is lower than _b_, 0 if they're equivalent, 1 if _a_ is
3942    higher than _b_.
3943**/
3944Y.UA.compareVersions = function (a, b) {
3945    var aPart, aParts, bPart, bParts, i, len;
3946
3947    if (a === b) {
3948        return 0;
3949    }
3950
3951    aParts = (a + '').split('.');
3952    bParts = (b + '').split('.');
3953
3954    for (i = 0, len = Math.max(aParts.length, bParts.length); i < len; ++i) {
3955        aPart = parseInt(aParts[i], 10);
3956        bPart = parseInt(bParts[i], 10);
3957
3958        /*jshint expr: true*/
3959        isNaN(aPart) && (aPart = 0);
3960        isNaN(bPart) && (bPart = 0);
3961
3962        if (aPart < bPart) {
3963            return -1;
3964        }
3965
3966        if (aPart > bPart) {
3967            return 1;
3968        }
3969    }
3970
3971    return 0;
3972};
3973YUI.Env.aliases = {
3974    "anim": ["anim-base","anim-color","anim-curve","anim-easing","anim-node-plugin","anim-scroll","anim-xy"],
3975    "anim-shape-transform": ["anim-shape"],
3976    "app": ["app-base","app-content","app-transitions","lazy-model-list","model","model-list","model-sync-rest","model-sync-local","router","view","view-node-map"],
3977    "attribute": ["attribute-base","attribute-complex"],
3978    "attribute-events": ["attribute-observable"],
3979    "autocomplete": ["autocomplete-base","autocomplete-sources","autocomplete-list","autocomplete-plugin"],
3980    "axes": ["axis-numeric","axis-category","axis-time","axis-stacked"],
3981    "axes-base": ["axis-numeric-base","axis-category-base","axis-time-base","axis-stacked-base"],
3982    "base": ["base-base","base-pluginhost","base-build"],
3983    "cache": ["cache-base","cache-offline","cache-plugin"],
3984    "charts": ["charts-base"],
3985    "collection": ["array-extras","arraylist","arraylist-add","arraylist-filter","array-invoke"],
3986    "color": ["color-base","color-hsl","color-harmony"],
3987    "controller": ["router"],
3988    "dataschema": ["dataschema-base","dataschema-json","dataschema-xml","dataschema-array","dataschema-text"],
3989    "datasource": ["datasource-local","datasource-io","datasource-get","datasource-function","datasource-cache","datasource-jsonschema","datasource-xmlschema","datasource-arrayschema","datasource-textschema","datasource-polling"],
3990    "datatable": ["datatable-core","datatable-table","datatable-head","datatable-body","datatable-base","datatable-column-widths","datatable-message","datatable-mutable","datatable-sort","datatable-datasource"],
3991    "datatype": ["datatype-date","datatype-number","datatype-xml"],
3992    "datatype-date": ["datatype-date-parse","datatype-date-format","datatype-date-math"],
3993    "datatype-number": ["datatype-number-parse","datatype-number-format"],
3994    "datatype-xml": ["datatype-xml-parse","datatype-xml-format"],
3995    "dd": ["dd-ddm-base","dd-ddm","dd-ddm-drop","dd-drag","dd-proxy","dd-constrain","dd-drop","dd-scroll","dd-delegate"],
3996    "dom": ["dom-base","dom-screen","dom-style","selector-native","selector"],
3997    "editor": ["frame","editor-selection","exec-command","editor-base","editor-para","editor-br","editor-bidi","editor-tab","createlink-base"],
3998    "event": ["event-base","event-delegate","event-synthetic","event-mousewheel","event-mouseenter","event-key","event-focus","event-resize","event-hover","event-outside","event-touch","event-move","event-flick","event-valuechange","event-tap"],
3999    "event-custom": ["event-custom-base","event-custom-complex"],
4000    "event-gestures": ["event-flick","event-move"],
4001    "handlebars": ["handlebars-compiler"],
4002    "highlight": ["highlight-base","highlight-accentfold"],
4003    "history": ["history-base","history-hash","history-html5"],
4004    "io": ["io-base","io-xdr","io-form","io-upload-iframe","io-queue"],
4005    "json": ["json-parse","json-stringify"],
4006    "loader": ["loader-base","loader-rollup","loader-yui3"],
4007    "loader-pathogen-encoder": ["loader-base","loader-rollup","loader-yui3","loader-pathogen-combo
4007handler"],
4008    "node": ["node-base","node-event-delegate","node-pluginhost","node-screen","node-style"],
4009    "pluginhost": ["pluginhost-base","pluginhost-config"],
4010    "querystring": ["querystring-parse","querystring-stringify"],
4011    "recordset": ["recordset-base","recordset-sort","recordset-filter","recordset-indexer"],
4012    "resize": ["resize-base","resize-proxy","resize-constrain"],
4013    "slider": ["slider-base","slider-value-range","clickable-rail","range-slider"],
4014    "template": ["template-base","template-micro"],
4015    "text": ["text-accentfold","text-wordbreak"],
4016    "widget": ["widget-base","widget-htmlparser","widget-skin","widget-uievents"]
4017};
4018
4019
4020}, 'patched-v3.18.7', {
4021    "use": [
4022        "yui-base",
4023        "get",
4024        "features",
4025        "intl-base",
4026        "yui-log",
4027        "yui-later",
4028        "loader-base",
4029        "loader-rollup",
4030        "loader-yui3"
4031    ]
4032});
4033YUI.add('get', function (Y, NAME) {
4034
4035/*jslint boss:true, expr:true, laxbreak: true */
4036
4037/**
4038Provides dynamic loading of remote JavaScript and CSS resources.
4039
4040@module get
4041@class Get
4042@static
4043**/
4044
4045var Lang = Y.Lang,
4046
4047    CUSTOM_ATTRS, // defined lazily in Y.Get.Transaction._createNode()
4048
4049    Get, Transaction;
4050
4051Y.Get = Get = {
4052    // -- Public Properties ----------------------------------------------------
4053
4054    /**
4055    Default options for CSS requests. Options specified here will override
4056    global defaults for CSS requests.
4057
4058    See the `options` property for all available options.
4059
4060    @property cssOptions
4061    @type Object
4062    @static
4063    @since 3.5.0
4064    **/
4065    cssOptions: {
4066        attributes: {
4067            rel: 'stylesheet'
4068        },
4069
4070        doc         : Y.config.linkDoc || Y.config.doc,
4071        pollInterval: 50
4072    },
4073
4074    /**
4075    Default options for JS requests. Options specified here will override global
4076    defaults for JS requests.
4077
4078    See the `options` property for all available options.
4079
4080    @property jsOptions
4081    @type Object
4082    @static
4083    @since 3.5.0
4084    **/
4085    jsOptions: {
4086        autopurge: true,
4087        doc      : Y.config.scriptDoc || Y.config.doc
4088    },
4089
4090    /**
4091    Default options to use for all requests.
4092
4093    Note that while all available options are documented here for ease of
4094    discovery, some options (like callback functions) only make sense at the
4095    transaction level.
4096
4097    Callback functions specified via the options object or the `options`
4098    parameter of the `css()`, `js()`, or `load()` methods will receive the
4099    transaction object as a parameter. See `Y.Get.Transaction` for details on
4100    the properties and methods available on transactions.
4101
4102    @static
4103    @since 3.5.0
4104    @property {Object} options
4105
4106    @property {Boolean} [options.async=false] Whether or not to load scripts
4107        asynchronously, meaning they're requested in parallel and execution
4108        order is not guaranteed. Has no effect on CSS, since CSS is always
4109        loaded asynchronously.
4110
4111    @property {Object} [options.attributes] HTML attribute name/value pairs that
4112        should be added to inserted nodes. By default, the `charset` attribute
4113        will be set to "utf-8" and nodes will be given an auto-generated `id`
4114        attribute, but you can override these with your own values if desired.
4115
4116    @property {Boolean} [options.autopurge] Whether or not to automatically
4117        purge inserted nodes after the purge threshold is reached. This is
4118        `true` by default for JavaScript, but `false` for CSS since purging a
4119        CSS node will also remove any styling applied by the referenced file.
4120
4121    @property {Object} [options.context] `this` object to use when calling
4122        callback functions. Defaults to the transaction object.
4123
4124    @property {Mixed} [options.data] Arbitrary data object to pass to "on*"
4125        callbacks.
4126
4127    @property {Document} [options.doc] Document into which nodes should be
4128        inserted. By default, the current document is used.
4129
4130    @property {HTMLElement|String} [options.insertBefore] HTML element or id
4131        string of an element before which all generated nodes should be
4132        inserted. If not specified, Get will automatically determine the best
4133        place to insert nodes for maximum compatibility.
4134
4135    @property {Function} [options.onEnd] Callback to execute after a transaction
4136        is complete, regardless of whether it succeeded or failed.
4137
4138    @property {Function} [options.onFailure] Callback to execute after a
4139        transaction fails, times out, or is aborted.
4140
4141    @property {Function} [options.onProgress] Callback to execute after each
4142        individual request in a transaction either succeeds or fails.
4143
4144    @property {Function} [options.onSuccess] Callback to execute after a
4145        transaction completes successfully with no errors. Note that in browsers
4146        that don't support the `error` event on CSS `<link>` nodes, a failed CSS
4147        request may still be reported as a success because in these browsers
4148        it can be difficult or impossible to distinguish between success and
4149        failure for CSS resources.
4150
4151    @property {Function} [options.onTimeout] Callback to execute after a
4152        transaction times out.
4153
4154    @property {Number} [options.pollInterval=50] Polling interval (in
4155        milliseconds) for detecting CSS load completion in browsers that don't
4156        support the `load` event on `<link>` nodes. This isn't used for
4157        JavaScript.
4158
4159    @property {Number} [options.purgethreshold=20] Number of nodes to insert
4160        before triggering an automatic purge when `autopurge` is `true`.
4161
4162    @property {Number} [options.timeout] Number of milliseconds to wait before
4163        aborting a transaction. When a timeout occurs, the `onTimeout` callback
4164        is called, followed by `onFailure` and finally `onEnd`. By default,
4165        there is no timeout.
4166
4167    @property {String} [options.type] Resource type ("css" or "js"). This option
4168        is set automatically by the `css()` and `js()` functions and will be
4169        ignored there, but may be useful when using the `load()` function. If
4170        not specified, the type will be inferred from the URL, defaulting to
4171        "js" if the URL doesn't contain a recognizable file extension.
4172    **/
4173    options: {
4174        attributes: {
4175            charset: 'utf-8'
4176        },
4177
4178        purgethreshold: 20
4179    },
4180
4181    // -- Protected Properties -------------------------------------------------
4182
4183    /**
4184    Regex that matches a CSS URL. Used to guess the file type when it's not
4185    specified.
4186
4187    @property REGEX_CSS
4188    @type RegExp
4189    @final
4190    @protected
4191    @static
4192    @since 3.5.0
4193    **/
4194    REGEX_CSS: /\.css(?:[?;].*)?$/i,
4195
4196    /**
4197    Regex that matches a JS URL. Used to guess the file type when it's not
4198    specified.
4199
4200    @property REGEX_JS
4201    @type RegExp
4202    @final
4203    @protected
4204    @static
4205    @since 3.5.0
4206    **/
4207    REGEX_JS : /\.js(?:[?;].*)?$/i,
4208
4209    /**
4210    Contains information about the current environment, such as what script and
4211    link injection features it supports.
4212
4213    This object is created and populated the first time the `_getEnv()` method
4214    is called.
4215
4216    @property _env
4217    @type Object
4218    @protected
4219    @static
4220    @since 3.5.0
4221    **/
4222
4223    /**
4224    Mapping of document _yuid strings to <head> or <base> node references so we
4225    don't have to look the node up each time we want to insert a request node.
4226
4227    @property _insertCache
4228    @type Object
4229    @protected
4230    @static
4231    @since 3.5.0
4232    **/
4233    _insertCache: {},
4234
4235    /**
4236    Information about the currently pending transaction, if any.
4237
4238    This is actually an object with two properties: `callback`, containing the
4239    optional callback passed to `css()`, `load()`, or `js()`; and `transaction`,
4240    containing the actual transaction instance.
4241
4242    @property _pending
4243    @type Object
4244    @protected
4245    @static
4246    @since 3.5.0
4247    **/
4248    _pending: null,
4249
4250    /**
4251    HTML nodes eligible to be purged next time autopurge is triggered.
4252
4253    @property _purgeNodes
4254    @type HTMLElement[]
4255    @protected
4256    @static
4257    @since 3.5.0
4258    **/
4259    _purgeNodes: [],
4260
4261    /**
4262    Queued transactions and associated callbacks.
4263
4264    @property _queue
4265    @type Object[]
4266    @protected
4267    @static
4268    @since 3.5.0
4269    **/
4270    _queue: [],
4271
4272    // -- Public Methods -------------------------------------------------------
4273
4274    /**
4275    Aborts the specified transaction.
4276
4277    This will cause the transaction's `onFailure` callback to be called and
4278    will prevent any new script and link nodes from being added to the document,
4279    but any resources that have already been requested will continue loading
4280    (there's no safe way to prevent this, unfortunately).
4281
4282    *Note:* This method is deprecated as of 3.5.0, and will be removed in a
4283    future version of YUI. Use the transaction-level `abort()` method instead.
4284
4285    @method abort
4286    @param {Get.Transaction} transaction Transaction to abort.
4287    @deprecated Use the `abort()` method on the transaction instead.
4288    @static
4289    **/
4290    abort: function (transaction) {
4291        var i, id, item, len, pending;
4292
4293
4294        if (!transaction.abort) {
4295            id          = transaction;
4296            pending     = this._pending;
4297            transaction = null;
4298
4299            if (pending && pending.transaction.id === id) {
4300                transaction   = pending.transaction;
4301                this._pending = null;
4302            } else {
4303                for (i = 0, len = this._queue.length; i < len; ++i) {
4304                    item = this._queue[i].transaction;
4305
4306                    if (item.id === id) {
4307                        transaction = item;
4308                        this._queue.splice(i, 1);
4309                        break;
4310                    }
4311                }
4312            }
4313        }
4314
4315        transaction && transaction.abort();
4316    },
4317
4318    /**
4319    Loads one or more CSS files.
4320
4321    The _urls_ parameter may be provided as a URL string, a request object,
4322    or an array of URL strings and/or request objects.
4323
4324    A request object is just an object that contains a `url` property and zero
4325    or more options that should apply specifically to that request.
4326    Request-specific options take priority over transaction-level options and
4327    default options.
4328
4329    URLs may be relative or absolute, and do not have to have the same origin
4330    as the current page.
4331
4332    The `options` parameter may be omitted completely and a callback passed in
4333    its place, if desired.
4334
4335    @example
4336
4337        // Load a single CSS file and log a message on completion.
4338        Y.Get.css('foo.css', function (err) {
4339            if (err) {
4340            } else {
4341            }
4342        });
4343
4344        // Load multiple CSS files and log a message when all have finished
4345        // loading.
4346        var urls = ['foo.css', 'http://example.com/bar.css', 'baz/quux.css'];
4347
4348        Y.Get.css(urls, function (err) {
4349            if (err) {
4350            } else {
4351            }
4352        });
4353
4354        // Specify transaction-level options, which will apply to all requests
4355        // within the transaction.
4356        Y.Get.css(urls, {
4357            attributes: {'class': 'my-css'},
4358            timeout   : 5000
4359        });
4360
4361        // Specify per-request options, which override transaction-level and
4362        // default options.
4363        Y.Get.css([
4364            {url: 'foo.css', attributes: {id: 'foo'}},
4365            {url: 'bar.css', attributes: {id: 'bar', charset: 'iso-8859-1'}}
4366        ]);
4367
4368    @method css
4369    @param {String|Object|Array}
4369 urls URL string, request object, or array
4370        of URLs and/or request objects to load.
4371    @param {Object} [options] Options for this transaction. See the
4372        `Y.Get.options` property for a complete list of available options.
4373    @param {Function} [callback] Callback function to be called on completion.
4374        This is a general callback and will be called before any more granular
4375        callbacks (`onSuccess`, `onFailure`, etc.) specified in the `options`
4376        object.
4377
4378        @param {Array|null} callback.err Array of errors that occurred during
4379            the transaction, or `null` on success.
4380        @param {Get.Transaction} callback.transaction Transaction object.
4381
4382    @return {Get.Transaction} Transaction object.
4383    @static
4384    **/
4385    css: function (urls, options, callback) {
4386        return this._load('css', urls, options, callback);
4387    },
4388
4389    /**
4390    Loads one or more JavaScript resources.
4391
4392    The _urls_ parameter may be provided as a URL string, a request object,
4393    or an array of URL strings and/or request objects.
4394
4395    A request object is just an object that contains a `url` property and zero
4396    or more options that should apply specifically to that request.
4397    Request-specific options take priority over transaction-level options and
4398    default options.
4399
4400    URLs may be relative or absolute, and do not have to have the same origin
4401    as the current page.
4402
4403    The `options` parameter may be omitted completely and a callback passed in
4404    its place, if desired.
4405
4406    Scripts will be executed in the order they're specified unless the `async`
4407    option is `true`, in which case they'll be loaded in parallel and executed
4408    in whatever order they finish loading.
4409
4410    @example
4411
4412        // Load a single JS file and log a message on completion.
4413        Y.Get.js('foo.js', function (err) {
4414            if (err) {
4415            } else {
4416            }
4417        });
4418
4419        // Load multiple JS files, execute them in order, and log a message when
4420        // all have finished loading.
4421        var urls = ['foo.js', 'http://example.com/bar.js', 'baz/quux.js'];
4422
4423        Y.Get.js(urls, function (err) {
4424            if (err) {
4425            } else {
4426            }
4427        });
4428
4429        // Specify transaction-level options, which will apply to all requests
4430        // within the transaction.
4431        Y.Get.js(urls, {
4432            attributes: {'class': 'my-js'},
4433            timeout   : 5000
4434        });
4435
4436        // Specify per-request options, which override transaction-level and
4437        // default options.
4438        Y.Get.js([
4439            {url: 'foo.js', attributes: {id: 'foo'}},
4440            {url: 'bar.js', attributes: {id: 'bar', charset: 'iso-8859-1'}}
4441        ]);
4442
4443    @method js
4444    @param {String|Object|Array} urls URL string, request object, or array
4445        of URLs and/or request objects to load.
4446    @param {Object} [options] Options for this transaction. See the
4447        `Y.Get.options` property for a complete list of available options.
4448    @param {Function} [callback] Callback function to be called on completion.
4449        This is a general callback and will be called before any more granular
4450        callbacks (`onSuccess`, `onFailure`, etc.) specified in the `options`
4451        object.
4452
4453        @param {Array|null} callback.err Array of errors that occurred during
4454            the transaction, or `null` on success.
4455        @param {Get.Transaction} callback.transaction Transaction object.
4456
4457    @return {Get.Transaction} Transaction object.
4458    @since 3.5.0
4459    @static
4460    **/
4461    js: function (urls, options, callback) {
4462        return this._load('js', urls, options, callback);
4463    },
4464
4465    /**
4466    Loads one or more CSS and/or JavaScript resources in the same transaction.
4467
4468    Use this method when you want to load both CSS and JavaScript in a single
4469    transaction and be notified when all requested URLs have finished loading,
4470    regardless of type.
4471
4472    Behavior and options are the same as for the `css()` and `js()` methods. If
4473    a resource type isn't specified in per-request options or transaction-level
4474    options, Get will guess the file type based on the URL's extension (`.css`
4475    or `.js`, with or without a following query string). If the file type can't
4476    be guessed from the URL, a warning will be logged and Get will assume the
4477    URL is a JavaScript resource.
4478
4479    @example
4480
4481        // Load both CSS and JS files in a single transaction, and log a message
4482        // when all files have finished loading.
4483        Y.Get.load(['foo.css', 'bar.js', 'baz.css'], function (err) {
4484            if (err) {
4485            } else {
4486            }
4487        });
4488
4489    @method load
4490    @param {String|Object|Array}
4490 urls URL string, request object, or array
4491        of URLs and/or request objects to load.
4492    @param {Object} [options] Options for this transaction. See the
4493        `Y.Get.options` property for a complete list of available options.
4494    @param {Function} [callback] Callback function to be called on completion.
4495        This is a general callback and will be called before any more granular
4496        callbacks (`onSuccess`, `onFailure`, etc.) specified in the `options`
4497        object.
4498
4499        @param {Array|null} err Array of errors that occurred during the
4500            transaction, or `null` on success.
4501        @param {Get.Transaction} Transaction object.
4502
4503    @return {Get.Transaction} Transaction object.
4504    @since 3.5.0
4505    @static
4506    **/
4507    load: function (urls, options, callback) {
4508        return this._load(null, urls, options, callback);
4509    },
4510
4511    // -- Protected Methods ----------------------------------------------------
4512
4513    /**
4514    Triggers an automatic purge if the purge threshold has been reached.
4515
4516    @method _autoPurge
4517    @param {Number} threshold Purge threshold to use, in milliseconds.
4518    @protected
4519    @since 3.5.0
4520    @static
4521    **/
4522    _autoPurge: function (threshold) {
4523        if (threshold && this._purgeNodes.length >= threshold) {
4524            this._purge(this._purgeNodes);
4525        }
4526    },
4527
4528    /**
4529    Populates the `_env` property with information about the current
4530    environment.
4531
4532    @method _getEnv
4533    @return {Object} Environment information.
4534    @protected
4535    @since 3.5.0
4536    @static
4537    **/
4538    _getEnv: function () {
4539        var doc = Y.config.doc,
4540            ua  = Y.UA;
4541
4542        // Note: some of these checks require browser sniffs since it's not
4543        // feasible to load test files on every pageview just to perform a
4544        // feature test. I'm sorry if this makes you sad.
4545        return (this._env = {
4546
4547            // True if this is a browser that supports disabling async mode on
4548            // dynamically created script nodes. See
4549            // https://developer.mozilla.org/En/HTML/Element/Script#Attributes
4550
4551            // IE10 doesn't return true for the MDN feature test, so setting it explicitly,
4552            // because it is async by default, and allows you to disable async by setting it to false
4553            async: (doc && doc.createElement('script').async === true) || (ua.ie >= 10),
4554
4555            // True if this browser fires an event when a dynamically injected
4556            // link node fails to load. This is currently true for Firefox 9+
4557            // and WebKit 535.24+
4558            cssFail: ua.gecko >= 9 || ua.compareVersions(ua.webkit, 535.24) >= 0,
4559
4560            // True if this browser fires an event when a dynamically injected
4561            // link node finishes loading. This is currently true for IE, Opera,
4562            // Firefox 9+, and WebKit 535.24+. Note that IE versions <9 fire the
4563            // DOM 0 "onload" event, but not "load". All versions of IE fire
4564            // "onload".
4565            // davglass: Seems that Chrome on Android needs this to be false.
4566            cssLoad: (
4567                    (!ua.gecko && !ua.webkit) || ua.gecko >= 9 ||
4568                    ua.compareVersions(ua.webkit, 535.24) >= 0
4569                ) && !(ua.chrome && ua.chrome <= 18),
4570
4571            // True if this browser preserves script execution order while
4572            // loading scripts in parallel as long as the script node's `async`
4573            // attribute is set to false to explicitly disable async execution.
4574            preservesScriptOrder: !!(ua.gecko || ua.opera || (ua.ie && ua.ie >= 10))
4575        });
4576    },
4577
4578    _getTransaction: function (urls, options) {
4579        var requests = [],
4580            i, len, req, url;
4581
4582        if (!Lang.isArray(urls)) {
4583            urls = [urls];
4584        }
4585
4586        options = Y.merge(this.options, options);
4587
4588        // Clone the attributes object so we don't end up modifying it by ref.
4589        options.attributes = Y.merge(this.options.attributes,
4590                options.attributes);
4591
4592        for (i = 0, len = urls.length; i < len; ++i) {
4593            url = urls[i];
4594            req = {attributes: {}};
4595
4596            // If `url` is a string, we create a URL object for it, then mix in
4597            // global options and request-specific options. If it's an object
4598            // with a "url" property, we assume it's a request object c
4598ontaining
4599            // URL-specific options.
4600            if (typeof url === 'string') {
4601                req.url = url;
4602            } else if (url.url) {
4603                // URL-specific options override both global defaults and
4604                // request-specific options.
4605                Y.mix(req, url, false, null, 0, true);
4606                url = url.url; // Make url a string so we can use it later.
4607            } else {
4608                continue;
4609            }
4610
4611            Y.mix(req, options, false, null, 0, true);
4612
4613            // If we didn't get an explicit type for this URL either in the
4614            // request options or the URL-specific options, try to determine
4615            // one from the file extension.
4616            if (!req.type) {
4617                if (this.REGEX_CSS.test(url)) {
4618                    req.type = 'css';
4619                } else {
4620                    if (!this.REGEX_JS.test(url)) {
4621                    }
4622
4623                    req.type = 'js';
4624                }
4625            }
4626
4627            // Mix in type-specific default options, but don't overwrite any
4628            // options that have already been set.
4629            Y.mix(req, req.type === 'js' ? this.jsOptions : this.cssOptions,
4630                false, null, 0, true);
4631
4632            // Give the node an id attribute if it doesn't already have one.
4633            req.attributes.id || (req.attributes.id = Y.guid());
4634
4635            // Backcompat for <3.5.0 behavior.
4636            if (req.win) {
4637                req.doc = req.win.document;
4638            } else {
4639                req.win = req.doc.defaultView || req.doc.parentWindow;
4640            }
4641
4642            if (req.charset) {
4643                req.attributes.charset = req.charset;
4644            }
4645
4646            requests.push(req);
4647        }
4648
4649        return new Transaction(requests, options);
4650    },
4651
4652    _load: function (type, urls, options, callback) {
4653        var transaction;
4654
4655        // Allow callback as third param.
4656        if (typeof options === 'function') {
4657            callback = options;
4658            options  = {};
4659        }
4660
4661        options || (options = {});
4662        options.type = type;
4663
4664        options._onFinish = Get._onTransactionFinish;
4665
4666        if (!this._env) {
4667            this._getEnv();
4668        }
4669
4670        transaction = this._getTransaction(urls, options);
4671
4672        this._queue.push({
4673            callback   : callback,
4674            transaction: transaction
4675        });
4676
4677        this._next();
4678
4679        return transaction;
4680    },
4681
4682    _onTransactionFinish : function() {
4683        Get._pending = null;
4684        Get._next();
4685    },
4686
4687    _next: function () {
4688        var item;
4689
4690        if (this._pending) {
4691            return;
4692        }
4693
4694        item = this._queue.shift();
4695
4696        if (item) {
4697            this._pending = item;
4698            item.transaction.execute(item.callback);
4699        }
4700    },
4701
4702    _purge: function (nodes) {
4703        var purgeNodes    = this._purgeNodes,
4704            isTransaction = nodes !== purgeNodes,
4705            index, node;
4706
4707        while (node = nodes.pop()) { // assignment
4708            // Don't purge nodes that haven't finished loading (or errored out),
4709            // since this can hang the transaction.
4710            if (!node._yuiget_finished) {
4711                continue;
4712            }
4713
4714            node.parentNode && node.parentNode.removeChild(node);
4715
4716            // If this is a transaction-level purge and this node also exists in
4717            // the Get-level _purgeNodes array, we need to remove it from
4718            // _purgeNodes to avoid creating a memory leak. The indexOf lookup
4719            // sucks, but until we get WeakMaps, this is the least troublesome
4720            // way to do this (we can't just hold onto node ids because they may
4721            // not be in the same document).
4722            if (isTransaction) {
4723                index = Y.Array.indexOf(purgeNodes, node);
4724
4725                if (index > -1) {
4726                    purgeNodes.splice(index, 1);
4727                }
4728            }
4729        }
4730    }
4731};
4732
4733/**
4734Alias for `js()`.
4735
4736@method script
4737@static
4738**/
4739Get.script = Get.js;
4740
4741/**
4742Represents a Get transaction, which may contain requests for one or more JS or
4743CSS files.
4744
4745This class should not be instantiated manually. Instances will be created and
4746returned as needed by Y.Get's `css()`, `js()`, and `load()` methods.
4747
4748@class Get.Transaction
4749@constructor
4750@since 3.5.0
4751**/
4752Get.Transaction = Transaction = function (requests, options) {
4753    var self = this;
4754
4755    self.id       = Transaction._lastId += 1;
4756    self.data     = options.data;
4757    self.errors   = [];
4758    self.nodes    = [];
4759    self.options  = options;
4760    self.requests = requests;
4761
4762    self._callbacks = []; // callbacks to call after execution finishes
4763    self._queue     = [];
4764    self._reqsWaiting   = 0;
4765
4766    // Deprecated pre-3.5.0 properties.
4767    self.tId = self.id; // Use `id` instead.
4768    self.win = options.win || Y.config.win;
4769};
4770
4771/**
4772Arbitrary data object associated with this transaction.
4773
4774This object comes from the options passed to `Get.css()`, `Get.js()`, or
4775`Get.load()`, and will be `undefined` if no data object was specified.
4776
4777@property {Object} data
4778**/
4779
4780/**
4781Array of errors that have occurred during this transaction, if any. Each error
4782object has the following properties:
4783`errors.error`: Error message.
4784`errors.request`: Request object related to the error.
4785
4786@since 3.5.0
4787@property {Object[]} errors
4788**/
4789
4790/**
4791Numeric id for this transaction, unique among all transactions within the same
4792YUI sandbox in the current pageview.
4793
4794@property {Number} id
4795@since 3.5.0
4796**/
4797
4798/**
4799HTMLElement nodes (native ones, not YUI Node instances) that have been inserted
4800during the current transaction.
4801
4802@property {HTMLElement[]} nodes
4803**/
4804
4805/**
4806Options associated with this transaction.
4807
4808See `Get.options` for the full list of available options.
4809
4810@property {Object} options
4811@since 3.5.0
4812**/
4813
4814/**
4815Request objects contained in this transaction. Each request object represents
4816one CSS or JS URL that will be (or has been) requested and loaded into the page.
4817
4818@property {Object} requests
4819@since 3.5.0
4820**/
4821
4822/**
4823Id of the most recent transaction.
4824
4825@property _lastId
4826@type Number
4827@protected
4828@static
4829**/
4830Transaction._lastId = 0;
4831
4832Transaction.prototype = {
4833    // -- Public Properties ----------------------------------------------------
4834
4835    /**
4836    Current state of this transaction. One of "new", "executing", or "done".
4837
4838    @property _state
4839    @type String
4840    @protected
4841    **/
4842    _state: 'new', // "new", "executing", or "done"
4843
4844    // -- Public Methods -------------------------------------------------------
4845
4846    /**
4847    Aborts this transaction.
4848
4849    This will cause the transaction's `onFailure` callback to be called and
4850    will prevent any new script and link nodes from being added to the document,
4851    but any resources that have already been requested will continue loading
4852    (there's no safe way to prevent this, unfortunately).
4853
4854    @method abort
4855    @param {String} [msg="Aborted."] Optional message to use in the `errors`
4856        array describing why the transaction was aborted.
4857    **/
4858    abort: function (msg) {
4859        this._pending    = null;
4860        this._pendingCSS = null;
4861        this._pollTimer  = clearTimeout(this._pollTimer);
4862        this._queue      = [];
4863        this._reqsWaiting    = 0;
4864
4865        this.errors.push({error: msg || 'Aborted'});
4866        this._finish();
4867    },
4868
4869    /**
4870    Begins execting the transaction.
4871
4872    There's usually no reason to call this manually, since Get will call it
4873    automatically when other pending transactions have finished. If you really
4874    want to execute your transaction before Get does, you can, but be aware that
4875    this transaction's scripts may end up executing before the scripts in other
4876    pending transactions.
4877
4878    If the transaction is already executing, the specified callback (if any)
4879    will be queued and called after execution finishes. If the transaction has
4880    already finished, the callback will be called immediately (the transaction
4881    will not be executed again).
4882
4883    @method execute
4884    @param {Function} callback Callback function to execute after all requests
4885        in the transaction are complete, or after the transaction is aborted.
4886    **/
4887    execute: function (callback) {
4888        var self     = this,
4889            requests = self.requests,
4890            state    = self._state,
4891            i, len, queue, req;
4892
4893        if (state === 'done') {
4894            callback && callback(self.errors.length ? self.errors : null, self);
4895            return;
4896        } else {
4897            callback && self._callbacks.push(callback);
4898
4899            if (state === 'executing') {
4900                return;
4901            }
4902        }
4903
4904        self._state = 'executing';
4905        self._queue = queue = [];
4906
4907        if (self.options.timeout) {
4908            self._timeout = setTimeout(function () {
4909                self.abort('Timeout');
4910            }, self.options.timeout);
4911        }
4912
4913        self._reqsWaiting = requests.length;
4914
4915        for (i = 0, len = requests.length; i < len; ++i) {
4916            req = requests[i];
4917
4918            if (req.async || req.type === 'css') {
4919                // No need to queue CSS or fully async JS.
4920                self._insert(req);
4921            } else {
4922                queue.push(req);
4923            }
4924        }
4925
4926        self._next();
4927    },
4928
4929    /**
4930    Manually purges any `<script>` or `<link>` nodes this transaction has
4931    created.
4932
4933    Be careful when purging a transaction that contains CSS requests, since
4934    removing `<link>` nodes will also remove any styles they applied.
4935
4936    @method purge
4937    **/
4938    purge: function () {
4939        Get._purge(this.nodes);
4940    },
4941
4942    // -- Protected Methods ----------------------------------------------------
4943    _createNode: function (name, attrs, doc) {
4944        var node = doc.createElement(name),
4945            attr, testEl;
4946
4947        if (!CUSTOM_ATTRS) {
4948            // IE6 and IE7 expect property names rather than attribute names for
4949            // certain attributes. Rather than sniffing, we do a quick feature
4950            // test the first time _createNode() runs to determine whether we
4951            // need to provide a workaround.
4952            testEl = doc.createElement('div');
4953            testEl.setAttribute('class', 'a');
4954
4955            CUSTOM_ATTRS = testEl.className === 'a' ? {} : {
4956                'for'  : 'htmlFor',
4957                'class': 'className'
4958            };
4959        }
4960
4961        for (attr in attrs) {
4962            if (attrs.hasOwnProperty(attr)) {
4963                node.setAttribute(CUSTOM_ATTRS[attr] || attr, attrs[attr]);
4964            }
4965        }
4966
4967        return node;
4968    },
4969
4970    _finish: function () {
4971        var errors  = this.errors.length ? this.errors : null,
4972            options = this.options,
4973            thisObj = options.context || this,
4974            data, i, len;
4975
4976        if (this._state === 'done') {
4977            return;
4978        }
4979
4980        this._state = 'done';
4981
4982        for (i = 0, len = this._callbacks.length; i < len; ++i) {
4983            this._callbacks[i].call(thisObj, errors, this);
4984        }
4985
4986        data = this._getEventData();
4987
4988        if (errors) {
4989            if (options.onTimeout && errors[errors.length - 1].error === 'Timeout') {
4990                options.onTimeout.call(thisObj, data);
4991            }
4992
4993            if (options.onFailure) {
4994                options.onFailure.call(thisObj, data);
4995            }
4996        } else if (options.onSuccess) {
4997            options.onSuccess.call(thisObj, data);
4998        }
4999
5000        if (options.onEnd) {
5001            options.onEnd.call(thisObj, data);
5002        }
5003
5004        if (options._onFinish) {
5005            options._onFinish();
5006        }
5007    },
5008
5009    _getEventData: function (req) {
5010        if (req) {
5011            // This merge is necessary for backcompat. I hate it.
5012            return Y.merge(this, {
5013                abort  : this.abort, // have to copy these because the prototype isn't preserved
5014                purge  : this.purge,
5015                request: req,
5016                url    : req.url,
5017                win    : req.win
5018            });
5019        } else {
5020            return this;
5021        }
5022    },
5023
5024    _getInsertBefore: function (req) {
5025        var doc = req.doc,
5026            el  = req.insertBefore,
5027            cache, docStamp;
5028
5029        if (el) {
5030            return typeof el === 'string' ? doc.getElementById(el) : el;
5031        }
5032
5033        cache    = Get._insertCache;
5034        docStamp = Y.stamp(doc);
5035
5036        if ((el = cache[docStamp])) { // assignment
5037            return el;
5038        }
5039
5040        // Inserting before a <base> tag apparently works around an IE bug
5041        // (according to a comment from pre-3.5.0 Y.Get), but I'm not sure what
5042        // bug that is, exactly. Better safe than sorry?
5043        if ((el = doc.getElementsByTagName('base')[0])) { // assignment
5044            return (cache[docStamp] = el);
5045        }
5046
5047        // Look for a <head> element.
5048        el = doc.head || doc.getElementsByTagName('head')[0];
5049
5050        if (el) {
5051            // Create a marker node at the end of <head> to use as an insertion
5052            // point. Inserting before this node will ensure that all our CSS
5053            // gets inserted in the correct order, to maintain style precedence.
5054            el.appendChild(doc.createTextNode(''));
5055            return (cache[docStamp] = el.lastChild);
5056        }
5057
5058        // If all else fails, just insert before the first script node on the
5059        // page, which is virtually guaranteed to exist.
5060        return (cache[docStamp] = doc.getElementsByTagName('script')[0]);
5061    },
5062
5063    _insert: function (req) {
5064        var env          = Get._env,
5065            insertBefore = this._getInsertBefore(req),
5066            isScript     = req.type === 'js',
5067            node         = req.node,
5068            self         = this,
5069            ua           = Y.UA,
5070            cssTimeout, nodeType;
5071
5072        if (!node) {
5073            if (isScript) {
5074                nodeType = 'script';
5075            } else if (!env.cssLoad && ua.gecko) {
5076                nodeType = 'style';
5077            } else {
5078                nodeType = 'link';
5079                delete req.attributes['charset'];
5080            }
5081
5082            node = req.node = this._createNode(nodeType, req.attributes,
5083                req.doc);
5084        }
5085
5086        function onError() {
5087            self._progress('Failed to load ' + req.url, req);
5088        }
5089
5090        function onLoad() {
5091            if (cssTimeout) {
5092                clearTimeout(cssTimeout);
5093            }
5094
5095            self._progress(null, req);
5096        }
5097
5098        // Deal with script asynchronicity.
5099        if (isScript) {
5100            node.setAttribute('src', req.url);
5101
5102            if (req.async) {
5103                // Explicitly indicate that we want the browser to execute this
5104                // script asynchronously. This is necessary for older browsers
5105                // like Firefox <4.
5106                node.async = true;
5107            } else {
5108                if (env.async) {
5109                    // This browser treats injected scripts as async by default
5110                    // (standard HTML5 behavior) but asynchronous loading isn't
5111                    // desired, so tell the browser not to mark this script as
5112                    // async.
5113                    node.async = false;
5114                }
5115
5116                // If this browser doesn't preserve script execution order based
5117                // on insertion order, we'll need to avoid inserting other
5118                // scripts until this one finishes loading.
5119                if (!env.preservesScriptOrder) {
5120                    this._pending = req;
5121                }
5122            }
5123        } else {
5124            if (!env.cssLoad && ua.gecko) {
5125                // In Firefox <9, we can import the requested URL into a <style>
5126                // node and poll for the existence of node.sheet.cssRules. This
5127                // gives us a reliable way to determine CSS load completion that
5128                // also works for cross-domain stylesheets.
5129                //
5130                // Props to Zach Leatherman for calling my attention to this
5131                // technique.
5132                node.innerHTML = (req.attributes.charset ?
5133                    '@charset "' + req.attributes.charset + '";' : '') +
5134                    '@import "' + req.url + '";';
5135            } else {
5136                node.setAttribute('href', req.url);
5137            }
5138        }
5139
5140        // Inject the node.
5141        if (isScript && ua.ie && (ua.ie < 9 || (document.documentMode && document.documentMode < 9))) {
5142            // Script on IE < 9, and IE 9+ when in IE 8 or older modes, including quirks mode.
5143            node.onreadystatechange = function () {
5144                if (/loaded|complete/.test(node.readyState)) {
5145                    node.onreadystatechange = null;
5146                    onLoad();
5147                }
5148            };
5149        } else if (!isScript && !env.cssLoad) {
5150            // CSS on Firefox <9 or WebKit.
5151            this._poll(req);
5152        } else {
5153            // Script or CSS on everything else. Using DOM 0 events because that
5154            // evens the playing field with older IEs.
5155
5156            if (ua.ie >= 10) {
5157
5158                // We currently need to introduce a timeout for IE10, since it
5159                // calls onerror/onload synchronously for 304s - messing up existing
5160                // program flow.
5161
5162                // Remove this block if the following bug gets fixed by GA
5163                /*jshint maxlen: 1500 */
5164                // https://connect.microsoft.com/IE/feedback/details/763871/dynamically-loaded-scripts-with-304s-responses-interrupt-the-currently-executing-js-thread-onload
5165                node.onerror = function() { setTimeout(onError, 0); };
5166                node.onload  = function() { setTimeout(onLoad, 0); };
5167            } else {
5168                node.onerror = onError;
5169                node.onload  = onLoad;
5170            }
5171
5172            // If this browser doesn't fire an event when CSS fails to load,
5173            // fail after a timeout to avoid blocking the transaction queue.
5174            if (!env.cssFail && !isScript) {
5175                cssTimeout = setTimeout(onError, req.timeout || 3000);
5176            }
5177        }
5178
5179        this.nodes.push(node);
5180        insertBefore.parentNode.insertBefore(node, insertBefore);
5181    },
5182
5183    _next: function () {
5184        if (this._pending) {
5185            return;
5186        }
5187
5188        // If there are requests in the queue, insert the next queued request.
5189        // Otherwise, if we're waiting on already-inserted requests to finish,
5190        // wait longer. If there are no queued requests and we're not waiting
5191        // for anything to load, then we're done!
5192        if (this._queue.length) {
5193            this._insert(this._queue.shift());
5194        } else if (!this._reqsWaiting) {
5195            this._finish();
5196        }
5197    },
5198
5199    _poll: function (newReq) {
5200        var self       = this,
5201            pendingCSS = self._pendingCSS,
5202            isWebKit   = Y.UA.webkit,
5203            i, hasRules, j, nodeHref, req, sheets;
5204
5205        if (newReq) {
5206            pendingCSS || (pendingCSS = self._pendingCSS = []);
5207            pendingCSS.push(newReq);
5208
5209            if (self._pollTimer) {
5210                // A poll timeout is already pending, so no need to create a
5211                // new one.
5212                return;
5213            }
5214        }
5215
5216        self._pollTimer = null;
5217
5218        // Note: in both the WebKit and Gecko hacks below, a CSS URL that 404s
5219        // will still be treated as a success. There's no good workaround for
5220        // this.
5221
5222        for (i = 0; i < pendingCSS.length; ++i) {
5223            req = pendingCSS[i];
5224
5225            if (isWebKit) {
5226                // Look for a stylesheet matching the pending URL.
5227                sheets   = req.doc.styleSheets;
5228                j        = sheets.length;
5229                nodeHref = req.node.href;
5230
5231                while (--j >= 0) {
5232                    if (sheets[j].href === nodeHref) {
5233                        pendingCSS.splice(i, 1);
5234                        i -= 1;
5235                        self._progress(null, req);
5236                        break;
5237                    }
5238                }
5239            } else {
5240                // Many thanks to Zach Leatherman for calling my attention to
5241                // the @import-based cross-domain technique used here, and to
5242                // Oleg Slobodskoi for an earlier same-domain implementation.
5243                //
5244                // See Zach's blog for more details:
5245                // http://www.zachleat.com/web/2010/07/29/load-css-dynamically/
5246                try {
5247                    // We don't really need to store this value since we never
5248                    // use it again, but if we don't store it, Closure Compiler
5249                    // assumes the code is useless and removes it.
5250                    hasRules = !!req.node.sheet.cssRules;
5251
5252                    // If we get here, the stylesheet has loaded.
5253                    pendingCSS.splice(i, 1);
5254                    i -= 1;
5255                    self._progress(null, req);
5256                } catch (ex) {
5257                    // An exception means the stylesheet is still loading.
5258                }
5259            }
5260        }
5261
5262        if (pendingCSS.length) {
5263            self._pollTimer = setTimeout(function () {
5264                self._poll.call(self);
5265            }, self.options.pollInterval);
5266        }
5267    },
5268
5269    _progress: function (err, req) {
5270        var options = this.options;
5271
5272        if (err) {
5273            req.error = err;
5274
5275            this.errors.push({
5276                error  : err,
5277                request: req
5278            });
5279
5280        }
5281
5282        req.node._yuiget_finished = req.finished = true;
5283
5284        if (options.onProgress) {
5285            options.onProgress.call(options.context || this,
5286                this._getEventData(req));
5287        }
5288
5289        if (req.autopurge) {
5290            // Pre-3.5.0 Get always excludes the most recent node from an
5291            // autopurge. I find this odd, but I'm keeping that behavior for
5292            // the sake of backcompat.
5293            Get._autoPurge(this.options.purgethreshold);
5294            Get._purgeNodes.push(req.node);
5295        }
5296
5297        if (this._pending === req) {
5298            this._pending = null;
5299        }
5300
5301        this._reqsWaiting -= 1;
5302
5303        this._next();
5304    }
5305};
5306
5307
5308}, 'patched-v3.18.7', {"requires": ["yui-base"]});
5309YUI.add('features', function (Y, NAME) {
5310
5311var feature_tests = {};
5312
5313/**
5314Contains the core of YUI's feature test architecture.
5315@module features
5316*/
5317
5318/**
5319* Feature detection
5320* @class Features
5321* @static
5322*/
5323
5324Y.mix(Y.namespace('Features'), {
5325
5326    /**
5327    * Object hash of all registered feature tests
5328    * @property tests
5329    * @type Object
5330    */
5331    tests: feature_tests,
5332
5333    /**
5334    * Add a test to the system
5335    *
5336    *   ```
5337    *   Y.Features.add("load", "1", {});
5338    *   ```
5339    *
5340    * @method add
5341    * @param {String} cat The category, right now only 'load' is supported
5342    * @param {String} name The number sequence of the test, how it's reported in the URL or config: 1, 2, 3
5343    * @param {Object} o Object containing test properties
5344    * @param {String} o.name The name of the test
5345    * @param {Function} o.test The test function to execute, the only argument to the function is the `Y` instance
5346    * @param {String} o.trigger The module that triggers this test.
5347    */
5348    add: function(cat, name, o) {
5349        feature_tests[cat] = feature_tests[cat] || {};
5350        feature_tests[cat][name] = o;
5351    },
5352    /**
5353    * Execute all tests of a given category and return the serialized results
5354    *
5355    *   ```
5356    *   caps=1:1;2:1;3:0
5357    *   ```
5358    * @method all
5359    * @param {String} cat The category to execute
5360    * @param {Array} args The arguments to pass to the test function
5361    * @return {String} A semi-colon separated string of tests and their success/failure: 1:1;2:1;3:0
5362    */
5363    all: function(cat, args) {
5364        var cat_o = feature_tests[cat],
5365            // results = {};
5366            result = [];
5367        if (cat_o) {
5368            Y.Object.each(cat_o, function(v, k) {
5369                result.push(k + ':' + (Y.Features.test(cat, k, args) ? 1 : 0));
5370            });
5371        }
5372
5373        return (result.length) ? result.join(';') : '';
5374    },
5375    /**
5376    * Run a specific test and return a Boolean response.
5377    *
5378    *   ```
5379    *   Y.Features.test("load", "1");
5380    *   ```
5381    *
5382    * @method test
5383    * @param {String} cat The category of the test to run
5384    * @param {String} name The name of the test to run
5385    * @param {Array} args The arguments to pass to the test function
5386    * @return {Boolean} True or false if the test passed/failed.
5387    */
5388    test: function(cat, name, args) {
5389        args = args || [];
5390        var result, ua, test,
5391            cat_o = feature_tests[cat],
5392            feature = cat_o && cat_o[name];
5393
5394        if (!feature) {
5395        } else {
5396
5397            result = feature.result;
5398
5399            if (Y.Lang.isUndefined(result)) {
5400
5401                ua = feature.ua;
5402                if (ua) {
5403                    result = (Y.UA[ua]);
5404                }
5405
5406                test = feature.test;
5407                if (test && ((!ua) || result)) {
5408                    result = test.apply(Y, args);
5409                }
5410
5411                feature.result = result;
5412            }
5413        }
5414
5415        return result;
5416    }
5417});
5418
5419// Y.Features.add("load", "1", {});
5420// Y.Features.test("load", "1");
5421// caps=1:1;2:0;3:1;
5422
5423/* This file is auto-generated by (yogi loader --yes --mix --start ../) */
5424/*jshint maxlen:900, eqeqeq: false */
5425var add = Y.Features.add;
5426// app-transitions-native
5427add('load', '0', {
5428    "name": "app-transitions-native",
5429    "test": function (Y) {
5430    var doc  = Y.config.doc,
5431        node = doc ? doc.documentElement : null;
5432
5433    if (node && node.style) {
5434        return ('MozTransition' in node.style || 'WebkitTransition' in node.style || 'transition' in node.style);
5435    }
5436
5437    return false;
5438},
5439    "trigger": "app-transitions"
5440});
5441// autocomplete-list-keys
5442add('load', '1', {
5443    "name": "autocomplete-list-keys",
5444    "test": function (Y) {
5445    // Only add keyboard support to autocomplete-list if this doesn't appear to
5446    // be an iOS or Android-based mobile device.
5447    //
5448    // There's currently no feasible way to actually detect whether a device has
5449    // a hardware keyboard, so this sniff will have to do. It can easily be
5450    // overridden by manually loading the autocomplete-list-keys module.
5451    //
5452    // Worth noting: even though iOS supports bluetooth keyboards, Mobile Safari
5453    // doesn't fire the keyboard events used by AutoCompleteList, so there's
5454    // no point loading the -keys module even when a bluetooth keyboard may be
5455    // available.
5456    return !(Y.UA.ios || Y.UA.android);
5457},
5458    "trigger": "autocomplete-list"
5459});
5460// dd-gestures
5461add('load', '2', {
5462    "name": "dd-gestures",
5463    "trigger": "dd-drag",
5464    "ua": "touchEnabled"
5465});
5466// dom-style-ie
5467add('load', '3', {
5468    "name": "dom-style-ie",
5469    "test": function (Y) {
5470
5471    var testFeature = Y.Features.test,
5472        addFeature = Y.Features.add,
5473        WINDOW = Y.config.win,
5474        DOCUMENT = Y.config.doc,
5475        DOCUMENT_ELEMENT = 'documentElement',
5476        ret = false;
5477
5478    addFeature('style', 'computedStyle', {
5479        test: function() {
5480            return WINDOW && 'getComputedStyle' in WINDOW;
5481        }
5482    });
5483
5484    addFeature('style', 'opacity', {
5485        test: function() {
5486            return DOCUMENT && 'opacity' in DOCUMENT[DOCUMENT_ELEMENT].style;
5487        }
5488    });
5489
5490    ret =  (!testFeature('style', 'opacity') &&
5491            !testFeature('style', 'computedStyle'));
5492
5493    return ret;
5494},
5495    "trigger": "dom-style"
5496});
5497// editor-para-ie
5498add('load', '4', {
5499    "name": "editor-para-ie",
5500    "trigger": "editor-para",
5501    "ua": "ie",
5502    "when": "instead"
5503});
5504// event-base-ie
5505add('load', '5', {
5506    "name": "event-base-ie",
5507    "test": function(Y) {
5508    var imp = Y.config.doc && Y.config.doc.implementation;
5509    return (imp && (!imp.hasFeature('Events', '2.0')));
5510},
5511    "trigger": "node-base"
5512});
5513// graphics-canvas
5514add('load', '6', {
5515    "name": "graphics-canvas",
5516    "test": function(Y) {
5517    var DOCUMENT = Y.config.doc,
5518        useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas",
5519		canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
5520        svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
5521    return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d"));
5522},
5523    "trigger": "graphics"
5524});
5525// graphics-canvas-default
5526add('load', '7', {
5527    "name": "graphics-canvas-default",
5528    "test": function(Y) {
5529    var DOCUMENT = Y.config.doc,
5530        useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas",
5531		canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
5532        svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
5533    return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d"));
5534},
5535    "trigger": "graphics"
5536});
5537// graphics-svg
5538add('load', '8', {
5539    "name": "graphics-svg",
5540    "test": function(Y) {
5541    var DOCUMENT = Y.config.doc,
5542        useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas",
5543		canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
5544        svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
5545
5546    return svg && (useSVG || !canvas);
5547},
5548    "trigger": "graphics"
5549});
5550// graphics-svg-default
5551add('load', '9', {
5552    "name": "graphics-svg-default",
5553    "test": function(Y) {
5554    var DOCUMENT = Y.config.doc,
5555        useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas",
5556		canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
5557        svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
5558
5559    return svg && (useSVG || !canvas);
5560},
5561    "trigger": "graphics"
5562});
5563// graphics-vml
5564add('load', '10', {
5565    "name": "graphics-vml",
5566    "test": function(Y) {
5567    var DOCUMENT = Y.config.doc,
5568		canvas = DOCUMENT && DOCUMENT.createElement("canvas");
5569    return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (!canvas || !canvas.getContext || !canvas.getContext("2d")));
5570},
5571    "trigger": "graphics"
5572});
5573// graphics-vml-default
5574add('load', '11', {
5575    "name": "graphics-vml-default",
5576    "test": function(Y) {
5577    var DOCUMENT = Y.config.doc,
5578		canvas = DOCUMENT && DOCUMENT.createElement("canvas");
5579    return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (!canvas || !canvas.getContext || !canvas.getContext("2d")));
5580},
5581    "trigger": "graphics"
5582});
5583// history-hash-ie
5584add('load', '12', {
5585    "name": "history-hash-ie",
5586    "test": function (Y) {
5587    var docMode = Y.config.doc && Y.config.doc.documentMode;
5588
5589    return Y.UA.ie && (!('onhashchange' in Y.config.win) ||
5590            !docMode || docMode < 8);
5591},
5592    "trigger": "history-hash"
5593});
5594// io-nodejs
5595add('load', '13', {
5596    "name": "io-nodejs",
5597    "trigger": "io-base",
5598    "ua": "nodejs"
5599});
5600// json-parse-shim
5601add('load', '14', {
5602    "name": "json-parse-shim",
5603    "test": function (Y) {
5604    var _JSON = Y.config.global.JSON,
5605        Native = Object.prototype.toString.call(_JSON) === '[object JSON]' && _JSON,
5606        nativeSupport = Y.config.useNativeJSONParse !== false && !!Native;
5607
5608    function workingNative( k, v ) {
5609        return k === "ok" ? true : v;
5610    }
5611
5612    // Double check basic functionality.  This is mainly to catch early broken
5613    // implementations of the JSON API in Firefox 3.1 beta1 and beta2
5614    if ( nativeSupport ) {
5615        try {
5616            nativeSupport = ( Native.parse( '{"ok":false}', workingNative ) ).ok;
5617        }
5618        catch ( e ) {
5619            nativeSupport = false;
5620        }
5621    }
5622
5623    return !nativeSupport;
5624},
5625    "trigger": "json-parse"
5626});
5627// json-stringify-shim
5628add('load', '15', {
5629    "name": "json-stringify-shim",
5630    "test": function (Y) {
5631    var _JSON = Y.config.global.JSON,
5632        Native = Object.prototype.toString.call(_JSON) === '[object JSON]' && _JSON,
5633        nativeSupport = Y.config.useNativeJSONStringify !== false && !!Native;
5634
5635    // Double check basic native functionality.  This is primarily to catch broken
5636    // early JSON API implementations in Firefox 3.1 beta1 and beta2.
5637    if ( nativeSupport ) {
5638        try {
5639            nativeSupport = ( '0' === Native.stringify(0) );
5640        } catch ( e ) {
5641            nativeSupport = false;
5642        }
5643    }
5644
5645
5646    return !nativeSupport;
5647},
5648    "trigger": "json-stringify"
5649});
5650// scrollview-base-ie
5651add('load', '16', {
5652    "name": "scrollview-base-ie",
5653    "trigger": "scrollview-base",
5654    "ua": "ie"
5655});
5656// selector-css2
5657add('load', '17', {
5658    "name": "selector-css2",
5659    "test": function (Y) {
5660    var DOCUMENT = Y.config.doc,
5661        ret = DOCUMENT && !('querySelectorAll' in DOCUMENT);
5662
5663    return ret;
5664},
5665    "trigger": "selector"
5666});
5667// transition-timer
5668add('load', '18', {
5669    "name": "transition-timer",
5670    "test": function (Y) {
5671    var DOCUMENT = Y.config.doc,
5672        node = (DOCUMENT) ? DOCUMENT.documentElement: null,
5673        ret = true;
5674
5675    if (node && node.style) {
5676        ret = !('MozTransition' in node.style || 'WebkitTransition' in node.style || 'transition' in node.style);
5677    }
5678
5679    return ret;
5680},
5681    "trigger": "transition"
5682});
5683// widget-base-ie
5684add('load', '19', {
5685    "name": "widget-base-ie",
5686    "trigger": "widget-base",
5687    "ua": "ie"
5688});
5689// yql-jsonp
5690add('load', '20', {
5691    "name": "yql-jsonp",
5692    "test": function (Y) {
5693    /* Only load the JSONP module when not in nodejs or winjs
5694    TODO Make the winjs module a CORS module
5695    */
5696    return (!Y.UA.nodejs && !Y.UA.winjs);
5697},
5698    "trigger": "yql"
5699});
5700// yql-nodejs
5701add('load', '21', {
5702    "name": "yql-nodejs",
5703    "trigger": "yql",
5704    "ua": "nodejs"
5705});
5706// yql-winjs
5707add('load', '22', {
5708    "name": "yql-winjs",
5709    "trigger": "yql",
5710    "ua": "winjs"
5711});
5712
5713}, 'patched-v3.18.7', {"requires": ["yui-base"]});
5714YUI.add('intl-base', function (Y, NAME) {
5715
5716/**
5717 * The Intl utility provides a central location for managing sets of
5718 * localized resources (strings and formatting patterns).
5719 *
5720 * @class Intl
5721 * @uses EventTarget
5722 * @static
5723 */
5724
5725var SPLIT_REGEX = /[, ]/;
5726
5727Y.mix(Y.namespace('Intl'), {
5728
5729 /**
5730    * Returns the language among those available that
5731    * best matches the preferred language list, using the Lookup
5732    * algorithm of BCP 47.
5733    * If none of the available languages meets the user's preferences,
5734    * then "" is returned.
5735    * Extended language ranges are not supported.
5736    *
5737    * @method lookupBestLang
5738    * @param {String[] | String} preferredLanguages The list of preferred
5739    * languages in descending preference order, represented as BCP 47
5740    * language tags. A string array or a comma-separated list.
5741    * @param {String[]} availableLanguages The list of languages
5742    * that the application supports, represented as BCP 47 language
5743    * tags.
5744    *
5745    * @return {String} The available language that best matches the
5746    * preferred language list, or "".
5747    * @since 3.1.0
5748    */
5749    lookupBestLang: function(preferredLanguages, availableLanguages) {
5750
5751        var i, language, result, index;
5752
5753        // check whether the list of available languages contains language;
5754        // if so return it
5755        function scan(language) {
5756            var i;
5757            for (i = 0; i < availableLanguages.length; i += 1) {
5758                if (language.toLowerCase() ===
5759                            availableLanguages[i].toLowerCase()) {
5760                    return availableLanguages[i];
5761                }
5762            }
5763        }
5764
5765        if (Y.Lang.isString(preferredLanguages)) {
5766            preferredLanguages = preferredLanguages.split(SPLIT_REGEX);
5767        }
5768
5769        for (i = 0; i < preferredLanguages.length; i += 1) {
5770            language = preferredLanguages[i];
5771            if (!language || language === '*') {
5772                continue;
5773            }
5774            // check the fallback sequence for one language
5775            while (language.length > 0) {
5776                result = scan(language);
5777                if (result) {
5778                    return result;
5779                } else {
5780                    index = language.lastIndexOf('-');
5781                    if (index >= 0) {
5782                        language = language.substring(0, index);
5783                        // one-character subtags get cut along with the
5784                        // following subtag
5785                        if (index >= 2 && language.charAt(index - 2) === '-') {
5786                            language = language.substring(0, index - 2);
5787                        }
5788                    } else {
5789                        // nothing available for this language
5790                        break;
5791                    }
5792                }
5793            }
5794        }
5795
5796        return '';
5797    }
5798});
5799
5800
5801}, 'patched-v3.18.7', {"requires": ["yui-base"]});
5802YUI.add('yui-log', function (Y, NAME) {
5803
5804/**
5805 * Provides console log capability and exposes a custom event for
5806 * console implementations. This module is a `core` YUI module,
5807 * <a href="../classes/YUI.html#method_log">it's documentation is located under the YUI class</a>.
5808 *
5809 * @module yui
5810 * @submodule yui-log
5811 */
5812
5813var INSTANCE = Y,
5814    LOGEVENT = 'yui:log',
5815    UNDEFINED = 'undefined',
5816    LEVELS = { debug: 1,
5817               info: 2,
5818               warn: 4,
5819               error: 8 };
5820
5821/**
5822 * If the 'debug' config is true, a 'yui:log' event will be
5823 * dispatched, which the Console widget and anything else
5824 * can consume.  If the 'useBrowserConsole' config is true, it will
5825 * write to the browser console if available.  YUI-specific log
5826 * messages will only be present in the -debug versions of the
5827 * JS files.  The build system is supposed to remove log statements
5828 * from the raw and minified versions of the files.
5829 *
5830 * @method log
5831 * @for YUI
5832 * @param  {String}  msg  The message to log.
5833 * @param  {String}  cat  The log category for the message.  Default
5834 *                        categories are "info", "warn", "error", "debug".
5835 *                        Custom categories can be used as well. (opt).
5836 * @param  {String}  src  The source of the the message (opt).
5837 * @param  {boolean} silent If true, the log event won't fire.
5838 * @return {YUI}      YUI instance.
5839 */
5840INSTANCE.log = function(msg, cat, src, silent) {
5841    var bail, excl, incl, m, f, minlevel,
5842        Y = INSTANCE,
5843        c = Y.config,
5844        publisher = (Y.fire) ? Y : YUI.Env.globalEvents;
5845    // suppress log message if the config is off or the event stack
5846    // or the event call stack contains a consumer of the yui:log event
5847    if (c.debug) {
5848        // apply source filters
5849        src = src || "";
5850        if (typeof src !== "undefined") {
5851            excl = c.logExclude;
5852            incl = c.logInclude;
5853            if (incl && !(src in incl)) {
5854                bail = 1;
5855            } else if (incl && (src in incl)) {
5856                bail = !incl[src];
5857            } else if (excl && (src in excl)) {
5858                bail = excl[src];
5859            }
5860
5861            // Set a default category of info if the category was not defined.
5862            if ((typeof cat === 'undefined')) {
5863                cat = 'info';
5864            }
5865
5866            // Determine the current minlevel as defined in configuration
5867            Y.config.logLevel = Y.config.logLevel || 'debug';
5868            minlevel = LEVELS[Y.config.logLevel.toLowerCase()];
5869
5870            if (cat in LEVELS && LEVELS[cat] < minlevel) {
5871                // Skip this message if the we don't meet the defined minlevel
5872                bail = 1;
5873            }
5874        }
5875        if (!bail) {
5876            if (c.useBrowserConsole) {
5877                m = (src) ? src + ': ' + msg : msg;
5878                if (Y.Lang.isFunction(c.logFn)) {
5879                    c.logFn.call(Y, msg, cat, src);
5880                } else if (typeof console !== UNDEFINED && console.log) {
5881                    f = (cat && console[cat] && (cat in LEVELS)) ? cat : 'log';
5882                    console[f](m);
5883                } else if (typeof opera !== UNDEFINED) {
5884                    opera.postError(m);
5885                }
5886            }
5887
5888            if (publisher && !silent) {
5889
5890                if (publisher === Y && (!publisher.getEvent(LOGEVENT))) {
5891                    publisher.publish(LOGEVENT, {
5892                        broadcast: 2
5893                    });
5894                }
5895
5896                publisher.fire(LOGEVENT, {
5897                    msg: msg,
5898                    cat: cat,
5899                    src: src
5900                });
5901            }
5902        }
5903    }
5904
5905    return Y;
5906};
5907
5908/**
5909 * Write a system message.  This message will be preserved in the
5910 * minified and raw versions of the YUI files, unlike log statements.
5911 * @method message
5912 * @for YUI
5913 * @param  {String}  msg  The message to log.
5914 * @param  {String}  cat  The log category for the message.  Default
5915 *                        categories are "info", "warn", "error", "debug".
5916 *                        Custom categories can be used as well. (opt).
5917 * @param  {String}  src  The source of the the message (opt).
5918 * @param  {boolean} silent If true, the log event won't fire.
5919 * @return {YUI}      YUI instance.
5920 */
5921INSTANCE.message = function() {
5922    return INSTANCE.log.apply(INSTANCE, arguments);
5923};
5924
5925
5926}, 'patched-v3.18.7', {"requires": ["yui-base"]});
5927YUI.add('yui-later', function (Y, NAME) {
5928
5929/**
5930 * Provides a setTimeout/setInterval wrapper. This module is a `core` YUI module,
5931 * <a href="../classes/YUI.html#method_later">
5931it's documentation is located under the YUI class</a>.
5932 *
5933 * @module yui
5934 * @submodule yui-later
5935 */
5936
5937var NO_ARGS = [];
5938
5939/**
5940 * Executes the supplied function in the context of the supplied
5941 * object 'when' milliseconds later.  Executes the function a
5942 * single time unless periodic is set to true.
5943 * @for YUI
5944 * @method later
5945 * @param when {Number} the number of milliseconds to wait until the fn
5946 * is executed.
5947 * @param o the context object.
5948 * @param fn {Function|String} the function to execute or the name of
5949 * the method in the 'o' object to execute.
5950 * @param data [Array] data that is provided to the function.  This
5951 * accepts either a single item or an array.  If an array is provided,
5952 * the function is executed with one parameter for each array item.
5953 * If you need to pass a single array parameter, it needs to be wrapped
5954 * in an array [myarray].
5955 *
5956 * Note: native methods in IE may not have the call and apply methods.
5957 * In this case, it will work, but you are limited to four arguments.
5958 *
5959 * @param periodic {boolean} if true, executes continuously at supplied
5960 * interval until canceled.
5961 * @return {object} a timer object. Call the cancel() method on this
5962 * object to stop the timer.
5963 */
5964Y.later = function(when, o, fn, data, periodic) {
5965    when = when || 0;
5966    data = (!Y.Lang.isUndefined(data)) ? Y.Array(data) : NO_ARGS;
5967    o = o || Y.config.win || Y;
5968
5969    var cancelled = false,
5970        method = (o && Y.Lang.isString(fn)) ? o[fn] : fn,
5971        wrapper = function() {
5972            // IE 8- may execute a setInterval callback one last time
5973            // after clearInterval was called, so in order to preserve
5974            // the cancel() === no more runny-run, we have to jump through
5975            // an extra hoop.
5976            if (!cancelled) {
5977                if (!method.apply) {
5978                    method(data[0], data[1], data[2], data[3]);
5979                } else {
5980                    method.apply(o, data || NO_ARGS);
5981                }
5982            }
5983        },
5984        id = (periodic) ? setInterval(wrapper, when) : setTimeout(wrapper, when);
5985
5986    return {
5987        id: id,
5988        interval: periodic,
5989        cancel: function() {
5990            cancelled = true;
5991            if (this.interval) {
5992                clearInterval(id);
5993            } else {
5994                clearTimeout(id);
5995            }
5996        }
5997    };
5998};
5999
6000Y.Lang.later = Y.later;
6001
6002
6003
6004}, 'patched-v3.18.7', {"requires": ["yui-base"]});
6005YUI.add('loader-base', function (Y, NAME) {
6006
6007/**
6008 * The YUI loader core
6009 * @module loader
6010 * @submodule loader-base
6011 */
6012
6013(function() {
6014    var VERSION = Y.version,
6015        BUILD = '/build/',
6016        ROOT = VERSION + '/',
6017        CDN_BASE = Y.Env.base,
6018        GALLERY_VERSION = 'gallery-2014.06.04-21-38',
6019        TNT = '2in3',
6020        TNT_VERSION = '4',
6021        YUI2_VERSION = '2.9.0',
6022        COMBO_BASE = CDN_BASE + 'combo?',
6023        META = {
6024            version: VERSION,
6025            root: ROOT,
6026            base: Y.Env.base,
6027            comboBase: COMBO_BASE,
6028            skin: {
6029                defaultSkin: 'sam',
6030                base: 'assets/skins/',
6031                path: 'skin.css',
6032                after: [
6033                    'cssreset',
6034                    'cssfonts',
6035                    'cssgrids',
6036                    'cssbase',
6037                    'cssreset-context',
6038                    'cssfonts-context'
6039                ]
6040            },
6041            groups: {},
6042            patterns: {}
6043        },
6044        groups = META.groups,
6045        yui2Update = function(tnt, yui2, config) {
6046            var root = TNT + '.' +
6047                    (tnt || TNT_VERSION) + '/' +
6048                    (yui2 || YUI2_VERSION) + BUILD,
6049                base = (config && config.base) ? config.base : CDN_BASE,
6050                combo = (config && config.comboBase) ? config.comboBase : COMBO_BASE;
6051
6052            groups.yui2.base = base + root;
6053            groups.yui2.root = root;
6054            groups.yui2.comboBase = combo;
6055        },
6056        galleryUpdate = function(tag, config) {
6057            var root = (tag || GALLERY_VERSION) + BUILD,
6058                base = (config && config.base) ? config.base : CDN_BASE,
6059                combo = (config && config.comboBase) ? config.comboBase : COMBO_BASE;
6060
6061            groups.gallery.base = base + root;
6062            groups.gallery.root = root;
6063            groups.gallery.comboBase = combo;
6064        };
6065
6066
6067    groups[VERSION] = {};
6068
6069    groups.gallery = {
6070        ext: false,
6071        combine: true,
6072        comboBase: COMBO_BASE,
6073        update: galleryUpdate,
6074        patterns: {
6075            'gallery-': {},
6076            'lang/gallery-': {},
6077            'gallerycss-': {
6078                type: 'css'
6079            }
6080        }
6081    };
6082
6083    groups.yui2 = {
6084        combine: true,
6085        ext: false,
6086        comboBase: COMBO_BASE,
6087        update: yui2Update,
6088        patterns: {
6089            'yui2-': {
6090                configFn: function(me) {
6091                    if (/-skin|reset|fonts|grids|base/.test(me.name)) {
6092                        me.type = 'css';
6093                        me.path = me.path.replace(/\.js/, '.css');
6094                        // this makes skins in builds earlier than
6095                        // 2.6.0 work as long as combine is false
6096                        me.path = me.path.replace(/\/yui2-skin/,
6097                                            '/assets/skins/sam/yui2-skin');
6098                    }
6099                }
6100            }
6101        }
6102    };
6103
6104    galleryUpdate();
6105    yui2Update();
6106
6107    if (YUI.Env[VERSION]) {
6108        Y.mix(META, YUI.Env[VERSION], false, [
6109            'modules',
6110            'groups',
6111            'skin'
6112        ], 0, true);
6113    }
6114
6115    YUI.Env[VERSION] = META;
6116}());
6117/*jslint forin: true, maxlen: 350 */
6118
6119/**
6120 * Loader dynamically loads script and css files.  It includes the dependency
6121 * information for the version of the library in use, and will automatically pull in
6122 * dependencies for the modules requested. It can also load the
6123 * files from the Yahoo! CDN, and it can utilize the combo service provided on
6124 * this network to reduce the number of http connections required to download
6125 * YUI files.
6126 *
6127 * @module loader
6128 * @main loader
6129 * @submodule loader-base
6130 */
6131
6132var NOT_FOUND = {},
6133    NO_REQUIREMENTS = [],
6134    MAX_URL_LENGTH = 1024,
6135    GLOBAL_ENV = YUI.Env,
6136    GLOBAL_LOADED = GLOBAL_ENV._loaded,
6137    CSS = 'css',
6138    JS = 'js',
6139    INTL = 'intl',
6140    DEFAULT_SKIN = 'sam',
6141    VERSION = Y.version,
6142    ROOT_LANG = '',
6143    YObject = Y.Object,
6144    oeach = YObject.each,
6145    yArray = Y.Array,
6146    _queue = GLOBAL_ENV._loaderQueue,
6147    META = GLOBAL_ENV[VERSION],
6148    SKIN_PREFIX = 'skin-',
6149    L = Y.Lang,
6150    ON_PAGE = GLOBAL_ENV.mods,
6151    modulekey,
6152    _path = function(dir, file, type, nomin) {
6153        var path = dir + '/' + file;
6154        if (!nomin) {
6155            path += '-min';
6156        }
6157        path += '.' + (type || CSS);
6158
6159        return path;
6160    };
6161
6162
6163    if (!YUI.Env._cssLoaded) {
6164        YUI.Env._cssLoaded = {};
6165    }
6166
6167
6168/**
6169 * The component metadata is stored in Y.Env.meta.
6170 * Part of the loader module.
6171 * @property meta
6172 * @for YUI
6173 */
6174Y.Env.meta = META;
6175
6176/**
6177 * Loader dynamically loads script and css files.  It includes the dependency
6178 * info for the version of the library in use, and will automatically pull in
6179 * dependencies for the modules requested. It can load the
6180 * files from the Yahoo! CDN, and it can utilize the combo service provided on
6181 * this network to reduce the number of http connections required to download
6182 * YUI files. You can also specify an external, custom combo service to host
6183 * your modules as well.
6184
6185        var Y = YUI();
6186        var loader = new Y.Loader({
6187            filter: 'debug',
6188            base: '../../',
6189            root: 'build/',
6190            combine: true,
6191            require: ['node', 'dd', 'console']
6192        });
6193        var out = loader.resolve(true);
6194
6195 * If the Loader needs to be patched before it is used for the first time, it
6196 * should be done through the `doBeforeLoader` hook. Simply make the patch
6197 * available via configuration before YUI is loaded:
6198
6199        YUI_config = YUI_config || {};
6200        YUI_config.doBeforeLoader = function (config) {
6201            var resolve = this.context.Loader.prototype.resolve;
6202            this.context.Loader.prototype.resolve = function () {
6203                // do something here
6204                return resolve.apply(this, arguments);
6205            };
6206        };
6207
6208 * @constructor
6209 * @class Loader
6210 * @param {Object} config an optional set of configuration options.
6211 * @param {String} config.base The base dir which to fetch this module from
6212 * @param {String} config.comboBase The Combo service base path. Ex: `http://yui.yahooapis.com/combo?`
6213 * @param {String} config.root The root path to prepend to module names for the combo service. Ex: `2.5.2/build/`
6214 * @param {String|Object} config.filter A filter to apply to result urls. <a href="#property_filter">See filter property</a>
6215 * @param {Object} config.filters Per-component filter specification.  If specified for a given component, this overrides the filter config.
6216 * @param {Boolean} config.combine Use a combo service to reduce the number of http connections required to load your dependencies
6217 * @param {Boolean} [config.async=true] Fetch files in async
6218 * @param {Array} config.ignore: A list of modules that should never be dynamically loaded
6219 * @param {Array} config.force A list of modules that should always be loaded when required, even if already present on the page
6220 * @param {HTMLElement|String} config.insertBefore Node or id for a node that should be used as the insertion point for new nodes
6221 * @param {Object} config.jsAttributes Object literal containing attributes to add to script nodes
6222 * @param {Object} config.cssAttributes Object literal containing attributes to add to link nodes
6223 * @param {Number} config.timeout The number of milliseconds before a timeout occurs when dynamically loading nodes.  If not set, there is no timeout
6224 * @param {Object} config.context Execution context for all callbacks
6225 * @param {Function} config.onSuccess Callback for the 'success' event
6226 * @param {Function} config.onFailure Callback for the 'failure' event
6227 * @param {Function} config.onTimeout Callback for the 'timeout' event
6228 * @param {Function} config.onProgress Callback executed each time a script or css file is loaded
6229 * @param {Object} config.modules A list of module definitions.  See <a href="#method_addModule">Loader.addModule</a> for the supported module metadata
6230 * @param {Object} config.groups A list of group definitions.  Each group can contain specific definitions for `base`, `comboBase`, `combine`, and accepts a list of `modules`.
6231 * @param {String} config.2in3 The version of the YUI 2 in 3 wrapper to use.  The intrinsic support for YUI 2 modules in YUI 3 relies on versions of the YUI 2 components inside YUI 3 module wrappers.  These wrappers change over time to accomodate the issues that arise from running YUI 2 in a YUI 3 sandbox.
6232 * @param {String} config.yui2 When using the 2in3 project, you can select the version of YUI 2 to use.  V
6232alid values are `2.2.2`, `2.3.1`, `2.4.1`, `2.5.2`, `2.6.0`, `2.7.0`, `2.8.0`, `2.8.1` and `2.9.0` [default] -- plus all versions of YUI 2 going forward.
6233 * @param {Function} config.doBeforeLoader An optional hook that allows for the patching of the loader instance. The `Y` instance is available as `this.context` and the only argument to the function is the Loader configuration object.
6234 */
6235Y.Loader = function(o) {
6236
6237    var self = this;
6238
6239    //Catch no config passed.
6240    o = o || {};
6241
6242    modulekey = META.md5;
6243
6244    /**
6245     * Internal callback to handle multiple internal insert() calls
6246     * so that css is inserted prior to js
6247     * @property _internalCallback
6248     * @private
6249     */
6250    // self._internalCallback = null;
6251
6252    /**
6253     * Callback that will be executed when the loader is finished
6254     * with an insert
6255     * @method onSuccess
6256     * @type function
6257     */
6258    // self.onSuccess = null;
6259
6260    /**
6261     * Callback that will be executed if there is a failure
6262     * @method onFailure
6263     * @type function
6264     */
6265    // self.onFailure = null;
6266
6267    /**
6268     * Callback executed each time a script or css file is loaded
6269     * @method onProgress
6270     * @type function
6271     */
6272    // self.onProgress = null;
6273
6274    /**
6275     * Callback that will be executed if a timeout occurs
6276     * @method onTimeout
6277     * @type function
6278     */
6279    // self.onTimeout = null;
6280
6281    /**
6282     * The execution context for all callbacks
6283     * @property context
6284     * @default {YUI} the YUI instance
6285     */
6286    self.context = Y;
6287
6288    // Hook that allows the patching of loader
6289    if (o.doBeforeLoader) {
6290        o.doBeforeLoader.apply(self, arguments);
6291    }
6292
6293    /**
6294     * Data that is passed to all callbacks
6295     * @property data
6296     */
6297    // self.data = null;
6298
6299    /**
6300     * Node reference or id where new nodes should be inserted before
6301     * @property insertBefore
6302     * @type string|HTMLElement
6303     */
6304    // self.insertBefore = null;
6305
6306    /**
6307     * The charset attribute for inserted nodes
6308     * @property charset
6309     * @type string
6310     * @deprecated , use cssAttributes or jsAttributes.
6311     */
6312    // self.charset = null;
6313
6314    /**
6315     * An object literal containing attributes to add to link nodes
6316     * @property cssAttributes
6317     * @type object
6318     */
6319    // self.cssAttributes = null;
6320
6321    /**
6322     * An object literal containing attributes to add to script nodes
6323     * @property jsAttributes
6324     * @type object
6325     */
6326    // self.jsAttributes = null;
6327
6328    /**
6329     * The base directory.
6330     * @property base
6331     * @type string
6332     * @default http://yui.yahooapis.com/[YUI VERSION]/build/
6333     */
6334    self.base = Y.Env.meta.base + Y.Env.meta.root;
6335
6336    /**
6337     * Base path for the combo service
6338     * @property comboBase
6339     * @type string
6340     * @default http://yui.yahooapis.com/combo?
6341     */
6342    self.comboBase = Y.Env.meta.comboBase;
6343
6344    /*
6345     * Base path for language packs.
6346     */
6347    // self.langBase = Y.Env.meta.langBase;
6348    // self.lang = "";
6349
6350    /**
6351     * If configured, the loader will attempt to use the combo
6352     * service for YUI resources and configured external resources.
6353     * @property combine
6354     * @type boolean
6355     * @default true if a base dir isn't in the config
6356     */
6357    self.combine = o.base &&
6358        (o.base.indexOf(self.comboBase.substr(0, 20)) > -1);
6359
6360    /**
6361    * The default seperator to use between files in a combo URL
6362    * @property comboSep
6363    * @type {String}
6364    * @default Ampersand
6365    */
6366    self.comboSep = '&';
6367    /**
6368     * Max url length for combo urls.  The default is 1024. This is the URL
6369     * limit for the Yahoo! hosted combo servers.  If consuming
6370     * a different combo service that has a different URL limit
6371     * it is possible to override this default by supplying
6372     * the maxURLLength config option.  The config option will
6373     * only take effect if lower than the default.
6374     *
6375     * @property maxURLLength
6376     * @type int
6377     */
6378    self.maxURLLength = MAX_URL_LENGTH;
6379
6380    /**
6381     * Ignore modules registered on the YUI global
6382     * @property ignoreRegistered
6383     * @default false
6384     */
6385    self.ignoreRegistered = o.ignoreRegistered;
6386
6387    /**
6388     * Root path to prepend to module path for the combo
6389     * service
6390     * @property root
6391     * @type string
6392     * @default [YUI VERSION]/build/
6393     */
6394    self.root = Y.Env.meta.root;
6395
6396    /**
6397     * Timeout value in milliseconds.  If set, self value will be used by
6398     * the get utility.  the timeout event will fire if
6399     * a timeout occurs.
6400     * @property timeout
6401     * @type int
6402     */
6403    self.timeout = 0;
6404
6405    /**
6406     * A list of modules that should not be loaded, even if
6407     * they turn up in the dependency tree
6408     * @property ignore
6409     * @type string[]
6410     */
6411    // self.ignore = null;
6412
6413    /**
6414     * A list of modules that should always be loaded, even
6415     * if they have already been inserted into the page.
6416     * @property force
6417     * @type string[]
6418     */
6419    // self.force = null;
6420
6421    self.forceMap = {};
6422
6423    /**
6424     * Should we allow rollups
6425     * @property allowRollup
6426     * @type boolean
6427     * @default false
6428     */
6429    self.allowRollup = false;
6430
6431    /**
6432     * A filter to apply to result urls.  This filter will modify the default
6433     * path for all modules.  The default path for the YUI library is the
6434     * minified version of the files (e.g., event-min.js).  The filter property
6435     * can be a predefined filter or a custom filter.  The valid predefined
6436     * filters are:
6437     * <dl>
6438     *  <dt>DEBUG</dt>
6439     *  <dd>Selects the debug versions of the library (e.g., event-debug.js).
6440     *      This option will automatically include the Logger widget</dd>
6441     *  <dt>RAW</dt>
6442     *  <dd>Selects the non-minified version of the library (e.g., event.js).
6443     *  </dd>
6444     * </dl>
6445     * You can also define a custom filter, which must be an object literal
6446     * containing a search expression and a replace string:
6447     *
6448     *      myFilter: {
6449     *          'searchExp': "-min\\.js",
6450     *          'replaceStr': "-debug.js"
6451     *      }
6452     *
6453     * @property filter
6454     * @type string| {searchExp: string, replaceStr: string}
6455     */
6456    // self.filter = null;
6457
6458    /**
6459     * per-component filter specification.  If specified for a given
6460     * component, this overrides the filter config.
6461     * @property filters
6462     * @type object
6463     */
6464    self.filters = {};
6465
6466    /**
6467     * The list of requested modules
6468     * @property required
6469     * @type {string: boolean}
6470     */
6471    self.required = {};
6472
6473    /**
6474     * If a module name is predefined when requested, it is checked againsts
6475     * the patterns provided in this property.  If there is a match, the
6476     * module is added with the default configuration.
6477     *
6478     * At the moment only supporting module prefixes, but anticipate
6479     * supporting at least regular expressions.
6480     * @property patterns
6481     * @type Object
6482     */
6483    // self.patterns = Y.merge(Y.Env.meta.patterns);
6484    self.patterns = {};
6485
6486    /**
6487     * Internal loader instance metadata. Use accessor `getModuleInfo()` instead.
6488     */
6489    self.moduleInfo = {};
6490
6491    self.groups = Y.merge(Y.Env.meta.groups);
6492
6493    /**
6494     * Provides the information used to skin the skinnable components.
6495     * The following skin definition would result in 'skin1' and 'skin2'
6496     * being loaded for calendar (if calendar was requested), and
6497     * 'sam' for all other skinnable components:
6498     *
6499     *      skin: {
6500     *          // The default skin, which is automatically applied if not
6501     *          // overriden by a component-specific skin definition.
6502     *          // Change this in to apply a different skin globally
6503     *          defaultSkin: 'sam',
6504     *
6505     *          // This is combined with the loader base property to get
6506     *          // the default root directory for a skin. ex:
6507     *          // http://yui.yahooapis.com/2.3.0/build/assets/skins/sam/
6508     *          base: 'assets/skins/',
6509     *
6510     *          // Any component-specific overrides can be specified here,
6511     *          // making it possible to load different skins for different
6512     *          // components.  It is possible to load more than one skin
6513     *          // for a given component as well.
6514     *          overrides: {
6515     *              calendar: ['skin1', 'skin2']
6516     *          }
6517     *      }
6518     * @property skin
6519     * @type {Object}
6520     */
6521    self.skin = Y.merge(Y.Env.meta.skin);
6522
6523    /*
6524     * Map of conditional modules
6525     * @since 3.2.0
6526     */
6527    self.conditions = {};
6528
6529    // map of modules with a hash of modules that meet the requirement
6530    // self.provides = {};
6531
6532    self.config = o;
6533    self._internal = true;
6534
6535    self._populateConditionsCache();
6536
6537    /**
6538     * Set when beginning to compute the dependency tree.
6539     * Composed of what YUI reports to be loaded combined
6540     * with what has been loaded by any instance on the page
6541     * with the version number specified in the metadata.
6542     * @property loaded
6543     * @type {string: boolean}
6544     */
6545    self.loaded = GLOBAL_LOADED[VERSION];
6546
6547
6548    /**
6549    * Should Loader fetch scripts in `async`, defaults to `true`
6550    * @property async
6551    */
6552
6553    self.async = true;
6554
6555    self._inspectPage();
6556
6557    self._internal = false;
6558
6559    self._config(o);
6560
6561    self.forceMap = (self.force) ? Y.Array.hash(self.force) : {};
6562
6563    self.testresults = null;
6564
6565    if (Y.config.tests) {
6566        self.testresults = Y.config.tests;
6567    }
6568
6569    /**
6570     * List of rollup files found in the library metadata
6571     * @property rollups
6572     */
6573    // self.rollups = null;
6574
6575    /**
6576     * Whether or not to load optional dependencies for
6577     * the requested modules
6578     * @property loadOptional
6579     * @type boolean
6580     * @default false
6581     */
6582    // self.loadOptional = false;
6583
6584    /**
6585     * All of the derived dependencies in sorted order, which
6586     * will be populated when either calculate() or insert()
6587     * is called
6588     * @property sorted
6589     * @type string[]
6590     */
6591    self.sorted = [];
6592
6593    /*
6594     * A list of modules to attach to the YUI instance when complete.
6595     * If not supplied, the sorted list of dependencies are applied.
6596     * @property attaching
6597     */
6598    // self.attaching = null;
6599
6600    /**
6601     * Flag to indicate the dependency tree needs to be recomputed
6602     * if insert is called again.
6603     * @property dirty
6604     * @type boolean
6605     * @default true
6606     */
6607    self.dirty = true;
6608
6609    /**
6610     * List of modules inserted by the utility
6611     * @property inserted
6612     * @type {string: boolean}
6613     */
6614    self.inserted = {};
6615
6616    /**
6617     * List of skipped modules during insert() because the module
6618     * was not defined
6619     * @property skipped
6620     */
6621    self.skipped = {};
6622
6623    // Y.on('yui:load', self.loadNext, self);
6624
6625    self.tested = {};
6626
6627    /*
6628     * Cached sorted calculate results
6629     * @property results
6630     * @since 3.2.0
6631     */
6632    //self.results = {};
6633
6634    if (self.ignoreRegistered) {
6635        //Clear inpage already processed modules.
6636        self._resetModules();
6637    }
6638
6639};
6640
6641Y.Loader.prototype = {
6642    /**
6643    * Gets the module info from the local moduleInfo hash, or from the
6644    * default metadata and populate the local moduleInfo hash.
6645    * @method getModuleInfo
6646    * @param {string} name of the module
6647    * @public
6648    */
6649    getModuleInfo: function(name) {
6650
6651        var m = this.moduleInfo[name],
6652            rawMetaModules, globalRenderedMods, internal, v;
6653
6654        if (m) {
6655            return m;
6656        }
6657
6658        rawMetaModules = META.modules;
6659        globalRenderedMods = GLOBAL_ENV._renderedMods;
6660        internal = this._internal;
6661
6662        /*
6663        The logic here is:
6664
6665        - if the `moduleInfo[name]` is avilable,
6666          then short circuit
6667        - otherwise, if the module is in the globalCache (cross Y instance),
6668          then port it from the global registry into `moduleInfo[name]`
6669        - otherwise, if the module has raw metadata (from meta modules)
6670          then add it to the global registry and to `moduleInfo[name]`
6671
6672        */
6673        if (globalRenderedMods && globalRenderedMods.hasOwnProperty(name) && !this.ignoreRegistered) {
6674            this.moduleInfo[name] = Y.merge(globalRenderedMods[name]);
6675        } else {
6676            if (rawMetaModules.hasOwnProperty(name)) {
6677                this._internal = true; // making sure that modules from raw data are marked as internal
6678                v = this.addModule(rawMetaModules[name], name);
6679                // Inspect the page for the CSS module and mark it as loaded.
6680                if (v && v.type === CSS) {
6681                    if (this.isCSSLoaded(v.name, true)) {
6682                        this.loaded[v.name] = true;
6683                    }
6684                }
6685                this._internal = internal;
6686            }
6687        }
6688        return this.moduleInfo[name];
6689    },
6690    /**
6691    * Expand the names that are aliases to other modules.
6692    * @method _expandAliases
6693    * @param {string[]} list a module name or a list of names to be expanded
6694    * @private
6695    * @return {array}
6696    */
6697    _expandAliases: function(list) {
6698        var expanded = [],
6699            aliases = YUI.Env.aliases,
6700            i, name;
6701        list = Y.Array(list);
6702        for (i = 0; i < list.length; i += 1) {
6703            name = list[i];
6704            expanded.push.apply(expanded, aliases[name] ? aliases[name] : [name]);
6705        }
6706        return expanded;
6707    },
6708    /**
6709    * Populate the conditions cache from raw modules, this is necessary
6710    * because no other module will require a conditional module, instead
6711    * the condition has to be executed and then the module is analyzed
6712    * to be included in the final requirement list. Without this cache
6713    * conditional modules will be simply ignored.
6714    * @method _populateConditionsCache
6715    * @private
6716    */
6717    _populateConditionsCache: function() {
6718        var rawMetaModules = META.modules,
6719            cache = GLOBAL_ENV._conditions,
6720            i, j, t, trigger;
6721
6722        // if we have conditions in cache and cache is enabled
6723        // we should port them to this loader instance
6724        if (cache && !this.ignoreRegistered) {
6725            for (i in cache) {
6726                if (cache.hasOwnProperty(i)) {
6727                    this.conditions[i] = Y.merge(cache[i]);
6728                }
6729            }
6730        } else {
6731            for (i in rawMetaModules) {
6732                if (rawMetaModules.hasOwnProperty(i) && rawMetaModules[i].condition) {
6733                    t = this._expandAliases(rawMetaModules[i].condition.trigger);
6734                    for (j = 0; j < t.length; j += 1) {
6735                        trigger = t[j];
6736                        this.conditions[trigger] = this.conditions[trigger] || {};
6737                        this.conditions[trigger][rawMetaModules[i].name || i] = rawMetaModules[i].condition;
6738                    }
6739                }
6740            }
6741            GLOBAL_ENV._conditions = this.conditions;
6742        }
6743    },
6744    /**
6745    * Reset modules in the module cache to a pre-processed state so additional
6746    * computations with a different skin or language will work as expected.
6747    * @method _resetModules
6748    * @private
6749    */
6750    _resetModules: function() {
6751        var self = this, i, o,
6752            mod, name, details;
6753        for (i in self.moduleInfo) {
6754            if (self.moduleInfo.hasOwnProperty(i) && self.moduleInfo[i]) {
6755                mod = self.moduleInfo[i];
6756                name = mod.name;
6757                details  = (YUI.Env.mods[name] ? YUI.Env.mods[name].details : null);
6758
6759                if (details) {
6760                    self.moduleInfo[name]._reset = true;
6761                    self.moduleInfo[name].requires = details.requires || [];
6762                    self.moduleInfo[name].optional = details.optional || [];
6763                    self.moduleInfo[name].supersedes = details.supercedes || [];
6764                }
6765
6766                if (mod.defaults) {
6767                    for (o in mod.defaults) {
6768                        if (mod.defaults.hasOwnProperty(o)) {
6769                            if (mod[o]) {
6770                                mod[o] = mod.defaults[o];
6771                            }
6772                        }
6773                    }
6774                }
6775                mod.langCache = undefined;
6776                mod.skinCache = undefined;
6777                if (mod.skinnable) {
6778                    self._addSkin(self.skin.defaultSkin, mod.name);
6779                }
6780            }
6781        }
6782    },
6783    /**
6784    Regex that matches a CSS URL. Used to guess the file type when it's not
6785    specified.
6786
6787    @property REGEX_CSS
6788    @type RegExp
6789    @final
6790    @protected
6791    @since 3.5.0
6792    **/
6793    REGEX_CSS: /\.css(?:[?;].*)?$/i,
6794
6795    /**
6796    * Default filters for raw and debug
6797    * @property FILTER_DEFS
6798    * @type Object
6799    * @final
6800    * @protected
6801    */
6802    FILTER_DEFS: {
6803        RAW: {
6804            'searchExp': '-min\\.js',
6805            'replaceStr': '.js'
6806        },
6807        DEBUG: {
6808            'searchExp': '-min\\.js',
6809            'replaceStr': '-debug.js'
6810        },
6811        COVERAGE: {
6812            'searchExp': '-min\\.js',
6813            'replaceStr': '-coverage.js'
6814        }
6815    },
6816    /*
6817    * Check the pages meta-data and cache the result.
6818    * @method _inspectPage
6819    * @private
6820    */
6821    _inspectPage: function() {
6822        var self = this, v, m, req, mr, i;
6823
6824        for (i in ON_PAGE) {
6825            if (ON_PAGE.hasOwnProperty(i)) {
6826                v = ON_PAGE[i];
6827                if (v.details) {
6828                    m = self.getModuleInfo(v.name);
6829                    req = v.details.requires;
6830                    mr = m && m.requires;
6831
6832                   if (m) {
6833                       if (!m._inspected && req && mr.length !== req.length) {
6834                           // console.log('deleting ' + m.name);
6835                           delete m.expanded;
6836                       }
6837                   } else {
6838                       m = self.addModule(v.details, i);
6839                   }
6840                   m._inspected = true;
6841               }
6842            }
6843        }
6844    },
6845    /*
6846    * returns true if b is not loaded, and is required directly or by means of modules it supersedes.
6847    * @private
6848    * @method _requires
6849    * @param {String} mod1 The first module to compare
6850    * @param {String} mod2 The second module to compare
6851    */
6852   _requires: function(mod1, mod2) {
6853
6854        var i, rm, after_map, s,
6855            m = this.getModuleInfo(mod1),
6856            other = this.getModuleInfo(mod2);
6857
6858        if (!m || !other) {
6859            return false;
6860        }
6861
6862        rm = m.expanded_map;
6863        after_map = m.after_map;
6864
6865        // check if this module should be sorted after the other
6866        // do this first to short circut circular deps
6867        if (after_map && (mod2 in after_map)) {
6868            return true;
6869        }
6870
6871        after_map = other.after_map;
6872
6873        // and vis-versa
6874        if (after_map && (mod1 in after_map)) {
6875            return false;
6876        }
6877
6878        // check if this module requires one the other supersedes
6879        s = other.supersedes;
6880        if (s) {
6881            for (i = 0; i < s.length; i++) {
6882                if (this._requires(mod1, s[i])) {
6883                    return true;
6884                }
6885            }
6886        }
6887
6888        s = m.supersedes;
6889        if (s) {
6890            for (i = 0; i < s.length; i++) {
6891                if (this._requires(mod2, s[i])) {
6892                    return false;
6893                }
6894            }
6895        }
6896
6897        // check if this module requires the other directly
6898        // if (r && yArray.indexOf(r, mod2) > -1) {
6899        if (rm && (mod2 in rm)) {
6900            return true;
6901        }
6902
6903        // external css files should be sorted below yui css
6904        if (m.ext && m.type === CSS && !other.ext && other.type === CSS) {
6905            return true;
6906        }
6907
6908        return false;
6909    },
6910    /**
6911    * Apply a new config to the Loader instance
6912    * @method _config
6913    * @private
6914    * @param {Object} o The new configuration
6915    */
6916    _config: function(o) {
6917        var i, j, val, a, f, group, groupName, self = this,
6918            mods = [], mod, modInfo;
6919        // apply config values
6920        if (o) {
6921            for (i in o) {
6922                if (o.hasOwnProperty(i)) {
6923                    val = o[i];
6924                    //TODO This should be a case
6925                    if (i === 'require') {
6926                        self.require(val);
6927                    } else if (i === 'skin') {
6928                        //If the config.skin is a string, format to the expected object
6929                        if (typeof val === 'string') {
6930                            self.skin.defaultSkin = o.skin;
6931                            val = {
6932                                defaultSkin: val
6933                            };
6934                        }
6935
6936                        Y.mix(self.skin, val, true);
6937                    } else if (i === 'groups') {
6938                        for (j in val) {
6939                            if (val.hasOwnProperty(j)) {
6940                                groupName = j;
6941                                group = val[j];
6942                                self.addGroup(group, groupName);
6943                                if (group.aliases) {
6944                                    for (a in group.aliases) {
6945                                        if (group.aliases.hasOwnProperty(a)) {
6946                                            self.addAlias(group.aliases[a], a);
6947                                        }
6948                                    }
6949                                }
6950                            }
6951                        }
6952
6953                    } else if (i === 'modules') {
6954                        // add a hash of module definitions
6955                        for (j in val) {
6956                            if (val.hasOwnProperty(j)) {
6957                                self.addModule(val[j], j);
6958                            }
6959                        }
6960                    } else if (i === 'aliases') {
6961                        for (j in val) {
6962                            if (val.hasOwnProperty(j)) {
6963                                self.addAlias(val[j], j);
6964                            }
6965                        }
6966                    } else if (i === 'gallery') {
6967                        if (this.groups.gallery.update) {
6968                            this.groups.gallery.update(val, o);
6969                        }
6970                    } else if (i === 'yui2' || i === '2in3') {
6971                        if (this.groups.yui2.update) {
6972                            this.groups.yui2.update(o['2in3'], o.yui2, o);
6973                        }
6974                    } else {
6975                        self[i] = val;
6976                    }
6977                }
6978            }
6979        }
6980
6981        // fix filter
6982        f = self.filter;
6983
6984        if (L.isString(f)) {
6985            f = f.toUpperCase();
6986            self.filterName = f;
6987            self.filter = self.FILTER_DEFS[f];
6988            if (f === 'DEBUG') {
6989                self.require('yui-log', 'dump');
6990            }
6991        }
6992
6993        if (self.filterName && self.coverage) {
6994            if (self.filterName === 'COVERAGE' && L.isArray(self.coverage) && self.coverage.length) {
6995                for (i = 0; i < self.coverage.length; i++) {
6996                    mod = self.coverage[i];
6997                    modInfo = self.getModuleInfo(mod);
6998                    if (modInfo && modInfo.use) {
6999                        mods = mods.concat(modInfo.use);
7000                    } else {
7001                        mods.push(mod);
7002                    }
7003                }
7004                self.filters = self.filters || {};
7005                Y.Array.each(mods, function(mod) {
7006                    self.filters[mod] = self.FILTER_DEFS.COVERAGE;
7007                });
7008                self.filterName = 'RAW';
7009                self.filter = self.FILTER_DEFS[self.filterName];
7010            }
7011        }
7012
7013    },
7014
7015    /**
7016     * Returns the skin module name for the specified skin name.  If a
7017     * module name is supplied, the returned skin module name is
7018     * specific to the module passed in.
7019     * @method formatSkin
7020     * @param {string} skin the name of the skin.
7021     * @param {string} mod optional: the name of a module to skin.
7022     * @return {string} the full skin module name.
7023     */
7024    formatSkin: function(skin, mod) {
7025        var s = SKIN_PREFIX + skin;
7026        if (mod) {
7027            s = s + '-' + mod;
7028        }
7029
7030        return s;
7031    },
7032
7033    /**
7034     * Adds the skin def to the module info
7035     * @method _addSkin
7036     * @param {string} skin the name of the skin.
7037     * @param {string} mod the name of the module.
7038     * @param {string} parent parent module if this is a skin of a
7039     * submodule or plugin.
7040     * @return {string} the module name for the skin.
7041     * @private
7042     */
7043    _addSkin: function(skin, mod, parent) {
7044        var pkg, name, nmod,
7045            sinf = this.skin,
7046            mdef = mod && this.getModuleInfo(mod),
7047            ext = mdef && mdef.ext;
7048
7049        // Add a module definition for the module-specific skin css
7050        if (mod) {
7051            name = this.formatSkin(skin, mod);
7052            if (!this.getModuleInfo(name)) {
7053                pkg = mdef.pkg || mod;
7054                nmod = {
7055                    skin: true,
7056                    name: name,
7057                    group: mdef.group,
7058                    type: 'css',
7059                    after: sinf.after,
7060                    path: (parent || pkg) + '/' + sinf.base + skin +
7061                          '/' + mod + '.css',
7062                    ext: ext
7063                };
7064                if (mdef.base) {
7065                    nmod.base = mdef.base;
7066                }
7067                if (mdef.configFn) {
7068                    nmod.configFn = mdef.configFn;
7069                }
7070                this.addModule(nmod, name);
7071
7072            }
7073        }
7074
7075        return name;
7076    },
7077    /**
7078    * Adds an alias module to the system
7079    * @method addAlias
7080    * @param {Array} use An array of modules that makes up this alias
7081    * @param {String} name The name of the alias
7082    * @example
7083    *       var loader = new Y.Loader({});
7084    *       loader.addAlias([ 'node', 'yql' ], 'davglass');
7085    *       loader.require(['davglass']);
7086    *       var out = loader.resolve(true);
7087    *
7088    *       //out.js will contain Node and YQL modules
7089    */
7090    addAlias: function(use, name) {
7091        YUI.Env.aliases[name] = use;
7092        this.addModule({
7093            name: name,
7094            use: use
7095        });
7096    },
7097    /**
7098     * Add a new module group
7099     * @method addGroup
7100     * @param {Object} config An object containing the group configuration data
7101     * @param {String} config.name required, the group name
7102     * @param {String} config.base The base directory for this module group
7103     * @param {String} config.root The root path to add to each combo resource path
7104     * @param {Boolean} config.combine Should the request be combined
7105     * @param {String} config.comboBase Combo service base path
7106     * @param {Object} config.modules The group of modules
7107     * @param {String} name the group name.
7108     * @example
7109     *      var loader = new Y.Loader({});
7110     *      loader.addGroup({
7111     *          name: 'davglass',
7112     *          combine: true,
7113     *          comboBase: '/combo?',
7114     *          root: '',
7115     *          modules: {
7116     *              //Module List here
7117     *          }
7118     *      }, 'davglass');
7119     */
7120    addGroup: function(o, name) {
7121        var mods = o.modules,
7122            self = this,
7123            defaultBase = o.defaultBase || Y.config.defaultBase,
7124            i, v;
7125
7126        name = name || o.name;
7127        o.name = name;
7128        self.groups[name] = o;
7129
7130        if (!o.base && defaultBase && o.root) {
7131            o.base = defaultBase + o.root;
7132        }
7133
7134        if (o.patterns) {
7135            for (i in o.patterns) {
7136                if (o.patterns.hasOwnProperty(i)) {
7137                    o.patterns[i].group = name;
7138                    self.patterns[i] = o.patterns[i];
7139                }
7140            }
7141        }
7142
7143        if (mods) {
7144            for (i in mods) {
7145                if (mods.hasOwnProperty(i)) {
7146                    v = mods[i];
7147                    if (typeof v === 'string') {
7148                        v = { name: i, fullpath: v };
7149                    }
7150                    v.group = name;
7151                    self.addModule(v, i);
7152                }
7153            }
7154        }
7155    },
7156
7157    /**
7158     * Add a new module to the component metadata.
7159     * @method addModule
7160     * @param {Object}
7160 config An object containing the module data.
7161     * @param {String} config.name Required, the component name
7162     * @param {String} config.type Required, the component type (js or css)
7163     * @param {String} config.path Required, the path to the script from `base`
7164     * @param {Array} config.requires Array of modules required by this component
7165     * @param {Array} [config.optional] Array of optional modules for this component
7166     * @param {Array} [config.supersedes] Array of the modules this component replaces
7167     * @param {Array} [config.after] Array of modules the components which, if present, should be sorted above this one
7168     * @param {Object} [config.after_map] Faster alternative to 'after' -- supply a hash instead of an array
7169     * @param {Number} [config.rollup] The number of superseded modules required for automatic rollup
7170     * @param {String} [config.fullpath] If `fullpath` is specified, this is used instead of the configured `base + path`
7171     * @param {Boolean} [config.skinnable] Flag to determine if skin assets should automatically be pulled in
7172     * @param {Object} [config.submodules] Hash of submodules
7173     * @param {String} [config.group] The group the module belongs to -- this is set automatically when it is added as part of a group configuration.
7174     * @param {Array} [config.lang] Array of BCP 47 language tags of languages for which this module has localized resource bundles, e.g., `["en-GB", "zh-Hans-CN"]`
7175     * @param {Object} [config.condition] Specifies that the module should be loaded automatically if a condition is met. This is an object with up to four fields:
7176     * @param {String} [config.condition.trigger] The name of a module that can trigger the auto-load
7177     * @param {Function} [config.condition.test] A function that returns true when the module is to be loaded.
7178     * @param {String} [config.condition.ua] The UA name of <a href="UA.html">Y.UA</a> object that returns true when the module is to be loaded. e.g., `"ie"`, `"nodejs"`.
7179     * @param {String} [config.condition.when] Specifies the load order of the conditional module
7180     *  with regard to the position of the trigger module.
7181     *  This should be one of three values: `before`, `after`, or `instead`.  The default is `after`.
7182     * @param {Object} [config.testresults] A hash of test results from `Y.Features.all()`
7183     * @param {Function} [config.configFn] A function to exectute when configuring this module
7184     * @param {Object} config.configFn.mod The module config, modifying this object will modify it's config. Returning false will delete the module's config.
7185     * @param {String[]} [config.optionalRequires] List of dependencies that
7186        may optionally be loaded by this loader. This is targeted mostly at
7187        polyfills, since they should not be in the list of requires because
7188        polyfills are assumed to be available in the global scope.
7189     * @param {Function} [config.test] Test to be called when this module is
7190        added as an optional dependency of another module. If the test function
7191        returns `false`, the module will be ignored and will not be attached to
7192        this YUI instance.
7193     * @param {String} [name] The module name, required if not in the module data.
7194     * @return {Object} the module definition or null if the object passed in did not provide all required attributes.
7195     */
7196    addModule: function(o, name) {
7197        name = name || o.name;
7198
7199        if (typeof o === 'string') {
7200            o = { name: name, fullpath: o };
7201        }
7202
7203
7204        var subs, i, l, t, sup, s, smod, plugins, plug,
7205            j, langs, packName, supName, flatSup, flatLang, lang, ret,
7206            overrides, skinname, when, g, p,
7207            modInfo = this.moduleInfo[name],
7208            conditions = this.conditions, trigger;
7209
7210        //Only merge this data if the temp flag is set
7211        //from an earlier pass from a pattern or else
7212        //an override module (YUI_config) can not be used to
7213        //replace a default module.
7214        if (modInfo && modInfo.temp) {
7215            //This catches temp modules loaded via a pattern
7216            // The module will be added twice, once from the pattern and
7217            // Once from the actual add call, this ensures that properties
7218            // that were added to the module the first time around (group: gallery)
7219            // are also added the second time around too.
7220            o = Y.merge(modInfo, o);
7221        }
7222
7223        o.name = name;
7224
7225        if (!o || !o.name) {
7226            return null;
7227        }
7228
7229        if (!o.type) {
7230            //Always assume it's javascript unless the CSS pattern is matched.
7231            o.type = JS;
7232            p = o.path || o.fullpath;
7233            if (p && this.REGEX_CSS.test(p)) {
7234                o.type = CSS;
7235            }
7236        }
7237
7238        if (!o.path && !o.fullpath) {
7239            o.path = _path(name, name, o.type);
7240        }
7241        o.supersedes = o.supersedes || o.use;
7242
7243        o.ext = ('ext' in o) ? o.ext : (this._internal) ? false : true;
7244
7245        // Handle submodule logic
7246        subs = o.submodules;
7247
7248        this.moduleInfo[name] = o;
7249
7250        o.requires = o.requires || [];
7251
7252        /*
7253        Only allowing the cascade of requires information, since
7254        optional and supersedes are far more fine grained than
7255        a blanket requires is.
7256        */
7257        if (this.requires) {
7258            for (i = 0; i < this.requires.length; i++) {
7259                o.requires.push(this.requires[i]);
7260            }
7261        }
7262        if (o.group && this.groups && this.groups[o.group]) {
7263            g = this.groups[o.group];
7264            if (g.requires) {
7265                for (i = 0; i < g.requires.length; i++) {
7266                    o.requires.push(g.requires[i]);
7267                }
7268            }
7269        }
7270
7271
7272        if (!o.defaults) {
7273            o.defaults = {
7274                requires: o.requires ? [].concat(o.requires) : null,
7275                supersedes: o.supersedes ? [].concat(o.supersedes) : null,
7276                optional: o.optional ? [].concat(o.optional) : null
7277            };
7278        }
7279
7280        if (o.skinnable && o.ext && o.temp) {
7281            skinname = this._addSkin(this.skin.defaultSkin, name);
7282            o.requires.unshift(skinname);
7283        }
7284
7285        if (o.requires.length) {
7286            o.requires = this.filterRequires(o.requires) || [];
7287        }
7288
7289        if (!o.langPack && o.lang) {
7290            // Setup root package by default as a fallback
7291            // for languages that are not defined
7292            packName = this.getLangPackName(ROOT_LANG, name);
7293            smod = this.getModuleInfo(packName);
7294
7295            if (!smod) {
7296                this._addLangPack(null, o, packName);
7297            }
7298
7299            langs = yArray(o.lang);
7300
7301            for (j = 0; j < langs.length; j++) {
7302                lang = langs[j];
7303                packName = this.getLangPackName(lang, name);
7304                smod = this.getModuleInfo(packName);
7305                if (!smod) {
7306                    smod = this._addLangPack(lang, o, packName);
7307                }
7308            }
7309        }
7310
7311
7312        if (subs) {
7313            sup = o.supersedes || [];
7314            l = 0;
7315
7316            for (i in subs) {
7317                if (subs.hasOwnProperty(i)) {
7318                    s = subs[i];
7319
7320                    s.path = s.path || _path(name, i, o.type);
7321                    s.pkg = name;
7322                    s.group = o.group;
7323
7324                    if (s.supersedes) {
7325                        sup = sup.concat(s.supersedes);
7326                    }
7327
7328                    smod = this.addModule(s, i);
7329                    sup.push(i);
7330
7331                    if (smod.skinnable) {
7332                        o.skinnable = true;
7333                        overrides = this.skin.overrides;
7334                        if (overrides && overrides[i]) {
7335                            for (j = 0; j < overrides[i].length; j++) {
7336                                skinname = this._addSkin(overrides[i][j],
7337                                         i, name);
7338                                sup.push(skinname);
7339                            }
7340                        }
7341                        skinname = this._addSkin(this.skin.defaultSkin,
7342                                        i, name);
7343                        sup.push(skinname);
7344                    }
7345
7346                    // looks like we are expected to work out the metadata
7347                    // for the parent module language packs from what is
7348                    // specified in the child modules.
7349                    if (s.lang && s.lang.length) {
7350                        // Setup root package by default as a fallback
7351                        // for languages that are not defined
7352                        packName = this.getLangPackName(ROOT_LANG, name);
7353                        smod = this.getModuleInfo(packName);
7354
7355                        if (!smod) {
7356                            this._addLangPack(null, o, packName);
7357                        }
7358
7359                        langs = yArray(s.lang);
7360
7361                        for (j = 0; j < langs.length; j++) {
7362                            lang = langs[j];
7363                            packName = this.getLangPackName(lang, name);
7364                            supName = this.getLangPackName(lang, i);
7365                            smod = this.getModuleInfo(packName);
7366
7367                            if (!smod) {
7368                                smod = this._addLangPack(lang, o, packName);
7369                            }
7370
7371                            flatSup = flatSup || yArray.hash(smod.supersedes);
7372
7373                            if (!(supName in flatSup)) {
7374                                smod.supersedes.push(supName);
7375                            }
7376
7377                            o.lang = o.lang || [];
7378
7379                            flatLang = flatLang || yArray.hash(o.lang);
7380
7381                            if (!(lang in flatLang)) {
7382                                o.lang.push(lang);
7383                            }
7384
7385// Add rollup file, need to add to supersedes list too
7386
7387                            // default packages
7388                            packName = this.getLangPackName(ROOT_LANG, name);
7389                            supName = this.getLangPackName(ROOT_LANG, i);
7390
7391                            smod = this.getModuleInfo(packName);
7392
7393                            if (!smod) {
7394                                smod = this._addLangPack(lang, o, packName);
7395                            }
7396
7397                            if (!(supName in flatSup)) {
7398                                smod.supersedes.push(supName);
7399                            }
7400
7401// Add rollup file, need to add to supersedes list too
7402
7403                        }
7404                    }
7405
7406                    l++;
7407                }
7408            }
7409            //o.supersedes = YObject.keys(yArray.hash(sup));
7410            o.supersedes = yArray.dedupe(sup);
7411            if (this.allowRollup) {
7412                o.rollup = (l < 4) ? l : Math.min(l - 1, 4);
7413            }
7414        }
7415
7416        plugins = o.plugins;
7417        if (plugins) {
7418            for (i in plugins) {
7419                if (plugins.hasOwnProperty(i)) {
7420                    plug = plugins[i];
7421                    plug.pkg = name;
7422                    plug.path = plug.path || _path(name, i, o.type);
7423                    plug.requires = plug.requires || [];
7424                    plug.group = o.group;
7425                    this.addModule(plug, i);
7426                    if (o.skinnable) {
7427                        this._addSkin(this.skin.defaultSkin, i, name);
7428                    }
7429
7430                }
7431            }
7432        }
7433
7434        if (o.condition) {
7435            t = this._expandAliases(o.condition.trigger);
7436            for (i = 0; i < t.length; i++) {
7437                trigger = t[i];
7438                when = o.condition.when;
7439                conditions[trigger] = conditions[trigger] || {};
7440                conditions[trigger][name] = o.condition;
7441                // the 'when' attribute can be 'before', 'after', or 'instead'
7442                // the default is after.
7443                if (when && when !== 'after') {
7444                    if (when === 'instead') { // replace the trigger
7445                        o.supersedes = o.supersedes || [];
7446                        o.supersedes.push(trigger);
7447                    }
7448                    // before the trigger
7449                        // the trigger requires the conditional mod,
7450                        // so it should appear before the conditional
7451                        // mod if we do not intersede.
7452                } else { // after the trigger
7453                    o.after = o.after || [];
7454                    o.after.push(trigger);
7455                }
7456            }
7457        }
7458
7459        if (o.supersedes) {
7460            o.supersedes = this.filterRequires(o.supersedes);
7461        }
7462
7463        if (o.after) {
7464            o.after = this.filterRequires(o.after);
7465            o.after_map = yArray.hash(o.after);
7466        }
7467
7468        // this.dirty = true;
7469
7470        if (o.configFn) {
7471            ret = o.configFn(o);
7472            if (ret === false) {
7473                delete this.moduleInfo[name];
7474                delete GLOBAL_ENV._renderedMods[name];
7475                o = null;
7476            }
7477        }
7478        //Add to global cache
7479        if (o) {
7480            if (!GLOBAL_ENV._renderedMods) {
7481                GLOBAL_ENV._renderedMods = {};
7482            }
7483            GLOBAL_ENV._renderedMods[name] = Y.mix(GLOBAL_ENV._renderedMods[name] || {}, o);
7484            GLOBAL_ENV._conditions = conditions;
7485        }
7486
7487        return o;
7488    },
7489
7490    /**
7491     * Add a requirement for one or more module
7492     * @method require
7493     * @param {string[] | string*} what the modules to load.
7494     */
7495    require: function(what) {
7496        var a = (typeof what === 'string') ? yArray(arguments) : what;
7497        this.dirty = true;
7498        this.required = Y.merge(this.required, yArray.hash(this.filterRequires(a)));
7499
7500        this._explodeRollups();
7501    },
7502    /**
7503    * Grab all the items that were asked for, check to see if the Loader
7504    * meta-data contains a "use" array. If it doesm remove the asked item and replace it with
7505    * the content of the "use".
7506    * This will make asking for: "dd"
7507    * Actually ask for: "dd-ddm-base,dd-ddm,dd-ddm-drop,dd-drag,dd-proxy,dd-constrain,dd-drop,dd-scroll,dd-drop-plugin"
7508    * @private
7509    * @method _explodeRollups
7510    */
7511    _explodeRollups: function() {
7512        var self = this, m, m2, i, a, v, len, len2,
7513        r = self.required;
7514
7515        if (!self.allowRollup) {
7516            for (i in r) {
7517                if (r.hasOwnProperty(i)) {
7518                    m = self.getModule(i);
7519                    if (m && m.use) {
7520                        len = m.use.length;
7521                        for (a = 0; a < len; a++) {
7522                            m2 = self.getModule(m.use[a]);
7523                            if (m2 && m2.use) {
7524                                len2 = m2.use.length;
7525                                for (v = 0; v < len2; v++) {
7526                                    r[m2.use[v]] = true;
7527                                }
7528                            } else {
7529                                r[m.use[a]] = true;
7530                            }
7531                        }
7532                    }
7533                }
7534            }
7535            self.required = r;
7536        }
7537
7538    },
7539    /**
7540    * Explodes the required array to remove aliases and replace them with real modules
7541    * @method filterRequires
7542    * @param {Array} r The original requires array
7543    * @return {Array} The new array of exploded requirements
7544    */
7545    filterRequires: function(r) {
7546        if (r) {
7547            if (!Y.Lang.isArray(r)) {
7548                r = [r];
7549            }
7550            r = Y.Array(r);
7551            var c = [], i, mod, o, m;
7552
7553            for (i = 0; i < r.length; i++) {
7554                mod = this.getModule(r[i]);
7555                if (mod && mod.use) {
7556                    for (o = 0; o < mod.use.length; o++) {
7557                        //Must walk the other modules in case a module is a rollup of rollups (datatype)
7558                        m = this.getModule(mod.use[o]);
7559                        if (m && m.use && (m.name !== mod.name)) {
7560                            c = Y.Array.dedupe([].concat(c, this.filterRequires(m.use)));
7561                        } else {
7562                            c.push(mod.use[o]);
7563                        }
7564                    }
7565                } else {
7566                    c.push(r[i]);
7567                }
7568            }
7569            r = c;
7570        }
7571        return r;
7572    },
7573
7574    /**
7575    Returns `true` if the module can be attached to the YUI instance. Runs
7576    the module's test if there is one and caches its result.
7577
7578    @method _canBeAttached
7579    @param {String} module Name of the module to check.
7580    @return {Boolean} Result of the module's test if it has one, or `true`.
7581    **/
7582    _canBeAttached: function (m) {
7583        m = this.getModule(m);
7584        if (m && m.test) {
7585            if (!m.hasOwnProperty('_testResult')) {
7586                m._testResult = m.test(Y);
7587            }
7588            return m._testResult;
7589        }
7590        // return `true` for modules not registered as Loader will know what
7591        // to do with them later on
7592        return true;
7593    },
7594
7595    /**
7596     * Returns an object containing properties for all modules required
7597     * in order to load the requested module
7598     * @method getRequires
7599     * @param {object}  mod The module definition from moduleInfo.
7600     * @return {array} the expanded requirement list.
7601     */
7602    getRequires: function(mod) {
7603
7604        if (!mod) {
7605            //console.log('returning no reqs for ' + mod.name);
7606            return NO_REQUIREMENTS;
7607        }
7608
7609        if (mod._parsed) {
7610            //console.log('returning requires for ' + mod.name, mod.requires);
7611            return mod.expanded || NO_REQUIREMENTS;
7612        }
7613
7614        //TODO add modue cache here out of scope..
7615
7616        var i, m, j, length, add, packName, lang, testresults = this.testresults,
7617            name = mod.name, cond,
7618            adddef = ON_PAGE[name] && ON_PAGE[name].details,
7619            optReqs = mod.optionalRequires,
7620            d, go, def,
7621            r, old_mod,
7622            o, skinmod, skindef, skinpar, skinname,
7623            intl = mod.lang || mod.intl,
7624            ftests = Y.Features && Y.Features.tests.load,
7625            hash, reparse;
7626
7627        // console.log(name);
7628
7629        // pattern match leaves module stub that needs to be filled out
7630        if (mod.temp && adddef) {
7631            old_mod = mod;
7632            mod = this.addModule(adddef, name);
7633            mod.group = old_mod.group;
7634            mod.pkg = old_mod.pkg;
7635            delete mod.expanded;
7636        }
7637
7638        // console.log('cache: ' + mod.langCache + ' == ' + this.lang);
7639
7640        //If a skin or a lang is different, reparse..
7641        reparse = !((!this.lang || mod.langCache === this.lang) && (mod.skinCache === this.skin.defaultSkin));
7642
7643        if (mod.expanded && !reparse) {
7644            return mod.expanded;
7645        }
7646
7647        // Optional dependencies are dependencies that may or may not be
7648        // available.
7649        // This feature was designed specifically to be used when transpiling
7650        // ES6 modules, in order to use polyfills and regular scripts that define
7651        // global variables without having to import them since they should be
7652        // available in the global scope.
7653        if (optReqs) {
7654            for (i = 0, length = optReqs.length; i < length; i++) {
7655                if (this._canBeAttached(optReqs[i])) {
7656                    mod.requires.push(optReqs[i]);
7657                }
7658            }
7659        }
7660
7661        d = [];
7662        hash = {};
7663        r = this.filterRequires(mod.requires);
7664        if (mod.lang) {
7665            //If a module has a lang attribute, auto add the intl requirement.
7666            d.unshift('intl');
7667            r.unshift('intl');
7668            intl = true;
7669        }
7670        o = this.filterRequires(mod.optional);
7671
7672
7673        mod._parsed = true;
7674        mod.langCache = this.lang;
7675        mod.skinCache = this.skin.defaultSkin;
7676
7677        for (i = 0; i < r.length; i++) {
7678            if (!hash[r[i]]) {
7679                d.push(r[i]);
7680                hash[r[i]] = true;
7681                m = this.getModule(r[i]);
7682                if (m) {
7683                    add = this.getRequires(m);
7684                    intl = intl || (m.expanded_map &&
7685                        (INTL in m.expanded_map));
7686                    for (j = 0; j < add.length; j++) {
7687                        d.push(add[j]);
7688                    }
7689                }
7690            }
7691        }
7692
7693        // get the requirements from superseded modules, if any
7694        r = this.filterRequires(mod.supersedes);
7695        if (r) {
7696            for (i = 0; i < r.length; i++) {
7697                if (!hash[r[i]]) {
7698                    // if this module has submodules, the requirements list is
7699                    // expanded to include the submodules.  This is so we can
7700                    // prevent dups when a submodule is already loaded and the
7701                    // parent is requested.
7702                    if (mod.submodules) {
7703                        d.push(r[i]);
7704                    }
7705
7706                    hash[r[i]] = true;
7707                    m = this.getModule(r[i]);
7708
7709                    if (m) {
7710                        add = this.getRequires(m);
7711                        intl = intl || (m.expanded_map &&
7712                            (INTL in m.expanded_map));
7713                        for (j = 0; j < add.length; j++) {
7714                            d.push(add[j]);
7715                        }
7716                    }
7717                }
7718            }
7719        }
7720
7721        if (o && this.loadOptional) {
7722            for (i = 0; i < o.length; i++) {
7723                if (!hash[o[i]]) {
7724                    d.push(o[i]);
7725                    hash[o[i]] = true;
7726                    m = this.getModuleInfo(o[i]);
7727                    if (m) {
7728                        add = this.getRequires(m);
7729                        intl = intl || (m.expanded_map &&
7730                            (INTL in m.expanded_map));
7731                        for (j = 0; j < add.length; j++) {
7732                            d.push(add[j]);
7733                        }
7734                    }
7735                }
7736            }
7737        }
7738
7739        cond = this.conditions[name];
7740
7741        if (cond) {
7742            //Set the module to not parsed since we have conditionals and this could change the dependency tree.
7743            mod._parsed = false;
7744            if (testresults && ftests) {
7745                oeach(testresults, function(result, id) {
7746                    var condmod = ftests[id].name;
7747                    if (!hash[condmod] && ftests[id].trigger === name) {
7748                        if (result && ftests[id]) {
7749                            hash[condmod] = true;
7750                            d.push(condmod);
7751                        }
7752                    }
7753                });
7754            } else {
7755                for (i in cond) {
7756                    if (cond.hasOwnProperty(i)) {
7757                        if (!hash[i]) {
7758                            def = cond[i];
7759                            //first see if they've specfied a ua check
7760                            //then see if they've got a test fn & if it returns true
7761                            //otherwise just having a condition block is enough
7762                            go = def && ((!def.ua && !def.test) || (def.ua && Y.UA[def.ua]) ||
7763                                        (def.test && def.test(Y, r)));
7764
7765                            if (go) {
7766                                hash[i] = true;
7767                                d.push(i);
7768                                m = this.getModule(i);
7769                                if (m) {
7770                                    add = this.getRequires(m);
7771                                    for (j = 0; j < add.length; j++) {
7772                                        d.push(add[j]);
7773                                    }
7774
7775                                }
7776                            }
7777                        }
7778                    }
7779                }
7780            }
7781        }
7782
7783        // Create skin modules
7784        if (mod.skinnable) {
7785            skindef = this.skin.overrides;
7786            for (i in YUI.Env.aliases) {
7787                if (YUI.Env.aliases.hasOwnProperty(i)) {
7788                    if (Y.Array.indexOf(YUI.Env.aliases[i], name) > -1) {
7789                        skinpar = i;
7790                    }
7791                }
7792            }
7793            if (skindef && (skindef[name] || (skinpar && skindef[skinpar]))) {
7794                skinname = name;
7795                if (skindef[skinpar]) {
7796                    skinname = skinpar;
7797                }
7798                for (i = 0; i < skindef[skinname].length; i++) {
7799                    skinmod = this._addSkin(skindef[skinname][i], name);
7800                    if (!this.isCSSLoaded(skinmod, this._boot)) {
7801                        d.push(skinmod);
7802                    }
7803                }
7804            } else {
7805                skinmod = this._addSkin(this.skin.defaultSkin, name);
7806                if (!this.isCSSLoaded(skinmod, this._boot)) {
7807                    d.push(skinmod);
7808                }
7809            }
7810        }
7811
7812        mod._parsed = false;
7813
7814        if (intl) {
7815
7816            if (mod.lang && !mod.langPack && Y.Intl) {
7817                lang = Y.Intl.lookupBestLang(this.lang || ROOT_LANG, mod.lang);
7818                packName = this.getLangPackName(lang, name);
7819                if (packName) {
7820                    d.unshift(packName);
7821                }
7822            }
7823            d.unshift(INTL);
7824        }
7825
7826        mod.expanded_map = yArray.hash(d);
7827
7828        mod.expanded = YObject.keys(mod.expanded_map);
7829
7830        return mod.expanded;
7831    },
7832    /**
7833    * Check to see if named css module is already loaded on the page
7834    * @method isCSSLoaded
7835    * @param {String} name The name of the css file
7836    * @param {Boolean} skip To skip the short-circuit for ignoreRegister
7837    * @return Boolean
7838    */
7839    isCSSLoaded: function(name, skip) {
7840        //TODO - Make this call a batching call with name being an array
7841        if (!name || !YUI.Env.cssStampEl || (!skip && this.ignoreRegistered)) {
7842            return false;
7843        }
7844        var el = YUI.Env.cssStampEl,
7845            ret = false,
7846            mod = YUI.Env._cssLoaded[name],
7847            style = el.currentStyle; //IE
7848
7849
7850        if (mod !== undefined) {
7851            return mod;
7852        }
7853
7854        //Add the classname to the element
7855        el.className = name;
7856
7857        if (!style) {
7858            style = Y.config.doc.defaultView.getComputedStyle(el, null);
7859        }
7860
7861        if (style && style.display === 'none') {
7862            ret = true;
7863        }
7864
7865
7866        el.className = ''; //Reset the classname to ''
7867
7868        YUI.Env._cssLoaded[name] = ret;
7869
7870        return ret;
7871    },
7872
7873    /**
7874     * Returns a hash of module names the supplied module satisfies.
7875     * @method getProvides
7876     * @param {string} name The name of the module.
7877     * @return {object} what this module provides.
7878     */
7879    getProvides: function(name) {
7880        var m = this.getModule(name), o, s;
7881            // supmap = this.provides;
7882
7883        if (!m) {
7884            return NOT_FOUND;
7885        }
7886
7887        if (m && !m.provides) {
7888            o = {};
7889            s = m.supersedes;
7890
7891            if (s) {
7892                yArray.each(s, function(v) {
7893                    Y.mix(o, this.getProvides(v));
7894                }, this);
7895            }
7896
7897            o[name] = true;
7898            m.provides = o;
7899
7900        }
7901
7902        return m.provides;
7903    },
7904
7905    /**
7906     * Calculates the dependency tree, the result is stored in the sorted
7907     * property.
7908     * @method calculate
7909     * @param {object} o optional options object.
7910     * @param {string} type optional argument to prune modules.
7911     */
7912    calculate: function(o, type) {
7913        if (o || type || this.dirty) {
7914
7915            if (o) {
7916                this._config(o);
7917            }
7918
7919            if (!this._init) {
7920                this._setup();
7921            }
7922
7923            this._explode();
7924
7925            if (this.allowRollup) {
7926                this._rollup();
7927            } else {
7928                this._explodeRollups();
7929            }
7930            this._reduce();
7931            this._sort();
7932        }
7933    },
7934    /**
7935    * Creates a "psuedo" package for languages provided in the lang array
7936    * @method _addLangPack
7937    * @private
7938    * @param {String} lang The language to create
7939    * @param {Object} m The module definition to create the language pack around
7940    * @param {String} packName The name of the package (e.g: lang/datatype-date-en-US)
7941    * @return {Object} The module definition
7942    */
7943    _addLangPack: function(lang, m, packName) {
7944        var name = m.name,
7945            packPath, conf,
7946            existing = this.getModuleInfo(packName);
7947
7948        if (!existing) {
7949
7950            packPath = _path((m.pkg || name), packName, JS, true);
7951
7952            conf = {
7953                path: packPath,
7954                intl: true,
7955                langPack: true,
7956                ext: m.ext,
7957                group: m.group,
7958                supersedes: []
7959            };
7960            if (m.root) {
7961                conf.root = m.root;
7962            }
7963            if (m.base) {
7964                conf.base = m.base;
7965            }
7966
7967            if (m.configFn) {
7968                conf.configFn = m.configFn;
7969            }
7970
7971            this.addModule(conf, packName);
7972
7973            if (lang) {
7974                Y.Env.lang = Y.Env.lang || {};
7975                Y.Env.lang[lang] = Y.Env.lang[lang] || {};
7976                Y.Env.lang[lang][name] = true;
7977            }
7978        }
7979
7980        return this.getModuleInfo(packName);
7981    },
7982
7983    /**
7984     * Investigates the current YUI configuration on the page.  By default,
7985     * modules already detected will not be loaded again unless a force
7986     * option is encountered.  Called by calculate()
7987     * @method _setup
7988     * @private
7989     */
7990    _setup: function() {
7991        var info = this.moduleInfo, name, i, j, m, l,
7992            packName;
7993
7994        for (name in info) {
7995            if (info.hasOwnProperty(name)) {
7996                m = info[name];
7997                if (m) {
7998
7999                    // remove dups
8000                    //m.requires = YObject.keys(yArray.hash(m.requires));
8001                    m.requires = yArray.dedupe(m.requires);
8002
8003                    // Create lang pack modules
8004                    //if (m.lang && m.lang.length) {
8005                    if (m.lang) {
8006                        // Setup root package if the module has lang defined,
8007                        // it needs to provide a root language pack
8008                        packName = this.getLangPackName(ROOT_LANG, name);
8009                        this._addLangPack(null, m, packName);
8010                    }
8011
8012                }
8013            }
8014        }
8015
8016
8017        //l = Y.merge(this.inserted);
8018        l = {};
8019
8020        // available modules
8021        if (!this.ignoreRegistered) {
8022            Y.mix(l, GLOBAL_ENV.mods);
8023        }
8024
8025        // add the ignore list to the list of loaded packages
8026        if (this.ignore) {
8027            Y.mix(l, yArray.hash(this.ignore));
8028        }
8029
8030        // expand the list to include superseded modules
8031        for (j in l) {
8032            if (l.hasOwnProperty(j)) {
8033                Y.mix(l, this.getProvides(j));
8034            }
8035        }
8036
8037        // remove modules on the force list from the loaded list
8038        if (this.force) {
8039            for (i = 0; i < this.force.length; i++) {
8040                if (this.force[i] in l) {
8041                    delete l[this.force[i]];
8042                }
8043            }
8044        }
8045
8046        Y.mix(this.loaded, l);
8047
8048        this._init = true;
8049    },
8050
8051    /**
8052     * Builds a module name for a language pack
8053     * @method getLangPackName
8054     * @param {string} lang the language code.
8055     * @param {string} mname the module to build it for.
8056     * @return {string} the language pack module name.
8057     */
8058    getLangPackName: function(lang, mname) {
8059        return ('lang/' + mname + ((lang) ? '_' + lang : ''));
8060    },
8061    /**
8062     * Inspects the required modules list looking for additional
8063     * dependencies.  Expands the required list to include all
8064     * required modules.  Called by calculate()
8065     * @method _explode
8066     * @private
8067     */
8068    _explode: function() {
8069        //TODO Move done out of scope
8070        var r = this.required, m, reqs, done = {},
8071            self = this, name, expound;
8072
8073        // the setup phase is over, all modules have been created
8074        self.dirty = false;
8075
8076        self._explodeRollups();
8077        r = self.required;
8078
8079        for (name in r) {
8080            if (r.hasOwnProperty(name)) {
8081                if (!done[name]) {
8082                    done[name] = true;
8083                    m = self.getModule(name);
8084                    if (m) {
8085                        expound = m.expound;
8086
8087                        if (expound) {
8088                            r[expound] = self.getModule(expound);
8089                            reqs = self.getRequires(r[expound]);
8090                            Y.mix(r, yArray.hash(reqs));
8091                        }
8092
8093                        reqs = self.getRequires(m);
8094                        Y.mix(r, yArray.hash(reqs));
8095                    }
8096                }
8097            }
8098        }
8099
8100    },
8101    /**
8102    * The default method used to test a module against a pattern
8103    * @method _patternTest
8104    * @private
8105    * @param {String} mname The module being tested
8106    * @param {String} pname The pattern to match
8107    */
8108    _patternTest: function(mname, pname) {
8109        return (mname.indexOf(pname) > -1);
8110    },
8111    /**
8112    * Get's the loader meta data for the requested module
8113    * @method getModule
8114    * @param {String} mname The module name to get
8115    * @return {Object} The module metadata
8116    */
8117    getModule: function(mname) {
8118        //TODO: Remove name check - it's a quick hack to fix pattern WIP
8119        if (!mname) {
8120            return null;
8121        }
8122
8123        var p, found, pname,
8124            m = this.getModuleInfo(mname),
8125            patterns = this.patterns;
8126
8127        // check the patterns library to see if we should automatically add
8128        // the module with defaults
8129        if (!m || (m && m.ext)) {
8130            for (pname in patterns) {
8131                if (patterns.hasOwnProperty(pname)) {
8132                    p = patterns[pname];
8133
8134                    //There is no test method, create a default one that tests
8135                    // the pattern against the mod name
8136                    if (!p.test) {
8137                        p.test = this._patternTest;
8138                    }
8139
8140                    if (p.test(mname, pname)) {
8141                        // use the metadata supplied for the pattern
8142                        // as the module definition.
8143                        found = p;
8144                        break;
8145                    }
8146                }
8147            }
8148        }
8149
8150        if (!m) {
8151            if (found) {
8152                if (p.action) {
8153                    p.action.call(this, mname, pname);
8154                } else {
8155                    // ext true or false?
8156                    m = this.addModule(Y.merge(found, {
8157                        test: void 0,
8158                        temp: true
8159                    }), mname);
8160                    if (m && found.configFn) {
8161                        m.configFn = found.configFn;
8162                    }
8163                }
8164            }
8165        } else {
8166            if (found && m && found.configFn && !m.configFn) {
8167                m.configFn = found.configFn;
8168                m.configFn(m);
8169            }
8170        }
8171
8172        return m;
8173    },
8174
8175    // impl in rollup submodule
8176    _rollup: function() { },
8177
8178    /**
8179     * Remove superceded modules and loaded modules.  Called by
8180     * calculate() after we have the mega list of all dependencies
8181     * @method _reduce
8182     * @return {object} the reduced dependency hash.
8183     * @private
8184     */
8185    _reduce: function(r) {
8186
8187        r = r || this.required;
8188
8189        var i, j, s, m, type = this.loadType,
8190        ignore = this.ignore ? yArray.hash(this.ignore) : false;
8191
8192        for (i in r) {
8193            if (r.hasOwnProperty(i)) {
8194                m = this.getModule(i);
8195                // remove if already loaded
8196                if (((this.loaded[i] || ON_PAGE[i]) &&
8197                        !this.forceMap[i] && !this.ignoreRegistered) ||
8198                        (type && m && m.type !== type)) {
8199                    delete r[i];
8200                }
8201                if (ignore && ignore[i]) {
8202                    delete r[i];
8203                }
8204                // remove anything this module supersedes
8205                s = m && m.supersedes;
8206                if (s) {
8207                    for (j = 0; j < s.length; j++) {
8208                        if (s[j] in r) {
8209                            delete r[s[j]];
8210                        }
8211                    }
8212                }
8213            }
8214        }
8215
8216        return r;
8217    },
8218    /**
8219    * Handles the queue when a module has been loaded for all cases
8220    * @method _finish
8221    * @private
8222    * @param {String} msg The message from Loader
8223    * @param {Boolean} success A boolean denoting success or failure
8224    */
8225    _finish: function(msg, success) {
8226
8227        _queue.running = false;
8228
8229        var onEnd = this.onEnd;
8230        if (onEnd) {
8231            onEnd.call(this.context, {
8232                msg: msg,
8233                data: this.data,
8234                success: success
8235            });
8236        }
8237        this._continue();
8238    },
8239    /**
8240    * The default Loader onSuccess handler, calls this.onSuccess with a payload
8241    * @method _onSuccess
8242    * @private
8243    */
8244    _onSuccess: function() {
8245        var self = this, skipped = Y.merge(self.skipped), fn,
8246            failed = [], rreg = self.requireRegistration,
8247            success, msg, i, mod;
8248
8249        for (i in skipped) {
8250            if (skipped.hasOwnProperty(i)) {
8251                delete self.inserted[i];
8252            }
8253        }
8254
8255        self.skipped = {};
8256
8257        for (i in self.inserted) {
8258            if (self.inserted.hasOwnProperty(i)) {
8259                mod = self.getModule(i);
8260                if (mod && rreg && mod.type === JS && !(i in YUI.Env.mods)) {
8261                    failed.push(i);
8262                } else {
8263                    Y.mix(self.loaded, self.getProvides(i));
8264                }
8265            }
8266        }
8267
8268        fn = self.onSuccess;
8269        msg = (failed.length) ? 'notregistered' : 'success';
8270        success = !(failed.length);
8271        if (fn) {
8272            fn.call(self.context, {
8273                msg: msg,
8274                data: self.data,
8275                success: success,
8276                failed: failed,
8277                skipped: skipped
8278            });
8279        }
8280        self._finish(msg, success);
8281    },
8282    /**
8283    * The default Loader onProgress handler, calls this.onProgress with a payload
8284    * @method _onProgress
8285    * @private
8286    */
8287    _onProgress: function(e) {
8288        var self = this, i;
8289        //set the internal cache to what just came in.
8290        if (e.data && e.data.length) {
8291            for (i = 0; i < e.data.length; i++) {
8292                e.data[i] = self.getModule(e.data[i].name);
8293            }
8294        }
8295        if (self.onProgress) {
8296            self.onProgress.call(self.context, {
8297                name: e.url,
8298                data: e.data
8299            });
8300        }
8301    },
8302    /**
8303    * The default Loader onFailure handler, calls this.onFailure with a payload
8304    * @method _onFailure
8305    * @private
8306    */
8307    _onFailure: function(o) {
8308        var f = this.onFailure, msg = [], i = 0, len = o.errors.length;
8309
8310        for (i; i < len; i++) {
8311            msg.push(o.errors[i].error);
8312        }
8313
8314        msg = msg.join(',');
8315
8316
8317        if (f) {
8318            f.call(this.context, {
8319                msg: msg,
8320                data: this.data,
8321                success: false
8322            });
8323        }
8324
8325        this._finish(msg, false);
8326
8327    },
8328
8329    /**
8330    * The default Loader onTimeout handler, calls this.onTimeout with a payload
8331    * @method _onTimeout
8332    * @param {Get.Transaction} transaction The Transaction object from `Y.Get`
8333    * @private
8334    */
8335    _onTimeout: function(transaction) {
8336        var f = this.onTimeout;
8337        if (f) {
8338            f.call(this.context, {
8339                msg: 'timeout',
8340                data: this.data,
8341                success: false,
8342                transaction: transaction
8343            });
8344        }
8345    },
8346
8347    /**
8348     * Sorts the dependency tree.  The last step of calculate()
8349     * @method _sort
8350     * @private
8351     */
8352    _sort: function() {
8353        var name,
8354
8355            // Object containing module names.
8356            required = this.required,
8357
8358            // Keep track of whether we've visited a module.
8359            visited = {};
8360
8361        // Will contain modules names, in the correct order,
8362        // according to dependencies.
8363        this.sorted = [];
8364
8365        for (name in required) {
8366            if (!visited[name] && required.hasOwnProperty(name)) {
8367                this._visit(name, visited);
8368            }
8369        }
8370    },
8371
8372    /**
8373     * Recursively visits the dependencies of the module name
8374     * passed in, and appends each module name to the `sorted` property.
8375     * @param {String} name The name of a module.
8376     * @param {Object} visited Keeps track of whether a module was visited.
8377     * @method _visit
8378     * @private
8379     */
8380    _visit: function (name, visited) {
8381        var required, condition, moduleInfo, dependency, dependencies,
8382            trigger, isAfter, i, l;
8383
8384        visited[name] = true;
8385        required = this.required;
8386        moduleInfo = this.moduleInfo[name];
8387        condition = this.conditions[name] || {};
8388
8389        if (moduleInfo) {
8390            // Recurse on each dependency of this module,
8391            // figuring out its dependencies, and so on.
8392            dependencies = moduleInfo.expanded || moduleInfo.requires;
8393
8394            for (i = 0, l = dependencies.length; i < l; ++i) {
8395                dependency = dependencies[i];
8396                trigger = condition[dependency];
8397
8398                // We cannot process this dependency yet if it must
8399                // appear after our current module.
8400                isAfter = trigger && (!trigger.when || trigger.when === "after");
8401
8402                // Is this module name in the required list of modules,
8403                // and have we not already visited it?
8404                if (required[dependency] && !visited[dependency] && !isAfter) {
8405                    this._visit(dependency, visited);
8406                }
8407            }
8408        }
8409
8410        this.sorted.push(name);
8411    },
8412
8413    /**
8414    * Handles the actual insertion of script/link tags
8415    * @method _insert
8416    * @private
8417    * @param {Object} source The YUI instance the request came from
8418    * @param {Object} o The metadata to include
8419    * @param {String} type JS or CSS
8420    * @param {Boolean} [skipcalc=false] Do a Loader.calculate on the meta
8421    */
8422    _insert: function(source, o, type, skipcalc) {
8423
8424
8425        // restore the state at the time of the request
8426        if (source) {
8427            this._config(source);
8428        }
8429
8430        // build the dependency list
8431        // don't include type so we can process CSS and script in
8432        // one pass when the type is not specified.
8433
8434        var modules = this.resolve(!skipcalc),
8435            self = this, comp = 0, actions = 0,
8436            mods = {}, deps, complete;
8437
8438        self._refetch = [];
8439
8440        if (type) {
8441            //Filter out the opposite type and reset the array so the checks later work
8442            modules[((type === JS) ? CSS : JS)] = [];
8443        }
8444        if (!self.fetchCSS) {
8445            modules.css = [];
8446        }
8447        if (modules.js.length) {
8448            comp++;
8449        }
8450        if (modules.css.length) {
8451            comp++;
8452        }
8453
8454        //console.log('Resolved Modules: ', modules);
8455
8456        complete = function(d) {
8457            actions++;
8458            var errs = {}, i = 0, o = 0, u = '', fn,
8459                modName, resMods;
8460
8461            if (d && d.errors) {
8462                for (i = 0; i < d.errors.length; i++) {
8463                    if (d.errors[i].request) {
8464                        u = d.errors[i].request.url;
8465                    } else {
8466                        u = d.errors[i];
8467                    }
8468                    errs[u] = u;
8469                }
8470            }
8471
8472            if (d && d.data && d.data.length && (d.type === 'success')) {
8473                for (i = 0; i < d.data.length; i++) {
8474                    self.inserted[d.data[i].name] = true;
8475                    //If the external module has a skin or a lang, reprocess it
8476                    if (d.data[i].lang || d.data[i].skinnable) {
8477                        delete self.inserted[d.data[i].name];
8478                        self._refetch.push(d.data[i].name);
8479                    }
8480                }
8481            }
8482
8483            if (actions === comp) {
8484                self._loading = null;
8485                if (self._refetch.length) {
8486                    //Get the deps for the new meta-data and reprocess
8487                    for (i = 0; i < self._refetch.length; i++) {
8488                        deps = self.getRequires(self.getModule(self._refetch[i]));
8489                        for (o = 0; o < deps.length; o++) {
8490                            if (!self.inserted[deps[o]]) {
8491                                //We wouldn't be to this point without the module being here
8492                                mods[deps[o]] = deps[o];
8493                            }
8494                        }
8495                    }
8496                    mods = Y.Object.keys(mods);
8497                    if (mods.length) {
8498                        self.require(mods);
8499                        resMods = self.resolve(true);
8500                        if (resMods.cssMods.length) {
8501                            for (i=0; i <  resMods.cssMods.length; i++) {
8502                                modName = resMods.cssMods[i].name;
8503                                delete YUI.Env._cssLoaded[modName];
8504                                if (self.isCSSLoaded(modName)) {
8505                                    self.inserted[modName] = true;
8506                                    delete self.required[modName];
8507                                }
8508                            }
8509                            self.sorted = [];
8510                            self._sort();
8511                        }
8512                        d = null; //bail
8513                        self._insert(); //insert the new deps
8514                    }
8515                }
8516                if (d && d.fn) {
8517                    fn = d.fn;
8518                    delete d.fn;
8519                    fn.call(self, d);
8520                }
8521            }
8522        };
8523
8524        this._loading = true;
8525
8526        if (!modules.js.length && !modules.css.length) {
8527            actions = -1;
8528            complete({
8529                fn: self._onSuccess
8530            });
8531            return;
8532        }
8533
8534
8535        if (modules.css.length) { //Load CSS first
8536            Y.Get.css(modules.css, {
8537                data: modules.cssMods,
8538                attributes: self.cssAttributes,
8539                insertBefore: self.insertBefore,
8540                charset: self.charset,
8541                timeout: self.timeout,
8542                context: self,
8543                onProgress: function(e) {
8544                    self._onProgress.call(self, e);
8545                },
8546                onTimeout: function(d) {
8547                    self._onTimeout.call(self, d);
8548                },
8549                onSuccess: function(d) {
8550                    d.type = 'success';
8551                    d.fn = self._onSuccess;
8552                    complete.call(self, d);
8553                },
8554                onFailure: function(d) {
8555                    d.type = 'failure';
8556                    d.fn = self._onFailure;
8557                    complete.call(self, d);
8558                }
8559            });
8560        }
8561
8562        if (modules.js.length) {
8563            Y.Get.js(modules.js, {
8564                data: modules.jsMods,
8565                insertBefore: self.insertBefore,
8566                attributes: self.jsAttributes,
8567                charset: self.charset,
8568                timeout: self.timeout,
8569                autopurge: false,
8570                context: self,
8571                async: self.async,
8572                onProgress: function(e) {
8573                    self._onProgress.call(self, e);
8574                },
8575                onTimeout: function(d) {
8576                    self._onTimeout.call(self, d);
8577                },
8578                onSuccess: function(d) {
8579                    d.type = 'success';
8580                    d.fn = self._onSuccess;
8581                    complete.call(self, d);
8582                },
8583                onFailure: function(d) {
8584                    d.type = 'failure';
8585                    d.fn = self._onFailure;
8586                    complete.call(self, d);
8587                }
8588            });
8589        }
8590    },
8591    /**
8592    * Once a loader operation is completely finished, process any additional queued items.
8593    * @method _continue
8594    * @private
8595    */
8596    _continue: function() {
8597        if (!(_queue.running) && _queue.size() > 0) {
8598            _queue.running = true;
8599            _queue.next()();
8600        }
8601    },
8602
8603    /**
8604     * inserts the requested modules and their dependencies.
8605     * <code>type</code> can be "js" or "css".  Both script and
8606     * css are inserted if type is not provided.
8607     * @method insert
8608     * @param {object} o optional options object.
8609     * @param {string} type the type of dependency to insert.
8610     */
8611    insert: function(o, type, skipsort) {
8612        var self = this, copy = Y.merge(this);
8613        delete copy.require;
8614        delete copy.dirty;
8615        _queue.add(function() {
8616            self._insert(copy, o, type, skipsort);
8617        });
8618        this._continue();
8619    },
8620
8621    /**
8622     * Executed every time a module is loaded, and if we are in a load
8623     * cycle, we attempt to load the next script.  Public so that it
8624     * is possible to call this if using a method other than
8625     * Y.register to determine when scripts are fully loaded
8626     * @method loadNext
8627     * @deprecated
8628     * @param {string} mname optional the name of the module that has
8629     * been loaded (which is usually why it is time to load the next
8630     * one).
8631     */
8632    loadNext: function() {
8633        return;
8634    },
8635
8636    /**
8637     * Apply filter defined for this instance to a url/path
8638     * @method _filter
8639     * @param {string} u the string to filter.
8640     * @param {string} name the name of the module, if we are processing
8641     * a single module as opposed to a combined url.
8642     * @return {string} the filtered string.
8643     * @private
8644     */
8645    _filter: function(u, name, group) {
8646        var f = this.filter,
8647            hasFilter = name && (name in this.filters),
8648            modFilter = hasFilter && this.filters[name],
8649            groupName = group || (this.getModuleInfo(name) || {}).group || null;
8650
8651        if (groupName && this.groups[groupName] && this.groups[groupName].filter) {
8652            modFilter = this.groups[groupName].filter;
8653            hasFilter = true;
8654        }
8655
8656        if (u) {
8657            if (hasFilter) {
8658                f = (L.isString(modFilter)) ? this.FILTER_DEFS[modFilter.toUpperCase()] || null : modFilter;
8659            }
8660            if (f) {
8661                u = u.replace(new RegExp(f.searchExp, 'g'), f.replaceStr);
8662            }
8663        }
8664        return u;
8665    },
8666
8667    /**
8668     * Generates the full url for a module
8669     * @method _url
8670     * @param {string} path the path fragment.
8671     * @param {String} name The name of the module
8672     * @param {String} [base] The base url to use. Defaults to self.base
8673     * @return {string} the full url.
8674     * @private
8675     */
8676    _url: function(path, name, base) {
8677        return this._filter((base || this.base || '') + path, name);
8678    },
8679    /**
8680    * Returns an Object hash of file arrays built from `loader.sorted` or from an arbitrary list of sorted modules.
8681    * @method resolve
8682    * @param {Boolean} [calc=false] Perform a loader.calculate() before anything else
8683    * @param {Array} [sorted=loader.sorted] An override for the loader.sorted array
8684    * @return {Object} Object hash (js and css) of two arrays of file lists
8685    * @example This method can be used as an off-line dep calculator
8686    *
8687    *        var Y = YUI();
8688    *        var loader = new Y.Loader({
8689    *            filter: 'debug',
8690    *            base: '../../',
8691    *            root: 'build/',
8692    *            combine: true,
8693    *            require: ['node', 'dd', 'console']
8694    *        });
8695    *        var out = loader.resolve(true);
8696    *
8697    */
8698    resolve: function(calc, sorted) {
8699        var self     = this,
8700            resolved = { js: [], jsMods: [], css: [], cssMods: [] },
8701            addSingle,
8702            usePathogen = Y.config.comboLoader && Y.config.customComboBase;
8703
8704        if (self.skin.overrides || self.skin.defaultSkin !== DEFAULT_SKIN || self.ignoreRegistered) {
8705            self._resetModules();
8706        }
8707
8708        if (calc) {
8709            self.calculate();
8710        }
8711        sorted = sorted || self.sorted;
8712
8713        addSingle = function(mod) {
8714            if (mod) {
8715                var group = (mod.group && self.groups[mod.group]) || NOT_FOUND,
8716                    url;
8717
8718                //Always assume it's async
8719                if (group.async === false) {
8720                    mod.async = group.async;
8721                }
8722
8723                url = (mod.fullpath) ? self._filter(mod.fullpath, mod.name) :
8724                      self._url(mod.path, mod.name, group.base || mod.base);
8725
8726                if (mod.attributes || mod.async === false) {
8727                    url = {
8728                        url: url,
8729                        async: mod.async
8730                    };
8731                    if (mod.attributes) {
8732                        url.attributes = mod.attributes;
8733                    }
8734                }
8735                resolved[mod.type].push(url);
8736                resolved[mod.type + 'Mods'].push(mod);
8737            } else {
8738            }
8739
8740        };
8741
8742        /*jslint vars: true */
8743        var inserted     = (self.ignoreRegistered) ? {}
8743 : self.inserted,
8744            comboSources,
8745            maxURLLength,
8746            comboMeta,
8747            comboBase,
8748            comboSep,
8749            group,
8750            mod,
8751            len,
8752            i,
8753            hasComboModule = false;
8754
8755        /*jslint vars: false */
8756
8757        for (i = 0, len = sorted.length; i < len; i++) {
8758            mod = self.getModule(sorted[i]);
8759            if (!mod || inserted[mod.name]) {
8760                continue;
8761            }
8762
8763            group = self.groups[mod.group];
8764
8765            comboBase = self.comboBase;
8766
8767            if (group) {
8768                if (!group.combine || mod.fullpath) {
8769                    //This is not a combo module, skip it and load it singly later.
8770                    addSingle(mod);
8771                    continue;
8772                }
8773                mod.combine = true;
8774
8775                if (typeof group.root === 'string') {
8776                    mod.root = group.root;
8777                }
8778
8779                comboBase    = group.comboBase || comboBase;
8780                comboSep     = group.comboSep;
8781                maxURLLength = group.maxURLLength;
8782            } else {
8783                if (!self.combine) {
8784                    //This is not a combo module, skip it and load it singly later.
8785                    addSingle(mod);
8786                    continue;
8787                }
8788            }
8789
8790            if (!mod.combine && mod.ext) {
8791                addSingle(mod);
8792                continue;
8793            }
8794            hasComboModule = true;
8795            comboSources = comboSources || {};
8796            comboSources[comboBase] = comboSources[comboBase] ||
8797                { js: [], jsMods: [], css: [], cssMods: [] };
8798
8799            comboMeta               = comboSources[comboBase];
8800            comboMeta.group         = mod.group;
8801            comboMeta.comboSep      = comboSep || self.comboSep;
8802            comboMeta.maxURLLength  = maxURLLength || self.maxURLLength;
8803
8804            comboMeta[mod.type + 'Mods'].push(mod);
8805            if (mod.type === JS || mod.type === CSS) {
8806                resolved[mod.type + 'Mods'].push(mod);
8807            }
8808        }
8809        //only encode if we have something to encode
8810        if (hasComboModule) {
8811            if (usePathogen) {
8812                resolved = this._pathogenEncodeComboSources(resolved);
8813            } else {
8814                resolved = this._encodeComboSources(resolved, comboSources);
8815            }
8816        }
8817        return resolved;
8818    },
8819
8820    /**
8821     * Encodes combo sources and appends them to an object hash of arrays from `loader.resolve`.
8822     *
8823     * @method _encodeComboSources
8824     * @param {Object} resolved The object hash of arrays in which to attach the encoded combo sources.
8825     * @param {Object} comboSources An object containing relevant data about modules.
8826     * @return Object
8827     * @private
8828     */
8829    _encodeComboSources: function(resolved, comboSources) {
8830        var fragSubset,
8831            modules,
8832            tmpBase,
8833            baseLen,
8834            frags,
8835            frag,
8836            type,
8837            mod,
8838            maxURLLength,
8839            comboBase,
8840            comboMeta,
8841            comboSep,
8842            i,
8843            len,
8844            self = this;
8845
8846        for (comboBase in comboSources) {
8847            if (comboSources.hasOwnProperty(comboBase)) {
8848                comboMeta    = comboSources[comboBase];
8849                comboSep     = comboMeta.comboSep;
8850                maxURLLength = comboMeta.maxURLLength;
8851                for (type in comboMeta) {
8852                    if (type === JS || type === CSS) {
8853                        modules = comboMeta[type + 'Mods'];
8854                        frags = [];
8855                        for (i = 0, len = modules.length; i < len; i += 1) {
8856                            mod = modules[i];
8857                            frag = ((typeof mod.root === 'string') ? mod.root : self.root) + (mod.path || mod.fullpath);
8858                            frags.push(
8859                                self._filter(frag, mod.name)
8860                            );
8861                        }
8862                        tmpBase = comboBase + frags.join(comboSep);
8863                        baseLen = tmpBase.length;
8864                        if (maxURLLength <= comboBase.length) {
8865                            maxURLLength = MAX_URL_LENGTH;
8866                        }
8867
8868                        if (frags.length) {
8869                            if (baseLen > maxURLLength) {
8870                                fragSubset = [];
8871                                for (i = 0, len = frags.length; i < len; i++) {
8872                                    fragSubset.push(frags[i]);
8873                                    tmpBase = comboBase + fragSubset.join(comboSep);
8874
8875                                    if (tmpBase.length > maxURLLength) {
8876                                        frag = fragSubset.pop();
8877                                        tmpBase = comboBase + fragSubset.join(comboSep);
8878                                        resolved[type].push(self._filter(tmpBase, null, comboMeta.group));
8879                                        fragSubset = [];
8880                                        if (frag) {
8881                                            fragSubset.push(frag);
8882                                        }
8883                                    }
8884                                }
8885                                if (fragSubset.length) {
8886                                    tmpBase = comboBase + fragSubset.join(comboSep);
8887                                    resolved[type].push(self._filter(tmpBase, null, comboMeta.group));
8888                                }
8889                            } else {
8890                                resolved[type].push(self._filter(tmpBase, null, comboMeta.group));
8891                            }
8892                        }
8893                    }
8894                }
8895            }
8896        }
8897        return resolved;
8898    },
8899
8900    /**
8901    Shortcut to calculate, resolve and load all modules.
8902
8903        var loader = new Y.Loader({
8904            ignoreRegistered: true,
8905            modules: {
8906                mod: {
8907                    path: 'mod.js'
8908                }
8909            },
8910            requires: [ 'mod' ]
8911        });
8912        loader.load(function() {
8913            console.log('All modules have loaded..');
8914        });
8915
8916
8917    @method load
8918    @param {Function} cb Executed after all load operations are complete
8919    */
8920    load: function(cb) {
8921        if (!cb) {
8922            return;
8923        }
8924        var self = this,
8925            out = self.resolve(true);
8926
8927        self.data = out;
8928
8929        self.onEnd = function() {
8930            cb.apply(self.context || self, arguments);
8931        };
8932
8933        self.insert();
8934    }
8935};
8936
8937
8938}, 'patched-v3.18.7', {"requires": ["get", "features"]});
8939YUI.add('loader-rollup', function (Y, NAME) {
8940
8941/**
8942 * Optional automatic rollup logic for reducing http connections
8943 * when not using a combo service.
8944 * @module loader
8945 * @submodule rollup
8946 */
8947
8948/**
8949 * Look for rollup packages to determine if all of the modules a
8950 * rollup supersedes are required.  If so, include the rollup to
8951 * help reduce the total number of connections required.  Called
8952 * by calculate().  This is an optional feature, and requires the
8953 * appropriate submodule to function.
8954 * @method _rollup
8955 * @for Loader
8956 * @private
8957 */
8958Y.Loader.prototype._rollup = function() {
8959    var i, j, m, s, r = this.required, roll,
8960        info = this.moduleInfo, rolled, c, smod;
8961
8962    // find and cache rollup modules
8963    if (this.dirty || !this.rollups) {
8964        this.rollups = {};
8965        for (i in info) {
8966            if (info.hasOwnProperty(i)) {
8967                m = this.getModule(i);
8968                // if (m && m.rollup && m.supersedes) {
8969                if (m && m.rollup) {
8970                    this.rollups[i] = m;
8971                }
8972            }
8973        }
8974    }
8975
8976    // make as many passes as needed to pick up rollup rollups
8977    for (;;) {
8978        rolled = false;
8979
8980        // go through the rollup candidates
8981        for (i in this.rollups) {
8982            if (this.rollups.hasOwnProperty(i)) {
8983                // there can be only one, unless forced
8984                if (!r[i] && ((!this.loaded[i]) || this.forceMap[i])) {
8985                    m = this.getModule(i);
8986                    s = m.supersedes || [];
8987                    roll = false;
8988
8989                    // @TODO remove continue
8990                    if (!m.rollup) {
8991                        continue;
8992                    }
8993
8994                    c = 0;
8995
8996                    // check the threshold
8997                    for (j = 0; j < s.length; j++) {
8998                        smod = info[s[j]];
8999
9000                        // if the superseded module is loaded, we can't
9001                        // load the rollup unless it has been forced.
9002                        if (this.loaded[s[j]] && !this.forceMap[s[j]]) {
9003                            roll = false;
9004                            break;
9005                        // increment the counter if this module is required.
9006                        // if we are beyond the rollup threshold, we will
9007                        // use the rollup module
9008                        } else if (r[s[j]] && m.type === smod.type) {
9009                            c++;
9010                            roll = (c >= m.rollup);
9011                            if (roll) {
9012                                break;
9013                            }
9014                        }
9015                    }
9016
9017                    if (roll) {
9018                        // add the rollup
9019                        r[i] = true;
9020                        rolled = true;
9021
9022                        // expand the rollup's dependencies
9023                        this.getRequires(m);
9024                    }
9025                }
9026            }
9027        }
9028
9029        // if we made it here w/o rolling up something, we are done
9030        if (!rolled) {
9031            break;
9032        }
9033    }
9034};
9035
9036
9037}, 'patched-v3.18.7', {"requires": ["loader-base"]});
9038YUI.add('loader-yui3', function (Y, NAME) {
9039
9040/* This file is auto-generated by (yogi loader --yes --mix --start ../) */
9041
9042/*jshint maxlen:900, eqeqeq: false */
9043
9044/**
9045 * YUI 3 module metadata
9046 * @module loader
9047 * @submodule loader-yui3
9048 */
9049YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {};
9050Y.mix(YUI.Env[Y.version].modules, {
9051    "align-plugin": {
9052        "requires": [
9053            "node-screen",
9054            "node-pluginhost"
9055        ]
9056    },
9057    "anim": {
9058        "use": [
9059            "anim-base",
9060            "anim-color",
9061            "anim-curve",
9062            "anim-easing",
9063            "anim-node-plugin",
9064            "anim-scroll",
9065            "anim-xy"
9066        ]
9067    },
9068    "anim-base": {
9069        "requires": [
9070            "base-base",
9071            "node-style",
9072            "color-base"
9073        ]
9074    },
9075    "anim-color": {
9076        "requires": [
9077            "anim-base"
9078        ]
9079    },
9080    "anim-curve": {
9081        "requires": [
9082            "anim-xy"
9083        ]
9084    },
9085    "anim-easing": {
9086        "requires": [
9087            "anim-base"
9088        ]
9089    },
9090    "anim-node-plugin": {
9091        "requires": [
9092            "node-pluginhost",
9093            "anim-base"
9094        ]
9095    },
9096    "anim-scroll": {
9097        "requires": [
9098            "anim-base"
9099        ]
9100    },
9101    "anim-shape": {
9102        "requires": [
9103            "anim-base",
9104            "anim-easing",
9105            "anim-color",
9106            "matrix"
9107        ]
9108    },
9109    "anim-shape-transform": {
9110        "use": [
9111            "anim-shape"
9112        ]
9113    },
9114    "anim-xy": {
9115        "requires": [
9116            "anim-base",
9117            "node-screen"
9118        ]
9119    },
9120    "app": {
9121        "use": [
9122            "app-base",
9123            "app-content",
9124            "app-transitions",
9125            "lazy-model-list",
9126            "model",
9127            "model-list",
9128            "model-sync-rest",
9129            "model-sync-local",
9130            "router",
9131            "view",
9132            "view-node-map"
9133        ]
9134    },
9135    "app-base": {
9136        "requires": [
9137            "classnamemanager",
9138            "pjax-base",
9139            "router",
9140            "view"
9141        ]
9142    },
9143    "app-content": {
9144        "requires": [
9145            "app-base",
9146            "pjax-content"
9147        ]
9148    },
9149    "app-transitions": {
9150        "requires": [
9151            "app-base"
9152        ]
9153    },
9154    "app-transitions-css": {
9155        "type": "css"
9156    },
9157    "app-transitions-native": {
9158        "condition": {
9159            "name": "app-transitions-native",
9160            "test": function (Y) {
9161    var doc  = Y.config.doc,
9162        node = doc ? doc.documentElement : null;
9163
9164    if (node && node.style) {
9165        return ('MozTransition' in node.style || 'WebkitTransition' in node.style || 'transition' in node.style);
9166    }
9167
9168    return false;
9169},
9170            "trigger": "app-transitions"
9171        },
9172        "requires": [
9173            "app-transitions",
9174            "app-transitions-css",
9175            "parallel",
9176            "transition"
9177        ]
9178    },
9179    "array-extras": {
9180        "requires": [
9181            "yui-base"
9182        ]
9183    },
9184    "array-invoke": {
9185        "requires": [
9186            "yui-base"
9187        ]
9188    },
9189    "arraylist": {
9190        "requires": [
9191            "yui-base"
9192        ]
9193    },
9194    "arraylist-add": {
9195        "requires": [
9196            "arraylist"
9197        ]
9198    },
9199    "arraylist-filter": {
9200        "requires": [
9201            "arraylist"
9202        ]
9203    },
9204    "arraysort": {
9205        "requires": [
9206            "yui-base"
9207        ]
9208    },
9209    "async-queue": {
9210        "requires": [
9211            "event-custom"
9212        ]
9213    },
9214    "attribute": {
9215        "use": [
9216            "attribute-base",
9217            "attribute-complex"
9218        ]
9219    },
9220    "attribute-base": {
9221        "requires": [
9222            "attribute-core",
9223            "attribute-observable",
9224            "attribute-extras"
9225        ]
9226    },
9227    "attribute-complex": {
9228        "requires": [
9229            "attribute-base"
9230        ]
9231    },
9232    "attribute-core": {
9233        "requires": [
9234            "oop"
9235        ]
9236    },
9237    "attribute-events": {
9238        "use": [
9239            "attribute-observable"
9240        ]
9241    },
9242    "attribute-extras": {
9243        "requires": [
9244            "oop"
9245        ]
9246    },
9247    "attribute-observable": {
9248        "requires": [
9249            "event-custom"
9250        ]
9251    },
9252    "autocomplete": {
9253        "use": [
9254            "autocomplete-base",
9255            "autocomplete-sources",
9256            "autocomplete-list",
9257            "autocomplete-plugin"
9258        ]
9259    },
9260    "autocomplete-base": {
9261        "optional": [
9262            "autocomplete-sources"
9263        ],
9264        "requires": [
9265            "array-extras",
9266            "base-build",
9267            "escape",
9268            "event-valuechange",
9269            "node-base"
9270        ]
9271    },
9272    "autocomplete-filters": {
9273        "requires": [
9274            "array-extras",
9275            "text-wordbreak"
9276        ]
9277    },
9278    "autocomplete-filters-accentfold": {
9279        "requires": [
9280            "array-extras",
9281            "text-accentfold",
9282            "text-wordbreak"
9283        ]
9284    },
9285    "autocomplete-highlighters": {
9286        "requires": [
9287            "array-extras",
9288            "highlight-base"
9289        ]
9290    },
9291    "autocomplete-highlighters-accentfold": {
9292        "requires": [
9293            "array-extras",
9294            "highlight-accentfold"
9295        ]
9296    },
9297    "autocomplete-list": {
9298        "after": [
9299            "autocomplete-sources"
9300        ],
9301        "lang": [
9302            "en",
9303            "es",
9304            "hu",
9305            "it"
9306        ],
9307        "requires": [
9308            "autocomplete-base",
9309            "event-resize",
9310            "node-screen",
9311            "selector-css3",
9312            "shim-plugin",
9313            "widget",
9314            "widget-position",
9315            "widget-position-align"
9316        ],
9317        "skinnable": true
9318    },
9319    "autocomplete-list-keys": {
9320        "condition": {
9321            "name": "autocomplete-list-keys",
9322            "test": function (Y) {
9323    // Only add keyboard support to autocomplete-list if this doesn't appear to
9324    // be an iOS or Android-based mobile device.
9325    //
9326    // There's currently no feasible way to actually detect whether a device has
9327    // a hardware keyboard, so this sniff will have to do. It can easily be
9328    // overridden by manually loading the autocomplete-list-keys module.
9329    //
9330    // Worth noting: even though iOS supports bluetooth keyboards, Mobile Safari
9331    // doesn't fire the keyboard events used by AutoCompleteList, so there's
9332    // no point loading the -keys module even when a bluetooth keyboard may be
9333    // available.
9334    return !(Y.UA.ios || Y.UA.android);
9335},
9336            "trigger": "autocomplete-list"
9337        },
9338        "requires": [
9339            "autocomplete-list",
9340            "base-build"
9341        ]
9342    },
9343    "autocomplete-plugin": {
9344        "requires": [
9345            "autocomplete-list",
9346            "node-pluginhost"
9347        ]
9348    },
9349    "autocomplete-sources": {
9350        "optional": [
9351            "io-base",
9352            "json-parse",
9353            "jsonp",
9354            "yql"
9355        ],
9356        "requires": [
9357            "autocomplete-base"
9358        ]
9359    },
9360    "axes": {
9361        "use": [
9362            "axis-numeric",
9363            "axis-category",
9364            "axis-time",
9365            "axis-stacked"
9366        ]
9367    },
9368    "axes-base": {
9369        "use": [
9370            "axis-numeric-base",
9371            "axis-category-base",
9372            "axis-time-base",
9373            "axis-stacked-base"
9374        ]
9375    },
9376    "axis": {
9377        "requires": [
9378            "dom",
9379            "widget",
9380            "widget-position",
9381            "widget-stack",
9382            "graphics",
9383            "axis-base"
9384        ]
9385    },
9386    "axis-base": {
9387        "requires": [
9388            "classnamemanager",
9389            "datatype-number",
9390            "datatype-date",
9391            "base",
9392            "event-custom"
9393        ]
9394    },
9395    "axis-category": {
9396        "requires": [
9397            "axis",
9398            "axis-category-base"
9399        ]
9400    },
9401    "axis-category-base": {
9402        "requires": [
9403            "axis-base"
9404        ]
9405    },
9406    "axis-numeric": {
9407        "requires": [
9408            "axis",
9409            "axis-numeric-base"
9410        ]
9411    },
9412    "axis-numeric-base": {
9413        "requires": [
9414            "axis-base"
9415        ]
9416    },
9417    "axis-stacked": {
9418        "requires": [
9419            "axis-numeric",
9420            "axis-stacked-base"
9421        ]
9422    },
9423    "axis-stacked-base": {
9424        "requires": [
9425            "axis-numeric-base"
9426        ]
9427    },
9428    "axis-time": {
9429        "requires": [
9430            "axis",
9431            "axis-time-base"
9432        ]
9433    },
9434    "axis-time-base": {
9435        "requires": [
9436            "axis-base"
9437        ]
9438    },
9439    "base": {
9440        "use": [
9441            "base-base",
9442            "base-pluginhost",
9443            "base-build"
9444        ]
9445    },
9446    "base-base": {
9447        "requires": [
9448            "attribute-base",
9449            "base-core",
9450            "base-observable"
9451        ]
9452    },
9453    "base-build": {
9454        "requires": [
9455            "base-base"
9456        ]
9457    },
9458    "base-core": {
9459        "requires": [
9460            "attribute-core"
9461        ]
9462    },
9463    "base-observable": {
9464        "requires": [
9465            "attribute-observable",
9466            "base-core"
9467        ]
9468    },
9469    "base-pluginhost": {
9470        "requires": [
9471            "base-base",
9472            "pluginhost"
9473        ]
9474    },
9475    "button": {
9476        "requires": [
9477            "button-core",
9478            "cssbutton",
9479            "widget"
9480        ]
9481    },
9482    "button-core": {
9483        "requires": [
9484            "attribute-core",
9485            "classnamemanager",
9486            "node-base",
9487            "escape"
9488        ]
9489    },
9490    "button-group": {
9491        "requires": [
9492            "button-plugin",
9493            "cssbutton",
9494            "widget"
9495        ]
9496    },
9497    "button-plugin": {
9498        "requires": [
9499            "button-core",
9500            "cssbutton",
9501            "node-pluginhost"
9502        ]
9503    },
9504    "cache": {
9505        "use": [
9506            "cache-base",
9507            "cache-offline",
9508            "cache-plugin"
9509        ]
9510    },
9511    "cache-base": {
9512        "requires": [
9513            "base"
9514        ]
9515    },
9516    "cache-offline": {
9517        "requires": [
9518            "cache-base",
9519            "json"
9520        ]
9521    },
9522    "cache-plugin": {
9523        "requires": [
9524            "plugin",
9525            "cache-base"
9526        ]
9527    },
9528    "calendar": {
9529        "requires": [
9530            "calendar-base",
9531            "calendarnavigator"
9532        ],
9533        "skinnable": true
9534    },
9535    "calendar-base": {
9536        "lang": [
9537            "ar-SA",
9538            "bg-BG",
9539            "ca-AD",
9540            "ca-ES",
9541            "cs-CZ",
9542            "da-DK",
9543            "de",
9544            "el-GR",
9545            "en-AU",
9546            "en-GB",
9547            "en",
9548            "es-AR",
9549            "es",
9550            "et-EE",
9551            "eu-ES",
9552            "fa-IR",
9553            "fr-CA",
9554            "fr",
9555            "gl-ES",
9556            "hi-IN",
9557            "hr-HR",
9558            "hu",
9559            "in-ID",
9560            "it-IT",
9561            "it",
9562            "iw-IL",
9563            "ja",
9564            "ko-KR",
9565            "lo-LA",
9566            "lt-LT",
9567            "nb-NO",
9568            "nl-BE",
9569            "nl-NL",
9570            "nl",
9571            "pl-PL",
9572            "pt-BR",
9573            "pt-PT",
9574            "ro-RO",
9575            "ru-RU",
9576            "ru",
9577            "sk-SK",
9578            "sl-SL",
9579            "sr-RS-latin",
9580            "sr-RS",
9581            "sv-SE",
9582            "th-TH",
9583            "tr-TR",
9584            "uk-UA",
9585            "vi-VN",
9586            "zh-Hans-CN",
9587            "zh-Hans",
9588            "zh-Hant-HK",
9589            "zh-HANT-TW",
9590            "zh-Hant",
9591            "zh-TW"
9592        ],
9593        "requires": [
9594            "widget",
9595            "datatype-date",
9596            "datatype-date-math",
9597            "cssgrids"
9598        ],
9599        "skinnable": true
9600    },
9601    "calendarnavigator": {
9602        "lang": [
9603            "en",
9604            "es",
9605            "es-AR",
9606            "eu-ES"
9607        ],
9608        "requires": [
9609            "plugin",
9610            "classnamemanager",
9611            "datatype-date",
9612            "node"
9613        ],
9614        "skinnable": true
9615    },
9616    "charts": {
9617        "use": [
9618            "charts-base"
9619        ]
9620    },
9621    "charts-base": {
9622        "requires": [
9623            "dom",
9624            "event-mouseenter",
9625            "event-touch",
9626            "graphics-group",
9627            "axes",
9628            "series-pie",
9629            "series-line",
9630            "series-marker",
9631            "series-area",
9632            "series-spline",
9633            "series-column",
9634            "series-bar",
9635            "series-areaspline",
9636            "series-combo",
9637            "series-combospline",
9638            "series-line-stacked",
9639            "series-marker-stacked",
9640            "series-area-stacked",
9641            "series-spline-stacked",
9642            "series-column-stacked",
9643            "series-bar-stacked",
9644            "series-areaspline-stacked",
9645            "series-combo-stacked",
9646            "series-combospline-stacked"
9647        ]
9648    },
9649    "charts-legend": {
9650        "requires": [
9651            "charts-base"
9652        ]
9653    },
9654    "classnamemanager": {
9655        "requires": [
9656            "yui-base"
9657        ]
9658    },
9659    "clickable-rail": {
9660        "requires": [
9661            "slider-base"
9662        ]
9663    },
9664    "collection": {
9665        "use": [
9666            "array-extras",
9667            "arraylist",
9668            "arraylist-add",
9669            "arraylist-filter",
9670            "array-invoke"
9671        ]
9672    },
9673    "color": {
9674        "use": [
9675            "color-base",
9676            "color-hsl",
9677            "color-harmony"
9678        ]
9679    },
9680    "color-base": {
9681        "requires": [
9682            "yui-base"
9683        ]
9684    },
9685    "color-harmony": {
9686        "requires": [
9687            "color-hsl"
9688        ]
9689    },
9690    "color-hsl": {
9691        "requires": [
9692            "color-base"
9693        ]
9694    },
9695    "color-hsv": {
9696        "requires": [
9697            "color-base"
9698        ]
9699    },
9700    "console": {
9701        "lang": [
9702            "en",
9703            "es",
9704            "hu",
9705            "it",
9706            "ja"
9707        ],
9708        "requires": [
9709            "yui-log",
9710            "widget"
9711        ],
9712        "skinnable": true
9713    },
9714    "console-filters": {
9715        "requires": [
9716            "plugin",
9717            "console"
9718        ],
9719        "skinnable": true
9720    },
9721    "content-editable": {
9722        "requires": [
9723            "node-base",
9724            "editor-selection",
9725            "stylesheet",
9726            "plugin"
9727        ]
9728    },
9729    "controller": {
9730        "use": [
9731            "router"
9732        ]
9733    },
9734    "cookie": {
9735        "requires": [
9736            "yui-base"
9737        ]
9738    },
9739    "createlink-base": {
9740        "requires": [
9741            "editor-base"
9742        ]
9743    },
9744    "cssbase": {
9745        "after": [
9746            "cssreset",
9747            "cssfonts",
9748            "cssgrids",
9749            "cssreset-context",
9750            "cssfonts-context",
9751            "cssgrids-context"
9752        ],
9753        "type": "css"
9754    },
9755    "cssbase-context": {
9756        "after": [
9757            "cssreset",
9758            "cssfonts",
9759            "cssgrids",
9760            "cssreset-context",
9761            "cssfonts-context",
9762            "cssgrids-context"
9763        ],
9764        "type": "css"
9765    },
9766    "cssbutton": {
9767        "type": "css"
9768    },
9769    "cssfonts": {
9770        "type": "css"
9771    },
9772    "cssfonts-context": {
9773        "type": "css"
9774    },
9775    "cssgrids": {
9776        "optional": [
9777            "cssnormalize"
9778        ],
9779        "type": "css"
9780    },
9781    "cssgrids-base": {
9782        "optional": [
9783            "cssnormalize"
9784        ],
9785        "type": "css"
9786    },
9787    "cssgrids-responsive": {
9788        "optional": [
9789            "cssnormalize"
9790        ],
9791        "requires": [
9792            "cssgrids",
9793            "cssgrids-responsive-base"
9794        ],
9795        "type": "css"
9796    },
9797    "cssgrids-units": {
9798        "optional": [
9799            "cssnormalize"
9800        ],
9801        "requires": [
9802            "cssgrids-base"
9803        ],
9804        "type": "css"
9805    },
9806    "cssnormalize": {
9807        "type": "css"
9808    },
9809    "cssnormalize-context": {
9810        "type": "css"
9811    },
9812    "cssreset": {
9813        "type": "css"
9814    },
9815    "cssreset-context": {
9816        "type": "css"
9817    },
9818    "dataschema": {
9819        "use": [
9820            "dataschema-base",
9821            "dataschema-json",
9822            "dataschema-xml",
9823            "dataschema-array",
9824            "dataschema-text"
9825        ]
9826    },
9827    "dataschema-array": {
9828        "requires": [
9829            "dataschema-base"
9830        ]
9831    },
9832    "dataschema-base": {
9833        "requires": [
9834            "base"
9835        ]
9836    },
9837    "dataschema-json": {
9838        "requires": [
9839            "dataschema-base",
9840            "json"
9841        ]
9842    },
9843    "dataschema-text": {
9844        "requires": [
9845            "dataschema-base"
9846        ]
9847    },
9848    "dataschema-xml": {
9849        "requires": [
9850            "dataschema-base"
9851        ]
9852    },
9853    "datasource": {
9854        "use": [
9855            "datasource-local",
9856            "datasource-io",
9857            "datasource-get",
9858            "datasource-function",
9859            "datasource-cache",
9860            "datasource-jsonschema",
9861            "datasource-xmlschema",
9862            "datasource-arrayschema",
9863            "datasource-textschema",
9864            "datasource-polling"
9865        ]
9866    },
9867    "datasource-arrayschema": {
9868        "requires": [
9869            "datasource-local",
9870            "plugin",
9871            "dataschema-array"
9872        ]
9873    },
9874    "datasource-cache": {
9875        "requires": [
9876            "datasource-local",
9877            "plugin",
9878            "cache-base"
9879        ]
9880    },
9881    "datasource-function": {
9882        "requires": [
9883            "datasource-local"
9884        ]
9885    },
9886    "datasource-get": {
9887        "requires": [
9888            "datasource-local",
9889            "get"
9890        ]
9891    },
9892    "datasource-io": {
9893        "requires": [
9894            "datasource-local",
9895            "io-base"
9896        ]
9897    },
9898    "datasource-jsonschema": {
9899        "requires": [
9900            "datasource-local",
9901            "plugin",
9902            "dataschema-json"
9903        ]
9904    },
9905    "datasource-local": {
9906        "requires": [
9907            "base"
9908        ]
9909    },
9910    "datasource-polling": {
9911        "requires": [
9912            "datasource-local"
9913        ]
9914    },
9915    "datasource-textschema": {
9916        "requires": [
9917            "datasource-local",
9918            "plugin",
9919            "dataschema-text"
9920        ]
9921    },
9922    "datasource-xmlschema": {
9923        "requires": [
9924            "datasource-local",
9925            "plugin",
9926            "datatype-xml",
9927            "dataschema-xml"
9928        ]
9929    },
9930    "datatable": {
9931        "use": [
9932            "datatable-core",
9933            "datatable-table",
9934            "datatable-head",
9935            "datatable-body",
9936            "datatable-base",
9937            "datatable-column-widths",
9938            "datatable-message",
9939            "datatable-mutable",
9940            "datatable-sort",
9941            "datatable-datasource"
9942        ]
9943    },
9944    "datatable-base": {
9945        "requires": [
9946            "datatable-core",
9947            "datatable-table",
9948            "datatable-head",
9949          
9949  "datatable-body",
9950            "base-build",
9951            "widget"
9952        ],
9953        "skinnable": true
9954    },
9955    "datatable-body": {
9956        "requires": [
9957            "datatable-core",
9958            "view",
9959            "classnamemanager"
9960        ]
9961    },
9962    "datatable-column-widths": {
9963        "requires": [
9964            "datatable-base"
9965        ]
9966    },
9967    "datatable-core": {
9968        "requires": [
9969            "escape",
9970            "model-list",
9971            "node-event-delegate"
9972        ]
9973    },
9974    "datatable-datasource": {
9975        "requires": [
9976            "datatable-base",
9977            "plugin",
9978            "datasource-local"
9979        ]
9980    },
9981    "datatable-foot": {
9982        "requires": [
9983            "datatable-core",
9984            "view"
9985        ]
9986    },
9987    "datatable-formatters": {
9988        "requires": [
9989            "datatable-body",
9990            "datatype-number-format",
9991            "datatype-date-format",
9992            "escape"
9993        ]
9994    },
9995    "datatable-head": {
9996        "requires": [
9997            "datatable-core",
9998            "view",
9999            "classnamemanager"
10000        ]
10001    },
10002    "datatable-highlight": {
10003        "requires": [
10004            "datatable-base",
10005            "event-hover"
10006        ],
10007        "skinnable": true
10008    },
10009    "datatable-keynav": {
10010        "requires": [
10011            "datatable-base"
10012        ]
10013    },
10014    "datatable-message": {
10015        "lang": [
10016            "en",
10017            "fr",
10018            "es",
10019            "hu",
10020            "it"
10021        ],
10022        "requires": [
10023            "datatable-base"
10024        ],
10025        "skinnable": true
10026    },
10027    "datatable-mutable": {
10028        "requires": [
10029            "datatable-base"
10030        ]
10031    },
10032    "datatable-paginator": {
10033        "lang": [
10034            "en",
10035            "fr"
10036        ],
10037        "requires": [
10038            "model",
10039            "view",
10040            "paginator-core",
10041            "datatable-foot",
10042            "datatable-paginator-templates"
10043        ],
10044        "skinnable": true
10045    },
10046    "datatable-paginator-templates": {
10047        "requires": [
10048            "template"
10049        ]
10050    },
10051    "datatable-scroll": {
10052        "requires": [
10053            "datatable-base",
10054            "datatable-column-widths",
10055            "dom-screen"
10056        ],
10057        "skinnable": true
10058    },
10059    "datatable-sort": {
10060        "lang": [
10061            "en",
10062            "fr",
10063            "es",
10064            "hu"
10065        ],
10066        "requires": [
10067            "datatable-base"
10068        ],
10069        "skinnable": true
10070    },
10071    "datatable-table": {
10072        "requires": [
10073            "datatable-core",
10074            "datatable-head",
10075            "datatable-body",
10076            "view",
10077            "classnamemanager"
10078        ]
10079    },
10080    "datatype": {
10081        "use": [
10082            "datatype-date",
10083            "datatype-number",
10084            "datatype-xml"
10085        ]
10086    },
10087    "datatype-date": {
10088        "use": [
10089            "datatype-date-parse",
10090            "datatype-date-format",
10091            "datatype-date-math"
10092        ]
10093    },
10094    "datatype-date-format": {
10095        "lang": [
10096            "ar",
10097            "ar-JO",
10098            "ca",
10099            "ca-ES",
10100            "da",
10101            "da-DK",
10102            "de",
10103            "de-AT",
10104            "de-DE",
10105            "el",
10106            "el-GR",
10107            "en",
10108            "en-AU",
10109            "en-CA",
10110            "en-GB",
10111            "en-IE",
10112            "en-IN",
10113            "en-JO",
10114            "en-MY",
10115            "en-NZ",
10116            "en-PH",
10117            "en-SG",
10118            "en-US",
10119            "es",
10120            "es-AR",
10121            "es-BO",
10122            "es-CL",
10123            "es-CO",
10124            "es-EC",
10125            "es-ES",
10126            "es-MX",
10127            "es-PE",
10128            "es-PY",
10129            "es-US",
10130            "es-UY",
10131            "es-VE",
10132            "fi",
10133            "fi-FI",
10134            "fr",
10135            "fr-BE",
10136            "fr-CA",
10137            "fr-FR",
10138            "hi",
10139            "hi-IN",
10140            "hu",
10141            "id",
10142            "id-ID",
10143            "it",
10144            "it-IT",
10145            "ja",
10146            "ja-JP",
10147            "ko",
10148            "ko-KR",
10149            "ms",
10150            "ms-MY",
10151            "nb",
10152            "nb-NO",
10153            "nl",
10154            "nl-BE",
10155            "nl-NL",
10156            "pl",
10157            "pl-PL",
10158            "pt",
10159            "pt-BR",
10160            "ro",
10161            "ro-RO",
10162            "ru",
10163            "ru-RU",
10164            "sv",
10165            "sv-SE",
10166            "th",
10167            "th-TH",
10168            "tr",
10169            "tr-TR",
10170            "vi",
10171            "vi-VN",
10172            "zh-Hans",
10173            "zh-Hans-CN",
10174            "zh-Hant",
10175            "zh-Hant-HK",
10176            "zh-Hant-TW"
10177        ]
10178    },
10179    "datatype-date-math": {
10180        "requires": [
10181            "yui-base"
10182        ]
10183    },
10184    "datatype-date-parse": {},
10185    "datatype-number": {
10186        "use": [
10187            "datatype-number-parse",
10188            "datatype-number-format"
10189        ]
10190    },
10191    "datatype-number-format": {},
10192    "datatype-number-parse": {
10193        "requires": [
10194            "escape"
10195        ]
10196    },
10197    "datatype-xml": {
10198        "use": [
10199            "datatype-xml-parse",
10200            "datatype-xml-format"
10201        ]
10202    },
10203    "datatype-xml-format": {},
10204    "datatype-xml-parse": {},
10205    "dd": {
10206        "use": [
10207            "dd-ddm-base",
10208            "dd-ddm",
10209            "dd-ddm-drop",
10210            "dd-drag",
10211            "dd-proxy",
10212            "dd-constrain",
10213            "dd-drop",
10214            "dd-scroll",
10215            "dd-delegate"
10216        ]
10217    },
10218    "dd-constrain": {
10219        "requires": [
10220            "dd-drag"
10221        ]
10222    },
10223    "dd-ddm": {
10224        "requires": [
10225            "dd-ddm-base",
10226            "event-resize"
10227        ]
10228    },
10229    "dd-ddm-base": {
10230        "requires": [
10231            "node",
10232            "base",
10233            "yui-throttle",
10234            "classnamemanager"
10235        ]
10236    },
10237    "dd-ddm-drop": {
10238        "requires": [
10239            "dd-ddm"
10240        ]
10241    },
10242    "dd-delegate": {
10243        "requires": [
10244            "dd-drag",
10245            "dd-drop-plugin",
10246            "event-mouseenter"
10247        ]
10248    },
10249    "dd-drag": {
10250        "requires": [
10251            "dd-ddm-base",
10252            "selector-css2"
10253        ]
10254    },
10255    "dd-drop": {
10256        "requires": [
10257            "dd-drag",
10258            "dd-ddm-drop"
10259        ]
10260    },
10261    "dd-drop-plugin": {
10262        "requires": [
10263            "dd-drop"
10264        ]
10265    },
10266    "dd-gestures": {
10267        "condition": {
10268            "name": "dd-gestures",
10269            "trigger": "dd-drag",
10270            "ua": "touchEnabled"
10271        },
10272        "requires": [
10273            "dd-drag",
10274            "event-synthetic",
10275            "event-gestures"
10276        ]
10277    },
10278    "dd-plugin": {
10279        "optional": [
10280            "dd-constrain",
10281            "dd-proxy"
10282        ],
10283        "requires": [
10284            "dd-drag"
10285        ]
10286    },
10287    "dd-proxy": {
10288        "requires": [
10289            "dd-drag"
10290        ]
10291    },
10292    "dd-scroll": {
10293        "requires": [
10294            "dd-drag"
10295        ]
10296    },
10297    "dial": {
10298        "lang": [
10299            "en",
10300            "es",
10301            "hu"
10302        ],
10303        "requires": [
10304            "widget",
10305            "dd-drag",
10306            "event-mouseenter",
10307            "event-move",
10308            "event-key",
10309            "transition",
10310            "intl"
10311        ],
10312        "skinnable": true
10313    },
10314    "dom": {
10315        "use": [
10316            "dom-base",
10317            "dom-screen",
10318            "dom-style",
10319            "selector-native",
10320            "selector"
10321        ]
10322    },
10323    "dom-base": {
10324        "requires": [
10325            "dom-core"
10326        ]
10327    },
10328    "dom-core": {
10329        "requires": [
10330            "oop",
10331            "features"
10332        ]
10333    },
10334    "dom-screen": {
10335        "requires": [
10336            "dom-base",
10337            "dom-style"
10338        ]
10339    },
10340    "dom-style": {
10341        "requires": [
10342            "dom-base"
10343        ]
10344    },
10345    "dom-style-ie": {
10346        "condition": {
10347            "name": "dom-style-ie",
10348            "test": function (Y) {
10349
10350    var testFeature = Y.Features.test,
10351        addFeature = Y.Features.add,
10352        WINDOW = Y.config.win,
10353        DOCUMENT = Y.config.doc,
10354        DOCUMENT_ELEMENT = 'documentElement',
10355        ret = false;
10356
10357    addFeature('style', 'computedStyle', {
10358        test: function() {
10359            return WINDOW && 'getComputedStyle' in WINDOW;
10360        }
10361    });
10362
10363    addFeature('style', 'opacity', {
10364        test: function() {
10365            return DOCUMENT && 'opacity' in DOCUMENT[DOCUMENT_ELEMENT].style;
10366        }
10367    });
10368
10369    ret =  (!testFeature('style', 'opacity') &&
10370            !testFeature('style', 'computedStyle'));
10371
10372    return ret;
10373},
10374            "trigger": "dom-style"
10375        },
10376        "requires": [
10377            "dom-style",
10378            "color-base"
10379        ]
10380    },
10381    "dump": {
10382        "requires": [
10383            "yui-base"
10384        ]
10385    },
10386    "editor": {
10387        "use": [
10388            "frame",
10389            "editor-selection",
10390            "exec-command",
10391            "editor-base",
10392            "editor-para",
10393            "editor-br",
10394            "editor-bidi",
10395            "editor-tab",
10396            "createlink-base"
10397        ]
10398    },
10399    "editor-base": {
10400        "requires": [
10401            "base",
10402            "frame",
10403            "node",
10404            "exec-command",
10405            "editor-selection"
10406        ]
10407    },
10408    "editor-bidi": {
10409        "requires": [
10410            "editor-base"
10411        ]
10412    },
10413    "editor-br": {
10414        "requires": [
10415            "editor-base"
10416        ]
10417    },
10418    "editor-inline": {
10419        "requires": [
10420            "editor-base",
10421            "content-editable"
10422        ]
10423    },
10424    "editor-lists": {
10425        "requires": [
10426            "editor-base"
10427        ]
10428    },
10429    "editor-para": {
10430        "requires": [
10431            "editor-para-base"
10432        ]
10433    },
10434    "editor-para-base": {
10435        "requires": [
10436            "editor-base"
10437        ]
10438    },
10439    "editor-para-ie": {
10440        "condition": {
10441            "name": "editor-para-ie",
10442            "trigger": "editor-para",
10443            "ua": "ie",
10444            "when": "instead"
10445        },
10446        "requires": [
10447            "editor-para-base"
10448        ]
10449    },
10450    "editor-selection": {
10451        "requires": [
10452            "node"
10453        ]
10454    },
10455    "editor-tab": {
10456        "requires": [
10457            "editor-base"
10458        ]
10459    },
10460    "escape": {
10461        "requires": [
10462            "yui-base"
10463        ]
10464    },
10465    "event": {
10466        "after": [
10467            "node-base"
10468        ],
10469        "use": [
10470            "event-base",
10471            "event-delegate",
10472            "event-synthetic",
10473            "event-mousewheel",
10474            "event-mouseenter",
10475            "event-key",
10476            "event-focus",
10477            "event-resize",
10478            "event-hover",
10479            "event-outside",
10480            "event-touch",
10481            "event-move",
10482            "event-flick",
10483            "event-valuechange",
10484            "event-tap"
10485        ]
10486    },
10487    "event-base": {
10488        "after": [
10489            "node-base"
10490        ],
10491        "requires": [
10492            "event-custom-base"
10493        ]
10494    },
10495    "event-base-ie": {
10496        "after": [
10497            "event-base"
10498        ],
10499        "condition": {
10500            "name": "event-base-ie",
10501            "test": function(Y) {
10502    var imp = Y.config.doc && Y.config.doc.implementation;
10503    return (imp && (!imp.hasFeature('Events', '2.0')));
10504},
10505            "trigger": "node-base"
10506        },
10507        "requires": [
10508            "node-base"
10509        ]
10510    },
10511    "event-contextmenu": {
10512        "requires": [
10513            "event-synthetic",
10514            "dom-screen"
10515        ]
10516    },
10517    "event-custom": {
10518        "use": [
10519            "event-custom-base",
10520            "event-custom-complex"
10521        ]
10522    },
10523    "event-custom-base": {
10524        "requires": [
10525            "oop"
10526        ]
10527    },
10528    "event-custom-complex": {
10529        "requires": [
10530            "event-custom-base"
10531        ]
10532    },
10533    "event-delegate": {
10534        "requires": [
10535            "node-base"
10536        ]
10537    },
10538    "event-flick": {
10539        "requires": [
10540            "node-base",
10541            "event-touch",
10542            "event-synthetic"
10543        ]
10544    },
10545    "event-focus": {
10546        "requires": [
10547            "event-synthetic"
10548        ]
10549    },
10550    "event-gestures": {
10551        "use": [
10552            "event-flick",
10553            "event-move"
10554        ]
10555    },
10556    "event-hover": {
10557        "requires": [
10558            "event-mouseenter"
10559        ]
10560    },
10561    "event-key": {
10562        "requires": [
10563            "event-synthetic"
10564        ]
10565    },
10566    "event-mouseenter": {
10567        "requires": [
10568            "event-synthetic"
10569        ]
10570    },
10571    "event-mousewheel": {
10572        "requires": [
10573            "node-base"
10574        ]
10575    },
10576    "event-move": {
10577        "requires": [
10578            "node-base",
10579            "event-touch",
10580            "event-synthetic"
10581        ]
10582    },
10583    "event-outside": {
10584        "requires": [
10585            "event-synthetic"
10586        ]
10587    },
10588    "event-resize": {
10589        "requires": [
10590            "node-base",
10591            "event-synthetic"
10592        ]
10593    },
10594    "event-simulate": {
10595        "requires": [
10596            "event-base"
10597        ]
10598    },
10599    "event-synthetic": {
10600        "requires": [
10601            "node-base",
10602            "event-custom-complex"
10603        ]
10604    },
10605    "event-tap": {
10606        "requires": [
10607            "node-base",
10608            "event-base",
10609            "event-touch",
10610            "event-synthetic"
10611        ]
10612    },
10613    "event-touch": {
10614        "requires": [
10615            "node-base"
10616        ]
10617    },
10618    "event-valuechange": {
10619        "requires": [
10620            "event-focus",
10621            "event-synthetic"
10622        ]
10623    },
10624    "exec-command": {
10625        "requires": [
10626            "frame"
10627        ]
10628    },
10629    "features": {
10630        "requires": [
10631            "yui-base"
10632        ]
10633    },
10634    "file": {
10635        "requires": [
10636            "file-flash",
10637            "file-html5"
10638        ]
10639    },
10640    "file-flash": {
10641        "requires": [
10642            "base"
10643        ]
10644    },
10645    "file-html5": {
10646        "requires": [
10647            "base"
10648        ]
10649    },
10650    "frame": {
10651        "requires": [
10652            "base",
10653            "node",
10654            "plugin",
10655            "selector-css3",
10656            "yui-throttle"
10657        ]
10658    },
10659    "gesture-simulate": {
10660        "requires": [
10661            "async-queue",
10662            "event-simulate",
10663            "node-screen"
10664        ]
10665    },
10666    "get": {
10667        "requires": [
10668            "yui-base"
10669        ]
10670    },
10671    "graphics": {
10672        "requires": [
10673            "node",
10674            "event-custom",
10675            "pluginhost",
10676            "matrix",
10677            "classnamemanager"
10678        ]
10679    },
10680    "graphics-canvas": {
10681        "condition": {
10682            "name": "graphics-canvas",
10683            "test": function(Y) {
10684    var DOCUMENT = Y.config.doc,
10685        useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas",
10686		canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
10687        svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
10688    return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d"));
10689},
10690            "trigger": "graphics"
10691        },
10692        "requires": [
10693            "graphics",
10694            "color-base"
10695        ]
10696    },
10697    "graphics-canvas-default": {
10698        "condition": {
10699            "name": "graphics-canvas-default",
10700            "test": function(Y) {
10701    var DOCUMENT = Y.config.doc,
10702        useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas",
10703		canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
10704        svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
10705    return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d"));
10706},
10707            "trigger": "graphics"
10708        }
10709    },
10710    "graphics-group": {
10711        "requires": [
10712            "graphics"
10713        ]
10714    },
10715    "graphics-svg": {
10716        "condition": {
10717            "name": "graphics-svg",
10718            "test": function(Y) {
10719    var DOCUMENT = Y.config.doc,
10720        useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas",
10721		canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
10722        svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
10723
10724    return svg && (useSVG || !canvas);
10725},
10726            "trigger": "graphics"
10727        },
10728        "requires": [
10729            "graphics"
10730        ]
10731    },
10732    "graphics-svg-default": {
10733        "condition": {
10734            "name": "graphics-svg-default",
10735            "test": function(Y) {
10736    var DOCUMENT = Y.config.doc,
10737        useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas",
10738		canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
10739        svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
10740
10741    return svg && (useSVG || !canvas);
10742},
10743            "trigger": "graphics"
10744        }
10745    },
10746    "graphics-vml": {
10747        "condition": {
10748            "name": "graphics-vml",
10749            "test": function(Y) {
10750    var DOCUMENT = Y.config.doc,
10751		canvas = DOCUMENT && DOCUMENT.createElement("canvas");
10752    return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (!canvas || !canvas.getContext || !canvas.getContext("2d")));
10753},
10754            "trigger": "graphics"
10755        },
10756        "requires": [
10757            "graphics",
10758            "color-base"
10759        ]
10760    },
10761    "graphics-vml-default": {
10762        "condition": {
10763            "name": "graphics-vml-default",
10764            "test": function(Y) {
10765    var DOCUMENT = Y.config.doc,
10766		canvas = DOCUMENT && DOCUMENT.createElement("canvas");
10767    return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (!canvas || !canvas.getContext || !canvas.getContext("2d")));
10768},
10769            "trigger": "graphics"
10770        }
10771    },
10772    "handlebars": {
10773        "use": [
10774            "handlebars-compiler"
10775        ]
10776    },
10777    "handlebars-base": {
10778        "requires": []
10779    },
10780    "handlebars-compiler": {
10781        "requires": [
10782            "handlebars-base"
10783        ]
10784    },
10785    "highlight": {
10786        "use": [
10787            "highlight-base",
10788            "highlight-accentfold"
10789        ]
10790    },
10791    "highlight-accentfold": {
10792        "requires": [
10793            "highlight-base",
10794            "text-accentfold"
10795        ]
10796    },
10797    "highlight-base": {
10798        "requires": [
10799            "array-extras",
10800            "classnamemanager",
10801            "escape",
10802            "text-wordbreak"
10803        ]
10804    },
10805    "history": {
10806        "use": [
10807            "history-base",
10808            "history-hash",
10809            "history-html5"
10810        ]
10811    },
10812    "history-base": {
10813        "requires": [
10814            "event-custom-complex"
10815        ]
10816    },
10817    "history-hash": {
10818        "after": [
10819            "history-html5"
10820        ],
10821        "requires": [
10822            "event-synthetic",
10823            "history-base",
10824            "yui-later"
10825        ]
10826    },
10827    "history-hash-ie": {
10828        "condition": {
10829            "name": "history-hash-ie",
10830            "test": function (Y) {
10831    var docMode = Y.config.doc && Y.config.doc.documentMode;
10832
10833    return Y.UA.ie && (!('onhashchange' in Y.config.win) ||
10834            !docMode || docMode < 8);
10835},
10836            "trigger": "history-hash"
10837        },
10838        "requires": [
10839            "history-hash",
10840            "node-base"
10841        ]
10842    },
10843    "history-html5": {
10844        "optional": [
10845            "json"
10846        ],
10847        "requires": [
10848            "event-base",
10849            "history-base",
10850            "node-base"
10851        ]
10852    },
10853    "imageloader": {
10854        "requires": [
10855            "base-base",
10856            "node-style",
10857            "node-screen"
10858        ]
10859    },
10860    "intl": {
10861        "requires": [
10862            "intl-base",
10863            "event-custom"
10864        ]
10865    },
10866    "intl-base": {
10867        "requires": [
10868            "yui-base"
10869        ]
10870    },
10871    "io": {
10872        "use": [
10873            "io-base",
10874            "io-xdr",
10875            "io-form",
10876            "io-upload-iframe",
10877            "io-queue"
10878        ]
10879    },
10880    "io-base": {
10881        "requires": [
10882            "event-custom-base",
10883            "querystring-stringify-simple"
10884        ]
10885    },
10886    "io-form": {
10887        "requires": [
10888            "io-base",
10889            "node-base"
10890        ]
10891    },
10892    "io-nodejs": {
10893        "condition": {
10894            "name": "io-nodejs",
10895            "trigger": "io-base",
10896            "ua": "nodejs"
10897        },
10898        "requires": [
10899            "io-base"
10900        ]
10901    },
10902    "io-queue": {
10903        "requires": [
10904            "io-base",
10905            "queue-promote"
10906        ]
10907    },
10908    "io-upload-iframe": {
10909        "requires": [
10910            "io-base",
10911            "node-base"
10912        ]
10913    },
10914    "io-xdr": {
10915        "requires": [
10916            "io-base",
10917            "datatype-xml-parse"
10918        ]
10919    },
10920    "json": {
10921        "use": [
10922            "json-parse",
10923            "json-stringify"
10924        ]
10925    },
10926    "json-parse": {
10927        "requires": [
10928            "yui-base"
10929        ]
10930    },
10931    "json-parse-shim": {
10932        "condition": {
10933            "name": "json-parse-shim",
10934            "test": function (Y) {
10935    var _JSON = Y.config.global.JSON,
10936        Native = Object.prototype.toString.call(_JSON) === '[object JSON]' && _JSON,
10937        nativeSupport = Y.config.useNativeJSONParse !== false && !!Native;
10938
10939    function workingNative( k, v ) {
10940        return k === "ok" ? true : v;
10941    }
10942
10943    // Double check basic functionality.  This is mainly to catch early broken
10944    // implementations of the JSON API in Firefox 3.1 beta1 and beta2
10945    if ( nativeSupport ) {
10946        try {
10947            nativeSupport = ( Native.parse( '{"ok":false}', workingNative ) ).ok;
10948        }
10949        catch ( e ) {
10950            nativeSupport = false;
10951        }
10952    }
10953
10954    return !nativeSupport;
10955},
10956            "trigger": "json-parse"
10957        },
10958        "requires": [
10959            "json-parse"
10960        ]
10961    },
10962    "json-stringify": {
10963        "requires": [
10964            "yui-base"
10965        ]
10966    },
10967    "json-stringify-shim": {
10968        "condition": {
10969            "name": "json-stringify-shim",
10970            "test": function (Y) {
10971    var _JSON = Y.config.global.JSON,
10972        Native = Object.prototype.toString.call(_JSON) === '[object JSON]' && _JSON,
10973        nativeSupport = Y.config.useNativeJSONStringify !== false && !!Native;
10974
10975    // Double check basic native functionality.  This is primarily to catch broken
10976    // early JSON API implementations in Firefox 3.1 beta1 and beta2.
10977    if ( nativeSupport ) {
10978        try {
10979            nativeSupport = ( '0' === Native.stringify(0) );
10980        } catch ( e ) {
10981            nativeSupport = false;
10982        }
10983    }
10984
10985
10986    return !nativeSupport;
10987},
10988            "trigger": "json-stringify"
10989        },
10990        "requires": [
10991            "json-stringify"
10992        ]
10993    },
10994    "jsonp": {
10995        "requires": [
10996            "get",
10997            "oop"
10998        ]
10999    },
11000    "jsonp-url": {
11001        "requires": [
11002            "jsonp"
11003        ]
11004    },
11005    "lazy-model-list": {
11006        "requires": [
11007            "model-list"
11008        ]
11009    },
11010    "loader": {
11011        "use": [
11012            "loader-base",
11013            "loader-rollup",
11014            "loader-yui3"
11015        ]
11016    },
11017    "loader-base": {
11018        "requires": [
11019            "get",
11020            "features"
11021        ]
11022    },
11023    "loader-pathogen-combohandler": {},
11024    "loader-pathogen-encoder": {
11025        "use": [
11026            "loader-base",
11027            "loader-rollup",
11028            "loader-yui3",
11029            "loader-pathogen-combohandler"
11030        ]
11031    },
11032    "loader-rollup": {
11033        "requires": [
11034            "loader-base"
11035        ]
11036    },
11037    "loader-yui3": {
11038        "requires": [
11039            "loader-base"
11040        ]
11041    },
11042    "matrix": {
11043        "requires": [
11044            "yui-base"
11045        ]
11046    },
11047    "model": {
11048        "requires": [
11049            "base-build",
11050            "escape",
11051            "json-parse"
11052        ]
11053    },
11054    "model-list": {
11055        "requires": [
11056            "array-extras",
11057            "array-invoke",
11058            "arraylist",
11059            "base-build",
11060            "escape",
11061            "json-parse",
11062            "model"
11063        ]
11064    },
11065    "model-sync-local": {
11066        "requires": [
11067            "model",
11068            "json-stringify"
11069        ]
11070    },
11071    "model-sync-rest": {
11072        "requires": [
11073            "model",
11074            "io-base",
11075            "json-stringify"
11076        ]
11077    },
11078    "node": {
11079        "use": [
11080            "node-base",
11081            "node-event-delegate",
11082            "node-pluginhost",
11083            "node-screen",
11084            "node-style"
11085        ]
11086    },
11087    "node-base": {
11088        "requires": [
11089            "event-base",
11090            "node-core",
11091            "dom-base",
11092            "dom-style"
11093        ]
11094    },
11095    "node-core": {
11096        "requires": [
11097            "dom-core",
11098            "selector"
11099        ]
11100    },
11101    "node-event-delegate": {
11102        "requires": [
11103            "node-base",
11104            "event-delegate"
11105        ]
11106    },
11107    "node-event-html5": {
11108        "requires": [
11109            "node-base"
11110        ]
11111    },
11112    "node-event-simulate": {
11113        "requires": [
11114            "node-base",
11115            "event-simulate",
11116            "gesture-simulate"
11117        ]
11118    },
11119    "node-flick": {
11120        "requires": [
11121            "classnamemanager",
11122            "transition",
11123            "event-flick",
11124            "plugin"
11125        ],
11126        "skinnable": true
11127    },
11128    "node-focusmanager": {
11129        "requires": [
11130            "attribute",
11131            "node",
11132            "plugin",
11133            "node-event-simulate",
11134            "event-key",
11135            "event-focus"
11136        ]
11137    },
11138    "node-load": {
11139        "requires": [
11140            "node-base",
11141            "io-base"
11142        ]
11143    },
11144    "node-menunav": {
11145        "requires": [
11146            "node",
11147            "classnamemanager",
11148            "plugin",
11149            "node-focusmanager"
11150        ],
11151        "skinnable": true
11152    },
11153    "node-pluginhost": {
11154        "requires": [
11155            "node-base",
11156            "pluginhost"
11157        ]
11158    },
11159    "node-screen": {
11160        "requires": [
11161            "dom-screen",
11162            "node-base"
11163        ]
11164    },
11165    "node-scroll-info": {
11166        "requires": [
11167            "array-extras",
11168            "base-build",
11169            "event-resize",
11170            "node-pluginhost",
11171            "plugin",
11172            "selector"
11173        ]
11174    },
11175    "node-style": {
11176        "requires": [
11177            "dom-style",
11178            "node-base"
11179        ]
11180    },
11181    "oop": {
11182        "requires": [
11183            "yui-base"
11184        ]
11185    },
11186    "overlay": {
11187        "requires": [
11188            "widget",
11189            "widget-stdmod",
11190            "widget-position",
11191            "widget-position-align",
11192            "widget-stack",
11193            "widget-position-constrain"
11194        ],
11195        "skinnable": true
11196    },
11197    "paginator": {
11198        "requires": [
11199            "paginator-core"
11200        ]
11201    },
11202    "paginator-core": {
11203        "requires": [
11204            "base"
11205        ]
11206    },
11207    "paginator-url": {
11208        "requires": [
11209            "paginator"
11210        ]
11211    },
11212    "panel": {
11213        "requires": [
11214            "widget",
11215            "widget-autohide",
11216            "widget-buttons",
11217            "widget-modality",
11218            "widget-position",
11219            "widget-position-align",
11220            "widget-position-constrain",
11221            "widget-stack",
11222            "widget-stdmod"
11223        ],
11224        "skinnable": true
11225    },
11226    "parallel": {
11227        "requires": [
11228            "yui-base"
11229        ]
11230    },
11231    "pjax": {
11232        "requires": [
11233            "pjax-base",
11234            "pjax-content"
11235        ]
11236    },
11237    "pjax-base": {
11238        "requires": [
11239            "classnamemanager",
11240            "node-event-delegate",
11241            "router"
11242        ]
11243    },
11244    "pjax-content": {
11245        "requires": [
11246            "io-base",
11247            "node-base",
11248            "router"
11249        ]
11250    },
11251    "pjax-plugin": {
11252        "requires": [
11253            "node-pluginhost",
11254            "pjax",
11255            "plugin"
11256        ]
11257    },
11258    "plugin": {
11259        "requires": [
11260            "base-base"
11261        ]
11262    },
11263    "pluginhost": {
11264        "use": [
11265            "pluginhost-base",
11266            "pluginhost-config"
11267        ]
11268    },
11269    "pluginhost-base": {
11270        "requires": [
11271            "yui-base"
11272        ]
11273    },
11274    "pluginhost-config": {
11275        "requires": [
11276            "pluginhost-base"
11277        ]
11278    },
11279    "promise": {
11280        "requires": [
11281            "timers"
11282        ]
11283    },
11284    "querystring": {
11285        "use": [
11286            "querystring-parse",
11287            "querystring-stringify"
11288        ]
11289    },
11290    "querystring-parse": {
11291        "requires": [
11292            "yui-base",
11293            "array-extras"
11294        ]
11295    },
11296    "querystring-parse-simple": {
11297        "requires": [
11298            "yui-base"
11299        ]
11300    },
11301    "querystring-stringify": {
11302        "requires": [
11303            "yui-base"
11304        ]
11305    },
11306    "querystring-stringify-simple": {
11307        "requires": [
11308            "yui-base"
11309        ]
11310    },
11311    "queue-promote": {
11312        "requires": [
11313            "yui-base"
11314        ]
11315    },
11316    "range-slider": {
11317        "requires": [
11318            "slider-base",
11319            "slider-value-range",
11320            "clickable-rail"
11321        ]
11322    },
11323    "recordset": {
11324        "use": [
11325            "recordset-base",
11326            "recordset-sort",
11327            "recordset-filter",
11328            "recordset-indexer"
11329        ]
11330    },
11331    "recordset-base": {
11332        "requires": [
11333            "base",
11334            "arraylist"
11335        ]
11336    },
11337    "recordset-filter": {
11338        "requires": [
11339            "recordset-base",
11340            "array-extras",
11341            "plugin"
11342        ]
11343    },
11344    "recordset-indexer": {
11345        "requires": [
11346            "recordset-base",
11347            "plugin"
11348        ]
11349    },
11350    "recordset-sort": {
11351        "requires": [
11352            "arraysort",
11353            "recordset-base",
11354            "plugin"
11355        ]
11356    },
11357    "resize": {
11358        "use": [
11359            "resize-base",
11360            "resize-proxy",
11361            "resize-constrain"
11362        ]
11363    },
11364    "resize-base": {
11365        "requires": [
11366            "base",
11367            "widget",
11368            "event",
11369            "oop",
11370            "dd-drag",
11371            "dd-delegate",
11372            "dd-drop"
11373        ],
11374        "skinnable": true
11375    },
11376    "resize-constrain": {
11377        "requires": [
11378            "plugin",
11379            "resize-base"
11380        ]
11381    },
11382    "resize-plugin": {
11383        "optional": [
11384            "resize-constrain"
11385        ],
11386        "requires": [
11387            "resize-base",
11388            "plugin"
11389        ]
11390    },
11391    "resize-proxy": {
11392        "requires": [
11393            "plugin",
11394            "resize-base"
11395        ]
11396    },
11397    "router": {
11398        "optional": [
11399            "querystring-parse"
11400        ],
11401        "requires": [
11402            "array-extras",
11403            "base-build",
11404            "history"
11405        ]
11406    },
11407    "scrollview": {
11408        "requires": [
11409            "scrollview-base",
11410            "scrollview-scrollbars"
11411        ]
11412    },
11413    "scrollview-base": {
11414        "requires": [
11415            "widget",
11416            "event-gestures",
11417            "event-mousewheel",
11418            "transition"
11419        ],
11420        "skinnable": true
11421    },
11422    "scrollview-base-ie": {
11423        "condition": {
11424            "name": "scrollview-base-ie",
11425            "trigger": "scrollview-base",
11426            "ua": "ie"
11427        },
11428        "requires": [
11429            "scrollview-base"
11430        ]
11431    },
11432    "scrollview-list": {
11433        "requires": [
11434            "plugin",
11435            "classnamemanager"
11436        ],
11437        "skinnable": true
11438    },
11439    "scrollview-paginator": {
11440        "requires": [
11441            "plugin",
11442            "classnamemanager"
11443        ]
11444    },
11445    "scrollview-scrollbars": {
11446        "requires": [
11447            "classnamemanager",
11448            "transition",
11449            "plugin"
11450        ],
11451        "skinnable": true
11452    },
11453    "selector": {
11454        "requires": [
11455            "selector-native"
11456        ]
11457    },
11458    "selector-css2": {
11459        "condition": {
11460            "name": "selector-css2",
11461            "test": function (Y) {
11462    var DOCUMENT = Y.config.doc,
11463        ret = DOCUMENT && !('querySelectorAll' in DOCUMENT);
11464
11465    return ret;
11466},
11467            "trigger": "selector"
11468        },
11469        "requires": [
11470            "selector-native"
11471        ]
11472    },
11473    "selector-css3": {
11474        "requires": [
11475            "selector-native",
11476            "selector-css2"
11477        ]
11478    },
11479    "selector-native": {
11480        "requires": [
11481            "dom-base"
11482        ]
11483    },
11484    "series-area": {
11485        "requires": [
11486            "series-cartesian",
11487            "series-fill-util"
11488        ]
11489    },
11490    "series-area-stacked": {
11491        "requires": [
11492            "series-stacked",
11493            "series-area"
11494        ]
11495    },
11496    "series-areaspline": {
11497        "requires": [
11498            "series-area",
11499            "series-curve-util"
11500        ]
11501    },
11502    "series-areaspline-stacked": {
11503        "requires": [
11504            "series-stacked",
11505            "series-areaspline"
11506        ]
11507    },
11508    "series-bar": {
11509        "requires": [
11510            "series-marker",
11511            "series-histogram-base"
11512        ]
11513    },
11514    "series-bar-stacked": {
11515        "requires": [
11516            "series-stacked",
11517            "series-bar"
11518        ]
11519    },
11520    "series-base": {
11521        "requires": [
11522            "graphics",
11523            "axis-base"
11524        ]
11525    },
11526    "series-candlestick": {
11527        "requires": [
11528            "series-range"
11529        ]
11530    },
11531    "series-cartesian": {
11532        "requires": [
11533            "series-base"
11534        ]
11535    },
11536    "series-column": {
11537        "requires": [
11538            "series-marker",
11539            "series-histogram-base"
11540        ]
11541    },
11542    "series-column-stacked": {
11543        "requires": [
11544            "series-stacked",
11545            "series-column"
11546        ]
11547    },
11548    "series-combo": {
11549        "requires": [
11550            "series-cartesian",
11551            "series-line-util",
11552            "series-plot-util",
11553            "series-fill-util"
11554        ]
11555    },
11556    "series-combo-stacked": {
11557        "requires": [
11558            "series-stacked",
11559            "series-combo"
11560        ]
11561    },
11562    "series-combospline": {
11563        "requires": [
11564            "series-combo",
11565            "series-curve-util"
11566        ]
11567    },
11568    "series-combospline-stacked": {
11569        "requires": [
11570            "series-combo-stacked",
11571            "series-curve-util"
11572        ]
11573    },
11574    "series-curve-util": {},
11575    "series-fill-util": {},
11576    "series-histogram-base": {
11577        "requires": [
11578            "series-cartesian",
11579            "series-plot-util"
11580        ]
11581    },
11582    "series-line": {
11583        "requires": [
11584            "series-cartesian",
11585            "series-line-util"
11586        ]
11587    },
11588    "series-line-stacked": {
11589        "requires": [
11590            "series-stacked",
11591            "series-line"
11592        ]
11593    },
11594    "series-line-util": {},
11595    "series-marker": {
11596        "requires": [
11597            "series-cartesian",
11598            "series-plot-util"
11599        ]
11600    },
11601    "series-marker-stacked": {
11602        "requires": [
11603            "series-stacked",
11604            "series-marker"
11605        ]
11606    },
11607    "series-ohlc": {
11608        "requires": [
11609            "series-range"
11610        ]
11611    },
11612    "series-pie": {
11613        "requires": [
11614            "series-base",
11615            "series-plot-util"
11616        ]
11617    },
11618    "series-plot-util": {},
11619    "series-range": {
11620        "requires": [
11621            "series-cartesian"
11622        ]
11623    },
11624    "series-spline": {
11625        "requires": [
11626            "series-line",
11627            "series-curve-util"
11628        ]
11629    },
11630    "series-spline-stacked": {
11631        "requires": [
11632            "series-stacked",
11633            "series-spline"
11634        ]
11635    },
11636    "series-stacked": {
11637        "requires": [
11638            "axis-stacked"
11639        ]
11640    },
11641    "shim-plugin": {
11642        "requires": [
11643            "node-style",
11644            "node-pluginhost"
11645        ]
11646    },
11647    "slider": {
11648        "use": [
11649            "slider-base",
11650            "slider-value-range",
11651            "clickable-rail",
11652            "range-slider"
11653        ]
11654    },
11655    "slider-base": {
11656        "requires": [
11657            "widget",
11658            "dd-constrain",
11659            "event-key"
11660        ],
11661        "skinnable": true
11662    },
11663    "slider-value-range": {
11664        "requires": [
11665            "slider-base"
11666        ]
11667    },
11668    "sortable": {
11669        "requires": [
11670            "dd-delegate",
11671            "dd-drop-plugin",
11672            "dd-proxy"
11673        ]
11674    },
11675    "sortable-scroll": {
11676        "requires": [
11677            "dd-scroll",
11678            "sortable"
11679        ]
11680    },
11681    "stylesheet": {
11682        "requires": [
11683            "yui-base"
11684        ]
11685    },
11686    "substitute": {
11687        "optional": [
11688            "dump"
11689        ],
11690        "requires": [
11691            "yui-base"
11692        ]
11693    },
11694    "swf": {
11695        "requires": [
11696            "event-custom",
11697            "node",
11698            "swfdetect",
11699            "escape"
11700        ]
11701    },
11702    "swfdetect": {
11703        "requires": [
11704            "yui-base"
11705        ]
11706    },
11707    "tabview": {
11708        "requires": [
11709            "widget",
11710            "widget-parent",
11711            "widget-child",
11712            "tabview-base",
11713            "node-pluginhost",
11714            "node-focusmanager"
11715        ],
11716        "skinnable": true
11717    },
11718    "tabview-base": {
11719        "requires": [
11720            "node-event-delegate",
11721            "classnamemanager"
11722        ]
11723    },
11724    "tabview-plugin": {
11725        "requires": [
11726            "tabview-base"
11727        ]
11728    },
11729    "template": {
11730        "use": [
11731            "template-base",
11732            "template-micro"
11733        ]
11734    },
11735    "template-base": {
11736        "requires": [
11737            "yui-base"
11738        ]
11739    },
11740    "template-micro": {
11741        "requires": [
11742            "escape"
11743        ]
11744    },
11745    "test": {
11746        "requires": [
11747            "event-simulate",
11748            "event-custom",
11749            "json-stringify"
11750        ]
11751    },
11752  
11752  "test-console": {
11753        "requires": [
11754            "console-filters",
11755            "test",
11756            "array-extras"
11757        ],
11758        "skinnable": true
11759    },
11760    "text": {
11761        "use": [
11762            "text-accentfold",
11763            "text-wordbreak"
11764        ]
11765    },
11766    "text-accentfold": {
11767        "requires": [
11768            "array-extras",
11769            "text-data-accentfold"
11770        ]
11771    },
11772    "text-data-accentfold": {
11773        "requires": [
11774            "yui-base"
11775        ]
11776    },
11777    "text-data-wordbreak": {
11778        "requires": [
11779            "yui-base"
11780        ]
11781    },
11782    "text-wordbreak": {
11783        "requires": [
11784            "array-extras",
11785            "text-data-wordbreak"
11786        ]
11787    },
11788    "timers": {
11789        "requires": [
11790            "yui-base"
11791        ]
11792    },
11793    "transition": {
11794        "requires": [
11795            "node-style"
11796        ]
11797    },
11798    "transition-timer": {
11799        "condition": {
11800            "name": "transition-timer",
11801            "test": function (Y) {
11802    var DOCUMENT = Y.config.doc,
11803        node = (DOCUMENT) ? DOCUMENT.documentElement: null,
11804        ret = true;
11805
11806    if (node && node.style) {
11807        ret = !('MozTransition' in node.style || 'WebkitTransition' in node.style || 'transition' in node.style);
11808    }
11809
11810    return ret;
11811},
11812            "trigger": "transition"
11813        },
11814        "requires": [
11815            "transition"
11816        ]
11817    },
11818    "tree": {
11819        "requires": [
11820            "base-build",
11821            "tree-node"
11822        ]
11823    },
11824    "tree-labelable": {
11825        "requires": [
11826            "tree"
11827        ]
11828    },
11829    "tree-lazy": {
11830        "requires": [
11831            "base-pluginhost",
11832            "plugin",
11833            "tree"
11834        ]
11835    },
11836    "tree-node": {},
11837    "tree-openable": {
11838        "requires": [
11839            "tree"
11840        ]
11841    },
11842    "tree-selectable": {
11843        "requires": [
11844            "tree"
11845        ]
11846    },
11847    "tree-sortable": {
11848        "requires": [
11849            "tree"
11850        ]
11851    },
11852    "uploader": {
11853        "requires": [
11854            "uploader-html5",
11855            "uploader-flash"
11856        ]
11857    },
11858    "uploader-flash": {
11859        "requires": [
11860            "swfdetect",
11861            "escape",
11862            "widget",
11863            "base",
11864            "cssbutton",
11865            "node",
11866            "event-custom",
11867            "uploader-queue"
11868        ]
11869    },
11870    "uploader-html5": {
11871        "requires": [
11872            "widget",
11873            "node-event-simulate",
11874            "file-html5",
11875            "uploader-queue"
11876        ]
11877    },
11878    "uploader-queue": {
11879        "requires": [
11880            "base"
11881        ]
11882    },
11883    "view": {
11884        "requires": [
11885            "base-build",
11886            "node-event-delegate"
11887        ]
11888    },
11889    "view-node-map": {
11890        "requires": [
11891            "view"
11892        ]
11893    },
11894    "widget": {
11895        "use": [
11896            "widget-base",
11897            "widget-htmlparser",
11898            "widget-skin",
11899            "widget-uievents"
11900        ]
11901    },
11902    "widget-anim": {
11903        "requires": [
11904            "anim-base",
11905            "plugin",
11906            "widget"
11907        ]
11908    },
11909    "widget-autohide": {
11910        "requires": [
11911            "base-build",
11912            "event-key",
11913            "event-outside",
11914            "widget"
11915        ]
11916    },
11917    "widget-base": {
11918        "requires": [
11919            "attribute",
11920            "base-base",
11921            "base-pluginhost",
11922            "classnamemanager",
11923            "event-focus",
11924            "node-base",
11925            "node-style"
11926        ],
11927        "skinnable": true
11928    },
11929    "widget-base-ie": {
11930        "condition": {
11931            "name": "widget-base-ie",
11932            "trigger": "widget-base",
11933            "ua": "ie"
11934        },
11935        "requires": [
11936            "widget-base"
11937        ]
11938    },
11939    "widget-buttons": {
11940        "requires": [
11941            "button-plugin",
11942            "cssbutton",
11943            "widget-stdmod"
11944        ]
11945    },
11946    "widget-child": {
11947        "requires": [
11948            "base-build",
11949            "widget"
11950        ]
11951    },
11952    "widget-htmlparser": {
11953        "requires": [
11954            "widget-base"
11955        ]
11956    },
11957    "widget-modality": {
11958        "requires": [
11959            "base-build",
11960            "event-outside",
11961            "widget"
11962        ],
11963        "skinnable": true
11964    },
11965    "widget-parent": {
11966        "requires": [
11967            "arraylist",
11968            "base-build",
11969            "widget"
11970        ]
11971    },
11972    "widget-position": {
11973        "requires": [
11974            "base-build",
11975            "node-screen",
11976            "widget"
11977        ]
11978    },
11979    "widget-position-align": {
11980        "requires": [
11981            "widget-position"
11982        ]
11983    },
11984    "widget-position-constrain": {
11985        "requires": [
11986            "widget-position"
11987        ]
11988    },
11989    "widget-skin": {
11990        "requires": [
11991            "widget-base"
11992        ]
11993    },
11994    "widget-stack": {
11995        "requires": [
11996            "base-build",
11997            "widget"
11998        ],
11999        "skinnable": true
12000    },
12001    "widget-stdmod": {
12002        "requires": [
12003            "base-build",
12004            "widget"
12005        ]
12006    },
12007    "widget-uievents": {
12008        "requires": [
12009            "node-event-delegate",
12010            "widget-base"
12011        ]
12012    },
12013    "yql": {
12014        "requires": [
12015            "oop"
12016        ]
12017    },
12018    "yql-jsonp": {
12019        "condition": {
12020            "name": "yql-jsonp",
12021            "test": function (Y) {
12022    /* Only load the JSONP module when not in nodejs or winjs
12023    TODO Make the winjs module a CORS module
12024    */
12025    return (!Y.UA.nodejs && !Y.UA.winjs);
12026},
12027            "trigger": "yql"
12028        },
12029        "requires": [
12030            "yql",
12031            "jsonp",
12032            "jsonp-url"
12033        ]
12034    },
12035    "yql-nodejs": {
12036        "condition": {
12037            "name": "yql-nodejs",
12038            "trigger": "yql",
12039            "ua": "nodejs"
12040        },
12041        "requires": [
12042            "yql"
12043        ]
12044    },
12045    "yql-winjs": {
12046        "condition": {
12047            "name": "yql-winjs",
12048            "trigger": "yql",
12049            "ua": "winjs"
12050        },
12051        "requires": [
12052            "yql"
12053        ]
12054    },
12055    "yui": {},
12056    "yui-base": {},
12057    "yui-later": {
12058        "requires": [
12059            "yui-base"
12060        ]
12061    },
12062    "yui-log": {
12063        "requires": [
12064            "yui-base"
12065        ]
12066    },
12067    "yui-throttle": {
12068        "requires": [
12069            "yui-base"
12070        ]
12071    }
12072});
12073YUI.Env[Y.version].md5 = '95eb05a1b097773b5af03e0680e7dda4';
12074
12075
12076}, 'patched-v3.18.7', {"requires": ["loader-base"]});
12077YUI.add('yui', function (Y, NAME) {}, 'patched-v3.18.7', {
12078    "use": [
12079        "yui-base",
12080        "get",
12081        "features",
12082        "intl-base",
12083        "yui-log",
12084        "yui-later",
12085        "loader-base",
12086        "loader-rollup",
12087        "loader-yui3"
12088    ]
12089});
12090YUI.add('aui-base-core', function (A, NAME) {
12091
12092var Y = A;
12093YUI.Env.aliases = YUI.Env.aliases || {};
12094Y.mix(YUI.Env.aliases, {
12095    "aui-autosize": ["aui-autosize-iframe"],
12096    "aui-base": ["oop","yui-throttle","aui-classnamemanager","aui-debounce","aui-base-core","aui-base-lang","aui-node-base"],
12097    "aui-base-deprecated": ["aui-base","aui-node","aui-component","aui-delayed-task-deprecated","aui-selector","aui-event-base"],
12098    "aui-button": ["aui-button-core"],
12099    "aui-collection": ["aui-map","aui-set","aui-linkedset"],
12100    "aui-color-picker-deprecated": ["aui-color-picker-base-deprecated","aui-color-picker-grid-plugin-deprecated"],
12101    "aui-datasource-control-deprecated": ["aui-datasource-control-base-deprecated","aui-input-text-control-deprecated"],
12102    "aui-datatable": ["aui-datatable-edit","aui-datatable-highlight","aui-datatable-selection","aui-datatable-property-list"],
12103    "aui-datatable-edit": ["datatable-base","calendar","overlay","sortable","aui-datatype","aui-toolbar","aui-form-validator","aui-datatable-base-cell-editor","aui-datatable-base-options-cell-editor","aui-datatable-cell-editor-support","aui-datatable-core","aui-datatable-checkbox-cell-editor","aui-datatable-date-cell-editor","aui-datatable-dropdown-cell-editor","aui-datatable-radio-cell-editor","aui-datatable-text-cell-editor","aui-datatable-text-area-cell-editor"],
12104    "aui-datepicker-deprecated": ["aui-datepicker-base-deprecated","aui-datepicker-select-deprecated"],
12105    "aui-event": ["aui-event-base"],
12106    "aui-form-deprecated": ["aui-form-base-deprecated","aui-form-combobox-deprecated","aui-form-field-deprecated","aui-form-select-deprecated","aui-form-textarea-deprecated","aui-form-textfield-deprecated"],
12107    "aui-io": ["aui-io-request"],
12108    "aui-io-deprecated": ["aui-io-request","aui-io-plugin-deprecated"],
12109    "aui-node": ["aui-node-base"],
12110    "aui-overlay-deprecated": ["aui-overlay-base-deprecated","aui-overlay-context-deprecated","aui-overlay-context-panel-deprecated","aui-overlay-manager-deprecated","aui-overlay-mask-deprecated"],
12111    "aui-rating": ["aui-rating-base","aui-rating-thumb"],
12112    "aui-resize-deprecated": ["aui-resize-base-deprecated","aui-resize-constrain-deprecated"],
12113    "aui-scheduler": ["event-gestures","aui-scheduler-base","aui-scheduler-event-recorder","aui-scheduler-view-agenda","aui-scheduler-view-day","aui-scheduler-view-month","aui-scheduler-view-table-dd","aui-scheduler-view-table","aui-scheduler-view-week","aui-viewport"],
12114    "aui-search": ["aui-search-tst"],
12115    "aui-sortable": ["aui-sortable-layout","aui-sortable-list"],
12116    "aui-surface": ["aui-surface-app","aui-surface-screen"],
12117    "aui-toggler": ["aui-toggler-base","aui-toggler-delegate"],
12118    "aui-tooltip": ["aui-tooltip-base","aui-tooltip-delegate"],
12119    "aui-tpl-snippets-deprecated": ["aui-tpl-snippets-base-deprecated","aui-tpl-snippets-checkbox-deprecated","aui-tpl-snippets-input-deprecated","aui-tpl-snippets-select-deprecated","aui-tpl-snippets-textarea-deprecated"],
12120    "aui-tree": ["aui-tree-data","aui-tree-io","aui-tree-node","aui-tree-paginator","aui-tree-view"],
12121    "aui-widget": ["aui-widget-cssclass","aui-widget-toolbars"],
12122    "aui-widget-core": ["aui-widget-cssclass"]
12123});
12124/* This file is auto-generated by (yogi loader --yes --mix --js js/aui-loader.js --json js/aui-loader.json --start ../) */
12125
12126/*jshint maxlen:900, eqeqeq: false */
12127
12128/**
12129 * YUI 3 module metadata
12130 * @module loader
12131 * @submodule loader-yui3
12132 */
12133YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {};
12134Y.mix(YUI.Env[Y.version].modules, {
12135    "aui-ace-autocomplete-base": {
12136        "requires": [
12137            "aui-ace-editor"
12138        ]
12139    },
12140    "aui-ace-autocomplete-freemarker": {
12141        "requires": [
12142            "aui-ace-autocomplete-templateprocessor"
12143        ]
12144    },
12145    "aui-ace-autocomplete-list": {
12146        "requires": [
12147            "aui-ace-autocomplete-base",
12148            "overlay",
12149            "widget-autohide"
12150        ],
12151        "skinnable": true
12152    },
12153    "aui-ace-autocomplete-plugin": {
12154        "requires": [
12155            "aui-ace-autocomplete-list",
12156            "plugin"
12157        ]
12158    },
12159    "aui-ace-autocomplete-templateprocessor": {
12160        "requires": [
12161            "aui-ace-autocomplete-base"
12162        ]
12163    },
12164    "aui-ace-autocomplete-velocity": {
12165        "requires": [
12166            "aui-ace-autocomplete-templateprocessor"
12167        ]
12168    },
12169    "aui-ace-editor": {
12170        "requires": [
12171            "aui-node",
12172            "aui-component"
12173        ]
12174    },
12175    "aui-affix": {
12176        "requires": [
12177            "base",
12178            "node-screen",
12179            "aui-node"
12180        ]
12181    },
12182    "aui-alert": {
12183        "requires": [
12184            "aui-aria",
12185            "aui-classnamemanager",
12186            "aui-widget-cssclass",
12187            "aui-widget-transition",
12188            "timers",
12189            "widget",
12190            "widget-stdmod"
12191        ],
12192        "skinnable": true
12193    },
12194    "aui-aria": {
12195        "requires": [
12196            "plugin",
12197            "aui-component"
12198        ]
12199    },
12200    "aui-aria-table-sortable": {
12201        "requires": [
12202            "aui-aria"
12203        ]
12204    },
12205    "aui-arraysort": {
12206        "requires": [
12207            "arraysort"
12208        ]
12209    },
12210    "aui-audio": {
12211        "requires": [
12212            "aui-aria",
12213            "aui-node",
12214            "aui-component",
12215            "node-event-html5",
12216            "querystring-stringify-simple"
12217        ],
12218        "skinnable": true
12219    },
12220    "aui-autocomplete-deprecated": {
12221        "requires": [
12222            "aui-base-deprecated",
12223            "aui-overlay-base-deprecated",
12224            "datasource",
12225            "dataschema",
12226            "aui-form-combobox-deprecated"
12227        ],
12228        "skinnable": true
12229    },
12230    "aui-autosize": {
12231        "use": [
12232            "aui-autosize-iframe"
12233        ]
12234    },
12235    "aui-autosize-deprecated": {
12236        "requires": [
12237            "event-valuechange",
12238            "plugin",
12239            "aui-base-deprecated"
12240        ],
12241        "skinnable": true
12242    },
12243    "aui-autosize-iframe": {
12244        "requires": [
12245            "plugin",
12246            "aui-component",
12247            "aui-timer",
12248            "aui-node-base"
12249        ]
12250    },
12251    "aui-base": {
12252        "use": [
12253            "oop",
12254            "yui-throttle",
12255            "aui-classnamemanager",
12256            "aui-debounce",
12257            "aui-base-core",
12258            "aui-base-lang",
12259            "aui-node-base"
12260        ]
12261    },
12262    "aui-base-core": {},
12263    "aui-base-deprecated": {
12264        "use": [
12265            "aui-base",
12266            "aui-node",
12267            "aui-component",
12268            "aui-delayed-task-deprecated",
12269            "aui-selector",
12270            "aui-event-base"
12271        ]
12272    },
12273    "aui-base-html5-shiv": {
12274        "condition": {
12275            "name": "aui-base-html5-shiv",
12276            "trigger": "node-base",
12277            "ua": "ie"
12278        }
12279    },
12280    "aui-base-lang": {},
12281    "aui-boolean-data-editor": {
12282        "requires": [
12283            "aui-button-switch",
12284            "aui-data-editor"
12285        ]
12286    },
12287    "aui-button": {
12288        "use": [
12289            "aui-button-core"
12290        ]
12291    },
12292    "aui-button-core": {
12293        "requires": [
12294            "button",
12295            "button-group",
12296            "button-plugin",
12297            "aui-component",
12298            "aui-widget-cssclass",
12299            "aui-widget-toggle"
12300        ],
12301        "skinnable": true
12302    },
12303    "aui-button-item-deprecated": {
12304        "requires": [
12305            "aui-base-deprecated",
12306            "aui-state-interaction-deprecated",
12307            "widget-child"
12308        ],
12309        "skinnable": true
12310    },
12311    "aui-button-search-cancel": {
12312        "requires": [
12313            "array-invoke",
12314            "base",
12315            "base-build",
12316            "event-focus",
12317            "event-move",
12318            "event-resize",
12319            "node-screen",
12320            "node-event-delegate",
12321            "aui-node-base",
12322            "aui-classnamemanager",
12323            "aui-event-input"
12324        ]
12325    },
12326    "aui-button-switch": {
12327        "requires": [
12328            "aui-node-base",
12329            "base-build",
12330            "event-key",
12331            "transition",
12332            "widget"
12333        ],
12334        "skinnable": true
12335    },
12336    "aui-carousel": {
12337        "requires": [
12338            "anim",
12339            "aui-event",
12340            "aui-image-viewer-base",
12341            "aui-image-viewer-slideshow",
12342            "node-event-delegate",
12343            "node-focusmanager"
12344        ],
12345        "skinnable": true
12346    },
12347    "aui-carousel-mobile-touch": {
12348        "condition": {
12349            "name": "aui-carousel-mobile-touch",
12350            "test": function(A) {
12351    return A.UA.mobile && A.UA.touchEnabled;
12352},
12353            "trigger": "aui-carousel"
12354        },
12355        "requires": [
12356            "base-build",
12357            "aui-carousel"
12358        ]
12359    },
12360    "aui-carousel-swipe": {
12361        "condition": {
12362            "name": "aui-carousel-swipe",
12363            "trigger": "aui-carousel",
12364            "ua": "touchEnabled"
12365        },
12366        "requires": [
12367            "aui-carousel",
12368            "aui-widget-swipe",
12369            "base-build"
12370        ],
12371        "skinnable": true
12372    },
12373    "aui-char-counter": {
12374        "requires": [
12375            "aui-aria",
12376            "aui-node",
12377            "aui-event-input",
12378            "aui-component"
12379        ]
12380    },
12381    "aui-chart-deprecated": {
12382        "requires": [
12383            "datasource",
12384            "json",
12385            "aui-swf-deprecated"
12386        ]
12387    },
12388    "aui-classnamemanager": {
12389        "requires": [
12390            "classnamemanager"
12391        ]
12392    },
12393    "aui-collection": {
12394        "use": [
12395            "aui-map",
12396            "aui-set",
12397            "aui-linkedset"
12398        ]
12399    },
12400    "aui-color-palette": {
12401        "requires": [
12402            "array-extras",
12403            "aui-palette",
12404            "color-base",
12405            "node-core",
12406            "aui-widget-cssclass",
12407            "aui-widget-toggle"
12408        ],
12409        "skinnable": true
12410    },
12411    "aui-color-picker-base": {
12412        "requires": [
12413            "aui-color-palette",
12414            "aui-hsva-palette-modal",
12415            "event-outside"
12416        ],
12417        "skinnable": true
12418    },
12419    "aui-color-picker-base-deprecated": {
12420        "requires": [
12421            "dd-drag",
12422            "panel",
12423            "slider",
12424            "aui-button-item-deprecated",
12425            "aui-color-util-deprecated",
12426            "aui-form-base-deprecated",
12427            "aui-overlay-context-deprecated"
12428        ],
12429        "skinnable": true
12430    },
12431    "aui-color-picker-deprecated": {
12432        "use": [
12433            "aui-color-picker-base-deprecated",
12434            "aui-color-picker-grid-plugin-deprecated"
12435        ]
12436    },
12437    "aui-color-picker-grid-plugin-deprecated": {
12438        "requires": [
12439            "plugin",
12440            "aui-color-picker-base-deprecated"
12441        ],
12442        "skinnable": true
12443    },
12444    "aui-color-picker-popover": {
12445        "requires": [
12446            "aui-color-picker-base",
12447            "aui-popover",
12448            "aui-widget-cssclass",
12449            "aui-widget-toggle"
12450        ],
12451        "skinnable": true
12452    },
12453    "aui-color-util-deprecated": {
12454        "requires": []
12455    },
12456    "aui-component": {
12457        "requires": [
12458            "aui-classnamemanager",
12459            "aui-widget-cssclass",
12460            "aui-widget-toggle",
12461            "base-build",
12462            "widget-base"
12463        ]
12464    },
12465    "aui-css": {
12466        "type": "css"
12467    },
12468    "aui-data-editor": {
12469        "requires": [
12470            "aui-classnamemanager",
12471            "base-build",
12472            "node-base"
12473        ],
12474        "skinnable": true
12475    },
12476    "aui-data-set-deprecated": {
12477        "requires": [
12478            "oop",
12479            "collection",
12480            "base"
12481        ]
12482    },
12483    "aui-datasource-control-base-deprecated": {
12484        "requires": [
12485            "datasource",
12486            "dataschema",
12487            "aui-base-deprecated"
12488        ]
12489    },
12490    "aui-datasource-control-deprecated": {
12491        "use": [
12492            "aui-datasource-control-base-deprecated",
12493            "aui-input-text-control-deprecated"
12494        ]
12495    },
12496    "aui-datatable": {
12497        "use": [
12498            "aui-datatable-edit",
12499            "aui-datatable-highlight",
12500            "aui-datatable-selection",
12501            "aui-datatable-property-list"
12502        ]
12503    },
12504    "aui-datatable-base-cell-editor": {
12505        "requires": [
12506            "datatable-base",
12507            "overlay"
12508        ],
12509        "skinnable": true
12510    },
12511    "aui-datatable-base-options-cell-editor": {
12512        "requires": [
12513            "aui-datatable-base-cell-editor",
12514            "escape"
12515        ],
12516        "skinnable": true
12517    },
12518    "aui-datatable-body": {
12519        "requires": [
12520            "aui-classnamemanager",
12521            "datatable-base",
12522            "event-key",
12523            "aui-event-base"
12524        ]
12525    },
12526    "aui-datatable-cell-editor-support": {
12527        "requires": [
12528            "datatable-base"
12529        ]
12530    },
12531    "aui-datatable-checkbox-cell-editor": {
12532        "requires": [
12533            "aui-datatable-base-options-cell-editor"
12534        ]
12535    },
12536    "aui-datatable-core": {
12537        "requires": [
12538            "aui-datatable-body",
12539            "datatable-base",
12540            "event-key",
12541            "aui-event-base"
12542        ],
12543        "skinnable": true
12544    },
12545    "aui-datatable-date-cell-editor": {
12546        "requires": [
12547            "aui-datatable-base-options-cell-editor"
12548        ]
12549    },
12550    "aui-datatable-dropdown-cell-editor": {
12551        "requires": [
12552            "aui-datatable-base-options-cell-editor"
12553        ]
12554    },
12555    "aui-datatable-edit": {
12556        "use": [
12557            "datatable-base",
12558            "calendar",
12559            "overlay",
12560            "sortable",
12561            "aui-datatype",
12562            "aui-toolbar",
12563            "aui-form-validator",
12564            "aui-datatable-base-cell-editor",
12565            "aui-datatable-base-options-cell-editor",
12566            "aui-datatable-cell-editor-support",
12567            "aui-datatable-core",
12568            "aui-datatable-checkbox-cell-editor",
12569            "aui-datatable-date-cell-editor",
12570            "aui-datatable-dropdown-cell-editor",
12571            "aui-datatable-radio-cell-editor",
12572            "aui-datatable-text-cell-editor",
12573            "aui-datatable-text-area-cell-editor"
12574        ]
12575    },
12576    "aui-datatable-highlight": {
12577        "requires": [
12578            "aui-datatable-selection"
12579        ],
12580        "skinnable": true
12581    },
12582    "aui-datatable-property-list": {
12583        "requires": [
12584            "datatable-scroll",
12585            "datatable-sort",
12586            "aui-datatable-core",
12587            "aui-datatable-edit",
12588            "aui-datatable-highlight",
12589            "aui-datatable-selection",
12590            "aui-widget-cssclass",
12591            "aui-widget-toggle"
12592        ],
12593        "skinnable": true
12594    },
12595    "aui-datatable-radio-cell-editor": {
12596        "requires": [
12597            "aui-datatable-base-options-cell-editor"
12598        ]
12599    },
12600    "aui-datatable-selection": {
12601        "requires": [
12602            "aui-datatable-core"
12603        ],
12604        "skinnable": true
12605    },
12606    "aui-datatable-text-area-cell-editor": {
12607        "requires": [
12608            "aui-datatable-base-options-cell-editor"
12609        ]
12610    },
12611    "aui-datatable-text-cell-editor": {
12612        "requires": [
12613            "aui-datatable-base-options-cell-editor"
12614        ]
12615    },
12616    "aui-datatype": {
12617        "requires": [
12618            "datatype",
12619            "aui-datatype-date-parse"
12620        ]
12621    },
12622    "aui-datatype-date-parse": {
12623        "requires": [
12624            "aui-base-lang",
12625            "datatype-date-format",
12626            "datatype-date-parse",
12627            "intl"
12628        ]
12629    },
12630    "aui-datepicker": {
12631        "requires": [
12632            "aui-aria",
12633            "aui-datepicker-delegate",
12634            "aui-datepicker-popover",
12635            "base",
12636            "base-build",
12637            "calendar"
12638        ],
12639        "skinnable": true
12640    },
12641    "aui-datepicker-base-deprecated": {
12642        "requires": [
12643            "calendar",
12644            "aui-datatype",
12645            "aui-overlay-context-deprecated"
12646        ],
12647        "skinnable": true
12648    },
12649    "aui-datepicker-delegate": {
12650        "requires": [
12651            "aui-datatype-date-parse",
12652            "aui-event-input",
12653            "event-focus",
12654            "node-event-delegate"
12655        ]
12656    },
12657    "aui-datepicker-deprecated": {
12658        "skinnable": true,
12659        "use": [
12660            "aui-datepicker-base-deprecated",
12661            "aui-datepicker-select-deprecated"
12662        ]
12663    },
12664    "aui-datepicker-native": {
12665        "requires": [
12666            "aui-datepicker-delegate",
12667            "aui-node-base",
12668            "base",
12669            "base-build"
12670        ]
12671    },
12672    "aui-datepicker-popover": {
12673        "requires": [
12674            "aui-classnamemanager",
12675            "aui-popover"
12676        ]
12677    },
12678    "aui-datepicker-select-deprecated": {
12679        "requires": [
12680            "aui-datepicker-base-deprecated",
12681            "aui-button-item-deprecated"
12682        ],
12683        "skinnable": true
12684    },
12685    "aui-debounce": {},
12686    "aui-delayed-task-deprecated": {
12687        "requires": [
12688            "yui-base"
12689        ]
12690    },
12691    "aui-diagram-builder": {
12692        "requires": [
12693            "aui-aria",
12694            "aui-map",
12695            "aui-property-builder",
12696            "aui-diagram-builder-connector",
12697            "aui-property-builder-settings",
12698            "aui-diagram-node-condition",
12699            "aui-diagram-node-end",
12700            "aui-diagram-node-fork",
12701            "aui-diagram-node-join",
12702            "aui-diagram-node-start",
12703            "aui-diagram-node-state",
12704            "aui-diagram-node-task",
12705            "overlay"
12706        ],
12707        "skinnable": true
12708    },
12709    "aui-diagram-builder-connector": {
12710        "requires": [
12711            "arraylist-add",
12712            "arraylist-filter",
12713            "escape",
12714            "json",
12715            "graphics",
12716            "dd"
12717        ],
12718        "skinnable": true
12719    },
12720    "aui-diagram-node": {
12721        "requires": [
12722            "aui-aria",
12723            "aui-diagram-node-manager-base",
12724            "escape",
12725            "overlay"
12726        ]
12727    },
12728    "aui-diagram-node-condition": {
12729        "requires": [
12730            "aui-diagram-node-state"
12731        ]
12732    },
12733    "aui-diagram-node-end": {
12734        "requires": [
12735            "aui-diagram-node-state"
12736        ]
12737    },
12738    "aui-diagram-node-fork": {
12739        "requires": [
12740            "aui-diagram-node-state"
12741        ]
12742    },
12743    "aui-diagram-node-join": {
12744        "requires": [
12745            "aui-diagram-node-state"
12746        ]
12747    },
12748    "aui-diagram-node-manager-base": {
12749        "requires": [
12750            "base"
12751        ]
12752    },
12753    "aui-diagram-node-start": {
12754        "requires": [
12755            "aui-diagram-node-state"
12756        ]
12757    },
12758    "aui-diagram-node-state": {
12759        "requires": [
12760            "aui-diagram-node"
12761        ]
12762    },
12763    "aui-diagram-node-task": {
12764        "requires": [
12765            "aui-diagram-node-state"
12766        ]
12767    },
12768    "aui-dialog-iframe-deprecated": {
12769        "requires": [
12770            "plugin",
12771            "array-invoke",
12772            "aui-base-deprecated",
12773            "aui-loading-mask-deprecated"
12774        ],
12775        "skinnable": true
12776    },
12777    "aui-dropdown": {
12778        "requires": [
12779            "event-delegate",
12780            "event-key",
12781            "event-outside",
12782            "node-focusmanager",
12783            "widget",
12784            "widget-stack",
12785            "aui-classnamemanager",
12786            "aui-node",
12787            "aui-widget-cssclass",
12788            "aui-widget-toggle",
12789            "aui-widget-trigger"
12790        ],
12791        "skinnable": true
12792    },
12793    "aui-editable-deprecated": {
12794        "requires": [
12795            "aui-base-deprecated",
12796            "aui-form-combobox-deprecated",
12797            "escape",
12798            "event-resize"
12799        ],
12800        "skinnable": true
12801    },
12802    "aui-event": {
12803        "use": [
12804            "aui-event-base"
12805        ]
12806    },
12807    "aui-event-base": {
12808        "requires": [
12809            "event-base"
12810        ]
12811    },
12812    "aui-event-delegate-change": {
12813        "condition": {
12814            "name": "aui-event-delegate-change",
12815            "trigger": "event-base-ie",
12816            "ua": "ie"
12817        },
12818        "requires": [
12819            "aui-event-base",
12820            "event-delegate",
12821            "event-synthetic"
12822        ]
12823    },
12824    "aui-event-delegate-submit": {
12825        "condition": {
12826            "name": "aui-event-delegate-submit",
12827            "trigger": "event-base-ie",
12828            "ua": "ie"
12829        },
12830        "requires": [
12831            "aui-event-base",
12832            "event-delegate",
12833            "event-synthetic"
12834        ]
12835    },
12836    "aui-event-input": {
12837        "condition": {
12838            "name": "aui-event-input",
12839            "test": function(A) {
12840    var supportsDOMEvent = A.supportsDOMEvent,
12841        testFeature = A.Features.test,
12842        addFeature = A.Features.add;
12843
12844    if (testFeature('event', 'input') === undefined) {
12845        addFeature('event', 'input', {
12846            test: function() {
12847                return supportsDOMEvent(document.createElement('textarea'), 'input') && (!A.UA.ie || A.UA.ie > 9);
12848            }
12849        });
12850    }
12851
12852    return !testFeature('event', 'input');
12853},
12854            "trigger": "aui-event-base"
12855        },
12856        "requires": [
12857            "aui-event-base",
12858            "event-delegate",
12859            "event-synthetic",
12860            "timers"
12861        ]
12862    },
12863    "aui-form-base-deprecated": {
12864        "requires": [
12865            "io-form",
12866            "querystring-parse",
12867            "aui-base-deprecated",
12868            "aui-data-set-deprecated",
12869            "aui-form-field-deprecated"
12870        ]
12871    },
12872    "aui-form-builder": {
12873        "requires": [
12874            "aui-modal",
12875            "aui-layout",
12876            "aui-form-builder-field-list",
12877            "aui-form-builder-field-toolbar",
12878            "aui-form-builder-field-type",
12879            "aui-form-builder-field-types",
12880            "aui-form-builder-layout-builder",
12881            "aui-form-builder-page-manager",
12882            "aui-form-builder-settings-modal",
12883            "event-focus",
12884            "event-tap"
12885        ],
12886        "skinnable": true
12887    },
12888    "aui-form-builder-available-field-deprecated": {
12889        "requires": [
12890            "aui-property-builder-available-field"
12891        ]
12892    },
12893    "aui-form-builder-deprecated": {
12894        "requires": [
12895            "aui-button",
12896            "aui-collection",
12897            "aui-form-builder-available-field-deprecated",
12898            "aui-form-builder-field-deprecated",
12899            "aui-form-builder-field-button-deprecated",
12900            "aui-form-builder-field-checkbox-deprecated",
12901            "aui-form-builder-field-fieldset-deprecated",
12902            "aui-form-builder-field-file-upload-deprecated",
12903            "aui-form-builder-field-multiple-choice-deprecated",
12904            "aui-form-builder-field-radio-deprecated",
12905            "aui-form-builder-field-select-deprecated",
12906            "aui-form-builder-field-text-deprecated",
12907            "aui-form-builder-field-textarea-deprecated",
12908            "aui-property-builder",
12909            "aui-property-builder-settings",
12910            "aui-sortable-list",
12911            "aui-tabview",
12912            "aui-tooltip-base",
12913            "escape",
12914            "transition"
12915        ],
12916        "skinnable": true
12917    },
12918    "aui-form-builder-field-base": {
12919        "requires": [
12920            "aui-classnamemanager",
12921            "aui-node-base",
12922            "aui-text-data-editor",
12923            "aui-toggler",
12924            "base",
12925            "node-base"
12926        ],
12927        "skinnable": true
12928    },
12929    "aui-form-builder-field-button-deprecated": {
12930        "requires": [
12931            "aui-form-builder-field-deprecated"
12932        ]
12933    },
12934    "aui-form-builder-field-checkbox-deprecated": {
12935        "requires": [
12936            "aui-form-builder-field-deprecated"
12937        ]
12938    },
12939    "aui-form-builder-field-choice": {
12940        "requires": [
12941            "aui-boolean-data-editor",
12942            "aui-options-data-editor",
12943            "aui-tabs-data-editor",
12944            "aui-form-builder-field-base",
12945            "aui-form-field-choice"
12946        ]
12947    },
12948    "aui-form-builder-field-deprecated": {
12949        "requires": [
12950            "panel",
12951            "aui-datatype",
12952            "aui-datatable-edit",
12953            "aui-property-builder-field-support"
12954        ],
12955        "skinnable": true
12956    },
12957    "aui-form-builder-field-fieldset-deprecated": {
12958        "requires": [
12959            "aui-form-builder-field-deprecated"
12960        ]
12961    },
12962    "aui-form-builder-field-file-upload-deprecated": {
12963        "requires": [
12964            "aui-form-builder-field-deprecated"
12965        ]
12966    },
12967    "aui-form-builder-field-list": {
12968        "requires": [
12969            "aui-form-builder-field-type",
12970            "aui-form-builder-field-types",
12971            "aui-form-builder-layout-builder"
12972        ],
12973        "skinnable": true
12974    },
12975    "aui-form-builder-field-multiple-choice-deprecated": {
12976        "requires": [
12977            "aui-form-builder-field-deprecated"
12978        ]
12979    },
12980    "aui-form-builder-field-radio-deprecated": {
12981        "requires": [
12982            "aui-form-builder-field-deprecated"
12983        ]
12984    },
12985    "aui-form-builder-field-select-deprecated": {
12986        "requires": [
12987            "aui-form-builder-field-deprecated"
12988        ]
12989    },
12990    "aui-form-builder-field-sentence": {
12991        "requires": [
12992            "aui-form-builder-field-base",
12993            "aui-form-field"
12994        ]
12995    },
12996    "aui-form-builder-field-text": {
12997        "requires": [
12998            "aui-boolean-data-editor",
12999            "aui-radio-group-data-editor",
13000            "aui-form-builder-field-base",
13001            "aui-form-field-text"
13002        ]
13003    },
13004    "aui-form-builder-field-text-deprecated": {
13005        "requires": [
13006            "aui-form-builder-field-deprecated"
13007        ]
13008    },
13009    "aui-form-builder-field-textarea-deprecated": {
13010        "requires": [
13011            "aui-form-builder-field-deprecated"
13012        ]
13013    },
13014    "aui-form-builder-field-toolbar": {
13015        "requires": [
13016            "aui-classnamemanager",
13017            "base",
13018            "node-base"
13019        ],
13020        "skinnable": true
13021    },
13022    "aui-form-builder-field-type": {
13023        "requires": [
13024            "base",
13025            "node-base"
13026        ],
13027        "skinnable": true
13028    },
13029    "aui-form-builder-field-types": {
13030        "requires": [
13031            "aui-classnamemanager",
13032            "aui-form-builder-field-types-modal",
13033            "base",
13034            "node-base"
13035        ],
13036        "skinnable": true
13037    },
13038    "aui-form-builder-field-types-modal": {
13039        "requires": [
13040            "aui-modal"
13041        ],
13042        "skinnable": true
13043    },
13044    "aui-form-builder-layout-builder": {
13045        "requires": [
13046            "aui-classnamemanager",
13047            "aui-layout-builder",
13048            "aui-modal",
13049            "base",
13050            "node-base"
13051        ],
13052        "skinnable": true
13053    },
13054    "aui-form-builder-page-manager": {
13055        "requires": [
13056            "aui-pagination",
13057            "aui-popover",
13058            "aui-tabview",
13059            "base",
13060            "event-valuechange",
13061            "node-base"
13062        ],
13063        "skinnable": true
13064    },
13065    "aui-form-builder-settings-modal": {
13066        "requires": [
13067            "aui-classnamemanager",
13068            "aui-modal",
13069            "base",
13070            "node-base"
13071        ],
13072        "skinnable": true
13073    },
13074    "aui-form-combobox-deprecated": {
13075        "requires": [
13076            "aui-form-textarea-deprecated",
13077            "aui-toolbar"
13078        ],
13079        "skinnable": true
13080    },
13081    "aui-form-deprecated": {
13082        "use": [
13083            "aui-form-base-deprecated",
13084            "aui-form-combobox-deprecated",
13085            "aui-form-field-deprecated",
13086            "aui-form-select-deprecated",
13087            "aui-form-textarea-deprecated",
13088            "aui-form-textfield-deprecated"
13089        ]
13090    },
13091    "aui-form-field": {
13092        "requires": [
13093            "aui-classnamemanager",
13094            "aui-node-base",
13095            "base-build"
13096        ],
13097        "skinnable": true
13098    },
13099    "aui-form-field-choice": {
13100        "requires": [
13101            "aui-form-field-required"
13102        ],
13103        "skinnable": true
13104    },
13105    "aui-form-field-deprecated": {
13106        "requires": [
13107            "aui-base-deprecated",
13108            "aui-component"
13109        ]
13110    },
13111    "aui-form-field-required": {
13112        "requires": [
13113            "aui-form-field"
13114        ]
13115    },
13116    "aui-form-field-text": {
13117        "requires": [
13118            "aui-form-field-required"
13119        ],
13120        "skinnable": true
13121    },
13122    "aui-form-select-deprecated": {
13123        "requires": [
13124            "aui-form-field-deprecated"
13125        ]
13126    },
13127    "aui-form-textarea-deprecated": {
13128        "requires": [
13129            "node-pluginhost",
13130            "aui-autosize-deprecated",
13131            "aui-form-textfield-deprecated"
13132        ]
13133    },
13134    "aui-form-textfield-deprecated": {
13135        "requires": [
13136            "aui-form-field-deprecated"
13137        ]
13138    },
13139    "aui-form-validator": {
13140        "requires": [
13141            "escape",
13142            "selector-css3",
13143            "node-event-delegate",
13144            "aui-node",
13145            "aui-component",
13146            "aui-event-input"
13147        ]
13148    },
13149    "aui-hsv-palette": {
13150        "requires": [
13151            "aui-classnamemanager",
13152            "aui-widget-cssclass",
13153            "aui-widget-toggle",
13154            "aui-event-input",
13155            "base-build",
13156            "clickable-rail",
13157            "color-hsv",
13158            "dd-constrain",
13159            "slider",
13160            "widget"
13161        ],
13162        "skinnable": true
13163    },
13164    "aui-hsva-palette": {
13165        "requires": [
13166            "aui-hsv-palette"
13167        ],
13168        "skinnable": true
13169    },
13170    "aui-hsva-palette-modal": {
13171        "requires": [
13172            "aui-hsva-palette",
13173            "aui-modal"
13174        ],
13175        "skinnable": true
13176    },
13177    "aui-image-cropper": {
13178        "requires": [
13179            "resize-base",
13180            "resize-constrain",
13181            "dd-constrain",
13182            "aui-node-base",
13183            "aui-component"
13184        ],
13185        "skinnable": true
13186    },
13187    "aui-image-viewer": {
13188        "requires": [
13189            "widget",
13190            "widget-modality",
13191            "widget-position",
13192            "widget-position-align",
13193            "widget-position-constrain",
13194            "widget-stack",
13195            "widget-stdmod",
13196            "aui-event",
13197            "aui-image-viewer-base",
13198            "aui-image-viewer-multiple",
13199            "aui-image-viewer-slideshow",
13200            "aui-node-base",
13201            "aui-widget-cssclass",
13202            "aui-widget-toggle"
13203        ],
13204        "skinnable": true
13205    },
13206    "aui-image-viewer-base": {
13207        "requires": [
13208            "anim",
13209            "aui-aria",
13210            "aui-classnamemanager",
13211            "aui-node",
13212            "aui-widget-responsive",
13213            "base-build",
13214            "imageloader",
13215            "node-base",
13216            "widget",
13217            "widget-stack"
13218        ],
13219        "skinnable": true
13220    },
13221    "aui-image-viewer-media": {
13222        "requires": [
13223            "plugin",
13224            "aui-component",
13225            "aui-image-viewer"
13226        ]
13227    },
13228    "aui-image-viewer-multiple": {
13229        "requires": [
13230            "base-build",
13231            "node-base",
13232            "aui-classnamemanager",
13233            "aui-image-viewer-base"
13234        ],
13235        "skinnable": true
13236    },
13237    "aui-image-viewer-multiple-swipe": {
13238        "condition": {
13239            "name": "aui-image-viewer-multiple-swipe",
13240            "trigger": "aui-image-viewer-multiple",
13241            "ua": "touchEnabled"
13242        },
13243        "requires": [
13244            "aui-image-viewer-multiple",
13245            "aui-image-viewer-swipe"
13246        ]
13247    },
13248    "aui-image-viewer-slideshow": {
13249        "requires": [
13250            "node",
13251            "aui-classnamemanager"
13252        ]
13253    },
13254    "aui-image-viewer-swipe": {
13255        "condition": {
13256            "name": "aui-image-viewer-swipe",
13257            "trigger": "aui-image-viewer-base",
13258            "ua": "touchEnabled"
13259        },
13260        "requires": [
13261            "event-resize",
13262            "aui-image-viewer-base",
13263            "aui-widget-swipe"
13264        ]
13265    },
13266    "aui-input-text-control-deprecated": {
13267        "requires": [
13268            "aui-base-deprecated",
13269            "aui-datasource-control-base-deprecated",
13270            "aui-form-combobox-deprecated"
13271        ]
13272    },
13273    "aui-io": {
13274        "use": [
13275            "aui-io-request"
13276        ]
13277    },
13278    "aui-io-deprecated": {
13279        "use": [
13280            "aui-io-request",
13281            "aui-io-plugin-deprecated"
13282        ]
13283    },
13284    "aui-io-plugin-deprecated": {
13285        "requires": [
13286            "aui-overlay-base-deprecated",
13287            "aui-parse-content",
13288            "aui-io-request",
13289            "aui-loading-mask-deprecated"
13290        ]
13291    },
13292    "aui-io-request": {
13293        "requires": [
13294            "io-base",
13295            "json",
13296            "plugin",
13297            "querystring-stringify",
13298            "aui-component"
13299        ]
13300    },
13301    "aui-io-request-deprecated": {
13302        "requires": [
13303            "io-base",
13304            "json",
13305            "plugin",
13306            "querystring-stringify",
13307            "aui-base-deprecated"
13308        ]
13309    },
13310    "aui-layout": {
13311        "requires": [
13312            "aui-layout-col",
13313            "aui-layout-row",
13314            "aui-node-base",
13315            "base-build",
13316            "datatype-number-parse",
13317            "event-resize"
13318        ]
13319    },
13320    "aui-layout-builder": {
13321        "requires": [
13322            "aui-classnamemanager",
13323            "aui-layout",
13324            "aui-layout-builder-add-col",
13325            "aui-layout-builder-add-row",
13326            "aui-layout-builder-move",
13327            "aui-layout-builder-remove-row",
13328            "aui-layout-builder-resize-col",
13329            "aui-node-base",
13330            "base-build",
13331            "node-event-delegate",
13332            "node-screen",
13333            "node-style"
13334        ]
13335    },
13336    "aui-layout-builder-add-col": {
13337        "requires": [
13338            "event-key",
13339            "node-base"
13340        ],
13341        "skinnable": true
13342    },
13343    "aui-layout-builder-add-row": {
13344        "requires": [
13345            "aui-node-base",
13346            "base-build",
13347            "node-scroll-info"
13348        ],
13349        "skinnable": true
13350    },
13351    "aui-layout-builder-move": {
13352        "requires": [
13353            "aui-node-base",
13354            "base-build"
13355        ],
13356        "skinnable": true
13357    },
13358    "aui-layout-builder-remove-row": {
13359        "requires": [
13360            "aui-node-base",
13361            "base-build"
13362        ],
13363        "skinnable": true
13364    },
13365    "aui-layout-builder-resize-col": {
13366        "requires": [
13367            "dd-constrain",
13368            "dd-delegate",
13369            "dd-drop-plugin",
13370            "dd-proxy",
13371            "event-mouseenter",
13372            "node-base"
13373        ],
13374        "skinnable": true
13375    },
13376    "aui-layout-col": {
13377        "requires": [
13378            "aui-classnamemanager",
13379            "aui-node-base",
13380            "base-build"
13381        ],
13382        "skinnable": true
13383    },
13384    "aui-layout-row": {
13385        "requires": [
13386            "array-invoke",
13387            "aui-node-base",
13388            "base-build"
13389        ],
13390        "skinnable": true
13391    },
13392    "aui-linkedset": {
13393        "requires": [
13394            "aui-set"
13395        ]
13396    },
13397    "aui-live-search-deprecated": {
13398        "requires": [
13399            "aui-base-deprecated"
13400        ]
13401    },
13402    "aui-loading-mask-deprecated": {
13403        "requires": [
13404            "plugin",
13405            "aui-overlay-mask-deprecated"
13406        ],
13407        "skinnable": true
13408    },
13409    "aui-map": {
13410        "requires": [
13411            "base-build"
13412        ]
13413    },
13414    "aui-menu": {
13415        "requires": [
13416            "base-build",
13417            "event-mouseenter",
13418            "event-resize",
13419            "widget",
13420            "widget-position",
13421            "widget-position-align",
13422            "widget-position-constrain",
13423            "widget-stack",
13424            "aui-classnamemanager",
13425            "aui-debounce",
13426            "aui-dropdown",
13427            "aui-menu-item"
13428        ],
13429        "skinnable": true
13430    },
13431    "aui-menu-item": {
13432        "requires": [
13433            "base-build",
13434            "node-base",
13435            "aui-classnamemanager",
13436            "aui-node",
13437            "aui-widget-shortcut"
13438        ]
13439    },
13440    "aui-messaging": {
13441        "requires": [
13442            "querystring",
13443            "aui-timer"
13444        ]
13445    },
13446    "aui-modal": {
13447        "requires": [
13448            "widget",
13449            "widget-autohide",
13450            "widget-buttons",
13451            "widget-modality",
13452            "widget-position",
13453            "widget-position-align",
13454            "widget-position-constrain",
13455            "widget-stack",
13456            "widget-stdmod",
13457            "dd-plugin",
13458            "dd-constrain",
13459            "timers",
13460            "aui-classnamemanager",
13461            "aui-widget-cssclass",
13462            "aui-widget-toggle",
13463            "aui-widget-toolbars"
13464        ],
13465        "skinnable": true
13466    },
13467    "aui-modal-resize": {
13468        "condition": {
13469            "name": "aui-modal-resize",
13470            "test": function(A) {
13471    return !A.UA.mobile;
13472},
13473            "trigger": "aui-modal"
13474        },
13475        "requires": [
13476            "aui-modal",
13477            "resize-plugin"
13478        ]
13479    },
13480    "aui-node": {
13481        "use": [
13482            "aui-node-base"
13483        ]
13484    },
13485    "aui-node-accessible": {
13486        "requires": [
13487            "aui-node-base",
13488            "event-custom-base"
13489        ]
13490    },
13491    "aui-node-base": {
13492        "requires": [
13493            "array-extras",
13494            "aui-base-lang",
13495            "aui-classnamemanager",
13496            "aui-debounce",
13497            "node"
13498        ]
13499    },
13500    "aui-node-html5": {
13501        "condition": {
13502            "name": "aui-node-html5",
13503            "trigger": "aui-node",
13504            "ua": "ie"
13505        },
13506        "requires": [
13507            "collection",
13508            "aui-node-base"
13509        ]
13510    },
13511    "aui-options-data-editor": {
13512        "requires": [
13513            "aui-data-editor",
13514            "dd-constrain",
13515            "dd-delegate",
13516            "dd-drop-plugin",
13517            "dd-proxy",
13518            "event-valuechange",
13519            "node-event-delegate"
13520        ],
13521        "skinnable": true
13522    },
13523    "aui-overlay-base-deprecated": {
13524        "requires": [
13525            "widget-position",
13526            "widget-stack",
13527            "widget-position-align",
13528            "widget-position-constrain",
13529            "widget-stdmod",
13530            "aui-component"
13531        ]
13532    },
13533    "aui-overlay-context-deprecated": {
13534        "requires": [
13535            "aui-overlay-manager-deprecated",
13536            "aui-delayed-task-deprecated",
13537            "aui-aria"
13538        ]
13539    },
13540    "aui-overlay-context-panel-deprecated": {
13541        "requires": [
13542            "anim",
13543            "aui-overlay-context-deprecated"
13544        ],
13545        "skinnable": true
13546    },
13547    "aui-overlay-deprecated": {
13548        "use": [
13549            "aui-overlay-base-deprecated",
13550            "aui-overlay-context-deprecated",
13551            "aui-overlay-context-panel-deprecated",
13552            "aui-overlay-manager-deprecated",
13553            "aui-overlay-mask-deprecated"
13554        ]
13555    },
13556    "aui-overlay-manager-deprecated": {
13557        "requires": [
13558            "overlay",
13559            "plugin",
13560            "aui-base-deprecated",
13561            "aui-overlay-base-deprecated"
13562        ]
13563    },
13564    "aui-overlay-mask-deprecated": {
13565        "requires": [
13566            "event-resize",
13567            "aui-base-deprecated",
13568            "aui-overlay-base-deprecated"
13569        ],
13570        "skinnable": true
13571    },
13572    "aui-pagination": {
13573        "requires": [
13574            "node-event-delegate",
13575            "aui-node",
13576            "aui-component",
13577            "widget-htmlparser"
13578        ],
13579        "skinnable": true
13580    },
13581    "aui-palette": {
13582        "requires": [
13583            "base-build",
13584            "event-hover",
13585            "widget",
13586            "aui-classnamemanager",
13587            "aui-base",
13588            "aui-widget-cssclass",
13589            "aui-widget-toggle"
13590        ],
13591        "skinnable": true
13592    },
13593    "aui-parse-content": {
13594        "requires": [
13595            "async-queue",
13596            "plugin",
13597            "io-base",
13598            "aui-component",
13599            "aui-node-base"
13600        ]
13601    },
13602    "aui-popover": {
13603        "requires": [
13604            "event-resize",
13605            "widget",
13606            "widget-autohide",
13607            "widget-buttons",
13608            "widget-modality",
13609            "widget-position",
13610            "widget-position-align",
13611            "widget-position-constrain",
13612            "widget-stack",
13613            "widget-stdmod",
13614            "aui-classnamemanager",
13615            "aui-widget-cssclass",
13616            "aui-widget-toggle",
13617            "aui-widget-toolbars",
13618            "aui-widget-transition",
13619            "aui-widget-trigger",
13620            "aui-widget-position-align-suggestion",
13621            "aui-component",
13622            "aui-node-base"
13623        ],
13624        "skinnable": true
13625    },
13626    "aui-progressbar": {
13627        "requires": [
13628            "aui-node",
13629            "aui-component",
13630            "aui-aria"
13631        ],
13632        "skinnable": true
13633    },
13634    "aui-promise": {
13635        "requires": [
13636            "array-invoke",
13637            "promise",
13638            "oop"
13639        ]
13640    },
13641    "aui-property-builder": {
13642        "requires": [
13643            "dd",
13644            "collection",
13645            "aui-property-builder-available-field",
13646            "aui-property-builder-field-support",
13647            "aui-property-builder-settings",
13648            "aui-tabview"
13649        ],
13650        "skinnable": true
13651    },
13652    "aui-property-builder-available-field": {
13653        "requires": [
13654            "base",
13655            "aui-component",
13656            "aui-node"
13657        ]
13658    },
13659    "aui-property-builder-field-support": {},
13660    "aui-property-builder-settings": {
13661        "requires": [
13662            "aui-tabview",
13663            "aui-datatable-property-list"
13664        ]
13665    },
13666    "aui-radio-group-data-editor": {
13667        "requires": [
13668            "aui-data-editor",
13669            "node-event-delegate"
13670        ],
13671        "skinnable": true
13672    },
13673    "aui-rating": {
13674        "use": [
13675            "aui-rating-base",
13676            "aui-rating-thumb"
13677        ]
13678    },
13679    "aui-rating-base": {
13680        "requires": [
13681            "aui-component",
13682            "aui-node-base",
13683            "widget-htmlparser",
13684            "widget-uievents"
13685        ],
13686        "skinnable": true
13687    },
13688    "aui-rating-thumb": {
13689        "requires": [
13690            "aui-rating-base"
13691        ]
13692    },
13693    "aui-resize-base-deprecated": {
13694        "requires": [
13695            "dd-drag",
13696            "dd-delegate",
13697            "dd-drop",
13698            "aui-base-deprecated"
13699        ],
13700        "skinnable": true
13701    },
13702    "aui-resize-constrain-deprecated": {
13703        "requires": [
13704            "dd-constrain",
13705            "plugin",
13706            "aui-resize-base-deprecated"
13707        ]
13708    },
13709    "aui-resize-deprecated": {
13710        "skinnable": true,
13711        "use": [
13712            "aui-resize-base-deprecated",
13713            "aui-resize-constrain-deprecated"
13714        ]
13715    },
13716    "aui-scale-data-editor": {
13717        "requires": [
13718            "aui-classnamemanager",
13719            "aui-data-editor",
13720            "event-valuechange"
13721        ]
13722    },
13723    "aui-scheduler": {
13724        "use": [
13725            "event-gestures",
13726            "aui-scheduler-base",
13727            "aui-scheduler-event-recorder",
13728            "aui-scheduler-view-agenda",
13729            "aui-scheduler-view-day",
13730            "aui-scheduler-view-month",
13731            "aui-scheduler-view-table-dd",
13732            "aui-scheduler-view-table",
13733            "aui-scheduler-view-week",
13734            "aui-viewport"
13735        ]
13736    },
13737    "aui-scheduler-base": {
13738        "requires": [
13739            "model",
13740            "model-list",
13741            "widget-stdmod",
13742            "color-hsl",
13743            "aui-event-base",
13744            "aui-node-base",
13745            "aui-component",
13746            "aui-datatype",
13747            "aui-button",
13748            "node-focusmanager"
13749        ],
13750        "skinnable": true
13751    },
13752    "aui-scheduler-event-recorder": {
13753        "requires": [
13754            "querystring",
13755            "io-form",
13756            "overlay",
13757            "aui-scheduler-base",
13758            "aui-popover"
13759        ],
13760        "skinnable": true
13761    },
13762    "aui-scheduler-touch": {
13763        "condition": {
13764            "name": "aui-scheduler-touch",
13765            "trigger": "aui-scheduler",
13766            "ua": "touchEnabled"
13767        },
13768        "requires": [
13769            "base-build",
13770            "aui-scheduler"
13771        ],
13772        "skinnable": true
13773    },
13774    "aui-scheduler-view-agenda": {
13775        "requires": [
13776            "aui-scheduler-base"
13777        ],
13778        "skinnable": true
13779    },
13780    "aui-scheduler-view-day": {
13781        "requires": [
13782            "dd-drag",
13783            "dd-delegate",
13784            "dd-drop",
13785            "dd-constrain",
13786            "aui-scheduler-view-table"
13787        ],
13788        "skinnable": true
13789    },
13790    "aui-scheduler-view-month": {
13791        "requires": [
13792            "aui-scheduler-view-table"
13793        ],
13794        "skinnable": true
13795    },
13796    "aui-scheduler-view-table": {
13797        "requires": [
13798            "overlay",
13799            "aui-scheduler-base"
13800        ],
13801        "skinnable": true
13802    },
13803    "aui-scheduler-view-table-dd": {
13804        "requires": [
13805            "dd-drag",
13806            "dd-delegate",
13807            "dd-drop",
13808            "aui-scheduler-view-table"
13809        ]
13810    },
13811    "aui-scheduler-view-week": {
13812        "requires": [
13813            "aui-scheduler-view-day"
13814        ],
13815        "skinnable": true
13816    },
13817    "aui-scroller-deprecated": {
13818        "requires": [
13819            "event-mouseenter",
13820            "aui-base-deprecated",
13821            "aui-simple-anim-deprecated"
13822        ],
13823        "skinnable": true
13824    },
13825    "aui-scrollspy": {
13826        "requires": [
13827            "base-build",
13828            "node-screen",
13829            "aui-classnamemanager"
13830        ]
13831    },
13832    "aui-search": {
13833        "use": [
13834            "aui-search-tst"
13835        ]
13836    },
13837    "aui-search-tst": {
13838        "requires": [
13839            "aui-component"
13840        ]
13841    },
13842    "aui-selector": {
13843        "requires": [
13844            "selector-css3",
13845            "aui-classnamemanager"
13846        ]
13847    },
13848    "aui-set": {
13849        "requires": [
13850            "aui-map"
13851        ]
13852    },
13853    "aui-simple-anim-deprecated": {
13854        "requires": [
13855            "aui-base-deprecated"
13856        ]
13857    },
13858    "aui-skin-deprecated": {
13859        "type": "css"
13860    },
13861    "aui-sortable": {
13862        "use": [
13863            "aui-sortable-layout",
13864            "aui-sortable-list"
13865        ]
13866    },
13867    "aui-sortable-layout": {
13868        "requires": [
13869            "dd-delegate",
13870            "dd-drag",
13871            "dd-drop",
13872            "dd-proxy",
13873            "aui-node",
13874            "aui-component"
13875        ],
13876        "skinnable": true
13877    },
13878    "aui-sortable-list": {
13879        "requires": [
13880            "dd-drag",
13881            "dd-drop",
13882            "dd-proxy",
13883            "dd-scroll",
13884            "aui-node",
13885            "aui-component"
13886        ]
13887    },
13888    "aui-state-interaction-deprecated": {
13889        "requires": [
13890            "aui-base-deprecated",
13891            "plugin"
13892        ]
13893    },
13894    "aui-surface": {
13895        "use": [
13896            "aui-surface-app",
13897            "aui-surface-screen"
13898        ]
13899    },
13900    "aui-surface-app": {
13901        "requires": [
13902            "event-delegate",
13903            "node-event-html5",
13904            "aui-surface-base",
13905            "aui-surface-screen",
13906            "aui-surface-screen-route"
13907        ]
13908    },
13909    "aui-surface-base": {
13910        "requires": [
13911            "base-build",
13912            "node-style",
13913            "timers",
13914            "aui-debounce",
13915            "aui-promise",
13916            "aui-parse-content"
13917        ]
13918    },
13919    "aui-surface-screen": {
13920        "requires": [
13921            "base-build"
13922        ]
13923    },
13924    "aui-surface-screen-html": {
13925        "requires": [
13926            "aui-base",
13927            "aui-io-request",
13928            "aui-promise",
13929         
13929   "aui-surface-screen",
13930            "aui-url"
13931        ]
13932    },
13933    "aui-surface-screen-route": {
13934        "requires": [
13935            "base-build"
13936        ]
13937    },
13938    "aui-swf-deprecated": {
13939        "requires": [
13940            "querystring-parse-simple",
13941            "querystring-stringify-simple",
13942            "aui-base-deprecated"
13943        ]
13944    },
13945    "aui-tabs-data-editor": {
13946        "requires": [
13947            "aui-data-editor",
13948            "aui-tabview"
13949        ]
13950    },
13951    "aui-tabview": {
13952        "requires": [
13953            "selector-css3",
13954            "tabview",
13955            "aui-component",
13956            "aui-widget-css"
13957        ],
13958        "skinnable": true
13959    },
13960    "aui-template-deprecated": {
13961        "requires": [
13962            "aui-base-deprecated"
13963        ]
13964    },
13965    "aui-text-data-editor": {
13966        "requires": [
13967            "aui-data-editor",
13968            "event-valuechange"
13969        ],
13970        "skinnable": true
13971    },
13972    "aui-text-data-unicode": {
13973        "requires": [
13974            "text"
13975        ]
13976    },
13977    "aui-text-unicode": {
13978        "requires": [
13979            "aui-text-data-unicode"
13980        ]
13981    },
13982    "aui-textboxlist-deprecated": {
13983        "requires": [
13984            "anim-node-plugin",
13985            "aui-autocomplete-deprecated",
13986            "aui-button-item-deprecated",
13987            "aui-data-set-deprecated",
13988            "escape",
13989            "node-focusmanager"
13990        ],
13991        "skinnable": true
13992    },
13993    "aui-timepicker": {
13994        "requires": [
13995            "autocomplete",
13996            "aui-datepicker-delegate",
13997            "aui-datepicker-popover"
13998        ],
13999        "skinnable": true
14000    },
14001    "aui-timepicker-native": {
14002        "requires": [
14003            "base",
14004            "base-build",
14005            "aui-node-base",
14006            "aui-datepicker-delegate",
14007            "aui-datepicker-native"
14008        ]
14009    },
14010    "aui-timer": {
14011        "requires": [
14012            "oop"
14013        ]
14014    },
14015    "aui-toggler": {
14016        "use": [
14017            "aui-toggler-base",
14018            "aui-toggler-delegate"
14019        ]
14020    },
14021    "aui-toggler-accessibility": {
14022        "requires": [
14023            "aui-toggler-base"
14024        ]
14025    },
14026    "aui-toggler-base": {
14027        "requires": [
14028            "transition",
14029            "aui-selector",
14030            "aui-event-base",
14031            "aui-node",
14032            "aui-component",
14033            "event-tap"
14034        ],
14035        "skinnable": true
14036    },
14037    "aui-toggler-delegate": {
14038        "requires": [
14039            "array-invoke",
14040            "node-event-delegate",
14041            "aui-toggler-base"
14042        ]
14043    },
14044    "aui-toolbar": {
14045        "requires": [
14046            "arraylist",
14047            "arraylist-add",
14048            "aui-component",
14049            "aui-button-core"
14050        ]
14051    },
14052    "aui-tooltip": {
14053        "use": [
14054            "aui-tooltip-base",
14055            "aui-tooltip-delegate"
14056        ]
14057    },
14058    "aui-tooltip-base": {
14059        "requires": [
14060            "aui-aria",
14061            "aui-classnamemanager",
14062            "aui-component",
14063            "aui-debounce",
14064            "aui-node-base",
14065            "aui-widget-cssclass",
14066            "aui-widget-toggle",
14067            "aui-widget-transition",
14068            "aui-widget-trigger",
14069            "aui-widget-position-align-suggestion",
14070            "event-hover",
14071            "event-resize",
14072            "escape",
14073            "widget",
14074            "widget-autohide",
14075            "widget-position",
14076            "widget-position-align",
14077            "widget-position-constrain",
14078            "widget-stack",
14079            "widget-stdmod"
14080        ],
14081        "skinnable": true
14082    },
14083    "aui-tooltip-delegate": {
14084        "requires": [
14085            "aui-tooltip-base",
14086            "node-event-delegate"
14087        ]
14088    },
14089    "aui-tooltip-deprecated": {
14090        "requires": [
14091            "aui-overlay-context-panel-deprecated"
14092        ],
14093        "skinnable": true
14094    },
14095    "aui-tpl-snippets-base-deprecated": {
14096        "requires": [
14097            "aui-template-deprecated"
14098        ]
14099    },
14100    "aui-tpl-snippets-checkbox-deprecated": {
14101        "requires": [
14102            "aui-tpl-snippets-base-deprecated"
14103        ]
14104    },
14105    "aui-tpl-snippets-deprecated": {
14106        "use": [
14107            "aui-tpl-snippets-base-deprecated",
14108            "aui-tpl-snippets-checkbox-deprecated",
14109            "aui-tpl-snippets-input-deprecated",
14110            "aui-tpl-snippets-select-deprecated",
14111            "aui-tpl-snippets-textarea-deprecated"
14112        ]
14113    },
14114    "aui-tpl-snippets-input-deprecated": {
14115        "requires": [
14116            "aui-tpl-snippets-base-deprecated"
14117        ]
14118    },
14119    "aui-tpl-snippets-select-deprecated": {
14120        "requires": [
14121            "aui-tpl-snippets-base-deprecated"
14122        ]
14123    },
14124    "aui-tpl-snippets-textarea-deprecated": {
14125        "requires": [
14126            "aui-tpl-snippets-base-deprecated"
14127        ]
14128    },
14129    "aui-tree": {
14130        "use": [
14131            "aui-tree-data",
14132            "aui-tree-io",
14133            "aui-tree-node",
14134            "aui-tree-paginator",
14135            "aui-tree-view"
14136        ]
14137    },
14138    "aui-tree-data": {
14139        "requires": [
14140            "aui-base-core",
14141            "aui-base-lang",
14142            "aui-node-base",
14143            "aui-timer",
14144            "aui-component"
14145        ]
14146    },
14147    "aui-tree-io": {
14148        "requires": [
14149            "aui-component",
14150            "aui-io"
14151        ]
14152    },
14153    "aui-tree-node": {
14154        "requires": [
14155            "json",
14156            "querystring-stringify",
14157            "aui-tree-data",
14158            "aui-tree-io",
14159            "aui-tree-paginator",
14160            "event-key"
14161        ]
14162    },
14163    "aui-tree-paginator": {
14164        "requires": [
14165            "yui-base"
14166        ]
14167    },
14168    "aui-tree-view": {
14169        "requires": [
14170            "dd-delegate",
14171            "dd-proxy",
14172            "widget",
14173            "aui-tree-node",
14174            "aui-tree-paginator",
14175            "aui-tree-io"
14176        ],
14177        "skinnable": true
14178    },
14179    "aui-undo-redo": {
14180        "requires": [
14181            "aui-base",
14182            "base",
14183            "base-build",
14184            "event-key",
14185            "promise"
14186        ]
14187    },
14188    "aui-url": {
14189        "requires": [
14190            "oop",
14191            "querystring-parse",
14192            "querystring-stringify"
14193        ]
14194    },
14195    "aui-video": {
14196        "requires": [
14197            "event-resize",
14198            "node-event-html5",
14199            "querystring-stringify-simple",
14200            "aui-aria",
14201            "aui-node",
14202            "aui-component",
14203            "aui-debounce"
14204        ],
14205        "skinnable": true
14206    },
14207    "aui-viewport": {
14208        "requires": [
14209            "aui-node",
14210            "aui-component"
14211        ]
14212    },
14213    "aui-widget": {
14214        "use": [
14215            "aui-widget-cssclass",
14216            "aui-widget-toolbars"
14217        ]
14218    },
14219    "aui-widget-core": {
14220        "use": [
14221            "aui-widget-cssclass"
14222        ]
14223    },
14224    "aui-widget-cssclass": {
14225        "requires": [
14226            "widget-base"
14227        ]
14228    },
14229    "aui-widget-position-align-suggestion": {
14230        "requires": [
14231            "widget-position-align",
14232            "widget-stdmod"
14233        ]
14234    },
14235    "aui-widget-responsive": {
14236        "requires": [
14237            "event-resize",
14238            "widget-base"
14239        ]
14240    },
14241    "aui-widget-shortcut": {
14242        "requires": [
14243            "base"
14244        ]
14245    },
14246    "aui-widget-swipe": {
14247        "requires": [
14248            "classnamemanager",
14249            "scrollview-base",
14250            "scrollview-paginator",
14251            "timers"
14252        ]
14253    },
14254    "aui-widget-toggle": {},
14255    "aui-widget-toolbars": {
14256        "requires": [
14257            "widget-stdmod",
14258            "aui-toolbar"
14259        ]
14260    },
14261    "aui-widget-transition": {
14262        "requires": [
14263            "transition"
14264        ]
14265    },
14266    "aui-widget-trigger": {
14267        "requires": [
14268            "node"
14269        ]
14270    }
14271});
14272YUI.Env[Y.version].md5 = 'd7c627eb00edd6b6f054d8f6e7147480';
14273/*
14274 * Alloy JavaScript Library
14275 * http://alloy.liferay.com/
14276 *
14277 * Copyright (c) 2010 Liferay Inc.
14278 * http://alloy.liferay.com/LICENSE.txt
14279 *
14280 * Nate Cavanaugh ([email protected])
14281 * Eduardo Lundgren ([email protected])
14282 *
14283 * Attribution/Third-party licenses
14284 * http://alloy.liferay.com/ATTRIBUTION.txt
14285 */
14286
14287// Simple version of
14288// http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
14289
14290A.UA.edge = (function() {
14291    var edgeVersion = A.UA.userAgent.match(/Edge\/(.[0-9.]+)/);
14292
14293    if (edgeVersion) {
14294        return edgeVersion[1];
14295    }
14296
14297    return 0;
14298})();
14299
14300A.supportsDOMEvent = function(domNode, eventName) {
14301    eventName = 'on' + eventName;
14302
14303    if (!(eventName in domNode)) {
14304        if (!domNode.setAttribute) {
14305            domNode = A.config.doc.createElement('div');
14306        }
14307
14308        if (domNode.setAttribute) {
14309            domNode.setAttribute(eventName, '');
14310            return (typeof domNode[eventName] === 'function');
14311        }
14312    }
14313
14314    domNode = null;
14315
14316    return true;
14317};
14318(function() {
14319    var slice = Array.prototype.slice;
14320
14321    YUI.prototype.ready = function() {
14322        var instance = this,
14323            xargs = arguments,
14324            index = xargs.length - 1,
14325            modules = slice.call(arguments, 0, index);
14326
14327        modules.unshift('event-base');
14328        modules.push(function(instance) {
14329            var args = arguments;
14330
14331            instance.on('domready', function() {
14332                xargs[index].apply(this, args);
14333            });
14334        });
14335        instance.use.apply(instance, modules);
14336    };
14337}());
14338
14339
14340}, '3.1.0-deprecated.112');
14341YUI.add('aui', function (A, NAME) {}, '3.1.0-deprecated.112');
14342YUI.Env.core.push.apply(YUI.Env.core, ["aui-base-core"]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.