Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
YUI.add('loader-base', function (Y, NAME) {
2
 
3
/**
4
 * The YUI loader core
5
 * @module loader
6
 * @submodule loader-base
7
 */
8
 
9
(function() {
10
    var VERSION = Y.version,
11
        BUILD = '/build/',
12
        ROOT = VERSION + '/',
13
        CDN_BASE = Y.Env.base,
14
        GALLERY_VERSION = 'gallery-2014.07.31-18-26',
15
        TNT = '2in3',
16
        TNT_VERSION = '4',
17
        YUI2_VERSION = '2.9.0',
18
        COMBO_BASE = CDN_BASE + 'combo?',
19
        META = {
20
            version: VERSION,
21
            root: ROOT,
22
            base: Y.Env.base,
23
            comboBase: COMBO_BASE,
24
            skin: {
25
                defaultSkin: 'sam',
26
                base: 'assets/skins/',
27
                path: 'skin.css',
28
                after: [
29
                    'cssreset',
30
                    'cssfonts',
31
                    'cssgrids',
32
                    'cssbase',
33
                    'cssreset-context',
34
                    'cssfonts-context'
35
                ]
36
            },
37
            groups: {},
38
            patterns: {}
39
        },
40
        groups = META.groups,
41
        yui2Update = function(tnt, yui2, config) {
42
            var root = TNT + '.' +
43
                    (tnt || TNT_VERSION) + '/' +
44
                    (yui2 || YUI2_VERSION) + BUILD,
45
                base = (config && config.base) ? config.base : CDN_BASE,
46
                combo = (config && config.comboBase) ? config.comboBase : COMBO_BASE;
47
 
48
            groups.yui2.base = base + root;
49
            groups.yui2.root = root;
50
            groups.yui2.comboBase = combo;
51
        },
52
        galleryUpdate = function(tag, config) {
53
            var root = (tag || GALLERY_VERSION) + BUILD,
54
                base = (config && config.base) ? config.base : CDN_BASE,
55
                combo = (config && config.comboBase) ? config.comboBase : COMBO_BASE;
56
 
57
            groups.gallery.base = base + root;
58
            groups.gallery.root = root;
59
            groups.gallery.comboBase = combo;
60
        };
61
 
62
 
63
    groups[VERSION] = {};
64
 
65
    groups.gallery = {
66
        ext: false,
67
        combine: true,
68
        comboBase: COMBO_BASE,
69
        update: galleryUpdate,
70
        patterns: {
71
            'gallery-': {},
72
            'lang/gallery-': {},
73
            'gallerycss-': {
74
                type: 'css'
75
            }
76
        }
77
    };
78
 
79
    groups.yui2 = {
80
        combine: true,
81
        ext: false,
82
        comboBase: COMBO_BASE,
83
        update: yui2Update,
84
        patterns: {
85
            'yui2-': {
86
                configFn: function(me) {
87
                    if (/-skin|reset|fonts|grids|base/.test(me.name)) {
88
                        me.type = 'css';
89
                        me.path = me.path.replace(/\.js/, '.css');
90
                        // this makes skins in builds earlier than
91
                        // 2.6.0 work as long as combine is false
92
                        me.path = me.path.replace(/\/yui2-skin/,
93
                                            '/assets/skins/sam/yui2-skin');
94
                    }
95
                }
96
            }
97
        }
98
    };
99
 
100
    galleryUpdate();
101
    yui2Update();
102
 
103
    if (YUI.Env[VERSION]) {
104
        Y.mix(META, YUI.Env[VERSION], false, [
105
            'modules',
106
            'groups',
107
            'skin'
108
        ], 0, true);
109
    }
110
 
111
    YUI.Env[VERSION] = META;
112
}());
113
/*jslint forin: true, maxlen: 350 */
114
 
115
/**
116
 * Loader dynamically loads script and css files.  It includes the dependency
117
 * information for the version of the library in use, and will automatically pull in
118
 * dependencies for the modules requested. It can also load the
119
 * files from the Yahoo! CDN, and it can utilize the combo service provided on
120
 * this network to reduce the number of http connections required to download
121
 * YUI files.
122
 *
123
 * @module loader
124
 * @main loader
125
 * @submodule loader-base
126
 */
127
 
128
var NOT_FOUND = {},
129
    NO_REQUIREMENTS = [],
130
    MAX_URL_LENGTH = 1024,
131
    GLOBAL_ENV = YUI.Env,
132
    GLOBAL_LOADED = GLOBAL_ENV._loaded,
133
    CSS = 'css',
134
    JS = 'js',
135
    INTL = 'intl',
136
    DEFAULT_SKIN = 'sam',
137
    VERSION = Y.version,
138
    ROOT_LANG = '',
139
    YObject = Y.Object,
140
    oeach = YObject.each,
141
    yArray = Y.Array,
142
    _queue = GLOBAL_ENV._loaderQueue,
143
    META = GLOBAL_ENV[VERSION],
144
    SKIN_PREFIX = 'skin-',
145
    L = Y.Lang,
146
    ON_PAGE = GLOBAL_ENV.mods,
147
    modulekey,
148
    _path = function(dir, file, type, nomin) {
149
        var path = dir + '/' + file;
150
        if (!nomin) {
151
            path += '-min';
152
        }
153
        path += '.' + (type || CSS);
154
 
155
        return path;
156
    };
157
 
158
 
159
    if (!YUI.Env._cssLoaded) {
160
        YUI.Env._cssLoaded = {};
161
    }
162
 
163
 
164
/**
165
 * The component metadata is stored in Y.Env.meta.
166
 * Part of the loader module.
167
 * @property meta
168
 * @for YUI
169
 */
170
Y.Env.meta = META;
171
 
172
/**
173
 * Loader dynamically loads script and css files.  It includes the dependency
174
 * info for the version of the library in use, and will automatically pull in
175
 * dependencies for the modules requested. It can load the
176
 * files from the Yahoo! CDN, and it can utilize the combo service provided on
177
 * this network to reduce the number of http connections required to download
178
 * YUI files. You can also specify an external, custom combo service to host
179
 * your modules as well.
180
 
181
        var Y = YUI();
182
        var loader = new Y.Loader({
183
            filter: 'debug',
184
            base: '../../',
185
            root: 'build/',
186
            combine: true,
187
            require: ['node', 'dd', 'console']
188
        });
189
        var out = loader.resolve(true);
190
 
191
 * If the Loader needs to be patched before it is used for the first time, it
192
 * should be done through the `doBeforeLoader` hook. Simply make the patch
193
 * available via configuration before YUI is loaded:
194
 
195
        YUI_config = YUI_config || {};
196
        YUI_config.doBeforeLoader = function (config) {
197
            var resolve = this.context.Loader.prototype.resolve;
198
            this.context.Loader.prototype.resolve = function () {
199
                // do something here
200
                return resolve.apply(this, arguments);
201
            };
202
        };
203
 
204
 * @constructor
205
 * @class Loader
206
 * @param {Object} config an optional set of configuration options.
207
 * @param {String} config.base The base dir which to fetch this module from
208
 * @param {String} config.comboBase The Combo service base path. Ex: `http://yui.yahooapis.com/combo?`
209
 * @param {String} config.root The root path to prepend to module names for the combo service. Ex: `2.5.2/build/`
210
 * @param {String|Object} config.filter A filter to apply to result urls. <a href="#property_filter">See filter property</a>
211
 * @param {Object} config.filters Per-component filter specification.  If specified for a given component, this overrides the filter config.
212
 * @param {Boolean} config.combine Use a combo service to reduce the number of http connections required to load your dependencies
213
 * @param {Boolean} [config.async=true] Fetch files in async
214
 * @param {Array} config.ignore: A list of modules that should never be dynamically loaded
215
 * @param {Array} config.force A list of modules that should always be loaded when required, even if already present on the page
216
 * @param {HTMLElement|String} config.insertBefore Node or id for a node that should be used as the insertion point for new nodes
217
 * @param {Object} config.jsAttributes Object literal containing attributes to add to script nodes
218
 * @param {Object} config.cssAttributes Object literal containing attributes to add to link nodes
219
 * @param {Number} config.timeout The number of milliseconds before a timeout occurs when dynamically loading nodes.  If not set, there is no timeout
220
 * @param {Object} config.context Execution context for all callbacks
221
 * @param {Function} config.onSuccess Callback for the 'success' event
222
 * @param {Function} config.onFailure Callback for the 'failure' event
223
 * @param {Function} config.onTimeout Callback for the 'timeout' event
224
 * @param {Function} config.onProgress Callback executed each time a script or css file is loaded
225
 * @param {Object} config.modules A list of module definitions.  See <a href="#method_addModule">Loader.addModule</a> for the supported module metadata
226
 * @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`.
227
 * @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.
228
 * @param {String} config.yui2 When using the 2in3 project, you can select the version of YUI 2 to use.  Valid 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.
229
 * @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.
230
 */
231
Y.Loader = function(o) {
232
 
233
    var self = this;
234
 
235
    //Catch no config passed.
236
    o = o || {};
237
 
238
    modulekey = META.md5;
239
 
240
    /**
241
     * Internal callback to handle multiple internal insert() calls
242
     * so that css is inserted prior to js
243
     * @property _internalCallback
244
     * @private
245
     */
246
    // self._internalCallback = null;
247
 
248
    /**
249
     * Callback that will be executed when the loader is finished
250
     * with an insert
251
     * @method onSuccess
252
     * @type function
253
     */
254
    // self.onSuccess = null;
255
 
256
    /**
257
     * Callback that will be executed if there is a failure
258
     * @method onFailure
259
     * @type function
260
     */
261
    // self.onFailure = null;
262
 
263
    /**
264
     * Callback executed each time a script or css file is loaded
265
     * @method onProgress
266
     * @type function
267
     */
268
    // self.onProgress = null;
269
 
270
    /**
271
     * Callback that will be executed if a timeout occurs
272
     * @method onTimeout
273
     * @type function
274
     */
275
    // self.onTimeout = null;
276
 
277
    /**
278
     * The execution context for all callbacks
279
     * @property context
280
     * @default {YUI} the YUI instance
281
     */
282
    self.context = Y;
283
 
284
    // Hook that allows the patching of loader
285
    if (o.doBeforeLoader) {
286
        o.doBeforeLoader.apply(self, arguments);
287
    }
288
 
289
    /**
290
     * Data that is passed to all callbacks
291
     * @property data
292
     */
293
    // self.data = null;
294
 
295
    /**
296
     * Node reference or id where new nodes should be inserted before
297
     * @property insertBefore
298
     * @type string|HTMLElement
299
     */
300
    // self.insertBefore = null;
301
 
302
    /**
303
     * The charset attribute for inserted nodes
304
     * @property charset
305
     * @type string
306
     * @deprecated , use cssAttributes or jsAttributes.
307
     */
308
    // self.charset = null;
309
 
310
    /**
311
     * An object literal containing attributes to add to link nodes
312
     * @property cssAttributes
313
     * @type object
314
     */
315
    // self.cssAttributes = null;
316
 
317
    /**
318
     * An object literal containing attributes to add to script nodes
319
     * @property jsAttributes
320
     * @type object
321
     */
322
    // self.jsAttributes = null;
323
 
324
    /**
325
     * The base directory.
326
     * @property base
327
     * @type string
328
     * @default http://yui.yahooapis.com/[YUI VERSION]/build/
329
     */
330
    self.base = Y.Env.meta.base + Y.Env.meta.root;
331
 
332
    /**
333
     * Base path for the combo service
334
     * @property comboBase
335
     * @type string
336
     * @default http://yui.yahooapis.com/combo?
337
     */
338
    self.comboBase = Y.Env.meta.comboBase;
339
 
340
    /*
341
     * Base path for language packs.
342
     */
343
    // self.langBase = Y.Env.meta.langBase;
344
    // self.lang = "";
345
 
346
    /**
347
     * If configured, the loader will attempt to use the combo
348
     * service for YUI resources and configured external resources.
349
     * @property combine
350
     * @type boolean
351
     * @default true if a base dir isn't in the config
352
     */
353
    self.combine = o.base &&
354
        (o.base.indexOf(self.comboBase.substr(0, 20)) > -1);
355
 
356
    /**
357
    * The default seperator to use between files in a combo URL
358
    * @property comboSep
359
    * @type {String}
360
    * @default Ampersand
361
    */
362
    self.comboSep = '&';
363
    /**
364
     * Max url length for combo urls.  The default is 1024. This is the URL
365
     * limit for the Yahoo! hosted combo servers.  If consuming
366
     * a different combo service that has a different URL limit
367
     * it is possible to override this default by supplying
368
     * the maxURLLength config option.  The config option will
369
     * only take effect if lower than the default.
370
     *
371
     * @property maxURLLength
372
     * @type int
373
     */
374
    self.maxURLLength = MAX_URL_LENGTH;
375
 
376
    /**
377
     * Ignore modules registered on the YUI global
378
     * @property ignoreRegistered
379
     * @default false
380
     */
381
    self.ignoreRegistered = o.ignoreRegistered;
382
 
383
    /**
384
     * Root path to prepend to module path for the combo
385
     * service
386
     * @property root
387
     * @type string
388
     * @default [YUI VERSION]/build/
389
     */
390
    self.root = Y.Env.meta.root;
391
 
392
    /**
393
     * Timeout value in milliseconds.  If set, self value will be used by
394
     * the get utility.  the timeout event will fire if
395
     * a timeout occurs.
396
     * @property timeout
397
     * @type int
398
     */
399
    self.timeout = 0;
400
 
401
    /**
402
     * A list of modules that should not be loaded, even if
403
     * they turn up in the dependency tree
404
     * @property ignore
405
     * @type string[]
406
     */
407
    // self.ignore = null;
408
 
409
    /**
410
     * A list of modules that should always be loaded, even
411
     * if they have already been inserted into the page.
412
     * @property force
413
     * @type string[]
414
     */
415
    // self.force = null;
416
 
417
    self.forceMap = {};
418
 
419
    /**
420
     * Should we allow rollups
421
     * @property allowRollup
422
     * @type boolean
423
     * @default false
424
     */
425
    self.allowRollup = false;
426
 
427
    /**
428
     * A filter to apply to result urls.  This filter will modify the default
429
     * path for all modules.  The default path for the YUI library is the
430
     * minified version of the files (e.g., event-min.js).  The filter property
431
     * can be a predefined filter or a custom filter.  The valid predefined
432
     * filters are:
433
     * <dl>
434
     *  <dt>DEBUG</dt>
435
     *  <dd>Selects the debug versions of the library (e.g., event-debug.js).
436
     *      This option will automatically include the Logger widget</dd>
437
     *  <dt>RAW</dt>
438
     *  <dd>Selects the non-minified version of the library (e.g., event.js).
439
     *  </dd>
440
     * </dl>
441
     * You can also define a custom filter, which must be an object literal
442
     * containing a search expression and a replace string:
443
     *
444
     *      myFilter: {
445
     *          'searchExp': "-min\\.js",
446
     *          'replaceStr': "-debug.js"
447
     *      }
448
     *
449
     * @property filter
450
     * @type string| {searchExp: string, replaceStr: string}
451
     */
452
    // self.filter = null;
453
 
454
    /**
455
     * per-component filter specification.  If specified for a given
456
     * component, this overrides the filter config.
457
     * @property filters
458
     * @type object
459
     */
460
    self.filters = {};
461
 
462
    /**
463
     * The list of requested modules
464
     * @property required
465
     * @type {string: boolean}
466
     */
467
    self.required = {};
468
 
469
    /**
470
     * If a module name is predefined when requested, it is checked againsts
471
     * the patterns provided in this property.  If there is a match, the
472
     * module is added with the default configuration.
473
     *
474
     * At the moment only supporting module prefixes, but anticipate
475
     * supporting at least regular expressions.
476
     * @property patterns
477
     * @type Object
478
     */
479
    // self.patterns = Y.merge(Y.Env.meta.patterns);
480
    self.patterns = {};
481
 
482
    /**
483
     * Internal loader instance metadata. Use accessor `getModuleInfo()` instead.
484
     */
485
    self.moduleInfo = {};
486
 
487
    self.groups = Y.merge(Y.Env.meta.groups);
488
 
489
    /**
490
     * Provides the information used to skin the skinnable components.
491
     * The following skin definition would result in 'skin1' and 'skin2'
492
     * being loaded for calendar (if calendar was requested), and
493
     * 'sam' for all other skinnable components:
494
     *
495
     *      skin: {
496
     *          // The default skin, which is automatically applied if not
497
     *          // overriden by a component-specific skin definition.
498
     *          // Change this in to apply a different skin globally
499
     *          defaultSkin: 'sam',
500
     *
501
     *          // This is combined with the loader base property to get
502
     *          // the default root directory for a skin. ex:
503
     *          // http://yui.yahooapis.com/2.3.0/build/assets/skins/sam/
504
     *          base: 'assets/skins/',
505
     *
506
     *          // Any component-specific overrides can be specified here,
507
     *          // making it possible to load different skins for different
508
     *          // components.  It is possible to load more than one skin
509
     *          // for a given component as well.
510
     *          overrides: {
511
     *              calendar: ['skin1', 'skin2']
512
     *          }
513
     *      }
514
     * @property skin
515
     * @type {Object}
516
     */
517
    self.skin = Y.merge(Y.Env.meta.skin);
518
 
519
    /*
520
     * Map of conditional modules
521
     * @since 3.2.0
522
     */
523
    self.conditions = {};
524
 
525
    // map of modules with a hash of modules that meet the requirement
526
    // self.provides = {};
527
 
528
    self.config = o;
529
    self._internal = true;
530
 
531
    self._populateConditionsCache();
532
 
533
    /**
534
     * Set when beginning to compute the dependency tree.
535
     * Composed of what YUI reports to be loaded combined
536
     * with what has been loaded by any instance on the page
537
     * with the version number specified in the metadata.
538
     * @property loaded
539
     * @type {string: boolean}
540
     */
541
    self.loaded = GLOBAL_LOADED[VERSION];
542
 
543
 
544
    /**
545
    * Should Loader fetch scripts in `async`, defaults to `true`
546
    * @property async
547
    */
548
 
549
    self.async = true;
550
 
551
    self._inspectPage();
552
 
553
    self._internal = false;
554
 
555
    self._config(o);
556
 
557
    self.forceMap = (self.force) ? Y.Array.hash(self.force) : {};
558
 
559
    self.testresults = null;
560
 
561
    if (Y.config.tests) {
562
        self.testresults = Y.config.tests;
563
    }
564
 
565
    /**
566
     * List of rollup files found in the library metadata
567
     * @property rollups
568
     */
569
    // self.rollups = null;
570
 
571
    /**
572
     * Whether or not to load optional dependencies for
573
     * the requested modules
574
     * @property loadOptional
575
     * @type boolean
576
     * @default false
577
     */
578
    // self.loadOptional = false;
579
 
580
    /**
581
     * All of the derived dependencies in sorted order, which
582
     * will be populated when either calculate() or insert()
583
     * is called
584
     * @property sorted
585
     * @type string[]
586
     */
587
    self.sorted = [];
588
 
589
    /*
590
     * A list of modules to attach to the YUI instance when complete.
591
     * If not supplied, the sorted list of dependencies are applied.
592
     * @property attaching
593
     */
594
    // self.attaching = null;
595
 
596
    /**
597
     * Flag to indicate the dependency tree needs to be recomputed
598
     * if insert is called again.
599
     * @property dirty
600
     * @type boolean
601
     * @default true
602
     */
603
    self.dirty = true;
604
 
605
    /**
606
     * List of modules inserted by the utility
607
     * @property inserted
608
     * @type {string: boolean}
609
     */
610
    self.inserted = {};
611
 
612
    /**
613
     * List of skipped modules during insert() because the module
614
     * was not defined
615
     * @property skipped
616
     */
617
    self.skipped = {};
618
 
619
    // Y.on('yui:load', self.loadNext, self);
620
 
621
    self.tested = {};
622
 
623
    /*
624
     * Cached sorted calculate results
625
     * @property results
626
     * @since 3.2.0
627
     */
628
    //self.results = {};
629
 
630
    if (self.ignoreRegistered) {
631
        //Clear inpage already processed modules.
632
        self._resetModules();
633
    }
634
 
635
};
636
 
637
Y.Loader.prototype = {
638
    /**
639
    * Gets the module info from the local moduleInfo hash, or from the
640
    * default metadata and populate the local moduleInfo hash.
641
    * @method getModuleInfo
642
    * @param {string} name of the module
643
    * @public
644
    */
645
    getModuleInfo: function(name) {
646
 
647
        var m = this.moduleInfo[name],
648
            rawMetaModules, globalRenderedMods, internal, v;
649
 
650
        if (m) {
651
            return m;
652
        }
653
 
654
        rawMetaModules = META.modules;
655
        globalRenderedMods = GLOBAL_ENV._renderedMods;
656
        internal = this._internal;
657
 
658
        /*
659
        The logic here is:
660
 
661
        - if the `moduleInfo[name]` is avilable,
662
          then short circuit
663
        - otherwise, if the module is in the globalCache (cross Y instance),
664
          then port it from the global registry into `moduleInfo[name]`
665
        - otherwise, if the module has raw metadata (from meta modules)
666
          then add it to the global registry and to `moduleInfo[name]`
667
 
668
        */
669
        if (globalRenderedMods && globalRenderedMods.hasOwnProperty(name) && !this.ignoreRegistered) {
670
            this.moduleInfo[name] = Y.merge(globalRenderedMods[name]);
671
        } else {
672
            if (rawMetaModules.hasOwnProperty(name)) {
673
                this._internal = true; // making sure that modules from raw data are marked as internal
674
                v = this.addModule(rawMetaModules[name], name);
675
                // Inspect the page for the CSS module and mark it as loaded.
676
                if (v && v.type === CSS) {
677
                    if (this.isCSSLoaded(v.name, true)) {
678
                        this.loaded[v.name] = true;
679
                    }
680
                }
681
                this._internal = internal;
682
            }
683
        }
684
        return this.moduleInfo[name];
685
    },
686
    /**
687
    * Expand the names that are aliases to other modules.
688
    * @method _expandAliases
689
    * @param {string[]} list a module name or a list of names to be expanded
690
    * @private
691
    * @return {array}
692
    */
693
    _expandAliases: function(list) {
694
        var expanded = [],
695
            aliases = YUI.Env.aliases,
696
            i, name;
697
        list = Y.Array(list);
698
        for (i = 0; i < list.length; i += 1) {
699
            name = list[i];
700
            expanded.push.apply(expanded, aliases[name] ? aliases[name] : [name]);
701
        }
702
        return expanded;
703
    },
704
    /**
705
    * Populate the conditions cache from raw modules, this is necessary
706
    * because no other module will require a conditional module, instead
707
    * the condition has to be executed and then the module is analyzed
708
    * to be included in the final requirement list. Without this cache
709
    * conditional modules will be simply ignored.
710
    * @method _populateConditionsCache
711
    * @private
712
    */
713
    _populateConditionsCache: function() {
714
        var rawMetaModules = META.modules,
715
            cache = GLOBAL_ENV._conditions,
716
            i, j, t, trigger;
717
 
718
        // if we have conditions in cache and cache is enabled
719
        // we should port them to this loader instance
720
        if (cache && !this.ignoreRegistered) {
721
            for (i in cache) {
722
                if (cache.hasOwnProperty(i)) {
723
                    this.conditions[i] = Y.merge(cache[i]);
724
                }
725
            }
726
        } else {
727
            for (i in rawMetaModules) {
728
                if (rawMetaModules.hasOwnProperty(i) && rawMetaModules[i].condition) {
729
                    t = this._expandAliases(rawMetaModules[i].condition.trigger);
730
                    for (j = 0; j < t.length; j += 1) {
731
                        trigger = t[j];
732
                        this.conditions[trigger] = this.conditions[trigger] || {};
733
                        this.conditions[trigger][rawMetaModules[i].name || i] = rawMetaModules[i].condition;
734
                    }
735
                }
736
            }
737
            GLOBAL_ENV._conditions = this.conditions;
738
        }
739
    },
740
    /**
741
    * Reset modules in the module cache to a pre-processed state so additional
742
    * computations with a different skin or language will work as expected.
743
    * @method _resetModules
744
    * @private
745
    */
746
    _resetModules: function() {
747
        var self = this, i, o,
748
            mod, name, details;
749
        for (i in self.moduleInfo) {
750
            if (self.moduleInfo.hasOwnProperty(i) && self.moduleInfo[i]) {
751
                mod = self.moduleInfo[i];
752
                name = mod.name;
753
                details  = (YUI.Env.mods[name] ? YUI.Env.mods[name].details : null);
754
 
755
                if (details) {
756
                    self.moduleInfo[name]._reset = true;
757
                    self.moduleInfo[name].requires = details.requires || [];
758
                    self.moduleInfo[name].optional = details.optional || [];
759
                    self.moduleInfo[name].supersedes = details.supercedes || [];
760
                }
761
 
762
                if (mod.defaults) {
763
                    for (o in mod.defaults) {
764
                        if (mod.defaults.hasOwnProperty(o)) {
765
                            if (mod[o]) {
766
                                mod[o] = mod.defaults[o];
767
                            }
768
                        }
769
                    }
770
                }
771
                mod.langCache = undefined;
772
                mod.skinCache = undefined;
773
                if (mod.skinnable) {
774
                    self._addSkin(self.skin.defaultSkin, mod.name);
775
                }
776
            }
777
        }
778
    },
779
    /**
780
    Regex that matches a CSS URL. Used to guess the file type when it's not
781
    specified.
782
 
783
    @property REGEX_CSS
784
    @type RegExp
785
    @final
786
    @protected
787
    @since 3.5.0
788
    **/
789
    REGEX_CSS: /\.css(?:[?;].*)?$/i,
790
 
791
    /**
792
    * Default filters for raw and debug
793
    * @property FILTER_DEFS
794
    * @type Object
795
    * @final
796
    * @protected
797
    */
798
    FILTER_DEFS: {
799
        RAW: {
800
            'searchExp': '-min\\.js',
801
            'replaceStr': '.js'
802
        },
803
        DEBUG: {
804
            'searchExp': '-min\\.js',
805
            'replaceStr': '-debug.js'
806
        },
807
        COVERAGE: {
808
            'searchExp': '-min\\.js',
809
            'replaceStr': '-coverage.js'
810
        }
811
    },
812
    /*
813
    * Check the pages meta-data and cache the result.
814
    * @method _inspectPage
815
    * @private
816
    */
817
    _inspectPage: function() {
818
        var self = this, v, m, req, mr, i;
819
 
820
        for (i in ON_PAGE) {
821
            if (ON_PAGE.hasOwnProperty(i)) {
822
                v = ON_PAGE[i];
823
                if (v.details) {
824
                    m = self.getModuleInfo(v.name);
825
                    req = v.details.requires;
826
                    mr = m && m.requires;
827
 
828
                   if (m) {
829
                       if (!m._inspected && req && mr.length !== req.length) {
830
                           // console.log('deleting ' + m.name);
831
                           delete m.expanded;
832
                       }
833
                   } else {
834
                       m = self.addModule(v.details, i);
835
                   }
836
                   m._inspected = true;
837
               }
838
            }
839
        }
840
    },
841
    /*
842
    * returns true if b is not loaded, and is required directly or by means of modules it supersedes.
843
    * @private
844
    * @method _requires
845
    * @param {String} mod1 The first module to compare
846
    * @param {String} mod2 The second module to compare
847
    */
848
   _requires: function(mod1, mod2) {
849
 
850
        var i, rm, after_map, s,
851
            m = this.getModuleInfo(mod1),
852
            other = this.getModuleInfo(mod2);
853
 
854
        if (!m || !other) {
855
            return false;
856
        }
857
 
858
        rm = m.expanded_map;
859
        after_map = m.after_map;
860
 
861
        // check if this module should be sorted after the other
862
        // do this first to short circut circular deps
863
        if (after_map && (mod2 in after_map)) {
864
            return true;
865
        }
866
 
867
        after_map = other.after_map;
868
 
869
        // and vis-versa
870
        if (after_map && (mod1 in after_map)) {
871
            return false;
872
        }
873
 
874
        // check if this module requires one the other supersedes
875
        s = other.supersedes;
876
        if (s) {
877
            for (i = 0; i < s.length; i++) {
878
                if (this._requires(mod1, s[i])) {
879
                    return true;
880
                }
881
            }
882
        }
883
 
884
        s = m.supersedes;
885
        if (s) {
886
            for (i = 0; i < s.length; i++) {
887
                if (this._requires(mod2, s[i])) {
888
                    return false;
889
                }
890
            }
891
        }
892
 
893
        // check if this module requires the other directly
894
        // if (r && yArray.indexOf(r, mod2) > -1) {
895
        if (rm && (mod2 in rm)) {
896
            return true;
897
        }
898
 
899
        // external css files should be sorted below yui css
900
        if (m.ext && m.type === CSS && !other.ext && other.type === CSS) {
901
            return true;
902
        }
903
 
904
        return false;
905
    },
906
    /**
907
    * Apply a new config to the Loader instance
908
    * @method _config
909
    * @private
910
    * @param {Object} o The new configuration
911
    */
912
    _config: function(o) {
913
        var i, j, val, a, f, group, groupName, self = this,
914
            mods = [], mod, modInfo;
915
        // apply config values
916
        if (o) {
917
            for (i in o) {
918
                if (o.hasOwnProperty(i)) {
919
                    val = o[i];
920
                    //TODO This should be a case
921
                    if (i === 'require') {
922
                        self.require(val);
923
                    } else if (i === 'skin') {
924
                        //If the config.skin is a string, format to the expected object
925
                        if (typeof val === 'string') {
926
                            self.skin.defaultSkin = o.skin;
927
                            val = {
928
                                defaultSkin: val
929
                            };
930
                        }
931
 
932
                        Y.mix(self.skin, val, true);
933
                    } else if (i === 'groups') {
934
                        for (j in val) {
935
                            if (val.hasOwnProperty(j)) {
936
                                groupName = j;
937
                                group = val[j];
938
                                self.addGroup(group, groupName);
939
                                if (group.aliases) {
940
                                    for (a in group.aliases) {
941
                                        if (group.aliases.hasOwnProperty(a)) {
942
                                            self.addAlias(group.aliases[a], a);
943
                                        }
944
                                    }
945
                                }
946
                            }
947
                        }
948
 
949
                    } else if (i === 'modules') {
950
                        // add a hash of module definitions
951
                        for (j in val) {
952
                            if (val.hasOwnProperty(j)) {
953
                                self.addModule(val[j], j);
954
                            }
955
                        }
956
                    } else if (i === 'aliases') {
957
                        for (j in val) {
958
                            if (val.hasOwnProperty(j)) {
959
                                self.addAlias(val[j], j);
960
                            }
961
                        }
962
                    } else if (i === 'gallery') {
963
                        if (this.groups.gallery.update) {
964
                            this.groups.gallery.update(val, o);
965
                        }
966
                    } else if (i === 'yui2' || i === '2in3') {
967
                        if (this.groups.yui2.update) {
968
                            this.groups.yui2.update(o['2in3'], o.yui2, o);
969
                        }
970
                    } else {
971
                        self[i] = val;
972
                    }
973
                }
974
            }
975
        }
976
 
977
        // fix filter
978
        f = self.filter;
979
 
980
        if (L.isString(f)) {
981
            f = f.toUpperCase();
982
            self.filterName = f;
983
            self.filter = self.FILTER_DEFS[f];
984
            if (f === 'DEBUG') {
985
                self.require('yui-log', 'dump');
986
            }
987
        }
988
 
989
        if (self.filterName && self.coverage) {
990
            if (self.filterName === 'COVERAGE' && L.isArray(self.coverage) && self.coverage.length) {
991
                for (i = 0; i < self.coverage.length; i++) {
992
                    mod = self.coverage[i];
993
                    modInfo = self.getModuleInfo(mod);
994
                    if (modInfo && modInfo.use) {
995
                        mods = mods.concat(modInfo.use);
996
                    } else {
997
                        mods.push(mod);
998
                    }
999
                }
1000
                self.filters = self.filters || {};
1001
                Y.Array.each(mods, function(mod) {
1002
                    self.filters[mod] = self.FILTER_DEFS.COVERAGE;
1003
                });
1004
                self.filterName = 'RAW';
1005
                self.filter = self.FILTER_DEFS[self.filterName];
1006
            }
1007
        }
1008
 
1009
    },
1010
 
1011
    /**
1012
     * Returns the skin module name for the specified skin name.  If a
1013
     * module name is supplied, the returned skin module name is
1014
     * specific to the module passed in.
1015
     * @method formatSkin
1016
     * @param {string} skin the name of the skin.
1017
     * @param {string} mod optional: the name of a module to skin.
1018
     * @return {string} the full skin module name.
1019
     */
1020
    formatSkin: function(skin, mod) {
1021
        var s = SKIN_PREFIX + skin;
1022
        if (mod) {
1023
            s = s + '-' + mod;
1024
        }
1025
 
1026
        return s;
1027
    },
1028
 
1029
    /**
1030
     * Adds the skin def to the module info
1031
     * @method _addSkin
1032
     * @param {string} skin the name of the skin.
1033
     * @param {string} mod the name of the module.
1034
     * @param {string} parent parent module if this is a skin of a
1035
     * submodule or plugin.
1036
     * @return {string} the module name for the skin.
1037
     * @private
1038
     */
1039
    _addSkin: function(skin, mod, parent) {
1040
        var pkg, name, nmod,
1041
            sinf = this.skin,
1042
            mdef = mod && this.getModuleInfo(mod),
1043
            ext = mdef && mdef.ext;
1044
 
1045
        // Add a module definition for the module-specific skin css
1046
        if (mod) {
1047
            name = this.formatSkin(skin, mod);
1048
            if (!this.getModuleInfo(name)) {
1049
                pkg = mdef.pkg || mod;
1050
                nmod = {
1051
                    skin: true,
1052
                    name: name,
1053
                    group: mdef.group,
1054
                    type: 'css',
1055
                    after: sinf.after,
1056
                    path: (parent || pkg) + '/' + sinf.base + skin +
1057
                          '/' + mod + '.css',
1058
                    ext: ext
1059
                };
1060
                if (mdef.base) {
1061
                    nmod.base = mdef.base;
1062
                }
1063
                if (mdef.configFn) {
1064
                    nmod.configFn = mdef.configFn;
1065
                }
1066
                this.addModule(nmod, name);
1067
 
1068
            }
1069
        }
1070
 
1071
        return name;
1072
    },
1073
    /**
1074
    * Adds an alias module to the system
1075
    * @method addAlias
1076
    * @param {Array} use An array of modules that makes up this alias
1077
    * @param {String} name The name of the alias
1078
    * @example
1079
    *       var loader = new Y.Loader({});
1080
    *       loader.addAlias([ 'node', 'yql' ], 'davglass');
1081
    *       loader.require(['davglass']);
1082
    *       var out = loader.resolve(true);
1083
    *
1084
    *       //out.js will contain Node and YQL modules
1085
    */
1086
    addAlias: function(use, name) {
1087
        YUI.Env.aliases[name] = use;
1088
        this.addModule({
1089
            name: name,
1090
            use: use
1091
        });
1092
    },
1093
    /**
1094
     * Add a new module group
1095
     * @method addGroup
1096
     * @param {Object} config An object containing the group configuration data
1097
     * @param {String} config.name required, the group name
1098
     * @param {String} config.base The base directory for this module group
1099
     * @param {String} config.root The root path to add to each combo resource path
1100
     * @param {Boolean} config.combine Should the request be combined
1101
     * @param {String} config.comboBase Combo service base path
1102
     * @param {Object} config.modules The group of modules
1103
     * @param {String} name the group name.
1104
     * @example
1105
     *      var loader = new Y.Loader({});
1106
     *      loader.addGroup({
1107
     *          name: 'davglass',
1108
     *          combine: true,
1109
     *          comboBase: '/combo?',
1110
     *          root: '',
1111
     *          modules: {
1112
     *              //Module List here
1113
     *          }
1114
     *      }, 'davglass');
1115
     */
1116
    addGroup: function(o, name) {
1117
        var mods = o.modules,
1118
            self = this,
1119
            defaultBase = o.defaultBase || Y.config.defaultBase,
1120
            i, v;
1121
 
1122
        name = name || o.name;
1123
        o.name = name;
1124
        self.groups[name] = o;
1125
 
1126
        if (!o.base && defaultBase && o.root) {
1127
            o.base = defaultBase + o.root;
1128
        }
1129
 
1130
        if (o.patterns) {
1131
            for (i in o.patterns) {
1132
                if (o.patterns.hasOwnProperty(i)) {
1133
                    o.patterns[i].group = name;
1134
                    self.patterns[i] = o.patterns[i];
1135
                }
1136
            }
1137
        }
1138
 
1139
        if (mods) {
1140
            for (i in mods) {
1141
                if (mods.hasOwnProperty(i)) {
1142
                    v = mods[i];
1143
                    if (typeof v === 'string') {
1144
                        v = { name: i, fullpath: v };
1145
                    }
1146
                    v.group = name;
1147
                    self.addModule(v, i);
1148
                }
1149
            }
1150
        }
1151
    },
1152
 
1153
    /**
1154
     * Add a new module to the component metadata.
1155
     * @method addModule
1156
     * @param {Object} config An object containing the module data.
1157
     * @param {String} config.name Required, the component name
1158
     * @param {String} config.type Required, the component type (js or css)
1159
     * @param {String} config.path Required, the path to the script from `base`
1160
     * @param {Array} config.requires Array of modules required by this component
1161
     * @param {Array} [config.optional] Array of optional modules for this component
1162
     * @param {Array} [config.supersedes] Array of the modules this component replaces
1163
     * @param {Array} [config.after] Array of modules the components which, if present, should be sorted above this one
1164
     * @param {Object} [config.after_map] Faster alternative to 'after' -- supply a hash instead of an array
1165
     * @param {Number} [config.rollup] The number of superseded modules required for automatic rollup
1166
     * @param {String} [config.fullpath] If `fullpath` is specified, this is used instead of the configured `base + path`
1167
     * @param {Boolean} [config.skinnable] Flag to determine if skin assets should automatically be pulled in
1168
     * @param {Object} [config.submodules] Hash of submodules
1169
     * @param {String} [config.group] The group the module belongs to -- this is set automatically when it is added as part of a group configuration.
1170
     * @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"]`
1171
     * @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:
1172
     * @param {String} [config.condition.trigger] The name of a module that can trigger the auto-load
1173
     * @param {Function} [config.condition.test] A function that returns true when the module is to be loaded.
1174
     * @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"`.
1175
     * @param {String} [config.condition.when] Specifies the load order of the conditional module
1176
     *  with regard to the position of the trigger module.
1177
     *  This should be one of three values: `before`, `after`, or `instead`.  The default is `after`.
1178
     * @param {Object} [config.testresults] A hash of test results from `Y.Features.all()`
1179
     * @param {Function} [config.configFn] A function to exectute when configuring this module
1180
     * @param {Object} config.configFn.mod The module config, modifying this object will modify it's config. Returning false will delete the module's config.
1181
     * @param {String[]} [config.optionalRequires] List of dependencies that
1182
        may optionally be loaded by this loader. This is targeted mostly at
1183
        polyfills, since they should not be in the list of requires because
1184
        polyfills are assumed to be available in the global scope.
1185
     * @param {Function} [config.test] Test to be called when this module is
1186
        added as an optional dependency of another module. If the test function
1187
        returns `false`, the module will be ignored and will not be attached to
1188
        this YUI instance.
1189
     * @param {String} [name] The module name, required if not in the module data.
1190
     * @return {Object} the module definition or null if the object passed in did not provide all required attributes.
1191
     */
1192
    addModule: function(o, name) {
1193
        name = name || o.name;
1194
 
1195
        if (typeof o === 'string') {
1196
            o = { name: name, fullpath: o };
1197
        }
1198
 
1199
 
1200
        var subs, i, l, t, sup, s, smod, plugins, plug,
1201
            j, langs, packName, supName, flatSup, flatLang, lang, ret,
1202
            overrides, skinname, when, g, p,
1203
            modInfo = this.moduleInfo[name],
1204
            conditions = this.conditions, trigger;
1205
 
1206
        //Only merge this data if the temp flag is set
1207
        //from an earlier pass from a pattern or else
1208
        //an override module (YUI_config) can not be used to
1209
        //replace a default module.
1210
        if (modInfo && modInfo.temp) {
1211
            //This catches temp modules loaded via a pattern
1212
            // The module will be added twice, once from the pattern and
1213
            // Once from the actual add call, this ensures that properties
1214
            // that were added to the module the first time around (group: gallery)
1215
            // are also added the second time around too.
1216
            o = Y.merge(modInfo, o);
1217
        }
1218
 
1219
        o.name = name;
1220
 
1221
        if (!o || !o.name) {
1222
            return null;
1223
        }
1224
 
1225
        if (!o.type) {
1226
            //Always assume it's javascript unless the CSS pattern is matched.
1227
            o.type = JS;
1228
            p = o.path || o.fullpath;
1229
            if (p && this.REGEX_CSS.test(p)) {
1230
                o.type = CSS;
1231
            }
1232
        }
1233
 
1234
        if (!o.path && !o.fullpath) {
1235
            o.path = _path(name, name, o.type);
1236
        }
1237
        o.supersedes = o.supersedes || o.use;
1238
 
1239
        o.ext = ('ext' in o) ? o.ext : (this._internal) ? false : true;
1240
 
1241
        // Handle submodule logic
1242
        subs = o.submodules;
1243
 
1244
        this.moduleInfo[name] = o;
1245
 
1246
        o.requires = o.requires || [];
1247
 
1248
        /*
1249
        Only allowing the cascade of requires information, since
1250
        optional and supersedes are far more fine grained than
1251
        a blanket requires is.
1252
        */
1253
        if (this.requires) {
1254
            for (i = 0; i < this.requires.length; i++) {
1255
                o.requires.push(this.requires[i]);
1256
            }
1257
        }
1258
        if (o.group && this.groups && this.groups[o.group]) {
1259
            g = this.groups[o.group];
1260
            if (g.requires) {
1261
                for (i = 0; i < g.requires.length; i++) {
1262
                    o.requires.push(g.requires[i]);
1263
                }
1264
            }
1265
        }
1266
 
1267
 
1268
        if (!o.defaults) {
1269
            o.defaults = {
1270
                requires: o.requires ? [].concat(o.requires) : null,
1271
                supersedes: o.supersedes ? [].concat(o.supersedes) : null,
1272
                optional: o.optional ? [].concat(o.optional) : null
1273
            };
1274
        }
1275
 
1276
        if (o.skinnable && o.ext && o.temp) {
1277
            skinname = this._addSkin(this.skin.defaultSkin, name);
1278
            o.requires.unshift(skinname);
1279
        }
1280
 
1281
        if (o.requires.length) {
1282
            o.requires = this.filterRequires(o.requires) || [];
1283
        }
1284
 
1285
        if (!o.langPack && o.lang) {
1286
            langs = yArray(o.lang);
1287
            for (j = 0; j < langs.length; j++) {
1288
                lang = langs[j];
1289
                packName = this.getLangPackName(lang, name);
1290
                smod = this.getModuleInfo(packName);
1291
                if (!smod) {
1292
                    smod = this._addLangPack(lang, o, packName);
1293
                }
1294
            }
1295
        }
1296
 
1297
 
1298
        if (subs) {
1299
            sup = o.supersedes || [];
1300
            l = 0;
1301
 
1302
            for (i in subs) {
1303
                if (subs.hasOwnProperty(i)) {
1304
                    s = subs[i];
1305
 
1306
                    s.path = s.path || _path(name, i, o.type);
1307
                    s.pkg = name;
1308
                    s.group = o.group;
1309
 
1310
                    if (s.supersedes) {
1311
                        sup = sup.concat(s.supersedes);
1312
                    }
1313
 
1314
                    smod = this.addModule(s, i);
1315
                    sup.push(i);
1316
 
1317
                    if (smod.skinnable) {
1318
                        o.skinnable = true;
1319
                        overrides = this.skin.overrides;
1320
                        if (overrides && overrides[i]) {
1321
                            for (j = 0; j < overrides[i].length; j++) {
1322
                                skinname = this._addSkin(overrides[i][j],
1323
                                         i, name);
1324
                                sup.push(skinname);
1325
                            }
1326
                        }
1327
                        skinname = this._addSkin(this.skin.defaultSkin,
1328
                                        i, name);
1329
                        sup.push(skinname);
1330
                    }
1331
 
1332
                    // looks like we are expected to work out the metadata
1333
                    // for the parent module language packs from what is
1334
                    // specified in the child modules.
1335
                    if (s.lang && s.lang.length) {
1336
 
1337
                        langs = yArray(s.lang);
1338
                        for (j = 0; j < langs.length; j++) {
1339
                            lang = langs[j];
1340
                            packName = this.getLangPackName(lang, name);
1341
                            supName = this.getLangPackName(lang, i);
1342
                            smod = this.getModuleInfo(packName);
1343
 
1344
                            if (!smod) {
1345
                                smod = this._addLangPack(lang, o, packName);
1346
                            }
1347
 
1348
                            flatSup = flatSup || yArray.hash(smod.supersedes);
1349
 
1350
                            if (!(supName in flatSup)) {
1351
                                smod.supersedes.push(supName);
1352
                            }
1353
 
1354
                            o.lang = o.lang || [];
1355
 
1356
                            flatLang = flatLang || yArray.hash(o.lang);
1357
 
1358
                            if (!(lang in flatLang)) {
1359
                                o.lang.push(lang);
1360
                            }
1361
 
1362
// Add rollup file, need to add to supersedes list too
1363
 
1364
                            // default packages
1365
                            packName = this.getLangPackName(ROOT_LANG, name);
1366
                            supName = this.getLangPackName(ROOT_LANG, i);
1367
 
1368
                            smod = this.getModuleInfo(packName);
1369
 
1370
                            if (!smod) {
1371
                                smod = this._addLangPack(lang, o, packName);
1372
                            }
1373
 
1374
                            if (!(supName in flatSup)) {
1375
                                smod.supersedes.push(supName);
1376
                            }
1377
 
1378
// Add rollup file, need to add to supersedes list too
1379
 
1380
                        }
1381
                    }
1382
 
1383
                    l++;
1384
                }
1385
            }
1386
            //o.supersedes = YObject.keys(yArray.hash(sup));
1387
            o.supersedes = yArray.dedupe(sup);
1388
            if (this.allowRollup) {
1389
                o.rollup = (l < 4) ? l : Math.min(l - 1, 4);
1390
            }
1391
        }
1392
 
1393
        plugins = o.plugins;
1394
        if (plugins) {
1395
            for (i in plugins) {
1396
                if (plugins.hasOwnProperty(i)) {
1397
                    plug = plugins[i];
1398
                    plug.pkg = name;
1399
                    plug.path = plug.path || _path(name, i, o.type);
1400
                    plug.requires = plug.requires || [];
1401
                    plug.group = o.group;
1402
                    this.addModule(plug, i);
1403
                    if (o.skinnable) {
1404
                        this._addSkin(this.skin.defaultSkin, i, name);
1405
                    }
1406
 
1407
                }
1408
            }
1409
        }
1410
 
1411
        if (o.condition) {
1412
            t = this._expandAliases(o.condition.trigger);
1413
            for (i = 0; i < t.length; i++) {
1414
                trigger = t[i];
1415
                when = o.condition.when;
1416
                conditions[trigger] = conditions[trigger] || {};
1417
                conditions[trigger][name] = o.condition;
1418
                // the 'when' attribute can be 'before', 'after', or 'instead'
1419
                // the default is after.
1420
                if (when && when !== 'after') {
1421
                    if (when === 'instead') { // replace the trigger
1422
                        o.supersedes = o.supersedes || [];
1423
                        o.supersedes.push(trigger);
1424
                    }
1425
                    // before the trigger
1426
                        // the trigger requires the conditional mod,
1427
                        // so it should appear before the conditional
1428
                        // mod if we do not intersede.
1429
                } else { // after the trigger
1430
                    o.after = o.after || [];
1431
                    o.after.push(trigger);
1432
                }
1433
            }
1434
        }
1435
 
1436
        if (o.supersedes) {
1437
            o.supersedes = this.filterRequires(o.supersedes);
1438
        }
1439
 
1440
        if (o.after) {
1441
            o.after = this.filterRequires(o.after);
1442
            o.after_map = yArray.hash(o.after);
1443
        }
1444
 
1445
        // this.dirty = true;
1446
 
1447
        if (o.configFn) {
1448
            ret = o.configFn(o);
1449
            if (ret === false) {
1450
                delete this.moduleInfo[name];
1451
                delete GLOBAL_ENV._renderedMods[name];
1452
                o = null;
1453
            }
1454
        }
1455
        //Add to global cache
1456
        if (o) {
1457
            if (!GLOBAL_ENV._renderedMods) {
1458
                GLOBAL_ENV._renderedMods = {};
1459
            }
1460
            GLOBAL_ENV._renderedMods[name] = Y.mix(GLOBAL_ENV._renderedMods[name] || {}, o);
1461
            GLOBAL_ENV._conditions = conditions;
1462
        }
1463
 
1464
        return o;
1465
    },
1466
 
1467
    /**
1468
     * Add a requirement for one or more module
1469
     * @method require
1470
     * @param {string[] | string*} what the modules to load.
1471
     */
1472
    require: function(what) {
1473
        var a = (typeof what === 'string') ? yArray(arguments) : what;
1474
        this.dirty = true;
1475
        this.required = Y.merge(this.required, yArray.hash(this.filterRequires(a)));
1476
 
1477
        this._explodeRollups();
1478
    },
1479
    /**
1480
    * Grab all the items that were asked for, check to see if the Loader
1481
    * meta-data contains a "use" array. If it doesm remove the asked item and replace it with
1482
    * the content of the "use".
1483
    * This will make asking for: "dd"
1484
    * Actually ask for: "dd-ddm-base,dd-ddm,dd-ddm-drop,dd-drag,dd-proxy,dd-constrain,dd-drop,dd-scroll,dd-drop-plugin"
1485
    * @private
1486
    * @method _explodeRollups
1487
    */
1488
    _explodeRollups: function() {
1489
        var self = this, m, m2, i, a, v, len, len2,
1490
        r = self.required;
1491
 
1492
        if (!self.allowRollup) {
1493
            for (i in r) {
1494
                if (r.hasOwnProperty(i)) {
1495
                    m = self.getModule(i);
1496
                    if (m && m.use) {
1497
                        len = m.use.length;
1498
                        for (a = 0; a < len; a++) {
1499
                            m2 = self.getModule(m.use[a]);
1500
                            if (m2 && m2.use) {
1501
                                len2 = m2.use.length;
1502
                                for (v = 0; v < len2; v++) {
1503
                                    r[m2.use[v]] = true;
1504
                                }
1505
                            } else {
1506
                                r[m.use[a]] = true;
1507
                            }
1508
                        }
1509
                    }
1510
                }
1511
            }
1512
            self.required = r;
1513
        }
1514
 
1515
    },
1516
    /**
1517
    * Explodes the required array to remove aliases and replace them with real modules
1518
    * @method filterRequires
1519
    * @param {Array} r The original requires array
1520
    * @return {Array} The new array of exploded requirements
1521
    */
1522
    filterRequires: function(r) {
1523
        if (r) {
1524
            if (!Y.Lang.isArray(r)) {
1525
                r = [r];
1526
            }
1527
            r = Y.Array(r);
1528
            var c = [], i, mod, o, m;
1529
 
1530
            for (i = 0; i < r.length; i++) {
1531
                mod = this.getModule(r[i]);
1532
                if (mod && mod.use) {
1533
                    for (o = 0; o < mod.use.length; o++) {
1534
                        //Must walk the other modules in case a module is a rollup of rollups (datatype)
1535
                        m = this.getModule(mod.use[o]);
1536
                        if (m && m.use && (m.name !== mod.name)) {
1537
                            c = Y.Array.dedupe([].concat(c, this.filterRequires(m.use)));
1538
                        } else {
1539
                            c.push(mod.use[o]);
1540
                        }
1541
                    }
1542
                } else {
1543
                    c.push(r[i]);
1544
                }
1545
            }
1546
            r = c;
1547
        }
1548
        return r;
1549
    },
1550
 
1551
    /**
1552
    Returns `true` if the module can be attached to the YUI instance. Runs
1553
    the module's test if there is one and caches its result.
1554
 
1555
    @method _canBeAttached
1556
    @param {String} module Name of the module to check.
1557
    @return {Boolean} Result of the module's test if it has one, or `true`.
1558
    **/
1559
    _canBeAttached: function (m) {
1560
        m = this.getModule(m);
1561
        if (m && m.test) {
1562
            if (!m.hasOwnProperty('_testResult')) {
1563
                m._testResult = m.test(Y);
1564
            }
1565
            return m._testResult;
1566
        }
1567
        // return `true` for modules not registered as Loader will know what
1568
        // to do with them later on
1569
        return true;
1570
    },
1571
 
1572
    /**
1573
     * Returns an object containing properties for all modules required
1574
     * in order to load the requested module
1575
     * @method getRequires
1576
     * @param {object}  mod The module definition from moduleInfo.
1577
     * @return {array} the expanded requirement list.
1578
     */
1579
    getRequires: function(mod) {
1580
 
1581
        if (!mod) {
1582
            //console.log('returning no reqs for ' + mod.name);
1583
            return NO_REQUIREMENTS;
1584
        }
1585
 
1586
        if (mod._parsed) {
1587
            //console.log('returning requires for ' + mod.name, mod.requires);
1588
            return mod.expanded || NO_REQUIREMENTS;
1589
        }
1590
 
1591
        //TODO add modue cache here out of scope..
1592
 
1593
        var i, m, j, length, add, packName, lang, testresults = this.testresults,
1594
            name = mod.name, cond,
1595
            adddef = ON_PAGE[name] && ON_PAGE[name].details,
1596
            optReqs = mod.optionalRequires,
1597
            d, go, def,
1598
            r, old_mod,
1599
            o, skinmod, skindef, skinpar, skinname,
1600
            intl = mod.lang || mod.intl,
1601
            ftests = Y.Features && Y.Features.tests.load,
1602
            hash, reparse;
1603
 
1604
        // console.log(name);
1605
 
1606
        // pattern match leaves module stub that needs to be filled out
1607
        if (mod.temp && adddef) {
1608
            old_mod = mod;
1609
            mod = this.addModule(adddef, name);
1610
            mod.group = old_mod.group;
1611
            mod.pkg = old_mod.pkg;
1612
            delete mod.expanded;
1613
        }
1614
 
1615
        // console.log('cache: ' + mod.langCache + ' == ' + this.lang);
1616
 
1617
        //If a skin or a lang is different, reparse..
1618
        reparse = !((!this.lang || mod.langCache === this.lang) && (mod.skinCache === this.skin.defaultSkin));
1619
 
1620
        if (mod.expanded && !reparse) {
1621
            return mod.expanded;
1622
        }
1623
 
1624
        // Optional dependencies are dependencies that may or may not be
1625
        // available.
1626
        // This feature was designed specifically to be used when transpiling
1627
        // ES6 modules, in order to use polyfills and regular scripts that define
1628
        // global variables without having to import them since they should be
1629
        // available in the global scope.
1630
        if (optReqs) {
1631
            for (i = 0, length = optReqs.length; i < length; i++) {
1632
                if (this._canBeAttached(optReqs[i])) {
1633
                    mod.requires.push(optReqs[i]);
1634
                }
1635
            }
1636
        }
1637
 
1638
        d = [];
1639
        hash = {};
1640
        r = this.filterRequires(mod.requires);
1641
        if (mod.lang) {
1642
            //If a module has a lang attribute, auto add the intl requirement.
1643
            d.unshift('intl');
1644
            r.unshift('intl');
1645
            intl = true;
1646
        }
1647
        o = this.filterRequires(mod.optional);
1648
 
1649
 
1650
        mod._parsed = true;
1651
        mod.langCache = this.lang;
1652
        mod.skinCache = this.skin.defaultSkin;
1653
 
1654
        for (i = 0; i < r.length; i++) {
1655
            if (!hash[r[i]]) {
1656
                d.push(r[i]);
1657
                hash[r[i]] = true;
1658
                m = this.getModule(r[i]);
1659
                if (m) {
1660
                    add = this.getRequires(m);
1661
                    intl = intl || (m.expanded_map &&
1662
                        (INTL in m.expanded_map));
1663
                    for (j = 0; j < add.length; j++) {
1664
                        d.push(add[j]);
1665
                    }
1666
                }
1667
            }
1668
        }
1669
 
1670
        // get the requirements from superseded modules, if any
1671
        r = this.filterRequires(mod.supersedes);
1672
        if (r) {
1673
            for (i = 0; i < r.length; i++) {
1674
                if (!hash[r[i]]) {
1675
                    // if this module has submodules, the requirements list is
1676
                    // expanded to include the submodules.  This is so we can
1677
                    // prevent dups when a submodule is already loaded and the
1678
                    // parent is requested.
1679
                    if (mod.submodules) {
1680
                        d.push(r[i]);
1681
                    }
1682
 
1683
                    hash[r[i]] = true;
1684
                    m = this.getModule(r[i]);
1685
 
1686
                    if (m) {
1687
                        add = this.getRequires(m);
1688
                        intl = intl || (m.expanded_map &&
1689
                            (INTL in m.expanded_map));
1690
                        for (j = 0; j < add.length; j++) {
1691
                            d.push(add[j]);
1692
                        }
1693
                    }
1694
                }
1695
            }
1696
        }
1697
 
1698
        if (o && this.loadOptional) {
1699
            for (i = 0; i < o.length; i++) {
1700
                if (!hash[o[i]]) {
1701
                    d.push(o[i]);
1702
                    hash[o[i]] = true;
1703
                    m = this.getModuleInfo(o[i]);
1704
                    if (m) {
1705
                        add = this.getRequires(m);
1706
                        intl = intl || (m.expanded_map &&
1707
                            (INTL in m.expanded_map));
1708
                        for (j = 0; j < add.length; j++) {
1709
                            d.push(add[j]);
1710
                        }
1711
                    }
1712
                }
1713
            }
1714
        }
1715
 
1716
        cond = this.conditions[name];
1717
 
1718
        if (cond) {
1719
            //Set the module to not parsed since we have conditionals and this could change the dependency tree.
1720
            mod._parsed = false;
1721
            if (testresults && ftests) {
1722
                oeach(testresults, function(result, id) {
1723
                    var condmod = ftests[id].name;
1724
                    if (!hash[condmod] && ftests[id].trigger === name) {
1725
                        if (result && ftests[id]) {
1726
                            hash[condmod] = true;
1727
                            d.push(condmod);
1728
                        }
1729
                    }
1730
                });
1731
            } else {
1732
                for (i in cond) {
1733
                    if (cond.hasOwnProperty(i)) {
1734
                        if (!hash[i]) {
1735
                            def = cond[i];
1736
                            //first see if they've specfied a ua check
1737
                            //then see if they've got a test fn & if it returns true
1738
                            //otherwise just having a condition block is enough
1739
                            go = def && ((!def.ua && !def.test) || (def.ua && Y.UA[def.ua]) ||
1740
                                        (def.test && def.test(Y, r)));
1741
 
1742
                            if (go) {
1743
                                hash[i] = true;
1744
                                d.push(i);
1745
                                m = this.getModule(i);
1746
                                if (m) {
1747
                                    add = this.getRequires(m);
1748
                                    for (j = 0; j < add.length; j++) {
1749
                                        d.push(add[j]);
1750
                                    }
1751
 
1752
                                }
1753
                            }
1754
                        }
1755
                    }
1756
                }
1757
            }
1758
        }
1759
 
1760
        // Create skin modules
1761
        if (mod.skinnable) {
1762
            skindef = this.skin.overrides;
1763
            for (i in YUI.Env.aliases) {
1764
                if (YUI.Env.aliases.hasOwnProperty(i)) {
1765
                    if (Y.Array.indexOf(YUI.Env.aliases[i], name) > -1) {
1766
                        skinpar = i;
1767
                    }
1768
                }
1769
            }
1770
            if (skindef && (skindef[name] || (skinpar && skindef[skinpar]))) {
1771
                skinname = name;
1772
                if (skindef[skinpar]) {
1773
                    skinname = skinpar;
1774
                }
1775
                for (i = 0; i < skindef[skinname].length; i++) {
1776
                    skinmod = this._addSkin(skindef[skinname][i], name);
1777
                    if (!this.isCSSLoaded(skinmod, this._boot)) {
1778
                        d.push(skinmod);
1779
                    }
1780
                }
1781
            } else {
1782
                skinmod = this._addSkin(this.skin.defaultSkin, name);
1783
                if (!this.isCSSLoaded(skinmod, this._boot)) {
1784
                    d.push(skinmod);
1785
                }
1786
            }
1787
        }
1788
 
1789
        mod._parsed = false;
1790
 
1791
        if (intl) {
1792
 
1793
            if (mod.lang && !mod.langPack && Y.Intl) {
1794
                lang = Y.Intl.lookupBestLang(this.lang || ROOT_LANG, mod.lang);
1795
                packName = this.getLangPackName(lang, name);
1796
                if (packName) {
1797
                    d.unshift(packName);
1798
                }
1799
            }
1800
            d.unshift(INTL);
1801
        }
1802
 
1803
        mod.expanded_map = yArray.hash(d);
1804
 
1805
        mod.expanded = YObject.keys(mod.expanded_map);
1806
 
1807
        return mod.expanded;
1808
    },
1809
    /**
1810
    * Check to see if named css module is already loaded on the page
1811
    * @method isCSSLoaded
1812
    * @param {String} name The name of the css file
1813
    * @param {Boolean} skip To skip the short-circuit for ignoreRegister
1814
    * @return Boolean
1815
    */
1816
    isCSSLoaded: function(name, skip) {
1817
        //TODO - Make this call a batching call with name being an array
1818
        if (!name || !YUI.Env.cssStampEl || (!skip && this.ignoreRegistered)) {
1819
            return false;
1820
        }
1821
        var el = YUI.Env.cssStampEl,
1822
            ret = false,
1823
            mod = YUI.Env._cssLoaded[name],
1824
            style = el.currentStyle; //IE
1825
 
1826
 
1827
        if (mod !== undefined) {
1828
            return mod;
1829
        }
1830
 
1831
        //Add the classname to the element
1832
        el.className = name;
1833
 
1834
        if (!style) {
1835
            style = Y.config.doc.defaultView.getComputedStyle(el, null);
1836
        }
1837
 
1838
        if (style && style.display === 'none') {
1839
            ret = true;
1840
        }
1841
 
1842
 
1843
        el.className = ''; //Reset the classname to ''
1844
 
1845
        YUI.Env._cssLoaded[name] = ret;
1846
 
1847
        return ret;
1848
    },
1849
 
1850
    /**
1851
     * Returns a hash of module names the supplied module satisfies.
1852
     * @method getProvides
1853
     * @param {string} name The name of the module.
1854
     * @return {object} what this module provides.
1855
     */
1856
    getProvides: function(name) {
1857
        var m = this.getModule(name), o, s;
1858
            // supmap = this.provides;
1859
 
1860
        if (!m) {
1861
            return NOT_FOUND;
1862
        }
1863
 
1864
        if (m && !m.provides) {
1865
            o = {};
1866
            s = m.supersedes;
1867
 
1868
            if (s) {
1869
                yArray.each(s, function(v) {
1870
                    Y.mix(o, this.getProvides(v));
1871
                }, this);
1872
            }
1873
 
1874
            o[name] = true;
1875
            m.provides = o;
1876
 
1877
        }
1878
 
1879
        return m.provides;
1880
    },
1881
 
1882
    /**
1883
     * Calculates the dependency tree, the result is stored in the sorted
1884
     * property.
1885
     * @method calculate
1886
     * @param {object} o optional options object.
1887
     * @param {string} type optional argument to prune modules.
1888
     */
1889
    calculate: function(o, type) {
1890
        if (o || type || this.dirty) {
1891
 
1892
            if (o) {
1893
                this._config(o);
1894
            }
1895
 
1896
            if (!this._init) {
1897
                this._setup();
1898
            }
1899
 
1900
            this._explode();
1901
 
1902
            if (this.allowRollup) {
1903
                this._rollup();
1904
            } else {
1905
                this._explodeRollups();
1906
            }
1907
            this._reduce();
1908
            this._sort();
1909
        }
1910
    },
1911
    /**
1912
    * Creates a "psuedo" package for languages provided in the lang array
1913
    * @method _addLangPack
1914
    * @private
1915
    * @param {String} lang The language to create
1916
    * @param {Object} m The module definition to create the language pack around
1917
    * @param {String} packName The name of the package (e.g: lang/datatype-date-en-US)
1918
    * @return {Object} The module definition
1919
    */
1920
    _addLangPack: function(lang, m, packName) {
1921
        var name = m.name,
1922
            packPath, conf,
1923
            existing = this.getModuleInfo(packName);
1924
 
1925
        if (!existing) {
1926
 
1927
            packPath = _path((m.pkg || name), packName, JS, true);
1928
 
1929
            conf = {
1930
                path: packPath,
1931
                intl: true,
1932
                langPack: true,
1933
                ext: m.ext,
1934
                group: m.group,
1935
                supersedes: []
1936
            };
1937
            if (m.root) {
1938
                conf.root = m.root;
1939
            }
1940
            if (m.base) {
1941
                conf.base = m.base;
1942
            }
1943
 
1944
            if (m.configFn) {
1945
                conf.configFn = m.configFn;
1946
            }
1947
 
1948
            this.addModule(conf, packName);
1949
 
1950
            if (lang) {
1951
                Y.Env.lang = Y.Env.lang || {};
1952
                Y.Env.lang[lang] = Y.Env.lang[lang] || {};
1953
                Y.Env.lang[lang][name] = true;
1954
            }
1955
        }
1956
 
1957
        return this.getModuleInfo(packName);
1958
    },
1959
 
1960
    /**
1961
     * Investigates the current YUI configuration on the page.  By default,
1962
     * modules already detected will not be loaded again unless a force
1963
     * option is encountered.  Called by calculate()
1964
     * @method _setup
1965
     * @private
1966
     */
1967
    _setup: function() {
1968
        var info = this.moduleInfo, name, i, j, m, l,
1969
            packName;
1970
 
1971
        for (name in info) {
1972
            if (info.hasOwnProperty(name)) {
1973
                m = info[name];
1974
                if (m) {
1975
 
1976
                    // remove dups
1977
                    //m.requires = YObject.keys(yArray.hash(m.requires));
1978
                    m.requires = yArray.dedupe(m.requires);
1979
 
1980
                    // Create lang pack modules
1981
                    //if (m.lang && m.lang.length) {
1982
                    if (m.lang) {
1983
                        // Setup root package if the module has lang defined,
1984
                        // it needs to provide a root language pack
1985
                        packName = this.getLangPackName(ROOT_LANG, name);
1986
                        this._addLangPack(null, m, packName);
1987
                    }
1988
 
1989
                }
1990
            }
1991
        }
1992
 
1993
 
1994
        //l = Y.merge(this.inserted);
1995
        l = {};
1996
 
1997
        // available modules
1998
        if (!this.ignoreRegistered) {
1999
            Y.mix(l, GLOBAL_ENV.mods);
2000
        }
2001
 
2002
        // add the ignore list to the list of loaded packages
2003
        if (this.ignore) {
2004
            Y.mix(l, yArray.hash(this.ignore));
2005
        }
2006
 
2007
        // expand the list to include superseded modules
2008
        for (j in l) {
2009
            if (l.hasOwnProperty(j)) {
2010
                Y.mix(l, this.getProvides(j));
2011
            }
2012
        }
2013
 
2014
        // remove modules on the force list from the loaded list
2015
        if (this.force) {
2016
            for (i = 0; i < this.force.length; i++) {
2017
                if (this.force[i] in l) {
2018
                    delete l[this.force[i]];
2019
                }
2020
            }
2021
        }
2022
 
2023
        Y.mix(this.loaded, l);
2024
 
2025
        this._init = true;
2026
    },
2027
 
2028
    /**
2029
     * Builds a module name for a language pack
2030
     * @method getLangPackName
2031
     * @param {string} lang the language code.
2032
     * @param {string} mname the module to build it for.
2033
     * @return {string} the language pack module name.
2034
     */
2035
    getLangPackName: function(lang, mname) {
2036
        return ('lang/' + mname + ((lang) ? '_' + lang : ''));
2037
    },
2038
    /**
2039
     * Inspects the required modules list looking for additional
2040
     * dependencies.  Expands the required list to include all
2041
     * required modules.  Called by calculate()
2042
     * @method _explode
2043
     * @private
2044
     */
2045
    _explode: function() {
2046
        //TODO Move done out of scope
2047
        var r = this.required, m, reqs, done = {},
2048
            self = this, name, expound;
2049
 
2050
        // the setup phase is over, all modules have been created
2051
        self.dirty = false;
2052
 
2053
        self._explodeRollups();
2054
        r = self.required;
2055
 
2056
        for (name in r) {
2057
            if (r.hasOwnProperty(name)) {
2058
                if (!done[name]) {
2059
                    done[name] = true;
2060
                    m = self.getModule(name);
2061
                    if (m) {
2062
                        expound = m.expound;
2063
 
2064
                        if (expound) {
2065
                            r[expound] = self.getModule(expound);
2066
                            reqs = self.getRequires(r[expound]);
2067
                            Y.mix(r, yArray.hash(reqs));
2068
                        }
2069
 
2070
                        reqs = self.getRequires(m);
2071
                        Y.mix(r, yArray.hash(reqs));
2072
                    }
2073
                }
2074
            }
2075
        }
2076
 
2077
    },
2078
    /**
2079
    * The default method used to test a module against a pattern
2080
    * @method _patternTest
2081
    * @private
2082
    * @param {String} mname The module being tested
2083
    * @param {String} pname The pattern to match
2084
    */
2085
    _patternTest: function(mname, pname) {
2086
        return (mname.indexOf(pname) > -1);
2087
    },
2088
    /**
2089
    * Get's the loader meta data for the requested module
2090
    * @method getModule
2091
    * @param {String} mname The module name to get
2092
    * @return {Object} The module metadata
2093
    */
2094
    getModule: function(mname) {
2095
        //TODO: Remove name check - it's a quick hack to fix pattern WIP
2096
        if (!mname) {
2097
            return null;
2098
        }
2099
 
2100
        var p, found, pname,
2101
            m = this.getModuleInfo(mname),
2102
            patterns = this.patterns;
2103
 
2104
        // check the patterns library to see if we should automatically add
2105
        // the module with defaults
2106
        if (!m || (m && m.ext)) {
2107
            for (pname in patterns) {
2108
                if (patterns.hasOwnProperty(pname)) {
2109
                    p = patterns[pname];
2110
 
2111
                    //There is no test method, create a default one that tests
2112
                    // the pattern against the mod name
2113
                    if (!p.test) {
2114
                        p.test = this._patternTest;
2115
                    }
2116
 
2117
                    if (p.test(mname, pname)) {
2118
                        // use the metadata supplied for the pattern
2119
                        // as the module definition.
2120
                        found = p;
2121
                        break;
2122
                    }
2123
                }
2124
            }
2125
        }
2126
 
2127
        if (!m) {
2128
            if (found) {
2129
                if (p.action) {
2130
                    p.action.call(this, mname, pname);
2131
                } else {
2132
                    // ext true or false?
2133
                    m = this.addModule(Y.merge(found, {
2134
                        test: void 0,
2135
                        temp: true
2136
                    }), mname);
2137
                    if (m && found.configFn) {
2138
                        m.configFn = found.configFn;
2139
                    }
2140
                }
2141
            }
2142
        } else {
2143
            if (found && m && found.configFn && !m.configFn) {
2144
                m.configFn = found.configFn;
2145
                m.configFn(m);
2146
            }
2147
        }
2148
 
2149
        return m;
2150
    },
2151
 
2152
    // impl in rollup submodule
2153
    _rollup: function() { },
2154
 
2155
    /**
2156
     * Remove superceded modules and loaded modules.  Called by
2157
     * calculate() after we have the mega list of all dependencies
2158
     * @method _reduce
2159
     * @return {object} the reduced dependency hash.
2160
     * @private
2161
     */
2162
    _reduce: function(r) {
2163
 
2164
        r = r || this.required;
2165
 
2166
        var i, j, s, m, type = this.loadType,
2167
        ignore = this.ignore ? yArray.hash(this.ignore) : false;
2168
 
2169
        for (i in r) {
2170
            if (r.hasOwnProperty(i)) {
2171
                m = this.getModule(i);
2172
                // remove if already loaded
2173
                if (((this.loaded[i] || ON_PAGE[i]) &&
2174
                        !this.forceMap[i] && !this.ignoreRegistered) ||
2175
                        (type && m && m.type !== type)) {
2176
                    delete r[i];
2177
                }
2178
                if (ignore && ignore[i]) {
2179
                    delete r[i];
2180
                }
2181
                // remove anything this module supersedes
2182
                s = m && m.supersedes;
2183
                if (s) {
2184
                    for (j = 0; j < s.length; j++) {
2185
                        if (s[j] in r) {
2186
                            delete r[s[j]];
2187
                        }
2188
                    }
2189
                }
2190
            }
2191
        }
2192
 
2193
        return r;
2194
    },
2195
    /**
2196
    * Handles the queue when a module has been loaded for all cases
2197
    * @method _finish
2198
    * @private
2199
    * @param {String} msg The message from Loader
2200
    * @param {Boolean} success A boolean denoting success or failure
2201
    */
2202
    _finish: function(msg, success) {
2203
 
2204
        _queue.running = false;
2205
 
2206
        var onEnd = this.onEnd;
2207
        if (onEnd) {
2208
            onEnd.call(this.context, {
2209
                msg: msg,
2210
                data: this.data,
2211
                success: success
2212
            });
2213
        }
2214
        this._continue();
2215
    },
2216
    /**
2217
    * The default Loader onSuccess handler, calls this.onSuccess with a payload
2218
    * @method _onSuccess
2219
    * @private
2220
    */
2221
    _onSuccess: function() {
2222
        var self = this, skipped = Y.merge(self.skipped), fn,
2223
            failed = [], rreg = self.requireRegistration,
2224
            success, msg, i, mod;
2225
 
2226
        for (i in skipped) {
2227
            if (skipped.hasOwnProperty(i)) {
2228
                delete self.inserted[i];
2229
            }
2230
        }
2231
 
2232
        self.skipped = {};
2233
 
2234
        for (i in self.inserted) {
2235
            if (self.inserted.hasOwnProperty(i)) {
2236
                mod = self.getModule(i);
2237
                if (mod && rreg && mod.type === JS && !(i in YUI.Env.mods)) {
2238
                    failed.push(i);
2239
                } else {
2240
                    Y.mix(self.loaded, self.getProvides(i));
2241
                }
2242
            }
2243
        }
2244
 
2245
        fn = self.onSuccess;
2246
        msg = (failed.length) ? 'notregistered' : 'success';
2247
        success = !(failed.length);
2248
        if (fn) {
2249
            fn.call(self.context, {
2250
                msg: msg,
2251
                data: self.data,
2252
                success: success,
2253
                failed: failed,
2254
                skipped: skipped
2255
            });
2256
        }
2257
        self._finish(msg, success);
2258
    },
2259
    /**
2260
    * The default Loader onProgress handler, calls this.onProgress with a payload
2261
    * @method _onProgress
2262
    * @private
2263
    */
2264
    _onProgress: function(e) {
2265
        var self = this, i;
2266
        //set the internal cache to what just came in.
2267
        if (e.data && e.data.length) {
2268
            for (i = 0; i < e.data.length; i++) {
2269
                e.data[i] = self.getModule(e.data[i].name);
2270
            }
2271
        }
2272
        if (self.onProgress) {
2273
            self.onProgress.call(self.context, {
2274
                name: e.url,
2275
                data: e.data
2276
            });
2277
        }
2278
    },
2279
    /**
2280
    * The default Loader onFailure handler, calls this.onFailure with a payload
2281
    * @method _onFailure
2282
    * @private
2283
    */
2284
    _onFailure: function(o) {
2285
        var f = this.onFailure, msg = [], i = 0, len = o.errors.length;
2286
 
2287
        for (i; i < len; i++) {
2288
            msg.push(o.errors[i].error);
2289
        }
2290
 
2291
        msg = msg.join(',');
2292
 
2293
 
2294
        if (f) {
2295
            f.call(this.context, {
2296
                msg: msg,
2297
                data: this.data,
2298
                success: false
2299
            });
2300
        }
2301
 
2302
        this._finish(msg, false);
2303
 
2304
    },
2305
 
2306
    /**
2307
    * The default Loader onTimeout handler, calls this.onTimeout with a payload
2308
    * @method _onTimeout
2309
    * @param {Get.Transaction} transaction The Transaction object from `Y.Get`
2310
    * @private
2311
    */
2312
    _onTimeout: function(transaction) {
2313
        var f = this.onTimeout;
2314
        if (f) {
2315
            f.call(this.context, {
2316
                msg: 'timeout',
2317
                data: this.data,
2318
                success: false,
2319
                transaction: transaction
2320
            });
2321
        }
2322
    },
2323
 
2324
    /**
2325
     * Sorts the dependency tree.  The last step of calculate()
2326
     * @method _sort
2327
     * @private
2328
     */
2329
    _sort: function() {
2330
        var name,
2331
 
2332
            // Object containing module names.
2333
            required = this.required,
2334
 
2335
            // Keep track of whether we've visited a module.
2336
            visited = {};
2337
 
2338
        // Will contain modules names, in the correct order,
2339
        // according to dependencies.
2340
        this.sorted = [];
2341
 
2342
        for (name in required) {
2343
            if (!visited[name] && required.hasOwnProperty(name)) {
2344
                this._visit(name, visited);
2345
            }
2346
        }
2347
    },
2348
 
2349
    /**
2350
     * Recursively visits the dependencies of the module name
2351
     * passed in, and appends each module name to the `sorted` property.
2352
     * @param {String} name The name of a module.
2353
     * @param {Object} visited Keeps track of whether a module was visited.
2354
     * @method _visit
2355
     * @private
2356
     */
2357
    _visit: function (name, visited) {
2358
        var required, condition, moduleInfo, dependency, dependencies,
2359
            trigger, isAfter, i, l;
2360
 
2361
        visited[name] = true;
2362
        required = this.required;
2363
        moduleInfo = this.moduleInfo[name];
2364
        condition = this.conditions[name] || {};
2365
 
2366
        if (moduleInfo) {
2367
            // Recurse on each dependency of this module,
2368
            // figuring out its dependencies, and so on.
2369
            dependencies = moduleInfo.expanded || moduleInfo.requires;
2370
 
2371
            for (i = 0, l = dependencies.length; i < l; ++i) {
2372
                dependency = dependencies[i];
2373
                trigger = condition[dependency];
2374
 
2375
                // We cannot process this dependency yet if it must
2376
                // appear after our current module.
2377
                isAfter = trigger && (!trigger.when || trigger.when === "after");
2378
 
2379
                // Is this module name in the required list of modules,
2380
                // and have we not already visited it?
2381
                if (required[dependency] && !visited[dependency] && !isAfter) {
2382
                    this._visit(dependency, visited);
2383
                }
2384
            }
2385
        }
2386
 
2387
        this.sorted.push(name);
2388
    },
2389
 
2390
    /**
2391
    * Handles the actual insertion of script/link tags
2392
    * @method _insert
2393
    * @private
2394
    * @param {Object} source The YUI instance the request came from
2395
    * @param {Object} o The metadata to include
2396
    * @param {String} type JS or CSS
2397
    * @param {Boolean} [skipcalc=false] Do a Loader.calculate on the meta
2398
    */
2399
    _insert: function(source, o, type, skipcalc) {
2400
 
2401
 
2402
        // restore the state at the time of the request
2403
        if (source) {
2404
            this._config(source);
2405
        }
2406
 
2407
        // build the dependency list
2408
        // don't include type so we can process CSS and script in
2409
        // one pass when the type is not specified.
2410
 
2411
        var modules = this.resolve(!skipcalc),
2412
            self = this, comp = 0, actions = 0,
2413
            mods = {}, deps, complete;
2414
 
2415
        self._refetch = [];
2416
 
2417
        if (type) {
2418
            //Filter out the opposite type and reset the array so the checks later work
2419
            modules[((type === JS) ? CSS : JS)] = [];
2420
        }
2421
        if (!self.fetchCSS) {
2422
            modules.css = [];
2423
        }
2424
        if (modules.js.length) {
2425
            comp++;
2426
        }
2427
        if (modules.css.length) {
2428
            comp++;
2429
        }
2430
 
2431
        //console.log('Resolved Modules: ', modules);
2432
 
2433
        complete = function(d) {
2434
            actions++;
2435
            var errs = {}, i = 0, o = 0, u = '', fn,
2436
                modName, resMods;
2437
 
2438
            if (d && d.errors) {
2439
                for (i = 0; i < d.errors.length; i++) {
2440
                    if (d.errors[i].request) {
2441
                        u = d.errors[i].request.url;
2442
                    } else {
2443
                        u = d.errors[i];
2444
                    }
2445
                    errs[u] = u;
2446
                }
2447
            }
2448
 
2449
            if (d && d.data && d.data.length && (d.type === 'success')) {
2450
                for (i = 0; i < d.data.length; i++) {
2451
                    self.inserted[d.data[i].name] = true;
2452
                    //If the external module has a skin or a lang, reprocess it
2453
                    if (d.data[i].lang || d.data[i].skinnable) {
2454
                        delete self.inserted[d.data[i].name];
2455
                        self._refetch.push(d.data[i].name);
2456
                    }
2457
                }
2458
            }
2459
 
2460
            if (actions === comp) {
2461
                self._loading = null;
2462
                if (self._refetch.length) {
2463
                    //Get the deps for the new meta-data and reprocess
2464
                    for (i = 0; i < self._refetch.length; i++) {
2465
                        deps = self.getRequires(self.getModule(self._refetch[i]));
2466
                        for (o = 0; o < deps.length; o++) {
2467
                            if (!self.inserted[deps[o]]) {
2468
                                //We wouldn't be to this point without the module being here
2469
                                mods[deps[o]] = deps[o];
2470
                            }
2471
                        }
2472
                    }
2473
                    mods = Y.Object.keys(mods);
2474
                    if (mods.length) {
2475
                        self.require(mods);
2476
                        resMods = self.resolve(true);
2477
                        if (resMods.cssMods.length) {
2478
                            for (i=0; i <  resMods.cssMods.length; i++) {
2479
                                modName = resMods.cssMods[i].name;
2480
                                delete YUI.Env._cssLoaded[modName];
2481
                                if (self.isCSSLoaded(modName)) {
2482
                                    self.inserted[modName] = true;
2483
                                    delete self.required[modName];
2484
                                }
2485
                            }
2486
                            self.sorted = [];
2487
                            self._sort();
2488
                        }
2489
                        d = null; //bail
2490
                        self._insert(); //insert the new deps
2491
                    }
2492
                }
2493
                if (d && d.fn) {
2494
                    fn = d.fn;
2495
                    delete d.fn;
2496
                    fn.call(self, d);
2497
                }
2498
            }
2499
        };
2500
 
2501
        this._loading = true;
2502
 
2503
        if (!modules.js.length && !modules.css.length) {
2504
            actions = -1;
2505
            complete({
2506
                fn: self._onSuccess
2507
            });
2508
            return;
2509
        }
2510
 
2511
 
2512
        if (modules.css.length) { //Load CSS first
2513
            Y.Get.css(modules.css, {
2514
                data: modules.cssMods,
2515
                attributes: self.cssAttributes,
2516
                insertBefore: self.insertBefore,
2517
                charset: self.charset,
2518
                timeout: self.timeout,
2519
                context: self,
2520
                onProgress: function(e) {
2521
                    self._onProgress.call(self, e);
2522
                },
2523
                onTimeout: function(d) {
2524
                    self._onTimeout.call(self, d);
2525
                },
2526
                onSuccess: function(d) {
2527
                    d.type = 'success';
2528
                    d.fn = self._onSuccess;
2529
                    complete.call(self, d);
2530
                },
2531
                onFailure: function(d) {
2532
                    d.type = 'failure';
2533
                    d.fn = self._onFailure;
2534
                    complete.call(self, d);
2535
                }
2536
            });
2537
        }
2538
 
2539
        if (modules.js.length) {
2540
            Y.Get.js(modules.js, {
2541
                data: modules.jsMods,
2542
                insertBefore: self.insertBefore,
2543
                attributes: self.jsAttributes,
2544
                charset: self.charset,
2545
                timeout: self.timeout,
2546
                autopurge: false,
2547
                context: self,
2548
                async: self.async,
2549
                onProgress: function(e) {
2550
                    self._onProgress.call(self, e);
2551
                },
2552
                onTimeout: function(d) {
2553
                    self._onTimeout.call(self, d);
2554
                },
2555
                onSuccess: function(d) {
2556
                    d.type = 'success';
2557
                    d.fn = self._onSuccess;
2558
                    complete.call(self, d);
2559
                },
2560
                onFailure: function(d) {
2561
                    d.type = 'failure';
2562
                    d.fn = self._onFailure;
2563
                    complete.call(self, d);
2564
                }
2565
            });
2566
        }
2567
    },
2568
    /**
2569
    * Once a loader operation is completely finished, process any additional queued items.
2570
    * @method _continue
2571
    * @private
2572
    */
2573
    _continue: function() {
2574
        if (!(_queue.running) && _queue.size() > 0) {
2575
            _queue.running = true;
2576
            _queue.next()();
2577
        }
2578
    },
2579
 
2580
    /**
2581
     * inserts the requested modules and their dependencies.
2582
     * <code>type</code> can be "js" or "css".  Both script and
2583
     * css are inserted if type is not provided.
2584
     * @method insert
2585
     * @param {object} o optional options object.
2586
     * @param {string} type the type of dependency to insert.
2587
     */
2588
    insert: function(o, type, skipsort) {
2589
        var self = this, copy = Y.merge(this);
2590
        delete copy.require;
2591
        delete copy.dirty;
2592
        _queue.add(function() {
2593
            self._insert(copy, o, type, skipsort);
2594
        });
2595
        this._continue();
2596
    },
2597
 
2598
    /**
2599
     * Executed every time a module is loaded, and if we are in a load
2600
     * cycle, we attempt to load the next script.  Public so that it
2601
     * is possible to call this if using a method other than
2602
     * Y.register to determine when scripts are fully loaded
2603
     * @method loadNext
2604
     * @deprecated
2605
     * @param {string} mname optional the name of the module that has
2606
     * been loaded (which is usually why it is time to load the next
2607
     * one).
2608
     */
2609
    loadNext: function() {
2610
        return;
2611
    },
2612
 
2613
    /**
2614
     * Apply filter defined for this instance to a url/path
2615
     * @method _filter
2616
     * @param {string} u the string to filter.
2617
     * @param {string} name the name of the module, if we are processing
2618
     * a single module as opposed to a combined url.
2619
     * @return {string} the filtered string.
2620
     * @private
2621
     */
2622
    _filter: function(u, name, group) {
2623
        var f = this.filter,
2624
            hasFilter = name && (name in this.filters),
2625
            modFilter = hasFilter && this.filters[name],
2626
            groupName = group || (this.getModuleInfo(name) || {}).group || null;
2627
 
2628
        if (groupName && this.groups[groupName] && this.groups[groupName].filter) {
2629
            modFilter = this.groups[groupName].filter;
2630
            hasFilter = true;
2631
        }
2632
 
2633
        if (u) {
2634
            if (hasFilter) {
2635
                f = (L.isString(modFilter)) ? this.FILTER_DEFS[modFilter.toUpperCase()] || null : modFilter;
2636
            }
2637
            if (f) {
2638
                u = u.replace(new RegExp(f.searchExp, 'g'), f.replaceStr);
2639
            }
2640
        }
2641
        return u;
2642
    },
2643
 
2644
    /**
2645
     * Generates the full url for a module
2646
     * @method _url
2647
     * @param {string} path the path fragment.
2648
     * @param {String} name The name of the module
2649
     * @param {String} [base] The base url to use. Defaults to self.base
2650
     * @return {string} the full url.
2651
     * @private
2652
     */
2653
    _url: function(path, name, base) {
2654
        return this._filter((base || this.base || '') + path, name);
2655
    },
2656
    /**
2657
    * Returns an Object hash of file arrays built from `loader.sorted` or from an arbitrary list of sorted modules.
2658
    * @method resolve
2659
    * @param {Boolean} [calc=false] Perform a loader.calculate() before anything else
2660
    * @param {Array} [sorted=loader.sorted] An override for the loader.sorted array
2661
    * @return {Object} Object hash (js and css) of two arrays of file lists
2662
    * @example This method can be used as an off-line dep calculator
2663
    *
2664
    *        var Y = YUI();
2665
    *        var loader = new Y.Loader({
2666
    *            filter: 'debug',
2667
    *            base: '../../',
2668
    *            root: 'build/',
2669
    *            combine: true,
2670
    *            require: ['node', 'dd', 'console']
2671
    *        });
2672
    *        var out = loader.resolve(true);
2673
    *
2674
    */
2675
    resolve: function(calc, sorted) {
2676
        var self     = this,
2677
            resolved = { js: [], jsMods: [], css: [], cssMods: [] },
2678
            addSingle,
2679
            usePathogen = Y.config.comboLoader && Y.config.customComboBase;
2680
 
2681
        if (self.skin.overrides || self.skin.defaultSkin !== DEFAULT_SKIN || self.ignoreRegistered) {
2682
            self._resetModules();
2683
        }
2684
 
2685
        if (calc) {
2686
            self.calculate();
2687
        }
2688
        sorted = sorted || self.sorted;
2689
 
2690
        addSingle = function(mod) {
2691
            if (mod) {
2692
                var group = (mod.group && self.groups[mod.group]) || NOT_FOUND,
2693
                    url;
2694
 
2695
                //Always assume it's async
2696
                if (group.async === false) {
2697
                    mod.async = group.async;
2698
                }
2699
 
2700
                url = (mod.fullpath) ? self._filter(mod.fullpath, mod.name) :
2701
                      self._url(mod.path, mod.name, group.base || mod.base);
2702
 
2703
                if (mod.attributes || mod.async === false) {
2704
                    url = {
2705
                        url: url,
2706
                        async: mod.async
2707
                    };
2708
                    if (mod.attributes) {
2709
                        url.attributes = mod.attributes;
2710
                    }
2711
                }
2712
                resolved[mod.type].push(url);
2713
                resolved[mod.type + 'Mods'].push(mod);
2714
            } else {
2715
            }
2716
 
2717
        };
2718
 
2719
        /*jslint vars: true */
2720
        var inserted     = (self.ignoreRegistered) ? {} : self.inserted,
2721
            comboSources,
2722
            maxURLLength,
2723
            comboMeta,
2724
            comboBase,
2725
            comboSep,
2726
            group,
2727
            mod,
2728
            len,
2729
            i,
2730
            hasComboModule = false;
2731
 
2732
        /*jslint vars: false */
2733
 
2734
        for (i = 0, len = sorted.length; i < len; i++) {
2735
            mod = self.getModule(sorted[i]);
2736
            if (!mod || inserted[mod.name]) {
2737
                continue;
2738
            }
2739
 
2740
            group = self.groups[mod.group];
2741
 
2742
            comboBase = self.comboBase;
2743
 
2744
            if (group) {
2745
                if (!group.combine || mod.fullpath) {
2746
                    //This is not a combo module, skip it and load it singly later.
2747
                    addSingle(mod);
2748
                    continue;
2749
                }
2750
                mod.combine = true;
2751
 
2752
                if (typeof group.root === 'string') {
2753
                    mod.root = group.root;
2754
                }
2755
 
2756
                comboBase    = group.comboBase || comboBase;
2757
                comboSep     = group.comboSep;
2758
                maxURLLength = group.maxURLLength;
2759
            } else {
2760
                if (!self.combine) {
2761
                    //This is not a combo module, skip it and load it singly later.
2762
                    addSingle(mod);
2763
                    continue;
2764
                }
2765
            }
2766
 
2767
            if (!mod.combine && mod.ext) {
2768
                addSingle(mod);
2769
                continue;
2770
            }
2771
            hasComboModule = true;
2772
            comboSources = comboSources || {};
2773
            comboSources[comboBase] = comboSources[comboBase] ||
2774
                { js: [], jsMods: [], css: [], cssMods: [] };
2775
 
2776
            comboMeta               = comboSources[comboBase];
2777
            comboMeta.group         = mod.group;
2778
            comboMeta.comboSep      = comboSep || self.comboSep;
2779
            comboMeta.maxURLLength  = maxURLLength || self.maxURLLength;
2780
 
2781
            comboMeta[mod.type + 'Mods'].push(mod);
2782
            if (mod.type === JS || mod.type === CSS) {
2783
                resolved[mod.type + 'Mods'].push(mod);
2784
            }
2785
        }
2786
        //only encode if we have something to encode
2787
        if (hasComboModule) {
2788
            if (usePathogen) {
2789
                resolved = this._pathogenEncodeComboSources(resolved);
2790
            } else {
2791
                resolved = this._encodeComboSources(resolved, comboSources);
2792
            }
2793
        }
2794
        return resolved;
2795
    },
2796
 
2797
    /**
2798
     * Encodes combo sources and appends them to an object hash of arrays from `loader.resolve`.
2799
     *
2800
     * @method _encodeComboSources
2801
     * @param {Object} resolved The object hash of arrays in which to attach the encoded combo sources.
2802
     * @param {Object} comboSources An object containing relevant data about modules.
2803
     * @return Object
2804
     * @private
2805
     */
2806
    _encodeComboSources: function(resolved, comboSources) {
2807
        var fragSubset,
2808
            modules,
2809
            tmpBase,
2810
            baseLen,
2811
            frags,
2812
            frag,
2813
            type,
2814
            mod,
2815
            maxURLLength,
2816
            comboBase,
2817
            comboMeta,
2818
            comboSep,
2819
            i,
2820
            len,
2821
            self = this;
2822
 
2823
        for (comboBase in comboSources) {
2824
            if (comboSources.hasOwnProperty(comboBase)) {
2825
                comboMeta    = comboSources[comboBase];
2826
                comboSep     = comboMeta.comboSep;
2827
                maxURLLength = comboMeta.maxURLLength;
2828
                for (type in comboMeta) {
2829
                    if (type === JS || type === CSS) {
2830
                        modules = comboMeta[type + 'Mods'];
2831
                        frags = [];
2832
                        for (i = 0, len = modules.length; i < len; i += 1) {
2833
                            mod = modules[i];
2834
                            frag = ((typeof mod.root === 'string') ? mod.root : self.root) + (mod.path || mod.fullpath);
2835
                            frags.push(
2836
                                self._filter(frag, mod.name)
2837
                            );
2838
                        }
2839
                        tmpBase = comboBase + frags.join(comboSep);
2840
                        baseLen = tmpBase.length;
2841
                        if (maxURLLength <= comboBase.length) {
2842
                            maxURLLength = MAX_URL_LENGTH;
2843
                        }
2844
 
2845
                        if (frags.length) {
2846
                            if (baseLen > maxURLLength) {
2847
                                fragSubset = [];
2848
                                for (i = 0, len = frags.length; i < len; i++) {
2849
                                    fragSubset.push(frags[i]);
2850
                                    tmpBase = comboBase + fragSubset.join(comboSep);
2851
 
2852
                                    if (tmpBase.length > maxURLLength) {
2853
                                        frag = fragSubset.pop();
2854
                                        tmpBase = comboBase + fragSubset.join(comboSep);
2855
                                        resolved[type].push(self._filter(tmpBase, null, comboMeta.group));
2856
                                        fragSubset = [];
2857
                                        if (frag) {
2858
                                            fragSubset.push(frag);
2859
                                        }
2860
                                    }
2861
                                }
2862
                                if (fragSubset.length) {
2863
                                    tmpBase = comboBase + fragSubset.join(comboSep);
2864
                                    resolved[type].push(self._filter(tmpBase, null, comboMeta.group));
2865
                                }
2866
                            } else {
2867
                                resolved[type].push(self._filter(tmpBase, null, comboMeta.group));
2868
                            }
2869
                        }
2870
                    }
2871
                }
2872
            }
2873
        }
2874
        return resolved;
2875
    },
2876
 
2877
    /**
2878
    Shortcut to calculate, resolve and load all modules.
2879
 
2880
        var loader = new Y.Loader({
2881
            ignoreRegistered: true,
2882
            modules: {
2883
                mod: {
2884
                    path: 'mod.js'
2885
                }
2886
            },
2887
            requires: [ 'mod' ]
2888
        });
2889
        loader.load(function() {
2890
            console.log('All modules have loaded..');
2891
        });
2892
 
2893
 
2894
    @method load
2895
    @param {Function} cb Executed after all load operations are complete
2896
    */
2897
    load: function(cb) {
2898
        if (!cb) {
2899
            return;
2900
        }
2901
        var self = this,
2902
            out = self.resolve(true);
2903
 
2904
        self.data = out;
2905
 
2906
        self.onEnd = function() {
2907
            cb.apply(self.context || self, arguments);
2908
        };
2909
 
2910
        self.insert();
2911
    }
2912
};
2913
 
2914
 
2915
}, '3.18.1', {"requires": ["get", "features"]});
2916
YUI.add('loader-rollup', function (Y, NAME) {
2917
 
2918
/**
2919
 * Optional automatic rollup logic for reducing http connections
2920
 * when not using a combo service.
2921
 * @module loader
2922
 * @submodule rollup
2923
 */
2924
 
2925
/**
2926
 * Look for rollup packages to determine if all of the modules a
2927
 * rollup supersedes are required.  If so, include the rollup to
2928
 * help reduce the total number of connections required.  Called
2929
 * by calculate().  This is an optional feature, and requires the
2930
 * appropriate submodule to function.
2931
 * @method _rollup
2932
 * @for Loader
2933
 * @private
2934
 */
2935
Y.Loader.prototype._rollup = function() {
2936
    var i, j, m, s, r = this.required, roll,
2937
        info = this.moduleInfo, rolled, c, smod;
2938
 
2939
    // find and cache rollup modules
2940
    if (this.dirty || !this.rollups) {
2941
        this.rollups = {};
2942
        for (i in info) {
2943
            if (info.hasOwnProperty(i)) {
2944
                m = this.getModule(i);
2945
                // if (m && m.rollup && m.supersedes) {
2946
                if (m && m.rollup) {
2947
                    this.rollups[i] = m;
2948
                }
2949
            }
2950
        }
2951
    }
2952
 
2953
    // make as many passes as needed to pick up rollup rollups
2954
    for (;;) {
2955
        rolled = false;
2956
 
2957
        // go through the rollup candidates
2958
        for (i in this.rollups) {
2959
            if (this.rollups.hasOwnProperty(i)) {
2960
                // there can be only one, unless forced
2961
                if (!r[i] && ((!this.loaded[i]) || this.forceMap[i])) {
2962
                    m = this.getModule(i);
2963
                    s = m.supersedes || [];
2964
                    roll = false;
2965
 
2966
                    // @TODO remove continue
2967
                    if (!m.rollup) {
2968
                        continue;
2969
                    }
2970
 
2971
                    c = 0;
2972
 
2973
                    // check the threshold
2974
                    for (j = 0; j < s.length; j++) {
2975
                        smod = info[s[j]];
2976
 
2977
                        // if the superseded module is loaded, we can't
2978
                        // load the rollup unless it has been forced.
2979
                        if (this.loaded[s[j]] && !this.forceMap[s[j]]) {
2980
                            roll = false;
2981
                            break;
2982
                        // increment the counter if this module is required.
2983
                        // if we are beyond the rollup threshold, we will
2984
                        // use the rollup module
2985
                        } else if (r[s[j]] && m.type === smod.type) {
2986
                            c++;
2987
                            roll = (c >= m.rollup);
2988
                            if (roll) {
2989
                                break;
2990
                            }
2991
                        }
2992
                    }
2993
 
2994
                    if (roll) {
2995
                        // add the rollup
2996
                        r[i] = true;
2997
                        rolled = true;
2998
 
2999
                        // expand the rollup's dependencies
3000
                        this.getRequires(m);
3001
                    }
3002
                }
3003
            }
3004
        }
3005
 
3006
        // if we made it here w/o rolling up something, we are done
3007
        if (!rolled) {
3008
            break;
3009
        }
3010
    }
3011
};
3012
 
3013
 
3014
}, '3.18.1', {"requires": ["loader-base"]});
3015
YUI.add('loader-yui3', function (Y, NAME) {
3016
 
3017
/* This file is auto-generated by (yogi loader --yes --mix --start ../) */
3018
 
3019
/*jshint maxlen:900, eqeqeq: false */
3020
 
3021
/**
3022
 * YUI 3 module metadata
3023
 * @module loader
3024
 * @submodule loader-yui3
3025
 */
3026
YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {};
3027
Y.mix(YUI.Env[Y.version].modules, {
3028
    "align-plugin": {
3029
        "requires": [
3030
            "node-screen",
3031
            "node-pluginhost"
3032
        ]
3033
    },
3034
    "anim": {
3035
        "use": [
3036
            "anim-base",
3037
            "anim-color",
3038
            "anim-curve",
3039
            "anim-easing",
3040
            "anim-node-plugin",
3041
            "anim-scroll",
3042
            "anim-xy"
3043
        ]
3044
    },
3045
    "anim-base": {
3046
        "requires": [
3047
            "base-base",
3048
            "node-style",
3049
            "color-base"
3050
        ]
3051
    },
3052
    "anim-color": {
3053
        "requires": [
3054
            "anim-base"
3055
        ]
3056
    },
3057
    "anim-curve": {
3058
        "requires": [
3059
            "anim-xy"
3060
        ]
3061
    },
3062
    "anim-easing": {
3063
        "requires": [
3064
            "anim-base"
3065
        ]
3066
    },
3067
    "anim-node-plugin": {
3068
        "requires": [
3069
            "node-pluginhost",
3070
            "anim-base"
3071
        ]
3072
    },
3073
    "anim-scroll": {
3074
        "requires": [
3075
            "anim-base"
3076
        ]
3077
    },
3078
    "anim-shape": {
3079
        "requires": [
3080
            "anim-base",
3081
            "anim-easing",
3082
            "anim-color",
3083
            "matrix"
3084
        ]
3085
    },
3086
    "anim-shape-transform": {
3087
        "use": [
3088
            "anim-shape"
3089
        ]
3090
    },
3091
    "anim-xy": {
3092
        "requires": [
3093
            "anim-base",
3094
            "node-screen"
3095
        ]
3096
    },
3097
    "app": {
3098
        "use": [
3099
            "app-base",
3100
            "app-content",
3101
            "app-transitions",
3102
            "lazy-model-list",
3103
            "model",
3104
            "model-list",
3105
            "model-sync-rest",
3106
            "model-sync-local",
3107
            "router",
3108
            "view",
3109
            "view-node-map"
3110
        ]
3111
    },
3112
    "app-base": {
3113
        "requires": [
3114
            "classnamemanager",
3115
            "pjax-base",
3116
            "router",
3117
            "view"
3118
        ]
3119
    },
3120
    "app-content": {
3121
        "requires": [
3122
            "app-base",
3123
            "pjax-content"
3124
        ]
3125
    },
3126
    "app-transitions": {
3127
        "requires": [
3128
            "app-base"
3129
        ]
3130
    },
3131
    "app-transitions-css": {
3132
        "type": "css"
3133
    },
3134
    "app-transitions-native": {
3135
        "condition": {
3136
            "name": "app-transitions-native",
3137
            "test": function (Y) {
3138
    var doc  = Y.config.doc,
3139
        node = doc ? doc.documentElement : null;
3140
 
3141
    if (node && node.style) {
3142
        return ('MozTransition' in node.style || 'WebkitTransition' in node.style || 'transition' in node.style);
3143
    }
3144
 
3145
    return false;
3146
},
3147
            "trigger": "app-transitions"
3148
        },
3149
        "requires": [
3150
            "app-transitions",
3151
            "app-transitions-css",
3152
            "parallel",
3153
            "transition"
3154
        ]
3155
    },
3156
    "array-extras": {
3157
        "requires": [
3158
            "yui-base"
3159
        ]
3160
    },
3161
    "array-invoke": {
3162
        "requires": [
3163
            "yui-base"
3164
        ]
3165
    },
3166
    "arraylist": {
3167
        "requires": [
3168
            "yui-base"
3169
        ]
3170
    },
3171
    "arraylist-add": {
3172
        "requires": [
3173
            "arraylist"
3174
        ]
3175
    },
3176
    "arraylist-filter": {
3177
        "requires": [
3178
            "arraylist"
3179
        ]
3180
    },
3181
    "arraysort": {
3182
        "requires": [
3183
            "yui-base"
3184
        ]
3185
    },
3186
    "async-queue": {
3187
        "requires": [
3188
            "event-custom"
3189
        ]
3190
    },
3191
    "attribute": {
3192
        "use": [
3193
            "attribute-base",
3194
            "attribute-complex"
3195
        ]
3196
    },
3197
    "attribute-base": {
3198
        "requires": [
3199
            "attribute-core",
3200
            "attribute-observable",
3201
            "attribute-extras"
3202
        ]
3203
    },
3204
    "attribute-complex": {
3205
        "requires": [
3206
            "attribute-base"
3207
        ]
3208
    },
3209
    "attribute-core": {
3210
        "requires": [
3211
            "oop"
3212
        ]
3213
    },
3214
    "attribute-events": {
3215
        "use": [
3216
            "attribute-observable"
3217
        ]
3218
    },
3219
    "attribute-extras": {
3220
        "requires": [
3221
            "oop"
3222
        ]
3223
    },
3224
    "attribute-observable": {
3225
        "requires": [
3226
            "event-custom"
3227
        ]
3228
    },
3229
    "autocomplete": {
3230
        "use": [
3231
            "autocomplete-base",
3232
            "autocomplete-sources",
3233
            "autocomplete-list",
3234
            "autocomplete-plugin"
3235
        ]
3236
    },
3237
    "autocomplete-base": {
3238
        "optional": [
3239
            "autocomplete-sources"
3240
        ],
3241
        "requires": [
3242
            "array-extras",
3243
            "base-build",
3244
            "escape",
3245
            "event-valuechange",
3246
            "node-base"
3247
        ]
3248
    },
3249
    "autocomplete-filters": {
3250
        "requires": [
3251
            "array-extras",
3252
            "text-wordbreak"
3253
        ]
3254
    },
3255
    "autocomplete-filters-accentfold": {
3256
        "requires": [
3257
            "array-extras",
3258
            "text-accentfold",
3259
            "text-wordbreak"
3260
        ]
3261
    },
3262
    "autocomplete-highlighters": {
3263
        "requires": [
3264
            "array-extras",
3265
            "highlight-base"
3266
        ]
3267
    },
3268
    "autocomplete-highlighters-accentfold": {
3269
        "requires": [
3270
            "array-extras",
3271
            "highlight-accentfold"
3272
        ]
3273
    },
3274
    "autocomplete-list": {
3275
        "after": [
3276
            "autocomplete-sources"
3277
        ],
3278
        "lang": [
3279
            "en",
3280
            "es",
3281
            "hu",
3282
            "it"
3283
        ],
3284
        "requires": [
3285
            "autocomplete-base",
3286
            "event-resize",
3287
            "node-screen",
3288
            "selector-css3",
3289
            "shim-plugin",
3290
            "widget",
3291
            "widget-position",
3292
            "widget-position-align"
3293
        ],
3294
        "skinnable": true
3295
    },
3296
    "autocomplete-list-keys": {
3297
        "condition": {
3298
            "name": "autocomplete-list-keys",
3299
            "test": function (Y) {
3300
    // Only add keyboard support to autocomplete-list if this doesn't appear to
3301
    // be an iOS or Android-based mobile device.
3302
    //
3303
    // There's currently no feasible way to actually detect whether a device has
3304
    // a hardware keyboard, so this sniff will have to do. It can easily be
3305
    // overridden by manually loading the autocomplete-list-keys module.
3306
    //
3307
    // Worth noting: even though iOS supports bluetooth keyboards, Mobile Safari
3308
    // doesn't fire the keyboard events used by AutoCompleteList, so there's
3309
    // no point loading the -keys module even when a bluetooth keyboard may be
3310
    // available.
3311
    return !(Y.UA.ios || Y.UA.android);
3312
},
3313
            "trigger": "autocomplete-list"
3314
        },
3315
        "requires": [
3316
            "autocomplete-list",
3317
            "base-build"
3318
        ]
3319
    },
3320
    "autocomplete-plugin": {
3321
        "requires": [
3322
            "autocomplete-list",
3323
            "node-pluginhost"
3324
        ]
3325
    },
3326
    "autocomplete-sources": {
3327
        "optional": [
3328
            "io-base",
3329
            "json-parse",
3330
            "jsonp",
3331
            "yql"
3332
        ],
3333
        "requires": [
3334
            "autocomplete-base"
3335
        ]
3336
    },
3337
    "axes": {
3338
        "use": [
3339
            "axis-numeric",
3340
            "axis-category",
3341
            "axis-time",
3342
            "axis-stacked"
3343
        ]
3344
    },
3345
    "axes-base": {
3346
        "use": [
3347
            "axis-numeric-base",
3348
            "axis-category-base",
3349
            "axis-time-base",
3350
            "axis-stacked-base"
3351
        ]
3352
    },
3353
    "axis": {
3354
        "requires": [
3355
            "dom",
3356
            "widget",
3357
            "widget-position",
3358
            "widget-stack",
3359
            "graphics",
3360
            "axis-base"
3361
        ]
3362
    },
3363
    "axis-base": {
3364
        "requires": [
3365
            "classnamemanager",
3366
            "datatype-number",
3367
            "datatype-date",
3368
            "base",
3369
            "event-custom"
3370
        ]
3371
    },
3372
    "axis-category": {
3373
        "requires": [
3374
            "axis",
3375
            "axis-category-base"
3376
        ]
3377
    },
3378
    "axis-category-base": {
3379
        "requires": [
3380
            "axis-base"
3381
        ]
3382
    },
3383
    "axis-numeric": {
3384
        "requires": [
3385
            "axis",
3386
            "axis-numeric-base"
3387
        ]
3388
    },
3389
    "axis-numeric-base": {
3390
        "requires": [
3391
            "axis-base"
3392
        ]
3393
    },
3394
    "axis-stacked": {
3395
        "requires": [
3396
            "axis-numeric",
3397
            "axis-stacked-base"
3398
        ]
3399
    },
3400
    "axis-stacked-base": {
3401
        "requires": [
3402
            "axis-numeric-base"
3403
        ]
3404
    },
3405
    "axis-time": {
3406
        "requires": [
3407
            "axis",
3408
            "axis-time-base"
3409
        ]
3410
    },
3411
    "axis-time-base": {
3412
        "requires": [
3413
            "axis-base"
3414
        ]
3415
    },
3416
    "base": {
3417
        "use": [
3418
            "base-base",
3419
            "base-pluginhost",
3420
            "base-build"
3421
        ]
3422
    },
3423
    "base-base": {
3424
        "requires": [
3425
            "attribute-base",
3426
            "base-core",
3427
            "base-observable"
3428
        ]
3429
    },
3430
    "base-build": {
3431
        "requires": [
3432
            "base-base"
3433
        ]
3434
    },
3435
    "base-core": {
3436
        "requires": [
3437
            "attribute-core"
3438
        ]
3439
    },
3440
    "base-observable": {
3441
        "requires": [
3442
            "attribute-observable",
3443
            "base-core"
3444
        ]
3445
    },
3446
    "base-pluginhost": {
3447
        "requires": [
3448
            "base-base",
3449
            "pluginhost"
3450
        ]
3451
    },
3452
    "button": {
3453
        "requires": [
3454
            "button-core",
3455
            "cssbutton",
3456
            "widget"
3457
        ]
3458
    },
3459
    "button-core": {
3460
        "requires": [
3461
            "attribute-core",
3462
            "classnamemanager",
3463
            "node-base",
3464
            "escape"
3465
        ]
3466
    },
3467
    "button-group": {
3468
        "requires": [
3469
            "button-plugin",
3470
            "cssbutton",
3471
            "widget"
3472
        ]
3473
    },
3474
    "button-plugin": {
3475
        "requires": [
3476
            "button-core",
3477
            "cssbutton",
3478
            "node-pluginhost"
3479
        ]
3480
    },
3481
    "cache": {
3482
        "use": [
3483
            "cache-base",
3484
            "cache-offline",
3485
            "cache-plugin"
3486
        ]
3487
    },
3488
    "cache-base": {
3489
        "requires": [
3490
            "base"
3491
        ]
3492
    },
3493
    "cache-offline": {
3494
        "requires": [
3495
            "cache-base",
3496
            "json"
3497
        ]
3498
    },
3499
    "cache-plugin": {
3500
        "requires": [
3501
            "plugin",
3502
            "cache-base"
3503
        ]
3504
    },
3505
    "calendar": {
3506
        "requires": [
3507
            "calendar-base",
3508
            "calendarnavigator"
3509
        ],
3510
        "skinnable": true
3511
    },
3512
    "calendar-base": {
3513
        "lang": [
3514
            "de",
3515
            "en",
3516
            "es",
3517
            "es-AR",
3518
            "fr",
3519
            "hu",
3520
            "it",
3521
            "ja",
3522
            "nb-NO",
3523
            "nl",
3524
            "pt-BR",
3525
            "ru",
3526
            "zh-Hans",
3527
            "zh-Hans-CN",
3528
            "zh-Hant",
3529
            "zh-Hant-HK",
3530
            "zh-HANT-TW"
3531
        ],
3532
        "requires": [
3533
            "widget",
3534
            "datatype-date",
3535
            "datatype-date-math",
3536
            "cssgrids"
3537
        ],
3538
        "skinnable": true
3539
    },
3540
    "calendarnavigator": {
3541
        "requires": [
3542
            "plugin",
3543
            "classnamemanager",
3544
            "datatype-date",
3545
            "node"
3546
        ],
3547
        "skinnable": true
3548
    },
3549
    "charts": {
3550
        "use": [
3551
            "charts-base"
3552
        ]
3553
    },
3554
    "charts-base": {
3555
        "requires": [
3556
            "dom",
3557
            "event-mouseenter",
3558
            "event-touch",
3559
            "graphics-group",
3560
            "axes",
3561
            "series-pie",
3562
            "series-line",
3563
            "series-marker",
3564
            "series-area",
3565
            "series-spline",
3566
            "series-column",
3567
            "series-bar",
3568
            "series-areaspline",
3569
            "series-combo",
3570
            "series-combospline",
3571
            "series-line-stacked",
3572
            "series-marker-stacked",
3573
            "series-area-stacked",
3574
            "series-spline-stacked",
3575
            "series-column-stacked",
3576
            "series-bar-stacked",
3577
            "series-areaspline-stacked",
3578
            "series-combo-stacked",
3579
            "series-combospline-stacked"
3580
        ]
3581
    },
3582
    "charts-legend": {
3583
        "requires": [
3584
            "charts-base"
3585
        ]
3586
    },
3587
    "classnamemanager": {
3588
        "requires": [
3589
            "yui-base"
3590
        ]
3591
    },
3592
    "clickable-rail": {
3593
        "requires": [
3594
            "slider-base"
3595
        ]
3596
    },
3597
    "collection": {
3598
        "use": [
3599
            "array-extras",
3600
            "arraylist",
3601
            "arraylist-add",
3602
            "arraylist-filter",
3603
            "array-invoke"
3604
        ]
3605
    },
3606
    "color": {
3607
        "use": [
3608
            "color-base",
3609
            "color-hsl",
3610
            "color-harmony"
3611
        ]
3612
    },
3613
    "color-base": {
3614
        "requires": [
3615
            "yui-base"
3616
        ]
3617
    },
3618
    "color-harmony": {
3619
        "requires": [
3620
            "color-hsl"
3621
        ]
3622
    },
3623
    "color-hsl": {
3624
        "requires": [
3625
            "color-base"
3626
        ]
3627
    },
3628
    "color-hsv": {
3629
        "requires": [
3630
            "color-base"
3631
        ]
3632
    },
3633
    "console": {
3634
        "lang": [
3635
            "en",
3636
            "es",
3637
            "hu",
3638
            "it",
3639
            "ja"
3640
        ],
3641
        "requires": [
3642
            "yui-log",
3643
            "widget"
3644
        ],
3645
        "skinnable": true
3646
    },
3647
    "console-filters": {
3648
        "requires": [
3649
            "plugin",
3650
            "console"
3651
        ],
3652
        "skinnable": true
3653
    },
3654
    "content-editable": {
3655
        "requires": [
3656
            "node-base",
3657
            "editor-selection",
3658
            "stylesheet",
3659
            "plugin"
3660
        ]
3661
    },
3662
    "controller": {
3663
        "use": [
3664
            "router"
3665
        ]
3666
    },
3667
    "cookie": {
3668
        "requires": [
3669
            "yui-base"
3670
        ]
3671
    },
3672
    "createlink-base": {
3673
        "requires": [
3674
            "editor-base"
3675
        ]
3676
    },
3677
    "cssbase": {
3678
        "after": [
3679
            "cssreset",
3680
            "cssfonts",
3681
            "cssgrids",
3682
            "cssreset-context",
3683
            "cssfonts-context",
3684
            "cssgrids-context"
3685
        ],
3686
        "type": "css"
3687
    },
3688
    "cssbase-context": {
3689
        "after": [
3690
            "cssreset",
3691
            "cssfonts",
3692
            "cssgrids",
3693
            "cssreset-context",
3694
            "cssfonts-context",
3695
            "cssgrids-context"
3696
        ],
3697
        "type": "css"
3698
    },
3699
    "cssbutton": {
3700
        "type": "css"
3701
    },
3702
    "cssfonts": {
3703
        "type": "css"
3704
    },
3705
    "cssfonts-context": {
3706
        "type": "css"
3707
    },
3708
    "cssgrids": {
3709
        "optional": [
3710
            "cssnormalize"
3711
        ],
3712
        "type": "css"
3713
    },
3714
    "cssgrids-base": {
3715
        "optional": [
3716
            "cssnormalize"
3717
        ],
3718
        "type": "css"
3719
    },
3720
    "cssgrids-responsive": {
3721
        "optional": [
3722
            "cssnormalize"
3723
        ],
3724
        "requires": [
3725
            "cssgrids",
3726
            "cssgrids-responsive-base"
3727
        ],
3728
        "type": "css"
3729
    },
3730
    "cssgrids-units": {
3731
        "optional": [
3732
            "cssnormalize"
3733
        ],
3734
        "requires": [
3735
            "cssgrids-base"
3736
        ],
3737
        "type": "css"
3738
    },
3739
    "cssnormalize": {
3740
        "type": "css"
3741
    },
3742
    "cssnormalize-context": {
3743
        "type": "css"
3744
    },
3745
    "cssreset": {
3746
        "type": "css"
3747
    },
3748
    "cssreset-context": {
3749
        "type": "css"
3750
    },
3751
    "dataschema": {
3752
        "use": [
3753
            "dataschema-base",
3754
            "dataschema-json",
3755
            "dataschema-xml",
3756
            "dataschema-array",
3757
            "dataschema-text"
3758
        ]
3759
    },
3760
    "dataschema-array": {
3761
        "requires": [
3762
            "dataschema-base"
3763
        ]
3764
    },
3765
    "dataschema-base": {
3766
        "requires": [
3767
            "base"
3768
        ]
3769
    },
3770
    "dataschema-json": {
3771
        "requires": [
3772
            "dataschema-base",
3773
            "json"
3774
        ]
3775
    },
3776
    "dataschema-text": {
3777
        "requires": [
3778
            "dataschema-base"
3779
        ]
3780
    },
3781
    "dataschema-xml": {
3782
        "requires": [
3783
            "dataschema-base"
3784
        ]
3785
    },
3786
    "datasource": {
3787
        "use": [
3788
            "datasource-local",
3789
            "datasource-io",
3790
            "datasource-get",
3791
            "datasource-function",
3792
            "datasource-cache",
3793
            "datasource-jsonschema",
3794
            "datasource-xmlschema",
3795
            "datasource-arrayschema",
3796
            "datasource-textschema",
3797
            "datasource-polling"
3798
        ]
3799
    },
3800
    "datasource-arrayschema": {
3801
        "requires": [
3802
            "datasource-local",
3803
            "plugin",
3804
            "dataschema-array"
3805
        ]
3806
    },
3807
    "datasource-cache": {
3808
        "requires": [
3809
            "datasource-local",
3810
            "plugin",
3811
            "cache-base"
3812
        ]
3813
    },
3814
    "datasource-function": {
3815
        "requires": [
3816
            "datasource-local"
3817
        ]
3818
    },
3819
    "datasource-get": {
3820
        "requires": [
3821
            "datasource-local",
3822
            "get"
3823
        ]
3824
    },
3825
    "datasource-io": {
3826
        "requires": [
3827
            "datasource-local",
3828
            "io-base"
3829
        ]
3830
    },
3831
    "datasource-jsonschema": {
3832
        "requires": [
3833
            "datasource-local",
3834
            "plugin",
3835
            "dataschema-json"
3836
        ]
3837
    },
3838
    "datasource-local": {
3839
        "requires": [
3840
            "base"
3841
        ]
3842
    },
3843
    "datasource-polling": {
3844
        "requires": [
3845
            "datasource-local"
3846
        ]
3847
    },
3848
    "datasource-textschema": {
3849
        "requires": [
3850
            "datasource-local",
3851
            "plugin",
3852
            "dataschema-text"
3853
        ]
3854
    },
3855
    "datasource-xmlschema": {
3856
        "requires": [
3857
            "datasource-local",
3858
            "plugin",
3859
            "datatype-xml",
3860
            "dataschema-xml"
3861
        ]
3862
    },
3863
    "datatable": {
3864
        "use": [
3865
            "datatable-core",
3866
            "datatable-table",
3867
            "datatable-head",
3868
            "datatable-body",
3869
            "datatable-base",
3870
            "datatable-column-widths",
3871
            "datatable-message",
3872
            "datatable-mutable",
3873
            "datatable-sort",
3874
            "datatable-datasource"
3875
        ]
3876
    },
3877
    "datatable-base": {
3878
        "requires": [
3879
            "datatable-core",
3880
            "datatable-table",
3881
            "datatable-head",
3882
            "datatable-body",
3883
            "base-build",
3884
            "widget"
3885
        ],
3886
        "skinnable": true
3887
    },
3888
    "datatable-body": {
3889
        "requires": [
3890
            "datatable-core",
3891
            "view",
3892
            "classnamemanager"
3893
        ]
3894
    },
3895
    "datatable-column-widths": {
3896
        "requires": [
3897
            "datatable-base"
3898
        ]
3899
    },
3900
    "datatable-core": {
3901
        "requires": [
3902
            "escape",
3903
            "model-list",
3904
            "node-event-delegate"
3905
        ]
3906
    },
3907
    "datatable-datasource": {
3908
        "requires": [
3909
            "datatable-base",
3910
            "plugin",
3911
            "datasource-local"
3912
        ]
3913
    },
3914
    "datatable-foot": {
3915
        "requires": [
3916
            "datatable-core",
3917
            "view"
3918
        ]
3919
    },
3920
    "datatable-formatters": {
3921
        "requires": [
3922
            "datatable-body",
3923
            "datatype-number-format",
3924
            "datatype-date-format",
3925
            "escape"
3926
        ]
3927
    },
3928
    "datatable-head": {
3929
        "requires": [
3930
            "datatable-core",
3931
            "view",
3932
            "classnamemanager"
3933
        ]
3934
    },
3935
    "datatable-highlight": {
3936
        "requires": [
3937
            "datatable-base",
3938
            "event-hover"
3939
        ],
3940
        "skinnable": true
3941
    },
3942
    "datatable-keynav": {
3943
        "requires": [
3944
            "datatable-base"
3945
        ]
3946
    },
3947
    "datatable-message": {
3948
        "lang": [
3949
            "en",
3950
            "fr",
3951
            "es",
3952
            "hu",
3953
            "it"
3954
        ],
3955
        "requires": [
3956
            "datatable-base"
3957
        ],
3958
        "skinnable": true
3959
    },
3960
    "datatable-mutable": {
3961
        "requires": [
3962
            "datatable-base"
3963
        ]
3964
    },
3965
    "datatable-paginator": {
3966
        "lang": [
3967
            "en",
3968
            "fr"
3969
        ],
3970
        "requires": [
3971
            "model",
3972
            "view",
3973
            "paginator-core",
3974
            "datatable-foot",
3975
            "datatable-paginator-templates"
3976
        ],
3977
        "skinnable": true
3978
    },
3979
    "datatable-paginator-templates": {
3980
        "requires": [
3981
            "template"
3982
        ]
3983
    },
3984
    "datatable-scroll": {
3985
        "requires": [
3986
            "datatable-base",
3987
            "datatable-column-widths",
3988
            "dom-screen"
3989
        ],
3990
        "skinnable": true
3991
    },
3992
    "datatable-sort": {
3993
        "lang": [
3994
            "en",
3995
            "fr",
3996
            "es",
3997
            "hu"
3998
        ],
3999
        "requires": [
4000
            "datatable-base"
4001
        ],
4002
        "skinnable": true
4003
    },
4004
    "datatable-table": {
4005
        "requires": [
4006
            "datatable-core",
4007
            "datatable-head",
4008
            "datatable-body",
4009
            "view",
4010
            "classnamemanager"
4011
        ]
4012
    },
4013
    "datatype": {
4014
        "use": [
4015
            "datatype-date",
4016
            "datatype-number",
4017
            "datatype-xml"
4018
        ]
4019
    },
4020
    "datatype-date": {
4021
        "use": [
4022
            "datatype-date-parse",
4023
            "datatype-date-format",
4024
            "datatype-date-math"
4025
        ]
4026
    },
4027
    "datatype-date-format": {
4028
        "lang": [
4029
            "ar",
4030
            "ar-JO",
4031
            "ca",
4032
            "ca-ES",
4033
            "da",
4034
            "da-DK",
4035
            "de",
4036
            "de-AT",
4037
            "de-DE",
4038
            "el",
4039
            "el-GR",
4040
            "en",
4041
            "en-AU",
4042
            "en-CA",
4043
            "en-GB",
4044
            "en-IE",
4045
            "en-IN",
4046
            "en-JO",
4047
            "en-MY",
4048
            "en-NZ",
4049
            "en-PH",
4050
            "en-SG",
4051
            "en-US",
4052
            "es",
4053
            "es-AR",
4054
            "es-BO",
4055
            "es-CL",
4056
            "es-CO",
4057
            "es-EC",
4058
            "es-ES",
4059
            "es-MX",
4060
            "es-PE",
4061
            "es-PY",
4062
            "es-US",
4063
            "es-UY",
4064
            "es-VE",
4065
            "fi",
4066
            "fi-FI",
4067
            "fr",
4068
            "fr-BE",
4069
            "fr-CA",
4070
            "fr-FR",
4071
            "hi",
4072
            "hi-IN",
4073
            "hu",
4074
            "id",
4075
            "id-ID",
4076
            "it",
4077
            "it-IT",
4078
            "ja",
4079
            "ja-JP",
4080
            "ko",
4081
            "ko-KR",
4082
            "ms",
4083
            "ms-MY",
4084
            "nb",
4085
            "nb-NO",
4086
            "nl",
4087
            "nl-BE",
4088
            "nl-NL",
4089
            "pl",
4090
            "pl-PL",
4091
            "pt",
4092
            "pt-BR",
4093
            "ro",
4094
            "ro-RO",
4095
            "ru",
4096
            "ru-RU",
4097
            "sv",
4098
            "sv-SE",
4099
            "th",
4100
            "th-TH",
4101
            "tr",
4102
            "tr-TR",
4103
            "vi",
4104
            "vi-VN",
4105
            "zh-Hans",
4106
            "zh-Hans-CN",
4107
            "zh-Hant",
4108
            "zh-Hant-HK",
4109
            "zh-Hant-TW"
4110
        ]
4111
    },
4112
    "datatype-date-math": {
4113
        "requires": [
4114
            "yui-base"
4115
        ]
4116
    },
4117
    "datatype-date-parse": {},
4118
    "datatype-number": {
4119
        "use": [
4120
            "datatype-number-parse",
4121
            "datatype-number-format"
4122
        ]
4123
    },
4124
    "datatype-number-format": {},
4125
    "datatype-number-parse": {
4126
        "requires": [
4127
            "escape"
4128
        ]
4129
    },
4130
    "datatype-xml": {
4131
        "use": [
4132
            "datatype-xml-parse",
4133
            "datatype-xml-format"
4134
        ]
4135
    },
4136
    "datatype-xml-format": {},
4137
    "datatype-xml-parse": {},
4138
    "dd": {
4139
        "use": [
4140
            "dd-ddm-base",
4141
            "dd-ddm",
4142
            "dd-ddm-drop",
4143
            "dd-drag",
4144
            "dd-proxy",
4145
            "dd-constrain",
4146
            "dd-drop",
4147
            "dd-scroll",
4148
            "dd-delegate"
4149
        ]
4150
    },
4151
    "dd-constrain": {
4152
        "requires": [
4153
            "dd-drag"
4154
        ]
4155
    },
4156
    "dd-ddm": {
4157
        "requires": [
4158
            "dd-ddm-base",
4159
            "event-resize"
4160
        ]
4161
    },
4162
    "dd-ddm-base": {
4163
        "requires": [
4164
            "node",
4165
            "base",
4166
            "yui-throttle",
4167
            "classnamemanager"
4168
        ]
4169
    },
4170
    "dd-ddm-drop": {
4171
        "requires": [
4172
            "dd-ddm"
4173
        ]
4174
    },
4175
    "dd-delegate": {
4176
        "requires": [
4177
            "dd-drag",
4178
            "dd-drop-plugin",
4179
            "event-mouseenter"
4180
        ]
4181
    },
4182
    "dd-drag": {
4183
        "requires": [
4184
            "dd-ddm-base",
4185
            "selector-css2"
4186
        ]
4187
    },
4188
    "dd-drop": {
4189
        "requires": [
4190
            "dd-drag",
4191
            "dd-ddm-drop"
4192
        ]
4193
    },
4194
    "dd-drop-plugin": {
4195
        "requires": [
4196
            "dd-drop"
4197
        ]
4198
    },
4199
    "dd-gestures": {
4200
        "condition": {
4201
            "name": "dd-gestures",
4202
            "trigger": "dd-drag",
4203
            "ua": "touchEnabled"
4204
        },
4205
        "requires": [
4206
            "dd-drag",
4207
            "event-synthetic",
4208
            "event-gestures"
4209
        ]
4210
    },
4211
    "dd-plugin": {
4212
        "optional": [
4213
            "dd-constrain",
4214
            "dd-proxy"
4215
        ],
4216
        "requires": [
4217
            "dd-drag"
4218
        ]
4219
    },
4220
    "dd-proxy": {
4221
        "requires": [
4222
            "dd-drag"
4223
        ]
4224
    },
4225
    "dd-scroll": {
4226
        "requires": [
4227
            "dd-drag"
4228
        ]
4229
    },
4230
    "dial": {
4231
        "lang": [
4232
            "en",
4233
            "es",
4234
            "hu"
4235
        ],
4236
        "requires": [
4237
            "widget",
4238
            "dd-drag",
4239
            "event-mouseenter",
4240
            "event-move",
4241
            "event-key",
4242
            "transition",
4243
            "intl"
4244
        ],
4245
        "skinnable": true
4246
    },
4247
    "dom": {
4248
        "use": [
4249
            "dom-base",
4250
            "dom-screen",
4251
            "dom-style",
4252
            "selector-native",
4253
            "selector"
4254
        ]
4255
    },
4256
    "dom-base": {
4257
        "requires": [
4258
            "dom-core"
4259
        ]
4260
    },
4261
    "dom-core": {
4262
        "requires": [
4263
            "oop",
4264
            "features"
4265
        ]
4266
    },
4267
    "dom-screen": {
4268
        "requires": [
4269
            "dom-base",
4270
            "dom-style"
4271
        ]
4272
    },
4273
    "dom-style": {
4274
        "requires": [
4275
            "dom-base"
4276
        ]
4277
    },
4278
    "dom-style-ie": {
4279
        "condition": {
4280
            "name": "dom-style-ie",
4281
            "test": function (Y) {
4282
 
4283
    var testFeature = Y.Features.test,
4284
        addFeature = Y.Features.add,
4285
        WINDOW = Y.config.win,
4286
        DOCUMENT = Y.config.doc,
4287
        DOCUMENT_ELEMENT = 'documentElement',
4288
        ret = false;
4289
 
4290
    addFeature('style', 'computedStyle', {
4291
        test: function() {
4292
            return WINDOW && 'getComputedStyle' in WINDOW;
4293
        }
4294
    });
4295
 
4296
    addFeature('style', 'opacity', {
4297
        test: function() {
4298
            return DOCUMENT && 'opacity' in DOCUMENT[DOCUMENT_ELEMENT].style;
4299
        }
4300
    });
4301
 
4302
    ret =  (!testFeature('style', 'opacity') &&
4303
            !testFeature('style', 'computedStyle'));
4304
 
4305
    return ret;
4306
},
4307
            "trigger": "dom-style"
4308
        },
4309
        "requires": [
4310
            "dom-style",
4311
            "color-base"
4312
        ]
4313
    },
4314
    "dump": {
4315
        "requires": [
4316
            "yui-base"
4317
        ]
4318
    },
4319
    "editor": {
4320
        "use": [
4321
            "frame",
4322
            "editor-selection",
4323
            "exec-command",
4324
            "editor-base",
4325
            "editor-para",
4326
            "editor-br",
4327
            "editor-bidi",
4328
            "editor-tab",
4329
            "createlink-base"
4330
        ]
4331
    },
4332
    "editor-base": {
4333
        "requires": [
4334
            "base",
4335
            "frame",
4336
            "node",
4337
            "exec-command",
4338
            "editor-selection"
4339
        ]
4340
    },
4341
    "editor-bidi": {
4342
        "requires": [
4343
            "editor-base"
4344
        ]
4345
    },
4346
    "editor-br": {
4347
        "requires": [
4348
            "editor-base"
4349
        ]
4350
    },
4351
    "editor-inline": {
4352
        "requires": [
4353
            "editor-base",
4354
            "content-editable"
4355
        ]
4356
    },
4357
    "editor-lists": {
4358
        "requires": [
4359
            "editor-base"
4360
        ]
4361
    },
4362
    "editor-para": {
4363
        "requires": [
4364
            "editor-para-base"
4365
        ]
4366
    },
4367
    "editor-para-base": {
4368
        "requires": [
4369
            "editor-base"
4370
        ]
4371
    },
4372
    "editor-para-ie": {
4373
        "condition": {
4374
            "name": "editor-para-ie",
4375
            "trigger": "editor-para",
4376
            "ua": "ie",
4377
            "when": "instead"
4378
        },
4379
        "requires": [
4380
            "editor-para-base"
4381
        ]
4382
    },
4383
    "editor-selection": {
4384
        "requires": [
4385
            "node"
4386
        ]
4387
    },
4388
    "editor-tab": {
4389
        "requires": [
4390
            "editor-base"
4391
        ]
4392
    },
4393
    "escape": {
4394
        "requires": [
4395
            "yui-base"
4396
        ]
4397
    },
4398
    "event": {
4399
        "after": [
4400
            "node-base"
4401
        ],
4402
        "use": [
4403
            "event-base",
4404
            "event-delegate",
4405
            "event-synthetic",
4406
            "event-mousewheel",
4407
            "event-mouseenter",
4408
            "event-key",
4409
            "event-focus",
4410
            "event-resize",
4411
            "event-hover",
4412
            "event-outside",
4413
            "event-touch",
4414
            "event-move",
4415
            "event-flick",
4416
            "event-valuechange",
4417
            "event-tap"
4418
        ]
4419
    },
4420
    "event-base": {
4421
        "after": [
4422
            "node-base"
4423
        ],
4424
        "requires": [
4425
            "event-custom-base"
4426
        ]
4427
    },
4428
    "event-base-ie": {
4429
        "after": [
4430
            "event-base"
4431
        ],
4432
        "condition": {
4433
            "name": "event-base-ie",
4434
            "test": function(Y) {
4435
    var imp = Y.config.doc && Y.config.doc.implementation;
4436
    return (imp && (!imp.hasFeature('Events', '2.0')));
4437
},
4438
            "trigger": "node-base"
4439
        },
4440
        "requires": [
4441
            "node-base"
4442
        ]
4443
    },
4444
    "event-contextmenu": {
4445
        "requires": [
4446
            "event-synthetic",
4447
            "dom-screen"
4448
        ]
4449
    },
4450
    "event-custom": {
4451
        "use": [
4452
            "event-custom-base",
4453
            "event-custom-complex"
4454
        ]
4455
    },
4456
    "event-custom-base": {
4457
        "requires": [
4458
            "oop"
4459
        ]
4460
    },
4461
    "event-custom-complex": {
4462
        "requires": [
4463
            "event-custom-base"
4464
        ]
4465
    },
4466
    "event-delegate": {
4467
        "requires": [
4468
            "node-base"
4469
        ]
4470
    },
4471
    "event-flick": {
4472
        "requires": [
4473
            "node-base",
4474
            "event-touch",
4475
            "event-synthetic"
4476
        ]
4477
    },
4478
    "event-focus": {
4479
        "requires": [
4480
            "event-synthetic"
4481
        ]
4482
    },
4483
    "event-gestures": {
4484
        "use": [
4485
            "event-flick",
4486
            "event-move"
4487
        ]
4488
    },
4489
    "event-hover": {
4490
        "requires": [
4491
            "event-mouseenter"
4492
        ]
4493
    },
4494
    "event-key": {
4495
        "requires": [
4496
            "event-synthetic"
4497
        ]
4498
    },
4499
    "event-mouseenter": {
4500
        "requires": [
4501
            "event-synthetic"
4502
        ]
4503
    },
4504
    "event-mousewheel": {
4505
        "requires": [
4506
            "node-base"
4507
        ]
4508
    },
4509
    "event-move": {
4510
        "requires": [
4511
            "node-base",
4512
            "event-touch",
4513
            "event-synthetic"
4514
        ]
4515
    },
4516
    "event-outside": {
4517
        "requires": [
4518
            "event-synthetic"
4519
        ]
4520
    },
4521
    "event-resize": {
4522
        "requires": [
4523
            "node-base",
4524
            "event-synthetic"
4525
        ]
4526
    },
4527
    "event-simulate": {
4528
        "requires": [
4529
            "event-base"
4530
        ]
4531
    },
4532
    "event-synthetic": {
4533
        "requires": [
4534
            "node-base",
4535
            "event-custom-complex"
4536
        ]
4537
    },
4538
    "event-tap": {
4539
        "requires": [
4540
            "node-base",
4541
            "event-base",
4542
            "event-touch",
4543
            "event-synthetic"
4544
        ]
4545
    },
4546
    "event-touch": {
4547
        "requires": [
4548
            "node-base"
4549
        ]
4550
    },
4551
    "event-valuechange": {
4552
        "requires": [
4553
            "event-focus",
4554
            "event-synthetic"
4555
        ]
4556
    },
4557
    "exec-command": {
4558
        "requires": [
4559
            "frame"
4560
        ]
4561
    },
4562
    "features": {
4563
        "requires": [
4564
            "yui-base"
4565
        ]
4566
    },
4567
    "file": {
4568
        "requires": [
4569
            "file-flash",
4570
            "file-html5"
4571
        ]
4572
    },
4573
    "file-flash": {
4574
        "requires": [
4575
            "base"
4576
        ]
4577
    },
4578
    "file-html5": {
4579
        "requires": [
4580
            "base"
4581
        ]
4582
    },
4583
    "frame": {
4584
        "requires": [
4585
            "base",
4586
            "node",
4587
            "plugin",
4588
            "selector-css3",
4589
            "yui-throttle"
4590
        ]
4591
    },
4592
    "gesture-simulate": {
4593
        "requires": [
4594
            "async-queue",
4595
            "event-simulate",
4596
            "node-screen"
4597
        ]
4598
    },
4599
    "get": {
4600
        "requires": [
4601
            "yui-base"
4602
        ]
4603
    },
4604
    "graphics": {
4605
        "requires": [
4606
            "node",
4607
            "event-custom",
4608
            "pluginhost",
4609
            "matrix",
4610
            "classnamemanager"
4611
        ]
4612
    },
4613
    "graphics-canvas": {
4614
        "condition": {
4615
            "name": "graphics-canvas",
4616
            "test": function(Y) {
4617
    var DOCUMENT = Y.config.doc,
4618
        useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas",
4619
		canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
4620
        svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
4621
    return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d"));
4622
},
4623
            "trigger": "graphics"
4624
        },
4625
        "requires": [
4626
            "graphics",
4627
            "color-base"
4628
        ]
4629
    },
4630
    "graphics-canvas-default": {
4631
        "condition": {
4632
            "name": "graphics-canvas-default",
4633
            "test": function(Y) {
4634
    var DOCUMENT = Y.config.doc,
4635
        useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas",
4636
		canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
4637
        svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
4638
    return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d"));
4639
},
4640
            "trigger": "graphics"
4641
        }
4642
    },
4643
    "graphics-group": {
4644
        "requires": [
4645
            "graphics"
4646
        ]
4647
    },
4648
    "graphics-svg": {
4649
        "condition": {
4650
            "name": "graphics-svg",
4651
            "test": function(Y) {
4652
    var DOCUMENT = Y.config.doc,
4653
        useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas",
4654
		canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
4655
        svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
4656
 
4657
    return svg && (useSVG || !canvas);
4658
},
4659
            "trigger": "graphics"
4660
        },
4661
        "requires": [
4662
            "graphics"
4663
        ]
4664
    },
4665
    "graphics-svg-default": {
4666
        "condition": {
4667
            "name": "graphics-svg-default",
4668
            "test": function(Y) {
4669
    var DOCUMENT = Y.config.doc,
4670
        useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas",
4671
		canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
4672
        svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
4673
 
4674
    return svg && (useSVG || !canvas);
4675
},
4676
            "trigger": "graphics"
4677
        }
4678
    },
4679
    "graphics-vml": {
4680
        "condition": {
4681
            "name": "graphics-vml",
4682
            "test": function(Y) {
4683
    var DOCUMENT = Y.config.doc,
4684
		canvas = DOCUMENT && DOCUMENT.createElement("canvas");
4685
    return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (!canvas || !canvas.getContext || !canvas.getContext("2d")));
4686
},
4687
            "trigger": "graphics"
4688
        },
4689
        "requires": [
4690
            "graphics",
4691
            "color-base"
4692
        ]
4693
    },
4694
    "graphics-vml-default": {
4695
        "condition": {
4696
            "name": "graphics-vml-default",
4697
            "test": function(Y) {
4698
    var DOCUMENT = Y.config.doc,
4699
		canvas = DOCUMENT && DOCUMENT.createElement("canvas");
4700
    return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (!canvas || !canvas.getContext || !canvas.getContext("2d")));
4701
},
4702
            "trigger": "graphics"
4703
        }
4704
    },
4705
    "handlebars": {
4706
        "use": [
4707
            "handlebars-compiler"
4708
        ]
4709
    },
4710
    "handlebars-base": {
4711
        "requires": []
4712
    },
4713
    "handlebars-compiler": {
4714
        "requires": [
4715
            "handlebars-base"
4716
        ]
4717
    },
4718
    "highlight": {
4719
        "use": [
4720
            "highlight-base",
4721
            "highlight-accentfold"
4722
        ]
4723
    },
4724
    "highlight-accentfold": {
4725
        "requires": [
4726
            "highlight-base",
4727
            "text-accentfold"
4728
        ]
4729
    },
4730
    "highlight-base": {
4731
        "requires": [
4732
            "array-extras",
4733
            "classnamemanager",
4734
            "escape",
4735
            "text-wordbreak"
4736
        ]
4737
    },
4738
    "history": {
4739
        "use": [
4740
            "history-base",
4741
            "history-hash",
4742
            "history-html5"
4743
        ]
4744
    },
4745
    "history-base": {
4746
        "requires": [
4747
            "event-custom-complex"
4748
        ]
4749
    },
4750
    "history-hash": {
4751
        "after": [
4752
            "history-html5"
4753
        ],
4754
        "requires": [
4755
            "event-synthetic",
4756
            "history-base",
4757
            "yui-later"
4758
        ]
4759
    },
4760
    "history-hash-ie": {
4761
        "condition": {
4762
            "name": "history-hash-ie",
4763
            "test": function (Y) {
4764
    var docMode = Y.config.doc && Y.config.doc.documentMode;
4765
 
4766
    return Y.UA.ie && (!('onhashchange' in Y.config.win) ||
4767
            !docMode || docMode < 8);
4768
},
4769
            "trigger": "history-hash"
4770
        },
4771
        "requires": [
4772
            "history-hash",
4773
            "node-base"
4774
        ]
4775
    },
4776
    "history-html5": {
4777
        "optional": [
4778
            "json"
4779
        ],
4780
        "requires": [
4781
            "event-base",
4782
            "history-base",
4783
            "node-base"
4784
        ]
4785
    },
4786
    "imageloader": {
4787
        "requires": [
4788
            "base-base",
4789
            "node-style",
4790
            "node-screen"
4791
        ]
4792
    },
4793
    "intl": {
4794
        "requires": [
4795
            "intl-base",
4796
            "event-custom"
4797
        ]
4798
    },
4799
    "intl-base": {
4800
        "requires": [
4801
            "yui-base"
4802
        ]
4803
    },
4804
    "io": {
4805
        "use": [
4806
            "io-base",
4807
            "io-xdr",
4808
            "io-form",
4809
            "io-upload-iframe",
4810
            "io-queue"
4811
        ]
4812
    },
4813
    "io-base": {
4814
        "requires": [
4815
            "event-custom-base",
4816
            "querystring-stringify-simple"
4817
        ]
4818
    },
4819
    "io-form": {
4820
        "requires": [
4821
            "io-base",
4822
            "node-base"
4823
        ]
4824
    },
4825
    "io-nodejs": {
4826
        "condition": {
4827
            "name": "io-nodejs",
4828
            "trigger": "io-base",
4829
            "ua": "nodejs"
4830
        },
4831
        "requires": [
4832
            "io-base"
4833
        ]
4834
    },
4835
    "io-queue": {
4836
        "requires": [
4837
            "io-base",
4838
            "queue-promote"
4839
        ]
4840
    },
4841
    "io-upload-iframe": {
4842
        "requires": [
4843
            "io-base",
4844
            "node-base"
4845
        ]
4846
    },
4847
    "io-xdr": {
4848
        "requires": [
4849
            "io-base",
4850
            "datatype-xml-parse"
4851
        ]
4852
    },
4853
    "json": {
4854
        "use": [
4855
            "json-parse",
4856
            "json-stringify"
4857
        ]
4858
    },
4859
    "json-parse": {
4860
        "requires": [
4861
            "yui-base"
4862
        ]
4863
    },
4864
    "json-parse-shim": {
4865
        "condition": {
4866
            "name": "json-parse-shim",
4867
            "test": function (Y) {
4868
    var _JSON = Y.config.global.JSON,
4869
        Native = Object.prototype.toString.call(_JSON) === '[object JSON]' && _JSON,
4870
        nativeSupport = Y.config.useNativeJSONParse !== false && !!Native;
4871
 
4872
    function workingNative( k, v ) {
4873
        return k === "ok" ? true : v;
4874
    }
4875
 
4876
    // Double check basic functionality.  This is mainly to catch early broken
4877
    // implementations of the JSON API in Firefox 3.1 beta1 and beta2
4878
    if ( nativeSupport ) {
4879
        try {
4880
            nativeSupport = ( Native.parse( '{"ok":false}', workingNative ) ).ok;
4881
        }
4882
        catch ( e ) {
4883
            nativeSupport = false;
4884
        }
4885
    }
4886
 
4887
    return !nativeSupport;
4888
},
4889
            "trigger": "json-parse"
4890
        },
4891
        "requires": [
4892
            "json-parse"
4893
        ]
4894
    },
4895
    "json-stringify": {
4896
        "requires": [
4897
            "yui-base"
4898
        ]
4899
    },
4900
    "json-stringify-shim": {
4901
        "condition": {
4902
            "name": "json-stringify-shim",
4903
            "test": function (Y) {
4904
    var _JSON = Y.config.global.JSON,
4905
        Native = Object.prototype.toString.call(_JSON) === '[object JSON]' && _JSON,
4906
        nativeSupport = Y.config.useNativeJSONStringify !== false && !!Native;
4907
 
4908
    // Double check basic native functionality.  This is primarily to catch broken
4909
    // early JSON API implementations in Firefox 3.1 beta1 and beta2.
4910
    if ( nativeSupport ) {
4911
        try {
4912
            nativeSupport = ( '0' === Native.stringify(0) );
4913
        } catch ( e ) {
4914
            nativeSupport = false;
4915
        }
4916
    }
4917
 
4918
 
4919
    return !nativeSupport;
4920
},
4921
            "trigger": "json-stringify"
4922
        },
4923
        "requires": [
4924
            "json-stringify"
4925
        ]
4926
    },
4927
    "jsonp": {
4928
        "requires": [
4929
            "get",
4930
            "oop"
4931
        ]
4932
    },
4933
    "jsonp-url": {
4934
        "requires": [
4935
            "jsonp"
4936
        ]
4937
    },
4938
    "lazy-model-list": {
4939
        "requires": [
4940
            "model-list"
4941
        ]
4942
    },
4943
    "loader": {
4944
        "use": [
4945
            "loader-base",
4946
            "loader-rollup",
4947
            "loader-yui3"
4948
        ]
4949
    },
4950
    "loader-base": {
4951
        "requires": [
4952
            "get",
4953
            "features"
4954
        ]
4955
    },
4956
    "loader-pathogen-combohandler": {},
4957
    "loader-pathogen-encoder": {
4958
        "use": [
4959
            "loader-base",
4960
            "loader-rollup",
4961
            "loader-yui3",
4962
            "loader-pathogen-combohandler"
4963
        ]
4964
    },
4965
    "loader-rollup": {
4966
        "requires": [
4967
            "loader-base"
4968
        ]
4969
    },
4970
    "loader-yui3": {
4971
        "requires": [
4972
            "loader-base"
4973
        ]
4974
    },
4975
    "matrix": {
4976
        "requires": [
4977
            "yui-base"
4978
        ]
4979
    },
4980
    "model": {
4981
        "requires": [
4982
            "base-build",
4983
            "escape",
4984
            "json-parse"
4985
        ]
4986
    },
4987
    "model-list": {
4988
        "requires": [
4989
            "array-extras",
4990
            "array-invoke",
4991
            "arraylist",
4992
            "base-build",
4993
            "escape",
4994
            "json-parse",
4995
            "model"
4996
        ]
4997
    },
4998
    "model-sync-local": {
4999
        "requires": [
5000
            "model",
5001
            "json-stringify"
5002
        ]
5003
    },
5004
    "model-sync-rest": {
5005
        "requires": [
5006
            "model",
5007
            "io-base",
5008
            "json-stringify"
5009
        ]
5010
    },
5011
    "node": {
5012
        "use": [
5013
            "node-base",
5014
            "node-event-delegate",
5015
            "node-pluginhost",
5016
            "node-screen",
5017
            "node-style"
5018
        ]
5019
    },
5020
    "node-base": {
5021
        "requires": [
5022
            "event-base",
5023
            "node-core",
5024
            "dom-base",
5025
            "dom-style"
5026
        ]
5027
    },
5028
    "node-core": {
5029
        "requires": [
5030
            "dom-core",
5031
            "selector"
5032
        ]
5033
    },
5034
    "node-event-delegate": {
5035
        "requires": [
5036
            "node-base",
5037
            "event-delegate"
5038
        ]
5039
    },
5040
    "node-event-html5": {
5041
        "requires": [
5042
            "node-base"
5043
        ]
5044
    },
5045
    "node-event-simulate": {
5046
        "requires": [
5047
            "node-base",
5048
            "event-simulate",
5049
            "gesture-simulate"
5050
        ]
5051
    },
5052
    "node-flick": {
5053
        "requires": [
5054
            "classnamemanager",
5055
            "transition",
5056
            "event-flick",
5057
            "plugin"
5058
        ],
5059
        "skinnable": true
5060
    },
5061
    "node-focusmanager": {
5062
        "requires": [
5063
            "attribute",
5064
            "node",
5065
            "plugin",
5066
            "node-event-simulate",
5067
            "event-key",
5068
            "event-focus"
5069
        ]
5070
    },
5071
    "node-load": {
5072
        "requires": [
5073
            "node-base",
5074
            "io-base"
5075
        ]
5076
    },
5077
    "node-menunav": {
5078
        "requires": [
5079
            "node",
5080
            "classnamemanager",
5081
            "plugin",
5082
            "node-focusmanager"
5083
        ],
5084
        "skinnable": true
5085
    },
5086
    "node-pluginhost": {
5087
        "requires": [
5088
            "node-base",
5089
            "pluginhost"
5090
        ]
5091
    },
5092
    "node-screen": {
5093
        "requires": [
5094
            "dom-screen",
5095
            "node-base"
5096
        ]
5097
    },
5098
    "node-scroll-info": {
5099
        "requires": [
5100
            "array-extras",
5101
            "base-build",
5102
            "event-resize",
5103
            "node-pluginhost",
5104
            "plugin",
5105
            "selector"
5106
        ]
5107
    },
5108
    "node-style": {
5109
        "requires": [
5110
            "dom-style",
5111
            "node-base"
5112
        ]
5113
    },
5114
    "oop": {
5115
        "requires": [
5116
            "yui-base"
5117
        ]
5118
    },
5119
    "overlay": {
5120
        "requires": [
5121
            "widget",
5122
            "widget-stdmod",
5123
            "widget-position",
5124
            "widget-position-align",
5125
            "widget-stack",
5126
            "widget-position-constrain"
5127
        ],
5128
        "skinnable": true
5129
    },
5130
    "paginator": {
5131
        "requires": [
5132
            "paginator-core"
5133
        ]
5134
    },
5135
    "paginator-core": {
5136
        "requires": [
5137
            "base"
5138
        ]
5139
    },
5140
    "paginator-url": {
5141
        "requires": [
5142
            "paginator"
5143
        ]
5144
    },
5145
    "panel": {
5146
        "requires": [
5147
            "widget",
5148
            "widget-autohide",
5149
            "widget-buttons",
5150
            "widget-modality",
5151
            "widget-position",
5152
            "widget-position-align",
5153
            "widget-position-constrain",
5154
            "widget-stack",
5155
            "widget-stdmod"
5156
        ],
5157
        "skinnable": true
5158
    },
5159
    "parallel": {
5160
        "requires": [
5161
            "yui-base"
5162
        ]
5163
    },
5164
    "pjax": {
5165
        "requires": [
5166
            "pjax-base",
5167
            "pjax-content"
5168
        ]
5169
    },
5170
    "pjax-base": {
5171
        "requires": [
5172
            "classnamemanager",
5173
            "node-event-delegate",
5174
            "router"
5175
        ]
5176
    },
5177
    "pjax-content": {
5178
        "requires": [
5179
            "io-base",
5180
            "node-base",
5181
            "router"
5182
        ]
5183
    },
5184
    "pjax-plugin": {
5185
        "requires": [
5186
            "node-pluginhost",
5187
            "pjax",
5188
            "plugin"
5189
        ]
5190
    },
5191
    "plugin": {
5192
        "requires": [
5193
            "base-base"
5194
        ]
5195
    },
5196
    "pluginhost": {
5197
        "use": [
5198
            "pluginhost-base",
5199
            "pluginhost-config"
5200
        ]
5201
    },
5202
    "pluginhost-base": {
5203
        "requires": [
5204
            "yui-base"
5205
        ]
5206
    },
5207
    "pluginhost-config": {
5208
        "requires": [
5209
            "pluginhost-base"
5210
        ]
5211
    },
5212
    "promise": {
5213
        "requires": [
5214
            "timers"
5215
        ]
5216
    },
5217
    "querystring": {
5218
        "use": [
5219
            "querystring-parse",
5220
            "querystring-stringify"
5221
        ]
5222
    },
5223
    "querystring-parse": {
5224
        "requires": [
5225
            "yui-base",
5226
            "array-extras"
5227
        ]
5228
    },
5229
    "querystring-parse-simple": {
5230
        "requires": [
5231
            "yui-base"
5232
        ]
5233
    },
5234
    "querystring-stringify": {
5235
        "requires": [
5236
            "yui-base"
5237
        ]
5238
    },
5239
    "querystring-stringify-simple": {
5240
        "requires": [
5241
            "yui-base"
5242
        ]
5243
    },
5244
    "queue-promote": {
5245
        "requires": [
5246
            "yui-base"
5247
        ]
5248
    },
5249
    "range-slider": {
5250
        "requires": [
5251
            "slider-base",
5252
            "slider-value-range",
5253
            "clickable-rail"
5254
        ]
5255
    },
5256
    "recordset": {
5257
        "use": [
5258
            "recordset-base",
5259
            "recordset-sort",
5260
            "recordset-filter",
5261
            "recordset-indexer"
5262
        ]
5263
    },
5264
    "recordset-base": {
5265
        "requires": [
5266
            "base",
5267
            "arraylist"
5268
        ]
5269
    },
5270
    "recordset-filter": {
5271
        "requires": [
5272
            "recordset-base",
5273
            "array-extras",
5274
            "plugin"
5275
        ]
5276
    },
5277
    "recordset-indexer": {
5278
        "requires": [
5279
            "recordset-base",
5280
            "plugin"
5281
        ]
5282
    },
5283
    "recordset-sort": {
5284
        "requires": [
5285
            "arraysort",
5286
            "recordset-base",
5287
            "plugin"
5288
        ]
5289
    },
5290
    "resize": {
5291
        "use": [
5292
            "resize-base",
5293
            "resize-proxy",
5294
            "resize-constrain"
5295
        ]
5296
    },
5297
    "resize-base": {
5298
        "requires": [
5299
            "base",
5300
            "widget",
5301
            "event",
5302
            "oop",
5303
            "dd-drag",
5304
            "dd-delegate",
5305
            "dd-drop"
5306
        ],
5307
        "skinnable": true
5308
    },
5309
    "resize-constrain": {
5310
        "requires": [
5311
            "plugin",
5312
            "resize-base"
5313
        ]
5314
    },
5315
    "resize-plugin": {
5316
        "optional": [
5317
            "resize-constrain"
5318
        ],
5319
        "requires": [
5320
            "resize-base",
5321
            "plugin"
5322
        ]
5323
    },
5324
    "resize-proxy": {
5325
        "requires": [
5326
            "plugin",
5327
            "resize-base"
5328
        ]
5329
    },
5330
    "router": {
5331
        "optional": [
5332
            "querystring-parse"
5333
        ],
5334
        "requires": [
5335
            "array-extras",
5336
            "base-build",
5337
            "history"
5338
        ]
5339
    },
5340
    "scrollview": {
5341
        "requires": [
5342
            "scrollview-base",
5343
            "scrollview-scrollbars"
5344
        ]
5345
    },
5346
    "scrollview-base": {
5347
        "requires": [
5348
            "widget",
5349
            "event-gestures",
5350
            "event-mousewheel",
5351
            "transition"
5352
        ],
5353
        "skinnable": true
5354
    },
5355
    "scrollview-base-ie": {
5356
        "condition": {
5357
            "name": "scrollview-base-ie",
5358
            "trigger": "scrollview-base",
5359
            "ua": "ie"
5360
        },
5361
        "requires": [
5362
            "scrollview-base"
5363
        ]
5364
    },
5365
    "scrollview-list": {
5366
        "requires": [
5367
            "plugin",
5368
            "classnamemanager"
5369
        ],
5370
        "skinnable": true
5371
    },
5372
    "scrollview-paginator": {
5373
        "requires": [
5374
            "plugin",
5375
            "classnamemanager"
5376
        ]
5377
    },
5378
    "scrollview-scrollbars": {
5379
        "requires": [
5380
            "classnamemanager",
5381
            "transition",
5382
            "plugin"
5383
        ],
5384
        "skinnable": true
5385
    },
5386
    "selector": {
5387
        "requires": [
5388
            "selector-native"
5389
        ]
5390
    },
5391
    "selector-css2": {
5392
        "condition": {
5393
            "name": "selector-css2",
5394
            "test": function (Y) {
5395
    var DOCUMENT = Y.config.doc,
5396
        ret = DOCUMENT && !('querySelectorAll' in DOCUMENT);
5397
 
5398
    return ret;
5399
},
5400
            "trigger": "selector"
5401
        },
5402
        "requires": [
5403
            "selector-native"
5404
        ]
5405
    },
5406
    "selector-css3": {
5407
        "requires": [
5408
            "selector-native",
5409
            "selector-css2"
5410
        ]
5411
    },
5412
    "selector-native": {
5413
        "requires": [
5414
            "dom-base"
5415
        ]
5416
    },
5417
    "series-area": {
5418
        "requires": [
5419
            "series-cartesian",
5420
            "series-fill-util"
5421
        ]
5422
    },
5423
    "series-area-stacked": {
5424
        "requires": [
5425
            "series-stacked",
5426
            "series-area"
5427
        ]
5428
    },
5429
    "series-areaspline": {
5430
        "requires": [
5431
            "series-area",
5432
            "series-curve-util"
5433
        ]
5434
    },
5435
    "series-areaspline-stacked": {
5436
        "requires": [
5437
            "series-stacked",
5438
            "series-areaspline"
5439
        ]
5440
    },
5441
    "series-bar": {
5442
        "requires": [
5443
            "series-marker",
5444
            "series-histogram-base"
5445
        ]
5446
    },
5447
    "series-bar-stacked": {
5448
        "requires": [
5449
            "series-stacked",
5450
            "series-bar"
5451
        ]
5452
    },
5453
    "series-base": {
5454
        "requires": [
5455
            "graphics",
5456
            "axis-base"
5457
        ]
5458
    },
5459
    "series-candlestick": {
5460
        "requires": [
5461
            "series-range"
5462
        ]
5463
    },
5464
    "series-cartesian": {
5465
        "requires": [
5466
            "series-base"
5467
        ]
5468
    },
5469
    "series-column": {
5470
        "requires": [
5471
            "series-marker",
5472
            "series-histogram-base"
5473
        ]
5474
    },
5475
    "series-column-stacked": {
5476
        "requires": [
5477
            "series-stacked",
5478
            "series-column"
5479
        ]
5480
    },
5481
    "series-combo": {
5482
        "requires": [
5483
            "series-cartesian",
5484
            "series-line-util",
5485
            "series-plot-util",
5486
            "series-fill-util"
5487
        ]
5488
    },
5489
    "series-combo-stacked": {
5490
        "requires": [
5491
            "series-stacked",
5492
            "series-combo"
5493
        ]
5494
    },
5495
    "series-combospline": {
5496
        "requires": [
5497
            "series-combo",
5498
            "series-curve-util"
5499
        ]
5500
    },
5501
    "series-combospline-stacked": {
5502
        "requires": [
5503
            "series-combo-stacked",
5504
            "series-curve-util"
5505
        ]
5506
    },
5507
    "series-curve-util": {},
5508
    "series-fill-util": {},
5509
    "series-histogram-base": {
5510
        "requires": [
5511
            "series-cartesian",
5512
            "series-plot-util"
5513
        ]
5514
    },
5515
    "series-line": {
5516
        "requires": [
5517
            "series-cartesian",
5518
            "series-line-util"
5519
        ]
5520
    },
5521
    "series-line-stacked": {
5522
        "requires": [
5523
            "series-stacked",
5524
            "series-line"
5525
        ]
5526
    },
5527
    "series-line-util": {},
5528
    "series-marker": {
5529
        "requires": [
5530
            "series-cartesian",
5531
            "series-plot-util"
5532
        ]
5533
    },
5534
    "series-marker-stacked": {
5535
        "requires": [
5536
            "series-stacked",
5537
            "series-marker"
5538
        ]
5539
    },
5540
    "series-ohlc": {
5541
        "requires": [
5542
            "series-range"
5543
        ]
5544
    },
5545
    "series-pie": {
5546
        "requires": [
5547
            "series-base",
5548
            "series-plot-util"
5549
        ]
5550
    },
5551
    "series-plot-util": {},
5552
    "series-range": {
5553
        "requires": [
5554
            "series-cartesian"
5555
        ]
5556
    },
5557
    "series-spline": {
5558
        "requires": [
5559
            "series-line",
5560
            "series-curve-util"
5561
        ]
5562
    },
5563
    "series-spline-stacked": {
5564
        "requires": [
5565
            "series-stacked",
5566
            "series-spline"
5567
        ]
5568
    },
5569
    "series-stacked": {
5570
        "requires": [
5571
            "axis-stacked"
5572
        ]
5573
    },
5574
    "shim-plugin": {
5575
        "requires": [
5576
            "node-style",
5577
            "node-pluginhost"
5578
        ]
5579
    },
5580
    "slider": {
5581
        "use": [
5582
            "slider-base",
5583
            "slider-value-range",
5584
            "clickable-rail",
5585
            "range-slider"
5586
        ]
5587
    },
5588
    "slider-base": {
5589
        "requires": [
5590
            "widget",
5591
            "dd-constrain",
5592
            "event-key"
5593
        ],
5594
        "skinnable": true
5595
    },
5596
    "slider-value-range": {
5597
        "requires": [
5598
            "slider-base"
5599
        ]
5600
    },
5601
    "sortable": {
5602
        "requires": [
5603
            "dd-delegate",
5604
            "dd-drop-plugin",
5605
            "dd-proxy"
5606
        ]
5607
    },
5608
    "sortable-scroll": {
5609
        "requires": [
5610
            "dd-scroll",
5611
            "sortable"
5612
        ]
5613
    },
5614
    "stylesheet": {
5615
        "requires": [
5616
            "yui-base"
5617
        ]
5618
    },
5619
    "substitute": {
5620
        "optional": [
5621
            "dump"
5622
        ],
5623
        "requires": [
5624
            "yui-base"
5625
        ]
5626
    },
5627
    "swf": {
5628
        "requires": [
5629
            "event-custom",
5630
            "node",
5631
            "swfdetect",
5632
            "escape"
5633
        ]
5634
    },
5635
    "swfdetect": {
5636
        "requires": [
5637
            "yui-base"
5638
        ]
5639
    },
5640
    "tabview": {
5641
        "requires": [
5642
            "widget",
5643
            "widget-parent",
5644
            "widget-child",
5645
            "tabview-base",
5646
            "node-pluginhost",
5647
            "node-focusmanager"
5648
        ],
5649
        "skinnable": true
5650
    },
5651
    "tabview-base": {
5652
        "requires": [
5653
            "node-event-delegate",
5654
            "classnamemanager"
5655
        ]
5656
    },
5657
    "tabview-plugin": {
5658
        "requires": [
5659
            "tabview-base"
5660
        ]
5661
    },
5662
    "template": {
5663
        "use": [
5664
            "template-base",
5665
            "template-micro"
5666
        ]
5667
    },
5668
    "template-base": {
5669
        "requires": [
5670
            "yui-base"
5671
        ]
5672
    },
5673
    "template-micro": {
5674
        "requires": [
5675
            "escape"
5676
        ]
5677
    },
5678
    "test": {
5679
        "requires": [
5680
            "event-simulate",
5681
            "event-custom",
5682
            "json-stringify"
5683
        ]
5684
    },
5685
    "test-console": {
5686
        "requires": [
5687
            "console-filters",
5688
            "test",
5689
            "array-extras"
5690
        ],
5691
        "skinnable": true
5692
    },
5693
    "text": {
5694
        "use": [
5695
            "text-accentfold",
5696
            "text-wordbreak"
5697
        ]
5698
    },
5699
    "text-accentfold": {
5700
        "requires": [
5701
            "array-extras",
5702
            "text-data-accentfold"
5703
        ]
5704
    },
5705
    "text-data-accentfold": {
5706
        "requires": [
5707
            "yui-base"
5708
        ]
5709
    },
5710
    "text-data-wordbreak": {
5711
        "requires": [
5712
            "yui-base"
5713
        ]
5714
    },
5715
    "text-wordbreak": {
5716
        "requires": [
5717
            "array-extras",
5718
            "text-data-wordbreak"
5719
        ]
5720
    },
5721
    "timers": {
5722
        "requires": [
5723
            "yui-base"
5724
        ]
5725
    },
5726
    "transition": {
5727
        "requires": [
5728
            "node-style"
5729
        ]
5730
    },
5731
    "transition-timer": {
5732
        "condition": {
5733
            "name": "transition-timer",
5734
            "test": function (Y) {
5735
    var DOCUMENT = Y.config.doc,
5736
        node = (DOCUMENT) ? DOCUMENT.documentElement: null,
5737
        ret = true;
5738
 
5739
    if (node && node.style) {
5740
        ret = !('MozTransition' in node.style || 'WebkitTransition' in node.style || 'transition' in node.style);
5741
    }
5742
 
5743
    return ret;
5744
},
5745
            "trigger": "transition"
5746
        },
5747
        "requires": [
5748
            "transition"
5749
        ]
5750
    },
5751
    "tree": {
5752
        "requires": [
5753
            "base-build",
5754
            "tree-node"
5755
        ]
5756
    },
5757
    "tree-labelable": {
5758
        "requires": [
5759
            "tree"
5760
        ]
5761
    },
5762
    "tree-lazy": {
5763
        "requires": [
5764
            "base-pluginhost",
5765
            "plugin",
5766
            "tree"
5767
        ]
5768
    },
5769
    "tree-node": {},
5770
    "tree-openable": {
5771
        "requires": [
5772
            "tree"
5773
        ]
5774
    },
5775
    "tree-selectable": {
5776
        "requires": [
5777
            "tree"
5778
        ]
5779
    },
5780
    "tree-sortable": {
5781
        "requires": [
5782
            "tree"
5783
        ]
5784
    },
5785
    "uploader": {
5786
        "requires": [
5787
            "uploader-html5",
5788
            "uploader-flash"
5789
        ]
5790
    },
5791
    "uploader-flash": {
5792
        "requires": [
5793
            "swfdetect",
5794
            "escape",
5795
            "widget",
5796
            "base",
5797
            "cssbutton",
5798
            "node",
5799
            "event-custom",
5800
            "uploader-queue"
5801
        ]
5802
    },
5803
    "uploader-html5": {
5804
        "requires": [
5805
            "widget",
5806
            "node-event-simulate",
5807
            "file-html5",
5808
            "uploader-queue"
5809
        ]
5810
    },
5811
    "uploader-queue": {
5812
        "requires": [
5813
            "base"
5814
        ]
5815
    },
5816
    "view": {
5817
        "requires": [
5818
            "base-build",
5819
            "node-event-delegate"
5820
        ]
5821
    },
5822
    "view-node-map": {
5823
        "requires": [
5824
            "view"
5825
        ]
5826
    },
5827
    "widget": {
5828
        "use": [
5829
            "widget-base",
5830
            "widget-htmlparser",
5831
            "widget-skin",
5832
            "widget-uievents"
5833
        ]
5834
    },
5835
    "widget-anim": {
5836
        "requires": [
5837
            "anim-base",
5838
            "plugin",
5839
            "widget"
5840
        ]
5841
    },
5842
    "widget-autohide": {
5843
        "requires": [
5844
            "base-build",
5845
            "event-key",
5846
            "event-outside",
5847
            "widget"
5848
        ]
5849
    },
5850
    "widget-base": {
5851
        "requires": [
5852
            "attribute",
5853
            "base-base",
5854
            "base-pluginhost",
5855
            "classnamemanager",
5856
            "event-focus",
5857
            "node-base",
5858
            "node-style"
5859
        ],
5860
        "skinnable": true
5861
    },
5862
    "widget-base-ie": {
5863
        "condition": {
5864
            "name": "widget-base-ie",
5865
            "trigger": "widget-base",
5866
            "ua": "ie"
5867
        },
5868
        "requires": [
5869
            "widget-base"
5870
        ]
5871
    },
5872
    "widget-buttons": {
5873
        "requires": [
5874
            "button-plugin",
5875
            "cssbutton",
5876
            "widget-stdmod"
5877
        ]
5878
    },
5879
    "widget-child": {
5880
        "requires": [
5881
            "base-build",
5882
            "widget"
5883
        ]
5884
    },
5885
    "widget-htmlparser": {
5886
        "requires": [
5887
            "widget-base"
5888
        ]
5889
    },
5890
    "widget-modality": {
5891
        "requires": [
5892
            "base-build",
5893
            "event-outside",
5894
            "widget"
5895
        ],
5896
        "skinnable": true
5897
    },
5898
    "widget-parent": {
5899
        "requires": [
5900
            "arraylist",
5901
            "base-build",
5902
            "widget"
5903
        ]
5904
    },
5905
    "widget-position": {
5906
        "requires": [
5907
            "base-build",
5908
            "node-screen",
5909
            "widget"
5910
        ]
5911
    },
5912
    "widget-position-align": {
5913
        "requires": [
5914
            "widget-position"
5915
        ]
5916
    },
5917
    "widget-position-constrain": {
5918
        "requires": [
5919
            "widget-position"
5920
        ]
5921
    },
5922
    "widget-skin": {
5923
        "requires": [
5924
            "widget-base"
5925
        ]
5926
    },
5927
    "widget-stack": {
5928
        "requires": [
5929
            "base-build",
5930
            "widget"
5931
        ],
5932
        "skinnable": true
5933
    },
5934
    "widget-stdmod": {
5935
        "requires": [
5936
            "base-build",
5937
            "widget"
5938
        ]
5939
    },
5940
    "widget-uievents": {
5941
        "requires": [
5942
            "node-event-delegate",
5943
            "widget-base"
5944
        ]
5945
    },
5946
    "yql": {
5947
        "requires": [
5948
            "oop"
5949
        ]
5950
    },
5951
    "yql-jsonp": {
5952
        "condition": {
5953
            "name": "yql-jsonp",
5954
            "test": function (Y) {
5955
    /* Only load the JSONP module when not in nodejs or winjs
5956
    TODO Make the winjs module a CORS module
5957
    */
5958
    return (!Y.UA.nodejs && !Y.UA.winjs);
5959
},
5960
            "trigger": "yql"
5961
        },
5962
        "requires": [
5963
            "yql",
5964
            "jsonp",
5965
            "jsonp-url"
5966
        ]
5967
    },
5968
    "yql-nodejs": {
5969
        "condition": {
5970
            "name": "yql-nodejs",
5971
            "trigger": "yql",
5972
            "ua": "nodejs"
5973
        },
5974
        "requires": [
5975
            "yql"
5976
        ]
5977
    },
5978
    "yql-winjs": {
5979
        "condition": {
5980
            "name": "yql-winjs",
5981
            "trigger": "yql",
5982
            "ua": "winjs"
5983
        },
5984
        "requires": [
5985
            "yql"
5986
        ]
5987
    },
5988
    "yui": {},
5989
    "yui-base": {},
5990
    "yui-later": {
5991
        "requires": [
5992
            "yui-base"
5993
        ]
5994
    },
5995
    "yui-log": {
5996
        "requires": [
5997
            "yui-base"
5998
        ]
5999
    },
6000
    "yui-throttle": {
6001
        "requires": [
6002
            "yui-base"
6003
        ]
6004
    }
6005
});
6006
YUI.Env[Y.version].md5 = '2fd2be6b12ee9f999b4367499ae61aae';
6007
 
6008
 
6009
}, '3.18.1', {"requires": ["loader-base"]});
6010
YUI.add('loader', function (Y, NAME) {}, '3.18.1', {"use": ["loader-base", "loader-rollup", "loader-yui3"]});