target
stringlengths
5
300
feat_repo_name
stringlengths
6
76
text
stringlengths
26
1.05M
src/renderer/Image/__test__/imageRendererTest.js
michalko/draft-wyswig
/* @flow */ import React from 'react'; import { expect, assert } from 'chai'; import { shallow } from 'enzyme'; import { getAllBlocks } from 'draftjs-utils'; import { convertFromHTML, AtomicBlockUtils, ContentState, EditorState } from 'draft-js'; import getImageComponent from '../index'; describe('ImageRenderer test suite', () => { const contentBlocks = convertFromHTML('<div>test</div>'); const contentState = ContentState.createFromBlockArray(contentBlocks); const editorState = EditorState.createWithContent(contentState); const entityKey = contentState .createEntity('IMAGE', 'MUTABLE', { src: 'testing' }) .getLastCreatedEntityKey(); const newEditorState = AtomicBlockUtils.insertAtomicBlock( editorState, entityKey, ' ', ); it('should have a div when rendered', () => { const Image = getImageComponent({ isReadOnly: () => false, isImageAlignmentEnabled: () => true, }); expect( shallow( <Image block={getAllBlocks(newEditorState).get(1)} contentState={contentState} />, ) .node.type, ) .to.equal('span'); }); it('should have state initialized correctly', () => { const Image = getImageComponent({ isReadOnly: () => false, isImageAlignmentEnabled: () => true, }); const control = shallow( <Image block={getAllBlocks(newEditorState).get(1)} contentState={contentState} />, ); assert.isNotTrue(control.state().hovered); }); it('should have 1 child element by default', () => { const Image = getImageComponent({ isReadOnly: () => false, isImageAlignmentEnabled: () => true, }); const control = shallow( <Image block={getAllBlocks(newEditorState).get(1)} contentState={contentState} />, ); expect(control.children().length).to.equal(1); }); });
node_modules/bs-recipes/recipes/webpack.react-transform-hmr/app/js/main.js
template01/editthispost
import React from 'react'; import { render } from 'react-dom'; // It's important to not define HelloWorld component right in this file // because in that case it will do full page reload on change import HelloWorld from './HelloWorld.jsx'; render(<HelloWorld />, document.getElementById('react-root'));
node_modules/bs-recipes/recipes/webpack.react-transform-hmr/app/js/main.js
kapari/ak-space
import React from 'react'; import { render } from 'react-dom'; // It's important to not define HelloWorld component right in this file // because in that case it will do full page reload on change import HelloWorld from './HelloWorld.jsx'; render(<HelloWorld />, document.getElementById('react-root'));
ajax/libs/jointjs/0.6.1/joint.js
bootcdn/cdnjs
/*! JointJS v0.6.0 - JavaScript diagramming library 2013-08-05 This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /*! * jQuery JavaScript Library v1.9.1 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2013-2-4 */ (function( window, undefined ) { // Can't do this because several apps including ASP.NET trace // the stack via arguments.caller.callee and Firefox dies if // you try to trace through "use strict" call chains. (#13335) // Support: Firefox 18+ //"use strict"; var // The deferred used on DOM ready readyList, // A central reference to the root jQuery(document) rootjQuery, // Support: IE<9 // For `typeof node.method` instead of `node.method !== undefined` core_strundefined = typeof undefined, // Use the correct document accordingly with window argument (sandbox) document = window.document, location = window.location, // Map over jQuery in case of overwrite _jQuery = window.jQuery, // Map over the $ in case of overwrite _$ = window.$, // [[Class]] -> type pairs class2type = {}, // List of deleted data cache ids, so we can reuse them core_deletedIds = [], core_version = "1.9.1", // Save a reference to some core methods core_concat = core_deletedIds.concat, core_push = core_deletedIds.push, core_slice = core_deletedIds.slice, core_indexOf = core_deletedIds.indexOf, core_toString = class2type.toString, core_hasOwn = class2type.hasOwnProperty, core_trim = core_version.trim, // Define a local copy of jQuery jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.init( selector, context, rootjQuery ); }, // Used for matching numbers core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, // Used for splitting on whitespace core_rnotwhite = /\S+/g, // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, // A simple way to check for HTML strings // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) // Strict HTML recognition (#11290: must start with <) rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/, // Match a standalone tag rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, // JSON RegExp rvalidchars = /^[\],:{}\s]*$/, rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, // Matches dashed string for camelizing rmsPrefix = /^-ms-/, rdashAlpha = /-([\da-z])/gi, // Used by jQuery.camelCase as callback to replace() fcamelCase = function( all, letter ) { return letter.toUpperCase(); }, // The ready event handler completed = function( event ) { // readyState === "complete" is good enough for us to call the dom ready in oldIE if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { detach(); jQuery.ready(); } }, // Clean-up method for dom ready events detach = function() { if ( document.addEventListener ) { document.removeEventListener( "DOMContentLoaded", completed, false ); window.removeEventListener( "load", completed, false ); } else { document.detachEvent( "onreadystatechange", completed ); window.detachEvent( "onload", completed ); } }; jQuery.fn = jQuery.prototype = { // The current version of jQuery being used jquery: core_version, constructor: jQuery, init: function( selector, context, rootjQuery ) { var match, elem; // HANDLE: $(""), $(null), $(undefined), $(false) if ( !selector ) { return this; } // Handle HTML strings if ( typeof selector === "string" ) { if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { // Assume that strings that start and end with <> are HTML and skip the regex check match = [ null, selector, null ]; } else { match = rquickExpr.exec( selector ); } // Match html or make sure no context is specified for #id if ( match && (match[1] || !context) ) { // HANDLE: $(html) -> $(array) if ( match[1] ) { context = context instanceof jQuery ? context[0] : context; // scripts is true for back-compat jQuery.merge( this, jQuery.parseHTML( match[1], context && context.nodeType ? context.ownerDocument || context : document, true ) ); // HANDLE: $(html, props) if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { for ( match in context ) { // Properties of context are called as methods if possible if ( jQuery.isFunction( this[ match ] ) ) { this[ match ]( context[ match ] ); // ...and otherwise set as attributes } else { this.attr( match, context[ match ] ); } } } return this; // HANDLE: $(#id) } else { elem = document.getElementById( match[2] ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 if ( elem && elem.parentNode ) { // Handle the case where IE and Opera return items // by name instead of ID if ( elem.id !== match[2] ) { return rootjQuery.find( selector ); } // Otherwise, we inject the element directly into the jQuery object this.length = 1; this[0] = elem; } this.context = document; this.selector = selector; return this; } // HANDLE: $(expr, $(...)) } else if ( !context || context.jquery ) { return ( context || rootjQuery ).find( selector ); // HANDLE: $(expr, context) // (which is just equivalent to: $(context).find(expr) } else { return this.constructor( context ).find( selector ); } // HANDLE: $(DOMElement) } else if ( selector.nodeType ) { this.context = this[0] = selector; this.length = 1; return this; // HANDLE: $(function) // Shortcut for document ready } else if ( jQuery.isFunction( selector ) ) { return rootjQuery.ready( selector ); } if ( selector.selector !== undefined ) { this.selector = selector.selector; this.context = selector.context; } return jQuery.makeArray( selector, this ); }, // Start with an empty selector selector: "", // The default length of a jQuery object is 0 length: 0, // The number of elements contained in the matched element set size: function() { return this.length; }, toArray: function() { return core_slice.call( this ); }, // Get the Nth element in the matched element set OR // Get the whole matched element set as a clean array get: function( num ) { return num == null ? // Return a 'clean' array this.toArray() : // Return just the object ( num < 0 ? this[ this.length + num ] : this[ num ] ); }, // Take an array of elements and push it onto the stack // (returning the new matched element set) pushStack: function( elems ) { // Build a new jQuery matched element set var ret = jQuery.merge( this.constructor(), elems ); // Add the old object onto the stack (as a reference) ret.prevObject = this; ret.context = this.context; // Return the newly-formed element set return ret; }, // Execute a callback for every element in the matched set. // (You can seed the arguments with an array of args, but this is // only used internally.) each: function( callback, args ) { return jQuery.each( this, callback, args ); }, ready: function( fn ) { // Add the callback jQuery.ready.promise().done( fn ); return this; }, slice: function() { return this.pushStack( core_slice.apply( this, arguments ) ); }, first: function() { return this.eq( 0 ); }, last: function() { return this.eq( -1 ); }, eq: function( i ) { var len = this.length, j = +i + ( i < 0 ? len : 0 ); return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); }, map: function( callback ) { return this.pushStack( jQuery.map(this, function( elem, i ) { return callback.call( elem, i, elem ); })); }, end: function() { return this.prevObject || this.constructor(null); }, // For internal use only. // Behaves like an Array's method, not like a jQuery method. push: core_push, sort: [].sort, splice: [].splice }; // Give the init function the jQuery prototype for later instantiation jQuery.fn.init.prototype = jQuery.fn; jQuery.extend = jQuery.fn.extend = function() { var src, copyIsArray, copy, name, options, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false; // Handle a deep copy situation if ( typeof target === "boolean" ) { deep = target; target = arguments[1] || {}; // skip the boolean and the target i = 2; } // Handle case when target is a string or something (possible in deep copy) if ( typeof target !== "object" && !jQuery.isFunction(target) ) { target = {}; } // extend jQuery itself if only one argument is passed if ( length === i ) { target = this; --i; } for ( ; i < length; i++ ) { // Only deal with non-null/undefined values if ( (options = arguments[ i ]) != null ) { // Extend the base object for ( name in options ) { src = target[ name ]; copy = options[ name ]; // Prevent never-ending loop if ( target === copy ) { continue; } // Recurse if we're merging plain objects or arrays if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { if ( copyIsArray ) { copyIsArray = false; clone = src && jQuery.isArray(src) ? src : []; } else { clone = src && jQuery.isPlainObject(src) ? src : {}; } // Never move original objects, clone them target[ name ] = jQuery.extend( deep, clone, copy ); // Don't bring in undefined values } else if ( copy !== undefined ) { target[ name ] = copy; } } } } // Return the modified object return target; }; jQuery.extend({ noConflict: function( deep ) { if ( window.$ === jQuery ) { window.$ = _$; } if ( deep && window.jQuery === jQuery ) { window.jQuery = _jQuery; } return jQuery; }, // Is the DOM ready to be used? Set to true once it occurs. isReady: false, // A counter to track how many items to wait for before // the ready event fires. See #6781 readyWait: 1, // Hold (or release) the ready event holdReady: function( hold ) { if ( hold ) { jQuery.readyWait++; } else { jQuery.ready( true ); } }, // Handle when the DOM is ready ready: function( wait ) { // Abort if there are pending holds or we're already ready if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { return; } // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). if ( !document.body ) { return setTimeout( jQuery.ready ); } // Remember that the DOM is ready jQuery.isReady = true; // If a normal DOM Ready event fired, decrement, and wait if need be if ( wait !== true && --jQuery.readyWait > 0 ) { return; } // If there are functions bound, to execute readyList.resolveWith( document, [ jQuery ] ); // Trigger any bound ready events if ( jQuery.fn.trigger ) { jQuery( document ).trigger("ready").off("ready"); } }, // See test/unit/core.js for details concerning isFunction. // Since version 1.3, DOM methods and functions like alert // aren't supported. They return false on IE (#2968). isFunction: function( obj ) { return jQuery.type(obj) === "function"; }, isArray: Array.isArray || function( obj ) { return jQuery.type(obj) === "array"; }, isWindow: function( obj ) { return obj != null && obj == obj.window; }, isNumeric: function( obj ) { return !isNaN( parseFloat(obj) ) && isFinite( obj ); }, type: function( obj ) { if ( obj == null ) { return String( obj ); } return typeof obj === "object" || typeof obj === "function" ? class2type[ core_toString.call(obj) ] || "object" : typeof obj; }, isPlainObject: function( obj ) { // Must be an Object. // Because of IE, we also have to check the presence of the constructor property. // Make sure that DOM nodes and window objects don't pass through, as well if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { return false; } try { // Not own constructor property must be Object if ( obj.constructor && !core_hasOwn.call(obj, "constructor") && !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { return false; } } catch ( e ) { // IE8,9 Will throw exceptions on certain host objects #9897 return false; } // Own properties are enumerated firstly, so to speed up, // if last one is own, then all properties are own. var key; for ( key in obj ) {} return key === undefined || core_hasOwn.call( obj, key ); }, isEmptyObject: function( obj ) { var name; for ( name in obj ) { return false; } return true; }, error: function( msg ) { throw new Error( msg ); }, // data: string of html // context (optional): If specified, the fragment will be created in this context, defaults to document // keepScripts (optional): If true, will include scripts passed in the html string parseHTML: function( data, context, keepScripts ) { if ( !data || typeof data !== "string" ) { return null; } if ( typeof context === "boolean" ) { keepScripts = context; context = false; } context = context || document; var parsed = rsingleTag.exec( data ), scripts = !keepScripts && []; // Single tag if ( parsed ) { return [ context.createElement( parsed[1] ) ]; } parsed = jQuery.buildFragment( [ data ], context, scripts ); if ( scripts ) { jQuery( scripts ).remove(); } return jQuery.merge( [], parsed.childNodes ); }, parseJSON: function( data ) { // Attempt to parse using the native JSON parser first if ( window.JSON && window.JSON.parse ) { return window.JSON.parse( data ); } if ( data === null ) { return data; } if ( typeof data === "string" ) { // Make sure leading/trailing whitespace is removed (IE can't handle it) data = jQuery.trim( data ); if ( data ) { // Make sure the incoming data is actual JSON // Logic borrowed from http://json.org/json2.js if ( rvalidchars.test( data.replace( rvalidescape, "@" ) .replace( rvalidtokens, "]" ) .replace( rvalidbraces, "")) ) { return ( new Function( "return " + data ) )(); } } } jQuery.error( "Invalid JSON: " + data ); }, // Cross-browser xml parsing parseXML: function( data ) { var xml, tmp; if ( !data || typeof data !== "string" ) { return null; } try { if ( window.DOMParser ) { // Standard tmp = new DOMParser(); xml = tmp.parseFromString( data , "text/xml" ); } else { // IE xml = new ActiveXObject( "Microsoft.XMLDOM" ); xml.async = "false"; xml.loadXML( data ); } } catch( e ) { xml = undefined; } if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { jQuery.error( "Invalid XML: " + data ); } return xml; }, noop: function() {}, // Evaluates a script in a global context // Workarounds based on findings by Jim Driscoll // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context globalEval: function( data ) { if ( data && jQuery.trim( data ) ) { // We use execScript on Internet Explorer // We use an anonymous function so that context is window // rather than jQuery in Firefox ( window.execScript || function( data ) { window[ "eval" ].call( window, data ); } )( data ); } }, // Convert dashed to camelCase; used by the css and data modules // Microsoft forgot to hump their vendor prefix (#9572) camelCase: function( string ) { return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); }, nodeName: function( elem, name ) { return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); }, // args is for internal usage only each: function( obj, callback, args ) { var value, i = 0, length = obj.length, isArray = isArraylike( obj ); if ( args ) { if ( isArray ) { for ( ; i < length; i++ ) { value = callback.apply( obj[ i ], args ); if ( value === false ) { break; } } } else { for ( i in obj ) { value = callback.apply( obj[ i ], args ); if ( value === false ) { break; } } } // A special, fast, case for the most common use of each } else { if ( isArray ) { for ( ; i < length; i++ ) { value = callback.call( obj[ i ], i, obj[ i ] ); if ( value === false ) { break; } } } else { for ( i in obj ) { value = callback.call( obj[ i ], i, obj[ i ] ); if ( value === false ) { break; } } } } return obj; }, // Use native String.trim function wherever possible trim: core_trim && !core_trim.call("\uFEFF\xA0") ? function( text ) { return text == null ? "" : core_trim.call( text ); } : // Otherwise use our own trimming functionality function( text ) { return text == null ? "" : ( text + "" ).replace( rtrim, "" ); }, // results is for internal usage only makeArray: function( arr, results ) { var ret = results || []; if ( arr != null ) { if ( isArraylike( Object(arr) ) ) { jQuery.merge( ret, typeof arr === "string" ? [ arr ] : arr ); } else { core_push.call( ret, arr ); } } return ret; }, inArray: function( elem, arr, i ) { var len; if ( arr ) { if ( core_indexOf ) { return core_indexOf.call( arr, elem, i ); } len = arr.length; i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; for ( ; i < len; i++ ) { // Skip accessing in sparse arrays if ( i in arr && arr[ i ] === elem ) { return i; } } } return -1; }, merge: function( first, second ) { var l = second.length, i = first.length, j = 0; if ( typeof l === "number" ) { for ( ; j < l; j++ ) { first[ i++ ] = second[ j ]; } } else { while ( second[j] !== undefined ) { first[ i++ ] = second[ j++ ]; } } first.length = i; return first; }, grep: function( elems, callback, inv ) { var retVal, ret = [], i = 0, length = elems.length; inv = !!inv; // Go through the array, only saving the items // that pass the validator function for ( ; i < length; i++ ) { retVal = !!callback( elems[ i ], i ); if ( inv !== retVal ) { ret.push( elems[ i ] ); } } return ret; }, // arg is for internal usage only map: function( elems, callback, arg ) { var value, i = 0, length = elems.length, isArray = isArraylike( elems ), ret = []; // Go through the array, translating each of the items to their if ( isArray ) { for ( ; i < length; i++ ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret[ ret.length ] = value; } } // Go through every key on the object, } else { for ( i in elems ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret[ ret.length ] = value; } } } // Flatten any nested arrays return core_concat.apply( [], ret ); }, // A global GUID counter for objects guid: 1, // Bind a function to a context, optionally partially applying any // arguments. proxy: function( fn, context ) { var args, proxy, tmp; if ( typeof context === "string" ) { tmp = fn[ context ]; context = fn; fn = tmp; } // Quick check to determine if target is callable, in the spec // this throws a TypeError, but we will just return undefined. if ( !jQuery.isFunction( fn ) ) { return undefined; } // Simulated bind args = core_slice.call( arguments, 2 ); proxy = function() { return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); }; // Set the guid of unique handler to the same of original handler, so it can be removed proxy.guid = fn.guid = fn.guid || jQuery.guid++; return proxy; }, // Multifunctional method to get and set values of a collection // The value/s can optionally be executed if it's a function access: function( elems, fn, key, value, chainable, emptyGet, raw ) { var i = 0, length = elems.length, bulk = key == null; // Sets many values if ( jQuery.type( key ) === "object" ) { chainable = true; for ( i in key ) { jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); } // Sets one value } else if ( value !== undefined ) { chainable = true; if ( !jQuery.isFunction( value ) ) { raw = true; } if ( bulk ) { // Bulk operations run against the entire set if ( raw ) { fn.call( elems, value ); fn = null; // ...except when executing function values } else { bulk = fn; fn = function( elem, key, value ) { return bulk.call( jQuery( elem ), value ); }; } } if ( fn ) { for ( ; i < length; i++ ) { fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); } } } return chainable ? elems : // Gets bulk ? fn.call( elems ) : length ? fn( elems[0], key ) : emptyGet; }, now: function() { return ( new Date() ).getTime(); } }); jQuery.ready.promise = function( obj ) { if ( !readyList ) { readyList = jQuery.Deferred(); // Catch cases where $(document).ready() is called after the browser event has already occurred. // we once tried to use readyState "interactive" here, but it caused issues like the one // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 if ( document.readyState === "complete" ) { // Handle it asynchronously to allow scripts the opportunity to delay ready setTimeout( jQuery.ready ); // Standards-based browsers support DOMContentLoaded } else if ( document.addEventListener ) { // Use the handy event callback document.addEventListener( "DOMContentLoaded", completed, false ); // A fallback to window.onload, that will always work window.addEventListener( "load", completed, false ); // If IE event model is used } else { // Ensure firing before onload, maybe late but safe also for iframes document.attachEvent( "onreadystatechange", completed ); // A fallback to window.onload, that will always work window.attachEvent( "onload", completed ); // If IE and not a frame // continually check to see if the document is ready var top = false; try { top = window.frameElement == null && document.documentElement; } catch(e) {} if ( top && top.doScroll ) { (function doScrollCheck() { if ( !jQuery.isReady ) { try { // Use the trick by Diego Perini // http://javascript.nwbox.com/IEContentLoaded/ top.doScroll("left"); } catch(e) { return setTimeout( doScrollCheck, 50 ); } // detach all dom ready events detach(); // and execute any waiting functions jQuery.ready(); } })(); } } } return readyList.promise( obj ); }; // Populate the class2type map jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { class2type[ "[object " + name + "]" ] = name.toLowerCase(); }); function isArraylike( obj ) { var length = obj.length, type = jQuery.type( obj ); if ( jQuery.isWindow( obj ) ) { return false; } if ( obj.nodeType === 1 && length ) { return true; } return type === "array" || type !== "function" && ( length === 0 || typeof length === "number" && length > 0 && ( length - 1 ) in obj ); } // All jQuery objects should point back to these rootjQuery = jQuery(document); // String to Object options format cache var optionsCache = {}; // Convert String-formatted options into Object-formatted ones and store in cache function createOptions( options ) { var object = optionsCache[ options ] = {}; jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { object[ flag ] = true; }); return object; } /* * Create a callback list using the following parameters: * * options: an optional list of space-separated options that will change how * the callback list behaves or a more traditional option object * * By default a callback list will act like an event callback list and can be * "fired" multiple times. * * Possible options: * * once: will ensure the callback list can only be fired once (like a Deferred) * * memory: will keep track of previous values and will call any callback added * after the list has been fired right away with the latest "memorized" * values (like a Deferred) * * unique: will ensure a callback can only be added once (no duplicate in the list) * * stopOnFalse: interrupt callings when a callback returns false * */ jQuery.Callbacks = function( options ) { // Convert options from String-formatted to Object-formatted if needed // (we check in cache first) options = typeof options === "string" ? ( optionsCache[ options ] || createOptions( options ) ) : jQuery.extend( {}, options ); var // Flag to know if list is currently firing firing, // Last fire value (for non-forgettable lists) memory, // Flag to know if list was already fired fired, // End of the loop when firing firingLength, // Index of currently firing callback (modified by remove if needed) firingIndex, // First callback to fire (used internally by add and fireWith) firingStart, // Actual callback list list = [], // Stack of fire calls for repeatable lists stack = !options.once && [], // Fire callbacks fire = function( data ) { memory = options.memory && data; fired = true; firingIndex = firingStart || 0; firingStart = 0; firingLength = list.length; firing = true; for ( ; list && firingIndex < firingLength; firingIndex++ ) { if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { memory = false; // To prevent further calls using add break; } } firing = false; if ( list ) { if ( stack ) { if ( stack.length ) { fire( stack.shift() ); } } else if ( memory ) { list = []; } else { self.disable(); } } }, // Actual Callbacks object self = { // Add a callback or a collection of callbacks to the list add: function() { if ( list ) { // First, we save the current length var start = list.length; (function add( args ) { jQuery.each( args, function( _, arg ) { var type = jQuery.type( arg ); if ( type === "function" ) { if ( !options.unique || !self.has( arg ) ) { list.push( arg ); } } else if ( arg && arg.length && type !== "string" ) { // Inspect recursively add( arg ); } }); })( arguments ); // Do we need to add the callbacks to the // current firing batch? if ( firing ) { firingLength = list.length; // With memory, if we're not firing then // we should call right away } else if ( memory ) { firingStart = start; fire( memory ); } } return this; }, // Remove a callback from the list remove: function() { if ( list ) { jQuery.each( arguments, function( _, arg ) { var index; while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { list.splice( index, 1 ); // Handle firing indexes if ( firing ) { if ( index <= firingLength ) { firingLength--; } if ( index <= firingIndex ) { firingIndex--; } } } }); } return this; }, // Check if a given callback is in the list. // If no argument is given, return whether or not list has callbacks attached. has: function( fn ) { return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); }, // Remove all callbacks from the list empty: function() { list = []; return this; }, // Have the list do nothing anymore disable: function() { list = stack = memory = undefined; return this; }, // Is it disabled? disabled: function() { return !list; }, // Lock the list in its current state lock: function() { stack = undefined; if ( !memory ) { self.disable(); } return this; }, // Is it locked? locked: function() { return !stack; }, // Call all callbacks with the given context and arguments fireWith: function( context, args ) { args = args || []; args = [ context, args.slice ? args.slice() : args ]; if ( list && ( !fired || stack ) ) { if ( firing ) { stack.push( args ); } else { fire( args ); } } return this; }, // Call all the callbacks with the given arguments fire: function() { self.fireWith( this, arguments ); return this; }, // To know if the callbacks have already been called at least once fired: function() { return !!fired; } }; return self; }; jQuery.extend({ Deferred: function( func ) { var tuples = [ // action, add listener, listener list, final state [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], [ "notify", "progress", jQuery.Callbacks("memory") ] ], state = "pending", promise = { state: function() { return state; }, always: function() { deferred.done( arguments ).fail( arguments ); return this; }, then: function( /* fnDone, fnFail, fnProgress */ ) { var fns = arguments; return jQuery.Deferred(function( newDefer ) { jQuery.each( tuples, function( i, tuple ) { var action = tuple[ 0 ], fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; // deferred[ done | fail | progress ] for forwarding actions to newDefer deferred[ tuple[1] ](function() { var returned = fn && fn.apply( this, arguments ); if ( returned && jQuery.isFunction( returned.promise ) ) { returned.promise() .done( newDefer.resolve ) .fail( newDefer.reject ) .progress( newDefer.notify ); } else { newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); } }); }); fns = null; }).promise(); }, // Get a promise for this deferred // If obj is provided, the promise aspect is added to the object promise: function( obj ) { return obj != null ? jQuery.extend( obj, promise ) : promise; } }, deferred = {}; // Keep pipe for back-compat promise.pipe = promise.then; // Add list-specific methods jQuery.each( tuples, function( i, tuple ) { var list = tuple[ 2 ], stateString = tuple[ 3 ]; // promise[ done | fail | progress ] = list.add promise[ tuple[1] ] = list.add; // Handle state if ( stateString ) { list.add(function() { // state = [ resolved | rejected ] state = stateString; // [ reject_list | resolve_list ].disable; progress_list.lock }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); } // deferred[ resolve | reject | notify ] deferred[ tuple[0] ] = function() { deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); return this; }; deferred[ tuple[0] + "With" ] = list.fireWith; }); // Make the deferred a promise promise.promise( deferred ); // Call given func if any if ( func ) { func.call( deferred, deferred ); } // All done! return deferred; }, // Deferred helper when: function( subordinate /* , ..., subordinateN */ ) { var i = 0, resolveValues = core_slice.call( arguments ), length = resolveValues.length, // the count of uncompleted subordinates remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, // the master Deferred. If resolveValues consist of only a single Deferred, just use that. deferred = remaining === 1 ? subordinate : jQuery.Deferred(), // Update function for both resolve and progress values updateFunc = function( i, contexts, values ) { return function( value ) { contexts[ i ] = this; values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; if( values === progressValues ) { deferred.notifyWith( contexts, values ); } else if ( !( --remaining ) ) { deferred.resolveWith( contexts, values ); } }; }, progressValues, progressContexts, resolveContexts; // add listeners to Deferred subordinates; treat others as resolved if ( length > 1 ) { progressValues = new Array( length ); progressContexts = new Array( length ); resolveContexts = new Array( length ); for ( ; i < length; i++ ) { if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { resolveValues[ i ].promise() .done( updateFunc( i, resolveContexts, resolveValues ) ) .fail( deferred.reject ) .progress( updateFunc( i, progressContexts, progressValues ) ); } else { --remaining; } } } // if we're not waiting on anything, resolve the master if ( !remaining ) { deferred.resolveWith( resolveContexts, resolveValues ); } return deferred.promise(); } }); jQuery.support = (function() { var support, all, a, input, select, fragment, opt, eventName, isSupported, i, div = document.createElement("div"); // Setup div.setAttribute( "className", "t" ); div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"; // Support tests won't run in some limited or non-browser environments all = div.getElementsByTagName("*"); a = div.getElementsByTagName("a")[ 0 ]; if ( !all || !a || !all.length ) { return {}; } // First batch of tests select = document.createElement("select"); opt = select.appendChild( document.createElement("option") ); input = div.getElementsByTagName("input")[ 0 ]; a.style.cssText = "top:1px;float:left;opacity:.5"; support = { // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) getSetAttribute: div.className !== "t", // IE strips leading whitespace when .innerHTML is used leadingWhitespace: div.firstChild.nodeType === 3, // Make sure that tbody elements aren't automatically inserted // IE will insert them into empty tables tbody: !div.getElementsByTagName("tbody").length, // Make sure that link elements get serialized correctly by innerHTML // This requires a wrapper element in IE htmlSerialize: !!div.getElementsByTagName("link").length, // Get the style information from getAttribute // (IE uses .cssText instead) style: /top/.test( a.getAttribute("style") ), // Make sure that URLs aren't manipulated // (IE normalizes it by default) hrefNormalized: a.getAttribute("href") === "/a", // Make sure that element opacity exists // (IE uses filter instead) // Use a regex to work around a WebKit issue. See #5145 opacity: /^0.5/.test( a.style.opacity ), // Verify style float existence // (IE uses styleFloat instead of cssFloat) cssFloat: !!a.style.cssFloat, // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) checkOn: !!input.value, // Make sure that a selected-by-default option has a working selected property. // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) optSelected: opt.selected, // Tests for enctype support on a form (#6743) enctype: !!document.createElement("form").enctype, // Makes sure cloning an html5 element does not cause problems // Where outerHTML is undefined, this still works html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>", // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode boxModel: document.compatMode === "CSS1Compat", // Will be defined later deleteExpando: true, noCloneEvent: true, inlineBlockNeedsLayout: false, shrinkWrapBlocks: false, reliableMarginRight: true, boxSizingReliable: true, pixelPosition: false }; // Make sure checked status is properly cloned input.checked = true; support.noCloneChecked = input.cloneNode( true ).checked; // Make sure that the options inside disabled selects aren't marked as disabled // (WebKit marks them as disabled) select.disabled = true; support.optDisabled = !opt.disabled; // Support: IE<9 try { delete div.test; } catch( e ) { support.deleteExpando = false; } // Check if we can trust getAttribute("value") input = document.createElement("input"); input.setAttribute( "value", "" ); support.input = input.getAttribute( "value" ) === ""; // Check if an input maintains its value after becoming a radio input.value = "t"; input.setAttribute( "type", "radio" ); support.radioValue = input.value === "t"; // #11217 - WebKit loses check when the name is after the checked attribute input.setAttribute( "checked", "t" ); input.setAttribute( "name", "t" ); fragment = document.createDocumentFragment(); fragment.appendChild( input ); // Check if a disconnected checkbox will retain its checked // value of true after appended to the DOM (IE6/7) support.appendChecked = input.checked; // WebKit doesn't clone checked state correctly in fragments support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; // Support: IE<9 // Opera does not clone events (and typeof div.attachEvent === undefined). // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() if ( div.attachEvent ) { div.attachEvent( "onclick", function() { support.noCloneEvent = false; }); div.cloneNode( true ).click(); } // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php for ( i in { submit: true, change: true, focusin: true }) { div.setAttribute( eventName = "on" + i, "t" ); support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; } div.style.backgroundClip = "content-box"; div.cloneNode( true ).style.backgroundClip = ""; support.clearCloneStyle = div.style.backgroundClip === "content-box"; // Run tests that need a body at doc ready jQuery(function() { var container, marginDiv, tds, divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", body = document.getElementsByTagName("body")[0]; if ( !body ) { // Return for frameset docs that don't have a body return; } container = document.createElement("div"); container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; body.appendChild( container ).appendChild( div ); // Support: IE8 // Check if table cells still have offsetWidth/Height when they are set // to display:none and there are still other visible table cells in a // table row; if so, offsetWidth/Height are not reliable for use when // determining if an element has been hidden directly using // display:none (it is still safe to use offsets if a parent element is // hidden; don safety goggles and see bug #4512 for more information). div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>"; tds = div.getElementsByTagName("td"); tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; isSupported = ( tds[ 0 ].offsetHeight === 0 ); tds[ 0 ].style.display = ""; tds[ 1 ].style.display = "none"; // Support: IE8 // Check if empty table cells still have offsetWidth/Height support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); // Check box-sizing and margin behavior div.innerHTML = ""; div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; support.boxSizing = ( div.offsetWidth === 4 ); support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); // Use window.getComputedStyle because jsdom on node.js will break without it. if ( window.getComputedStyle ) { support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; // Check if div with explicit width and no margin-right incorrectly // gets computed margin-right based on width of container. (#3333) // Fails in WebKit before Feb 2011 nightlies // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right marginDiv = div.appendChild( document.createElement("div") ); marginDiv.style.cssText = div.style.cssText = divReset; marginDiv.style.marginRight = marginDiv.style.width = "0"; div.style.width = "1px"; support.reliableMarginRight = !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); } if ( typeof div.style.zoom !== core_strundefined ) { // Support: IE<8 // Check if natively block-level elements act like inline-block // elements when setting their display to 'inline' and giving // them layout div.innerHTML = ""; div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); // Support: IE6 // Check if elements with layout shrink-wrap their children div.style.display = "block"; div.innerHTML = "<div></div>"; div.firstChild.style.width = "5px"; support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); if ( support.inlineBlockNeedsLayout ) { // Prevent IE 6 from affecting layout for positioned elements #11048 // Prevent IE from shrinking the body in IE 7 mode #12869 // Support: IE<8 body.style.zoom = 1; } } body.removeChild( container ); // Null elements to avoid leaks in IE container = div = tds = marginDiv = null; }); // Null elements to avoid leaks in IE all = select = fragment = opt = a = input = null; return support; })(); var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, rmultiDash = /([A-Z])/g; function internalData( elem, name, data, pvt /* Internal Use Only */ ){ if ( !jQuery.acceptData( elem ) ) { return; } var thisCache, ret, internalKey = jQuery.expando, getByName = typeof name === "string", // We have to handle DOM nodes and JS objects differently because IE6-7 // can't GC object references properly across the DOM-JS boundary isNode = elem.nodeType, // Only DOM nodes need the global jQuery cache; JS object data is // attached directly to the object so GC can occur automatically cache = isNode ? jQuery.cache : elem, // Only defining an ID for JS objects if its cache already exists allows // the code to shortcut on the same path as a DOM node with no cache id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; // Avoid doing any more work than we need to when trying to get data on an // object that has no data at all if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { return; } if ( !id ) { // Only DOM nodes need a new unique ID for each element since their data // ends up in the global cache if ( isNode ) { elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++; } else { id = internalKey; } } if ( !cache[ id ] ) { cache[ id ] = {}; // Avoids exposing jQuery metadata on plain JS objects when the object // is serialized using JSON.stringify if ( !isNode ) { cache[ id ].toJSON = jQuery.noop; } } // An object can be passed to jQuery.data instead of a key/value pair; this gets // shallow copied over onto the existing cache if ( typeof name === "object" || typeof name === "function" ) { if ( pvt ) { cache[ id ] = jQuery.extend( cache[ id ], name ); } else { cache[ id ].data = jQuery.extend( cache[ id ].data, name ); } } thisCache = cache[ id ]; // jQuery data() is stored in a separate object inside the object's internal data // cache in order to avoid key collisions between internal data and user-defined // data. if ( !pvt ) { if ( !thisCache.data ) { thisCache.data = {}; } thisCache = thisCache.data; } if ( data !== undefined ) { thisCache[ jQuery.camelCase( name ) ] = data; } // Check for both converted-to-camel and non-converted data property names // If a data property was specified if ( getByName ) { // First Try to find as-is property data ret = thisCache[ name ]; // Test for null|undefined property data if ( ret == null ) { // Try to find the camelCased property ret = thisCache[ jQuery.camelCase( name ) ]; } } else { ret = thisCache; } return ret; } function internalRemoveData( elem, name, pvt ) { if ( !jQuery.acceptData( elem ) ) { return; } var i, l, thisCache, isNode = elem.nodeType, // See jQuery.data for more information cache = isNode ? jQuery.cache : elem, id = isNode ? elem[ jQuery.expando ] : jQuery.expando; // If there is already no cache entry for this object, there is no // purpose in continuing if ( !cache[ id ] ) { return; } if ( name ) { thisCache = pvt ? cache[ id ] : cache[ id ].data; if ( thisCache ) { // Support array or space separated string names for data keys if ( !jQuery.isArray( name ) ) { // try the string as a key before any manipulation if ( name in thisCache ) { name = [ name ]; } else { // split the camel cased version by spaces unless a key with the spaces exists name = jQuery.camelCase( name ); if ( name in thisCache ) { name = [ name ]; } else { name = name.split(" "); } } } else { // If "name" is an array of keys... // When data is initially created, via ("key", "val") signature, // keys will be converted to camelCase. // Since there is no way to tell _how_ a key was added, remove // both plain key and camelCase key. #12786 // This will only penalize the array argument path. name = name.concat( jQuery.map( name, jQuery.camelCase ) ); } for ( i = 0, l = name.length; i < l; i++ ) { delete thisCache[ name[i] ]; } // If there is no data left in the cache, we want to continue // and let the cache object itself get destroyed if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { return; } } } // See jQuery.data for more information if ( !pvt ) { delete cache[ id ].data; // Don't destroy the parent cache unless the internal data object // had been the only thing left in it if ( !isEmptyDataObject( cache[ id ] ) ) { return; } } // Destroy the cache if ( isNode ) { jQuery.cleanData( [ elem ], true ); // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) } else if ( jQuery.support.deleteExpando || cache != cache.window ) { delete cache[ id ]; // When all else fails, null } else { cache[ id ] = null; } } jQuery.extend({ cache: {}, // Unique for each copy of jQuery on the page // Non-digits removed to match rinlinejQuery expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), // The following elements throw uncatchable exceptions if you // attempt to add expando properties to them. noData: { "embed": true, // Ban all objects except for Flash (which handle expandos) "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", "applet": true }, hasData: function( elem ) { elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; return !!elem && !isEmptyDataObject( elem ); }, data: function( elem, name, data ) { return internalData( elem, name, data ); }, removeData: function( elem, name ) { return internalRemoveData( elem, name ); }, // For internal use only. _data: function( elem, name, data ) { return internalData( elem, name, data, true ); }, _removeData: function( elem, name ) { return internalRemoveData( elem, name, true ); }, // A method for determining if a DOM node can handle the data expando acceptData: function( elem ) { // Do not set data on non-element because it will not be cleared (#8335). if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) { return false; } var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; // nodes accept data unless otherwise specified; rejection can be conditional return !noData || noData !== true && elem.getAttribute("classid") === noData; } }); jQuery.fn.extend({ data: function( key, value ) { var attrs, name, elem = this[0], i = 0, data = null; // Gets all values if ( key === undefined ) { if ( this.length ) { data = jQuery.data( elem ); if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { attrs = elem.attributes; for ( ; i < attrs.length; i++ ) { name = attrs[i].name; if ( !name.indexOf( "data-" ) ) { name = jQuery.camelCase( name.slice(5) ); dataAttr( elem, name, data[ name ] ); } } jQuery._data( elem, "parsedAttrs", true ); } } return data; } // Sets multiple values if ( typeof key === "object" ) { return this.each(function() { jQuery.data( this, key ); }); } return jQuery.access( this, function( value ) { if ( value === undefined ) { // Try to fetch any internally stored data first return elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; } this.each(function() { jQuery.data( this, key, value ); }); }, null, value, arguments.length > 1, null, true ); }, removeData: function( key ) { return this.each(function() { jQuery.removeData( this, key ); }); } }); function dataAttr( elem, key, data ) { // If nothing was found internally, try to fetch any // data from the HTML5 data-* attribute if ( data === undefined && elem.nodeType === 1 ) { var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); data = elem.getAttribute( name ); if ( typeof data === "string" ) { try { data = data === "true" ? true : data === "false" ? false : data === "null" ? null : // Only convert to a number if it doesn't change the string +data + "" === data ? +data : rbrace.test( data ) ? jQuery.parseJSON( data ) : data; } catch( e ) {} // Make sure we set the data so it isn't changed later jQuery.data( elem, key, data ); } else { data = undefined; } } return data; } // checks a cache object for emptiness function isEmptyDataObject( obj ) { var name; for ( name in obj ) { // if the public data object is empty, the private is still empty if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { continue; } if ( name !== "toJSON" ) { return false; } } return true; } jQuery.extend({ queue: function( elem, type, data ) { var queue; if ( elem ) { type = ( type || "fx" ) + "queue"; queue = jQuery._data( elem, type ); // Speed up dequeue by getting out quickly if this is just a lookup if ( data ) { if ( !queue || jQuery.isArray(data) ) { queue = jQuery._data( elem, type, jQuery.makeArray(data) ); } else { queue.push( data ); } } return queue || []; } }, dequeue: function( elem, type ) { type = type || "fx"; var queue = jQuery.queue( elem, type ), startLength = queue.length, fn = queue.shift(), hooks = jQuery._queueHooks( elem, type ), next = function() { jQuery.dequeue( elem, type ); }; // If the fx queue is dequeued, always remove the progress sentinel if ( fn === "inprogress" ) { fn = queue.shift(); startLength--; } hooks.cur = fn; if ( fn ) { // Add a progress sentinel to prevent the fx queue from being // automatically dequeued if ( type === "fx" ) { queue.unshift( "inprogress" ); } // clear up the last queue stop function delete hooks.stop; fn.call( elem, next, hooks ); } if ( !startLength && hooks ) { hooks.empty.fire(); } }, // not intended for public consumption - generates a queueHooks object, or returns the current one _queueHooks: function( elem, type ) { var key = type + "queueHooks"; return jQuery._data( elem, key ) || jQuery._data( elem, key, { empty: jQuery.Callbacks("once memory").add(function() { jQuery._removeData( elem, type + "queue" ); jQuery._removeData( elem, key ); }) }); } }); jQuery.fn.extend({ queue: function( type, data ) { var setter = 2; if ( typeof type !== "string" ) { data = type; type = "fx"; setter--; } if ( arguments.length < setter ) { return jQuery.queue( this[0], type ); } return data === undefined ? this : this.each(function() { var queue = jQuery.queue( this, type, data ); // ensure a hooks for this queue jQuery._queueHooks( this, type ); if ( type === "fx" && queue[0] !== "inprogress" ) { jQuery.dequeue( this, type ); } }); }, dequeue: function( type ) { return this.each(function() { jQuery.dequeue( this, type ); }); }, // Based off of the plugin by Clint Helfers, with permission. // http://blindsignals.com/index.php/2009/07/jquery-delay/ delay: function( time, type ) { time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; type = type || "fx"; return this.queue( type, function( next, hooks ) { var timeout = setTimeout( next, time ); hooks.stop = function() { clearTimeout( timeout ); }; }); }, clearQueue: function( type ) { return this.queue( type || "fx", [] ); }, // Get a promise resolved when queues of a certain type // are emptied (fx is the type by default) promise: function( type, obj ) { var tmp, count = 1, defer = jQuery.Deferred(), elements = this, i = this.length, resolve = function() { if ( !( --count ) ) { defer.resolveWith( elements, [ elements ] ); } }; if ( typeof type !== "string" ) { obj = type; type = undefined; } type = type || "fx"; while( i-- ) { tmp = jQuery._data( elements[ i ], type + "queueHooks" ); if ( tmp && tmp.empty ) { count++; tmp.empty.add( resolve ); } } resolve(); return defer.promise( obj ); } }); var nodeHook, boolHook, rclass = /[\t\r\n]/g, rreturn = /\r/g, rfocusable = /^(?:input|select|textarea|button|object)$/i, rclickable = /^(?:a|area)$/i, rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i, ruseDefault = /^(?:checked|selected)$/i, getSetAttribute = jQuery.support.getSetAttribute, getSetInput = jQuery.support.input; jQuery.fn.extend({ attr: function( name, value ) { return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); }, removeAttr: function( name ) { return this.each(function() { jQuery.removeAttr( this, name ); }); }, prop: function( name, value ) { return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); }, removeProp: function( name ) { name = jQuery.propFix[ name ] || name; return this.each(function() { // try/catch handles cases where IE balks (such as removing a property on window) try { this[ name ] = undefined; delete this[ name ]; } catch( e ) {} }); }, addClass: function( value ) { var classes, elem, cur, clazz, j, i = 0, len = this.length, proceed = typeof value === "string" && value; if ( jQuery.isFunction( value ) ) { return this.each(function( j ) { jQuery( this ).addClass( value.call( this, j, this.className ) ); }); } if ( proceed ) { // The disjunction here is for better compressibility (see removeClass) classes = ( value || "" ).match( core_rnotwhite ) || []; for ( ; i < len; i++ ) { elem = this[ i ]; cur = elem.nodeType === 1 && ( elem.className ? ( " " + elem.className + " " ).replace( rclass, " " ) : " " ); if ( cur ) { j = 0; while ( (clazz = classes[j++]) ) { if ( cur.indexOf( " " + clazz + " " ) < 0 ) { cur += clazz + " "; } } elem.className = jQuery.trim( cur ); } } } return this; }, removeClass: function( value ) { var classes, elem, cur, clazz, j, i = 0, len = this.length, proceed = arguments.length === 0 || typeof value === "string" && value; if ( jQuery.isFunction( value ) ) { return this.each(function( j ) { jQuery( this ).removeClass( value.call( this, j, this.className ) ); }); } if ( proceed ) { classes = ( value || "" ).match( core_rnotwhite ) || []; for ( ; i < len; i++ ) { elem = this[ i ]; // This expression is here for better compressibility (see addClass) cur = elem.nodeType === 1 && ( elem.className ? ( " " + elem.className + " " ).replace( rclass, " " ) : "" ); if ( cur ) { j = 0; while ( (clazz = classes[j++]) ) { // Remove *all* instances while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { cur = cur.replace( " " + clazz + " ", " " ); } } elem.className = value ? jQuery.trim( cur ) : ""; } } } return this; }, toggleClass: function( value, stateVal ) { var type = typeof value, isBool = typeof stateVal === "boolean"; if ( jQuery.isFunction( value ) ) { return this.each(function( i ) { jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); }); } return this.each(function() { if ( type === "string" ) { // toggle individual class names var className, i = 0, self = jQuery( this ), state = stateVal, classNames = value.match( core_rnotwhite ) || []; while ( (className = classNames[ i++ ]) ) { // check each className given, space separated list state = isBool ? state : !self.hasClass( className ); self[ state ? "addClass" : "removeClass" ]( className ); } // Toggle whole class name } else if ( type === core_strundefined || type === "boolean" ) { if ( this.className ) { // store className if set jQuery._data( this, "__className__", this.className ); } // If the element has a class name or if we're passed "false", // then remove the whole classname (if there was one, the above saved it). // Otherwise bring back whatever was previously saved (if anything), // falling back to the empty string if nothing was stored. this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; } }); }, hasClass: function( selector ) { var className = " " + selector + " ", i = 0, l = this.length; for ( ; i < l; i++ ) { if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { return true; } } return false; }, val: function( value ) { var ret, hooks, isFunction, elem = this[0]; if ( !arguments.length ) { if ( elem ) { hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { return ret; } ret = elem.value; return typeof ret === "string" ? // handle most common string cases ret.replace(rreturn, "") : // handle cases where value is null/undef or number ret == null ? "" : ret; } return; } isFunction = jQuery.isFunction( value ); return this.each(function( i ) { var val, self = jQuery(this); if ( this.nodeType !== 1 ) { return; } if ( isFunction ) { val = value.call( this, i, self.val() ); } else { val = value; } // Treat null/undefined as ""; convert numbers to string if ( val == null ) { val = ""; } else if ( typeof val === "number" ) { val += ""; } else if ( jQuery.isArray( val ) ) { val = jQuery.map(val, function ( value ) { return value == null ? "" : value + ""; }); } hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; // If set returns undefined, fall back to normal setting if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { this.value = val; } }); } }); jQuery.extend({ valHooks: { option: { get: function( elem ) { // attributes.value is undefined in Blackberry 4.7 but // uses .value. See #6932 var val = elem.attributes.value; return !val || val.specified ? elem.value : elem.text; } }, select: { get: function( elem ) { var value, option, options = elem.options, index = elem.selectedIndex, one = elem.type === "select-one" || index < 0, values = one ? null : [], max = one ? index + 1 : options.length, i = index < 0 ? max : one ? index : 0; // Loop through all the selected options for ( ; i < max; i++ ) { option = options[ i ]; // oldIE doesn't update selected after form reset (#2551) if ( ( option.selected || i === index ) && // Don't return options that are disabled or in a disabled optgroup ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { // Get the specific value for the option value = jQuery( option ).val(); // We don't need an array for one selects if ( one ) { return value; } // Multi-Selects return an array values.push( value ); } } return values; }, set: function( elem, value ) { var values = jQuery.makeArray( value ); jQuery(elem).find("option").each(function() { this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; }); if ( !values.length ) { elem.selectedIndex = -1; } return values; } } }, attr: function( elem, name, value ) { var hooks, notxml, ret, nType = elem.nodeType; // don't get/set attributes on text, comment and attribute nodes if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { return; } // Fallback to prop when attributes are not supported if ( typeof elem.getAttribute === core_strundefined ) { return jQuery.prop( elem, name, value ); } notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); // All attributes are lowercase // Grab necessary hook if one is defined if ( notxml ) { name = name.toLowerCase(); hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); } if ( value !== undefined ) { if ( value === null ) { jQuery.removeAttr( elem, name ); } else if ( hooks && notxml && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { return ret; } else { elem.setAttribute( name, value + "" ); return value; } } else if ( hooks && notxml && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { return ret; } else { // In IE9+, Flash objects don't have .getAttribute (#12945) // Support: IE9+ if ( typeof elem.getAttribute !== core_strundefined ) { ret = elem.getAttribute( name ); } // Non-existent attributes return null, we normalize to undefined return ret == null ? undefined : ret; } }, removeAttr: function( elem, value ) { var name, propName, i = 0, attrNames = value && value.match( core_rnotwhite ); if ( attrNames && elem.nodeType === 1 ) { while ( (name = attrNames[i++]) ) { propName = jQuery.propFix[ name ] || name; // Boolean attributes get special treatment (#10870) if ( rboolean.test( name ) ) { // Set corresponding property to false for boolean attributes // Also clear defaultChecked/defaultSelected (if appropriate) for IE<8 if ( !getSetAttribute && ruseDefault.test( name ) ) { elem[ jQuery.camelCase( "default-" + name ) ] = elem[ propName ] = false; } else { elem[ propName ] = false; } // See #9699 for explanation of this approach (setting first, then removal) } else { jQuery.attr( elem, name, "" ); } elem.removeAttribute( getSetAttribute ? name : propName ); } } }, attrHooks: { type: { set: function( elem, value ) { if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { // Setting the type on a radio button after the value resets the value in IE6-9 // Reset value to default in case type is set after value during creation var val = elem.value; elem.setAttribute( "type", value ); if ( val ) { elem.value = val; } return value; } } } }, propFix: { tabindex: "tabIndex", readonly: "readOnly", "for": "htmlFor", "class": "className", maxlength: "maxLength", cellspacing: "cellSpacing", cellpadding: "cellPadding", rowspan: "rowSpan", colspan: "colSpan", usemap: "useMap", frameborder: "frameBorder", contenteditable: "contentEditable" }, prop: function( elem, name, value ) { var ret, hooks, notxml, nType = elem.nodeType; // don't get/set properties on text, comment and attribute nodes if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { return; } notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); if ( notxml ) { // Fix name and attach hooks name = jQuery.propFix[ name ] || name; hooks = jQuery.propHooks[ name ]; } if ( value !== undefined ) { if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { return ret; } else { return ( elem[ name ] = value ); } } else { if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { return ret; } else { return elem[ name ]; } } }, propHooks: { tabIndex: { get: function( elem ) { // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ var attributeNode = elem.getAttributeNode("tabindex"); return attributeNode && attributeNode.specified ? parseInt( attributeNode.value, 10 ) : rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? 0 : undefined; } } } }); // Hook for boolean attributes boolHook = { get: function( elem, name ) { var // Use .prop to determine if this attribute is understood as boolean prop = jQuery.prop( elem, name ), // Fetch it accordingly attr = typeof prop === "boolean" && elem.getAttribute( name ), detail = typeof prop === "boolean" ? getSetInput && getSetAttribute ? attr != null : // oldIE fabricates an empty string for missing boolean attributes // and conflates checked/selected into attroperties ruseDefault.test( name ) ? elem[ jQuery.camelCase( "default-" + name ) ] : !!attr : // fetch an attribute node for properties not recognized as boolean elem.getAttributeNode( name ); return detail && detail.value !== false ? name.toLowerCase() : undefined; }, set: function( elem, value, name ) { if ( value === false ) { // Remove boolean attributes when set to false jQuery.removeAttr( elem, name ); } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { // IE<8 needs the *property* name elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); // Use defaultChecked and defaultSelected for oldIE } else { elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; } return name; } }; // fix oldIE value attroperty if ( !getSetInput || !getSetAttribute ) { jQuery.attrHooks.value = { get: function( elem, name ) { var ret = elem.getAttributeNode( name ); return jQuery.nodeName( elem, "input" ) ? // Ignore the value *property* by using defaultValue elem.defaultValue : ret && ret.specified ? ret.value : undefined; }, set: function( elem, value, name ) { if ( jQuery.nodeName( elem, "input" ) ) { // Does not return so that setAttribute is also used elem.defaultValue = value; } else { // Use nodeHook if defined (#1954); otherwise setAttribute is fine return nodeHook && nodeHook.set( elem, value, name ); } } }; } // IE6/7 do not support getting/setting some attributes with get/setAttribute if ( !getSetAttribute ) { // Use this for any attribute in IE6/7 // This fixes almost every IE6/7 issue nodeHook = jQuery.valHooks.button = { get: function( elem, name ) { var ret = elem.getAttributeNode( name ); return ret && ( name === "id" || name === "name" || name === "coords" ? ret.value !== "" : ret.specified ) ? ret.value : undefined; }, set: function( elem, value, name ) { // Set the existing or create a new attribute node var ret = elem.getAttributeNode( name ); if ( !ret ) { elem.setAttributeNode( (ret = elem.ownerDocument.createAttribute( name )) ); } ret.value = value += ""; // Break association with cloned elements by also using setAttribute (#9646) return name === "value" || value === elem.getAttribute( name ) ? value : undefined; } }; // Set contenteditable to false on removals(#10429) // Setting to empty string throws an error as an invalid value jQuery.attrHooks.contenteditable = { get: nodeHook.get, set: function( elem, value, name ) { nodeHook.set( elem, value === "" ? false : value, name ); } }; // Set width and height to auto instead of 0 on empty string( Bug #8150 ) // This is for removals jQuery.each([ "width", "height" ], function( i, name ) { jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { set: function( elem, value ) { if ( value === "" ) { elem.setAttribute( name, "auto" ); return value; } } }); }); } // Some attributes require a special call on IE // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx if ( !jQuery.support.hrefNormalized ) { jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { get: function( elem ) { var ret = elem.getAttribute( name, 2 ); return ret == null ? undefined : ret; } }); }); // href/src property should get the full normalized URL (#10299/#12915) jQuery.each([ "href", "src" ], function( i, name ) { jQuery.propHooks[ name ] = { get: function( elem ) { return elem.getAttribute( name, 4 ); } }; }); } if ( !jQuery.support.style ) { jQuery.attrHooks.style = { get: function( elem ) { // Return undefined in the case of empty string // Note: IE uppercases css property names, but if we were to .toLowerCase() // .cssText, that would destroy case senstitivity in URL's, like in "background" return elem.style.cssText || undefined; }, set: function( elem, value ) { return ( elem.style.cssText = value + "" ); } }; } // Safari mis-reports the default selected property of an option // Accessing the parent's selectedIndex property fixes it if ( !jQuery.support.optSelected ) { jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { get: function( elem ) { var parent = elem.parentNode; if ( parent ) { parent.selectedIndex; // Make sure that it also works with optgroups, see #5701 if ( parent.parentNode ) { parent.parentNode.selectedIndex; } } return null; } }); } // IE6/7 call enctype encoding if ( !jQuery.support.enctype ) { jQuery.propFix.enctype = "encoding"; } // Radios and checkboxes getter/setter if ( !jQuery.support.checkOn ) { jQuery.each([ "radio", "checkbox" ], function() { jQuery.valHooks[ this ] = { get: function( elem ) { // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified return elem.getAttribute("value") === null ? "on" : elem.value; } }; }); } jQuery.each([ "radio", "checkbox" ], function() { jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { set: function( elem, value ) { if ( jQuery.isArray( value ) ) { return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); } } }); }); var rformElems = /^(?:input|select|textarea)$/i, rkeyEvent = /^key/, rmouseEvent = /^(?:mouse|contextmenu)|click/, rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; function returnTrue() { return true; } function returnFalse() { return false; } /* * Helper functions for managing events -- not part of the public interface. * Props to Dean Edwards' addEvent library for many of the ideas. */ jQuery.event = { global: {}, add: function( elem, types, handler, data, selector ) { var tmp, events, t, handleObjIn, special, eventHandle, handleObj, handlers, type, namespaces, origType, elemData = jQuery._data( elem ); // Don't attach events to noData or text/comment nodes (but allow plain objects) if ( !elemData ) { return; } // Caller can pass in an object of custom data in lieu of the handler if ( handler.handler ) { handleObjIn = handler; handler = handleObjIn.handler; selector = handleObjIn.selector; } // Make sure that the handler has a unique ID, used to find/remove it later if ( !handler.guid ) { handler.guid = jQuery.guid++; } // Init the element's event structure and main handler, if this is the first if ( !(events = elemData.events) ) { events = elemData.events = {}; } if ( !(eventHandle = elemData.handle) ) { eventHandle = elemData.handle = function( e ) { // Discard the second event of a jQuery.event.trigger() and // when an event is called after a page has unloaded return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : undefined; }; // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events eventHandle.elem = elem; } // Handle multiple events separated by a space // jQuery(...).bind("mouseover mouseout", fn); types = ( types || "" ).match( core_rnotwhite ) || [""]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[t] ) || []; type = origType = tmp[1]; namespaces = ( tmp[2] || "" ).split( "." ).sort(); // If event changes its type, use the special event handlers for the changed type special = jQuery.event.special[ type ] || {}; // If selector defined, determine special event api type, otherwise given type type = ( selector ? special.delegateType : special.bindType ) || type; // Update special based on newly reset type special = jQuery.event.special[ type ] || {}; // handleObj is passed to all event handlers handleObj = jQuery.extend({ type: type, origType: origType, data: data, handler: handler, guid: handler.guid, selector: selector, needsContext: selector && jQuery.expr.match.needsContext.test( selector ), namespace: namespaces.join(".") }, handleObjIn ); // Init the event handler queue if we're the first if ( !(handlers = events[ type ]) ) { handlers = events[ type ] = []; handlers.delegateCount = 0; // Only use addEventListener/attachEvent if the special events handler returns false if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { // Bind the global event handler to the element if ( elem.addEventListener ) { elem.addEventListener( type, eventHandle, false ); } else if ( elem.attachEvent ) { elem.attachEvent( "on" + type, eventHandle ); } } } if ( special.add ) { special.add.call( elem, handleObj ); if ( !handleObj.handler.guid ) { handleObj.handler.guid = handler.guid; } } // Add to the element's handler list, delegates in front if ( selector ) { handlers.splice( handlers.delegateCount++, 0, handleObj ); } else { handlers.push( handleObj ); } // Keep track of which events have ever been used, for event optimization jQuery.event.global[ type ] = true; } // Nullify elem to prevent memory leaks in IE elem = null; }, // Detach an event or set of events from an element remove: function( elem, types, handler, selector, mappedTypes ) { var j, handleObj, tmp, origCount, t, events, special, handlers, type, namespaces, origType, elemData = jQuery.hasData( elem ) && jQuery._data( elem ); if ( !elemData || !(events = elemData.events) ) { return; } // Once for each type.namespace in types; type may be omitted types = ( types || "" ).match( core_rnotwhite ) || [""]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[t] ) || []; type = origType = tmp[1]; namespaces = ( tmp[2] || "" ).split( "." ).sort(); // Unbind all events (on this namespace, if provided) for the element if ( !type ) { for ( type in events ) { jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); } continue; } special = jQuery.event.special[ type ] || {}; type = ( selector ? special.delegateType : special.bindType ) || type; handlers = events[ type ] || []; tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); // Remove matching events origCount = j = handlers.length; while ( j-- ) { handleObj = handlers[ j ]; if ( ( mappedTypes || origType === handleObj.origType ) && ( !handler || handler.guid === handleObj.guid ) && ( !tmp || tmp.test( handleObj.namespace ) ) && ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { handlers.splice( j, 1 ); if ( handleObj.selector ) { handlers.delegateCount--; } if ( special.remove ) { special.remove.call( elem, handleObj ); } } } // Remove generic event handler if we removed something and no more handlers exist // (avoids potential for endless recursion during removal of special event handlers) if ( origCount && !handlers.length ) { if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { jQuery.removeEvent( elem, type, elemData.handle ); } delete events[ type ]; } } // Remove the expando if it's no longer used if ( jQuery.isEmptyObject( events ) ) { delete elemData.handle; // removeData also checks for emptiness and clears the expando if empty // so use it instead of delete jQuery._removeData( elem, "events" ); } }, trigger: function( event, data, elem, onlyHandlers ) { var handle, ontype, cur, bubbleType, special, tmp, i, eventPath = [ elem || document ], type = core_hasOwn.call( event, "type" ) ? event.type : event, namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; cur = tmp = elem = elem || document; // Don't do events on text and comment nodes if ( elem.nodeType === 3 || elem.nodeType === 8 ) { return; } // focus/blur morphs to focusin/out; ensure we're not firing them right now if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { return; } if ( type.indexOf(".") >= 0 ) { // Namespaced trigger; create a regexp to match event type in handle() namespaces = type.split("."); type = namespaces.shift(); namespaces.sort(); } ontype = type.indexOf(":") < 0 && "on" + type; // Caller can pass in a jQuery.Event object, Object, or just an event type string event = event[ jQuery.expando ] ? event : new jQuery.Event( type, typeof event === "object" && event ); event.isTrigger = true; event.namespace = namespaces.join("."); event.namespace_re = event.namespace ? new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : null; // Clean up the event in case it is being reused event.result = undefined; if ( !event.target ) { event.target = elem; } // Clone any incoming data and prepend the event, creating the handler arg list data = data == null ? [ event ] : jQuery.makeArray( data, [ event ] ); // Allow special events to draw outside the lines special = jQuery.event.special[ type ] || {}; if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { return; } // Determine event propagation path in advance, per W3C events spec (#9951) // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { bubbleType = special.delegateType || type; if ( !rfocusMorph.test( bubbleType + type ) ) { cur = cur.parentNode; } for ( ; cur; cur = cur.parentNode ) { eventPath.push( cur ); tmp = cur; } // Only add window if we got to document (e.g., not plain obj or detached DOM) if ( tmp === (elem.ownerDocument || document) ) { eventPath.push( tmp.defaultView || tmp.parentWindow || window ); } } // Fire handlers on the event path i = 0; while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { event.type = i > 1 ? bubbleType : special.bindType || type; // jQuery handler handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); if ( handle ) { handle.apply( cur, data ); } // Native handler handle = ontype && cur[ ontype ]; if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { event.preventDefault(); } } event.type = type; // If nobody prevented the default action, do it now if ( !onlyHandlers && !event.isDefaultPrevented() ) { if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { // Call a native DOM method on the target with the same name name as the event. // Can't use an .isFunction() check here because IE6/7 fails that test. // Don't do default actions on window, that's where global variables be (#6170) if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { // Don't re-trigger an onFOO event when we call its FOO() method tmp = elem[ ontype ]; if ( tmp ) { elem[ ontype ] = null; } // Prevent re-triggering of the same event, since we already bubbled it above jQuery.event.triggered = type; try { elem[ type ](); } catch ( e ) { // IE<9 dies on focus/blur to hidden element (#1486,#12518) // only reproducible on winXP IE8 native, not IE9 in IE8 mode } jQuery.event.triggered = undefined; if ( tmp ) { elem[ ontype ] = tmp; } } } } return event.result; }, dispatch: function( event ) { // Make a writable jQuery.Event from the native event object event = jQuery.event.fix( event ); var i, ret, handleObj, matched, j, handlerQueue = [], args = core_slice.call( arguments ), handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], special = jQuery.event.special[ event.type ] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event args[0] = event; event.delegateTarget = this; // Call the preDispatch hook for the mapped type, and let it bail if desired if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { return; } // Determine handlers handlerQueue = jQuery.event.handlers.call( this, event, handlers ); // Run delegates first; they may want to stop propagation beneath us i = 0; while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { event.currentTarget = matched.elem; j = 0; while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { // Triggered event must either 1) have no namespace, or // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { event.handleObj = handleObj; event.data = handleObj.data; ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) .apply( matched.elem, args ); if ( ret !== undefined ) { if ( (event.result = ret) === false ) { event.preventDefault(); event.stopPropagation(); } } } } } // Call the postDispatch hook for the mapped type if ( special.postDispatch ) { special.postDispatch.call( this, event ); } return event.result; }, handlers: function( event, handlers ) { var sel, handleObj, matches, i, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event.target; // Find delegate handlers // Black-hole SVG <use> instance trees (#13180) // Avoid non-left-click bubbling in Firefox (#3861) if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { for ( ; cur != this; cur = cur.parentNode || this ) { // Don't check non-elements (#13208) // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { matches = []; for ( i = 0; i < delegateCount; i++ ) { handleObj = handlers[ i ]; // Don't conflict with Object.prototype properties (#13203) sel = handleObj.selector + " "; if ( matches[ sel ] === undefined ) { matches[ sel ] = handleObj.needsContext ? jQuery( sel, this ).index( cur ) >= 0 : jQuery.find( sel, this, null, [ cur ] ).length; } if ( matches[ sel ] ) { matches.push( handleObj ); } } if ( matches.length ) { handlerQueue.push({ elem: cur, handlers: matches }); } } } } // Add the remaining (directly-bound) handlers if ( delegateCount < handlers.length ) { handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); } return handlerQueue; }, fix: function( event ) { if ( event[ jQuery.expando ] ) { return event; } // Create a writable copy of the event object and normalize some properties var i, prop, copy, type = event.type, originalEvent = event, fixHook = this.fixHooks[ type ]; if ( !fixHook ) { this.fixHooks[ type ] = fixHook = rmouseEvent.test( type ) ? this.mouseHooks : rkeyEvent.test( type ) ? this.keyHooks : {}; } copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; event = new jQuery.Event( originalEvent ); i = copy.length; while ( i-- ) { prop = copy[ i ]; event[ prop ] = originalEvent[ prop ]; } // Support: IE<9 // Fix target property (#1925) if ( !event.target ) { event.target = originalEvent.srcElement || document; } // Support: Chrome 23+, Safari? // Target should not be a text node (#504, #13143) if ( event.target.nodeType === 3 ) { event.target = event.target.parentNode; } // Support: IE<9 // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) event.metaKey = !!event.metaKey; return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; }, // Includes some event props shared by KeyEvent and MouseEvent props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), fixHooks: {}, keyHooks: { props: "char charCode key keyCode".split(" "), filter: function( event, original ) { // Add which for key events if ( event.which == null ) { event.which = original.charCode != null ? original.charCode : original.keyCode; } return event; } }, mouseHooks: { props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), filter: function( event, original ) { var body, eventDoc, doc, button = original.button, fromElement = original.fromElement; // Calculate pageX/Y if missing and clientX/Y available if ( event.pageX == null && original.clientX != null ) { eventDoc = event.target.ownerDocument || document; doc = eventDoc.documentElement; body = eventDoc.body; event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); } // Add relatedTarget, if necessary if ( !event.relatedTarget && fromElement ) { event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; } // Add which for click: 1 === left; 2 === middle; 3 === right // Note: button is not normalized, so don't use it if ( !event.which && button !== undefined ) { event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); } return event; } }, special: { load: { // Prevent triggered image.load events from bubbling to window.load noBubble: true }, click: { // For checkbox, fire native event so checked state will be right trigger: function() { if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { this.click(); return false; } } }, focus: { // Fire native event if possible so blur/focus sequence is correct trigger: function() { if ( this !== document.activeElement && this.focus ) { try { this.focus(); return false; } catch ( e ) { // Support: IE<9 // If we error on focus to hidden element (#1486, #12518), // let .trigger() run the handlers } } }, delegateType: "focusin" }, blur: { trigger: function() { if ( this === document.activeElement && this.blur ) { this.blur(); return false; } }, delegateType: "focusout" }, beforeunload: { postDispatch: function( event ) { // Even when returnValue equals to undefined Firefox will still show alert if ( event.result !== undefined ) { event.originalEvent.returnValue = event.result; } } } }, simulate: function( type, elem, event, bubble ) { // Piggyback on a donor event to simulate a different one. // Fake originalEvent to avoid donor's stopPropagation, but if the // simulated event prevents default then we do the same on the donor. var e = jQuery.extend( new jQuery.Event(), event, { type: type, isSimulated: true, originalEvent: {} } ); if ( bubble ) { jQuery.event.trigger( e, null, elem ); } else { jQuery.event.dispatch.call( elem, e ); } if ( e.isDefaultPrevented() ) { event.preventDefault(); } } }; jQuery.removeEvent = document.removeEventListener ? function( elem, type, handle ) { if ( elem.removeEventListener ) { elem.removeEventListener( type, handle, false ); } } : function( elem, type, handle ) { var name = "on" + type; if ( elem.detachEvent ) { // #8545, #7054, preventing memory leaks for custom events in IE6-8 // detachEvent needed property on element, by name of that event, to properly expose it to GC if ( typeof elem[ name ] === core_strundefined ) { elem[ name ] = null; } elem.detachEvent( name, handle ); } }; jQuery.Event = function( src, props ) { // Allow instantiation without the 'new' keyword if ( !(this instanceof jQuery.Event) ) { return new jQuery.Event( src, props ); } // Event object if ( src && src.type ) { this.originalEvent = src; this.type = src.type; // Events bubbling up the document may have been marked as prevented // by a handler lower down the tree; reflect the correct value. this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; // Event type } else { this.type = src; } // Put explicitly provided properties onto the event object if ( props ) { jQuery.extend( this, props ); } // Create a timestamp if incoming event doesn't have one this.timeStamp = src && src.timeStamp || jQuery.now(); // Mark it as fixed this[ jQuery.expando ] = true; }; // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html jQuery.Event.prototype = { isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse, preventDefault: function() { var e = this.originalEvent; this.isDefaultPrevented = returnTrue; if ( !e ) { return; } // If preventDefault exists, run it on the original event if ( e.preventDefault ) { e.preventDefault(); // Support: IE // Otherwise set the returnValue property of the original event to false } else { e.returnValue = false; } }, stopPropagation: function() { var e = this.originalEvent; this.isPropagationStopped = returnTrue; if ( !e ) { return; } // If stopPropagation exists, run it on the original event if ( e.stopPropagation ) { e.stopPropagation(); } // Support: IE // Set the cancelBubble property of the original event to true e.cancelBubble = true; }, stopImmediatePropagation: function() { this.isImmediatePropagationStopped = returnTrue; this.stopPropagation(); } }; // Create mouseenter/leave events using mouseover/out and event-time checks jQuery.each({ mouseenter: "mouseover", mouseleave: "mouseout" }, function( orig, fix ) { jQuery.event.special[ orig ] = { delegateType: fix, bindType: fix, handle: function( event ) { var ret, target = this, related = event.relatedTarget, handleObj = event.handleObj; // For mousenter/leave call the handler if related is outside the target. // NB: No relatedTarget if the mouse left/entered the browser window if ( !related || (related !== target && !jQuery.contains( target, related )) ) { event.type = handleObj.origType; ret = handleObj.handler.apply( this, arguments ); event.type = fix; } return ret; } }; }); // IE submit delegation if ( !jQuery.support.submitBubbles ) { jQuery.event.special.submit = { setup: function() { // Only need this for delegated form submit events if ( jQuery.nodeName( this, "form" ) ) { return false; } // Lazy-add a submit handler when a descendant form may potentially be submitted jQuery.event.add( this, "click._submit keypress._submit", function( e ) { // Node name check avoids a VML-related crash in IE (#9807) var elem = e.target, form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; if ( form && !jQuery._data( form, "submitBubbles" ) ) { jQuery.event.add( form, "submit._submit", function( event ) { event._submit_bubble = true; }); jQuery._data( form, "submitBubbles", true ); } }); // return undefined since we don't need an event listener }, postDispatch: function( event ) { // If form was submitted by the user, bubble the event up the tree if ( event._submit_bubble ) { delete event._submit_bubble; if ( this.parentNode && !event.isTrigger ) { jQuery.event.simulate( "submit", this.parentNode, event, true ); } } }, teardown: function() { // Only need this for delegated form submit events if ( jQuery.nodeName( this, "form" ) ) { return false; } // Remove delegated handlers; cleanData eventually reaps submit handlers attached above jQuery.event.remove( this, "._submit" ); } }; } // IE change delegation and checkbox/radio fix if ( !jQuery.support.changeBubbles ) { jQuery.event.special.change = { setup: function() { if ( rformElems.test( this.nodeName ) ) { // IE doesn't fire change on a check/radio until blur; trigger it on click // after a propertychange. Eat the blur-change in special.change.handle. // This still fires onchange a second time for check/radio after blur. if ( this.type === "checkbox" || this.type === "radio" ) { jQuery.event.add( this, "propertychange._change", function( event ) { if ( event.originalEvent.propertyName === "checked" ) { this._just_changed = true; } }); jQuery.event.add( this, "click._change", function( event ) { if ( this._just_changed && !event.isTrigger ) { this._just_changed = false; } // Allow triggered, simulated change events (#11500) jQuery.event.simulate( "change", this, event, true ); }); } return false; } // Delegated event; lazy-add a change handler on descendant inputs jQuery.event.add( this, "beforeactivate._change", function( e ) { var elem = e.target; if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { jQuery.event.add( elem, "change._change", function( event ) { if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { jQuery.event.simulate( "change", this.parentNode, event, true ); } }); jQuery._data( elem, "changeBubbles", true ); } }); }, handle: function( event ) { var elem = event.target; // Swallow native change events from checkbox/radio, we already triggered them above if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { return event.handleObj.handler.apply( this, arguments ); } }, teardown: function() { jQuery.event.remove( this, "._change" ); return !rformElems.test( this.nodeName ); } }; } // Create "bubbling" focus and blur events if ( !jQuery.support.focusinBubbles ) { jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { // Attach a single capturing handler while someone wants focusin/focusout var attaches = 0, handler = function( event ) { jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); }; jQuery.event.special[ fix ] = { setup: function() { if ( attaches++ === 0 ) { document.addEventListener( orig, handler, true ); } }, teardown: function() { if ( --attaches === 0 ) { document.removeEventListener( orig, handler, true ); } } }; }); } jQuery.fn.extend({ on: function( types, selector, data, fn, /*INTERNAL*/ one ) { var type, origFn; // Types can be a map of types/handlers if ( typeof types === "object" ) { // ( types-Object, selector, data ) if ( typeof selector !== "string" ) { // ( types-Object, data ) data = data || selector; selector = undefined; } for ( type in types ) { this.on( type, selector, data, types[ type ], one ); } return this; } if ( data == null && fn == null ) { // ( types, fn ) fn = selector; data = selector = undefined; } else if ( fn == null ) { if ( typeof selector === "string" ) { // ( types, selector, fn ) fn = data; data = undefined; } else { // ( types, data, fn ) fn = data; data = selector; selector = undefined; } } if ( fn === false ) { fn = returnFalse; } else if ( !fn ) { return this; } if ( one === 1 ) { origFn = fn; fn = function( event ) { // Can use an empty set, since event contains the info jQuery().off( event ); return origFn.apply( this, arguments ); }; // Use same guid so caller can remove using origFn fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); } return this.each( function() { jQuery.event.add( this, types, fn, data, selector ); }); }, one: function( types, selector, data, fn ) { return this.on( types, selector, data, fn, 1 ); }, off: function( types, selector, fn ) { var handleObj, type; if ( types && types.preventDefault && types.handleObj ) { // ( event ) dispatched jQuery.Event handleObj = types.handleObj; jQuery( types.delegateTarget ).off( handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler ); return this; } if ( typeof types === "object" ) { // ( types-object [, selector] ) for ( type in types ) { this.off( type, selector, types[ type ] ); } return this; } if ( selector === false || typeof selector === "function" ) { // ( types [, fn] ) fn = selector; selector = undefined; } if ( fn === false ) { fn = returnFalse; } return this.each(function() { jQuery.event.remove( this, types, fn, selector ); }); }, bind: function( types, data, fn ) { return this.on( types, null, data, fn ); }, unbind: function( types, fn ) { return this.off( types, null, fn ); }, delegate: function( selector, types, data, fn ) { return this.on( types, selector, data, fn ); }, undelegate: function( selector, types, fn ) { // ( namespace ) or ( selector, types [, fn] ) return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); }, trigger: function( type, data ) { return this.each(function() { jQuery.event.trigger( type, data, this ); }); }, triggerHandler: function( type, data ) { var elem = this[0]; if ( elem ) { return jQuery.event.trigger( type, data, elem, true ); } } }); /*! * Sizzle CSS Selector Engine * Copyright 2012 jQuery Foundation and other contributors * Released under the MIT license * http://sizzlejs.com/ */ (function( window, undefined ) { var i, cachedruns, Expr, getText, isXML, compile, hasDuplicate, outermostContext, // Local document vars setDocument, document, docElem, documentIsXML, rbuggyQSA, rbuggyMatches, matches, contains, sortOrder, // Instance-specific data expando = "sizzle" + -(new Date()), preferredDoc = window.document, support = {}, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), // General-purpose constants strundefined = typeof undefined, MAX_NEGATIVE = 1 << 31, // Array methods arr = [], pop = arr.pop, push = arr.push, slice = arr.slice, // Use a stripped-down indexOf if we can't use a native one indexOf = arr.indexOf || function( elem ) { var i = 0, len = this.length; for ( ; i < len; i++ ) { if ( this[i] === elem ) { return i; } } return -1; }, // Regular expressions // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace whitespace = "[\\x20\\t\\r\\n\\f]", // http://www.w3.org/TR/css3-syntax/#characters characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", // Loosely modeled on CSS identifier characters // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier identifier = characterEncoding.replace( "w", "w#" ), // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors operators = "([*^$|!~]?=)", attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", // Prefer arguments quoted, // then not containing pseudos/brackets, // then attribute selectors/non-parenthetical expressions, // then anything else // These preferences are here to reduce the number of selectors // needing tokenize in the PSEUDO preFilter pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ), rpseudo = new RegExp( pseudos ), ridentifier = new RegExp( "^" + identifier + "$" ), matchExpr = { "ID": new RegExp( "^#(" + characterEncoding + ")" ), "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), "ATTR": new RegExp( "^" + attributes ), "PSEUDO": new RegExp( "^" + pseudos ), "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), // For use in libraries implementing .is() // We use this for POS matching in `select` "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) }, rsibling = /[\x20\t\r\n\f]*[+~]/, rnative = /^[^{]+\{\s*\[native code/, // Easily-parseable/retrievable ID or TAG or CLASS selectors rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rescape = /'|\\/g, rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g, funescape = function( _, escaped ) { var high = "0x" + escaped - 0x10000; // NaN means non-codepoint return high !== high ? escaped : // BMP codepoint high < 0 ? String.fromCharCode( high + 0x10000 ) : // Supplemental Plane codepoint (surrogate pair) String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); }; // Use a stripped-down slice if we can't use a native one try { slice.call( preferredDoc.documentElement.childNodes, 0 )[0].nodeType; } catch ( e ) { slice = function( i ) { var elem, results = []; while ( (elem = this[i++]) ) { results.push( elem ); } return results; }; } /** * For feature detection * @param {Function} fn The function to test for native support */ function isNative( fn ) { return rnative.test( fn + "" ); } /** * Create key-value caches of limited size * @returns {Function(string, Object)} Returns the Object data after storing it on itself with * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) * deleting the oldest entry */ function createCache() { var cache, keys = []; return (cache = function( key, value ) { // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) if ( keys.push( key += " " ) > Expr.cacheLength ) { // Only keep the most recent entries delete cache[ keys.shift() ]; } return (cache[ key ] = value); }); } /** * Mark a function for special use by Sizzle * @param {Function} fn The function to mark */ function markFunction( fn ) { fn[ expando ] = true; return fn; } /** * Support testing using an element * @param {Function} fn Passed the created div and expects a boolean result */ function assert( fn ) { var div = document.createElement("div"); try { return fn( div ); } catch (e) { return false; } finally { // release memory in IE div = null; } } function Sizzle( selector, context, results, seed ) { var match, elem, m, nodeType, // QSA vars i, groups, old, nid, newContext, newSelector; if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { setDocument( context ); } context = context || document; results = results || []; if ( !selector || typeof selector !== "string" ) { return results; } if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { return []; } if ( !documentIsXML && !seed ) { // Shortcuts if ( (match = rquickExpr.exec( selector )) ) { // Speed-up: Sizzle("#ID") if ( (m = match[1]) ) { if ( nodeType === 9 ) { elem = context.getElementById( m ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 if ( elem && elem.parentNode ) { // Handle the case where IE, Opera, and Webkit return items // by name instead of ID if ( elem.id === m ) { results.push( elem ); return results; } } else { return results; } } else { // Context is not a document if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && contains( context, elem ) && elem.id === m ) { results.push( elem ); return results; } } // Speed-up: Sizzle("TAG") } else if ( match[2] ) { push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) ); return results; // Speed-up: Sizzle(".CLASS") } else if ( (m = match[3]) && support.getByClassName && context.getElementsByClassName ) { push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); return results; } } // QSA path if ( support.qsa && !rbuggyQSA.test(selector) ) { old = true; nid = expando; newContext = context; newSelector = nodeType === 9 && selector; // qSA works strangely on Element-rooted queries // We can work around this by specifying an extra ID on the root // and working up from there (Thanks to Andrew Dupont for the technique) // IE 8 doesn't work on object elements if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { groups = tokenize( selector ); if ( (old = context.getAttribute("id")) ) { nid = old.replace( rescape, "\\$&" ); } else { context.setAttribute( "id", nid ); } nid = "[id='" + nid + "'] "; i = groups.length; while ( i-- ) { groups[i] = nid + toSelector( groups[i] ); } newContext = rsibling.test( selector ) && context.parentNode || context; newSelector = groups.join(","); } if ( newSelector ) { try { push.apply( results, slice.call( newContext.querySelectorAll( newSelector ), 0 ) ); return results; } catch(qsaError) { } finally { if ( !old ) { context.removeAttribute("id"); } } } } } // All others return select( selector.replace( rtrim, "$1" ), context, results, seed ); } /** * Detect xml * @param {Element|Object} elem An element or a document */ isXML = Sizzle.isXML = function( elem ) { // documentElement is verified for cases where it doesn't yet exist // (such as loading iframes in IE - #4833) var documentElement = elem && (elem.ownerDocument || elem).documentElement; return documentElement ? documentElement.nodeName !== "HTML" : false; }; /** * Sets document-related variables once based on the current document * @param {Element|Object} [doc] An element or document object to use to set the document * @returns {Object} Returns the current document */ setDocument = Sizzle.setDocument = function( node ) { var doc = node ? node.ownerDocument || node : preferredDoc; // If no document and documentElement is available, return if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { return document; } // Set our document document = doc; docElem = doc.documentElement; // Support tests documentIsXML = isXML( doc ); // Check if getElementsByTagName("*") returns only elements support.tagNameNoComments = assert(function( div ) { div.appendChild( doc.createComment("") ); return !div.getElementsByTagName("*").length; }); // Check if attributes should be retrieved by attribute nodes support.attributes = assert(function( div ) { div.innerHTML = "<select></select>"; var type = typeof div.lastChild.getAttribute("multiple"); // IE8 returns a string for some attributes even when not present return type !== "boolean" && type !== "string"; }); // Check if getElementsByClassName can be trusted support.getByClassName = assert(function( div ) { // Opera can't find a second classname (in 9.6) div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>"; if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) { return false; } // Safari 3.2 caches class attributes and doesn't catch changes div.lastChild.className = "e"; return div.getElementsByClassName("e").length === 2; }); // Check if getElementById returns elements by name // Check if getElementsByName privileges form controls or returns elements by ID support.getByName = assert(function( div ) { // Inject content div.id = expando + 0; div.innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>"; docElem.insertBefore( div, docElem.firstChild ); // Test var pass = doc.getElementsByName && // buggy browsers will return fewer than the correct 2 doc.getElementsByName( expando ).length === 2 + // buggy browsers will return more than the correct 0 doc.getElementsByName( expando + 0 ).length; support.getIdNotName = !doc.getElementById( expando ); // Cleanup docElem.removeChild( div ); return pass; }); // IE6/7 return modified attributes Expr.attrHandle = assert(function( div ) { div.innerHTML = "<a href='#'></a>"; return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && div.firstChild.getAttribute("href") === "#"; }) ? {} : { "href": function( elem ) { return elem.getAttribute( "href", 2 ); }, "type": function( elem ) { return elem.getAttribute("type"); } }; // ID find and filter if ( support.getIdNotName ) { Expr.find["ID"] = function( id, context ) { if ( typeof context.getElementById !== strundefined && !documentIsXML ) { var m = context.getElementById( id ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 return m && m.parentNode ? [m] : []; } }; Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { return elem.getAttribute("id") === attrId; }; }; } else { Expr.find["ID"] = function( id, context ) { if ( typeof context.getElementById !== strundefined && !documentIsXML ) { var m = context.getElementById( id ); return m ? m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? [m] : undefined : []; } }; Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); return node && node.value === attrId; }; }; } // Tag Expr.find["TAG"] = support.tagNameNoComments ? function( tag, context ) { if ( typeof context.getElementsByTagName !== strundefined ) { return context.getElementsByTagName( tag ); } } : function( tag, context ) { var elem, tmp = [], i = 0, results = context.getElementsByTagName( tag ); // Filter out possible comments if ( tag === "*" ) { while ( (elem = results[i++]) ) { if ( elem.nodeType === 1 ) { tmp.push( elem ); } } return tmp; } return results; }; // Name Expr.find["NAME"] = support.getByName && function( tag, context ) { if ( typeof context.getElementsByName !== strundefined ) { return context.getElementsByName( name ); } }; // Class Expr.find["CLASS"] = support.getByClassName && function( className, context ) { if ( typeof context.getElementsByClassName !== strundefined && !documentIsXML ) { return context.getElementsByClassName( className ); } }; // QSA and matchesSelector support // matchesSelector(:active) reports false when true (IE9/Opera 11.5) rbuggyMatches = []; // qSa(:focus) reports false when true (Chrome 21), // no need to also add to buggyMatches since matches checks buggyQSA // A support test would require too much code (would include document ready) rbuggyQSA = [ ":focus" ]; if ( (support.qsa = isNative(doc.querySelectorAll)) ) { // Build QSA regex // Regex strategy adopted from Diego Perini assert(function( div ) { // Select is set to empty string on purpose // This is to test IE's treatment of not explictly // setting a boolean content attribute, // since its presence should be enough // http://bugs.jquery.com/ticket/12359 div.innerHTML = "<select><option selected=''></option></select>"; // IE8 - Some boolean attributes are not treated correctly if ( !div.querySelectorAll("[selected]").length ) { rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); } // Webkit/Opera - :checked should return selected option elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked // IE8 throws error here and will not see later tests if ( !div.querySelectorAll(":checked").length ) { rbuggyQSA.push(":checked"); } }); assert(function( div ) { // Opera 10-12/IE8 - ^= $= *= and empty values // Should not select anything div.innerHTML = "<input type='hidden' i=''/>"; if ( div.querySelectorAll("[i^='']").length ) { rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); } // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) // IE8 throws error here and will not see later tests if ( !div.querySelectorAll(":enabled").length ) { rbuggyQSA.push( ":enabled", ":disabled" ); } // Opera 10-11 does not throw on post-comma invalid pseudos div.querySelectorAll("*,:x"); rbuggyQSA.push(",.*:"); }); } if ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector || docElem.mozMatchesSelector || docElem.webkitMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector) )) ) { assert(function( div ) { // Check to see if it's possible to do matchesSelector // on a disconnected node (IE 9) support.disconnectedMatch = matches.call( div, "div" ); // This should fail with an exception // Gecko does not error, returns false instead matches.call( div, "[s!='']:x" ); rbuggyMatches.push( "!=", pseudos ); }); } rbuggyQSA = new RegExp( rbuggyQSA.join("|") ); rbuggyMatches = new RegExp( rbuggyMatches.join("|") ); // Element contains another // Purposefully does not implement inclusive descendent // As in, an element does not contain itself contains = isNative(docElem.contains) || docElem.compareDocumentPosition ? function( a, b ) { var adown = a.nodeType === 9 ? a.documentElement : a, bup = b && b.parentNode; return a === bup || !!( bup && bup.nodeType === 1 && ( adown.contains ? adown.contains( bup ) : a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 )); } : function( a, b ) { if ( b ) { while ( (b = b.parentNode) ) { if ( b === a ) { return true; } } } return false; }; // Document order sorting sortOrder = docElem.compareDocumentPosition ? function( a, b ) { var compare; if ( a === b ) { hasDuplicate = true; return 0; } if ( (compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b )) ) { if ( compare & 1 || a.parentNode && a.parentNode.nodeType === 11 ) { if ( a === doc || contains( preferredDoc, a ) ) { return -1; } if ( b === doc || contains( preferredDoc, b ) ) { return 1; } return 0; } return compare & 4 ? -1 : 1; } return a.compareDocumentPosition ? -1 : 1; } : function( a, b ) { var cur, i = 0, aup = a.parentNode, bup = b.parentNode, ap = [ a ], bp = [ b ]; // Exit early if the nodes are identical if ( a === b ) { hasDuplicate = true; return 0; // Parentless nodes are either documents or disconnected } else if ( !aup || !bup ) { return a === doc ? -1 : b === doc ? 1 : aup ? -1 : bup ? 1 : 0; // If the nodes are siblings, we can do a quick check } else if ( aup === bup ) { return siblingCheck( a, b ); } // Otherwise we need full lists of their ancestors for comparison cur = a; while ( (cur = cur.parentNode) ) { ap.unshift( cur ); } cur = b; while ( (cur = cur.parentNode) ) { bp.unshift( cur ); } // Walk down the tree looking for a discrepancy while ( ap[i] === bp[i] ) { i++; } return i ? // Do a sibling check if the nodes have a common ancestor siblingCheck( ap[i], bp[i] ) : // Otherwise nodes in our document sort first ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0; }; // Always assume the presence of duplicates if sort doesn't // pass them to our comparison function (as in Google Chrome). hasDuplicate = false; [0, 0].sort( sortOrder ); support.detectDuplicates = hasDuplicate; return document; }; Sizzle.matches = function( expr, elements ) { return Sizzle( expr, null, null, elements ); }; Sizzle.matchesSelector = function( elem, expr ) { // Set document vars if needed if ( ( elem.ownerDocument || elem ) !== document ) { setDocument( elem ); } // Make sure that attribute selectors are quoted expr = expr.replace( rattributeQuotes, "='$1']" ); // rbuggyQSA always contains :focus, so no need for an existence check if ( support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) { try { var ret = matches.call( elem, expr ); // IE 9's matchesSelector returns false on disconnected nodes if ( ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document // fragment in IE 9 elem.document && elem.document.nodeType !== 11 ) { return ret; } } catch(e) {} } return Sizzle( expr, document, null, [elem] ).length > 0; }; Sizzle.contains = function( context, elem ) { // Set document vars if needed if ( ( context.ownerDocument || context ) !== document ) { setDocument( context ); } return contains( context, elem ); }; Sizzle.attr = function( elem, name ) { var val; // Set document vars if needed if ( ( elem.ownerDocument || elem ) !== document ) { setDocument( elem ); } if ( !documentIsXML ) { name = name.toLowerCase(); } if ( (val = Expr.attrHandle[ name ]) ) { return val( elem ); } if ( documentIsXML || support.attributes ) { return elem.getAttribute( name ); } return ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ? name : val && val.specified ? val.value : null; }; Sizzle.error = function( msg ) { throw new Error( "Syntax error, unrecognized expression: " + msg ); }; // Document sorting and removing duplicates Sizzle.uniqueSort = function( results ) { var elem, duplicates = [], i = 1, j = 0; // Unless we *know* we can detect duplicates, assume their presence hasDuplicate = !support.detectDuplicates; results.sort( sortOrder ); if ( hasDuplicate ) { for ( ; (elem = results[i]); i++ ) { if ( elem === results[ i - 1 ] ) { j = duplicates.push( i ); } } while ( j-- ) { results.splice( duplicates[ j ], 1 ); } } return results; }; function siblingCheck( a, b ) { var cur = b && a, diff = cur && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE ); // Use IE sourceIndex if available on both nodes if ( diff ) { return diff; } // Check if b follows a if ( cur ) { while ( (cur = cur.nextSibling) ) { if ( cur === b ) { return -1; } } } return a ? 1 : -1; } // Returns a function to use in pseudos for input types function createInputPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === type; }; } // Returns a function to use in pseudos for buttons function createButtonPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); return (name === "input" || name === "button") && elem.type === type; }; } // Returns a function to use in pseudos for positionals function createPositionalPseudo( fn ) { return markFunction(function( argument ) { argument = +argument; return markFunction(function( seed, matches ) { var j, matchIndexes = fn( [], seed.length, argument ), i = matchIndexes.length; // Match elements found at the specified indexes while ( i-- ) { if ( seed[ (j = matchIndexes[i]) ] ) { seed[j] = !(matches[j] = seed[j]); } } }); }); } /** * Utility function for retrieving the text value of an array of DOM nodes * @param {Array|Element} elem */ getText = Sizzle.getText = function( elem ) { var node, ret = "", i = 0, nodeType = elem.nodeType; if ( !nodeType ) { // If no nodeType, this is expected to be an array for ( ; (node = elem[i]); i++ ) { // Do not traverse comment nodes ret += getText( node ); } } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { // Use textContent for elements // innerText usage removed for consistency of new lines (see #11153) if ( typeof elem.textContent === "string" ) { return elem.textContent; } else { // Traverse its children for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { ret += getText( elem ); } } } else if ( nodeType === 3 || nodeType === 4 ) { return elem.nodeValue; } // Do not include comment or processing instruction nodes return ret; }; Expr = Sizzle.selectors = { // Can be adjusted by the user cacheLength: 50, createPseudo: markFunction, match: matchExpr, find: {}, relative: { ">": { dir: "parentNode", first: true }, " ": { dir: "parentNode" }, "+": { dir: "previousSibling", first: true }, "~": { dir: "previousSibling" } }, preFilter: { "ATTR": function( match ) { match[1] = match[1].replace( runescape, funescape ); // Move the given value to match[3] whether quoted or unquoted match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); if ( match[2] === "~=" ) { match[3] = " " + match[3] + " "; } return match.slice( 0, 4 ); }, "CHILD": function( match ) { /* matches from matchExpr["CHILD"] 1 type (only|nth|...) 2 what (child|of-type) 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 4 xn-component of xn+y argument ([+-]?\d*n|) 5 sign of xn-component 6 x of xn-component 7 sign of y-component 8 y of y-component */ match[1] = match[1].toLowerCase(); if ( match[1].slice( 0, 3 ) === "nth" ) { // nth-* requires argument if ( !match[3] ) { Sizzle.error( match[0] ); } // numeric x and y parameters for Expr.filter.CHILD // remember that false/true cast respectively to 0/1 match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); // other types prohibit arguments } else if ( match[3] ) { Sizzle.error( match[0] ); } return match; }, "PSEUDO": function( match ) { var excess, unquoted = !match[5] && match[2]; if ( matchExpr["CHILD"].test( match[0] ) ) { return null; } // Accept quoted arguments as-is if ( match[4] ) { match[2] = match[4]; // Strip excess characters from unquoted arguments } else if ( unquoted && rpseudo.test( unquoted ) && // Get excess from tokenize (recursively) (excess = tokenize( unquoted, true )) && // advance to the next closing parenthesis (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { // excess is a negative index match[0] = match[0].slice( 0, excess ); match[2] = unquoted.slice( 0, excess ); } // Return only captures needed by the pseudo filter method (type and argument) return match.slice( 0, 3 ); } }, filter: { "TAG": function( nodeName ) { if ( nodeName === "*" ) { return function() { return true; }; } nodeName = nodeName.replace( runescape, funescape ).toLowerCase(); return function( elem ) { return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; }; }, "CLASS": function( className ) { var pattern = classCache[ className + " " ]; return pattern || (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && classCache( className, function( elem ) { return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); }); }, "ATTR": function( name, operator, check ) { return function( elem ) { var result = Sizzle.attr( elem, name ); if ( result == null ) { return operator === "!="; } if ( !operator ) { return true; } result += ""; return operator === "=" ? result === check : operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf( check ) === 0 : operator === "*=" ? check && result.indexOf( check ) > -1 : operator === "$=" ? check && result.slice( -check.length ) === check : operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : false; }; }, "CHILD": function( type, what, argument, first, last ) { var simple = type.slice( 0, 3 ) !== "nth", forward = type.slice( -4 ) !== "last", ofType = what === "of-type"; return first === 1 && last === 0 ? // Shortcut for :nth-*(n) function( elem ) { return !!elem.parentNode; } : function( elem, context, xml ) { var cache, outerCache, node, diff, nodeIndex, start, dir = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType; if ( parent ) { // :(first|last|only)-(child|of-type) if ( simple ) { while ( dir ) { node = elem; while ( (node = node[ dir ]) ) { if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { return false; } } // Reverse direction for :only-* (if we haven't yet done so) start = dir = type === "only" && !start && "nextSibling"; } return true; } start = [ forward ? parent.firstChild : parent.lastChild ]; // non-xml :nth-child(...) stores cache data on `parent` if ( forward && useCache ) { // Seek `elem` from a previously-cached index outerCache = parent[ expando ] || (parent[ expando ] = {}); cache = outerCache[ type ] || []; nodeIndex = cache[0] === dirruns && cache[1]; diff = cache[0] === dirruns && cache[2]; node = nodeIndex && parent.childNodes[ nodeIndex ]; while ( (node = ++nodeIndex && node && node[ dir ] || // Fallback to seeking `elem` from the start (diff = nodeIndex = 0) || start.pop()) ) { // When found, cache indexes on `parent` and break if ( node.nodeType === 1 && ++diff && node === elem ) { outerCache[ type ] = [ dirruns, nodeIndex, diff ]; break; } } // Use previously-cached element index if available } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { diff = cache[1]; // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) } else { // Use the same loop as above to seek `elem` from the start while ( (node = ++nodeIndex && node && node[ dir ] || (diff = nodeIndex = 0) || start.pop()) ) { if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { // Cache the index of each encountered element if ( useCache ) { (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; } if ( node === elem ) { break; } } } } // Incorporate the offset, then check against cycle size diff -= last; return diff === first || ( diff % first === 0 && diff / first >= 0 ); } }; }, "PSEUDO": function( pseudo, argument ) { // pseudo-class names are case-insensitive // http://www.w3.org/TR/selectors/#pseudo-classes // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters // Remember that setFilters inherits from pseudos var args, fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || Sizzle.error( "unsupported pseudo: " + pseudo ); // The user may use createPseudo to indicate that // arguments are needed to create the filter function // just as Sizzle does if ( fn[ expando ] ) { return fn( argument ); } // But maintain support for old signatures if ( fn.length > 1 ) { args = [ pseudo, pseudo, "", argument ]; return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? markFunction(function( seed, matches ) { var idx, matched = fn( seed, argument ), i = matched.length; while ( i-- ) { idx = indexOf.call( seed, matched[i] ); seed[ idx ] = !( matches[ idx ] = matched[i] ); } }) : function( elem ) { return fn( elem, 0, args ); }; } return fn; } }, pseudos: { // Potentially complex pseudos "not": markFunction(function( selector ) { // Trim the selector passed to compile // to avoid treating leading and trailing // spaces as combinators var input = [], results = [], matcher = compile( selector.replace( rtrim, "$1" ) ); return matcher[ expando ] ? markFunction(function( seed, matches, context, xml ) { var elem, unmatched = matcher( seed, null, xml, [] ), i = seed.length; // Match elements unmatched by `matcher` while ( i-- ) { if ( (elem = unmatched[i]) ) { seed[i] = !(matches[i] = elem); } } }) : function( elem, context, xml ) { input[0] = elem; matcher( input, null, xml, results ); return !results.pop(); }; }), "has": markFunction(function( selector ) { return function( elem ) { return Sizzle( selector, elem ).length > 0; }; }), "contains": markFunction(function( text ) { return function( elem ) { return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; }; }), // "Whether an element is represented by a :lang() selector // is based solely on the element's language value // being equal to the identifier C, // or beginning with the identifier C immediately followed by "-". // The matching of C against the element's language value is performed case-insensitively. // The identifier C does not have to be a valid language name." // http://www.w3.org/TR/selectors/#lang-pseudo "lang": markFunction( function( lang ) { // lang value must be a valid identifider if ( !ridentifier.test(lang || "") ) { Sizzle.error( "unsupported lang: " + lang ); } lang = lang.replace( runescape, funescape ).toLowerCase(); return function( elem ) { var elemLang; do { if ( (elemLang = documentIsXML ? elem.getAttribute("xml:lang") || elem.getAttribute("lang") : elem.lang) ) { elemLang = elemLang.toLowerCase(); return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; } } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); return false; }; }), // Miscellaneous "target": function( elem ) { var hash = window.location && window.location.hash; return hash && hash.slice( 1 ) === elem.id; }, "root": function( elem ) { return elem === docElem; }, "focus": function( elem ) { return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); }, // Boolean properties "enabled": function( elem ) { return elem.disabled === false; }, "disabled": function( elem ) { return elem.disabled === true; }, "checked": function( elem ) { // In CSS3, :checked should return both checked and selected elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked var nodeName = elem.nodeName.toLowerCase(); return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); }, "selected": function( elem ) { // Accessing this property makes selected-by-default // options in Safari work properly if ( elem.parentNode ) { elem.parentNode.selectedIndex; } return elem.selected === true; }, // Contents "empty": function( elem ) { // http://www.w3.org/TR/selectors/#empty-pseudo // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), // not comment, processing instructions, or others // Thanks to Diego Perini for the nodeName shortcut // Greater than "@" means alpha characters (specifically not starting with "#" or "?") for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { return false; } } return true; }, "parent": function( elem ) { return !Expr.pseudos["empty"]( elem ); }, // Element/input types "header": function( elem ) { return rheader.test( elem.nodeName ); }, "input": function( elem ) { return rinputs.test( elem.nodeName ); }, "button": function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === "button" || name === "button"; }, "text": function( elem ) { var attr; // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) // use getAttribute instead to test this case return elem.nodeName.toLowerCase() === "input" && elem.type === "text" && ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); }, // Position-in-collection "first": createPositionalPseudo(function() { return [ 0 ]; }), "last": createPositionalPseudo(function( matchIndexes, length ) { return [ length - 1 ]; }), "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { return [ argument < 0 ? argument + length : argument ]; }), "even": createPositionalPseudo(function( matchIndexes, length ) { var i = 0; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; }), "odd": createPositionalPseudo(function( matchIndexes, length ) { var i = 1; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; }), "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; --i >= 0; ) { matchIndexes.push( i ); } return matchIndexes; }), "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; ++i < length; ) { matchIndexes.push( i ); } return matchIndexes; }) } }; // Add button/input type pseudos for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { Expr.pseudos[ i ] = createInputPseudo( i ); } for ( i in { submit: true, reset: true } ) { Expr.pseudos[ i ] = createButtonPseudo( i ); } function tokenize( selector, parseOnly ) { var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[ selector + " " ]; if ( cached ) { return parseOnly ? 0 : cached.slice( 0 ); } soFar = selector; groups = []; preFilters = Expr.preFilter; while ( soFar ) { // Comma and first run if ( !matched || (match = rcomma.exec( soFar )) ) { if ( match ) { // Don't consume trailing commas as valid soFar = soFar.slice( match[0].length ) || soFar; } groups.push( tokens = [] ); } matched = false; // Combinators if ( (match = rcombinators.exec( soFar )) ) { matched = match.shift(); tokens.push( { value: matched, // Cast descendant combinators to space type: match[0].replace( rtrim, " " ) } ); soFar = soFar.slice( matched.length ); } // Filters for ( type in Expr.filter ) { if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || (match = preFilters[ type ]( match ))) ) { matched = match.shift(); tokens.push( { value: matched, type: type, matches: match } ); soFar = soFar.slice( matched.length ); } } if ( !matched ) { break; } } // Return the length of the invalid excess // if we're just parsing // Otherwise, throw an error or return tokens return parseOnly ? soFar.length : soFar ? Sizzle.error( selector ) : // Cache the tokens tokenCache( selector, groups ).slice( 0 ); } function toSelector( tokens ) { var i = 0, len = tokens.length, selector = ""; for ( ; i < len; i++ ) { selector += tokens[i].value; } return selector; } function addCombinator( matcher, combinator, base ) { var dir = combinator.dir, checkNonElements = base && dir === "parentNode", doneName = done++; return combinator.first ? // Check against closest ancestor/preceding element function( elem, context, xml ) { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { return matcher( elem, context, xml ); } } } : // Check against all ancestor/preceding elements function( elem, context, xml ) { var data, cache, outerCache, dirkey = dirruns + " " + doneName; // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching if ( xml ) { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { if ( matcher( elem, context, xml ) ) { return true; } } } } else { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { outerCache = elem[ expando ] || (elem[ expando ] = {}); if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { if ( (data = cache[1]) === true || data === cachedruns ) { return data === true; } } else { cache = outerCache[ dir ] = [ dirkey ]; cache[1] = matcher( elem, context, xml ) || cachedruns; if ( cache[1] === true ) { return true; } } } } } }; } function elementMatcher( matchers ) { return matchers.length > 1 ? function( elem, context, xml ) { var i = matchers.length; while ( i-- ) { if ( !matchers[i]( elem, context, xml ) ) { return false; } } return true; } : matchers[0]; } function condense( unmatched, map, filter, context, xml ) { var elem, newUnmatched = [], i = 0, len = unmatched.length, mapped = map != null; for ( ; i < len; i++ ) { if ( (elem = unmatched[i]) ) { if ( !filter || filter( elem, context, xml ) ) { newUnmatched.push( elem ); if ( mapped ) { map.push( i ); } } } } return newUnmatched; } function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { if ( postFilter && !postFilter[ expando ] ) { postFilter = setMatcher( postFilter ); } if ( postFinder && !postFinder[ expando ] ) { postFinder = setMatcher( postFinder, postSelector ); } return markFunction(function( seed, results, context, xml ) { var temp, i, elem, preMap = [], postMap = [], preexisting = results.length, // Get initial elements from seed or context elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), // Prefilter to get matcher input, preserving a map for seed-results synchronization matcherIn = preFilter && ( seed || !selector ) ? condense( elems, preMap, preFilter, context, xml ) : elems, matcherOut = matcher ? // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, postFinder || ( seed ? preFilter : preexisting || postFilter ) ? // ...intermediate processing is necessary [] : // ...otherwise use results directly results : matcherIn; // Find primary matches if ( matcher ) { matcher( matcherIn, matcherOut, context, xml ); } // Apply postFilter if ( postFilter ) { temp = condense( matcherOut, postMap ); postFilter( temp, [], context, xml ); // Un-match failing elements by moving them back to matcherIn i = temp.length; while ( i-- ) { if ( (elem = temp[i]) ) { matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); } } } if ( seed ) { if ( postFinder || preFilter ) { if ( postFinder ) { // Get the final matcherOut by condensing this intermediate into postFinder contexts temp = []; i = matcherOut.length; while ( i-- ) { if ( (elem = matcherOut[i]) ) { // Restore matcherIn since elem is not yet a final match temp.push( (matcherIn[i] = elem) ); } } postFinder( null, (matcherOut = []), temp, xml ); } // Move matched elements from seed to results to keep them synchronized i = matcherOut.length; while ( i-- ) { if ( (elem = matcherOut[i]) && (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { seed[temp] = !(results[temp] = elem); } } } // Add elements to results, through postFinder if defined } else { matcherOut = condense( matcherOut === results ? matcherOut.splice( preexisting, matcherOut.length ) : matcherOut ); if ( postFinder ) { postFinder( null, results, matcherOut, xml ); } else { push.apply( results, matcherOut ); } } }); } function matcherFromTokens( tokens ) { var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[ tokens[0].type ], implicitRelative = leadingRelative || Expr.relative[" "], i = leadingRelative ? 1 : 0, // The foundational matcher ensures that elements are reachable from top-level context(s) matchContext = addCombinator( function( elem ) { return elem === checkContext; }, implicitRelative, true ), matchAnyContext = addCombinator( function( elem ) { return indexOf.call( checkContext, elem ) > -1; }, implicitRelative, true ), matchers = [ function( elem, context, xml ) { return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( (checkContext = context).nodeType ? matchContext( elem, context, xml ) : matchAnyContext( elem, context, xml ) ); } ]; for ( ; i < len; i++ ) { if ( (matcher = Expr.relative[ tokens[i].type ]) ) { matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; } else { matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); // Return special upon seeing a positional matcher if ( matcher[ expando ] ) { // Find the next relative operator (if any) for proper handling j = ++i; for ( ; j < len; j++ ) { if ( Expr.relative[ tokens[j].type ] ) { break; } } return setMatcher( i > 1 && elementMatcher( matchers ), i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ), matcher, i < j && matcherFromTokens( tokens.slice( i, j ) ), j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), j < len && toSelector( tokens ) ); } matchers.push( matcher ); } } return elementMatcher( matchers ); } function matcherFromGroupMatchers( elementMatchers, setMatchers ) { // A counter to specify which element is currently being matched var matcherCachedRuns = 0, bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function( seed, context, xml, results, expandContext ) { var elem, j, matcher, setMatched = [], matchedCount = 0, i = "0", unmatched = seed && [], outermost = expandContext != null, contextBackup = outermostContext, // We must always have either seed elements or context elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), // Use integer dirruns iff this is the outermost matcher dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); if ( outermost ) { outermostContext = context !== document && context; cachedruns = matcherCachedRuns; } // Add elements passing elementMatchers directly to results // Keep `i` a string if there are no elements so `matchedCount` will be "00" below for ( ; (elem = elems[i]) != null; i++ ) { if ( byElement && elem ) { j = 0; while ( (matcher = elementMatchers[j++]) ) { if ( matcher( elem, context, xml ) ) { results.push( elem ); break; } } if ( outermost ) { dirruns = dirrunsUnique; cachedruns = ++matcherCachedRuns; } } // Track unmatched elements for set filters if ( bySet ) { // They will have gone through all possible matchers if ( (elem = !matcher && elem) ) { matchedCount--; } // Lengthen the array for every element, matched or not if ( seed ) { unmatched.push( elem ); } } } // Apply set filters to unmatched elements matchedCount += i; if ( bySet && i !== matchedCount ) { j = 0; while ( (matcher = setMatchers[j++]) ) { matcher( unmatched, setMatched, context, xml ); } if ( seed ) { // Reintegrate element matches to eliminate the need for sorting if ( matchedCount > 0 ) { while ( i-- ) { if ( !(unmatched[i] || setMatched[i]) ) { setMatched[i] = pop.call( results ); } } } // Discard index placeholder values to get only actual matches setMatched = condense( setMatched ); } // Add matches to results push.apply( results, setMatched ); // Seedless set matches succeeding multiple successful matchers stipulate sorting if ( outermost && !seed && setMatched.length > 0 && ( matchedCount + setMatchers.length ) > 1 ) { Sizzle.uniqueSort( results ); } } // Override manipulation of globals by nested matchers if ( outermost ) { dirruns = dirrunsUnique; outermostContext = contextBackup; } return unmatched; }; return bySet ? markFunction( superMatcher ) : superMatcher; } compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { var i, setMatchers = [], elementMatchers = [], cached = compilerCache[ selector + " " ]; if ( !cached ) { // Generate a function of recursive functions that can be used to check each element if ( !group ) { group = tokenize( selector ); } i = group.length; while ( i-- ) { cached = matcherFromTokens( group[i] ); if ( cached[ expando ] ) { setMatchers.push( cached ); } else { elementMatchers.push( cached ); } } // Cache the compiled function cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); } return cached; }; function multipleContexts( selector, contexts, results ) { var i = 0, len = contexts.length; for ( ; i < len; i++ ) { Sizzle( selector, contexts[i], results ); } return results; } function select( selector, context, results, seed ) { var i, tokens, token, type, find, match = tokenize( selector ); if ( !seed ) { // Try to minimize operations if there is only one group if ( match.length === 1 ) { // Take a shortcut and set the context if the root selector is an ID tokens = match[0] = match[0].slice( 0 ); if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && context.nodeType === 9 && !documentIsXML && Expr.relative[ tokens[1].type ] ) { context = Expr.find["ID"]( token.matches[0].replace( runescape, funescape ), context )[0]; if ( !context ) { return results; } selector = selector.slice( tokens.shift().value.length ); } // Fetch a seed set for right-to-left matching i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; while ( i-- ) { token = tokens[i]; // Abort if we hit a combinator if ( Expr.relative[ (type = token.type) ] ) { break; } if ( (find = Expr.find[ type ]) ) { // Search, expanding context for leading sibling combinators if ( (seed = find( token.matches[0].replace( runescape, funescape ), rsibling.test( tokens[0].type ) && context.parentNode || context )) ) { // If seed is empty or no tokens remain, we can return early tokens.splice( i, 1 ); selector = seed.length && toSelector( tokens ); if ( !selector ) { push.apply( results, slice.call( seed, 0 ) ); return results; } break; } } } } } // Compile and execute a filtering function // Provide `match` to avoid retokenization if we modified the selector above compile( selector, match )( seed, context, documentIsXML, results, rsibling.test( selector ) ); return results; } // Deprecated Expr.pseudos["nth"] = Expr.pseudos["eq"]; // Easy API for creating new setFilters function setFilters() {} Expr.filters = setFilters.prototype = Expr.pseudos; Expr.setFilters = new setFilters(); // Initialize with the default document setDocument(); // Override sizzle attribute retrieval Sizzle.attr = jQuery.attr; jQuery.find = Sizzle; jQuery.expr = Sizzle.selectors; jQuery.expr[":"] = jQuery.expr.pseudos; jQuery.unique = Sizzle.uniqueSort; jQuery.text = Sizzle.getText; jQuery.isXMLDoc = Sizzle.isXML; jQuery.contains = Sizzle.contains; })( window ); var runtil = /Until$/, rparentsprev = /^(?:parents|prev(?:Until|All))/, isSimple = /^.[^:#\[\.,]*$/, rneedsContext = jQuery.expr.match.needsContext, // methods guaranteed to produce a unique set when starting from a unique set guaranteedUnique = { children: true, contents: true, next: true, prev: true }; jQuery.fn.extend({ find: function( selector ) { var i, ret, self, len = this.length; if ( typeof selector !== "string" ) { self = this; return this.pushStack( jQuery( selector ).filter(function() { for ( i = 0; i < len; i++ ) { if ( jQuery.contains( self[ i ], this ) ) { return true; } } }) ); } ret = []; for ( i = 0; i < len; i++ ) { jQuery.find( selector, this[ i ], ret ); } // Needed because $( selector, context ) becomes $( context ).find( selector ) ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); ret.selector = ( this.selector ? this.selector + " " : "" ) + selector; return ret; }, has: function( target ) { var i, targets = jQuery( target, this ), len = targets.length; return this.filter(function() { for ( i = 0; i < len; i++ ) { if ( jQuery.contains( this, targets[i] ) ) { return true; } } }); }, not: function( selector ) { return this.pushStack( winnow(this, selector, false) ); }, filter: function( selector ) { return this.pushStack( winnow(this, selector, true) ); }, is: function( selector ) { return !!selector && ( typeof selector === "string" ? // If this is a positional/relative selector, check membership in the returned set // so $("p:first").is("p:last") won't return true for a doc with two "p". rneedsContext.test( selector ) ? jQuery( selector, this.context ).index( this[0] ) >= 0 : jQuery.filter( selector, this ).length > 0 : this.filter( selector ).length > 0 ); }, closest: function( selectors, context ) { var cur, i = 0, l = this.length, ret = [], pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? jQuery( selectors, context || this.context ) : 0; for ( ; i < l; i++ ) { cur = this[i]; while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) { if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { ret.push( cur ); break; } cur = cur.parentNode; } } return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); }, // Determine the position of an element within // the matched set of elements index: function( elem ) { // No argument, return index in parent if ( !elem ) { return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; } // index in selector if ( typeof elem === "string" ) { return jQuery.inArray( this[0], jQuery( elem ) ); } // Locate the position of the desired element return jQuery.inArray( // If it receives a jQuery object, the first element is used elem.jquery ? elem[0] : elem, this ); }, add: function( selector, context ) { var set = typeof selector === "string" ? jQuery( selector, context ) : jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), all = jQuery.merge( this.get(), set ); return this.pushStack( jQuery.unique(all) ); }, addBack: function( selector ) { return this.add( selector == null ? this.prevObject : this.prevObject.filter(selector) ); } }); jQuery.fn.andSelf = jQuery.fn.addBack; function sibling( cur, dir ) { do { cur = cur[ dir ]; } while ( cur && cur.nodeType !== 1 ); return cur; } jQuery.each({ parent: function( elem ) { var parent = elem.parentNode; return parent && parent.nodeType !== 11 ? parent : null; }, parents: function( elem ) { return jQuery.dir( elem, "parentNode" ); }, parentsUntil: function( elem, i, until ) { return jQuery.dir( elem, "parentNode", until ); }, next: function( elem ) { return sibling( elem, "nextSibling" ); }, prev: function( elem ) { return sibling( elem, "previousSibling" ); }, nextAll: function( elem ) { return jQuery.dir( elem, "nextSibling" ); }, prevAll: function( elem ) { return jQuery.dir( elem, "previousSibling" ); }, nextUntil: function( elem, i, until ) { return jQuery.dir( elem, "nextSibling", until ); }, prevUntil: function( elem, i, until ) { return jQuery.dir( elem, "previousSibling", until ); }, siblings: function( elem ) { return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); }, children: function( elem ) { return jQuery.sibling( elem.firstChild ); }, contents: function( elem ) { return jQuery.nodeName( elem, "iframe" ) ? elem.contentDocument || elem.contentWindow.document : jQuery.merge( [], elem.childNodes ); } }, function( name, fn ) { jQuery.fn[ name ] = function( until, selector ) { var ret = jQuery.map( this, fn, until ); if ( !runtil.test( name ) ) { selector = until; } if ( selector && typeof selector === "string" ) { ret = jQuery.filter( selector, ret ); } ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; if ( this.length > 1 && rparentsprev.test( name ) ) { ret = ret.reverse(); } return this.pushStack( ret ); }; }); jQuery.extend({ filter: function( expr, elems, not ) { if ( not ) { expr = ":not(" + expr + ")"; } return elems.length === 1 ? jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : jQuery.find.matches(expr, elems); }, dir: function( elem, dir, until ) { var matched = [], cur = elem[ dir ]; while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { if ( cur.nodeType === 1 ) { matched.push( cur ); } cur = cur[dir]; } return matched; }, sibling: function( n, elem ) { var r = []; for ( ; n; n = n.nextSibling ) { if ( n.nodeType === 1 && n !== elem ) { r.push( n ); } } return r; } }); // Implement the identical functionality for filter and not function winnow( elements, qualifier, keep ) { // Can't pass null or undefined to indexOf in Firefox 4 // Set to 0 to skip string check qualifier = qualifier || 0; if ( jQuery.isFunction( qualifier ) ) { return jQuery.grep(elements, function( elem, i ) { var retVal = !!qualifier.call( elem, i, elem ); return retVal === keep; }); } else if ( qualifier.nodeType ) { return jQuery.grep(elements, function( elem ) { return ( elem === qualifier ) === keep; }); } else if ( typeof qualifier === "string" ) { var filtered = jQuery.grep(elements, function( elem ) { return elem.nodeType === 1; }); if ( isSimple.test( qualifier ) ) { return jQuery.filter(qualifier, filtered, !keep); } else { qualifier = jQuery.filter( qualifier, filtered ); } } return jQuery.grep(elements, function( elem ) { return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; }); } function createSafeFragment( document ) { var list = nodeNames.split( "|" ), safeFrag = document.createDocumentFragment(); if ( safeFrag.createElement ) { while ( list.length ) { safeFrag.createElement( list.pop() ); } } return safeFrag; } var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), rleadingWhitespace = /^\s+/, rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, rtagName = /<([\w:]+)/, rtbody = /<tbody/i, rhtml = /<|&#?\w+;/, rnoInnerhtml = /<(?:script|style|link)/i, manipulation_rcheckableType = /^(?:checkbox|radio)$/i, // checked="checked" or checked rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, rscriptType = /^$|\/(?:java|ecma)script/i, rscriptTypeMasked = /^true\/(.*)/, rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, // We have to close these tags to support XHTML (#13200) wrapMap = { option: [ 1, "<select multiple='multiple'>", "</select>" ], legend: [ 1, "<fieldset>", "</fieldset>" ], area: [ 1, "<map>", "</map>" ], param: [ 1, "<object>", "</object>" ], thead: [ 1, "<table>", "</table>" ], tr: [ 2, "<table><tbody>", "</tbody></table>" ], col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, // unless wrapped in a div with non-breaking characters in front of it. _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ] }, safeFragment = createSafeFragment( document ), fragmentDiv = safeFragment.appendChild( document.createElement("div") ); wrapMap.optgroup = wrapMap.option; wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; jQuery.fn.extend({ text: function( value ) { return jQuery.access( this, function( value ) { return value === undefined ? jQuery.text( this ) : this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); }, null, value, arguments.length ); }, wrapAll: function( html ) { if ( jQuery.isFunction( html ) ) { return this.each(function(i) { jQuery(this).wrapAll( html.call(this, i) ); }); } if ( this[0] ) { // The elements to wrap the target around var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); if ( this[0].parentNode ) { wrap.insertBefore( this[0] ); } wrap.map(function() { var elem = this; while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { elem = elem.firstChild; } return elem; }).append( this ); } return this; }, wrapInner: function( html ) { if ( jQuery.isFunction( html ) ) { return this.each(function(i) { jQuery(this).wrapInner( html.call(this, i) ); }); } return this.each(function() { var self = jQuery( this ), contents = self.contents(); if ( contents.length ) { contents.wrapAll( html ); } else { self.append( html ); } }); }, wrap: function( html ) { var isFunction = jQuery.isFunction( html ); return this.each(function(i) { jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); }); }, unwrap: function() { return this.parent().each(function() { if ( !jQuery.nodeName( this, "body" ) ) { jQuery( this ).replaceWith( this.childNodes ); } }).end(); }, append: function() { return this.domManip(arguments, true, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { this.appendChild( elem ); } }); }, prepend: function() { return this.domManip(arguments, true, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { this.insertBefore( elem, this.firstChild ); } }); }, before: function() { return this.domManip( arguments, false, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this ); } }); }, after: function() { return this.domManip( arguments, false, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this.nextSibling ); } }); }, // keepData is for internal use only--do not document remove: function( selector, keepData ) { var elem, i = 0; for ( ; (elem = this[i]) != null; i++ ) { if ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) { if ( !keepData && elem.nodeType === 1 ) { jQuery.cleanData( getAll( elem ) ); } if ( elem.parentNode ) { if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { setGlobalEval( getAll( elem, "script" ) ); } elem.parentNode.removeChild( elem ); } } } return this; }, empty: function() { var elem, i = 0; for ( ; (elem = this[i]) != null; i++ ) { // Remove element nodes and prevent memory leaks if ( elem.nodeType === 1 ) { jQuery.cleanData( getAll( elem, false ) ); } // Remove any remaining nodes while ( elem.firstChild ) { elem.removeChild( elem.firstChild ); } // If this is a select, ensure that it displays empty (#12336) // Support: IE<9 if ( elem.options && jQuery.nodeName( elem, "select" ) ) { elem.options.length = 0; } } return this; }, clone: function( dataAndEvents, deepDataAndEvents ) { dataAndEvents = dataAndEvents == null ? false : dataAndEvents; deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; return this.map( function () { return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); }); }, html: function( value ) { return jQuery.access( this, function( value ) { var elem = this[0] || {}, i = 0, l = this.length; if ( value === undefined ) { return elem.nodeType === 1 ? elem.innerHTML.replace( rinlinejQuery, "" ) : undefined; } // See if we can take a shortcut and just use innerHTML if ( typeof value === "string" && !rnoInnerhtml.test( value ) && ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { value = value.replace( rxhtmlTag, "<$1></$2>" ); try { for (; i < l; i++ ) { // Remove element nodes and prevent memory leaks elem = this[i] || {}; if ( elem.nodeType === 1 ) { jQuery.cleanData( getAll( elem, false ) ); elem.innerHTML = value; } } elem = 0; // If using innerHTML throws an exception, use the fallback method } catch(e) {} } if ( elem ) { this.empty().append( value ); } }, null, value, arguments.length ); }, replaceWith: function( value ) { var isFunc = jQuery.isFunction( value ); // Make sure that the elements are removed from the DOM before they are inserted // this can help fix replacing a parent with child elements if ( !isFunc && typeof value !== "string" ) { value = jQuery( value ).not( this ).detach(); } return this.domManip( [ value ], true, function( elem ) { var next = this.nextSibling, parent = this.parentNode; if ( parent ) { jQuery( this ).remove(); parent.insertBefore( elem, next ); } }); }, detach: function( selector ) { return this.remove( selector, true ); }, domManip: function( args, table, callback ) { // Flatten any nested arrays args = core_concat.apply( [], args ); var first, node, hasScripts, scripts, doc, fragment, i = 0, l = this.length, set = this, iNoClone = l - 1, value = args[0], isFunction = jQuery.isFunction( value ); // We can't cloneNode fragments that contain checked, in WebKit if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { return this.each(function( index ) { var self = set.eq( index ); if ( isFunction ) { args[0] = value.call( this, index, table ? self.html() : undefined ); } self.domManip( args, table, callback ); }); } if ( l ) { fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); first = fragment.firstChild; if ( fragment.childNodes.length === 1 ) { fragment = first; } if ( first ) { table = table && jQuery.nodeName( first, "tr" ); scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); hasScripts = scripts.length; // Use the original fragment for the last item instead of the first because it can end up // being emptied incorrectly in certain situations (#8070). for ( ; i < l; i++ ) { node = fragment; if ( i !== iNoClone ) { node = jQuery.clone( node, true, true ); // Keep references to cloned scripts for later restoration if ( hasScripts ) { jQuery.merge( scripts, getAll( node, "script" ) ); } } callback.call( table && jQuery.nodeName( this[i], "table" ) ? findOrAppend( this[i], "tbody" ) : this[i], node, i ); } if ( hasScripts ) { doc = scripts[ scripts.length - 1 ].ownerDocument; // Reenable scripts jQuery.map( scripts, restoreScript ); // Evaluate executable scripts on first document insertion for ( i = 0; i < hasScripts; i++ ) { node = scripts[ i ]; if ( rscriptType.test( node.type || "" ) && !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { if ( node.src ) { // Hope ajax is available... jQuery.ajax({ url: node.src, type: "GET", dataType: "script", async: false, global: false, "throws": true }); } else { jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); } } } } // Fix #11809: Avoid leaking memory fragment = first = null; } } return this; } }); function findOrAppend( elem, tag ) { return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); } // Replace/restore the type attribute of script elements for safe DOM manipulation function disableScript( elem ) { var attr = elem.getAttributeNode("type"); elem.type = ( attr && attr.specified ) + "/" + elem.type; return elem; } function restoreScript( elem ) { var match = rscriptTypeMasked.exec( elem.type ); if ( match ) { elem.type = match[1]; } else { elem.removeAttribute("type"); } return elem; } // Mark scripts as having already been evaluated function setGlobalEval( elems, refElements ) { var elem, i = 0; for ( ; (elem = elems[i]) != null; i++ ) { jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); } } function cloneCopyEvent( src, dest ) { if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { return; } var type, i, l, oldData = jQuery._data( src ), curData = jQuery._data( dest, oldData ), events = oldData.events; if ( events ) { delete curData.handle; curData.events = {}; for ( type in events ) { for ( i = 0, l = events[ type ].length; i < l; i++ ) { jQuery.event.add( dest, type, events[ type ][ i ] ); } } } // make the cloned public data object a copy from the original if ( curData.data ) { curData.data = jQuery.extend( {}, curData.data ); } } function fixCloneNodeIssues( src, dest ) { var nodeName, e, data; // We do not need to do anything for non-Elements if ( dest.nodeType !== 1 ) { return; } nodeName = dest.nodeName.toLowerCase(); // IE6-8 copies events bound via attachEvent when using cloneNode. if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { data = jQuery._data( dest ); for ( e in data.events ) { jQuery.removeEvent( dest, e, data.handle ); } // Event data gets referenced instead of copied if the expando gets copied too dest.removeAttribute( jQuery.expando ); } // IE blanks contents when cloning scripts, and tries to evaluate newly-set text if ( nodeName === "script" && dest.text !== src.text ) { disableScript( dest ).text = src.text; restoreScript( dest ); // IE6-10 improperly clones children of object elements using classid. // IE10 throws NoModificationAllowedError if parent is null, #12132. } else if ( nodeName === "object" ) { if ( dest.parentNode ) { dest.outerHTML = src.outerHTML; } // This path appears unavoidable for IE9. When cloning an object // element in IE9, the outerHTML strategy above is not sufficient. // If the src has innerHTML and the destination does not, // copy the src.innerHTML into the dest.innerHTML. #10324 if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { dest.innerHTML = src.innerHTML; } } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { // IE6-8 fails to persist the checked state of a cloned checkbox // or radio button. Worse, IE6-7 fail to give the cloned element // a checked appearance if the defaultChecked value isn't also set dest.defaultChecked = dest.checked = src.checked; // IE6-7 get confused and end up setting the value of a cloned // checkbox/radio button to an empty string instead of "on" if ( dest.value !== src.value ) { dest.value = src.value; } // IE6-8 fails to return the selected option to the default selected // state when cloning options } else if ( nodeName === "option" ) { dest.defaultSelected = dest.selected = src.defaultSelected; // IE6-8 fails to set the defaultValue to the correct value when // cloning other types of input fields } else if ( nodeName === "input" || nodeName === "textarea" ) { dest.defaultValue = src.defaultValue; } } jQuery.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function( name, original ) { jQuery.fn[ name ] = function( selector ) { var elems, i = 0, ret = [], insert = jQuery( selector ), last = insert.length - 1; for ( ; i <= last; i++ ) { elems = i === last ? this : this.clone(true); jQuery( insert[i] )[ original ]( elems ); // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() core_push.apply( ret, elems.get() ); } return this.pushStack( ret ); }; }); function getAll( context, tag ) { var elems, elem, i = 0, found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) : undefined; if ( !found ) { for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { if ( !tag || jQuery.nodeName( elem, tag ) ) { found.push( elem ); } else { jQuery.merge( found, getAll( elem, tag ) ); } } } return tag === undefined || tag && jQuery.nodeName( context, tag ) ? jQuery.merge( [ context ], found ) : found; } // Used in buildFragment, fixes the defaultChecked property function fixDefaultChecked( elem ) { if ( manipulation_rcheckableType.test( elem.type ) ) { elem.defaultChecked = elem.checked; } } jQuery.extend({ clone: function( elem, dataAndEvents, deepDataAndEvents ) { var destElements, node, clone, i, srcElements, inPage = jQuery.contains( elem.ownerDocument, elem ); if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { clone = elem.cloneNode( true ); // IE<=8 does not properly clone detached, unknown element nodes } else { fragmentDiv.innerHTML = elem.outerHTML; fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); } if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 destElements = getAll( clone ); srcElements = getAll( elem ); // Fix all IE cloning issues for ( i = 0; (node = srcElements[i]) != null; ++i ) { // Ensure that the destination node is not null; Fixes #9587 if ( destElements[i] ) { fixCloneNodeIssues( node, destElements[i] ); } } } // Copy the events from the original to the clone if ( dataAndEvents ) { if ( deepDataAndEvents ) { srcElements = srcElements || getAll( elem ); destElements = destElements || getAll( clone ); for ( i = 0; (node = srcElements[i]) != null; i++ ) { cloneCopyEvent( node, destElements[i] ); } } else { cloneCopyEvent( elem, clone ); } } // Preserve script evaluation history destElements = getAll( clone, "script" ); if ( destElements.length > 0 ) { setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); } destElements = srcElements = node = null; // Return the cloned set return clone; }, buildFragment: function( elems, context, scripts, selection ) { var j, elem, contains, tmp, tag, tbody, wrap, l = elems.length, // Ensure a safe fragment safe = createSafeFragment( context ), nodes = [], i = 0; for ( ; i < l; i++ ) { elem = elems[ i ]; if ( elem || elem === 0 ) { // Add nodes directly if ( jQuery.type( elem ) === "object" ) { jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); // Convert non-html into a text node } else if ( !rhtml.test( elem ) ) { nodes.push( context.createTextNode( elem ) ); // Convert html into DOM nodes } else { tmp = tmp || safe.appendChild( context.createElement("div") ); // Deserialize a standard representation tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); wrap = wrapMap[ tag ] || wrapMap._default; tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2]; // Descend through wrappers to the right content j = wrap[0]; while ( j-- ) { tmp = tmp.lastChild; } // Manually add leading whitespace removed by IE if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); } // Remove IE's autoinserted <tbody> from table fragments if ( !jQuery.support.tbody ) { // String was a <table>, *may* have spurious <tbody> elem = tag === "table" && !rtbody.test( elem ) ? tmp.firstChild : // String was a bare <thead> or <tfoot> wrap[1] === "<table>" && !rtbody.test( elem ) ? tmp : 0; j = elem && elem.childNodes.length; while ( j-- ) { if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { elem.removeChild( tbody ); } } } jQuery.merge( nodes, tmp.childNodes ); // Fix #12392 for WebKit and IE > 9 tmp.textContent = ""; // Fix #12392 for oldIE while ( tmp.firstChild ) { tmp.removeChild( tmp.firstChild ); } // Remember the top-level container for proper cleanup tmp = safe.lastChild; } } } // Fix #11356: Clear elements from fragment if ( tmp ) { safe.removeChild( tmp ); } // Reset defaultChecked for any radios and checkboxes // about to be appended to the DOM in IE 6/7 (#8060) if ( !jQuery.support.appendChecked ) { jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); } i = 0; while ( (elem = nodes[ i++ ]) ) { // #4087 - If origin and destination elements are the same, and this is // that element, do not do anything if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { continue; } contains = jQuery.contains( elem.ownerDocument, elem ); // Append to fragment tmp = getAll( safe.appendChild( elem ), "script" ); // Preserve script evaluation history if ( contains ) { setGlobalEval( tmp ); } // Capture executables if ( scripts ) { j = 0; while ( (elem = tmp[ j++ ]) ) { if ( rscriptType.test( elem.type || "" ) ) { scripts.push( elem ); } } } } tmp = null; return safe; }, cleanData: function( elems, /* internal */ acceptData ) { var elem, type, id, data, i = 0, internalKey = jQuery.expando, cache = jQuery.cache, deleteExpando = jQuery.support.deleteExpando, special = jQuery.event.special; for ( ; (elem = elems[i]) != null; i++ ) { if ( acceptData || jQuery.acceptData( elem ) ) { id = elem[ internalKey ]; data = id && cache[ id ]; if ( data ) { if ( data.events ) { for ( type in data.events ) { if ( special[ type ] ) { jQuery.event.remove( elem, type ); // This is a shortcut to avoid jQuery.event.remove's overhead } else { jQuery.removeEvent( elem, type, data.handle ); } } } // Remove cache only if it was not already removed by jQuery.event.remove if ( cache[ id ] ) { delete cache[ id ]; // IE does not allow us to delete expando properties from nodes, // nor does it have a removeAttribute function on Document nodes; // we must handle all of these cases if ( deleteExpando ) { delete elem[ internalKey ]; } else if ( typeof elem.removeAttribute !== core_strundefined ) { elem.removeAttribute( internalKey ); } else { elem[ internalKey ] = null; } core_deletedIds.push( id ); } } } } } }); var iframe, getStyles, curCSS, ralpha = /alpha\([^)]*\)/i, ropacity = /opacity\s*=\s*([^)]*)/, rposition = /^(top|right|bottom|left)$/, // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display rdisplayswap = /^(none|table(?!-c[ea]).+)/, rmargin = /^margin/, rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), elemdisplay = { BODY: "block" }, cssShow = { position: "absolute", visibility: "hidden", display: "block" }, cssNormalTransform = { letterSpacing: 0, fontWeight: 400 }, cssExpand = [ "Top", "Right", "Bottom", "Left" ], cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; // return a css property mapped to a potentially vendor prefixed property function vendorPropName( style, name ) { // shortcut for names that are not vendor prefixed if ( name in style ) { return name; } // check for vendor prefixed names var capName = name.charAt(0).toUpperCase() + name.slice(1), origName = name, i = cssPrefixes.length; while ( i-- ) { name = cssPrefixes[ i ] + capName; if ( name in style ) { return name; } } return origName; } function isHidden( elem, el ) { // isHidden might be called from jQuery#filter function; // in that case, element will be second argument elem = el || elem; return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); } function showHide( elements, show ) { var display, elem, hidden, values = [], index = 0, length = elements.length; for ( ; index < length; index++ ) { elem = elements[ index ]; if ( !elem.style ) { continue; } values[ index ] = jQuery._data( elem, "olddisplay" ); display = elem.style.display; if ( show ) { // Reset the inline display of this element to learn if it is // being hidden by cascaded rules or not if ( !values[ index ] && display === "none" ) { elem.style.display = ""; } // Set elements which have been overridden with display: none // in a stylesheet to whatever the default browser style is // for such an element if ( elem.style.display === "" && isHidden( elem ) ) { values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); } } else { if ( !values[ index ] ) { hidden = isHidden( elem ); if ( display && display !== "none" || !hidden ) { jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); } } } } // Set the display of most of the elements in a second loop // to avoid the constant reflow for ( index = 0; index < length; index++ ) { elem = elements[ index ]; if ( !elem.style ) { continue; } if ( !show || elem.style.display === "none" || elem.style.display === "" ) { elem.style.display = show ? values[ index ] || "" : "none"; } } return elements; } jQuery.fn.extend({ css: function( name, value ) { return jQuery.access( this, function( elem, name, value ) { var len, styles, map = {}, i = 0; if ( jQuery.isArray( name ) ) { styles = getStyles( elem ); len = name.length; for ( ; i < len; i++ ) { map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); } return map; } return value !== undefined ? jQuery.style( elem, name, value ) : jQuery.css( elem, name ); }, name, value, arguments.length > 1 ); }, show: function() { return showHide( this, true ); }, hide: function() { return showHide( this ); }, toggle: function( state ) { var bool = typeof state === "boolean"; return this.each(function() { if ( bool ? state : isHidden( this ) ) { jQuery( this ).show(); } else { jQuery( this ).hide(); } }); } }); jQuery.extend({ // Add in style property hooks for overriding the default // behavior of getting and setting a style property cssHooks: { opacity: { get: function( elem, computed ) { if ( computed ) { // We should always get a number back from opacity var ret = curCSS( elem, "opacity" ); return ret === "" ? "1" : ret; } } } }, // Exclude the following css properties to add px cssNumber: { "columnCount": true, "fillOpacity": true, "fontWeight": true, "lineHeight": true, "opacity": true, "orphans": true, "widows": true, "zIndex": true, "zoom": true }, // Add in properties whose names you wish to fix before // setting or getting the value cssProps: { // normalize float css property "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" }, // Get and set the style property on a DOM Node style: function( elem, name, value, extra ) { // Don't set styles on text and comment nodes if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { return; } // Make sure that we're working with the right name var ret, type, hooks, origName = jQuery.camelCase( name ), style = elem.style; name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); // gets hook for the prefixed version // followed by the unprefixed version hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // Check if we're setting a value if ( value !== undefined ) { type = typeof value; // convert relative number strings (+= or -=) to relative numbers. #7345 if ( type === "string" && (ret = rrelNum.exec( value )) ) { value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); // Fixes bug #9237 type = "number"; } // Make sure that NaN and null values aren't set. See: #7116 if ( value == null || type === "number" && isNaN( value ) ) { return; } // If a number was passed in, add 'px' to the (except for certain CSS properties) if ( type === "number" && !jQuery.cssNumber[ origName ] ) { value += "px"; } // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, // but it would mean to define eight (for every problematic property) identical functions if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { style[ name ] = "inherit"; } // If a hook was provided, use that value, otherwise just set the specified value if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { // Wrapped to prevent IE from throwing errors when 'invalid' values are provided // Fixes bug #5509 try { style[ name ] = value; } catch(e) {} } } else { // If a hook was provided get the non-computed value from there if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { return ret; } // Otherwise just get the value from the style object return style[ name ]; } }, css: function( elem, name, extra, styles ) { var num, val, hooks, origName = jQuery.camelCase( name ); // Make sure that we're working with the right name name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); // gets hook for the prefixed version // followed by the unprefixed version hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // If a hook was provided get the computed value from there if ( hooks && "get" in hooks ) { val = hooks.get( elem, true, extra ); } // Otherwise, if a way to get the computed value exists, use that if ( val === undefined ) { val = curCSS( elem, name, styles ); } //convert "normal" to computed value if ( val === "normal" && name in cssNormalTransform ) { val = cssNormalTransform[ name ]; } // Return, converting to number if forced or a qualifier was provided and val looks numeric if ( extra === "" || extra ) { num = parseFloat( val ); return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; } return val; }, // A method for quickly swapping in/out CSS properties to get correct calculations swap: function( elem, options, callback, args ) { var ret, name, old = {}; // Remember the old values, and insert the new ones for ( name in options ) { old[ name ] = elem.style[ name ]; elem.style[ name ] = options[ name ]; } ret = callback.apply( elem, args || [] ); // Revert the old values for ( name in options ) { elem.style[ name ] = old[ name ]; } return ret; } }); // NOTE: we've included the "window" in window.getComputedStyle // because jsdom on node.js will break without it. if ( window.getComputedStyle ) { getStyles = function( elem ) { return window.getComputedStyle( elem, null ); }; curCSS = function( elem, name, _computed ) { var width, minWidth, maxWidth, computed = _computed || getStyles( elem ), // getPropertyValue is only needed for .css('filter') in IE9, see #12537 ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, style = elem.style; if ( computed ) { if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { ret = jQuery.style( elem, name ); } // A tribute to the "awesome hack by Dean Edwards" // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { // Remember the original values width = style.width; minWidth = style.minWidth; maxWidth = style.maxWidth; // Put in the new values to get a computed value out style.minWidth = style.maxWidth = style.width = ret; ret = computed.width; // Revert the changed values style.width = width; style.minWidth = minWidth; style.maxWidth = maxWidth; } } return ret; }; } else if ( document.documentElement.currentStyle ) { getStyles = function( elem ) { return elem.currentStyle; }; curCSS = function( elem, name, _computed ) { var left, rs, rsLeft, computed = _computed || getStyles( elem ), ret = computed ? computed[ name ] : undefined, style = elem.style; // Avoid setting ret to empty string here // so we don't default to auto if ( ret == null && style && style[ name ] ) { ret = style[ name ]; } // From the awesome hack by Dean Edwards // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 // If we're not dealing with a regular pixel number // but a number that has a weird ending, we need to convert it to pixels // but not position css attributes, as those are proportional to the parent element instead // and we can't measure the parent instead because it might trigger a "stacking dolls" problem if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { // Remember the original values left = style.left; rs = elem.runtimeStyle; rsLeft = rs && rs.left; // Put in the new values to get a computed value out if ( rsLeft ) { rs.left = elem.currentStyle.left; } style.left = name === "fontSize" ? "1em" : ret; ret = style.pixelLeft + "px"; // Revert the changed values style.left = left; if ( rsLeft ) { rs.left = rsLeft; } } return ret === "" ? "auto" : ret; }; } function setPositiveNumber( elem, value, subtract ) { var matches = rnumsplit.exec( value ); return matches ? // Guard against undefined "subtract", e.g., when used as in cssHooks Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : value; } function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { var i = extra === ( isBorderBox ? "border" : "content" ) ? // If we already have the right measurement, avoid augmentation 4 : // Otherwise initialize for horizontal or vertical properties name === "width" ? 1 : 0, val = 0; for ( ; i < 4; i += 2 ) { // both box models exclude margin, so add it if we want it if ( extra === "margin" ) { val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); } if ( isBorderBox ) { // border-box includes padding, so remove it if we want content if ( extra === "content" ) { val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); } // at this point, extra isn't border nor margin, so remove border if ( extra !== "margin" ) { val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } } else { // at this point, extra isn't content, so add padding val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); // at this point, extra isn't content nor padding, so add border if ( extra !== "padding" ) { val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } } } return val; } function getWidthOrHeight( elem, name, extra ) { // Start with offset property, which is equivalent to the border-box value var valueIsBorderBox = true, val = name === "width" ? elem.offsetWidth : elem.offsetHeight, styles = getStyles( elem ), isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; // some non-html elements return undefined for offsetWidth, so check for null/undefined // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 if ( val <= 0 || val == null ) { // Fall back to computed then uncomputed css if necessary val = curCSS( elem, name, styles ); if ( val < 0 || val == null ) { val = elem.style[ name ]; } // Computed unit is not pixels. Stop here and return. if ( rnumnonpx.test(val) ) { return val; } // we need the check for style in case a browser which returns unreliable values // for getComputedStyle silently falls back to the reliable elem.style valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); // Normalize "", auto, and prepare for extra val = parseFloat( val ) || 0; } // use the active box-sizing model to add/subtract irrelevant styles return ( val + augmentWidthOrHeight( elem, name, extra || ( isBorderBox ? "border" : "content" ), valueIsBorderBox, styles ) ) + "px"; } // Try to determine the default display value of an element function css_defaultDisplay( nodeName ) { var doc = document, display = elemdisplay[ nodeName ]; if ( !display ) { display = actualDisplay( nodeName, doc ); // If the simple way fails, read from inside an iframe if ( display === "none" || !display ) { // Use the already-created iframe if possible iframe = ( iframe || jQuery("<iframe frameborder='0' width='0' height='0'/>") .css( "cssText", "display:block !important" ) ).appendTo( doc.documentElement ); // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document; doc.write("<!doctype html><html><body>"); doc.close(); display = actualDisplay( nodeName, doc ); iframe.detach(); } // Store the correct default display elemdisplay[ nodeName ] = display; } return display; } // Called ONLY from within css_defaultDisplay function actualDisplay( name, doc ) { var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), display = jQuery.css( elem[0], "display" ); elem.remove(); return display; } jQuery.each([ "height", "width" ], function( i, name ) { jQuery.cssHooks[ name ] = { get: function( elem, computed, extra ) { if ( computed ) { // certain elements can have dimension info if we invisibly show them // however, it must have a current display style that would benefit from this return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ? jQuery.swap( elem, cssShow, function() { return getWidthOrHeight( elem, name, extra ); }) : getWidthOrHeight( elem, name, extra ); } }, set: function( elem, value, extra ) { var styles = extra && getStyles( elem ); return setPositiveNumber( elem, value, extra ? augmentWidthOrHeight( elem, name, extra, jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box", styles ) : 0 ); } }; }); if ( !jQuery.support.opacity ) { jQuery.cssHooks.opacity = { get: function( elem, computed ) { // IE uses filters for opacity return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : computed ? "1" : ""; }, set: function( elem, value ) { var style = elem.style, currentStyle = elem.currentStyle, opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", filter = currentStyle && currentStyle.filter || style.filter || ""; // IE has trouble with opacity if it does not have layout // Force it by setting the zoom level style.zoom = 1; // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 // if value === "", then remove inline opacity #12685 if ( ( value >= 1 || value === "" ) && jQuery.trim( filter.replace( ralpha, "" ) ) === "" && style.removeAttribute ) { // Setting style.filter to null, "" & " " still leave "filter:" in the cssText // if "filter:" is present at all, clearType is disabled, we want to avoid this // style.removeAttribute is IE Only, but so apparently is this code path... style.removeAttribute( "filter" ); // if there is no filter style applied in a css rule or unset inline opacity, we are done if ( value === "" || currentStyle && !currentStyle.filter ) { return; } } // otherwise, set new filter values style.filter = ralpha.test( filter ) ? filter.replace( ralpha, opacity ) : filter + " " + opacity; } }; } // These hooks cannot be added until DOM ready because the support test // for it is not run until after DOM ready jQuery(function() { if ( !jQuery.support.reliableMarginRight ) { jQuery.cssHooks.marginRight = { get: function( elem, computed ) { if ( computed ) { // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right // Work around by temporarily setting element display to inline-block return jQuery.swap( elem, { "display": "inline-block" }, curCSS, [ elem, "marginRight" ] ); } } }; } // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 // getComputedStyle returns percent when specified for top/left/bottom/right // rather than make the css module depend on the offset module, we just check for it here if ( !jQuery.support.pixelPosition && jQuery.fn.position ) { jQuery.each( [ "top", "left" ], function( i, prop ) { jQuery.cssHooks[ prop ] = { get: function( elem, computed ) { if ( computed ) { computed = curCSS( elem, prop ); // if curCSS returns percentage, fallback to offset return rnumnonpx.test( computed ) ? jQuery( elem ).position()[ prop ] + "px" : computed; } } }; }); } }); if ( jQuery.expr && jQuery.expr.filters ) { jQuery.expr.filters.hidden = function( elem ) { // Support: Opera <= 12.12 // Opera reports offsetWidths and offsetHeights less than zero on some elements return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none"); }; jQuery.expr.filters.visible = function( elem ) { return !jQuery.expr.filters.hidden( elem ); }; } // These hooks are used by animate to expand properties jQuery.each({ margin: "", padding: "", border: "Width" }, function( prefix, suffix ) { jQuery.cssHooks[ prefix + suffix ] = { expand: function( value ) { var i = 0, expanded = {}, // assumes a single number if not a string parts = typeof value === "string" ? value.split(" ") : [ value ]; for ( ; i < 4; i++ ) { expanded[ prefix + cssExpand[ i ] + suffix ] = parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; } return expanded; } }; if ( !rmargin.test( prefix ) ) { jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; } }); var r20 = /%20/g, rbracket = /\[\]$/, rCRLF = /\r?\n/g, rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, rsubmittable = /^(?:input|select|textarea|keygen)/i; jQuery.fn.extend({ serialize: function() { return jQuery.param( this.serializeArray() ); }, serializeArray: function() { return this.map(function(){ // Can add propHook for "elements" to filter or add form elements var elements = jQuery.prop( this, "elements" ); return elements ? jQuery.makeArray( elements ) : this; }) .filter(function(){ var type = this.type; // Use .is(":disabled") so that fieldset[disabled] works return this.name && !jQuery( this ).is( ":disabled" ) && rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && ( this.checked || !manipulation_rcheckableType.test( type ) ); }) .map(function( i, elem ){ var val = jQuery( this ).val(); return val == null ? null : jQuery.isArray( val ) ? jQuery.map( val, function( val ){ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; }) : { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; }).get(); } }); //Serialize an array of form elements or a set of //key/values into a query string jQuery.param = function( a, traditional ) { var prefix, s = [], add = function( key, value ) { // If value is a function, invoke it and return its value value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); }; // Set traditional to true for jQuery <= 1.3.2 behavior. if ( traditional === undefined ) { traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; } // If an array was passed in, assume that it is an array of form elements. if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { // Serialize the form elements jQuery.each( a, function() { add( this.name, this.value ); }); } else { // If traditional, encode the "old" way (the way 1.3.2 or older // did it), otherwise encode params recursively. for ( prefix in a ) { buildParams( prefix, a[ prefix ], traditional, add ); } } // Return the resulting serialization return s.join( "&" ).replace( r20, "+" ); }; function buildParams( prefix, obj, traditional, add ) { var name; if ( jQuery.isArray( obj ) ) { // Serialize array item. jQuery.each( obj, function( i, v ) { if ( traditional || rbracket.test( prefix ) ) { // Treat each array item as a scalar. add( prefix, v ); } else { // Item is non-scalar (array or object), encode its numeric index. buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); } }); } else if ( !traditional && jQuery.type( obj ) === "object" ) { // Serialize object item. for ( name in obj ) { buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); } } else { // Serialize scalar item. add( prefix, obj ); } } jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { // Handle event binding jQuery.fn[ name ] = function( data, fn ) { return arguments.length > 0 ? this.on( name, null, data, fn ) : this.trigger( name ); }; }); jQuery.fn.hover = function( fnOver, fnOut ) { return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); }; var // Document location ajaxLocParts, ajaxLocation, ajax_nonce = jQuery.now(), ajax_rquery = /\?/, rhash = /#.*$/, rts = /([?&])_=[^&]*/, rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL // #7653, #8125, #8152: local protocol detection rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, // Keep a copy of the old load method _load = jQuery.fn.load, /* Prefilters * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) * 2) These are called: * - BEFORE asking for a transport * - AFTER param serialization (s.data is a string if s.processData is true) * 3) key is the dataType * 4) the catchall symbol "*" can be used * 5) execution will start with transport dataType and THEN continue down to "*" if needed */ prefilters = {}, /* Transports bindings * 1) key is the dataType * 2) the catchall symbol "*" can be used * 3) selection will start with transport dataType and THEN go to "*" if needed */ transports = {}, // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression allTypes = "*/".concat("*"); // #8138, IE may throw an exception when accessing // a field from window.location if document.domain has been set try { ajaxLocation = location.href; } catch( e ) { // Use the href attribute of an A element // since IE will modify it given document.location ajaxLocation = document.createElement( "a" ); ajaxLocation.href = ""; ajaxLocation = ajaxLocation.href; } // Segment location into parts ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport function addToPrefiltersOrTransports( structure ) { // dataTypeExpression is optional and defaults to "*" return function( dataTypeExpression, func ) { if ( typeof dataTypeExpression !== "string" ) { func = dataTypeExpression; dataTypeExpression = "*"; } var dataType, i = 0, dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || []; if ( jQuery.isFunction( func ) ) { // For each dataType in the dataTypeExpression while ( (dataType = dataTypes[i++]) ) { // Prepend if requested if ( dataType[0] === "+" ) { dataType = dataType.slice( 1 ) || "*"; (structure[ dataType ] = structure[ dataType ] || []).unshift( func ); // Otherwise append } else { (structure[ dataType ] = structure[ dataType ] || []).push( func ); } } } }; } // Base inspection function for prefilters and transports function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { var inspected = {}, seekingTransport = ( structure === transports ); function inspect( dataType ) { var selected; inspected[ dataType ] = true; jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { options.dataTypes.unshift( dataTypeOrTransport ); inspect( dataTypeOrTransport ); return false; } else if ( seekingTransport ) { return !( selected = dataTypeOrTransport ); } }); return selected; } return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); } // A special extend for ajax options // that takes "flat" options (not to be deep extended) // Fixes #9887 function ajaxExtend( target, src ) { var deep, key, flatOptions = jQuery.ajaxSettings.flatOptions || {}; for ( key in src ) { if ( src[ key ] !== undefined ) { ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ]; } } if ( deep ) { jQuery.extend( true, target, deep ); } return target; } jQuery.fn.load = function( url, params, callback ) { if ( typeof url !== "string" && _load ) { return _load.apply( this, arguments ); } var selector, response, type, self = this, off = url.indexOf(" "); if ( off >= 0 ) { selector = url.slice( off, url.length ); url = url.slice( 0, off ); } // If it's a function if ( jQuery.isFunction( params ) ) { // We assume that it's the callback callback = params; params = undefined; // Otherwise, build a param string } else if ( params && typeof params === "object" ) { type = "POST"; } // If we have elements to modify, make the request if ( self.length > 0 ) { jQuery.ajax({ url: url, // if "type" variable is undefined, then "GET" method will be used type: type, dataType: "html", data: params }).done(function( responseText ) { // Save response for use in complete callback response = arguments; self.html( selector ? // If a selector was specified, locate the right elements in a dummy div // Exclude scripts to avoid IE 'Permission Denied' errors jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) : // Otherwise use the full result responseText ); }).complete( callback && function( jqXHR, status ) { self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); }); } return this; }; // Attach a bunch of functions for handling common AJAX events jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){ jQuery.fn[ type ] = function( fn ){ return this.on( type, fn ); }; }); jQuery.each( [ "get", "post" ], function( i, method ) { jQuery[ method ] = function( url, data, callback, type ) { // shift arguments if data argument was omitted if ( jQuery.isFunction( data ) ) { type = type || callback; callback = data; data = undefined; } return jQuery.ajax({ url: url, type: method, dataType: type, data: data, success: callback }); }; }); jQuery.extend({ // Counter for holding the number of active queries active: 0, // Last-Modified header cache for next request lastModified: {}, etag: {}, ajaxSettings: { url: ajaxLocation, type: "GET", isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), global: true, processData: true, async: true, contentType: "application/x-www-form-urlencoded; charset=UTF-8", /* timeout: 0, data: null, dataType: null, username: null, password: null, cache: null, throws: false, traditional: false, headers: {}, */ accepts: { "*": allTypes, text: "text/plain", html: "text/html", xml: "application/xml, text/xml", json: "application/json, text/javascript" }, contents: { xml: /xml/, html: /html/, json: /json/ }, responseFields: { xml: "responseXML", text: "responseText" }, // Data converters // Keys separate source (or catchall "*") and destination types with a single space converters: { // Convert anything to text "* text": window.String, // Text to html (true = no transformation) "text html": true, // Evaluate text as a json expression "text json": jQuery.parseJSON, // Parse text as xml "text xml": jQuery.parseXML }, // For options that shouldn't be deep extended: // you can add your own custom options here if // and when you create one that shouldn't be // deep extended (see ajaxExtend) flatOptions: { url: true, context: true } }, // Creates a full fledged settings object into target // with both ajaxSettings and settings fields. // If target is omitted, writes into ajaxSettings. ajaxSetup: function( target, settings ) { return settings ? // Building a settings object ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : // Extending ajaxSettings ajaxExtend( jQuery.ajaxSettings, target ); }, ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), ajaxTransport: addToPrefiltersOrTransports( transports ), // Main method ajax: function( url, options ) { // If url is an object, simulate pre-1.5 signature if ( typeof url === "object" ) { options = url; url = undefined; } // Force options to be an object options = options || {}; var // Cross-domain detection vars parts, // Loop variable i, // URL without anti-cache param cacheURL, // Response headers as string responseHeadersString, // timeout handle timeoutTimer, // To know if global events are to be dispatched fireGlobals, transport, // Response headers responseHeaders, // Create the final options object s = jQuery.ajaxSetup( {}, options ), // Callbacks context callbackContext = s.context || s, // Context for global events is callbackContext if it is a DOM node or jQuery collection globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? jQuery( callbackContext ) : jQuery.event, // Deferreds deferred = jQuery.Deferred(), completeDeferred = jQuery.Callbacks("once memory"), // Status-dependent callbacks statusCode = s.statusCode || {}, // Headers (they are sent all at once) requestHeaders = {}, requestHeadersNames = {}, // The jqXHR state state = 0, // Default abort message strAbort = "canceled", // Fake xhr jqXHR = { readyState: 0, // Builds headers hashtable if needed getResponseHeader: function( key ) { var match; if ( state === 2 ) { if ( !responseHeaders ) { responseHeaders = {}; while ( (match = rheaders.exec( responseHeadersString )) ) { responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; } } match = responseHeaders[ key.toLowerCase() ]; } return match == null ? null : match; }, // Raw string getAllResponseHeaders: function() { return state === 2 ? responseHeadersString : null; }, // Caches the header setRequestHeader: function( name, value ) { var lname = name.toLowerCase(); if ( !state ) { name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; requestHeaders[ name ] = value; } return this; }, // Overrides response content-type header overrideMimeType: function( type ) { if ( !state ) { s.mimeType = type; } return this; }, // Status-dependent callbacks statusCode: function( map ) { var code; if ( map ) { if ( state < 2 ) { for ( code in map ) { // Lazy-add the new callback in a way that preserves old ones statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; } } else { // Execute the appropriate callbacks jqXHR.always( map[ jqXHR.status ] ); } } return this; }, // Cancel the request abort: function( statusText ) { var finalText = statusText || strAbort; if ( transport ) { transport.abort( finalText ); } done( 0, finalText ); return this; } }; // Attach deferreds deferred.promise( jqXHR ).complete = completeDeferred.add; jqXHR.success = jqXHR.done; jqXHR.error = jqXHR.fail; // Remove hash character (#7531: and string promotion) // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) // Handle falsy url in the settings object (#10093: consistency with old signature) // We also use the url parameter if available s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); // Alias method option to type as per ticket #12004 s.type = options.method || options.type || s.method || s.type; // Extract dataTypes list s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""]; // A cross-domain request is in order when we have a protocol:host:port mismatch if ( s.crossDomain == null ) { parts = rurl.exec( s.url.toLowerCase() ); s.crossDomain = !!( parts && ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] || ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) ); } // Convert data if not already a string if ( s.data && s.processData && typeof s.data !== "string" ) { s.data = jQuery.param( s.data, s.traditional ); } // Apply prefilters inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); // If request was aborted inside a prefilter, stop there if ( state === 2 ) { return jqXHR; } // We can fire global events as of now if asked to fireGlobals = s.global; // Watch for a new set of requests if ( fireGlobals && jQuery.active++ === 0 ) { jQuery.event.trigger("ajaxStart"); } // Uppercase the type s.type = s.type.toUpperCase(); // Determine if request has content s.hasContent = !rnoContent.test( s.type ); // Save the URL in case we're toying with the If-Modified-Since // and/or If-None-Match header later on cacheURL = s.url; // More options handling for requests with no content if ( !s.hasContent ) { // If data is available, append data to url if ( s.data ) { cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data ); // #9682: remove data so that it's not used in an eventual retry delete s.data; } // Add anti-cache in url if needed if ( s.cache === false ) { s.url = rts.test( cacheURL ) ? // If there is already a '_' parameter, set its value cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) : // Otherwise add one to the end cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++; } } // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { if ( jQuery.lastModified[ cacheURL ] ) { jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); } if ( jQuery.etag[ cacheURL ] ) { jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); } } // Set the correct header, if data is being sent if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { jqXHR.setRequestHeader( "Content-Type", s.contentType ); } // Set the Accepts header for the server, depending on the dataType jqXHR.setRequestHeader( "Accept", s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : s.accepts[ "*" ] ); // Check for headers option for ( i in s.headers ) { jqXHR.setRequestHeader( i, s.headers[ i ] ); } // Allow custom headers/mimetypes and early abort if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { // Abort if not done already and return return jqXHR.abort(); } // aborting is no longer a cancellation strAbort = "abort"; // Install callbacks on deferreds for ( i in { success: 1, error: 1, complete: 1 } ) { jqXHR[ i ]( s[ i ] ); } // Get transport transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); // If no transport, we auto-abort if ( !transport ) { done( -1, "No Transport" ); } else { jqXHR.readyState = 1; // Send global event if ( fireGlobals ) { globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); } // Timeout if ( s.async && s.timeout > 0 ) { timeoutTimer = setTimeout(function() { jqXHR.abort("timeout"); }, s.timeout ); } try { state = 1; transport.send( requestHeaders, done ); } catch ( e ) { // Propagate exception as error if not done if ( state < 2 ) { done( -1, e ); // Simply rethrow otherwise } else { throw e; } } } // Callback for when everything is done function done( status, nativeStatusText, responses, headers ) { var isSuccess, success, error, response, modified, statusText = nativeStatusText; // Called once if ( state === 2 ) { return; } // State is "done" now state = 2; // Clear timeout if it exists if ( timeoutTimer ) { clearTimeout( timeoutTimer ); } // Dereference transport for early garbage collection // (no matter how long the jqXHR object will be used) transport = undefined; // Cache response headers responseHeadersString = headers || ""; // Set readyState jqXHR.readyState = status > 0 ? 4 : 0; // Get response data if ( responses ) { response = ajaxHandleResponses( s, jqXHR, responses ); } // If successful, handle type chaining if ( status >= 200 && status < 300 || status === 304 ) { // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { modified = jqXHR.getResponseHeader("Last-Modified"); if ( modified ) { jQuery.lastModified[ cacheURL ] = modified; } modified = jqXHR.getResponseHeader("etag"); if ( modified ) { jQuery.etag[ cacheURL ] = modified; } } // if no content if ( status === 204 ) { isSuccess = true; statusText = "nocontent"; // if not modified } else if ( status === 304 ) { isSuccess = true; statusText = "notmodified"; // If we have data, let's convert it } else { isSuccess = ajaxConvert( s, response ); statusText = isSuccess.state; success = isSuccess.data; error = isSuccess.error; isSuccess = !error; } } else { // We extract error from statusText // then normalize statusText and status for non-aborts error = statusText; if ( status || !statusText ) { statusText = "error"; if ( status < 0 ) { status = 0; } } } // Set data for the fake xhr object jqXHR.status = status; jqXHR.statusText = ( nativeStatusText || statusText ) + ""; // Success/Error if ( isSuccess ) { deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); } else { deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); } // Status-dependent callbacks jqXHR.statusCode( statusCode ); statusCode = undefined; if ( fireGlobals ) { globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", [ jqXHR, s, isSuccess ? success : error ] ); } // Complete completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); if ( fireGlobals ) { globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); // Handle the global AJAX counter if ( !( --jQuery.active ) ) { jQuery.event.trigger("ajaxStop"); } } } return jqXHR; }, getScript: function( url, callback ) { return jQuery.get( url, undefined, callback, "script" ); }, getJSON: function( url, data, callback ) { return jQuery.get( url, data, callback, "json" ); } }); /* Handles responses to an ajax request: * - sets all responseXXX fields accordingly * - finds the right dataType (mediates between content-type and expected dataType) * - returns the corresponding response */ function ajaxHandleResponses( s, jqXHR, responses ) { var firstDataType, ct, finalDataType, type, contents = s.contents, dataTypes = s.dataTypes, responseFields = s.responseFields; // Fill responseXXX fields for ( type in responseFields ) { if ( type in responses ) { jqXHR[ responseFields[type] ] = responses[ type ]; } } // Remove auto dataType and get content-type in the process while( dataTypes[ 0 ] === "*" ) { dataTypes.shift(); if ( ct === undefined ) { ct = s.mimeType || jqXHR.getResponseHeader("Content-Type"); } } // Check if we're dealing with a known content-type if ( ct ) { for ( type in contents ) { if ( contents[ type ] && contents[ type ].test( ct ) ) { dataTypes.unshift( type ); break; } } } // Check to see if we have a response for the expected dataType if ( dataTypes[ 0 ] in responses ) { finalDataType = dataTypes[ 0 ]; } else { // Try convertible dataTypes for ( type in responses ) { if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { finalDataType = type; break; } if ( !firstDataType ) { firstDataType = type; } } // Or just use first one finalDataType = finalDataType || firstDataType; } // If we found a dataType // We add the dataType to the list if needed // and return the corresponding response if ( finalDataType ) { if ( finalDataType !== dataTypes[ 0 ] ) { dataTypes.unshift( finalDataType ); } return responses[ finalDataType ]; } } // Chain conversions given the request and the original response function ajaxConvert( s, response ) { var conv2, current, conv, tmp, converters = {}, i = 0, // Work with a copy of dataTypes in case we need to modify it for conversion dataTypes = s.dataTypes.slice(), prev = dataTypes[ 0 ]; // Apply the dataFilter if provided if ( s.dataFilter ) { response = s.dataFilter( response, s.dataType ); } // Create converters map with lowercased keys if ( dataTypes[ 1 ] ) { for ( conv in s.converters ) { converters[ conv.toLowerCase() ] = s.converters[ conv ]; } } // Convert to each sequential dataType, tolerating list modification for ( ; (current = dataTypes[++i]); ) { // There's only work to do if current dataType is non-auto if ( current !== "*" ) { // Convert response if prev dataType is non-auto and differs from current if ( prev !== "*" && prev !== current ) { // Seek a direct converter conv = converters[ prev + " " + current ] || converters[ "* " + current ]; // If none found, seek a pair if ( !conv ) { for ( conv2 in converters ) { // If conv2 outputs current tmp = conv2.split(" "); if ( tmp[ 1 ] === current ) { // If prev can be converted to accepted input conv = converters[ prev + " " + tmp[ 0 ] ] || converters[ "* " + tmp[ 0 ] ]; if ( conv ) { // Condense equivalence converters if ( conv === true ) { conv = converters[ conv2 ]; // Otherwise, insert the intermediate dataType } else if ( converters[ conv2 ] !== true ) { current = tmp[ 0 ]; dataTypes.splice( i--, 0, current ); } break; } } } } // Apply converter (if not an equivalence) if ( conv !== true ) { // Unless errors are allowed to bubble, catch and return them if ( conv && s["throws"] ) { response = conv( response ); } else { try { response = conv( response ); } catch ( e ) { return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; } } } } // Update prev for next iteration prev = current; } } return { state: "success", data: response }; } // Install script dataType jQuery.ajaxSetup({ accepts: { script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" }, contents: { script: /(?:java|ecma)script/ }, converters: { "text script": function( text ) { jQuery.globalEval( text ); return text; } } }); // Handle cache's special case and global jQuery.ajaxPrefilter( "script", function( s ) { if ( s.cache === undefined ) { s.cache = false; } if ( s.crossDomain ) { s.type = "GET"; s.global = false; } }); // Bind script tag hack transport jQuery.ajaxTransport( "script", function(s) { // This transport only deals with cross domain requests if ( s.crossDomain ) { var script, head = document.head || jQuery("head")[0] || document.documentElement; return { send: function( _, callback ) { script = document.createElement("script"); script.async = true; if ( s.scriptCharset ) { script.charset = s.scriptCharset; } script.src = s.url; // Attach handlers for all browsers script.onload = script.onreadystatechange = function( _, isAbort ) { if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { // Handle memory leak in IE script.onload = script.onreadystatechange = null; // Remove the script if ( script.parentNode ) { script.parentNode.removeChild( script ); } // Dereference the script script = null; // Callback if not abort if ( !isAbort ) { callback( 200, "success" ); } } }; // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending // Use native DOM manipulation to avoid our domManip AJAX trickery head.insertBefore( script, head.firstChild ); }, abort: function() { if ( script ) { script.onload( undefined, true ); } } }; } }); var oldCallbacks = [], rjsonp = /(=)\?(?=&|$)|\?\?/; // Default jsonp settings jQuery.ajaxSetup({ jsonp: "callback", jsonpCallback: function() { var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) ); this[ callback ] = true; return callback; } }); // Detect, normalize options and install callbacks for jsonp requests jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { var callbackName, overwritten, responseContainer, jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? "url" : typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data" ); // Handle iff the expected data type is "jsonp" or we have a parameter to set if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { // Get callback name, remembering preexisting value associated with it callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback; // Insert callback into url or form data if ( jsonProp ) { s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); } else if ( s.jsonp !== false ) { s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; } // Use data converter to retrieve json after script execution s.converters["script json"] = function() { if ( !responseContainer ) { jQuery.error( callbackName + " was not called" ); } return responseContainer[ 0 ]; }; // force json dataType s.dataTypes[ 0 ] = "json"; // Install callback overwritten = window[ callbackName ]; window[ callbackName ] = function() { responseContainer = arguments; }; // Clean-up function (fires after converters) jqXHR.always(function() { // Restore preexisting value window[ callbackName ] = overwritten; // Save back as free if ( s[ callbackName ] ) { // make sure that re-using the options doesn't screw things around s.jsonpCallback = originalSettings.jsonpCallback; // save the callback name for future use oldCallbacks.push( callbackName ); } // Call if it was a function and we have a response if ( responseContainer && jQuery.isFunction( overwritten ) ) { overwritten( responseContainer[ 0 ] ); } responseContainer = overwritten = undefined; }); // Delegate to script return "script"; } }); var xhrCallbacks, xhrSupported, xhrId = 0, // #5280: Internet Explorer will keep connections alive if we don't abort on unload xhrOnUnloadAbort = window.ActiveXObject && function() { // Abort all pending requests var key; for ( key in xhrCallbacks ) { xhrCallbacks[ key ]( undefined, true ); } }; // Functions to create xhrs function createStandardXHR() { try { return new window.XMLHttpRequest(); } catch( e ) {} } function createActiveXHR() { try { return new window.ActiveXObject("Microsoft.XMLHTTP"); } catch( e ) {} } // Create the request object // (This is still attached to ajaxSettings for backward compatibility) jQuery.ajaxSettings.xhr = window.ActiveXObject ? /* Microsoft failed to properly * implement the XMLHttpRequest in IE7 (can't request local files), * so we use the ActiveXObject when it is available * Additionally XMLHttpRequest can be disabled in IE7/IE8 so * we need a fallback. */ function() { return !this.isLocal && createStandardXHR() || createActiveXHR(); } : // For all other browsers, use the standard XMLHttpRequest object createStandardXHR; // Determine support properties xhrSupported = jQuery.ajaxSettings.xhr(); jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); xhrSupported = jQuery.support.ajax = !!xhrSupported; // Create transport if the browser can provide an xhr if ( xhrSupported ) { jQuery.ajaxTransport(function( s ) { // Cross domain only allowed if supported through XMLHttpRequest if ( !s.crossDomain || jQuery.support.cors ) { var callback; return { send: function( headers, complete ) { // Get a new xhr var handle, i, xhr = s.xhr(); // Open the socket // Passing null username, generates a login popup on Opera (#2865) if ( s.username ) { xhr.open( s.type, s.url, s.async, s.username, s.password ); } else { xhr.open( s.type, s.url, s.async ); } // Apply custom fields if provided if ( s.xhrFields ) { for ( i in s.xhrFields ) { xhr[ i ] = s.xhrFields[ i ]; } } // Override mime type if needed if ( s.mimeType && xhr.overrideMimeType ) { xhr.overrideMimeType( s.mimeType ); } // X-Requested-With header // For cross-domain requests, seeing as conditions for a preflight are // akin to a jigsaw puzzle, we simply never set it to be sure. // (it can always be set on a per-request basis or even using ajaxSetup) // For same-domain requests, won't change header if already provided. if ( !s.crossDomain && !headers["X-Requested-With"] ) { headers["X-Requested-With"] = "XMLHttpRequest"; } // Need an extra try/catch for cross domain requests in Firefox 3 try { for ( i in headers ) { xhr.setRequestHeader( i, headers[ i ] ); } } catch( err ) {} // Do send the request // This may raise an exception which is actually // handled in jQuery.ajax (so no try/catch here) xhr.send( ( s.hasContent && s.data ) || null ); // Listener callback = function( _, isAbort ) { var status, responseHeaders, statusText, responses; // Firefox throws exceptions when accessing properties // of an xhr when a network error occurred // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) try { // Was never called and is aborted or complete if ( callback && ( isAbort || xhr.readyState === 4 ) ) { // Only called once callback = undefined; // Do not keep as active anymore if ( handle ) { xhr.onreadystatechange = jQuery.noop; if ( xhrOnUnloadAbort ) { delete xhrCallbacks[ handle ]; } } // If it's an abort if ( isAbort ) { // Abort it manually if needed if ( xhr.readyState !== 4 ) { xhr.abort(); } } else { responses = {}; status = xhr.status; responseHeaders = xhr.getAllResponseHeaders(); // When requesting binary data, IE6-9 will throw an exception // on any attempt to access responseText (#11426) if ( typeof xhr.responseText === "string" ) { responses.text = xhr.responseText; } // Firefox throws an exception when accessing // statusText for faulty cross-domain requests try { statusText = xhr.statusText; } catch( e ) { // We normalize with Webkit giving an empty statusText statusText = ""; } // Filter status for non standard behaviors // If the request is local and we have data: assume a success // (success with no data won't get notified, that's the best we // can do given current implementations) if ( !status && s.isLocal && !s.crossDomain ) { status = responses.text ? 200 : 404; // IE - #1450: sometimes returns 1223 when it should be 204 } else if ( status === 1223 ) { status = 204; } } } } catch( firefoxAccessException ) { if ( !isAbort ) { complete( -1, firefoxAccessException ); } } // Call complete if needed if ( responses ) { complete( status, statusText, responses, responseHeaders ); } }; if ( !s.async ) { // if we're in sync mode we fire the callback callback(); } else if ( xhr.readyState === 4 ) { // (IE6 & IE7) if it's in cache and has been // retrieved directly we need to fire the callback setTimeout( callback ); } else { handle = ++xhrId; if ( xhrOnUnloadAbort ) { // Create the active xhrs callbacks list if needed // and attach the unload handler if ( !xhrCallbacks ) { xhrCallbacks = {}; jQuery( window ).unload( xhrOnUnloadAbort ); } // Add to list of active xhrs callbacks xhrCallbacks[ handle ] = callback; } xhr.onreadystatechange = callback; } }, abort: function() { if ( callback ) { callback( undefined, true ); } } }; } }); } var fxNow, timerId, rfxtypes = /^(?:toggle|show|hide)$/, rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), rrun = /queueHooks$/, animationPrefilters = [ defaultPrefilter ], tweeners = { "*": [function( prop, value ) { var end, unit, tween = this.createTween( prop, value ), parts = rfxnum.exec( value ), target = tween.cur(), start = +target || 0, scale = 1, maxIterations = 20; if ( parts ) { end = +parts[2]; unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" ); // We need to compute starting value if ( unit !== "px" && start ) { // Iteratively approximate from a nonzero starting point // Prefer the current property, because this process will be trivial if it uses the same units // Fallback to end or a simple constant start = jQuery.css( tween.elem, prop, true ) || end || 1; do { // If previous iteration zeroed out, double until we get *something* // Use a string for doubling factor so we don't accidentally see scale as unchanged below scale = scale || ".5"; // Adjust and apply start = start / scale; jQuery.style( tween.elem, prop, start + unit ); // Update scale, tolerating zero or NaN from tween.cur() // And breaking the loop if scale is unchanged or perfect, or if we've just had enough } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); } tween.unit = unit; tween.start = start; // If a +=/-= token was provided, we're doing a relative animation tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end; } return tween; }] }; // Animations created synchronously will run synchronously function createFxNow() { setTimeout(function() { fxNow = undefined; }); return ( fxNow = jQuery.now() ); } function createTweens( animation, props ) { jQuery.each( props, function( prop, value ) { var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), index = 0, length = collection.length; for ( ; index < length; index++ ) { if ( collection[ index ].call( animation, prop, value ) ) { // we're done with this property return; } } }); } function Animation( elem, properties, options ) { var result, stopped, index = 0, length = animationPrefilters.length, deferred = jQuery.Deferred().always( function() { // don't match elem in the :animated selector delete tick.elem; }), tick = function() { if ( stopped ) { return false; } var currentTime = fxNow || createFxNow(), remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497) temp = remaining / animation.duration || 0, percent = 1 - temp, index = 0, length = animation.tweens.length; for ( ; index < length ; index++ ) { animation.tweens[ index ].run( percent ); } deferred.notifyWith( elem, [ animation, percent, remaining ]); if ( percent < 1 && length ) { return remaining; } else { deferred.resolveWith( elem, [ animation ] ); return false; } }, animation = deferred.promise({ elem: elem, props: jQuery.extend( {}, properties ), opts: jQuery.extend( true, { specialEasing: {} }, options ), originalProperties: properties, originalOptions: options, startTime: fxNow || createFxNow(), duration: options.duration, tweens: [], createTween: function( prop, end ) { var tween = jQuery.Tween( elem, animation.opts, prop, end, animation.opts.specialEasing[ prop ] || animation.opts.easing ); animation.tweens.push( tween ); return tween; }, stop: function( gotoEnd ) { var index = 0, // if we are going to the end, we want to run all the tweens // otherwise we skip this part length = gotoEnd ? animation.tweens.length : 0; if ( stopped ) { return this; } stopped = true; for ( ; index < length ; index++ ) { animation.tweens[ index ].run( 1 ); } // resolve when we played the last frame // otherwise, reject if ( gotoEnd ) { deferred.resolveWith( elem, [ animation, gotoEnd ] ); } else { deferred.rejectWith( elem, [ animation, gotoEnd ] ); } return this; } }), props = animation.props; propFilter( props, animation.opts.specialEasing ); for ( ; index < length ; index++ ) { result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); if ( result ) { return result; } } createTweens( animation, props ); if ( jQuery.isFunction( animation.opts.start ) ) { animation.opts.start.call( elem, animation ); } jQuery.fx.timer( jQuery.extend( tick, { elem: elem, anim: animation, queue: animation.opts.queue }) ); // attach callbacks from options return animation.progress( animation.opts.progress ) .done( animation.opts.done, animation.opts.complete ) .fail( animation.opts.fail ) .always( animation.opts.always ); } function propFilter( props, specialEasing ) { var value, name, index, easing, hooks; // camelCase, specialEasing and expand cssHook pass for ( index in props ) { name = jQuery.camelCase( index ); easing = specialEasing[ name ]; value = props[ index ]; if ( jQuery.isArray( value ) ) { easing = value[ 1 ]; value = props[ index ] = value[ 0 ]; } if ( index !== name ) { props[ name ] = value; delete props[ index ]; } hooks = jQuery.cssHooks[ name ]; if ( hooks && "expand" in hooks ) { value = hooks.expand( value ); delete props[ name ]; // not quite $.extend, this wont overwrite keys already present. // also - reusing 'index' from above because we have the correct "name" for ( index in value ) { if ( !( index in props ) ) { props[ index ] = value[ index ]; specialEasing[ index ] = easing; } } } else { specialEasing[ name ] = easing; } } } jQuery.Animation = jQuery.extend( Animation, { tweener: function( props, callback ) { if ( jQuery.isFunction( props ) ) { callback = props; props = [ "*" ]; } else { props = props.split(" "); } var prop, index = 0, length = props.length; for ( ; index < length ; index++ ) { prop = props[ index ]; tweeners[ prop ] = tweeners[ prop ] || []; tweeners[ prop ].unshift( callback ); } }, prefilter: function( callback, prepend ) { if ( prepend ) { animationPrefilters.unshift( callback ); } else { animationPrefilters.push( callback ); } } }); function defaultPrefilter( elem, props, opts ) { /*jshint validthis:true */ var prop, index, length, value, dataShow, toggle, tween, hooks, oldfire, anim = this, style = elem.style, orig = {}, handled = [], hidden = elem.nodeType && isHidden( elem ); // handle queue: false promises if ( !opts.queue ) { hooks = jQuery._queueHooks( elem, "fx" ); if ( hooks.unqueued == null ) { hooks.unqueued = 0; oldfire = hooks.empty.fire; hooks.empty.fire = function() { if ( !hooks.unqueued ) { oldfire(); } }; } hooks.unqueued++; anim.always(function() { // doing this makes sure that the complete handler will be called // before this completes anim.always(function() { hooks.unqueued--; if ( !jQuery.queue( elem, "fx" ).length ) { hooks.empty.fire(); } }); }); } // height/width overflow pass if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { // Make sure that nothing sneaks out // Record all 3 overflow attributes because IE does not // change the overflow attribute when overflowX and // overflowY are set to the same value opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; // Set display property to inline-block for height/width // animations on inline elements that are having width/height animated if ( jQuery.css( elem, "display" ) === "inline" && jQuery.css( elem, "float" ) === "none" ) { // inline-level elements accept inline-block; // block-level elements need to be inline with layout if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { style.display = "inline-block"; } else { style.zoom = 1; } } } if ( opts.overflow ) { style.overflow = "hidden"; if ( !jQuery.support.shrinkWrapBlocks ) { anim.always(function() { style.overflow = opts.overflow[ 0 ]; style.overflowX = opts.overflow[ 1 ]; style.overflowY = opts.overflow[ 2 ]; }); } } // show/hide pass for ( index in props ) { value = props[ index ]; if ( rfxtypes.exec( value ) ) { delete props[ index ]; toggle = toggle || value === "toggle"; if ( value === ( hidden ? "hide" : "show" ) ) { continue; } handled.push( index ); } } length = handled.length; if ( length ) { dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} ); if ( "hidden" in dataShow ) { hidden = dataShow.hidden; } // store state if its toggle - enables .stop().toggle() to "reverse" if ( toggle ) { dataShow.hidden = !hidden; } if ( hidden ) { jQuery( elem ).show(); } else { anim.done(function() { jQuery( elem ).hide(); }); } anim.done(function() { var prop; jQuery._removeData( elem, "fxshow" ); for ( prop in orig ) { jQuery.style( elem, prop, orig[ prop ] ); } }); for ( index = 0 ; index < length ; index++ ) { prop = handled[ index ]; tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 ); orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop ); if ( !( prop in dataShow ) ) { dataShow[ prop ] = tween.start; if ( hidden ) { tween.end = tween.start; tween.start = prop === "width" || prop === "height" ? 1 : 0; } } } } } function Tween( elem, options, prop, end, easing ) { return new Tween.prototype.init( elem, options, prop, end, easing ); } jQuery.Tween = Tween; Tween.prototype = { constructor: Tween, init: function( elem, options, prop, end, easing, unit ) { this.elem = elem; this.prop = prop; this.easing = easing || "swing"; this.options = options; this.start = this.now = this.cur(); this.end = end; this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); }, cur: function() { var hooks = Tween.propHooks[ this.prop ]; return hooks && hooks.get ? hooks.get( this ) : Tween.propHooks._default.get( this ); }, run: function( percent ) { var eased, hooks = Tween.propHooks[ this.prop ]; if ( this.options.duration ) { this.pos = eased = jQuery.easing[ this.easing ]( percent, this.options.duration * percent, 0, 1, this.options.duration ); } else { this.pos = eased = percent; } this.now = ( this.end - this.start ) * eased + this.start; if ( this.options.step ) { this.options.step.call( this.elem, this.now, this ); } if ( hooks && hooks.set ) { hooks.set( this ); } else { Tween.propHooks._default.set( this ); } return this; } }; Tween.prototype.init.prototype = Tween.prototype; Tween.propHooks = { _default: { get: function( tween ) { var result; if ( tween.elem[ tween.prop ] != null && (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { return tween.elem[ tween.prop ]; } // passing an empty string as a 3rd parameter to .css will automatically // attempt a parseFloat and fallback to a string if the parse fails // so, simple values such as "10px" are parsed to Float. // complex values such as "rotate(1rad)" are returned as is. result = jQuery.css( tween.elem, tween.prop, "" ); // Empty strings, null, undefined and "auto" are converted to 0. return !result || result === "auto" ? 0 : result; }, set: function( tween ) { // use step hook for back compat - use cssHook if its there - use .style if its // available and use plain properties where available if ( jQuery.fx.step[ tween.prop ] ) { jQuery.fx.step[ tween.prop ]( tween ); } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); } else { tween.elem[ tween.prop ] = tween.now; } } } }; // Remove in 2.0 - this supports IE8's panic based approach // to setting things on disconnected nodes Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { set: function( tween ) { if ( tween.elem.nodeType && tween.elem.parentNode ) { tween.elem[ tween.prop ] = tween.now; } } }; jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { var cssFn = jQuery.fn[ name ]; jQuery.fn[ name ] = function( speed, easing, callback ) { return speed == null || typeof speed === "boolean" ? cssFn.apply( this, arguments ) : this.animate( genFx( name, true ), speed, easing, callback ); }; }); jQuery.fn.extend({ fadeTo: function( speed, to, easing, callback ) { // show any hidden elements after setting opacity to 0 return this.filter( isHidden ).css( "opacity", 0 ).show() // animate to the value specified .end().animate({ opacity: to }, speed, easing, callback ); }, animate: function( prop, speed, easing, callback ) { var empty = jQuery.isEmptyObject( prop ), optall = jQuery.speed( speed, easing, callback ), doAnimation = function() { // Operate on a copy of prop so per-property easing won't be lost var anim = Animation( this, jQuery.extend( {}, prop ), optall ); doAnimation.finish = function() { anim.stop( true ); }; // Empty animations, or finishing resolves immediately if ( empty || jQuery._data( this, "finish" ) ) { anim.stop( true ); } }; doAnimation.finish = doAnimation; return empty || optall.queue === false ? this.each( doAnimation ) : this.queue( optall.queue, doAnimation ); }, stop: function( type, clearQueue, gotoEnd ) { var stopQueue = function( hooks ) { var stop = hooks.stop; delete hooks.stop; stop( gotoEnd ); }; if ( typeof type !== "string" ) { gotoEnd = clearQueue; clearQueue = type; type = undefined; } if ( clearQueue && type !== false ) { this.queue( type || "fx", [] ); } return this.each(function() { var dequeue = true, index = type != null && type + "queueHooks", timers = jQuery.timers, data = jQuery._data( this ); if ( index ) { if ( data[ index ] && data[ index ].stop ) { stopQueue( data[ index ] ); } } else { for ( index in data ) { if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { stopQueue( data[ index ] ); } } } for ( index = timers.length; index--; ) { if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { timers[ index ].anim.stop( gotoEnd ); dequeue = false; timers.splice( index, 1 ); } } // start the next in the queue if the last step wasn't forced // timers currently will call their complete callbacks, which will dequeue // but only if they were gotoEnd if ( dequeue || !gotoEnd ) { jQuery.dequeue( this, type ); } }); }, finish: function( type ) { if ( type !== false ) { type = type || "fx"; } return this.each(function() { var index, data = jQuery._data( this ), queue = data[ type + "queue" ], hooks = data[ type + "queueHooks" ], timers = jQuery.timers, length = queue ? queue.length : 0; // enable finishing flag on private data data.finish = true; // empty the queue first jQuery.queue( this, type, [] ); if ( hooks && hooks.cur && hooks.cur.finish ) { hooks.cur.finish.call( this ); } // look for any active animations, and finish them for ( index = timers.length; index--; ) { if ( timers[ index ].elem === this && timers[ index ].queue === type ) { timers[ index ].anim.stop( true ); timers.splice( index, 1 ); } } // look for any animations in the old queue and finish them for ( index = 0; index < length; index++ ) { if ( queue[ index ] && queue[ index ].finish ) { queue[ index ].finish.call( this ); } } // turn off finishing flag delete data.finish; }); } }); // Generate parameters to create a standard animation function genFx( type, includeWidth ) { var which, attrs = { height: type }, i = 0; // if we include width, step value is 1 to do all cssExpand values, // if we don't include width, step value is 2 to skip over Left and Right includeWidth = includeWidth? 1 : 0; for( ; i < 4 ; i += 2 - includeWidth ) { which = cssExpand[ i ]; attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; } if ( includeWidth ) { attrs.opacity = attrs.width = type; } return attrs; } // Generate shortcuts for custom animations jQuery.each({ slideDown: genFx("show"), slideUp: genFx("hide"), slideToggle: genFx("toggle"), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } }, function( name, props ) { jQuery.fn[ name ] = function( speed, easing, callback ) { return this.animate( props, speed, easing, callback ); }; }); jQuery.speed = function( speed, easing, fn ) { var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { complete: fn || !fn && easing || jQuery.isFunction( speed ) && speed, duration: speed, easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing }; opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; // normalize opt.queue - true/undefined/null -> "fx" if ( opt.queue == null || opt.queue === true ) { opt.queue = "fx"; } // Queueing opt.old = opt.complete; opt.complete = function() { if ( jQuery.isFunction( opt.old ) ) { opt.old.call( this ); } if ( opt.queue ) { jQuery.dequeue( this, opt.queue ); } }; return opt; }; jQuery.easing = { linear: function( p ) { return p; }, swing: function( p ) { return 0.5 - Math.cos( p*Math.PI ) / 2; } }; jQuery.timers = []; jQuery.fx = Tween.prototype.init; jQuery.fx.tick = function() { var timer, timers = jQuery.timers, i = 0; fxNow = jQuery.now(); for ( ; i < timers.length; i++ ) { timer = timers[ i ]; // Checks the timer has not already been removed if ( !timer() && timers[ i ] === timer ) { timers.splice( i--, 1 ); } } if ( !timers.length ) { jQuery.fx.stop(); } fxNow = undefined; }; jQuery.fx.timer = function( timer ) { if ( timer() && jQuery.timers.push( timer ) ) { jQuery.fx.start(); } }; jQuery.fx.interval = 13; jQuery.fx.start = function() { if ( !timerId ) { timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); } }; jQuery.fx.stop = function() { clearInterval( timerId ); timerId = null; }; jQuery.fx.speeds = { slow: 600, fast: 200, // Default speed _default: 400 }; // Back Compat <1.8 extension point jQuery.fx.step = {}; if ( jQuery.expr && jQuery.expr.filters ) { jQuery.expr.filters.animated = function( elem ) { return jQuery.grep(jQuery.timers, function( fn ) { return elem === fn.elem; }).length; }; } jQuery.fn.offset = function( options ) { if ( arguments.length ) { return options === undefined ? this : this.each(function( i ) { jQuery.offset.setOffset( this, options, i ); }); } var docElem, win, box = { top: 0, left: 0 }, elem = this[ 0 ], doc = elem && elem.ownerDocument; if ( !doc ) { return; } docElem = doc.documentElement; // Make sure it's not a disconnected DOM node if ( !jQuery.contains( docElem, elem ) ) { return box; } // If we don't have gBCR, just use 0,0 rather than error // BlackBerry 5, iOS 3 (original iPhone) if ( typeof elem.getBoundingClientRect !== core_strundefined ) { box = elem.getBoundingClientRect(); } win = getWindow( doc ); return { top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ), left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 ) }; }; jQuery.offset = { setOffset: function( elem, options, i ) { var position = jQuery.css( elem, "position" ); // set position first, in-case top/left are set even on static elem if ( position === "static" ) { elem.style.position = "relative"; } var curElem = jQuery( elem ), curOffset = curElem.offset(), curCSSTop = jQuery.css( elem, "top" ), curCSSLeft = jQuery.css( elem, "left" ), calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, props = {}, curPosition = {}, curTop, curLeft; // need to be able to calculate position if either top or left is auto and position is either absolute or fixed if ( calculatePosition ) { curPosition = curElem.position(); curTop = curPosition.top; curLeft = curPosition.left; } else { curTop = parseFloat( curCSSTop ) || 0; curLeft = parseFloat( curCSSLeft ) || 0; } if ( jQuery.isFunction( options ) ) { options = options.call( elem, i, curOffset ); } if ( options.top != null ) { props.top = ( options.top - curOffset.top ) + curTop; } if ( options.left != null ) { props.left = ( options.left - curOffset.left ) + curLeft; } if ( "using" in options ) { options.using.call( elem, props ); } else { curElem.css( props ); } } }; jQuery.fn.extend({ position: function() { if ( !this[ 0 ] ) { return; } var offsetParent, offset, parentOffset = { top: 0, left: 0 }, elem = this[ 0 ]; // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent if ( jQuery.css( elem, "position" ) === "fixed" ) { // we assume that getBoundingClientRect is available when computed position is fixed offset = elem.getBoundingClientRect(); } else { // Get *real* offsetParent offsetParent = this.offsetParent(); // Get correct offsets offset = this.offset(); if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) { parentOffset = offsetParent.offset(); } // Add offsetParent borders parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ); parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ); } // Subtract parent offsets and element margins // note: when an element has margin: auto the offsetLeft and marginLeft // are the same in Safari causing offset.left to incorrectly be 0 return { top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true) }; }, offsetParent: function() { return this.map(function() { var offsetParent = this.offsetParent || document.documentElement; while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) { offsetParent = offsetParent.offsetParent; } return offsetParent || document.documentElement; }); } }); // Create scrollLeft and scrollTop methods jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { var top = /Y/.test( prop ); jQuery.fn[ method ] = function( val ) { return jQuery.access( this, function( elem, method, val ) { var win = getWindow( elem ); if ( val === undefined ) { return win ? (prop in win) ? win[ prop ] : win.document.documentElement[ method ] : elem[ method ]; } if ( win ) { win.scrollTo( !top ? val : jQuery( win ).scrollLeft(), top ? val : jQuery( win ).scrollTop() ); } else { elem[ method ] = val; } }, method, val, arguments.length, null ); }; }); function getWindow( elem ) { return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 ? elem.defaultView || elem.parentWindow : false; } // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { // margin is only for outerHeight, outerWidth jQuery.fn[ funcName ] = function( margin, value ) { var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); return jQuery.access( this, function( elem, type, value ) { var doc; if ( jQuery.isWindow( elem ) ) { // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there // isn't a whole lot we can do. See pull request at this URL for discussion: // https://github.com/jquery/jquery/pull/764 return elem.document.documentElement[ "client" + name ]; } // Get document width or height if ( elem.nodeType === 9 ) { doc = elem.documentElement; // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. return Math.max( elem.body[ "scroll" + name ], doc[ "scroll" + name ], elem.body[ "offset" + name ], doc[ "offset" + name ], doc[ "client" + name ] ); } return value === undefined ? // Get width or height on the element, requesting but not forcing parseFloat jQuery.css( elem, type, extra ) : // Set width or height on the element jQuery.style( elem, type, value, extra ); }, type, chainable ? margin : undefined, chainable, null ); }; }); }); // Limit scope pollution from any deprecated API // (function() { // })(); // Expose jQuery to the global object window.jQuery = window.$ = jQuery; // Expose jQuery as an AMD module, but only for AMD loaders that // understand the issues with loading multiple versions of jQuery // in a page that all might call define(). The loader will indicate // they have special allowances for multiple jQuery versions by // specifying define.amd.jQuery = true. Register as a named module, // since jQuery can be concatenated with other files that may use define, // but not use a proper concatenation script that understands anonymous // AMD modules. A named AMD is safest and most robust way to register. // Lowercase jquery is used because AMD module names are derived from // file names, and jQuery is normally delivered in a lowercase file name. // Do this after creating the global so that if an AMD module wants to call // noConflict to hide this version of jQuery, it will work. if ( typeof define === "function" && define.amd && define.amd.jQuery ) { define( "jquery", [], function () { return jQuery; } ); } })( window ); // Underscore.js 1.4.4 // =================== // > http://underscorejs.org // > (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc. // > Underscore may be freely distributed under the MIT license. // Baseline setup // -------------- (function() { // Establish the root object, `window` in the browser, or `global` on the server. var root = this; // Save the previous value of the `_` variable. var previousUnderscore = root._; // Establish the object that gets returned to break out of a loop iteration. var breaker = {}; // Save bytes in the minified (but not gzipped) version: var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; // Create quick reference variables for speed access to core prototypes. var push = ArrayProto.push, slice = ArrayProto.slice, concat = ArrayProto.concat, toString = ObjProto.toString, hasOwnProperty = ObjProto.hasOwnProperty; // All **ECMAScript 5** native function implementations that we hope to use // are declared here. var nativeForEach = ArrayProto.forEach, nativeMap = ArrayProto.map, nativeReduce = ArrayProto.reduce, nativeReduceRight = ArrayProto.reduceRight, nativeFilter = ArrayProto.filter, nativeEvery = ArrayProto.every, nativeSome = ArrayProto.some, nativeIndexOf = ArrayProto.indexOf, nativeLastIndexOf = ArrayProto.lastIndexOf, nativeIsArray = Array.isArray, nativeKeys = Object.keys, nativeBind = FuncProto.bind; // Create a safe reference to the Underscore object for use below. var _ = function(obj) { if (obj instanceof _) return obj; if (!(this instanceof _)) return new _(obj); this._wrapped = obj; }; // Export the Underscore object for **Node.js**, with // backwards-compatibility for the old `require()` API. If we're in // the browser, add `_` as a global object via a string identifier, // for Closure Compiler "advanced" mode. if (typeof exports !== 'undefined') { if (typeof module !== 'undefined' && module.exports) { exports = module.exports = _; } exports._ = _; } else { root._ = _; } // Current version. _.VERSION = '1.4.4'; // Collection Functions // -------------------- // The cornerstone, an `each` implementation, aka `forEach`. // Handles objects with the built-in `forEach`, arrays, and raw objects. // Delegates to **ECMAScript 5**'s native `forEach` if available. var each = _.each = _.forEach = function(obj, iterator, context) { if (obj == null) return; if (nativeForEach && obj.forEach === nativeForEach) { obj.forEach(iterator, context); } else if (obj.length === +obj.length) { for (var i = 0, l = obj.length; i < l; i++) { if (iterator.call(context, obj[i], i, obj) === breaker) return; } } else { for (var key in obj) { if (_.has(obj, key)) { if (iterator.call(context, obj[key], key, obj) === breaker) return; } } } }; // Return the results of applying the iterator to each element. // Delegates to **ECMAScript 5**'s native `map` if available. _.map = _.collect = function(obj, iterator, context) { var results = []; if (obj == null) return results; if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context); each(obj, function(value, index, list) { results[results.length] = iterator.call(context, value, index, list); }); return results; }; var reduceError = 'Reduce of empty array with no initial value'; // **Reduce** builds up a single result from a list of values, aka `inject`, // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available. _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) { var initial = arguments.length > 2; if (obj == null) obj = []; if (nativeReduce && obj.reduce === nativeReduce) { if (context) iterator = _.bind(iterator, context); return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator); } each(obj, function(value, index, list) { if (!initial) { memo = value; initial = true; } else { memo = iterator.call(context, memo, value, index, list); } }); if (!initial) throw new TypeError(reduceError); return memo; }; // The right-associative version of reduce, also known as `foldr`. // Delegates to **ECMAScript 5**'s native `reduceRight` if available. _.reduceRight = _.foldr = function(obj, iterator, memo, context) { var initial = arguments.length > 2; if (obj == null) obj = []; if (nativeReduceRight && obj.reduceRight === nativeReduceRight) { if (context) iterator = _.bind(iterator, context); return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator); } var length = obj.length; if (length !== +length) { var keys = _.keys(obj); length = keys.length; } each(obj, function(value, index, list) { index = keys ? keys[--length] : --length; if (!initial) { memo = obj[index]; initial = true; } else { memo = iterator.call(context, memo, obj[index], index, list); } }); if (!initial) throw new TypeError(reduceError); return memo; }; // Return the first value which passes a truth test. Aliased as `detect`. _.find = _.detect = function(obj, iterator, context) { var result; any(obj, function(value, index, list) { if (iterator.call(context, value, index, list)) { result = value; return true; } }); return result; }; // Return all the elements that pass a truth test. // Delegates to **ECMAScript 5**'s native `filter` if available. // Aliased as `select`. _.filter = _.select = function(obj, iterator, context) { var results = []; if (obj == null) return results; if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context); each(obj, function(value, index, list) { if (iterator.call(context, value, index, list)) results[results.length] = value; }); return results; }; // Return all the elements for which a truth test fails. _.reject = function(obj, iterator, context) { return _.filter(obj, function(value, index, list) { return !iterator.call(context, value, index, list); }, context); }; // Determine whether all of the elements match a truth test. // Delegates to **ECMAScript 5**'s native `every` if available. // Aliased as `all`. _.every = _.all = function(obj, iterator, context) { iterator || (iterator = _.identity); var result = true; if (obj == null) return result; if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context); each(obj, function(value, index, list) { if (!(result = result && iterator.call(context, value, index, list))) return breaker; }); return !!result; }; // Determine if at least one element in the object matches a truth test. // Delegates to **ECMAScript 5**'s native `some` if available. // Aliased as `any`. var any = _.some = _.any = function(obj, iterator, context) { iterator || (iterator = _.identity); var result = false; if (obj == null) return result; if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context); each(obj, function(value, index, list) { if (result || (result = iterator.call(context, value, index, list))) return breaker; }); return !!result; }; // Determine if the array or object contains a given value (using `===`). // Aliased as `include`. _.contains = _.include = function(obj, target) { if (obj == null) return false; if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1; return any(obj, function(value) { return value === target; }); }; // Invoke a method (with arguments) on every item in a collection. _.invoke = function(obj, method) { var args = slice.call(arguments, 2); var isFunc = _.isFunction(method); return _.map(obj, function(value) { return (isFunc ? method : value[method]).apply(value, args); }); }; // Convenience version of a common use case of `map`: fetching a property. _.pluck = function(obj, key) { return _.map(obj, function(value){ return value[key]; }); }; // Convenience version of a common use case of `filter`: selecting only objects // containing specific `key:value` pairs. _.where = function(obj, attrs, first) { if (_.isEmpty(attrs)) return first ? null : []; return _[first ? 'find' : 'filter'](obj, function(value) { for (var key in attrs) { if (attrs[key] !== value[key]) return false; } return true; }); }; // Convenience version of a common use case of `find`: getting the first object // containing specific `key:value` pairs. _.findWhere = function(obj, attrs) { return _.where(obj, attrs, true); }; // Return the maximum element or (element-based computation). // Can't optimize arrays of integers longer than 65,535 elements. // See: https://bugs.webkit.org/show_bug.cgi?id=80797 _.max = function(obj, iterator, context) { if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) { return Math.max.apply(Math, obj); } if (!iterator && _.isEmpty(obj)) return -Infinity; var result = {computed : -Infinity, value: -Infinity}; each(obj, function(value, index, list) { var computed = iterator ? iterator.call(context, value, index, list) : value; computed >= result.computed && (result = {value : value, computed : computed}); }); return result.value; }; // Return the minimum element (or element-based computation). _.min = function(obj, iterator, context) { if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) { return Math.min.apply(Math, obj); } if (!iterator && _.isEmpty(obj)) return Infinity; var result = {computed : Infinity, value: Infinity}; each(obj, function(value, index, list) { var computed = iterator ? iterator.call(context, value, index, list) : value; computed < result.computed && (result = {value : value, computed : computed}); }); return result.value; }; // Shuffle an array. _.shuffle = function(obj) { var rand; var index = 0; var shuffled = []; each(obj, function(value) { rand = _.random(index++); shuffled[index - 1] = shuffled[rand]; shuffled[rand] = value; }); return shuffled; }; // An internal function to generate lookup iterators. var lookupIterator = function(value) { return _.isFunction(value) ? value : function(obj){ return obj[value]; }; }; // Sort the object's values by a criterion produced by an iterator. _.sortBy = function(obj, value, context) { var iterator = lookupIterator(value); return _.pluck(_.map(obj, function(value, index, list) { return { value : value, index : index, criteria : iterator.call(context, value, index, list) }; }).sort(function(left, right) { var a = left.criteria; var b = right.criteria; if (a !== b) { if (a > b || a === void 0) return 1; if (a < b || b === void 0) return -1; } return left.index < right.index ? -1 : 1; }), 'value'); }; // An internal function used for aggregate "group by" operations. var group = function(obj, value, context, behavior) { var result = {}; var iterator = lookupIterator(value || _.identity); each(obj, function(value, index) { var key = iterator.call(context, value, index, obj); behavior(result, key, value); }); return result; }; // Groups the object's values by a criterion. Pass either a string attribute // to group by, or a function that returns the criterion. _.groupBy = function(obj, value, context) { return group(obj, value, context, function(result, key, value) { (_.has(result, key) ? result[key] : (result[key] = [])).push(value); }); }; // Counts instances of an object that group by a certain criterion. Pass // either a string attribute to count by, or a function that returns the // criterion. _.countBy = function(obj, value, context) { return group(obj, value, context, function(result, key) { if (!_.has(result, key)) result[key] = 0; result[key]++; }); }; // Use a comparator function to figure out the smallest index at which // an object should be inserted so as to maintain order. Uses binary search. _.sortedIndex = function(array, obj, iterator, context) { iterator = iterator == null ? _.identity : lookupIterator(iterator); var value = iterator.call(context, obj); var low = 0, high = array.length; while (low < high) { var mid = (low + high) >>> 1; iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid; } return low; }; // Safely convert anything iterable into a real, live array. _.toArray = function(obj) { if (!obj) return []; if (_.isArray(obj)) return slice.call(obj); if (obj.length === +obj.length) return _.map(obj, _.identity); return _.values(obj); }; // Return the number of elements in an object. _.size = function(obj) { if (obj == null) return 0; return (obj.length === +obj.length) ? obj.length : _.keys(obj).length; }; // Array Functions // --------------- // Get the first element of an array. Passing **n** will return the first N // values in the array. Aliased as `head` and `take`. The **guard** check // allows it to work with `_.map`. _.first = _.head = _.take = function(array, n, guard) { if (array == null) return void 0; return (n != null) && !guard ? slice.call(array, 0, n) : array[0]; }; // Returns everything but the last entry of the array. Especially useful on // the arguments object. Passing **n** will return all the values in // the array, excluding the last N. The **guard** check allows it to work with // `_.map`. _.initial = function(array, n, guard) { return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n)); }; // Get the last element of an array. Passing **n** will return the last N // values in the array. The **guard** check allows it to work with `_.map`. _.last = function(array, n, guard) { if (array == null) return void 0; if ((n != null) && !guard) { return slice.call(array, Math.max(array.length - n, 0)); } else { return array[array.length - 1]; } }; // Returns everything but the first entry of the array. Aliased as `tail` and `drop`. // Especially useful on the arguments object. Passing an **n** will return // the rest N values in the array. The **guard** // check allows it to work with `_.map`. _.rest = _.tail = _.drop = function(array, n, guard) { return slice.call(array, (n == null) || guard ? 1 : n); }; // Trim out all falsy values from an array. _.compact = function(array) { return _.filter(array, _.identity); }; // Internal implementation of a recursive `flatten` function. var flatten = function(input, shallow, output) { each(input, function(value) { if (_.isArray(value)) { shallow ? push.apply(output, value) : flatten(value, shallow, output); } else { output.push(value); } }); return output; }; // Return a completely flattened version of an array. _.flatten = function(array, shallow) { return flatten(array, shallow, []); }; // Return a version of the array that does not contain the specified value(s). _.without = function(array) { return _.difference(array, slice.call(arguments, 1)); }; // Produce a duplicate-free version of the array. If the array has already // been sorted, you have the option of using a faster algorithm. // Aliased as `unique`. _.uniq = _.unique = function(array, isSorted, iterator, context) { if (_.isFunction(isSorted)) { context = iterator; iterator = isSorted; isSorted = false; } var initial = iterator ? _.map(array, iterator, context) : array; var results = []; var seen = []; each(initial, function(value, index) { if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) { seen.push(value); results.push(array[index]); } }); return results; }; // Produce an array that contains the union: each distinct element from all of // the passed-in arrays. _.union = function() { return _.uniq(concat.apply(ArrayProto, arguments)); }; // Produce an array that contains every item shared between all the // passed-in arrays. _.intersection = function(array) { var rest = slice.call(arguments, 1); return _.filter(_.uniq(array), function(item) { return _.every(rest, function(other) { return _.indexOf(other, item) >= 0; }); }); }; // Take the difference between one array and a number of other arrays. // Only the elements present in just the first array will remain. _.difference = function(array) { var rest = concat.apply(ArrayProto, slice.call(arguments, 1)); return _.filter(array, function(value){ return !_.contains(rest, value); }); }; // Zip together multiple lists into a single array -- elements that share // an index go together. _.zip = function() { var args = slice.call(arguments); var length = _.max(_.pluck(args, 'length')); var results = new Array(length); for (var i = 0; i < length; i++) { results[i] = _.pluck(args, "" + i); } return results; }; // Converts lists into objects. Pass either a single array of `[key, value]` // pairs, or two parallel arrays of the same length -- one of keys, and one of // the corresponding values. _.object = function(list, values) { if (list == null) return {}; var result = {}; for (var i = 0, l = list.length; i < l; i++) { if (values) { result[list[i]] = values[i]; } else { result[list[i][0]] = list[i][1]; } } return result; }; // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**), // we need this function. Return the position of the first occurrence of an // item in an array, or -1 if the item is not included in the array. // Delegates to **ECMAScript 5**'s native `indexOf` if available. // If the array is large and already in sort order, pass `true` // for **isSorted** to use binary search. _.indexOf = function(array, item, isSorted) { if (array == null) return -1; var i = 0, l = array.length; if (isSorted) { if (typeof isSorted == 'number') { i = (isSorted < 0 ? Math.max(0, l + isSorted) : isSorted); } else { i = _.sortedIndex(array, item); return array[i] === item ? i : -1; } } if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted); for (; i < l; i++) if (array[i] === item) return i; return -1; }; // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available. _.lastIndexOf = function(array, item, from) { if (array == null) return -1; var hasIndex = from != null; if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) { return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item); } var i = (hasIndex ? from : array.length); while (i--) if (array[i] === item) return i; return -1; }; // Generate an integer Array containing an arithmetic progression. A port of // the native Python `range()` function. See // [the Python documentation](http://docs.python.org/library/functions.html#range). _.range = function(start, stop, step) { if (arguments.length <= 1) { stop = start || 0; start = 0; } step = arguments[2] || 1; var len = Math.max(Math.ceil((stop - start) / step), 0); var idx = 0; var range = new Array(len); while(idx < len) { range[idx++] = start; start += step; } return range; }; // Function (ahem) Functions // ------------------ // Create a function bound to a given object (assigning `this`, and arguments, // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if // available. _.bind = function(func, context) { if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); var args = slice.call(arguments, 2); return function() { return func.apply(context, args.concat(slice.call(arguments))); }; }; // Partially apply a function by creating a version that has had some of its // arguments pre-filled, without changing its dynamic `this` context. _.partial = function(func) { var args = slice.call(arguments, 1); return function() { return func.apply(this, args.concat(slice.call(arguments))); }; }; // Bind all of an object's methods to that object. Useful for ensuring that // all callbacks defined on an object belong to it. _.bindAll = function(obj) { var funcs = slice.call(arguments, 1); if (funcs.length === 0) funcs = _.functions(obj); each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); }); return obj; }; // Memoize an expensive function by storing its results. _.memoize = function(func, hasher) { var memo = {}; hasher || (hasher = _.identity); return function() { var key = hasher.apply(this, arguments); return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments)); }; }; // Delays a function for the given number of milliseconds, and then calls // it with the arguments supplied. _.delay = function(func, wait) { var args = slice.call(arguments, 2); return setTimeout(function(){ return func.apply(null, args); }, wait); }; // Defers a function, scheduling it to run after the current call stack has // cleared. _.defer = function(func) { return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1))); }; // Returns a function, that, when invoked, will only be triggered at most once // during a given window of time. _.throttle = function(func, wait) { var context, args, timeout, result; var previous = 0; var later = function() { previous = new Date; timeout = null; result = func.apply(context, args); }; return function() { var now = new Date; var remaining = wait - (now - previous); context = this; args = arguments; if (remaining <= 0) { clearTimeout(timeout); timeout = null; previous = now; result = func.apply(context, args); } else if (!timeout) { timeout = setTimeout(later, remaining); } return result; }; }; // Returns a function, that, as long as it continues to be invoked, will not // be triggered. The function will be called after it stops being called for // N milliseconds. If `immediate` is passed, trigger the function on the // leading edge, instead of the trailing. _.debounce = function(func, wait, immediate) { var timeout, result; return function() { var context = this, args = arguments; var later = function() { timeout = null; if (!immediate) result = func.apply(context, args); }; var callNow = immediate && !timeout; clearTimeout(timeout); timeout = setTimeout(later, wait); if (callNow) result = func.apply(context, args); return result; }; }; // Returns a function that will be executed at most one time, no matter how // often you call it. Useful for lazy initialization. _.once = function(func) { var ran = false, memo; return function() { if (ran) return memo; ran = true; memo = func.apply(this, arguments); func = null; return memo; }; }; // Returns the first function passed as an argument to the second, // allowing you to adjust arguments, run code before and after, and // conditionally execute the original function. _.wrap = function(func, wrapper) { return function() { var args = [func]; push.apply(args, arguments); return wrapper.apply(this, args); }; }; // Returns a function that is the composition of a list of functions, each // consuming the return value of the function that follows. _.compose = function() { var funcs = arguments; return function() { var args = arguments; for (var i = funcs.length - 1; i >= 0; i--) { args = [funcs[i].apply(this, args)]; } return args[0]; }; }; // Returns a function that will only be executed after being called N times. _.after = function(times, func) { if (times <= 0) return func(); return function() { if (--times < 1) { return func.apply(this, arguments); } }; }; // Object Functions // ---------------- // Retrieve the names of an object's properties. // Delegates to **ECMAScript 5**'s native `Object.keys` _.keys = nativeKeys || function(obj) { if (obj !== Object(obj)) throw new TypeError('Invalid object'); var keys = []; for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key; return keys; }; // Retrieve the values of an object's properties. _.values = function(obj) { var values = []; for (var key in obj) if (_.has(obj, key)) values.push(obj[key]); return values; }; // Convert an object into a list of `[key, value]` pairs. _.pairs = function(obj) { var pairs = []; for (var key in obj) if (_.has(obj, key)) pairs.push([key, obj[key]]); return pairs; }; // Invert the keys and values of an object. The values must be serializable. _.invert = function(obj) { var result = {}; for (var key in obj) if (_.has(obj, key)) result[obj[key]] = key; return result; }; // Return a sorted list of the function names available on the object. // Aliased as `methods` _.functions = _.methods = function(obj) { var names = []; for (var key in obj) { if (_.isFunction(obj[key])) names.push(key); } return names.sort(); }; // Extend a given object with all the properties in passed-in object(s). _.extend = function(obj) { each(slice.call(arguments, 1), function(source) { if (source) { for (var prop in source) { obj[prop] = source[prop]; } } }); return obj; }; // Return a copy of the object only containing the whitelisted properties. _.pick = function(obj) { var copy = {}; var keys = concat.apply(ArrayProto, slice.call(arguments, 1)); each(keys, function(key) { if (key in obj) copy[key] = obj[key]; }); return copy; }; // Return a copy of the object without the blacklisted properties. _.omit = function(obj) { var copy = {}; var keys = concat.apply(ArrayProto, slice.call(arguments, 1)); for (var key in obj) { if (!_.contains(keys, key)) copy[key] = obj[key]; } return copy; }; // Fill in a given object with default properties. _.defaults = function(obj) { each(slice.call(arguments, 1), function(source) { if (source) { for (var prop in source) { if (obj[prop] == null) obj[prop] = source[prop]; } } }); return obj; }; // Create a (shallow-cloned) duplicate of an object. _.clone = function(obj) { if (!_.isObject(obj)) return obj; return _.isArray(obj) ? obj.slice() : _.extend({}, obj); }; // Invokes interceptor with the obj, and then returns obj. // The primary purpose of this method is to "tap into" a method chain, in // order to perform operations on intermediate results within the chain. _.tap = function(obj, interceptor) { interceptor(obj); return obj; }; // Internal recursive comparison function for `isEqual`. var eq = function(a, b, aStack, bStack) { // Identical objects are equal. `0 === -0`, but they aren't identical. // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal. if (a === b) return a !== 0 || 1 / a == 1 / b; // A strict comparison is necessary because `null == undefined`. if (a == null || b == null) return a === b; // Unwrap any wrapped objects. if (a instanceof _) a = a._wrapped; if (b instanceof _) b = b._wrapped; // Compare `[[Class]]` names. var className = toString.call(a); if (className != toString.call(b)) return false; switch (className) { // Strings, numbers, dates, and booleans are compared by value. case '[object String]': // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is // equivalent to `new String("5")`. return a == String(b); case '[object Number]': // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for // other numeric values. return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b); case '[object Date]': case '[object Boolean]': // Coerce dates and booleans to numeric primitive values. Dates are compared by their // millisecond representations. Note that invalid dates with millisecond representations // of `NaN` are not equivalent. return +a == +b; // RegExps are compared by their source patterns and flags. case '[object RegExp]': return a.source == b.source && a.global == b.global && a.multiline == b.multiline && a.ignoreCase == b.ignoreCase; } if (typeof a != 'object' || typeof b != 'object') return false; // Assume equality for cyclic structures. The algorithm for detecting cyclic // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. var length = aStack.length; while (length--) { // Linear search. Performance is inversely proportional to the number of // unique nested structures. if (aStack[length] == a) return bStack[length] == b; } // Add the first object to the stack of traversed objects. aStack.push(a); bStack.push(b); var size = 0, result = true; // Recursively compare objects and arrays. if (className == '[object Array]') { // Compare array lengths to determine if a deep comparison is necessary. size = a.length; result = size == b.length; if (result) { // Deep compare the contents, ignoring non-numeric properties. while (size--) { if (!(result = eq(a[size], b[size], aStack, bStack))) break; } } } else { // Objects with different constructors are not equivalent, but `Object`s // from different frames are. var aCtor = a.constructor, bCtor = b.constructor; if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) && _.isFunction(bCtor) && (bCtor instanceof bCtor))) { return false; } // Deep compare objects. for (var key in a) { if (_.has(a, key)) { // Count the expected number of properties. size++; // Deep compare each member. if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break; } } // Ensure that both objects contain the same number of properties. if (result) { for (key in b) { if (_.has(b, key) && !(size--)) break; } result = !size; } } // Remove the first object from the stack of traversed objects. aStack.pop(); bStack.pop(); return result; }; // Perform a deep comparison to check if two objects are equal. _.isEqual = function(a, b) { return eq(a, b, [], []); }; // Is a given array, string, or object empty? // An "empty" object has no enumerable own-properties. _.isEmpty = function(obj) { if (obj == null) return true; if (_.isArray(obj) || _.isString(obj)) return obj.length === 0; for (var key in obj) if (_.has(obj, key)) return false; return true; }; // Is a given value a DOM element? _.isElement = function(obj) { return !!(obj && obj.nodeType === 1); }; // Is a given value an array? // Delegates to ECMA5's native Array.isArray _.isArray = nativeIsArray || function(obj) { return toString.call(obj) == '[object Array]'; }; // Is a given variable an object? _.isObject = function(obj) { return obj === Object(obj); }; // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp. each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) { _['is' + name] = function(obj) { return toString.call(obj) == '[object ' + name + ']'; }; }); // Define a fallback version of the method in browsers (ahem, IE), where // there isn't any inspectable "Arguments" type. if (!_.isArguments(arguments)) { _.isArguments = function(obj) { return !!(obj && _.has(obj, 'callee')); }; } // Optimize `isFunction` if appropriate. if (typeof (/./) !== 'function') { _.isFunction = function(obj) { return typeof obj === 'function'; }; } // Is a given object a finite number? _.isFinite = function(obj) { return isFinite(obj) && !isNaN(parseFloat(obj)); }; // Is the given value `NaN`? (NaN is the only number which does not equal itself). _.isNaN = function(obj) { return _.isNumber(obj) && obj != +obj; }; // Is a given value a boolean? _.isBoolean = function(obj) { return obj === true || obj === false || toString.call(obj) == '[object Boolean]'; }; // Is a given value equal to null? _.isNull = function(obj) { return obj === null; }; // Is a given variable undefined? _.isUndefined = function(obj) { return obj === void 0; }; // Shortcut function for checking if an object has a given property directly // on itself (in other words, not on a prototype). _.has = function(obj, key) { return hasOwnProperty.call(obj, key); }; // Utility Functions // ----------------- // Run Underscore.js in *noConflict* mode, returning the `_` variable to its // previous owner. Returns a reference to the Underscore object. _.noConflict = function() { root._ = previousUnderscore; return this; }; // Keep the identity function around for default iterators. _.identity = function(value) { return value; }; // Run a function **n** times. _.times = function(n, iterator, context) { var accum = Array(n); for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i); return accum; }; // Return a random integer between min and max (inclusive). _.random = function(min, max) { if (max == null) { max = min; min = 0; } return min + Math.floor(Math.random() * (max - min + 1)); }; // List of HTML entities for escaping. var entityMap = { escape: { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#x27;', '/': '&#x2F;' } }; entityMap.unescape = _.invert(entityMap.escape); // Regexes containing the keys and values listed immediately above. var entityRegexes = { escape: new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'), unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g') }; // Functions for escaping and unescaping strings to/from HTML interpolation. _.each(['escape', 'unescape'], function(method) { _[method] = function(string) { if (string == null) return ''; return ('' + string).replace(entityRegexes[method], function(match) { return entityMap[method][match]; }); }; }); // If the value of the named property is a function then invoke it; // otherwise, return it. _.result = function(object, property) { if (object == null) return null; var value = object[property]; return _.isFunction(value) ? value.call(object) : value; }; // Add your own custom functions to the Underscore object. _.mixin = function(obj) { each(_.functions(obj), function(name){ var func = _[name] = obj[name]; _.prototype[name] = function() { var args = [this._wrapped]; push.apply(args, arguments); return result.call(this, func.apply(_, args)); }; }); }; // Generate a unique integer id (unique within the entire client session). // Useful for temporary DOM ids. var idCounter = 0; _.uniqueId = function(prefix) { var id = ++idCounter + ''; return prefix ? prefix + id : id; }; // By default, Underscore uses ERB-style template delimiters, change the // following template settings to use alternative delimiters. _.templateSettings = { evaluate : /<%([\s\S]+?)%>/g, interpolate : /<%=([\s\S]+?)%>/g, escape : /<%-([\s\S]+?)%>/g }; // When customizing `templateSettings`, if you don't want to define an // interpolation, evaluation or escaping regex, we need one that is // guaranteed not to match. var noMatch = /(.)^/; // Certain characters need to be escaped so that they can be put into a // string literal. var escapes = { "'": "'", '\\': '\\', '\r': 'r', '\n': 'n', '\t': 't', '\u2028': 'u2028', '\u2029': 'u2029' }; var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g; // JavaScript micro-templating, similar to John Resig's implementation. // Underscore templating handles arbitrary delimiters, preserves whitespace, // and correctly escapes quotes within interpolated code. _.template = function(text, data, settings) { var render; settings = _.defaults({}, settings, _.templateSettings); // Combine delimiters into one regular expression via alternation. var matcher = new RegExp([ (settings.escape || noMatch).source, (settings.interpolate || noMatch).source, (settings.evaluate || noMatch).source ].join('|') + '|$', 'g'); // Compile the template source, escaping string literals appropriately. var index = 0; var source = "__p+='"; text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { source += text.slice(index, offset) .replace(escaper, function(match) { return '\\' + escapes[match]; }); if (escape) { source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; } if (interpolate) { source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; } if (evaluate) { source += "';\n" + evaluate + "\n__p+='"; } index = offset + match.length; return match; }); source += "';\n"; // If a variable is not specified, place data values in local scope. if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; source = "var __t,__p='',__j=Array.prototype.join," + "print=function(){__p+=__j.call(arguments,'');};\n" + source + "return __p;\n"; try { render = new Function(settings.variable || 'obj', '_', source); } catch (e) { e.source = source; throw e; } if (data) return render(data, _); var template = function(data) { return render.call(this, data, _); }; // Provide the compiled function source as a convenience for precompilation. template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}'; return template; }; // Add a "chain" function, which will delegate to the wrapper. _.chain = function(obj) { return _(obj).chain(); }; // OOP // --------------- // If Underscore is called as a function, it returns a wrapped object that // can be used OO-style. This wrapper holds altered versions of all the // underscore functions. Wrapped objects may be chained. // Helper function to continue chaining intermediate results. var result = function(obj) { return this._chain ? _(obj).chain() : obj; }; // Add all of the Underscore functions to the wrapper object. _.mixin(_); // Add all mutator Array functions to the wrapper. each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { var method = ArrayProto[name]; _.prototype[name] = function() { var obj = this._wrapped; method.apply(obj, arguments); if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0]; return result.call(this, obj); }; }); // Add all accessor Array functions to the wrapper. each(['concat', 'join', 'slice'], function(name) { var method = ArrayProto[name]; _.prototype[name] = function() { return result.call(this, method.apply(this._wrapped, arguments)); }; }); _.extend(_.prototype, { // Start chaining a wrapped Underscore object. chain: function() { this._chain = true; return this; }, // Extracts the result from a wrapped and chained object. value: function() { return this._wrapped; } }); }).call(this); // Backbone.js 1.0.0 // (c) 2010-2013 Jeremy Ashkenas, DocumentCloud Inc. // Backbone may be freely distributed under the MIT license. // For all details and documentation: // http://backbonejs.org (function(){ // Initial Setup // ------------- // Save a reference to the global object (`window` in the browser, `exports` // on the server). var root = this; // Save the previous value of the `Backbone` variable, so that it can be // restored later on, if `noConflict` is used. var previousBackbone = root.Backbone; // Create local references to array methods we'll want to use later. var array = []; var push = array.push; var slice = array.slice; var splice = array.splice; // The top-level namespace. All public Backbone classes and modules will // be attached to this. Exported for both the browser and the server. var Backbone; if (typeof exports !== 'undefined') { Backbone = exports; } else { Backbone = root.Backbone = {}; } // Current version of the library. Keep in sync with `package.json`. Backbone.VERSION = '1.0.0'; // Require Underscore, if we're on the server, and it's not already present. var _ = root._; if (!_ && (typeof require !== 'undefined')) _ = require('underscore'); // For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns // the `$` variable. Backbone.$ = root.jQuery || root.Zepto || root.ender || root.$; // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable // to its previous owner. Returns a reference to this Backbone object. Backbone.noConflict = function() { root.Backbone = previousBackbone; return this; }; // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option // will fake `"PUT"` and `"DELETE"` requests via the `_method` parameter and // set a `X-Http-Method-Override` header. Backbone.emulateHTTP = false; // Turn on `emulateJSON` to support legacy servers that can't deal with direct // `application/json` requests ... will encode the body as // `application/x-www-form-urlencoded` instead and will send the model in a // form param named `model`. Backbone.emulateJSON = false; // Backbone.Events // --------------- // A module that can be mixed in to *any object* in order to provide it with // custom events. You may bind with `on` or remove with `off` callback // functions to an event; `trigger`-ing an event fires all callbacks in // succession. // // var object = {}; // _.extend(object, Backbone.Events); // object.on('expand', function(){ alert('expanded'); }); // object.trigger('expand'); // var Events = Backbone.Events = { // Bind an event to a `callback` function. Passing `"all"` will bind // the callback to all events fired. on: function(name, callback, context) { if (!eventsApi(this, 'on', name, [callback, context]) || !callback) return this; this._events || (this._events = {}); var events = this._events[name] || (this._events[name] = []); events.push({callback: callback, context: context, ctx: context || this}); return this; }, // Bind an event to only be triggered a single time. After the first time // the callback is invoked, it will be removed. once: function(name, callback, context) { if (!eventsApi(this, 'once', name, [callback, context]) || !callback) return this; var self = this; var once = _.once(function() { self.off(name, once); callback.apply(this, arguments); }); once._callback = callback; return this.on(name, once, context); }, // Remove one or many callbacks. If `context` is null, removes all // callbacks with that function. If `callback` is null, removes all // callbacks for the event. If `name` is null, removes all bound // callbacks for all events. off: function(name, callback, context) { var retain, ev, events, names, i, l, j, k; if (!this._events || !eventsApi(this, 'off', name, [callback, context])) return this; if (!name && !callback && !context) { this._events = {}; return this; } names = name ? [name] : _.keys(this._events); for (i = 0, l = names.length; i < l; i++) { name = names[i]; if (events = this._events[name]) { this._events[name] = retain = []; if (callback || context) { for (j = 0, k = events.length; j < k; j++) { ev = events[j]; if ((callback && callback !== ev.callback && callback !== ev.callback._callback) || (context && context !== ev.context)) { retain.push(ev); } } } if (!retain.length) delete this._events[name]; } } return this; }, // Trigger one or many events, firing all bound callbacks. Callbacks are // passed the same arguments as `trigger` is, apart from the event name // (unless you're listening on `"all"`, which will cause your callback to // receive the true name of the event as the first argument). trigger: function(name) { if (!this._events) return this; var args = slice.call(arguments, 1); if (!eventsApi(this, 'trigger', name, args)) return this; var events = this._events[name]; var allEvents = this._events.all; if (events) triggerEvents(events, args); if (allEvents) triggerEvents(allEvents, arguments); return this; }, // Tell this object to stop listening to either specific events ... or // to every object it's currently listening to. stopListening: function(obj, name, callback) { var listeners = this._listeners; if (!listeners) return this; var deleteListener = !name && !callback; if (typeof name === 'object') callback = this; if (obj) (listeners = {})[obj._listenerId] = obj; for (var id in listeners) { listeners[id].off(name, callback, this); if (deleteListener) delete this._listeners[id]; } return this; } }; // Regular expression used to split event strings. var eventSplitter = /\s+/; // Implement fancy features of the Events API such as multiple event // names `"change blur"` and jQuery-style event maps `{change: action}` // in terms of the existing API. var eventsApi = function(obj, action, name, rest) { if (!name) return true; // Handle event maps. if (typeof name === 'object') { for (var key in name) { obj[action].apply(obj, [key, name[key]].concat(rest)); } return false; } // Handle space separated event names. if (eventSplitter.test(name)) { var names = name.split(eventSplitter); for (var i = 0, l = names.length; i < l; i++) { obj[action].apply(obj, [names[i]].concat(rest)); } return false; } return true; }; // A difficult-to-believe, but optimized internal dispatch function for // triggering events. Tries to keep the usual cases speedy (most internal // Backbone events have 3 arguments). var triggerEvents = function(events, args) { var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2]; switch (args.length) { case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx); return; case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1); return; case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2); return; case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); return; default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args); } }; var listenMethods = {listenTo: 'on', listenToOnce: 'once'}; // Inversion-of-control versions of `on` and `once`. Tell *this* object to // listen to an event in another object ... keeping track of what it's // listening to. _.each(listenMethods, function(implementation, method) { Events[method] = function(obj, name, callback) { var listeners = this._listeners || (this._listeners = {}); var id = obj._listenerId || (obj._listenerId = _.uniqueId('l')); listeners[id] = obj; if (typeof name === 'object') callback = this; obj[implementation](name, callback, this); return this; }; }); // Aliases for backwards compatibility. Events.bind = Events.on; Events.unbind = Events.off; // Allow the `Backbone` object to serve as a global event bus, for folks who // want global "pubsub" in a convenient place. _.extend(Backbone, Events); // Backbone.Model // -------------- // Backbone **Models** are the basic data object in the framework -- // frequently representing a row in a table in a database on your server. // A discrete chunk of data and a bunch of useful, related methods for // performing computations and transformations on that data. // Create a new model with the specified attributes. A client id (`cid`) // is automatically generated and assigned for you. var Model = Backbone.Model = function(attributes, options) { var defaults; var attrs = attributes || {}; options || (options = {}); this.cid = _.uniqueId('c'); this.attributes = {}; _.extend(this, _.pick(options, modelOptions)); if (options.parse) attrs = this.parse(attrs, options) || {}; if (defaults = _.result(this, 'defaults')) { attrs = _.defaults({}, attrs, defaults); } this.set(attrs, options); this.changed = {}; this.initialize.apply(this, arguments); }; // A list of options to be attached directly to the model, if provided. var modelOptions = ['url', 'urlRoot', 'collection']; // Attach all inheritable methods to the Model prototype. _.extend(Model.prototype, Events, { // A hash of attributes whose current and previous value differ. changed: null, // The value returned during the last failed validation. validationError: null, // The default name for the JSON `id` attribute is `"id"`. MongoDB and // CouchDB users may want to set this to `"_id"`. idAttribute: 'id', // Initialize is an empty function by default. Override it with your own // initialization logic. initialize: function(){}, // Return a copy of the model's `attributes` object. toJSON: function(options) { return _.clone(this.attributes); }, // Proxy `Backbone.sync` by default -- but override this if you need // custom syncing semantics for *this* particular model. sync: function() { return Backbone.sync.apply(this, arguments); }, // Get the value of an attribute. get: function(attr) { return this.attributes[attr]; }, // Get the HTML-escaped value of an attribute. escape: function(attr) { return _.escape(this.get(attr)); }, // Returns `true` if the attribute contains a value that is not null // or undefined. has: function(attr) { return this.get(attr) != null; }, // Set a hash of model attributes on the object, firing `"change"`. This is // the core primitive operation of a model, updating the data and notifying // anyone who needs to know about the change in state. The heart of the beast. set: function(key, val, options) { var attr, attrs, unset, changes, silent, changing, prev, current; if (key == null) return this; // Handle both `"key", value` and `{key: value}` -style arguments. if (typeof key === 'object') { attrs = key; options = val; } else { (attrs = {})[key] = val; } options || (options = {}); // Run validation. if (!this._validate(attrs, options)) return false; // Extract attributes and options. unset = options.unset; silent = options.silent; changes = []; changing = this._changing; this._changing = true; if (!changing) { this._previousAttributes = _.clone(this.attributes); this.changed = {}; } current = this.attributes, prev = this._previousAttributes; // Check for changes of `id`. if (this.idAttribute in attrs) this.id = attrs[this.idAttribute]; // For each `set` attribute, update or delete the current value. for (attr in attrs) { val = attrs[attr]; if (!_.isEqual(current[attr], val)) changes.push(attr); if (!_.isEqual(prev[attr], val)) { this.changed[attr] = val; } else { delete this.changed[attr]; } unset ? delete current[attr] : current[attr] = val; } // Trigger all relevant attribute changes. if (!silent) { if (changes.length) this._pending = true; for (var i = 0, l = changes.length; i < l; i++) { this.trigger('change:' + changes[i], this, current[changes[i]], options); } } // You might be wondering why there's a `while` loop here. Changes can // be recursively nested within `"change"` events. if (changing) return this; if (!silent) { while (this._pending) { this._pending = false; this.trigger('change', this, options); } } this._pending = false; this._changing = false; return this; }, // Remove an attribute from the model, firing `"change"`. `unset` is a noop // if the attribute doesn't exist. unset: function(attr, options) { return this.set(attr, void 0, _.extend({}, options, {unset: true})); }, // Clear all attributes on the model, firing `"change"`. clear: function(options) { var attrs = {}; for (var key in this.attributes) attrs[key] = void 0; return this.set(attrs, _.extend({}, options, {unset: true})); }, // Determine if the model has changed since the last `"change"` event. // If you specify an attribute name, determine if that attribute has changed. hasChanged: function(attr) { if (attr == null) return !_.isEmpty(this.changed); return _.has(this.changed, attr); }, // Return an object containing all the attributes that have changed, or // false if there are no changed attributes. Useful for determining what // parts of a view need to be updated and/or what attributes need to be // persisted to the server. Unset attributes will be set to undefined. // You can also pass an attributes object to diff against the model, // determining if there *would be* a change. changedAttributes: function(diff) { if (!diff) return this.hasChanged() ? _.clone(this.changed) : false; var val, changed = false; var old = this._changing ? this._previousAttributes : this.attributes; for (var attr in diff) { if (_.isEqual(old[attr], (val = diff[attr]))) continue; (changed || (changed = {}))[attr] = val; } return changed; }, // Get the previous value of an attribute, recorded at the time the last // `"change"` event was fired. previous: function(attr) { if (attr == null || !this._previousAttributes) return null; return this._previousAttributes[attr]; }, // Get all of the attributes of the model at the time of the previous // `"change"` event. previousAttributes: function() { return _.clone(this._previousAttributes); }, // Fetch the model from the server. If the server's representation of the // model differs from its current attributes, they will be overridden, // triggering a `"change"` event. fetch: function(options) { options = options ? _.clone(options) : {}; if (options.parse === void 0) options.parse = true; var model = this; var success = options.success; options.success = function(resp) { if (!model.set(model.parse(resp, options), options)) return false; if (success) success(model, resp, options); model.trigger('sync', model, resp, options); }; wrapError(this, options); return this.sync('read', this, options); }, // Set a hash of model attributes, and sync the model to the server. // If the server returns an attributes hash that differs, the model's // state will be `set` again. save: function(key, val, options) { var attrs, method, xhr, attributes = this.attributes; // Handle both `"key", value` and `{key: value}` -style arguments. if (key == null || typeof key === 'object') { attrs = key; options = val; } else { (attrs = {})[key] = val; } // If we're not waiting and attributes exist, save acts as `set(attr).save(null, opts)`. if (attrs && (!options || !options.wait) && !this.set(attrs, options)) return false; options = _.extend({validate: true}, options); // Do not persist invalid models. if (!this._validate(attrs, options)) return false; // Set temporary attributes if `{wait: true}`. if (attrs && options.wait) { this.attributes = _.extend({}, attributes, attrs); } // After a successful server-side save, the client is (optionally) // updated with the server-side state. if (options.parse === void 0) options.parse = true; var model = this; var success = options.success; options.success = function(resp) { // Ensure attributes are restored during synchronous saves. model.attributes = attributes; var serverAttrs = model.parse(resp, options); if (options.wait) serverAttrs = _.extend(attrs || {}, serverAttrs); if (_.isObject(serverAttrs) && !model.set(serverAttrs, options)) { return false; } if (success) success(model, resp, options); model.trigger('sync', model, resp, options); }; wrapError(this, options); method = this.isNew() ? 'create' : (options.patch ? 'patch' : 'update'); if (method === 'patch') options.attrs = attrs; xhr = this.sync(method, this, options); // Restore attributes. if (attrs && options.wait) this.attributes = attributes; return xhr; }, // Destroy this model on the server if it was already persisted. // Optimistically removes the model from its collection, if it has one. // If `wait: true` is passed, waits for the server to respond before removal. destroy: function(options) { options = options ? _.clone(options) : {}; var model = this; var success = options.success; var destroy = function() { model.trigger('destroy', model, model.collection, options); }; options.success = function(resp) { if (options.wait || model.isNew()) destroy(); if (success) success(model, resp, options); if (!model.isNew()) model.trigger('sync', model, resp, options); }; if (this.isNew()) { options.success(); return false; } wrapError(this, options); var xhr = this.sync('delete', this, options); if (!options.wait) destroy(); return xhr; }, // Default URL for the model's representation on the server -- if you're // using Backbone's restful methods, override this to change the endpoint // that will be called. url: function() { var base = _.result(this, 'urlRoot') || _.result(this.collection, 'url') || urlError(); if (this.isNew()) return base; return base + (base.charAt(base.length - 1) === '/' ? '' : '/') + encodeURIComponent(this.id); }, // **parse** converts a response into the hash of attributes to be `set` on // the model. The default implementation is just to pass the response along. parse: function(resp, options) { return resp; }, // Create a new model with identical attributes to this one. clone: function() { return new this.constructor(this.attributes); }, // A model is new if it has never been saved to the server, and lacks an id. isNew: function() { return this.id == null; }, // Check if the model is currently in a valid state. isValid: function(options) { return this._validate({}, _.extend(options || {}, { validate: true })); }, // Run validation against the next complete set of model attributes, // returning `true` if all is well. Otherwise, fire an `"invalid"` event. _validate: function(attrs, options) { if (!options.validate || !this.validate) return true; attrs = _.extend({}, this.attributes, attrs); var error = this.validationError = this.validate(attrs, options) || null; if (!error) return true; this.trigger('invalid', this, error, _.extend(options || {}, {validationError: error})); return false; } }); // Underscore methods that we want to implement on the Model. var modelMethods = ['keys', 'values', 'pairs', 'invert', 'pick', 'omit']; // Mix in each Underscore method as a proxy to `Model#attributes`. _.each(modelMethods, function(method) { Model.prototype[method] = function() { var args = slice.call(arguments); args.unshift(this.attributes); return _[method].apply(_, args); }; }); // Backbone.Collection // ------------------- // If models tend to represent a single row of data, a Backbone Collection is // more analagous to a table full of data ... or a small slice or page of that // table, or a collection of rows that belong together for a particular reason // -- all of the messages in this particular folder, all of the documents // belonging to this particular author, and so on. Collections maintain // indexes of their models, both in order, and for lookup by `id`. // Create a new **Collection**, perhaps to contain a specific type of `model`. // If a `comparator` is specified, the Collection will maintain // its models in sort order, as they're added and removed. var Collection = Backbone.Collection = function(models, options) { options || (options = {}); if (options.url) this.url = options.url; if (options.model) this.model = options.model; if (options.comparator !== void 0) this.comparator = options.comparator; this._reset(); this.initialize.apply(this, arguments); if (models) this.reset(models, _.extend({silent: true}, options)); }; // Default options for `Collection#set`. var setOptions = {add: true, remove: true, merge: true}; var addOptions = {add: true, merge: false, remove: false}; // Define the Collection's inheritable methods. _.extend(Collection.prototype, Events, { // The default model for a collection is just a **Backbone.Model**. // This should be overridden in most cases. model: Model, // Initialize is an empty function by default. Override it with your own // initialization logic. initialize: function(){}, // The JSON representation of a Collection is an array of the // models' attributes. toJSON: function(options) { return this.map(function(model){ return model.toJSON(options); }); }, // Proxy `Backbone.sync` by default. sync: function() { return Backbone.sync.apply(this, arguments); }, // Add a model, or list of models to the set. add: function(models, options) { return this.set(models, _.defaults(options || {}, addOptions)); }, // Remove a model, or a list of models from the set. remove: function(models, options) { models = _.isArray(models) ? models.slice() : [models]; options || (options = {}); var i, l, index, model; for (i = 0, l = models.length; i < l; i++) { model = this.get(models[i]); if (!model) continue; delete this._byId[model.id]; delete this._byId[model.cid]; index = this.indexOf(model); this.models.splice(index, 1); this.length--; if (!options.silent) { options.index = index; model.trigger('remove', model, this, options); } this._removeReference(model); } return this; }, // Update a collection by `set`-ing a new list of models, adding new ones, // removing models that are no longer present, and merging models that // already exist in the collection, as necessary. Similar to **Model#set**, // the core operation for updating the data contained by the collection. set: function(models, options) { options = _.defaults(options || {}, setOptions); if (options.parse) models = this.parse(models, options); if (!_.isArray(models)) models = models ? [models] : []; var i, l, model, attrs, existing, sort; var at = options.at; var sortable = this.comparator && (at == null) && options.sort !== false; var sortAttr = _.isString(this.comparator) ? this.comparator : null; var toAdd = [], toRemove = [], modelMap = {}; // Turn bare objects into model references, and prevent invalid models // from being added. for (i = 0, l = models.length; i < l; i++) { if (!(model = this._prepareModel(models[i], options))) continue; // If a duplicate is found, prevent it from being added and // optionally merge it into the existing model. if (existing = this.get(model)) { if (options.remove) modelMap[existing.cid] = true; if (options.merge) { existing.set(model.attributes, options); if (sortable && !sort && existing.hasChanged(sortAttr)) sort = true; } // This is a new model, push it to the `toAdd` list. } else if (options.add) { toAdd.push(model); // Listen to added models' events, and index models for lookup by // `id` and by `cid`. model.on('all', this._onModelEvent, this); this._byId[model.cid] = model; if (model.id != null) this._byId[model.id] = model; } } // Remove nonexistent models if appropriate. if (options.remove) { for (i = 0, l = this.length; i < l; ++i) { if (!modelMap[(model = this.models[i]).cid]) toRemove.push(model); } if (toRemove.length) this.remove(toRemove, options); } // See if sorting is needed, update `length` and splice in new models. if (toAdd.length) { if (sortable) sort = true; this.length += toAdd.length; if (at != null) { splice.apply(this.models, [at, 0].concat(toAdd)); } else { push.apply(this.models, toAdd); } } // Silently sort the collection if appropriate. if (sort) this.sort({silent: true}); if (options.silent) return this; // Trigger `add` events. for (i = 0, l = toAdd.length; i < l; i++) { (model = toAdd[i]).trigger('add', model, this, options); } // Trigger `sort` if the collection was sorted. if (sort) this.trigger('sort', this, options); return this; }, // When you have more items than you want to add or remove individually, // you can reset the entire set with a new list of models, without firing // any granular `add` or `remove` events. Fires `reset` when finished. // Useful for bulk operations and optimizations. reset: function(models, options) { options || (options = {}); for (var i = 0, l = this.models.length; i < l; i++) { this._removeReference(this.models[i]); } options.previousModels = this.models; this._reset(); this.add(models, _.extend({silent: true}, options)); if (!options.silent) this.trigger('reset', this, options); return this; }, // Add a model to the end of the collection. push: function(model, options) { model = this._prepareModel(model, options); this.add(model, _.extend({at: this.length}, options)); return model; }, // Remove a model from the end of the collection. pop: function(options) { var model = this.at(this.length - 1); this.remove(model, options); return model; }, // Add a model to the beginning of the collection. unshift: function(model, options) { model = this._prepareModel(model, options); this.add(model, _.extend({at: 0}, options)); return model; }, // Remove a model from the beginning of the collection. shift: function(options) { var model = this.at(0); this.remove(model, options); return model; }, // Slice out a sub-array of models from the collection. slice: function(begin, end) { return this.models.slice(begin, end); }, // Get a model from the set by id. get: function(obj) { if (obj == null) return void 0; return this._byId[obj.id != null ? obj.id : obj.cid || obj]; }, // Get the model at the given index. at: function(index) { return this.models[index]; }, // Return models with matching attributes. Useful for simple cases of // `filter`. where: function(attrs, first) { if (_.isEmpty(attrs)) return first ? void 0 : []; return this[first ? 'find' : 'filter'](function(model) { for (var key in attrs) { if (attrs[key] !== model.get(key)) return false; } return true; }); }, // Return the first model with matching attributes. Useful for simple cases // of `find`. findWhere: function(attrs) { return this.where(attrs, true); }, // Force the collection to re-sort itself. You don't need to call this under // normal circumstances, as the set will maintain sort order as each item // is added. sort: function(options) { if (!this.comparator) throw new Error('Cannot sort a set without a comparator'); options || (options = {}); // Run sort based on type of `comparator`. if (_.isString(this.comparator) || this.comparator.length === 1) { this.models = this.sortBy(this.comparator, this); } else { this.models.sort(_.bind(this.comparator, this)); } if (!options.silent) this.trigger('sort', this, options); return this; }, // Figure out the smallest index at which a model should be inserted so as // to maintain order. sortedIndex: function(model, value, context) { value || (value = this.comparator); var iterator = _.isFunction(value) ? value : function(model) { return model.get(value); }; return _.sortedIndex(this.models, model, iterator, context); }, // Pluck an attribute from each model in the collection. pluck: function(attr) { return _.invoke(this.models, 'get', attr); }, // Fetch the default set of models for this collection, resetting the // collection when they arrive. If `reset: true` is passed, the response // data will be passed through the `reset` method instead of `set`. fetch: function(options) { options = options ? _.clone(options) : {}; if (options.parse === void 0) options.parse = true; var success = options.success; var collection = this; options.success = function(resp) { var method = options.reset ? 'reset' : 'set'; collection[method](resp, options); if (success) success(collection, resp, options); collection.trigger('sync', collection, resp, options); }; wrapError(this, options); return this.sync('read', this, options); }, // Create a new instance of a model in this collection. Add the model to the // collection immediately, unless `wait: true` is passed, in which case we // wait for the server to agree. create: function(model, options) { options = options ? _.clone(options) : {}; if (!(model = this._prepareModel(model, options))) return false; if (!options.wait) this.add(model, options); var collection = this; var success = options.success; options.success = function(resp) { if (options.wait) collection.add(model, options); if (success) success(model, resp, options); }; model.save(null, options); return model; }, // **parse** converts a response into a list of models to be added to the // collection. The default implementation is just to pass it through. parse: function(resp, options) { return resp; }, // Create a new collection with an identical list of models as this one. clone: function() { return new this.constructor(this.models); }, // Private method to reset all internal state. Called when the collection // is first initialized or reset. _reset: function() { this.length = 0; this.models = []; this._byId = {}; }, // Prepare a hash of attributes (or other model) to be added to this // collection. _prepareModel: function(attrs, options) { if (attrs instanceof Model) { if (!attrs.collection) attrs.collection = this; return attrs; } options || (options = {}); options.collection = this; var model = new this.model(attrs, options); if (!model._validate(attrs, options)) { this.trigger('invalid', this, attrs, options); return false; } return model; }, // Internal method to sever a model's ties to a collection. _removeReference: function(model) { if (this === model.collection) delete model.collection; model.off('all', this._onModelEvent, this); }, // Internal method called every time a model in the set fires an event. // Sets need to update their indexes when models change ids. All other // events simply proxy through. "add" and "remove" events that originate // in other collections are ignored. _onModelEvent: function(event, model, collection, options) { if ((event === 'add' || event === 'remove') && collection !== this) return; if (event === 'destroy') this.remove(model, options); if (model && event === 'change:' + model.idAttribute) { delete this._byId[model.previous(model.idAttribute)]; if (model.id != null) this._byId[model.id] = model; } this.trigger.apply(this, arguments); } }); // Underscore methods that we want to implement on the Collection. // 90% of the core usefulness of Backbone Collections is actually implemented // right here: var methods = ['forEach', 'each', 'map', 'collect', 'reduce', 'foldl', 'inject', 'reduceRight', 'foldr', 'find', 'detect', 'filter', 'select', 'reject', 'every', 'all', 'some', 'any', 'include', 'contains', 'invoke', 'max', 'min', 'toArray', 'size', 'first', 'head', 'take', 'initial', 'rest', 'tail', 'drop', 'last', 'without', 'indexOf', 'shuffle', 'lastIndexOf', 'isEmpty', 'chain']; // Mix in each Underscore method as a proxy to `Collection#models`. _.each(methods, function(method) { Collection.prototype[method] = function() { var args = slice.call(arguments); args.unshift(this.models); return _[method].apply(_, args); }; }); // Underscore methods that take a property name as an argument. var attributeMethods = ['groupBy', 'countBy', 'sortBy']; // Use attributes instead of properties. _.each(attributeMethods, function(method) { Collection.prototype[method] = function(value, context) { var iterator = _.isFunction(value) ? value : function(model) { return model.get(value); }; return _[method](this.models, iterator, context); }; }); // Backbone.View // ------------- // Backbone Views are almost more convention than they are actual code. A View // is simply a JavaScript object that represents a logical chunk of UI in the // DOM. This might be a single item, an entire list, a sidebar or panel, or // even the surrounding frame which wraps your whole app. Defining a chunk of // UI as a **View** allows you to define your DOM events declaratively, without // having to worry about render order ... and makes it easy for the view to // react to specific changes in the state of your models. // Creating a Backbone.View creates its initial element outside of the DOM, // if an existing element is not provided... var View = Backbone.View = function(options) { this.cid = _.uniqueId('view'); this._configure(options || {}); this._ensureElement(); this.initialize.apply(this, arguments); this.delegateEvents(); }; // Cached regex to split keys for `delegate`. var delegateEventSplitter = /^(\S+)\s*(.*)$/; // List of view options to be merged as properties. var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events']; // Set up all inheritable **Backbone.View** properties and methods. _.extend(View.prototype, Events, { // The default `tagName` of a View's element is `"div"`. tagName: 'div', // jQuery delegate for element lookup, scoped to DOM elements within the // current view. This should be prefered to global lookups where possible. $: function(selector) { return this.$el.find(selector); }, // Initialize is an empty function by default. Override it with your own // initialization logic. initialize: function(){}, // **render** is the core function that your view should override, in order // to populate its element (`this.el`), with the appropriate HTML. The // convention is for **render** to always return `this`. render: function() { return this; }, // Remove this view by taking the element out of the DOM, and removing any // applicable Backbone.Events listeners. remove: function() { this.$el.remove(); this.stopListening(); return this; }, // Change the view's element (`this.el` property), including event // re-delegation. setElement: function(element, delegate) { if (this.$el) this.undelegateEvents(); this.$el = element instanceof Backbone.$ ? element : Backbone.$(element); this.el = this.$el[0]; if (delegate !== false) this.delegateEvents(); return this; }, // Set callbacks, where `this.events` is a hash of // // *{"event selector": "callback"}* // // { // 'mousedown .title': 'edit', // 'click .button': 'save' // 'click .open': function(e) { ... } // } // // pairs. Callbacks will be bound to the view, with `this` set properly. // Uses event delegation for efficiency. // Omitting the selector binds the event to `this.el`. // This only works for delegate-able events: not `focus`, `blur`, and // not `change`, `submit`, and `reset` in Internet Explorer. delegateEvents: function(events) { if (!(events || (events = _.result(this, 'events')))) return this; this.undelegateEvents(); for (var key in events) { var method = events[key]; if (!_.isFunction(method)) method = this[events[key]]; if (!method) continue; var match = key.match(delegateEventSplitter); var eventName = match[1], selector = match[2]; method = _.bind(method, this); eventName += '.delegateEvents' + this.cid; if (selector === '') { this.$el.on(eventName, method); } else { this.$el.on(eventName, selector, method); } } return this; }, // Clears all callbacks previously bound to the view with `delegateEvents`. // You usually don't need to use this, but may wish to if you have multiple // Backbone views attached to the same DOM element. undelegateEvents: function() { this.$el.off('.delegateEvents' + this.cid); return this; }, // Performs the initial configuration of a View with a set of options. // Keys with special meaning *(e.g. model, collection, id, className)* are // attached directly to the view. See `viewOptions` for an exhaustive // list. _configure: function(options) { if (this.options) options = _.extend({}, _.result(this, 'options'), options); _.extend(this, _.pick(options, viewOptions)); this.options = options; }, // Ensure that the View has a DOM element to render into. // If `this.el` is a string, pass it through `$()`, take the first // matching element, and re-assign it to `el`. Otherwise, create // an element from the `id`, `className` and `tagName` properties. _ensureElement: function() { if (!this.el) { var attrs = _.extend({}, _.result(this, 'attributes')); if (this.id) attrs.id = _.result(this, 'id'); if (this.className) attrs['class'] = _.result(this, 'className'); var $el = Backbone.$('<' + _.result(this, 'tagName') + '>').attr(attrs); this.setElement($el, false); } else { this.setElement(_.result(this, 'el'), false); } } }); // Backbone.sync // ------------- // Override this function to change the manner in which Backbone persists // models to the server. You will be passed the type of request, and the // model in question. By default, makes a RESTful Ajax request // to the model's `url()`. Some possible customizations could be: // // * Use `setTimeout` to batch rapid-fire updates into a single request. // * Send up the models as XML instead of JSON. // * Persist models via WebSockets instead of Ajax. // // Turn on `Backbone.emulateHTTP` in order to send `PUT` and `DELETE` requests // as `POST`, with a `_method` parameter containing the true HTTP method, // as well as all requests with the body as `application/x-www-form-urlencoded` // instead of `application/json` with the model in a param named `model`. // Useful when interfacing with server-side languages like **PHP** that make // it difficult to read the body of `PUT` requests. Backbone.sync = function(method, model, options) { var type = methodMap[method]; // Default options, unless specified. _.defaults(options || (options = {}), { emulateHTTP: Backbone.emulateHTTP, emulateJSON: Backbone.emulateJSON }); // Default JSON-request options. var params = {type: type, dataType: 'json'}; // Ensure that we have a URL. if (!options.url) { params.url = _.result(model, 'url') || urlError(); } // Ensure that we have the appropriate request data. if (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) { params.contentType = 'application/json'; params.data = JSON.stringify(options.attrs || model.toJSON(options)); } // For older servers, emulate JSON by encoding the request into an HTML-form. if (options.emulateJSON) { params.contentType = 'application/x-www-form-urlencoded'; params.data = params.data ? {model: params.data} : {}; } // For older servers, emulate HTTP by mimicking the HTTP method with `_method` // And an `X-HTTP-Method-Override` header. if (options.emulateHTTP && (type === 'PUT' || type === 'DELETE' || type === 'PATCH')) { params.type = 'POST'; if (options.emulateJSON) params.data._method = type; var beforeSend = options.beforeSend; options.beforeSend = function(xhr) { xhr.setRequestHeader('X-HTTP-Method-Override', type); if (beforeSend) return beforeSend.apply(this, arguments); }; } // Don't process data on a non-GET request. if (params.type !== 'GET' && !options.emulateJSON) { params.processData = false; } // If we're sending a `PATCH` request, and we're in an old Internet Explorer // that still has ActiveX enabled by default, override jQuery to use that // for XHR instead. Remove this line when jQuery supports `PATCH` on IE8. if (params.type === 'PATCH' && window.ActiveXObject && !(window.external && window.external.msActiveXFilteringEnabled)) { params.xhr = function() { return new ActiveXObject("Microsoft.XMLHTTP"); }; } // Make the request, allowing the user to override any Ajax options. var xhr = options.xhr = Backbone.ajax(_.extend(params, options)); model.trigger('request', model, xhr, options); return xhr; }; // Map from CRUD to HTTP for our default `Backbone.sync` implementation. var methodMap = { 'create': 'POST', 'update': 'PUT', 'patch': 'PATCH', 'delete': 'DELETE', 'read': 'GET' }; // Set the default implementation of `Backbone.ajax` to proxy through to `$`. // Override this if you'd like to use a different library. Backbone.ajax = function() { return Backbone.$.ajax.apply(Backbone.$, arguments); }; // Backbone.Router // --------------- // Routers map faux-URLs to actions, and fire events when routes are // matched. Creating a new one sets its `routes` hash, if not set statically. var Router = Backbone.Router = function(options) { options || (options = {}); if (options.routes) this.routes = options.routes; this._bindRoutes(); this.initialize.apply(this, arguments); }; // Cached regular expressions for matching named param parts and splatted // parts of route strings. var optionalParam = /\((.*?)\)/g; var namedParam = /(\(\?)?:\w+/g; var splatParam = /\*\w+/g; var escapeRegExp = /[\-{}\[\]+?.,\\\^$|#\s]/g; // Set up all inheritable **Backbone.Router** properties and methods. _.extend(Router.prototype, Events, { // Initialize is an empty function by default. Override it with your own // initialization logic. initialize: function(){}, // Manually bind a single named route to a callback. For example: // // this.route('search/:query/p:num', 'search', function(query, num) { // ... // }); // route: function(route, name, callback) { if (!_.isRegExp(route)) route = this._routeToRegExp(route); if (_.isFunction(name)) { callback = name; name = ''; } if (!callback) callback = this[name]; var router = this; Backbone.history.route(route, function(fragment) { var args = router._extractParameters(route, fragment); callback && callback.apply(router, args); router.trigger.apply(router, ['route:' + name].concat(args)); router.trigger('route', name, args); Backbone.history.trigger('route', router, name, args); }); return this; }, // Simple proxy to `Backbone.history` to save a fragment into the history. navigate: function(fragment, options) { Backbone.history.navigate(fragment, options); return this; }, // Bind all defined routes to `Backbone.history`. We have to reverse the // order of the routes here to support behavior where the most general // routes can be defined at the bottom of the route map. _bindRoutes: function() { if (!this.routes) return; this.routes = _.result(this, 'routes'); var route, routes = _.keys(this.routes); while ((route = routes.pop()) != null) { this.route(route, this.routes[route]); } }, // Convert a route string into a regular expression, suitable for matching // against the current location hash. _routeToRegExp: function(route) { route = route.replace(escapeRegExp, '\\$&') .replace(optionalParam, '(?:$1)?') .replace(namedParam, function(match, optional){ return optional ? match : '([^\/]+)'; }) .replace(splatParam, '(.*?)'); return new RegExp('^' + route + '$'); }, // Given a route, and a URL fragment that it matches, return the array of // extracted decoded parameters. Empty or unmatched parameters will be // treated as `null` to normalize cross-browser behavior. _extractParameters: function(route, fragment) { var params = route.exec(fragment).slice(1); return _.map(params, function(param) { return param ? decodeURIComponent(param) : null; }); } }); // Backbone.History // ---------------- // Handles cross-browser history management, based on either // [pushState](http://diveintohtml5.info/history.html) and real URLs, or // [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange) // and URL fragments. If the browser supports neither (old IE, natch), // falls back to polling. var History = Backbone.History = function() { this.handlers = []; _.bindAll(this, 'checkUrl'); // Ensure that `History` can be used outside of the browser. if (typeof window !== 'undefined') { this.location = window.location; this.history = window.history; } }; // Cached regex for stripping a leading hash/slash and trailing space. var routeStripper = /^[#\/]|\s+$/g; // Cached regex for stripping leading and trailing slashes. var rootStripper = /^\/+|\/+$/g; // Cached regex for detecting MSIE. var isExplorer = /msie [\w.]+/; // Cached regex for removing a trailing slash. var trailingSlash = /\/$/; // Has the history handling already been started? History.started = false; // Set up all inheritable **Backbone.History** properties and methods. _.extend(History.prototype, Events, { // The default interval to poll for hash changes, if necessary, is // twenty times a second. interval: 50, // Gets the true hash value. Cannot use location.hash directly due to bug // in Firefox where location.hash will always be decoded. getHash: function(window) { var match = (window || this).location.href.match(/#(.*)$/); return match ? match[1] : ''; }, // Get the cross-browser normalized URL fragment, either from the URL, // the hash, or the override. getFragment: function(fragment, forcePushState) { if (fragment == null) { if (this._hasPushState || !this._wantsHashChange || forcePushState) { fragment = this.location.pathname; var root = this.root.replace(trailingSlash, ''); if (!fragment.indexOf(root)) fragment = fragment.substr(root.length); } else { fragment = this.getHash(); } } return fragment.replace(routeStripper, ''); }, // Start the hash change handling, returning `true` if the current URL matches // an existing route, and `false` otherwise. start: function(options) { if (History.started) throw new Error("Backbone.history has already been started"); History.started = true; // Figure out the initial configuration. Do we need an iframe? // Is pushState desired ... is it available? this.options = _.extend({}, {root: '/'}, this.options, options); this.root = this.options.root; this._wantsHashChange = this.options.hashChange !== false; this._wantsPushState = !!this.options.pushState; this._hasPushState = !!(this.options.pushState && this.history && this.history.pushState); var fragment = this.getFragment(); var docMode = document.documentMode; var oldIE = (isExplorer.exec(navigator.userAgent.toLowerCase()) && (!docMode || docMode <= 7)); // Normalize root to always include a leading and trailing slash. this.root = ('/' + this.root + '/').replace(rootStripper, '/'); if (oldIE && this._wantsHashChange) { this.iframe = Backbone.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo('body')[0].contentWindow; this.navigate(fragment); } // Depending on whether we're using pushState or hashes, and whether // 'onhashchange' is supported, determine how we check the URL state. if (this._hasPushState) { Backbone.$(window).on('popstate', this.checkUrl); } else if (this._wantsHashChange && ('onhashchange' in window) && !oldIE) { Backbone.$(window).on('hashchange', this.checkUrl); } else if (this._wantsHashChange) { this._checkUrlInterval = setInterval(this.checkUrl, this.interval); } // Determine if we need to change the base url, for a pushState link // opened by a non-pushState browser. this.fragment = fragment; var loc = this.location; var atRoot = loc.pathname.replace(/[^\/]$/, '$&/') === this.root; // If we've started off with a route from a `pushState`-enabled browser, // but we're currently in a browser that doesn't support it... if (this._wantsHashChange && this._wantsPushState && !this._hasPushState && !atRoot) { this.fragment = this.getFragment(null, true); this.location.replace(this.root + this.location.search + '#' + this.fragment); // Return immediately as browser will do redirect to new url return true; // Or if we've started out with a hash-based route, but we're currently // in a browser where it could be `pushState`-based instead... } else if (this._wantsPushState && this._hasPushState && atRoot && loc.hash) { this.fragment = this.getHash().replace(routeStripper, ''); this.history.replaceState({}, document.title, this.root + this.fragment + loc.search); } if (!this.options.silent) return this.loadUrl(); }, // Disable Backbone.history, perhaps temporarily. Not useful in a real app, // but possibly useful for unit testing Routers. stop: function() { Backbone.$(window).off('popstate', this.checkUrl).off('hashchange', this.checkUrl); clearInterval(this._checkUrlInterval); History.started = false; }, // Add a route to be tested when the fragment changes. Routes added later // may override previous routes. route: function(route, callback) { this.handlers.unshift({route: route, callback: callback}); }, // Checks the current URL to see if it has changed, and if it has, // calls `loadUrl`, normalizing across the hidden iframe. checkUrl: function(e) { var current = this.getFragment(); if (current === this.fragment && this.iframe) { current = this.getFragment(this.getHash(this.iframe)); } if (current === this.fragment) return false; if (this.iframe) this.navigate(current); this.loadUrl() || this.loadUrl(this.getHash()); }, // Attempt to load the current URL fragment. If a route succeeds with a // match, returns `true`. If no defined routes matches the fragment, // returns `false`. loadUrl: function(fragmentOverride) { var fragment = this.fragment = this.getFragment(fragmentOverride); var matched = _.any(this.handlers, function(handler) { if (handler.route.test(fragment)) { handler.callback(fragment); return true; } }); return matched; }, // Save a fragment into the hash history, or replace the URL state if the // 'replace' option is passed. You are responsible for properly URL-encoding // the fragment in advance. // // The options object can contain `trigger: true` if you wish to have the // route callback be fired (not usually desirable), or `replace: true`, if // you wish to modify the current URL without adding an entry to the history. navigate: function(fragment, options) { if (!History.started) return false; if (!options || options === true) options = {trigger: options}; fragment = this.getFragment(fragment || ''); if (this.fragment === fragment) return; this.fragment = fragment; var url = this.root + fragment; // If pushState is available, we use it to set the fragment as a real URL. if (this._hasPushState) { this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url); // If hash changes haven't been explicitly disabled, update the hash // fragment to store history. } else if (this._wantsHashChange) { this._updateHash(this.location, fragment, options.replace); if (this.iframe && (fragment !== this.getFragment(this.getHash(this.iframe)))) { // Opening and closing the iframe tricks IE7 and earlier to push a // history entry on hash-tag change. When replace is true, we don't // want this. if(!options.replace) this.iframe.document.open().close(); this._updateHash(this.iframe.location, fragment, options.replace); } // If you've told us that you explicitly don't want fallback hashchange- // based history, then `navigate` becomes a page refresh. } else { return this.location.assign(url); } if (options.trigger) this.loadUrl(fragment); }, // Update the hash location, either replacing the current entry, or adding // a new one to the browser history. _updateHash: function(location, fragment, replace) { if (replace) { var href = location.href.replace(/(javascript:|#).*$/, ''); location.replace(href + '#' + fragment); } else { // Some browsers require that `hash` contains a leading #. location.hash = '#' + fragment; } } }); // Create the default Backbone.history. Backbone.history = new History; // Helpers // ------- // Helper function to correctly set up the prototype chain, for subclasses. // Similar to `goog.inherits`, but uses a hash of prototype properties and // class properties to be extended. var extend = function(protoProps, staticProps) { var parent = this; var child; // The constructor function for the new subclass is either defined by you // (the "constructor" property in your `extend` definition), or defaulted // by us to simply call the parent's constructor. if (protoProps && _.has(protoProps, 'constructor')) { child = protoProps.constructor; } else { child = function(){ return parent.apply(this, arguments); }; } // Add static properties to the constructor function, if supplied. _.extend(child, parent, staticProps); // Set the prototype chain to inherit from `parent`, without calling // `parent`'s constructor function. var Surrogate = function(){ this.constructor = child; }; Surrogate.prototype = parent.prototype; child.prototype = new Surrogate; // Add prototype properties (instance properties) to the subclass, // if supplied. if (protoProps) _.extend(child.prototype, protoProps); // Set a convenience property in case the parent's prototype is needed // later. child.__super__ = parent.prototype; return child; }; // Set up inheritance for the model, collection, router, view and history. Model.extend = Collection.extend = Router.extend = View.extend = History.extend = extend; // Throw an error when a URL is needed, and none is supplied. var urlError = function() { throw new Error('A "url" property or function must be specified'); }; // Wrap an optional error callback with a fallback error event. var wrapError = function (model, options) { var error = options.error; options.error = function(resp) { if (error) error(model, resp, options); model.trigger('error', model, resp, options); }; }; }).call(this); /** * jQuery.fn.sortElements * -------------- * @author James Padolsey (http://james.padolsey.com) * @version 0.11 * @updated 18-MAR-2010 * -------------- * @param Function comparator: * Exactly the same behaviour as [1,2,3].sort(comparator) * * @param Function getSortable * A function that should return the element that is * to be sorted. The comparator will run on the * current collection, but you may want the actual * resulting sort to occur on a parent or another * associated element. * * E.g. $('td').sortElements(comparator, function(){ * return this.parentNode; * }) * * The <td>'s parent (<tr>) will be sorted instead * of the <td> itself. */ jQuery.fn.sortElements = (function(){ var sort = [].sort; return function(comparator, getSortable) { getSortable = getSortable || function(){return this;}; var placements = this.map(function(){ var sortElement = getSortable.call(this), parentNode = sortElement.parentNode, // Since the element itself will change position, we have // to have some way of storing it's original position in // the DOM. The easiest way is to have a 'flag' node: nextSibling = parentNode.insertBefore( document.createTextNode(''), sortElement.nextSibling ); return function() { if (parentNode === this) { throw new Error( "You can't sort elements if any one is a descendant of another." ); } // Insert before flag: parentNode.insertBefore(this, nextSibling); // Remove flag: parentNode.removeChild(nextSibling); }; }); return sort.call(this, comparator).each(function(i){ placements[i].call(getSortable.call(this)); }); }; })(); (function() { var arrays, basicObjects, deepClone, deepExtend, deepExtendCouple, isBasicObject, __slice = [].slice; deepClone = function(obj) { var func, isArr; if (!_.isObject(obj) || _.isFunction(obj)) { return obj; } if (_.isDate(obj)) { return new Date(obj.getTime()); } if (_.isRegExp(obj)) { return new RegExp(obj.source, obj.toString().replace(/.*\//, "")); } isArr = _.isArray(obj || _.isArguments(obj)); func = function(memo, value, key) { if (isArr) { memo.push(deepClone(value)); } else { memo[key] = deepClone(value); } return memo; }; return _.reduce(obj, func, isArr ? [] : {}); }; isBasicObject = function(object) { return (object.prototype === {}.prototype || object.prototype === Object.prototype) && _.isObject(object) && !_.isArray(object) && !_.isFunction(object) && !_.isDate(object) && !_.isRegExp(object) && !_.isArguments(object); }; basicObjects = function(object) { return _.filter(_.keys(object), function(key) { return isBasicObject(object[key]); }); }; arrays = function(object) { return _.filter(_.keys(object), function(key) { return _.isArray(object[key]); }); }; deepExtendCouple = function(destination, source, maxDepth) { var combine, recurse, sharedArrayKey, sharedArrayKeys, sharedObjectKey, sharedObjectKeys, _i, _j, _len, _len1; if (maxDepth == null) { maxDepth = 20; } if (maxDepth <= 0) { console.warn('_.deepExtend(): Maximum depth of recursion hit.'); return _.extend(destination, source); } sharedObjectKeys = _.intersection(basicObjects(destination), basicObjects(source)); recurse = function(key) { return source[key] = deepExtendCouple(destination[key], source[key], maxDepth - 1); }; for (_i = 0, _len = sharedObjectKeys.length; _i < _len; _i++) { sharedObjectKey = sharedObjectKeys[_i]; recurse(sharedObjectKey); } sharedArrayKeys = _.intersection(arrays(destination), arrays(source)); combine = function(key) { return source[key] = _.union(destination[key], source[key]); }; for (_j = 0, _len1 = sharedArrayKeys.length; _j < _len1; _j++) { sharedArrayKey = sharedArrayKeys[_j]; combine(sharedArrayKey); } return _.extend(destination, source); }; deepExtend = function() { var finalObj, maxDepth, objects, _i; objects = 2 <= arguments.length ? __slice.call(arguments, 0, _i = arguments.length - 1) : (_i = 0, []), maxDepth = arguments[_i++]; if (!_.isNumber(maxDepth)) { objects.push(maxDepth); maxDepth = 20; } if (objects.length <= 1) { return objects[0]; } if (maxDepth <= 0) { return _.extend.apply(this, objects); } finalObj = objects.shift(); while (objects.length > 0) { finalObj = deepExtendCouple(finalObj, deepClone(objects.shift()), maxDepth); } return finalObj; }; _.mixin({ deepClone: deepClone, isBasicObject: isBasicObject, basicObjects: basicObjects, arrays: arrays, deepExtend: deepExtend }); }).call(this); /*! Backbone.Mutators - v0.4.0 ------------------------------ Build @ 2013-05-01 Documentation and Full License Available at: http://asciidisco.github.com/Backbone.Mutators/index.html git://github.com/asciidisco/Backbone.Mutators.git Copyright (c) 2013 Sebastian Golasch <[email protected]> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ (function (root, factory, undef) { 'use strict'; if (typeof exports === 'object') { // Node. Does not work with strict CommonJS, but // only CommonJS-like enviroments that support module.exports, // like Node. module.exports = factory(require('underscore'), require('Backbone')); } else if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['underscore', 'backbone'], function (_, Backbone) { // Check if we use the AMD branch of Back _ = _ === undef ? root._ : _; Backbone = Backbone === undef ? root.Backbone : Backbone; return (root.returnExportsGlobal = factory(_, Backbone, root)); }); } else { // Browser globals root.returnExportsGlobal = factory(root._, root.Backbone); } // Usage: // // Note: This plugin is UMD compatible, you can use it in node, amd and vanilla js envs // // Vanilla JS: // <script src="underscore.js"></script> // <script src="backbone.js"></script> // <script src="backbone.mutators.js"></script> // // Node: // var _ = require('underscore'); // var Backbone = require('backbone'); // var Mutators = require('backbone.mutators'); // // // AMD: // define(['underscore', 'backbone', 'backbone.mutators'], function (_, Backbone, Mutators) { // // insert sample from below // return User; // }); // // var User = Backbone.Model.extend({ // mutators: { // fullname: function () { // return this.firstname + ' ' + this.lastname; // } // }, // // defaults: { // firstname: 'Sebastian', // lastname: 'Golasch' // } // }); // // var user = new User(); // user.get('fullname') // returns 'Sebastian Golasch' // user.toJSON() // return '{firstname: 'Sebastian', lastname: 'Golasch', fullname: 'Sebastian Golasch'}' }(this, function (_, Backbone, root, undef) { 'use strict'; // check if we use the amd branch of backbone and underscore Backbone = Backbone === undef ? root.Backbone : Backbone; _ = _ === undef ? root._ : _; // extend backbones model prototype with the mutator functionality var Mutator = function () {}, oldGet = Backbone.Model.prototype.get, oldSet = Backbone.Model.prototype.set, oldToJson = Backbone.Model.prototype.toJSON; // This is necessary to ensure that Models declared without the mutators object do not throw and error Mutator.prototype.mutators = {}; // override get functionality to fetch the mutator props Mutator.prototype.get = function (attr) { var isMutator = this.mutators !== undef; // check if we have a getter mutation if (isMutator === true && _.isFunction(this.mutators[attr]) === true) { return this.mutators[attr].call(this); } // check if we have a deeper nested getter mutation if (isMutator === true && _.isObject(this.mutators[attr]) === true && _.isFunction(this.mutators[attr].get) === true) { return this.mutators[attr].get.call(this); } return oldGet.call(this, attr); }; // override set functionality to set the mutator props Mutator.prototype.set = function (key, value, options) { var isMutator = this.mutators !== undef, ret = null, attrs = null; // seamleassly stolen from backbone core // check if the setter action is triggered // using key <-> value or object if (_.isObject(key) || key === null) { attrs = key; options = value; } else { attrs = {}; attrs[key] = value; } // check if we have a deeper nested setter mutation if (isMutator === true && _.isObject(this.mutators[key]) === true) { // check if we need to set a single value if (_.isFunction(this.mutators[key].set) === true) { ret = this.mutators[key].set.call(this, key, attrs[key], options, _.bind(oldSet, this)); } else if(_.isFunction(this.mutators[key])){ ret = this.mutators[key].call(this, key, attrs[key], options, _.bind(oldSet, this)); } } if (_.isObject(attrs)) { _.each(attrs, _.bind(function (attr, attrKey) { var cur_ret = null; if (isMutator === true && _.isObject(this.mutators[attrKey]) === true) { // check if we need to set a single value var meth = this.mutators[attrKey]; if(_.isFunction(meth.set)){ meth = meth.set; } if(_.isFunction(meth)){ if (options === undef || (_.isObject(options) === true && options.silent !== true && (options.mutators !== undef && options.mutators.silent !== true))) { this.trigger('mutators:set:' + attrKey); } cur_ret = meth.call(this, attrKey, attr, options, _.bind(oldSet, this)); } } if (cur_ret === null) { cur_ret = _.bind(oldSet, this)(attrKey, attr, options); } if (ret !== false) { ret = cur_ret; } }, this)); } //validation purposes if (ret !== null) { return ret; } return oldSet.call(this, key, value, options); }; // override toJSON functionality to serialize mutator properties Mutator.prototype.toJSON = function () { // fetch ye olde values var attr = oldToJson.call(this); // iterate over all mutators (if there are some) _.each(this.mutators, _.bind(function (mutator, name) { // check if we have some getter mutations if (_.isObject(this.mutators[name]) === true && _.isFunction(this.mutators[name].get)) { attr[name] = _.bind(this.mutators[name].get, this)(); } else { attr[name] = _.bind(this.mutators[name], this)(); } }, this)); return attr; }; // override get functionality to get HTML-escaped the mutator props Mutator.prototype.escape = function (attr){ var val = this.get(attr); return _.escape(val == null ? '' : '' + val); }; // extend the models prototype _.extend(Backbone.Model.prototype, Mutator.prototype); // make mutators globally available under the Backbone namespace Backbone.Mutators = Mutator; return Mutator; })); /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // JointJS library. // (c) 2011-2013 client IO // Global namespace. var joint = { // `joint.dia` namespace. dia: {}, // `joint.ui` namespace. ui: {}, // `joint.layout` namespace. layout: {}, // `joint.shapes` namespace. shapes: {}, // `joint.format` namespace. format: {}, util: { uuid: function() { // credit: http://stackoverflow.com/posts/2117523/revisions return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); return v.toString(16); }); }, // Generate global unique id for obj and store it as a property of the object. guid: function(obj) { this.guid.id = this.guid.id || 1; obj.id = (obj.id === undefined ? 'j_' + this.guid.id++ : obj.id); return obj.id; }, // Copy all the properties to the first argument from the following arguments. // All the properties will be overwritten by the properties from the following // arguments. Inherited properties are ignored. mixin: function() { var target = arguments[0]; for (var i = 1, l = arguments.length; i < l; i++) { var extension = arguments[i]; // Only functions and objects can be mixined. if ((Object(extension) !== extension) && !_.isFunction(extension) && (extension === null || extension === undefined)) { continue; } _.each(extension, function(copy, key) { if (this.mixin.deep && (Object(copy) === copy)) { if (!target[key]) { target[key] = _.isArray(copy) ? [] : {}; } this.mixin(target[key], copy); return; } if (target[key] !== copy) { if (!this.mixin.supplement || !target.hasOwnProperty(key)) { target[key] = copy; } } }, this); } return target; }, // Copy all properties to the first argument from the following // arguments only in case if they don't exists in the first argument. // All the function propererties in the first argument will get // additional property base pointing to the extenders same named // property function's call method. supplement: function() { this.mixin.supplement = true; var ret = this.mixin.apply(this, arguments); this.mixin.supplement = false; return ret; }, // Same as `mixin()` but deep version. deepMixin: function() { this.mixin.deep = true; var ret = this.mixin.apply(this, arguments); this.mixin.deep = false; return ret; }, // Same as `supplement()` but deep version. deepSupplement: function() { this.mixin.deep = this.mixin.supplement = true; var ret = this.mixin.apply(this, arguments); this.mixin.deep = this.mixin.supplement = false; return ret; } } }; /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // Vectorizer. // ----------- // A tiny library for making your live easier when dealing with SVG. // Copyright © 2012 - 2013 client IO (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['underscore'], factory); } else { // Browser globals. root.Vectorizer = root.V = factory(root._); } }(this, function(_) { // Well, if SVG is not supported, this library is useless. var SVGsupported = !!(window.SVGAngle || document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#BasicStructure', '1.1')); // XML namespaces. var ns = { xmlns: 'http://www.w3.org/2000/svg', xlink: 'http://www.w3.org/1999/xlink' }; // SVG version. var SVGversion = '1.1'; // Create SVG element. // ------------------- function createElement(el, attrs, children) { if (!el) return undefined; // If `el` is an object, it is probably a native SVG element. Wrap it to VElement. if (typeof el === 'object') { return new VElement(el); } attrs = attrs || {}; // If `el` is a `'svg'` or `'SVG'` string, create a new SVG canvas. if (el.toLowerCase() === 'svg') { attrs.xmlns = ns.xmlns; attrs['xmlns:xlink'] = ns.xlink; attrs.version = SVGversion; } else if (el[0] === '<') { // Create element from an SVG string. // Allows constructs of type: `document.appendChild(Vectorizer('<rect></rect>').node)`. var svg = '<svg xmlns="' + ns.xmlns + '" xmlns:xlink="' + ns.xlink + '" version="' + SVGversion + '">' + el + '</svg>'; var parser = new DOMParser(); parser.async = false; var svgDoc = parser.parseFromString(svg, 'text/xml').documentElement; // Note that `createElement()` might also return an array should the SVG string passed as // the first argument contain more then one root element. if (svgDoc.childNodes.length > 1) { return _.map(svgDoc.childNodes, function(childNode) { return new VElement(document.importNode(childNode, true)); }); } return new VElement(document.importNode(svgDoc.firstChild, true)); } el = document.createElementNS(ns.xmlns, el); // Set attributes. for (var key in attrs) { setAttribute(el, key, attrs[key]); } // Normalize `children` array. if (Object.prototype.toString.call(children) != '[object Array]') children = [children]; // Append children if they are specified. var i = 0, len = (children[0] && children.length) || 0, child; for (; i < len; i++) { child = children[i]; el.appendChild(child instanceof VElement ? child.node : child); } return new VElement(el); } function setAttribute(el, name, value) { if (name.indexOf(':') > -1) { // Attribute names can be namespaced. E.g. `image` elements // have a `xlink:href` attribute to set the source of the image. var combinedKey = name.split(':'); el.setAttributeNS(ns[combinedKey[0]], combinedKey[1], value); } else if (name === 'id') { el.id = value; } else { el.setAttribute(name, value); } } function parseTransformString(transform) { var translate, rotate, scale; if (transform) { var translateMatch = transform.match(/translate\((.*)\)/); if (translateMatch) { translate = translateMatch[1].split(','); } var rotateMatch = transform.match(/rotate\((.*)\)/); if (rotateMatch) { rotate = rotateMatch[1].split(','); } var scaleMatch = transform.match(/scale\((.*)\)/); if (scaleMatch) { scale = scaleMatch[1].split(','); } } var sx = (scale && scale[0]) ? parseFloat(scale[0]) : 1; return { translate: { tx: (translate && translate[0]) ? parseInt(translate[0], 10) : 0, ty: (translate && translate[1]) ? parseInt(translate[1], 10) : 0 }, rotate: { angle: (rotate && rotate[0]) ? parseInt(rotate[0], 10) : 0, cx: (rotate && rotate[1]) ? parseInt(rotate[1], 10) : undefined, cy: (rotate && rotate[2]) ? parseInt(rotate[2], 10) : undefined }, scale: { sx: sx, sy: (scale && scale[1]) ? parseFloat(scale[1]) : sx } }; } // Matrix decomposition. // --------------------- function deltaTransformPoint(matrix, point) { var dx = point.x * matrix.a + point.y * matrix.c + 0; var dy = point.x * matrix.b + point.y * matrix.d + 0; return { x: dx, y: dy }; } function decomposeMatrix(matrix) { // @see https://gist.github.com/2052247 // calculate delta transform point var px = deltaTransformPoint(matrix, { x: 0, y: 1 }); var py = deltaTransformPoint(matrix, { x: 1, y: 0 }); // calculate skew var skewX = ((180 / Math.PI) * Math.atan2(px.y, px.x) - 90); var skewY = ((180 / Math.PI) * Math.atan2(py.y, py.x)); return { translateX: matrix.e, translateY: matrix.f, scaleX: Math.sqrt(matrix.a * matrix.a + matrix.b * matrix.b), scaleY: Math.sqrt(matrix.c * matrix.c + matrix.d * matrix.d), skewX: skewX, skewY: skewY, rotation: skewX // rotation is the same as skew x }; } // VElement. // --------- function VElement(el) { this.node = el; if (!this.node.id) { this.node.id = _.uniqueId('v_'); } } // VElement public API. // -------------------- VElement.prototype = { translate: function(tx, ty) { ty = ty || 0; var transformAttr = this.attr('transform') || '', transform = parseTransformString(transformAttr); // Is it a getter? if (typeof tx === 'undefined') { return transform.translate; } transformAttr = transformAttr.replace(/translate\([^\)]*\)/g, '').trim(); var newTx = transform.translate.tx + tx, newTy = transform.translate.ty + ty; // Note that `translate()` is always the first transformation. This is // usually the desired case. this.attr('transform', 'translate(' + newTx + ',' + newTy + ') ' + transformAttr); return this; }, rotate: function(angle, cx, cy) { var transformAttr = this.attr('transform') || '', transform = parseTransformString(transformAttr); // Is it a getter? if (typeof angle === 'undefined') { return transform.rotate; } transformAttr = transformAttr.replace(/rotate\([^\)]*\)/g, '').trim(); var newAngle = transform.rotate.angle + angle % 360, newOrigin = (cx !== undefined && cy !== undefined) ? ',' + cx + ',' + cy : ''; this.attr('transform', transformAttr + ' rotate(' + newAngle + newOrigin + ')'); return this; }, // Note that `scale` as the only transformation does not combine with previous values. scale: function(sx, sy) { sy = (typeof sy === 'undefined') ? sx : sy; var transformAttr = this.attr('transform') || '', transform = parseTransformString(transformAttr); // Is it a getter? if (typeof sx === 'undefined') { return transform.scale; } transformAttr = transformAttr.replace(/scale\([^\)]*\)/g, '').trim(); this.attr('transform', transformAttr + ' scale(' + sx + ',' + sy + ')'); return this; }, // Get SVGRect that contains coordinates and dimension of the real bounding box, // i.e. after transformations are applied. // If `target` is specified, bounding box will be computed relatively to `target` element. bbox: function(withoutTransformations, target) { var box; try { box = this.node.getBBox(); } catch (e) { // Fallback for IE. box = { x: this.node.clientLeft, y: this.node.clientTop, width: this.node.clientWidth, height: this.node.clientHeight }; } if (withoutTransformations) { return box; } var matrix = this.node.getTransformToElement(target || this.node.ownerSVGElement); var corners = []; var point = this.node.ownerSVGElement.createSVGPoint(); point.x = box.x; point.y = box.y; corners.push(point.matrixTransform(matrix)); point.x = box.x + box.width; point.y = box.y; corners.push(point.matrixTransform(matrix)); point.x = box.x + box.width; point.y = box.y + box.height; corners.push(point.matrixTransform(matrix)); point.x = box.x; point.y = box.y + box.height; corners.push(point.matrixTransform(matrix)); var minX = corners[0].x; var maxX = minX; var minY = corners[0].y; var maxY = minY; for (var i = 1, len = corners.length; i < len; i++) { var x = corners[i].x; var y = corners[i].y; if (x < minX) { minX = x; } else if (x > maxX) { maxX = x; } if (y < minY) { minY = y; } else if (y > maxY) { maxY = y; } } return { x: minX, y: minY, width: maxX - minX, height: maxY - minY }; }, text: function(content) { var lines = content.split('\n'), i = 0, tspan; // `alignment-baseline` does not work in Firefox. Setting `dominant-baseline` on the `<text>` element // fixes the issue. this.attr('dominant-baseline', 'hanging'); if (lines.length === 1) { this.node.textContent = content; return this; } // Easy way to erase all `<tspan>` children; this.node.textContent = ''; for (; i < lines.length; i++) { // Shift the <tspan> by one line (`1em`) and set the `alignment-baseline` to `hanging` in // order to have the top left coordinate of the `<tspan>` aligned with the top left // coordinate of the `<text>`. See `http://apike.ca/prog_svg_text_style.html`. tspan = V('tspan', { dy: (i == 0 ? '0em' : '1em'), x: this.attr('x') || 0, 'alignment-baseline': 'hanging' }); tspan.node.textContent = lines[i]; this.append(tspan); } return this; }, attr: function(name, value) { if (typeof name === 'string' && typeof value === 'undefined') { return this.node.getAttribute(name); } if (typeof name === 'object') { _.each(name, function(value, name) { setAttribute(this.node, name, value); }, this); } else { setAttribute(this.node, name, value); } return this; }, remove: function() { if (this.node.parentNode) { this.node.parentNode.removeChild(this.node); } }, append: function(el) { var els = el; if (!_.isArray(el)) { els = [el]; } _.each(els, function(el) { this.node.appendChild(el instanceof VElement ? el.node : el); }, this); return this; }, prepend: function(el) { this.node.insertBefore(el instanceof VElement ? el.node : el, this.node.firstChild); }, svg: function() { return this.node instanceof window.SVGSVGElement ? this : V(this.node.ownerSVGElement); }, defs: function() { var defs = this.svg().node.getElementsByTagName('defs'); return (defs && defs.length) ? V(defs[0]) : undefined; }, clone: function() { var clone = V(this.node.cloneNode(true)); // Note that clone inherits also ID. Therefore, we need to change it here. clone.node.id = _.uniqueId('v-'); return clone; }, // Convert global point into the coordinate space of this element. toLocalPoint: function(x, y) { var svg = this.svg().node; var p = svg.createSVGPoint(); p.x = x; p.y = y; var globalPoint = p.matrixTransform(svg.getScreenCTM().inverse()); var globalToLocalMatrix = this.node.getTransformToElement(svg).inverse(); return globalPoint.matrixTransform(globalToLocalMatrix); }, translateCenterToPoint: function(p) { var bbox = this.bbox(); var center = g.rect(bbox).center(); this.translate(p.x - center.x, p.y - center.y); }, // Efficiently auto-orient an element. This basically implements the orient=auto attribute // of markers. The easiest way of understanding on what this does is to imagine the element is an // arrowhead. Calling this method on the arrowhead makes it point to the `position` point while // being auto-oriented (properly rotated) towards the `reference` point. // `target` is the element relative to which the transformations are applied. Usually a viewport. translateAndAutoOrient: function(position, reference, target) { // Clean-up previously set transformations except the scale. If we didn't clean up the // previous transformations then they'd add up with the old ones. Scale is an exception as // it doesn't add up, consider: `this.scale(2).scale(2).scale(2)`. The result is that the // element is scaled by the factor 2, not 8. var s = this.scale(); this.attr('transform', ''); this.scale(s.sx, s.sy); var svg = this.svg().node; var bbox = this.bbox(false, target); // 1. Translate to origin. var translateToOrigin = svg.createSVGTransform(); translateToOrigin.setTranslate(-bbox.x - bbox.width/2, -bbox.y - bbox.height/2); // 2. Rotate around origin. var rotateAroundOrigin = svg.createSVGTransform(); var angle = g.point(position).changeInAngle(position.x - reference.x, position.y - reference.y, reference); rotateAroundOrigin.setRotate(angle, 0, 0); // 3. Translate to the `position` + the offset (half my width) towards the `reference` point. var translateFinal = svg.createSVGTransform(); var finalPosition = g.point(position).move(reference, bbox.width/2); translateFinal.setTranslate(position.x + (position.x - finalPosition.x), position.y + (position.y - finalPosition.y)); // 4. Apply transformations. var ctm = this.node.getTransformToElement(target); var transform = svg.createSVGTransform(); transform.setMatrix( translateFinal.matrix.multiply( rotateAroundOrigin.matrix.multiply( translateToOrigin.matrix.multiply( ctm))) ); // Instead of directly setting the `matrix()` transform on the element, first, decompose // the matrix into separate transforms. This allows us to use normal Vectorizer methods // as they don't work on matrices. An example of this is to retrieve a scale of an element. // this.node.transform.baseVal.initialize(transform); var decomposition = decomposeMatrix(transform.matrix); this.translate(decomposition.translateX, decomposition.translateY); this.rotate(decomposition.rotation); // Note that scale has been already applied, hence the following line stays commented. (it's here just for reference). //this.scale(decomposition.scaleX, decomposition.scaleY); return this; }, animateAlongPath: function(attrs, path) { var animateMotion = V('animateMotion', attrs); var mpath = V('mpath', { 'xlink:href': '#' + V(path).node.id }); animateMotion.append(mpath); this.append(animateMotion); try { animateMotion.node.beginElement(); } catch (e) { // Fallback for IE 9. animateMotion.node.setAttributeNS(null, 'begin', 'indefinite'); } } }; var V = createElement; V.decomposeMatrix = decomposeMatrix; var svgDocument = V('svg').node; V.createSVGMatrix = function(m) { return _.extend(svgDocument.createSVGMatrix(), m); }; V.createSVGTransform = function() { return svgDocument.createSVGTransform(); }; V.createSVGPoint = function(x, y) { var p = svgDocument.createSVGPoint(); p.x = x; p.y = y; return p; }; return V; })); /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // Geometry library. // (c) 2011-2013 client IO (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define([], factory); } else { // Browser globals. root.g = factory(); } }(this, function() { // Declare shorthands to the most used math functions. var math = Math; var abs = math.abs; var cos = math.cos; var sin = math.sin; var sqrt = math.sqrt; var mmin = math.min; var mmax = math.max; var atan = math.atan; var atan2 = math.atan2; var acos = math.acos; var round = math.round; var floor = math.floor; var PI = math.PI; var random = math.random; var toDeg = function(rad) { return (180*rad / PI) % 360; }; var toRad = function(deg) { return (deg % 360) * PI / 180; }; var snapToGrid = function(val, gridSize) { return gridSize * Math.round(val/gridSize); }; // Point // ----- // Point is the most basic object consisting of x/y coordinate,. // Possible instantiations are: // * `point(10, 20)` // * `new point(10, 20)` // * `point('10 20')` // * `point(point(10, 20))` function point(x, y) { if (!(this instanceof point)) return new point(x, y); var xy; if (y === undefined && Object(x) !== x) { xy = x.split(_.indexOf(x, "@") === -1 ? " " : "@"); this.x = parseInt(xy[0], 10); this.y = parseInt(xy[1], 10); } else if (Object(x) === x) { this.x = x.x; this.y = x.y; } else { this.x = x; this.y = y; } } point.prototype = { toString: function() { return this.x + "@" + this.y; }, // If point lies outside rectangle `r`, return the nearest point on the boundary of rect `r`, // otherwise return point itself. // (see Squeak Smalltalk, Point>>adhereTo:) adhereToRect: function(r) { if (r.containsPoint(this)){ return this; } this.x = mmin(mmax(this.x, r.x), r.x + r.width); this.y = mmin(mmax(this.y, r.y), r.y + r.height); return this; }, // Compute the angle between me and `p` and the x axis. // (cartesian-to-polar coordinates conversion) // Return theta angle in degrees. theta: function(p) { p = point(p); // Invert the y-axis. var y = -(p.y - this.y); var x = p.x - this.x; // Makes sure that the comparison with zero takes rounding errors into account. var PRECISION = 10; // Note that `atan2` is not defined for `x`, `y` both equal zero. var rad = (y.toFixed(PRECISION) == 0 && x.toFixed(PRECISION) == 0) ? 0 : atan2(y, x); // Correction for III. and IV. quadrant. if (rad < 0) { rad = 2*PI + rad; } return 180*rad / PI; }, // Returns distance between me and point `p`. distance: function(p) { return line(this, p).length(); }, // Offset me by the specified amount. offset: function(dx, dy) { this.x += dx || 0; this.y += dy || 0; return this; }, update: function(x, y) { this.x = x || 0; this.y = y || 0; return this; }, round: function(decimals) { this.x = decimals ? this.x.toFixed(decimals) : round(this.x); this.y = decimals ? this.y.toFixed(decimals) : round(this.y); return this; }, // Scale the line segment between (0,0) and me to have a length of len. normalize: function(len) { var s = len / sqrt((this.x*this.x) + (this.y*this.y)); this.x = s * this.x; this.y = s * this.y; return this; }, // Converts rectangular to polar coordinates. // An origin can be specified, otherwise it's 0@0. toPolar: function(o) { o = (o && point(o)) || point(0,0); var x = this.x; var y = this.y; this.x = sqrt((x-o.x)*(x-o.x) + (y-o.y)*(y-o.y)); // r this.y = toRad(o.theta(point(x,y))); return this; }, // Rotate point by angle around origin o. rotate: function(o, angle) { angle = (angle + 360) % 360; this.toPolar(o); this.y += toRad(angle); var p = point.fromPolar(this.x, this.y, o); this.x = p.x; this.y = p.y; return this; }, // Move point on line starting from ref ending at me by // distance distance. move: function(ref, distance) { var theta = toRad(point(ref).theta(this)); return this.offset(cos(theta) * distance, -sin(theta) * distance); }, // Returns change in angle from my previous position (-dx, -dy) to my new position // relative to ref point. changeInAngle: function(dx, dy, ref) { // Revert the translation and measure the change in angle around x-axis. return point(this).offset(-dx, -dy).theta(ref) - this.theta(ref); } }; // Alternative constructor, from polar coordinates. // @param {number} r Distance. // @param {number} angle Angle in radians. // @param {point} [optional] o Origin. point.fromPolar = function(r, angle, o) { o = (o && point(o)) || point(0,0); var x = abs(r * cos(angle)); var y = abs(r * sin(angle)); var deg = toDeg(angle); if (deg < 90) y = -y; else if (deg < 180) { x = -x; y = -y; } else if (deg < 270) x = -x; return point(o.x + x, o.y + y); }; // Create a point with random coordinates that fall into the range `[x1, x2]` and `[y1, y2]`. point.random = function(x1, x2, y1, y2) { return point(floor(random() * (x2 - x1 + 1) + x1), floor(random() * (y2 - y1 + 1) + y1)); }; // Line. // ----- function line(p1, p2) { if (!(this instanceof line)) return new line(p1, p2); this.start = point(p1); this.end = point(p2); } line.prototype = { toString: function() { return this.start.toString() + ' ' + this.end.toString(); }, // @return {double} length of the line length: function() { return sqrt(this.squaredLength()); }, // @return {integer} length without sqrt // @note for applications where the exact length is not necessary (e.g. compare only) squaredLength: function() { var x0 = this.start.x; var y0 = this.start.y; var x1 = this.end.x; var y1 = this.end.y; return (x0 -= x1)*x0 + (y0 -= y1)*y0; }, // @return {point} my midpoint midpoint: function() { return point((this.start.x + this.end.x) / 2, (this.start.y + this.end.y) / 2); }, // @return {point} Point where I'm intersecting l. // @see Squeak Smalltalk, LineSegment>>intersectionWith: intersection: function(l) { var pt1Dir = point(this.end.x - this.start.x, this.end.y - this.start.y); var pt2Dir = point(l.end.x - l.start.x, l.end.y - l.start.y); var det = (pt1Dir.x * pt2Dir.y) - (pt1Dir.y * pt2Dir.x); var deltaPt = point(l.start.x - this.start.x, l.start.y - this.start.y); var alpha = (deltaPt.x * pt2Dir.y) - (deltaPt.y * pt2Dir.x); var beta = (deltaPt.x * pt1Dir.y) - (deltaPt.y * pt1Dir.x); if (det === 0 || alpha * det < 0 || beta * det < 0) { // No intersection found. return null; } if (det > 0){ if (alpha > det || beta > det){ return null; } } else { if (alpha < det || beta < det){ return null; } } return point(this.start.x + (alpha * pt1Dir.x / det), this.start.y + (alpha * pt1Dir.y / det)); } }; // Rectangle. // ---------- function rect(x, y, w, h) { if (!(this instanceof rect)) return new rect(x, y, w, h); if (y === undefined) { y = x.y; w = x.width; h = x.height; x = x.x; } this.x = x; this.y = y; this.width = w; this.height = h; } rect.prototype = { toString: function() { return this.origin().toString() + ' ' + this.corner().toString(); }, origin: function() { return point(this.x, this.y); }, corner: function() { return point(this.x + this.width, this.y + this.height); }, topRight: function() { return point(this.x + this.width, this.y); }, bottomLeft: function() { return point(this.x, this.y + this.height); }, center: function() { return point(this.x + this.width/2, this.y + this.height/2); }, // @return {boolean} true if rectangles intersect intersect: function(r) { var myOrigin = this.origin(); var myCorner = this.corner(); var rOrigin = r.origin(); var rCorner = r.corner(); if (rCorner.x <= myOrigin.x || rCorner.y <= myOrigin.y || rOrigin.x >= myCorner.x || rOrigin.y >= myCorner.y) return false; return true; }, // @return {string} (left|right|top|bottom) side which is nearest to point // @see Squeak Smalltalk, Rectangle>>sideNearestTo: sideNearestToPoint: function(p) { p = point(p); var distToLeft = p.x - this.x; var distToRight = (this.x + this.width) - p.x; var distToTop = p.y - this.y; var distToBottom = (this.y + this.height) - p.y; var closest = distToLeft; var side = 'left'; if (distToRight < closest) { closest = distToRight; side = 'right'; } if (distToTop < closest) { closest = distToTop; side = 'top'; } if (distToBottom < closest) { closest = distToBottom; side = 'bottom'; } return side; }, // @return {bool} true if point p is insight me containsPoint: function(p) { p = point(p); if (p.x > this.x && p.x < this.x + this.width && p.y > this.y && p.y < this.y + this.height) { return true; } return false; }, // @return {point} a point on my boundary nearest to p // @see Squeak Smalltalk, Rectangle>>pointNearestTo: pointNearestToPoint: function(p) { p = point(p); if (this.containsPoint(p)) { var side = this.sideNearestToPoint(p); switch (side){ case "right": return point(this.x + this.width, p.y); case "left": return point(this.x, p.y); case "bottom": return point(p.x, this.y + this.height); case "top": return point(p.x, this.y); } } return p.adhereToRect(this); }, // Find point on my boundary where line starting // from my center ending in point p intersects me. // @param {number} angle If angle is specified, intersection with rotated rectangle is computed. intersectionWithLineFromCenterToPoint: function(p, angle) { p = point(p); var center = point(this.x + this.width/2, this.y + this.height/2); var result; if (angle) p.rotate(center, angle); // (clockwise, starting from the top side) var sides = [ line(this.origin(), this.topRight()), line(this.topRight(), this.corner()), line(this.corner(), this.bottomLeft()), line(this.bottomLeft(), this.origin()) ]; var connector = line(center, p); for (var i = sides.length - 1; i >= 0; --i){ var intersection = sides[i].intersection(connector); if (intersection !== null){ result = intersection; break; } } if (result && angle) result.rotate(center, -angle); return result; }, // Move and expand me. // @param r {rectangle} representing deltas moveAndExpand: function(r) { this.x += r.x; this.y += r.y; this.width += r.width; this.height += r.height; return this; }, round: function(decimals) { this.x = decimals ? this.x.toFixed(decimals) : round(this.x); this.y = decimals ? this.y.toFixed(decimals) : round(this.y); this.width = decimals ? this.width.toFixed(decimals) : round(this.width); this.height = decimals ? this.height.toFixed(decimals) : round(this.height); return this; } }; // Ellipse. // -------- function ellipse(c, a, b) { if (!(this instanceof ellipse)) return new ellipse(c, a, b); c = point(c); this.x = c.x; this.y = c.y; this.a = a; this.b = b; } ellipse.prototype = { toString: function() { return point(this.x, this.y).toString() + ' ' + this.a + ' ' + this.b; }, bbox: function() { return rect(this.x - this.a, this.y - this.b, 2*this.a, 2*this.b); }, // Find point on me where line from my center to // point p intersects my boundary. // @param {number} angle If angle is specified, intersection with rotated ellipse is computed. intersectionWithLineFromCenterToPoint: function(p, angle) { p = point(p); if (angle) p.rotate(point(this.x, this.y), angle); var dx = p.x - this.x; var dy = p.y - this.y; var result; if (dx === 0) { result = this.bbox().pointNearestToPoint(p); if (angle) return result.rotate(point(this.x, this.y), -angle); return result; } var m = dy / dx; var mSquared = m * m; var aSquared = this.a * this.a; var bSquared = this.b * this.b; var x = sqrt(1 / ((1 / aSquared) + (mSquared / bSquared))); x = dx < 0 ? -x : x; var y = m * x; result = point(this.x + x, this.y + y); if (angle) return result.rotate(point(this.x, this.y), -angle); return result; } }; // Bezier curve. // ------------- var bezier = { // Cubic Bezier curve path through points. // Ported from C# implementation by Oleg V. Polikarpotchkin and Peter Lee (http://www.codeproject.com/KB/graphics/BezierSpline.aspx). // @param {array} points Array of points through which the smooth line will go. // @return {array} SVG Path commands as an array curveThroughPoints: function(points) { var controlPoints = this.getCurveControlPoints(points); var path = ['M', points[0].x, points[0].y]; for (var i = 0; i < controlPoints[0].length; i++) { path.push('C', controlPoints[0][i].x, controlPoints[0][i].y, controlPoints[1][i].x, controlPoints[1][i].y, points[i+1].x, points[i+1].y); } return path; }, // Get open-ended Bezier Spline Control Points. // @param knots Input Knot Bezier spline points (At least two points!). // @param firstControlPoints Output First Control points. Array of knots.length - 1 length. // @param secondControlPoints Output Second Control points. Array of knots.length - 1 length. getCurveControlPoints: function(knots) { var firstControlPoints = []; var secondControlPoints = []; var n = knots.length - 1; var i; // Special case: Bezier curve should be a straight line. if (n == 1) { // 3P1 = 2P0 + P3 firstControlPoints[0] = point((2 * knots[0].x + knots[1].x) / 3, (2 * knots[0].y + knots[1].y) / 3); // P2 = 2P1 – P0 secondControlPoints[0] = point(2 * firstControlPoints[0].x - knots[0].x, 2 * firstControlPoints[0].y - knots[0].y); return [firstControlPoints, secondControlPoints]; } // Calculate first Bezier control points. // Right hand side vector. var rhs = []; // Set right hand side X values. for (i = 1; i < n - 1; i++) { rhs[i] = 4 * knots[i].x + 2 * knots[i + 1].x; } rhs[0] = knots[0].x + 2 * knots[1].x; rhs[n - 1] = (8 * knots[n - 1].x + knots[n].x) / 2.0; // Get first control points X-values. var x = this.getFirstControlPoints(rhs); // Set right hand side Y values. for (i = 1; i < n - 1; ++i) { rhs[i] = 4 * knots[i].y + 2 * knots[i + 1].y; } rhs[0] = knots[0].y + 2 * knots[1].y; rhs[n - 1] = (8 * knots[n - 1].y + knots[n].y) / 2.0; // Get first control points Y-values. var y = this.getFirstControlPoints(rhs); // Fill output arrays. for (i = 0; i < n; i++) { // First control point. firstControlPoints.push(point(x[i], y[i])); // Second control point. if (i < n - 1) { secondControlPoints.push(point(2 * knots [i + 1].x - x[i + 1], 2 * knots[i + 1].y - y[i + 1])); } else { secondControlPoints.push(point((knots[n].x + x[n - 1]) / 2, (knots[n].y + y[n - 1]) / 2)); } } return [firstControlPoints, secondControlPoints]; }, // Solves a tridiagonal system for one of coordinates (x or y) of first Bezier control points. // @param rhs Right hand side vector. // @return Solution vector. getFirstControlPoints: function(rhs) { var n = rhs.length; // `x` is a solution vector. var x = []; var tmp = []; var b = 2.0; x[0] = rhs[0] / b; // Decomposition and forward substitution. for (var i = 1; i < n; i++) { tmp[i] = 1 / b; b = (i < n - 1 ? 4.0 : 3.5) - tmp[i]; x[i] = (rhs[i] - x[i - 1]) / b; } for (i = 1; i < n; i++) { // Backsubstitution. x[n - i - 1] -= tmp[n - i] * x[n - i]; } return x; } }; return { toDeg: toDeg, toRad: toRad, snapToGrid: snapToGrid, point: point, line: line, rect: rect, ellipse: ellipse, bezier: bezier } })); /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // JointJS, the JavaScript diagramming library. // (c) 2011-2013 client IO joint.dia.GraphCells = Backbone.Collection.extend({ initialize: function() { // Backbone automatically doesn't trigger re-sort if models attributes are changed later when // they're already in the collection. Therefore, we're triggering sort manually here. this.on('change:z', this.sort, this); }, model: function(attrs, options) { if (attrs.type === 'link') { return new joint.dia.Link(attrs, options); } var module = attrs.type.split('.')[0]; var entity = attrs.type.split('.')[1]; if (joint.shapes[module] && joint.shapes[module][entity]) { return new joint.shapes[module][entity](attrs, options); } return new joint.dia.Element(attrs, options); }, // `comparator` makes it easy to sort cells based on their `z` index. comparator: function(model) { return model.get('z') || 0; }, // Get all inbound and outbound links connected to the cell `model`. getConnectedLinks: function(model, opt) { opt = opt || {}; if (_.isUndefined(opt.inbound) && _.isUndefined(opt.outbound)) { opt.inbound = opt.outbound = true; } var links = []; this.each(function(cell) { var source = cell.get('source'); var target = cell.get('target'); if (source && source.id === model.id && opt.outbound) { links.push(cell); } if (target && target.id === model.id && opt.inbound) { links.push(cell); } }); return links; } }); joint.dia.Graph = Backbone.Model.extend({ initialize: function() { this.set('paper', new Backbone.Model); this.set('cells', new joint.dia.GraphCells); // Make all the events fired in either the `paper` model or the `cells` collection available // to the outside world. this.get('cells').on('all', this.trigger, this); this.get('cells').on('remove', this.removeCell, this); }, fromJSON: function(json) { if (!json.paper || !json.cells) { throw new Error('Graph JSON must contain paper and cells properties.'); } var attrs = json; // Cells are the only attribute that is being set differently, using `cells.add()`. var cells = json.cells; delete attrs.cells; this.set(attrs); this.resetCells(cells); }, clear: function() { this.get('cells').remove(this.get('cells').models); }, _prepareCell: function(cell) { if (cell instanceof Backbone.Model && _.isUndefined(cell.get('z'))) { cell.set('z', this.get('cells').length, { silent: true }); } else if (_.isUndefined(cell.z)) { cell.z = this.get('cells').length; } return cell; }, addCell: function(cell) { if (_.isArray(cell)) { return this.addCells(cell); } this.get('cells').add(this._prepareCell(cell)); return this; }, addCells: function(cells) { _.each(cells, function(cell) { this.addCell(this._prepareCell(cell)); }, this); return this; }, // When adding a lot of cells, it is much more efficient to // reset the entire cells collection in one go. // Useful for bulk operations and optimizations. resetCells: function(cells) { this.get('cells').reset(_.map(cells, this._prepareCell, this)); return this; }, removeCell: function(cell, collection, options) { // Applications might provide a `disconnectLinks` option set to `true` in order to // disconnect links when a cell is removed rather then removing them. The default // is to remove all the associated links. if (options && options.disconnectLinks) { this.disconnectLinks(cell); } else { this.removeLinks(cell); } // Silently remove the cell from the cells collection. Silently, because // `joint.dia.Cell.prototype.remove` already triggers the `remove` event which is // then propagated to the graph model. If we didn't remove the cell silently, two `remove` events // would be triggered on the graph model. this.get('cells').remove(cell, { silent: true }); }, // Get a cell by `id`. getCell: function(id) { return this.get('cells').get(id); }, // Get all inbound and outbound links connected to the cell `model`. getConnectedLinks: function(model, opt) { return this.get('cells').getConnectedLinks(model, opt); }, // Disconnect links connected to the cell `model`. disconnectLinks: function(model) { _.each(this.getConnectedLinks(model), function(link) { link.set(link.get('source').id === model.id ? 'source' : 'target', g.point(0, 0)); }); }, // Remove links connected to the cell `model` completely. removeLinks: function(model) { _.invoke(this.getConnectedLinks(model), 'remove'); } }); /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // JointJS. // (c) 2011-2013 client IO // joint.dia.Cell base model. // -------------------------- joint.dia.Cell = Backbone.Model.extend({ // This is the same as Backbone.Model with the only difference that is uses _.deepExtend // instead of just _.extend. The reason is that we want to mixin attributes set in upper classes. constructor: function(attributes, options) { var defaults; var attrs = attributes || {}; this.cid = _.uniqueId('c'); this.attributes = {}; if (options && options.collection) this.collection = options.collection; if (options && options.parse) attrs = this.parse(attrs, options) || {}; if (defaults = _.result(this, 'defaults')) { //<custom code> // Replaced the call to _.defaults with _.deepExtend. attrs = _.deepExtend({}, defaults, attrs); //</custom code> } this.set(attrs, options); this.changed = {}; this.initialize.apply(this, arguments); }, toJSON: function() { var defaultAttrs = this.constructor.prototype.defaults.attrs || {}; var attrs = this.attributes.attrs; var finalAttrs = {}; // Loop through all the attributes and // omit the default attributes as they are implicitly reconstructable by the cell 'type'. _.each(attrs, function(attr, selector) { var defaultAttr = defaultAttrs[selector]; _.each(attr, function(value, name) { // attr is mainly flat though it might have one more level (consider the `style` attribute). // Check if the `value` is object and if yes, go one level deep. if (_.isObject(value) && !_.isArray(value)) { _.each(value, function(value2, name2) { if (!defaultAttr || !defaultAttr[name] || !_.isEqual(defaultAttr[name][name2], value2)) { finalAttrs[selector] = finalAttrs[selector] || {}; (finalAttrs[selector][name] || (finalAttrs[selector][name] = {}))[name2] = value2; } }); } else if (!defaultAttr || !_.isEqual(defaultAttr[name], value)) { // `value` is not an object, default attribute for such a selector does not exist // or it is different than the attribute value set on the model. finalAttrs[selector] = finalAttrs[selector] || {}; finalAttrs[selector][name] = value; } }); }); var attributes = _.deepClone(_.omit(this.attributes, 'attrs')); attributes.attrs = finalAttrs; return attributes; }, initialize: function(options) { if (!options || !options.id) { this.set('id', joint.util.uuid(), { silent: true }); } }, remove: function(options) { // First, unembed this cell from its parent cell if there is one. var parentCellId = this.get('parent'); if (parentCellId) { var parentCell = this.collection && this.collection.get(parentCellId); parentCell.unembed(this); } _.invoke(this.getEmbeddedCells(), 'remove', options); this.trigger('remove', this, this.collection, options); }, toFront: function() { if (this.collection) { this.set('z', (this.collection.last().get('z') || 0) + 1); } }, toBack: function() { if (this.collection) { this.set('z', (this.collection.first().get('z') || 0) - 1); } }, embed: function(cell) { var cellId = cell.id; cell.set('parent', this.id); this.set('embeds', _.uniq((this.get('embeds') || []).concat([cellId]))); }, unembed: function(cell) { var cellId = cell.id; cell.unset('parent'); this.set('embeds', _.without(this.get('embeds'), cellId)); }, getEmbeddedCells: function() { // Cell models can only be retrieved when this element is part of a collection. // There is no way this element knows about other cells otherwise. // This also means that calling e.g. `translate()` on an element with embeds before // adding it to a graph does not translate its embeds. if (this.collection) { return _.map(this.get('embeds') || [], function(cellId) { return this.collection.get(cellId); }, this); } return []; }, clone: function(opt) { opt = opt || {}; var clone = Backbone.Model.prototype.clone.apply(this, arguments); // We don't want the clone to have the same ID as the original. clone.set('id', joint.util.uuid(), { silent: true }); clone.set('embeds', ''); if (!opt.deep) return clone; // The rest of the `clone()` method deals with embeds. If `deep` option is set to `true`, // the return value is an array of all the embedded clones created. var embeds = this.getEmbeddedCells(); var clones = [clone]; // This mapping stores cloned links under the `id`s of they originals. // This prevents cloning a link more then once. Consider a link 'self loop' for example. var linkCloneMapping = {}; _.each(embeds, function(embed) { var embedClones = embed.clone({ deep: true }); // Embed the first clone returned from `clone({ deep: true })` above. The first // cell is always the clone of the cell that called the `clone()` method, i.e. clone of `embed` in this case. clone.embed(embedClones[0]); _.each(embedClones, function(embedClone) { clones.push(embedClone); // Skip links. Inbound/outbound links are not relevant for them. if (embedClone instanceof joint.dia.Link) { return; } // Collect all inbound links, clone them (if not done already) and set their target to the `embedClone.id`. var inboundLinks = this.collection.getConnectedLinks(embed, { inbound: true }); _.each(inboundLinks, function(link) { var linkClone = linkCloneMapping[link.id] || link.clone(); // Make sure we don't clone a link more then once. linkCloneMapping[link.id] = linkClone; var target = _.clone(linkClone.get('target')); target.id = embedClone.id; linkClone.set('target', target); }); // Collect all inbound links, clone them (if not done already) and set their source to the `embedClone.id`. var outboundLinks = this.collection.getConnectedLinks(embed, { outbound: true }); _.each(outboundLinks, function(link) { var linkClone = linkCloneMapping[link.id] || link.clone(); // Make sure we don't clone a link more then once. linkCloneMapping[link.id] = linkClone; var source = _.clone(linkClone.get('source')); source.id = embedClone.id; linkClone.set('source', source); }); }, this); }, this); // Add link clones to the array of all the new clones. clones = clones.concat(_.values(linkCloneMapping)); return clones; }, // A convenient way to set nested attributes. attr: function(attrs) { var currentAttrs = this.get('attrs'); return this.set('attrs', _.deepExtend({}, currentAttrs, attrs)); } }); // joint.dia.CellView base view and controller. // -------------------------------------------- // This is the base view and controller for `joint.dia.ElementView` and `joint.dia.LinkView`. joint.dia.CellView = Backbone.View.extend({ initialize: function() { _.bindAll(this, 'remove', 'update'); // Store reference to this to the <g> DOM element so that the view is accessible through the DOM tree. this.$el.data('view', this); this.model.on({ 'remove': this.remove, 'change:attrs': this.update }); }, _configure: function(options) { // Make sure a global unique id is assigned to this view. Store this id also to the properties object. // The global unique id makes sure that the same view can be rendered on e.g. different machines and // still be associated to the same object among all those clients. This is necessary for real-time // collaboration mechanism. options.id = options.id || joint.util.guid(this); Backbone.View.prototype._configure.apply(this, arguments); }, // Override the Backbone `_ensureElement()` method in order to create a `<g>` node that wraps // all the nodes of the Cell view. _ensureElement: function() { if (!this.el) { this.el = V('g', { id: this.id }).node; } this.setElement(this.el, false); }, findBySelector: function(selector) { // These are either descendants of `this.$el` of `this.$el` itself. // `.` is a special selector used to select the wrapping `<g>` element. var $selected = selector === '.' ? this.$el : this.$el.find(selector); return $selected; }, notify: function(evt) { if (this.paper) { var args = Array.prototype.slice.call(arguments, 1); // Trigger the event on both the element itself and also on the paper. this.trigger.apply(this, [evt].concat(args)); // Paper event handlers receive the view object as the first argument. this.paper.trigger.apply(this.paper, [evt, this].concat(args)); } }, getBBox: function() { return V(this.el).bbox(); }, highlight: function(el) { var $el; $el = !el ? this.$el : this.$(el); $el = $el.length ? $el : this.$el; // For some reason, CSS `outline` property does not work on `<text>` elements. if ($el[0].tagName.toUpperCase() === 'TEXT') { $el.css('fill', '#FF0000'); } else { $el.css('outline', '2px solid #FF0000'); } }, unhighlight: function(el) { var $el; $el = !el ? this.$el : this.$(el); $el = $el.length ? $el : this.$el; // For some reason, CSS `outline` property does not work on `<text>` elements. if ($el[0].tagName.toUpperCase() === 'TEXT') { $el.css('fill', ''); } else { $el.css('outline', ''); } }, // Find the closest element that has the `magnet` attribute set to `true`. If there was not such // an element found, return the root element of the cell view. findMagnet: function(el) { var $el = this.$(el); if ($el.length === 0 || $el[0] === this.el) { // If the overall cell has set `magnet === false`, then return `undefined` to // announce there is no magnet found for this cell. // This is especially useful to set on cells that have 'ports'. In this case, // only the ports have set `magnet === true` and the overall element has `magnet === false`. var attrs = this.model.get('attrs'); if (attrs['.'] && attrs['.']['magnet'] === false) { return undefined; } return this.el; } if ($el.attr('magnet')) { return $el[0]; } return this.findMagnet($el.parent()); }, // Construct a unique selector for the `el` element within this view. // `selector` is being collected through the recursive call. No value for `selector` is expected when using this method. getSelector: function(el, selector) { if (el === this.el) { return selector; } var index = $(el).index(); selector = el.tagName + ':nth-child(' + (index + 1) + ')' + ' ' + (selector || ''); return this.getSelector($(el).parent()[0], selector + ' '); }, // Interaction. The controller part. // --------------------------------- // Interaction is handled by the paper and delegated to the view in interest. // `x` & `y` parameters passed to these functions represent the coordinates already snapped to the paper grid. // If necessary, real coordinates can be obtained from the `evt` event object. // These functions are supposed to be overriden by the views that inherit from `joint.dia.Cell`, // i.e. `joint.dia.Element` and `joint.dia.Link`. pointerdown: function(evt, x, y) { this.notify('cell:pointerdown', evt, x, y); }, pointermove: function(evt, x, y) { this.notify('cell:pointermove', evt, x, y); }, pointerup: function(evt) { this.notify('cell:pointerup', evt); } }); /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // JointJS library. // (c) 2011-2013 client IO // joint.dia.Element base model. // ----------------------------- joint.dia.Element = joint.dia.Cell.extend({ position: function(x, y) { this.set('position', { x: x, y: y }); }, translate: function(tx, ty) { ty = ty || 0; if (tx === 0 && ty === 0) { // Like nothing has happened. return this; } var position = this.get('position') || { x: 0, y: 0 }; this.set('position', { x: position.x + tx || 0, y: position.y + ty || 0 }); // Recursively call `translate()` on all the embeds cells. _.invoke(this.getEmbeddedCells(), 'translate', tx, ty); return this; }, resize: function(width, height) { return this.set('size', { width: width, height: height }); }, rotate: function(angle, absolute) { return this.set('angle', absolute ? angle : ((this.get('angle') || 0) + angle) % 360); } }); // joint.dia.Element base view and controller. // ------------------------------------------- joint.dia.ElementView = joint.dia.CellView.extend({ initialize: function() { _.bindAll(this, 'translate', 'resize', 'rotate'); joint.dia.CellView.prototype.initialize.apply(this, arguments); // Assign CSS class to the element based on the element type. V(this.el).attr({ 'class': 'element ' + this.model.get('type').split('.').join(' '), 'model-id': this.model.id }); this.model.on({ 'change:position': this.translate, 'change:size': this.resize, 'change:angle': this.rotate }); }, // Default is to process the `attrs` object and set attributes on subelements based on the selectors. update: function(cell, renderingOnlyAttrs) { var rotatable = V(this.$('.rotatable')[0]); if (rotatable) { var rotation = rotatable.attr('transform'); rotatable.attr('transform', ''); } var relativelyPositioned = []; var attrs = renderingOnlyAttrs || this.model.get('attrs'); _.each(attrs, function(attrs, selector) { // Elements that should be updated. var $selected = this.findBySelector(selector); // No element matched by the `selector` was found. We're done then. if ($selected.length === 0) return; // Special attributes are treated by JointJS, not by SVG. var specialAttributes = ['style', 'text', 'ref-x', 'ref-y', 'ref-dx', 'ref-dy', 'ref', 'x-alignment', 'y-alignment']; // Set regular attributes on the `$selected` subelement. Note that we cannot use the jQuery attr() // method as some of the attributes might be namespaced (e.g. xlink:href) which fails with jQuery attr(). var finalAttributes = _.omit(attrs, specialAttributes); $selected.each(function() { V(this).attr(finalAttributes); }); // `style` attribute is special in the sense that it sets the CSS style of the subelement. if (attrs.style) { $selected.css(attrs.style); } // Make special case for `text` attribute. So that we can set text content of the `<text>` element // via the `attrs` object as well. if (!_.isUndefined(attrs.text)) { $selected.each(function() { V(this).text(attrs.text + ''); }); } // Special `ref-x` and `ref-y` attributes make it possible to set both absolute or // relative positioning of subelements. if (!_.isUndefined(attrs['ref-x']) || !_.isUndefined(attrs['ref-y']) || !_.isUndefined(attrs['ref-dx']) || !_.isUndefined(attrs['ref-dy']) || !_.isUndefined(attrs['x-alignment']) || !_.isUndefined(attrs['y-alignment']) ) { relativelyPositioned.push($selected); } }, this); // We don't want the sub elements to affect the bounding box of the root element when // positioning the sub elements relatively to the bounding box. //_.invoke(relativelyPositioned, 'hide'); //_.invoke(relativelyPositioned, 'show'); // Note that we're using the bounding box without transformation because we are already inside // a transformed coordinate system. var bbox = this.el.getBBox(); _.each(relativelyPositioned, function($el) { this.positionRelative($el, bbox, attrs); }, this); if (rotatable) { rotatable.attr('transform', rotation); } }, positionRelative: function($el, bbox, attrs) { var elAttrs = attrs[$el.selector]; var refX = parseFloat(elAttrs['ref-x']); var refY = parseFloat(elAttrs['ref-y']); var refDx = parseFloat(elAttrs['ref-dx']); var refDy = parseFloat(elAttrs['ref-dy']); var yAlignment = elAttrs['y-alignment']; var xAlignment = elAttrs['x-alignment']; // `ref` is the selector of the reference element. If no `ref` is passed, reference // element is the root element. var isScalable = _.contains(_.pluck(_.pluck($el.parents('g'), 'className'), 'baseVal'), 'scalable'); var ref = elAttrs['ref']; if (ref) { // Get the bounding box of the reference element relative to the root `<g>` element. bbox = V(this.findBySelector(ref)[0]).bbox(false, this.el); } var vel = V($el[0]); // Remove the previous translate() from the transform attribute and translate the element // relative to the root bounding box following the `ref-x` and `ref-y` attributes. if (vel.attr('transform')) { vel.attr('transform', vel.attr('transform').replace(/translate\([^)]*\)/g, '')); } function isDefined(x) { return _.isNumber(x) && !_.isNaN(x); } // The final translation of the subelement. var tx = 0; var ty = 0; // `ref-dx` and `ref-dy` define the offset of the subelement relative to the right and/or bottom // coordinate of the reference element. if (isDefined(refDx)) { if (isScalable) { // Compensate for the scale grid in case the elemnt is in the scalable group. var scale = V(this.$('.scalable')[0]).scale(); tx = bbox.x + bbox.width + refDx / scale.sx; } else { tx = bbox.x + bbox.width + refDx; } } if (isDefined(refDy)) { if (isScalable) { // Compensate for the scale grid in case the elemnt is in the scalable group. var scale = V(this.$('.scalable')[0]).scale(); ty = bbox.y + bbox.height + refDy / scale.sy; } else { ty = bbox.y + bbox.height + refDy; } } // if `refX` is in [0, 1] then `refX` is a fraction of bounding box width // if `refX` is < 0 then `refX`'s absolute values is the right coordinate of the bounding box // otherwise, `refX` is the left coordinate of the bounding box // Analogical rules apply for `refY`. if (isDefined(refX)) { if (refX > 0 && refX < 1) { tx = bbox.x + bbox.width * refX; } else if (isScalable) { // Compensate for the scale grid in case the elemnt is in the scalable group. var scale = V(this.$('.scalable')[0]).scale(); tx = bbox.x + refX / scale.sx; } else { tx = bbox.x + refX; } } if (isDefined(refY)) { if (refY > 0 && refY < 1) { ty = bbox.y + bbox.height * refY; } else if (isScalable) { // Compensate for the scale grid in case the elemnt is in the scalable group. var scale = V(this.$('.scalable')[0]).scale(); ty = bbox.y + refY / scale.sy; } else { ty = bbox.y + refY; } } // `y-alignment` when set to `middle` causes centering of the subelement around its new y coordinate. if (yAlignment === 'middle') { ty -= vel.bbox().height/2; } else if (isDefined(yAlignment)) { ty += (yAlignment > 0 && yAlignment < 1) ? vel.bbox().height * yAlignment : yAlignment; } // `x-alignment` when set to `middle` causes centering of the subelement around its new x coordinate. if (xAlignment === 'middle') { tx -= vel.bbox().width/2; } else if (isDefined(xAlignment)) { tx += (xAlignment > 0 && xAlignment < 1) ? vel.bbox().width * xAlignment : xAlignment; } vel.translate(tx, ty); }, // `prototype.markup` is rendered by default. Set the `markup` attribute on the model if the // default markup is not desirable. render: function() { var markup = this.model.markup || this.model.get('markup'); if (markup) { var nodes = V(markup); V(this.el).append(nodes); } else { throw new Error('properties.markup is missing while the default render() implementation is used.'); } this.update(); this.resize(); this.rotate(); this.translate(); return this; }, // Scale the whole `<g>` group. Note the difference between `scale()` and `resize()` here. // `resize()` doesn't scale the whole `<g>` group but rather adjusts the `box.sx`/`box.sy` only. // `update()` is then responsible for scaling only those elements that have the `follow-scale` // attribute set to `true`. This is desirable in elements that have e.g. a `<text>` subelement // that is not supposed to be scaled together with a surrounding `<rect>` element that IS supposed // be be scaled. scale: function(sx, sy) { // TODO: take into account the origin coordinates `ox` and `oy`. V(this.el).scale(sx, sy); }, resize: function() { var size = this.model.get('size') || { width: 1, height: 1 }; var angle = this.model.get('angle') || 0; var scalable = V(this.$('.scalable')[0]); if (!scalable) { // If there is no scalable elements, than there is nothing to resize. return; } var scalableBbox = scalable.bbox(true); scalable.attr('transform', 'scale(' + (size.width / scalableBbox.width) + ',' + (size.height / scalableBbox.height) + ')'); // Now the interesting part. The goal is to be able to store the object geometry via just `x`, `y`, `angle`, `width` and `height` // Order of transformations is significant but we want to reconstruct the object always in the order: // resize(), rotate(), translate() no matter of how the object was transformed. For that to work, // we must adjust the `x` and `y` coordinates of the object whenever we resize it (because the origin of the // rotation changes). The new `x` and `y` coordinates are computed by canceling the previous rotation // around the center of the resized object (which is a different origin then the origin of the previous rotation) // and getting the top-left corner of the resulting object. Then we clean up the rotation back to what it originally was. // Cancel the rotation but now around a different origin, which is the center of the scaled object. var rotatable = V(this.$('.rotatable')[0]); var rotation = rotatable && rotatable.attr('transform'); if (rotation && rotation !== 'null') { rotatable.attr('transform', rotation + ' rotate(' + (-angle) + ',' + (size.width/2) + ',' + (size.height/2) + ')'); var rotatableBbox = scalable.bbox(); // Store new x, y and perform rotate() again against the new rotation origin. this.model.set('position', { x: rotatableBbox.x, y: rotatableBbox.y }); this.rotate(); } // Update must always be called on non-rotated element. Otherwise, relative positioning // would work with wrong (rotated) bounding boxes. this.update(); }, translate: function() { var position = this.model.get('position') || { x: 0, y: 0 }; V(this.el).attr('transform', 'translate(' + position.x + ',' + position.y + ')'); }, rotate: function() { var rotatable = V(this.$('.rotatable')[0]); if (!rotatable) { // If there is no rotatable elements, then there is nothing to rotate. return; } var angle = this.model.get('angle') || 0; var size = this.model.get('size') || { width: 1, height: 1 }; var ox = size.width/2; var oy = size.height/2; rotatable.attr('transform', 'rotate(' + angle + ',' + ox + ',' + oy + ')'); }, // Interaction. The controller part. // --------------------------------- pointerdown: function(evt, x, y) { this._dx = x; this._dy = y; joint.dia.CellView.prototype.pointerdown.apply(this, arguments); }, pointermove: function(evt, x, y) { if (this.options.interactive !== false) { this.model.translate(x - this._dx, y - this._dy); } this._dx = x; this._dy = y; joint.dia.CellView.prototype.pointermove.apply(this, arguments); } }); /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // JointJS diagramming library. // (c) 2011-2013 client IO // joint.dia.Link base model. // -------------------------- joint.dia.Link = joint.dia.Cell.extend({ defaults: { type: 'link' }, disconnect: function() { return this.set({ source: g.point(0, 0), target: g.point(0, 0) }); }, // A convenient way to set labels. Currently set values will be mixined with `value` if used as a setter. label: function(idx, value) { idx = idx || 0; var labels = this.get('labels'); // Is it a getter? if (arguments.length === 0 || arguments.length === 1) { return labels && labels[idx]; } var newValue = _.deepExtend({}, labels[idx], value); var newLabels = labels.slice(); newLabels[idx] = newValue; return this.set({ labels: newLabels }); } }); // joint.dia.Link base view and controller. // ---------------------------------------- joint.dia.LinkView = joint.dia.CellView.extend({ // The default markup for links. markup: [ '<path class="connection" stroke="black"/>', '<path class="marker-source" fill="black" stroke="black" />', '<path class="marker-target" fill="black" stroke="black" />', '<path class="connection-wrap"/>', '<g class="labels" />', '<g class="marker-vertices"/>', '<g class="marker-arrowheads"/>', '<g class="link-tools" />' ].join(''), labelMarkup: [ '<g class="label">', '<rect />', '<text />', '</g>' ].join(''), toolMarkup: [ '<g class="link-tool">', '<g class="tool-remove" event="remove">', '<circle r="11" />', '<path transform="scale(.8) translate(-16, -16)" d="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z"/>', '<title>Remove link.</title>', '</g>', '</g>' ].join(''), // The default markup for showing/removing vertices. These elements are the children of the .marker-vertices element (see `this.markup`). // Only .marker-vertex and .marker-vertex-remove element have special meaning. The former is used for // dragging vertices (changin their position). The latter is used for removing vertices. vertexMarkup: [ '<g class="marker-vertex-group" transform="translate(<%= x %>, <%= y %>)">', '<circle class="marker-vertex" idx="<%= idx %>" r="10"/>', '<path class="marker-vertex-remove-area" idx="<%= idx %>" d="M16,5.333c-7.732,0-14,4.701-14,10.5c0,1.982,0.741,3.833,2.016,5.414L2,25.667l5.613-1.441c2.339,1.317,5.237,2.107,8.387,2.107c7.732,0,14-4.701,14-10.5C30,10.034,23.732,5.333,16,5.333z" transform="translate(5, -33)"/>', '<path class="marker-vertex-remove" idx="<%= idx %>" transform="scale(.8) translate(9.5, -37)" d="M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z">', '<title>Remove vertex.</title>', '</path>', '</g>' ].join(''), arrowheadMarkup: [ '<g class="marker-arrowhead-group" transform="translate(<%= x %>, <%= y %>)">', '<path class="marker-arrowhead" end="<%= end %>" d="M 26 0 L 0 13 L 26 26 z" />', '</g>' ].join(''), options: { shortLinkLength: 100 }, initialize: function() { joint.dia.CellView.prototype.initialize.apply(this, arguments); _.bindAll( this, 'update', 'updateEnds', 'render', 'renderVertexMarkers', 'renderLabels', 'renderTools', 'onSourceModelChange', 'onTargetModelChange' ); // Assign CSS class to the element based on the element type. V(this.el).attr({ 'class': 'link', 'model-id': this.model.id }); this.model.on({ 'change:vertices': this.update, 'change:source': this.updateEnds, 'change:target': this.updateEnds, 'change:markup': this.render, 'change:smooth': this.update }); this.model.on({ 'change:vertices': this.renderVertexMarkers, 'change:vertexMarkup': this.renderVertexMarkers }); this.model.on({ 'change:labels': this.renderLabels, 'change:labelMarkup': this.renderLabels }); this.model.on({ 'change:toolMarkup': this.renderTools }); // `_.labelCache` is a mapping of indexes of labels in the `this.get('labels')` array to // `<g class="label">` nodes wrapped by Vectorizer. This allows for quick access to the // nodes in `updateLabelPosition()` in order to update the label positions. this._labelCache = {}; // These are the bounding boxes for the source/target elements. this._sourceBbox = undefined; this._targetBbox = undefined; }, onSourceModelChange: function() { var source = this.model.get('source'); if (!this._isPoint(source)) { this._sourceBbox = V(this.paper.$(this._makeSelector(source))[0]).bbox(false, this.paper.viewport); } this.update(); }, onTargetModelChange: function() { var target = this.model.get('target'); if (!this._isPoint(target)) { this._targetBbox = V(this.paper.$(this._makeSelector(target))[0]).bbox(false, this.paper.viewport); } this.update(); }, // Default is to process the `attrs` object and set attributes on subelements based on the selectors. update: function() { // Update attributes. _.each(this.model.get('attrs'), function(attrs, selector) { var $selected = this.findBySelector(selector); $selected.attr(attrs); }, this); var firstVertex = _.first(this.model.get('vertices')); var lastVertex = _.last(this.model.get('vertices')); var sourcePosition = this.getConnectionPoint('source', this.model.get('source'), firstVertex || this.model.get('target')).round(); var targetPosition = this.getConnectionPoint('target', this.model.get('target'), lastVertex || sourcePosition); // Make the markers "point" to their sticky points being auto-oriented towards `targetPosition`/`sourcePosition`. this._markerSource.translateAndAutoOrient(sourcePosition, firstVertex || targetPosition, this.paper.viewport); this._markerTarget.translateAndAutoOrient(targetPosition, lastVertex || sourcePosition, this.paper.viewport); var pathData = this.getPathData(this.model.get('vertices')); this._connection.attr('d', pathData); this._connectionWrap.attr('d', pathData); this.renderArrowheadMarkers(); this.updateLabelPositions(); this.updateToolsPosition(); return this; }, render: function() { // A special markup can be given in the `properties.markup` property. This might be handy // if e.g. arrowhead markers should be `<image>` elements or any other element than `<path>`s. // `.connection`, `.connection-wrap`, `.marker-source` and `.marker-target` selectors // of elements with special meaning though. Therefore, those classes should be preserved in any // special markup passed in `properties.markup`. var markup = this.model.get('markup') || this.markup; var children = V(markup); $(this.el).empty(); V(this.el).append(children); // Cache some important elements for quicker access. this._markerSource = V(this.$('.marker-source')[0]); this._markerTarget = V(this.$('.marker-target')[0]); this._connection = V(this.$('.connection')[0]); this._connectionWrap = V(this.$('.connection-wrap')[0]); this.renderLabels(); this.renderTools(); // Note that `updateEnds()` calls `update()` internally. this.updateEnds(); this.renderVertexMarkers(); return this; }, updateEnds: function() { this.onSourceModelChange(); this.onTargetModelChange(); var cell; // First, stop listening to `change` and `remove` events on previous `source` and `target` cells. if (this._isModel(this.model.previous('source'))) { cell = this.paper.getModelById(this.model.previous('source').id); this.stopListening(cell, 'change'); } if (this._isModel(this.model.previous('target'))) { cell = this.paper.getModelById(this.model.previous('target').id); this.stopListening(cell, 'change'); } // Listen on changes in `source` and `target` cells and update the link if any change happens. if (this._isModel(this.model.get('source'))) { cell = this.paper.getModelById(this.model.get('source').id); this.listenTo(cell, 'change', this.onSourceModelChange); } if (this._isModel(this.model.get('target'))) { cell = this.paper.getModelById(this.model.get('target').id); this.listenTo(cell, 'change', this.onTargetModelChange); } this.update(); }, updateLabelPositions: function() { // This method assumes all the label nodes are stored in the `this._labelCache` hash table // by their indexes in the `this.get('labels')` array. This is done in the `renderLabels()` method. var labels = this.model.get('labels') || []; if (!labels.length) return; var connectionElement = this._connection.node; var connectionLength = connectionElement.getTotalLength(); _.each(labels, function(label, idx) { var position = label.position; position = (position > connectionLength) ? connectionLength : position; // sanity check position = (position < 0) ? connectionLength + position : position; position = position > 1 ? position : connectionLength * position; var labelCoordinates = connectionElement.getPointAtLength(position); this._labelCache[idx].attr('transform', 'translate(' + labelCoordinates.x + ', ' + labelCoordinates.y + ')'); }, this); }, renderLabels: function() { this._labelCache = {}; var $labels = this.$('.labels').empty(); var labels = this.model.get('labels') || []; if (!labels.length) return; var labelTemplate = _.template(this.model.get('labelMarkup') || this.labelMarkup); // This is a prepared instance of a vectorized SVGDOM node for the label element resulting from // compilation of the labelTemplate. The purpose is that all labels will just `clone()` this // node to create a duplicate. var labelNodeInstance = V(labelTemplate()); var connectionElement = this._connection.node; var connectionLength = connectionElement.getTotalLength(); _.each(labels, function(label, idx) { var labelNode = labelNodeInstance.clone().node; // Cache label nodes so that the `updateLabels()` can just update the label node positions. this._labelCache[idx] = V(labelNode); var $text = $(labelNode).find('text'); var $rect = $(labelNode).find('rect'); // Text attributes with the default `text-anchor` set. var textAttributes = _.extend({ 'text-anchor': 'middle' }, label.attrs.text); $text.attr(_.omit(textAttributes, 'text')); if (!_.isUndefined(textAttributes.text)) { V($text[0]).text(textAttributes.text + ''); } // Note that we first need to append the `<text>` element to the DOM in order to // get its bounding box. $labels.append(labelNode); // `y-alignment` - center the text element around its y coordinate. var textBbox = V($text[0]).bbox(true, $labels[0]); V($text[0]).translate(0, -textBbox.height/2); // Add default values. var rectAttributes = _.extend({ fill: 'white', rx: 3, ry: 3 }, label.attrs.rect); $rect.attr(_.extend(rectAttributes, { x: textBbox.x, y: textBbox.y - textBbox.height/2, // Take into account the y-alignment translation. width: textBbox.width, height: textBbox.height })); }, this); this.updateLabelPositions(); }, renderTools: function() { // Tools are a group of clickable elements that manipulate the whole link. // A good example of this is the remove tool that removes the whole link. // Tools appear after hovering the link close to the `source` element/point of the link // but are offset a bit so that they don't cover the `marker-arrowhead`. var $tools = this.$('.link-tools').empty(); var toolTemplate = _.template(this.model.get('toolMarkup') || this.toolMarkup); var tool = V(toolTemplate()); $tools.append(tool.node); // Cache the tool node so that the `updateToolsPosition()` can update the tool position quickly. this._toolCache = tool; this.updateToolsPosition(); }, updateToolsPosition: function() { // Move the tools a bit to the target position but don't cover the `sourceArrowhead` marker. // Note that the offset is hardcoded here. The offset should be always // more than the `this.$('.marker-arrowhead[end="source"]')[0].bbox().width` but looking // this up all the time would be slow. var scale = ''; var offset = 40; // If the link is too short, make the tools half the size and the offset twice as low. if (this.getConnectionLength() < this.options.shortLinkLength) { scale = 'scale(.5)'; offset /= 2; } var toolPosition = this.getPointAtLength(offset); this._toolCache.attr('transform', 'translate(' + toolPosition.x + ', ' + toolPosition.y + ') ' + scale); }, renderVertexMarkers: function() { var $markerVertices = this.$('.marker-vertices').empty(); // A special markup can be given in the `properties.vertexMarkup` property. This might be handy // if default styling (elements) are not desired. This makes it possible to use any // SVG elements for .marker-vertex and .marker-vertex-remove tools. var markupTemplate = _.template(this.model.get('vertexMarkup') || this.vertexMarkup); _.each(this.model.get('vertices'), function(vertex, idx) { $markerVertices.append(V(markupTemplate({ x: vertex.x, y: vertex.y, 'idx': idx })).node); }); return this; }, renderArrowheadMarkers: function() { var $markerArrowheads = this.$('.marker-arrowheads'); // Custom markups might not have arrowhead markers. Therefore, jump of this function immediately if that's the case. if ($markerArrowheads.length === 0) return; $markerArrowheads.empty(); // A special markup can be given in the `properties.vertexMarkup` property. This might be handy // if default styling (elements) are not desired. This makes it possible to use any // SVG elements for .marker-vertex and .marker-vertex-remove tools. var markupTemplate = _.template(this.model.get('arrowheadMarkup') || this.arrowheadMarkup); var firstVertex = _.first(this.model.get('vertices')); var lastVertex = _.last(this.model.get('vertices')); var sourcePosition = this.getConnectionPoint('source', this.model.get('source'), firstVertex || this.model.get('target')).round(); var targetPosition = this.getConnectionPoint('target', this.model.get('target'), lastVertex || sourcePosition); var sourceArrowhead = V(markupTemplate({ x: sourcePosition.x, y: sourcePosition.y, 'end': 'source' })).node; var targetArrowhead = V(markupTemplate({ x: targetPosition.x, y: targetPosition.y, 'end': 'target' })).node; if (this.getConnectionLength() < this.options.shortLinkLength) { V(sourceArrowhead).scale(.5); V(targetArrowhead).scale(.5); } $markerArrowheads.append(sourceArrowhead); $markerArrowheads.append(targetArrowhead); // Make the markers "point" to their sticky points being auto-oriented towards `targetPosition`/`sourcePosition`. V(sourceArrowhead).translateAndAutoOrient(sourcePosition, firstVertex || targetPosition, this.paper.viewport); V(targetArrowhead).translateAndAutoOrient(targetPosition, lastVertex || sourcePosition, this.paper.viewport); return this; }, removeVertex: function(idx) { var vertices = _.clone(this.model.get('vertices')); if (vertices && vertices.length) { vertices.splice(idx, 1); this.model.set('vertices', vertices); } return this; }, // This method ads a new vertex to the `vertices` array of `.connection`. This method // uses a heuristic to find the index at which the new `vertex` should be placed at assuming // the new vertex is somewhere on the path. addVertex: function(vertex) { this.model.set('attrs', this.model.get('attrs') || {}); var attrs = this.model.get('attrs'); // As it is very hard to find a correct index of the newly created vertex, // a little heuristics is taking place here. // The heuristics checks if length of the newly created // path is lot more than length of the old path. If this is the case, // new vertex was probably put into a wrong index. // Try to put it into another index and repeat the heuristics again. var vertices = (this.model.get('vertices') || []).slice(); // Store the original vertices for a later revert if needed. var originalVertices = vertices.slice(); // A `<path>` element used to compute the length of the path during heuristics. var path = this._connection.node.cloneNode(false); // Length of the original path. var originalPathLength = path.getTotalLength(); // Current path length. var pathLength; // Tolerance determines the highest possible difference between the length // of the old and new path. The number has been chosen heuristically. var pathLengthTolerance = 10; // Total number of vertices including source and target points. var idx = vertices.length + 1; // Loop through all possible indexes and check if the difference between // path lengths changes significantly. If not, the found index is // most probably the right one. while (idx--) { vertices.splice(idx, 0, vertex); V(path).attr('d', this.getPathData(vertices)); pathLength = path.getTotalLength(); // Check if the path lengths changed significantly. if (pathLength - originalPathLength > pathLengthTolerance) { // Revert vertices to the original array. The path length has changed too much // so that the index was not found yet. vertices = originalVertices.slice(); } else { break; } } this.model.set('vertices', vertices); return idx; }, // Return the `d` attribute value of the `<path>` element representing the link between `source` and `target`. getPathData: function(vertices) { var firstVertex = _.first(vertices); var lastVertex = _.last(vertices); var sourcePoint = this.getConnectionPoint('source', this.model.get('source'), firstVertex || this.model.get('target')).round(); var targetPoint = this.getConnectionPoint('target', this.model.get('target'), lastVertex || sourcePoint); // Move the source point by the width of the marker taking into account its scale around x-axis. // Note that scale is the only transform that makes sense to be set in `.marker-source` attributes object // as all other transforms (translate/rotate) will be replaced by the `translateAndAutoOrient()` function. var markerSourceBbox = this._markerSource.bbox(true); var markerSourceScaleX = this._markerSource.scale().sx; sourcePoint.move(firstVertex || targetPoint, -markerSourceBbox.width * markerSourceScaleX); var markerTargetBbox = this._markerTarget.bbox(true); var markerTargetScaleX = this._markerTarget.scale().sx; targetPoint.move(lastVertex || sourcePoint, -markerTargetBbox.width * markerTargetScaleX); var d; if (this.model.get('smooth')) { d = g.bezier.curveThroughPoints([sourcePoint].concat(vertices || []).concat([targetPoint])); } else { // Construct the `d` attribute of the `<path>` element. d = ['M', sourcePoint.x, sourcePoint.y]; _.each(vertices, function(vertex) { d.push(vertex.x, vertex.y); }); d.push(targetPoint.x, targetPoint.y); } return d.join(' '); }, // Find a point that is the start of the connection. // If `selectorOrPoint` is a point, then we're done and that point is the start of the connection. // If the `selectorOrPoint` is an element however, we need to know a reference point (or element) // that the link leads to in order to determine the start of the connection on the original element. getConnectionPoint: function(end, selectorOrPoint, referenceSelectorOrPoint) { var spot; if (this._isPoint(selectorOrPoint)) { // If the source is a point, we don't need a reference point to find the sticky point of connection. spot = g.point(selectorOrPoint); } else { // If the source is an element, we need to find a point on the element boundary that is closest // to the reference point (or reference element). // Get the bounding box of the spot relative to the paper viewport. This is necessary // in order to follow paper viewport transformations (scale/rotate). var spotBbox; // If there are cached bounding boxes of source/target elements, use them. Otherwise, // find it. if (end === 'source' && this._sourceBbox) { spotBbox = this._sourceBbox; } else if (end === 'target' && this._targetBbox) { spotBbox = this._targetBbox; } else { spotBbox = V(this.paper.$(this._makeSelector(selectorOrPoint))[0]).bbox(false, this.paper.viewport); } var reference; if (this._isPoint(referenceSelectorOrPoint)) { // Reference was passed as a point, therefore, we're ready to find the sticky point of connection on the source element. reference = g.point(referenceSelectorOrPoint); } else { // Reference was passed as an element, therefore we need to find a point on the reference // element boundary closest to the source element. // Get the bounding box of the spot relative to the paper viewport. This is necessary // in order to follow paper viewport transformations (scale/rotate). var referenceBbox; if (end === 'source' && this._targetBbox) { referenceBbox = this._targetBbox; } else if (end === 'target' && this._sourceBbox) { referenceBbox = this._sourceBbox; } else { referenceBbox = V(this.paper.$(this._makeSelector(referenceSelectorOrPoint))[0]).bbox(false, this.paper.viewport); } reference = g.rect(referenceBbox).intersectionWithLineFromCenterToPoint(g.rect(spotBbox).center()); reference = reference || g.rect(referenceBbox).center(); } // If `perpendicularLinks` flag is set on the paper and there are vertices // on the link, then try to find a connection point that makes the link perpendicular // even though the link won't point to the center of the targeted object. if (this.paper.options.perpendicularLinks) { var horizontalLineRect = g.rect(0, reference.y, this.paper.options.width, 1); var verticalLineRect = g.rect(reference.x, 0, 1, this.paper.options.height); var nearestSide; if (horizontalLineRect.intersect(g.rect(spotBbox))) { nearestSide = g.rect(spotBbox).sideNearestToPoint(reference); switch (nearestSide) { case 'left': spot = g.point(spotBbox.x, reference.y); break; case 'right': spot = g.point(spotBbox.x + spotBbox.width, reference.y); break; default: spot = g.rect(spotBbox).center(); break; } } else if (verticalLineRect.intersect(g.rect(spotBbox))) { nearestSide = g.rect(spotBbox).sideNearestToPoint(reference); switch (nearestSide) { case 'top': spot = g.point(reference.x, spotBbox.y); break; case 'bottom': spot = g.point(reference.x, spotBbox.y + spotBbox.height); break; default: spot = g.rect(spotBbox).center(); break; } } else { // If there is no intersection horizontally or vertically with the object bounding box, // then we fall back to the regular situation finding straight line (not perpendicular) // between the object and the reference point. spot = g.rect(spotBbox).intersectionWithLineFromCenterToPoint(reference); spot = spot || g.rect(spotBbox).center(); } } else { spot = g.rect(spotBbox).intersectionWithLineFromCenterToPoint(reference); spot = spot || g.rect(spotBbox).center(); } } return spot; }, _isModel: function(end) { return end && end.id; }, _isPoint: function(end) { return !this._isModel(end); }, _makeSelector: function(end) { return '[model-id="' + end.id + '"]' + (end.selector ? ' ' + end.selector : ''); }, // Public API // ---------- getConnectionLength: function() { return this._connection.node.getTotalLength(); }, getPointAtLength: function(length) { return this._connection.node.getPointAtLength(length); }, // Interaction. The controller part. // --------------------------------- pointerdown: function(evt, x, y) { joint.dia.CellView.prototype.pointerdown.apply(this, arguments); delete this._action; this._dx = x; this._dy = y; if (this.options.interactive === false) { return; } var targetClass = V(evt.target).attr('class'); var targetParentEvent = V($(evt.target).parent()[0]).attr('event'); if (targetClass === 'marker-vertex') { this._vertexIdx = $(evt.target).attr('idx'); this._action = 'vertex-move'; } else if (targetClass === 'marker-vertex-remove' || targetClass === 'marker-vertex-remove-area') { this.removeVertex($(evt.target).attr('idx')); } else if (targetClass === 'marker-arrowhead') { this._arrowheadEnd = $(evt.target).attr('end'); this._action = 'arrowhead-move'; this._originalZ = this.model.get('z'); this.model.set('z', Number.MAX_VALUE); // Let the pointer propagate throught the link view elements so that // the `evt.target` is another element under the pointer, not the link itself. this.$el.css({ 'pointer-events': 'none' }); } else if (targetParentEvent) { // `remove` event is built-in. Other custom events are triggered on the paper. if (targetParentEvent === 'remove') { this.model.remove(); } else { this.paper.trigger(targetParentEvent, evt, this, x, y); } } else { // Store the index at which the new vertex has just been placed. // We'll be update the very same vertex position in `pointermove()`. this._vertexIdx = this.addVertex({ x: x, y: y }); this._action = 'vertex-move'; } }, pointermove: function(evt, x, y) { joint.dia.CellView.prototype.pointermove.apply(this, arguments); if (this.options.interactive === false) { return; } switch (this._action) { case 'vertex-move': var vertices = _.clone(this.model.get('vertices')); vertices[this._vertexIdx] = { x: x, y: y }; this.model.set('vertices', vertices); break; case 'arrowhead-move': // Unhighlight the previous view under pointer if there was one. if (this._viewUnderPointer) { this._viewUnderPointer.unhighlight(this._magnetUnderPointer); } this._viewUnderPointer = this.paper.findView(evt.target); if (this._viewUnderPointer && this._viewUnderPointer.model instanceof joint.dia.Link) { // Do not allow linking links with links. this._viewUnderPointer = null; } // If we found a view that is under the pointer, we need to find the closest // magnet based on the real target element of the event. if (this._viewUnderPointer) { this._magnetUnderPointer = this._viewUnderPointer.findMagnet(evt.target); if (!this._magnetUnderPointer) { // If there was no magnet found, do not highlight anything and assume there // is no view under pointer we're interested in reconnecting to. // This can only happen if the overall element has the attribute `'.': { magnet: false }`. this._viewUnderPointer = null; } } if (this._viewUnderPointer) { this._viewUnderPointer.highlight(this._magnetUnderPointer); } this.model.set(this._arrowheadEnd, { x: x, y: y }); break; } this._dx = x; this._dy = y; }, pointerup: function(evt) { joint.dia.CellView.prototype.pointerup.apply(this, arguments); if (this._action === 'arrowhead-move') { // Put `pointer-events` back to `auto`. See `pointerdown()` for explanation. this.$el.css({ 'pointer-events': 'auto' }); this.model.set('z', this._originalZ); delete this._originalZ; if (this._viewUnderPointer) { // Find a unique `selector` of the element under pointer that is a magnet. If the // `this._magnetUnderPointer` is the root element of the `this._viewUnderPointer` itself, // the returned `selector` will be `undefined`. That means we can directly pass it to the // `source`/`target` attribute of the link model below. var selector = this._viewUnderPointer.getSelector(this._magnetUnderPointer); this.model.set(this._arrowheadEnd, { id: this._viewUnderPointer.model.id, selector: selector }); this._viewUnderPointer.unhighlight(this._magnetUnderPointer); delete this._viewUnderPointer; delete this._magnetUnderPointer; } } } }); /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // JointJS library. // (c) 2011-2013 client IO joint.dia.Paper = Backbone.View.extend({ options: { width: 800, height: 600, gridSize: 50, perpendicularLinks: false, elementView: joint.dia.ElementView, linkView: joint.dia.LinkView }, events: { 'mousedown': 'pointerdown', 'touchstart': 'pointerdown', 'mousemove': 'pointermove', 'touchmove': 'pointermove', 'mouseup': 'pointerup', 'touchend': 'pointerup' }, initialize: function() { _.bindAll(this, 'addCell', 'sortCells', 'resetCells'); this.svg = V('svg').node; this.viewport = V('g').node; V(this.viewport).attr({ 'class': 'viewport' }); V(this.svg).append(this.viewport); this.$el.append(this.svg); this.setDimensions(); this.model.on({ 'add': this.addCell, 'reset': this.resetCells, 'sort': this.sortCells }); }, setDimensions: function(width, height) { if (width) this.options.width = width; if (height) this.options.height = height; V(this.svg).attr('width', this.options.width); V(this.svg).attr('height', this.options.height); }, createViewForModel: function(cell) { var view; var type = cell.get('type'); var module = type.split('.')[0]; var entity = type.split('.')[1]; // If there is a special view defined for this model, use that one instead of the default `elementView`/`linkView`. if (joint.shapes[module] && joint.shapes[module][entity + 'View']) { view = new joint.shapes[module][entity + 'View']({ model: cell, interactive: this.options.interactive }); } else if (cell instanceof joint.dia.Element) { view = new this.options.elementView({ model: cell, interactive: this.options.interactive }); } else { view = new this.options.linkView({ model: cell, interactive: this.options.interactive }); } return view; }, addCell: function(cell) { var view = this.createViewForModel(cell); V(this.viewport).append(view.el); view.paper = this; view.render(); // This is the only way to prevent image dragging in Firefox that works. // Setting -moz-user-select: none, draggable="false" attribute or user-drag: none didn't help. $(view.el).find('image').on('dragstart', function() { return false; }); }, resetCells: function(cellsCollection) { $(this.viewport).empty(); _.each(cellsCollection.models, this.addCell, this); }, sortCells: function() { // Run insertion sort algorithm in order to efficiently sort DOM elements according to their // associated model `z` attribute. var $cells = $(this.viewport).children('[model-id]'); var cells = this.model.get('cells'); // Using the jquery.sortElements plugin by Padolsey. // See http://james.padolsey.com/javascript/sorting-elements-with-jquery/. $cells.sortElements(function(a, b) { var cellA = cells.get($(a).attr('model-id')); var cellB = cells.get($(b).attr('model-id')); return (cellA.get('z') || 0) > (cellB.get('z') || 0) ? 1 : -1; }); }, scale: function(sx, sy, ox, oy) { if (!ox) { ox = 0; oy = 0; } // Remove previous transform so that the new scale is not affected by previous scales, especially // the old translate() does not affect the new translate if an origin is specified. V(this.viewport).attr('transform', ''); // TODO: V.scale() doesn't support setting scale origin. #Fix if (ox || oy) { V(this.viewport).translate(-ox * (sx - 1), -oy * (sy - 1)); } V(this.viewport).scale(sx, sy); if (ox || oy) { //V(this.viewport).translate(ox, oy); } return this; }, rotate: function(deg, ox, oy) { // If the origin is not set explicitely, rotate around the center. Note that // we must use the plain bounding box (`this.el.getBBox()` instead of the one that gives us // the real bounding box (`bbox()`) including transformations). if (_.isUndefined(ox)) { var bbox = this.viewport.getBBox(); ox = bbox.width/2; oy = bbox.height/2; } V(this.viewport).rotate(deg, ox, oy); }, // Find the first view climbing up the DOM tree starting at element `el`. Note that `el` can also // be a selector or a jQuery object. findView: function(el) { var $el = this.$(el); if ($el.length === 0 || $el[0] === this.el) { return undefined; } if ($el.data('view')) { return $el.data('view'); } return this.findView($el.parent()); }, // Find a view for a model `cell`. `cell` can also be a string representing a model `id`. findViewByModel: function(cell) { var id = _.isString(cell) ? cell : cell.id; var $view = this.$('[model-id="' + id + '"]'); if ($view.length) { return $view.data('view'); } return undefined; }, // Find all views at given point findViewsFromPoint: function(p) { p = g.point(p); var isNotALink = function(cell) { return !(cell instanceof joint.dia.Link); }; var elements = this.model.get('cells').filter(isNotALink); var views = _.map(elements, this.findViewByModel); return _.filter(views, function(view) { return g.rect(view.getBBox()).containsPoint(p); }, this); }, // Find all views at given point findViewsInArea: function(r) { r = g.rect(r); var isNotALink = function(cell) { return !(cell instanceof joint.dia.Link); }; var elements = this.model.get('cells').filter(isNotALink); var elementViews = []; _.each(elements, function(element) { var view = this.findViewByModel(element); if (r.containsPoint(g.point(view.getBBox()))) { elementViews.push(view); } }, this); return elementViews; }, getModelById: function(id) { return this.model.getCell(id); }, snapToGrid: function(p) { // Convert global coordinates to the local ones of the `viewport`. Otherwise, // improper transformation would be applied when the viewport gets transformed (scaled/rotated). var localPoint = V(this.viewport).toLocalPoint(p.x, p.y); return { x: g.snapToGrid(localPoint.x, this.options.gridSize), y: g.snapToGrid(localPoint.y, this.options.gridSize) }; }, // Interaction. // ------------ normalizeEvent: function(evt) { return (evt.originalEvent && evt.originalEvent.changedTouches && evt.originalEvent.changedTouches.length) ? evt.originalEvent.changedTouches[0] : evt; }, pointerdown: function(evt) { evt.preventDefault(); evt = this.normalizeEvent(evt); var view = this.findView(evt.target); var localPoint = this.snapToGrid({ x: evt.clientX, y: evt.clientY }); if (view) { this.sourceView = view; view.pointerdown(evt, localPoint.x, localPoint.y); } else { this.trigger('blank:pointerdown', evt, localPoint.x, localPoint.y); } }, pointermove: function(evt) { evt.preventDefault(); evt = this.normalizeEvent(evt); if (this.sourceView) { var localPoint = this.snapToGrid({ x: evt.clientX, y: evt.clientY }); this.sourceView.pointermove(evt, localPoint.x, localPoint.y); } }, pointerup: function(evt) { evt.preventDefault(); evt = this.normalizeEvent(evt); if (this.sourceView) { this.sourceView.pointerup(evt); delete this.sourceView; } } }); /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // JointJS library. // (c) 2011-2013 client IO joint.shapes.basic = {}; joint.shapes.basic.Generic = joint.dia.Element.extend({ defaults: joint.util.deepSupplement({ type: 'basic.Generic', attrs: { '.': { fill: 'white', stroke: 'none' } } }, joint.dia.Element.prototype.defaults) }); joint.shapes.basic.Rect = joint.shapes.basic.Generic.extend({ markup: '<g class="rotatable"><g class="scalable"><rect/></g><text/></g>', defaults: joint.util.deepSupplement({ type: 'basic.Rect', attrs: { 'rect': { fill: 'white', stroke: 'black', width: 1, height: 1 }, 'text': { 'font-size': 14, text: '', 'ref-x': .5, 'ref-y': .5, ref: 'rect', 'y-alignment': 'middle', 'x-alignment': 'middle', fill: 'black', 'font-family': 'Arial, helvetica, sans-serif' } } }, joint.shapes.basic.Generic.prototype.defaults) }); joint.shapes.basic.Text = joint.shapes.basic.Generic.extend({ markup: '<g class="rotatable"><g class="scalable"><text/></g></g>', defaults: joint.util.deepSupplement({ type: 'basic.Text', attrs: { 'text': { 'font-size': 18, fill: 'black' } } }, joint.shapes.basic.Generic.prototype.defaults) }); joint.shapes.basic.Circle = joint.shapes.basic.Generic.extend({ markup: '<g class="rotatable"><g class="scalable"><circle/></g><text/></g>', defaults: joint.util.deepSupplement({ type: 'basic.Circle', size: { width: 60, height: 60 }, attrs: { 'circle': { fill: 'white', stroke: 'black', r: 30, transform: 'translate(30, 30)' }, 'text': { 'font-size': 14, text: '', 'text-anchor': 'middle', 'ref-x': .5, 'ref-y': .5, ref: 'circle', 'y-alignment': 'middle', fill: 'black', 'font-family': 'Arial, helvetica, sans-serif' } } }, joint.shapes.basic.Generic.prototype.defaults) }); joint.shapes.basic.Image = joint.shapes.basic.Generic.extend({ markup: '<g class="rotatable"><g class="scalable"><image/></g><text/></g>', defaults: joint.util.deepSupplement({ type: 'basic.Image', attrs: { 'text': { 'font-size': 14, text: '', 'text-anchor': 'middle', 'ref-x': .5, 'ref-dy': 20, ref: 'image', 'y-alignment': 'middle', fill: 'black', 'font-family': 'Arial, helvetica, sans-serif' } } }, joint.shapes.basic.Generic.prototype.defaults) }); joint.shapes.basic.Path = joint.shapes.basic.Generic.extend({ markup: '<g class="rotatable"><g class="scalable"><path/></g><text/></g>', defaults: joint.util.deepSupplement({ type: 'basic.Path', size: { width: 60, height: 60 }, attrs: { 'path': { fill: 'white', stroke: 'black' }, 'text': { 'font-size': 14, text: '', 'text-anchor': 'middle', 'ref-x': .5, 'ref-dy': 20, ref: 'path', 'y-alignment': 'middle', fill: 'black', 'font-family': 'Arial, helvetica, sans-serif' } } }, joint.shapes.basic.Generic.prototype.defaults) });
src/svg-icons/maps/directions-run.js
rscnt/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsDirectionsRun = (props) => ( <SvgIcon {...props}> <path d="M13.49 5.48c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-3.6 13.9l1-4.4 2.1 2v6h2v-7.5l-2.1-2 .6-3c1.3 1.5 3.3 2.5 5.5 2.5v-2c-1.9 0-3.5-1-4.3-2.4l-1-1.6c-.4-.6-1-1-1.7-1-.3 0-.5.1-.8.1l-5.2 2.2v4.7h2v-3.4l1.8-.7-1.6 8.1-4.9-1-.4 2 7 1.4z"/> </SvgIcon> ); MapsDirectionsRun = pure(MapsDirectionsRun); MapsDirectionsRun.displayName = 'MapsDirectionsRun'; export default MapsDirectionsRun;
webpack/__mocks__/foremanReact/components/common/table.js
jlsherrill/katello
import React from 'react'; export const headerFormat = value => <th>{value}</th>; export const cellFormat = value => <td>{value}</td>; const Table = () => <table />; export default Table;
media/akeeba_strapper/js/akeebajq.js
ForAEdesWeb/AEW2
/*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license | sourceMappingURL=jquery.min.map */ (function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementById(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call("\ufeff\u00a0")?function(e){return null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=b(o);var _={};function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;(function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){var r;while((r=b.inArray(t,u,r))>-1)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u||i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,u,l;if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)delete o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf("data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}});function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return b.isFunction(e)?this.each(function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var o,a=0,s=b(this),u=t,l=e.match(w)||[];while(o=l[a++])u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o)}else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)}}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;for(;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inArray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)while(n=o[i++])r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected||(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(w)||[""],l=n.length;while(l--)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){t=(t||"").match(w)||[""],l=t.length;while(l--)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((l=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=b.event.handlers.call(this,e,l),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;while(t--)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.scrollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}}),b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){var t,n=[];while(t=this[e++])n.push(t);return n}}function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;while(u--)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="<a name='"+x+"'></a><div name='"+x+"'></div>",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e};function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[x]||(p[x]={}))[e]=[N,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=i.preFilter;while(s){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){while(t=t[i])if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){while(t=t[i])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[i])if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){var o,a=[],s=0,u=e.length,l=null!=t;for(;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r){l=mt(y,d),r(l,[],s,u),c=l.length;while(c--)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){l=[],c=y.length;while(c--)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}c=y.length;while(c--)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r;r++)if(i.relative[e[r].type])break;return yt(u>1&&gt(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){g=0;while(m=t[g++])m(x,y,u,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=ft(e)),n=t.length;while(n--)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o};function xt(e,t,n){var r=0,i=t.length;for(;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}o=U.needsContext.test(e)?0:a.length;while(o--){if(u=a[o],i.relative[l=u.type])break;if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}}return s(e,p)(r,t,d,n,V.test(e)),n}i.pseudos.nth=i.pseudos.eq;function Tt(){}i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,this[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;for(;i>r;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&11!==n.nodeType){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack;function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0===n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Nt=/^(?:checkbox|radio)$/i,Ct=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return b.isFunction(e)?this.each(function(t){b(this).wrapInner(e.call(this,t))}):this.each(function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=0;for(;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&b.cleanData(Ot(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"globalEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}});function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){var n,r=0;for(;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){var n,r=0,i=[],o=b(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}});function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody){o="table"!==u||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l)}b.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),"script"),a&&Mt(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;for(;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=ln(e,t),Pt.detach()),Gt[e]=n),n}function ln(e,t){var n=b(t.createElement(e)).appendTo(t.body),r=b.css(n[0],"display");return n.remove(),r}b.each(["height","width"],function(e,n){b.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(b.css(e,"display"))?b.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,i),i):0)}}}),b.support.opacity||(b.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=b.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===b.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),b(function(){b.support.reliableMarginRight||(b.cssHooks.marginRight={get:function(e,n){return n?b.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!b.support.pixelPosition&&b.fn.position&&b.each(["top","left"],function(e,n){b.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?b(e).position()[n]+"px":r):t}}})}),b.expr&&b.expr.filters&&(b.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!b.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||b.css(e,"display"))},b.expr.filters.visible=function(e){return!b.expr.filters.hidden(e)}),b.each({margin:"",padding:"",border:"Width"},function(e,t){b.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(b.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Nt.test(e))}).map(function(e,t){var n=b(this).val();return null==n?null:b.isArray(n)?b.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),b.param=function(e,n){var r,i=[],o=function(e,t){t=b.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=b.ajaxSettings&&b.ajaxSettings.traditional),b.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(b.isArray(t))b.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==b.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}b.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){b.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),b.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var mn,yn,vn=b.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Nn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Cn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=b.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=a.href}catch(Ln){yn=o.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[];if(b.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(u){var l;return o[u]=!0,b.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||a||o[c]?a?!(l=c):t:(n.dataTypes.unshift(c),s(c),!1)}),l}return s(n.dataTypes[0])||!o["*"]&&s("*")}function Mn(e,n){var r,i,o=b.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&b.extend(!0,e,r),e}b.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),b.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&b.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?b("<div>").append(b.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){b.fn[t]=function(e){return this.on(t,e)}}),b.each(["get","post"],function(e,n){b[n]=function(e,r,i,o){return b.isFunction(r)&&(o=o||i,i=r,r=t),b.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Nn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Mn(Mn(e,b.ajaxSettings),t):Mn(b.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,u,l,c,p=b.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?b(f):b.event,h=b.Deferred(),g=b.Callbacks("once memory"),m=p.statusCode||{},y={},v={},x=0,T="canceled",N={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else N.always(e[N.status]);return this},abort:function(e){var t=e||T;return l&&l.abort(t),k(0,t),this}};if(h.promise(N).complete=g.add,N.success=N.done,N.error=N.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=b.trim(p.dataType||"*").toLowerCase().match(w)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?80:443))==(mn[3]||("http:"===mn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=b.param(p.data,p.traditional)),qn(An,p,n,N),2===x)return N;u=p.global,u&&0===b.active++&&b.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Cn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(b.lastModified[o]&&N.setRequestHeader("If-Modified-Since",b.lastModified[o]),b.etag[o]&&N.setRequestHeader("If-None-Match",b.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&N.setRequestHeader("Content-Type",p.contentType),N.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)N.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,N,p)===!1||2===x))return N.abort();T="abort";for(i in{success:1,error:1,complete:1})N[i](p[i]);if(l=qn(jn,p,n,N)){N.readyState=1,u&&d.trigger("ajaxSend",[N,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){N.abort("timeout")},p.timeout));try{x=1,l.send(y,k)}catch(C){if(!(2>x))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,C=n;2!==x&&(x=2,s&&clearTimeout(s),l=t,a=i||"",N.readyState=e>0?4:0,r&&(w=_n(p,N,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=N.getResponseHeader("Last-Modified"),T&&(b.lastModified[o]=T),T=N.getResponseHeader("etag"),T&&(b.etag[o]=T)),204===e?(c=!0,C="nocontent"):304===e?(c=!0,C="notmodified"):(c=Fn(p,w),C=c.state,y=c.data,v=c.error,c=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),N.status=e,N.statusText=(n||C)+"",c?h.resolveWith(f,[y,C,N]):h.rejectWith(f,[N,C,v]),N.statusCode(m),m=t,u&&d.trigger(c?"ajaxSuccess":"ajaxError",[N,p,c?y:v]),g.fireWith(f,[N,C]),u&&(d.trigger("ajaxComplete",[N,p]),--b.active||b.event.trigger("ajaxStop")))}return N},getScript:function(e,n){return b.get(e,t,n,"script")},getJSON:function(e,t,n){return b.get(e,t,n,"json")}});function _n(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(s in c)s in r&&(n[c[s]]=r[s]);while("*"===l[0])l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in u)if(u[s]&&u[s].test(o)){l.unshift(s);break}if(l[0]in r)a=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function Fn(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(i in e.converters)a[i.toLowerCase()]=e.converters[i];for(;r=u[++s];)if("*"!==r){if("*"!==l&&l!==r){if(i=a[l+" "+r]||a["* "+r],!i)for(n in a)if(o=n.split(" "),o[1]===r&&(i=a[l+" "+o[0]]||a["* "+o[0]])){i===!0?i=a[n]:a[n]!==!0&&(r=o[0],u.splice(s--,0,r));break}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+l+" to "+r}}}l=r}return{state:"success",data:t}}b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),b.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||b("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var On=[],Bn=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=On.pop()||b.expando+"_"+vn++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=b.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||b.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,On.push(o)),s&&b.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}b.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=b.ajaxSettings.xhr(),b.support.cors=!!Rn&&"withCredentials"in Rn,Rn=b.support.ajax=!!Rn,Rn&&b.ajaxTransport(function(n){if(!n.crossDomain||b.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=b.noop,$n&&delete Pn[a]),i)4!==u.readyState&&u.abort();else{p={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(p.text=u.responseText);try{c=u.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,l)},n.async?4===u.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},b(e).unload($n)),Pn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+x+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=Yn.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(b.cssNumber[e]?"":"px"),"px"!==r&&s){s=b.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,b.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){var r=(Qn[t]||[]).concat(Qn["*"]),i=0,o=r.length;for(;o>i;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,o=0,a=Gn.length,s=b.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;for(;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(tr(c,l.opts.specialEasing);a>o;o++)if(r=Gn[o].call(l,e,c,l.opts))return r;return Zn(l,c),b.isFunction(l.opts.start)&&l.opts.start.call(e,l),b.fx.timer(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function tr(e,t){var n,r,i,o,a;for(i in e)if(r=b.camelCase(i),o=t[r],n=e[i],b.isArray(n)&&(o=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),a=b.cssHooks[r],a&&"expand"in a){n=a.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=o)}else t[r]=o}b.Animation=b.extend(er,{tweener:function(e,t){b.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,u,l,c,p,f=this,d=e.style,h={},g=[],m=e.nodeType&&nn(e);n.queue||(c=b._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,p=c.empty.fire,c.empty.fire=function(){c.unqueued||p()}),c.unqueued++,f.always(function(){f.always(function(){c.unqueued--,b.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===b.css(e,"display")&&"none"===b.css(e,"float")&&(b.support.inlineBlockNeedsLayout&&"inline"!==un(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",b.support.shrinkWrapBlocks||f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(i in t)if(a=t[i],Vn.exec(a)){if(delete t[i],u=u||"toggle"===a,a===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){s=b._data(e,"fxshow")||b._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?b(e).show():f.done(function(){b(e).hide()}),f.done(function(){var t;b._removeData(e,"fxshow");for(t in h)b.style(e,t,h[t])});for(i=0;o>i;i++)r=g[i],l=f.createTween(r,m?s[r]:0),h[r]=s[r]||b.style(e,r),r in s||(s[r]=l.start,m&&(l.end=l.start,l.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}b.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=b.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[b.cssProps[e.prop]]||b.cssHooks[e.prop])?b.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.each(["toggle","show","hide"],function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),o=b.speed(t,n,r),a=function(){var t=er(this,b.extend({},e),o);a.finish=function(){t.stop(!0)},(i||b._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=b.timers,a=b._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&b.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=b._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=b.timers,a=r?r.length:0;for(n.finish=!0,b.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}b.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),b.speed=function(e,t,n){var r=e&&"object"==typeof e?b.extend({},e):{complete:n||!n&&t||b.isFunction(e)&&e,duration:e,easing:n&&t||t&&!b.isFunction(t)&&t};return r.duration=b.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in b.fx.speeds?b.fx.speeds[r.duration]:b.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){b.isFunction(r.old)&&r.old.call(this),r.queue&&b.dequeue(this,r.queue)},r},b.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},b.timers=[],b.fx=rr.prototype.init,b.fx.tick=function(){var e,n=b.timers,r=0;for(Xn=b.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||b.fx.stop(),Xn=t},b.fx.timer=function(e){e()&&b.timers.push(e)&&b.fx.start()},b.fx.interval=13,b.fx.start=function(){Un||(Un=setInterval(b.fx.tick,b.fx.interval))},b.fx.stop=function(){clearInterval(Un),Un=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fx.step={},b.expr&&b.expr.filters&&(b.expr.filters.animated=function(e){return b.grep(b.timers,function(t){return e===t.elem}).length}),b.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){b.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,b.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},b.offset={setOffset:function(e,t,n){var r=b.css(e,"position");"static"===r&&(e.style.position="relative");var i=b(e),o=i.offset(),a=b.css(e,"top"),s=b.css(e,"left"),u=("absolute"===r||"fixed"===r)&&b.inArray("auto",[a,s])>-1,l={},c={},p,f;u?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),b.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(l.top=t.top-o.top+p),null!=t.left&&(l.left=t.left-o.left+f),"using"in t?t.using.call(e,l):i.css(l)}},b.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===b.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),b.nodeName(e[0],"html")||(n=e.offset()),n.top+=b.css(e[0],"borderTopWidth",!0),n.left+=b.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-b.css(r,"marginTop",!0),left:t.left-n.left-b.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||o.documentElement;while(e&&!b.nodeName(e,"html")&&"static"===b.css(e,"position"))e=e.offsetParent;return e||o.documentElement})}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);b.fn[e]=function(i){return b.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?b(a).scrollLeft():o,r?o:b(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return b.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}b.each({Height:"height",Width:"width"},function(e,n){b.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){b.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return b.access(this,function(n,r,i){var o;return b.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?b.css(n,r,s):b.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=b,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return b})})(window); var akeeba = {}; akeeba.jQuery = jQuery.noConflict();
ajax/libs/material-ui/5.0.0-alpha.31/Drawer/Drawer.js
cdnjs/cdnjs
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import _extends from "@babel/runtime/helpers/esm/extends"; import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import { deepmerge, integerPropType } from '@material-ui/utils'; import { unstable_composeClasses as composeClasses } from '@material-ui/unstyled'; import Modal from '../Modal'; import Slide from '../Slide'; import Paper from '../Paper'; import capitalize from '../utils/capitalize'; import { duration } from '../styles/transitions'; import useTheme from '../styles/useTheme'; import useThemeProps from '../styles/useThemeProps'; import experimentalStyled from '../styles/experimentalStyled'; import drawerClasses, { getDrawerUtilityClass } from './drawerClasses'; import { jsx as _jsx } from "react/jsx-runtime"; const overridesResolver = (props, styles) => { const { styleProps } = props; return deepmerge(_extends({}, (styleProps.variant === 'permanent' || styleProps.variant === 'persistent') && styles.docked, styles.modal, { [`& .${drawerClasses.paper}`]: _extends({}, styles.paper, styles[`paperAnchor${capitalize(styleProps.anchor)}`], styleProps.variant !== 'temporary' && styles[`paperAnchorDocked${capitalize(styleProps.anchor)}`]) }), styles.root || {}); }; const useUtilityClasses = styleProps => { const { classes, anchor, variant } = styleProps; const slots = { root: ['root'], docked: [(variant === 'permanent' || variant === 'persistent') && 'docked'], modal: ['modal'], paper: ['paper', `paperAnchor${capitalize(anchor)}`, variant !== 'temporary' && `paperAnchorDocked${capitalize(anchor)}`] }; return composeClasses(slots, getDrawerUtilityClass, classes); }; const DrawerRoot = experimentalStyled(Modal, {}, { name: 'MuiDrawer', slot: 'Root', overridesResolver })({}); const DrawerDockedRoot = experimentalStyled('div', {}, { name: 'MuiDrawer', slot: 'Docked', overridesResolver })({ /* Styles applied to the root element if `variant="permanent or persistent"`. */ flex: '0 0 auto' }); const DrawerPaper = experimentalStyled(Paper, {}, { name: 'MuiDrawer', slot: 'Paper' })(({ theme, styleProps }) => _extends({ /* Styles applied to the Paper component. */ overflowY: 'auto', display: 'flex', flexDirection: 'column', height: '100%', flex: '1 0 auto', zIndex: theme.zIndex.drawer, WebkitOverflowScrolling: 'touch', // Add iOS momentum scrolling. // temporary style position: 'fixed', top: 0, // We disable the focus ring for mouse, touch and keyboard users. // At some point, it would be better to keep it for keyboard users. // :focus-ring CSS pseudo-class will help. outline: 0 }, styleProps.anchor === 'left' && { /* Styles applied to the Paper component if `anchor="left"`. */ left: 0 }, styleProps.anchor === 'top' && { /* Styles applied to the Paper component if `anchor="top"`. */ top: 0, left: 0, right: 0, height: 'auto', maxHeight: '100%' }, styleProps.anchor === 'right' && { /* Styles applied to the Paper component if `anchor="right"`. */ right: 0 }, styleProps.anchor === 'bottom' && { /* Styles applied to the Paper component if `anchor="bottom"`. */ top: 'auto', left: 0, bottom: 0, right: 0, height: 'auto', maxHeight: '100%' }, styleProps.anchor === 'left' && styleProps.variant !== 'temporary' && { /* Styles applied to the Paper component if `anchor="left"` and `variant` is not "temporary". */ borderRight: `1px solid ${theme.palette.divider}` }, styleProps.anchor === 'top' && styleProps.variant !== 'temporary' && { /* Styles applied to the Paper component if `anchor="top"` and `variant` is not "temporary". */ borderBottom: `1px solid ${theme.palette.divider}` }, styleProps.anchor === 'right' && styleProps.variant !== 'temporary' && { /* Styles applied to the Paper component if `anchor="right"` and `variant` is not "temporary". */ borderLeft: `1px solid ${theme.palette.divider}` }, styleProps.anchor === 'bottom' && styleProps.variant !== 'temporary' && { /* Styles applied to the Paper component if `anchor="bottom"` and `variant` is not "temporary". */ borderTop: `1px solid ${theme.palette.divider}` })); const oppositeDirection = { left: 'right', right: 'left', top: 'down', bottom: 'up' }; export function isHorizontal(anchor) { return ['left', 'right'].indexOf(anchor) !== -1; } export function getAnchor(theme, anchor) { return theme.direction === 'rtl' && isHorizontal(anchor) ? oppositeDirection[anchor] : anchor; } const defaultTransitionDuration = { enter: duration.enteringScreen, exit: duration.leavingScreen }; /** * The props of the [Modal](/api/modal/) component are available * when `variant="temporary"` is set. */ const Drawer = /*#__PURE__*/React.forwardRef(function Drawer(inProps, ref) { const props = useThemeProps({ props: inProps, name: 'MuiDrawer' }); const { anchor: anchorProp = 'left', BackdropProps, children, className, elevation = 16, hideBackdrop = false, ModalProps: { BackdropProps: BackdropPropsProp } = {}, onClose, open = false, PaperProps = {}, SlideProps, // eslint-disable-next-line react/prop-types TransitionComponent = Slide, transitionDuration = defaultTransitionDuration, variant = 'temporary' } = props, ModalProps = _objectWithoutPropertiesLoose(props.ModalProps, ["BackdropProps"]), other = _objectWithoutPropertiesLoose(props, ["anchor", "BackdropProps", "children", "className", "elevation", "hideBackdrop", "ModalProps", "onClose", "open", "PaperProps", "SlideProps", "TransitionComponent", "transitionDuration", "variant"]); const theme = useTheme(); // Let's assume that the Drawer will always be rendered on user space. // We use this state is order to skip the appear transition during the // initial mount of the component. const mounted = React.useRef(false); React.useEffect(() => { mounted.current = true; }, []); const anchorInvariant = getAnchor(theme, anchorProp); const anchor = anchorProp; const styleProps = _extends({}, props, { anchor, elevation, open, variant }, other); const classes = useUtilityClasses(styleProps); const drawer = /*#__PURE__*/_jsx(DrawerPaper, _extends({ elevation: variant === 'temporary' ? elevation : 0, square: true }, PaperProps, { className: clsx(classes.paper, PaperProps.className), styleProps: styleProps, children: children })); if (variant === 'permanent') { return /*#__PURE__*/_jsx(DrawerDockedRoot, _extends({ className: clsx(classes.root, classes.docked, className), styleProps: styleProps, ref: ref }, other, { children: drawer })); } const slidingDrawer = /*#__PURE__*/_jsx(TransitionComponent, _extends({ in: open, direction: oppositeDirection[anchorInvariant], timeout: transitionDuration, appear: mounted.current }, SlideProps, { children: drawer })); if (variant === 'persistent') { return /*#__PURE__*/_jsx(DrawerDockedRoot, _extends({ className: clsx(classes.root, classes.docked, className), styleProps: styleProps, ref: ref }, other, { children: slidingDrawer })); } // variant === temporary return /*#__PURE__*/_jsx(DrawerRoot, _extends({ BackdropProps: _extends({}, BackdropProps, BackdropPropsProp, { transitionDuration }), className: clsx(classes.root, classes.modal, className), open: open, styleProps: styleProps, onClose: onClose, hideBackdrop: hideBackdrop, ref: ref }, other, ModalProps, { children: slidingDrawer })); }); process.env.NODE_ENV !== "production" ? Drawer.propTypes /* remove-proptypes */ = { // ----------------------------- Warning -------------------------------- // | These PropTypes are generated from the TypeScript type definitions | // | To update them edit the d.ts file and run "yarn proptypes" | // ---------------------------------------------------------------------- /** * Side from which the drawer will appear. * @default 'left' */ anchor: PropTypes.oneOf(['bottom', 'left', 'right', 'top']), /** * @ignore */ BackdropProps: PropTypes.object, /** * The content of the component. */ children: PropTypes.node, /** * Override or extend the styles applied to the component. */ classes: PropTypes.object, /** * @ignore */ className: PropTypes.string, /** * The elevation of the drawer. * @default 16 */ elevation: integerPropType, /** * If `true`, the backdrop is not rendered. * @default false */ hideBackdrop: PropTypes.bool, /** * Props applied to the [`Modal`](/api/modal/) element. * @default {} */ ModalProps: PropTypes.object, /** * Callback fired when the component requests to be closed. * * @param {object} event The event source of the callback. */ onClose: PropTypes.func, /** * If `true`, the component is shown. * @default false */ open: PropTypes.bool, /** * Props applied to the [`Paper`](/api/paper/) element. * @default {} */ PaperProps: PropTypes.object, /** * Props applied to the [`Slide`](/api/slide/) element. */ SlideProps: PropTypes.object, /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx: PropTypes.object, /** * The duration for the transition, in milliseconds. * You may specify a single timeout for all transitions, or individually with an object. * @default { enter: duration.enteringScreen, exit: duration.leavingScreen } */ transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({ appear: PropTypes.number, enter: PropTypes.number, exit: PropTypes.number })]), /** * The variant to use. * @default 'temporary' */ variant: PropTypes.oneOf(['permanent', 'persistent', 'temporary']) } : void 0; export default Drawer;
node_modules/bs-recipes/recipes/webpack.react-hot-loader/app/js/main.js
ExcelsiorCore/TheSocialNetwork
import React from 'react'; // It's important to not define HelloWorld component right in this file // because in that case it will do full page reload on change import HelloWorld from './HelloWorld.jsx'; React.render(<HelloWorld />, document.getElementById('react-root'));
admin/client/Signin/index.js
snowkeeper/keystone
/** * The signin page, it renders a page with a username and password input form. * * This is decoupled from the main app (in the "App/" folder) because we inject * lots of data into the other screens (like the lists that exist) that we don't * want to have injected here, so this is a completely separate route and template. */ import React from 'react'; import ReactDOM from 'react-dom'; import Signin from './Signin'; ReactDOM.render( <Signin brand={Keystone.brand} from={Keystone.from} logo={Keystone.logo} user={Keystone.user} userCanAccessKeystone={Keystone.userCanAccessKeystone} />, document.getElementById('signin-view') );
src/layout.js
avalla/webpack-react-kit
import React from 'react' import { render } from 'react-dom' import Menu from './components/_shared/menu.js' import Footer from './components/_shared/footer.js' export default class App extends React.Component { static defaultProps = { title: "webpack-react-kit", } static propTypes = { title: React.PropTypes.string.isRequired, } render = () => <div> <Menu title={this.props.title} /> {this.props.children} <Footer /> </div> }
app/routes.js
lumibloc/tabloc
/* eslint flowtype-errors/show-errors: 0 */ import React from 'react'; import { Switch, Route } from 'react-router'; import App from './containers/App'; import HomePage from './containers/HomePage'; import CounterPage from './containers/CounterPage'; export default () => ( <App> <Switch> <Route path="/counter" component={CounterPage} /> <Route path="/" component={HomePage} /> </Switch> </App> );
src/example/app/pages/Settings.js
lighter-cd/ezui_react_one
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import {Link} from 'react-router-dom'; import {AppBar} from '../../../lib/components/appBar'; import {Container,FixedBox,EnlargeBox} from '../../../lib/flexBoxLayout'; import {Row,Col} from '../../../lib/flexBoxGrid'; import {Button,Switch, Radio} from '../../../lib/components/form'; import routerContextTypes from '../../../lib/utils/routerContextType'; import back from '../../assets/icons/back.png'; import MemberData from './MemberData'; const styles = { content : { background: '#281110', color: '#c7c7c7', }, title : { background: '#3b1410', color: '#ebebeb', height: '.60rem', lineHeight: '.6rem', padding: '0 .56rem', fontSize: '.32rem', fontWeight: 400, textAlign: 'center', }, row : { borderBottom: '.02rem solid #4b1b1a', height: '.62rem', lineHeight: '.6rem', padding: '0 .56rem', fontSize: '.32rem', }, field: { textAlign: 'left', }, value : { textAlign: 'right', }, buttonArea : { padding: '1rem .8rem', }, radioLabel : { color: '#8d8d8d', }, }; class Settings extends Component { static contextTypes = routerContextTypes; state = { vibration: false, sound: false, sound_choice: 0, tip_once: false, tip_lock_screen: false, system_calendar: false } render() { return ( <Container screen direction="v"> <FixedBox> <AppBar title="系统偏好设置" height='.90rem' background="#e1cca5" fontSize='.36rem' leftImage={<img src={back} alt="" style={{width:'auto',height:'.31rem'}}/>} onClickLeft = {this.onLeftClick.bind(this)}/> </FixedBox> <EnlargeBox style={styles.content}> <div style={styles.title}>安全提醒设置</div> <label> <Row style={styles.row}> <Col xs={6} style={styles.field}> 允许震动提示 </Col> <Col xs={6} style={styles.value}> <Switch style={{verticalAlign: 'middle'}} name="vibration"/> </Col> </Row> </label> <label> <Row style={styles.row}> <Col xs={6} style={styles.field}> 允许声音提示 </Col> <Col xs={6} style={styles.value}> <Switch style={{verticalAlign: 'middle'}} name="sound"/> </Col> </Row> </label> <label> <Row style={styles.row}> <Col xs={1}> <Radio name='sound_choice' value='0' defaultChecked style={{verticalAlign: 'middle'}}/> </Col> <Col xs={11}> <span style={styles.radioLabel}>默认女声提示</span> </Col> </Row> </label> <label> <Row style={styles.row}> <Col xs={1}> <Radio name='sound_choice' value='1' style={{verticalAlign: 'middle'}}/> </Col> <Col xs={11}> <span style={styles.radioLabel}>默认男声提示</span> </Col> </Row> </label> <label> <Row style={styles.row}> <Col xs={1}> <Radio name='sound_choice' value='2' style={{verticalAlign: 'middle'}}/> </Col> <Col xs={11}> <span style={styles.radioLabel}>自定义声音文件</span> </Col> </Row> </label> <label> <Row style={styles.row}> <Col xs={6} style={styles.field}> 只提示一次 </Col> <Col xs={6} style={styles.value}> <Switch style={{verticalAlign: 'middle'}} name="tip_once"/> </Col> </Row> </label> <label> <Row style={styles.row}> <Col xs={6} style={styles.field}> 锁屏界面提示 </Col> <Col xs={6} style={styles.value}> <Switch style={{verticalAlign: 'middle'}} name="tip_lock_screen"/> </Col> </Row> </label> <label> <Row style={styles.row}> <Col xs={6} style={styles.field}> 整合到系统日历 </Col> <Col xs={6} style={styles.value}> <Switch style={{verticalAlign: 'middle'}} name="system_calendar"/> </Col> </Row> </label> <div style={styles.title}>界面风格设置</div> <label> <Row style={styles.row}> <Col xs={1}> <Radio name='ui_theme' value='0' defaultChecked style={{verticalAlign: 'middle'}}/> </Col> <Col xs={11}> <span>界面风格一</span> </Col> </Row> </label> <label> <Row style={styles.row}> <Col xs={1}> <Radio name='ui_theme' value='1' style={{verticalAlign: 'middle'}}/> </Col> <Col xs={11}> <span>界面风格二</span> </Col> </Row> </label> <label> <Row style={styles.row}> <Col xs={1}> <Radio name='ui_theme' value='2' style={{verticalAlign: 'middle'}}/> </Col> <Col xs={11}> <span>界面风格三</span> </Col> </Row> </label> <div style={styles.buttonArea}> <Button>保存偏好设置</Button> </div> </EnlargeBox> </Container> ) }; onClick(){ } onLeftClick(){ const { history } = this.context.router; history.goBack(); } } export default Settings;
src/routes/contact/index.js
peeyush1234/react-nodejs-skeleton
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import Layout from '../../components/Layout'; import Contact from './Contact'; const title = 'Contact Us'; export default { path: '/contact', action() { return { title, component: <Layout><Contact title={title} /></Layout>, }; }, };
views/src/components/CustomerSelect.js
apruve/apruve-ruby-demo
import React from 'react' import Select from "react-dropdown-select"; class CustomerSelect extends React.Component { constructor(props) { super(props); this.select_customer = this.select_customer.bind(this) } select_customer(index) { this.props.select_customer(index); } render() { const custOptionsReactSelectDropdown = this.props.customers.map((customer, index) => ({ label: `${customer.name} (${customer.email})`, value: index, index, search: customer.email })); return <Select options={custOptionsReactSelectDropdown} labelField="label" searchBy="search" onChange={(value) => this.select_customer(value[0].index)}/> } } export default CustomerSelect
src/components/exampleComponent.js
mazairaj/thejulianmaz
import React from 'react'; import Interactive from 'react-interactive'; import { Switch, Route, Link } from 'react-router-dom'; import ExampleTwoDeepComponent from './exampletwodeepcomponent'; import PageNotFound from './pagenotfound'; import s from '../styles/exampleComponent.style'; const ExamplePageText = () => ( <p style={s.p}> This is an example page. Refresh the page or copy/paste the url to test out the redirect functionality (this same page should load after the redirect). </p> ); export default function ExampleComponent() { return ( <Switch> <Route exact path="/example/two-deep" render={({ location }) => ( <div> <ExamplePageText /> <ExampleTwoDeepComponent location={location} /> </div> )} /> <Route exact path="/example" render={() => ( <div> <ExamplePageText /> <div style={s.pageLinkContainer}> <Interactive as={Link} {...s.link} to="/example/two-deep?field1=foo&field2=bar#boom!" >Example two deep with query and hash</Interactive> </div> </div> )} /> <Route component={PageNotFound} /> </Switch> ); }
examples/shopping-cart/test/components/ProductsList.spec.js
tatsuhino/reactPractice
import expect from 'expect' import React from 'react' import { shallow } from 'enzyme' import ProductsList from '../../components/ProductsList' function setup(props) { const component = shallow( <ProductsList title={props.title}>{props.children}</ProductsList> ) return { component: component, children: component.children().at(1), h3: component.find('h3') } } describe('ProductsList component', () => { it('should render title', () => { const { h3 } = setup({ title: 'Test Products' }) expect(h3.text()).toMatch(/^Test Products$/) }) it('should render children', () => { const { children } = setup({ title: 'Test Products', children: 'Test Children' }) expect(children.text()).toMatch(/^Test Children$/) }) })
src/browser/auth/LoginError.react.js
vacuumlabs/este
import Component from 'react-pure-render/component'; import React, { PropTypes } from 'react'; import { FormattedMessage, defineMessages } from 'react-intl'; const messages = defineMessages({ required: { defaultMessage: `Please fill out {prop, select, email {email} password {password} }.`, id: 'auth.login.error.required' }, email: { defaultMessage: 'Email address is not valid.', id: 'auth.login.error.email' }, simplePassword: { defaultMessage: 'Password must contain at least {minLength} characters.', id: 'auth.login.error.simplePassword' }, wrongPassword: { defaultMessage: 'Wrong password.', id: 'auth.login.error.wrongPassword' } }); export default class LoginError extends Component { static propTypes = { error: PropTypes.object }; render() { const { error } = this.props; if (!error) return null; const message = messages[error.name]; return ( <p className="error-message"> {message ? <FormattedMessage {...message} values={error.params} /> : error.toString() } </p> ); } }
docs/src/examples/elements/Segment/Types/index.js
Semantic-Org/Semantic-UI-React
import React from 'react' import { Message } from 'semantic-ui-react' import ComponentExample from 'docs/src/components/ComponentDoc/ComponentExample' import ExampleSection from 'docs/src/components/ComponentDoc/ExampleSection' const SegmentTypesExamples = () => ( <ExampleSection title='Types'> <ComponentExample title='Segment' description='A segment of content.' examplePath='elements/Segment/Types/SegmentExampleSegment' /> <ComponentExample title='Placeholder Segment' description='A segment can be used to reserve space for conditionally displayed content.' examplePath='elements/Segment/Types/SegmentExamplePlaceholder' suiVersion='2.4.0' /> <ComponentExample examplePath='elements/Segment/Types/SegmentExamplePlaceholderInline'> <Message info> To use inline-block content inside a placeholder, wrap the content in{' '} <code>inline</code>. </Message> </ComponentExample> <ComponentExample examplePath='elements/Segment/Types/SegmentExamplePlaceholderGrid' /> <ComponentExample title='Raised' description='A segment may be formatted to raise above the page.' examplePath='elements/Segment/Types/SegmentExampleRaised' /> <ComponentExample title='Stacked' description='A segment can be formatted to show it contains multiple pages.' examplePath='elements/Segment/Types/SegmentExampleStacked' /> <ComponentExample title='Piled' description='A segment can be formatted to look like a pile of pages.' examplePath='elements/Segment/Types/SegmentExamplePiled' /> <ComponentExample title='Vertical Segment' description='A vertical segment formats content to be aligned as part of a vertical group.' examplePath='elements/Segment/Types/SegmentExampleVerticalSegment' /> </ExampleSection> ) export default SegmentTypesExamples
ajax/libs/6to5/3.3.10/browser.js
victorjonsson/cdnjs
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.to5=e()}}(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){(function(global){"use strict";var transform=module.exports=require("./transformation");transform.version=require("../../package").version;transform.transform=transform;transform.run=function(code,opts){opts=opts||{};opts.sourceMap="inline";return new Function(transform(code,opts).code)()};transform.load=function(url,callback,opts,hold){opts=opts||{};opts.filename=opts.filename||url;var xhr=global.ActiveXObject?new global.ActiveXObject("Microsoft.XMLHTTP"):new global.XMLHttpRequest;xhr.open("GET",url,true);if("overrideMimeType"in xhr)xhr.overrideMimeType("text/plain");xhr.onreadystatechange=function(){if(xhr.readyState!==4)return;var status=xhr.status;if(status===0||status===200){var param=[xhr.responseText,opts];if(!hold)transform.run.apply(transform,param);if(callback)callback(param)}else{throw new Error("Could not load "+url)}};xhr.send(null)};var runScripts=function(){var scripts=[];var types=["text/ecmascript-6","text/6to5","module"];var index=0;var exec=function(){var param=scripts[index];if(param instanceof Array){transform.run.apply(transform,param);index++;exec()}};var run=function(script,i){var opts={};if(script.src){transform.load(script.src,function(param){scripts[i]=param;exec()},opts,true)}else{opts.filename="embedded";scripts[i]=[script.innerHTML,opts]}};var _scripts=global.document.getElementsByTagName("script");for(var i=0;i<_scripts.length;++i){var _script=_scripts[i];if(types.indexOf(_script.type)>=0)scripts.push(_script)}for(i in scripts){run(scripts[i],i)}exec()};if(global.addEventListener){global.addEventListener("DOMContentLoaded",runScripts,false)}else if(global.attachEvent){global.attachEvent("onload",runScripts)}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../../package":301,"./transformation":39}],2:[function(require,module,exports){"use strict";module.exports=File;var SHEBANG_REGEX=/^\#\!.*/;var isFunction=require("lodash/lang/isFunction");var transform=require("./transformation");var generate=require("./generation");var defaults=require("lodash/object/defaults");var contains=require("lodash/collection/contains");var clone=require("./helpers/clone");var Scope=require("./traverse/scope");var util=require("./util");var path=require("path");var each=require("lodash/collection/each");var t=require("./types");function File(opts){this.dynamicImportIds={};this.dynamicImported=[];this.dynamicImports=[];this.dynamicData={};this.data={};this.lastStatements=[];this.opts=this.normalizeOptions(opts);this.ast={};this.buildTransformers()}File.helpers=["inherits","defaults","prototype-properties","apply-constructor","tagged-template-literal","tagged-template-literal-loose","interop-require","to-array","sliced-to-array","object-without-properties","has-own","slice","bind","define-property","async-to-generator","interop-require-wildcard","typeof","extends","get","set","class-call-check","object-destructuring-empty"];File.validOptions=["filename","filenameRelative","blacklist","whitelist","loose","optional","modules","sourceMap","sourceMapName","sourceFileName","sourceRoot","moduleRoot","moduleIds","comments","reactCompat","keepModuleIdExtensions","code","ast","format","playground","experimental","resolveModuleSource","runtime","ignore","only","extensions","accept"];File.prototype.normalizeOptions=function(opts){opts=clone(opts);for(var key in opts){if(key[0]!=="_"&&File.validOptions.indexOf(key)<0){throw new ReferenceError("Unknown option: "+key)}}defaults(opts,{keepModuleIdExtensions:false,resolveModuleSource:null,experimental:false,reactCompat:false,playground:false,whitespace:true,moduleIds:false,blacklist:[],whitelist:[],sourceMap:false,optional:[],comments:true,filename:"unknown",modules:"common",runtime:false,loose:[],code:true,ast:true});opts.filename=opts.filename.replace(/\\/g,"/");opts.basename=path.basename(opts.filename,path.extname(opts.filename));opts.blacklist=util.arrayify(opts.blacklist);opts.whitelist=util.arrayify(opts.whitelist);opts.optional=util.arrayify(opts.optional);opts.loose=util.arrayify(opts.loose);if(contains(opts.loose,"all")){opts.loose=Object.keys(transform.transformers)}defaults(opts,{moduleRoot:opts.sourceRoot});defaults(opts,{sourceRoot:opts.moduleRoot});defaults(opts,{filenameRelative:opts.filename});defaults(opts,{sourceFileName:opts.filenameRelative,sourceMapName:opts.filenameRelative});if(opts.playground){opts.experimental=true}if(opts.runtime){this.set("runtimeIdentifier",t.identifier("to5Runtime"))}opts.blacklist=transform._ensureTransformerNames("blacklist",opts.blacklist);opts.whitelist=transform._ensureTransformerNames("whitelist",opts.whitelist);opts.optional=transform._ensureTransformerNames("optional",opts.optional);opts.loose=transform._ensureTransformerNames("loose",opts.loose);return opts};File.prototype.isLoose=function(key){return contains(this.opts.loose,key)};File.prototype.buildTransformers=function(){var file=this;var transformers={};var secondaryStack=[];var stack=[];each(transform.transformers,function(transformer,key){var pass=transformers[key]=transformer.buildPass(file);if(pass.canRun(file)){stack.push(pass);if(transformer.secondPass){secondaryStack.push(pass)}if(transformer.manipulateOptions){transformer.manipulateOptions(file.opts,file)}}});this.transformerStack=stack.concat(secondaryStack);this.transformers=transformers};File.prototype.toArray=function(node,i){if(t.isArrayExpression(node)){return node}else if(t.isIdentifier(node)&&node.name==="arguments"){return t.callExpression(t.memberExpression(this.addHelper("slice"),t.identifier("call")),[node])}else{var declarationName="to-array";var args=[node];if(i){args.push(t.literal(i));declarationName="sliced-to-array"}return t.callExpression(this.addHelper(declarationName),args)}};File.prototype.getModuleFormatter=function(type){var ModuleFormatter=isFunction(type)?type:transform.moduleFormatters[type];if(!ModuleFormatter){var loc=util.resolve(type);if(loc)ModuleFormatter=require(loc)}if(!ModuleFormatter){throw new ReferenceError("Unknown module formatter type "+JSON.stringify(type))}return new ModuleFormatter(this)};File.prototype.parseShebang=function(code){var shebangMatch=code.match(SHEBANG_REGEX);if(shebangMatch){this.shebang=shebangMatch[0];code=code.replace(SHEBANG_REGEX,"")}return code};File.prototype.set=function(key,val){return this.data[key]=val};File.prototype.setDynamic=function(key,fn){this.dynamicData[key]=fn};File.prototype.get=function(key){var data=this.data[key];if(data){return data}else{var dynamic=this.dynamicData[key];if(dynamic){return this.set(key,dynamic())}}};File.prototype.addImport=function(source,name){name=name||source;var id=this.dynamicImportIds[name];if(!id){id=this.dynamicImportIds[name]=this.generateUidIdentifier(name);var specifiers=[t.importSpecifier(t.identifier("default"),id)];var declar=t.importDeclaration(specifiers,t.literal(source));declar._blockHoist=3;this.dynamicImported.push(declar);this.moduleFormatter.importSpecifier(specifiers[0],declar,this.dynamicImports)}return id};File.prototype.isConsequenceExpressionStatement=function(node){return t.isExpressionStatement(node)&&this.lastStatements.indexOf(node)>=0};File.prototype.addHelper=function(name){if(!contains(File.helpers,name)){throw new ReferenceError("unknown declaration "+name)}var program=this.ast.program;var declar=program._declarations&&program._declarations[name];if(declar)return declar.id;var runtime=this.get("runtimeIdentifier");if(runtime){name=t.identifier(t.toIdentifier(name));return t.memberExpression(runtime,name)}else{var ref=util.template(name);ref._compact=true;var uid=this.generateUidIdentifier(name);this.scope.push({key:name,id:uid,init:ref});return uid}};File.prototype.errorWithNode=function(node,msg,Error){Error=Error||SyntaxError;var loc=node.loc.start;var err=new Error("Line "+loc.line+": "+msg);err.loc=loc;return err};File.prototype.addCode=function(code){code=(code||"")+"";this.code=code;return this.parseShebang(code)};File.prototype.parse=function(code){var self=this;code=this.addCode(code);var opts=this.opts;opts.allowImportExportEverywhere=this.isLoose("es6.modules");return util.parse(opts,code,function(tree){self.transform(tree);return self.generate()})};File.prototype.transform=function(ast){var self=this;util.debug(this.opts.filename);this.ast=ast;this.lastStatements=t.getLastStatements(ast.program);this.scope=new Scope(ast.program,ast,null,this);var modFormatter=this.moduleFormatter=this.getModuleFormatter(this.opts.modules);if(modFormatter.init&&this.transformers["es6.modules"].canRun()){modFormatter.init()}this.checkNode(ast);var astRun=function(key){each(self.transformerStack,function(pass){pass.astRun(key)})};astRun("enter");each(this.transformerStack,function(pass){pass.transform()});astRun("exit")};var checkTransformerVisitor={enter:function(node,parent,scope,context,state){state.check(node,scope)}};File.prototype.checkNode=function(node,scope){var self=this;scope=scope||this.scope;var check=function(node,scope){each(self.transformerStack,function(pass){if(pass.shouldRun)return;pass.checkNode(node,scope)})};check(node,scope);scope.traverse(node,checkTransformerVisitor,{check:check})};File.prototype.generate=function(){var opts=this.opts;var ast=this.ast;var result={code:"",map:null,ast:null};if(opts.ast)result.ast=ast;if(!opts.code)return result;var _result=generate(ast,opts,this.code);result.code=_result.code;result.map=_result.map;if(this.shebang){result.code=this.shebang+"\n"+result.code}if(opts.sourceMap==="inline"){result.code+="\n"+util.sourceMapToComment(result.map)}return result};File.prototype.generateUid=function(name,scope){name=t.toIdentifier(name).replace(/^_+/,"");scope=scope||this.scope;var uid;var i=0;do{uid=this._generateUid(name,i);i++}while(scope.hasReference(uid));return uid};File.prototype.generateUidIdentifier=function(name,scope){scope=scope||this.scope;var id=t.identifier(this.generateUid(name,scope));scope.addDeclarationToFunctionScope("var",id);return id};File.prototype._generateUid=function(name,i){var id=name;if(i>1)id+=i;return"_"+id}},{"./generation":16,"./helpers/clone":23,"./transformation":39,"./traverse/scope":104,"./types":107,"./util":110,"lodash/collection/contains":181,"lodash/collection/each":182,"lodash/lang/isFunction":252,"lodash/object/defaults":262,path:135}],3:[function(require,module,exports){"use strict";module.exports=Buffer;var util=require("../util");var isNumber=require("lodash/lang/isNumber");var isBoolean=require("lodash/lang/isBoolean");var contains=require("lodash/collection/contains");function Buffer(position,format){this.position=position;this._indent=format.indent.base;this.format=format;this.buf=""}Buffer.prototype.get=function(){return util.trimRight(this.buf)};Buffer.prototype.getIndent=function(){if(this.format.compact||this.format.concise){return""}else{return util.repeat(this._indent,this.format.indent.style)}};Buffer.prototype.indentSize=function(){return this.getIndent().length};Buffer.prototype.indent=function(){this._indent++};Buffer.prototype.dedent=function(){this._indent--};Buffer.prototype.semicolon=function(){this.push(";")};Buffer.prototype.ensureSemicolon=function(){if(!this.isLast(";"))this.semicolon()};Buffer.prototype.rightBrace=function(){this.newline(true);this.push("}")};Buffer.prototype.keyword=function(name){this.push(name);this.space()};Buffer.prototype.space=function(){if(this.format.compact)return;if(this.buf&&!this.isLast([" ","\n"])){this.push(" ")}};Buffer.prototype.removeLast=function(cha){if(!this.isLast(cha))return;this.buf=this.buf.substr(0,this.buf.length-1);this.position.unshift(cha)};Buffer.prototype.newline=function(i,removeLast){if(this.format.compact||this.format.concise){this.space();return}removeLast=removeLast||false;if(isNumber(i)){if(this.endsWith("{\n"))i--;if(this.endsWith(util.repeat(i,"\n")))return;while(i--){this._newline(removeLast)}return}if(isBoolean(i)){removeLast=i}this._newline(removeLast)};Buffer.prototype._newline=function(removeLast){if(removeLast&&this.isLast("\n"))this.removeLast("\n");this.removeLast(" ");this._removeSpacesAfterLastNewline();this._push("\n")};Buffer.prototype._removeSpacesAfterLastNewline=function(){var lastNewlineIndex=this.buf.lastIndexOf("\n");if(lastNewlineIndex===-1)return;var index=this.buf.length-1;while(index>lastNewlineIndex){if(this.buf[index]!==" "){break}index--}if(index===lastNewlineIndex){this.buf=this.buf.substring(0,index+1)}};Buffer.prototype.push=function(str,noIndent){if(this._indent&&!noIndent&&str!=="\n"){var indent=this.getIndent();str=str.replace(/\n/g,"\n"+indent);if(this.isLast("\n"))str=indent+str}this._push(str)};Buffer.prototype._push=function(str){this.position.push(str);this.buf+=str};Buffer.prototype.endsWith=function(str){var d=this.buf.length-str.length;return d>=0&&this.buf.lastIndexOf(str)===d};Buffer.prototype.isLast=function(cha,trimRight){var buf=this.buf;if(trimRight)buf=util.trimRight(buf);var last=buf[buf.length-1];if(Array.isArray(cha)){return contains(cha,last)}else{return cha===last}}},{"../util":110,"lodash/collection/contains":181,"lodash/lang/isBoolean":250,"lodash/lang/isNumber":254}],4:[function(require,module,exports){"use strict";exports.File=function(node,print){print(node.program)};exports.Program=function(node,print){print.sequence(node.body)};exports.BlockStatement=function(node,print){if(node.body.length===0){this.push("{}")}else{this.push("{");this.newline();print.sequence(node.body,{indent:true});this.removeLast("\n");this.rightBrace()}}},{}],5:[function(require,module,exports){"use strict";exports.ClassExpression=exports.ClassDeclaration=function(node,print){this.push("class");if(node.id){this.space();print(node.id)}if(node.superClass){this.push(" extends ");print(node.superClass)}this.space();print(node.body)};exports.ClassBody=function(node,print){if(node.body.length===0){this.push("{}")}else{this.push("{");this.newline();this.indent();print.sequence(node.body);this.dedent();this.rightBrace()}};exports.MethodDefinition=function(node,print){if(node.static){this.push("static ")}this._method(node,print)}},{}],6:[function(require,module,exports){"use strict";exports.ComprehensionBlock=function(node,print){this.keyword("for");this.push("(");print(node.left);this.push(" of ");print(node.right);this.push(")")};exports.ComprehensionExpression=function(node,print){this.push(node.generator?"(":"[");print.join(node.blocks,{separator:" "});this.space();if(node.filter){this.keyword("if");this.push("(");print(node.filter);this.push(")");this.space()}print(node.body);this.push(node.generator?")":"]")}},{}],7:[function(require,module,exports){"use strict";var util=require("../../util");var t=require("../../types");var isNumber=require("lodash/lang/isNumber");exports.UnaryExpression=function(node,print){var hasSpace=/[a-z]$/.test(node.operator);var arg=node.argument;if(t.isUpdateExpression(arg)||t.isUnaryExpression(arg)){hasSpace=true}if(t.isUnaryExpression(arg)&&arg.operator==="!"){hasSpace=false}this.push(node.operator);if(hasSpace)this.push(" ");print(node.argument)};exports.UpdateExpression=function(node,print){if(node.prefix){this.push(node.operator);print(node.argument)}else{print(node.argument);this.push(node.operator)}};exports.ConditionalExpression=function(node,print){print(node.test);this.space();this.push("?");this.space();print(node.consequent);this.space();this.push(":");this.space();print(node.alternate)};exports.NewExpression=function(node,print){this.push("new ");print(node.callee);if(node.arguments.length||this.format.parentheses){this.push("(");print.list(node.arguments);this.push(")")}};exports.SequenceExpression=function(node,print){print.list(node.expressions)};exports.ThisExpression=function(){this.push("this")};exports.CallExpression=function(node,print){print(node.callee);this.push("(");var separator=",";if(node._prettyCall){separator+="\n";this.newline();this.indent()}else{separator+=" "}print.list(node.arguments,{separator:separator});if(node._prettyCall){this.newline();this.dedent()}this.push(")")};var buildYieldAwait=function(keyword){return function(node,print){this.push(keyword);if(node.delegate||node.all){this.push("*")}if(node.argument){this.space();print(node.argument)}}};exports.YieldExpression=buildYieldAwait("yield");exports.AwaitExpression=buildYieldAwait("await");exports.EmptyStatement=function(){this.semicolon()};exports.ExpressionStatement=function(node,print){print(node.expression);this.semicolon()};exports.BinaryExpression=exports.LogicalExpression=exports.AssignmentPattern=exports.AssignmentExpression=function(node,print){print(node.left);this.push(" ");this.push(node.operator);this.push(" ");print(node.right)};var SCIENTIFIC_NOTATION=/e/i;exports.MemberExpression=function(node,print){var obj=node.object;print(obj);if(!node.computed&&t.isMemberExpression(node.property)){throw new TypeError("Got a MemberExpression for MemberExpression property")}var computed=node.computed;if(t.isLiteral(node.property)&&isNumber(node.property.value)){computed=true}if(computed){this.push("[");print(node.property);this.push("]")}else{if(t.isLiteral(obj)&&util.isInteger(obj.value)&&!SCIENTIFIC_NOTATION.test(obj.value.toString())){this.push(".")}this.push(".");print(node.property)}}},{"../../types":107,"../../util":110,"lodash/lang/isNumber":254}],8:[function(require,module,exports){"use strict";exports.AnyTypeAnnotation=exports.ArrayTypeAnnotation=exports.BooleanTypeAnnotation=exports.ClassProperty=exports.DeclareClass=exports.DeclareFunction=exports.DeclareModule=exports.DeclareVariable=exports.FunctionTypeAnnotation=exports.FunctionTypeParam=exports.GenericTypeAnnotation=exports.InterfaceExtends=exports.InterfaceDeclaration=exports.IntersectionTypeAnnotation=exports.NullableTypeAnnotation=exports.NumberTypeAnnotation=exports.StringLiteralTypeAnnotation=exports.StringTypeAnnotation=exports.TupleTypeAnnotation=exports.TypeofTypeAnnotation=exports.TypeAlias=exports.TypeAnnotation=exports.TypeParameterDeclaration=exports.TypeParameterInstantiation=exports.ObjectTypeAnnotation=exports.ObjectTypeCallProperty=exports.ObjectTypeIndexer=exports.ObjectTypeProperty=exports.QualifiedTypeIdentifier=exports.UnionTypeAnnotation=exports.VoidTypeAnnotation=function(){}},{}],9:[function(require,module,exports){"use strict";var t=require("../../types");var each=require("lodash/collection/each");exports.JSXAttribute=function(node,print){print(node.name);if(node.value){this.push("=");print(node.value)}};exports.JSXIdentifier=function(node){this.push(node.name)};exports.JSXNamespacedName=function(node,print){print(node.namespace);this.push(":");print(node.name)};exports.JSXMemberExpression=function(node,print){print(node.object);this.push(".");print(node.property)};exports.JSXSpreadAttribute=function(node,print){this.push("{...");print(node.argument);this.push("}")};exports.JSXExpressionContainer=function(node,print){this.push("{");print(node.expression);this.push("}")};exports.JSXElement=function(node,print){var self=this;var open=node.openingElement;print(open);if(open.selfClosing)return;this.indent();each(node.children,function(child){if(t.isLiteral(child)){self.push(child.value)}else{print(child)}});this.dedent();print(node.closingElement)};exports.JSXOpeningElement=function(node,print){this.push("<");print(node.name);if(node.attributes.length>0){this.push(" ");print.join(node.attributes,{separator:" "})}this.push(node.selfClosing?" />":">")};exports.JSXClosingElement=function(node,print){this.push("</");print(node.name);this.push(">")};exports.JSXEmptyExpression=function(){}},{"../../types":107,"lodash/collection/each":182}],10:[function(require,module,exports){"use strict";var t=require("../../types");exports._params=function(node,print){this.push("(");print.list(node.params);this.push(")")};exports._method=function(node,print){var value=node.value;var kind=node.kind;var key=node.key;if(!kind||kind==="init"){if(value.generator){this.push("*")}}else{this.push(kind+" ")}if(value.async)this.push("async ");if(node.computed){this.push("[");print(key);this.push("]")}else{print(key)}this._params(value,print);this.push(" ");print(value.body)};exports.FunctionDeclaration=exports.FunctionExpression=function(node,print){if(node.async)this.push("async ");this.push("function");if(node.generator)this.push("*");if(node.id){this.push(" ");print(node.id)}else{this.space()}this._params(node,print);this.space();print(node.body)};exports.ArrowFunctionExpression=function(node,print){if(node.async)this.push("async ");if(node.params.length===1&&t.isIdentifier(node.params[0])){print(node.params[0])}else{this._params(node,print)}this.push(" => ");print(node.body)}},{"../../types":107}],11:[function(require,module,exports){"use strict";var t=require("../../types");var each=require("lodash/collection/each");exports.ImportSpecifier=function(node,print){if(t.isSpecifierDefault(node)){print(t.getSpecifierName(node))}else{return exports.ExportSpecifier.apply(this,arguments)}};exports.ExportSpecifier=function(node,print){print(node.id);if(node.name){this.push(" as ");print(node.name)}};exports.ExportBatchSpecifier=function(){this.push("*")};exports.ExportDeclaration=function(node,print){this.push("export ");var specifiers=node.specifiers;if(node.default){this.push("default ")}if(node.declaration){print(node.declaration);if(t.isStatement(node.declaration))return}else{if(specifiers.length===1&&t.isExportBatchSpecifier(specifiers[0])){print(specifiers[0])}else{this.push("{");if(specifiers.length){this.space();print.join(specifiers,{separator:", "});this.space()}this.push("}")}if(node.source){this.push(" from ");print(node.source)}}this.ensureSemicolon()};exports.ImportDeclaration=function(node,print){var self=this;this.push("import ");var specfiers=node.specifiers;if(specfiers&&specfiers.length){var foundImportSpecifier=false;each(node.specifiers,function(spec,i){if(+i>0){self.push(", ")}var isDefault=t.isSpecifierDefault(spec);if(!isDefault&&spec.type!=="ImportBatchSpecifier"&&!foundImportSpecifier){foundImportSpecifier=true;self.push("{ ")}print(spec)});if(foundImportSpecifier){this.push(" }")}this.push(" from ")}print(node.source);this.semicolon()};exports.ImportBatchSpecifier=function(node,print){this.push("* as ");print(node.name)}},{"../../types":107,"lodash/collection/each":182}],12:[function(require,module,exports){"use strict";var each=require("lodash/collection/each");each(["BindMemberExpression","BindFunctionExpression"],function(type){exports[type]=function(){throw new ReferenceError("Trying to render non-standard playground node "+JSON.stringify(type))}})},{"lodash/collection/each":182}],13:[function(require,module,exports){"use strict";var util=require("../../util");var t=require("../../types");exports.WithStatement=function(node,print){this.keyword("with");this.push("(");print(node.object);this.push(")");print.block(node.body)};exports.IfStatement=function(node,print){this.keyword("if");this.push("(");print(node.test);this.push(")");this.space();print.indentOnComments(node.consequent);if(node.alternate){if(this.isLast("}"))this.push(" ");this.keyword("else");if(this.format.format&&!t.isBlockStatement(node.alternate)){this.push(" ")}print.indentOnComments(node.alternate)}};exports.ForStatement=function(node,print){this.keyword("for");this.push("(");print(node.init);this.push(";");if(node.test){this.push(" ");print(node.test)}this.push(";");if(node.update){this.push(" ");print(node.update)}this.push(")");print.block(node.body)};exports.WhileStatement=function(node,print){this.keyword("while");this.push("(");print(node.test);this.push(")");print.block(node.body)};var buildForXStatement=function(op){return function(node,print){this.keyword("for");this.push("(");print(node.left);this.push(" "+op+" ");print(node.right);this.push(")");print.block(node.body)}};exports.ForInStatement=buildForXStatement("in");exports.ForOfStatement=buildForXStatement("of");exports.DoWhileStatement=function(node,print){this.keyword("do");print(node.body);this.space();this.keyword("while");this.push("(");print(node.test);this.push(");")};var buildLabelStatement=function(prefix,key){return function(node,print){this.push(prefix);var label=node[key||"label"];if(label){this.push(" ");print(label)}this.semicolon()}};exports.ContinueStatement=buildLabelStatement("continue");exports.ReturnStatement=buildLabelStatement("return","argument");exports.BreakStatement=buildLabelStatement("break");exports.LabeledStatement=function(node,print){print(node.label);this.push(": ");print(node.body)};exports.TryStatement=function(node,print){this.keyword("try");print(node.block);this.space();if(node.handlers){print(node.handlers[0])}else{print(node.handler)}if(node.finalizer){this.space();this.push("finally ");print(node.finalizer)}};exports.CatchClause=function(node,print){this.keyword("catch");this.push("(");print(node.param);this.push(") ");print(node.body)};exports.ThrowStatement=function(node,print){this.push("throw ");print(node.argument);this.semicolon()};exports.SwitchStatement=function(node,print){this.keyword("switch");this.push("(");print(node.discriminant);this.push(")");this.space();this.push("{");print.sequence(node.cases,{indent:true});this.push("}")};exports.SwitchCase=function(node,print){if(node.test){this.push("case ");print(node.test);this.push(":")}else{this.push("default:")}this.newline();print.sequence(node.consequent,{indent:true})};exports.DebuggerStatement=function(){this.push("debugger;")};exports.VariableDeclaration=function(node,print,parent){this.push(node.kind+" ");var hasInits=false;if(!t.isFor(parent)){for(var i=0;i<node.declarations.length;i++){if(node.declarations[i].init){hasInits=true}}}var sep=",";if(hasInits){sep+="\n"+util.repeat(node.kind.length+1)}else{sep+=" "}print.list(node.declarations,{separator:sep});if(!t.isFor(parent)){this.semicolon()}};exports.PrivateDeclaration=function(node,print){this.push("private ");print.join(node.declarations,{separator:", "});this.semicolon()};exports.VariableDeclarator=function(node,print){if(node.init){print(node.id);this.space();this.push("=");this.space();print(node.init)}else{print(node.id)}}},{"../../types":107,"../../util":110}],14:[function(require,module,exports){"use strict";var each=require("lodash/collection/each");exports.TaggedTemplateExpression=function(node,print){print(node.tag);print(node.quasi)};exports.TemplateElement=function(node){this._push(node.value.raw)};exports.TemplateLiteral=function(node,print){this.push("`");var quasis=node.quasis;var self=this;var len=quasis.length;each(quasis,function(quasi,i){print(quasi);if(i+1<len){self.push("${ ");print(node.expressions[i]);self.push(" }")}});this._push("`")}},{"lodash/collection/each":182}],15:[function(require,module,exports){"use strict";var each=require("lodash/collection/each");exports.Identifier=function(node){this.push(node.name)};exports.RestElement=exports.SpreadElement=exports.SpreadProperty=function(node,print){this.push("...");print(node.argument)};exports.VirtualPropertyExpression=function(node,print){print(node.object);this.push("::");print(node.property)};exports.ObjectExpression=exports.ObjectPattern=function(node,print){var props=node.properties;if(props.length){this.push("{");this.space();print.list(props,{indent:true});this.space();this.push("}")}else{this.push("{}")}};exports.Property=function(node,print){if(node.method||node.kind==="get"||node.kind==="set"){this._method(node,print)}else{if(node.computed){this.push("[");print(node.key);this.push("]")}else{print(node.key);if(node.shorthand)return}this.push(":");this.space();print(node.value)}};exports.ArrayExpression=exports.ArrayPattern=function(node,print){var elems=node.elements;var self=this;var len=elems.length;this.push("[");each(elems,function(elem,i){if(!elem){self.push(",")}else{if(i>0&&!self.format.compact)self.push(" ");print(elem);if(i<len-1)self.push(",")}});this.push("]")};exports.Literal=function(node){var val=node.value;var type=typeof val;if(type==="string"){val=JSON.stringify(val);val=val.replace(/[\u000A\u000D\u2028\u2029]/g,function(c){return"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)});this.push(val)}else if(type==="number"){this.push(val+"")}else if(type==="boolean"){this.push(val?"true":"false")}else if(node.regex){this.push("/"+node.regex.pattern+"/"+node.regex.flags)}else if(val===null){this.push("null")}}},{"lodash/collection/each":182}],16:[function(require,module,exports){"use strict";module.exports=function(ast,opts,code){var gen=new CodeGenerator(ast,opts,code);return gen.generate()};module.exports.CodeGenerator=CodeGenerator;var detectIndent=require("detect-indent");var Whitespace=require("./whitespace");var SourceMap=require("./source-map");var Position=require("./position");var Buffer=require("./buffer");var util=require("../util");var n=require("./node");var t=require("../types");var each=require("lodash/collection/each");var extend=require("lodash/object/extend");var merge=require("lodash/object/merge");function CodeGenerator(ast,opts,code){opts=opts||{};this.comments=ast.comments||[];this.tokens=ast.tokens||[];this.format=CodeGenerator.normalizeOptions(code,opts);this.ast=ast;this.whitespace=new Whitespace(this.tokens,this.comments);this.position=new Position;this.map=new SourceMap(this.position,opts,code);this.buffer=new Buffer(this.position,this.format)}each(Buffer.prototype,function(fn,key){CodeGenerator.prototype[key]=function(){return fn.apply(this.buffer,arguments)}});CodeGenerator.normalizeOptions=function(code,opts){var style=" ";if(code){var indent=detectIndent(code).indent;if(indent&&indent!==" ")style=indent}return merge({parentheses:true,comments:opts.comments==null||opts.comments,compact:false,concise:false,indent:{adjustMultilineComment:true,style:style,base:0}},opts.format||{})};CodeGenerator.generators={templateLiterals:require("./generators/template-literals"),comprehensions:require("./generators/comprehensions"),expressions:require("./generators/expressions"),statements:require("./generators/statements"),playground:require("./generators/playground"),classes:require("./generators/classes"),methods:require("./generators/methods"),modules:require("./generators/modules"),types:require("./generators/types"),flow:require("./generators/flow"),base:require("./generators/base"),jsx:require("./generators/jsx")};each(CodeGenerator.generators,function(generator){extend(CodeGenerator.prototype,generator)});CodeGenerator.prototype.generate=function(){var ast=this.ast;this.print(ast);var comments=[];each(ast.comments,function(comment){if(!comment._displayed)comments.push(comment)});this._printComments(comments);return{map:this.map.get(),code:this.buffer.get()}};CodeGenerator.prototype.buildPrint=function(parent){var self=this;var print=function(node,opts){return self.print(node,parent,opts)};print.sequence=function(nodes,opts){opts=opts||{};opts.statement=true;return self.printJoin(print,nodes,opts)};print.join=function(nodes,opts){return self.printJoin(print,nodes,opts)};print.list=function(items,opts){opts=opts||{};var sep=opts.separator||", ";if(self.format.compact)sep=",";opts.separator=sep;print.join(items,opts)};print.block=function(node){return self.printBlock(print,node)};print.indentOnComments=function(node){return self.printAndIndentOnComments(print,node) };return print};CodeGenerator.prototype.print=function(node,parent,opts){if(!node)return"";if(parent&&parent._compact){node._compact=true}var oldConcise=this.format.concise;if(node._compact){this.format.concise=true}var self=this;opts=opts||{};var newline=function(leading){if(!opts.statement&&!n.isUserWhitespacable(node,parent)){return}var lines=0;if(node.start!=null&&!node._ignoreUserWhitespace){if(leading){lines=self.whitespace.getNewlinesBefore(node)}else{lines=self.whitespace.getNewlinesAfter(node)}}else{if(!leading)lines++;var needs=n.needsWhitespaceAfter;if(leading)needs=n.needsWhitespaceBefore;lines+=needs(node,parent);if(!self.buffer.get())lines=0}self.newline(lines)};if(this[node.type]){var needsNoLineTermParens=n.needsParensNoLineTerminator(node,parent);var needsParens=needsNoLineTermParens||n.needsParens(node,parent);if(needsParens)this.push("(");if(needsNoLineTermParens)this.indent();this.printLeadingComments(node,parent);newline(true);if(opts.before)opts.before();this.map.mark(node,"start");this[node.type](node,this.buildPrint(node),parent);if(needsNoLineTermParens){this.newline();this.dedent()}if(needsParens)this.push(")");this.map.mark(node,"end");if(opts.after)opts.after();newline(false);this.printTrailingComments(node,parent)}else{throw new ReferenceError("unknown node of type "+JSON.stringify(node.type)+" with constructor "+JSON.stringify(node&&node.constructor.name))}this.format.concise=oldConcise};CodeGenerator.prototype.printJoin=function(print,nodes,opts){if(!nodes||!nodes.length)return;opts=opts||{};var self=this;var len=nodes.length;if(opts.indent)self.indent();each(nodes,function(node,i){print(node,{statement:opts.statement,after:function(){if(opts.iterator){opts.iterator(node,i)}if(opts.separator&&i<len-1){self.push(opts.separator)}}})});if(opts.indent)self.dedent()};CodeGenerator.prototype.printAndIndentOnComments=function(print,node){var indent=!!node.leadingComments;if(indent)this.indent();print(node);if(indent)this.dedent()};CodeGenerator.prototype.printBlock=function(print,node){if(t.isEmptyStatement(node)){this.semicolon()}else{this.push(" ");print(node)}};CodeGenerator.prototype.generateComment=function(comment){var val=comment.value;if(comment.type==="Line"){val="//"+val}else{val="/*"+val+"*/"}return val};CodeGenerator.prototype.printTrailingComments=function(node,parent){this._printComments(this.getComments("trailingComments",node,parent))};CodeGenerator.prototype.printLeadingComments=function(node,parent){this._printComments(this.getComments("leadingComments",node,parent))};CodeGenerator.prototype.getComments=function(key,node,parent){if(t.isExpressionStatement(parent)){return[]}var comments=[];var nodes=[node];var self=this;if(t.isExpressionStatement(node)){nodes.push(node.argument)}each(nodes,function(node){comments=comments.concat(self._getComments(key,node))});return comments};CodeGenerator.prototype._getComments=function(key,node){return node&&node[key]||[]};CodeGenerator.prototype._printComments=function(comments){if(this.format.compact)return;if(!this.format.comments)return;if(!comments||!comments.length)return;var self=this;each(comments,function(comment){var skip=false;each(self.ast.comments,function(origComment){if(origComment.start===comment.start){if(origComment._displayed)skip=true;origComment._displayed=true;return false}});if(skip)return;self.newline(self.whitespace.getNewlinesBefore(comment));var column=self.position.column;var val=self.generateComment(comment);if(column&&!self.isLast(["\n"," ","[","{"])){self._push(" ");column++}if(comment.type==="Block"&&self.format.indent.adjustMultilineComment){var offset=comment.loc.start.column;if(offset){var newlineRegex=new RegExp("\\n\\s{1,"+offset+"}","g");val=val.replace(newlineRegex,"\n")}var indent=Math.max(self.indentSize(),column);val=val.replace(/\n/g,"\n"+util.repeat(indent))}if(column===0){val=self.getIndent()+val}self._push(val);self.newline(self.whitespace.getNewlinesAfter(comment))})}},{"../types":107,"../util":110,"./buffer":3,"./generators/base":4,"./generators/classes":5,"./generators/comprehensions":6,"./generators/expressions":7,"./generators/flow":8,"./generators/jsx":9,"./generators/methods":10,"./generators/modules":11,"./generators/playground":12,"./generators/statements":13,"./generators/template-literals":14,"./generators/types":15,"./node":17,"./position":20,"./source-map":21,"./whitespace":22,"detect-indent":165,"lodash/collection/each":182,"lodash/object/extend":263,"lodash/object/merge":267}],17:[function(require,module,exports){"use strict";module.exports=Node;var whitespace=require("./whitespace");var parens=require("./parentheses");var t=require("../../types");var each=require("lodash/collection/each");var some=require("lodash/collection/some");var find=function(obj,node,parent){if(!obj)return;var result;var types=Object.keys(obj);for(var i=0;i<types.length;i++){var type=types[i];if(t.is(type,node)){var fn=obj[type];result=fn(node,parent);if(result!=null)break}}return result};function Node(node,parent){this.parent=parent;this.node=node}Node.isUserWhitespacable=function(node){return t.isUserWhitespacable(node)};Node.needsWhitespace=function(node,parent,type){if(!node)return 0;if(t.isExpressionStatement(node)){node=node.expression}var lines=find(whitespace[type].nodes,node,parent);if(lines)return lines;each(find(whitespace[type].list,node,parent),function(expr){lines=Node.needsWhitespace(expr,node,type);if(lines)return false});return lines||0};Node.needsWhitespaceBefore=function(node,parent){return Node.needsWhitespace(node,parent,"before")};Node.needsWhitespaceAfter=function(node,parent){return Node.needsWhitespace(node,parent,"after")};Node.needsParens=function(node,parent){if(!parent)return false;if(t.isNewExpression(parent)&&parent.callee===node){if(t.isCallExpression(node))return true;var hasCall=some(node,function(val){return t.isCallExpression(val)});if(hasCall)return true}return find(parens,node,parent)};Node.needsParensNoLineTerminator=function(node,parent){if(!parent)return false;if(!node.leadingComments||!node.leadingComments.length){return false}if(t.isYieldExpression(parent)||t.isAwaitExpression(parent)){return true}if(t.isContinueStatement(parent)||t.isBreakStatement(parent)||t.isReturnStatement(parent)||t.isThrowStatement(parent)){return true}return false};each(Node,function(fn,key){Node.prototype[key]=function(){var args=new Array(arguments.length+2);args[0]=this.node;args[1]=this.parent;for(var i=0;i<args.length;i++){args[i+2]=arguments[i]}return Node[key].apply(null,args)}})},{"../../types":107,"./parentheses":18,"./whitespace":19,"lodash/collection/each":182,"lodash/collection/some":187}],18:[function(require,module,exports){"use strict";var t=require("../../types");var each=require("lodash/collection/each");var PRECEDENCE={};each([["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]],function(tier,i){each(tier,function(op){PRECEDENCE[op]=i})});exports.UpdateExpression=function(node,parent){if(t.isMemberExpression(parent)&&parent.object===node){return true}};exports.ObjectExpression=function(node,parent){if(t.isExpressionStatement(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}return false};exports.Binary=function(node,parent){if((t.isCallExpression(parent)||t.isNewExpression(parent))&&parent.callee===node){return true}if(t.isUnaryLike(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isBinary(parent)){var parentOp=parent.operator;var parentPos=PRECEDENCE[parentOp];var nodeOp=node.operator;var nodePos=PRECEDENCE[nodeOp];if(parentPos>nodePos){return true}if(parentPos===nodePos&&parent.right===node){return true}}};exports.BinaryExpression=function(node,parent){if(node.operator==="in"){if(t.isVariableDeclarator(parent)){return true}if(t.isFor(parent)){return true}}};exports.SequenceExpression=function(node,parent){if(t.isForStatement(parent)){return false}if(t.isExpressionStatement(parent)&&parent.expression===node){return false}return true};exports.YieldExpression=function(node,parent){return t.isBinary(parent)||t.isUnaryLike(parent)||t.isCallExpression(parent)||t.isMemberExpression(parent)||t.isNewExpression(parent)||t.isConditionalExpression(parent)||t.isYieldExpression(parent)};exports.ClassExpression=function(node,parent){return t.isExpressionStatement(parent)};exports.UnaryLike=function(node,parent){return t.isMemberExpression(parent)&&parent.object===node};exports.FunctionExpression=function(node,parent){if(t.isExpressionStatement(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isCallExpression(parent)&&parent.callee===node){return true}};exports.AssignmentExpression=exports.ConditionalExpression=function(node,parent){if(t.isUnaryLike(parent)){return true}if(t.isBinary(parent)){return true}if(t.isCallExpression(parent)||t.isNewExpression(parent)){if(parent.callee===node){return true}}if(t.isConditionalExpression(parent)&&parent.test===node){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}return false}},{"../../types":107,"lodash/collection/each":182}],19:[function(require,module,exports){"use strict";var t=require("../../types");var each=require("lodash/collection/each");var map=require("lodash/collection/map");var isNumber=require("lodash/lang/isNumber");exports.before={nodes:{Property:function(node,parent){if(parent.properties[0]===node){return 1}},SpreadProperty:function(node,parent){return exports.before.nodes.Property(node,parent)},SwitchCase:function(node,parent){if(parent.cases[0]===node){return 1}},CallExpression:function(node){if(t.isFunction(node.callee)){return 1}}}};exports.after={nodes:{LogicalExpression:function(node){return t.isFunction(node.left)||t.isFunction(node.right)},AssignmentExpression:function(node){if(t.isFunction(node.right)){return 1}}},list:{VariableDeclaration:function(node){return map(node.declarations,"init")},ArrayExpression:function(node){return node.elements},ObjectExpression:function(node){return node.properties}}};each({Function:1,Class:1,For:1,ArrayExpression:{after:1},ObjectExpression:{after:1},SwitchStatement:1,IfStatement:{before:1},CallExpression:{after:1},Literal:{after:1}},function(amounts,type){if(isNumber(amounts)){amounts={after:amounts,before:amounts}}each([type].concat(t.FLIPPED_ALIAS_KEYS[type]||[]),function(type){each(amounts,function(amount,key){exports[key].nodes[type]=function(){return amount}})})})},{"../../types":107,"lodash/collection/each":182,"lodash/collection/map":186,"lodash/lang/isNumber":254}],20:[function(require,module,exports){"use strict";module.exports=Position;function Position(){this.line=1;this.column=0}Position.prototype.push=function(str){for(var i=0;i<str.length;i++){if(str[i]==="\n"){this.line++;this.column=0}else{this.column++}}};Position.prototype.unshift=function(str){for(var i=0;i<str.length;i++){if(str[i]==="\n"){this.line--}else{this.column--}}}},{}],21:[function(require,module,exports){"use strict";module.exports=SourceMap;var sourceMap=require("source-map");var t=require("../types");function SourceMap(position,opts,code){this.position=position;this.opts=opts;if(opts.sourceMap){this.map=new sourceMap.SourceMapGenerator({file:opts.sourceMapName,sourceRoot:opts.sourceRoot});this.map.setSourceContent(opts.sourceFileName,code)}else{this.map=null}}SourceMap.prototype.get=function(){var map=this.map;if(map){return map.toJSON()}else{return map}};SourceMap.prototype.mark=function(node,type){var loc=node.loc;if(!loc)return;var map=this.map;if(!map)return;if(t.isProgram(node)||t.isFile(node))return;var position=this.position;var generated={line:position.line,column:position.column};var original=loc[type];map.addMapping({source:this.opts.sourceFileName,generated:generated,original:original})}},{"../types":107,"source-map":289}],22:[function(require,module,exports){"use strict";module.exports=Whitespace;var sortBy=require("lodash/collection/sortBy");function getLookupIndex(i,base,max){i+=base;if(i>=max)i-=max;return i}function Whitespace(tokens,comments){this.tokens=sortBy(tokens.concat(comments),"start");this.used={};this._lastFoundIndex=0}Whitespace.prototype.getNewlinesBefore=function(node){var startToken;var endToken;var tokens=this.tokens;var token;for(var j=0;j<tokens.length;j++){var i=getLookupIndex(j,this._lastFoundIndex,this.tokens.length);token=tokens[i];if(node.start===token.start){startToken=tokens[i-1];endToken=token;this._lastFoundIndex=i;break}}return this.getNewlinesBetween(startToken,endToken)};Whitespace.prototype.getNewlinesAfter=function(node){var startToken;var endToken;var tokens=this.tokens;var token;for(var j=0;j<tokens.length;j++){var i=getLookupIndex(j,this._lastFoundIndex,this.tokens.length);token=tokens[i];if(node.end===token.end){startToken=token;endToken=tokens[i+1];this._lastFoundIndex=i;break}}if(endToken.type.type==="eof"){return 1}else{var lines=this.getNewlinesBetween(startToken,endToken);if(node.type==="Line"&&!lines){return 1}else{return lines}}};Whitespace.prototype.getNewlinesBetween=function(startToken,endToken){var start=startToken?startToken.loc.end.line:1;var end=endToken.loc.start.line;var lines=0;for(var line=start;line<end;line++){if(typeof this.used[line]==="undefined"){this.used[line]=true;lines++}}return lines}},{"lodash/collection/sortBy":188}],23:[function(require,module,exports){"use strict";module.exports=function cloneDeep(obj){var obj2={};if(!obj)return obj2;for(var key in obj){obj2[key]=obj[key]}return obj2}},{}],24:[function(require,module,exports){var supportsColor=require("supports-color");var tokenize=require("js-tokenizer");var chalk=require("chalk");var util=require("../util");var defs={string1:"red",string2:"red",punct:["white","bold"],curly:"green",parens:["blue","bold"],square:["yellow"],name:"white",keyword:["cyan"],number:"magenta",regexp:"magenta",comment1:"grey",comment2:"grey"};var highlight=function(text){var colorize=function(str,col){if(!col)return str;if(Array.isArray(col)){col.forEach(function(col){str=chalk[col](str)})}else{str=chalk[col](str)}return str};return tokenize(text,true).map(function(str){var type=tokenize.type(str);return colorize(str,defs[type])}).join("")};module.exports=function(lines,lineNumber,colNumber){colNumber=Math.max(colNumber,0);if(supportsColor){lines=highlight(lines)}lines=lines.split(/\r\n|[\n\r\u2028\u2029]/);var start=Math.max(lineNumber-3,0);var end=Math.min(lines.length,lineNumber+3);var width=(end+"").length;if(!lineNumber&&!colNumber){start=0;end=lines.length}return"\n"+lines.slice(start,end).map(function(line,i){var curr=i+start+1;var gutter=curr===lineNumber?"> ":" ";var sep=curr+util.repeat(width+1);gutter+=sep+"| ";var str=gutter+line;if(colNumber&&curr===lineNumber){str+="\n";str+=util.repeat(gutter.length-2);str+="|"+util.repeat(colNumber)+"^"}return str}).join("\n")}},{"../util":110,chalk:153,"js-tokenizer":175,"supports-color":300}],25:[function(require,module,exports){module.exports=function(a,b){if(a.length===0)return b.length;if(b.length===0)return a.length;var matrix=[];var i;for(i=0;i<=b.length;i++){matrix[i]=[i]}var j;for(j=0;j<=a.length;j++){matrix[0][j]=j}for(i=1;i<=b.length;i++){for(j=1;j<=a.length;j++){if(b.charAt(i-1)==a.charAt(j-1)){matrix[i][j]=matrix[i-1][j-1]}else{matrix[i][j]=Math.min(matrix[i-1][j-1]+1,Math.min(matrix[i][j-1]+1,matrix[i-1][j]+1))}}}return matrix[b.length][a.length]}},{}],26:[function(require,module,exports){"use strict";module.exports=function(){return Object.create(null)}},{}],27:[function(require,module,exports){"use strict";module.exports=function toFastProperties(obj){function f(){}f.prototype=obj;return f;eval(obj)}},{}],28:[function(require,module,exports){"use strict";var t=require("./types");var extend=require("lodash/object/extend");require("./types/node");var estraverse=require("estraverse");extend(estraverse.VisitorKeys,t.VISITOR_KEYS);var types=require("ast-types");var def=types.Type.def;var or=types.Type.or;def("File").bases("Node").build("program").field("program",def("Program"));def("AssignmentPattern").bases("Pattern").build("left","right").field("left",def("Pattern")).field("right",def("Expression"));def("ImportBatchSpecifier").bases("Specifier").build("name").field("name",def("Identifier"));def("RestElement").bases("Pattern").build("argument").field("argument",def("expression"));def("VirtualPropertyExpression").bases("Expression").build("object","property").field("object",def("Expression")).field("property",or(def("Identifier"),def("Expression")));def("PrivateDeclaration").bases("Declaration").build("declarations").field("declarations",[def("Identifier")]);def("BindMemberExpression").bases("Expression").build("object","property","arguments").field("object",def("Expression")).field("property",or(def("Identifier"),def("Expression"))).field("arguments",[def("Expression")]);def("BindFunctionExpression").bases("Expression").build("callee","arguments").field("callee",def("Expression")).field("arguments",[def("Expression")]);types.finalize()},{"./types":107,"./types/node":108,"ast-types":125,estraverse:168,"lodash/object/extend":263}],29:[function(require,module,exports){"use strict";var explode=require("./explode-assignable-expression");var t=require("../../types");module.exports=function(exports,opts){var isAssignment=function(node){return node.operator===opts.operator+"="};var buildAssignment=function(left,right){return t.assignmentExpression("=",left,right)};exports.ExpressionStatement=function(node,parent,scope,context,file){if(file.isConsequenceExpressionStatement(node))return;var expr=node.expression;if(!isAssignment(expr))return;var nodes=[];var exploded=explode(expr.left,nodes,file,scope,true);nodes.push(t.expressionStatement(buildAssignment(exploded.ref,opts.build(exploded.uid,expr.right))));return nodes};exports.AssignmentExpression=function(node,parent,scope,context,file){if(!isAssignment(node))return;var nodes=[];var exploded=explode(node.left,nodes,file,scope);nodes.push(buildAssignment(exploded.ref,opts.build(exploded.uid,node.right)));return t.toSequenceExpression(nodes,scope)};exports.BinaryExpression=function(node){if(node.operator!==opts.operator)return;return opts.build(node.left,node.right)}}},{"../../types":107,"./explode-assignable-expression":33}],30:[function(require,module,exports){"use strict";var t=require("../../types");module.exports=function build(node,buildBody){var self=node.blocks.shift();if(!self)return;var child=build(node,buildBody);if(!child){child=buildBody();if(node.filter){child=t.ifStatement(node.filter,t.blockStatement([child]))}}return t.forOfStatement(t.variableDeclaration("let",[t.variableDeclarator(self.left)]),self.right,t.blockStatement([child]))}},{"../../types":107}],31:[function(require,module,exports){"use strict";var explode=require("./explode-assignable-expression");var t=require("../../types");module.exports=function(exports,opts){var buildAssignment=function(left,right){return t.assignmentExpression("=",left,right)};exports.ExpressionStatement=function(node,parent,scope,context,file){if(file.isConsequenceExpressionStatement(node))return;var expr=node.expression;if(!opts.is(expr,file))return;var nodes=[];var exploded=explode(expr.left,nodes,file,scope);nodes.push(t.ifStatement(opts.build(exploded.uid,file),t.expressionStatement(buildAssignment(exploded.ref,expr.right))));return nodes};exports.AssignmentExpression=function(node,parent,scope,context,file){if(!opts.is(node,file))return;var nodes=[];var exploded=explode(node.left,nodes,file,scope);nodes.push(t.logicalExpression("&&",opts.build(exploded.uid,file),buildAssignment(exploded.ref,node.right)));nodes.push(exploded.ref);return t.toSequenceExpression(nodes,scope)}}},{"../../types":107,"./explode-assignable-expression":33}],32:[function(require,module,exports){var cloneDeep=require("lodash/lang/cloneDeep");var traverse=require("../../traverse");var clone=require("lodash/lang/clone");var each=require("lodash/collection/each");var has=require("lodash/object/has");var t=require("../../types");exports.push=function(mutatorMap,key,kind,computed,value){var alias;if(t.isIdentifier(key)){alias=key.name;if(computed)alias="computed:"+alias}else if(t.isLiteral(key)){alias=String(key.value)}else{alias=JSON.stringify(traverse.removeProperties(cloneDeep(key)))}var map;if(has(mutatorMap,alias)){map=mutatorMap[alias]}else{map={}}mutatorMap[alias]=map;map._key=key;if(computed){map._computed=true}map[kind]=value};exports.build=function(mutatorMap){var objExpr=t.objectExpression([]);each(mutatorMap,function(map){var mapNode=t.objectExpression([]);var propNode=t.property("init",map._key,mapNode,map._computed);if(!map.get&&!map.set){map.writable=t.literal(true)}if(map.enumerable===false){delete map.enumerable}else{map.enumerable=t.literal(true)}map.configurable=t.literal(true);each(map,function(node,key){if(key[0]==="_")return;node=clone(node);var inheritNode=node;if(t.isMethodDefinition(node))node=node.value;var prop=t.property("init",t.identifier(key),node);t.inheritsComments(prop,inheritNode);t.removeComments(inheritNode);mapNode.properties.push(prop)});objExpr.properties.push(propNode)});return objExpr}},{"../../traverse":103,"../../types":107,"lodash/collection/each":182,"lodash/lang/clone":246,"lodash/lang/cloneDeep":247,"lodash/object/has":264}],33:[function(require,module,exports){"use strict";var t=require("../../types");var getObjRef=function(node,nodes,file,scope){var ref;if(t.isIdentifier(node)){if(scope.hasBinding(node.name)){return node}else{ref=node}}else if(t.isMemberExpression(node)){ref=node.object;if(t.isIdentifier(ref)&&scope.hasReference(ref.name)){return ref}}else{throw new Error("We can't explode this node type "+node.type)}var temp=scope.generateUidBasedOnNode(ref);nodes.push(t.variableDeclaration("var",[t.variableDeclarator(temp,ref)]));return temp};var getPropRef=function(node,nodes,file,scope){var prop=node.property;var key=t.toComputedKey(node,prop);if(t.isLiteral(key))return key;var temp=scope.generateUidBasedOnNode(prop);nodes.push(t.variableDeclaration("var",[t.variableDeclarator(temp,prop)]));return temp};module.exports=function(node,nodes,file,scope,allowedSingleIdent){var obj;if(t.isIdentifier(node)&&allowedSingleIdent){obj=node}else{obj=getObjRef(node,nodes,file,scope)}var ref,uid;if(t.isIdentifier(node)){ref=node;uid=obj}else{var prop=getPropRef(node,nodes,file,scope);var computed=node.computed||t.isLiteral(prop);uid=ref=t.memberExpression(obj,prop,computed)}return{uid:uid,ref:ref}}},{"../../types":107}],34:[function(require,module,exports){"use strict";var util=require("../../util");var t=require("../../types");var visitor={enter:function(node,parent,scope,context,state){if(!t.isIdentifier(node,{name:state.id}))return;if(!t.isReferenced(node,parent))return;var localDeclar=scope.getBinding(state.id);if(localDeclar!==state.outerDeclar)return;state.selfReference=true;context.stop()}};exports.property=function(node,file,scope){var key=t.toComputedKey(node,node.key);if(!t.isLiteral(key))return node;var id=t.toIdentifier(key.value);key=t.identifier(id);var state={id:id,selfReference:false,outerDeclar:scope.getBinding(id)};scope.traverse(node,visitor,state);if(state.selfReference){node.value=util.template("property-method-assignment-wrapper",{FUNCTION:node.value,FUNCTION_ID:key,FUNCTION_KEY:scope.generateUidIdentifier(id),WRAPPER_KEY:scope.generateUidIdentifier(id+"Wrapper")})}else{node.value.id=key}}},{"../../types":107,"../../util":110}],35:[function(require,module,exports){var t=require("../../types");var isCreateClassCallExpression=t.buildMatchMemberExpression("React.createClass");exports.isCreateClass=function(node){if(!node||!t.isCallExpression(node))return false;if(!isCreateClassCallExpression(node.callee))return false;var args=node.arguments;if(args.length!==1)return false;var first=args[0];if(!t.isObjectExpression(first))return false;return true};exports.isReactComponent=t.buildMatchMemberExpression("React.Component")},{"../../types":107}],36:[function(require,module,exports){"use strict";var t=require("../../types");var visitor={enter:function(node,parent,scope,context){if(t.isFunction(node))context.skip();if(t.isAwaitExpression(node)){node.type="YieldExpression";if(node.all){node.all=false;node.argument=t.callExpression(t.memberExpression(t.identifier("Promise"),t.identifier("all")),[node.argument])}}}};module.exports=function(node,callId,scope){node.async=false;node.generator=true;scope.traverse(node,visitor);var call=t.callExpression(callId,[node]);var id=node.id;delete node.id;if(t.isFunctionDeclaration(node)){var declar=t.variableDeclaration("let",[t.variableDeclarator(id,call)]);declar._blockHoist=true;return declar}else{return call}}},{"../../types":107}],37:[function(require,module,exports){"use strict";module.exports=ReplaceSupers;var t=require("../../types");function ReplaceSupers(opts){this.topLevelThisReference=null;this.methodNode=opts.methodNode;this.className=opts.className;this.superName=opts.superName;this.isLoose=opts.isLoose;this.scope=opts.scope;this.file=opts.file}ReplaceSupers.prototype.setSuperProperty=function(property,value,isStatic,isComputed,thisExpression){return t.callExpression(this.file.addHelper("set"),[isStatic?this.superName:t.memberExpression(this.superName,t.identifier("prototype")),isComputed?property:t.literal(property.name),value,thisExpression])};ReplaceSupers.prototype.getSuperProperty=function(property,isStatic,isComputed,thisExpression){return t.callExpression(this.file.addHelper("get"),[isStatic?this.superName:t.memberExpression(this.superName,t.identifier("prototype")),isComputed?property:t.literal(property.name),thisExpression])};ReplaceSupers.prototype.replace=function(){this.traverseLevel(this.methodNode.value,true)};var visitor={enter:function(node,parent,scope,context,state){var topLevel=state.topLevel;var self=state.self;if(t.isFunction(node)&&!t.isArrowFunctionExpression(node)){self.traverseLevel(node,false);return context.skip()}if(t.isProperty(node,{method:true})||t.isMethodDefinition(node)){return context.skip()}var getThisReference=topLevel?t.thisExpression:self.getThisReference.bind(self);var callback=self.specHandle;if(self.isLoose)callback=self.looseHandle;return callback.call(self,getThisReference,node,parent)}};ReplaceSupers.prototype.traverseLevel=function(node,topLevel){var state={self:this,topLevel:topLevel};this.scope.traverse(node,visitor,state)};ReplaceSupers.prototype.getThisReference=function(){if(this.topLevelThisReference){return this.topLevelThisReference}else{var ref=this.topLevelThisReference=this.file.generateUidIdentifier("this");this.methodNode.value.body.body.unshift(t.variableDeclaration("var",[t.variableDeclarator(this.topLevelThisReference,t.thisExpression())]));return ref}};ReplaceSupers.prototype.getLooseSuperProperty=function(methodNode,id,parent){var methodName=methodNode.key;var superName=this.superName||t.identifier("Function");if(parent.property===id){return}else if(t.isCallExpression(parent,{callee:id})){parent.arguments.unshift(t.thisExpression());if(methodName.name==="constructor"){return t.memberExpression(superName,t.identifier("call"))}else{id=superName;if(!methodNode.static){id=t.memberExpression(id,t.identifier("prototype"))}id=t.memberExpression(id,methodName,methodNode.computed);return t.memberExpression(id,t.identifier("call"))}}else if(t.isMemberExpression(parent)&&!methodNode.static){return t.memberExpression(superName,t.identifier("prototype"))}else{return superName}};ReplaceSupers.prototype.looseHandle=function(getThisReference,node,parent){if(t.isIdentifier(node,{name:"super"})){return this.getLooseSuperProperty(this.methodNode,node,parent)}else if(t.isCallExpression(node)){var callee=node.callee;if(!t.isMemberExpression(callee))return;if(callee.object.name!=="super")return;t.appendToMemberExpression(callee,t.identifier("call"));node.arguments.unshift(getThisReference())}};ReplaceSupers.prototype.specHandle=function(getThisReference,node,parent){var methodNode=this.methodNode;var property;var computed;var args;var thisReference;if(t.isIdentifier(node,{name:"super"})){if(!(t.isMemberExpression(parent)&&!parent.computed&&parent.property===node)){throw this.file.errorWithNode(node,"illegal use of bare super")}}else if(t.isCallExpression(node)){var callee=node.callee;if(t.isIdentifier(callee,{name:"super"})){property=methodNode.key;computed=methodNode.computed;args=node.arguments;if(methodNode.key.name!=="constructor"){var methodName=methodNode.key.name||"METHOD_NAME";throw this.file.errorWithNode(node,"Direct super call is illegal in non-constructor, use super."+methodName+"() instead")}}else{if(!t.isMemberExpression(callee))return;if(callee.object.name!=="super")return;property=callee.property;computed=callee.computed;args=node.arguments}}else if(t.isMemberExpression(node)){if(!t.isIdentifier(node.object,{name:"super"}))return;property=node.property;computed=node.computed}else if(t.isAssignmentExpression(node)){if(!t.isIdentifier(node.left.object,{name:"super"}))return;if(methodNode.kind!=="set")return;thisReference=getThisReference();return this.setSuperProperty(node.left.property,node.right,methodNode.static,node.left.computed,thisReference)}if(!property)return;thisReference=getThisReference();var superProperty=this.getSuperProperty(property,methodNode.static,computed,thisReference);if(args){if(args.length===1&&t.isSpreadElement(args[0])){return t.callExpression(t.memberExpression(superProperty,t.identifier("apply")),[thisReference,args[0].argument])}else{return t.callExpression(t.memberExpression(superProperty,t.identifier("call")),[thisReference].concat(args))}}else{return superProperty}}},{"../../types":107}],38:[function(require,module,exports){"use strict";var t=require("../../types");exports.has=function(node){var first=node.body[0];return t.isExpressionStatement(first)&&t.isLiteral(first.expression,{value:"use strict"})};exports.wrap=function(node,callback){var useStrictNode;if(exports.has(node)){useStrictNode=node.body.shift()}callback();if(useStrictNode){node.body.unshift(useStrictNode)}}},{"../../types":107}],39:[function(require,module,exports){"use strict";module.exports=transform;var Transformer=require("./transformer");var object=require("../helpers/object");var File=require("../file");var util=require("../util");var each=require("lodash/collection/each");function transform(code,opts){var file=new File(opts);return file.parse(code)}transform.fromAst=function(ast,code,opts){ast=util.normalizeAst(ast);var file=new File(opts);file.addCode(code);file.transform(ast);return file.generate()};transform._ensureTransformerNames=function(type,rawKeys){var keys=[];for(var i=0;i<rawKeys.length;i++){var key=rawKeys[i];var deprecatedKey=transform.deprecatedTransformerMap[key];if(deprecatedKey){console.error("The transformer "+key+" has been renamed to "+deprecatedKey+" in v3.0.0 - backwards compatibilty will be removed 4.0.0");rawKeys.push(deprecatedKey)}else if(transform.transformers[key]){keys.push(key)}else if(transform.namespaces[key]){keys=keys.concat(transform.namespaces[key])}else{throw new ReferenceError("Unknown transformer "+key+" specified in "+type+" - "+"transformer key names have been changed in 3.0.0 see "+"the changelog for more info "+"https://github.com/6to5/6to5/blob/master/CHANGELOG.md#300")}}return keys};transform.transformers=object();transform.namespaces=object();transform.deprecatedTransformerMap=require("./transformers/deprecated");transform.moduleFormatters=require("./modules");var rawTransformers=require("./transformers");each(rawTransformers,function(transformer,key){var namespace=key.split(".")[0];transform.namespaces[namespace]=transform.namespaces[namespace]||[];transform.namespaces[namespace].push(key);transform.transformers[key]=new Transformer(key,transformer)})},{"../file":2,"../helpers/object":26,"../util":110,"./modules":47,"./transformer":52,"./transformers":74,"./transformers/deprecated":53,"lodash/collection/each":182}],40:[function(require,module,exports){"use strict"; module.exports=DefaultFormatter;var object=require("../../helpers/object");var util=require("../../util");var t=require("../../types");var extend=require("lodash/object/extend");function DefaultFormatter(file){this.file=file;this.ids=object();this.hasNonDefaultExports=false;this.hasLocalExports=false;this.hasLocalImports=false;this.localImportOccurences=object();this.localExports=object();this.localImports=object();this.getLocalExports();this.getLocalImports();this.remapAssignments()}DefaultFormatter.prototype.doDefaultExportInterop=function(node){return node.default&&!this.noInteropRequire&&!this.hasNonDefaultExports};DefaultFormatter.prototype.bumpImportOccurences=function(node){var source=node.source.value;var occurs=this.localImportOccurences;occurs[source]=occurs[source]||0;occurs[source]+=node.specifiers.length};var exportsVisitor={enter:function(node,parent,scope,context,formatter){var declar=node&&node.declaration;if(t.isExportDeclaration(node)){formatter.hasLocalImports=true;if(declar&&t.isStatement(declar)){extend(formatter.localExports,t.getBindingIdentifiers(declar))}if(!node.default){formatter.hasNonDefaultExports=true}if(node.source){formatter.bumpImportOccurences(node)}}}};DefaultFormatter.prototype.getLocalExports=function(){this.file.scope.traverse(this.file.ast,exportsVisitor,this)};var importsVisitor={enter:function(node,parent,scope,context,formatter){if(t.isImportDeclaration(node)){formatter.hasLocalImports=true;extend(formatter.localImports,t.getBindingIdentifiers(node));formatter.bumpImportOccurences(node)}}};DefaultFormatter.prototype.getLocalImports=function(){this.file.scope.traverse(this.file.ast,importsVisitor,this)};var remapVisitor={enter:function(node,parent,scope,context,formatter){if(t.isUpdateExpression(node)&&formatter.isLocalReference(node.argument,scope)){context.skip();var assign=t.assignmentExpression(node.operator[0]+"=",node.argument,t.literal(1));var remapped=formatter.remapExportAssignment(assign);if(t.isExpressionStatement(parent)||node.prefix){return remapped}var nodes=[];nodes.push(remapped);var operator;if(node.operator==="--"){operator="+"}else{operator="-"}nodes.push(t.binaryExpression(operator,node.argument,t.literal(1)));return t.sequenceExpression(nodes)}if(t.isAssignmentExpression(node)&&formatter.isLocalReference(node.left,scope)){context.skip();return formatter.remapExportAssignment(node)}}};DefaultFormatter.prototype.remapAssignments=function(){if(this.hasLocalImports){this.file.scope.traverse(this.file.ast,remapVisitor,this)}};DefaultFormatter.prototype.isLocalReference=function(node){var localImports=this.localImports;return t.isIdentifier(node)&&localImports[node.name]&&localImports[node.name]!==node};DefaultFormatter.prototype.checkLocalReference=function(node){var file=this.file;if(this.isLocalReference(node)){throw file.errorWithNode(node,"Illegal assignment of module import")}};DefaultFormatter.prototype.remapExportAssignment=function(node){return t.assignmentExpression("=",node.left,t.assignmentExpression(node.operator,t.memberExpression(t.identifier("exports"),node.left),node.right))};DefaultFormatter.prototype.isLocalReference=function(node,scope){var localExports=this.localExports;var name=node.name;return t.isIdentifier(node)&&localExports[name]&&localExports[name]===scope.getBinding(name)};DefaultFormatter.prototype.getModuleName=function(){var opts=this.file.opts;var filenameRelative=opts.filenameRelative;var moduleName="";if(opts.moduleRoot){moduleName=opts.moduleRoot+"/"}if(!opts.filenameRelative){return moduleName+opts.filename.replace(/^\//,"")}if(opts.sourceRoot){var sourceRootRegEx=new RegExp("^"+opts.sourceRoot+"/?");filenameRelative=filenameRelative.replace(sourceRootRegEx,"")}if(!opts.keepModuleIdExtensions){filenameRelative=filenameRelative.replace(/\.(\w*?)$/,"")}moduleName+=filenameRelative;moduleName=moduleName.replace(/\\/g,"/");return moduleName};DefaultFormatter.prototype._pushStatement=function(ref,nodes){if(t.isClass(ref)||t.isFunction(ref)){if(ref.id){nodes.push(t.toStatement(ref));ref=ref.id}}return ref};DefaultFormatter.prototype._hoistExport=function(declar,assign,priority){if(t.isFunctionDeclaration(declar)){assign._blockHoist=priority||2}return assign};DefaultFormatter.prototype.getExternalReference=function(node,nodes){var ids=this.ids;var id=node.source.value;if(ids[id]){return ids[id]}else{return this.ids[id]=this._getExternalReference(node,nodes)}};DefaultFormatter.prototype.checkExportIdentifier=function(node){if(t.isIdentifier(node,{name:"__esModule"})){throw this.file.errorWithNode(node,"Illegal export __esModule - this is used internally for CommonJS interop")}};DefaultFormatter.prototype.exportSpecifier=function(specifier,node,nodes){var inherits=false;if(node.specifiers.length===1)inherits=node;if(node.source){var ref=this.getExternalReference(node,nodes);if(t.isExportBatchSpecifier(specifier)){nodes.push(this.buildExportsWildcard(ref,node))}else{if(t.isSpecifierDefault(specifier)&&!this.noInteropRequire){ref=t.callExpression(this.file.addHelper("interop-require"),[ref])}else{ref=t.memberExpression(ref,t.getSpecifierId(specifier))}nodes.push(this.buildExportsAssignment(t.getSpecifierName(specifier),ref,node))}}else{nodes.push(this.buildExportsAssignment(t.getSpecifierName(specifier),specifier.id,node))}};DefaultFormatter.prototype.buildExportsWildcard=function(objectIdentifier){return t.expressionStatement(t.callExpression(this.file.addHelper("defaults"),[t.identifier("exports"),t.callExpression(this.file.addHelper("interop-require-wildcard"),[objectIdentifier])]))};DefaultFormatter.prototype.buildExportsAssignment=function(id,init){this.checkExportIdentifier(id);return util.template("exports-assign",{VALUE:init,KEY:id},true)};DefaultFormatter.prototype.exportDeclaration=function(node,nodes){var declar=node.declaration;var id=declar.id;if(node.default){id=t.identifier("default")}var assign;if(t.isVariableDeclaration(declar)){for(var i=0;i<declar.declarations.length;i++){var decl=declar.declarations[i];decl.init=this.buildExportsAssignment(decl.id,decl.init,node).expression;var newDeclar=t.variableDeclaration(declar.kind,[decl]);if(i===0)t.inherits(newDeclar,declar);nodes.push(newDeclar)}}else{var ref=declar;if(t.isFunctionDeclaration(declar)||t.isClassDeclaration(declar)){ref=declar.id;nodes.push(declar)}assign=this.buildExportsAssignment(id,ref,node);nodes.push(assign);this._hoistExport(declar,assign)}}},{"../../helpers/object":26,"../../types":107,"../../util":110,"lodash/object/extend":263}],41:[function(require,module,exports){"use strict";var util=require("../../util");module.exports=function(Parent){var Constructor=function(){this.noInteropRequire=true;Parent.apply(this,arguments)};util.inherits(Constructor,Parent);return Constructor}},{"../../util":110}],42:[function(require,module,exports){"use strict";module.exports=require("./_strict")(require("./amd"))},{"./_strict":41,"./amd":43}],43:[function(require,module,exports){"use strict";module.exports=AMDFormatter;var DefaultFormatter=require("./_default");var CommonFormatter=require("./common");var util=require("../../util");var t=require("../../types");var contains=require("lodash/collection/contains");var values=require("lodash/object/values");function AMDFormatter(){CommonFormatter.apply(this,arguments)}util.inherits(AMDFormatter,DefaultFormatter);AMDFormatter.prototype.init=CommonFormatter.prototype.init;AMDFormatter.prototype.buildDependencyLiterals=function(){var names=[];for(var name in this.ids){names.push(t.literal(name))}return names};AMDFormatter.prototype.transform=function(ast){var program=ast.program;var body=program.body;var names=[t.literal("exports")];if(this.passModuleArg)names.push(t.literal("module"));names=names.concat(this.buildDependencyLiterals());names=t.arrayExpression(names);var params=values(this.ids);if(this.passModuleArg)params.unshift(t.identifier("module"));params.unshift(t.identifier("exports"));var container=t.functionExpression(null,params,t.blockStatement(body));var defineArgs=[names,container];var moduleName=this.getModuleName();if(moduleName)defineArgs.unshift(t.literal(moduleName));var call=t.callExpression(t.identifier("define"),defineArgs);program.body=[t.expressionStatement(call)]};AMDFormatter.prototype.getModuleName=function(){if(this.file.opts.moduleIds){return DefaultFormatter.prototype.getModuleName.apply(this,arguments)}else{return null}};AMDFormatter.prototype._getExternalReference=function(node){return this.file.generateUidIdentifier(node.source.value)};AMDFormatter.prototype.importDeclaration=function(node){this.getExternalReference(node)};AMDFormatter.prototype.importSpecifier=function(specifier,node,nodes){var key=t.getSpecifierName(specifier);var ref=this.getExternalReference(node);if(contains(this.file.dynamicImported,node)){this.ids[node.source.value]=ref}else if(t.isImportBatchSpecifier(specifier)){}else if(t.isSpecifierDefault(specifier)&&!this.noInteropRequire){ref=t.callExpression(this.file.addHelper("interop-require"),[ref])}else{ref=t.memberExpression(ref,t.getSpecifierId(specifier),false)}nodes.push(t.variableDeclaration("var",[t.variableDeclarator(key,ref)]))};AMDFormatter.prototype.exportDeclaration=function(node){if(this.doDefaultExportInterop(node)){this.passModuleArg=true}CommonFormatter.prototype.exportDeclaration.apply(this,arguments)}},{"../../types":107,"../../util":110,"./_default":40,"./common":45,"lodash/collection/contains":181,"lodash/object/values":268}],44:[function(require,module,exports){"use strict";module.exports=require("./_strict")(require("./common"))},{"./_strict":41,"./common":45}],45:[function(require,module,exports){"use strict";module.exports=CommonJSFormatter;var DefaultFormatter=require("./_default");var contains=require("lodash/collection/contains");var util=require("../../util");var t=require("../../types");function CommonJSFormatter(){DefaultFormatter.apply(this,arguments)}util.inherits(CommonJSFormatter,DefaultFormatter);CommonJSFormatter.prototype.init=function(){if(this.hasNonDefaultExports){this.file.ast.program.body.push(util.template("exports-module-declaration",true))}};CommonJSFormatter.prototype.importSpecifier=function(specifier,node,nodes){var variableName=t.getSpecifierName(specifier);var ref=this.getExternalReference(node,nodes);if(t.isSpecifierDefault(specifier)){if(!contains(this.file.dynamicImported,node)){ref=t.callExpression(this.file.addHelper("interop-require"),[ref])}nodes.push(t.variableDeclaration("var",[t.variableDeclarator(variableName,ref)]))}else{if(specifier.type==="ImportBatchSpecifier"){nodes.push(t.variableDeclaration("var",[t.variableDeclarator(variableName,t.callExpression(this.file.addHelper("interop-require-wildcard"),[ref]))]))}else{nodes.push(t.variableDeclaration("var",[t.variableDeclarator(variableName,t.memberExpression(ref,t.getSpecifierId(specifier)))]))}}};CommonJSFormatter.prototype.importDeclaration=function(node,nodes){nodes.push(util.template("require",{MODULE_NAME:node.source},true))};CommonJSFormatter.prototype.exportDeclaration=function(node,nodes){if(this.doDefaultExportInterop(node)){var declar=node.declaration;var assign=util.template("exports-default-assign",{VALUE:this._pushStatement(declar,nodes)},true);if(t.isFunctionDeclaration(declar)){assign._blockHoist=3}nodes.push(assign);return}DefaultFormatter.prototype.exportDeclaration.apply(this,arguments)};CommonJSFormatter.prototype._getExternalReference=function(node,nodes){var source=node.source.value;var call=t.callExpression(t.identifier("require"),[node.source]);if(this.localImportOccurences[source]>1){var uid=this.file.generateUidIdentifier(source);nodes.push(t.variableDeclaration("var",[t.variableDeclarator(uid,call)]));return uid}else{return call}}},{"../../types":107,"../../util":110,"./_default":40,"lodash/collection/contains":181}],46:[function(require,module,exports){"use strict";module.exports=IgnoreFormatter;var t=require("../../types");function IgnoreFormatter(){}IgnoreFormatter.prototype.exportDeclaration=function(node,nodes){var declar=t.toStatement(node.declaration,true);if(declar)nodes.push(t.inherits(declar,node))};IgnoreFormatter.prototype.importDeclaration=IgnoreFormatter.prototype.importSpecifier=IgnoreFormatter.prototype.exportSpecifier=function(){}},{"../../types":107}],47:[function(require,module,exports){module.exports={commonStrict:require("./common-strict"),amdStrict:require("./amd-strict"),umdStrict:require("./umd-strict"),common:require("./common"),system:require("./system"),ignore:require("./ignore"),amd:require("./amd"),umd:require("./umd")}},{"./amd":43,"./amd-strict":42,"./common":45,"./common-strict":44,"./ignore":46,"./system":48,"./umd":50,"./umd-strict":49}],48:[function(require,module,exports){"use strict";module.exports=SystemFormatter;var DefaultFormatter=require("./_default");var AMDFormatter=require("./amd");var useStrict=require("../helpers/use-strict");var util=require("../../util");var t=require("../../types");var last=require("lodash/array/last");var each=require("lodash/collection/each");var map=require("lodash/collection/map");function SystemFormatter(file){this.exportIdentifier=file.generateUidIdentifier("export");this.noInteropRequire=true;DefaultFormatter.apply(this,arguments)}util.inherits(SystemFormatter,AMDFormatter);SystemFormatter.prototype.init=function(){};SystemFormatter.prototype._addImportSource=function(node,exportNode){node._importSource=exportNode.source&&exportNode.source.value;return node};SystemFormatter.prototype.buildExportsWildcard=function(objectIdentifier,node){var leftIdentifier=this.file.generateUidIdentifier("key");var valIdentifier=t.memberExpression(objectIdentifier,leftIdentifier,true);var left=t.variableDeclaration("var",[t.variableDeclarator(leftIdentifier)]);var right=objectIdentifier;var block=t.blockStatement([t.expressionStatement(this.buildExportCall(leftIdentifier,valIdentifier))]);return this._addImportSource(t.forInStatement(left,right,block),node)};SystemFormatter.prototype.buildExportsAssignment=function(id,init,node){var call=this.buildExportCall(t.literal(id.name),init,true);return this._addImportSource(call,node)};SystemFormatter.prototype.remapExportAssignment=function(node){return this.buildExportCall(t.literal(node.left.name),node)};SystemFormatter.prototype.buildExportCall=function(id,init,isStatement){var call=t.callExpression(this.exportIdentifier,[id,init]);if(isStatement){return t.expressionStatement(call)}else{return call}};SystemFormatter.prototype.importSpecifier=function(specifier,node,nodes){AMDFormatter.prototype.importSpecifier.apply(this,arguments);this._addImportSource(last(nodes),node)};var runnerSettersVisitor={enter:function(node,parent,scope,context,state){if(node._importSource===state.source){if(t.isVariableDeclaration(node)){each(node.declarations,function(declar){state.hoistDeclarators.push(t.variableDeclarator(declar.id));state.nodes.push(t.expressionStatement(t.assignmentExpression("=",declar.id,declar.init)))})}else{state.nodes.push(node)}context.remove()}}};SystemFormatter.prototype.buildRunnerSetters=function(block,hoistDeclarators){var scope=this.file.scope;return t.arrayExpression(map(this.ids,function(uid,source){var state={source:source,nodes:[],hoistDeclarators:hoistDeclarators};scope.traverse(block,runnerSettersVisitor,state);return t.functionExpression(null,[uid],t.blockStatement(state.nodes))}))};var hoistVariablesVisitor={enter:function(node,parent,scope,context,hoistDeclarators){if(t.isFunction(node)){return context.skip()}if(t.isVariableDeclaration(node)){if(node.kind!=="var"&&!t.isProgram(parent)){return}if(node._blockHoist)return;var nodes=[];for(var i=0;i<node.declarations.length;i++){var declar=node.declarations[i];hoistDeclarators.push(t.variableDeclarator(declar.id));if(declar.init){var assign=t.expressionStatement(t.assignmentExpression("=",declar.id,declar.init));nodes.push(assign)}}if(t.isFor(parent)){if(parent.left===node){return node.declarations[0].id}if(parent.init===node){return t.toSequenceExpression(nodes,scope)}}return nodes}}};var hoistFunctionsVisitor={enter:function(node,parent,scope,context,handlerBody){if(t.isFunction(node))context.skip();if(t.isFunctionDeclaration(node)||node._blockHoist){handlerBody.push(node);context.remove()}}};SystemFormatter.prototype.transform=function(ast){var program=ast.program;var hoistDeclarators=[];var moduleName=this.getModuleName();var moduleNameLiteral=t.literal(moduleName);var block=t.blockStatement(program.body);var runner=util.template("system",{MODULE_NAME:moduleNameLiteral,MODULE_DEPENDENCIES:t.arrayExpression(this.buildDependencyLiterals()),EXPORT_IDENTIFIER:this.exportIdentifier,SETTERS:this.buildRunnerSetters(block,hoistDeclarators),EXECUTE:t.functionExpression(null,[],block)},true);var handlerBody=runner.expression.arguments[2].body.body;if(!moduleName)runner.expression.arguments.shift();var returnStatement=handlerBody.pop();this.file.scope.traverse(block,hoistVariablesVisitor,hoistDeclarators);if(hoistDeclarators.length){var hoistDeclar=t.variableDeclaration("var",hoistDeclarators);hoistDeclar._blockHoist=true;handlerBody.unshift(hoistDeclar)}this.file.scope.traverse(block,hoistFunctionsVisitor,handlerBody);handlerBody.push(returnStatement);if(useStrict.has(block)){handlerBody.unshift(block.body.shift())}program.body=[runner]}},{"../../types":107,"../../util":110,"../helpers/use-strict":38,"./_default":40,"./amd":43,"lodash/array/last":178,"lodash/collection/each":182,"lodash/collection/map":186}],49:[function(require,module,exports){"use strict";module.exports=require("./_strict")(require("./umd"))},{"./_strict":41,"./umd":50}],50:[function(require,module,exports){"use strict";module.exports=UMDFormatter;var AMDFormatter=require("./amd");var util=require("../../util");var t=require("../../types");var values=require("lodash/object/values");function UMDFormatter(){AMDFormatter.apply(this,arguments)}util.inherits(UMDFormatter,AMDFormatter);UMDFormatter.prototype.transform=function(ast){var program=ast.program;var body=program.body;var names=[];for(var name in this.ids){names.push(t.literal(name))}var ids=values(this.ids);var args=[t.identifier("exports")];if(this.passModuleArg)args.push(t.identifier("module"));args=args.concat(ids);var factory=t.functionExpression(null,args,t.blockStatement(body));var defineArgs=[t.literal("exports")];if(this.passModuleArg)defineArgs.push(t.literal("module"));defineArgs=defineArgs.concat(names);defineArgs=[t.arrayExpression(defineArgs)];var testExports=util.template("test-exports");var testModule=util.template("test-module");var commonTests=this.passModuleArg?t.logicalExpression("&&",testExports,testModule):testExports;var commonArgs=[t.identifier("exports")];if(this.passModuleArg)commonArgs.push(t.identifier("module"));commonArgs=commonArgs.concat(names.map(function(name){return t.callExpression(t.identifier("require"),[name])}));var moduleName=this.getModuleName();if(moduleName)defineArgs.unshift(t.literal(moduleName));var runner=util.template("umd-runner-body",{AMD_ARGUMENTS:defineArgs,COMMON_TEST:commonTests,COMMON_ARGUMENTS:commonArgs});var call=t.callExpression(runner,[factory]);program.body=[t.expressionStatement(call)]}},{"../../types":107,"../../util":110,"./amd":43,"lodash/object/values":268}],51:[function(require,module,exports){module.exports=TransformerPass;var util=require("../util");var contains=require("lodash/collection/contains");function TransformerPass(file,transformer){this.transformer=transformer;this.shouldRun=!transformer.check;this.handlers=transformer.handlers;this.file=file}TransformerPass.prototype.astRun=function(key){if(!this.shouldRun)return;var handlers=this.handlers;var file=this.file;if(handlers.ast&&handlers.ast[key]){handlers.ast[key](file.ast,file)}};TransformerPass.prototype.canRun=function(){var transformer=this.transformer;var opts=this.file.opts;var key=transformer.key;if(key[0]==="_")return true;var blacklist=opts.blacklist;if(blacklist.length&&contains(blacklist,key))return false;var whitelist=opts.whitelist;if(whitelist.length&&!contains(whitelist,key))return false;if(transformer.optional&&!contains(opts.optional,key))return false;if(transformer.experimental&&!opts.experimental)return false;if(transformer.playground&&!opts.playground)return false;return true};TransformerPass.prototype.checkNode=function(node){var check=this.transformer.check;if(check){return this.shouldRun=check(node)}else{return true}};var transformVisitor={enter:function(node,parent,scope,context,state){var fns=state.handlers[node.type];if(!fns)return;return fns.enter(node,parent,scope,context,state.file,state.pass)},exit:function(node,parent,scope,context,state){var fns=state.handlers[node.type];if(!fns)return;return fns.exit(node,parent,scope,context,state.file,state.pass)}};TransformerPass.prototype.transform=function(){if(!this.shouldRun)return;var file=this.file;util.debug(file.opts.filename+": Running transformer "+this.transformer.key);this.astRun("before");var state={file:file,handlers:this.handlers,pass:this};file.scope.traverse(file.ast,transformVisitor,state);this.astRun("after")}},{"../util":110,"lodash/collection/contains":181}],52:[function(require,module,exports){"use strict";module.exports=Transformer;var TransformerPass=require("./transformer-pass");var isFunction=require("lodash/lang/isFunction");var traverse=require("../traverse");var isObject=require("lodash/lang/isObject");var each=require("lodash/collection/each");function Transformer(key,transformer,opts){this.manipulateOptions=transformer.manipulateOptions;this.check=transformer.check;this.experimental=!!transformer.experimental;this.playground=!!transformer.playground;this.secondPass=!!transformer.secondPass;this.optional=!!transformer.optional;this.handlers=this.normalize(transformer);this.opts=opts||{};this.key=key}Transformer.prototype.normalize=function(transformer){var self=this;if(isFunction(transformer)){transformer={ast:transformer}}traverse.explode(transformer);each(transformer,function(fns,type){if(type[0]==="_"){self[type]=fns;return}if(isFunction(fns))fns={enter:fns};if(!isObject(fns))return;if(!fns.enter)fns.enter=function(){};if(!fns.exit)fns.exit=function(){};transformer[type]=fns});return transformer};Transformer.prototype.buildPass=function(file){return new TransformerPass(file,this)}},{"../traverse":103,"./transformer-pass":51,"lodash/collection/each":182,"lodash/lang/isFunction":252,"lodash/lang/isObject":255}],53:[function(require,module,exports){module.exports={specNoForInOfAssignment:"validation.noForInOfAssignment",specSetters:"validation.setters",specBlockScopedFunctions:"spec.blockScopedFunctions",malletOperator:"playground.malletOperator",methodBinding:"playground.methodBinding",memoizationOperator:"playground.memoizationOperator",objectGetterMemoization:"playground.objectGetterMemoization",modules:"es6.modules",propertyNameShorthand:"es6.properties.shorthand",arrayComprehension:"es7.comprehensions",generatorComprehension:"es7.comprehensions",arrowFunctions:"es6.arrowFunctions",classes:"es6.classes",objectSpread:"es7.objectRestSpread","es7.objectSpread":"es7.objectRestSpread",exponentiationOperator:"es7.exponentiationOperator",spread:"es6.spread",templateLiterals:"es6.templateLiterals",propertyMethodAssignment:"es6.properties.shorthand",computedPropertyNames:"es6.properties.computed",defaultParameters:"es6.parameters.default",restParameters:"es6.parameters.rest",destructuring:"es6.destructuring",forOf:"es6.forOf",unicodeRegex:"es6.unicodeRegex",abstractReferences:"es7.abstractReferences",constants:"es6.constants",letScoping:"es6.letScoping",blockScopingTDZ:"es6.blockScopingTDZ",generators:"regenerator",protoToAssign:"spec.protoToAssign",typeofSymbol:"spec.typeofSymbol",coreAliasing:"selfContained",undefinedToVoid:"spec.undefinedToVoid",undeclaredVariableCheck:"validation.undeclaredVariableCheck",specPropertyLiterals:"minification.propertyLiterals",specMemberExpressionLiterals:"minification.memberExpressionLiterals"}},{}],54:[function(require,module,exports){"use strict";var defineMap=require("../../helpers/define-map");var t=require("../../../types");exports.check=function(node){return t.isProperty(node)&&(node.kind==="get"||node.kind==="set")};exports.ObjectExpression=function(node){var mutatorMap={};var hasAny=false;node.properties=node.properties.filter(function(prop){if(prop.kind==="get"||prop.kind==="set"){hasAny=true;defineMap.push(mutatorMap,prop.key,prop.kind,prop.computed,prop.value);return false}else{return true}});if(!hasAny)return;return t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("defineProperties")),[node,defineMap.build(mutatorMap)])}},{"../../../types":107,"../../helpers/define-map":32}],55:[function(require,module,exports){"use strict";var t=require("../../../types");exports.check=t.isArrowFunctionExpression;exports.ArrowFunctionExpression=function(node){t.ensureBlock(node);node._aliasFunction="arrow";node.expression=false;node.type="FunctionExpression";return node}},{"../../../types":107}],56:[function(require,module,exports){"use strict";var t=require("../../../types");var visitor={enter:function(node,parent,scope,context,state){if(!t.isReferencedIdentifier(node,parent))return;var declared=state.letRefs[node.name];if(!declared)return;if(scope.getBinding(node.name)!==declared)return;var declaredLoc=declared.loc;var referenceLoc=node.loc;if(!declaredLoc||!referenceLoc)return;var before=referenceLoc.start.line<declaredLoc.start.line;if(referenceLoc.start.line===declaredLoc.start.line){before=referenceLoc.start.col<declaredLoc.start.col}if(before){throw state.file.errorWithNode(node,"Temporal dead zone - accessing a variable before it's initialized")}}};exports.optional=true;exports.Loop=exports.Program=exports.BlockStatement=function(node,parent,scope,context,file){var letRefs=node._letReferences;if(!letRefs)return;var state={letRefs:letRefs,file:file};scope.traverse(node,visitor,state)}},{"../../../types":107}],57:[function(require,module,exports){"use strict";var traverse=require("../../../traverse");var object=require("../../../helpers/object");var util=require("../../../util");var t=require("../../../types");var values=require("lodash/object/values");var extend=require("lodash/object/extend");exports.check=function(node){return t.isVariableDeclaration(node)&&(node.kind==="let"||node.kind==="const")};var isLet=function(node,parent){if(!t.isVariableDeclaration(node))return false;if(node._let)return true;if(node.kind!=="let")return false;if(!t.isFor(parent)||t.isFor(parent)&&parent.left!==node){for(var i=0;i<node.declarations.length;i++){var declar=node.declarations[i];declar.init=declar.init||t.identifier("undefined")}}node._let=true;node.kind="var";return true};var isVar=function(node,parent){return t.isVariableDeclaration(node,{kind:"var"})&&!isLet(node,parent)};var standardizeLets=function(declars){for(var i=0;i<declars.length;i++){delete declars[i]._let}};exports.VariableDeclaration=function(node,parent){isLet(node,parent)};exports.Loop=function(node,parent,scope,context,file){var init=node.left||node.init;if(isLet(init,node)){t.ensureBlock(node);node.body._letDeclarators=[init]}var blockScoping=new BlockScoping(node,node.body,parent,scope,file);blockScoping.run()};exports.Program=exports.BlockStatement=function(block,parent,scope,context,file){if(!t.isLoop(parent)){var blockScoping=new BlockScoping(false,block,parent,scope,file);blockScoping.run()}};function BlockScoping(loopParent,block,parent,scope,file){this.loopParent=loopParent;this.parent=parent;this.scope=scope;this.block=block;this.file=file;this.outsideLetReferences=object();this.hasLetReferences=false;this.letReferences=block._letReferences=object();this.body=[]}BlockScoping.prototype.run=function(){var block=this.block;if(block._letDone)return;block._letDone=true;var needsClosure=this.getLetReferences();if(t.isFunction(this.parent)||t.isProgram(this.block))return;if(!this.hasLetReferences)return;if(needsClosure){this.needsClosure()}else{this.remap()}};function replace(node,parent,scope,context,remaps){if(!t.isReferencedIdentifier(node,parent))return;var remap=remaps[node.name];if(!remap)return;var ownBinding=scope.getBinding(node.name);if(ownBinding===remap.binding){node.name=remap.uid}else{if(context)context.skip()}}var replaceVisitor={enter:replace};function traverseReplace(node,parent,scope,remaps){replace(node,parent,scope,null,remaps);scope.traverse(node,replaceVisitor,remaps)}BlockScoping.prototype.remap=function(){var hasRemaps=false;var letRefs=this.letReferences;var scope=this.scope;var remaps=object();for(var key in letRefs){var ref=letRefs[key];if(scope.parentHasReference(key)){var uid=scope.generateUidIdentifier(ref.name).name;ref.name=uid;hasRemaps=true;remaps[key]=remaps[uid]={binding:ref,uid:uid}}}if(!hasRemaps)return;var loopParent=this.loopParent;if(loopParent){traverseReplace(loopParent.right,loopParent,scope,remaps);traverseReplace(loopParent.test,loopParent,scope,remaps);traverseReplace(loopParent.update,loopParent,scope,remaps)}scope.traverse(this.block,replaceVisitor,remaps)};BlockScoping.prototype.needsClosure=function(){var block=this.block;this.has=this.checkLoop();this.hoistVarDeclarations();var params=values(this.outsideLetReferences);var fn=t.functionExpression(null,params,t.blockStatement(block.body));fn._aliasFunction=true;block.body=this.body;var call=t.callExpression(fn,params);var ret=this.scope.generateUidIdentifier("ret");var hasYield=traverse.hasType(fn.body,this.scope,"YieldExpression",t.FUNCTION_TYPES);if(hasYield){fn.generator=true;call=t.yieldExpression(call,true)}var hasAsync=traverse.hasType(fn.body,this.scope,"AwaitExpression",t.FUNCTION_TYPES);if(hasAsync){fn.async=true;call=t.awaitExpression(call,true)}this.build(ret,call)};var letReferenceFunctionVisitor={enter:function(node,parent,scope,context,state){if(!t.isReferencedIdentifier(node,parent))return;if(scope.hasOwnBinding(node.name))return;if(!state.letReferences[node.name])return;state.closurify=true}};var letReferenceBlockVisitor={enter:function(node,parent,scope,context,state){if(t.isFunction(node)){scope.traverse(node,letReferenceFunctionVisitor,state);return context.skip()}}};BlockScoping.prototype.getLetReferences=function(){var block=this.block;var declarators=block._letDeclarators||[];var declar;for(var i=0;i<declarators.length;i++){declar=declarators[i];extend(this.outsideLetReferences,t.getBindingIdentifiers(declar))}if(block.body){for(i=0;i<block.body.length;i++){declar=block.body[i];if(isLet(declar,block)){declarators=declarators.concat(declar.declarations)}}}for(i=0;i<declarators.length;i++){declar=declarators[i];var keys=t.getBindingIdentifiers(declar);extend(this.letReferences,keys);this.hasLetReferences=true}if(!this.hasLetReferences)return;standardizeLets(declarators);var state={letReferences:this.letReferences,closurify:false};this.scope.traverse(this.block,letReferenceBlockVisitor,state);return state.closurify};var loopNodeTo=function(node){if(t.isBreakStatement(node)){return"break"}else if(t.isContinueStatement(node)){return"continue"}};var loopVisitor={enter:function(node,parent,scope,context,state){var replace;if(t.isLoop(node)){state.ignoreLabeless=true;scope.traverse(node,loopVisitor,state);state.ignoreLabeless=false}if(t.isFunction(node)||t.isLoop(node)){return context.skip()}var loopText=loopNodeTo(node);if(loopText){if(node.label){if(state.innerLabels.indexOf(node.label.name)>=0){return}loopText=loopText+"|"+node.label.name}else{if(state.ignoreLabeless)return;if(t.isBreakStatement(node)&&t.isSwitchCase(parent))return}state.hasBreakContinue=true;state.map[loopText]=node;replace=t.literal(loopText)}if(t.isReturnStatement(node)){state.hasReturn=true;replace=t.objectExpression([t.property("init",t.identifier("v"),node.argument||t.identifier("undefined"))])}if(replace){replace=t.returnStatement(replace);return t.inherits(replace,node)}}};var loopLabelVisitor={enter:function(node,parent,scope,context,state){if(t.isLabeledStatement(node)){state.innerLabels.push(node.label.name) }}};BlockScoping.prototype.checkLoop=function(){var state={hasBreakContinue:false,ignoreLabeless:false,innerLabels:[],hasReturn:false,isLoop:!!this.loopParent,map:{}};this.scope.traverse(this.block,loopLabelVisitor,state);this.scope.traverse(this.block,loopVisitor,state);return state};var hoistVarDeclarationsVisitor={enter:function(node,parent,scope,context,self){if(t.isForStatement(node)){if(isVar(node.init,node)){node.init=t.sequenceExpression(self.pushDeclar(node.init))}}else if(t.isFor(node)){if(isVar(node.left,node)){node.left=node.left.declarations[0].id}}else if(isVar(node,parent)){return self.pushDeclar(node).map(t.expressionStatement)}else if(t.isFunction(node)){return context.skip()}}};BlockScoping.prototype.hoistVarDeclarations=function(){traverse(this.block,hoistVarDeclarationsVisitor,this.scope,this)};BlockScoping.prototype.pushDeclar=function(node){this.body.push(t.variableDeclaration(node.kind,node.declarations.map(function(declar){return t.variableDeclarator(declar.id)})));var replace=[];for(var i=0;i<node.declarations.length;i++){var declar=node.declarations[i];if(!declar.init)continue;var expr=t.assignmentExpression("=",declar.id,declar.init);replace.push(t.inherits(expr,declar))}return replace};BlockScoping.prototype.build=function(ret,call){var has=this.has;if(has.hasReturn||has.hasBreakContinue){this.buildHas(ret,call)}else{this.body.push(t.expressionStatement(call))}};BlockScoping.prototype.buildHas=function(ret,call){var body=this.body;body.push(t.variableDeclaration("var",[t.variableDeclarator(ret,call)]));var loopParent=this.loopParent;var retCheck;var has=this.has;var cases=[];if(has.hasReturn){retCheck=util.template("let-scoping-return",{RETURN:ret})}if(has.hasBreakContinue){if(!loopParent){throw new Error("Has no loop parent but we're trying to reassign breaks "+"and continues, something is going wrong here.")}for(var key in has.map){cases.push(t.switchCase(t.literal(key),[has.map[key]]))}if(has.hasReturn){cases.push(t.switchCase(null,[retCheck]))}if(cases.length===1){var single=cases[0];body.push(t.ifStatement(t.binaryExpression("===",ret,single.test),single.consequent[0]))}else{body.push(t.switchStatement(ret,cases))}}else{if(has.hasReturn)body.push(retCheck)}}},{"../../../helpers/object":26,"../../../traverse":103,"../../../types":107,"../../../util":110,"lodash/object/extend":263,"lodash/object/values":268}],58:[function(require,module,exports){"use strict";var ReplaceSupers=require("../../helpers/replace-supers");var nameMethod=require("../../helpers/name-method");var defineMap=require("../../helpers/define-map");var util=require("../../../util");var t=require("../../../types");exports.check=t.isClass;exports.ClassDeclaration=function(node,parent,scope,context,file){return new Class(node,file,scope,true).run()};exports.ClassExpression=function(node,parent,scope,context,file){if(!node.id){if(t.isProperty(parent)&&parent.value===node&&!parent.computed&&t.isIdentifier(parent.key)){node.id=parent.key}if(t.isVariableDeclarator(parent)&&t.isIdentifier(parent.id)){node.id=parent.id}}return new Class(node,file,scope,false).run()};function Class(node,file,scope,isStatement){this.isStatement=isStatement;this.scope=scope;this.node=node;this.file=file;this.hasInstanceMutators=false;this.hasStaticMutators=false;this.instanceMutatorMap={};this.staticMutatorMap={};this.hasConstructor=false;this.className=node.id||scope.generateUidIdentifier("class");this.superName=node.superClass||t.identifier("Function");this.hasSuper=!!node.superClass;this.isLoose=file.isLoose("es6.classes")}Class.prototype.run=function(){var superName=this.superName;var className=this.className;var file=this.file;var body=this.body=[];var constructorBody=t.blockStatement([t.expressionStatement(t.callExpression(file.addHelper("class-call-check"),[t.thisExpression(),className]))]);var constructor;if(this.node.id){constructor=t.functionDeclaration(className,[],constructorBody);body.push(constructor)}else{constructor=t.functionExpression(null,[],constructorBody);body.push(t.variableDeclaration("var",[t.variableDeclarator(className,constructor)]))}this.constructor=constructor;var closureParams=[];var closureArgs=[];if(this.hasSuper){closureArgs.push(superName);if(!t.isIdentifier(superName)){var superRef=this.scope.generateUidBasedOnNode(superName,this.file);superName=superRef}closureParams.push(superName);this.superName=superName;body.push(t.expressionStatement(t.callExpression(file.addHelper("inherits"),[className,superName])))}this.buildBody();t.inheritsComments(body[0],this.node);var init;if(body.length===1){init=t.toExpression(constructor)}else{body.push(t.returnStatement(className));init=t.callExpression(t.functionExpression(null,closureParams,t.blockStatement(body)),closureArgs)}if(this.isStatement){return t.variableDeclaration("let",[t.variableDeclarator(className,init)])}else{return init}};Class.prototype.buildBody=function(){var constructor=this.constructor;var className=this.className;var superName=this.superName;var classBody=this.node.body.body;var body=this.body;for(var i=0;i<classBody.length;i++){var node=classBody[i];if(t.isMethodDefinition(node)){var replaceSupers=new ReplaceSupers({methodNode:node,className:this.className,superName:this.superName,isLoose:this.isLoose,scope:this.scope,file:this.file});replaceSupers.replace();if(node.key.name==="constructor"){this.pushConstructor(node)}else{this.pushMethod(node)}}else if(t.isPrivateDeclaration(node)){this.closure=true;body.unshift(node)}}if(!this.hasConstructor&&this.hasSuper&&!t.isFalsyExpression(superName)){var helperName="class-super-constructor-call";if(this.isLoose)helperName+="-loose";constructor.body.body.push(util.template(helperName,{CLASS_NAME:className,SUPER_NAME:this.superName},true))}var instanceProps;var staticProps;if(this.hasInstanceMutators){instanceProps=defineMap.build(this.instanceMutatorMap)}if(this.hasStaticMutators){staticProps=defineMap.build(this.staticMutatorMap)}if(instanceProps||staticProps){staticProps=staticProps||t.literal(null);var args=[className,staticProps];if(instanceProps)args.push(instanceProps);body.push(t.expressionStatement(t.callExpression(this.file.addHelper("prototype-properties"),args)))}};Class.prototype.pushMethod=function(node){var methodName=node.key;var kind=node.kind;if(kind===""){nameMethod.property(node,this.file,this.scope);if(this.isLoose){var className=this.className;if(!node.static)className=t.memberExpression(className,t.identifier("prototype"));methodName=t.memberExpression(className,methodName,node.computed);var expr=t.expressionStatement(t.assignmentExpression("=",methodName,node.value));t.inheritsComments(expr,node);this.body.push(expr);return}kind="value"}var mutatorMap=this.instanceMutatorMap;if(node.static){this.hasStaticMutators=true;mutatorMap=this.staticMutatorMap}else{this.hasInstanceMutators=true}defineMap.push(mutatorMap,methodName,kind,node.computed,node);defineMap.push(mutatorMap,methodName,"enumerable",node.computed,false)};Class.prototype.pushConstructor=function(method){if(method.kind){throw this.file.errorWithNode(method,"illegal kind for constructor method")}var construct=this.constructor;var fn=method.value;this.hasConstructor=true;t.inherits(construct,fn);t.inheritsComments(construct,method);construct._ignoreUserWhitespace=true;construct.params=fn.params;construct.body.body=construct.body.body.concat(fn.body.body)}},{"../../../types":107,"../../../util":110,"../../helpers/define-map":32,"../../helpers/name-method":34,"../../helpers/replace-supers":37}],59:[function(require,module,exports){"use strict";var t=require("../../../types");exports.check=function(node){return t.isVariableDeclaration(node,{kind:"const"})};var visitor={enter:function(node,parent,scope,context,state){if(t.isAssignmentExpression(node)||t.isUpdateExpression(node)){var ids=t.getBindingIdentifiers(node);for(var key in ids){var id=ids[key];var constant=state.constants[key];if(!constant)continue;if(id===constant)continue;var localBinding=scope.getBinding(key);if(localBinding!==constant)continue;throw state.file.errorWithNode(id,key+" is read-only")}}else if(t.isScope(node)){context.skip()}}};exports.Scope=function(node,parent,scope,context,file){scope.traverse(node,visitor,{constants:scope.getAllDeclarationsOfKind("const"),file:file})};exports.VariableDeclaration=function(node){if(node.kind==="const")node.kind="let"}},{"../../../types":107}],60:[function(require,module,exports){"use strict";var t=require("../../../types");exports.check=t.isPattern;function Destructuring(opts){this.blockHoist=opts.blockHoist;this.operator=opts.operator;this.nodes=opts.nodes;this.scope=opts.scope;this.file=opts.file;this.kind=opts.kind}Destructuring.prototype.buildVariableAssignment=function(id,init){var op=this.operator;if(t.isMemberExpression(id))op="=";var node;if(op){node=t.expressionStatement(t.assignmentExpression(op,id,init))}else{node=t.variableDeclaration(this.kind,[t.variableDeclarator(id,init)])}node._blockHoist=this.blockHoist;return node};Destructuring.prototype.buildVariableDeclaration=function(id,init){var declar=t.variableDeclaration("var",[t.variableDeclarator(id,init)]);declar._blockHoist=this.blockHoist;return declar};Destructuring.prototype.push=function(elem,parentId){if(t.isObjectPattern(elem)){this.pushObjectPattern(elem,parentId)}else if(t.isArrayPattern(elem)){this.pushArrayPattern(elem,parentId)}else if(t.isAssignmentPattern(elem)){this.pushAssignmentPattern(elem,parentId)}else{this.nodes.push(this.buildVariableAssignment(elem,parentId))}};Destructuring.prototype.pushAssignmentPattern=function(pattern,parentId){var tempParentId=this.scope.generateUidBasedOnNode(parentId);var declar=t.variableDeclaration("var",[t.variableDeclarator(tempParentId,parentId)]);declar._blockHoist=this.blockHoist;this.nodes.push(declar);this.nodes.push(this.buildVariableAssignment(pattern.left,t.conditionalExpression(t.binaryExpression("===",tempParentId,t.identifier("undefined")),pattern.right,tempParentId)))};Destructuring.prototype.pushObjectSpread=function(pattern,parentId,prop,i){var keys=[];for(var i2=0;i2<pattern.properties.length;i2++){var prop2=pattern.properties[i2];if(i2>=i)break;if(t.isSpreadProperty(prop2))continue;var key=prop2.key;if(t.isIdentifier(key)){key=t.literal(prop2.key.name)}keys.push(key)}keys=t.arrayExpression(keys);var value=t.callExpression(this.file.addHelper("object-without-properties"),[parentId,keys]);this.nodes.push(this.buildVariableAssignment(prop.argument,value))};Destructuring.prototype.pushObjectProperty=function(prop,parentId){if(t.isLiteral(prop.key))prop.computed=true;var pattern2=prop.value;var patternId2=t.memberExpression(parentId,prop.key,prop.computed);if(t.isPattern(pattern2)){this.push(pattern2,patternId2)}else{this.nodes.push(this.buildVariableAssignment(pattern2,patternId2))}};Destructuring.prototype.pushObjectPattern=function(pattern,parentId){if(!pattern.properties.length){this.nodes.push(t.expressionStatement(t.callExpression(this.file.addHelper("object-destructuring-empty"),[parentId])))}for(var i=0;i<pattern.properties.length;i++){var prop=pattern.properties[i];if(t.isSpreadProperty(prop)){this.pushObjectSpread(pattern,parentId,prop,i)}else{this.pushObjectProperty(prop,parentId)}}};var hasRest=function(pattern){for(var i=0;i<pattern.elements.length;i++){if(t.isRestElement(pattern.elements[i])){return true}}return false};Destructuring.prototype.pushArrayPattern=function(pattern,parentId){if(!pattern.elements)return;var count=!hasRest(pattern)&&pattern.elements.length;var toArray=this.file.toArray(parentId,count);var _parentId=this.scope.generateUidBasedOnNode(parentId,this.file);this.nodes.push(this.buildVariableDeclaration(_parentId,toArray));parentId=_parentId;for(var i=0;i<pattern.elements.length;i++){var elem=pattern.elements[i];if(!elem)continue;var newPatternId;if(t.isRestElement(elem)){newPatternId=this.file.toArray(parentId);if(i>0){newPatternId=t.callExpression(t.memberExpression(newPatternId,t.identifier("slice")),[t.literal(i)])}elem=elem.argument}else{newPatternId=t.memberExpression(parentId,t.literal(i),true)}this.push(elem,newPatternId)}};Destructuring.prototype.init=function(pattern,parentId){if(!t.isArrayExpression(parentId)&&!t.isMemberExpression(parentId)&&!t.isIdentifier(parentId)){var key=this.scope.generateUidBasedOnNode(parentId);this.nodes.push(this.buildVariableDeclaration(key,parentId));parentId=key}this.push(pattern,parentId)};exports.ForInStatement=exports.ForOfStatement=function(node,parent,scope,context,file){var declar=node.left;if(!t.isVariableDeclaration(declar))return;var pattern=declar.declarations[0].id;if(!t.isPattern(pattern))return;var key=scope.generateUidIdentifier("ref");node.left=t.variableDeclaration(declar.kind,[t.variableDeclarator(key,null)]);var nodes=[];var destructuring=new Destructuring({kind:declar.kind,file:file,scope:scope,nodes:nodes});destructuring.init(pattern,key);t.ensureBlock(node);var block=node.body;block.body=nodes.concat(block.body)};exports.Function=function(node,parent,scope,context,file){var nodes=[];var hasDestructuring=false;node.params=node.params.map(function(pattern,i){if(!t.isPattern(pattern))return pattern;hasDestructuring=true;var parentId=scope.generateUidIdentifier("ref");var destructuring=new Destructuring({blockHoist:node.params.length-i,nodes:nodes,scope:scope,file:file,kind:"var"});destructuring.init(pattern,parentId);return parentId});if(!hasDestructuring)return;t.ensureBlock(node);var block=node.body;block.body=nodes.concat(block.body)};exports.CatchClause=function(node,parent,scope,context,file){var pattern=node.param;if(!t.isPattern(pattern))return;var ref=scope.generateUidIdentifier("ref");node.param=ref;var nodes=[];var destructuring=new Destructuring({kind:"var",file:file,scope:scope,nodes:nodes});destructuring.init(pattern,ref);node.body.body=nodes.concat(node.body.body)};exports.ExpressionStatement=function(node,parent,scope,context,file){var expr=node.expression;if(expr.type!=="AssignmentExpression")return;if(!t.isPattern(expr.left))return;if(file.isConsequenceExpressionStatement(node))return;var nodes=[];var ref=scope.generateUidIdentifier("ref");nodes.push(t.variableDeclaration("var",[t.variableDeclarator(ref,expr.right)]));var destructuring=new Destructuring({operator:expr.operator,file:file,scope:scope,nodes:nodes});destructuring.init(expr.left,ref);return nodes};exports.AssignmentExpression=function(node,parent,scope,context,file){if(!t.isPattern(node.left))return;var ref=scope.generateUidIdentifier("temp");scope.push({key:ref.name,id:ref});var nodes=[];nodes.push(t.assignmentExpression("=",ref,node.right));var destructuring=new Destructuring({operator:node.operator,file:file,scope:scope,nodes:nodes});destructuring.init(node.left,ref);nodes.push(ref);return t.toSequenceExpression(nodes,scope)};var variableDeclarationhasPattern=function(node){for(var i=0;i<node.declarations.length;i++){if(t.isPattern(node.declarations[i].id)){return true}}return false};exports.VariableDeclaration=function(node,parent,scope,context,file){if(t.isForInStatement(parent)||t.isForOfStatement(parent))return;if(!variableDeclarationhasPattern(node))return;var nodes=[];var declar;for(var i=0;i<node.declarations.length;i++){declar=node.declarations[i];var patternId=declar.init;var pattern=declar.id;var destructuring=new Destructuring({nodes:nodes,scope:scope,kind:node.kind,file:file});if(t.isPattern(pattern)&&patternId){destructuring.init(pattern,patternId);if(+i!==node.declarations.length-1){t.inherits(nodes[nodes.length-1],declar)}}else{nodes.push(t.inherits(destructuring.buildVariableAssignment(declar.id,declar.init),declar))}}if(!t.isProgram(parent)&&!t.isBlockStatement(parent)){declar=null;for(i=0;i<nodes.length;i++){node=nodes[i];declar=declar||t.variableDeclaration(node.kind,[]);if(!t.isVariableDeclaration(node)&&declar.kind!==node.kind){throw file.errorWithNode(node,"Cannot use this node within the current parent")}declar.declarations=declar.declarations.concat(node.declarations)}return declar}return nodes}},{"../../../types":107}],61:[function(require,module,exports){"use strict";var util=require("../../../util");var t=require("../../../types");exports.check=t.isForOfStatement;exports.ForOfStatement=function(node,parent,scope,context,file){var callback=spec;if(file.isLoose("es6.forOf"))callback=loose;var build=callback(node,parent,scope,context,file);var declar=build.declar;var loop=build.loop;var block=loop.body;t.inheritsComments(loop,node);t.ensureBlock(node);if(declar){block.body.push(declar)}block.body=block.body.concat(node.body.body);loop._scopeInfo=node._scopeInfo;return loop};var loose=function(node,parent,scope,context,file){var left=node.left;var declar,id;if(t.isIdentifier(left)||t.isPattern(left)){id=left}else if(t.isVariableDeclaration(left)){id=scope.generateUidIdentifier("ref");declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,id)])}else{throw file.errorWithNode(left,"Unknown node type "+left.type+" in ForOfStatement")}var loop=util.template("for-of-loose",{LOOP_OBJECT:scope.generateUidIdentifier("iterator"),IS_ARRAY:scope.generateUidIdentifier("isArray"),OBJECT:node.right,INDEX:scope.generateUidIdentifier("i"),ID:id});if(!declar){loop.body.body.shift()}return{declar:declar,loop:loop}};var spec=function(node,parent,scope,context,file){var left=node.left;var declar;var stepKey=scope.generateUidIdentifier("step");var stepValue=t.memberExpression(stepKey,t.identifier("value"));if(t.isIdentifier(left)||t.isPattern(left)){declar=t.expressionStatement(t.assignmentExpression("=",left,stepValue))}else if(t.isVariableDeclaration(left)){declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,stepValue)])}else{throw file.errorWithNode(left,"Unknown node type "+left.type+" in ForOfStatement")}var loop=util.template("for-of",{ITERATOR_KEY:scope.generateUidIdentifier("iterator"),STEP_KEY:stepKey,OBJECT:node.right});return{declar:declar,loop:loop}}},{"../../../types":107,"../../../util":110}],62:[function(require,module,exports){"use strict";var t=require("../../../types");exports.check=require("../internal/modules").check;exports.ImportDeclaration=function(node,parent,scope,context,file){var nodes=[];if(node.specifiers.length){for(var i=0;i<node.specifiers.length;i++){file.moduleFormatter.importSpecifier(node.specifiers[i],node,nodes,parent)}}else{file.moduleFormatter.importDeclaration(node,nodes,parent)}if(nodes.length===1){nodes[0]._blockHoist=node._blockHoist}return nodes};exports.ExportDeclaration=function(node,parent,scope,context,file){var nodes=[];var i;if(node.declaration){if(t.isVariableDeclaration(node.declaration)){var declar=node.declaration.declarations[0];declar.init=declar.init||t.identifier("undefined")}file.moduleFormatter.exportDeclaration(node,nodes,parent)}else if(node.specifiers){for(i=0;i<node.specifiers.length;i++){file.moduleFormatter.exportSpecifier(node.specifiers[i],node,nodes,parent)}}if(node._blockHoist){for(i=0;i<nodes.length;i++){nodes[i]._blockHoist=node._blockHoist}}return nodes}},{"../../../types":107,"../internal/modules":79}],63:[function(require,module,exports){"use strict";var util=require("../../../util");var t=require("../../../types");exports.check=function(node){return t.isFunction(node)&&hasDefaults(node)};var hasDefaults=function(node){for(var i=0;i<node.params.length;i++){if(t.isAssignmentPattern(node.params[i]))return true}return false};var iifeVisitor={enter:function(node,parent,scope,context,state){if(t.isReferencedIdentifier(node,parent)&&state.scope.hasOwnReference(node.name)){state.iife=true;context.stop()}}};exports.Function=function(node,parent,scope){if(!hasDefaults(node))return;t.ensureBlock(node);var body=[];var argsIdentifier=t.identifier("arguments");argsIdentifier._ignoreAliasFunctions=true;var lastNonDefaultParam=0;var state={iife:false,scope:scope};for(var i=0;i<node.params.length;i++){var param=node.params[i];if(!t.isAssignmentPattern(param)){lastNonDefaultParam=+i+1;continue}var left=param.left;var right=param.right;node.params[i]=scope.generateUidIdentifier("x");if(!state.iife){if(t.isIdentifier(right)&&scope.hasOwnReference(right.name)){state.iife=true}else{scope.traverse(right,iifeVisitor,state)}}var defNode=util.template("default-parameter",{VARIABLE_NAME:left,DEFAULT_VALUE:right,ARGUMENT_KEY:t.literal(+i),ARGUMENTS:argsIdentifier},true);defNode._blockHoist=node.params.length-i;body.push(defNode)}node.params=node.params.slice(0,lastNonDefaultParam);if(state.iife){var container=t.functionExpression(null,[],node.body,node.generator);container._aliasFunction=true;body.push(t.returnStatement(t.callExpression(container,[])));node.body=t.blockStatement(body)}else{node.body.body=body.concat(node.body.body)}}},{"../../../types":107,"../../../util":110}],64:[function(require,module,exports){"use strict";var util=require("../../../util");var t=require("../../../types");exports.check=t.isRestElement;var hasRest=function(node){return t.isRestElement(node.params[node.params.length-1])};exports.Function=function(node,parent,scope){if(!hasRest(node))return;var rest=node.params.pop().argument;var argsId=t.identifier("arguments");argsId._ignoreAliasFunctions=true;var start=t.literal(node.params.length);var key=scope.generateUidIdentifier("key");var len=scope.generateUidIdentifier("len");var arrKey=key;var arrLen=len;if(node.params.length){arrKey=t.binaryExpression("-",key,start);arrLen=t.conditionalExpression(t.binaryExpression(">",len,start),t.binaryExpression("-",len,start),t.literal(0))}if(t.isPattern(rest)){var pattern=rest;rest=scope.generateUidIdentifier("ref");var restDeclar=t.variableDeclaration("var",[t.variableDeclarator(pattern,rest)]);restDeclar._blockHoist=node.params.length+1;node.body.body.unshift(restDeclar)}var loop=util.template("rest",{ARGUMENTS:argsId,ARRAY_KEY:arrKey,ARRAY_LEN:arrLen,START:start,ARRAY:rest,KEY:key,LEN:len});loop._blockHoist=node.params.length+1;node.body.body.unshift(loop)}},{"../../../types":107,"../../../util":110}],65:[function(require,module,exports){"use strict";var t=require("../../../types");exports.check=function(node){return t.isProperty(node)&&node.computed};exports.ObjectExpression=function(node,parent,scope,context,file){var hasComputed=false;for(var i=0;i<node.properties.length;i++){hasComputed=t.isProperty(node.properties[i],{computed:true,kind:"init"});if(hasComputed)break}if(!hasComputed)return;var initProps=[];var objId=scope.generateUidBasedOnNode(parent);var body=[];var container=t.functionExpression(null,[],t.blockStatement(body));container._aliasFunction=true;var callback=spec;if(file.isLoose("es6.properties.computed"))callback=loose;var result=callback(node,body,objId,initProps,file);if(result)return result;body.unshift(t.variableDeclaration("var",[t.variableDeclarator(objId,t.objectExpression(initProps))]));body.push(t.returnStatement(objId));return t.callExpression(container,[])};var loose=function(node,body,objId){for(var i=0;i<node.properties.length;i++){var prop=node.properties[i];body.push(t.expressionStatement(t.assignmentExpression("=",t.memberExpression(objId,prop.key,prop.computed),prop.value)))}};var spec=function(node,body,objId,initProps,file){var props=node.properties;var prop,key;for(var i=0;i<props.length;i++){prop=props[i];if(prop.kind!=="init")continue;key=prop.key;if(!prop.computed&&t.isIdentifier(key)){prop.key=t.literal(key.name)}}var broken=false;for(i=0;i<props.length;i++){prop=props[i];if(prop.computed){broken=true}if(prop.kind!=="init"||!broken||t.isLiteral(t.toComputedKey(prop,prop.key),{value:"__proto__"})){initProps.push(prop);props[i]=null}}for(i=0;i<props.length;i++){prop=props[i];if(!prop)continue;key=prop.key;var bodyNode;if(prop.computed&&t.isMemberExpression(key)&&t.isIdentifier(key.object,{name:"Symbol"})){bodyNode=t.assignmentExpression("=",t.memberExpression(objId,key,true),prop.value)}else{bodyNode=t.callExpression(file.addHelper("define-property"),[objId,key,prop.value])}body.push(t.expressionStatement(bodyNode))}if(body.length===1){var first=body[0].expression;if(t.isCallExpression(first)){first.arguments[0]=t.objectExpression(initProps);return first}}}},{"../../../types":107}],66:[function(require,module,exports){"use strict";var nameMethod=require("../../helpers/name-method");var t=require("../../../types");var clone=require("lodash/lang/clone");exports.check=function(node){return t.isProperty(node)&&(node.method||node.shorthand)};exports.Property=function(node,parent,scope,context,file){if(node.method){node.method=false;nameMethod.property(node,file,scope)}if(node.shorthand){node.shorthand=false;node.key=t.removeComments(clone(node.key))}}},{"../../../types":107,"../../helpers/name-method":34,"lodash/lang/clone":246}],67:[function(require,module,exports){"use strict";var contains=require("lodash/collection/contains");var t=require("../../../types");exports.check=t.isSpreadElement;var getSpreadLiteral=function(spread,file){return file.toArray(spread.argument)};var hasSpread=function(nodes){for(var i=0;i<nodes.length;i++){if(t.isSpreadElement(nodes[i])){return true}}return false};var build=function(props,file){var nodes=[];var _props=[];var push=function(){if(!_props.length)return;nodes.push(t.arrayExpression(_props));_props=[]};for(var i=0;i<props.length;i++){var prop=props[i];if(t.isSpreadElement(prop)){push();nodes.push(getSpreadLiteral(prop,file))}else{_props.push(prop)}}push();return nodes};exports.ArrayExpression=function(node,parent,scope,context,file){var elements=node.elements;if(!hasSpread(elements))return;var nodes=build(elements,file);var first=nodes.shift();if(!t.isArrayExpression(first)){nodes.unshift(first);first=t.arrayExpression([])}return t.callExpression(t.memberExpression(first,t.identifier("concat")),nodes)};exports.CallExpression=function(node,parent,scope,context,file){var args=node.arguments;if(!hasSpread(args))return;var contextLiteral=t.identifier("undefined");node.arguments=[];var nodes;if(args.length===1&&args[0].argument.name==="arguments"){nodes=[args[0].argument]}else{nodes=build(args,file)}var first=nodes.shift();if(nodes.length){node.arguments.push(t.callExpression(t.memberExpression(first,t.identifier("concat")),nodes))}else{node.arguments.push(first)}var callee=node.callee;if(t.isMemberExpression(callee)){var temp=scope.generateTempBasedOnNode(callee.object);if(temp){callee.object=t.assignmentExpression("=",temp,callee.object);contextLiteral=temp}else{contextLiteral=callee.object}t.appendToMemberExpression(callee,t.identifier("apply"))}else{node.callee=t.memberExpression(node.callee,t.identifier("apply"))}node.arguments.unshift(contextLiteral)};exports.NewExpression=function(node,parent,scope,context,file){var args=node.arguments;if(!hasSpread(args))return;var nativeType=t.isIdentifier(node.callee)&&contains(t.NATIVE_TYPE_NAMES,node.callee.name);var nodes=build(args,file);if(nativeType){nodes.unshift(t.arrayExpression([t.literal(null)]))}var first=nodes.shift();if(nodes.length){args=t.callExpression(t.memberExpression(first,t.identifier("concat")),nodes)}else{args=first}if(nativeType){return t.newExpression(t.callExpression(t.memberExpression(file.addHelper("bind"),t.identifier("apply")),[node.callee,args]),[])}else{return t.callExpression(file.addHelper("apply-constructor"),[node.callee,args])}}},{"../../../types":107,"lodash/collection/contains":181}],68:[function(require,module,exports){"use strict";var t=require("../../../types");var buildBinaryExpression=function(left,right){return t.binaryExpression("+",left,right)};exports.check=function(node){return t.isTemplateLiteral(node)||t.isTaggedTemplateExpression(node)};exports.TaggedTemplateExpression=function(node,parent,scope,context,file){var args=[];var quasi=node.quasi;var strings=[];var raw=[];for(var i=0;i<quasi.quasis.length;i++){var elem=quasi.quasis[i];strings.push(t.literal(elem.value.cooked));raw.push(t.literal(elem.value.raw))}strings=t.arrayExpression(strings);raw=t.arrayExpression(raw);var templateName="tagged-template-literal";if(file.isLoose("es6.templateLiterals"))templateName+="-loose";args.push(t.callExpression(file.addHelper(templateName),[strings,raw]));args=args.concat(quasi.expressions);return t.callExpression(node.tag,args)};exports.TemplateLiteral=function(node){var nodes=[];var i;for(i=0;i<node.quasis.length;i++){var elem=node.quasis[i];nodes.push(t.literal(elem.value.cooked));var expr=node.expressions.shift();if(expr)nodes.push(expr)}if(nodes.length>1){var last=nodes[nodes.length-1];if(t.isLiteral(last,{value:""}))nodes.pop();var root=buildBinaryExpression(nodes.shift(),nodes.shift());for(i=0;i<nodes.length;i++){root=buildBinaryExpression(root,nodes[i])}return root}else{return nodes[0]}}},{"../../../types":107}],69:[function(require,module,exports){"use strict";var rewritePattern=require("regexpu/rewrite-pattern");var pull=require("lodash/array/pull");var t=require("../../../types");exports.check=function(node){return t.isLiteral(node)&&node.regex&&node.regex.flags.indexOf("u")>=0};exports.Literal=function(node){var regex=node.regex;if(!regex)return;var flags=regex.flags.split("");if(regex.flags.indexOf("u")<0)return;pull(flags,"u");regex.pattern=rewritePattern(regex.pattern,regex.flags);regex.flags=flags.join("")}},{"../../../types":107,"lodash/array/pull":179,"regexpu/rewrite-pattern":288}],70:[function(require,module,exports){"use strict";var util=require("../../../util");var t=require("../../../types");exports.experimental=true;var container=function(parent,call,ret,file){if(t.isExpressionStatement(parent)&&!file.isConsequenceExpressionStatement(parent)){return call}else{var exprs=[];if(t.isSequenceExpression(call)){exprs=call.expressions}else{exprs.push(call)}exprs.push(ret);return t.sequenceExpression(exprs)}};exports.AssignmentExpression=function(node,parent,scope,context,file){var left=node.left;if(!t.isVirtualPropertyExpression(left))return;var value=node.right;var temp;if(!t.isExpressionStatement(parent)){temp=scope.generateTempBasedOnNode(node.right);if(temp)value=temp}if(node.operator!=="="){value=t.binaryExpression(node.operator[0],util.template("abstract-expression-get",{PROPERTY:node.property,OBJECT:node.object}),value)}var call=util.template("abstract-expression-set",{PROPERTY:left.property,OBJECT:left.object,VALUE:value});if(temp){call=t.sequenceExpression([t.assignmentExpression("=",temp,node.right),call])}return container(parent,call,value,file)};exports.UnaryExpression=function(node,parent,scope,context,file){var arg=node.argument;if(!t.isVirtualPropertyExpression(arg))return;if(node.operator!=="delete")return;var call=util.template("abstract-expression-delete",{PROPERTY:arg.property,OBJECT:arg.object});return container(parent,call,t.literal(true),file)};exports.CallExpression=function(node,parent,scope){var callee=node.callee;if(!t.isVirtualPropertyExpression(callee))return;var temp=scope.generateTempBasedOnNode(callee.object);var call=util.template("abstract-expression-call",{PROPERTY:callee.property,OBJECT:temp||callee.object});call.arguments=call.arguments.concat(node.arguments);if(temp){return t.sequenceExpression([t.assignmentExpression("=",temp,callee.object),call])}else{return call}};exports.VirtualPropertyExpression=function(node){return util.template("abstract-expression-get",{PROPERTY:node.property,OBJECT:node.object})};exports.PrivateDeclaration=function(node){return t.variableDeclaration("const",node.declarations.map(function(id){return t.variableDeclarator(id,t.newExpression(t.identifier("WeakMap"),[]))}))}},{"../../../types":107,"../../../util":110}],71:[function(require,module,exports){"use strict";var buildComprehension=require("../../helpers/build-comprehension");var traverse=require("../../../traverse");var util=require("../../../util");var t=require("../../../types");exports.experimental=true;exports.ComprehensionExpression=function(node,parent,scope,context,file){var callback=array;if(node.generator)callback=generator;return callback(node,parent,scope,file)};var generator=function(node){var body=[];var container=t.functionExpression(null,[],t.blockStatement(body),true); container._aliasFunction=true;body.push(buildComprehension(node,function(){return t.expressionStatement(t.yieldExpression(node.body))}));return t.callExpression(container,[])};var array=function(node,parent,scope,file){var uid=scope.generateUidBasedOnNode(parent,file);var container=util.template("array-comprehension-container",{KEY:uid});container.callee._aliasFunction=true;var block=container.callee.body;var body=block.body;if(traverse.hasType(node,scope,"YieldExpression",t.FUNCTION_TYPES)){container.callee.generator=true;container=t.yieldExpression(container,true)}var returnStatement=body.pop();body.push(buildComprehension(node,function(){return util.template("array-push",{STATEMENT:node.body,KEY:uid},true)}));body.push(returnStatement);return container}},{"../../../traverse":103,"../../../types":107,"../../../util":110,"../../helpers/build-comprehension":30}],72:[function(require,module,exports){"use strict";exports.experimental=true;var build=require("../../helpers/build-binary-assignment-operator-transformer");var t=require("../../../types");var MATH_POW=t.memberExpression(t.identifier("Math"),t.identifier("pow"));build(exports,{operator:"**",build:function(left,right){return t.callExpression(MATH_POW,[left,right])}})},{"../../../types":107,"../../helpers/build-binary-assignment-operator-transformer":29}],73:[function(require,module,exports){"use strict";var t=require("../../../types");exports.experimental=true;exports.manipulateOptions=function(opts){if(opts.whitelist.length)opts.whitelist.push("es6.destructuring")};var hasSpread=function(node){for(var i=0;i<node.properties.length;i++){if(t.isSpreadProperty(node.properties[i])){return true}}return false};exports.ObjectExpression=function(node,parent,scope,context,file){if(!hasSpread(node))return;var args=[];var props=[];var push=function(){if(!props.length)return;args.push(t.objectExpression(props));props=[]};for(var i=0;i<node.properties.length;i++){var prop=node.properties[i];if(t.isSpreadProperty(prop)){push();args.push(prop.argument)}else{props.push(prop)}}push();if(!t.isObjectExpression(args[0])){args.unshift(t.objectExpression([]))}return t.callExpression(file.addHelper("extends"),args)}},{"../../../types":107}],74:[function(require,module,exports){module.exports={useStrict:require("./other/use-strict"),"validation.undeclaredVariableCheck":require("./validation/undeclared-variable-check"),"validation.noForInOfAssignment":require("./validation/no-for-in-of-assignment"),"validation.setters":require("./validation/setters"),"spec.blockScopedFunctions":require("./spec/block-scoped-functions"),"playground.malletOperator":require("./playground/mallet-operator"),"playground.methodBinding":require("./playground/method-binding"),"playground.memoizationOperator":require("./playground/memoization-operator"),"playground.objectGetterMemoization":require("./playground/object-getter-memoization"),react:require("./other/react"),_modules:require("./internal/modules"),"es7.comprehensions":require("./es7/comprehensions"),"es6.arrowFunctions":require("./es6/arrow-functions"),"es6.classes":require("./es6/classes"),asyncToGenerator:require("./other/async-to-generator"),bluebirdCoroutines:require("./other/bluebird-coroutines"),"es7.objectRestSpread":require("./es7/object-rest-spread"),"es7.exponentiationOperator":require("./es7/exponentiation-operator"),"es6.spread":require("./es6/spread"),"es6.templateLiterals":require("./es6/template-literals"),"es5.properties.mutators":require("./es5/properties.mutators"),"es6.properties.shorthand":require("./es6/properties.shorthand"),"es6.properties.computed":require("./es6/properties.computed"),"es6.forOf":require("./es6/for-of"),"es6.unicodeRegex":require("./es6/unicode-regex"),"es7.abstractReferences":require("./es7/abstract-references"),"es6.constants":require("./es6/constants"),"es6.blockScoping":require("./es6/block-scoping"),"es6.blockScopingTDZ":require("./es6/block-scoping-tdz"),"es6.parameters.default":require("./es6/parameters.default"),"es6.parameters.rest":require("./es6/parameters.rest"),"es6.destructuring":require("./es6/destructuring"),regenerator:require("./other/regenerator"),selfContained:require("./other/self-contained"),"es6.modules":require("./es6/modules"),_blockHoist:require("./internal/block-hoist"),"spec.protoToAssign":require("./spec/proto-to-assign"),_declarations:require("./internal/declarations"),_aliasFunctions:require("./internal/alias-functions"),_moduleFormatter:require("./internal/module-formatter"),"spec.typeofSymbol":require("./spec/typeof-symbol"),"spec.undefinedToVoid":require("./spec/undefined-to-void"),"minification.propertyLiterals":require("./minification/property-literals"),"minification.memberExpressionLiterals":require("./minification/member-expression-literals"),"minification.removeDebugger":require("./minification/remove-debugger"),"minification.removeConsoleCalls":require("./minification/remove-console-calls"),"minification.deadCodeElimination":require("./minification/dead-code-elimination"),"minification.renameLocalVariables":require("./minification/rename-local-variables")}},{"./es5/properties.mutators":54,"./es6/arrow-functions":55,"./es6/block-scoping":57,"./es6/block-scoping-tdz":56,"./es6/classes":58,"./es6/constants":59,"./es6/destructuring":60,"./es6/for-of":61,"./es6/modules":62,"./es6/parameters.default":63,"./es6/parameters.rest":64,"./es6/properties.computed":65,"./es6/properties.shorthand":66,"./es6/spread":67,"./es6/template-literals":68,"./es6/unicode-regex":69,"./es7/abstract-references":70,"./es7/comprehensions":71,"./es7/exponentiation-operator":72,"./es7/object-rest-spread":73,"./internal/alias-functions":75,"./internal/block-hoist":76,"./internal/declarations":77,"./internal/module-formatter":78,"./internal/modules":79,"./minification/dead-code-elimination":80,"./minification/member-expression-literals":81,"./minification/property-literals":82,"./minification/remove-console-calls":83,"./minification/remove-debugger":84,"./minification/rename-local-variables":85,"./other/async-to-generator":86,"./other/bluebird-coroutines":87,"./other/react":88,"./other/regenerator":89,"./other/self-contained":90,"./other/use-strict":91,"./playground/mallet-operator":92,"./playground/memoization-operator":93,"./playground/method-binding":94,"./playground/object-getter-memoization":95,"./spec/block-scoped-functions":96,"./spec/proto-to-assign":97,"./spec/typeof-symbol":98,"./spec/undefined-to-void":99,"./validation/no-for-in-of-assignment":100,"./validation/setters":101,"./validation/undeclared-variable-check":102}],75:[function(require,module,exports){"use strict";var t=require("../../../types");var functionChildrenVisitor={enter:function(node,parent,scope,context,state){if(t.isFunction(node)&&!node._aliasFunction){return context.skip()}if(node._ignoreAliasFunctions)return context.skip();var getId;if(t.isIdentifier(node)&&node.name==="arguments"){getId=state.getArgumentsId}else if(t.isThisExpression(node)){getId=state.getThisId}else{return}if(t.isReferenced(node,parent))return getId()}};var functionVisitor={enter:function(node,parent,scope,context,state){if(!node._aliasFunction){if(t.isFunction(node)){return context.skip()}else{return}}scope.traverse(node,functionChildrenVisitor,state);return context.skip()}};var go=function(getBody,node,scope){var argumentsId;var thisId;var state={getArgumentsId:function(){return argumentsId=argumentsId||scope.generateUidIdentifier("arguments")},getThisId:function(){return thisId=thisId||scope.generateUidIdentifier("this")}};scope.traverse(node,functionVisitor,state);var body;var pushDeclaration=function(id,init){body=body||getBody();body.unshift(t.variableDeclaration("var",[t.variableDeclarator(id,init)]))};if(argumentsId){pushDeclaration(argumentsId,t.identifier("arguments"))}if(thisId){pushDeclaration(thisId,t.thisExpression())}};exports.Program=function(node,parent,scope){go(function(){return node.body},node,scope)};exports.FunctionDeclaration=exports.FunctionExpression=function(node,parent,scope){go(function(){t.ensureBlock(node);return node.body.body},node,scope)}},{"../../../types":107}],76:[function(require,module,exports){"use strict";var useStrict=require("../../helpers/use-strict");var groupBy=require("lodash/collection/groupBy");var flatten=require("lodash/array/flatten");var values=require("lodash/object/values");exports.BlockStatement=exports.Program={exit:function(node){var hasChange=false;for(var i=0;i<node.body.length;i++){var bodyNode=node.body[i];if(bodyNode&&bodyNode._blockHoist!=null)hasChange=true}if(!hasChange)return;useStrict.wrap(node,function(){var nodePriorities=groupBy(node.body,function(bodyNode){var priority=bodyNode._blockHoist;if(priority==null)priority=1;if(priority===true)priority=2;return priority});node.body=flatten(values(nodePriorities).reverse())})}}},{"../../helpers/use-strict":38,"lodash/array/flatten":177,"lodash/collection/groupBy":184,"lodash/object/values":268}],77:[function(require,module,exports){"use strict";var useStrict=require("../../helpers/use-strict");var t=require("../../../types");exports.secondPass=true;exports.BlockStatement=exports.Program=function(node){if(!node._declarations)return;var kinds={};var kind;useStrict.wrap(node,function(){for(var i in node._declarations){var declar=node._declarations[i];kind=declar.kind||"var";var declarNode=t.variableDeclarator(declar.id,declar.init);if(!declar.init){kinds[kind]=kinds[kind]||[];kinds[kind].push(declarNode)}else{node.body.unshift(t.variableDeclaration(kind,[declarNode]))}}for(kind in kinds){node.body.unshift(t.variableDeclaration(kind,kinds[kind]))}});node._declarations=null}},{"../../../types":107,"../../helpers/use-strict":38}],78:[function(require,module,exports){"use strict";var useStrict=require("../../helpers/use-strict");exports.ast={exit:function(ast,file){if(!file.transformers["es6.modules"].canRun())return;useStrict.wrap(ast.program,function(){ast.program.body=file.dynamicImports.concat(ast.program.body)});if(file.moduleFormatter.transform){file.moduleFormatter.transform(ast)}}}},{"../../helpers/use-strict":38}],79:[function(require,module,exports){"use strict";var t=require("../../../types");var resolveModuleSource=function(node,parent,scope,context,file){var resolveModuleSource=file.opts.resolveModuleSource;if(node.source&&resolveModuleSource){node.source.value=resolveModuleSource(node.source.value)}};exports.check=function(node){return t.isImportDeclaration(node)||t.isExportDeclaration(node)};exports.ImportDeclaration=resolveModuleSource;exports.ExportDeclaration=function(node,parent,scope){resolveModuleSource.apply(null,arguments);var declar=node.declaration;if(node.default){if(t.isClassDeclaration(declar)){node.declaration=declar.id;return[declar,node]}else if(t.isClassExpression(declar)){var temp=scope.generateUidIdentifier("default");declar=t.variableDeclaration("var",[t.variableDeclarator(temp,declar)]);node.declaration=temp;return[declar,node]}else if(t.isFunctionDeclaration(declar)){node._blockHoist=2;node.declaration=declar.id;return[declar,node]}}else{if(t.isFunctionDeclaration(declar)){node.specifiers=[t.importSpecifier(declar.id,declar.id)];node.declaration=null;node._blockHoist=2;return[declar,node]}}}},{"../../../types":107}],80:[function(require,module,exports){var t=require("../../../types");exports.optional=true;exports.ExpressionStatement=function(node,parent,scope,context){var expr=node.expression;if(t.isLiteral(expr)||t.isIdentifier(node)&&t.hasBinding(node.name)){context.remove()}};exports.IfStatement={exit:function(node,parent,scope,context){var consequent=node.consequent;var alternate=node.alternate;var test=node.test;if(t.isLiteral(test)&&test.value){return alternate}if(t.isFalsyExpression(test)){if(alternate){return alternate}else{return context.remove()}}if(t.isBlockStatement(alternate)&&!alternate.body.length){alternate=node.alternate=null}if(t.blockStatement(consequent)&&!consequent.body.length&&t.isBlockStatement(alternate)&&alternate.body.length){node.consequent=node.alternate;node.alternate=null;node.test=t.unaryExpression("!",test,true)}}}},{"../../../types":107}],81:[function(require,module,exports){"use strict";var t=require("../../../types");exports.MemberExpression=function(node){var prop=node.property;if(node.computed&&t.isLiteral(prop)&&t.isValidIdentifier(prop.value)){node.property=t.identifier(prop.value);node.computed=false}else if(!node.computed&&t.isIdentifier(prop)&&!t.isValidIdentifier(prop.name)){node.property=t.literal(prop.name);node.computed=true}}},{"../../../types":107}],82:[function(require,module,exports){"use strict";var t=require("../../../types");exports.Property=function(node){var key=node.key;if(t.isLiteral(key)&&t.isValidIdentifier(key.value)){node.key=t.identifier(key.value);node.computed=false}else if(!node.computed&&t.isIdentifier(key)&&!t.isValidIdentifier(key.name)){node.key=t.literal(key.name)}}},{"../../../types":107}],83:[function(require,module,exports){"use strict";var t=require("../../../types");var isConsole=t.buildMatchMemberExpression("console",true);exports.optional=true;exports.CallExpression=function(node,parent,scope,context){if(isConsole(node.callee)){context.remove()}}},{"../../../types":107}],84:[function(require,module,exports){var t=require("../../../types");exports.optional=true;exports.ExpressionStatement=function(node,parent,scope,context){if(t.isIdentifier(node.expression,{name:"debugger"})){context.remove()}}},{"../../../types":107}],85:[function(require,module,exports){exports.optional=true;exports.Scope=function(){}},{}],86:[function(require,module,exports){"use strict";var remapAsyncToGenerator=require("../../helpers/remap-async-to-generator");var bluebirdCoroutines=require("./bluebird-coroutines");exports.optional=true;exports.manipulateOptions=bluebirdCoroutines.manipulateOptions;exports.Function=function(node,parent,scope,context,file){if(!node.async||node.generator)return;return remapAsyncToGenerator(node,file.addHelper("async-to-generator"),scope)}},{"../../helpers/remap-async-to-generator":36,"./bluebird-coroutines":87}],87:[function(require,module,exports){"use strict";var remapAsyncToGenerator=require("../../helpers/remap-async-to-generator");var t=require("../../../types");exports.manipulateOptions=function(opts){opts.experimental=true;opts.blacklist.push("regenerator")};exports.optional=true;exports.Function=function(node,parent,scope,context,file){if(!node.async||node.generator)return;return remapAsyncToGenerator(node,t.memberExpression(file.addImport("bluebird"),t.identifier("coroutine")),scope)}},{"../../../types":107,"../../helpers/remap-async-to-generator":36}],88:[function(require,module,exports){"use strict";var isString=require("lodash/lang/isString");var esutils=require("esutils");var react=require("../../helpers/react");var t=require("../../../types");exports.check=function(node){if(t.isJSX(node))return true;if(react.isCreateClass(node))return true;return false};exports.JSXIdentifier=function(node,parent){if(node.name==="this"&&t.isReferenced(node,parent)){return t.thisExpression()}else if(esutils.keyword.isIdentifierName(node.name)){node.type="Identifier"}else{return t.literal(node.name)}};exports.JSXNamespacedName=function(node,parent,scope,context,file){throw file.errorWithNode(node,"Namespace tags are not supported. ReactJSX is not XML.")};exports.JSXMemberExpression={exit:function(node){node.computed=t.isLiteral(node.property);node.type="MemberExpression"}};exports.JSXExpressionContainer=function(node){return node.expression};exports.JSXAttribute={exit:function(node){var value=node.value||t.literal(true);return t.inherits(t.property("init",node.name,value),node)}};var isCompatTag=function(tagName){return/^[a-z]|\-/.test(tagName)};exports.JSXOpeningElement={exit:function(node,parent,scope,context,file){var reactCompat=file.opts.reactCompat;var tagExpr=node.name;var args=[];var tagName;if(t.isIdentifier(tagExpr)){tagName=tagExpr.name}else if(t.isLiteral(tagExpr)){tagName=tagExpr.value}if(!reactCompat){if(tagName&&isCompatTag(tagName)){args.push(t.literal(tagName))}else{args.push(tagExpr)}}var attribs=node.attributes;if(attribs.length){attribs=buildJSXOpeningElementAttributes(attribs,file)}else{attribs=t.literal(null)}args.push(attribs);if(reactCompat){if(tagName&&isCompatTag(tagName)){return t.callExpression(t.memberExpression(t.memberExpression(t.identifier("React"),t.identifier("DOM")),tagExpr,t.isLiteral(tagExpr)),args)}}else{tagExpr=t.memberExpression(t.identifier("React"),t.identifier("createElement"))}return t.callExpression(tagExpr,args)}};var buildJSXOpeningElementAttributes=function(attribs,file){var _props=[];var objs=[];var pushProps=function(){if(!_props.length)return;objs.push(t.objectExpression(_props));_props=[]};while(attribs.length){var prop=attribs.shift();if(t.isJSXSpreadAttribute(prop)){pushProps();objs.push(prop.argument)}else{_props.push(prop)}}pushProps();if(objs.length===1){attribs=objs[0]}else{if(!t.isObjectExpression(objs[0])){objs.unshift(t.objectExpression([]))}attribs=t.callExpression(file.addHelper("extends"),objs)}return attribs};exports.JSXElement={exit:function(node){var callExpr=node.openingElement;for(var i=0;i<node.children.length;i++){var child=node.children[i];if(t.isLiteral(child)&&typeof child.value==="string"){cleanJSXElementLiteralChild(child,callExpr.arguments);continue}else if(t.isJSXEmptyExpression(child)){continue}callExpr.arguments.push(child)}callExpr.arguments=flatten(callExpr.arguments);if(callExpr.arguments.length>=3){callExpr._prettyCall=true}return t.inherits(callExpr,node)}};var isStringLiteral=function(node){return t.isLiteral(node)&&isString(node.value)};var flatten=function(args){var flattened=[];var last;for(var i=0;i<args.length;i++){var arg=args[i];if(isStringLiteral(arg)&&isStringLiteral(last)){last.value+=arg.value}else{last=arg;flattened.push(arg)}}return flattened};var cleanJSXElementLiteralChild=function(child,args){var lines=child.value.split(/\r\n|\n|\r/);var lastNonEmptyLine=0;var i;for(i=0;i<lines.length;i++){if(lines[i].match(/[^ \t]/)){lastNonEmptyLine=i}}for(i=0;i<lines.length;i++){var line=lines[i];var isFirstLine=i===0;var isLastLine=i===lines.length-1;var isLastNonEmptyLine=i===lastNonEmptyLine;var trimmedLine=line.replace(/\t/g," ");if(!isFirstLine){trimmedLine=trimmedLine.replace(/^[ ]+/,"")}if(!isLastLine){trimmedLine=trimmedLine.replace(/[ ]+$/,"")}if(trimmedLine){if(!isLastNonEmptyLine){trimmedLine+=" "}args.push(t.literal(trimmedLine))}}};var addDisplayName=function(id,call){var props=call.arguments[0].properties;var safe=true;for(var i=0;i<props.length;i++){var prop=props[i];if(t.isIdentifier(prop.key,{name:"displayName"})){safe=false;break}}if(safe){props.unshift(t.property("init",t.identifier("displayName"),t.literal(id)))}};exports.ExportDeclaration=function(node,parent,scope,context,file){if(node.default&&react.isCreateClass(node.declaration)){addDisplayName(file.opts.basename,node.declaration)}};exports.AssignmentExpression=exports.Property=exports.VariableDeclarator=function(node){var left,right;if(t.isAssignmentExpression(node)){left=node.left;right=node.right}else if(t.isProperty(node)){left=node.key;right=node.value}else if(t.isVariableDeclarator(node)){left=node.id;right=node.init}if(t.isMemberExpression(left)){left=left.property}if(t.isIdentifier(left)&&react.isCreateClass(right)){addDisplayName(left.name,right)}}},{"../../../types":107,"../../helpers/react":35,esutils:172,"lodash/lang/isString":258}],89:[function(require,module,exports){"use strict";var regenerator=require("regenerator-6to5");var t=require("../../../types");exports.check=function(node){return t.isFunction(node)&&(node.async||node.generator)};exports.ast={before:function(ast,file){regenerator.transform(ast,{includeRuntime:file.opts.includeRegenerator&&"if used"})}}},{"../../../types":107,"regenerator-6to5":280}],90:[function(require,module,exports){"use strict";var util=require("../../../util");var core=require("core-js/library");var t=require("../../../types");var has=require("lodash/object/has");var contains=require("lodash/collection/contains");var coreHas=function(node){return node.name!=="_"&&has(core,node.name)};var ALIASABLE_CONSTRUCTORS=["Symbol","Promise","Map","WeakMap","Set","WeakSet"];var astVisitor={enter:function(node,parent,scope,context,file){var prop;if(t.isMemberExpression(node)&&t.isReferenced(node,parent)){var obj=node.object;prop=node.property;if(!t.isReferenced(obj,node))return;if(!node.computed&&coreHas(obj)&&has(core[obj.name],prop.name)){context.skip();return t.prependToMemberExpression(node,file.get("coreIdentifier"))}}else if(t.isReferencedIdentifier(node,parent)&&!t.isMemberExpression(parent)&&contains(ALIASABLE_CONSTRUCTORS,node.name)&&!scope.getBinding(node.name)){return t.memberExpression(file.get("coreIdentifier"),node)}else if(t.isCallExpression(node)){if(node.arguments.length)return;var callee=node.callee;if(!t.isMemberExpression(callee))return;if(!callee.computed)return;prop=callee.property;if(!t.isIdentifier(prop.object,{name:"Symbol"}))return;if(!t.isIdentifier(prop.property,{name:"iterator"}))return;return util.template("corejs-iterator",{CORE_ID:file.get("coreIdentifier"),VALUE:callee.object})}}};exports.optional=true;exports.ast={enter:function(ast,file){file.setDynamic("runtimeIdentifier",function(){return file.addImport("6to5-runtime/helpers","to5Helpers")});file.setDynamic("coreIdentifier",function(){return file.addImport("6to5-runtime/core-js","core")});file.setDynamic("regeneratorIdentifier",function(){return file.addImport("6to5-runtime/regenerator","regeneratorRuntime")})},after:function(ast,file){file.scope.traverse(ast,astVisitor,file)}};exports.Identifier=function(node,parent,scope,context,file){if(node.name==="regeneratorRuntime"&&t.isReferenced(node,parent)){return file.get("regeneratorIdentifier")}}},{"../../../types":107,"../../../util":110,"core-js/library":161,"lodash/collection/contains":181,"lodash/object/has":264}],91:[function(require,module,exports){"use strict";var useStrict=require("../../helpers/use-strict");var t=require("../../../types");exports.ast={exit:function(ast){if(!useStrict.has(ast.program)){ast.program.body.unshift(t.expressionStatement(t.literal("use strict")))}}};exports.FunctionDeclaration=exports.FunctionExpression=function(node,parent,scope,context){context.skip()};exports.ThisExpression=function(){return t.identifier("undefined")}},{"../../../types":107,"../../helpers/use-strict":38}],92:[function(require,module,exports){"use strict";var build=require("../../helpers/build-conditional-assignment-operator-transformer");var t=require("../../../types");exports.playground=true;build(exports,{is:function(node,file){var is=t.isAssignmentExpression(node)&&node.operator==="||=";if(is){var left=node.left;if(!t.isMemberExpression(left)&&!t.isIdentifier(left)){throw file.errorWithNode(left,"Expected type MemeberExpression or Identifier")}return true}},build:function(node){return t.unaryExpression("!",node,true)}})},{"../../../types":107,"../../helpers/build-conditional-assignment-operator-transformer":31}],93:[function(require,module,exports){"use strict";var build=require("../../helpers/build-conditional-assignment-operator-transformer");var t=require("../../../types");exports.playground=true;build(exports,{is:function(node){var is=t.isAssignmentExpression(node)&&node.operator==="?=";if(is)t.assertMemberExpression(node.left);return is},build:function(node,file){return t.unaryExpression("!",t.callExpression(t.memberExpression(file.addHelper("has-own"),t.identifier("call")),[node.object,node.property]),true)}})},{"../../../types":107,"../../helpers/build-conditional-assignment-operator-transformer":31}],94:[function(require,module,exports){"use strict";var t=require("../../../types");exports.playground=true;exports.BindMemberExpression=function(node,parent,scope){var object=node.object;var prop=node.property;var temp=scope.generateTempBasedOnNode(node.object);if(temp)object=temp;var call=t.callExpression(t.memberExpression(t.memberExpression(object,prop),t.identifier("bind")),[object].concat(node.arguments));if(temp){return t.sequenceExpression([t.assignmentExpression("=",temp,node.object),call])}else{return call}};exports.BindFunctionExpression=function(node,parent,scope,context,file){var buildCall=function(args){var param=scope.generateUidIdentifier("val");return t.functionExpression(null,[param],t.blockStatement([t.returnStatement(t.callExpression(t.memberExpression(param,node.callee),args))]))};var temp=scope.generateTemp(file,"args");return t.sequenceExpression([t.assignmentExpression("=",temp,t.arrayExpression(node.arguments)),buildCall(node.arguments.map(function(node,i){return t.memberExpression(temp,t.literal(i),true)}))])}},{"../../../types":107}],95:[function(require,module,exports){"use strict";var t=require("../../../types");exports.playground=true;var visitor={enter:function(node,parent,scope,context,state){if(t.isFunction(node))return;if(t.isReturnStatement(node)&&node.argument){node.argument=t.memberExpression(t.callExpression(state.file.addHelper("define-property"),[t.thisExpression(),state.key,node.argument]),state.key,true)}}};exports.Property=exports.MethodDefinition=function(node,parent,scope,context,file){if(node.kind!=="memo")return;node.kind="get";file.checkNode(node,scope);var value=node.value;t.ensureBlock(value);var key=node.key;if(t.isIdentifier(key)&&!node.computed){key=t.literal(key.name)}var state={key:key,file:file};scope.traverse(value,visitor,state)}},{"../../../types":107}],96:[function(require,module,exports){"use strict";var t=require("../../../types");exports.BlockStatement=function(node,parent){if(t.isFunction(parent)&&parent.body===node||t.isExportDeclaration(parent)){return}for(var i=0;i<node.body.length;i++){var func=node.body[i];if(!t.isFunctionDeclaration(func))continue;var declar=t.variableDeclaration("let",[t.variableDeclarator(func.id,t.toExpression(func))]);declar._blockHoist=2;func.id=null;node.body[i]=declar}}},{"../../../types":107}],97:[function(require,module,exports){"use strict";var t=require("../../../types");var pull=require("lodash/array/pull");var isProtoKey=function(node){return t.isLiteral(t.toComputedKey(node,node.key),{value:"__proto__"})};var isProtoAssignmentExpression=function(node){var left=node.left;return t.isMemberExpression(left)&&t.isLiteral(t.toComputedKey(left,left.property),{value:"__proto__"})};var buildDefaultsCallExpression=function(expr,ref,file){return t.expressionStatement(t.callExpression(file.addHelper("defaults"),[ref,expr.right]))};exports.optional=true;exports.secondPass=true;exports.AssignmentExpression=function(node,parent,scope,context,file){if(!isProtoAssignmentExpression(node))return;var nodes=[];var left=node.left.object;var temp=scope.generateTempBasedOnNode(node.left.object);nodes.push(t.expressionStatement(t.assignmentExpression("=",temp,left)));nodes.push(buildDefaultsCallExpression(node,temp,file));if(temp)nodes.push(temp);return t.toSequenceExpression(nodes)};exports.ExpressionStatement=function(node,parent,scope,context,file){var expr=node.expression;if(!t.isAssignmentExpression(expr,{operator:"="}))return;if(isProtoAssignmentExpression(expr)){return buildDefaultsCallExpression(expr,expr.left.object,file)}};exports.ObjectExpression=function(node,parent,scope,context,file){var proto;for(var i=0;i<node.properties.length;i++){var prop=node.properties[i];if(isProtoKey(prop)){proto=prop.value;pull(node.properties,prop)}}if(proto){var args=[t.objectExpression([]),proto];if(node.properties.length)args.push(node);return t.callExpression(file.addHelper("extends"),args)}}},{"../../../types":107,"lodash/array/pull":179}],98:[function(require,module,exports){"use strict";var t=require("../../../types");exports.optional=true;exports.UnaryExpression=function(node,parent,scope,context,file){context.skip();if(node.operator==="typeof"){var call=t.callExpression(file.addHelper("typeof"),[node.argument]);if(t.isIdentifier(node.argument)){var undefLiteral=t.literal("undefined");return t.conditionalExpression(t.binaryExpression("===",t.unaryExpression("typeof",node.argument),undefLiteral),undefLiteral,call)}else{return call}}}},{"../../../types":107}],99:[function(require,module,exports){"use strict";var t=require("../../../types");exports.optional=true;exports.Identifier=function(node,parent){if(node.name==="undefined"&&t.isReferenced(node,parent)){return t.unaryExpression("void",t.literal(0),true)}}},{"../../../types":107}],100:[function(require,module,exports){"use strict";var t=require("../../../types");exports.ForInStatement=exports.ForOfStatement=function(node,parent,scope,context,file){var left=node.left;if(t.isVariableDeclaration(left)){var declar=left.declarations[0];if(declar.init)throw file.errorWithNode(declar,"No assignments allowed in for-in/of head")}}},{"../../../types":107}],101:[function(require,module,exports){"use strict";exports.MethodDefinition=exports.Property=function(node,parent,scope,context,file){if(node.kind==="set"&&node.value.params.length!==1){throw file.errorWithNode(node.value,"Setters must have only one parameter")}}},{}],102:[function(require,module,exports){"use strict";var levenshtein=require("../../../helpers/levenshtein");var t=require("../../../types");exports.optional=true;exports.Identifier=function(node,parent,scope,context,file){if(!t.isReferenced(node,parent))return;if(scope.hasBinding(node.name))return;var msg="Reference to undeclared variable";var bindings=scope.getAllBindings();var closest;var shortest=-1;for(var name in bindings){var distance=levenshtein(node.name,name);if(distance<=0||distance>3)continue;if(distance<=shortest)continue;closest=name;shortest=distance}if(closest){msg+=" - Did you mean "+closest+"?"}throw file.errorWithNode(node,msg,ReferenceError)}},{"../../../helpers/levenshtein":25,"../../../types":107}],103:[function(require,module,exports){"use strict";module.exports=traverse;var Scope=require("./scope");var t=require("../types");var contains=require("lodash/collection/contains");var flatten=require("lodash/array/flatten");var compact=require("lodash/array/compact");function TraversalContext(scope){this.shouldFlatten=false;this.shouldRemove=false;this.shouldSkip=false;this.shouldStop=false;this.scope=scope}TraversalContext.prototype.flatten=function(){this.shouldFlatten=true};TraversalContext.prototype.remove=function(){this.shouldRemove=true;this.shouldSkip=true};TraversalContext.prototype.skip=function(){this.shouldSkip=true};TraversalContext.prototype.stop=function(){this.shouldStop=true;this.shouldSkip=true};TraversalContext.prototype.reset=function(){this.shouldRemove=false;this.shouldSkip=false;this.shouldStop=false};TraversalContext.prototype.maybeRemove=function(obj,key){if(this.shouldRemove){obj[key]=null;this.flatten()}};TraversalContext.prototype.replaceNode=function(obj,key,node,replacement,scope){var isArray=Array.isArray(replacement);var inheritTo=replacement;if(isArray)inheritTo=replacement[0];if(inheritTo)t.inheritsComments(inheritTo,node);obj[key]=replacement;var file=this.scope&&this.scope.file;if(file){if(isArray){for(var i=0;i<replacement.length;i++){file.checkNode(replacement[i],scope)}}else{file.checkNode(replacement,scope)}}if(isArray&&contains(t.STATEMENT_OR_BLOCK_KEYS,key)&&!t.isBlockStatement(obj)){t.ensureBlock(obj,key)}if(isArray){this.flatten()}};TraversalContext.prototype.call=function(fn,obj,key,node,parent,scope,state){var replacement=fn(node,parent,scope,this,state);if(replacement){this.replaceNode(obj,key,node,replacement,scope);node=replacement}this.maybeRemove(obj,key);return node};TraversalContext.prototype.visitNode=function(obj,key,opts,scope,parent,state){this.reset();var node=obj[key];if(opts.blacklist&&opts.blacklist.indexOf(node.type)>-1){return}var ourScope=scope;if(!opts.noScope&&t.isScope(node)){ourScope=new Scope(node,parent,scope)}node=this.call(opts.enter,obj,key,node,parent,ourScope,state);if(this.shouldSkip){return this.shouldStop}if(Array.isArray(node)){for(var i=0;i<node.length;i++){traverseNode(node[i],opts,ourScope,state) }}else{traverseNode(node,opts,ourScope,state);this.call(opts.exit,obj,key,node,parent,ourScope,state)}return this.shouldStop};TraversalContext.prototype.visit=function(node,key,opts,scope,state){var nodes=node[key];if(!nodes)return;if(!Array.isArray(nodes)){return this.visitNode(node,key,opts,scope,node,state)}if(nodes.length===0){return}for(var i=0;i<nodes.length;i++){if(nodes[i]&&this.visitNode(nodes,i,opts,scope,node,state)){return true}}if(this.shouldFlatten){node[key]=flatten(node[key]);if(key==="body"){node[key]=compact(node[key])}}};function traverseNode(node,opts,scope,state){var keys=t.VISITOR_KEYS[node.type];if(!keys)return;var context=new TraversalContext(scope);for(var i=0;i<keys.length;i++){if(context.visit(node,keys[i],opts,scope,state)){return}}}function traverse(parent,opts,scope,state){if(!parent)return;if(!opts.noScope&&!scope){if(parent.type!=="Program"&&parent.type!=="File"){throw new Error("Must pass a scope unless traversing a Program/File got a "+parent.type+" node")}}if(!opts)opts={};if(!opts.enter)opts.enter=function(){};if(!opts.exit)opts.exit=function(){};if(Array.isArray(parent)){for(var i=0;i<parent.length;i++){traverseNode(parent[i],opts,scope,state)}}else{traverseNode(parent,opts,scope,state)}}function clearNode(node){node._declarations=null;node.extendedRange=null;node._scopeInfo=null;node.tokens=null;node.range=null;node.start=null;node.end=null;node.loc=null;node.raw=null;if(Array.isArray(node.trailingComments)){clearComments(node.trailingComments)}if(Array.isArray(node.leadingComments)){clearComments(node.leadingComments)}}var clearVisitor={noScope:true,enter:clearNode};function clearComments(comments){for(var i=0;i<comments.length;i++){clearNode(comments[i])}}traverse.removeProperties=function(tree){clearNode(tree);traverse(tree,clearVisitor);return tree};traverse.explode=function(obj){for(var type in obj){var fns=obj[type];var aliases=t.FLIPPED_ALIAS_KEYS[type];if(aliases){for(var i=0;i<aliases.length;i++){obj[aliases[i]]=fns}}}return obj};function hasBlacklistedType(node,parent,scope,context,state){if(node.type===state.type){state.has=true;context.skip()}}traverse.hasType=function(tree,scope,type,blacklistTypes){if(contains(blacklistTypes,tree.type))return false;if(tree.type===type)return true;var state={has:false,type:type};traverse(tree,{blacklist:blacklistTypes,enter:hasBlacklistedType},scope,state);return state.has}},{"../types":107,"./scope":104,"lodash/array/compact":176,"lodash/array/flatten":177,"lodash/collection/contains":181}],104:[function(require,module,exports){"use strict";module.exports=Scope;var contains=require("lodash/collection/contains");var traverse=require("./index");var defaults=require("lodash/object/defaults");var globals=require("globals");var flatten=require("lodash/array/flatten");var extend=require("lodash/object/extend");var object=require("../helpers/object");var each=require("lodash/collection/each");var has=require("lodash/object/has");var t=require("../types");function Scope(block,parentBlock,parent,file){this.parent=parent;this.file=parent?parent.file:file;this.parentBlock=parentBlock;this.block=block;this.crawl()}Scope.defaultDeclarations=flatten([globals.builtin,globals.browser,globals.node].map(Object.keys));Scope.prototype.traverse=function(node,opts,state){traverse(node,opts,this,state)};Scope.prototype.generateTemp=function(file,name){var id=file.generateUidIdentifier(name||"temp",this);this.push({key:id.name,id:id});return id};Scope.prototype.generateUidIdentifier=function(name){return this.file.generateUidIdentifier(name,this)};Scope.prototype.generateUidBasedOnNode=function(parent){var node=parent;if(t.isAssignmentExpression(parent)){node=parent.left}else if(t.isVariableDeclarator(parent)){node=parent.id}else if(t.isProperty(node)){node=node.key}var parts=[];var add=function(node){if(t.isMemberExpression(node)){add(node.object);add(node.property)}else if(t.isIdentifier(node)){parts.push(node.name)}else if(t.isLiteral(node)){parts.push(node.value)}else if(t.isCallExpression(node)){add(node.callee)}};add(node);var id=parts.join("$");id=id.replace(/^_/,"")||"ref";return this.file.generateUidIdentifier(id,this)};Scope.prototype.generateTempBasedOnNode=function(node){if(t.isIdentifier(node)&&this.hasBinding(node.name)){return null}var id=this.generateUidBasedOnNode(node);this.push({key:id.name,id:id});return id};Scope.prototype.checkBlockScopedCollisions=function(key,id){if(this.declarationKinds["let"][key]||this.declarationKinds["const"][key]){throw this.file.errorWithNode(id,"Duplicate declaration "+key,TypeError)}};Scope.prototype.inferType=function(node){var target;if(t.isVariableDeclarator(node)){target=node.init}if(t.isLiteral(target)||t.isArrayExpression(target)||t.isObjectExpression(target)){}if(t.isCallExpression(target)){}if(t.isMemberExpression(target)){}if(t.isIdentifier(target)){return this.getType(target.name)}};Scope.prototype.registerType=function(key,id,node){var type;if(id.typeAnnotation){type=id.typeAnnotation}if(!type){type=this.inferType(node)}if(type){if(t.isTypeAnnotation(type))type=type.typeAnnotation;this.types[key]=type}};Scope.prototype.register=function(node,reference,kind){if(t.isVariableDeclaration(node)){return this.registerVariableDeclaration(node)}var ids=t.getBindingIdentifiers(node);extend(this.references,ids);if(reference)return;for(var key in ids){var id=ids[key];this.checkBlockScopedCollisions(key,id);this.registerType(key,id,node);this.bindings[key]=id}var kinds=this.declarationKinds[kind];if(kinds)extend(kinds,ids)};Scope.prototype.registerVariableDeclaration=function(declar){var declars=declar.declarations;for(var i=0;i<declars.length;i++){this.register(declars[i],false,declar.kind)}};var functionVariableVisitor={enter:function(node,parent,scope,context,state){if(t.isFor(node)){each(t.FOR_INIT_KEYS,function(key){var declar=node[key];if(t.isVar(declar))state.scope.register(declar)})}if(t.isFunction(node))return context.skip();if(state.blockId&&node===state.blockId)return;if(t.isBlockScoped(node))return;if(t.isExportDeclaration(node)&&t.isDeclaration(node.declaration))return;if(t.isDeclaration(node))state.scope.register(node)}};var programReferenceVisitor={enter:function(node,parent,scope,context,state){if(t.isReferencedIdentifier(node,parent)&&!scope.hasReference(node.name)){state.register(node,true)}}};var blockVariableVisitor={enter:function(node,parent,scope,context,state){if(t.isBlockScoped(node)){state.register(node)}else if(t.isScope(node)){context.skip()}}};Scope.prototype.crawl=function(){var parent=this.parent;var block=this.block;var i;var info=block._scopeInfo;if(info){extend(this,info);return}info=block._scopeInfo={declarationKinds:{"const":object(),"var":object(),let:object()},references:object(),bindings:object(),types:object()};extend(this,info);if(parent&&t.isBlockStatement(block)&&t.isLoop(parent.block,{body:block})){return}if(t.isLoop(block)){for(i=0;i<t.FOR_INIT_KEYS.length;i++){var node=block[t.FOR_INIT_KEYS[i]];if(t.isBlockScoped(node))this.register(node,false,true)}if(t.isBlockStatement(block.body)){block=block.body}}if(t.isBlockStatement(block)||t.isProgram(block)){this.traverse(block,blockVariableVisitor,this)}if(t.isCatchClause(block)){this.register(block.param)}if(t.isComprehensionExpression(block)){this.register(block)}if(t.isFunction(block)){for(i=0;i<block.params.length;i++){this.register(block.params[i])}}if(t.isProgram(block)||t.isFunction(block)){this.traverse(block,functionVariableVisitor,{blockId:block.id,scope:this})}if(t.isFunctionExpression(block)&&block.id){if(!t.isProperty(this.parentBlock,{method:true})){this.register(block.id)}}if(t.isProgram(block)){this.traverse(block,programReferenceVisitor,this)}};Scope.prototype.push=function(opts){var block=this.block;if(t.isFor(block)||t.isCatchClause(block)||t.isFunction(block)){t.ensureBlock(block);block=block.body}if(t.isBlockStatement(block)||t.isProgram(block)){block._declarations=block._declarations||{};block._declarations[opts.key]={kind:opts.kind,id:opts.id,init:opts.init}}else{throw new TypeError("cannot add a declaration here in node type "+block.type)}};Scope.prototype.addDeclarationToFunctionScope=function(kind,node){var scope=this.getFunctionParent();var ids=t.getBindingIdentifiers(node);extend(scope.bindings,ids);extend(scope.references,ids);extend(scope.declarationKinds[kind],ids)};Scope.prototype.getFunctionParent=function(){var scope=this;while(scope.parent&&!t.isFunction(scope.block)){scope=scope.parent}return scope};Scope.prototype.getAllBindings=function(){var ids=object();var scope=this;do{defaults(ids,scope.bindings);scope=scope.parent}while(scope);return ids};Scope.prototype.getAllDeclarationsOfKind=function(kind){var ids=object();var scope=this;do{defaults(ids,scope.declarationKinds[kind]);scope=scope.parent}while(scope);return ids};Scope.prototype.get=function(id,type){return id&&(this.getOwn(id,type)||this.parentGet(id,type))};Scope.prototype.getOwn=function(id,type){var refs={reference:this.references,binding:this.bindings,type:this.types}[type];return refs&&has(refs,id)&&refs[id]};Scope.prototype.parentGet=function(id,type){return this.parent&&this.parent.get(id,type)};Scope.prototype.has=function(id,type){if(!id)return false;if(this.hasOwn(id,type))return true;if(this.parentHas(id,type))return true;if(contains(Scope.defaultDeclarations,id))return true;return false};Scope.prototype.hasOwn=function(id,type){return!!this.getOwn(id,type)};Scope.prototype.parentHas=function(id,type){return this.parent&&this.parent.has(id,type)};each({reference:"Reference",binding:"Binding",type:"Type"},function(title,type){each(["get","has","getOwn","hasOwn","parentGet","parentHas"],function(methodName){Scope.prototype[methodName+title]=function(id){return this[methodName](id,type)}})})},{"../helpers/object":26,"../types":107,"./index":103,globals:174,"lodash/array/flatten":177,"lodash/collection/contains":181,"lodash/collection/each":182,"lodash/object/defaults":262,"lodash/object/extend":263,"lodash/object/has":264}],105:[function(require,module,exports){module.exports={ExpressionStatement:["Statement"],BreakStatement:["Statement"],ContinueStatement:["Statement"],DebuggerStatement:["Statement"],DoWhileStatement:["Statement","Loop","While","Scope"],IfStatement:["Statement"],ReturnStatement:["Statement"],SwitchStatement:["Statement"],ThrowStatement:["Statement"],TryStatement:["Statement"],WhileStatement:["Statement","Loop","While","Scope"],WithStatement:["Statement"],EmptyStatement:["Statement"],LabeledStatement:["Statement"],VariableDeclaration:["Statement","Declaration"],ExportDeclaration:["Statement","Declaration"],ImportDeclaration:["Statement","Declaration"],PrivateDeclaration:["Statement","Declaration"],ArrowFunctionExpression:["Scope","Function","Expression"],FunctionDeclaration:["Statement","Declaration","Scope","Function"],FunctionExpression:["Scope","Function","Expression"],BlockStatement:["Statement","Scope"],Program:["Scope"],CatchClause:["Scope"],LogicalExpression:["Binary","Expression"],BinaryExpression:["Binary","Expression"],UnaryExpression:["UnaryLike","Expression"],SpreadProperty:["UnaryLike"],SpreadElement:["UnaryLike"],ClassDeclaration:["Statement","Declaration","Class"],ClassExpression:["Class","Expression"],ForOfStatement:["Statement","For","Scope","Loop"],ForInStatement:["Statement","For","Scope","Loop"],ForStatement:["Statement","For","Scope","Loop"],ObjectPattern:["Pattern"],ArrayPattern:["Pattern"],AssignmentPattern:["Pattern"],Property:["UserWhitespacable"],JSXElement:["UserWhitespacable","Expression"],ArrayExpression:["Expression"],AssignmentExpression:["Expression"],AwaitExpression:["Expression"],BindFunctionExpression:["Expression"],BindMemberExpression:["Expression"],CallExpression:["Expression"],ComprehensionExpression:["Expression","Scope"],ConditionalExpression:["Expression"],Identifier:["Expression"],Literal:["Expression"],MemberExpression:["Expression"],NewExpression:["Expression"],ObjectExpression:["Expression"],SequenceExpression:["Expression"],TaggedTemplateExpression:["Expression"],ThisExpression:["Expression"],UpdateExpression:["Expression"],VirtualPropertyExpression:["Expression"],JSXEmptyExpression:["Expression"],JSXMemberExpression:["Expression"],YieldExpression:["Expression"],JSXAttribute:["JSX"],JSXClosingElement:["JSX"],JSXElement:["JSX"],JSXEmptyExpression:["JSX"],JSXExpressionContainer:["JSX"],JSXIdentifier:["JSX"],JSXMemberExpression:["JSX"],JSXNamespacedName:["JSX"],JSXOpeningElement:["JSX"],JSXSpreadAttribute:["JSX"]}},{}],106:[function(require,module,exports){module.exports={ArrayExpression:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["operator","left","right"],BinaryExpression:["operator","left","right"],BlockStatement:["body"],CallExpression:["callee","arguments"],ConditionalExpression:["test","consequent","alternate"],ExpressionStatement:["expression"],File:["program","comments","tokens"],FunctionExpression:["id","params","body","generator"],FunctionDeclaration:["id","params","body","generator"],Identifier:["name"],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportSpecifier:["id","name"],Literal:["value"],LogicalExpression:["operator","left","right"],MemberExpression:["object","property","computed"],MethodDefinition:["key","value","computed","kind"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],Program:["body"],Property:["kind","key","value","computed"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ThrowExpression:["argument"],UnaryExpression:["operator","argument","prefix"],VariableDeclaration:["kind","declarations"],VariableDeclarator:["id","init"],WithStatement:["object","body"],YieldExpression:["argument","delegate"]}},{}],107:[function(require,module,exports){"use strict";var toFastProperties=require("../helpers/to-fast-properties");var esutils=require("esutils");var object=require("../helpers/object");var Node=require("./node");var each=require("lodash/collection/each");var uniq=require("lodash/array/uniq");var compact=require("lodash/array/compact");var defaults=require("lodash/object/defaults");var isString=require("lodash/lang/isString");var t=exports;function registerType(type,skipAliasCheck){var is=t["is"+type]=function(node,opts){return t.is(type,node,opts,skipAliasCheck)};t["assert"+type]=function(node,opts){opts=opts||{};if(!is(node,opts)){throw new Error("Expected type "+JSON.stringify(type)+" with option "+JSON.stringify(opts))}}}t.STATEMENT_OR_BLOCK_KEYS=["consequent","body"];t.NATIVE_TYPE_NAMES=["Array","Object","Number","Boolean","Date","Array","String"];t.FOR_INIT_KEYS=["left","init"];t.VISITOR_KEYS=require("./visitor-keys");t.ALIAS_KEYS=require("./alias-keys");t.FLIPPED_ALIAS_KEYS={};each(t.VISITOR_KEYS,function(keys,type){registerType(type,true)});each(t.ALIAS_KEYS,function(aliases,type){each(aliases,function(alias){var types=t.FLIPPED_ALIAS_KEYS[alias]=t.FLIPPED_ALIAS_KEYS[alias]||[];types.push(type)})});each(t.FLIPPED_ALIAS_KEYS,function(types,type){t[type.toUpperCase()+"_TYPES"]=types;registerType(type,false)});t.is=function(type,node,opts,skipAliasCheck){if(!node)return;var typeMatches=type===node.type;if(!typeMatches&&!skipAliasCheck){var aliases=t.FLIPPED_ALIAS_KEYS[type];if(typeof aliases!=="undefined"){typeMatches=aliases.indexOf(node.type)>-1}}if(!typeMatches){return false}if(typeof opts!=="undefined"){return t.shallowEqual(node,opts)}return true};t.BUILDER_KEYS=defaults(require("./builder-keys"),t.VISITOR_KEYS);each(t.BUILDER_KEYS,function(keys,type){t[type[0].toLowerCase()+type.slice(1)]=function(){var args=arguments;var node=new Node;node.start=null;node.type=type;each(keys,function(key,i){node[key]=args[i]});return node}});t.toComputedKey=function(node,key){if(!node.computed){if(t.isIdentifier(key))key=t.literal(key.name)}return key};t.isFalsyExpression=function(node){if(t.isLiteral(node)){return!node.value}else if(t.isIdentifier(node)){return node.name==="undefined"}return false};t.toSequenceExpression=function(nodes,scope){var exprs=[];each(nodes,function(node){if(t.isExpression(node)){exprs.push(node)}if(t.isExpressionStatement(node)){exprs.push(node.expression)}else if(t.isVariableDeclaration(node)){each(node.declarations,function(declar){scope.push({kind:node.kind,key:declar.id.name,id:declar.id});exprs.push(t.assignmentExpression("=",declar.id,declar.init))})}});if(exprs.length===1){return exprs[0]}else{return t.sequenceExpression(exprs)}};t.shallowEqual=function(actual,expected){var keys=Object.keys(expected);for(var i=0;i<keys.length;i++){var key=keys[i];if(actual[key]!==expected[key]){return false}}return true};t.appendToMemberExpression=function(member,append,computed){member.object=t.memberExpression(member.object,member.property,member.computed);member.property=append;member.computed=!!computed;return member};t.prependToMemberExpression=function(member,append){member.object=t.memberExpression(append,member.object);return member};t.isReferenced=function(node,parent){if(t.isMemberExpression(parent)){if(parent.property===node&&parent.computed){return true}else if(parent.object===node){return true}else{return false}}if(t.isProperty(parent)&&parent.key===node){return parent.computed}if(t.isVariableDeclarator(parent)){return parent.id!==node}if(t.isFunction(parent)){for(var i=0;i<parent.params.length;i++){var param=parent.params[i];if(param===node)return false}return parent.id!==node}if(t.isClass(parent)){return parent.id!==node}if(t.isMethodDefinition(parent)){return parent.key===node&&parent.computed}if(t.isLabeledStatement(parent)){return false}if(t.isCatchClause(parent)){return parent.param!==node}if(t.isRestElement(parent)){return false}if(t.isAssignmentPattern(parent)){return parent.right!==node}if(t.isPattern(parent)){return false}if(t.isImportSpecifier(parent)){return false}if(t.isImportBatchSpecifier(parent)){return false}if(t.isPrivateDeclaration(parent)){return false}return true};t.isReferencedIdentifier=function(node,parent){return t.isIdentifier(node)&&t.isReferenced(node,parent)};t.isValidIdentifier=function(name){return isString(name)&&esutils.keyword.isIdentifierName(name)&&!esutils.keyword.isReservedWordES6(name,true)};t.toIdentifier=function(name){if(t.isIdentifier(name))return name.name;name=name+"";name=name.replace(/[^a-zA-Z0-9$_]/g,"-");name=name.replace(/^[-0-9]+/,"");name=name.replace(/[-\s]+(.)?/g,function(match,c){return c?c.toUpperCase():""});if(!t.isValidIdentifier(name)){name="_"+name}return name||"_"};t.ensureBlock=function(node,key){key=key||"body";node[key]=t.toBlock(node[key],node)};t.buildMatchMemberExpression=function(match,allowPartial){var parts=match.split(".");return function(member){if(!t.isMemberExpression(member))return false;var search=[member];var i=0;while(search.length){var node=search.shift();if(t.isIdentifier(node)){if(parts[i]!==node.name)return false}else if(t.isLiteral(node)){if(parts[i]!==node.value)return false}else if(t.isMemberExpression(node)){if(node.computed&&!t.isLiteral(node.property)){return false}else{search.push(node.object);search.push(node.property);continue}}else{return false}if(++i>parts.length){if(allowPartial){return true}else{return false}}}return true}};t.toStatement=function(node,ignore){if(t.isStatement(node)){return node}var mustHaveId=false;var newType;if(t.isClass(node)){mustHaveId=true;newType="ClassDeclaration"}else if(t.isFunction(node)){mustHaveId=true;newType="FunctionDeclaration"}else if(t.isAssignmentExpression(node)){return t.expressionStatement(node)}if(mustHaveId&&!node.id){newType=false}if(!newType){if(ignore){return false}else{throw new Error("cannot turn "+node.type+" to a statement")}}node.type=newType;return node};exports.toExpression=function(node){if(t.isExpressionStatement(node)){node=node.expression}if(t.isClass(node)){node.type="ClassExpression"}else if(t.isFunction(node)){node.type="FunctionExpression"}if(t.isExpression(node)){return node}else{throw new Error("cannot turn "+node.type+" to an expression")}};t.toBlock=function(node,parent){if(t.isBlockStatement(node)){return node}if(t.isEmptyStatement(node)){node=[]}if(!Array.isArray(node)){if(!t.isStatement(node)){if(t.isFunction(parent)){node=t.returnStatement(node)}else{node=t.expressionStatement(node)}}node=[node]}return t.blockStatement(node)};t.getBindingIdentifiers=function(node){var search=[].concat(node);var ids=object();while(search.length){var id=search.shift();if(!id)continue;var keys=t.getBindingIdentifiers.keys[id.type];if(t.isIdentifier(id)){ids[id.name]=id}else if(t.isExportDeclaration(id)){if(t.isDeclaration(node.declaration)){search.push(node.declaration)}}else if(keys){for(var i=0;i<keys.length;i++){var key=keys[i];search=search.concat(id[key]||[])}}}return ids};t.getBindingIdentifiers.keys={AssignmentExpression:["left"],ImportBatchSpecifier:["name"],ImportSpecifier:["name","id"],ExportSpecifier:["name","id"],VariableDeclarator:["id"],FunctionDeclaration:["id"],ClassDeclaration:["id"],MemeberExpression:["object"],SpreadElement:["argument"],RestElement:["argument"],UpdateExpression:["argument"],Property:["value"],ComprehensionBlock:["left"],AssignmentPattern:["left"],PrivateDeclaration:["declarations"],ComprehensionExpression:["blocks"],ImportDeclaration:["specifiers"],VariableDeclaration:["declarations"],ArrayPattern:["elements"],ObjectPattern:["properties"]};t.isLet=function(node){return t.isVariableDeclaration(node)&&(node.kind!=="var"||node._let)};t.isBlockScoped=function(node){return t.isFunctionDeclaration(node)||t.isClassDeclaration(node)||t.isLet(node)};t.isVar=function(node){return t.isVariableDeclaration(node,{kind:"var"})&&!node._let};t.COMMENT_KEYS=["leadingComments","trailingComments"];t.removeComments=function(child){each(t.COMMENT_KEYS,function(key){delete child[key]});return child};t.inheritsComments=function(child,parent){each(t.COMMENT_KEYS,function(key){child[key]=uniq(compact([].concat(child[key],parent[key])))});return child};t.inherits=function(child,parent){child.range=parent.range;child.start=parent.start;child.loc=parent.loc;child.end=parent.end;t.inheritsComments(child,parent);return child};t.getLastStatements=function(node){var nodes=[];var add=function(node){nodes=nodes.concat(t.getLastStatements(node))};if(t.isIfStatement(node)){add(node.consequent);add(node.alternate)}else if(t.isFor(node)||t.isWhile(node)){add(node.body)}else if(t.isProgram(node)||t.isBlockStatement(node)){add(node.body[node.body.length-1])}else if(node){nodes.push(node)}return nodes};t.getSpecifierName=function(specifier){return specifier.name||specifier.id};t.getSpecifierId=function(specifier){if(specifier.default){return t.identifier("default")}else{return specifier.id}};t.isSpecifierDefault=function(specifier){return specifier.default||t.isIdentifier(specifier.id)&&specifier.id.name==="default"};toFastProperties(t);toFastProperties(t.VISITOR_KEYS)},{"../helpers/object":26,"../helpers/to-fast-properties":27,"./alias-keys":105,"./builder-keys":106,"./node":108,"./visitor-keys":109,esutils:172,"lodash/array/compact":176,"lodash/array/uniq":180,"lodash/collection/each":182,"lodash/lang/isString":258,"lodash/object/defaults":262}],108:[function(require,module,exports){"use strict";module.exports=Node;var acorn=require("acorn-6to5");var oldNode=acorn.Node;acorn.Node=Node;function Node(){oldNode.apply(this)}},{"acorn-6to5":111}],109:[function(require,module,exports){module.exports={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","defaults","rest","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BindFunctionExpression:["callee","arguments"],BindMemberExpression:["object","property","arguments"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","body","superClass"],ClassExpression:["id","body","superClass"],ComprehensionBlock:["left","right","body"],ComprehensionExpression:["filter","blocks","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportBatchSpecifier:[],ExportDeclaration:["declaration","specifiers","source"],ExportSpecifier:["id","name"],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","defaults","rest","body"],FunctionExpression:["id","params","defaults","rest","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportBatchSpecifier:["id"],ImportDeclaration:["specifiers","source"],ImportSpecifier:["id","name"],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MethodDefinition:["key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateDeclaration:["declarations"],Program:["body"],Property:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],SpreadProperty:["argument"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handlers","handler","guardedHandlers","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],VirtualPropertyExpression:["object","property"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"],AnyTypeAnnotation:[],ArrayTypeAnnotation:[],BooleanTypeAnnotation:[],ClassProperty:["key"],DeclareClass:[],DeclareFunction:[],DeclareModule:[],DeclareVariable:[],FunctionTypeAnnotation:[],FunctionTypeParam:[],GenericTypeAnnotation:[],InterfaceExtends:[],InterfaceDeclaration:[],IntersectionTypeAnnotation:[],NullableTypeAnnotation:[],NumberTypeAnnotation:[],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],TupleTypeAnnotation:[],TypeofTypeAnnotation:[],TypeAlias:[],TypeAnnotation:[],TypeParameterDeclaration:[],TypeParameterInstantiation:[],ObjectTypeAnnotation:[],ObjectTypeCallProperty:[],ObjectTypeIndexer:[],ObjectTypeProperty:[],QualifiedTypeIdentifier:[],UnionTypeAnnotation:[],VoidTypeAnnotation:[],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","closingElement","children"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXSpreadAttribute:["argument"]}},{}],110:[function(require,module,exports){(function(Buffer,__dirname){"use strict";require("./patch");var estraverse=require("estraverse");var codeFrame=require("./helpers/code-frame");var traverse=require("./traverse");var debug=require("debug/node");var acorn=require("acorn-6to5");var path=require("path");var util=require("util");var fs=require("fs");var t=require("./types");var each=require("lodash/collection/each");var isNumber=require("lodash/lang/isNumber");var isString=require("lodash/lang/isString");var isRegExp=require("lodash/lang/isRegExp");var isEmpty=require("lodash/lang/isEmpty");var cloneDeep=require("lodash/lang/cloneDeep");var has=require("lodash/object/has");var contains=require("lodash/collection/contains");exports.inherits=util.inherits;exports.debug=debug("6to5");exports.canCompile=function(filename,altExts){var exts=altExts||exports.canCompile.EXTENSIONS;var ext=path.extname(filename);return contains(exts,ext)};exports.canCompile.EXTENSIONS=[".js",".jsx",".es6",".es"];exports.isInteger=function(i){return isNumber(i)&&i%1===0};exports.resolve=function(loc){try{return require.resolve(loc)}catch(err){return null}};exports.trimRight=function(str){return str.replace(/[\n\s]+$/g,"")};exports.list=function(val){return val?val.split(","):[]};exports.regexify=function(val){if(!val)return new RegExp(/.^/);if(Array.isArray(val))val=val.join("|");if(isString(val))return new RegExp(val);if(isRegExp(val))return val;throw new TypeError("illegal type for regexify")};exports.arrayify=function(val){if(!val)return[];if(isString(val))return exports.list(val);if(Array.isArray(val))return val;throw new TypeError("illegal type for arrayify")};exports.isAbsolute=function(loc){if(!loc)return false;if(loc[0]==="/")return true;if(loc[1]===":"&&loc[2]==="\\")return true;return false};exports.sourceMapToComment=function(map){var json=JSON.stringify(map);var base64=new Buffer(json).toString("base64");return"//# sourceMappingURL=data:application/json;base64,"+base64};var templateVisitor={enter:function(node,parent,scope,context,nodes){if(t.isIdentifier(node)&&has(nodes,node.name)){return nodes[node.name]}}};exports.template=function(name,nodes,keepExpression){var template=exports.templates[name];if(!template)throw new ReferenceError("unknown template "+name);if(nodes===true){keepExpression=true;nodes=null}template=cloneDeep(template);if(!isEmpty(nodes)){traverse(template,templateVisitor,null,nodes)}var node=template.body[0];if(!keepExpression&&t.isExpressionStatement(node)){return node.expression}else{return node}};exports.repeat=function(width,cha){cha=cha||" ";var result="";for(var i=0;i<width;i++){result+=cha}return result};exports.normalizeAst=function(ast,comments,tokens){if(ast&&ast.type==="Program"){return t.file(ast,comments||[],tokens||[])}else{throw new Error("Not a valid ast?")}};exports.parse=function(opts,code,callback){try{var comments=[];var tokens=[];var ast=acorn.parse(code,{allowImportExportEverywhere:opts.allowImportExportEverywhere,allowReturnOutsideFunction:!opts._anal,ecmaVersion:opts.experimental?7:6,playground:opts.playground,strictMode:opts.strictMode,onComment:comments,locations:true,onToken:tokens,ranges:true});estraverse.attachComments(ast,comments,tokens);ast=exports.normalizeAst(ast,comments,tokens);if(callback){return callback(ast)}else{return ast}}catch(err){if(!err._6to5){err._6to5=true;var message=opts.filename+": "+err.message;var loc=err.loc;if(loc){var frame=codeFrame(code,loc.line,loc.column+1);message+=frame}if(err.stack)err.stack=err.stack.replace(err.message,message);err.message=message}throw err}};exports.parseTemplate=function(loc,code){var ast=exports.parse({filename:loc},code).program;return traverse.removeProperties(ast)};var loadTemplates=function(){var templates={};var templatesLoc=__dirname+"/transformation/templates";if(!fs.existsSync(templatesLoc)){throw new Error("no templates directory - this is most likely the "+"result of a broken `npm publish`. Please report to "+"https://github.com/6to5/6to5/issues")}each(fs.readdirSync(templatesLoc),function(name){if(name[0]===".")return;var key=path.basename(name,path.extname(name));var loc=templatesLoc+"/"+name;var code=fs.readFileSync(loc,"utf8");templates[key]=exports.parseTemplate(loc,code)});return templates};try{exports.templates=require("../../templates.json")}catch(err){if(err.code!=="MODULE_NOT_FOUND")throw err;exports.templates=loadTemplates()}}).call(this,require("buffer").Buffer,"/lib/6to5")},{"../../templates.json":302,"./helpers/code-frame":24,"./patch":28,"./traverse":103,"./types":107,"acorn-6to5":111,buffer:128,"debug/node":163,estraverse:168,fs:126,"lodash/collection/contains":181,"lodash/collection/each":182,"lodash/lang/cloneDeep":247,"lodash/lang/isEmpty":251,"lodash/lang/isNumber":254,"lodash/lang/isRegExp":257,"lodash/lang/isString":258,"lodash/object/has":264,path:135,util:152}],111:[function(require,module,exports){(function(root,mod){if(typeof exports=="object"&&typeof module=="object")return mod(exports);if(typeof define=="function"&&define.amd)return define(["exports"],mod);mod(root.acorn||(root.acorn={})) })(this,function(exports){"use strict";exports.version="0.11.1";var options,input,inputLen,sourceFile;exports.parse=function(inpt,opts){input=String(inpt);inputLen=input.length;setOptions(opts);initTokenState();var startPos=options.locations?[tokPos,curPosition()]:tokPos;initParserState();return parseTopLevel(options.program||startNodeAt(startPos))};var defaultOptions=exports.defaultOptions={playground:false,ecmaVersion:5,strictSemicolons:false,allowTrailingCommas:true,forbidReserved:false,allowReturnOutsideFunction:false,allowImportExportEverywhere:false,allowHashBang:false,locations:false,onToken:null,onComment:null,ranges:false,program:null,sourceFile:null,directSourceFile:null,preserveParens:false};exports.parseExpressionAt=function(inpt,pos,opts){input=String(inpt);inputLen=input.length;setOptions(opts);initTokenState(pos);initParserState();return parseExpression()};var isArray=function(obj){return Object.prototype.toString.call(obj)==="[object Array]"};function setOptions(opts){options={};for(var opt in defaultOptions)options[opt]=opts&&has(opts,opt)?opts[opt]:defaultOptions[opt];sourceFile=options.sourceFile||null;if(isArray(options.onToken)){var tokens=options.onToken;options.onToken=function(token){tokens.push(token)}}if(isArray(options.onComment)){var comments=options.onComment;options.onComment=function(block,text,start,end,startLoc,endLoc){var comment={type:block?"Block":"Line",value:text,start:start,end:end};if(options.locations){comment.loc=new SourceLocation;comment.loc.start=startLoc;comment.loc.end=endLoc}if(options.ranges)comment.range=[start,end];comments.push(comment)}}if(options.strictMode){strict=true}if(options.ecmaVersion>=6){isKeyword=isEcma6Keyword}else{isKeyword=isEcma5AndLessKeyword}}var getLineInfo=exports.getLineInfo=function(input,offset){for(var line=1,cur=0;;){lineBreak.lastIndex=cur;var match=lineBreak.exec(input);if(match&&match.index<offset){++line;cur=match.index+match[0].length}else break}return{line:line,column:offset-cur}};function Token(){this.type=tokType;this.value=tokVal;this.start=tokStart;this.end=tokEnd;if(options.locations){this.loc=new SourceLocation;this.loc.end=tokEndLoc}if(options.ranges)this.range=[tokStart,tokEnd]}exports.Token=Token;exports.tokenize=function(inpt,opts){input=String(inpt);inputLen=input.length;setOptions(opts);initTokenState();skipSpace();function getToken(){lastEnd=tokEnd;readToken();return new Token}getToken.jumpTo=function(pos,exprAllowed){tokPos=pos;if(options.locations){tokCurLine=1;tokLineStart=lineBreak.lastIndex=0;var match;while((match=lineBreak.exec(input))&&match.index<pos){++tokCurLine;tokLineStart=match.index+match[0].length}}tokExprAllowed=!!exprAllowed;skipSpace()};getToken.current=function(){return new Token};if(typeof Symbol!=="undefined"){getToken[Symbol.iterator]=function(){return{next:function(){var token=getToken();return{done:token.type===_eof,value:token}}}}}getToken.options=options;return getToken};var tokPos;var tokStart,tokEnd;var tokStartLoc,tokEndLoc;var tokType,tokVal;var tokContext,tokExprAllowed;var tokCurLine,tokLineStart;var lastStart,lastEnd,lastEndLoc;var inFunction,inGenerator,inAsync,labels,strict,inXJSChild,inXJSTag,inType;function initParserState(){lastStart=lastEnd=tokPos;if(options.locations)lastEndLoc=curPosition();inFunction=inGenerator=inAsync=false;labels=[];skipSpace();readToken()}function raise(pos,message){var loc=getLineInfo(input,pos);message+=" ("+loc.line+":"+loc.column+")";var err=new SyntaxError(message);err.pos=pos;err.loc=loc;err.raisedAt=tokPos;throw err}var empty=[];var _num={type:"num"},_regexp={type:"regexp"},_string={type:"string"};var _name={type:"name"},_eof={type:"eof"};var _jsxName={type:"jsxName"};var _xjsName={type:"xjsName"},_xjsText={type:"xjsText"};var _break={keyword:"break"},_case={keyword:"case",beforeExpr:true},_catch={keyword:"catch"};var _continue={keyword:"continue"},_debugger={keyword:"debugger"},_default={keyword:"default"};var _do={keyword:"do",isLoop:true},_else={keyword:"else",beforeExpr:true};var _finally={keyword:"finally"},_for={keyword:"for",isLoop:true},_function={keyword:"function"};var _if={keyword:"if"},_return={keyword:"return",beforeExpr:true},_switch={keyword:"switch"};var _throw={keyword:"throw",beforeExpr:true},_try={keyword:"try"},_var={keyword:"var"};var _let={keyword:"let"},_const={keyword:"const"};var _while={keyword:"while",isLoop:true},_with={keyword:"with"},_new={keyword:"new",beforeExpr:true};var _this={keyword:"this"};var _class={keyword:"class"},_extends={keyword:"extends",beforeExpr:true};var _export={keyword:"export"},_import={keyword:"import"};var _yield={keyword:"yield",beforeExpr:true};var _null={keyword:"null",atomValue:null},_true={keyword:"true",atomValue:true};var _false={keyword:"false",atomValue:false};var _in={keyword:"in",binop:7,beforeExpr:true};var keywordTypes={"break":_break,"case":_case,"catch":_catch,"continue":_continue,"debugger":_debugger,"default":_default,"do":_do,"else":_else,"finally":_finally,"for":_for,"function":_function,"if":_if,"return":_return,"switch":_switch,"throw":_throw,"try":_try,"var":_var,let:_let,"const":_const,"while":_while,"with":_with,"null":_null,"true":_true,"false":_false,"new":_new,"in":_in,"instanceof":{keyword:"instanceof",binop:7,beforeExpr:true},"this":_this,"typeof":{keyword:"typeof",prefix:true,beforeExpr:true},"void":{keyword:"void",prefix:true,beforeExpr:true},"delete":{keyword:"delete",prefix:true,beforeExpr:true},"class":_class,"extends":_extends,"export":_export,"import":_import,"yield":_yield};var _bracketL={type:"[",beforeExpr:true},_bracketR={type:"]"},_braceL={type:"{",beforeExpr:true};var _braceR={type:"}"},_parenL={type:"(",beforeExpr:true},_parenR={type:")"};var _comma={type:",",beforeExpr:true},_semi={type:";",beforeExpr:true};var _colon={type:":",beforeExpr:true},_dot={type:"."},_question={type:"?",beforeExpr:true};var _arrow={type:"=>",beforeExpr:true},_template={type:"template"};var _ellipsis={type:"...",beforeExpr:true};var _backQuote={type:"`"},_dollarBraceL={type:"${",beforeExpr:true};var _jsxText={type:"jsxText"};var _paamayimNekudotayim={type:"::",beforeExpr:true};var _at={type:"@"};var _hash={type:"#"};var _slash={binop:10,beforeExpr:true},_eq={isAssign:true,beforeExpr:true};var _assign={isAssign:true,beforeExpr:true};var _incDec={postfix:true,prefix:true,isUpdate:true},_prefix={prefix:true,beforeExpr:true};var _logicalOR={binop:1,beforeExpr:true};var _logicalAND={binop:2,beforeExpr:true};var _bitwiseOR={binop:3,beforeExpr:true};var _bitwiseXOR={binop:4,beforeExpr:true};var _bitwiseAND={binop:5,beforeExpr:true};var _equality={binop:6,beforeExpr:true};var _relational={binop:7,beforeExpr:true};var _bitShift={binop:8,beforeExpr:true};var _plusMin={binop:9,prefix:true,beforeExpr:true};var _modulo={binop:10,beforeExpr:true};var _star={binop:10,beforeExpr:true};var _exponent={binop:11,beforeExpr:true,rightAssociative:true};var _jsxTagStart={type:"jsxTagStart"},_jsxTagEnd={type:"jsxTagEnd"};exports.tokTypes={bracketL:_bracketL,bracketR:_bracketR,braceL:_braceL,braceR:_braceR,parenL:_parenL,parenR:_parenR,comma:_comma,semi:_semi,colon:_colon,dot:_dot,ellipsis:_ellipsis,question:_question,slash:_slash,eq:_eq,name:_name,eof:_eof,num:_num,regexp:_regexp,string:_string,paamayimNekudotayim:_paamayimNekudotayim,exponent:_exponent,at:_at,hash:_hash,arrow:_arrow,template:_template,star:_star,assign:_assign,backQuote:_backQuote,dollarBraceL:_dollarBraceL};for(var kw in keywordTypes)exports.tokTypes["_"+kw]=keywordTypes[kw];var isReservedWord3=function anonymous(str){switch(str.length){case 6:switch(str){case"double":case"export":case"import":case"native":case"public":case"static":case"throws":return true}return false;case 4:switch(str){case"byte":case"char":case"enum":case"goto":case"long":return true}return false;case 5:switch(str){case"class":case"final":case"float":case"short":case"super":return true}return false;case 7:switch(str){case"boolean":case"extends":case"package":case"private":return true}return false;case 9:switch(str){case"interface":case"protected":case"transient":return true}return false;case 8:switch(str){case"abstract":case"volatile":return true}return false;case 10:return str==="implements";case 3:return str==="int";case 12:return str==="synchronized"}};var isReservedWord5=function anonymous(str){switch(str.length){case 5:switch(str){case"class":case"super":case"const":return true}return false;case 6:switch(str){case"export":case"import":return true}return false;case 4:return str==="enum";case 7:return str==="extends"}};var isStrictReservedWord=function anonymous(str){switch(str.length){case 9:switch(str){case"interface":case"protected":return true}return false;case 7:switch(str){case"package":case"private":return true}return false;case 6:switch(str){case"public":case"static":return true}return false;case 10:return str==="implements";case 3:return str==="let";case 5:return str==="yield"}};var isStrictBadIdWord=function anonymous(str){switch(str){case"eval":case"arguments":return true}return false};var ecma5AndLessKeywords="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";var isEcma5AndLessKeyword=function anonymous(str){switch(str.length){case 4:switch(str){case"case":case"else":case"with":case"null":case"true":case"void":case"this":return true}return false;case 5:switch(str){case"break":case"catch":case"throw":case"while":case"false":return true}return false;case 3:switch(str){case"for":case"try":case"var":case"new":return true}return false;case 6:switch(str){case"return":case"switch":case"typeof":case"delete":return true}return false;case 8:switch(str){case"continue":case"debugger":case"function":return true}return false;case 2:switch(str){case"do":case"if":case"in":return true}return false;case 7:switch(str){case"default":case"finally":return true}return false;case 10:return str==="instanceof"}};var ecma6AndLessKeywords=ecma5AndLessKeywords+" let const class extends export import yield";var isEcma6Keyword=function anonymous(str){switch(str.length){case 5:switch(str){case"break":case"catch":case"throw":case"while":case"false":case"const":case"class":case"yield":return true}return false;case 4:switch(str){case"case":case"else":case"with":case"null":case"true":case"void":case"this":return true}return false;case 6:switch(str){case"return":case"switch":case"typeof":case"delete":case"export":case"import":return true}return false;case 3:switch(str){case"for":case"try":case"var":case"new":case"let":return true}return false;case 8:switch(str){case"continue":case"debugger":case"function":return true}return false;case 7:switch(str){case"default":case"finally":case"extends":return true}return false;case 2:switch(str){case"do":case"if":case"in":return true}return false;case 10:return str==="instanceof"}};var isKeyword=isEcma5AndLessKeyword;var nonASCIIwhitespace=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;var nonASCIIidentifierStartChars="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";var nonASCIIidentifierChars="̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧙ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_";var nonASCIIidentifierStart=new RegExp("["+nonASCIIidentifierStartChars+"]");var nonASCIIidentifier=new RegExp("["+nonASCIIidentifierStartChars+nonASCIIidentifierChars+"]");var decimalNumber=/^\d+$/;var hexNumber=/^[\da-fA-F]+$/;var newline=/[\n\r\u2028\u2029]/;function isNewLine(code){return code===10||code===13||code===8232||code==8233}var lineBreak=/\r\n|[\n\r\u2028\u2029]/g;var isIdentifierStart=exports.isIdentifierStart=function(code){if(code<65)return code===36;if(code<91)return true;if(code<97)return code===95;if(code<123)return true;return code>=170&&nonASCIIidentifierStart.test(String.fromCharCode(code))};var isIdentifierChar=exports.isIdentifierChar=function(code){if(code<48)return code===36;if(code<58)return true;if(code<65)return false;if(code<91)return true;if(code<97)return code===95;if(code<123)return true;return code>=170&&nonASCIIidentifier.test(String.fromCharCode(code))};function Position(line,col){this.line=line;this.column=col}Position.prototype.offset=function(n){return new Position(this.line,this.column+n)};function curPosition(){return new Position(tokCurLine,tokPos-tokLineStart)}function initTokenState(pos){if(pos){tokPos=pos;tokLineStart=Math.max(0,input.lastIndexOf("\n",pos));tokCurLine=input.slice(0,tokLineStart).split(newline).length}else{tokCurLine=1;tokPos=tokLineStart=0}tokType=_eof;tokContext=[b_stat];tokExprAllowed=true;inType=strict=false;if(tokPos===0&&options.allowHashBang&&input.slice(0,2)==="#!"){skipLineComment(2)}}var b_stat={token:"{",isExpr:false},b_expr={token:"{",isExpr:true},b_tmpl={token:"${",isExpr:true};var p_stat={token:"(",isExpr:false},p_expr={token:"(",isExpr:true};var q_tmpl={token:"`",isExpr:true},f_expr={token:"function",isExpr:true};var j_oTag={token:"<tag",isExpr:false},j_cTag={token:"</tag",isExpr:false},j_expr={token:"<tag>...</tag>",isExpr:true};function curTokContext(){return tokContext[tokContext.length-1]}function braceIsBlock(prevType){var parent;if(prevType===_colon&&(parent=curTokContext()).token=="{")return!parent.isExpr;if(prevType===_return)return newline.test(input.slice(lastEnd,tokStart));if(prevType===_else||prevType===_semi||prevType===_eof)return true;if(prevType==_braceL)return curTokContext()===b_stat;return!tokExprAllowed}function finishToken(type,val){tokEnd=tokPos;if(options.locations)tokEndLoc=curPosition();var prevType=tokType,preserveSpace=false;tokType=type;tokVal=val;if(type===_parenR||type===_braceR){var out=tokContext.pop();if(out===b_tmpl){preserveSpace=tokExprAllowed=true}else if(out===b_stat&&curTokContext()===f_expr){tokContext.pop();tokExprAllowed=false}else{tokExprAllowed=!(out&&out.isExpr)}}else if(type===_braceL){switch(curTokContext()){case j_oTag:tokContext.push(b_expr);break;case j_expr:tokContext.push(b_tmpl);break;default:tokContext.push(braceIsBlock(prevType)?b_stat:b_expr)}tokExprAllowed=true}else if(type===_dollarBraceL){tokContext.push(b_tmpl);tokExprAllowed=true}else if(type==_parenL){var statementParens=prevType===_if||prevType===_for||prevType===_with||prevType===_while;tokContext.push(statementParens?p_stat:p_expr);tokExprAllowed=true}else if(type==_incDec){}else if(type.keyword&&prevType==_dot){tokExprAllowed=false}else if(type==_function){if(curTokContext()!==b_stat){tokContext.push(f_expr)}tokExprAllowed=false}else if(type===_backQuote){if(curTokContext()===q_tmpl){tokContext.pop()}else{tokContext.push(q_tmpl);preserveSpace=true}tokExprAllowed=false}else if(type===_jsxTagStart){tokContext.push(j_expr);tokContext.push(j_oTag);tokExprAllowed=false}else if(type===_jsxTagEnd){var out=tokContext.pop();if(out===j_oTag&&prevType===_slash||out===j_cTag){tokContext.pop();preserveSpace=tokExprAllowed=curTokContext()===j_expr}else{preserveSpace=tokExprAllowed=true}}else if(type===_jsxText){preserveSpace=tokExprAllowed=true}else if(type===_slash&&prevType===_jsxTagStart){tokContext.length-=2;tokContext.push(j_cTag);tokExprAllowed=false}else{tokExprAllowed=type.beforeExpr}if(!preserveSpace)skipSpace()}function skipBlockComment(){var startLoc=options.onComment&&options.locations&&curPosition();var start=tokPos,end=input.indexOf("*/",tokPos+=2);if(end===-1)raise(tokPos-2,"Unterminated comment");tokPos=end+2;if(options.locations){lineBreak.lastIndex=start;var match;while((match=lineBreak.exec(input))&&match.index<tokPos){++tokCurLine;tokLineStart=match.index+match[0].length}}if(options.onComment)options.onComment(true,input.slice(start+2,end),start,tokPos,startLoc,options.locations&&curPosition())}function skipLineComment(startSkip){var start=tokPos;var startLoc=options.onComment&&options.locations&&curPosition();var ch=input.charCodeAt(tokPos+=startSkip);while(tokPos<inputLen&&ch!==10&&ch!==13&&ch!==8232&&ch!==8233){++tokPos;ch=input.charCodeAt(tokPos)}if(options.onComment)options.onComment(false,input.slice(start+startSkip,tokPos),start,tokPos,startLoc,options.locations&&curPosition())}function skipSpace(){while(tokPos<inputLen){var ch=input.charCodeAt(tokPos);if(ch===32){++tokPos}else if(ch===13){++tokPos;var next=input.charCodeAt(tokPos);if(next===10){++tokPos}if(options.locations){++tokCurLine;tokLineStart=tokPos}}else if(ch===10||ch===8232||ch===8233){++tokPos;if(options.locations){++tokCurLine;tokLineStart=tokPos}}else if(ch>8&&ch<14){++tokPos}else if(ch===47){var next=input.charCodeAt(tokPos+1);if(next===42){skipBlockComment()}else if(next===47){skipLineComment(2)}else break}else if(ch===160){++tokPos}else if(ch>=5760&&nonASCIIwhitespace.test(String.fromCharCode(ch))){++tokPos}else{break}}}function readToken_dot(){var next=input.charCodeAt(tokPos+1);if(next>=48&&next<=57)return readNumber(true);var next2=input.charCodeAt(tokPos+2);if(options.playground&&next===63){tokPos+=2;return finishToken(_dotQuestion)}else if(options.ecmaVersion>=6&&next===46&&next2===46){tokPos+=3;return finishToken(_ellipsis)}else{++tokPos;return finishToken(_dot)}}function readToken_slash(){var next=input.charCodeAt(tokPos+1);if(tokExprAllowed){++tokPos;return readRegexp()}if(next===61)return finishOp(_assign,2);return finishOp(_slash,1)}function readToken_modulo(){var next=input.charCodeAt(tokPos+1);if(next===61)return finishOp(_assign,2);return finishOp(_modulo,1)}function readToken_mult(){var type=_star;var width=1;var next=input.charCodeAt(tokPos+1);if(options.ecmaVersion>=7&&next===42){width++;next=input.charCodeAt(tokPos+2);type=_exponent}if(next===61){width++;type=_assign}return finishOp(type,width)}function readToken_pipe_amp(code){var next=input.charCodeAt(tokPos+1);if(next===code){if(options.playground&&input.charCodeAt(tokPos+2)===61)return finishOp(_assign,3);return finishOp(code===124?_logicalOR:_logicalAND,2)}if(next===61)return finishOp(_assign,2);return finishOp(code===124?_bitwiseOR:_bitwiseAND,1)}function readToken_caret(){var next=input.charCodeAt(tokPos+1);if(next===61)return finishOp(_assign,2);return finishOp(_bitwiseXOR,1)}function readToken_plus_min(code){var next=input.charCodeAt(tokPos+1);if(next===code){if(next==45&&input.charCodeAt(tokPos+2)==62&&newline.test(input.slice(lastEnd,tokPos))){skipLineComment(3);skipSpace();return readToken()}return finishOp(_incDec,2)}if(next===61)return finishOp(_assign,2);return finishOp(_plusMin,1)}function readToken_lt_gt(code){var next=input.charCodeAt(tokPos+1);var size=1;if(!inType&&next===code){size=code===62&&input.charCodeAt(tokPos+2)===62?3:2;if(input.charCodeAt(tokPos+size)===61)return finishOp(_assign,size+1);return finishOp(_bitShift,size)}if(next==33&&code==60&&input.charCodeAt(tokPos+2)==45&&input.charCodeAt(tokPos+3)==45){skipLineComment(4);skipSpace();return readToken()}if(!inType){if(tokExprAllowed&&code===60){++tokPos;return finishToken(_jsxTagStart)}if(code===62){var context=curTokContext();if(context===j_oTag||context===j_cTag){++tokPos;return finishToken(_jsxTagEnd)}}}if(next===61)size=input.charCodeAt(tokPos+2)===61?3:2;return finishOp(_relational,size)}function readToken_eq_excl(code){var next=input.charCodeAt(tokPos+1);if(next===61)return finishOp(_equality,input.charCodeAt(tokPos+2)===61?3:2);if(code===61&&next===62&&options.ecmaVersion>=6){tokPos+=2;return finishToken(_arrow)}return finishOp(code===61?_eq:_prefix,1)}function getTemplateToken(code){if(tokType===_string){if(code===96){++tokPos;return finishToken(_bquote)}else if(code===36&&input.charCodeAt(tokPos+1)===123){tokPos+=2;return finishToken(_dollarBraceL)}}return readTmplString()}function getTokenFromCode(code){switch(code){case 46:return readToken_dot();case 40:++tokPos;return finishToken(_parenL);case 41:++tokPos;return finishToken(_parenR);case 59:++tokPos;return finishToken(_semi);case 44:++tokPos;return finishToken(_comma);case 91:++tokPos;return finishToken(_bracketL);case 93:++tokPos;return finishToken(_bracketR);case 123:++tokPos;return finishToken(_braceL);case 125:++tokPos;return finishToken(_braceR);case 63:++tokPos;return finishToken(_question);case 64:if(options.playground){++tokPos;return finishToken(_at)}case 35:if(options.playground){++tokPos;return finishToken(_hash)}case 58:++tokPos;if(options.ecmaVersion>=7){var next=input.charCodeAt(tokPos);if(next===58){++tokPos;return finishToken(_paamayimNekudotayim)}}return finishToken(_colon);case 96:if(options.ecmaVersion>=6){++tokPos;return finishToken(_backQuote)}else{return false}case 48:var next=input.charCodeAt(tokPos+1);if(next===120||next===88)return readRadixNumber(16);if(options.ecmaVersion>=6){if(next===111||next===79)return readRadixNumber(8);if(next===98||next===66)return readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return readNumber(false);case 34:case 39:return inXJSTag?readXJSStringLiteral():readString(code);case 47:return readToken_slash();case 37:return readToken_modulo();case 42:return readToken_mult();case 124:case 38:return readToken_pipe_amp(code);case 94:return readToken_caret();case 43:case 45:return readToken_plus_min(code);case 60:case 62:return readToken_lt_gt(code);case 61:case 33:return readToken_eq_excl(code);case 126:return finishOp(_prefix,1)}return false}function readToken(){tokStart=tokPos;if(options.locations)tokStartLoc=curPosition();if(tokPos>=inputLen)return finishToken(_eof);var context=curTokContext();if(context===q_tmpl){return readTmplToken()}if(context===j_expr){return readJSXToken()}var code=input.charCodeAt(tokPos);if(context===j_oTag||context===j_cTag){if(isIdentifierStart(code))return readJSXWord()}else if(context===j_expr){return readJSXToken()}else{if(isIdentifierStart(code)||code===92)return readWord()}var tok=getTokenFromCode(code);if(tok===false){var ch=String.fromCharCode(code);if(ch==="\\"||nonASCIIidentifierStart.test(ch))return readWord();raise(tokPos,"Unexpected character '"+ch+"'")}return tok}function finishOp(type,size,shouldSkipSpace){var str=input.slice(tokPos,tokPos+size);tokPos+=size;finishToken(type,str,shouldSkipSpace)}var regexpUnicodeSupport=false;try{new RegExp("￿","u");regexpUnicodeSupport=true}catch(e){}function readRegexp(){var content="",escaped,inClass,start=tokPos;for(;;){if(tokPos>=inputLen)raise(start,"Unterminated regular expression");var ch=nextChar();if(newline.test(ch))raise(start,"Unterminated regular expression");if(!escaped){if(ch==="[")inClass=true;else if(ch==="]"&&inClass)inClass=false;else if(ch==="/"&&!inClass)break;escaped=ch==="\\"}else escaped=false;++tokPos}var content=input.slice(start,tokPos);++tokPos;var mods=readWord1();var tmp=content;if(mods){var validFlags=/^[gmsiy]*$/;if(options.ecmaVersion>=6)validFlags=/^[gmsiyu]*$/;if(!validFlags.test(mods))raise(start,"Invalid regular expression flag");if(mods.indexOf("u")>=0&&!regexpUnicodeSupport){tmp=tmp.replace(/\\u\{([0-9a-fA-F]{5,6})\}/g,"x").replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x")}}try{new RegExp(tmp)}catch(e){if(e instanceof SyntaxError)raise(start,"Error parsing regular expression: "+e.message);raise(e)}try{var value=new RegExp(content,mods)}catch(err){value=null}return finishToken(_regexp,{pattern:content,flags:mods,value:value})}function readInt(radix,len){var start=tokPos,total=0;for(var i=0,e=len==null?Infinity:len;i<e;++i){var code=input.charCodeAt(tokPos),val;if(code>=97)val=code-97+10;else if(code>=65)val=code-65+10;else if(code>=48&&code<=57)val=code-48;else val=Infinity;if(val>=radix)break;++tokPos;total=total*radix+val}if(tokPos===start||len!=null&&tokPos-start!==len)return null;return total}function readRadixNumber(radix){tokPos+=2;var val=readInt(radix);if(val==null)raise(tokStart+2,"Expected number in radix "+radix);if(isIdentifierStart(input.charCodeAt(tokPos)))raise(tokPos,"Identifier directly after number");return finishToken(_num,val)}function readNumber(startsWithDot){var start=tokPos,isFloat=false,octal=input.charCodeAt(tokPos)===48;if(!startsWithDot&&readInt(10)===null)raise(start,"Invalid number");if(input.charCodeAt(tokPos)===46){++tokPos;readInt(10);isFloat=true}var next=input.charCodeAt(tokPos);if(next===69||next===101){next=input.charCodeAt(++tokPos);if(next===43||next===45)++tokPos;if(readInt(10)===null)raise(start,"Invalid number");isFloat=true}if(isIdentifierStart(input.charCodeAt(tokPos)))raise(tokPos,"Identifier directly after number");var str=input.slice(start,tokPos),val;if(isFloat)val=parseFloat(str);else if(!octal||str.length===1)val=parseInt(str,10);else if(/[89]/.test(str)||strict)raise(start,"Invalid number");else val=parseInt(str,8);return finishToken(_num,val)}function readCodePoint(){var ch=input.charCodeAt(tokPos),code;if(ch===123){if(options.ecmaVersion<6)unexpected();++tokPos;code=readHexChar(input.indexOf("}",tokPos)-tokPos);++tokPos;if(code>1114111)unexpected()}else{code=readHexChar(4)}if(code<=65535){return String.fromCharCode(code)}var cu1=(code-65536>>10)+55296;var cu2=(code-65536&1023)+56320;return String.fromCharCode(cu1,cu2)}function readString(quote){var isJSX=curTokContext()===j_oTag;var out="",chunkStart=++tokPos;for(;;){if(tokPos>=inputLen)raise(tokStart,"Unterminated string constant");var ch=input.charCodeAt(tokPos);if(ch===quote)break;if(ch===92&&!isJSX){out+=input.slice(chunkStart,tokPos);out+=readEscapedChar();chunkStart=tokPos}else if(ch===38&&isJSX){out+=input.slice(chunkStart,tokPos);out+=readJSXEntity();chunkStart=tokPos}else{if(isNewLine(ch))raise(tokStart,"Unterminated string constant");++tokPos}}out+=input.slice(chunkStart,tokPos++);return finishToken(_string,out)}function readTmplToken(){var out="",chunkStart=tokPos;for(;;){if(tokPos>=inputLen)raise(tokStart,"Unterminated template");var ch=input.charCodeAt(tokPos);if(ch===96||ch===36&&input.charCodeAt(tokPos+1)===123){if(tokPos===tokStart&&tokType===_template){if(ch===36){tokPos+=2;return finishToken(_dollarBraceL)}else{++tokPos;return finishToken(_backQuote)}}out+=input.slice(chunkStart,tokPos);return finishToken(_template,out)}if(ch===92){out+=input.slice(chunkStart,tokPos);out+=readEscapedChar();chunkStart=tokPos}else if(isNewLine(ch)){out+=input.slice(chunkStart,tokPos);++tokPos;if(ch===13&&input.charCodeAt(tokPos)===10){++tokPos;out+="\n"}else{out+=String.fromCharCode(ch)}if(options.locations){++tokCurLine;tokLineStart=tokPos}chunkStart=tokPos}else{++tokPos}}}var XHTMLEntities={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪","int":"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"};function readJSXEntity(){var str="",count=0,entity;var ch=input[tokPos];if(ch!=="&")raise(tokPos,"Entity must start with an ampersand");var startPos=++tokPos;while(tokPos<inputLen&&count++<10){ch=input[tokPos++];if(ch===";"){if(str[0]==="#"){if(str[1]==="x"){str=str.substr(2);if(hexNumber.test(str)){entity=String.fromCharCode(parseInt(str,16))}}else{str=str.substr(1);if(decimalNumber.test(str)){entity=String.fromCharCode(parseInt(str,10))}}}else{entity=XHTMLEntities[str]}break}str+=ch}if(!entity){tokPos=startPos;return"&"}return entity}function readJSXToken(){var out="",start=tokPos;for(;;){if(tokPos>=inputLen)raise(tokStart,"Unterminated JSX contents");var ch=input.charCodeAt(tokPos);switch(ch){case 123:case 60:if(tokPos===start){return getTokenFromCode(ch)}return finishToken(_jsxText,out);case 38:out+=readJSXEntity();break;default:++tokPos;if(isNewLine(ch)){if(ch===13&&input.charCodeAt(tokPos)===10){++tokPos;ch=10}if(options.locations){++tokCurLine;tokLineStart=tokPos}}out+=String.fromCharCode(ch)}}}function readEscapedChar(){var ch=input.charCodeAt(++tokPos);var octal=/^[0-7]+/.exec(input.slice(tokPos,tokPos+3));if(octal)octal=octal[0];while(octal&&parseInt(octal,8)>255)octal=octal.slice(0,-1);if(octal==="0")octal=null;++tokPos;if(octal){if(strict)raise(tokPos-2,"Octal literal in strict mode");tokPos+=octal.length-1;return String.fromCharCode(parseInt(octal,8))}else{switch(ch){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(readHexChar(2));case 117:return readCodePoint();case 116:return" ";case 98:return"\b";case 118:return" ";case 102:return"\f";case 48:return"\x00";case 13:if(input.charCodeAt(tokPos)===10)++tokPos;case 10:if(options.locations){tokLineStart=tokPos;++tokCurLine}return"";default:return String.fromCharCode(ch)}}}var XHTMLEntities={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪","int":"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}; function readXJSEntity(){var str="",count=0,entity;var ch=nextChar();if(ch!=="&")raise(tokPos,"Entity must start with an ampersand");var startPos=++tokPos;while(tokPos<inputLen&&count++<10){ch=nextChar();tokPos++;if(ch===";"){if(str[0]==="#"){if(str[1]==="x"){str=str.substr(2);if(hexNumber.test(str)){entity=String.fromCharCode(parseInt(str,16))}}else{str=str.substr(1);if(decimalNumber.test(str)){entity=String.fromCharCode(parseInt(str,10))}}}else{entity=XHTMLEntities[str]}break}str+=ch}if(!entity){tokPos=startPos;return"&"}return entity}function readXJSText(stopChars){var str="";while(tokPos<inputLen){var ch=nextChar();if(stopChars.indexOf(ch)!==-1){break}if(ch==="&"){str+=readXJSEntity()}else{++tokPos;if(ch==="\r"&&nextChar()==="\n"){str+=ch;++tokPos;ch="\n"}if(ch==="\n"&&options.locations){tokLineStart=tokPos;++tokCurLine}str+=ch}}return finishToken(_xjsText,str)}function readXJSStringLiteral(){var quote=input.charCodeAt(tokPos);if(quote!==34&&quote!==39){raise("String literal must starts with a quote")}++tokPos;readXJSText([String.fromCharCode(quote)]);if(quote!==input.charCodeAt(tokPos)){unexpected()}++tokPos;return finishToken(tokType,tokVal)}function readHexChar(len){var n=readInt(16,len);if(n===null)raise(tokStart,"Bad character escape sequence");return n}var containsEsc;function readWord1(){containsEsc=false;var word="",first=true,chunkStart=tokPos;for(;;){var ch=input.charCodeAt(tokPos);if(isIdentifierChar(ch)){++tokPos}else if(ch===92){containsEsc=true;word+=input.slice(chunkStart,tokPos);if(input.charCodeAt(++tokPos)!=117)raise(tokPos,"Expecting Unicode escape sequence \\uXXXX");++tokPos;var esc=readHexChar(4);var escStr=String.fromCharCode(esc);if(!escStr)raise(tokPos-1,"Invalid Unicode escape");if(!(first?isIdentifierStart(esc):isIdentifierChar(esc)))raise(tokPos-4,"Invalid Unicode escape");word+=escStr;chunkStart=tokPos}else{break}first=false}return word+input.slice(chunkStart,tokPos)}function readWord(){var word=readWord1();var type=inXJSTag?_xjsName:_name;if(!containsEsc&&isKeyword(word))type=keywordTypes[word];return finishToken(type,word)}function readJSXWord(){var ch,start=tokPos;do{ch=input.charCodeAt(++tokPos)}while(isIdentifierChar(ch)||ch===45);return finishToken(_jsxName,input.slice(start,tokPos))}function next(){if(options.onToken)options.onToken(new Token);lastStart=tokStart;lastEnd=tokEnd;lastEndLoc=tokEndLoc;readToken()}function setStrict(strct){strict=strct;if(tokType!==_num&&tokType!==_string)return;tokPos=tokStart;if(options.locations){while(tokPos<tokLineStart){tokLineStart=input.lastIndexOf("\n",tokLineStart-2)+1;--tokCurLine}}skipSpace();readToken()}function Node(){this.type=null;this.start=tokStart;this.end=null}exports.Node=Node;function SourceLocation(){this.start=tokStartLoc;this.end=null;if(sourceFile!==null)this.source=sourceFile}function startNode(){var node=new exports.Node;if(options.locations)node.loc=new SourceLocation;if(options.directSourceFile)node.sourceFile=options.directSourceFile;if(options.ranges)node.range=[tokStart,0];return node}function storeCurrentPos(){return options.locations?[tokStart,tokStartLoc]:tokStart}function startNodeAt(pos){var node=new exports.Node,start=pos;if(options.locations){node.loc=new SourceLocation;node.loc.start=start[1];start=pos[0]}node.start=start;if(options.directSourceFile)node.sourceFile=options.directSourceFile;if(options.ranges)node.range=[start,0];return node}function finishNode(node,type){node.type=type;node.end=lastEnd;if(options.locations)node.loc.end=lastEndLoc;if(options.ranges)node.range[1]=lastEnd;return node}function finishNodeAt(node,type,pos){if(options.locations){node.loc.end=pos[1];pos=pos[0]}node.type=type;node.end=pos;if(options.ranges)node.range[1]=pos;return node}function isUseStrict(stmt){return options.ecmaVersion>=5&&stmt.type==="ExpressionStatement"&&stmt.expression.type==="Literal"&&stmt.expression.value==="use strict"}function eat(type){if(tokType===type){next();return true}else{return false}}function isContextual(name){return tokType===_name&&tokVal===name}function eatContextual(name){return tokVal===name&&eat(_name)}function expectContextual(name){if(!eatContextual(name))unexpected()}function canInsertSemicolon(){return!options.strictSemicolons&&(tokType===_eof||tokType===_braceR||newline.test(input.slice(lastEnd,tokStart)))}function semicolon(){if(!eat(_semi)&&!canInsertSemicolon())unexpected()}function expect(type){eat(type)||unexpected()}function nextChar(){return input.charAt(tokPos)}function unexpected(pos){raise(pos!=null?pos:tokStart,"Unexpected token")}function has(obj,propName){return Object.prototype.hasOwnProperty.call(obj,propName)}function toAssignable(node){if(options.ecmaVersion>=6&&node){switch(node.type){case"Identifier":case"MemberExpression":case"VirtualPropertyExpression":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":node.type="ObjectPattern";for(var i=0;i<node.properties.length;i++){var prop=node.properties[i];if(prop.kind!=="init")raise(prop.key.start,"Object pattern can't contain getter or setter");toAssignable(prop.value)}break;case"ArrayExpression":node.type="ArrayPattern";toAssignableList(node.elements);break;case"AssignmentExpression":if(node.operator==="="){node.type="AssignmentPattern"}else{raise(node.left.end,"Only '=' operator can be used for specifying default value.")}break;default:raise(node.start,"Assigning to rvalue")}}return node}function toAssignableList(exprList){if(exprList.length){for(var i=0;i<exprList.length-1;i++){toAssignable(exprList[i])}var last=exprList[exprList.length-1];switch(last.type){case"RestElement":break;case"SpreadElement":last.type="RestElement";var arg=last.argument;toAssignable(arg);if(arg.type!=="Identifier"&&arg.type!=="ArrayPattern")unexpected(arg.start);break;default:toAssignable(last)}}return exprList}function parseSpread(refShorthandDefaultPos){var node=startNode();next();node.argument=parseMaybeAssign(refShorthandDefaultPos);return finishNode(node,"SpreadElement")}function parseRest(){var node=startNode();next();node.argument=tokType===_name||tokType===_bracketL?parseAssignableAtom():unexpected();return finishNode(node,"RestElement")}function parseAssignableAtom(){if(options.ecmaVersion<6)return parseIdent();switch(tokType){case _name:return parseIdent();case _bracketL:var node=startNode();next();node.elements=parseAssignableList(_bracketR,true);return finishNode(node,"ArrayPattern");case _braceL:return parseObj(true);default:unexpected()}}function parseAssignableList(close,allowEmpty){var elts=[],first=true;while(!eat(close)){first?first=false:expect(_comma);if(tokType===_ellipsis){elts.push(parseAssignableListItemTypes(parseRest()));expect(close);break}var elem;if(allowEmpty&&tokType===_comma){elem=null}else{var left=parseAssignableAtom();parseAssignableListItemTypes(left);elem=parseMaybeDefault(null,left)}elts.push(elem)}return elts}function parseAssignableListItemTypes(param){if(eat(_question)){param.optional=true}if(tokType===_colon){param.typeAnnotation=parseTypeAnnotation()}finishNode(param,param.type);return param}function parseMaybeDefault(startPos,left){left=left||parseAssignableAtom();if(!eat(_eq))return left;var node=startPos?startNodeAt(startPos):startNode();node.operator="=";node.left=left;node.right=parseMaybeAssign();return finishNode(node,"AssignmentPattern")}function checkFunctionParam(param,nameHash){switch(param.type){case"Identifier":if(isStrictReservedWord(param.name)||isStrictBadIdWord(param.name))raise(param.start,"Defining '"+param.name+"' in strict mode");if(has(nameHash,param.name))raise(param.start,"Argument name clash in strict mode");nameHash[param.name]=true;break;case"ObjectPattern":for(var i=0;i<param.properties.length;i++)checkFunctionParam(param.properties[i].value,nameHash);break;case"ArrayPattern":for(var i=0;i<param.elements.length;i++){var elem=param.elements[i];if(elem)checkFunctionParam(elem,nameHash)}break;case"RestElement":return checkFunctionParam(param.argument,nameHash)}}function checkPropClash(prop,propHash){if(options.ecmaVersion>=6)return;var key=prop.key,name;switch(key.type){case"Identifier":name=key.name;break;case"Literal":name=String(key.value);break;default:return}var kind=prop.kind||"init",other;if(has(propHash,name)){other=propHash[name];var isGetSet=kind!=="init";if((strict||isGetSet)&&other[kind]||!(isGetSet^other.init))raise(key.start,"Redefinition of property")}else{other=propHash[name]={init:false,get:false,set:false}}other[kind]=true}function checkLVal(expr,isBinding){switch(expr.type){case"Identifier":if(strict&&(isStrictBadIdWord(expr.name)||isStrictReservedWord(expr.name)))raise(expr.start,(isBinding?"Binding ":"Assigning to ")+expr.name+" in strict mode");break;case"MemberExpression":if(isBinding)raise(expr.start,"Binding to member expression");break;case"ObjectPattern":for(var i=0;i<expr.properties.length;i++){var prop=expr.properties[i];if(prop.type==="Property")prop=prop.value;checkLVal(prop,isBinding)}break;case"ArrayPattern":for(var i=0;i<expr.elements.length;i++){var elem=expr.elements[i];if(elem)checkLVal(elem,isBinding)}break;case"AssignmentPattern":checkLVal(expr.left);break;case"SpreadProperty":case"VirtualPropertyExpression":break;case"RestElement":checkLVal(expr.argument);break;default:raise(expr.start,"Assigning to rvalue")}}function parseTopLevel(node){var first=true;if(!node.body)node.body=[];while(tokType!==_eof){var stmt=parseStatement(true,true);node.body.push(stmt);if(first&&isUseStrict(stmt))setStrict(true);first=false}next();return finishNode(node,"Program")}var loopLabel={kind:"loop"},switchLabel={kind:"switch"};function parseStatement(declaration,topLevel){var starttype=tokType,node=startNode();switch(starttype){case _break:case _continue:return parseBreakContinueStatement(node,starttype.keyword);case _debugger:return parseDebuggerStatement(node);case _do:return parseDoStatement(node);case _for:return parseForStatement(node);case _function:if(!declaration&&options.ecmaVersion>=6)unexpected();return parseFunctionStatement(node);case _class:if(!declaration)unexpected();return parseClass(node,true);case _if:return parseIfStatement(node);case _return:return parseReturnStatement(node);case _switch:return parseSwitchStatement(node);case _throw:return parseThrowStatement(node);case _try:return parseTryStatement(node);case _let:case _const:if(!declaration)unexpected();case _var:return parseVarStatement(node,starttype.keyword);case _while:return parseWhileStatement(node);case _with:return parseWithStatement(node);case _braceL:return parseBlock();case _semi:return parseEmptyStatement(node);case _export:case _import:if(!topLevel&&!options.allowImportExportEverywhere)raise(tokStart,"'import' and 'export' may only appear at the top level");return starttype===_import?parseImport(node):parseExport(node);default:var maybeName=tokVal,expr=parseExpression();if(options.ecmaVersion>=7&&starttype===_name&&maybeName==="async"&&tokType===_function&&!canInsertSemicolon()){next();var func=parseFunctionStatement(node);func.async=true;return func}if(starttype===_name&&expr.type==="Identifier"){if(eat(_colon)){return parseLabeledStatement(node,maybeName,expr)}if(options.ecmaVersion>=7&&expr.name==="private"&&tokType===_name){return parsePrivate(node)}else if(expr.name==="declare"){if(tokType===_class||tokType===_name||tokType===_function||tokType===_var){return parseDeclare(node)}}else if(tokType===_name){if(expr.name==="interface"){return parseInterface(node)}else if(expr.name==="type"){return parseTypeAlias(node)}}}if(expr.type==="FunctionExpression"&&expr.async){if(expr.id){expr.type="FunctionDeclaration";return expr}else{unexpected(expr.start+"async function ".length)}}return parseExpressionStatement(node,expr)}}function parseBreakContinueStatement(node,keyword){var isBreak=keyword=="break";next();if(eat(_semi)||canInsertSemicolon())node.label=null;else if(tokType!==_name)unexpected();else{node.label=parseIdent();semicolon()}for(var i=0;i<labels.length;++i){var lab=labels[i];if(node.label==null||lab.name===node.label.name){if(lab.kind!=null&&(isBreak||lab.kind==="loop"))break;if(node.label&&isBreak)break}}if(i===labels.length)raise(node.start,"Unsyntactic "+keyword);return finishNode(node,isBreak?"BreakStatement":"ContinueStatement")}function parseDebuggerStatement(node){next();semicolon();return finishNode(node,"DebuggerStatement")}function parseDoStatement(node){next();labels.push(loopLabel);node.body=parseStatement(false);labels.pop();expect(_while);node.test=parseParenExpression();if(options.ecmaVersion>=6)eat(_semi);else semicolon();return finishNode(node,"DoWhileStatement")}function parseForStatement(node){next();labels.push(loopLabel);expect(_parenL);if(tokType===_semi)return parseFor(node,null);if(tokType===_var||tokType===_let){var init=startNode(),varKind=tokType.keyword,isLet=tokType===_let;next();parseVar(init,true,varKind);finishNode(init,"VariableDeclaration");if((tokType===_in||options.ecmaVersion>=6&&isContextual("of"))&&init.declarations.length===1&&!(isLet&&init.declarations[0].init))return parseForIn(node,init);return parseFor(node,init)}var refShorthandDefaultPos={start:0};var init=parseExpression(true,refShorthandDefaultPos);if(tokType===_in||options.ecmaVersion>=6&&isContextual("of")){toAssignable(init);checkLVal(init);return parseForIn(node,init)}else if(refShorthandDefaultPos.start){unexpected(refShorthandDefaultPos.start)}return parseFor(node,init)}function parseFunctionStatement(node){next();return parseFunction(node,true,false)}function parseIfStatement(node){next();node.test=parseParenExpression();node.consequent=parseStatement(false);node.alternate=eat(_else)?parseStatement(false):null;return finishNode(node,"IfStatement")}function parseReturnStatement(node){if(!inFunction&&!options.allowReturnOutsideFunction)raise(tokStart,"'return' outside of function");next();if(eat(_semi)||canInsertSemicolon())node.argument=null;else{node.argument=parseExpression();semicolon()}return finishNode(node,"ReturnStatement")}function parseSwitchStatement(node){next();node.discriminant=parseParenExpression();node.cases=[];expect(_braceL);labels.push(switchLabel);for(var cur,sawDefault;tokType!=_braceR;){if(tokType===_case||tokType===_default){var isCase=tokType===_case;if(cur)finishNode(cur,"SwitchCase");node.cases.push(cur=startNode());cur.consequent=[];next();if(isCase)cur.test=parseExpression();else{if(sawDefault)raise(lastStart,"Multiple default clauses");sawDefault=true;cur.test=null}expect(_colon)}else{if(!cur)unexpected();cur.consequent.push(parseStatement(true))}}if(cur)finishNode(cur,"SwitchCase");next();labels.pop();return finishNode(node,"SwitchStatement")}function parseThrowStatement(node){next();if(newline.test(input.slice(lastEnd,tokStart)))raise(lastEnd,"Illegal newline after throw");node.argument=parseExpression();semicolon();return finishNode(node,"ThrowStatement")}function parseTryStatement(node){next();node.block=parseBlock();node.handler=null;if(tokType===_catch){var clause=startNode();next();expect(_parenL);clause.param=parseAssignableAtom();checkLVal(clause.param,true);expect(_parenR);clause.guard=null;clause.body=parseBlock();node.handler=finishNode(clause,"CatchClause")}node.guardedHandlers=empty;node.finalizer=eat(_finally)?parseBlock():null;if(!node.handler&&!node.finalizer)raise(node.start,"Missing catch or finally clause");return finishNode(node,"TryStatement")}function parseVarStatement(node,kind){next();parseVar(node,false,kind);semicolon();return finishNode(node,"VariableDeclaration")}function parseWhileStatement(node){next();node.test=parseParenExpression();labels.push(loopLabel);node.body=parseStatement(false);labels.pop();return finishNode(node,"WhileStatement")}function parseWithStatement(node){if(strict)raise(tokStart,"'with' in strict mode");next();node.object=parseParenExpression();node.body=parseStatement(false);return finishNode(node,"WithStatement")}function parseEmptyStatement(node){next();return finishNode(node,"EmptyStatement")}function parseLabeledStatement(node,maybeName,expr){for(var i=0;i<labels.length;++i)if(labels[i].name===maybeName)raise(expr.start,"Label '"+maybeName+"' is already declared");var kind=tokType.isLoop?"loop":tokType===_switch?"switch":null;labels.push({name:maybeName,kind:kind});node.body=parseStatement(true);labels.pop();node.label=expr;return finishNode(node,"LabeledStatement")}function parseExpressionStatement(node,expr){node.expression=expr;semicolon();return finishNode(node,"ExpressionStatement")}function parseParenExpression(){expect(_parenL);var val=parseExpression();expect(_parenR);return val}function parseBlock(allowStrict){var node=startNode(),first=true,oldStrict;node.body=[];expect(_braceL);while(!eat(_braceR)){var stmt=parseStatement(true);node.body.push(stmt);if(first&&allowStrict&&isUseStrict(stmt)){oldStrict=strict;setStrict(strict=true)}first=false}if(oldStrict===false)setStrict(false);return finishNode(node,"BlockStatement")}function parseFor(node,init){node.init=init;expect(_semi);node.test=tokType===_semi?null:parseExpression();expect(_semi);node.update=tokType===_parenR?null:parseExpression();expect(_parenR);node.body=parseStatement(false);labels.pop();return finishNode(node,"ForStatement")}function parseForIn(node,init){var type=tokType===_in?"ForInStatement":"ForOfStatement";next();node.left=init;node.right=parseExpression();expect(_parenR);node.body=parseStatement(false);labels.pop();return finishNode(node,type)}function parseVar(node,noIn,kind){node.declarations=[];node.kind=kind;for(;;){var decl=startNode();decl.id=parseAssignableAtom();checkLVal(decl.id,true);if(tokType===_colon){decl.id.typeAnnotation=parseTypeAnnotation();finishNode(decl.id,decl.id.type)}decl.init=eat(_eq)?parseMaybeAssign(noIn):kind===_const.keyword?unexpected():null;node.declarations.push(finishNode(decl,"VariableDeclarator"));if(!eat(_comma))break}return node}function parseExpression(noIn,refShorthandDefaultPos){var start=storeCurrentPos();var expr=parseMaybeAssign(noIn,refShorthandDefaultPos);if(tokType===_comma){var node=startNodeAt(start);node.expressions=[expr];while(eat(_comma))node.expressions.push(parseMaybeAssign(noIn,refShorthandDefaultPos));return finishNode(node,"SequenceExpression")}return expr}function parseMaybeAssign(noIn,refShorthandDefaultPos,afterLeftParse){var failOnShorthandAssign;if(!refShorthandDefaultPos){refShorthandDefaultPos={start:0};failOnShorthandAssign=true}else{failOnShorthandAssign=false}var start=storeCurrentPos();var left=parseMaybeConditional(noIn,refShorthandDefaultPos);if(afterLeftParse)afterLeftParse(left);if(tokType.isAssign){var node=startNodeAt(start);node.operator=tokVal;node.left=tokType===_eq?toAssignable(left):left;refShorthandDefaultPos.start=0;checkLVal(left);next();node.right=parseMaybeAssign(noIn);return finishNode(node,"AssignmentExpression")}else if(failOnShorthandAssign&&refShorthandDefaultPos.start){unexpected(refShorthandDefaultPos.start)}return left}function parseMaybeConditional(noIn,refShorthandDefaultPos){var start=storeCurrentPos();var expr=parseExprOps(noIn,refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;if(eat(_question)){var node=startNodeAt(start);if(options.playground&&eat(_eq)){var left=node.left=toAssignable(expr);if(left.type!=="MemberExpression")raise(left.start,"You can only use member expressions in memoization assignment");node.right=parseMaybeAssign(noIn);node.operator="?=";return finishNode(node,"AssignmentExpression")}node.test=expr;node.consequent=parseMaybeAssign();expect(_colon);node.alternate=parseMaybeAssign(noIn);return finishNode(node,"ConditionalExpression")}return expr}function parseExprOps(noIn,refShorthandDefaultPos){var start=storeCurrentPos();var expr=parseMaybeUnary(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;return parseExprOp(expr,start,-1,noIn)}function parseExprOp(left,leftStart,minPrec,noIn){var prec=tokType.binop;if(prec!=null&&(!noIn||tokType!==_in)){if(prec>minPrec){var node=startNodeAt(leftStart);node.left=left;node.operator=tokVal;var op=tokType;next();var start=storeCurrentPos();node.right=parseExprOp(parseMaybeUnary(),start,op.rightAssociative?prec-1:prec,noIn);finishNode(node,op===_logicalOR||op===_logicalAND?"LogicalExpression":"BinaryExpression");return parseExprOp(node,leftStart,minPrec,noIn)}}return left}function parseMaybeUnary(refShorthandDefaultPos){if(tokType.prefix){var node=startNode(),update=tokType.isUpdate;node.operator=tokVal;node.prefix=true;next();node.argument=parseMaybeUnary();if(refShorthandDefaultPos&&refShorthandDefaultPos.start)unexpected(refShorthandDefaultPos.start);if(update)checkLVal(node.argument);else if(strict&&node.operator==="delete"&&node.argument.type==="Identifier")raise(node.start,"Deleting local variable in strict mode");return finishNode(node,update?"UpdateExpression":"UnaryExpression")}var start=storeCurrentPos();var expr=parseExprSubscripts(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;while(tokType.postfix&&!canInsertSemicolon()){var node=startNodeAt(start);node.operator=tokVal;node.prefix=false;node.argument=expr;checkLVal(expr);next();expr=finishNode(node,"UpdateExpression")}return expr}function parseExprSubscripts(refShorthandDefaultPos){var start=storeCurrentPos();var expr=parseExprAtom(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;return parseSubscripts(expr,start)}function parseSubscripts(base,start,noCalls){if(options.playground&&eat(_hash)){var node=startNodeAt(start);node.object=base;node.property=parseIdent(true);if(eat(_parenL)){node.arguments=parseExprList(_parenR,false)}else{node.arguments=[]}return parseSubscripts(finishNode(node,"BindMemberExpression"),start,noCalls)}else if(eat(_paamayimNekudotayim)){var node=startNodeAt(start);node.object=base;node.property=parseIdent(true);return parseSubscripts(finishNode(node,"VirtualPropertyExpression"),start,noCalls)}else if(eat(_dot)){var node=startNodeAt(start);node.object=base;node.property=parseIdent(true);node.computed=false;return parseSubscripts(finishNode(node,"MemberExpression"),start,noCalls)}else if(eat(_bracketL)){var node=startNodeAt(start);node.object=base;node.property=parseExpression();node.computed=true;expect(_bracketR);return parseSubscripts(finishNode(node,"MemberExpression"),start,noCalls)}else if(!noCalls&&eat(_parenL)){var node=startNodeAt(start);node.callee=base;node.arguments=parseExprList(_parenR,false);return parseSubscripts(finishNode(node,"CallExpression"),start,noCalls)}else if(tokType===_backQuote){var node=startNodeAt(start);node.tag=base;node.quasi=parseTemplate();return parseSubscripts(finishNode(node,"TaggedTemplateExpression"),start,noCalls)}return base}function parseExprAtom(refShorthandDefaultPos){switch(tokType){case _this:var node=startNode();next();return finishNode(node,"ThisExpression");case _at:var start=storeCurrentPos();var node=startNode();var thisNode=startNode();next();node.object=finishNode(thisNode,"ThisExpression");node.property=parseSubscripts(parseIdent(),start);node.computed=false;return finishNode(node,"MemberExpression");case _yield:if(inGenerator)return parseYield();case _name:var start=storeCurrentPos();var node=startNode();var id=parseIdent(tokType!==_name);if(options.ecmaVersion>=7){if(id.name==="async"){if(tokType===_parenL){next();var exprList;if(tokType!==_parenR){var val=parseExpression();exprList=val.type==="SequenceExpression"?val.expressions:[val]}else{exprList=[]}expect(_parenR);if(eat(_arrow)){return parseArrowExpression(node,exprList,true)}else{node.callee=id;node.arguments=exprList;return parseSubscripts(finishNode(node,"CallExpression"),start)}}else if(tokType===_name){id=parseIdent();if(eat(_arrow)){return parseArrowExpression(node,[id],true)}return id}if(tokType===_function&&!canInsertSemicolon()){next();return parseFunction(node,false,true)}}else if(id.name==="await"){if(inAsync)return parseAwait(node)}}if(eat(_arrow)){return parseArrowExpression(node,[id])}return id;case _regexp:var node=startNode();node.regex={pattern:tokVal.pattern,flags:tokVal.flags};node.value=tokVal.value;node.raw=input.slice(tokStart,tokEnd);next();return finishNode(node,"Literal");case _num:case _string:case _jsxText:var node=startNode();node.value=tokVal;node.raw=input.slice(tokStart,tokEnd);next();return finishNode(node,"Literal");case _null:case _true:case _false:var node=startNode();node.value=tokType.atomValue;node.raw=tokType.keyword;next();return finishNode(node,"Literal");case _parenL:return parseParenAndDistinguishExpression();case _bracketL:var node=startNode();next();if(options.ecmaVersion>=7&&tokType===_for){return parseComprehension(node,false)}node.elements=parseExprList(_bracketR,true,true,refShorthandDefaultPos);return finishNode(node,"ArrayExpression");case _braceL:return parseObj(false,refShorthandDefaultPos);case _function:var node=startNode();next();return parseFunction(node,false,false);case _class:return parseClass(startNode(),false);case _new:return parseNew();case _backQuote:return parseTemplate();case _hash:return parseBindFunctionExpression();case _jsxTagStart:return parseJSXElement();default:unexpected()}}function parseBindFunctionExpression(){var node=startNode();next();var start=storeCurrentPos();node.callee=parseSubscripts(parseExprAtom(),start,true);if(eat(_parenL)){node.arguments=parseExprList(_parenR,false)}else{node.arguments=[]}return finishNode(node,"BindFunctionExpression")}function parseParenAndDistinguishExpression(){var start=storeCurrentPos(),val;if(options.ecmaVersion>=6){next();if(options.ecmaVersion>=7&&tokType===_for){return parseComprehension(startNodeAt(start),true)}var innerStart=storeCurrentPos(),exprList=[],first=true;var refShorthandDefaultPos={start:0},spreadStart,innerParenStart,typeStart;var parseParenItem=function(node){if(tokType===_colon){typeStart=typeStart||tokStart;node.returnType=parseTypeAnnotation()}return node};while(tokType!==_parenR){first?first=false:expect(_comma);if(tokType===_ellipsis){spreadStart=tokStart;exprList.push(parseParenItem(parseRest()));break}else{if(tokType===_parenL&&!innerParenStart){innerParenStart=tokStart}exprList.push(parseMaybeAssign(false,refShorthandDefaultPos,parseParenItem))}}var innerEnd=storeCurrentPos();expect(_parenR);if(eat(_arrow)){if(innerParenStart)unexpected(innerParenStart);return parseArrowExpression(startNodeAt(start),exprList)}if(!exprList.length)unexpected(lastStart);if(typeStart)unexpected(typeStart);if(spreadStart)unexpected(spreadStart);if(refShorthandDefaultPos.start)unexpected(refShorthandDefaultPos.start);if(exprList.length>1){val=startNodeAt(innerStart);val.expressions=exprList;finishNodeAt(val,"SequenceExpression",innerEnd)}else{val=exprList[0]}}else{val=parseParenExpression()}if(options.preserveParens){var par=startNodeAt(start);par.expression=val;return finishNode(par,"ParenthesizedExpression")}else{return val}}function parseNew(){var node=startNode();next();var start=storeCurrentPos();node.callee=parseSubscripts(parseExprAtom(),start,true);if(eat(_parenL))node.arguments=parseExprList(_parenR,false);else node.arguments=empty;return finishNode(node,"NewExpression")}function parseTemplateElement(){var elem=startNode();elem.value={raw:input.slice(tokStart,tokEnd),cooked:tokVal};next();elem.tail=tokType===_backQuote;return finishNode(elem,"TemplateElement")}function parseTemplate(){var node=startNode();next();node.expressions=[];var curElt=parseTemplateElement();node.quasis=[curElt];while(!curElt.tail){expect(_dollarBraceL);node.expressions.push(parseExpression());expect(_braceR);node.quasis.push(curElt=parseTemplateElement())}next();return finishNode(node,"TemplateLiteral")}function parseObj(isPattern,refShorthandDefaultPos){var node=startNode(),first=true,propHash={};node.properties=[];next();while(!eat(_braceR)){if(!first){expect(_comma);if(options.allowTrailingCommas&&eat(_braceR))break}else first=false;var prop=startNode(),start,isGenerator=false,isAsync=false;if(options.ecmaVersion>=7&&tokType===_ellipsis){prop=parseSpread();prop.type="SpreadProperty";node.properties.push(prop);continue}if(options.ecmaVersion>=6){prop.method=false;prop.shorthand=false;if(isPattern){start=storeCurrentPos()}else{isGenerator=eat(_star)}}if(options.ecmaVersion>=7&&isContextual("async")){var asyncId=parseIdent();if(tokType===_colon||tokType===_parenL){prop.key=asyncId}else{isAsync=true;parsePropertyName(prop)}}else{parsePropertyName(prop)}var typeParameters;if(isRelational("<")){typeParameters=parseTypeParameterDeclaration();if(tokType!==_parenL)unexpected()}if(eat(_colon)){prop.value=isPattern?parseMaybeDefault(start):parseMaybeAssign(false,refShorthandDefaultPos);prop.kind="init"}else if(options.ecmaVersion>=6&&tokType===_parenL){if(isPattern)unexpected();prop.kind="init";prop.method=true;prop.value=parseMethod(isGenerator,isAsync)}else if(options.ecmaVersion>=5&&!prop.computed&&prop.key.type==="Identifier"&&(prop.key.name==="get"||prop.key.name==="set"||options.playground&&prop.key.name==="memo")&&(tokType!=_comma&&tokType!=_braceR)){if(isGenerator||isAsync||isPattern)unexpected();prop.kind=prop.key.name;parsePropertyName(prop);prop.value=parseMethod(false,false)}else if(options.ecmaVersion>=6&&!prop.computed&&prop.key.type==="Identifier"){prop.kind="init";if(isPattern){prop.value=parseMaybeDefault(start,prop.key)}else if(tokType===_eq&&refShorthandDefaultPos){if(!refShorthandDefaultPos.start)refShorthandDefaultPos.start=tokStart;prop.value=parseMaybeDefault(start,prop.key)}else{prop.value=prop.key}prop.shorthand=true}else unexpected();prop.value.typeParameters=typeParameters;checkPropClash(prop,propHash);node.properties.push(finishNode(prop,"Property"))}return finishNode(node,isPattern?"ObjectPattern":"ObjectExpression")}function parsePropertyName(prop){if(options.ecmaVersion>=6){if(eat(_bracketL)){prop.computed=true;prop.key=parseExpression();expect(_bracketR);return}else{prop.computed=false}}prop.key=tokType===_num||tokType===_string?parseExprAtom():parseIdent(true)}function initFunction(node,isAsync){node.id=null;if(options.ecmaVersion>=6){node.generator=false;node.expression=false}if(options.ecmaVersion>=7){node.async=isAsync}}function parseFunction(node,isStatement,isAsync,allowExpressionBody){initFunction(node,isAsync);if(options.ecmaVersion>=6){node.generator=eat(_star)}if(isStatement||tokType===_name){node.id=parseIdent()}if(isRelational("<")){node.typeParameters=parseTypeParameterDeclaration()}parseFunctionParams(node);parseFunctionBody(node,allowExpressionBody);return finishNode(node,isStatement?"FunctionDeclaration":"FunctionExpression")}function parseMethod(isGenerator,isAsync){var node=startNode();initFunction(node,isAsync);parseFunctionParams(node);var allowExpressionBody;if(options.ecmaVersion>=6){node.generator=isGenerator;allowExpressionBody=true}else{allowExpressionBody=false}parseFunctionBody(node,allowExpressionBody);return finishNode(node,"FunctionExpression")}function parseFunctionParams(node){expect(_parenL);node.params=parseAssignableList(_parenR,false);if(tokType===_colon){node.returnType=parseTypeAnnotation()}}function parseArrowExpression(node,params,isAsync){initFunction(node,isAsync);node.params=toAssignableList(params,true);parseFunctionBody(node,true);return finishNode(node,"ArrowFunctionExpression")}function parseFunctionBody(node,allowExpression){var isExpression=allowExpression&&tokType!==_braceL;var oldInAsync=inAsync;inAsync=node.async;if(isExpression){node.body=parseMaybeAssign();node.expression=true}else{var oldInFunc=inFunction,oldInGen=inGenerator,oldLabels=labels;inFunction=true;inGenerator=node.generator;labels=[];node.body=parseBlock(true);node.expression=false;inFunction=oldInFunc;inGenerator=oldInGen;labels=oldLabels}inAsync=oldInAsync;if(strict||!isExpression&&node.body.body.length&&isUseStrict(node.body.body[0])){var nameHash={};if(node.id)checkFunctionParam(node.id,{});for(var i=0;i<node.params.length;i++)checkFunctionParam(node.params[i],nameHash)}}function parsePrivate(node){node.declarations=[]; do{node.declarations.push(parseIdent())}while(eat(_comma));semicolon();return finishNode(node,"PrivateDeclaration")}function parseClass(node,isStatement){next();node.id=tokType===_name?parseIdent():isStatement?unexpected():null;if(isRelational("<")){node.typeParameters=parseTypeParameterDeclaration()}node.superClass=eat(_extends)?parseExprSubscripts():null;if(node.superClass&&isRelational("<")){node.superTypeParameters=parseTypeParameterInstantiation()}if(isContextual("implements")){next();node.implements=parseClassImplements()}var classBody=startNode();classBody.body=[];expect(_braceL);while(!eat(_braceR)){if(eat(_semi))continue;var method=startNode();if(options.ecmaVersion>=7&&isContextual("private")){next();classBody.body.push(parsePrivate(method));continue}var isGenerator=eat(_star);var isAsync=false;parsePropertyName(method);if(tokType!==_parenL&&!method.computed&&method.key.type==="Identifier"&&method.key.name==="static"){if(isGenerator||isAsync)unexpected();method["static"]=true;isGenerator=eat(_star);parsePropertyName(method)}else{method["static"]=false}if(tokType!==_parenL&&!method.computed&&method.key.type==="Identifier"&&method.key.name==="async"){isAsync=true;parsePropertyName(method)}if(tokType!==_parenL&&!method.computed&&method.key.type==="Identifier"&&(method.key.name==="get"||method.key.name==="set")||options.playground&&method.key.name==="memo"){if(isGenerator||isAsync)unexpected();method.kind=method.key.name;parsePropertyName(method)}else{method.kind=""}if(tokType===_colon){method.typeAnnotation=parseTypeAnnotation();semicolon();classBody.body.push(finishNode(method,"ClassProperty"))}else{var typeParameters;if(isRelational("<")){typeParameters=parseTypeParameterDeclaration()}method.value=parseMethod(isGenerator,isAsync);method.value.typeParameters=typeParameters;classBody.body.push(finishNode(method,"MethodDefinition"));eat(_semi)}}node.body=finishNode(classBody,"ClassBody");return finishNode(node,isStatement?"ClassDeclaration":"ClassExpression")}function parseClassImplements(){var implemented=[];do{var node=startNode();node.id=parseIdent();if(isRelational("<")){node.typeParameters=parseTypeParameterInstantiation()}else{node.typeParameters=null}implemented.push(finishNode(node,"ClassImplements"))}while(eat(_comma));return implemented}function parseExprList(close,allowTrailingComma,allowEmpty,refShorthandDefaultPos){var elts=[],first=true;while(!eat(close)){if(!first){expect(_comma);if(allowTrailingComma&&options.allowTrailingCommas&&eat(close))break}else first=false;if(allowEmpty&&tokType===_comma){elts.push(null)}else{if(tokType===_ellipsis)elts.push(parseSpread(refShorthandDefaultPos));else elts.push(parseMaybeAssign(false,refShorthandDefaultPos))}}return elts}function parseIdent(liberal){var node=startNode();if(liberal&&options.forbidReserved=="everywhere")liberal=false;if(tokType===_name){if(!liberal&&(options.forbidReserved&&(options.ecmaVersion===3?isReservedWord3:isReservedWord5)(tokVal)||strict&&isStrictReservedWord(tokVal))&&input.slice(tokStart,tokEnd).indexOf("\\")==-1)raise(tokStart,"The keyword '"+tokVal+"' is reserved");node.name=tokVal}else if(liberal&&tokType.keyword){node.name=tokType.keyword}else{unexpected()}next();return finishNode(node,"Identifier")}function parseExport(node){next();if(tokType===_var||tokType===_const||tokType===_let||tokType===_function||tokType===_class||isContextual("async")){node.declaration=parseStatement(true);node["default"]=false;node.specifiers=null;node.source=null}else if(eat(_default)){var declar=node.declaration=parseMaybeAssign(true);if(declar.id){if(declar.type==="FunctionExpression"){declar.type="FunctionDeclaration"}else if(declar.type==="ClassExpression"){declar.type="ClassDeclaration"}}node["default"]=true;node.specifiers=null;node.source=null;semicolon()}else{var isBatch=tokType===_star;node.declaration=null;node["default"]=false;node.specifiers=parseExportSpecifiers();if(eatContextual("from")){node.source=tokType===_string?parseExprAtom():unexpected()}else{if(isBatch)unexpected();node.source=null}semicolon()}return finishNode(node,"ExportDeclaration")}function parseExportSpecifiers(){var nodes=[],first=true;if(tokType===_star){var node=startNode();next();nodes.push(finishNode(node,"ExportBatchSpecifier"))}else{expect(_braceL);while(!eat(_braceR)){if(!first){expect(_comma);if(options.allowTrailingCommas&&eat(_braceR))break}else first=false;var node=startNode();node.id=parseIdent(tokType===_default);node.name=eatContextual("as")?parseIdent(true):null;nodes.push(finishNode(node,"ExportSpecifier"))}}return nodes}function parseImport(node){next();if(tokType===_string){node.specifiers=[];node.source=parseExprAtom()}else{node.specifiers=parseImportSpecifiers();expectContextual("from");node.source=tokType===_string?parseExprAtom():unexpected()}semicolon();return finishNode(node,"ImportDeclaration")}function parseImportSpecifiers(){var nodes=[],first=true;if(tokType===_name){var node=startNode();node.id=parseIdent();checkLVal(node.id,true);node.name=null;node["default"]=true;nodes.push(finishNode(node,"ImportSpecifier"));if(!eat(_comma))return nodes}if(tokType===_star){var node=startNode();next();expectContextual("as");node.name=parseIdent();checkLVal(node.name,true);nodes.push(finishNode(node,"ImportBatchSpecifier"));return nodes}expect(_braceL);while(!eat(_braceR)){if(!first){expect(_comma);if(options.allowTrailingCommas&&eat(_braceR))break}else first=false;var node=startNode();node.id=parseIdent(true);node.name=eatContextual("as")?parseIdent():null;checkLVal(node.name||node.id,true);node["default"]=false;nodes.push(finishNode(node,"ImportSpecifier"))}return nodes}function parseYield(){var node=startNode();next();if(eat(_semi)||canInsertSemicolon()){node.delegate=false;node.argument=null}else{node.delegate=eat(_star);node.argument=parseMaybeAssign()}return finishNode(node,"YieldExpression")}function parseAwait(node){if(eat(_semi)||canInsertSemicolon()){unexpected()}node.delegate=eat(_star);node.argument=parseMaybeAssign(true);return finishNode(node,"AwaitExpression")}function parseComprehension(node,isGenerator){node.blocks=[];while(tokType===_for){var block=startNode();next();expect(_parenL);block.left=parseAssignableAtom();checkLVal(block.left,true);expectContextual("of");block.right=parseExpression();expect(_parenR);node.blocks.push(finishNode(block,"ComprehensionBlock"))}node.filter=eat(_if)?parseParenExpression():null;node.body=parseExpression();expect(isGenerator?_parenR:_bracketR);node.generator=isGenerator;return finishNode(node,"ComprehensionExpression")}function getQualifiedJSXName(object){if(object.type==="JSXIdentifier"){return object.name}if(object.type==="JSXNamespacedName"){return object.namespace.name+":"+object.name.name}if(object.type==="JSXMemberExpression"){return getQualifiedJSXName(object.object)+"."+getQualifiedJSXName(object.property)}}function parseJSXIdentifier(){var node=startNode();if(tokType===_jsxName){node.name=tokVal}else if(tokType.keyword){node.name=tokType.keyword}else{unexpected()}next();return finishNode(node,"JSXIdentifier")}function parseJSXNamespacedName(){var start=storeCurrentPos();var name=parseJSXIdentifier();if(!eat(_colon))return name;var node=startNodeAt(start);node.namespace=name;node.name=parseJSXIdentifier();return finishNode(node,"JSXNamespacedName")}function parseJSXElementName(){var start=storeCurrentPos();var node=parseJSXNamespacedName();while(eat(_dot)){var newNode=startNodeAt(start);newNode.object=node;newNode.property=parseJSXIdentifier();node=finishNode(newNode,"JSXMemberExpression")}return node}function parseJSXAttributeValue(){switch(tokType){case _braceL:var node=parseJSXExpressionContainer();if(node.expression.type==="JSXEmptyExpression"){raise(node.start,"JSX attributes must only be assigned a non-empty "+"expression")}return node;case _jsxTagStart:return parseJSXElement();case _jsxText:case _string:return parseExprAtom();default:raise(tokStart,"JSX value should be either an expression or a quoted JSX text")}}function parseJSXEmptyExpression(){if(tokType!==_braceR){unexpected()}var tmp;tmp=tokStart;tokStart=lastEnd;lastEnd=tmp;tmp=tokStartLoc;tokStartLoc=lastEndLoc;lastEndLoc=tmp;return finishNode(startNode(),"JSXEmptyExpression")}function parseJSXExpressionContainer(){var node=startNode();next();node.expression=tokType===_braceR?parseJSXEmptyExpression():parseExpression();expect(_braceR);return finishNode(node,"JSXExpressionContainer")}function parseJSXAttribute(){var node=startNode();if(eat(_braceL)){expect(_ellipsis);node.argument=parseMaybeAssign();expect(_braceR);return finishNode(node,"JSXSpreadAttribute")}node.name=parseJSXNamespacedName();node.value=eat(_eq)?parseJSXAttributeValue():null;return finishNode(node,"JSXAttribute")}function parseJSXOpeningElementAt(start){var node=startNodeAt(start);node.attributes=[];node.name=parseJSXElementName();while(tokType!==_slash&&tokType!==_jsxTagEnd){node.attributes.push(parseJSXAttribute())}node.selfClosing=eat(_slash);expect(_jsxTagEnd);return finishNode(node,"JSXOpeningElement")}function parseJSXClosingElementAt(start){var node=startNodeAt(start);node.name=parseJSXElementName();expect(_jsxTagEnd);return finishNode(node,"JSXClosingElement")}function parseJSXElementAt(start){var node=startNodeAt(start);var children=[];var openingElement=parseJSXOpeningElementAt(start);var closingElement=null;if(!openingElement.selfClosing){contents:for(;;){switch(tokType){case _jsxTagStart:start=storeCurrentPos();next();if(eat(_slash)){closingElement=parseJSXClosingElementAt(start);break contents}children.push(parseJSXElementAt(start));break;case _jsxText:children.push(parseExprAtom());break;case _braceL:children.push(parseJSXExpressionContainer());break;default:unexpected()}}if(getQualifiedJSXName(closingElement.name)!==getQualifiedJSXName(openingElement.name)){raise(closingElement.start,"Expected corresponding JSX closing tag for <"+getQualifiedJSXName(openingElement.name)+">")}}node.openingElement=openingElement;node.closingElement=closingElement;node.children=children;return finishNode(node,"JSXElement")}function isRelational(op){return tokType===_relational&&tokVal===op}function expectRelational(op){if(isRelational(op)){next()}else{unexpected()}}function parseJSXElement(){var start=storeCurrentPos();next();return parseJSXElementAt(start)}function parseDeclareClass(node){next();parseInterfaceish(node,true);return finishNode(node,"DeclareClass")}function parseDeclareFunction(node){next();var id=node.id=parseIdent();var typeNode=startNode();var typeContainer=startNode();if(isRelational("<")){typeNode.typeParameters=parseTypeParameterDeclaration()}else{typeNode.typeParameters=null}expect(_parenL);var tmp=parseFunctionTypeParams();typeNode.params=tmp.params;typeNode.rest=tmp.rest;expect(_parenR);expect(_colon);typeNode.returnType=parseType();typeContainer.typeAnnotation=finishNode(typeNode,"FunctionTypeAnnotation");id.typeAnnotation=finishNode(typeContainer,"TypeAnnotation");finishNode(id,id.type);semicolon();return finishNode(node,"DeclareFunction")}function parseDeclare(node){if(tokType===_class){return parseDeclareClass(node)}else if(tokType===_function){return parseDeclareFunction(node)}else if(tokType===_var){return parseDeclareVariable(node)}else if(isContextual("module")){return parseDeclareModule(node)}else{unexpected()}}function parseDeclareVariable(node){next();node.id=parseTypeAnnotatableIdentifier();semicolon();return finishNode(node,"DeclareVariable")}function parseDeclareModule(node){next();if(tokType===_string){node.id=parseExprAtom()}else{node.id=parseIdent()}var bodyNode=node.body=startNode();var body=bodyNode.body=[];expect(_braceL);while(tokType!==_braceR){var node2=startNode();next();body.push(parseDeclare(node2))}expect(_braceR);finishNode(bodyNode,"BlockStatement");return finishNode(node,"DeclareModule")}function parseInterfaceish(node,allowStatic){node.id=parseIdent();if(isRelational("<")){node.typeParameters=parseTypeParameterDeclaration()}else{node.typeParameters=null}node.extends=[];if(eat(_extends)){do{node.extends.push(parseInterfaceExtends())}while(eat(_comma))}node.body=parseObjectType(allowStatic)}function parseInterfaceExtends(){var node=startNode();node.id=parseIdent();if(isRelational("<")){node.typeParameters=parseTypeParameterInstantiation()}else{node.typeParameters=null}return finishNode(node,"InterfaceExtends")}function parseInterface(node){parseInterfaceish(node,false);return finishNode(node,"InterfaceDeclaration")}function parseTypeAlias(node){node.id=parseIdent();if(isRelational("<")){node.typeParameters=parseTypeParameterDeclaration()}else{node.typeParameters=null}expect(_eq);node.right=parseType();semicolon();return finishNode(node,"TypeAlias")}function parseTypeParameterDeclaration(){var node=startNode();node.params=[];expectRelational("<");while(!isRelational(">")){node.params.push(parseIdent());if(!isRelational(">")){expect(_comma)}}expectRelational(">");return finishNode(node,"TypeParameterDeclaration")}function parseTypeParameterInstantiation(){var node=startNode(),oldInType=inType;node.params=[];inType=true;expectRelational("<");while(!isRelational(">")){node.params.push(parseType());if(!isRelational(">")){expect(_comma)}}expectRelational(">");inType=oldInType;return finishNode(node,"TypeParameterInstantiation")}function parseObjectPropertyKey(){return tokType===_num||tokType===_string?parseExprAtom():parseIdent(true)}function parseObjectTypeIndexer(node,isStatic){node.static=isStatic;expect(_bracketL);node.id=parseObjectPropertyKey();expect(_colon);node.key=parseType();expect(_bracketR);expect(_colon);node.value=parseType();return finishNode(node,"ObjectTypeIndexer")}function parseObjectTypeMethodish(node){node.params=[];node.rest=null;node.typeParameters=null;if(isRelational("<")){node.typeParameters=parseTypeParameterDeclaration()}expect(_parenL);while(tokType===_name){node.params.push(parseFunctionTypeParam());if(tokType!==_parenR){expect(_comma)}}if(eat(_ellipsis)){node.rest=parseFunctionTypeParam()}expect(_parenR);expect(_colon);node.returnType=parseType();return finishNode(node,"FunctionTypeAnnotation")}function parseObjectTypeMethod(start,isStatic,key){var node=startNodeAt(start);node.value=parseObjectTypeMethodish(startNodeAt(start));node.static=isStatic;node.key=key;node.optional=false;return finishNode(node,"ObjectTypeProperty")}function parseObjectTypeCallProperty(node,isStatic){var valueNode=startNode();node.static=isStatic;node.value=parseObjectTypeMethodish(valueNode);return finishNode(node,"ObjectTypeCallProperty")}function parseObjectType(allowStatic){var nodeStart=startNode();var node;var optional=false;var property;var propertyKey;var propertyTypeAnnotation;var token;var isStatic;nodeStart.callProperties=[];nodeStart.properties=[];nodeStart.indexers=[];expect(_braceL);while(tokType!==_braceR){var start=storeCurrentPos();node=startNode();if(allowStatic&&isContextual("static")){next();isStatic=true}if(tokType===_bracketL){nodeStart.indexers.push(parseObjectTypeIndexer(node,isStatic))}else if(tokType===_parenL||isRelational("<")){nodeStart.callProperties.push(parseObjectTypeCallProperty(node,allowStatic))}else{if(isStatic&&tokType===_colon){propertyKey=parseIdent()}else{propertyKey=parseObjectPropertyKey()}if(isRelational("<")||tokType===_parenL){nodeStart.properties.push(parseObjectTypeMethod(start,isStatic,propertyKey))}else{if(eat(_question)){optional=true}expect(_colon);node.key=propertyKey;node.value=parseType();node.optional=optional;node.static=isStatic;nodeStart.properties.push(finishNode(node,"ObjectTypeProperty"))}}if(!eat(_semi)&&tokType!==_braceR){unexpected()}}expect(_braceR);return finishNode(nodeStart,"ObjectTypeAnnotation")}function parseGenericType(start,id){var node=startNodeAt(start);node.typeParameters=null;node.id=id;while(eat(_dot)){var node2=startNodeAt(start);node2.qualification=node.id;node2.id=parseIdent();node.id=finishNode(node2,"QualifiedTypeIdentifier")}if(isRelational("<")){node.typeParameters=parseTypeParameterInstantiation()}return finishNode(node,"GenericTypeAnnotation")}function parseVoidType(){var node=startNode();expect(keywordTypes["void"]);return finishNode(node,"VoidTypeAnnotation")}function parseTypeofType(){var node=startNode();expect(keywordTypes["typeof"]);node.argument=parsePrimaryType();return finishNode(node,"TypeofTypeAnnotation")}function parseTupleType(){var node=startNode();node.types=[];expect(_bracketL);while(tokPos<inputLen&&tokType!==_bracketR){node.types.push(parseType());if(tokType===_bracketR)break;expect(_comma)}expect(_bracketR);return finishNode(node,"TupleTypeAnnotation")}function parseFunctionTypeParam(){var optional=false;var node=startNode();node.name=parseIdent();if(eat(_question)){optional=true}expect(_colon);node.optional=optional;node.typeAnnotation=parseType();return finishNode(node,"FunctionTypeParam")}function parseFunctionTypeParams(){var ret={params:[],rest:null};while(tokType===_name){ret.params.push(parseFunctionTypeParam());if(tokType!==_parenR){expect(_comma)}}if(eat(_ellipsis)){ret.rest=parseFunctionTypeParam()}return ret}function identToTypeAnnotation(start,node,id){switch(id.name){case"any":return finishNode(node,"AnyTypeAnnotation");case"bool":case"boolean":return finishNode(node,"BooleanTypeAnnotation");case"number":return finishNode(node,"NumberTypeAnnotation");case"string":return finishNode(node,"StringTypeAnnotation");default:return parseGenericType(start,id)}}function parsePrimaryType(){var typeIdentifier=null;var params=null;var returnType=null;var start=storeCurrentPos();var node=startNode();var rest=null;var tmp;var typeParameters;var token;var type;var isGroupedType=false;switch(tokType){case _name:return identToTypeAnnotation(start,node,parseIdent());case _braceL:return parseObjectType();case _bracketL:return parseTupleType();case _relational:if(tokVal==="<"){node.typeParameters=parseTypeParameterDeclaration();expect(_parenL);tmp=parseFunctionTypeParams();node.params=tmp.params;node.rest=tmp.rest;expect(_parenR);expect(_arrow);node.returnType=parseType();return finishNode(node,"FunctionTypeAnnotation")}case _parenL:next();var tmpId;if(tokType!==_parenR&&tokType!==_ellipsis){if(tokType===_name){}else{isGroupedType=true}}if(isGroupedType){if(tmpId&&_parenR){type=tmpId}else{type=parseType();expect(_parenR)}if(eat(_arrow)){raise(node,"Unexpected token =>. It looks like "+"you are trying to write a function type, but you ended up "+"writing a grouped type followed by an =>, which is a syntax "+"error. Remember, function type parameters are named so function "+"types look like (name1: type1, name2: type2) => returnType. You "+"probably wrote (type1) => returnType")}return type}tmp=parseFunctionTypeParams();node.params=tmp.params;node.rest=tmp.rest;expect(_parenR);expect(_arrow);node.returnType=parseType();node.typeParameters=null;return finishNode(node,"FunctionTypeAnnotation");case _string:node.value=tokVal;node.raw=input.slice(tokStart,tokEnd);next();return finishNode(node,"StringLiteralTypeAnnotation");default:if(tokType.keyword){switch(tokType.keyword){case"void":return parseVoidType();case"typeof":return parseTypeofType()}}}unexpected()}function parsePostfixType(){var node=startNode();var type=node.elementType=parsePrimaryType();if(tokType===_bracketL){expect(_bracketL);expect(_bracketR);return finishNode(node,"ArrayTypeAnnotation")}return type}function parsePrefixType(){var node=startNode();if(eat(_question)){node.typeAnnotation=parsePrefixType();return finishNode(node,"NullableTypeAnnotation")}return parsePostfixType()}function parseIntersectionType(){var node=startNode();var type=parsePrefixType();node.types=[type];while(eat(_bitwiseAND)){node.types.push(parsePrefixType())}return node.types.length===1?type:finishNode(node,"IntersectionTypeAnnotation")}function parseUnionType(){var node=startNode();var type=parseIntersectionType();node.types=[type];while(eat(_bitwiseOR)){node.types.push(parseIntersectionType())}return node.types.length===1?type:finishNode(node,"UnionTypeAnnotation")}function parseType(){var oldInType=inType;inType=true;var type=parseUnionType();inType=oldInType;return type}function parseTypeAnnotation(){var node=startNode();var oldInType=inType;inType=true;expect(_colon);node.typeAnnotation=parseType();inType=oldInType;return finishNode(node,"TypeAnnotation")}function parseTypeAnnotatableIdentifier(requireTypeAnnotation,canBeOptionalParam){var node=startNode();var ident=parseIdent();var isOptionalParam=false;if(canBeOptionalParam&&eat(_question)){expect(_question);isOptionalParam=true}if(requireTypeAnnotation||tokType===_colon){ident.typeAnnotation=parseTypeAnnotation();finishNode(ident,ident.type)}if(isOptionalParam){ident.optional=true;finishNode(ident,ident.type)}return ident}})},{}],112:[function(require,module,exports){var types=require("../lib/types");var Type=types.Type;var def=Type.def;var or=Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isNumber=builtin.number;var isBoolean=builtin.boolean;var isRegExp=builtin.RegExp;var shared=require("../lib/shared");var defaults=shared.defaults;var geq=shared.geq;def("Printable").field("loc",or(def("SourceLocation"),null),defaults["null"],true);def("Node").bases("Printable").field("type",isString);def("SourceLocation").build("start","end","source").field("start",def("Position")).field("end",def("Position")).field("source",or(isString,null),defaults["null"]);def("Position").build("line","column").field("line",geq(1)).field("column",geq(0));def("Program").bases("Node").build("body").field("body",[def("Statement")]).field("comments",or([or(def("Block"),def("Line"))],null),defaults["null"],true);def("Function").bases("Node").field("id",or(def("Identifier"),null),defaults["null"]).field("params",[def("Pattern")]).field("body",or(def("BlockStatement"),def("Expression")));def("Statement").bases("Node");def("EmptyStatement").bases("Statement").build();def("BlockStatement").bases("Statement").build("body").field("body",[def("Statement")]);def("ExpressionStatement").bases("Statement").build("expression").field("expression",def("Expression"));def("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",def("Expression")).field("consequent",def("Statement")).field("alternate",or(def("Statement"),null),defaults["null"]);def("LabeledStatement").bases("Statement").build("label","body").field("label",def("Identifier")).field("body",def("Statement"));def("BreakStatement").bases("Statement").build("label").field("label",or(def("Identifier"),null),defaults["null"]);def("ContinueStatement").bases("Statement").build("label").field("label",or(def("Identifier"),null),defaults["null"]);def("WithStatement").bases("Statement").build("object","body").field("object",def("Expression")).field("body",def("Statement"));def("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",def("Expression")).field("cases",[def("SwitchCase")]).field("lexical",isBoolean,defaults["false"]);def("ReturnStatement").bases("Statement").build("argument").field("argument",or(def("Expression"),null));def("ThrowStatement").bases("Statement").build("argument").field("argument",def("Expression"));def("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",def("BlockStatement")).field("handler",or(def("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[def("CatchClause")],function(){return this.handler?[this.handler]:[]},true).field("guardedHandlers",[def("CatchClause")],defaults.emptyArray).field("finalizer",or(def("BlockStatement"),null),defaults["null"]);def("CatchClause").bases("Node").build("param","guard","body").field("param",def("Pattern")).field("guard",or(def("Expression"),null),defaults["null"]).field("body",def("BlockStatement"));def("WhileStatement").bases("Statement").build("test","body").field("test",def("Expression")).field("body",def("Statement"));def("DoWhileStatement").bases("Statement").build("body","test").field("body",def("Statement")).field("test",def("Expression"));def("ForStatement").bases("Statement").build("init","test","update","body").field("init",or(def("VariableDeclaration"),def("Expression"),null)).field("test",or(def("Expression"),null)).field("update",or(def("Expression"),null)).field("body",def("Statement"));def("ForInStatement").bases("Statement").build("left","right","body","each").field("left",or(def("VariableDeclaration"),def("Expression"))).field("right",def("Expression")).field("body",def("Statement")).field("each",isBoolean);def("DebuggerStatement").bases("Statement").build();def("Declaration").bases("Statement");def("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",def("Identifier"));def("FunctionExpression").bases("Function","Expression").build("id","params","body");def("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",or("var","let","const")).field("declarations",[or(def("VariableDeclarator"),def("Identifier"))]);def("VariableDeclarator").bases("Node").build("id","init").field("id",def("Pattern")).field("init",or(def("Expression"),null));def("Expression").bases("Node","Pattern");def("ThisExpression").bases("Expression").build();def("ArrayExpression").bases("Expression").build("elements").field("elements",[or(def("Expression"),null)]);def("ObjectExpression").bases("Expression").build("properties").field("properties",[def("Property")]);def("Property").bases("Node").build("kind","key","value").field("kind",or("init","get","set")).field("key",or(def("Literal"),def("Identifier"))).field("value",def("Expression"));def("SequenceExpression").bases("Expression").build("expressions").field("expressions",[def("Expression")]);var UnaryOperator=or("-","+","!","~","typeof","void","delete");def("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",UnaryOperator).field("argument",def("Expression")).field("prefix",isBoolean,defaults["true"]);var BinaryOperator=or("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof","..");def("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",BinaryOperator).field("left",def("Expression")).field("right",def("Expression"));var AssignmentOperator=or("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");def("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",AssignmentOperator).field("left",def("Pattern")).field("right",def("Expression"));var UpdateOperator=or("++","--");def("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",UpdateOperator).field("argument",def("Expression")).field("prefix",isBoolean);var LogicalOperator=or("||","&&");def("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",LogicalOperator).field("left",def("Expression")).field("right",def("Expression"));def("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",def("Expression")).field("consequent",def("Expression")).field("alternate",def("Expression"));def("NewExpression").bases("Expression").build("callee","arguments").field("callee",def("Expression")).field("arguments",[def("Expression")]);def("CallExpression").bases("Expression").build("callee","arguments").field("callee",def("Expression")).field("arguments",[def("Expression")]);def("MemberExpression").bases("Expression").build("object","property","computed").field("object",def("Expression")).field("property",or(def("Identifier"),def("Expression"))).field("computed",isBoolean);def("Pattern").bases("Node");def("ObjectPattern").bases("Pattern").build("properties").field("properties",[def("PropertyPattern")]);def("PropertyPattern").bases("Pattern").build("key","pattern").field("key",or(def("Literal"),def("Identifier"))).field("pattern",def("Pattern"));def("ArrayPattern").bases("Pattern").build("elements").field("elements",[or(def("Pattern"),null)]);def("SwitchCase").bases("Node").build("test","consequent").field("test",or(def("Expression"),null)).field("consequent",[def("Statement")]);def("Identifier").bases("Node","Expression","Pattern").build("name").field("name",isString);def("Literal").bases("Node","Expression").build("value").field("value",or(isString,isBoolean,null,isNumber,isRegExp));def("Block").bases("Printable").build("loc","value").field("value",isString);def("Line").bases("Printable").build("loc","value").field("value",isString)},{"../lib/shared":123,"../lib/types":124}],113:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isBoolean=builtin.boolean;def("XMLDefaultDeclaration").bases("Declaration").field("namespace",def("Expression"));def("XMLAnyName").bases("Expression");def("XMLQualifiedIdentifier").bases("Expression").field("left",or(def("Identifier"),def("XMLAnyName"))).field("right",or(def("Identifier"),def("Expression"))).field("computed",isBoolean);def("XMLFunctionQualifiedIdentifier").bases("Expression").field("right",or(def("Identifier"),def("Expression"))).field("computed",isBoolean);def("XMLAttributeSelector").bases("Expression").field("attribute",def("Expression"));def("XMLFilterExpression").bases("Expression").field("left",def("Expression")).field("right",def("Expression"));def("XMLElement").bases("XML","Expression").field("contents",[def("XML")]);def("XMLList").bases("XML","Expression").field("contents",[def("XML")]);def("XML").bases("Node");def("XMLEscape").bases("XML").field("expression",def("Expression"));def("XMLText").bases("XML").field("text",isString);def("XMLStartTag").bases("XML").field("contents",[def("XML")]);def("XMLEndTag").bases("XML").field("contents",[def("XML")]);def("XMLPointTag").bases("XML").field("contents",[def("XML")]);def("XMLName").bases("XML").field("contents",or(isString,[def("XML")]));def("XMLAttribute").bases("XML").field("value",isString);def("XMLCdata").bases("XML").field("contents",isString);def("XMLComment").bases("XML").field("contents",isString);def("XMLProcessingInstruction").bases("XML").field("target",isString).field("contents",or(isString,null))},{"../lib/types":124,"./core":112}],114:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isBoolean=builtin.boolean;var isObject=builtin.object;var isString=builtin.string;var defaults=require("../lib/shared").defaults;def("Function").field("generator",isBoolean,defaults["false"]).field("expression",isBoolean,defaults["false"]).field("defaults",[or(def("Expression"),null)],defaults.emptyArray).field("rest",or(def("Identifier"),null),defaults["null"]);def("FunctionDeclaration").build("id","params","body","generator","expression");def("FunctionExpression").build("id","params","body","generator","expression");def("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,defaults["null"]).field("generator",false);def("YieldExpression").bases("Expression").build("argument","delegate").field("argument",or(def("Expression"),null)).field("delegate",isBoolean,defaults["false"]);def("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",def("Expression")).field("blocks",[def("ComprehensionBlock")]).field("filter",or(def("Expression"),null));def("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",def("Expression")).field("blocks",[def("ComprehensionBlock")]).field("filter",or(def("Expression"),null));def("ComprehensionBlock").bases("Node").build("left","right","each").field("left",def("Pattern")).field("right",def("Expression")).field("each",isBoolean);def("ModuleSpecifier").bases("Literal").build("value").field("value",isString);def("Property").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("method",isBoolean,defaults["false"]).field("shorthand",isBoolean,defaults["false"]).field("computed",isBoolean,defaults["false"]); def("PropertyPattern").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("MethodDefinition").bases("Declaration").build("kind","key","value").field("kind",or("init","get","set","")).field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("value",def("Function")).field("computed",isBoolean,defaults["false"]);def("SpreadElement").bases("Node").build("argument").field("argument",def("Expression"));def("ArrayExpression").field("elements",[or(def("Expression"),def("SpreadElement"),null)]);def("NewExpression").field("arguments",[or(def("Expression"),def("SpreadElement"))]);def("CallExpression").field("arguments",[or(def("Expression"),def("SpreadElement"))]);def("SpreadElementPattern").bases("Pattern").build("argument").field("argument",def("Pattern"));var ClassBodyElement=or(def("MethodDefinition"),def("VariableDeclarator"),def("ClassPropertyDefinition"),def("ClassProperty"));def("ClassProperty").bases("Declaration").build("key").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",ClassBodyElement);def("ClassBody").bases("Declaration").build("body").field("body",[ClassBodyElement]);def("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",def("Identifier")).field("body",def("ClassBody")).field("superClass",or(def("Expression"),null),defaults["null"]);def("ClassExpression").bases("Expression").build("id","body","superClass").field("id",or(def("Identifier"),null),defaults["null"]).field("body",def("ClassBody")).field("superClass",or(def("Expression"),null),defaults["null"]).field("implements",[def("ClassImplements")],defaults.emptyArray);def("ClassImplements").bases("Node").build("id").field("id",def("Identifier")).field("superClass",or(def("Expression"),null),defaults["null"]);def("Specifier").bases("Node");def("NamedSpecifier").bases("Specifier").field("id",def("Identifier")).field("name",or(def("Identifier"),null),defaults["null"]);def("ExportSpecifier").bases("NamedSpecifier").build("id","name");def("ExportBatchSpecifier").bases("Specifier").build();def("ImportSpecifier").bases("NamedSpecifier").build("id","name");def("ImportNamespaceSpecifier").bases("Specifier").build("id").field("id",def("Identifier"));def("ImportDefaultSpecifier").bases("Specifier").build("id").field("id",def("Identifier"));def("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",isBoolean).field("declaration",or(def("Declaration"),def("Expression"),null)).field("specifiers",[or(def("ExportSpecifier"),def("ExportBatchSpecifier"))],defaults.emptyArray).field("source",or(def("ModuleSpecifier"),null),defaults["null"]);def("ImportDeclaration").bases("Declaration").build("specifiers","source").field("specifiers",[or(def("ImportSpecifier"),def("ImportNamespaceSpecifier"),def("ImportDefaultSpecifier"))],defaults.emptyArray).field("source",def("ModuleSpecifier"));def("TaggedTemplateExpression").bases("Expression").field("tag",def("Expression")).field("quasi",def("TemplateLiteral"));def("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[def("TemplateElement")]).field("expressions",[def("Expression")]);def("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:isString,raw:isString}).field("tail",isBoolean)},{"../lib/shared":123,"../lib/types":124,"./core":112}],115:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isBoolean=builtin.boolean;var defaults=require("../lib/shared").defaults;def("Function").field("async",isBoolean,defaults["false"]);def("SpreadProperty").bases("Node").build("argument").field("argument",def("Expression"));def("ObjectExpression").field("properties",[or(def("Property"),def("SpreadProperty"))]);def("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",def("Pattern"));def("ObjectPattern").field("properties",[or(def("PropertyPattern"),def("SpreadPropertyPattern"))]);def("AwaitExpression").bases("Expression").build("argument","all").field("argument",or(def("Expression"),null)).field("all",isBoolean,defaults["false"])},{"../lib/shared":123,"../lib/types":124,"./core":112}],116:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isBoolean=builtin.boolean;var defaults=require("../lib/shared").defaults;def("XJSAttribute").bases("Node").build("name","value").field("name",or(def("XJSIdentifier"),def("XJSNamespacedName"))).field("value",or(def("Literal"),def("XJSExpressionContainer"),null),defaults["null"]);def("XJSIdentifier").bases("Node").build("name").field("name",isString);def("XJSNamespacedName").bases("Node").build("namespace","name").field("namespace",def("XJSIdentifier")).field("name",def("XJSIdentifier"));def("XJSMemberExpression").bases("MemberExpression").build("object","property").field("object",or(def("XJSIdentifier"),def("XJSMemberExpression"))).field("property",def("XJSIdentifier")).field("computed",isBoolean,defaults.false);var XJSElementName=or(def("XJSIdentifier"),def("XJSNamespacedName"),def("XJSMemberExpression"));def("XJSSpreadAttribute").bases("Node").build("argument").field("argument",def("Expression"));var XJSAttributes=[or(def("XJSAttribute"),def("XJSSpreadAttribute"))];def("XJSExpressionContainer").bases("Expression").build("expression").field("expression",def("Expression"));def("XJSElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",def("XJSOpeningElement")).field("closingElement",or(def("XJSClosingElement"),null),defaults["null"]).field("children",[or(def("XJSElement"),def("XJSExpressionContainer"),def("XJSText"),def("Literal"))],defaults.emptyArray).field("name",XJSElementName,function(){return this.openingElement.name}).field("selfClosing",isBoolean,function(){return this.openingElement.selfClosing}).field("attributes",XJSAttributes,function(){return this.openingElement.attributes});def("XJSOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",XJSElementName).field("attributes",XJSAttributes,defaults.emptyArray).field("selfClosing",isBoolean,defaults["false"]);def("XJSClosingElement").bases("Node").build("name").field("name",XJSElementName);def("XJSText").bases("Literal").build("value").field("value",isString);def("XJSEmptyExpression").bases("Expression").build();def("Type").bases("Node");def("AnyTypeAnnotation").bases("Type");def("VoidTypeAnnotation").bases("Type");def("NumberTypeAnnotation").bases("Type");def("StringTypeAnnotation").bases("Type");def("StringLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",isString).field("raw",isString);def("BooleanTypeAnnotation").bases("Type");def("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",def("Type"));def("NullableTypeAnnotation").bases("Type").build("typeAnnotation").field("typeAnnotation",def("Type"));def("FunctionTypeAnnotation").bases("Type").build("params","returnType","rest","typeParameters").field("params",[def("FunctionTypeParam")]).field("returnType",def("Type")).field("rest",or(def("FunctionTypeParam"),null)).field("typeParameters",or(def("TypeParameterDeclaration"),null));def("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",def("Identifier")).field("typeAnnotation",def("Type")).field("optional",isBoolean);def("ArrayTypeAnnotation").bases("Type").build("elementType").field("elementType",def("Type"));def("ObjectTypeAnnotation").bases("Type").build("properties").field("properties",[def("ObjectTypeProperty")]).field("indexers",[def("ObjectTypeIndexer")],defaults.emptyArray).field("callProperties",[def("ObjectTypeCallProperty")],defaults.emptyArray);def("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",or(def("Literal"),def("Identifier"))).field("value",def("Type")).field("optional",isBoolean);def("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",def("Identifier")).field("key",def("Type")).field("value",def("Type"));def("ObjectTypeCallProperty").bases("Node").build("value").field("value",def("FunctionTypeAnnotation")).field("static",isBoolean,false);def("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",or(def("Identifier"),def("QualifiedTypeIdentifier"))).field("id",def("Identifier"));def("GenericTypeAnnotation").bases("Type").build("id","typeParameters").field("id",or(def("Identifier"),def("QualifiedTypeIdentifier"))).field("typeParameters",or(def("TypeParameterInstantiation"),null));def("MemberTypeAnnotation").bases("Type").build("object","property").field("object",def("Identifier")).field("property",or(def("MemberTypeAnnotation"),def("GenericTypeAnnotation")));def("UnionTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("IntersectionTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("TypeofTypeAnnotation").bases("Type").build("argument").field("argument",def("Type"));def("Identifier").field("typeAnnotation",or(def("TypeAnnotation"),null),defaults["null"]);def("TypeParameterDeclaration").bases("Node").build("params").field("params",[def("Identifier")]);def("TypeParameterInstantiation").bases("Node").build("params").field("params",[def("Type")]);def("Function").field("returnType",or(def("TypeAnnotation"),null),defaults["null"]).field("typeParameters",or(def("TypeParameterDeclaration"),null),defaults["null"]);def("ClassProperty").build("key","typeAnnotation").field("typeAnnotation",def("TypeAnnotation")).field("static",isBoolean,false);def("ClassImplements").field("typeParameters",or(def("TypeParameterInstantiation"),null),defaults["null"]);def("InterfaceDeclaration").bases("Statement").build("id","body","extends").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterDeclaration"),null),defaults["null"]).field("body",def("ObjectTypeAnnotation")).field("extends",[def("InterfaceExtends")]);def("InterfaceExtends").bases("Node").build("id").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterInstantiation"),null));def("TypeAlias").bases("Statement").build("id","typeParameters","right").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterDeclaration"),null)).field("right",def("Type"));def("TupleTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("DeclareVariable").bases("Statement").build("id").field("id",def("Identifier"));def("DeclareFunction").bases("Statement").build("id").field("id",def("Identifier"));def("DeclareClass").bases("InterfaceDeclaration").build("id");def("DeclareModule").bases("Statement").build("id","body").field("id",or(def("Identifier"),def("Literal"))).field("body",def("BlockStatement"))},{"../lib/shared":123,"../lib/types":124,"./core":112}],117:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var geq=require("../lib/shared").geq;def("ForOfStatement").bases("Statement").build("left","right","body").field("left",or(def("VariableDeclaration"),def("Expression"))).field("right",def("Expression")).field("body",def("Statement"));def("LetStatement").bases("Statement").build("head","body").field("head",[def("VariableDeclarator")]).field("body",def("Statement"));def("LetExpression").bases("Expression").build("head","body").field("head",[def("VariableDeclarator")]).field("body",def("Expression"));def("GraphExpression").bases("Expression").build("index","expression").field("index",geq(0)).field("expression",def("Literal"));def("GraphIndexExpression").bases("Expression").build("index").field("index",geq(0))},{"../lib/shared":123,"../lib/types":124,"./core":112}],118:[function(require,module,exports){var assert=require("assert");var types=require("../main");var getFieldNames=types.getFieldNames;var getFieldValue=types.getFieldValue;var isArray=types.builtInTypes.array;var isObject=types.builtInTypes.object;var isDate=types.builtInTypes.Date;var isRegExp=types.builtInTypes.RegExp;var hasOwn=Object.prototype.hasOwnProperty;function astNodesAreEquivalent(a,b,problemPath){if(isArray.check(problemPath)){problemPath.length=0}else{problemPath=null}return areEquivalent(a,b,problemPath)}astNodesAreEquivalent.assert=function(a,b){var problemPath=[];if(!astNodesAreEquivalent(a,b,problemPath)){if(problemPath.length===0){assert.strictEqual(a,b)}else{assert.ok(false,"Nodes differ in the following path: "+problemPath.map(subscriptForProperty).join(""))}}};function subscriptForProperty(property){if(/[_$a-z][_$a-z0-9]*/i.test(property)){return"."+property}return"["+JSON.stringify(property)+"]"}function areEquivalent(a,b,problemPath){if(a===b){return true}if(isArray.check(a)){return arraysAreEquivalent(a,b,problemPath)}if(isObject.check(a)){return objectsAreEquivalent(a,b,problemPath)}if(isDate.check(a)){return isDate.check(b)&&+a===+b}if(isRegExp.check(a)){return isRegExp.check(b)&&(a.source===b.source&&a.global===b.global&&a.multiline===b.multiline&&a.ignoreCase===b.ignoreCase)}return a==b}function arraysAreEquivalent(a,b,problemPath){isArray.assert(a);var aLength=a.length;if(!isArray.check(b)||b.length!==aLength){if(problemPath){problemPath.push("length")}return false}for(var i=0;i<aLength;++i){if(problemPath){problemPath.push(i)}if(i in a!==i in b){return false}if(!areEquivalent(a[i],b[i],problemPath)){return false}if(problemPath){assert.strictEqual(problemPath.pop(),i)}}return true}function objectsAreEquivalent(a,b,problemPath){isObject.assert(a);if(!isObject.check(b)){return false}if(a.type!==b.type){if(problemPath){problemPath.push("type")}return false}var aNames=getFieldNames(a);var aNameCount=aNames.length;var bNames=getFieldNames(b);var bNameCount=bNames.length;if(aNameCount===bNameCount){for(var i=0;i<aNameCount;++i){var name=aNames[i];var aChild=getFieldValue(a,name);var bChild=getFieldValue(b,name);if(problemPath){problemPath.push(name)}if(!areEquivalent(aChild,bChild,problemPath)){return false}if(problemPath){assert.strictEqual(problemPath.pop(),name)}}return true}if(!problemPath){return false}var seenNames=Object.create(null);for(i=0;i<aNameCount;++i){seenNames[aNames[i]]=true}for(i=0;i<bNameCount;++i){name=bNames[i];if(!hasOwn.call(seenNames,name)){problemPath.push(name);return false}delete seenNames[name]}for(name in seenNames){problemPath.push(name);break}return false}module.exports=astNodesAreEquivalent},{"../main":125,assert:127}],119:[function(require,module,exports){var assert=require("assert");var types=require("./types");var n=types.namedTypes;var b=types.builders;var isNumber=types.builtInTypes.number;var isArray=types.builtInTypes.array;var Path=require("./path");var Scope=require("./scope");function NodePath(value,parentPath,name){assert.ok(this instanceof NodePath);Path.call(this,value,parentPath,name)}require("util").inherits(NodePath,Path);var NPp=NodePath.prototype;Object.defineProperties(NPp,{node:{get:function(){Object.defineProperty(this,"node",{configurable:true,value:this._computeNode()});return this.node}},parent:{get:function(){Object.defineProperty(this,"parent",{configurable:true,value:this._computeParent()});return this.parent}},scope:{get:function(){Object.defineProperty(this,"scope",{configurable:true,value:this._computeScope()});return this.scope}}});NPp.replace=function(){delete this.node;delete this.parent;delete this.scope;return Path.prototype.replace.apply(this,arguments)};NPp.prune=function(){var remainingNodePath=this.parent;this.replace();return cleanUpNodesAfterPrune(remainingNodePath)};NPp._computeNode=function(){var value=this.value;if(n.Node.check(value)){return value}var pp=this.parentPath;return pp&&pp.node||null};NPp._computeParent=function(){var value=this.value;var pp=this.parentPath;if(!n.Node.check(value)){while(pp&&!n.Node.check(pp.value)){pp=pp.parentPath}if(pp){pp=pp.parentPath}}while(pp&&!n.Node.check(pp.value)){pp=pp.parentPath}return pp||null};NPp._computeScope=function(){var value=this.value;var pp=this.parentPath;var scope=pp&&pp.scope;if(n.Node.check(value)&&Scope.isEstablishedBy(value)){scope=new Scope(this,scope)}return scope||null};NPp.getValueProperty=function(name){return types.getFieldValue(this.value,name)};NPp.needsParens=function(assumeExpressionContext){var pp=this.parentPath;if(!pp){return false}var node=this.value;if(!n.Expression.check(node)){return false}if(node.type==="Identifier"){return false}while(!n.Node.check(pp.value)){pp=pp.parentPath;if(!pp){return false}}var parent=pp.value;switch(node.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return parent.type==="MemberExpression"&&this.name==="object"&&parent.object===node;case"BinaryExpression":case"LogicalExpression":switch(parent.type){case"CallExpression":return this.name==="callee"&&parent.callee===node;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return true;case"MemberExpression":return this.name==="object"&&parent.object===node;case"BinaryExpression":case"LogicalExpression":var po=parent.operator;var pp=PRECEDENCE[po];var no=node.operator;var np=PRECEDENCE[no];if(pp>np){return true}if(pp===np&&this.name==="right"){assert.strictEqual(parent.right,node);return true}default:return false}case"SequenceExpression":switch(parent.type){case"ForStatement":return false;case"ExpressionStatement":return this.name!=="expression";default:return true}case"YieldExpression":switch(parent.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return true;default:return false}case"Literal":return parent.type==="MemberExpression"&&isNumber.check(node.value)&&this.name==="object"&&parent.object===node;case"AssignmentExpression":case"ConditionalExpression":switch(parent.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return true;case"CallExpression":return this.name==="callee"&&parent.callee===node;case"ConditionalExpression":return this.name==="test"&&parent.test===node;case"MemberExpression":return this.name==="object"&&parent.object===node;default:return false}default:if(parent.type==="NewExpression"&&this.name==="callee"&&parent.callee===node){return containsCallExpression(node)}}if(assumeExpressionContext!==true&&!this.canBeFirstInStatement()&&this.firstInStatement())return true;return false};function isBinary(node){return n.BinaryExpression.check(node)||n.LogicalExpression.check(node)}function isUnaryLike(node){return n.UnaryExpression.check(node)||n.SpreadElement&&n.SpreadElement.check(node)||n.SpreadProperty&&n.SpreadProperty.check(node)}var PRECEDENCE={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(tier,i){tier.forEach(function(op){PRECEDENCE[op]=i})});function containsCallExpression(node){if(n.CallExpression.check(node)){return true}if(isArray.check(node)){return node.some(containsCallExpression)}if(n.Node.check(node)){return types.someField(node,function(name,child){return containsCallExpression(child)})}return false}NPp.canBeFirstInStatement=function(){var node=this.node;return!n.FunctionExpression.check(node)&&!n.ObjectExpression.check(node)};NPp.firstInStatement=function(){return firstInStatement(this)};function firstInStatement(path){for(var node,parent;path.parent;path=path.parent){node=path.node;parent=path.parent.node;if(n.BlockStatement.check(parent)&&path.parent.name==="body"&&path.name===0){assert.strictEqual(parent.body[0],node);return true}if(n.ExpressionStatement.check(parent)&&path.name==="expression"){assert.strictEqual(parent.expression,node);return true}if(n.SequenceExpression.check(parent)&&path.parent.name==="expressions"&&path.name===0){assert.strictEqual(parent.expressions[0],node);continue}if(n.CallExpression.check(parent)&&path.name==="callee"){assert.strictEqual(parent.callee,node);continue}if(n.MemberExpression.check(parent)&&path.name==="object"){assert.strictEqual(parent.object,node);continue}if(n.ConditionalExpression.check(parent)&&path.name==="test"){assert.strictEqual(parent.test,node);continue}if(isBinary(parent)&&path.name==="left"){assert.strictEqual(parent.left,node);continue}if(n.UnaryExpression.check(parent)&&!parent.prefix&&path.name==="argument"){assert.strictEqual(parent.argument,node);continue}return false}return true}function cleanUpNodesAfterPrune(remainingNodePath){if(n.VariableDeclaration.check(remainingNodePath.node)){var declarations=remainingNodePath.get("declarations").value;if(!declarations||declarations.length===0){return remainingNodePath.prune()}}else if(n.ExpressionStatement.check(remainingNodePath.node)){if(!remainingNodePath.get("expression").value){return remainingNodePath.prune()}}else if(n.IfStatement.check(remainingNodePath.node)){cleanUpIfStatementAfterPrune(remainingNodePath)}return remainingNodePath}function cleanUpIfStatementAfterPrune(ifStatement){var testExpression=ifStatement.get("test").value;var alternate=ifStatement.get("alternate").value;var consequent=ifStatement.get("consequent").value;if(!consequent&&!alternate){var testExpressionStatement=b.expressionStatement(testExpression);ifStatement.replace(testExpressionStatement)}else if(!consequent&&alternate){var negatedTestExpression=b.unaryExpression("!",testExpression,true);if(n.UnaryExpression.check(testExpression)&&testExpression.operator==="!"){negatedTestExpression=testExpression.argument}ifStatement.get("test").replace(negatedTestExpression);ifStatement.get("consequent").replace(alternate);ifStatement.get("alternate").replace()}}module.exports=NodePath},{"./path":121,"./scope":122,"./types":124,assert:127,util:152}],120:[function(require,module,exports){var assert=require("assert");var types=require("./types");var NodePath=require("./node-path");var Node=types.namedTypes.Node;var isArray=types.builtInTypes.array;var isObject=types.builtInTypes.object;var isFunction=types.builtInTypes.function;var hasOwn=Object.prototype.hasOwnProperty;var undefined;function PathVisitor(){assert.ok(this instanceof PathVisitor);this._reusableContextStack=[];this._methodNameTable=computeMethodNameTable(this);this.Context=makeContextConstructor(this);this._visiting=false;this._changeReported=false}function computeMethodNameTable(visitor){var typeNames=Object.create(null);for(var methodName in visitor){if(/^visit[A-Z]/.test(methodName)){typeNames[methodName.slice("visit".length)]=true}}var supertypeTable=types.computeSupertypeLookupTable(typeNames);var methodNameTable=Object.create(null);var typeNames=Object.keys(supertypeTable);var typeNameCount=typeNames.length;for(var i=0;i<typeNameCount;++i){var typeName=typeNames[i];methodName="visit"+supertypeTable[typeName];if(isFunction.check(visitor[methodName])){methodNameTable[typeName]=methodName}}return methodNameTable}PathVisitor.fromMethodsObject=function fromMethodsObject(methods){if(methods instanceof PathVisitor){return methods}if(!isObject.check(methods)){return new PathVisitor}function Visitor(){assert.ok(this instanceof Visitor);PathVisitor.call(this)}var Vp=Visitor.prototype=Object.create(PVp);Vp.constructor=Visitor;extend(Vp,methods);extend(Visitor,PathVisitor);isFunction.assert(Visitor.fromMethodsObject);isFunction.assert(Visitor.visit);return new Visitor};function extend(target,source){for(var property in source){if(hasOwn.call(source,property)){target[property]=source[property]}}return target}PathVisitor.visit=function visit(node,methods){return PathVisitor.fromMethodsObject(methods).visit(node)};var PVp=PathVisitor.prototype;var recursiveVisitWarning=["Recursively calling visitor.visit(path) resets visitor state.","Try this.visit(path) or this.traverse(path) instead."].join(" ");PVp.visit=function(){assert.ok(!this._visiting,recursiveVisitWarning);this._visiting=true;this._changeReported=false;var argc=arguments.length;var args=new Array(argc);for(var i=0;i<argc;++i){args[i]=arguments[i]}if(!(args[0]instanceof NodePath)){args[0]=new NodePath({root:args[0]}).get("root")}this.reset.apply(this,args);try{return this.visitWithoutReset(args[0])}finally{this._visiting=false}};PVp.reset=function(path){};PVp.visitWithoutReset=function(path){if(this instanceof this.Context){return this.visitor.visitWithoutReset(path)}assert.ok(path instanceof NodePath);var value=path.value;var methodName=Node.check(value)&&this._methodNameTable[value.type];if(methodName){var context=this.acquireContext(path);try{return context.invokeVisitorMethod(methodName)}finally{this.releaseContext(context)}}else{return visitChildren(path,this)}};function visitChildren(path,visitor){assert.ok(path instanceof NodePath);assert.ok(visitor instanceof PathVisitor);var value=path.value;if(isArray.check(value)){path.each(visitor.visitWithoutReset,visitor)}else if(!isObject.check(value)){}else{var childNames=types.getFieldNames(value);var childCount=childNames.length;var childPaths=[];for(var i=0;i<childCount;++i){var childName=childNames[i];if(!hasOwn.call(value,childName)){value[childName]=types.getFieldValue(value,childName)}childPaths.push(path.get(childName))}for(var i=0;i<childCount;++i){visitor.visitWithoutReset(childPaths[i])}}return path.value}PVp.acquireContext=function(path){if(this._reusableContextStack.length===0){return new this.Context(path)}return this._reusableContextStack.pop().reset(path)};PVp.releaseContext=function(context){assert.ok(context instanceof this.Context);this._reusableContextStack.push(context);context.currentPath=null};PVp.reportChanged=function(){this._changeReported=true};PVp.wasChangeReported=function(){return this._changeReported};function makeContextConstructor(visitor){function Context(path){assert.ok(this instanceof Context);assert.ok(this instanceof PathVisitor);assert.ok(path instanceof NodePath);Object.defineProperty(this,"visitor",{value:visitor,writable:false,enumerable:true,configurable:false});this.currentPath=path;this.needToCallTraverse=true;Object.seal(this)}assert.ok(visitor instanceof PathVisitor);var Cp=Context.prototype=Object.create(visitor);Cp.constructor=Context;extend(Cp,sharedContextProtoMethods);return Context}var sharedContextProtoMethods=Object.create(null);sharedContextProtoMethods.reset=function reset(path){assert.ok(this instanceof this.Context);assert.ok(path instanceof NodePath);this.currentPath=path;this.needToCallTraverse=true;return this};sharedContextProtoMethods.invokeVisitorMethod=function invokeVisitorMethod(methodName){assert.ok(this instanceof this.Context);assert.ok(this.currentPath instanceof NodePath);var result=this.visitor[methodName].call(this,this.currentPath);if(result===false){this.needToCallTraverse=false}else if(result!==undefined){this.currentPath=this.currentPath.replace(result)[0];if(this.needToCallTraverse){this.traverse(this.currentPath)}}assert.strictEqual(this.needToCallTraverse,false,"Must either call this.traverse or return false in "+methodName);var path=this.currentPath;return path&&path.value};sharedContextProtoMethods.traverse=function traverse(path,newVisitor){assert.ok(this instanceof this.Context);assert.ok(path instanceof NodePath);assert.ok(this.currentPath instanceof NodePath);this.needToCallTraverse=false;return visitChildren(path,PathVisitor.fromMethodsObject(newVisitor||this.visitor))};sharedContextProtoMethods.visit=function visit(path,newVisitor){assert.ok(this instanceof this.Context);assert.ok(path instanceof NodePath);assert.ok(this.currentPath instanceof NodePath);this.needToCallTraverse=false;return PathVisitor.fromMethodsObject(newVisitor||this.visitor).visitWithoutReset(path)};sharedContextProtoMethods.reportChanged=function reportChanged(){this.visitor.reportChanged()};module.exports=PathVisitor},{"./node-path":119,"./types":124,assert:127}],121:[function(require,module,exports){var assert=require("assert");var Op=Object.prototype;var hasOwn=Op.hasOwnProperty;var types=require("./types");var isArray=types.builtInTypes.array;var isNumber=types.builtInTypes.number;var Ap=Array.prototype;var slice=Ap.slice;var map=Ap.map;function Path(value,parentPath,name){assert.ok(this instanceof Path);if(parentPath){assert.ok(parentPath instanceof Path)}else{parentPath=null;name=null}this.value=value;this.parentPath=parentPath;this.name=name;this.__childCache=null}var Pp=Path.prototype;function getChildCache(path){return path.__childCache||(path.__childCache=Object.create(null))}function getChildPath(path,name){var cache=getChildCache(path);var actualChildValue=path.getValueProperty(name);var childPath=cache[name];if(!hasOwn.call(cache,name)||childPath.value!==actualChildValue){childPath=cache[name]=new path.constructor(actualChildValue,path,name)}return childPath}Pp.getValueProperty=function getValueProperty(name){return this.value[name]};Pp.get=function get(name){var path=this;var names=arguments;var count=names.length;for(var i=0;i<count;++i){path=getChildPath(path,names[i])}return path};Pp.each=function each(callback,context){var childPaths=[];var len=this.value.length;var i=0;for(var i=0;i<len;++i){if(hasOwn.call(this.value,i)){childPaths[i]=this.get(i)}}context=context||this;for(i=0;i<len;++i){if(hasOwn.call(childPaths,i)){callback.call(context,childPaths[i])}}};Pp.map=function map(callback,context){var result=[];this.each(function(childPath){result.push(callback.call(this,childPath))},context);return result};Pp.filter=function filter(callback,context){var result=[];this.each(function(childPath){if(callback.call(this,childPath)){result.push(childPath)}},context);return result};function emptyMoves(){}function getMoves(path,offset,start,end){isArray.assert(path.value);if(offset===0){return emptyMoves}var length=path.value.length;if(length<1){return emptyMoves}var argc=arguments.length;if(argc===2){start=0;end=length}else if(argc===3){start=Math.max(start,0);end=length}else{start=Math.max(start,0);end=Math.min(end,length)}isNumber.assert(start);isNumber.assert(end);var moves=Object.create(null);var cache=getChildCache(path);for(var i=start;i<end;++i){if(hasOwn.call(path.value,i)){var childPath=path.get(i);assert.strictEqual(childPath.name,i);var newIndex=i+offset;childPath.name=newIndex;moves[newIndex]=childPath;delete cache[i]}}delete cache.length;return function(){for(var newIndex in moves){var childPath=moves[newIndex];assert.strictEqual(childPath.name,+newIndex);cache[newIndex]=childPath;path.value[newIndex]=childPath.value}}}Pp.shift=function shift(){var move=getMoves(this,-1);var result=this.value.shift();move();return result};Pp.unshift=function unshift(node){var move=getMoves(this,arguments.length);var result=this.value.unshift.apply(this.value,arguments);move();return result};Pp.push=function push(node){isArray.assert(this.value);delete getChildCache(this).length;return this.value.push.apply(this.value,arguments)};Pp.pop=function pop(){isArray.assert(this.value);var cache=getChildCache(this);delete cache[this.value.length-1];delete cache.length;return this.value.pop()};Pp.insertAt=function insertAt(index,node){var argc=arguments.length;var move=getMoves(this,argc-1,index);if(move===emptyMoves){return this}index=Math.max(index,0);for(var i=1;i<argc;++i){this.value[index+i-1]=arguments[i]}move();return this};Pp.insertBefore=function insertBefore(node){var pp=this.parentPath;var argc=arguments.length;var insertAtArgs=[this.name];for(var i=0;i<argc;++i){insertAtArgs.push(arguments[i])}return pp.insertAt.apply(pp,insertAtArgs)};Pp.insertAfter=function insertAfter(node){var pp=this.parentPath;var argc=arguments.length;var insertAtArgs=[this.name+1];for(var i=0;i<argc;++i){insertAtArgs.push(arguments[i]) }return pp.insertAt.apply(pp,insertAtArgs)};function repairRelationshipWithParent(path){assert.ok(path instanceof Path);var pp=path.parentPath;if(!pp){return path}var parentValue=pp.value;var parentCache=getChildCache(pp);if(parentValue[path.name]===path.value){parentCache[path.name]=path}else if(isArray.check(parentValue)){var i=parentValue.indexOf(path.value);if(i>=0){parentCache[path.name=i]=path}}else{parentValue[path.name]=path.value;parentCache[path.name]=path}assert.strictEqual(parentValue[path.name],path.value);assert.strictEqual(path.parentPath.get(path.name),path);return path}Pp.replace=function replace(replacement){var results=[];var parentValue=this.parentPath.value;var parentCache=getChildCache(this.parentPath);var count=arguments.length;repairRelationshipWithParent(this);if(isArray.check(parentValue)){var originalLength=parentValue.length;var move=getMoves(this.parentPath,count-1,this.name+1);var spliceArgs=[this.name,1];for(var i=0;i<count;++i){spliceArgs.push(arguments[i])}var splicedOut=parentValue.splice.apply(parentValue,spliceArgs);assert.strictEqual(splicedOut[0],this.value);assert.strictEqual(parentValue.length,originalLength-1+count);move();if(count===0){delete this.value;delete parentCache[this.name];this.__childCache=null}else{assert.strictEqual(parentValue[this.name],replacement);if(this.value!==replacement){this.value=replacement;this.__childCache=null}for(i=0;i<count;++i){results.push(this.parentPath.get(this.name+i))}assert.strictEqual(results[0],this)}}else if(count===1){if(this.value!==replacement){this.__childCache=null}this.value=parentValue[this.name]=replacement;results.push(this)}else if(count===0){delete parentValue[this.name];delete this.value;this.__childCache=null}else{assert.ok(false,"Could not replace path")}return results};module.exports=Path},{"./types":124,assert:127}],122:[function(require,module,exports){var assert=require("assert");var types=require("./types");var Type=types.Type;var namedTypes=types.namedTypes;var Node=namedTypes.Node;var Expression=namedTypes.Expression;var isArray=types.builtInTypes.array;var hasOwn=Object.prototype.hasOwnProperty;var b=types.builders;function Scope(path,parentScope){assert.ok(this instanceof Scope);assert.ok(path instanceof require("./node-path"));ScopeType.assert(path.value);var depth;if(parentScope){assert.ok(parentScope instanceof Scope);depth=parentScope.depth+1}else{parentScope=null;depth=0}Object.defineProperties(this,{path:{value:path},node:{value:path.value},isGlobal:{value:!parentScope,enumerable:true},depth:{value:depth},parent:{value:parentScope},bindings:{value:{}}})}var scopeTypes=[namedTypes.Program,namedTypes.Function,namedTypes.CatchClause];var ScopeType=Type.or.apply(Type,scopeTypes);Scope.isEstablishedBy=function(node){return ScopeType.check(node)};var Sp=Scope.prototype;Sp.didScan=false;Sp.declares=function(name){this.scan();return hasOwn.call(this.bindings,name)};Sp.declareTemporary=function(prefix){if(prefix){assert.ok(/^[a-z$_]/i.test(prefix),prefix)}else{prefix="t$"}prefix+=this.depth.toString(36)+"$";this.scan();var index=0;while(this.declares(prefix+index)){++index}var name=prefix+index;return this.bindings[name]=types.builders.identifier(name)};Sp.injectTemporary=function(identifier,init){identifier||(identifier=this.declareTemporary());var bodyPath=this.path.get("body");if(namedTypes.BlockStatement.check(bodyPath.value)){bodyPath=bodyPath.get("body")}bodyPath.unshift(b.variableDeclaration("var",[b.variableDeclarator(identifier,init||null)]));return identifier};Sp.scan=function(force){if(force||!this.didScan){for(var name in this.bindings){delete this.bindings[name]}scanScope(this.path,this.bindings);this.didScan=true}};Sp.getBindings=function(){this.scan();return this.bindings};function scanScope(path,bindings){var node=path.value;ScopeType.assert(node);if(namedTypes.CatchClause.check(node)){addPattern(path.get("param"),bindings)}else{recursiveScanScope(path,bindings)}}function recursiveScanScope(path,bindings){var node=path.value;if(path.parent&&namedTypes.FunctionExpression.check(path.parent.node)&&path.parent.node.id){addPattern(path.parent.get("id"),bindings)}if(!node){}else if(isArray.check(node)){path.each(function(childPath){recursiveScanChild(childPath,bindings)})}else if(namedTypes.Function.check(node)){path.get("params").each(function(paramPath){addPattern(paramPath,bindings)});recursiveScanChild(path.get("body"),bindings)}else if(namedTypes.VariableDeclarator.check(node)){addPattern(path.get("id"),bindings);recursiveScanChild(path.get("init"),bindings)}else if(node.type==="ImportSpecifier"||node.type==="ImportNamespaceSpecifier"||node.type==="ImportDefaultSpecifier"){addPattern(node.name?path.get("name"):path.get("id"),bindings)}else if(Node.check(node)&&!Expression.check(node)){types.eachField(node,function(name,child){var childPath=path.get(name);assert.strictEqual(childPath.value,child);recursiveScanChild(childPath,bindings)})}}function recursiveScanChild(path,bindings){var node=path.value;if(!node||Expression.check(node)){}else if(namedTypes.FunctionDeclaration.check(node)){addPattern(path.get("id"),bindings)}else if(namedTypes.ClassDeclaration&&namedTypes.ClassDeclaration.check(node)){addPattern(path.get("id"),bindings)}else if(ScopeType.check(node)){if(namedTypes.CatchClause.check(node)){var catchParamName=node.param.name;var hadBinding=hasOwn.call(bindings,catchParamName);recursiveScanScope(path.get("body"),bindings);if(!hadBinding){delete bindings[catchParamName]}}}else{recursiveScanScope(path,bindings)}}function addPattern(patternPath,bindings){var pattern=patternPath.value;namedTypes.Pattern.assert(pattern);if(namedTypes.Identifier.check(pattern)){if(hasOwn.call(bindings,pattern.name)){bindings[pattern.name].push(patternPath)}else{bindings[pattern.name]=[patternPath]}}else if(namedTypes.SpreadElement&&namedTypes.SpreadElement.check(pattern)){addPattern(patternPath.get("argument"),bindings)}}Sp.lookup=function(name){for(var scope=this;scope;scope=scope.parent)if(scope.declares(name))break;return scope};Sp.getGlobalScope=function(){var scope=this;while(!scope.isGlobal)scope=scope.parent;return scope};module.exports=Scope},{"./node-path":119,"./types":124,assert:127}],123:[function(require,module,exports){var types=require("../lib/types");var Type=types.Type;var builtin=types.builtInTypes;var isNumber=builtin.number;exports.geq=function(than){return new Type(function(value){return isNumber.check(value)&&value>=than},isNumber+" >= "+than)};exports.defaults={"null":function(){return null},emptyArray:function(){return[]},"false":function(){return false},"true":function(){return true},undefined:function(){}};var naiveIsPrimitive=Type.or(builtin.string,builtin.number,builtin.boolean,builtin.null,builtin.undefined);exports.isPrimitive=new Type(function(value){if(value===null)return true;var type=typeof value;return!(type==="object"||type==="function")},naiveIsPrimitive.toString())},{"../lib/types":124}],124:[function(require,module,exports){var assert=require("assert");var Ap=Array.prototype;var slice=Ap.slice;var map=Ap.map;var each=Ap.forEach;var Op=Object.prototype;var objToStr=Op.toString;var funObjStr=objToStr.call(function(){});var strObjStr=objToStr.call("");var hasOwn=Op.hasOwnProperty;function Type(check,name){var self=this;assert.ok(self instanceof Type,self);assert.strictEqual(objToStr.call(check),funObjStr,check+" is not a function");var nameObjStr=objToStr.call(name);assert.ok(nameObjStr===funObjStr||nameObjStr===strObjStr,name+" is neither a function nor a string");Object.defineProperties(self,{name:{value:name},check:{value:function(value,deep){var result=check.call(self,value,deep);if(!result&&deep&&objToStr.call(deep)===funObjStr)deep(self,value);return result}}})}var Tp=Type.prototype;exports.Type=Type;Tp.assert=function(value,deep){if(!this.check(value,deep)){var str=shallowStringify(value);assert.ok(false,str+" does not match type "+this);return false}return true};function shallowStringify(value){if(isObject.check(value))return"{"+Object.keys(value).map(function(key){return key+": "+value[key]}).join(", ")+"}";if(isArray.check(value))return"["+value.map(shallowStringify).join(", ")+"]";return JSON.stringify(value)}Tp.toString=function(){var name=this.name;if(isString.check(name))return name;if(isFunction.check(name))return name.call(this)+"";return name+" type"};var builtInTypes={};exports.builtInTypes=builtInTypes;function defBuiltInType(example,name){var objStr=objToStr.call(example);Object.defineProperty(builtInTypes,name,{enumerable:true,value:new Type(function(value){return objToStr.call(value)===objStr},name)});return builtInTypes[name]}var isString=defBuiltInType("","string");var isFunction=defBuiltInType(function(){},"function");var isArray=defBuiltInType([],"array");var isObject=defBuiltInType({},"object");var isRegExp=defBuiltInType(/./,"RegExp");var isDate=defBuiltInType(new Date,"Date");var isNumber=defBuiltInType(3,"number");var isBoolean=defBuiltInType(true,"boolean");var isNull=defBuiltInType(null,"null");var isUndefined=defBuiltInType(void 0,"undefined");function toType(from,name){if(from instanceof Type)return from;if(from instanceof Def)return from.type;if(isArray.check(from))return Type.fromArray(from);if(isObject.check(from))return Type.fromObject(from);if(isFunction.check(from))return new Type(from,name);return new Type(function(value){return value===from},isUndefined.check(name)?function(){return from+""}:name)}Type.or=function(){var types=[];var len=arguments.length;for(var i=0;i<len;++i)types.push(toType(arguments[i]));return new Type(function(value,deep){for(var i=0;i<len;++i)if(types[i].check(value,deep))return true;return false},function(){return types.join(" | ")})};Type.fromArray=function(arr){assert.ok(isArray.check(arr));assert.strictEqual(arr.length,1,"only one element type is permitted for typed arrays");return toType(arr[0]).arrayOf()};Tp.arrayOf=function(){var elemType=this;return new Type(function(value,deep){return isArray.check(value)&&value.every(function(elem){return elemType.check(elem,deep)})},function(){return"["+elemType+"]"})};Type.fromObject=function(obj){var fields=Object.keys(obj).map(function(name){return new Field(name,obj[name])});return new Type(function(value,deep){return isObject.check(value)&&fields.every(function(field){return field.type.check(value[field.name],deep)})},function(){return"{ "+fields.join(", ")+" }"})};function Field(name,type,defaultFn,hidden){var self=this;assert.ok(self instanceof Field);isString.assert(name);type=toType(type);var properties={name:{value:name},type:{value:type},hidden:{value:!!hidden}};if(isFunction.check(defaultFn)){properties.defaultFn={value:defaultFn}}Object.defineProperties(self,properties)}var Fp=Field.prototype;Fp.toString=function(){return JSON.stringify(this.name)+": "+this.type};Fp.getValue=function(obj){var value=obj[this.name];if(!isUndefined.check(value))return value;if(this.defaultFn)value=this.defaultFn.call(obj);return value};Type.def=function(typeName){isString.assert(typeName);return hasOwn.call(defCache,typeName)?defCache[typeName]:defCache[typeName]=new Def(typeName)};var defCache=Object.create(null);function Def(typeName){var self=this;assert.ok(self instanceof Def);Object.defineProperties(self,{typeName:{value:typeName},baseNames:{value:[]},ownFields:{value:Object.create(null)},allSupertypes:{value:Object.create(null)},supertypeList:{value:[]},allFields:{value:Object.create(null)},fieldNames:{value:[]},type:{value:new Type(function(value,deep){return self.check(value,deep)},typeName)}})}Def.fromValue=function(value){if(value&&typeof value==="object"){var type=value.type;if(typeof type==="string"&&hasOwn.call(defCache,type)){var d=defCache[type];if(d.finalized){return d}}}return null};var Dp=Def.prototype;Dp.isSupertypeOf=function(that){if(that instanceof Def){assert.strictEqual(this.finalized,true);assert.strictEqual(that.finalized,true);return hasOwn.call(that.allSupertypes,this.typeName)}else{assert.ok(false,that+" is not a Def")}};exports.getSupertypeNames=function(typeName){assert.ok(hasOwn.call(defCache,typeName));var d=defCache[typeName];assert.strictEqual(d.finalized,true);return d.supertypeList.slice(1)};exports.computeSupertypeLookupTable=function(candidates){var table={};var typeNames=Object.keys(defCache);var typeNameCount=typeNames.length;for(var i=0;i<typeNameCount;++i){var typeName=typeNames[i];var d=defCache[typeName];assert.strictEqual(d.finalized,true);for(var j=0;j<d.supertypeList.length;++j){var superTypeName=d.supertypeList[j];if(hasOwn.call(candidates,superTypeName)){table[typeName]=superTypeName;break}}}return table};Dp.checkAllFields=function(value,deep){var allFields=this.allFields;assert.strictEqual(this.finalized,true);function checkFieldByName(name){var field=allFields[name];var type=field.type;var child=field.getValue(value);return type.check(child,deep)}return isObject.check(value)&&Object.keys(allFields).every(checkFieldByName)};Dp.check=function(value,deep){assert.strictEqual(this.finalized,true,"prematurely checking unfinalized type "+this.typeName);if(!isObject.check(value))return false;var vDef=Def.fromValue(value);if(!vDef){if(this.typeName==="SourceLocation"||this.typeName==="Position"){return this.checkAllFields(value,deep)}return false}if(deep&&vDef===this)return this.checkAllFields(value,deep);if(!this.isSupertypeOf(vDef))return false;if(!deep)return true;return vDef.checkAllFields(value,deep)&&this.checkAllFields(value,false)};Dp.bases=function(){var bases=this.baseNames;assert.strictEqual(this.finalized,false);each.call(arguments,function(baseName){isString.assert(baseName);if(bases.indexOf(baseName)<0)bases.push(baseName)});return this};Object.defineProperty(Dp,"buildable",{value:false});var builders={};exports.builders=builders;var nodePrototype={};exports.defineMethod=function(name,func){var old=nodePrototype[name];if(isUndefined.check(func)){delete nodePrototype[name]}else{isFunction.assert(func);Object.defineProperty(nodePrototype,name,{enumerable:true,configurable:true,value:func})}return old};Dp.build=function(){var self=this;Object.defineProperty(self,"buildParams",{value:slice.call(arguments),writable:false,enumerable:false,configurable:true});assert.strictEqual(self.finalized,false);isString.arrayOf().assert(self.buildParams);if(self.buildable){return self}self.field("type",self.typeName,function(){return self.typeName});Object.defineProperty(self,"buildable",{value:true});Object.defineProperty(builders,getBuilderName(self.typeName),{enumerable:true,value:function(){var args=arguments;var argc=args.length;var built=Object.create(nodePrototype);assert.ok(self.finalized,"attempting to instantiate unfinalized type "+self.typeName);function add(param,i){if(hasOwn.call(built,param))return;var all=self.allFields;assert.ok(hasOwn.call(all,param),param);var field=all[param];var type=field.type;var value;if(isNumber.check(i)&&i<argc){value=args[i]}else if(field.defaultFn){value=field.defaultFn.call(built)}else{var message="no value or default function given for field "+JSON.stringify(param)+" of "+self.typeName+"("+self.buildParams.map(function(name){return all[name]}).join(", ")+")";assert.ok(false,message)}if(!type.check(value)){assert.ok(false,shallowStringify(value)+" does not match field "+field+" of type "+self.typeName)}built[param]=value}self.buildParams.forEach(function(param,i){add(param,i)});Object.keys(self.allFields).forEach(function(param){add(param)});assert.strictEqual(built.type,self.typeName);return built}});return self};function getBuilderName(typeName){return typeName.replace(/^[A-Z]+/,function(upperCasePrefix){var len=upperCasePrefix.length;switch(len){case 0:return"";case 1:return upperCasePrefix.toLowerCase();default:return upperCasePrefix.slice(0,len-1).toLowerCase()+upperCasePrefix.charAt(len-1)}})}Dp.field=function(name,type,defaultFn,hidden){assert.strictEqual(this.finalized,false);this.ownFields[name]=new Field(name,type,defaultFn,hidden);return this};var namedTypes={};exports.namedTypes=namedTypes;function getFieldNames(object){var d=Def.fromValue(object);if(d){return d.fieldNames.slice(0)}if("type"in object){assert.ok(false,"did not recognize object of type "+JSON.stringify(object.type))}return Object.keys(object)}exports.getFieldNames=getFieldNames;function getFieldValue(object,fieldName){var d=Def.fromValue(object);if(d){var field=d.allFields[fieldName];if(field){return field.getValue(object)}}return object[fieldName]}exports.getFieldValue=getFieldValue;exports.eachField=function(object,callback,context){getFieldNames(object).forEach(function(name){callback.call(this,name,getFieldValue(object,name))},context)};exports.someField=function(object,callback,context){return getFieldNames(object).some(function(name){return callback.call(this,name,getFieldValue(object,name))},context)};Object.defineProperty(Dp,"finalized",{value:false});Dp.finalize=function(){if(!this.finalized){var allFields=this.allFields;var allSupertypes=this.allSupertypes;this.baseNames.forEach(function(name){var def=defCache[name];def.finalize();extend(allFields,def.allFields);extend(allSupertypes,def.allSupertypes)});extend(allFields,this.ownFields);allSupertypes[this.typeName]=this;this.fieldNames.length=0;for(var fieldName in allFields){if(hasOwn.call(allFields,fieldName)&&!allFields[fieldName].hidden){this.fieldNames.push(fieldName)}}Object.defineProperty(namedTypes,this.typeName,{enumerable:true,value:this.type});Object.defineProperty(this,"finalized",{value:true});populateSupertypeList(this.typeName,this.supertypeList)}};function populateSupertypeList(typeName,list){list.length=0;list.push(typeName);var lastSeen=Object.create(null);for(var pos=0;pos<list.length;++pos){typeName=list[pos];var d=defCache[typeName];assert.strictEqual(d.finalized,true);if(hasOwn.call(lastSeen,typeName)){delete list[lastSeen[typeName]]}lastSeen[typeName]=pos;list.push.apply(list,d.baseNames)}for(var to=0,from=to,len=list.length;from<len;++from){if(hasOwn.call(list,from)){list[to++]=list[from]}}list.length=to}function extend(into,from){Object.keys(from).forEach(function(name){into[name]=from[name]});return into}exports.finalize=function(){Object.keys(defCache).forEach(function(name){defCache[name].finalize()})}},{assert:127}],125:[function(require,module,exports){var types=require("./lib/types");require("./def/core");require("./def/es6");require("./def/es7");require("./def/mozilla");require("./def/e4x");require("./def/fb-harmony");types.finalize();exports.Type=types.Type;exports.builtInTypes=types.builtInTypes;exports.namedTypes=types.namedTypes;exports.builders=types.builders;exports.defineMethod=types.defineMethod;exports.getFieldNames=types.getFieldNames;exports.getFieldValue=types.getFieldValue;exports.eachField=types.eachField;exports.someField=types.someField;exports.getSupertypeNames=types.getSupertypeNames;exports.astNodesAreEquivalent=require("./lib/equiv");exports.finalize=types.finalize;exports.NodePath=require("./lib/node-path");exports.PathVisitor=require("./lib/path-visitor");exports.visit=exports.PathVisitor.visit},{"./def/core":112,"./def/e4x":113,"./def/es6":114,"./def/es7":115,"./def/fb-harmony":116,"./def/mozilla":117,"./lib/equiv":118,"./lib/node-path":119,"./lib/path-visitor":120,"./lib/types":124}],126:[function(require,module,exports){},{}],127:[function(require,module,exports){var util=require("util/");var pSlice=Array.prototype.slice;var hasOwn=Object.prototype.hasOwnProperty;var assert=module.exports=ok;assert.AssertionError=function AssertionError(options){this.name="AssertionError";this.actual=options.actual;this.expected=options.expected;this.operator=options.operator;if(options.message){this.message=options.message;this.generatedMessage=false}else{this.message=getMessage(this);this.generatedMessage=true}var stackStartFunction=options.stackStartFunction||fail;if(Error.captureStackTrace){Error.captureStackTrace(this,stackStartFunction)}else{var err=new Error;if(err.stack){var out=err.stack;var fn_name=stackStartFunction.name;var idx=out.indexOf("\n"+fn_name);if(idx>=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}};util.inherits(assert.AssertionError,Error);function replacer(key,value){if(util.isUndefined(value)){return""+value}if(util.isNumber(value)&&!isFinite(value)){return value.toString()}if(util.isFunction(value)||util.isRegExp(value)){return value.toString()}return value}function truncate(s,n){if(util.isString(s)){return s.length<n?s:s.slice(0,n)}else{return s}}function getMessage(self){return truncate(JSON.stringify(self.actual,replacer),128)+" "+self.operator+" "+truncate(JSON.stringify(self.expected,replacer),128)}function fail(actual,expected,message,operator,stackStartFunction){throw new assert.AssertionError({message:message,actual:actual,expected:expected,operator:operator,stackStartFunction:stackStartFunction})}assert.fail=fail;function ok(value,message){if(!value)fail(value,true,message,"==",assert.ok)}assert.ok=ok;assert.equal=function equal(actual,expected,message){if(actual!=expected)fail(actual,expected,message,"==",assert.equal)};assert.notEqual=function notEqual(actual,expected,message){if(actual==expected){fail(actual,expected,message,"!=",assert.notEqual)}};assert.deepEqual=function deepEqual(actual,expected,message){if(!_deepEqual(actual,expected)){fail(actual,expected,message,"deepEqual",assert.deepEqual)}};function _deepEqual(actual,expected){if(actual===expected){return true}else if(util.isBuffer(actual)&&util.isBuffer(expected)){if(actual.length!=expected.length)return false;for(var i=0;i<actual.length;i++){if(actual[i]!==expected[i])return false}return true}else if(util.isDate(actual)&&util.isDate(expected)){return actual.getTime()===expected.getTime()}else if(util.isRegExp(actual)&&util.isRegExp(expected)){return actual.source===expected.source&&actual.global===expected.global&&actual.multiline===expected.multiline&&actual.lastIndex===expected.lastIndex&&actual.ignoreCase===expected.ignoreCase}else if(!util.isObject(actual)&&!util.isObject(expected)){return actual==expected}else{return objEquiv(actual,expected)}}function isArguments(object){return Object.prototype.toString.call(object)=="[object Arguments]"}function objEquiv(a,b){if(util.isNullOrUndefined(a)||util.isNullOrUndefined(b))return false;if(a.prototype!==b.prototype)return false;if(util.isPrimitive(a)||util.isPrimitive(b)){return a===b}var aIsArgs=isArguments(a),bIsArgs=isArguments(b);if(aIsArgs&&!bIsArgs||!aIsArgs&&bIsArgs)return false;if(aIsArgs){a=pSlice.call(a);b=pSlice.call(b);return _deepEqual(a,b)}var ka=objectKeys(a),kb=objectKeys(b),key,i;if(ka.length!=kb.length)return false;ka.sort();kb.sort();for(i=ka.length-1;i>=0;i--){if(ka[i]!=kb[i])return false}for(i=ka.length-1;i>=0;i--){key=ka[i];if(!_deepEqual(a[key],b[key]))return false}return true}assert.notDeepEqual=function notDeepEqual(actual,expected,message){if(_deepEqual(actual,expected)){fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)}};assert.strictEqual=function strictEqual(actual,expected,message){if(actual!==expected){fail(actual,expected,message,"===",assert.strictEqual)}};assert.notStrictEqual=function notStrictEqual(actual,expected,message){if(actual===expected){fail(actual,expected,message,"!==",assert.notStrictEqual)}};function expectedException(actual,expected){if(!actual||!expected){return false}if(Object.prototype.toString.call(expected)=="[object RegExp]"){return expected.test(actual)}else if(actual instanceof expected){return true}else if(expected.call({},actual)===true){return true}return false}function _throws(shouldThrow,block,expected,message){var actual;if(util.isString(expected)){message=expected;expected=null}try{block()}catch(e){actual=e}message=(expected&&expected.name?" ("+expected.name+").":".")+(message?" "+message:".");if(shouldThrow&&!actual){fail(actual,expected,"Missing expected exception"+message)}if(!shouldThrow&&expectedException(actual,expected)){fail(actual,expected,"Got unwanted exception"+message)}if(shouldThrow&&actual&&expected&&!expectedException(actual,expected)||!shouldThrow&&actual){throw actual}}assert.throws=function(block,error,message){_throws.apply(this,[true].concat(pSlice.call(arguments)))};assert.doesNotThrow=function(block,message){_throws.apply(this,[false].concat(pSlice.call(arguments)))};assert.ifError=function(err){if(err){throw err}};var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj){if(hasOwn.call(obj,key))keys.push(key)}return keys}},{"util/":152}],128:[function(require,module,exports){var base64=require("base64-js");var ieee754=require("ieee754");var isArray=require("is-array");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.poolSize=8192;var kMaxLength=1073741823;var rootParent={};Buffer.TYPED_ARRAY_SUPPORT=function(){try{var buf=new ArrayBuffer(0);var arr=new Uint8Array(buf);arr.foo=function(){return 42};return 42===arr.foo()&&typeof arr.subarray==="function"&&new Uint8Array(1).subarray(1,1).byteLength===0}catch(e){return false}}();function Buffer(subject,encoding,noZero){if(!(this instanceof Buffer))return new Buffer(subject,encoding,noZero);var type=typeof subject;var length;if(type==="number")length=subject>0?subject>>>0:0;else if(type==="string"){length=Buffer.byteLength(subject,encoding)}else if(type==="object"&&subject!==null){if(subject.type==="Buffer"&&isArray(subject.data))subject=subject.data;length=+subject.length>0?Math.floor(+subject.length):0}else throw new TypeError("must start with number, buffer, array or string");if(length>kMaxLength)throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+kMaxLength.toString(16)+" bytes");var buf;if(Buffer.TYPED_ARRAY_SUPPORT){buf=Buffer._augment(new Uint8Array(length))}else{buf=this;buf.length=length;buf._isBuffer=true}var i;if(Buffer.TYPED_ARRAY_SUPPORT&&typeof subject.byteLength==="number"){buf._set(subject)}else if(isArrayish(subject)){if(Buffer.isBuffer(subject)){for(i=0;i<length;i++)buf[i]=subject.readUInt8(i)}else{for(i=0;i<length;i++)buf[i]=(subject[i]%256+256)%256}}else if(type==="string"){buf.write(subject,0,encoding)}else if(type==="number"&&!Buffer.TYPED_ARRAY_SUPPORT&&!noZero){for(i=0;i<length;i++){buf[i]=0}}if(length>0&&length<=Buffer.poolSize)buf.parent=rootParent;return buf}function SlowBuffer(subject,encoding,noZero){if(!(this instanceof SlowBuffer))return new SlowBuffer(subject,encoding,noZero);var buf=new Buffer(subject,encoding,noZero);delete buf.parent;return buf}Buffer.isBuffer=function(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b))throw new TypeError("Arguments must be Buffers");var x=a.length;var y=b.length;for(var i=0,len=Math.min(x,y);i<len&&a[i]===b[i];i++){}if(i!==len){x=a[i];y=b[i]}if(x<y)return-1;if(y<x)return 1;return 0};Buffer.isEncoding=function(encoding){switch(String(encoding).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return true;default:return false}};Buffer.concat=function(list,totalLength){if(!isArray(list))throw new TypeError("Usage: Buffer.concat(list[, length])");if(list.length===0){return new Buffer(0)}else if(list.length===1){return list[0]}var i;if(totalLength===undefined){totalLength=0;for(i=0;i<list.length;i++){totalLength+=list[i].length}}var buf=new Buffer(totalLength);var pos=0;for(i=0;i<list.length;i++){var item=list[i];item.copy(buf,pos);pos+=item.length}return buf};Buffer.byteLength=function(str,encoding){var ret;str=str+"";switch(encoding||"utf8"){case"ascii":case"binary":case"raw":ret=str.length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":ret=str.length*2;break;case"hex":ret=str.length>>>1;break;case"utf8":case"utf-8":ret=utf8ToBytes(str).length;break;case"base64":ret=base64ToBytes(str).length;break;default:ret=str.length}return ret};Buffer.prototype.length=undefined;Buffer.prototype.parent=undefined;Buffer.prototype.toString=function(encoding,start,end){var loweredCase=false;start=start>>>0;end=end===undefined||end===Infinity?this.length:end>>>0;if(!encoding)encoding="utf8";if(start<0)start=0;if(end>this.length)end=this.length;if(end<=start)return"";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"binary":return binarySlice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}};Buffer.prototype.equals=function(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");return Buffer.compare(this,b)===0};Buffer.prototype.inspect=function(){var str="";var max=exports.INSPECT_MAX_BYTES;if(this.length>0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return"<Buffer "+str+">"};Buffer.prototype.compare=function(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");return Buffer.compare(this,b)};Buffer.prototype.get=function(offset){console.log(".get() is deprecated. Access using array indexes instead.");return this.readUInt8(offset)};Buffer.prototype.set=function(v,offset){console.log(".set() is deprecated. Access using array indexes instead.");return this.writeUInt8(v,offset)};function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;if(!length){length=remaining}else{length=Number(length);if(length>remaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new Error("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;i<length;i++){var byte=parseInt(string.substr(i*2,2),16);if(isNaN(byte))throw new Error("Invalid hex string");buf[offset+i]=byte}return i}function utf8Write(buf,string,offset,length){var charsWritten=blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length);return charsWritten}function asciiWrite(buf,string,offset,length){var charsWritten=blitBuffer(asciiToBytes(string),buf,offset,length);return charsWritten}function binaryWrite(buf,string,offset,length){return asciiWrite(buf,string,offset,length)}function base64Write(buf,string,offset,length){var charsWritten=blitBuffer(base64ToBytes(string),buf,offset,length);return charsWritten}function utf16leWrite(buf,string,offset,length){var charsWritten=blitBuffer(utf16leToBytes(string,buf.length-offset),buf,offset,length,2);return charsWritten}Buffer.prototype.write=function(string,offset,length,encoding){if(isFinite(offset)){if(!isFinite(length)){encoding=length;length=undefined}}else{var swap=encoding;encoding=offset;offset=length;length=swap}offset=Number(offset)||0;if(length<0||offset<0||offset>this.length)throw new RangeError("attempt to write outside buffer bounds");var remaining=this.length-offset;if(!length){length=remaining}else{length=Number(length);if(length>remaining){length=remaining}}encoding=String(encoding||"utf8").toLowerCase();var ret;switch(encoding){case"hex":ret=hexWrite(this,string,offset,length);break;case"utf8":case"utf-8":ret=utf8Write(this,string,offset,length);break;case"ascii":ret=asciiWrite(this,string,offset,length);break;case"binary":ret=binaryWrite(this,string,offset,length);break;case"base64":ret=base64Write(this,string,offset,length);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":ret=utf16leWrite(this,string,offset,length);break;default:throw new TypeError("Unknown encoding: "+encoding)}return ret};Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){var res="";var tmp="";end=Math.min(buf.length,end); for(var i=start;i<end;i++){if(buf[i]<=127){res+=decodeUtf8Char(tmp)+String.fromCharCode(buf[i]);tmp=""}else{tmp+="%"+buf[i].toString(16)}}return res+decodeUtf8Char(tmp)}function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;i++){ret+=String.fromCharCode(buf[i]&127)}return ret}function binarySlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;i++){ret+=String.fromCharCode(buf[i])}return ret}function hexSlice(buf,start,end){var len=buf.length;if(!start||start<0)start=0;if(!end||end<0||end>len)end=len;var out="";for(var i=start;i<end;i++){out+=toHex(buf[i])}return out}function utf16leSlice(buf,start,end){var bytes=buf.slice(start,end);var res="";for(var i=0;i<bytes.length;i+=2){res+=String.fromCharCode(bytes[i]+bytes[i+1]*256)}return res}Buffer.prototype.slice=function(start,end){var len=this.length;start=~~start;end=end===undefined?len:~~end;if(start<0){start+=len;if(start<0)start=0}else if(start>len){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(end<start)end=start;var newBuf;if(Buffer.TYPED_ARRAY_SUPPORT){newBuf=Buffer._augment(this.subarray(start,end))}else{var sliceLen=end-start;newBuf=new Buffer(sliceLen,undefined,true);for(var i=0;i<sliceLen;i++){newBuf[i]=this[i+start]}}if(newBuf.length)newBuf.parent=this.parent||this;return newBuf};function checkOffset(offset,ext,length){if(offset%1!==0||offset<0)throw new RangeError("offset is not uint");if(offset+ext>length)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i<byteLength&&(mul*=256))val+=this[offset+i]*mul;return val};Buffer.prototype.readUIntBE=function(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset+--byteLength];var mul=1;while(byteLength>0&&(mul*=256))val+=this[offset+--byteLength]*mul;return val};Buffer.prototype.readUInt8=function(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i<byteLength&&(mul*=256))val+=this[offset+i]*mul;mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function(offset,byteLength,noAssert){offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256))val+=this[offset+--i]*mul;mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError("buffer must be a Buffer instance");if(value>max||value<min)throw new RangeError("value is out of bounds");if(offset+ext>buf.length)throw new RangeError("index out of range")}Buffer.prototype.writeUIntLE=function(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var mul=1;var i=0;this[offset]=value&255;while(++i<byteLength&&(mul*=256))this[offset+i]=value/mul>>>0&255;return offset+byteLength};Buffer.prototype.writeUIntBE=function(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;byteLength=byteLength>>>0;if(!noAssert)checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var i=byteLength-1;var mul=1;this[offset+i]=value&255;while(--i>=0&&(mul*=256))this[offset+i]=value/mul>>>0&255;return offset+byteLength};Buffer.prototype.writeUInt8=function(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i<j;i++){buf[offset+i]=(value&255<<8*(littleEndian?i:1-i))>>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else objectWriteUInt16(this,value,offset,true);return offset+2};Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else objectWriteUInt16(this,value,offset,false);return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i<j;i++){buf[offset+i]=value>>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value}else objectWriteUInt32(this,value,offset,true);return offset+4};Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else objectWriteUInt32(this,value,offset,false);return offset+4};Buffer.prototype.writeIntLE=function(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength-1)-1,-Math.pow(2,8*byteLength-1))}var i=0;var mul=1;var sub=value<0?1:0;this[offset]=value&255;while(++i<byteLength&&(mul*=256))this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength};Buffer.prototype.writeIntBE=function(value,offset,byteLength,noAssert){value=+value;offset=offset>>>0;if(!noAssert){checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength-1)-1,-Math.pow(2,8*byteLength-1))}var i=byteLength-1;var mul=1;var sub=value<0?1:0;this[offset+i]=value&255;while(--i>=0&&(mul*=256))this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength};Buffer.prototype.writeInt8=function(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value;return offset+1};Buffer.prototype.writeInt16LE=function(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else objectWriteUInt16(this,value,offset,true);return offset+2};Buffer.prototype.writeInt16BE=function(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else objectWriteUInt16(this,value,offset,false);return offset+2};Buffer.prototype.writeInt32LE=function(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else objectWriteUInt32(this,value,offset,true);return offset+4};Buffer.prototype.writeInt32BE=function(value,offset,noAssert){value=+value;offset=offset>>>0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else objectWriteUInt32(this,value,offset,false);return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(value>max||value<min)throw new RangeError("value is out of bounds");if(offset+ext>buf.length)throw new RangeError("index out of range");if(offset<0)throw new RangeError("index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert)checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38);ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert)checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308);ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function(target,target_start,start,end){var source=this;if(!start)start=0;if(!end&&end!==0)end=this.length;if(target_start>=target.length)target_start=target.length;if(!target_start)target_start=0;if(end>0&&end<start)end=start;if(end===start)return 0;if(target.length===0||source.length===0)return 0;if(target_start<0)throw new RangeError("targetStart out of bounds");if(start<0||start>=source.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-target_start<end-start)end=target.length-target_start+start;var len=end-start;if(len<1e3||!Buffer.TYPED_ARRAY_SUPPORT){for(var i=0;i<len;i++){target[i+target_start]=this[i+start]}}else{target._set(this.subarray(start,start+len),target_start)}return len};Buffer.prototype.fill=function(value,start,end){if(!value)value=0;if(!start)start=0;if(!end)end=this.length;if(end<start)throw new RangeError("end < start");if(end===start)return;if(this.length===0)return;if(start<0||start>=this.length)throw new RangeError("start out of bounds");if(end<0||end>this.length)throw new RangeError("end out of bounds");var i;if(typeof value==="number"){for(i=start;i<end;i++){this[i]=value}}else{var bytes=utf8ToBytes(value.toString());var len=bytes.length;for(i=start;i<end;i++){this[i]=bytes[i%len]}}return this};Buffer.prototype.toArrayBuffer=function(){if(typeof Uint8Array!=="undefined"){if(Buffer.TYPED_ARRAY_SUPPORT){return new Buffer(this).buffer}else{var buf=new Uint8Array(this.length);for(var i=0,len=buf.length;i<len;i+=1){buf[i]=this[i]}return buf.buffer}}else{throw new TypeError("Buffer.toArrayBuffer not supported in this browser")}};var BP=Buffer.prototype;Buffer._augment=function(arr){arr.constructor=Buffer;arr._isBuffer=true;arr._get=arr.get;arr._set=arr.set;arr.get=BP.get;arr.set=BP.set;arr.write=BP.write;arr.toString=BP.toString;arr.toLocaleString=BP.toString;arr.toJSON=BP.toJSON;arr.equals=BP.equals;arr.compare=BP.compare;arr.copy=BP.copy;arr.slice=BP.slice;arr.readUIntLE=BP.readUIntLE;arr.readUIntBE=BP.readUIntBE;arr.readUInt8=BP.readUInt8;arr.readUInt16LE=BP.readUInt16LE;arr.readUInt16BE=BP.readUInt16BE;arr.readUInt32LE=BP.readUInt32LE;arr.readUInt32BE=BP.readUInt32BE;arr.readIntLE=BP.readIntLE;arr.readIntBE=BP.readIntBE;arr.readInt8=BP.readInt8;arr.readInt16LE=BP.readInt16LE;arr.readInt16BE=BP.readInt16BE;arr.readInt32LE=BP.readInt32LE;arr.readInt32BE=BP.readInt32BE;arr.readFloatLE=BP.readFloatLE;arr.readFloatBE=BP.readFloatBE;arr.readDoubleLE=BP.readDoubleLE;arr.readDoubleBE=BP.readDoubleBE;arr.writeUInt8=BP.writeUInt8;arr.writeUIntLE=BP.writeUIntLE;arr.writeUIntBE=BP.writeUIntBE;arr.writeUInt16LE=BP.writeUInt16LE;arr.writeUInt16BE=BP.writeUInt16BE;arr.writeUInt32LE=BP.writeUInt32LE;arr.writeUInt32BE=BP.writeUInt32BE;arr.writeIntLE=BP.writeIntLE;arr.writeIntBE=BP.writeIntBE;arr.writeInt8=BP.writeInt8;arr.writeInt16LE=BP.writeInt16LE;arr.writeInt16BE=BP.writeInt16BE;arr.writeInt32LE=BP.writeInt32LE;arr.writeInt32BE=BP.writeInt32BE;arr.writeFloatLE=BP.writeFloatLE;arr.writeFloatBE=BP.writeFloatBE;arr.writeDoubleLE=BP.writeDoubleLE;arr.writeDoubleBE=BP.writeDoubleBE;arr.fill=BP.fill;arr.inspect=BP.inspect;arr.toArrayBuffer=BP.toArrayBuffer;return arr};var INVALID_BASE64_RE=/[^+\/0-9A-z\-]/g;function base64clean(str){str=stringtrim(str).replace(INVALID_BASE64_RE,"");if(str.length<2)return"";while(str.length%4!==0){str=str+"="}return str}function stringtrim(str){if(str.trim)return str.trim();return str.replace(/^\s+|\s+$/g,"")}function isArrayish(subject){return isArray(subject)||Buffer.isBuffer(subject)||subject&&typeof subject==="object"&&typeof subject.length==="number"}function toHex(n){if(n<16)return"0"+n.toString(16);return n.toString(16)}function utf8ToBytes(string,units){var codePoint,length=string.length;var leadSurrogate=null;units=units||Infinity;var bytes=[];var i=0;for(;i<length;i++){codePoint=string.charCodeAt(i);if(codePoint>55295&&codePoint<57344){if(leadSurrogate){if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}else{codePoint=leadSurrogate-55296<<10|codePoint-56320|65536;leadSurrogate=null}}else{if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}else{leadSurrogate=codePoint;continue}}}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=null}if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<2097152){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i<str.length;i++){byteArray.push(str.charCodeAt(i)&255)}return byteArray}function utf16leToBytes(str,units){var c,hi,lo;var byteArray=[];for(var i=0;i<str.length;i++){if((units-=2)<0)break;c=str.charCodeAt(i);hi=c>>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length,unitSize){if(unitSize)length-=length%unitSize;for(var i=0;i<length;i++){if(i+offset>=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function decodeUtf8Char(str){try{return decodeURIComponent(str)}catch(err){return String.fromCharCode(65533)}}},{"base64-js":129,ieee754:130,"is-array":131}],129:[function(require,module,exports){var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(exports){"use strict";var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var PLUS="+".charCodeAt(0);var SLASH="/".charCodeAt(0);var NUMBER="0".charCodeAt(0);var LOWER="a".charCodeAt(0);var UPPER="A".charCodeAt(0);var PLUS_URL_SAFE="-".charCodeAt(0);var SLASH_URL_SAFE="_".charCodeAt(0);function decode(elt){var code=elt.charCodeAt(0);if(code===PLUS||code===PLUS_URL_SAFE)return 62;if(code===SLASH||code===SLASH_URL_SAFE)return 63;if(code<NUMBER)return-1;if(code<NUMBER+10)return code-NUMBER+26+26;if(code<UPPER+26)return code-UPPER;if(code<LOWER+26)return code-LOWER+26}function b64ToByteArray(b64){var i,j,l,tmp,placeHolders,arr;if(b64.length%4>0){throw new Error("Invalid string. Length must be a multiple of 4")}var len=b64.length;placeHolders="="===b64.charAt(len-2)?2:"="===b64.charAt(len-1)?1:0;arr=new Arr(b64.length*3/4-placeHolders);l=placeHolders>0?b64.length-4:b64.length;var L=0;function push(v){arr[L++]=v}for(i=0,j=0;i<l;i+=4,j+=3){tmp=decode(b64.charAt(i))<<18|decode(b64.charAt(i+1))<<12|decode(b64.charAt(i+2))<<6|decode(b64.charAt(i+3));push((tmp&16711680)>>16);push((tmp&65280)>>8);push(tmp&255)}if(placeHolders===2){tmp=decode(b64.charAt(i))<<2|decode(b64.charAt(i+1))>>4;push(tmp&255)}else if(placeHolders===1){tmp=decode(b64.charAt(i))<<10|decode(b64.charAt(i+1))<<4|decode(b64.charAt(i+2))>>2;push(tmp>>8&255);push(tmp&255)}return arr}function uint8ToBase64(uint8){var i,extraBytes=uint8.length%3,output="",temp,length;function encode(num){return lookup.charAt(num)}function tripletToBase64(num){return encode(num>>18&63)+encode(num>>12&63)+encode(num>>6&63)+encode(num&63)}for(i=0,length=uint8.length-extraBytes;i<length;i+=3){temp=(uint8[i]<<16)+(uint8[i+1]<<8)+uint8[i+2];output+=tripletToBase64(temp)}switch(extraBytes){case 1:temp=uint8[uint8.length-1];output+=encode(temp>>2);output+=encode(temp<<4&63);output+="==";break;case 2:temp=(uint8[uint8.length-2]<<8)+uint8[uint8.length-1];output+=encode(temp>>10);output+=encode(temp>>4&63);output+=encode(temp<<2&63);output+="=";break}return output}exports.toByteArray=b64ToByteArray;exports.fromByteArray=uint8ToBase64})(typeof exports==="undefined"?this.base64js={}:exports)},{}],130:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=nBytes*8-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8);m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8);if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=nBytes*8-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8);e=e<<mLen|m;eLen+=mLen;for(;eLen>0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=s*128}},{}],131:[function(require,module,exports){var isArray=Array.isArray;var str=Object.prototype.toString;module.exports=isArray||function(val){return!!val&&"[object Array]"==str.call(val)}},{}],132:[function(require,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||n<0||isNaN(n))throw TypeError("n must be a positive number");this._maxListeners=n;return this};EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(!this._events)this._events={};if(type==="error"){if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error){throw er}throw TypeError('Uncaught, unspecified "error" event.')}}handler=this._events[type];if(isUndefined(handler))return false;if(isFunction(handler)){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:len=arguments.length;args=new Array(len-1);for(i=1;i<len;i++)args[i-1]=arguments[i];handler.apply(this,args)}}else if(isObject(handler)){len=arguments.length;args=new Array(len-1);for(i=1;i<len;i++)args[i-1]=arguments[i];listeners=handler.slice();len=listeners.length;for(i=0;i<len;i++)listeners[i].apply(this,args)}return true};EventEmitter.prototype.addListener=function(type,listener){var m;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events)this._events={};if(this._events.newListener)this.emit("newListener",type,isFunction(listener.listener)?listener.listener:listener);if(!this._events[type])this._events[type]=listener;else if(isObject(this._events[type]))this._events[type].push(listener);else this._events[type]=[this._events[type],listener];if(isObject(this._events[type])&&!this._events[type].warned){var m;if(!isUndefined(this._maxListeners)){m=this._maxListeners}else{m=EventEmitter.defaultMaxListeners}if(m&&m>0&&this._events[type].length>m){this._events[type].warned=true;console.error("(node) warning: possible EventEmitter memory "+"leak detected. %d listeners added. "+"Use emitter.setMaxListeners() to increase limit.",this._events[type].length);if(typeof console.trace==="function"){console.trace()}}}return this};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.once=function(type,listener){if(!isFunction(listener))throw TypeError("listener must be a function");var fired=false;function g(){this.removeListener(type,g);if(!fired){fired=true;listener.apply(this,arguments)}}g.listener=listener;this.on(type,g);return this};EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;list=this._events[type];length=list.length;position=-1;if(list===listener||isFunction(list.listener)&&list.listener===listener){delete this._events[type];if(this._events.removeListener)this.emit("removeListener",type,listener)}else if(isObject(list)){for(i=length;i-->0;){if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}}if(position<0)return this;if(list.length===1){list.length=0;delete this._events[type]}else{list.splice(position,1)}if(this._events.removeListener)this.emit("removeListener",type,listener)}return this};EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[type])delete this._events[type];return this}if(arguments.length===0){for(key in this._events){if(key==="removeListener")continue;this.removeAllListeners(key)}this.removeAllListeners("removeListener");this._events={};return this}listeners=this._events[type];if(isFunction(listeners)){this.removeListener(type,listeners)}else{while(listeners.length)this.removeListener(type,listeners[listeners.length-1])}delete this._events[type];return this};EventEmitter.prototype.listeners=function(type){var ret;if(!this._events||!this._events[type])ret=[];else if(isFunction(this._events[type]))ret=[this._events[type]];else ret=this._events[type].slice();return ret};EventEmitter.listenerCount=function(emitter,type){var ret;if(!emitter._events||!emitter._events[type])ret=0;else if(isFunction(emitter._events[type]))ret=1;else ret=emitter._events[type].length;return ret};function isFunction(arg){return typeof arg==="function"}function isNumber(arg){return typeof arg==="number"}function isObject(arg){return typeof arg==="object"&&arg!==null}function isUndefined(arg){return arg===void 0}},{}],133:[function(require,module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}else{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],134:[function(require,module,exports){module.exports=Array.isArray||function(arr){return Object.prototype.toString.call(arr)=="[object Array]"}},{}],135:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start<arr.length;start++){if(arr[start]!=="")break}var end=arr.length-1;for(;end>=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i<length;i++){if(fromParts[i]!==toParts[i]){samePartsLength=i;break}}var outputParts=[];for(var i=samePartsLength;i<fromParts.length;i++){outputParts.push("..")}outputParts=outputParts.concat(toParts.slice(samePartsLength));return outputParts.join("/")};exports.sep="/";exports.delimiter=":";exports.dirname=function(path){var result=splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir};exports.basename=function(path,ext){var f=splitPath(path)[2];if(ext&&f.substr(-1*ext.length)===ext){f=f.substr(0,f.length-ext.length)}return f};exports.extname=function(path){return splitPath(path)[3]};function filter(xs,f){if(xs.filter)return xs.filter(f);var res=[];for(var i=0;i<xs.length;i++){if(f(xs[i],i,xs))res.push(xs[i])}return res}var substr="ab".substr(-1)==="b"?function(str,start,len){return str.substr(start,len)}:function(str,start,len){if(start<0)start=str.length+start;return str.substr(start,len)}}).call(this,require("_process"))},{_process:136}],136:[function(require,module,exports){var process=module.exports={};var queue=[];var draining=false;function drainQueue(){if(draining){return}draining=true;var currentQueue;var len=queue.length;while(len){currentQueue=queue;queue=[];var i=-1;while(++i<len){currentQueue[i]()}len=queue.length}draining=false}process.nextTick=function(fun){queue.push(fun);if(!draining){setTimeout(drainQueue,0)}};process.title="browser";process.browser=true;process.env={};process.argv=[];process.version="";function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.binding=function(name){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")};process.umask=function(){return 0}},{}],137:[function(require,module,exports){module.exports=require("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":138}],138:[function(require,module,exports){(function(process){module.exports=Duplex;var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys};var util=require("core-util-is");util.inherits=require("inherits");var Readable=require("./_stream_readable");var Writable=require("./_stream_writable");util.inherits(Duplex,Readable);forEach(objectKeys(Writable.prototype),function(method){if(!Duplex.prototype[method])Duplex.prototype[method]=Writable.prototype[method]});function Duplex(options){if(!(this instanceof Duplex))return new Duplex(options);Readable.call(this,options);Writable.call(this,options);if(options&&options.readable===false)this.readable=false;if(options&&options.writable===false)this.writable=false;this.allowHalfOpen=true;if(options&&options.allowHalfOpen===false)this.allowHalfOpen=false;this.once("end",onend)}function onend(){if(this.allowHalfOpen||this._writableState.ended)return;process.nextTick(this.end.bind(this))}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++){f(xs[i],i)}}}).call(this,require("_process"))},{"./_stream_readable":140,"./_stream_writable":142,_process:136,"core-util-is":143,inherits:133}],139:[function(require,module,exports){module.exports=PassThrough;var Transform=require("./_stream_transform");var util=require("core-util-is");util.inherits=require("inherits");util.inherits(PassThrough,Transform);function PassThrough(options){if(!(this instanceof PassThrough))return new PassThrough(options);Transform.call(this,options)}PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk)}},{"./_stream_transform":141,"core-util-is":143,inherits:133}],140:[function(require,module,exports){(function(process){module.exports=Readable; var isArray=require("isarray");var Buffer=require("buffer").Buffer;Readable.ReadableState=ReadableState;var EE=require("events").EventEmitter;if(!EE.listenerCount)EE.listenerCount=function(emitter,type){return emitter.listeners(type).length};var Stream=require("stream");var util=require("core-util-is");util.inherits=require("inherits");var StringDecoder;util.inherits(Readable,Stream);function ReadableState(options,stream){options=options||{};var hwm=options.highWaterMark;this.highWaterMark=hwm||hwm===0?hwm:16*1024;this.highWaterMark=~~this.highWaterMark;this.buffer=[];this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=false;this.ended=false;this.endEmitted=false;this.reading=false;this.calledRead=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.objectMode=!!options.objectMode;this.defaultEncoding=options.defaultEncoding||"utf8";this.ranOut=false;this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(options.encoding){if(!StringDecoder)StringDecoder=require("string_decoder/").StringDecoder;this.decoder=new StringDecoder(options.encoding);this.encoding=options.encoding}}function Readable(options){if(!(this instanceof Readable))return new Readable(options);this._readableState=new ReadableState(options,this);this.readable=true;Stream.call(this)}Readable.prototype.push=function(chunk,encoding){var state=this._readableState;if(typeof chunk==="string"&&!state.objectMode){encoding=encoding||state.defaultEncoding;if(encoding!==state.encoding){chunk=new Buffer(chunk,encoding);encoding=""}}return readableAddChunk(this,state,chunk,encoding,false)};Readable.prototype.unshift=function(chunk){var state=this._readableState;return readableAddChunk(this,state,chunk,"",true)};function readableAddChunk(stream,state,chunk,encoding,addToFront){var er=chunkInvalid(state,chunk);if(er){stream.emit("error",er)}else if(chunk===null||chunk===undefined){state.reading=false;if(!state.ended)onEofChunk(stream,state)}else if(state.objectMode||chunk&&chunk.length>0){if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var e=new Error("stream.unshift() after end event");stream.emit("error",e)}else{if(state.decoder&&!addToFront&&!encoding)chunk=state.decoder.write(chunk);state.length+=state.objectMode?1:chunk.length;if(addToFront){state.buffer.unshift(chunk)}else{state.reading=false;state.buffer.push(chunk)}if(state.needReadable)emitReadable(stream);maybeReadMore(stream,state)}}else if(!addToFront){state.reading=false}return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0)}Readable.prototype.setEncoding=function(enc){if(!StringDecoder)StringDecoder=require("string_decoder/").StringDecoder;this._readableState.decoder=new StringDecoder(enc);this._readableState.encoding=enc};var MAX_HWM=8388608;function roundUpToNextPowerOf2(n){if(n>=MAX_HWM){n=MAX_HWM}else{n--;for(var p=1;p<32;p<<=1)n|=n>>p;n++}return n}function howMuchToRead(n,state){if(state.length===0&&state.ended)return 0;if(state.objectMode)return n===0?0:1;if(n===null||isNaN(n)){if(state.flowing&&state.buffer.length)return state.buffer[0].length;else return state.length}if(n<=0)return 0;if(n>state.highWaterMark)state.highWaterMark=roundUpToNextPowerOf2(n);if(n>state.length){if(!state.ended){state.needReadable=true;return 0}else return state.length}return n}Readable.prototype.read=function(n){var state=this._readableState;state.calledRead=true;var nOrig=n;var ret;if(typeof n!=="number"||n>0)state.emittedReadable=false;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){ret=null;if(state.length>0&&state.decoder){ret=fromList(n,state);state.length-=ret.length}if(state.length===0)endReadable(this);return ret}var doRead=state.needReadable;if(state.length-n<=state.highWaterMark)doRead=true;if(state.ended||state.reading)doRead=false;if(doRead){state.reading=true;state.sync=true;if(state.length===0)state.needReadable=true;this._read(state.highWaterMark);state.sync=false}if(doRead&&!state.reading)n=howMuchToRead(nOrig,state);if(n>0)ret=fromList(n,state);else ret=null;if(ret===null){state.needReadable=true;n=0}state.length-=n;if(state.length===0&&!state.ended)state.needReadable=true;if(state.ended&&!state.endEmitted&&state.length===0)endReadable(this);return ret};function chunkInvalid(state,chunk){var er=null;if(!Buffer.isBuffer(chunk)&&"string"!==typeof chunk&&chunk!==null&&chunk!==undefined&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}return er}function onEofChunk(stream,state){if(state.decoder&&!state.ended){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;if(state.length>0)emitReadable(stream);else endReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(state.emittedReadable)return;state.emittedReadable=true;if(state.sync)process.nextTick(function(){emitReadable_(stream)});else emitReadable_(stream)}function emitReadable_(stream){stream.emit("readable")}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;process.nextTick(function(){maybeReadMore_(stream,state)})}}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark){stream.read(0);if(len===state.length)break;else len=state.length}state.readingMore=false}Readable.prototype._read=function(n){this.emit("error",new Error("not implemented"))};Readable.prototype.pipe=function(dest,pipeOpts){var src=this;var state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest);break}state.pipesCount+=1;var doEnd=(!pipeOpts||pipeOpts.end!==false)&&dest!==process.stdout&&dest!==process.stderr;var endFn=doEnd?onend:cleanup;if(state.endEmitted)process.nextTick(endFn);else src.once("end",endFn);dest.on("unpipe",onunpipe);function onunpipe(readable){if(readable!==src)return;cleanup()}function onend(){dest.end()}var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);function cleanup(){dest.removeListener("close",onclose);dest.removeListener("finish",onfinish);dest.removeListener("drain",ondrain);dest.removeListener("error",onerror);dest.removeListener("unpipe",onunpipe);src.removeListener("end",onend);src.removeListener("end",cleanup);if(!dest._writableState||dest._writableState.needDrain)ondrain()}function onerror(er){unpipe();dest.removeListener("error",onerror);if(EE.listenerCount(dest,"error")===0)dest.emit("error",er)}if(!dest._events||!dest._events.error)dest.on("error",onerror);else if(isArray(dest._events.error))dest._events.error.unshift(onerror);else dest._events.error=[onerror,dest._events.error];function onclose(){dest.removeListener("finish",onfinish);unpipe()}dest.once("close",onclose);function onfinish(){dest.removeListener("close",onclose);unpipe()}dest.once("finish",onfinish);function unpipe(){src.unpipe(dest)}dest.emit("pipe",src);if(!state.flowing){this.on("readable",pipeOnReadable);state.flowing=true;process.nextTick(function(){flow(src)})}return dest};function pipeOnDrain(src){return function(){var dest=this;var state=src._readableState;state.awaitDrain--;if(state.awaitDrain===0)flow(src)}}function flow(src){var state=src._readableState;var chunk;state.awaitDrain=0;function write(dest,i,list){var written=dest.write(chunk);if(false===written){state.awaitDrain++}}while(state.pipesCount&&null!==(chunk=src.read())){if(state.pipesCount===1)write(state.pipes,0,null);else forEach(state.pipes,write);src.emit("data",chunk);if(state.awaitDrain>0)return}if(state.pipesCount===0){state.flowing=false;if(EE.listenerCount(src,"data")>0)emitDataEvents(src);return}state.ranOut=true}function pipeOnReadable(){if(this._readableState.ranOut){this._readableState.ranOut=false;flow(this)}}Readable.prototype.unpipe=function(dest){var state=this._readableState;if(state.pipesCount===0)return this;if(state.pipesCount===1){if(dest&&dest!==state.pipes)return this;if(!dest)dest=state.pipes;state.pipes=null;state.pipesCount=0;this.removeListener("readable",pipeOnReadable);state.flowing=false;if(dest)dest.emit("unpipe",this);return this}if(!dest){var dests=state.pipes;var len=state.pipesCount;state.pipes=null;state.pipesCount=0;this.removeListener("readable",pipeOnReadable);state.flowing=false;for(var i=0;i<len;i++)dests[i].emit("unpipe",this);return this}var i=indexOf(state.pipes,dest);if(i===-1)return this;state.pipes.splice(i,1);state.pipesCount-=1;if(state.pipesCount===1)state.pipes=state.pipes[0];dest.emit("unpipe",this);return this};Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);if(ev==="data"&&!this._readableState.flowing)emitDataEvents(this);if(ev==="readable"&&this.readable){var state=this._readableState;if(!state.readableListening){state.readableListening=true;state.emittedReadable=false;state.needReadable=true;if(!state.reading){this.read(0)}else if(state.length){emitReadable(this,state)}}}return res};Readable.prototype.addListener=Readable.prototype.on;Readable.prototype.resume=function(){emitDataEvents(this);this.read(0);this.emit("resume")};Readable.prototype.pause=function(){emitDataEvents(this,true);this.emit("pause")};function emitDataEvents(stream,startPaused){var state=stream._readableState;if(state.flowing){throw new Error("Cannot switch to old mode now.")}var paused=startPaused||false;var readable=false;stream.readable=true;stream.pipe=Stream.prototype.pipe;stream.on=stream.addListener=Stream.prototype.on;stream.on("readable",function(){readable=true;var c;while(!paused&&null!==(c=stream.read()))stream.emit("data",c);if(c===null){readable=false;stream._readableState.needReadable=true}});stream.pause=function(){paused=true;this.emit("pause")};stream.resume=function(){paused=false;if(readable)process.nextTick(function(){stream.emit("readable")});else this.read(0);this.emit("resume")};stream.emit("readable")}Readable.prototype.wrap=function(stream){var state=this._readableState;var paused=false;var self=this;stream.on("end",function(){if(state.decoder&&!state.ended){var chunk=state.decoder.end();if(chunk&&chunk.length)self.push(chunk)}self.push(null)});stream.on("data",function(chunk){if(state.decoder)chunk=state.decoder.write(chunk);if(state.objectMode&&(chunk===null||chunk===undefined))return;else if(!state.objectMode&&(!chunk||!chunk.length))return;var ret=self.push(chunk);if(!ret){paused=true;stream.pause()}});for(var i in stream){if(typeof stream[i]==="function"&&typeof this[i]==="undefined"){this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i)}}var events=["error","close","destroy","pause","resume"];forEach(events,function(ev){stream.on(ev,self.emit.bind(self,ev))});self._read=function(n){if(paused){paused=false;stream.resume()}};return self};Readable._fromList=fromList;function fromList(n,state){var list=state.buffer;var length=state.length;var stringMode=!!state.decoder;var objectMode=!!state.objectMode;var ret;if(list.length===0)return null;if(length===0)ret=null;else if(objectMode)ret=list.shift();else if(!n||n>=length){if(stringMode)ret=list.join("");else ret=Buffer.concat(list,length);list.length=0}else{if(n<list[0].length){var buf=list[0];ret=buf.slice(0,n);list[0]=buf.slice(n)}else if(n===list[0].length){ret=list.shift()}else{if(stringMode)ret="";else ret=new Buffer(n);var c=0;for(var i=0,l=list.length;i<l&&c<n;i++){var buf=list[0];var cpy=Math.min(n-c,buf.length);if(stringMode)ret+=buf.slice(0,cpy);else buf.copy(ret,c,0,cpy);if(cpy<buf.length)list[0]=buf.slice(cpy);else list.shift();c+=cpy}}}return ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error("endReadable called on non-empty stream");if(!state.endEmitted&&state.calledRead){state.ended=true;process.nextTick(function(){if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end")}})}}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++){f(xs[i],i)}}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++){if(xs[i]===x)return i}return-1}}).call(this,require("_process"))},{_process:136,buffer:128,"core-util-is":143,events:132,inherits:133,isarray:134,stream:148,"string_decoder/":149}],141:[function(require,module,exports){module.exports=Transform;var Duplex=require("./_stream_duplex");var util=require("core-util-is");util.inherits=require("inherits");util.inherits(Transform,Duplex);function TransformState(options,stream){this.afterTransform=function(er,data){return afterTransform(stream,er,data)};this.needTransform=false;this.transforming=false;this.writecb=null;this.writechunk=null}function afterTransform(stream,er,data){var ts=stream._transformState;ts.transforming=false;var cb=ts.writecb;if(!cb)return stream.emit("error",new Error("no writecb in Transform class"));ts.writechunk=null;ts.writecb=null;if(data!==null&&data!==undefined)stream.push(data);if(cb)cb(er);var rs=stream._readableState;rs.reading=false;if(rs.needReadable||rs.length<rs.highWaterMark){stream._read(rs.highWaterMark)}}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex.call(this,options);var ts=this._transformState=new TransformState(options,this);var stream=this;this._readableState.needReadable=true;this._readableState.sync=false;this.once("finish",function(){if("function"===typeof this._flush)this._flush(function(er){done(stream,er)});else done(stream)})}Transform.prototype.push=function(chunk,encoding){this._transformState.needTransform=false;return Duplex.prototype.push.call(this,chunk,encoding)};Transform.prototype._transform=function(chunk,encoding,cb){throw new Error("not implemented")};Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;ts.writecb=cb;ts.writechunk=chunk;ts.writeencoding=encoding;if(!ts.transforming){var rs=this._readableState;if(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)this._read(rs.highWaterMark)}};Transform.prototype._read=function(n){var ts=this._transformState;if(ts.writechunk!==null&&ts.writecb&&!ts.transforming){ts.transforming=true;this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform)}else{ts.needTransform=true}};function done(stream,er){if(er)return stream.emit("error",er);var ws=stream._writableState;var rs=stream._readableState;var ts=stream._transformState;if(ws.length)throw new Error("calling transform done when ws.length != 0");if(ts.transforming)throw new Error("calling transform done when still transforming");return stream.push(null)}},{"./_stream_duplex":138,"core-util-is":143,inherits:133}],142:[function(require,module,exports){(function(process){module.exports=Writable;var Buffer=require("buffer").Buffer;Writable.WritableState=WritableState;var util=require("core-util-is");util.inherits=require("inherits");var Stream=require("stream");util.inherits(Writable,Stream);function WriteReq(chunk,encoding,cb){this.chunk=chunk;this.encoding=encoding;this.callback=cb}function WritableState(options,stream){options=options||{};var hwm=options.highWaterMark;this.highWaterMark=hwm||hwm===0?hwm:16*1024;this.objectMode=!!options.objectMode;this.highWaterMark=~~this.highWaterMark;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;var noDecode=options.decodeStrings===false;this.decodeStrings=!noDecode;this.defaultEncoding=options.defaultEncoding||"utf8";this.length=0;this.writing=false;this.sync=true;this.bufferProcessing=false;this.onwrite=function(er){onwrite(stream,er)};this.writecb=null;this.writelen=0;this.buffer=[];this.errorEmitted=false}function Writable(options){var Duplex=require("./_stream_duplex");if(!(this instanceof Writable)&&!(this instanceof Duplex))return new Writable(options);this._writableState=new WritableState(options,this);this.writable=true;Stream.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))};function writeAfterEnd(stream,state,cb){var er=new Error("write after end");stream.emit("error",er);process.nextTick(function(){cb(er)})}function validChunk(stream,state,chunk,cb){var valid=true;if(!Buffer.isBuffer(chunk)&&"string"!==typeof chunk&&chunk!==null&&chunk!==undefined&&!state.objectMode){var er=new TypeError("Invalid non-string/buffer chunk");stream.emit("error",er);process.nextTick(function(){cb(er)});valid=false}return valid}Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState;var ret=false;if(typeof encoding==="function"){cb=encoding;encoding=null}if(Buffer.isBuffer(chunk))encoding="buffer";else if(!encoding)encoding=state.defaultEncoding;if(typeof cb!=="function")cb=function(){};if(state.ended)writeAfterEnd(this,state,cb);else if(validChunk(this,state,chunk,cb))ret=writeOrBuffer(this,state,chunk,encoding,cb);return ret};function decodeChunk(state,chunk,encoding){if(!state.objectMode&&state.decodeStrings!==false&&typeof chunk==="string"){chunk=new Buffer(chunk,encoding)}return chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){chunk=decodeChunk(state,chunk,encoding);if(Buffer.isBuffer(chunk))encoding="buffer";var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(!ret)state.needDrain=true;if(state.writing)state.buffer.push(new WriteReq(chunk,encoding,cb));else doWrite(stream,state,len,chunk,encoding,cb);return ret}function doWrite(stream,state,len,chunk,encoding,cb){state.writelen=len;state.writecb=cb;state.writing=true;state.sync=true;stream._write(chunk,encoding,state.onwrite);state.sync=false}function onwriteError(stream,state,sync,er,cb){if(sync)process.nextTick(function(){cb(er)});else cb(er);stream._writableState.errorEmitted=true;stream.emit("error",er)}function onwriteStateUpdate(state){state.writing=false;state.writecb=null;state.length-=state.writelen;state.writelen=0}function onwrite(stream,er){var state=stream._writableState;var sync=state.sync;var cb=state.writecb;onwriteStateUpdate(state);if(er)onwriteError(stream,state,sync,er,cb);else{var finished=needFinish(stream,state);if(!finished&&!state.bufferProcessing&&state.buffer.length)clearBuffer(stream,state);if(sync){process.nextTick(function(){afterWrite(stream,state,finished,cb)})}else{afterWrite(stream,state,finished,cb)}}}function afterWrite(stream,state,finished,cb){if(!finished)onwriteDrain(stream,state);cb();if(finished)finishMaybe(stream,state)}function onwriteDrain(stream,state){if(state.length===0&&state.needDrain){state.needDrain=false;stream.emit("drain")}}function clearBuffer(stream,state){state.bufferProcessing=true;for(var c=0;c<state.buffer.length;c++){var entry=state.buffer[c];var chunk=entry.chunk;var encoding=entry.encoding;var cb=entry.callback;var len=state.objectMode?1:chunk.length;doWrite(stream,state,len,chunk,encoding,cb);if(state.writing){c++;break}}state.bufferProcessing=false;if(c<state.buffer.length)state.buffer=state.buffer.slice(c);else state.buffer.length=0}Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("not implemented"))};Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;if(typeof chunk==="function"){cb=chunk;chunk=null;encoding=null}else if(typeof encoding==="function"){cb=encoding;encoding=null}if(typeof chunk!=="undefined"&&chunk!==null)this.write(chunk,encoding);if(!state.ending&&!state.finished)endWritable(this,state,cb)};function needFinish(stream,state){return state.ending&&state.length===0&&!state.finished&&!state.writing}function finishMaybe(stream,state){var need=needFinish(stream,state);if(need){state.finished=true;stream.emit("finish")}return need}function endWritable(stream,state,cb){state.ending=true;finishMaybe(stream,state);if(cb){if(state.finished)process.nextTick(cb);else stream.once("finish",cb)}state.ended=true}}).call(this,require("_process"))},{"./_stream_duplex":138,_process:136,buffer:128,"core-util-is":143,inherits:133,stream:148}],143:[function(require,module,exports){(function(Buffer){function isArray(ar){return Array.isArray(ar)}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return isObject(re)&&objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return isObject(d)&&objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return isObject(e)&&(objectToString(e)==="[object Error]"||e instanceof Error)}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;function isBuffer(arg){return Buffer.isBuffer(arg)}exports.isBuffer=isBuffer;function objectToString(o){return Object.prototype.toString.call(o)}}).call(this,require("buffer").Buffer)},{buffer:128}],144:[function(require,module,exports){module.exports=require("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":139}],145:[function(require,module,exports){var Stream=require("stream");exports=module.exports=require("./lib/_stream_readable.js");exports.Stream=Stream;exports.Readable=exports;exports.Writable=require("./lib/_stream_writable.js");exports.Duplex=require("./lib/_stream_duplex.js");exports.Transform=require("./lib/_stream_transform.js");exports.PassThrough=require("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":138,"./lib/_stream_passthrough.js":139,"./lib/_stream_readable.js":140,"./lib/_stream_transform.js":141,"./lib/_stream_writable.js":142,stream:148}],146:[function(require,module,exports){module.exports=require("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":141}],147:[function(require,module,exports){module.exports=require("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":142}],148:[function(require,module,exports){module.exports=Stream;var EE=require("events").EventEmitter;var inherits=require("inherits");inherits(Stream,EE);Stream.Readable=require("readable-stream/readable.js");Stream.Writable=require("readable-stream/writable.js");Stream.Duplex=require("readable-stream/duplex.js");Stream.Transform=require("readable-stream/transform.js");Stream.PassThrough=require("readable-stream/passthrough.js");Stream.Stream=Stream;function Stream(){EE.call(this)}Stream.prototype.pipe=function(dest,options){var source=this;function ondata(chunk){if(dest.writable){if(false===dest.write(chunk)&&source.pause){source.pause()}}}source.on("data",ondata);function ondrain(){if(source.readable&&source.resume){source.resume()}}dest.on("drain",ondrain);if(!dest._isStdio&&(!options||options.end!==false)){source.on("end",onend);source.on("close",onclose)}var didOnEnd=false;function onend(){if(didOnEnd)return;didOnEnd=true;dest.end()}function onclose(){if(didOnEnd)return;didOnEnd=true;if(typeof dest.destroy==="function")dest.destroy()}function onerror(er){cleanup();if(EE.listenerCount(this,"error")===0){throw er}}source.on("error",onerror);dest.on("error",onerror);function cleanup(){source.removeListener("data",ondata);dest.removeListener("drain",ondrain);source.removeListener("end",onend);source.removeListener("close",onclose);source.removeListener("error",onerror);dest.removeListener("error",onerror);source.removeListener("end",cleanup);source.removeListener("close",cleanup);dest.removeListener("close",cleanup)}source.on("end",cleanup);source.on("close",cleanup);dest.on("close",cleanup);dest.emit("pipe",source);return dest}},{events:132,inherits:133,"readable-stream/duplex.js":137,"readable-stream/passthrough.js":144,"readable-stream/readable.js":145,"readable-stream/transform.js":146,"readable-stream/writable.js":147}],149:[function(require,module,exports){var Buffer=require("buffer").Buffer;var isBufferEncoding=Buffer.isEncoding||function(encoding){switch(encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function assertEncoding(encoding){if(encoding&&!isBufferEncoding(encoding)){throw new Error("Unknown encoding: "+encoding)}}var StringDecoder=exports.StringDecoder=function(encoding){this.encoding=(encoding||"utf8").toLowerCase().replace(/[-_]/,"");assertEncoding(encoding);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2;this.detectIncompleteChar=utf16DetectIncompleteChar;break;case"base64":this.surrogateSize=3;this.detectIncompleteChar=base64DetectIncompleteChar;break;default:this.write=passThroughWrite;return}this.charBuffer=new Buffer(6);this.charReceived=0;this.charLength=0};StringDecoder.prototype.write=function(buffer){var charStr="";while(this.charLength){var available=buffer.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;buffer.copy(this.charBuffer,this.charReceived,0,available);this.charReceived+=available;if(this.charReceived<this.charLength){return""}buffer=buffer.slice(available,buffer.length);charStr=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var charCode=charStr.charCodeAt(charStr.length-1);if(charCode>=55296&&charCode<=56319){this.charLength+=this.surrogateSize;charStr="";continue}this.charReceived=this.charLength=0;if(buffer.length===0){return charStr}break}this.detectIncompleteChar(buffer);var end=buffer.length;if(this.charLength){buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end);end-=this.charReceived}charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1;var charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;this.charLength+=size;this.charReceived+=size;this.charBuffer.copy(this.charBuffer,size,0,size);buffer.copy(this.charBuffer,0,0,size);return charStr.substring(0,end)}return charStr};StringDecoder.prototype.detectIncompleteChar=function(buffer){var i=buffer.length>=3?3:buffer.length;for(;i>0;i--){var c=buffer[buffer.length-i];if(i==1&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i};StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length)res=this.write(buffer);if(this.charReceived){var cr=this.charReceived;var buf=this.charBuffer;var enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res};function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2;this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3;this.charLength=this.charReceived?3:0}},{buffer:128}],150:[function(require,module,exports){exports.isatty=function(){return false};function ReadStream(){throw new Error("tty.ReadStream is not implemented")}exports.ReadStream=ReadStream;function WriteStream(){throw new Error("tty.ReadStream is not implemented")}exports.WriteStream=WriteStream},{}],151:[function(require,module,exports){module.exports=function isBuffer(arg){return arg&&typeof arg==="object"&&typeof arg.copy==="function"&&typeof arg.fill==="function"&&typeof arg.readUInt8==="function"}},{}],152:[function(require,module,exports){(function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;i<arguments.length;i++){objects.push(inspect(arguments[i]))}return objects.join(" ")}var i=1;var args=arguments;var len=args.length;var str=String(f).replace(formatRegExp,function(x){if(x==="%%")return"%";if(i>=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}});for(var x=args[i];i<len;x=args[++i]){if(isNull(x)||!isObject(x)){str+=" "+x}else{str+=" "+inspect(x)}}return str};exports.deprecate=function(fn,msg){if(isUndefined(global.process)){return function(){return exports.deprecate(fn,msg).apply(this,arguments)}}if(process.noDeprecation===true){return fn}var warned=false;function deprecated(){if(!warned){if(process.throwDeprecation){throw new Error(msg)}else if(process.traceDeprecation){console.trace(msg)}else{console.error(msg)}warned=true}return fn.apply(this,arguments)}return deprecated};var debugs={};var debugEnviron;exports.debuglog=function(set){if(isUndefined(debugEnviron))debugEnviron=process.env.NODE_DEBUG||"";set=set.toUpperCase();if(!debugs[set]){if(new RegExp("\\b"+set+"\\b","i").test(debugEnviron)){var pid=process.pid;debugs[set]=function(){var msg=exports.format.apply(exports,arguments);console.error("%s %d: %s",set,pid,msg)}}else{debugs[set]=function(){}}}return debugs[set]};function inspect(obj,opts){var ctx={seen:[],stylize:stylizeNoColor};if(arguments.length>=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts)){ctx.showHidden=opts}else if(opts){exports._extend(ctx,opts)}if(isUndefined(ctx.showHidden))ctx.showHidden=false;if(isUndefined(ctx.depth))ctx.depth=2;if(isUndefined(ctx.colors))ctx.colors=false;if(isUndefined(ctx.customInspect))ctx.customInspect=true;if(ctx.colors)ctx.stylize=stylizeWithColor;return formatValue(ctx,obj,ctx.depth)}exports.inspect=inspect;inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};inspect.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style){return"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m"}else{return str}}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};array.forEach(function(val,idx){hash[val]=true});return hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret)){ret=formatValue(ctx,ret,recurseTimes)}return ret}var primitive=formatPrimitive(ctx,value);if(primitive){return primitive}var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden){keys=Object.getOwnPropertyNames(value)}if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0)){return formatError(value)}if(keys.length===0){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}if(isDate(value)){return ctx.stylize(Date.prototype.toString.call(value),"date")}if(isError(value)){return formatError(value)}}var base="",array=false,braces=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)){base=" "+RegExp.prototype.toString.call(value) }if(isDate(value)){base=" "+Date.prototype.toUTCString.call(value)}if(isError(value)){base=" "+formatError(value)}if(keys.length===0&&(!array||value.length==0)){return braces[0]+base+braces[1]}if(recurseTimes<0){if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}else{return ctx.stylize("[Object]","special")}}ctx.seen.push(value);var output;if(array){output=formatArray(ctx,value,recurseTimes,visibleKeys,keys)}else{output=keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)})}ctx.seen.pop();return reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+value,"boolean");if(isNull(value))return ctx.stylize("null","null")}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){var output=[];for(var i=0,l=value.length;i<l;++i){if(hasOwnProperty(value,String(i))){output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,String(i),true))}else{output.push("")}}keys.forEach(function(key){if(!key.match(/^\d+$/)){output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,key,true))}});return output}function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){var name,str,desc;desc=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]};if(desc.get){if(desc.set){str=ctx.stylize("[Getter/Setter]","special")}else{str=ctx.stylize("[Getter]","special")}}else{if(desc.set){str=ctx.stylize("[Setter]","special")}}if(!hasOwnProperty(visibleKeys,key)){name="["+key+"]"}if(!str){if(ctx.seen.indexOf(desc.value)<0){if(isNull(recurseTimes)){str=formatValue(ctx,desc.value,null)}else{str=formatValue(ctx,desc.value,recurseTimes-1)}if(str.indexOf("\n")>-1){if(array){str=str.split("\n").map(function(line){return" "+line}).join("\n").substr(2)}else{str="\n"+str.split("\n").map(function(line){return" "+line}).join("\n")}}}else{str=ctx.stylize("[Circular]","special")}}if(isUndefined(name)){if(array&&key.match(/^\d+$/)){return str}name=JSON.stringify(""+key);if(name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){name=name.substr(1,name.length-2);name=ctx.stylize(name,"name")}else{name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");name=ctx.stylize(name,"string")}}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0;var length=output.reduce(function(prev,cur){numLinesEst++;if(cur.indexOf("\n")>=0)numLinesEst++;return prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(length>60){return braces[0]+(base===""?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1]}return braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return isObject(re)&&objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return isObject(d)&&objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return isObject(e)&&(objectToString(e)==="[object Error]"||e instanceof Error)}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=require("./support/isBuffer");function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var d=new Date;var time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=require("inherits");exports._extend=function(origin,add){if(!add||!isObject(add))return origin;var keys=Object.keys(add);var i=keys.length;while(i--){origin[keys[i]]=add[keys[i]]}return origin};function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./support/isBuffer":151,_process:136,inherits:133}],153:[function(require,module,exports){"use strict";var escapeStringRegexp=require("escape-string-regexp");var ansiStyles=require("ansi-styles");var stripAnsi=require("strip-ansi");var hasAnsi=require("has-ansi");var supportsColor=require("supports-color");var defineProps=Object.defineProperties;var chalk=module.exports;function build(_styles){var builder=function builder(){return applyStyle.apply(builder,arguments)};builder._styles=_styles;builder.__proto__=proto;return builder}var styles=function(){var ret={};ansiStyles.grey=ansiStyles.gray;Object.keys(ansiStyles).forEach(function(key){ansiStyles[key].closeRe=new RegExp(escapeStringRegexp(ansiStyles[key].close),"g");ret[key]={get:function(){return build(this._styles.concat(key))}}});return ret}();var proto=defineProps(function chalk(){},styles);function applyStyle(){var args=arguments;var argsLen=args.length;var str=argsLen!==0&&String(arguments[0]);if(argsLen>1){for(var a=1;a<argsLen;a++){str+=" "+args[a]}}if(!chalk.enabled||!str){return str}var nestedStyles=this._styles;for(var i=0;i<nestedStyles.length;i++){var code=ansiStyles[nestedStyles[i]];str=code.open+str.replace(code.closeRe,code.open)+code.close}return str}function init(){var ret={};Object.keys(styles).forEach(function(name){ret[name]={get:function(){return build([name])}}});return ret}defineProps(chalk,init());chalk.styles=ansiStyles;chalk.hasColor=hasAnsi;chalk.stripColor=stripAnsi;chalk.supportsColor=supportsColor;if(chalk.enabled===undefined){chalk.enabled=chalk.supportsColor}},{"ansi-styles":154,"escape-string-regexp":155,"has-ansi":156,"strip-ansi":158,"supports-color":160}],154:[function(require,module,exports){"use strict";var styles=module.exports;var codes={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]};Object.keys(codes).forEach(function(key){var val=codes[key];var style=styles[key]={};style.open="["+val[0]+"m";style.close="["+val[1]+"m"})},{}],155:[function(require,module,exports){"use strict";var matchOperatorsRe=/[|\\{}()[\]^$+*?.]/g;module.exports=function(str){if(typeof str!=="string"){throw new TypeError("Expected a string")}return str.replace(matchOperatorsRe,"\\$&")}},{}],156:[function(require,module,exports){"use strict";var ansiRegex=require("ansi-regex");var re=new RegExp(ansiRegex().source);module.exports=re.test.bind(re)},{"ansi-regex":157}],157:[function(require,module,exports){"use strict";module.exports=function(){return/\u001b\[(?:[0-9]{1,3}(?:;[0-9]{1,3})*)?[m|K]/g}},{}],158:[function(require,module,exports){"use strict";var ansiRegex=require("ansi-regex")();module.exports=function(str){return typeof str==="string"?str.replace(ansiRegex,""):str}},{"ansi-regex":159}],159:[function(require,module,exports){arguments[4][157][0].apply(exports,arguments)},{dup:157}],160:[function(require,module,exports){(function(process){"use strict";module.exports=function(){if(process.argv.indexOf("--no-color")!==-1){return false}if(process.argv.indexOf("--color")!==-1){return true}if(process.stdout&&!process.stdout.isTTY){return false}if(process.platform==="win32"){return true}if("COLORTERM"in process.env){return true}if(process.env.TERM==="dumb"){return false}if(/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)){return true}return false}()}).call(this,require("_process"))},{_process:136}],161:[function(require,module,exports){!function(global,framework,undefined){"use strict";var OBJECT="Object",FUNCTION="Function",ARRAY="Array",STRING="String",NUMBER="Number",REGEXP="RegExp",DATE="Date",MAP="Map",SET="Set",WEAKMAP="WeakMap",WEAKSET="WeakSet",SYMBOL="Symbol",PROMISE="Promise",MATH="Math",ARGUMENTS="Arguments",PROTOTYPE="prototype",CONSTRUCTOR="constructor",TO_STRING="toString",TO_STRING_TAG=TO_STRING+"Tag",TO_LOCALE="toLocaleString",HAS_OWN="hasOwnProperty",FOR_EACH="forEach",ITERATOR="iterator",FF_ITERATOR="@@"+ITERATOR,PROCESS="process",CREATE_ELEMENT="createElement",Function=global[FUNCTION],Object=global[OBJECT],Array=global[ARRAY],String=global[STRING],Number=global[NUMBER],RegExp=global[REGEXP],Date=global[DATE],Map=global[MAP],Set=global[SET],WeakMap=global[WEAKMAP],WeakSet=global[WEAKSET],Symbol=global[SYMBOL],Math=global[MATH],TypeError=global.TypeError,setTimeout=global.setTimeout,setImmediate=global.setImmediate,clearImmediate=global.clearImmediate,process=global[PROCESS],nextTick=process&&process.nextTick,document=global.document,html=document&&document.documentElement,navigator=global.navigator,define=global.define,ArrayProto=Array[PROTOTYPE],ObjectProto=Object[PROTOTYPE],FunctionProto=Function[PROTOTYPE],Infinity=1/0,DOT=".";function isObject(it){return it!=null&&(typeof it=="object"||typeof it=="function")}function isFunction(it){return typeof it=="function"}var isNative=ctx(/./.test,/\[native code\]\s*\}\s*$/,1);var buildIn={Undefined:1,Null:1,Array:1,String:1,Arguments:1,Function:1,Error:1,Boolean:1,Number:1,Date:1,RegExp:1},toString=ObjectProto[TO_STRING];function setToStringTag(it,tag,stat){if(it&&!has(it=stat?it:it[PROTOTYPE],SYMBOL_TAG))hidden(it,SYMBOL_TAG,tag)}function cof(it){return it==undefined?it===undefined?"Undefined":"Null":toString.call(it).slice(8,-1)}function classof(it){var klass=cof(it),tag;return klass==OBJECT&&(tag=it[SYMBOL_TAG])?has(buildIn,tag)?"~"+tag:tag:klass}var call=FunctionProto.call,apply=FunctionProto.apply,REFERENCE_GET;function part(){var fn=assertFunction(this),length=arguments.length,args=Array(length),i=0,_=path._,holder=false;while(length>i)if((args[i]=arguments[i++])===_)holder=true;return function(){var that=this,_length=arguments.length,i=0,j=0,_args;if(!holder&&!_length)return invoke(fn,args,that);_args=args.slice();if(holder)for(;length>i;i++)if(_args[i]===_)_args[i]=arguments[j++];while(_length>j)_args.push(arguments[j++]);return invoke(fn,_args,that)}}function ctx(fn,that,length){assertFunction(fn);if(~length&&that===undefined)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}function invoke(fn,args,that){var un=that===undefined;switch(args.length|0){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3]);case 5:return un?fn(args[0],args[1],args[2],args[3],args[4]):fn.call(that,args[0],args[1],args[2],args[3],args[4])}return fn.apply(that,args)}function construct(target,argumentsList){var proto=assertFunction(arguments.length<3?target:arguments[2])[PROTOTYPE],instance=create(isObject(proto)?proto:ObjectProto),result=apply.call(target,instance,argumentsList);return isObject(result)?result:instance}var create=Object.create,getPrototypeOf=Object.getPrototypeOf,setPrototypeOf=Object.setPrototypeOf,defineProperty=Object.defineProperty,defineProperties=Object.defineProperties,getOwnDescriptor=Object.getOwnPropertyDescriptor,getKeys=Object.keys,getNames=Object.getOwnPropertyNames,getSymbols=Object.getOwnPropertySymbols,isFrozen=Object.isFrozen,has=ctx(call,ObjectProto[HAS_OWN],2),ES5Object=Object,Dict;function toObject(it){return ES5Object(assertDefined(it))}function returnIt(it){return it}function returnThis(){return this}function get(object,key){if(has(object,key))return object[key]}function ownKeys(it){assertObject(it);return getSymbols?getNames(it).concat(getSymbols(it)):getNames(it)}var assign=Object.assign||function(target,source){var T=Object(assertDefined(target)),l=arguments.length,i=1;while(l>i){var S=ES5Object(arguments[i++]),keys=getKeys(S),length=keys.length,j=0,key;while(length>j)T[key=keys[j++]]=S[key]}return T};function keyOf(object,el){var O=toObject(object),keys=getKeys(O),length=keys.length,index=0,key;while(length>index)if(O[key=keys[index++]]===el)return key}function array(it){return String(it).split(",")}var push=ArrayProto.push,unshift=ArrayProto.unshift,slice=ArrayProto.slice,splice=ArrayProto.splice,indexOf=ArrayProto.indexOf,forEach=ArrayProto[FOR_EACH];function createArrayMethod(type){var isMap=type==1,isFilter=type==2,isSome=type==3,isEvery=type==4,isFindIndex=type==6,noholes=type==5||isFindIndex;return function(callbackfn){var O=Object(assertDefined(this)),that=arguments[1],self=ES5Object(O),f=ctx(callbackfn,that,3),length=toLength(self.length),index=0,result=isMap?Array(length):isFilter?[]:undefined,val,res;for(;length>index;index++)if(noholes||index in self){val=self[index];res=f(val,index,O);if(type){if(isMap)result[index]=res;else if(res)switch(type){case 3:return true;case 5:return val;case 6:return index;case 2:result.push(val)}else if(isEvery)return false}}return isFindIndex?-1:isSome||isEvery?isEvery:result}}function createArrayContains(isContains){return function(el){var O=toObject(this),length=toLength(O.length),index=toIndex(arguments[1],length);if(isContains&&el!=el){for(;length>index;index++)if(sameNaN(O[index]))return isContains||index}else for(;length>index;index++)if(isContains||index in O){if(O[index]===el)return isContains||index}return!isContains&&-1}}function generic(A,B){return typeof A=="function"?A:B}var MAX_SAFE_INTEGER=9007199254740991,ceil=Math.ceil,floor=Math.floor,max=Math.max,min=Math.min,random=Math.random,trunc=Math.trunc||function(it){return(it>0?floor:ceil)(it)};function sameNaN(number){return number!=number}function toInteger(it){return isNaN(it)?0:trunc(it)}function toLength(it){return it>0?min(toInteger(it),MAX_SAFE_INTEGER):0}function toIndex(index,length){var index=toInteger(index);return index<0?max(index+length,0):min(index,length)}function createReplacer(regExp,replace,isStatic){var replacer=isObject(replace)?function(part){return replace[part]}:replace;return function(it){return String(isStatic?it:this).replace(regExp,replacer)}}function createPointAt(toString){return function(pos){var s=String(assertDefined(this)),i=toInteger(pos),l=s.length,a,b;if(i<0||i>=l)return toString?"":undefined;a=s.charCodeAt(i);return a<55296||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?toString?s.charAt(i):a:toString?s.slice(i,i+2):(a-55296<<10)+(b-56320)+65536}}var REDUCE_ERROR="Reduce of empty object with no initial value";function assert(condition,msg1,msg2){if(!condition)throw TypeError(msg2?msg1+msg2:msg1)}function assertDefined(it){if(it==undefined)throw TypeError("Function called on null or undefined");return it}function assertFunction(it){assert(isFunction(it),it," is not a function!");return it}function assertObject(it){assert(isObject(it),it," is not an object!");return it}function assertInstance(it,Constructor,name){assert(it instanceof Constructor,name,": use the 'new' operator!")}function descriptor(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value:value}}function simpleSet(object,key,value){object[key]=value;return object}function createDefiner(bitmap){return DESC?function(object,key,value){return defineProperty(object,key,descriptor(bitmap,value))}:simpleSet}function uid(key){return SYMBOL+"("+key+")_"+(++sid+random())[TO_STRING](36)}function getWellKnownSymbol(name,setter){return Symbol&&Symbol[name]||(setter?Symbol:safeSymbol)(SYMBOL+DOT+name)}var DESC=!!function(){try{return defineProperty({},DOT,ObjectProto)}catch(e){}}(),sid=0,hidden=createDefiner(1),set=Symbol?simpleSet:hidden,safeSymbol=Symbol||uid;function assignHidden(target,src){for(var key in src)hidden(target,key,src[key]);return target}var SYMBOL_UNSCOPABLES=getWellKnownSymbol("unscopables"),ArrayUnscopables=ArrayProto[SYMBOL_UNSCOPABLES]||{},SYMBOL_SPECIES=getWellKnownSymbol("species");function setSpecies(C){if(framework||!isNative(C))defineProperty(C,SYMBOL_SPECIES,{configurable:true,get:returnThis})}var SYMBOL_ITERATOR=getWellKnownSymbol(ITERATOR),SYMBOL_TAG=getWellKnownSymbol(TO_STRING_TAG),SUPPORT_FF_ITER=FF_ITERATOR in ArrayProto,ITER=safeSymbol("iter"),KEY=1,VALUE=2,Iterators={},IteratorPrototype={},NATIVE_ITERATORS=SYMBOL_ITERATOR in ArrayProto,BUGGY_ITERATORS="keys"in ArrayProto&&!("next"in[].keys());setIterator(IteratorPrototype,returnThis);function setIterator(O,value){hidden(O,SYMBOL_ITERATOR,value);SUPPORT_FF_ITER&&hidden(O,FF_ITERATOR,value)}function createIterator(Constructor,NAME,next,proto){Constructor[PROTOTYPE]=create(proto||IteratorPrototype,{next:descriptor(1,next)});setToStringTag(Constructor,NAME+" Iterator")}function defineIterator(Constructor,NAME,value,DEFAULT){var proto=Constructor[PROTOTYPE],iter=get(proto,SYMBOL_ITERATOR)||get(proto,FF_ITERATOR)||DEFAULT&&get(proto,DEFAULT)||value;if(framework){setIterator(proto,iter);if(iter!==value){var iterProto=getPrototypeOf(iter.call(new Constructor));setToStringTag(iterProto,NAME+" Iterator",true);has(proto,FF_ITERATOR)&&setIterator(iterProto,returnThis)}}Iterators[NAME]=iter;Iterators[NAME+" Iterator"]=returnThis;return iter}function defineStdIterators(Base,NAME,Constructor,next,DEFAULT,IS_SET){function createIter(kind){return function(){return new Constructor(this,kind)}}createIterator(Constructor,NAME,next);var entries=createIter(KEY+VALUE),values=createIter(VALUE);if(DEFAULT==VALUE)values=defineIterator(Base,NAME,values,"values");else entries=defineIterator(Base,NAME,entries,"entries");if(DEFAULT){$define(PROTO+FORCED*BUGGY_ITERATORS,NAME,{entries:entries,keys:IS_SET?values:createIter(KEY),values:values})}}function iterResult(done,value){return{value:value,done:!!done}}function isIterable(it){var O=Object(it),Symbol=global[SYMBOL],hasExt=(Symbol&&Symbol[ITERATOR]||FF_ITERATOR)in O;return hasExt||SYMBOL_ITERATOR in O||has(Iterators,classof(O))}function getIterator(it){var Symbol=global[SYMBOL],ext=it[Symbol&&Symbol[ITERATOR]||FF_ITERATOR],getIter=ext||it[SYMBOL_ITERATOR]||Iterators[classof(it)];return assertObject(getIter.call(it))}function stepCall(fn,value,entries){return entries?invoke(fn,value):fn(value)}function forOf(iterable,entries,fn,that){var iterator=getIterator(iterable),f=ctx(fn,that,entries?2:1),step;while(!(step=iterator.next()).done)if(stepCall(f,step.value,entries)===false)return}var NODE=cof(process)==PROCESS,core={},path=framework?global:core,old=global.core,exportGlobal,FORCED=1,GLOBAL=2,STATIC=4,PROTO=8,BIND=16,WRAP=32;function $define(type,name,source){var key,own,out,exp,isGlobal=type&GLOBAL,target=isGlobal?global:type&STATIC?global[name]:(global[name]||ObjectProto)[PROTOTYPE],exports=isGlobal?core:core[name]||(core[name]={});if(isGlobal)source=name;for(key in source){own=!(type&FORCED)&&target&&key in target&&(!isFunction(target[key])||isNative(target[key]));out=(own?target:source)[key];if(type&BIND&&own)exp=ctx(out,global);else if(type&WRAP&&!framework&&target[key]==out){exp=function(param){return this instanceof out?new out(param):out(param)};exp[PROTOTYPE]=out[PROTOTYPE]}else exp=type&PROTO&&isFunction(out)?ctx(call,out):out;if(exports[key]!=out)hidden(exports,key,exp);if(framework&&target&&!own){if(isGlobal)target[key]=out;else delete target[key]&&hidden(target,key,out)}}}if(typeof module!="undefined"&&module.exports)module.exports=core;else if(isFunction(define)&&define.amd)define(function(){return core});else exportGlobal=true;if(exportGlobal||framework){core.noConflict=function(){global.core=old;return core};global.core=core}$define(GLOBAL+FORCED,{global:global});!function(TAG,SymbolRegistry,AllSymbols,setter){if(!isNative(Symbol)){Symbol=function(description){assert(!(this instanceof Symbol),SYMBOL+" is not a "+CONSTRUCTOR);var tag=uid(description);AllSymbols[tag]=true;DESC&&setter&&defineProperty(ObjectProto,tag,{configurable:true,set:function(value){hidden(this,tag,value)}});return set(create(Symbol[PROTOTYPE]),TAG,tag)};hidden(Symbol[PROTOTYPE],TO_STRING,function(){return this[TAG]})}$define(GLOBAL+WRAP,{Symbol:Symbol});var symbolStatics={"for":function(key){return has(SymbolRegistry,key+="")?SymbolRegistry[key]:SymbolRegistry[key]=Symbol(key)},iterator:SYMBOL_ITERATOR,keyFor:part.call(keyOf,SymbolRegistry),species:SYMBOL_SPECIES,toStringTag:SYMBOL_TAG=getWellKnownSymbol(TO_STRING_TAG,true),unscopables:SYMBOL_UNSCOPABLES,pure:safeSymbol,set:set,useSetter:function(){setter=true},useSimple:function(){setter=false}};forEach.call(array("hasInstance,isConcatSpreadable,match,replace,search,split,toPrimitive"),function(it){symbolStatics[it]=getWellKnownSymbol(it)});$define(STATIC,SYMBOL,symbolStatics);setToStringTag(Symbol,SYMBOL);$define(STATIC+FORCED*!isNative(Symbol),OBJECT,{getOwnPropertyNames:function(it){var names=getNames(toObject(it)),result=[],key,i=0;while(names.length>i)has(AllSymbols,key=names[i++])||result.push(key);return result},getOwnPropertySymbols:function(it){var names=getNames(toObject(it)),result=[],key,i=0;while(names.length>i)has(AllSymbols,key=names[i++])&&result.push(key);return result}})}(safeSymbol("tag"),{},{},true);!function(RegExpProto,isFinite,tmp,NAME){var RangeError=global.RangeError,isInteger=Number.isInteger||function(it){return!isObject(it)&&isFinite(it)&&floor(it)===it},sign=Math.sign||function sign(x){return(x=+x)==0||x!=x?x:x<0?-1:1},E=Math.E,pow=Math.pow,abs=Math.abs,exp=Math.exp,log=Math.log,sqrt=Math.sqrt,fcc=String.fromCharCode,at=createPointAt(true);var objectStatic={assign:assign,is:function(x,y){return x===y?x!==0||1/x===1/y:x!=x&&y!=y}};"__proto__"in ObjectProto&&function(buggy,set){try{set=ctx(call,getOwnDescriptor(ObjectProto,"__proto__").set,2);set({},ArrayProto)}catch(e){buggy=true}objectStatic.setPrototypeOf=setPrototypeOf=setPrototypeOf||function(O,proto){assertObject(O);assert(proto===null||isObject(proto),proto,": can't set as prototype!");if(buggy)O.__proto__=proto;else set(O,proto);return O}}();$define(STATIC,OBJECT,objectStatic);function asinh(x){return!isFinite(x=+x)||x==0?x:x<0?-asinh(-x):log(x+sqrt(x*x+1))}function expm1(x){return(x=+x)==0?x:x>-1e-6&&x<1e-6?x+x*x/2:exp(x)-1}$define(STATIC,NUMBER,{EPSILON:pow(2,-52),isFinite:function(it){return typeof it=="number"&&isFinite(it)},isInteger:isInteger,isNaN:sameNaN,isSafeInteger:function(number){return isInteger(number)&&abs(number)<=MAX_SAFE_INTEGER},MAX_SAFE_INTEGER:MAX_SAFE_INTEGER,MIN_SAFE_INTEGER:-MAX_SAFE_INTEGER,parseFloat:parseFloat,parseInt:parseInt});$define(STATIC,MATH,{acosh:function(x){return(x=+x)<1?NaN:isFinite(x)?log(x/E+sqrt(x+1)*sqrt(x-1)/E)+1:x},asinh:asinh,atanh:function(x){return(x=+x)==0?x:log((1+x)/(1-x))/2},cbrt:function(x){return sign(x=+x)*pow(abs(x),1/3)},clz32:function(x){return(x>>>=0)?32-x[TO_STRING](2).length:32},cosh:function(x){return(exp(x=+x)+exp(-x))/2},expm1:expm1,fround:function(x){return new Float32Array([x])[0]},hypot:function(value1,value2){var sum=0,len1=arguments.length,len2=len1,args=Array(len1),larg=-Infinity,arg;while(len1--){arg=args[len1]=+arguments[len1];if(arg==Infinity||arg==-Infinity)return Infinity;if(arg>larg)larg=arg}larg=arg||1;while(len2--)sum+=pow(args[len2]/larg,2);return larg*sqrt(sum)},imul:function(x,y){var UInt16=65535,xn=+x,yn=+y,xl=UInt16&xn,yl=UInt16&yn;return 0|xl*yl+((UInt16&xn>>>16)*yl+xl*(UInt16&yn>>>16)<<16>>>0)},log1p:function(x){return(x=+x)>-1e-8&&x<1e-8?x-x*x/2:log(1+x)},log10:function(x){return log(x)/Math.LN10},log2:function(x){return log(x)/Math.LN2},sign:sign,sinh:function(x){return abs(x=+x)<1?(expm1(x)-expm1(-x))/2:(exp(x-1)-exp(-x-1))*(E/2)},tanh:function(x){var a=expm1(x=+x),b=expm1(-x);return a==Infinity?1:b==Infinity?-1:(a-b)/(exp(x)+exp(-x))},trunc:trunc});setToStringTag(Math,MATH,true);function assertNotRegExp(it){if(cof(it)==REGEXP)throw TypeError()}$define(STATIC,STRING,{fromCodePoint:function(x){var res=[],len=arguments.length,i=0,code;while(len>i){code=+arguments[i++];if(toIndex(code,1114111)!==code)throw RangeError(code+" is not a valid code point");res.push(code<65536?fcc(code):fcc(((code-=65536)>>10)+55296,code%1024+56320))}return res.join("")},raw:function(callSite){var raw=toObject(callSite.raw),len=toLength(raw.length),sln=arguments.length,res=[],i=0;while(len>i){res.push(String(raw[i++]));if(i<sln)res.push(String(arguments[i]))}return res.join("")}});$define(PROTO,STRING,{codePointAt:createPointAt(false),endsWith:function(searchString){assertNotRegExp(searchString);var that=String(assertDefined(this)),endPosition=arguments[1],len=toLength(that.length),end=endPosition===undefined?len:min(toLength(endPosition),len);searchString+="";return that.slice(end-searchString.length,end)===searchString},includes:function(searchString){assertNotRegExp(searchString);return!!~String(assertDefined(this)).indexOf(searchString,arguments[1])},repeat:function(count){var str=String(assertDefined(this)),res="",n=toInteger(count);if(0>n||n==Infinity)throw RangeError("Count can't be negative");for(;n>0;(n>>>=1)&&(str+=str))if(n&1)res+=str;return res},startsWith:function(searchString){assertNotRegExp(searchString);var that=String(assertDefined(this)),index=toLength(min(arguments[1],that.length));searchString+="";return that.slice(index,index+searchString.length)===searchString}});defineStdIterators(String,STRING,function(iterated){set(this,ITER,{o:String(iterated),i:0})},function(){var iter=this[ITER],O=iter.o,index=iter.i,point;if(index>=O.length)return iterResult(1);point=at.call(O,index);iter.i+=point.length;return iterResult(0,point)});$define(STATIC,ARRAY,{from:function(arrayLike){var O=Object(assertDefined(arrayLike)),result=new(generic(this,Array)),mapfn=arguments[1],that=arguments[2],mapping=mapfn!==undefined,f=mapping?ctx(mapfn,that,2):undefined,index=0,length;if(isIterable(O))for(var iter=getIterator(O),step;!(step=iter.next()).done;index++){result[index]=mapping?f(step.value,index):step.value}else for(length=toLength(O.length);length>index;index++){result[index]=mapping?f(O[index],index):O[index]}result.length=index;return result},of:function(){var index=0,length=arguments.length,result=new(generic(this,Array))(length);while(length>index)result[index]=arguments[index++];result.length=length;return result}});$define(PROTO,ARRAY,{copyWithin:function(target,start){var O=Object(assertDefined(this)),len=toLength(O.length),to=toIndex(target,len),from=toIndex(start,len),end=arguments[2],fin=end===undefined?len:toIndex(end,len),count=min(fin-from,len-to),inc=1;if(from<to&&to<from+count){inc=-1;from=from+count-1;to=to+count-1}while(count-->0){if(from in O)O[to]=O[from];else delete O[to];to+=inc;from+=inc}return O},fill:function(value){var O=Object(assertDefined(this)),length=toLength(O.length),index=toIndex(arguments[1],length),end=arguments[2],endPos=end===undefined?length:toIndex(end,length);while(endPos>index)O[index++]=value;return O},find:createArrayMethod(5),findIndex:createArrayMethod(6)});defineStdIterators(Array,ARRAY,function(iterated,kind){set(this,ITER,{o:toObject(iterated),i:0,k:kind})},function(){var iter=this[ITER],O=iter.o,kind=iter.k,index=iter.i++;if(!O||index>=O.length)return iter.o=undefined,iterResult(1);if(kind==KEY)return iterResult(0,index);if(kind==VALUE)return iterResult(0,O[index]);return iterResult(0,[index,O[index]])},VALUE);Iterators[ARGUMENTS]=Iterators[ARRAY];setToStringTag(global.JSON,"JSON",true);function wrapObjectMethod(key,MODE){var fn=Object[key],exp=core[OBJECT][key],f=0,o={};if(!exp||isNative(exp)){o[key]=MODE==1?function(it){return isObject(it)?fn(it):it}:MODE==2?function(it){return isObject(it)?fn(it):true}:MODE==3?function(it){return isObject(it)?fn(it):false}:MODE==4?function(it,key){return fn(toObject(it),key)}:function(it){return fn(toObject(it))};try{fn(DOT)}catch(e){f=1}$define(STATIC+FORCED*f,OBJECT,o)}}wrapObjectMethod("freeze",1);wrapObjectMethod("seal",1);wrapObjectMethod("preventExtensions",1);wrapObjectMethod("isFrozen",2);wrapObjectMethod("isSealed",2);wrapObjectMethod("isExtensible",3);wrapObjectMethod("getOwnPropertyDescriptor",4);wrapObjectMethod("getPrototypeOf");wrapObjectMethod("keys");wrapObjectMethod("getOwnPropertyNames");if(framework){tmp[SYMBOL_TAG]=DOT;if(cof(tmp)!=DOT)hidden(ObjectProto,TO_STRING,function(){return"[object "+classof(this)+"]"});NAME in FunctionProto||defineProperty(FunctionProto,NAME,{configurable:true,get:function(){var match=String(this).match(/^\s*function ([^ (]*)/),name=match?match[1]:"";has(this,NAME)||defineProperty(this,NAME,descriptor(5,name));return name},set:function(value){has(this,NAME)||defineProperty(this,NAME,descriptor(0,value))}});if(DESC&&!function(){try{return RegExp(/a/g,"i")=="/a/i"}catch(e){}}()){var _RegExp=RegExp;RegExp=function RegExp(pattern,flags){return new _RegExp(cof(pattern)==REGEXP&&flags!==undefined?pattern.source:pattern,flags)};forEach.call(getNames(_RegExp),function(key){key in RegExp||defineProperty(RegExp,key,{configurable:true,get:function(){return _RegExp[key]},set:function(it){_RegExp[key]=it}})});RegExpProto[CONSTRUCTOR]=RegExp;RegExp[PROTOTYPE]=RegExpProto;hidden(global,REGEXP,RegExp)}if(/./g.flags!="g")defineProperty(RegExpProto,"flags",{configurable:true,get:createReplacer(/^.*\/(\w*)$/,"$1")});forEach.call(array("find,findIndex,fill,copyWithin,entries,keys,values"),function(it){ArrayUnscopables[it]=true});SYMBOL_UNSCOPABLES in ArrayProto||hidden(ArrayProto,SYMBOL_UNSCOPABLES,ArrayUnscopables)}setSpecies(RegExp);setSpecies(Array)}(RegExp[PROTOTYPE],isFinite,{},"name");isFunction(setImmediate)&&isFunction(clearImmediate)||function(ONREADYSTATECHANGE){var postMessage=global.postMessage,addEventListener=global.addEventListener,MessageChannel=global.MessageChannel,counter=0,queue={},defer,channel,port;setImmediate=function(fn){var args=[],i=1;while(arguments.length>i)args.push(arguments[i++]);queue[++counter]=function(){invoke(isFunction(fn)?fn:Function(fn),args)};defer(counter);return counter};clearImmediate=function(id){delete queue[id]};function run(id){if(has(queue,id)){var fn=queue[id];delete queue[id];fn()}}function listner(event){run(event.data)}if(NODE){defer=function(id){nextTick(part.call(run,id))}}else if(addEventListener&&isFunction(postMessage)&&!global.importScripts){defer=function(id){postMessage(id,"*")};addEventListener("message",listner,false)}else if(isFunction(MessageChannel)){channel=new MessageChannel;port=channel.port2;channel.port1.onmessage=listner;defer=ctx(port.postMessage,port,1)}else if(document&&ONREADYSTATECHANGE in document[CREATE_ELEMENT]("script")){defer=function(id){html.appendChild(document[CREATE_ELEMENT]("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this); run(id)}}}else{defer=function(id){setTimeout(part.call(run,id),0)}}}("onreadystatechange");$define(GLOBAL+BIND,{setImmediate:setImmediate,clearImmediate:clearImmediate});!function(Promise,test){isFunction(Promise)&&isFunction(Promise.resolve)&&Promise.resolve(test=new Promise(function(){}))==test||function(asap,DEF){function isThenable(o){var then;if(isObject(o))then=o.then;return isFunction(then)?then:false}function notify(def){var chain=def.chain;chain.length&&asap(function(){var msg=def.msg,ok=def.state==1,i=0;while(chain.length>i)!function(react){var cb=ok?react.ok:react.fail,ret,then;try{if(cb){ret=cb===true?msg:cb(msg);if(ret===react.P){react.rej(TypeError(PROMISE+"-chain cycle"))}else if(then=isThenable(ret)){then.call(ret,react.res,react.rej)}else react.res(ret)}else react.rej(msg)}catch(err){react.rej(err)}}(chain[i++]);chain.length=0})}function resolve(msg){var def=this,then,wrapper;if(def.done)return;def.done=true;def=def.def||def;try{if(then=isThenable(msg)){wrapper={def:def,done:false};then.call(msg,ctx(resolve,wrapper,1),ctx(reject,wrapper,1))}else{def.msg=msg;def.state=1;notify(def)}}catch(err){reject.call(wrapper||{def:def,done:false},err)}}function reject(msg){var def=this;if(def.done)return;def.done=true;def=def.def||def;def.msg=msg;def.state=2;notify(def)}function getConstructor(C){var S=assertObject(C)[SYMBOL_SPECIES];return S!=undefined?S:C}Promise=function(executor){assertFunction(executor);assertInstance(this,Promise,PROMISE);var def={chain:[],state:0,done:false,msg:undefined};hidden(this,DEF,def);try{executor(ctx(resolve,def,1),ctx(reject,def,1))}catch(err){reject.call(def,err)}};assignHidden(Promise[PROTOTYPE],{then:function(onFulfilled,onRejected){var S=assertObject(assertObject(this)[CONSTRUCTOR])[SYMBOL_SPECIES];var react={ok:isFunction(onFulfilled)?onFulfilled:true,fail:isFunction(onRejected)?onRejected:false},P=react.P=new(S!=undefined?S:Promise)(function(resolve,reject){react.res=assertFunction(resolve);react.rej=assertFunction(reject)}),def=this[DEF];def.chain.push(react);def.state&&notify(def);return P},"catch":function(onRejected){return this.then(undefined,onRejected)}});assignHidden(Promise,{all:function(iterable){var Promise=getConstructor(this),values=[];return new Promise(function(resolve,reject){forOf(iterable,false,push,values);var remaining=values.length,results=Array(remaining);if(remaining)forEach.call(values,function(promise,index){Promise.resolve(promise).then(function(value){results[index]=value;--remaining||resolve(results)},reject)});else resolve(results)})},race:function(iterable){var Promise=getConstructor(this);return new Promise(function(resolve,reject){forOf(iterable,false,function(promise){Promise.resolve(promise).then(resolve,reject)})})},reject:function(r){return new(getConstructor(this))(function(resolve,reject){reject(r)})},resolve:function(x){return isObject(x)&&DEF in x&&getPrototypeOf(x)===this[PROTOTYPE]?x:new(getConstructor(this))(function(resolve,reject){resolve(x)})}})}(nextTick||setImmediate,safeSymbol("def"));setToStringTag(Promise,PROMISE);setSpecies(Promise);$define(GLOBAL+FORCED*!isNative(Promise),{Promise:Promise})}(global[PROMISE]);!function(){var UID=safeSymbol("uid"),O1=safeSymbol("O1"),WEAK=safeSymbol("weak"),LEAK=safeSymbol("leak"),LAST=safeSymbol("last"),FIRST=safeSymbol("first"),SIZE=DESC?safeSymbol("size"):"size",uid=0,tmp={};function getCollection(C,NAME,methods,commonMethods,isMap,isWeak){var ADDER=isMap?"set":"add",proto=C&&C[PROTOTYPE],O={};function initFromIterable(that,iterable){if(iterable!=undefined)forOf(iterable,isMap,that[ADDER],that);return that}function fixSVZ(key,chain){var method=proto[key];if(framework)proto[key]=function(a,b){var result=method.call(this,a===0?0:a,b);return chain?this:result}}if(!isNative(C)||!(isWeak||!BUGGY_ITERATORS&&has(proto,FOR_EACH)&&has(proto,"entries"))){C=isWeak?function(iterable){assertInstance(this,C,NAME);set(this,UID,uid++);initFromIterable(this,iterable)}:function(iterable){var that=this;assertInstance(that,C,NAME);set(that,O1,create(null));set(that,SIZE,0);set(that,LAST,undefined);set(that,FIRST,undefined);initFromIterable(that,iterable)};assignHidden(assignHidden(C[PROTOTYPE],methods),commonMethods);isWeak||defineProperty(C[PROTOTYPE],"size",{get:function(){return assertDefined(this[SIZE])}})}else{var Native=C,inst=new C,chain=inst[ADDER](isWeak?{}:-0,1),buggyZero;if(!NATIVE_ITERATORS||!C.length){C=function(iterable){assertInstance(this,C,NAME);return initFromIterable(new Native,iterable)};C[PROTOTYPE]=proto;if(framework)proto[CONSTRUCTOR]=C}isWeak||inst[FOR_EACH](function(val,key){buggyZero=1/key===-Infinity});if(buggyZero){fixSVZ("delete");fixSVZ("has");isMap&&fixSVZ("get")}if(buggyZero||chain!==inst)fixSVZ(ADDER,true)}setToStringTag(C,NAME);setSpecies(C);O[NAME]=C;$define(GLOBAL+WRAP+FORCED*!isNative(C),O);isWeak||defineStdIterators(C,NAME,function(iterated,kind){set(this,ITER,{o:iterated,k:kind})},function(){var iter=this[ITER],kind=iter.k,entry=iter.l;while(entry&&entry.r)entry=entry.p;if(!iter.o||!(iter.l=entry=entry?entry.n:iter.o[FIRST])){return iter.o=undefined,iterResult(1)}if(kind==KEY)return iterResult(0,entry.k);if(kind==VALUE)return iterResult(0,entry.v);return iterResult(0,[entry.k,entry.v])},isMap?KEY+VALUE:VALUE,!isMap);return C}function fastKey(it,create){if(!isObject(it))return(typeof it=="string"?"S":"P")+it;if(isFrozen(it))return"F";if(!has(it,UID)){if(!create)return"E";hidden(it,UID,++uid)}return"O"+it[UID]}function getEntry(that,key){var index=fastKey(key),entry;if(index!="F")return that[O1][index];for(entry=that[FIRST];entry;entry=entry.n){if(entry.k==key)return entry}}function def(that,key,value){var entry=getEntry(that,key),prev,index;if(entry)entry.v=value;else{that[LAST]=entry={i:index=fastKey(key,true),k:key,v:value,p:prev=that[LAST],n:undefined,r:false};if(!that[FIRST])that[FIRST]=entry;if(prev)prev.n=entry;that[SIZE]++;if(index!="F")that[O1][index]=entry}return that}var collectionMethods={clear:function(){for(var that=this,data=that[O1],entry=that[FIRST];entry;entry=entry.n){entry.r=true;entry.p=entry.n=undefined;delete data[entry.i]}that[FIRST]=that[LAST]=undefined;that[SIZE]=0},"delete":function(key){var that=this,entry=getEntry(that,key);if(entry){var next=entry.n,prev=entry.p;delete that[O1][entry.i];entry.r=true;if(prev)prev.n=next;if(next)next.p=prev;if(that[FIRST]==entry)that[FIRST]=next;if(that[LAST]==entry)that[LAST]=prev;that[SIZE]--}return!!entry},forEach:function(callbackfn){var f=ctx(callbackfn,arguments[1],3),entry;while(entry=entry?entry.n:this[FIRST]){f(entry.v,entry.k,this);while(entry&&entry.r)entry=entry.p}},has:function(key){return!!getEntry(this,key)}};Map=getCollection(Map,MAP,{get:function(key){var entry=getEntry(this,key);return entry&&entry.v},set:function(key,value){return def(this,key===0?0:key,value)}},collectionMethods,true);Set=getCollection(Set,SET,{add:function(value){return def(this,value=value===0?0:value,value)}},collectionMethods);function defWeak(that,key,value){if(isFrozen(assertObject(key)))leakStore(that).set(key,value);else{has(key,WEAK)||hidden(key,WEAK,{});key[WEAK][that[UID]]=value}return that}function leakStore(that){return that[LEAK]||hidden(that,LEAK,new Map)[LEAK]}var weakMethods={"delete":function(key){if(!isObject(key))return false;if(isFrozen(key))return leakStore(this)["delete"](key);return has(key,WEAK)&&has(key[WEAK],this[UID])&&delete key[WEAK][this[UID]]},has:function(key){if(!isObject(key))return false;if(isFrozen(key))return leakStore(this).has(key);return has(key,WEAK)&&has(key[WEAK],this[UID])}};WeakMap=getCollection(WeakMap,WEAKMAP,{get:function(key){if(isObject(key)){if(isFrozen(key))return leakStore(this).get(key);if(has(key,WEAK))return key[WEAK][this[UID]]}},set:function(key,value){return defWeak(this,key,value)}},weakMethods,true,true);if(framework&&DESC&&new WeakMap([[Object.freeze(tmp),7]]).get(tmp)!=7){forEach.call(array("delete,has,get,set"),function(key){var method=WeakMap[PROTOTYPE][key];WeakMap[PROTOTYPE][key]=function(a,b){if(isObject(a)&&isFrozen(a)){var result=leakStore(this)[key](a,b);return key=="set"?this:result}return method.call(this,a,b)}})}WeakSet=getCollection(WeakSet,WEAKSET,{add:function(value){return defWeak(this,value,true)}},weakMethods,false,true)}();!function(){function Enumerate(iterated){var keys=[],key;for(key in iterated)keys.push(key);set(this,ITER,{o:iterated,a:keys,i:0})}createIterator(Enumerate,OBJECT,function(){var iter=this[ITER],keys=iter.a,key;do{if(iter.i>=keys.length)return iterResult(1)}while(!((key=keys[iter.i++])in iter.o));return iterResult(0,key)});function wrap(fn){return function(it){assertObject(it);try{return fn.apply(undefined,arguments),true}catch(e){return false}}}function reflectGet(target,propertyKey){var receiver=arguments.length<3?target:arguments[2],desc=getOwnDescriptor(assertObject(target),propertyKey),proto;if(desc)return desc.get?desc.get.call(receiver):desc.value;return isObject(proto=getPrototypeOf(target))?reflectGet(proto,propertyKey,receiver):undefined}function reflectSet(target,propertyKey,V){var receiver=arguments.length<4?target:arguments[3],desc=getOwnDescriptor(assertObject(target),propertyKey),proto;if(desc){if(desc.writable===false)return false;if(desc.set)return desc.set.call(receiver,V),true}if(isObject(proto=getPrototypeOf(target)))return reflectSet(proto,propertyKey,V,receiver);desc=getOwnDescriptor(receiver,propertyKey)||descriptor(0);desc.value=V;return defineProperty(receiver,propertyKey,desc),true}var isExtensible=Object.isExtensible||returnIt;var reflect={apply:ctx(call,apply,3),construct:construct,defineProperty:wrap(defineProperty),deleteProperty:function(target,propertyKey){var desc=getOwnDescriptor(assertObject(target),propertyKey);return desc&&!desc.configurable?false:delete target[propertyKey]},enumerate:function(target){return new Enumerate(assertObject(target))},get:reflectGet,getOwnPropertyDescriptor:function(target,propertyKey){return getOwnDescriptor(assertObject(target),propertyKey)},getPrototypeOf:function(target){return getPrototypeOf(assertObject(target))},has:function(target,propertyKey){return propertyKey in target},isExtensible:function(target){return!!isExtensible(assertObject(target))},ownKeys:ownKeys,preventExtensions:wrap(Object.preventExtensions||returnIt),set:reflectSet};if(setPrototypeOf)reflect.setPrototypeOf=function(target,proto){return setPrototypeOf(assertObject(target),proto),true};$define(GLOBAL,{Reflect:{}});$define(STATIC,"Reflect",reflect)}();!function(){$define(PROTO,ARRAY,{includes:createArrayContains(true)});$define(PROTO,STRING,{at:createPointAt(true)});function createObjectToArray(isEntries){return function(object){var O=toObject(object),keys=getKeys(object),length=keys.length,i=0,result=Array(length),key;if(isEntries)while(length>i)result[i]=[key=keys[i++],O[key]];else while(length>i)result[i]=O[keys[i++]];return result}}$define(STATIC,OBJECT,{values:createObjectToArray(false),entries:createObjectToArray(true)});$define(STATIC,REGEXP,{escape:createReplacer(/([\\\-[\]{}()*+?.,^$|])/g,"\\$1",true)})}();!function(REFERENCE){REFERENCE_GET=getWellKnownSymbol(REFERENCE+"Get",true);var REFERENCE_SET=getWellKnownSymbol(REFERENCE+SET,true),REFERENCE_DELETE=getWellKnownSymbol(REFERENCE+"Delete",true);$define(STATIC,SYMBOL,{referenceGet:REFERENCE_GET,referenceSet:REFERENCE_SET,referenceDelete:REFERENCE_DELETE});hidden(FunctionProto,REFERENCE_GET,returnThis);function setMapMethods(Constructor){if(Constructor){var MapProto=Constructor[PROTOTYPE];hidden(MapProto,REFERENCE_GET,MapProto.get);hidden(MapProto,REFERENCE_SET,MapProto.set);hidden(MapProto,REFERENCE_DELETE,MapProto["delete"])}}setMapMethods(Map);setMapMethods(WeakMap)}("reference");!function(NodeList){if(framework&&NodeList&&!(SYMBOL_ITERATOR in NodeList[PROTOTYPE])){hidden(NodeList[PROTOTYPE],SYMBOL_ITERATOR,Iterators[ARRAY])}Iterators.NodeList=Iterators[ARRAY]}(global.NodeList);!function(DICT){Dict=function(iterable){var dict=create(null);if(iterable!=undefined){if(isIterable(iterable)){for(var iter=getIterator(iterable),step,value;!(step=iter.next()).done;){value=step.value;dict[value[0]]=value[1]}}else assign(dict,iterable)}return dict};Dict[PROTOTYPE]=null;function DictIterator(iterated,kind){set(this,ITER,{o:toObject(iterated),a:getKeys(iterated),i:0,k:kind})}createIterator(DictIterator,DICT,function(){var iter=this[ITER],O=iter.o,keys=iter.a,kind=iter.k,key;do{if(iter.i>=keys.length)return iterResult(1)}while(!has(O,key=keys[iter.i++]));if(kind==KEY)return iterResult(0,key);if(kind==VALUE)return iterResult(0,O[key]);return iterResult(0,[key,O[key]])});function createDictIter(kind){return function(it){return new DictIterator(it,kind)}}function createDictMethod(type){var isMap=type==1,isEvery=type==4;return function(object,callbackfn,that){var f=ctx(callbackfn,that,3),O=toObject(object),result=isMap||type==7||type==2?new(generic(this,Dict)):undefined,key,val,res;for(key in O)if(has(O,key)){val=O[key];res=f(val,key,object);if(type){if(isMap)result[key]=res;else if(res)switch(type){case 2:result[key]=val;break;case 3:return true;case 5:return val;case 6:return key;case 7:result[res[0]]=res[1]}else if(isEvery)return false}}return type==3||isEvery?isEvery:result}}function createDictReduce(isTurn){return function(object,mapfn,init){assertFunction(mapfn);var O=toObject(object),keys=getKeys(O),length=keys.length,i=0,memo,key,result;if(isTurn)memo=init==undefined?new(generic(this,Dict)):Object(init);else if(arguments.length<3){assert(length,REDUCE_ERROR);memo=O[keys[i++]]}else memo=Object(init);while(length>i)if(has(O,key=keys[i++])){result=mapfn(memo,O[key],key,object);if(isTurn){if(result===false)break}else memo=result}return memo}}var findKey=createDictMethod(6);function includes(object,el){return(el==el?keyOf(object,el):findKey(object,sameNaN))!==undefined}var dictMethods={keys:createDictIter(KEY),values:createDictIter(VALUE),entries:createDictIter(KEY+VALUE),forEach:createDictMethod(0),map:createDictMethod(1),filter:createDictMethod(2),some:createDictMethod(3),every:createDictMethod(4),find:createDictMethod(5),findKey:findKey,mapPairs:createDictMethod(7),reduce:createDictReduce(false),turn:createDictReduce(true),keyOf:keyOf,includes:includes,has:has,get:get,set:createDefiner(0),isDict:function(it){return isObject(it)&&getPrototypeOf(it)===Dict[PROTOTYPE]}};if(REFERENCE_GET)for(var key in dictMethods)!function(fn){function method(){for(var args=[this],i=0;i<arguments.length;)args.push(arguments[i++]);return invoke(fn,args)}fn[REFERENCE_GET]=function(){return method}}(dictMethods[key]);$define(GLOBAL+FORCED,{Dict:assignHidden(Dict,dictMethods)})}("Dict");!function(ENTRIES,FN){function $for(iterable,entries){if(!(this instanceof $for))return new $for(iterable,entries);this[ITER]=getIterator(iterable);this[ENTRIES]=!!entries}createIterator($for,"Wrapper",function(){return this[ITER].next()});var $forProto=$for[PROTOTYPE];setIterator($forProto,function(){return this[ITER]});function createChainIterator(next){function Iter(I,fn,that){this[ITER]=getIterator(I);this[ENTRIES]=I[ENTRIES];this[FN]=ctx(fn,that,I[ENTRIES]?2:1)}createIterator(Iter,"Chain",next,$forProto);setIterator(Iter[PROTOTYPE],returnThis);return Iter}var MapIter=createChainIterator(function(){var step=this[ITER].next();return step.done?step:iterResult(0,stepCall(this[FN],step.value,this[ENTRIES]))});var FilterIter=createChainIterator(function(){for(;;){var step=this[ITER].next();if(step.done||stepCall(this[FN],step.value,this[ENTRIES]))return step}});assignHidden($forProto,{of:function(fn,that){forOf(this,this[ENTRIES],fn,that)},array:function(fn,that){var result=[];forOf(fn!=undefined?this.map(fn,that):this,false,push,result);return result},filter:function(fn,that){return new FilterIter(this,fn,that)},map:function(fn,that){return new MapIter(this,fn,that)}});$for.isIterable=isIterable;$for.getIterator=getIterator;$define(GLOBAL+FORCED,{$for:$for})}("entries",safeSymbol("fn"));!function(_,toLocaleString){core._=path._=path._||{};$define(PROTO+FORCED,FUNCTION,{part:part,only:function(numberArguments,that){var fn=assertFunction(this),n=toLength(numberArguments),isThat=arguments.length>1;return function(){var length=min(n,arguments.length),args=Array(length),i=0;while(length>i)args[i]=arguments[i++];return invoke(fn,args,isThat?that:this)}}});function tie(key){var that=this,bound={};return hidden(that,_,function(key){if(key===undefined||!(key in that))return toLocaleString.call(that);return has(bound,key)?bound[key]:bound[key]=ctx(that[key],that,-1)})[_](key)}hidden(path._,TO_STRING,function(){return _});hidden(ObjectProto,_,tie);DESC||hidden(ArrayProto,_,tie)}(DESC?uid("tie"):TO_LOCALE,ObjectProto[TO_LOCALE]);!function(){function define(target,mixin){var keys=ownKeys(toObject(mixin)),length=keys.length,i=0,key;while(length>i)defineProperty(target,key=keys[i++],getOwnDescriptor(mixin,key));return target}$define(STATIC+FORCED,OBJECT,{isObject:isObject,classof:classof,define:define,make:function(proto,mixin){return define(create(proto),mixin)}})}();$define(PROTO+FORCED,ARRAY,{turn:function(fn,target){assertFunction(fn);var memo=target==undefined?[]:Object(target),O=ES5Object(this),length=toLength(O.length),index=0;while(length>index)if(fn(memo,O[index],index++,this)===false)break;return memo}});if(framework)ArrayUnscopables.turn=true;!function(arrayStatics){function setArrayStatics(keys,length){forEach.call(array(keys),function(key){if(key in ArrayProto)arrayStatics[key]=ctx(call,ArrayProto[key],length)})}setArrayStatics("pop,reverse,shift,keys,values,entries",1);setArrayStatics("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3);setArrayStatics("join,slice,concat,push,splice,unshift,sort,lastIndexOf,"+"reduce,reduceRight,copyWithin,fill,turn");$define(STATIC,ARRAY,arrayStatics)}({});!function(numberMethods){function NumberIterator(iterated){set(this,ITER,{l:toLength(iterated),i:0})}createIterator(NumberIterator,NUMBER,function(){var iter=this[ITER],i=iter.i++;return i<iter.l?iterResult(0,i):iterResult(1)});defineIterator(Number,NUMBER,function(){return new NumberIterator(this)});numberMethods.random=function(lim){var a=+this,b=lim==undefined?0:+lim,m=min(a,b);return random()*(max(a,b)-m)+m};forEach.call(array("round,floor,ceil,abs,sin,asin,cos,acos,tan,atan,exp,sqrt,max,min,pow,atan2,"+"acosh,asinh,atanh,cbrt,clz32,cosh,expm1,hypot,imul,log1p,log10,log2,sign,sinh,tanh,trunc"),function(key){var fn=Math[key];if(fn)numberMethods[key]=function(){var args=[+this],i=0;while(arguments.length>i)args.push(arguments[i++]);return invoke(fn,args)}});$define(PROTO+FORCED,NUMBER,numberMethods)}({});!function(){var escapeHTMLDict={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"},unescapeHTMLDict={},key;for(key in escapeHTMLDict)unescapeHTMLDict[escapeHTMLDict[key]]=key;$define(PROTO+FORCED,STRING,{escapeHTML:createReplacer(/[&<>"']/g,escapeHTMLDict),unescapeHTML:createReplacer(/&(?:amp|lt|gt|quot|apos);/g,unescapeHTMLDict)})}();!function(formatRegExp,flexioRegExp,locales,current,SECONDS,MINUTES,HOURS,MONTH,YEAR){function createFormat(prefix){return function(template,locale){var that=this,dict=locales[has(locales,locale)?locale:current];function get(unit){return that[prefix+unit]()}return String(template).replace(formatRegExp,function(part){switch(part){case"s":return get(SECONDS);case"ss":return lz(get(SECONDS));case"m":return get(MINUTES);case"mm":return lz(get(MINUTES));case"h":return get(HOURS);case"hh":return lz(get(HOURS));case"D":return get(DATE);case"DD":return lz(get(DATE));case"W":return dict[0][get("Day")];case"N":return get(MONTH)+1;case"NN":return lz(get(MONTH)+1);case"M":return dict[2][get(MONTH)];case"MM":return dict[1][get(MONTH)];case"Y":return get(YEAR);case"YY":return lz(get(YEAR)%100)}return part})}}function lz(num){return num>9?num:"0"+num}function addLocale(lang,locale){function split(index){var result=[];forEach.call(array(locale.months),function(it){result.push(it.replace(flexioRegExp,"$"+index))});return result}locales[lang]=[array(locale.weekdays),split(1),split(2)];return core}$define(PROTO+FORCED,DATE,{format:createFormat("get"),formatUTC:createFormat("getUTC")});addLocale(current,{weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",months:"January,February,March,April,May,June,July,August,September,October,November,December"});addLocale("ru",{weekdays:"Воскресенье,Понедельник,Вторник,Среда,Четверг,Пятница,Суббота",months:"Январ:я|ь,Феврал:я|ь,Март:а|,Апрел:я|ь,Ма:я|й,Июн:я|ь,"+"Июл:я|ь,Август:а|,Сентябр:я|ь,Октябр:я|ь,Ноябр:я|ь,Декабр:я|ь"});core.locale=function(locale){return has(locales,locale)?current=locale:current};core.addLocale=addLocale}(/\b\w\w?\b/g,/:(.*)\|(.*)$/,{},"en","Seconds","Minutes","Hours","Month","FullYear")}(typeof self!="undefined"&&self.Math===Math?self:Function("return this")(),false)},{}],162:[function(require,module,exports){exports=module.exports=debug;exports.coerce=coerce;exports.disable=disable;exports.enable=enable;exports.enabled=enabled;exports.humanize=require("ms");exports.names=[];exports.skips=[];exports.formatters={};var prevColor=0;var prevTime;function selectColor(){return exports.colors[prevColor++%exports.colors.length]}function debug(namespace){function disabled(){}disabled.enabled=false;function enabled(){var self=enabled;var curr=+new Date;var ms=curr-(prevTime||curr);self.diff=ms;self.prev=prevTime;self.curr=curr;prevTime=curr;if(null==self.useColors)self.useColors=exports.useColors();if(null==self.color&&self.useColors)self.color=selectColor();var args=Array.prototype.slice.call(arguments);args[0]=exports.coerce(args[0]);if("string"!==typeof args[0]){args=["%o"].concat(args)}var index=0;args[0]=args[0].replace(/%([a-z%])/g,function(match,format){if(match==="%%")return match;index++;var formatter=exports.formatters[format];if("function"===typeof formatter){var val=args[index];match=formatter.call(self,val);args.splice(index,1);index--}return match});if("function"===typeof exports.formatArgs){args=exports.formatArgs.apply(self,args)}var logFn=enabled.log||exports.log||console.log.bind(console);logFn.apply(self,args)}enabled.enabled=true;var fn=exports.enabled(namespace)?enabled:disabled;fn.namespace=namespace;return fn}function enable(namespaces){exports.save(namespaces);var split=(namespaces||"").split(/[\s,]+/);var len=split.length;for(var i=0;i<len;i++){if(!split[i])continue;namespaces=split[i].replace(/\*/g,".*?");if(namespaces[0]==="-"){exports.skips.push(new RegExp("^"+namespaces.substr(1)+"$"))}else{exports.names.push(new RegExp("^"+namespaces+"$"))}}}function disable(){exports.enable("")}function enabled(name){var i,len;for(i=0,len=exports.skips.length;i<len;i++){if(exports.skips[i].test(name)){return false}}for(i=0,len=exports.names.length;i<len;i++){if(exports.names[i].test(name)){return true}}return false}function coerce(val){if(val instanceof Error)return val.stack||val.message;return val}},{ms:164}],163:[function(require,module,exports){(function(process){var tty=require("tty");var util=require("util");exports=module.exports=require("./debug");exports.log=log;exports.formatArgs=formatArgs;exports.save=save;exports.load=load;exports.useColors=useColors;exports.colors=[6,2,3,4,5,1];var fd=parseInt(process.env.DEBUG_FD,10)||2;var stream=1===fd?process.stdout:2===fd?process.stderr:createWritableStdioStream(fd);function useColors(){var debugColors=(process.env.DEBUG_COLORS||"").trim().toLowerCase();if(0===debugColors.length){return tty.isatty(fd)}else{return"0"!==debugColors&&"no"!==debugColors&&"false"!==debugColors&&"disabled"!==debugColors}}var inspect=4===util.inspect.length?function(v,colors){return util.inspect(v,void 0,void 0,colors)}:function(v,colors){return util.inspect(v,{colors:colors})};exports.formatters.o=function(v){return inspect(v,this.useColors).replace(/\s*\n\s*/g," ")};function formatArgs(){var args=arguments;var useColors=this.useColors;var name=this.namespace;if(useColors){var c=this.color;args[0]=" [9"+c+"m"+name+" "+""+args[0]+"[3"+c+"m"+" +"+exports.humanize(this.diff)+""}else{args[0]=(new Date).toUTCString()+" "+name+" "+args[0]}return args}function log(){return stream.write(util.format.apply(this,arguments)+"\n")}function save(namespaces){if(null==namespaces){delete process.env.DEBUG}else{process.env.DEBUG=namespaces}}function load(){return process.env.DEBUG}function createWritableStdioStream(fd){var stream;var tty_wrap=process.binding("tty_wrap");switch(tty_wrap.guessHandleType(fd)){case"TTY":stream=new tty.WriteStream(fd);stream._type="tty";if(stream._handle&&stream._handle.unref){stream._handle.unref()}break;case"FILE":var fs=require("fs");stream=new fs.SyncWriteStream(fd,{autoClose:false});stream._type="fs";break;case"PIPE":case"TCP":var net=require("net");stream=new net.Socket({fd:fd,readable:false,writable:true});stream.readable=false;stream.read=null;stream._type="pipe";if(stream._handle&&stream._handle.unref){stream._handle.unref()}break;default:throw new Error("Implement me. Unknown stream file type!")}stream.fd=fd;stream._isStdio=true;return stream}exports.enable(load())}).call(this,require("_process"))},{"./debug":162,_process:136,fs:126,net:126,tty:150,util:152}],164:[function(require,module,exports){var s=1e3;var m=s*60;var h=m*60;var d=h*24;var y=d*365.25;module.exports=function(val,options){options=options||{};if("string"==typeof val)return parse(val);return options.long?long(val):short(val)};function parse(str){var match=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(str);if(!match)return;var n=parseFloat(match[1]);var type=(match[2]||"ms").toLowerCase();switch(type){case"years":case"year":case"y":return n*y;case"days":case"day":case"d":return n*d;case"hours":case"hour":case"h":return n*h;case"minutes":case"minute":case"m":return n*m;case"seconds":case"second":case"s":return n*s;case"ms":return n}}function short(ms){if(ms>=d)return Math.round(ms/d)+"d";if(ms>=h)return Math.round(ms/h)+"h";if(ms>=m)return Math.round(ms/m)+"m";if(ms>=s)return Math.round(ms/s)+"s";return ms+"ms"}function long(ms){return plural(ms,d,"day")||plural(ms,h,"hour")||plural(ms,m,"minute")||plural(ms,s,"second")||ms+" ms"}function plural(ms,n,name){if(ms<n)return;if(ms<n*1.5)return Math.floor(ms/n)+" "+name;return Math.ceil(ms/n)+" "+name+"s"}},{}],165:[function(require,module,exports){"use strict";var repeating=require("repeating");var INDENT_RE=/^(?:( )+|\t+)/;function getMostUsed(indents){var result=0;var maxUsed=0;var maxWeight=0;for(var n in indents){var indent=indents[n];var u=indent[0];var w=indent[1];if(u>maxUsed||u===maxUsed&&w>maxWeight){maxUsed=u;maxWeight=w;result=+n}}return result}module.exports=function(str){if(typeof str!=="string"){throw new TypeError("Expected a string")}var tabs=0;var spaces=0;var prev=0;var indents={};var current;var isIndent;str.split(/\n/g).forEach(function(line){if(!line){return}var indent;var matches=line.match(INDENT_RE);if(!matches){indent=0}else{indent=matches[0].length;if(matches[1]){spaces++}else{tabs++}}var diff=indent-prev;prev=indent;if(diff){isIndent=diff>0;current=indents[isIndent?diff:-diff];if(current){current[0]++}else{current=indents[diff]=[1,0]}}else if(current){current[1]+=+isIndent}});var amount=getMostUsed(indents);var type;var actual;if(!amount){type=null;actual=""}else if(spaces>=tabs){type="space";actual=repeating(" ",amount)}else{type="tab";actual=repeating(" ",amount)}return{amount:amount,type:type,indent:actual}}},{repeating:166}],166:[function(require,module,exports){"use strict";var isFinite=require("is-finite");module.exports=function(str,n){if(typeof str!=="string"){throw new TypeError("Expected a string as the first argument")}if(n<0||!isFinite(n)){throw new TypeError("Expected a finite positive number")}var ret="";do{if(n&1){ret+=str}str+=str}while(n=n>>1);return ret}},{"is-finite":167}],167:[function(require,module,exports){"use strict";module.exports=Number.isFinite||function(val){if(typeof val!=="number"||val!==val||val===Infinity||val===-Infinity){return false}return true}},{}],168:[function(require,module,exports){(function(root,factory){"use strict";if(typeof define==="function"&&define.amd){define(["exports"],factory)}else if(typeof exports!=="undefined"){factory(exports)}else{factory(root.estraverse={})}})(this,function clone(exports){"use strict";var Syntax,isArray,VisitorOption,VisitorKeys,objectCreate,objectKeys,BREAK,SKIP,REMOVE;function ignoreJSHintError(){}isArray=Array.isArray;if(!isArray){isArray=function isArray(array){return Object.prototype.toString.call(array)==="[object Array]"}}function deepCopy(obj){var ret={},key,val;for(key in obj){if(obj.hasOwnProperty(key)){val=obj[key];if(typeof val==="object"&&val!==null){ret[key]=deepCopy(val)}else{ret[key]=val}}}return ret}function shallowCopy(obj){var ret={},key;for(key in obj){if(obj.hasOwnProperty(key)){ret[key]=obj[key]}}return ret}ignoreJSHintError(shallowCopy);function upperBound(array,func){var diff,len,i,current;len=array.length;i=0;while(len){diff=len>>>1;current=i+diff;if(func(array[current])){len=diff}else{i=current+1;len-=diff+1}}return i}function lowerBound(array,func){var diff,len,i,current;len=array.length;i=0;while(len){diff=len>>>1;current=i+diff;if(func(array[current])){i=current+1;len-=diff+1}else{len=diff}}return i}ignoreJSHintError(lowerBound);objectCreate=Object.create||function(){function F(){}return function(o){F.prototype=o;return new F}}();objectKeys=Object.keys||function(o){var keys=[],key;for(key in o){keys.push(key)}return keys};function extend(to,from){objectKeys(from).forEach(function(key){to[key]=from[key]});return to}Syntax={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportBatchSpecifier:"ExportBatchSpecifier",ExportDeclaration:"ExportDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"};VisitorKeys={AssignmentExpression:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","defaults","rest","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","body","superClass"],ClassExpression:["id","body","superClass"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportBatchSpecifier:[],ExportDeclaration:["declaration","specifiers","source"],ExportSpecifier:["id","name"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","defaults","rest","body"],FunctionExpression:["id","params","defaults","rest","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["id"],ImportNamespaceSpecifier:["id"],ImportSpecifier:["id","name"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],Program:["body"],Property:["key","value"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handlers","handler","guardedHandlers","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]}; BREAK={};SKIP={};REMOVE={};VisitorOption={Break:BREAK,Skip:SKIP,Remove:REMOVE};function Reference(parent,key){this.parent=parent;this.key=key}Reference.prototype.replace=function replace(node){this.parent[this.key]=node};Reference.prototype.remove=function remove(){if(isArray(this.parent)){this.parent.splice(this.key,1);return true}else{this.replace(null);return false}};function Element(node,path,wrap,ref){this.node=node;this.path=path;this.wrap=wrap;this.ref=ref}function Controller(){}Controller.prototype.path=function path(){var i,iz,j,jz,result,element;function addToPath(result,path){if(isArray(path)){for(j=0,jz=path.length;j<jz;++j){result.push(path[j])}}else{result.push(path)}}if(!this.__current.path){return null}result=[];for(i=2,iz=this.__leavelist.length;i<iz;++i){element=this.__leavelist[i];addToPath(result,element.path)}addToPath(result,this.__current.path);return result};Controller.prototype.type=function(){var node=this.current();return node.type||this.__current.wrap};Controller.prototype.parents=function parents(){var i,iz,result;result=[];for(i=1,iz=this.__leavelist.length;i<iz;++i){result.push(this.__leavelist[i].node)}return result};Controller.prototype.current=function current(){return this.__current.node};Controller.prototype.__execute=function __execute(callback,element){var previous,result;result=undefined;previous=this.__current;this.__current=element;this.__state=null;if(callback){result=callback.call(this,element.node,this.__leavelist[this.__leavelist.length-1].node)}this.__current=previous;return result};Controller.prototype.notify=function notify(flag){this.__state=flag};Controller.prototype.skip=function(){this.notify(SKIP)};Controller.prototype["break"]=function(){this.notify(BREAK)};Controller.prototype.remove=function(){this.notify(REMOVE)};Controller.prototype.__initialize=function(root,visitor){this.visitor=visitor;this.root=root;this.__worklist=[];this.__leavelist=[];this.__current=null;this.__state=null;this.__fallback=visitor.fallback==="iteration";this.__keys=VisitorKeys;if(visitor.keys){this.__keys=extend(objectCreate(this.__keys),visitor.keys)}};function isNode(node){if(node==null){return false}return typeof node==="object"&&typeof node.type==="string"}function isProperty(nodeType,key){return(nodeType===Syntax.ObjectExpression||nodeType===Syntax.ObjectPattern)&&"properties"===key}Controller.prototype.traverse=function traverse(root,visitor){var worklist,leavelist,element,node,nodeType,ret,key,current,current2,candidates,candidate,sentinel;this.__initialize(root,visitor);sentinel={};worklist=this.__worklist;leavelist=this.__leavelist;worklist.push(new Element(root,null,null,null));leavelist.push(new Element(null,null,null,null));while(worklist.length){element=worklist.pop();if(element===sentinel){element=leavelist.pop();ret=this.__execute(visitor.leave,element);if(this.__state===BREAK||ret===BREAK){return}continue}if(element.node){ret=this.__execute(visitor.enter,element);if(this.__state===BREAK||ret===BREAK){return}worklist.push(sentinel);leavelist.push(element);if(this.__state===SKIP||ret===SKIP){continue}node=element.node;nodeType=element.wrap||node.type;candidates=this.__keys[nodeType];if(!candidates){if(this.__fallback){candidates=objectKeys(node)}else{throw new Error("Unknown node type "+nodeType+".")}}current=candidates.length;while((current-=1)>=0){key=candidates[current];candidate=node[key];if(!candidate){continue}if(isArray(candidate)){current2=candidate.length;while((current2-=1)>=0){if(!candidate[current2]){continue}if(isProperty(nodeType,candidates[current])){element=new Element(candidate[current2],[key,current2],"Property",null)}else if(isNode(candidate[current2])){element=new Element(candidate[current2],[key,current2],null,null)}else{continue}worklist.push(element)}}else if(isNode(candidate)){worklist.push(new Element(candidate,key,null,null))}}}}};Controller.prototype.replace=function replace(root,visitor){function removeElem(element){var i,key,nextElem,parent;if(element.ref.remove()){key=element.ref.key;parent=element.ref.parent;i=worklist.length;while(i--){nextElem=worklist[i];if(nextElem.ref&&nextElem.ref.parent===parent){if(nextElem.ref.key<key){break}--nextElem.ref.key}}}}var worklist,leavelist,node,nodeType,target,element,current,current2,candidates,candidate,sentinel,outer,key;this.__initialize(root,visitor);sentinel={};worklist=this.__worklist;leavelist=this.__leavelist;outer={root:root};element=new Element(root,null,null,new Reference(outer,"root"));worklist.push(element);leavelist.push(element);while(worklist.length){element=worklist.pop();if(element===sentinel){element=leavelist.pop();target=this.__execute(visitor.leave,element);if(target!==undefined&&target!==BREAK&&target!==SKIP&&target!==REMOVE){element.ref.replace(target)}if(this.__state===REMOVE||target===REMOVE){removeElem(element)}if(this.__state===BREAK||target===BREAK){return outer.root}continue}target=this.__execute(visitor.enter,element);if(target!==undefined&&target!==BREAK&&target!==SKIP&&target!==REMOVE){element.ref.replace(target);element.node=target}if(this.__state===REMOVE||target===REMOVE){removeElem(element);element.node=null}if(this.__state===BREAK||target===BREAK){return outer.root}node=element.node;if(!node){continue}worklist.push(sentinel);leavelist.push(element);if(this.__state===SKIP||target===SKIP){continue}nodeType=element.wrap||node.type;candidates=this.__keys[nodeType];if(!candidates){if(this.__fallback){candidates=objectKeys(node)}else{throw new Error("Unknown node type "+nodeType+".")}}current=candidates.length;while((current-=1)>=0){key=candidates[current];candidate=node[key];if(!candidate){continue}if(isArray(candidate)){current2=candidate.length;while((current2-=1)>=0){if(!candidate[current2]){continue}if(isProperty(nodeType,candidates[current])){element=new Element(candidate[current2],[key,current2],"Property",new Reference(candidate,current2))}else if(isNode(candidate[current2])){element=new Element(candidate[current2],[key,current2],null,new Reference(candidate,current2))}else{continue}worklist.push(element)}}else if(isNode(candidate)){worklist.push(new Element(candidate,key,null,new Reference(node,key)))}}}return outer.root};function traverse(root,visitor){var controller=new Controller;return controller.traverse(root,visitor)}function replace(root,visitor){var controller=new Controller;return controller.replace(root,visitor)}function extendCommentRange(comment,tokens){var target;target=upperBound(tokens,function search(token){return token.range[0]>comment.range[0]});comment.extendedRange=[comment.range[0],comment.range[1]];if(target!==tokens.length){comment.extendedRange[1]=tokens[target].range[0]}target-=1;if(target>=0){comment.extendedRange[0]=tokens[target].range[1]}return comment}function attachComments(tree,providedComments,tokens){var comments=[],comment,len,i,cursor;if(!tree.range){throw new Error("attachComments needs range information")}if(!tokens.length){if(providedComments.length){for(i=0,len=providedComments.length;i<len;i+=1){comment=deepCopy(providedComments[i]);comment.extendedRange=[0,tree.range[0]];comments.push(comment)}tree.leadingComments=comments}return tree}for(i=0,len=providedComments.length;i<len;i+=1){comments.push(extendCommentRange(deepCopy(providedComments[i]),tokens))}cursor=0;traverse(tree,{enter:function(node){var comment;while(cursor<comments.length){comment=comments[cursor];if(comment.extendedRange[1]>node.range[0]){break}if(comment.extendedRange[1]===node.range[0]){if(!node.leadingComments){node.leadingComments=[]}node.leadingComments.push(comment);comments.splice(cursor,1)}else{cursor+=1}}if(cursor===comments.length){return VisitorOption.Break}if(comments[cursor].extendedRange[0]>node.range[1]){return VisitorOption.Skip}}});cursor=0;traverse(tree,{leave:function(node){var comment;while(cursor<comments.length){comment=comments[cursor];if(node.range[1]<comment.extendedRange[0]){break}if(node.range[1]===comment.extendedRange[0]){if(!node.trailingComments){node.trailingComments=[]}node.trailingComments.push(comment);comments.splice(cursor,1)}else{cursor+=1}}if(cursor===comments.length){return VisitorOption.Break}if(comments[cursor].extendedRange[0]>node.range[1]){return VisitorOption.Skip}}});return tree}exports.version="1.8.1-dev";exports.Syntax=Syntax;exports.traverse=traverse;exports.replace=replace;exports.attachComments=attachComments;exports.VisitorKeys=VisitorKeys;exports.VisitorOption=VisitorOption;exports.Controller=Controller;exports.cloneEnvironment=function(){return clone({})};return exports})},{}],169:[function(require,module,exports){(function(){"use strict";function isExpression(node){if(node==null){return false}switch(node.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return true}return false}function isIterationStatement(node){if(node==null){return false}switch(node.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return true}return false}function isStatement(node){if(node==null){return false}switch(node.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return true}return false}function isSourceElement(node){return isStatement(node)||node!=null&&node.type==="FunctionDeclaration"}function trailingStatement(node){switch(node.type){case"IfStatement":if(node.alternate!=null){return node.alternate}return node.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return node.body}return null}function isProblematicIfStatement(node){var current;if(node.type!=="IfStatement"){return false}if(node.alternate==null){return false}current=node.consequent;do{if(current.type==="IfStatement"){if(current.alternate==null){return true}}current=trailingStatement(current)}while(current);return false}module.exports={isExpression:isExpression,isStatement:isStatement,isIterationStatement:isIterationStatement,isSourceElement:isSourceElement,isProblematicIfStatement:isProblematicIfStatement,trailingStatement:trailingStatement}})()},{}],170:[function(require,module,exports){(function(){"use strict";var Regex,NON_ASCII_WHITESPACES;Regex={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")};function isDecimalDigit(ch){return ch>=48&&ch<=57}function isHexDigit(ch){return isDecimalDigit(ch)||97<=ch&&ch<=102||65<=ch&&ch<=70}function isOctalDigit(ch){return ch>=48&&ch<=55}NON_ASCII_WHITESPACES=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function isWhiteSpace(ch){return ch===32||ch===9||ch===11||ch===12||ch===160||ch>=5760&&NON_ASCII_WHITESPACES.indexOf(ch)>=0}function isLineTerminator(ch){return ch===10||ch===13||ch===8232||ch===8233}function isIdentifierStart(ch){return ch>=97&&ch<=122||ch>=65&&ch<=90||ch===36||ch===95||ch===92||ch>=128&&Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch))}function isIdentifierPart(ch){return ch>=97&&ch<=122||ch>=65&&ch<=90||ch>=48&&ch<=57||ch===36||ch===95||ch===92||ch>=128&&Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch))}module.exports={isDecimalDigit:isDecimalDigit,isHexDigit:isHexDigit,isOctalDigit:isOctalDigit,isWhiteSpace:isWhiteSpace,isLineTerminator:isLineTerminator,isIdentifierStart:isIdentifierStart,isIdentifierPart:isIdentifierPart}})()},{}],171:[function(require,module,exports){(function(){"use strict";var code=require("./code");function isStrictModeReservedWordES6(id){switch(id){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return true;default:return false}}function isKeywordES5(id,strict){if(!strict&&id==="yield"){return false}return isKeywordES6(id,strict)}function isKeywordES6(id,strict){if(strict&&isStrictModeReservedWordES6(id)){return true}switch(id.length){case 2:return id==="if"||id==="in"||id==="do";case 3:return id==="var"||id==="for"||id==="new"||id==="try";case 4:return id==="this"||id==="else"||id==="case"||id==="void"||id==="with"||id==="enum";case 5:return id==="while"||id==="break"||id==="catch"||id==="throw"||id==="const"||id==="yield"||id==="class"||id==="super";case 6:return id==="return"||id==="typeof"||id==="delete"||id==="switch"||id==="export"||id==="import";case 7:return id==="default"||id==="finally"||id==="extends";case 8:return id==="function"||id==="continue"||id==="debugger";case 10:return id==="instanceof";default:return false}}function isReservedWordES5(id,strict){return id==="null"||id==="true"||id==="false"||isKeywordES5(id,strict)}function isReservedWordES6(id,strict){return id==="null"||id==="true"||id==="false"||isKeywordES6(id,strict)}function isRestrictedWord(id){return id==="eval"||id==="arguments"}function isIdentifierName(id){var i,iz,ch;if(id.length===0){return false}ch=id.charCodeAt(0);if(!code.isIdentifierStart(ch)||ch===92){return false}for(i=1,iz=id.length;i<iz;++i){ch=id.charCodeAt(i);if(!code.isIdentifierPart(ch)||ch===92){return false}}return true}function isIdentifierES5(id,strict){return isIdentifierName(id)&&!isReservedWordES5(id,strict)}function isIdentifierES6(id,strict){return isIdentifierName(id)&&!isReservedWordES6(id,strict)}module.exports={isKeywordES5:isKeywordES5,isKeywordES6:isKeywordES6,isReservedWordES5:isReservedWordES5,isReservedWordES6:isReservedWordES6,isRestrictedWord:isRestrictedWord,isIdentifierName:isIdentifierName,isIdentifierES5:isIdentifierES5,isIdentifierES6:isIdentifierES6}})()},{"./code":170}],172:[function(require,module,exports){(function(){"use strict";exports.ast=require("./ast");exports.code=require("./code");exports.keyword=require("./keyword")})()},{"./ast":169,"./code":170,"./keyword":171}],173:[function(require,module,exports){module.exports={builtin:{Array:false,ArrayBuffer:false,Boolean:false,constructor:false,Date:false,decodeURI:false,decodeURIComponent:false,encodeURI:false,encodeURIComponent:false,Error:false,eval:false,EvalError:false,Float32Array:false,Float64Array:false,Function:false,hasOwnProperty:false,Infinity:false,Int16Array:false,Int32Array:false,Int8Array:false,isFinite:false,isNaN:false,isPrototypeOf:false,JSON:false,Map:false,Math:false,NaN:false,Number:false,Object:false,parseFloat:false,parseInt:false,Promise:false,propertyIsEnumerable:false,Proxy:false,RangeError:false,ReferenceError:false,Reflect:false,RegExp:false,Set:false,String:false,Symbol:false,SyntaxError:false,System:false,toLocaleString:false,toString:false,TypeError:false,Uint16Array:false,Uint32Array:false,Uint8Array:false,Uint8ClampedArray:false,undefined:false,URIError:false,valueOf:false,WeakMap:false,WeakSet:false},nonstandard:{escape:false,unescape:false},browser:{addEventListener:false,alert:false,applicationCache:false,atob:false,Audio:false,Blob:false,blur:false,btoa:false,cancelAnimationFrame:false,CanvasGradient:false,CanvasPattern:false,CanvasRenderingContext2D:false,clearInterval:false,clearTimeout:false,close:false,closed:false,confirm:false,console:false,crypto:false,CSS:false,CustomEvent:false,DataView:false,Debug:false,defaultStatus:false,devicePixelRatio:false,dispatchEvent:false,document:false,DOMParser:false,Element:false,ElementTimeControl:false,Event:false,event:false,FileReader:false,find:false,focus:false,FormData:false,frameElement:false,frames:false,getComputedStyle:false,getSelection:false,history:false,HTMLAnchorElement:false,HTMLBaseElement:false,HTMLBlockquoteElement:false,HTMLBodyElement:false,HTMLBRElement:false,HTMLButtonElement:false,HTMLCanvasElement:false,HTMLDirectoryElement:false,HTMLDivElement:false,HTMLDListElement:false,HTMLElement:false,HTMLFieldSetElement:false,HTMLFontElement:false,HTMLFormElement:false,HTMLFrameElement:false,HTMLFrameSetElement:false,HTMLHeadElement:false,HTMLHeadingElement:false,HTMLHRElement:false,HTMLHtmlElement:false,HTMLIFrameElement:false,HTMLImageElement:false,HTMLInputElement:false,HTMLIsIndexElement:false,HTMLLabelElement:false,HTMLLayerElement:false,HTMLLegendElement:false,HTMLLIElement:false,HTMLLinkElement:false,HTMLMapElement:false,HTMLMenuElement:false,HTMLMetaElement:false,HTMLModElement:false,HTMLObjectElement:false,HTMLOListElement:false,HTMLOptGroupElement:false,HTMLOptionElement:false,HTMLParagraphElement:false,HTMLParamElement:false,HTMLPreElement:false,HTMLQuoteElement:false,HTMLScriptElement:false,HTMLSelectElement:false,HTMLStyleElement:false,HTMLTableCaptionElement:false,HTMLTableCellElement:false,HTMLTableColElement:false,HTMLTableElement:false,HTMLTableRowElement:false,HTMLTableSectionElement:false,HTMLTextAreaElement:false,HTMLTitleElement:false,HTMLUListElement:false,HTMLVideoElement:false,IDBCursor:false,IDBCursorWithValue:false,IDBDatabase:false,IDBEnvironment:false,IDBFactory:false,IDBIndex:false,IDBKeyRange:false,IDBObjectStore:false,IDBOpenDBRequest:false,IDBRequest:false,IDBTransaction:false,Image:false,indexedDB:false,innerHeight:false,innerWidth:false,Intl:false,length:false,localStorage:false,location:false,matchMedia:false,MessageChannel:false,MessageEvent:false,MessagePort:false,MouseEvent:false,moveBy:false,moveTo:false,MutationObserver:false,name:false,navigator:false,Node:false,NodeFilter:false,NodeList:false,onbeforeunload:true,onblur:true,onerror:true,onfocus:true,onload:true,onresize:true,onunload:true,open:false,openDatabase:false,opener:false,opera:false,Option:false,outerHeight:false,outerWidth:false,pageXOffset:false,pageYOffset:false,parent:false,postMessage:false,print:false,prompt:false,removeEventListener:false,requestAnimationFrame:false,resizeBy:false,resizeTo:false,screen:false,screenX:false,screenY:false,scroll:false,scrollbars:false,scrollBy:false,scrollTo:false,scrollX:false,scrollY:false,self:false,sessionStorage:false,setInterval:false,setTimeout:false,SharedWorker:false,showModalDialog:false,status:false,stop:false,SVGAElement:false,SVGAltGlyphDefElement:false,SVGAltGlyphElement:false,SVGAltGlyphItemElement:false,SVGAngle:false,SVGAnimateColorElement:false,SVGAnimatedAngle:false,SVGAnimatedBoolean:false,SVGAnimatedEnumeration:false,SVGAnimatedInteger:false,SVGAnimatedLength:false,SVGAnimatedLengthList:false,SVGAnimatedNumber:false,SVGAnimatedNumberList:false,SVGAnimatedPathData:false,SVGAnimatedPoints:false,SVGAnimatedPreserveAspectRatio:false,SVGAnimatedRect:false,SVGAnimatedString:false,SVGAnimatedTransformList:false,SVGAnimateElement:false,SVGAnimateMotionElement:false,SVGAnimateTransformElement:false,SVGAnimationElement:false,SVGCircleElement:false,SVGClipPathElement:false,SVGColor:false,SVGColorProfileElement:false,SVGColorProfileRule:false,SVGComponentTransferFunctionElement:false,SVGCSSRule:false,SVGCursorElement:false,SVGDefsElement:false,SVGDescElement:false,SVGDocument:false,SVGElement:false,SVGElementInstance:false,SVGElementInstanceList:false,SVGEllipseElement:false,SVGExternalResourcesRequired:false,SVGFEBlendElement:false,SVGFEColorMatrixElement:false,SVGFEComponentTransferElement:false,SVGFECompositeElement:false,SVGFEConvolveMatrixElement:false,SVGFEDiffuseLightingElement:false,SVGFEDisplacementMapElement:false,SVGFEDistantLightElement:false,SVGFEFloodElement:false,SVGFEFuncAElement:false,SVGFEFuncBElement:false,SVGFEFuncGElement:false,SVGFEFuncRElement:false,SVGFEGaussianBlurElement:false,SVGFEImageElement:false,SVGFEMergeElement:false,SVGFEMergeNodeElement:false,SVGFEMorphologyElement:false,SVGFEOffsetElement:false,SVGFEPointLightElement:false,SVGFESpecularLightingElement:false,SVGFESpotLightElement:false,SVGFETileElement:false,SVGFETurbulenceElement:false,SVGFilterElement:false,SVGFilterPrimitiveStandardAttributes:false,SVGFitToViewBox:false,SVGFontElement:false,SVGFontFaceElement:false,SVGFontFaceFormatElement:false,SVGFontFaceNameElement:false,SVGFontFaceSrcElement:false,SVGFontFaceUriElement:false,SVGForeignObjectElement:false,SVGGElement:false,SVGGlyphElement:false,SVGGlyphRefElement:false,SVGGradientElement:false,SVGHKernElement:false,SVGICCColor:false,SVGImageElement:false,SVGLangSpace:false,SVGLength:false,SVGLengthList:false,SVGLinearGradientElement:false,SVGLineElement:false,SVGLocatable:false,SVGMarkerElement:false,SVGMaskElement:false,SVGMatrix:false,SVGMetadataElement:false,SVGMissingGlyphElement:false,SVGMPathElement:false,SVGNumber:false,SVGNumberList:false,SVGPaint:false,SVGPathElement:false,SVGPathSeg:false,SVGPathSegArcAbs:false,SVGPathSegArcRel:false,SVGPathSegClosePath:false,SVGPathSegCurvetoCubicAbs:false,SVGPathSegCurvetoCubicRel:false,SVGPathSegCurvetoCubicSmoothAbs:false,SVGPathSegCurvetoCubicSmoothRel:false,SVGPathSegCurvetoQuadraticAbs:false,SVGPathSegCurvetoQuadraticRel:false,SVGPathSegCurvetoQuadraticSmoothAbs:false,SVGPathSegCurvetoQuadraticSmoothRel:false,SVGPathSegLinetoAbs:false,SVGPathSegLinetoHorizontalAbs:false,SVGPathSegLinetoHorizontalRel:false,SVGPathSegLinetoRel:false,SVGPathSegLinetoVerticalAbs:false,SVGPathSegLinetoVerticalRel:false,SVGPathSegList:false,SVGPathSegMovetoAbs:false,SVGPathSegMovetoRel:false,SVGPatternElement:false,SVGPoint:false,SVGPointList:false,SVGPolygonElement:false,SVGPolylineElement:false,SVGPreserveAspectRatio:false,SVGRadialGradientElement:false,SVGRect:false,SVGRectElement:false,SVGRenderingIntent:false,SVGScriptElement:false,SVGSetElement:false,SVGStopElement:false,SVGStringList:false,SVGStylable:false,SVGStyleElement:false,SVGSVGElement:false,SVGSwitchElement:false,SVGSymbolElement:false,SVGTests:false,SVGTextContentElement:false,SVGTextElement:false,SVGTextPathElement:false,SVGTextPositioningElement:false,SVGTitleElement:false,SVGTransform:false,SVGTransformable:false,SVGTransformList:false,SVGTRefElement:false,SVGTSpanElement:false,SVGUnitTypes:false,SVGURIReference:false,SVGUseElement:false,SVGViewElement:false,SVGViewSpec:false,SVGVKernElement:false,SVGZoomAndPan:false,TextDecoder:false,TextEncoder:false,TimeEvent:false,top:false,URL:false,WebGLActiveInfo:false,WebGLBuffer:false,WebGLContextEvent:false,WebGLFramebuffer:false,WebGLProgram:false,WebGLRenderbuffer:false,WebGLRenderingContext:false,WebGLShader:false,WebGLShaderPrecisionFormat:false,WebGLTexture:false,WebGLUniformLocation:false,WebSocket:false,window:false,Worker:false,XDomainRequest:false,XMLHttpRequest:false,XMLSerializer:false,XPathEvaluator:false,XPathException:false,XPathExpression:false,XPathNamespace:false,XPathNSResolver:false,XPathResult:false},worker:{importScripts:true,postMessage:true,self:true},node:{__filename:false,__dirname:false,arguments:false,Buffer:false,DataView:false,console:false,exports:true,GLOBAL:false,global:false,module:false,process:false,require:false,setTimeout:false,clearTimeout:false,setInterval:false,clearInterval:false,setImmediate:false,clearImmediate:false},amd:{require:false,define:false},mocha:{describe:false,it:false,before:false,after:false,beforeEach:false,afterEach:false,suite:false,test:false,setup:false,teardown:false,suiteSetup:false,suiteTeardown:false},jasmine:{afterAll:false,afterEach:false,beforeAll:false,beforeEach:false,describe:false,expect:false,fail:false,fdescribe:false,fit:false,it:false,jasmine:false,pending:false,spyOn:false,waits:false,waitsFor:false,xdescribe:false,xit:false},qunit:{asyncTest:false,deepEqual:false,equal:false,expect:false,module:false,notDeepEqual:false,notEqual:false,notPropEqual:false,notStrictEqual:false,ok:false,propEqual:false,QUnit:false,raises:false,start:false,stop:false,strictEqual:false,test:false,"throws":false},phantom:{phantom:true,require:true,WebPage:true,console:true,exports:true},couch:{require:false,respond:false,getRow:false,emit:false,send:false,start:false,sum:false,log:false,exports:false,module:false,provides:false},rhino:{defineClass:false,deserialize:false,gc:false,help:false,importPackage:false,java:false,load:false,loadClass:false,print:false,quit:false,readFile:false,readUrl:false,runCommand:false,seal:false,serialize:false,spawn:false,sync:false,toint32:false,version:false},wsh:{ActiveXObject:true,Enumerator:true,GetObject:true,ScriptEngine:true,ScriptEngineBuildVersion:true,ScriptEngineMajorVersion:true,ScriptEngineMinorVersion:true,VBArray:true,WSH:true,WScript:true,XDomainRequest:true},jquery:{$:false,jQuery:false},yui:{YUI:false,Y:false,YUI_config:false},shelljs:{target:false,echo:false,exit:false,cd:false,pwd:false,ls:false,find:false,cp:false,rm:false,mv:false,mkdir:false,test:false,cat:false,sed:false,grep:false,which:false,dirs:false,pushd:false,popd:false,env:false,exec:false,chmod:false,config:false,error:false,tempdir:false},prototypejs:{$:false,$$:false,$A:false,$F:false,$H:false,$R:false,$break:false,$continue:false,$w:false,Abstract:false,Ajax:false,Class:false,Enumerable:false,Element:false,Event:false,Field:false,Form:false,Hash:false,Insertion:false,ObjectRange:false,PeriodicalExecuter:false,Position:false,Prototype:false,Selector:false,Template:false,Toggle:false,Try:false,Autocompleter:false,Builder:false,Control:false,Draggable:false,Draggables:false,Droppables:false,Effect:false,Sortable:false,SortableObserver:false,Sound:false,Scriptaculous:false}}},{}],174:[function(require,module,exports){module.exports=require("./globals.json")},{"./globals.json":173}],175:[function(require,module,exports){function combine(){return new RegExp("("+[].slice.call(arguments).map(function(e){var e=e.toString();return"(?:"+e.substring(1,e.length-1)+")"}).join("|")+")")}function makeTester(rx){var s=rx.toString();return new RegExp("^"+s.substring(1,s.length-1)+"$")}var pattern={string1:/"(?:(?:\\\n|\\"|[^"\n]))*?"/,string2:/'(?:(?:\\\n|\\'|[^'\n]))*?'/,comment1:/\/\*[\s\S]*?\*\//,comment2:/\/\/.*?\n/,whitespace:/\s+/,keyword:/\b(?:var|let|for|if|else|in|class|function|return|with|case|break|switch|export|new|while|do|throw|catch)\b/,regexp:/\/(?:(?:\\\/|[^\n\/]))*?\//,name:/[a-zA-Z_\$][a-zA-Z_\$0-9]*/,number:/\d+(?:\.\d+)?(?:e[+-]?\d+)?/,parens:/[\(\)]/,curly:/[{}]/,square:/[\[\]]/,punct:/[;.:\?\^%<>=!&|+\-,~]/};var match=combine(pattern.string1,pattern.string2,pattern.comment1,pattern.comment2,pattern.regexp,pattern.whitespace,pattern.name,pattern.number,pattern.parens,pattern.curly,pattern.square,pattern.punct);var tester={};for(var k in pattern){tester[k]=makeTester(pattern[k])}module.exports=function(str,doNotThrow){return str.split(match).filter(function(e,i){if(i%2)return true;if(e!==""){if(!doNotThrow)throw new Error("invalid token:"+JSON.stringify(e));return true}})};module.exports.type=function(e){for(var type in pattern)if(tester[type].test(e))return type;return"invalid"}},{}],176:[function(require,module,exports){function compact(array){var index=-1,length=array?array.length:0,resIndex=-1,result=[];while(++index<length){var value=array[index];if(value){result[++resIndex]=value}}return result}module.exports=compact},{}],177:[function(require,module,exports){var baseFlatten=require("../internal/baseFlatten"),isIterateeCall=require("../internal/isIterateeCall");function flatten(array,isDeep,guard){var length=array?array.length:0;if(guard&&isIterateeCall(array,isDeep,guard)){isDeep=false}return length?baseFlatten(array,isDeep):[]}module.exports=flatten},{"../internal/baseFlatten":201,"../internal/isIterateeCall":237}],178:[function(require,module,exports){function last(array){var length=array?array.length:0;return length?array[length-1]:undefined}module.exports=last},{}],179:[function(require,module,exports){var baseIndexOf=require("../internal/baseIndexOf");var arrayProto=Array.prototype;var splice=arrayProto.splice;function pull(){var array=arguments[0];if(!(array&&array.length)){return array}var index=0,indexOf=baseIndexOf,length=arguments.length;while(++index<length){var fromIndex=0,value=arguments[index];while((fromIndex=indexOf(array,value,fromIndex))>-1){splice.call(array,fromIndex,1)}}return array}module.exports=pull},{"../internal/baseIndexOf":205}],180:[function(require,module,exports){var baseCallback=require("../internal/baseCallback"),baseUniq=require("../internal/baseUniq"),isIterateeCall=require("../internal/isIterateeCall"),sortedUniq=require("../internal/sortedUniq");function uniq(array,isSorted,iteratee,thisArg){var length=array?array.length:0;if(!length){return[]}if(typeof isSorted!="boolean"&&isSorted!=null){thisArg=iteratee;iteratee=isIterateeCall(array,isSorted,thisArg)?null:isSorted;isSorted=false}iteratee=iteratee==null?iteratee:baseCallback(iteratee,thisArg,3);return isSorted?sortedUniq(array,iteratee):baseUniq(array,iteratee)}module.exports=uniq},{"../internal/baseCallback":196,"../internal/baseUniq":218,"../internal/isIterateeCall":237,"../internal/sortedUniq":244}],181:[function(require,module,exports){module.exports=require("./includes")},{"./includes":185}],182:[function(require,module,exports){module.exports=require("./forEach")},{"./forEach":183}],183:[function(require,module,exports){var arrayEach=require("../internal/arrayEach"),baseEach=require("../internal/baseEach"),bindCallback=require("../internal/bindCallback"),isArray=require("../lang/isArray");function forEach(collection,iteratee,thisArg){return typeof iteratee=="function"&&typeof thisArg=="undefined"&&isArray(collection)?arrayEach(collection,iteratee):baseEach(collection,bindCallback(iteratee,thisArg,3))}module.exports=forEach},{"../internal/arrayEach":191,"../internal/baseEach":200,"../internal/bindCallback":220,"../lang/isArray":249}],184:[function(require,module,exports){var createAggregator=require("../internal/createAggregator");var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var groupBy=createAggregator(function(result,value,key){if(hasOwnProperty.call(result,key)){result[key].push(value) }else{result[key]=[value]}});module.exports=groupBy},{"../internal/createAggregator":225}],185:[function(require,module,exports){var baseIndexOf=require("../internal/baseIndexOf"),isArray=require("../lang/isArray"),isLength=require("../internal/isLength"),isString=require("../lang/isString"),values=require("../object/values");var nativeMax=Math.max;function includes(collection,target,fromIndex){var length=collection?collection.length:0;if(!isLength(length)){collection=values(collection);length=collection.length}if(!length){return false}if(typeof fromIndex=="number"){fromIndex=fromIndex<0?nativeMax(length+fromIndex,0):fromIndex||0}else{fromIndex=0}return typeof collection=="string"||!isArray(collection)&&isString(collection)?fromIndex<length&&collection.indexOf(target,fromIndex)>-1:baseIndexOf(collection,target,fromIndex)>-1}module.exports=includes},{"../internal/baseIndexOf":205,"../internal/isLength":238,"../lang/isArray":249,"../lang/isString":258,"../object/values":268}],186:[function(require,module,exports){var arrayMap=require("../internal/arrayMap"),baseCallback=require("../internal/baseCallback"),baseMap=require("../internal/baseMap"),isArray=require("../lang/isArray");function map(collection,iteratee,thisArg){var func=isArray(collection)?arrayMap:baseMap;iteratee=baseCallback(iteratee,thisArg,3);return func(collection,iteratee)}module.exports=map},{"../internal/arrayMap":192,"../internal/baseCallback":196,"../internal/baseMap":209,"../lang/isArray":249}],187:[function(require,module,exports){var arraySome=require("../internal/arraySome"),baseCallback=require("../internal/baseCallback"),baseSome=require("../internal/baseSome"),isArray=require("../lang/isArray");function some(collection,predicate,thisArg){var func=isArray(collection)?arraySome:baseSome;if(typeof predicate!="function"||typeof thisArg!="undefined"){predicate=baseCallback(predicate,thisArg,3)}return func(collection,predicate)}module.exports=some},{"../internal/arraySome":193,"../internal/baseCallback":196,"../internal/baseSome":215,"../lang/isArray":249}],188:[function(require,module,exports){var baseCallback=require("../internal/baseCallback"),baseEach=require("../internal/baseEach"),baseSortBy=require("../internal/baseSortBy"),compareAscending=require("../internal/compareAscending"),isIterateeCall=require("../internal/isIterateeCall"),isLength=require("../internal/isLength");function sortBy(collection,iteratee,thisArg){var index=-1,length=collection?collection.length:0,result=isLength(length)?Array(length):[];if(thisArg&&isIterateeCall(collection,iteratee,thisArg)){iteratee=null}iteratee=baseCallback(iteratee,thisArg,3);baseEach(collection,function(value,key,collection){result[++index]={criteria:iteratee(value,key,collection),index:index,value:value}});return baseSortBy(result,compareAscending)}module.exports=sortBy},{"../internal/baseCallback":196,"../internal/baseEach":200,"../internal/baseSortBy":216,"../internal/compareAscending":224,"../internal/isIterateeCall":237,"../internal/isLength":238}],189:[function(require,module,exports){(function(global){var cachePush=require("./cachePush"),isNative=require("../lang/isNative");var Set=isNative(Set=global.Set)&&Set;var nativeCreate=isNative(nativeCreate=Object.create)&&nativeCreate;function SetCache(values){var length=values?values.length:0;this.data={hash:nativeCreate(null),set:new Set};while(length--){this.push(values[length])}}SetCache.prototype.push=cachePush;module.exports=SetCache}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../lang/isNative":253,"./cachePush":223}],190:[function(require,module,exports){function arrayCopy(source,array){var index=-1,length=source.length;array||(array=Array(length));while(++index<length){array[index]=source[index]}return array}module.exports=arrayCopy},{}],191:[function(require,module,exports){function arrayEach(array,iteratee){var index=-1,length=array.length;while(++index<length){if(iteratee(array[index],index,array)===false){break}}return array}module.exports=arrayEach},{}],192:[function(require,module,exports){function arrayMap(array,iteratee){var index=-1,length=array.length,result=Array(length);while(++index<length){result[index]=iteratee(array[index],index,array)}return result}module.exports=arrayMap},{}],193:[function(require,module,exports){function arraySome(array,predicate){var index=-1,length=array.length;while(++index<length){if(predicate(array[index],index,array)){return true}}return false}module.exports=arraySome},{}],194:[function(require,module,exports){function assignDefaults(objectValue,sourceValue){return typeof objectValue=="undefined"?sourceValue:objectValue}module.exports=assignDefaults},{}],195:[function(require,module,exports){var baseCopy=require("./baseCopy"),keys=require("../object/keys");function baseAssign(object,source,customizer){var props=keys(source);if(!customizer){return baseCopy(source,object,props)}var index=-1,length=props.length;while(++index<length){var key=props[index],value=object[key],result=customizer(value,source[key],key,object,source);if((result===result?result!==value:value===value)||typeof value=="undefined"&&!(key in object)){object[key]=result}}return object}module.exports=baseAssign},{"../object/keys":265,"./baseCopy":199}],196:[function(require,module,exports){var baseMatches=require("./baseMatches"),baseProperty=require("./baseProperty"),baseToString=require("./baseToString"),bindCallback=require("./bindCallback"),identity=require("../utility/identity"),isBindable=require("./isBindable");function baseCallback(func,thisArg,argCount){var type=typeof func;if(type=="function"){return typeof thisArg!="undefined"&&isBindable(func)?bindCallback(func,thisArg,argCount):func}if(func==null){return identity}return type=="object"?baseMatches(func,!argCount):baseProperty(argCount?baseToString(func):func)}module.exports=baseCallback},{"../utility/identity":272,"./baseMatches":210,"./baseProperty":213,"./baseToString":217,"./bindCallback":220,"./isBindable":235}],197:[function(require,module,exports){var arrayCopy=require("./arrayCopy"),arrayEach=require("./arrayEach"),baseCopy=require("./baseCopy"),baseForOwn=require("./baseForOwn"),initCloneArray=require("./initCloneArray"),initCloneByTag=require("./initCloneByTag"),initCloneObject=require("./initCloneObject"),isArray=require("../lang/isArray"),isObject=require("../lang/isObject"),keys=require("../object/keys");var argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]";var arrayBufferTag="[object ArrayBuffer]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]";var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[stringTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=true;cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[mapTag]=cloneableTags[setTag]=cloneableTags[weakMapTag]=false;var objectProto=Object.prototype;var objToString=objectProto.toString;function baseClone(value,isDeep,customizer,key,object,stackA,stackB){var result;if(customizer){result=object?customizer(value,key,object):customizer(value)}if(typeof result!="undefined"){return result}if(!isObject(value)){return value}var isArr=isArray(value);if(isArr){result=initCloneArray(value);if(!isDeep){return arrayCopy(value,result)}}else{var tag=objToString.call(value),isFunc=tag==funcTag;if(tag==objectTag||tag==argsTag||isFunc&&!object){result=initCloneObject(isFunc?{}:value);if(!isDeep){return baseCopy(value,result,keys(value))}}else{return cloneableTags[tag]?initCloneByTag(value,tag,isDeep):object?value:{}}}stackA||(stackA=[]);stackB||(stackB=[]);var length=stackA.length;while(length--){if(stackA[length]==value){return stackB[length]}}stackA.push(value);stackB.push(result);(isArr?arrayEach:baseForOwn)(value,function(subValue,key){result[key]=baseClone(subValue,isDeep,customizer,key,value,stackA,stackB)});return result}module.exports=baseClone},{"../lang/isArray":249,"../lang/isObject":255,"../object/keys":265,"./arrayCopy":190,"./arrayEach":191,"./baseCopy":199,"./baseForOwn":204,"./initCloneArray":232,"./initCloneByTag":233,"./initCloneObject":234}],198:[function(require,module,exports){function baseCompareAscending(value,other){if(value!==other){var valIsReflexive=value===value,othIsReflexive=other===other;if(value>other||!valIsReflexive||typeof value=="undefined"&&othIsReflexive){return 1}if(value<other||!othIsReflexive||typeof other=="undefined"&&valIsReflexive){return-1}}return 0}module.exports=baseCompareAscending},{}],199:[function(require,module,exports){function baseCopy(source,object,props){if(!props){props=object;object={}}var index=-1,length=props.length;while(++index<length){var key=props[index];object[key]=source[key]}return object}module.exports=baseCopy},{}],200:[function(require,module,exports){var baseForOwn=require("./baseForOwn"),isLength=require("./isLength"),toObject=require("./toObject");function baseEach(collection,iteratee){var length=collection?collection.length:0;if(!isLength(length)){return baseForOwn(collection,iteratee)}var index=-1,iterable=toObject(collection);while(++index<length){if(iteratee(iterable[index],index,iterable)===false){break}}return collection}module.exports=baseEach},{"./baseForOwn":204,"./isLength":238,"./toObject":245}],201:[function(require,module,exports){var isArguments=require("../lang/isArguments"),isArray=require("../lang/isArray"),isLength=require("./isLength"),isObjectLike=require("./isObjectLike");function baseFlatten(array,isDeep,isStrict,fromIndex){var index=(fromIndex||0)-1,length=array.length,resIndex=-1,result=[];while(++index<length){var value=array[index];if(isObjectLike(value)&&isLength(value.length)&&(isArray(value)||isArguments(value))){if(isDeep){value=baseFlatten(value,isDeep,isStrict)}var valIndex=-1,valLength=value.length;result.length+=valLength;while(++valIndex<valLength){result[++resIndex]=value[valIndex]}}else if(!isStrict){result[++resIndex]=value}}return result}module.exports=baseFlatten},{"../lang/isArguments":248,"../lang/isArray":249,"./isLength":238,"./isObjectLike":239}],202:[function(require,module,exports){var toObject=require("./toObject");function baseFor(object,iteratee,keysFunc){var index=-1,iterable=toObject(object),props=keysFunc(object),length=props.length;while(++index<length){var key=props[index];if(iteratee(iterable[key],key,iterable)===false){break}}return object}module.exports=baseFor},{"./toObject":245}],203:[function(require,module,exports){var baseFor=require("./baseFor"),keysIn=require("../object/keysIn");function baseForIn(object,iteratee){return baseFor(object,iteratee,keysIn)}module.exports=baseForIn},{"../object/keysIn":266,"./baseFor":202}],204:[function(require,module,exports){var baseFor=require("./baseFor"),keys=require("../object/keys");function baseForOwn(object,iteratee){return baseFor(object,iteratee,keys)}module.exports=baseForOwn},{"../object/keys":265,"./baseFor":202}],205:[function(require,module,exports){var indexOfNaN=require("./indexOfNaN");function baseIndexOf(array,value,fromIndex){if(value!==value){return indexOfNaN(array,fromIndex)}var index=(fromIndex||0)-1,length=array.length;while(++index<length){if(array[index]===value){return index}}return-1}module.exports=baseIndexOf},{"./indexOfNaN":231}],206:[function(require,module,exports){var baseIsEqualDeep=require("./baseIsEqualDeep");function baseIsEqual(value,other,customizer,isWhere,stackA,stackB){if(value===other){return value!==0||1/value==1/other}var valType=typeof value,othType=typeof other;if(valType!="function"&&valType!="object"&&othType!="function"&&othType!="object"||value==null||other==null){return value!==value&&other!==other}return baseIsEqualDeep(value,other,baseIsEqual,customizer,isWhere,stackA,stackB)}module.exports=baseIsEqual},{"./baseIsEqualDeep":207}],207:[function(require,module,exports){var equalArrays=require("./equalArrays"),equalByTag=require("./equalByTag"),equalObjects=require("./equalObjects"),isArray=require("../lang/isArray"),isTypedArray=require("../lang/isTypedArray");var argsTag="[object Arguments]",arrayTag="[object Array]",objectTag="[object Object]";var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var objToString=objectProto.toString;function baseIsEqualDeep(object,other,equalFunc,customizer,isWhere,stackA,stackB){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=arrayTag,othTag=arrayTag;if(!objIsArr){objTag=objToString.call(object);if(objTag==argsTag){objTag=objectTag}else if(objTag!=objectTag){objIsArr=isTypedArray(object)}}if(!othIsArr){othTag=objToString.call(other);if(othTag==argsTag){othTag=objectTag}else if(othTag!=objectTag){othIsArr=isTypedArray(other)}}var objIsObj=objTag==objectTag,othIsObj=othTag==objectTag,isSameTag=objTag==othTag;if(isSameTag&&!(objIsArr||objIsObj)){return equalByTag(object,other,objTag)}var valWrapped=objIsObj&&hasOwnProperty.call(object,"__wrapped__"),othWrapped=othIsObj&&hasOwnProperty.call(other,"__wrapped__");if(valWrapped||othWrapped){return equalFunc(valWrapped?object.value():object,othWrapped?other.value():other,customizer,isWhere,stackA,stackB)}if(!isSameTag){return false}stackA||(stackA=[]);stackB||(stackB=[]);var length=stackA.length;while(length--){if(stackA[length]==object){return stackB[length]==other}}stackA.push(object);stackB.push(other);var result=(objIsArr?equalArrays:equalObjects)(object,other,equalFunc,customizer,isWhere,stackA,stackB);stackA.pop();stackB.pop();return result}module.exports=baseIsEqualDeep},{"../lang/isArray":249,"../lang/isTypedArray":259,"./equalArrays":228,"./equalByTag":229,"./equalObjects":230}],208:[function(require,module,exports){var baseIsEqual=require("./baseIsEqual");var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function baseIsMatch(object,props,values,strictCompareFlags,customizer){var length=props.length;if(object==null){return!length}var index=-1,noCustomizer=!customizer;while(++index<length){if(noCustomizer&&strictCompareFlags[index]?values[index]!==object[props[index]]:!hasOwnProperty.call(object,props[index])){return false}}index=-1;while(++index<length){var key=props[index];if(noCustomizer&&strictCompareFlags[index]){var result=hasOwnProperty.call(object,key)}else{var objValue=object[key],srcValue=values[index];result=customizer?customizer(objValue,srcValue,key):undefined;if(typeof result=="undefined"){result=baseIsEqual(srcValue,objValue,customizer,true)}}if(!result){return false}}return true}module.exports=baseIsMatch},{"./baseIsEqual":206}],209:[function(require,module,exports){var baseEach=require("./baseEach");function baseMap(collection,iteratee){var result=[];baseEach(collection,function(value,key,collection){result.push(iteratee(value,key,collection))});return result}module.exports=baseMap},{"./baseEach":200}],210:[function(require,module,exports){var baseClone=require("./baseClone"),baseIsMatch=require("./baseIsMatch"),isStrictComparable=require("./isStrictComparable"),keys=require("../object/keys");var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function baseMatches(source,isCloned){var props=keys(source),length=props.length;if(length==1){var key=props[0],value=source[key];if(isStrictComparable(value)){return function(object){return object!=null&&value===object[key]&&hasOwnProperty.call(object,key)}}}if(isCloned){source=baseClone(source,true)}var values=Array(length),strictCompareFlags=Array(length);while(length--){value=source[props[length]];values[length]=value;strictCompareFlags[length]=isStrictComparable(value)}return function(object){return baseIsMatch(object,props,values,strictCompareFlags)}}module.exports=baseMatches},{"../object/keys":265,"./baseClone":197,"./baseIsMatch":208,"./isStrictComparable":240}],211:[function(require,module,exports){var arrayEach=require("./arrayEach"),baseForOwn=require("./baseForOwn"),baseMergeDeep=require("./baseMergeDeep"),isArray=require("../lang/isArray"),isLength=require("./isLength"),isObjectLike=require("./isObjectLike"),isTypedArray=require("../lang/isTypedArray");function baseMerge(object,source,customizer,stackA,stackB){var isSrcArr=isLength(source.length)&&(isArray(source)||isTypedArray(source));(isSrcArr?arrayEach:baseForOwn)(source,function(srcValue,key,source){if(isObjectLike(srcValue)){stackA||(stackA=[]);stackB||(stackB=[]);return baseMergeDeep(object,source,key,baseMerge,customizer,stackA,stackB)}var value=object[key],result=customizer?customizer(value,srcValue,key,object,source):undefined,isCommon=typeof result=="undefined";if(isCommon){result=srcValue}if((isSrcArr||typeof result!="undefined")&&(isCommon||(result===result?result!==value:value===value))){object[key]=result}});return object}module.exports=baseMerge},{"../lang/isArray":249,"../lang/isTypedArray":259,"./arrayEach":191,"./baseForOwn":204,"./baseMergeDeep":212,"./isLength":238,"./isObjectLike":239}],212:[function(require,module,exports){var arrayCopy=require("./arrayCopy"),isArguments=require("../lang/isArguments"),isArray=require("../lang/isArray"),isLength=require("./isLength"),isPlainObject=require("../lang/isPlainObject"),isTypedArray=require("../lang/isTypedArray"),toPlainObject=require("../lang/toPlainObject");function baseMergeDeep(object,source,key,mergeFunc,customizer,stackA,stackB){var length=stackA.length,srcValue=source[key];while(length--){if(stackA[length]==srcValue){object[key]=stackB[length];return}}var value=object[key],result=customizer?customizer(value,srcValue,key,object,source):undefined,isCommon=typeof result=="undefined";if(isCommon){result=srcValue;if(isLength(srcValue.length)&&(isArray(srcValue)||isTypedArray(srcValue))){result=isArray(value)?value:value?arrayCopy(value):[]}else if(isPlainObject(srcValue)||isArguments(srcValue)){result=isArguments(value)?toPlainObject(value):isPlainObject(value)?value:{}}}stackA.push(srcValue);stackB.push(result);if(isCommon){object[key]=mergeFunc(result,srcValue,customizer,stackA,stackB)}else if(result===result?result!==value:value===value){object[key]=result}}module.exports=baseMergeDeep},{"../lang/isArguments":248,"../lang/isArray":249,"../lang/isPlainObject":256,"../lang/isTypedArray":259,"../lang/toPlainObject":260,"./arrayCopy":190,"./isLength":238}],213:[function(require,module,exports){function baseProperty(key){return function(object){return object==null?undefined:object[key]}}module.exports=baseProperty},{}],214:[function(require,module,exports){var identity=require("../utility/identity"),metaMap=require("./metaMap");var baseSetData=!metaMap?identity:function(func,data){metaMap.set(func,data);return func};module.exports=baseSetData},{"../utility/identity":272,"./metaMap":241}],215:[function(require,module,exports){var baseEach=require("./baseEach");function baseSome(collection,predicate){var result;baseEach(collection,function(value,index,collection){result=predicate(value,index,collection);return!result});return!!result}module.exports=baseSome},{"./baseEach":200}],216:[function(require,module,exports){function baseSortBy(array,comparer){var length=array.length;array.sort(comparer);while(length--){array[length]=array[length].value}return array}module.exports=baseSortBy},{}],217:[function(require,module,exports){function baseToString(value){if(typeof value=="string"){return value}return value==null?"":value+""}module.exports=baseToString},{}],218:[function(require,module,exports){var baseIndexOf=require("./baseIndexOf"),cacheIndexOf=require("./cacheIndexOf"),createCache=require("./createCache");function baseUniq(array,iteratee){var index=-1,indexOf=baseIndexOf,length=array.length,isCommon=true,isLarge=isCommon&&length>=200,seen=isLarge&&createCache(),result=[];if(seen){indexOf=cacheIndexOf;isCommon=false}else{isLarge=false;seen=iteratee?[]:result}outer:while(++index<length){var value=array[index],computed=iteratee?iteratee(value,index,array):value;if(isCommon&&value===value){var seenIndex=seen.length;while(seenIndex--){if(seen[seenIndex]===computed){continue outer}}if(iteratee){seen.push(computed)}result.push(value)}else if(indexOf(seen,computed)<0){if(iteratee||isLarge){seen.push(computed)}result.push(value)}}return result}module.exports=baseUniq},{"./baseIndexOf":205,"./cacheIndexOf":222,"./createCache":227}],219:[function(require,module,exports){function baseValues(object,props){var index=-1,length=props.length,result=Array(length);while(++index<length){result[index]=object[props[index]]}return result}module.exports=baseValues},{}],220:[function(require,module,exports){var identity=require("../utility/identity");function bindCallback(func,thisArg,argCount){if(typeof func!="function"){return identity}if(typeof thisArg=="undefined"){return func}switch(argCount){case 1:return function(value){return func.call(thisArg,value)};case 3:return function(value,index,collection){return func.call(thisArg,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(thisArg,accumulator,value,index,collection)};case 5:return function(value,other,key,object,source){return func.call(thisArg,value,other,key,object,source)}}return function(){return func.apply(thisArg,arguments)}}module.exports=bindCallback},{"../utility/identity":272}],221:[function(require,module,exports){(function(global){var constant=require("../utility/constant"),isNative=require("../lang/isNative");var ArrayBuffer=isNative(ArrayBuffer=global.ArrayBuffer)&&ArrayBuffer,bufferSlice=isNative(bufferSlice=ArrayBuffer&&new ArrayBuffer(0).slice)&&bufferSlice,floor=Math.floor,Uint8Array=isNative(Uint8Array=global.Uint8Array)&&Uint8Array;var Float64Array=function(){try{var func=isNative(func=global.Float64Array)&&func,result=new func(new ArrayBuffer(10),0,1)&&func}catch(e){}return result}();var FLOAT64_BYTES_PER_ELEMENT=Float64Array?Float64Array.BYTES_PER_ELEMENT:0;function bufferClone(buffer){return bufferSlice.call(buffer,0)}if(!bufferSlice){bufferClone=!(ArrayBuffer&&Uint8Array)?constant(null):function(buffer){var byteLength=buffer.byteLength,floatLength=Float64Array?floor(byteLength/FLOAT64_BYTES_PER_ELEMENT):0,offset=floatLength*FLOAT64_BYTES_PER_ELEMENT,result=new ArrayBuffer(byteLength);if(floatLength){var view=new Float64Array(result,0,floatLength);view.set(new Float64Array(buffer,0,floatLength))}if(byteLength!=offset){view=new Uint8Array(result,offset);view.set(new Uint8Array(buffer,offset))}return result}}module.exports=bufferClone}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../lang/isNative":253,"../utility/constant":271}],222:[function(require,module,exports){var isObject=require("../lang/isObject");function cacheIndexOf(cache,value){var data=cache.data,result=typeof value=="string"||isObject(value)?data.set.has(value):data.hash[value];return result?0:-1}module.exports=cacheIndexOf},{"../lang/isObject":255}],223:[function(require,module,exports){var isObject=require("../lang/isObject");function cachePush(value){var data=this.data;if(typeof value=="string"||isObject(value)){data.set.add(value)}else{data.hash[value]=true}}module.exports=cachePush},{"../lang/isObject":255}],224:[function(require,module,exports){var baseCompareAscending=require("./baseCompareAscending");function compareAscending(object,other){return baseCompareAscending(object.criteria,other.criteria)||object.index-other.index}module.exports=compareAscending},{"./baseCompareAscending":198}],225:[function(require,module,exports){var baseCallback=require("./baseCallback"),baseEach=require("./baseEach"),isArray=require("../lang/isArray");function createAggregator(setter,initializer){return function(collection,iteratee,thisArg){var result=initializer?initializer():{};iteratee=baseCallback(iteratee,thisArg,3);if(isArray(collection)){var index=-1,length=collection.length;while(++index<length){var value=collection[index];setter(result,value,iteratee(value,index,collection),collection)}}else{baseEach(collection,function(value,key,collection){setter(result,value,iteratee(value,key,collection),collection)})}return result}}module.exports=createAggregator},{"../lang/isArray":249,"./baseCallback":196,"./baseEach":200}],226:[function(require,module,exports){var bindCallback=require("./bindCallback"),isIterateeCall=require("./isIterateeCall");function createAssigner(assigner){return function(){var length=arguments.length,object=arguments[0];if(length<2||object==null){return object}if(length>3&&isIterateeCall(arguments[1],arguments[2],arguments[3])){length=2}if(length>3&&typeof arguments[length-2]=="function"){var customizer=bindCallback(arguments[--length-1],arguments[length--],5)}else if(length>2&&typeof arguments[length-1]=="function"){customizer=arguments[--length]}var index=0;while(++index<length){var source=arguments[index];if(source){assigner(object,source,customizer)}}return object}}module.exports=createAssigner},{"./bindCallback":220,"./isIterateeCall":237}],227:[function(require,module,exports){(function(global){var SetCache=require("./SetCache"),constant=require("../utility/constant"),isNative=require("../lang/isNative");var Set=isNative(Set=global.Set)&&Set;var nativeCreate=isNative(nativeCreate=Object.create)&&nativeCreate;var createCache=!(nativeCreate&&Set)?constant(null):function(values){return new SetCache(values)};module.exports=createCache}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../lang/isNative":253,"../utility/constant":271,"./SetCache":189}],228:[function(require,module,exports){function equalArrays(array,other,equalFunc,customizer,isWhere,stackA,stackB){var index=-1,arrLength=array.length,othLength=other.length,result=true;if(arrLength!=othLength&&!(isWhere&&othLength>arrLength)){return false}while(result&&++index<arrLength){var arrValue=array[index],othValue=other[index];result=undefined;if(customizer){result=isWhere?customizer(othValue,arrValue,index):customizer(arrValue,othValue,index)}if(typeof result=="undefined"){if(isWhere){var othIndex=othLength;while(othIndex--){othValue=other[othIndex];result=arrValue&&arrValue===othValue||equalFunc(arrValue,othValue,customizer,isWhere,stackA,stackB);if(result){break}}}else{result=arrValue&&arrValue===othValue||equalFunc(arrValue,othValue,customizer,isWhere,stackA,stackB)}}}return!!result}module.exports=equalArrays},{}],229:[function(require,module,exports){var baseToString=require("./baseToString");var boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",numberTag="[object Number]",regexpTag="[object RegExp]",stringTag="[object String]";function equalByTag(object,other,tag){switch(tag){case boolTag:case dateTag:return+object==+other;case errorTag:return object.name==other.name&&object.message==other.message;case numberTag:return object!=+object?other!=+other:object==0?1/object==1/other:object==+other;case regexpTag:case stringTag:return object==baseToString(other)}return false}module.exports=equalByTag},{"./baseToString":217}],230:[function(require,module,exports){var keys=require("../object/keys");var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function equalObjects(object,other,equalFunc,customizer,isWhere,stackA,stackB){var objProps=keys(object),objLength=objProps.length,othProps=keys(other),othLength=othProps.length;if(objLength!=othLength&&!isWhere){return false}var hasCtor,index=-1;while(++index<objLength){var key=objProps[index],result=hasOwnProperty.call(other,key);if(result){var objValue=object[key],othValue=other[key];result=undefined;if(customizer){result=isWhere?customizer(othValue,objValue,key):customizer(objValue,othValue,key)}if(typeof result=="undefined"){result=objValue&&objValue===othValue||equalFunc(objValue,othValue,customizer,isWhere,stackA,stackB)}}if(!result){return false}hasCtor||(hasCtor=key=="constructor")}if(!hasCtor){var objCtor=object.constructor,othCtor=other.constructor;if(objCtor!=othCtor&&("constructor"in object&&"constructor"in other)&&!(typeof objCtor=="function"&&objCtor instanceof objCtor&&typeof othCtor=="function"&&othCtor instanceof othCtor)){return false}}return true}module.exports=equalObjects},{"../object/keys":265}],231:[function(require,module,exports){function indexOfNaN(array,fromIndex,fromRight){var length=array.length,index=fromRight?fromIndex||length:(fromIndex||0)-1;while(fromRight?index--:++index<length){var other=array[index];if(other!==other){return index}}return-1}module.exports=indexOfNaN},{}],232:[function(require,module,exports){var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function initCloneArray(array){var length=array.length,result=new array.constructor(length);if(length&&typeof array[0]=="string"&&hasOwnProperty.call(array,"index")){result.index=array.index;result.input=array.input}return result}module.exports=initCloneArray},{}],233:[function(require,module,exports){var bufferClone=require("./bufferClone");var boolTag="[object Boolean]",dateTag="[object Date]",numberTag="[object Number]",regexpTag="[object RegExp]",stringTag="[object String]";var arrayBufferTag="[object ArrayBuffer]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]";var reFlags=/\w*$/;function initCloneByTag(object,tag,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return bufferClone(object);case boolTag:case dateTag:return new Ctor(+object);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:var buffer=object.buffer;return new Ctor(isDeep?bufferClone(buffer):buffer,object.byteOffset,object.length);case numberTag:case stringTag:return new Ctor(object);case regexpTag:var result=new Ctor(object.source,reFlags.exec(object));result.lastIndex=object.lastIndex}return result}module.exports=initCloneByTag},{"./bufferClone":221}],234:[function(require,module,exports){function initCloneObject(object){var Ctor=object.constructor;if(!(typeof Ctor=="function"&&Ctor instanceof Ctor)){Ctor=Object}return new Ctor}module.exports=initCloneObject},{}],235:[function(require,module,exports){var baseSetData=require("./baseSetData"),isNative=require("../lang/isNative"),support=require("../support");var reFuncName=/^\s*function[ \n\r\t]+\w/;var reThis=/\bthis\b/;var fnToString=Function.prototype.toString;function isBindable(func){var result=!(support.funcNames?func.name:support.funcDecomp);if(!result){var source=fnToString.call(func);if(!support.funcNames){result=!reFuncName.test(source)}if(!result){result=reThis.test(source)||isNative(func);baseSetData(func,result)}}return result}module.exports=isBindable},{"../lang/isNative":253,"../support":270,"./baseSetData":214}],236:[function(require,module,exports){var MAX_SAFE_INTEGER=Math.pow(2,53)-1;function isIndex(value,length){value=+value;length=length==null?MAX_SAFE_INTEGER:length;return value>-1&&value%1==0&&value<length}module.exports=isIndex},{}],237:[function(require,module,exports){var isIndex=require("./isIndex"),isLength=require("./isLength"),isObject=require("../lang/isObject"); function isIterateeCall(value,index,object){if(!isObject(object)){return false}var type=typeof index;if(type=="number"){var length=object.length,prereq=isLength(length)&&isIndex(index,length)}else{prereq=type=="string"&&index in value}return prereq&&object[index]===value}module.exports=isIterateeCall},{"../lang/isObject":255,"./isIndex":236,"./isLength":238}],238:[function(require,module,exports){var MAX_SAFE_INTEGER=Math.pow(2,53)-1;function isLength(value){return typeof value=="number"&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}module.exports=isLength},{}],239:[function(require,module,exports){function isObjectLike(value){return value&&typeof value=="object"||false}module.exports=isObjectLike},{}],240:[function(require,module,exports){var isObject=require("../lang/isObject");function isStrictComparable(value){return value===value&&(value===0?1/value>0:!isObject(value))}module.exports=isStrictComparable},{"../lang/isObject":255}],241:[function(require,module,exports){(function(global){var isNative=require("../lang/isNative");var WeakMap=isNative(WeakMap=global.WeakMap)&&WeakMap;var metaMap=WeakMap&&new WeakMap;module.exports=metaMap}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../lang/isNative":253}],242:[function(require,module,exports){var baseForIn=require("./baseForIn"),isObjectLike=require("./isObjectLike");var objectTag="[object Object]";var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var objToString=objectProto.toString;function shimIsPlainObject(value){var Ctor;if(!(isObjectLike(value)&&objToString.call(value)==objectTag)||!hasOwnProperty.call(value,"constructor")&&(Ctor=value.constructor,typeof Ctor=="function"&&!(Ctor instanceof Ctor))){return false}var result;baseForIn(value,function(subValue,key){result=key});return typeof result=="undefined"||hasOwnProperty.call(value,result)}module.exports=shimIsPlainObject},{"./baseForIn":203,"./isObjectLike":239}],243:[function(require,module,exports){var isArguments=require("../lang/isArguments"),isArray=require("../lang/isArray"),isIndex=require("./isIndex"),isLength=require("./isLength"),keysIn=require("../object/keysIn"),support=require("../support");var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function shimKeys(object){var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length;var allowIndexes=length&&isLength(length)&&(isArray(object)||support.nonEnumArgs&&isArguments(object));var index=-1,result=[];while(++index<propsLength){var key=props[index];if(allowIndexes&&isIndex(key,length)||hasOwnProperty.call(object,key)){result.push(key)}}return result}module.exports=shimKeys},{"../lang/isArguments":248,"../lang/isArray":249,"../object/keysIn":266,"../support":270,"./isIndex":236,"./isLength":238}],244:[function(require,module,exports){function sortedUniq(array,iteratee){var seen,index=-1,length=array.length,resIndex=-1,result=[];while(++index<length){var value=array[index],computed=iteratee?iteratee(value,index,array):value;if(!index||seen!==computed){seen=computed;result[++resIndex]=value}}return result}module.exports=sortedUniq},{}],245:[function(require,module,exports){var isObject=require("../lang/isObject");function toObject(value){return isObject(value)?value:Object(value)}module.exports=toObject},{"../lang/isObject":255}],246:[function(require,module,exports){var baseClone=require("../internal/baseClone"),bindCallback=require("../internal/bindCallback"),isIterateeCall=require("../internal/isIterateeCall");function clone(value,isDeep,customizer,thisArg){if(typeof isDeep!="boolean"&&isDeep!=null){thisArg=customizer;customizer=isIterateeCall(value,isDeep,thisArg)?null:isDeep;isDeep=false}customizer=typeof customizer=="function"&&bindCallback(customizer,thisArg,1);return baseClone(value,isDeep,customizer)}module.exports=clone},{"../internal/baseClone":197,"../internal/bindCallback":220,"../internal/isIterateeCall":237}],247:[function(require,module,exports){var baseClone=require("../internal/baseClone"),bindCallback=require("../internal/bindCallback");function cloneDeep(value,customizer,thisArg){customizer=typeof customizer=="function"&&bindCallback(customizer,thisArg,1);return baseClone(value,true,customizer)}module.exports=cloneDeep},{"../internal/baseClone":197,"../internal/bindCallback":220}],248:[function(require,module,exports){var isLength=require("../internal/isLength"),isObjectLike=require("../internal/isObjectLike");var argsTag="[object Arguments]";var objectProto=Object.prototype;var objToString=objectProto.toString;function isArguments(value){var length=isObjectLike(value)?value.length:undefined;return isLength(length)&&objToString.call(value)==argsTag||false}module.exports=isArguments},{"../internal/isLength":238,"../internal/isObjectLike":239}],249:[function(require,module,exports){var isLength=require("../internal/isLength"),isNative=require("./isNative"),isObjectLike=require("../internal/isObjectLike");var arrayTag="[object Array]";var objectProto=Object.prototype;var objToString=objectProto.toString;var nativeIsArray=isNative(nativeIsArray=Array.isArray)&&nativeIsArray;var isArray=nativeIsArray||function(value){return isObjectLike(value)&&isLength(value.length)&&objToString.call(value)==arrayTag||false};module.exports=isArray},{"../internal/isLength":238,"../internal/isObjectLike":239,"./isNative":253}],250:[function(require,module,exports){var isObjectLike=require("../internal/isObjectLike");var boolTag="[object Boolean]";var objectProto=Object.prototype;var objToString=objectProto.toString;function isBoolean(value){return value===true||value===false||isObjectLike(value)&&objToString.call(value)==boolTag||false}module.exports=isBoolean},{"../internal/isObjectLike":239}],251:[function(require,module,exports){var isArguments=require("./isArguments"),isArray=require("./isArray"),isFunction=require("./isFunction"),isLength=require("../internal/isLength"),isObjectLike=require("../internal/isObjectLike"),isString=require("./isString"),keys=require("../object/keys");function isEmpty(value){if(value==null){return true}var length=value.length;if(isLength(length)&&(isArray(value)||isString(value)||isArguments(value)||isObjectLike(value)&&isFunction(value.splice))){return!length}return!keys(value).length}module.exports=isEmpty},{"../internal/isLength":238,"../internal/isObjectLike":239,"../object/keys":265,"./isArguments":248,"./isArray":249,"./isFunction":252,"./isString":258}],252:[function(require,module,exports){(function(global){var isNative=require("./isNative");var funcTag="[object Function]";var objectProto=Object.prototype;var objToString=objectProto.toString;var Uint8Array=isNative(Uint8Array=global.Uint8Array)&&Uint8Array;function isFunction(value){return typeof value=="function"||false}if(isFunction(/x/)||Uint8Array&&!isFunction(Uint8Array)){isFunction=function(value){return objToString.call(value)==funcTag}}module.exports=isFunction}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./isNative":253}],253:[function(require,module,exports){var escapeRegExp=require("../string/escapeRegExp"),isObjectLike=require("../internal/isObjectLike");var funcTag="[object Function]";var reHostCtor=/^\[object .+?Constructor\]$/;var objectProto=Object.prototype;var fnToString=Function.prototype.toString;var objToString=objectProto.toString;var reNative=RegExp("^"+escapeRegExp(objToString).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function isNative(value){if(value==null){return false}if(objToString.call(value)==funcTag){return reNative.test(fnToString.call(value))}return isObjectLike(value)&&reHostCtor.test(value)||false}module.exports=isNative},{"../internal/isObjectLike":239,"../string/escapeRegExp":269}],254:[function(require,module,exports){var isObjectLike=require("../internal/isObjectLike");var numberTag="[object Number]";var objectProto=Object.prototype;var objToString=objectProto.toString;function isNumber(value){return typeof value=="number"||isObjectLike(value)&&objToString.call(value)==numberTag||false}module.exports=isNumber},{"../internal/isObjectLike":239}],255:[function(require,module,exports){function isObject(value){var type=typeof value;return type=="function"||value&&type=="object"||false}module.exports=isObject},{}],256:[function(require,module,exports){var isNative=require("./isNative"),shimIsPlainObject=require("../internal/shimIsPlainObject");var objectTag="[object Object]";var objectProto=Object.prototype;var objToString=objectProto.toString;var getPrototypeOf=isNative(getPrototypeOf=Object.getPrototypeOf)&&getPrototypeOf;var isPlainObject=!getPrototypeOf?shimIsPlainObject:function(value){if(!(value&&objToString.call(value)==objectTag)){return false}var valueOf=value.valueOf,objProto=isNative(valueOf)&&(objProto=getPrototypeOf(valueOf))&&getPrototypeOf(objProto);return objProto?value==objProto||getPrototypeOf(value)==objProto:shimIsPlainObject(value)};module.exports=isPlainObject},{"../internal/shimIsPlainObject":242,"./isNative":253}],257:[function(require,module,exports){var isObjectLike=require("../internal/isObjectLike");var regexpTag="[object RegExp]";var objectProto=Object.prototype;var objToString=objectProto.toString;function isRegExp(value){return isObjectLike(value)&&objToString.call(value)==regexpTag||false}module.exports=isRegExp},{"../internal/isObjectLike":239}],258:[function(require,module,exports){var isObjectLike=require("../internal/isObjectLike");var stringTag="[object String]";var objectProto=Object.prototype;var objToString=objectProto.toString;function isString(value){return typeof value=="string"||isObjectLike(value)&&objToString.call(value)==stringTag||false}module.exports=isString},{"../internal/isObjectLike":239}],259:[function(require,module,exports){var isLength=require("../internal/isLength"),isObjectLike=require("../internal/isObjectLike");var argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]";var arrayBufferTag="[object ArrayBuffer]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]";var typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=true;typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=false;var objectProto=Object.prototype;var objToString=objectProto.toString;function isTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&typedArrayTags[objToString.call(value)]||false}module.exports=isTypedArray},{"../internal/isLength":238,"../internal/isObjectLike":239}],260:[function(require,module,exports){var baseCopy=require("../internal/baseCopy"),keysIn=require("../object/keysIn");function toPlainObject(value){return baseCopy(value,keysIn(value))}module.exports=toPlainObject},{"../internal/baseCopy":199,"../object/keysIn":266}],261:[function(require,module,exports){var baseAssign=require("../internal/baseAssign"),createAssigner=require("../internal/createAssigner");var assign=createAssigner(baseAssign);module.exports=assign},{"../internal/baseAssign":195,"../internal/createAssigner":226}],262:[function(require,module,exports){var arrayCopy=require("../internal/arrayCopy"),assign=require("./assign"),assignDefaults=require("../internal/assignDefaults");function defaults(object){if(object==null){return object}var args=arrayCopy(arguments);args.push(assignDefaults);return assign.apply(undefined,args)}module.exports=defaults},{"../internal/arrayCopy":190,"../internal/assignDefaults":194,"./assign":261}],263:[function(require,module,exports){module.exports=require("./assign")},{"./assign":261}],264:[function(require,module,exports){var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function has(object,key){return object?hasOwnProperty.call(object,key):false}module.exports=has},{}],265:[function(require,module,exports){var isLength=require("../internal/isLength"),isNative=require("../lang/isNative"),isObject=require("../lang/isObject"),shimKeys=require("../internal/shimKeys");var nativeKeys=isNative(nativeKeys=Object.keys)&&nativeKeys;var keys=!nativeKeys?shimKeys:function(object){if(object){var Ctor=object.constructor,length=object.length}if(typeof Ctor=="function"&&Ctor.prototype===object||typeof object!="function"&&(length&&isLength(length))){return shimKeys(object)}return isObject(object)?nativeKeys(object):[]};module.exports=keys},{"../internal/isLength":238,"../internal/shimKeys":243,"../lang/isNative":253,"../lang/isObject":255}],266:[function(require,module,exports){var isArguments=require("../lang/isArguments"),isArray=require("../lang/isArray"),isIndex=require("../internal/isIndex"),isLength=require("../internal/isLength"),isObject=require("../lang/isObject"),support=require("../support");var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function keysIn(object){if(object==null){return[]}if(!isObject(object)){object=Object(object)}var length=object.length;length=length&&isLength(length)&&(isArray(object)||support.nonEnumArgs&&isArguments(object))&&length||0;var Ctor=object.constructor,index=-1,isProto=typeof Ctor=="function"&&Ctor.prototype==object,result=Array(length),skipIndexes=length>0;while(++index<length){result[index]=index+""}for(var key in object){if(!(skipIndexes&&isIndex(key,length))&&!(key=="constructor"&&(isProto||!hasOwnProperty.call(object,key)))){result.push(key)}}return result}module.exports=keysIn},{"../internal/isIndex":236,"../internal/isLength":238,"../lang/isArguments":248,"../lang/isArray":249,"../lang/isObject":255,"../support":270}],267:[function(require,module,exports){var baseMerge=require("../internal/baseMerge"),createAssigner=require("../internal/createAssigner");var merge=createAssigner(baseMerge);module.exports=merge},{"../internal/baseMerge":211,"../internal/createAssigner":226}],268:[function(require,module,exports){var baseValues=require("../internal/baseValues"),keys=require("./keys");function values(object){return baseValues(object,keys(object))}module.exports=values},{"../internal/baseValues":219,"./keys":265}],269:[function(require,module,exports){var baseToString=require("../internal/baseToString");var reRegExpChars=/[.*+?^${}()|[\]\/\\]/g,reHasRegExpChars=RegExp(reRegExpChars.source);function escapeRegExp(string){string=baseToString(string);return string&&reHasRegExpChars.test(string)?string.replace(reRegExpChars,"\\$&"):string}module.exports=escapeRegExp},{"../internal/baseToString":217}],270:[function(require,module,exports){(function(global){var isNative=require("./lang/isNative");var reThis=/\bthis\b/;var objectProto=Object.prototype;var document=(document=global.window)&&document.document;var propertyIsEnumerable=objectProto.propertyIsEnumerable;var support={};(function(x){support.funcDecomp=!isNative(global.WinRTError)&&reThis.test(function(){return this});support.funcNames=typeof Function.name=="string";try{support.dom=document.createDocumentFragment().nodeType===11}catch(e){support.dom=false}try{support.nonEnumArgs=!propertyIsEnumerable.call(arguments,1)}catch(e){support.nonEnumArgs=true}})(0,0);module.exports=support}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./lang/isNative":253}],271:[function(require,module,exports){function constant(value){return function(){return value}}module.exports=constant},{}],272:[function(require,module,exports){function identity(value){return value}module.exports=identity},{}],273:[function(require,module,exports){"use strict";var originalObject=Object;var originalDefProp=Object.defineProperty;var originalCreate=Object.create;function defProp(obj,name,value){if(originalDefProp)try{originalDefProp.call(originalObject,obj,name,{value:value})}catch(definePropertyIsBrokenInIE8){obj[name]=value}else{obj[name]=value}}function makeSafeToCall(fun){if(fun){defProp(fun,"call",fun.call);defProp(fun,"apply",fun.apply)}return fun}makeSafeToCall(originalDefProp);makeSafeToCall(originalCreate);var hasOwn=makeSafeToCall(Object.prototype.hasOwnProperty);var numToStr=makeSafeToCall(Number.prototype.toString);var strSlice=makeSafeToCall(String.prototype.slice);var cloner=function(){};function create(prototype){if(originalCreate){return originalCreate.call(originalObject,prototype)}cloner.prototype=prototype||null;return new cloner}var rand=Math.random;var uniqueKeys=create(null);function makeUniqueKey(){do var uniqueKey=internString(strSlice.call(numToStr.call(rand(),36),2));while(hasOwn.call(uniqueKeys,uniqueKey));return uniqueKeys[uniqueKey]=uniqueKey}function internString(str){var obj={};obj[str]=true;return Object.keys(obj)[0]}defProp(exports,"makeUniqueKey",makeUniqueKey);var originalGetOPNs=Object.getOwnPropertyNames;Object.getOwnPropertyNames=function getOwnPropertyNames(object){for(var names=originalGetOPNs(object),src=0,dst=0,len=names.length;src<len;++src){if(!hasOwn.call(uniqueKeys,names[src])){if(src>dst){names[dst]=names[src]}++dst}}names.length=dst;return names};function defaultCreatorFn(object){return create(null)}function makeAccessor(secretCreatorFn){var brand=makeUniqueKey();var passkey=create(null);secretCreatorFn=secretCreatorFn||defaultCreatorFn;function register(object){var secret;function vault(key,forget){if(key===passkey){return forget?secret=null:secret||(secret=secretCreatorFn(object))}}defProp(object,brand,vault)}function accessor(object){if(!hasOwn.call(object,brand))register(object);return object[brand](passkey)}accessor.forget=function(object){if(hasOwn.call(object,brand))object[brand](passkey,true)};return accessor}defProp(exports,"makeAccessor",makeAccessor)},{}],274:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var isArray=types.builtInTypes.array;var b=types.builders;var n=types.namedTypes;var leap=require("./leap");var meta=require("./meta");var util=require("./util");var hasOwn=Object.prototype.hasOwnProperty;function Emitter(contextId){assert.ok(this instanceof Emitter);n.Identifier.assert(contextId);Object.defineProperties(this,{contextId:{value:contextId},listing:{value:[]},marked:{value:[true]},finalLoc:{value:loc()},tryEntries:{value:[]}});Object.defineProperties(this,{leapManager:{value:new leap.LeapManager(this)}})}var Ep=Emitter.prototype;exports.Emitter=Emitter;function loc(){return b.literal(-1)}Ep.mark=function(loc){n.Literal.assert(loc);var index=this.listing.length;if(loc.value===-1){loc.value=index}else{assert.strictEqual(loc.value,index)}this.marked[index]=true;return loc};Ep.emit=function(node){if(n.Expression.check(node))node=b.expressionStatement(node);n.Statement.assert(node);this.listing.push(node)};Ep.emitAssign=function(lhs,rhs){this.emit(this.assign(lhs,rhs));return lhs};Ep.assign=function(lhs,rhs){return b.expressionStatement(b.assignmentExpression("=",lhs,rhs))};Ep.contextProperty=function(name,computed){return b.memberExpression(this.contextId,computed?b.literal(name):b.identifier(name),!!computed)};var volatileContextPropertyNames={prev:true,next:true,sent:true,rval:true};Ep.isVolatileContextProperty=function(expr){if(n.MemberExpression.check(expr)){if(expr.computed){return true}if(n.Identifier.check(expr.object)&&n.Identifier.check(expr.property)&&expr.object.name===this.contextId.name&&hasOwn.call(volatileContextPropertyNames,expr.property.name)){return true}}return false};Ep.stop=function(rval){if(rval){this.setReturnValue(rval)}this.jump(this.finalLoc)};Ep.setReturnValue=function(valuePath){n.Expression.assert(valuePath.value);this.emitAssign(this.contextProperty("rval"),this.explodeExpression(valuePath))};Ep.clearPendingException=function(tryLoc,assignee){n.Literal.assert(tryLoc);var catchCall=b.callExpression(this.contextProperty("catch",true),[tryLoc]);if(assignee){this.emitAssign(assignee,catchCall)}else{this.emit(catchCall)}};Ep.jump=function(toLoc){this.emitAssign(this.contextProperty("next"),toLoc);this.emit(b.breakStatement())};Ep.jumpIf=function(test,toLoc){n.Expression.assert(test);n.Literal.assert(toLoc);this.emit(b.ifStatement(test,b.blockStatement([this.assign(this.contextProperty("next"),toLoc),b.breakStatement()])))};Ep.jumpIfNot=function(test,toLoc){n.Expression.assert(test);n.Literal.assert(toLoc);var negatedTest;if(n.UnaryExpression.check(test)&&test.operator==="!"){negatedTest=test.argument}else{negatedTest=b.unaryExpression("!",test)}this.emit(b.ifStatement(negatedTest,b.blockStatement([this.assign(this.contextProperty("next"),toLoc),b.breakStatement()])))};var nextTempId=0;Ep.makeTempVar=function(){return this.contextProperty("t"+nextTempId++)};Ep.getContextFunction=function(id){var func=b.functionExpression(id||null,[this.contextId],b.blockStatement([this.getDispatchLoop()]),false,false);func._aliasFunction=true;return func};Ep.getDispatchLoop=function(){var self=this;var cases=[];var current;var alreadyEnded=false;self.listing.forEach(function(stmt,i){if(self.marked.hasOwnProperty(i)){cases.push(b.switchCase(b.literal(i),current=[]));alreadyEnded=false}if(!alreadyEnded){current.push(stmt);if(isSwitchCaseEnder(stmt))alreadyEnded=true}});this.finalLoc.value=this.listing.length;cases.push(b.switchCase(this.finalLoc,[]),b.switchCase(b.literal("end"),[b.returnStatement(b.callExpression(this.contextProperty("stop"),[]))]));return b.whileStatement(b.literal(1),b.switchStatement(b.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),cases))};function isSwitchCaseEnder(stmt){return n.BreakStatement.check(stmt)||n.ContinueStatement.check(stmt)||n.ReturnStatement.check(stmt)||n.ThrowStatement.check(stmt)}Ep.getTryEntryList=function(){if(this.tryEntries.length===0){return null}var lastLocValue=0;return b.arrayExpression(this.tryEntries.map(function(tryEntry){var thisLocValue=tryEntry.firstLoc.value;assert.ok(thisLocValue>=lastLocValue,"try entries out of order");lastLocValue=thisLocValue;var ce=tryEntry.catchEntry;var fe=tryEntry.finallyEntry;var triple=[tryEntry.firstLoc,ce?ce.firstLoc:null];if(fe){triple[2]=fe.firstLoc}return b.arrayExpression(triple)}))};Ep.explode=function(path,ignoreResult){assert.ok(path instanceof types.NodePath);var node=path.value;var self=this;n.Node.assert(node);if(n.Statement.check(node))return self.explodeStatement(path);if(n.Expression.check(node))return self.explodeExpression(path,ignoreResult);if(n.Declaration.check(node))throw getDeclError(node);switch(node.type){case"Program":return path.get("body").map(self.explodeStatement,self);case"VariableDeclarator":throw getDeclError(node);case"Property":case"SwitchCase":case"CatchClause":throw new Error(node.type+" nodes should be handled by their parents");default:throw new Error("unknown Node of type "+JSON.stringify(node.type))}};function getDeclError(node){return new Error("all declarations should have been transformed into "+"assignments before the Exploder began its work: "+JSON.stringify(node))}Ep.explodeStatement=function(path,labelId){assert.ok(path instanceof types.NodePath);var stmt=path.value;var self=this;n.Statement.assert(stmt);if(labelId){n.Identifier.assert(labelId)}else{labelId=null}if(n.BlockStatement.check(stmt)){return path.get("body").each(self.explodeStatement,self)}if(!meta.containsLeap(stmt)){self.emit(stmt);return}switch(stmt.type){case"ExpressionStatement":self.explodeExpression(path.get("expression"),true);break;case"LabeledStatement":var after=loc();self.leapManager.withEntry(new leap.LabeledEntry(after,stmt.label),function(){self.explodeStatement(path.get("body"),stmt.label)});self.mark(after);break;case"WhileStatement":var before=loc();var after=loc();self.mark(before);self.jumpIfNot(self.explodeExpression(path.get("test")),after);self.leapManager.withEntry(new leap.LoopEntry(after,before,labelId),function(){self.explodeStatement(path.get("body"))});self.jump(before);self.mark(after);break;case"DoWhileStatement":var first=loc();var test=loc();var after=loc();self.mark(first);self.leapManager.withEntry(new leap.LoopEntry(after,test,labelId),function(){self.explode(path.get("body"))});self.mark(test);self.jumpIf(self.explodeExpression(path.get("test")),first);self.mark(after);break;case"ForStatement":var head=loc();var update=loc();var after=loc();if(stmt.init){self.explode(path.get("init"),true)}self.mark(head);if(stmt.test){self.jumpIfNot(self.explodeExpression(path.get("test")),after)}else{}self.leapManager.withEntry(new leap.LoopEntry(after,update,labelId),function(){self.explodeStatement(path.get("body"))});self.mark(update);if(stmt.update){self.explode(path.get("update"),true)}self.jump(head);self.mark(after);break;case"ForInStatement":n.Identifier.assert(stmt.left);var head=loc();var after=loc();var keyIterNextFn=self.makeTempVar();self.emitAssign(keyIterNextFn,b.callExpression(util.runtimeProperty("keys"),[self.explodeExpression(path.get("right"))]));self.mark(head);var keyInfoTmpVar=self.makeTempVar();self.jumpIf(b.memberExpression(b.assignmentExpression("=",keyInfoTmpVar,b.callExpression(keyIterNextFn,[])),b.identifier("done"),false),after);self.emitAssign(stmt.left,b.memberExpression(keyInfoTmpVar,b.identifier("value"),false));self.leapManager.withEntry(new leap.LoopEntry(after,head,labelId),function(){self.explodeStatement(path.get("body"))});self.jump(head);self.mark(after);break;case"BreakStatement":self.emitAbruptCompletion({type:"break",target:self.leapManager.getBreakLoc(stmt.label)});break;case"ContinueStatement":self.emitAbruptCompletion({type:"continue",target:self.leapManager.getContinueLoc(stmt.label)});break;case"SwitchStatement":var disc=self.emitAssign(self.makeTempVar(),self.explodeExpression(path.get("discriminant")));var after=loc();var defaultLoc=loc();var condition=defaultLoc;var caseLocs=[];var cases=stmt.cases||[];for(var i=cases.length-1;i>=0;--i){var c=cases[i];n.SwitchCase.assert(c);if(c.test){condition=b.conditionalExpression(b.binaryExpression("===",disc,c.test),caseLocs[i]=loc(),condition)}else{caseLocs[i]=defaultLoc}}self.jump(self.explodeExpression(new types.NodePath(condition,path,"discriminant")));self.leapManager.withEntry(new leap.SwitchEntry(after),function(){path.get("cases").each(function(casePath){var c=casePath.value;var i=casePath.name;self.mark(caseLocs[i]);casePath.get("consequent").each(self.explodeStatement,self)})});self.mark(after);if(defaultLoc.value===-1){self.mark(defaultLoc);assert.strictEqual(after.value,defaultLoc.value)}break;case"IfStatement":var elseLoc=stmt.alternate&&loc();var after=loc();self.jumpIfNot(self.explodeExpression(path.get("test")),elseLoc||after);self.explodeStatement(path.get("consequent"));if(elseLoc){self.jump(after);self.mark(elseLoc);self.explodeStatement(path.get("alternate"))}self.mark(after);break;case"ReturnStatement":self.emitAbruptCompletion({type:"return",value:self.explodeExpression(path.get("argument"))});break;case"WithStatement":throw new Error(node.type+" not supported in generator functions.");case"TryStatement":var after=loc();var handler=stmt.handler;if(!handler&&stmt.handlers){handler=stmt.handlers[0]||null}var catchLoc=handler&&loc();var catchEntry=catchLoc&&new leap.CatchEntry(catchLoc,handler.param);var finallyLoc=stmt.finalizer&&loc();var finallyEntry=finallyLoc&&new leap.FinallyEntry(finallyLoc);var tryEntry=new leap.TryEntry(self.getUnmarkedCurrentLoc(),catchEntry,finallyEntry);self.tryEntries.push(tryEntry);self.updateContextPrevLoc(tryEntry.firstLoc);self.leapManager.withEntry(tryEntry,function(){self.explodeStatement(path.get("block"));if(catchLoc){if(finallyLoc){self.jump(finallyLoc)}else{self.jump(after)}self.updateContextPrevLoc(self.mark(catchLoc));var bodyPath=path.get("handler","body");var safeParam=self.makeTempVar();self.clearPendingException(tryEntry.firstLoc,safeParam);var catchScope=bodyPath.scope;var catchParamName=handler.param.name;n.CatchClause.assert(catchScope.node);assert.strictEqual(catchScope.lookup(catchParamName),catchScope);types.visit(bodyPath,{visitIdentifier:function(path){if(util.isReference(path,catchParamName)&&path.scope.lookup(catchParamName)===catchScope){return safeParam}this.traverse(path)},visitFunction:function(path){if(path.scope.declares(catchParamName)){return false}this.traverse(path)}});self.leapManager.withEntry(catchEntry,function(){self.explodeStatement(bodyPath)})}if(finallyLoc){self.updateContextPrevLoc(self.mark(finallyLoc));self.leapManager.withEntry(finallyEntry,function(){self.explodeStatement(path.get("finalizer"))});self.emit(b.callExpression(self.contextProperty("finish"),[finallyEntry.firstLoc]))}});self.mark(after);break;case"ThrowStatement":self.emit(b.throwStatement(self.explodeExpression(path.get("argument"))));break;default:throw new Error("unknown Statement of type "+JSON.stringify(stmt.type))}};Ep.emitAbruptCompletion=function(record){if(!isValidCompletion(record)){assert.ok(false,"invalid completion record: "+JSON.stringify(record))}assert.notStrictEqual(record.type,"normal","normal completions are not abrupt");var abruptArgs=[b.literal(record.type)];if(record.type==="break"||record.type==="continue"){n.Literal.assert(record.target);abruptArgs[1]=record.target}else if(record.type==="return"||record.type==="throw"){if(record.value){n.Expression.assert(record.value);abruptArgs[1]=record.value}}this.emit(b.returnStatement(b.callExpression(this.contextProperty("abrupt"),abruptArgs)))};function isValidCompletion(record){var type=record.type;if(type==="normal"){return!hasOwn.call(record,"target")}if(type==="break"||type==="continue"){return!hasOwn.call(record,"value")&&n.Literal.check(record.target)}if(type==="return"||type==="throw"){return hasOwn.call(record,"value")&&!hasOwn.call(record,"target")}return false}Ep.getUnmarkedCurrentLoc=function(){return b.literal(this.listing.length)};Ep.updateContextPrevLoc=function(loc){if(loc){n.Literal.assert(loc);if(loc.value===-1){loc.value=this.listing.length}else{assert.strictEqual(loc.value,this.listing.length)}}else{loc=this.getUnmarkedCurrentLoc()}this.emitAssign(this.contextProperty("prev"),loc)};Ep.explodeExpression=function(path,ignoreResult){assert.ok(path instanceof types.NodePath);var expr=path.value;if(expr){n.Expression.assert(expr)}else{return expr}var self=this;var result;function finish(expr){n.Expression.assert(expr);if(ignoreResult){self.emit(expr)}else{return expr}}if(!meta.containsLeap(expr)){return finish(expr)}var hasLeapingChildren=meta.containsLeap.onlyChildren(expr);function explodeViaTempVar(tempVar,childPath,ignoreChildResult){assert.ok(childPath instanceof types.NodePath);assert.ok(!ignoreChildResult||!tempVar,"Ignoring the result of a child expression but forcing it to "+"be assigned to a temporary variable?");var result=self.explodeExpression(childPath,ignoreChildResult);if(ignoreChildResult){}else if(tempVar||hasLeapingChildren&&(self.isVolatileContextProperty(result)||meta.hasSideEffects(result))){result=self.emitAssign(tempVar||self.makeTempVar(),result)}return result}switch(expr.type){case"MemberExpression":return finish(b.memberExpression(self.explodeExpression(path.get("object")),expr.computed?explodeViaTempVar(null,path.get("property")):expr.property,expr.computed)); case"CallExpression":var oldCalleePath=path.get("callee");var newCallee=self.explodeExpression(oldCalleePath);if(!n.MemberExpression.check(oldCalleePath.node)&&n.MemberExpression.check(newCallee)){newCallee=b.sequenceExpression([b.literal(0),newCallee])}return finish(b.callExpression(newCallee,path.get("arguments").map(function(argPath){return explodeViaTempVar(null,argPath)})));case"NewExpression":return finish(b.newExpression(explodeViaTempVar(null,path.get("callee")),path.get("arguments").map(function(argPath){return explodeViaTempVar(null,argPath)})));case"ObjectExpression":return finish(b.objectExpression(path.get("properties").map(function(propPath){return b.property(propPath.value.kind,propPath.value.key,explodeViaTempVar(null,propPath.get("value")))})));case"ArrayExpression":return finish(b.arrayExpression(path.get("elements").map(function(elemPath){return explodeViaTempVar(null,elemPath)})));case"SequenceExpression":var lastIndex=expr.expressions.length-1;path.get("expressions").each(function(exprPath){if(exprPath.name===lastIndex){result=self.explodeExpression(exprPath,ignoreResult)}else{self.explodeExpression(exprPath,true)}});return result;case"LogicalExpression":var after=loc();if(!ignoreResult){result=self.makeTempVar()}var left=explodeViaTempVar(result,path.get("left"));if(expr.operator==="&&"){self.jumpIfNot(left,after)}else{assert.strictEqual(expr.operator,"||");self.jumpIf(left,after)}explodeViaTempVar(result,path.get("right"),ignoreResult);self.mark(after);return result;case"ConditionalExpression":var elseLoc=loc();var after=loc();var test=self.explodeExpression(path.get("test"));self.jumpIfNot(test,elseLoc);if(!ignoreResult){result=self.makeTempVar()}explodeViaTempVar(result,path.get("consequent"),ignoreResult);self.jump(after);self.mark(elseLoc);explodeViaTempVar(result,path.get("alternate"),ignoreResult);self.mark(after);return result;case"UnaryExpression":return finish(b.unaryExpression(expr.operator,self.explodeExpression(path.get("argument")),!!expr.prefix));case"BinaryExpression":return finish(b.binaryExpression(expr.operator,explodeViaTempVar(null,path.get("left")),explodeViaTempVar(null,path.get("right"))));case"AssignmentExpression":return finish(b.assignmentExpression(expr.operator,self.explodeExpression(path.get("left")),self.explodeExpression(path.get("right"))));case"UpdateExpression":return finish(b.updateExpression(expr.operator,self.explodeExpression(path.get("argument")),expr.prefix));case"YieldExpression":var after=loc();var arg=expr.argument&&self.explodeExpression(path.get("argument"));if(arg&&expr.delegate){var result=self.makeTempVar();self.emit(b.returnStatement(b.callExpression(self.contextProperty("delegateYield"),[arg,b.literal(result.property.name),after])));self.mark(after);return result}self.emitAssign(self.contextProperty("next"),after);self.emit(b.returnStatement(arg||null));self.mark(after);return self.contextProperty("sent");default:throw new Error("unknown Expression of type "+JSON.stringify(expr.type))}}},{"./leap":276,"./meta":277,"./util":278,assert:127,"ast-types":125}],275:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var n=types.namedTypes;var b=types.builders;var hasOwn=Object.prototype.hasOwnProperty;exports.hoist=function(funPath){assert.ok(funPath instanceof types.NodePath);n.Function.assert(funPath.value);var vars={};function varDeclToExpr(vdec,includeIdentifiers){n.VariableDeclaration.assert(vdec);var exprs=[];vdec.declarations.forEach(function(dec){vars[dec.id.name]=dec.id;if(dec.init){exprs.push(b.assignmentExpression("=",dec.id,dec.init))}else if(includeIdentifiers){exprs.push(dec.id)}});if(exprs.length===0)return null;if(exprs.length===1)return exprs[0];return b.sequenceExpression(exprs)}types.visit(funPath.get("body"),{visitVariableDeclaration:function(path){var expr=varDeclToExpr(path.value,false);if(expr===null){path.replace()}else{return b.expressionStatement(expr)}return false},visitForStatement:function(path){var init=path.value.init;if(n.VariableDeclaration.check(init)){path.get("init").replace(varDeclToExpr(init,false))}this.traverse(path)},visitForInStatement:function(path){var left=path.value.left;if(n.VariableDeclaration.check(left)){path.get("left").replace(varDeclToExpr(left,true))}this.traverse(path)},visitFunctionDeclaration:function(path){var node=path.value;vars[node.id.name]=node.id;var parentNode=path.parent.node;var assignment=b.expressionStatement(b.assignmentExpression("=",node.id,b.functionExpression(node.id,node.params,node.body,node.generator,node.expression)));if(n.BlockStatement.check(path.parent.node)){path.parent.get("body").unshift(assignment);path.replace()}else{path.replace(assignment)}return false},visitFunctionExpression:function(path){return false}});var paramNames={};funPath.get("params").each(function(paramPath){var param=paramPath.value;if(n.Identifier.check(param)){paramNames[param.name]=param}else{}});var declarations=[];Object.keys(vars).forEach(function(name){if(!hasOwn.call(paramNames,name)){declarations.push(b.variableDeclarator(vars[name],null))}});if(declarations.length===0){return null}return b.variableDeclaration("var",declarations)}},{assert:127,"ast-types":125}],276:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var n=types.namedTypes;var b=types.builders;var inherits=require("util").inherits;var hasOwn=Object.prototype.hasOwnProperty;function Entry(){assert.ok(this instanceof Entry)}function FunctionEntry(returnLoc){Entry.call(this);n.Literal.assert(returnLoc);this.returnLoc=returnLoc}inherits(FunctionEntry,Entry);exports.FunctionEntry=FunctionEntry;function LoopEntry(breakLoc,continueLoc,label){Entry.call(this);n.Literal.assert(breakLoc);n.Literal.assert(continueLoc);if(label){n.Identifier.assert(label)}else{label=null}this.breakLoc=breakLoc;this.continueLoc=continueLoc;this.label=label}inherits(LoopEntry,Entry);exports.LoopEntry=LoopEntry;function SwitchEntry(breakLoc){Entry.call(this);n.Literal.assert(breakLoc);this.breakLoc=breakLoc}inherits(SwitchEntry,Entry);exports.SwitchEntry=SwitchEntry;function TryEntry(firstLoc,catchEntry,finallyEntry){Entry.call(this);n.Literal.assert(firstLoc);if(catchEntry){assert.ok(catchEntry instanceof CatchEntry)}else{catchEntry=null}if(finallyEntry){assert.ok(finallyEntry instanceof FinallyEntry)}else{finallyEntry=null}assert.ok(catchEntry||finallyEntry);this.firstLoc=firstLoc;this.catchEntry=catchEntry;this.finallyEntry=finallyEntry}inherits(TryEntry,Entry);exports.TryEntry=TryEntry;function CatchEntry(firstLoc,paramId){Entry.call(this);n.Literal.assert(firstLoc);n.Identifier.assert(paramId);this.firstLoc=firstLoc;this.paramId=paramId}inherits(CatchEntry,Entry);exports.CatchEntry=CatchEntry;function FinallyEntry(firstLoc){Entry.call(this);n.Literal.assert(firstLoc);this.firstLoc=firstLoc}inherits(FinallyEntry,Entry);exports.FinallyEntry=FinallyEntry;function LabeledEntry(breakLoc,label){Entry.call(this);n.Literal.assert(breakLoc);n.Identifier.assert(label);this.breakLoc=breakLoc;this.label=label}inherits(LabeledEntry,Entry);exports.LabeledEntry=LabeledEntry;function LeapManager(emitter){assert.ok(this instanceof LeapManager);var Emitter=require("./emit").Emitter;assert.ok(emitter instanceof Emitter);this.emitter=emitter;this.entryStack=[new FunctionEntry(emitter.finalLoc)]}var LMp=LeapManager.prototype;exports.LeapManager=LeapManager;LMp.withEntry=function(entry,callback){assert.ok(entry instanceof Entry);this.entryStack.push(entry);try{callback.call(this.emitter)}finally{var popped=this.entryStack.pop();assert.strictEqual(popped,entry)}};LMp._findLeapLocation=function(property,label){for(var i=this.entryStack.length-1;i>=0;--i){var entry=this.entryStack[i];var loc=entry[property];if(loc){if(label){if(entry.label&&entry.label.name===label.name){return loc}}else if(entry instanceof LabeledEntry){}else{return loc}}}return null};LMp.getBreakLoc=function(label){return this._findLeapLocation("breakLoc",label)};LMp.getContinueLoc=function(label){return this._findLeapLocation("continueLoc",label)}},{"./emit":274,assert:127,"ast-types":125,util:152}],277:[function(require,module,exports){var assert=require("assert");var m=require("private").makeAccessor();var types=require("ast-types");var isArray=types.builtInTypes.array;var n=types.namedTypes;var hasOwn=Object.prototype.hasOwnProperty;function makePredicate(propertyName,knownTypes){function onlyChildren(node){n.Node.assert(node);var result=false;function check(child){if(result){}else if(isArray.check(child)){child.some(check)}else if(n.Node.check(child)){assert.strictEqual(result,false);result=predicate(child)}return result}types.eachField(node,function(name,child){check(child)});return result}function predicate(node){n.Node.assert(node);var meta=m(node);if(hasOwn.call(meta,propertyName))return meta[propertyName];if(hasOwn.call(opaqueTypes,node.type))return meta[propertyName]=false;if(hasOwn.call(knownTypes,node.type))return meta[propertyName]=true;return meta[propertyName]=onlyChildren(node)}predicate.onlyChildren=onlyChildren;return predicate}var opaqueTypes={FunctionExpression:true};var sideEffectTypes={CallExpression:true,ForInStatement:true,UnaryExpression:true,BinaryExpression:true,AssignmentExpression:true,UpdateExpression:true,NewExpression:true};var leapTypes={YieldExpression:true,BreakStatement:true,ContinueStatement:true,ReturnStatement:true,ThrowStatement:true};for(var type in leapTypes){if(hasOwn.call(leapTypes,type)){sideEffectTypes[type]=leapTypes[type]}}exports.hasSideEffects=makePredicate("hasSideEffects",sideEffectTypes);exports.containsLeap=makePredicate("containsLeap",leapTypes)},{assert:127,"ast-types":125,"private":273}],278:[function(require,module,exports){var assert=require("assert");var types=require("ast-types");var n=types.namedTypes;var b=types.builders;var hasOwn=Object.prototype.hasOwnProperty;exports.defaults=function(obj){var len=arguments.length;var extension;for(var i=1;i<len;++i){if(extension=arguments[i]){for(var key in extension){if(hasOwn.call(extension,key)&&!hasOwn.call(obj,key)){obj[key]=extension[key]}}}}return obj};exports.runtimeProperty=function(name){return b.memberExpression(b.identifier("regeneratorRuntime"),b.identifier(name),false)};exports.isReference=function(path,name){var node=path.value;if(!n.Identifier.check(node)){return false}if(name&&node.name!==name){return false}var parent=path.parent.value;switch(parent.type){case"VariableDeclarator":return path.name==="init";case"MemberExpression":return path.name==="object"||parent.computed&&path.name==="property";case"FunctionExpression":case"FunctionDeclaration":case"ArrowFunctionExpression":if(path.name==="id"){return false}if(parent.params===path.parentPath&&parent.params[path.name]===node){return false}return true;case"ClassDeclaration":case"ClassExpression":return path.name!=="id";case"CatchClause":return path.name!=="param";case"Property":case"MethodDefinition":return path.name!=="key";case"ImportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"LabeledStatement":return false;default:return true}}},{assert:127,"ast-types":125}],279:[function(require,module,exports){var assert=require("assert");var fs=require("fs");var types=require("ast-types");var n=types.namedTypes;var b=types.builders;var isArray=types.builtInTypes.array;var isObject=types.builtInTypes.object;var NodePath=types.NodePath;var hoist=require("./hoist").hoist;var Emitter=require("./emit").Emitter;var runtimeProperty=require("./util").runtimeProperty;exports.transform=function transform(node,options){options=options||{};var path=node instanceof NodePath?node:new NodePath(node);visitor.visit(path,options);node=path.value;options.madeChanges=visitor.wasChangeReported();return node};var visitor=types.PathVisitor.fromMethodsObject({reset:function(node,options){this.options=options},visitFunction:function(path){this.traverse(path);var node=path.value;var shouldTransformAsync=node.async&&!this.options.disableAsync;if(!node.generator&&!shouldTransformAsync){return}this.reportChanged();node.generator=false;if(node.expression){node.expression=false;node.body=b.blockStatement([b.returnStatement(node.body)])}if(shouldTransformAsync){awaitVisitor.visit(path.get("body"))}var outerFnId=node.id||(node.id=path.scope.parent.declareTemporary("callee$"));var outerBody=[];var bodyBlock=path.value.body;bodyBlock.body=bodyBlock.body.filter(function(node){if(node&&node._blockHoist!=null){outerBody.push(node);return false}else{return true}});var innerFnId=b.identifier(node.id.name+"$");var contextId=path.scope.declareTemporary("context$");var vars=hoist(path);var emitter=new Emitter(contextId);emitter.explode(path.get("body"));if(vars&&vars.declarations.length>0){outerBody.push(vars)}var wrapArgs=[emitter.getContextFunction(innerFnId),shouldTransformAsync?b.literal(null):outerFnId,b.thisExpression()];var tryEntryList=emitter.getTryEntryList();if(tryEntryList){wrapArgs.push(tryEntryList)}var wrapCall=b.callExpression(shouldTransformAsync?runtimeProperty("async"):runtimeProperty("wrap"),wrapArgs);outerBody.push(b.returnStatement(wrapCall));node.body=b.blockStatement(outerBody);if(shouldTransformAsync){node.async=false;return}if(n.FunctionDeclaration.check(node)){var pp=path.parent;while(pp&&!(n.BlockStatement.check(pp.value)||n.Program.check(pp.value))){pp=pp.parent}if(!pp){return}path.replace();node.type="FunctionExpression";var varDecl=b.variableDeclaration("var",[b.variableDeclarator(node.id,b.callExpression(runtimeProperty("mark"),[node]))]);if(node.comments){varDecl.leadingComments=node.leadingComments;varDecl.trailingComments=node.trailingComments;node.leadingComments=null;node.trailingComments=null}varDecl._blockHoist=3;var bodyPath=pp.get("body");var bodyLen=bodyPath.value.length;bodyPath.push(varDecl)}else{n.FunctionExpression.assert(node);return b.callExpression(runtimeProperty("mark"),[node])}}});function shouldNotHoistAbove(stmtPath){var value=stmtPath.value;n.Statement.assert(value);if(n.ExpressionStatement.check(value)&&n.Literal.check(value.expression)&&value.expression.value==="use strict"){return true}if(n.VariableDeclaration.check(value)){for(var i=0;i<value.declarations.length;++i){var decl=value.declarations[i];if(n.CallExpression.check(decl.init)&&types.astNodesAreEquivalent(decl.init.callee,runtimeProperty("mark"))){return true}}}return false}var awaitVisitor=types.PathVisitor.fromMethodsObject({visitFunction:function(path){return false},visitAwaitExpression:function(path){return b.yieldExpression(path.value.argument,false)}})},{"./emit":274,"./hoist":275,"./util":278,assert:127,"ast-types":125,fs:126}],280:[function(require,module,exports){(function(__dirname){var assert=require("assert");var path=require("path");var fs=require("fs");var through=require("through");var transform=require("./lib/visit").transform;var utils=require("./lib/util");var types=require("ast-types");var genOrAsyncFunExp=/\bfunction\s*\*|\basync\b/;var blockBindingExp=/\b(let|const)\s+/;function exports(file,options){var data=[];return through(write,end);function write(buf){data.push(buf)}function end(){this.queue(compile(data.join(""),options).code);this.queue(null)}}module.exports=exports;function runtime(){require("./runtime")}exports.runtime=runtime;runtime.path=path.join(__dirname,"runtime.js");exports.transform=transform}).call(this,"/node_modules/regenerator-6to5")},{"./lib/util":278,"./lib/visit":279,"./runtime":282,assert:127,"ast-types":125,fs:126,path:135,through:281}],281:[function(require,module,exports){(function(process){var Stream=require("stream");exports=module.exports=through;through.through=through;function through(write,end,opts){write=write||function(data){this.queue(data)};end=end||function(){this.queue(null)};var ended=false,destroyed=false,buffer=[],_ended=false;var stream=new Stream;stream.readable=stream.writable=true;stream.paused=false;stream.autoDestroy=!(opts&&opts.autoDestroy===false);stream.write=function(data){write.call(this,data);return!stream.paused};function drain(){while(buffer.length&&!stream.paused){var data=buffer.shift();if(null===data)return stream.emit("end");else stream.emit("data",data)}}stream.queue=stream.push=function(data){if(_ended)return stream;if(data==null)_ended=true;buffer.push(data);drain();return stream};stream.on("end",function(){stream.readable=false;if(!stream.writable&&stream.autoDestroy)process.nextTick(function(){stream.destroy()})});function _end(){stream.writable=false;end.call(stream);if(!stream.readable&&stream.autoDestroy)stream.destroy()}stream.end=function(data){if(ended)return;ended=true;if(arguments.length)stream.write(data);_end();return stream};stream.destroy=function(){if(destroyed)return;destroyed=true;ended=true;buffer.length=0;stream.writable=stream.readable=false;stream.emit("close");return stream};stream.pause=function(){if(stream.paused)return;stream.paused=true;return stream};stream.resume=function(){if(stream.paused){stream.paused=false;stream.emit("resume")}drain();if(!stream.paused)stream.emit("drain");return stream};return stream}}).call(this,require("_process"))},{_process:136,stream:148}],282:[function(require,module,exports){(function(global){!function(global){"use strict";var hasOwn=Object.prototype.hasOwnProperty;var undefined;var iteratorSymbol=typeof Symbol==="function"&&Symbol.iterator||"@@iterator";var inModule=typeof module==="object";var runtime=global.regeneratorRuntime;if(runtime){if(inModule){module.exports=runtime}return}runtime=global.regeneratorRuntime=inModule?module.exports:{};function wrap(innerFn,outerFn,self,tryList){return new Generator(innerFn,outerFn,self||null,tryList||[])}runtime.wrap=wrap;function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)}}catch(err){return{type:"throw",arg:err}}}var GenStateSuspendedStart="suspendedStart";var GenStateSuspendedYield="suspendedYield";var GenStateExecuting="executing";var GenStateCompleted="completed";var ContinueSentinel={};function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype;GeneratorFunction.prototype=Gp.constructor=GeneratorFunctionPrototype;GeneratorFunctionPrototype.constructor=GeneratorFunction;GeneratorFunction.displayName="GeneratorFunction";runtime.isGeneratorFunction=function(genFun){var ctor=typeof genFun==="function"&&genFun.constructor;return ctor?ctor===GeneratorFunction||(ctor.displayName||ctor.name)==="GeneratorFunction":false};runtime.mark=function(genFun){genFun.__proto__=GeneratorFunctionPrototype;genFun.prototype=Object.create(Gp);return genFun};runtime.async=function(innerFn,outerFn,self,tryList){return new Promise(function(resolve,reject){var generator=wrap(innerFn,outerFn,self,tryList);var callNext=step.bind(generator.next);var callThrow=step.bind(generator["throw"]);function step(arg){var record=tryCatch(this,null,arg);if(record.type==="throw"){reject(record.arg);return}var info=record.arg;if(info.done){resolve(info.value)}else{Promise.resolve(info.value).then(callNext,callThrow)}}callNext()})};function Generator(innerFn,outerFn,self,tryList){var generator=outerFn?Object.create(outerFn.prototype):this;var context=new Context(tryList);var state=GenStateSuspendedStart;function invoke(method,arg){if(state===GenStateExecuting){throw new Error("Generator is already running")}if(state===GenStateCompleted){return doneResult()}while(true){var delegate=context.delegate;if(delegate){var record=tryCatch(delegate.iterator[method],delegate.iterator,arg);if(record.type==="throw"){context.delegate=null;method="throw";arg=record.arg;continue}method="next";arg=undefined;var info=record.arg;if(info.done){context[delegate.resultName]=info.value;context.next=delegate.nextLoc}else{state=GenStateSuspendedYield;return info}context.delegate=null}if(method==="next"){if(state===GenStateSuspendedStart&&typeof arg!=="undefined"){throw new TypeError("attempt to send "+JSON.stringify(arg)+" to newborn generator")}if(state===GenStateSuspendedYield){context.sent=arg}else{delete context.sent}}else if(method==="throw"){if(state===GenStateSuspendedStart){state=GenStateCompleted;throw arg}if(context.dispatchException(arg)){method="next";arg=undefined}}else if(method==="return"){context.abrupt("return",arg)}state=GenStateExecuting;var record=tryCatch(innerFn,self,context);if(record.type==="normal"){state=context.done?GenStateCompleted:GenStateSuspendedYield;var info={value:record.arg,done:context.done};if(record.arg===ContinueSentinel){if(context.delegate&&method==="next"){arg=undefined}}else{return info}}else if(record.type==="throw"){state=GenStateCompleted;if(method==="next"){context.dispatchException(record.arg)}else{arg=record.arg}}}}generator.next=invoke.bind(generator,"next");generator["throw"]=invoke.bind(generator,"throw");generator["return"]=invoke.bind(generator,"return");return generator}Gp[iteratorSymbol]=function(){return this};Gp.toString=function(){return"[object Generator]"};function pushTryEntry(triple){var entry={tryLoc:triple[0]};if(1 in triple){entry.catchLoc=triple[1]}if(2 in triple){entry.finallyLoc=triple[2]}this.tryEntries.push(entry)}function resetTryEntry(entry,i){var record=entry.completion||{};record.type=i===0?"normal":"return";delete record.arg;entry.completion=record}function Context(tryList){this.tryEntries=[{tryLoc:"root"}];tryList.forEach(pushTryEntry,this);this.reset()}runtime.keys=function(object){var keys=[];for(var key in object){keys.push(key)}keys.reverse();return function next(){while(keys.length){var key=keys.pop();if(key in object){next.value=key;next.done=false;return next}}next.done=true;return next}};function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod){return iteratorMethod.call(iterable)}if(typeof iterable.next==="function"){return iterable}if(!isNaN(iterable.length)){var i=-1,next=function next(){while(++i<iterable.length){if(hasOwn.call(iterable,i)){next.value=iterable[i];next.done=false;return next}}next.value=undefined;next.done=true;return next};return next.next=next}}return{next:doneResult}}runtime.values=values;function doneResult(){return{value:undefined,done:true}}Context.prototype={constructor:Context,reset:function(){this.prev=0;this.next=0;this.sent=undefined;this.done=false;this.delegate=null;this.tryEntries.forEach(resetTryEntry);for(var tempIndex=0,tempName;hasOwn.call(this,tempName="t"+tempIndex)||tempIndex<20;++tempIndex){this[tempName]=null}},stop:function(){this.done=true;var rootEntry=this.tryEntries[0];var rootRecord=rootEntry.completion;if(rootRecord.type==="throw"){throw rootRecord.arg}return this.rval},dispatchException:function(exception){if(this.done){throw exception}var context=this;function handle(loc,caught){record.type="throw";record.arg=exception;context.next=loc;return!!caught}for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];var record=entry.completion;if(entry.tryLoc==="root"){return handle("end")}if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc");var hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev<entry.catchLoc){return handle(entry.catchLoc,true)}else if(this.prev<entry.finallyLoc){return handle(entry.finallyLoc)}}else if(hasCatch){if(this.prev<entry.catchLoc){return handle(entry.catchLoc,true)}}else if(hasFinally){if(this.prev<entry.finallyLoc){return handle(entry.finallyLoc)}}else{throw new Error("try statement without catch or finally")}}}},_findFinallyEntry:function(finallyLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&(entry.finallyLoc===finallyLoc||this.prev<entry.finallyLoc)){return entry}}},abrupt:function(type,arg){var entry=this._findFinallyEntry();var record=entry?entry.completion:{};record.type=type;record.arg=arg;if(entry){this.next=entry.finallyLoc}else{this.complete(record)}return ContinueSentinel},complete:function(record){if(record.type==="throw"){throw record.arg}if(record.type==="break"||record.type==="continue"){this.next=record.arg}else if(record.type==="return"){this.rval=record.arg;this.next="end"}return ContinueSentinel},finish:function(finallyLoc){var entry=this._findFinallyEntry(finallyLoc);return this.complete(entry.completion)},"catch":function(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if(record.type==="throw"){var thrown=record.arg;resetTryEntry(entry,i)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function(iterable,resultName,nextLoc){this.delegate={iterator:values(iterable),resultName:resultName,nextLoc:nextLoc};return ContinueSentinel}}}(typeof global==="object"?global:typeof window==="object"?window:this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],283:[function(require,module,exports){var regenerate=require("regenerate");exports.REGULAR={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,65535),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,65535),w:regenerate(95).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,65535)};exports.UNICODE={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,1114111),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:regenerate(95).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)};exports.UNICODE_IGNORE_CASE={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,1114111),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:regenerate(95,383,8490).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(75,83,96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)}},{regenerate:285}],284:[function(require,module,exports){module.exports={75:8490,83:383,107:8490,115:383,181:924,197:8491,383:83,452:453,453:452,455:456,456:455,458:459,459:458,497:498,498:497,837:8126,914:976,917:1013,920:1012,921:8126,922:1008,924:181,928:982,929:1009,931:962,934:981,937:8486,962:931,976:914,977:1012,981:934,982:928,1008:922,1009:929,1012:[920,977],1013:917,7776:7835,7835:7776,8126:[837,921],8486:937,8490:75,8491:197,66560:66600,66561:66601,66562:66602,66563:66603,66564:66604,66565:66605,66566:66606,66567:66607,66568:66608,66569:66609,66570:66610,66571:66611,66572:66612,66573:66613,66574:66614,66575:66615,66576:66616,66577:66617,66578:66618,66579:66619,66580:66620,66581:66621,66582:66622,66583:66623,66584:66624,66585:66625,66586:66626,66587:66627,66588:66628,66589:66629,66590:66630,66591:66631,66592:66632,66593:66633,66594:66634,66595:66635,66596:66636,66597:66637,66598:66638,66599:66639,66600:66560,66601:66561,66602:66562,66603:66563,66604:66564,66605:66565,66606:66566,66607:66567,66608:66568,66609:66569,66610:66570,66611:66571,66612:66572,66613:66573,66614:66574,66615:66575,66616:66576,66617:66577,66618:66578,66619:66579,66620:66580,66621:66581,66622:66582,66623:66583,66624:66584,66625:66585,66626:66586,66627:66587,66628:66588,66629:66589,66630:66590,66631:66591,66632:66592,66633:66593,66634:66594,66635:66595,66636:66596,66637:66597,66638:66598,66639:66599,71840:71872,71841:71873,71842:71874,71843:71875,71844:71876,71845:71877,71846:71878,71847:71879,71848:71880,71849:71881,71850:71882,71851:71883,71852:71884,71853:71885,71854:71886,71855:71887,71856:71888,71857:71889,71858:71890,71859:71891,71860:71892,71861:71893,71862:71894,71863:71895,71864:71896,71865:71897,71866:71898,71867:71899,71868:71900,71869:71901,71870:71902,71871:71903,71872:71840,71873:71841,71874:71842,71875:71843,71876:71844,71877:71845,71878:71846,71879:71847,71880:71848,71881:71849,71882:71850,71883:71851,71884:71852,71885:71853,71886:71854,71887:71855,71888:71856,71889:71857,71890:71858,71891:71859,71892:71860,71893:71861,71894:71862,71895:71863,71896:71864,71897:71865,71898:71866,71899:71867,71900:71868,71901:71869,71902:71870,71903:71871}},{}],285:[function(require,module,exports){(function(global){(function(root){var freeExports=typeof exports=="object"&&exports;var freeModule=typeof module=="object"&&module&&module.exports==freeExports&&module;var freeGlobal=typeof global=="object"&&global;if(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal){root=freeGlobal}var ERRORS={rangeOrder:"A range’s `stop` value must be greater than or equal "+"to the `start` value.",codePointRange:"Invalid code point value. Code points range from "+"U+000000 to U+10FFFF."};var HIGH_SURROGATE_MIN=55296;var HIGH_SURROGATE_MAX=56319;var LOW_SURROGATE_MIN=56320;var LOW_SURROGATE_MAX=57343;var regexNull=/\\x00([^0123456789]|$)/g;var object={};var hasOwnProperty=object.hasOwnProperty;var extend=function(destination,source){var key;for(key in source){if(hasOwnProperty.call(source,key)){destination[key]=source[key]}}return destination};var forEach=function(array,callback){var index=-1;var length=array.length;while(++index<length){callback(array[index],index)}};var toString=object.toString;var isArray=function(value){return toString.call(value)=="[object Array]"};var isNumber=function(value){return typeof value=="number"||toString.call(value)=="[object Number]"};var zeroes="0000";var pad=function(number,totalCharacters){var string=String(number);return string.length<totalCharacters?(zeroes+string).slice(-totalCharacters):string};var hex=function(number){return Number(number).toString(16).toUpperCase()};var slice=[].slice;var dataFromCodePoints=function(codePoints){var index=-1;var length=codePoints.length;var max=length-1;var result=[];var isStart=true;var tmp;var previous=0;while(++index<length){tmp=codePoints[index];if(isStart){result.push(tmp);previous=tmp;isStart=false}else{if(tmp==previous+1){if(index!=max){previous=tmp;continue}else{isStart=true;result.push(tmp+1)}}else{result.push(previous+1,tmp);previous=tmp}}}if(!isStart){result.push(tmp+1)}return result};var dataRemove=function(data,codePoint){var index=0;var start;var end;var length=data.length;while(index<length){start=data[index];end=data[index+1];if(codePoint>=start&&codePoint<end){if(codePoint==start){if(end==start+1){data.splice(index,2);return data}else{data[index]=codePoint+1;return data}}else if(codePoint==end-1){data[index+1]=codePoint;return data}else{data.splice(index,2,start,codePoint,codePoint+1,end);return data}}index+=2}return data};var dataRemoveRange=function(data,rangeStart,rangeEnd){if(rangeEnd<rangeStart){throw Error(ERRORS.rangeOrder)}var index=0;var start;var end;while(index<data.length){start=data[index];end=data[index+1]-1;if(start>rangeEnd){return data}if(rangeStart<=start&&rangeEnd>=end){data.splice(index,2);continue}if(rangeStart>=start&&rangeEnd<end){if(rangeStart==start){data[index]=rangeEnd+1;data[index+1]=end+1;return data}data.splice(index,2,start,rangeStart,rangeEnd+1,end+1);return data}if(rangeStart>=start&&rangeStart<=end){data[index+1]=rangeStart}else if(rangeEnd>=start&&rangeEnd<=end){data[index]=rangeEnd+1; return data}index+=2}return data};var dataAdd=function(data,codePoint){var index=0;var start;var end;var lastIndex=null;var length=data.length;if(codePoint<0||codePoint>1114111){throw RangeError(ERRORS.codePointRange)}while(index<length){start=data[index];end=data[index+1];if(codePoint>=start&&codePoint<end){return data}if(codePoint==start-1){data[index]=codePoint;return data}if(start>codePoint){data.splice(lastIndex!=null?lastIndex+2:0,0,codePoint,codePoint+1);return data}if(codePoint==end){if(codePoint+1==data[index+2]){data.splice(index,4,start,data[index+3]);return data}data[index+1]=codePoint+1;return data}lastIndex=index;index+=2}data.push(codePoint,codePoint+1);return data};var dataAddData=function(dataA,dataB){var index=0;var start;var end;var data=dataA.slice();var length=dataB.length;while(index<length){start=dataB[index];end=dataB[index+1]-1;if(start==end){data=dataAdd(data,start)}else{data=dataAddRange(data,start,end)}index+=2}return data};var dataRemoveData=function(dataA,dataB){var index=0;var start;var end;var data=dataA.slice();var length=dataB.length;while(index<length){start=dataB[index];end=dataB[index+1]-1;if(start==end){data=dataRemove(data,start)}else{data=dataRemoveRange(data,start,end)}index+=2}return data};var dataAddRange=function(data,rangeStart,rangeEnd){if(rangeEnd<rangeStart){throw Error(ERRORS.rangeOrder)}if(rangeStart<0||rangeStart>1114111||rangeEnd<0||rangeEnd>1114111){throw RangeError(ERRORS.codePointRange)}var index=0;var start;var end;var added=false;var length=data.length;while(index<length){start=data[index];end=data[index+1];if(added){if(start==rangeEnd+1){data.splice(index-1,2);return data}if(start>rangeEnd){return data}if(start>=rangeStart&&start<=rangeEnd){if(end>rangeStart&&end-1<=rangeEnd){data.splice(index,2);index-=2}else{data.splice(index-1,2);index-=2}}}else if(start==rangeEnd+1){data[index]=rangeStart;return data}else if(start>rangeEnd){data.splice(index,0,rangeStart,rangeEnd+1);return data}else if(rangeStart>=start&&rangeStart<end&&rangeEnd+1<=end){return data}else if(rangeStart>=start&&rangeStart<end||end==rangeStart){data[index+1]=rangeEnd+1;added=true}else if(rangeStart<=start&&rangeEnd+1>=end){data[index]=rangeStart;data[index+1]=rangeEnd+1;added=true}index+=2}if(!added){data.push(rangeStart,rangeEnd+1)}return data};var dataContains=function(data,codePoint){var index=0;var length=data.length;var start=data[index];var end=data[length-1];if(length>=2){if(codePoint<start||codePoint>end){return false}}while(index<length){start=data[index];end=data[index+1];if(codePoint>=start&&codePoint<end){return true}index+=2}return false};var dataIntersection=function(data,codePoints){var index=0;var length=codePoints.length;var codePoint;var result=[];while(index<length){codePoint=codePoints[index];if(dataContains(data,codePoint)){result.push(codePoint)}++index}return dataFromCodePoints(result)};var dataIsEmpty=function(data){return!data.length};var dataIsSingleton=function(data){return data.length==2&&data[0]+1==data[1]};var dataToArray=function(data){var index=0;var start;var end;var result=[];var length=data.length;while(index<length){start=data[index];end=data[index+1];while(start<end){result.push(start);++start}index+=2}return result};var floor=Math.floor;var highSurrogate=function(codePoint){return parseInt(floor((codePoint-65536)/1024)+HIGH_SURROGATE_MIN,10)};var lowSurrogate=function(codePoint){return parseInt((codePoint-65536)%1024+LOW_SURROGATE_MIN,10)};var stringFromCharCode=String.fromCharCode;var codePointToString=function(codePoint){var string;if(codePoint==9){string="\\t"}else if(codePoint==10){string="\\n"}else if(codePoint==12){string="\\f"}else if(codePoint==13){string="\\r"}else if(codePoint==92){string="\\\\"}else if(codePoint==36||codePoint>=40&&codePoint<=43||codePoint==45||codePoint==46||codePoint==63||codePoint>=91&&codePoint<=94||codePoint>=123&&codePoint<=125){string="\\"+stringFromCharCode(codePoint)}else if(codePoint>=32&&codePoint<=126){string=stringFromCharCode(codePoint)}else if(codePoint<=255){string="\\x"+pad(hex(codePoint),2)}else{string="\\u"+pad(hex(codePoint),4)}return string};var symbolToCodePoint=function(symbol){var length=symbol.length;var first=symbol.charCodeAt(0);var second;if(first>=HIGH_SURROGATE_MIN&&first<=HIGH_SURROGATE_MAX&&length>1){second=symbol.charCodeAt(1);return(first-HIGH_SURROGATE_MIN)*1024+second-LOW_SURROGATE_MIN+65536}return first};var createBMPCharacterClasses=function(data){var result="";var index=0;var start;var end;var length=data.length;if(dataIsSingleton(data)){return codePointToString(data[0])}while(index<length){start=data[index];end=data[index+1]-1;if(start==end){result+=codePointToString(start)}else if(start+1==end){result+=codePointToString(start)+codePointToString(end)}else{result+=codePointToString(start)+"-"+codePointToString(end)}index+=2}return"["+result+"]"};var splitAtBMP=function(data){var loneHighSurrogates=[];var loneLowSurrogates=[];var bmp=[];var astral=[];var index=0;var start;var end;var length=data.length;while(index<length){start=data[index];end=data[index+1]-1;if(start<HIGH_SURROGATE_MIN){if(end<HIGH_SURROGATE_MIN){bmp.push(start,end+1)}if(end>=HIGH_SURROGATE_MIN&&end<=HIGH_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,end+1)}if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,end+1)}if(end>LOW_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>=HIGH_SURROGATE_MIN&&start<=HIGH_SURROGATE_MAX){if(end>=HIGH_SURROGATE_MIN&&end<=HIGH_SURROGATE_MAX){loneHighSurrogates.push(start,end+1)}if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){loneHighSurrogates.push(start,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,end+1)}if(end>LOW_SURROGATE_MAX){loneHighSurrogates.push(start,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>=LOW_SURROGATE_MIN&&start<=LOW_SURROGATE_MAX){if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){loneLowSurrogates.push(start,end+1)}if(end>LOW_SURROGATE_MAX){loneLowSurrogates.push(start,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>LOW_SURROGATE_MAX&&start<=65535){if(end<=65535){bmp.push(start,end+1)}else{bmp.push(start,65535+1);astral.push(65535+1,end+1)}}else{astral.push(start,end+1)}index+=2}return{loneHighSurrogates:loneHighSurrogates,loneLowSurrogates:loneLowSurrogates,bmp:bmp,astral:astral}};var optimizeSurrogateMappings=function(surrogateMappings){var result=[];var tmpLow=[];var addLow=false;var mapping;var nextMapping;var highSurrogates;var lowSurrogates;var nextHighSurrogates;var nextLowSurrogates;var index=-1;var length=surrogateMappings.length;while(++index<length){mapping=surrogateMappings[index];nextMapping=surrogateMappings[index+1];if(!nextMapping){result.push(mapping);continue}highSurrogates=mapping[0];lowSurrogates=mapping[1];nextHighSurrogates=nextMapping[0];nextLowSurrogates=nextMapping[1];tmpLow=lowSurrogates;while(nextHighSurrogates&&highSurrogates[0]==nextHighSurrogates[0]&&highSurrogates[1]==nextHighSurrogates[1]){if(dataIsSingleton(nextLowSurrogates)){tmpLow=dataAdd(tmpLow,nextLowSurrogates[0])}else{tmpLow=dataAddRange(tmpLow,nextLowSurrogates[0],nextLowSurrogates[1]-1)}++index;mapping=surrogateMappings[index];highSurrogates=mapping[0];lowSurrogates=mapping[1];nextMapping=surrogateMappings[index+1];nextHighSurrogates=nextMapping&&nextMapping[0];nextLowSurrogates=nextMapping&&nextMapping[1];addLow=true}result.push([highSurrogates,addLow?tmpLow:lowSurrogates]);addLow=false}return optimizeByLowSurrogates(result)};var optimizeByLowSurrogates=function(surrogateMappings){if(surrogateMappings.length==1){return surrogateMappings}var index=-1;var innerIndex=-1;while(++index<surrogateMappings.length){var mapping=surrogateMappings[index];var lowSurrogates=mapping[1];var lowSurrogateStart=lowSurrogates[0];var lowSurrogateEnd=lowSurrogates[1];innerIndex=index;while(++innerIndex<surrogateMappings.length){var otherMapping=surrogateMappings[innerIndex];var otherLowSurrogates=otherMapping[1];var otherLowSurrogateStart=otherLowSurrogates[0];var otherLowSurrogateEnd=otherLowSurrogates[1];if(lowSurrogateStart==otherLowSurrogateStart&&lowSurrogateEnd==otherLowSurrogateEnd){if(dataIsSingleton(otherMapping[0])){mapping[0]=dataAdd(mapping[0],otherMapping[0][0])}else{mapping[0]=dataAddRange(mapping[0],otherMapping[0][0],otherMapping[0][1]-1)}surrogateMappings.splice(innerIndex,1);--innerIndex}}}return surrogateMappings};var surrogateSet=function(data){if(!data.length){return[]}var index=0;var start;var end;var startHigh;var startLow;var prevStartHigh=0;var prevEndHigh=0;var tmpLow=[];var endHigh;var endLow;var surrogateMappings=[];var length=data.length;var dataHigh=[];while(index<length){start=data[index];end=data[index+1]-1;startHigh=highSurrogate(start);startLow=lowSurrogate(start);endHigh=highSurrogate(end);endLow=lowSurrogate(end);var startsWithLowestLowSurrogate=startLow==LOW_SURROGATE_MIN;var endsWithHighestLowSurrogate=endLow==LOW_SURROGATE_MAX;var complete=false;if(startHigh==endHigh||startsWithLowestLowSurrogate&&endsWithHighestLowSurrogate){surrogateMappings.push([[startHigh,endHigh+1],[startLow,endLow+1]]);complete=true}else{surrogateMappings.push([[startHigh,startHigh+1],[startLow,LOW_SURROGATE_MAX+1]])}if(!complete&&startHigh+1<endHigh){if(endsWithHighestLowSurrogate){surrogateMappings.push([[startHigh+1,endHigh+1],[LOW_SURROGATE_MIN,endLow+1]]);complete=true}else{surrogateMappings.push([[startHigh+1,endHigh],[LOW_SURROGATE_MIN,LOW_SURROGATE_MAX+1]])}}if(!complete){surrogateMappings.push([[endHigh,endHigh+1],[LOW_SURROGATE_MIN,endLow+1]])}prevStartHigh=startHigh;prevEndHigh=endHigh;index+=2}return optimizeSurrogateMappings(surrogateMappings)};var createSurrogateCharacterClasses=function(surrogateMappings){var result=[];forEach(surrogateMappings,function(surrogateMapping){var highSurrogates=surrogateMapping[0];var lowSurrogates=surrogateMapping[1];result.push(createBMPCharacterClasses(highSurrogates)+createBMPCharacterClasses(lowSurrogates))});return result.join("|")};var createCharacterClassesFromData=function(data,bmpOnly){var result=[];var parts=splitAtBMP(data);var loneHighSurrogates=parts.loneHighSurrogates;var loneLowSurrogates=parts.loneLowSurrogates;var bmp=parts.bmp;var astral=parts.astral;var hasAstral=!dataIsEmpty(parts.astral);var hasLoneHighSurrogates=!dataIsEmpty(loneHighSurrogates);var hasLoneLowSurrogates=!dataIsEmpty(loneLowSurrogates);var surrogateMappings=surrogateSet(astral);if(bmpOnly){bmp=dataAddData(bmp,loneHighSurrogates);hasLoneHighSurrogates=false;bmp=dataAddData(bmp,loneLowSurrogates);hasLoneLowSurrogates=false}if(!dataIsEmpty(bmp)){result.push(createBMPCharacterClasses(bmp))}if(surrogateMappings.length){result.push(createSurrogateCharacterClasses(surrogateMappings))}if(hasLoneHighSurrogates){result.push(createBMPCharacterClasses(loneHighSurrogates)+"(?![\\uDC00-\\uDFFF])")}if(hasLoneLowSurrogates){result.push("(?:[^\\uD800-\\uDBFF]|^)"+createBMPCharacterClasses(loneLowSurrogates))}return result.join("|")};var regenerate=function(value){if(arguments.length>1){value=slice.call(arguments)}if(this instanceof regenerate){this.data=[];return value?this.add(value):this}return(new regenerate).add(value)};regenerate.version="1.2.0";var proto=regenerate.prototype;extend(proto,{add:function(value){var $this=this;if(value==null){return $this}if(value instanceof regenerate){$this.data=dataAddData($this.data,value.data);return $this}if(arguments.length>1){value=slice.call(arguments)}if(isArray(value)){forEach(value,function(item){$this.add(item)});return $this}$this.data=dataAdd($this.data,isNumber(value)?value:symbolToCodePoint(value));return $this},remove:function(value){var $this=this;if(value==null){return $this}if(value instanceof regenerate){$this.data=dataRemoveData($this.data,value.data);return $this}if(arguments.length>1){value=slice.call(arguments)}if(isArray(value)){forEach(value,function(item){$this.remove(item)});return $this}$this.data=dataRemove($this.data,isNumber(value)?value:symbolToCodePoint(value));return $this},addRange:function(start,end){var $this=this;$this.data=dataAddRange($this.data,isNumber(start)?start:symbolToCodePoint(start),isNumber(end)?end:symbolToCodePoint(end));return $this},removeRange:function(start,end){var $this=this;var startCodePoint=isNumber(start)?start:symbolToCodePoint(start);var endCodePoint=isNumber(end)?end:symbolToCodePoint(end);$this.data=dataRemoveRange($this.data,startCodePoint,endCodePoint);return $this},intersection:function(argument){var $this=this;var array=argument instanceof regenerate?dataToArray(argument.data):argument;$this.data=dataIntersection($this.data,array);return $this},contains:function(codePoint){return dataContains(this.data,isNumber(codePoint)?codePoint:symbolToCodePoint(codePoint))},clone:function(){var set=new regenerate;set.data=this.data.slice(0);return set},toString:function(options){var result=createCharacterClassesFromData(this.data,options?options.bmpOnly:false);return result.replace(regexNull,"\\0$1")},toRegExp:function(flags){return RegExp(this.toString(),flags||"")},valueOf:function(){return dataToArray(this.data)}});proto.toArray=proto.valueOf;if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){define(function(){return regenerate})}else if(freeExports&&!freeExports.nodeType){if(freeModule){freeModule.exports=regenerate}else{freeExports.regenerate=regenerate}}else{root.regenerate=regenerate}})(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],286:[function(require,module,exports){(function(global){(function(){"use strict";var objectTypes={"function":true,object:true};var root=objectTypes[typeof window]&&window||this;var oldRoot=root;var freeExports=objectTypes[typeof exports]&&exports;var freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module;var freeGlobal=freeExports&&freeModule&&typeof global=="object"&&global;if(freeGlobal&&(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal)){root=freeGlobal}var stringFromCharCode=String.fromCharCode;var floor=Math.floor;function fromCodePoint(){var MAX_SIZE=16384;var codeUnits=[];var highSurrogate;var lowSurrogate;var index=-1;var length=arguments.length;if(!length){return""}var result="";while(++index<length){var codePoint=Number(arguments[index]);if(!isFinite(codePoint)||codePoint<0||codePoint>1114111||floor(codePoint)!=codePoint){throw RangeError("Invalid code point: "+codePoint)}if(codePoint<=65535){codeUnits.push(codePoint)}else{codePoint-=65536;highSurrogate=(codePoint>>10)+55296;lowSurrogate=codePoint%1024+56320;codeUnits.push(highSurrogate,lowSurrogate)}if(index+1==length||codeUnits.length>MAX_SIZE){result+=stringFromCharCode.apply(null,codeUnits);codeUnits.length=0}}return result}function assertType(type,expected){if(expected.indexOf("|")==-1){if(type==expected){return}throw Error("Invalid node type: "+type)}expected=assertType.hasOwnProperty(expected)?assertType[expected]:assertType[expected]=RegExp("^(?:"+expected+")$");if(expected.test(type)){return}throw Error("Invalid node type: "+type)}function generate(node){var type=node.type;if(generate.hasOwnProperty(type)&&typeof generate[type]=="function"){return generate[type](node)}throw Error("Invalid node type: "+type)}function generateAlternative(node){assertType(node.type,"alternative");var terms=node.body,length=terms?terms.length:0;if(length==1){return generateTerm(terms[0])}else{var i=-1,result="";while(++i<length){result+=generateTerm(terms[i])}return result}}function generateAnchor(node){assertType(node.type,"anchor");switch(node.kind){case"start":return"^";case"end":return"$";case"boundary":return"\\b";case"not-boundary":return"\\B";default:throw Error("Invalid assertion")}}function generateAtom(node){assertType(node.type,"anchor|characterClass|characterClassEscape|dot|group|reference|value");return generate(node)}function generateCharacterClass(node){assertType(node.type,"characterClass");var classRanges=node.body,length=classRanges?classRanges.length:0;var i=-1,result="[";if(node.negative){result+="^"}while(++i<length){result+=generateClassAtom(classRanges[i])}result+="]";return result}function generateCharacterClassEscape(node){assertType(node.type,"characterClassEscape");return"\\"+node.value}function generateCharacterClassRange(node){assertType(node.type,"characterClassRange");var min=node.min,max=node.max;if(min.type=="characterClassRange"||max.type=="characterClassRange"){throw Error("Invalid character class range")}return generateClassAtom(min)+"-"+generateClassAtom(max)}function generateClassAtom(node){assertType(node.type,"anchor|characterClassEscape|characterClassRange|dot|value");return generate(node)}function generateDisjunction(node){assertType(node.type,"disjunction");var body=node.body,length=body?body.length:0;if(length==0){throw Error("No body")}else if(length==1){return generate(body[0])}else{var i=-1,result="";while(++i<length){if(i!=0){result+="|"}result+=generate(body[i])}return result}}function generateDot(node){assertType(node.type,"dot");return"."}function generateGroup(node){assertType(node.type,"group");var result="(";switch(node.behavior){case"normal":break;case"ignore":result+="?:";break;case"lookahead":result+="?=";break;case"negativeLookahead":result+="?!";break;default:throw Error("Invalid behaviour: "+node.behaviour)}var body=node.body,length=body?body.length:0;if(length==1){result+=generate(body[0])}else{var i=-1;while(++i<length){result+=generate(body[i])}}result+=")";return result}function generateQuantifier(node){assertType(node.type,"quantifier");var quantifier="",min=node.min,max=node.max;switch(max){case undefined:case null:switch(min){case 0:quantifier="*";break;case 1:quantifier="+";break;default:quantifier="{"+min+",}";break}break;default:if(min==max){quantifier="{"+min+"}"}else if(min==0&&max==1){quantifier="?"}else{quantifier="{"+min+","+max+"}"}break}if(!node.greedy){quantifier+="?"}return generateAtom(node.body[0])+quantifier}function generateReference(node){assertType(node.type,"reference");return"\\"+node.matchIndex}function generateTerm(node){assertType(node.type,"anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|value");return generate(node)}function generateValue(node){assertType(node.type,"value");var kind=node.kind,codePoint=node.codePoint;switch(kind){case"controlLetter":return"\\c"+fromCodePoint(codePoint+64);case"hexadecimalEscape":return"\\x"+("00"+codePoint.toString(16).toUpperCase()).slice(-2);case"identifier":return"\\"+fromCodePoint(codePoint);case"null":return"\\"+codePoint;case"octal":return"\\"+codePoint.toString(8);case"singleEscape":switch(codePoint){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 11:return"\\v";case 12:return"\\f";case 13:return"\\r";default:throw Error("Invalid codepoint: "+codePoint)}case"symbol":return fromCodePoint(codePoint);case"unicodeEscape":return"\\u"+("0000"+codePoint.toString(16).toUpperCase()).slice(-4);case"unicodeCodePointEscape":return"\\u{"+codePoint.toString(16).toUpperCase()+"}";default:throw Error("Unsupported node kind: "+kind)}}generate.alternative=generateAlternative;generate.anchor=generateAnchor;generate.characterClass=generateCharacterClass;generate.characterClassEscape=generateCharacterClassEscape;generate.characterClassRange=generateCharacterClassRange;generate.disjunction=generateDisjunction;generate.dot=generateDot;generate.group=generateGroup;generate.quantifier=generateQuantifier;generate.reference=generateReference;generate.value=generateValue;if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){define(function(){return{generate:generate}})}else if(freeExports&&freeModule){freeExports.generate=generate}else{root.regjsgen={generate:generate}}}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],287:[function(require,module,exports){(function(){function parse(str,flags){var hasUnicodeFlag=(flags||"").indexOf("u")!==-1;var pos=0;var closedCaptureCounter=0;function addRaw(node){node.raw=str.substring(node.range[0],node.range[1]);return node}function updateRawStart(node,start){node.range[0]=start;return addRaw(node)}function createAnchor(kind,rawLength){return addRaw({type:"anchor",kind:kind,range:[pos-rawLength,pos]})}function createValue(kind,codePoint,from,to){return addRaw({type:"value",kind:kind,codePoint:codePoint,range:[from,to]})}function createEscaped(kind,codePoint,value,fromOffset){fromOffset=fromOffset||0;return createValue(kind,codePoint,pos-(value.length+fromOffset),pos)}function createCharacter(matches){var _char=matches[0];var first=_char.charCodeAt(0);if(hasUnicodeFlag){var second;if(_char.length===1&&first>=55296&&first<=56319){second=lookahead().charCodeAt(0);if(second>=56320&&second<=57343){pos++;return createValue("symbol",(first-55296)*1024+second-56320+65536,pos-2,pos)}}}return createValue("symbol",first,pos-1,pos)}function createDisjunction(alternatives,from,to){return addRaw({type:"disjunction",body:alternatives,range:[from,to]})}function createDot(){return addRaw({type:"dot",range:[pos-1,pos]})}function createCharacterClassEscape(value){return addRaw({type:"characterClassEscape",value:value,range:[pos-2,pos]})}function createReference(matchIndex){return addRaw({type:"reference",matchIndex:parseInt(matchIndex,10),range:[pos-1-matchIndex.length,pos]})}function createGroup(behavior,disjunction,from,to){return addRaw({type:"group",behavior:behavior,body:disjunction,range:[from,to]})}function createQuantifier(min,max,from,to){if(to==null){from=pos-1;to=pos}return addRaw({type:"quantifier",min:min,max:max,greedy:true,body:null,range:[from,to]})}function createAlternative(terms,from,to){return addRaw({type:"alternative",body:terms,range:[from,to]})}function createCharacterClass(classRanges,negative,from,to){return addRaw({type:"characterClass",body:classRanges,negative:negative,range:[from,to]})}function createClassRange(min,max,from,to){if(min.codePoint>max.codePoint){throw SyntaxError("invalid range in character class")}return addRaw({type:"characterClassRange",min:min,max:max,range:[from,to]})}function flattenBody(body){if(body.type==="alternative"){return body.body}else{return[body]}}function isEmpty(obj){return obj.type==="empty"}function incr(amount){amount=amount||1;var res=str.substring(pos,pos+amount);pos+=amount||1;return res}function skip(value){if(!match(value)){throw SyntaxError("character: "+value)}}function match(value){if(str.indexOf(value,pos)===pos){return incr(value.length)}}function lookahead(){return str[pos]}function current(value){return str.indexOf(value,pos)===pos}function next(value){return str[pos+1]===value}function matchReg(regExp){var subStr=str.substring(pos);var res=subStr.match(regExp);if(res){res.range=[];res.range[0]=pos;incr(res[0].length);res.range[1]=pos}return res}function parseDisjunction(){var res=[],from=pos;res.push(parseAlternative());while(match("|")){res.push(parseAlternative())}if(res.length===1){return res[0]}return createDisjunction(res,from,pos)}function parseAlternative(){var res=[],from=pos;var term;while(term=parseTerm()){res.push(term)}if(res.length===1){return res[0]}return createAlternative(res,from,pos)}function parseTerm(){if(pos>=str.length||current("|")||current(")")){return null}var anchor=parseAnchor();if(anchor){return anchor}var atom=parseAtom();if(!atom){throw SyntaxError("Expected atom")}var quantifier=parseQuantifier()||false;if(quantifier){quantifier.body=flattenBody(atom);updateRawStart(quantifier,atom.range[0]);return quantifier}return atom}function parseGroup(matchA,typeA,matchB,typeB){var type=null,from=pos;if(match(matchA)){type=typeA}else if(match(matchB)){type=typeB}else{return false}var body=parseDisjunction();if(!body){throw SyntaxError("Expected disjunction")}skip(")");var group=createGroup(type,flattenBody(body),from,pos);if(type=="normal"){closedCaptureCounter++}return group}function parseAnchor(){var res,from=pos;if(match("^")){return createAnchor("start",1)}else if(match("$")){return createAnchor("end",1)}else if(match("\\b")){return createAnchor("boundary",2)}else if(match("\\B")){return createAnchor("not-boundary",2)}else{return parseGroup("(?=","lookahead","(?!","negativeLookahead")}}function parseQuantifier(){var res;var quantifier;var min,max;if(match("*")){quantifier=createQuantifier(0)}else if(match("+")){quantifier=createQuantifier(1)}else if(match("?")){quantifier=createQuantifier(0,1)}else if(res=matchReg(/^\{([0-9]+)\}/)){min=parseInt(res[1],10);quantifier=createQuantifier(min,min,res.range[0],res.range[1])}else if(res=matchReg(/^\{([0-9]+),\}/)){min=parseInt(res[1],10);quantifier=createQuantifier(min,undefined,res.range[0],res.range[1])}else if(res=matchReg(/^\{([0-9]+),([0-9]+)\}/)){min=parseInt(res[1],10);max=parseInt(res[2],10);if(min>max){throw SyntaxError("numbers out of order in {} quantifier")}quantifier=createQuantifier(min,max,res.range[0],res.range[1])}if(quantifier){if(match("?")){quantifier.greedy=false;quantifier.range[1]+=1}}return quantifier}function parseAtom(){var res;if(res=matchReg(/^[^^$\\.*+?(){[|]/)){return createCharacter(res)}else if(match(".")){return createDot()}else if(match("\\")){res=parseAtomEscape();if(!res){throw SyntaxError("atomEscape")}return res}else if(res=parseCharacterClass()){return res}else{return parseGroup("(?:","ignore","(","normal")}}function parseUnicodeSurrogatePairEscape(firstEscape){if(hasUnicodeFlag){var first,second;if(firstEscape.kind=="unicodeEscape"&&(first=firstEscape.codePoint)>=55296&&first<=56319&&current("\\")&&next("u")){var prevPos=pos;pos++;var secondEscape=parseClassEscape();if(secondEscape.kind=="unicodeEscape"&&(second=secondEscape.codePoint)>=56320&&second<=57343){firstEscape.range[1]=secondEscape.range[1];firstEscape.codePoint=(first-55296)*1024+second-56320+65536;firstEscape.type="value";firstEscape.kind="unicodeCodePointEscape";addRaw(firstEscape)}else{pos=prevPos}}}return firstEscape}function parseClassEscape(){return parseAtomEscape(true)}function parseAtomEscape(insideCharacterClass){var res;res=parseDecimalEscape();if(res){return res}if(insideCharacterClass){if(match("b")){return createEscaped("singleEscape",8,"\\b")}else if(match("B")){throw SyntaxError("\\B not possible inside of CharacterClass")}}res=parseCharacterEscape();return res}function parseDecimalEscape(){var res,match;if(res=matchReg(/^(?!0)\d+/)){match=res[0];var refIdx=parseInt(res[0],10);if(refIdx<=closedCaptureCounter){return createReference(res[0])}else{incr(-res[0].length);if(res=matchReg(/^[0-7]{1,3}/)){return createEscaped("octal",parseInt(res[0],8),res[0],1)}else{res=createCharacter(matchReg(/^[89]/));return updateRawStart(res,res.range[0]-1)}}}else if(res=matchReg(/^[0-7]{1,3}/)){match=res[0];if(/^0{1,3}$/.test(match)){return createEscaped("null",0,"0",match.length+1)}else{return createEscaped("octal",parseInt(match,8),match,1)}}else if(res=matchReg(/^[dDsSwW]/)){return createCharacterClassEscape(res[0])}return false}function parseCharacterEscape(){var res;if(res=matchReg(/^[fnrtv]/)){var codePoint=0;switch(res[0]){case"t":codePoint=9;break;case"n":codePoint=10;break;case"v":codePoint=11;break;case"f":codePoint=12;break;case"r":codePoint=13;break}return createEscaped("singleEscape",codePoint,"\\"+res[0])}else if(res=matchReg(/^c([a-zA-Z])/)){return createEscaped("controlLetter",res[1].charCodeAt(0)%32,res[1],2)}else if(res=matchReg(/^x([0-9a-fA-F]{2})/)){return createEscaped("hexadecimalEscape",parseInt(res[1],16),res[1],2)}else if(res=matchReg(/^u([0-9a-fA-F]{4})/)){return parseUnicodeSurrogatePairEscape(createEscaped("unicodeEscape",parseInt(res[1],16),res[1],2))}else if(hasUnicodeFlag&&(res=matchReg(/^u\{([0-9a-fA-F]{1,})\}/))){return createEscaped("unicodeCodePointEscape",parseInt(res[1],16),res[1],4)}else{return parseIdentityEscape()}}function isIdentifierPart(ch){var NonAsciiIdentifierPart=new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]");return ch===36||ch===95||ch>=65&&ch<=90||ch>=97&&ch<=122||ch>=48&&ch<=57||ch===92||ch>=128&&NonAsciiIdentifierPart.test(String.fromCharCode(ch))}function parseIdentityEscape(){var ZWJ="‌";var ZWNJ="‍";var res;var tmp;if(!isIdentifierPart(lookahead())){tmp=incr();return createEscaped("identifier",tmp.charCodeAt(0),tmp,1)}if(match(ZWJ)){return createEscaped("identifier",8204,ZWJ)}else if(match(ZWNJ)){return createEscaped("identifier",8205,ZWNJ)}return null}function parseCharacterClass(){var res,from=pos;if(res=matchReg(/^\[\^/)){res=parseClassRanges();skip("]");return createCharacterClass(res,true,from,pos)}else if(match("[")){res=parseClassRanges();skip("]");return createCharacterClass(res,false,from,pos)}return null}function parseClassRanges(){var res;if(current("]")){return[]}else{res=parseNonemptyClassRanges();if(!res){throw SyntaxError("nonEmptyClassRanges")}return res}}function parseHelperClassRanges(atom){var from,to,res;if(current("-")&&!next("]")){skip("-");res=parseClassAtom();if(!res){throw SyntaxError("classAtom")}to=pos;var classRanges=parseClassRanges();if(!classRanges){throw SyntaxError("classRanges")}from=atom.range[0];if(classRanges.type==="empty"){return[createClassRange(atom,res,from,to)]}return[createClassRange(atom,res,from,to)].concat(classRanges)}res=parseNonemptyClassRangesNoDash();if(!res){throw SyntaxError("nonEmptyClassRangesNoDash")}return[atom].concat(res)}function parseNonemptyClassRanges(){var atom=parseClassAtom();if(!atom){throw SyntaxError("classAtom")}if(current("]")){return[atom]}return parseHelperClassRanges(atom)}function parseNonemptyClassRangesNoDash(){var res=parseClassAtom();if(!res){throw SyntaxError("classAtom")}if(current("]")){return res}return parseHelperClassRanges(res)}function parseClassAtom(){if(match("-")){return createCharacter("-")}else{return parseClassAtomNoDash()}}function parseClassAtomNoDash(){var res;if(res=matchReg(/^[^\\\]-]/)){return createCharacter(res[0])}else if(match("\\")){res=parseClassEscape();if(!res){throw SyntaxError("classEscape")}return parseUnicodeSurrogatePairEscape(res)}}str=String(str);if(str===""){str="(?:)"}var result=parseDisjunction();if(result.range[1]!==str.length){throw SyntaxError("Could not parse entire input - got stuck: "+str)}return result}var regjsparser={parse:parse}; if(typeof module!=="undefined"&&module.exports){module.exports=regjsparser}else{window.regjsparser=regjsparser}})()},{}],288:[function(require,module,exports){var generate=require("regjsgen").generate;var parse=require("regjsparser").parse;var regenerate=require("regenerate");var iuMappings=require("./data/iu-mappings.json");var ESCAPE_SETS=require("./data/character-class-escape-sets.js");function getCharacterClassEscapeSet(character){if(unicode){if(ignoreCase){return ESCAPE_SETS.UNICODE_IGNORE_CASE[character]}return ESCAPE_SETS.UNICODE[character]}return ESCAPE_SETS.REGULAR[character]}var object={};var hasOwnProperty=object.hasOwnProperty;function has(object,property){return hasOwnProperty.call(object,property)}var UNICODE_SET=regenerate().addRange(0,1114111);var BMP_SET=regenerate().addRange(0,65535);var DOT_SET_UNICODE=UNICODE_SET.clone().remove(10,13,8232,8233);var DOT_SET=DOT_SET_UNICODE.clone().intersection(BMP_SET);regenerate.prototype.iuAddRange=function(min,max){var $this=this;do{var folded=caseFold(min);if(folded){$this.add(folded)}}while(++min<=max);return $this};function assign(target,source){for(var key in source){target[key]=source[key]}}function update(item,pattern){var tree=parse(pattern,"");switch(tree.type){case"characterClass":case"group":case"value":break;default:tree=wrap(tree,pattern)}assign(item,tree)}function wrap(tree,pattern){return{type:"group",behavior:"ignore",body:[tree],raw:"(?:"+pattern+")"}}function caseFold(codePoint){return has(iuMappings,codePoint)?iuMappings[codePoint]:false}var ignoreCase=false;var unicode=false;function processCharacterClass(characterClassItem){var set=regenerate();var body=characterClassItem.body.forEach(function(item){switch(item.type){case"value":set.add(item.codePoint);if(ignoreCase&&unicode){var folded=caseFold(item.codePoint);if(folded){set.add(folded)}}break;case"characterClassRange":var min=item.min.codePoint;var max=item.max.codePoint;set.addRange(min,max);if(ignoreCase&&unicode){set.iuAddRange(min,max)}break;case"characterClassEscape":set.add(getCharacterClassEscapeSet(item.value));break;default:throw Error("Unknown term type: "+item.type)}});if(characterClassItem.negative){set=(unicode?UNICODE_SET:BMP_SET).clone().remove(set)}update(characterClassItem,set.toString());return characterClassItem}function processTerm(item){switch(item.type){case"dot":update(item,(unicode?DOT_SET_UNICODE:DOT_SET).toString());break;case"characterClass":item=processCharacterClass(item);break;case"characterClassEscape":update(item,getCharacterClassEscapeSet(item.value).toString());break;case"alternative":case"disjunction":case"group":case"quantifier":item.body=item.body.map(processTerm);break;case"value":var codePoint=item.codePoint;var set=regenerate(codePoint);if(ignoreCase&&unicode){var folded=caseFold(codePoint);if(folded){set.add(folded)}}update(item,set.toString());break;case"anchor":case"empty":case"group":case"reference":break;default:throw Error("Unknown term type: "+item.type)}return item}module.exports=function(pattern,flags){var tree=parse(pattern,flags);ignoreCase=flags?flags.indexOf("i")>-1:false;unicode=flags?flags.indexOf("u")>-1:false;assign(tree,processTerm(tree));return generate(tree)}},{"./data/character-class-escape-sets.js":283,"./data/iu-mappings.json":284,regenerate:285,regjsgen:286,regjsparser:287}],289:[function(require,module,exports){exports.SourceMapGenerator=require("./source-map/source-map-generator").SourceMapGenerator;exports.SourceMapConsumer=require("./source-map/source-map-consumer").SourceMapConsumer;exports.SourceNode=require("./source-map/source-node").SourceNode},{"./source-map/source-map-consumer":295,"./source-map/source-map-generator":296,"./source-map/source-node":297}],290:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");function ArraySet(){this._array=[];this._set={}}ArraySet.fromArray=function ArraySet_fromArray(aArray,aAllowDuplicates){var set=new ArraySet;for(var i=0,len=aArray.length;i<len;i++){set.add(aArray[i],aAllowDuplicates)}return set};ArraySet.prototype.add=function ArraySet_add(aStr,aAllowDuplicates){var isDuplicate=this.has(aStr);var idx=this._array.length;if(!isDuplicate||aAllowDuplicates){this._array.push(aStr)}if(!isDuplicate){this._set[util.toSetString(aStr)]=idx}};ArraySet.prototype.has=function ArraySet_has(aStr){return Object.prototype.hasOwnProperty.call(this._set,util.toSetString(aStr))};ArraySet.prototype.indexOf=function ArraySet_indexOf(aStr){if(this.has(aStr)){return this._set[util.toSetString(aStr)]}throw new Error('"'+aStr+'" is not in the set.')};ArraySet.prototype.at=function ArraySet_at(aIdx){if(aIdx>=0&&aIdx<this._array.length){return this._array[aIdx]}throw new Error("No element indexed by "+aIdx)};ArraySet.prototype.toArray=function ArraySet_toArray(){return this._array.slice()};exports.ArraySet=ArraySet})},{"./util":298,amdefine:299}],291:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var base64=require("./base64");var VLQ_BASE_SHIFT=5;var VLQ_BASE=1<<VLQ_BASE_SHIFT;var VLQ_BASE_MASK=VLQ_BASE-1;var VLQ_CONTINUATION_BIT=VLQ_BASE;function toVLQSigned(aValue){return aValue<0?(-aValue<<1)+1:(aValue<<1)+0}function fromVLQSigned(aValue){var isNegative=(aValue&1)===1;var shifted=aValue>>1;return isNegative?-shifted:shifted}exports.encode=function base64VLQ_encode(aValue){var encoded="";var digit;var vlq=toVLQSigned(aValue);do{digit=vlq&VLQ_BASE_MASK;vlq>>>=VLQ_BASE_SHIFT;if(vlq>0){digit|=VLQ_CONTINUATION_BIT}encoded+=base64.encode(digit)}while(vlq>0);return encoded};exports.decode=function base64VLQ_decode(aStr,aOutParam){var i=0;var strLen=aStr.length;var result=0;var shift=0;var continuation,digit;do{if(i>=strLen){throw new Error("Expected more digits in base 64 VLQ value.")}digit=base64.decode(aStr.charAt(i++));continuation=!!(digit&VLQ_CONTINUATION_BIT);digit&=VLQ_BASE_MASK;result=result+(digit<<shift);shift+=VLQ_BASE_SHIFT}while(continuation);aOutParam.value=fromVLQSigned(result);aOutParam.rest=aStr.slice(i)}})},{"./base64":292,amdefine:299}],292:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var charToIntMap={};var intToCharMap={};"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").forEach(function(ch,index){charToIntMap[ch]=index;intToCharMap[index]=ch});exports.encode=function base64_encode(aNumber){if(aNumber in intToCharMap){return intToCharMap[aNumber]}throw new TypeError("Must be between 0 and 63: "+aNumber)};exports.decode=function base64_decode(aChar){if(aChar in charToIntMap){return charToIntMap[aChar]}throw new TypeError("Not a valid base 64 digit: "+aChar)}})},{amdefine:299}],293:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){function recursiveSearch(aLow,aHigh,aNeedle,aHaystack,aCompare){var mid=Math.floor((aHigh-aLow)/2)+aLow;var cmp=aCompare(aNeedle,aHaystack[mid],true);if(cmp===0){return mid}else if(cmp>0){if(aHigh-mid>1){return recursiveSearch(mid,aHigh,aNeedle,aHaystack,aCompare)}return mid}else{if(mid-aLow>1){return recursiveSearch(aLow,mid,aNeedle,aHaystack,aCompare)}return aLow<0?-1:aLow}}exports.search=function search(aNeedle,aHaystack,aCompare){if(aHaystack.length===0){return-1}return recursiveSearch(-1,aHaystack.length,aNeedle,aHaystack,aCompare)}})},{amdefine:299}],294:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");function generatedPositionAfter(mappingA,mappingB){var lineA=mappingA.generatedLine;var lineB=mappingB.generatedLine;var columnA=mappingA.generatedColumn;var columnB=mappingB.generatedColumn;return lineB>lineA||lineB==lineA&&columnB>=columnA||util.compareByGeneratedPositions(mappingA,mappingB)<=0}function MappingList(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function MappingList_forEach(aCallback,aThisArg){this._array.forEach(aCallback,aThisArg)};MappingList.prototype.add=function MappingList_add(aMapping){var mapping;if(generatedPositionAfter(this._last,aMapping)){this._last=aMapping;this._array.push(aMapping)}else{this._sorted=false;this._array.push(aMapping)}};MappingList.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(util.compareByGeneratedPositions);this._sorted=true}return this._array};exports.MappingList=MappingList})},{"./util":298,amdefine:299}],295:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");var binarySearch=require("./binary-search");var ArraySet=require("./array-set").ArraySet;var base64VLQ=require("./base64-vlq");function SourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==="string"){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,""))}var version=util.getArg(sourceMap,"version");var sources=util.getArg(sourceMap,"sources");var names=util.getArg(sourceMap,"names",[]);var sourceRoot=util.getArg(sourceMap,"sourceRoot",null);var sourcesContent=util.getArg(sourceMap,"sourcesContent",null);var mappings=util.getArg(sourceMap,"mappings");var file=util.getArg(sourceMap,"file",null);if(version!=this._version){throw new Error("Unsupported version: "+version)}sources=sources.map(util.normalize);this._names=ArraySet.fromArray(names,true);this._sources=ArraySet.fromArray(sources,true);this.sourceRoot=sourceRoot;this.sourcesContent=sourcesContent;this._mappings=mappings;this.file=file}SourceMapConsumer.fromSourceMap=function SourceMapConsumer_fromSourceMap(aSourceMap){var smc=Object.create(SourceMapConsumer.prototype);smc._names=ArraySet.fromArray(aSourceMap._names.toArray(),true);smc._sources=ArraySet.fromArray(aSourceMap._sources.toArray(),true);smc.sourceRoot=aSourceMap._sourceRoot;smc.sourcesContent=aSourceMap._generateSourcesContent(smc._sources.toArray(),smc.sourceRoot);smc.file=aSourceMap._file;smc.__generatedMappings=aSourceMap._mappings.toArray().slice();smc.__originalMappings=aSourceMap._mappings.toArray().slice().sort(util.compareByOriginalPositions);return smc};SourceMapConsumer.prototype._version=3;Object.defineProperty(SourceMapConsumer.prototype,"sources",{get:function(){return this._sources.toArray().map(function(s){return this.sourceRoot!=null?util.join(this.sourceRoot,s):s},this)}});SourceMapConsumer.prototype.__generatedMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_generatedMappings",{get:function(){if(!this.__generatedMappings){this.__generatedMappings=[];this.__originalMappings=[];this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappings}});SourceMapConsumer.prototype.__originalMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_originalMappings",{get:function(){if(!this.__originalMappings){this.__generatedMappings=[];this.__originalMappings=[];this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappings}});SourceMapConsumer.prototype._nextCharIsMappingSeparator=function SourceMapConsumer_nextCharIsMappingSeparator(aStr){var c=aStr.charAt(0);return c===";"||c===","};SourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(aStr,aSourceRoot){var generatedLine=1;var previousGeneratedColumn=0;var previousOriginalLine=0;var previousOriginalColumn=0;var previousSource=0;var previousName=0;var str=aStr;var temp={};var mapping;while(str.length>0){if(str.charAt(0)===";"){generatedLine++;str=str.slice(1);previousGeneratedColumn=0}else if(str.charAt(0)===","){str=str.slice(1)}else{mapping={};mapping.generatedLine=generatedLine;base64VLQ.decode(str,temp);mapping.generatedColumn=previousGeneratedColumn+temp.value;previousGeneratedColumn=mapping.generatedColumn;str=temp.rest;if(str.length>0&&!this._nextCharIsMappingSeparator(str)){base64VLQ.decode(str,temp);mapping.source=this._sources.at(previousSource+temp.value);previousSource+=temp.value;str=temp.rest;if(str.length===0||this._nextCharIsMappingSeparator(str)){throw new Error("Found a source, but no line and column")}base64VLQ.decode(str,temp);mapping.originalLine=previousOriginalLine+temp.value;previousOriginalLine=mapping.originalLine;mapping.originalLine+=1;str=temp.rest;if(str.length===0||this._nextCharIsMappingSeparator(str)){throw new Error("Found a source and line, but no column")}base64VLQ.decode(str,temp);mapping.originalColumn=previousOriginalColumn+temp.value;previousOriginalColumn=mapping.originalColumn;str=temp.rest;if(str.length>0&&!this._nextCharIsMappingSeparator(str)){base64VLQ.decode(str,temp);mapping.name=this._names.at(previousName+temp.value);previousName+=temp.value;str=temp.rest}}this.__generatedMappings.push(mapping);if(typeof mapping.originalLine==="number"){this.__originalMappings.push(mapping)}}}this.__generatedMappings.sort(util.compareByGeneratedPositions);this.__originalMappings.sort(util.compareByOriginalPositions)};SourceMapConsumer.prototype._findMapping=function SourceMapConsumer_findMapping(aNeedle,aMappings,aLineName,aColumnName,aComparator){if(aNeedle[aLineName]<=0){throw new TypeError("Line must be greater than or equal to 1, got "+aNeedle[aLineName])}if(aNeedle[aColumnName]<0){throw new TypeError("Column must be greater than or equal to 0, got "+aNeedle[aColumnName])}return binarySearch.search(aNeedle,aMappings,aComparator)};SourceMapConsumer.prototype.computeColumnSpans=function SourceMapConsumer_computeColumnSpans(){for(var index=0;index<this._generatedMappings.length;++index){var mapping=this._generatedMappings[index];if(index+1<this._generatedMappings.length){var nextMapping=this._generatedMappings[index+1];if(mapping.generatedLine===nextMapping.generatedLine){mapping.lastGeneratedColumn=nextMapping.generatedColumn-1;continue}}mapping.lastGeneratedColumn=Infinity}};SourceMapConsumer.prototype.originalPositionFor=function SourceMapConsumer_originalPositionFor(aArgs){var needle={generatedLine:util.getArg(aArgs,"line"),generatedColumn:util.getArg(aArgs,"column")};var index=this._findMapping(needle,this._generatedMappings,"generatedLine","generatedColumn",util.compareByGeneratedPositions);if(index>=0){var mapping=this._generatedMappings[index];if(mapping.generatedLine===needle.generatedLine){var source=util.getArg(mapping,"source",null);if(source!=null&&this.sourceRoot!=null){source=util.join(this.sourceRoot,source)}return{source:source,line:util.getArg(mapping,"originalLine",null),column:util.getArg(mapping,"originalColumn",null),name:util.getArg(mapping,"name",null)}}}return{source:null,line:null,column:null,name:null}};SourceMapConsumer.prototype.sourceContentFor=function SourceMapConsumer_sourceContentFor(aSource){if(!this.sourcesContent){return null}if(this.sourceRoot!=null){aSource=util.relative(this.sourceRoot,aSource)}if(this._sources.has(aSource)){return this.sourcesContent[this._sources.indexOf(aSource)]}var url;if(this.sourceRoot!=null&&(url=util.urlParse(this.sourceRoot))){var fileUriAbsPath=aSource.replace(/^file:\/\//,"");if(url.scheme=="file"&&this._sources.has(fileUriAbsPath)){return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]}if((!url.path||url.path=="/")&&this._sources.has("/"+aSource)){return this.sourcesContent[this._sources.indexOf("/"+aSource)]}}throw new Error('"'+aSource+'" is not in the SourceMap.')};SourceMapConsumer.prototype.generatedPositionFor=function SourceMapConsumer_generatedPositionFor(aArgs){var needle={source:util.getArg(aArgs,"source"),originalLine:util.getArg(aArgs,"line"),originalColumn:util.getArg(aArgs,"column")};if(this.sourceRoot!=null){needle.source=util.relative(this.sourceRoot,needle.source)}var index=this._findMapping(needle,this._originalMappings,"originalLine","originalColumn",util.compareByOriginalPositions);if(index>=0){var mapping=this._originalMappings[index];return{line:util.getArg(mapping,"generatedLine",null),column:util.getArg(mapping,"generatedColumn",null),lastColumn:util.getArg(mapping,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};SourceMapConsumer.prototype.allGeneratedPositionsFor=function SourceMapConsumer_allGeneratedPositionsFor(aArgs){var needle={source:util.getArg(aArgs,"source"),originalLine:util.getArg(aArgs,"line"),originalColumn:Infinity};if(this.sourceRoot!=null){needle.source=util.relative(this.sourceRoot,needle.source)}var mappings=[];var index=this._findMapping(needle,this._originalMappings,"originalLine","originalColumn",util.compareByOriginalPositions);if(index>=0){var mapping=this._originalMappings[index];while(mapping&&mapping.originalLine===needle.originalLine){mappings.push({line:util.getArg(mapping,"generatedLine",null),column:util.getArg(mapping,"generatedColumn",null),lastColumn:util.getArg(mapping,"lastGeneratedColumn",null)});mapping=this._originalMappings[--index]}}return mappings.reverse()};SourceMapConsumer.GENERATED_ORDER=1;SourceMapConsumer.ORIGINAL_ORDER=2;SourceMapConsumer.prototype.eachMapping=function SourceMapConsumer_eachMapping(aCallback,aContext,aOrder){var context=aContext||null;var order=aOrder||SourceMapConsumer.GENERATED_ORDER;var mappings;switch(order){case SourceMapConsumer.GENERATED_ORDER:mappings=this._generatedMappings;break;case SourceMapConsumer.ORIGINAL_ORDER:mappings=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var sourceRoot=this.sourceRoot;mappings.map(function(mapping){var source=mapping.source;if(source!=null&&sourceRoot!=null){source=util.join(sourceRoot,source)}return{source:source,generatedLine:mapping.generatedLine,generatedColumn:mapping.generatedColumn,originalLine:mapping.originalLine,originalColumn:mapping.originalColumn,name:mapping.name}}).forEach(aCallback,context)};exports.SourceMapConsumer=SourceMapConsumer})},{"./array-set":290,"./base64-vlq":291,"./binary-search":293,"./util":298,amdefine:299}],296:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var base64VLQ=require("./base64-vlq");var util=require("./util");var ArraySet=require("./array-set").ArraySet;var MappingList=require("./mapping-list").MappingList;function SourceMapGenerator(aArgs){if(!aArgs){aArgs={}}this._file=util.getArg(aArgs,"file",null);this._sourceRoot=util.getArg(aArgs,"sourceRoot",null);this._skipValidation=util.getArg(aArgs,"skipValidation",false);this._sources=new ArraySet;this._names=new ArraySet;this._mappings=new MappingList;this._sourcesContents=null}SourceMapGenerator.prototype._version=3;SourceMapGenerator.fromSourceMap=function SourceMapGenerator_fromSourceMap(aSourceMapConsumer){var sourceRoot=aSourceMapConsumer.sourceRoot;var generator=new SourceMapGenerator({file:aSourceMapConsumer.file,sourceRoot:sourceRoot});aSourceMapConsumer.eachMapping(function(mapping){var newMapping={generated:{line:mapping.generatedLine,column:mapping.generatedColumn}};if(mapping.source!=null){newMapping.source=mapping.source;if(sourceRoot!=null){newMapping.source=util.relative(sourceRoot,newMapping.source)}newMapping.original={line:mapping.originalLine,column:mapping.originalColumn};if(mapping.name!=null){newMapping.name=mapping.name}}generator.addMapping(newMapping)});aSourceMapConsumer.sources.forEach(function(sourceFile){var content=aSourceMapConsumer.sourceContentFor(sourceFile);if(content!=null){generator.setSourceContent(sourceFile,content)}});return generator};SourceMapGenerator.prototype.addMapping=function SourceMapGenerator_addMapping(aArgs){var generated=util.getArg(aArgs,"generated");var original=util.getArg(aArgs,"original",null);var source=util.getArg(aArgs,"source",null);var name=util.getArg(aArgs,"name",null);if(!this._skipValidation){this._validateMapping(generated,original,source,name)}if(source!=null&&!this._sources.has(source)){this._sources.add(source)}if(name!=null&&!this._names.has(name)){this._names.add(name)}this._mappings.add({generatedLine:generated.line,generatedColumn:generated.column,originalLine:original!=null&&original.line,originalColumn:original!=null&&original.column,source:source,name:name})};SourceMapGenerator.prototype.setSourceContent=function SourceMapGenerator_setSourceContent(aSourceFile,aSourceContent){var source=aSourceFile;if(this._sourceRoot!=null){source=util.relative(this._sourceRoot,source)}if(aSourceContent!=null){if(!this._sourcesContents){this._sourcesContents={}}this._sourcesContents[util.toSetString(source)]=aSourceContent}else if(this._sourcesContents){delete this._sourcesContents[util.toSetString(source)];if(Object.keys(this._sourcesContents).length===0){this._sourcesContents=null}}};SourceMapGenerator.prototype.applySourceMap=function SourceMapGenerator_applySourceMap(aSourceMapConsumer,aSourceFile,aSourceMapPath){var sourceFile=aSourceFile;if(aSourceFile==null){if(aSourceMapConsumer.file==null){throw new Error("SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, "+'or the source map\'s "file" property. Both were omitted.')}sourceFile=aSourceMapConsumer.file}var sourceRoot=this._sourceRoot;if(sourceRoot!=null){sourceFile=util.relative(sourceRoot,sourceFile)}var newSources=new ArraySet;var newNames=new ArraySet;this._mappings.unsortedForEach(function(mapping){if(mapping.source===sourceFile&&mapping.originalLine!=null){var original=aSourceMapConsumer.originalPositionFor({line:mapping.originalLine,column:mapping.originalColumn});if(original.source!=null){mapping.source=original.source;if(aSourceMapPath!=null){mapping.source=util.join(aSourceMapPath,mapping.source)}if(sourceRoot!=null){mapping.source=util.relative(sourceRoot,mapping.source)}mapping.originalLine=original.line;mapping.originalColumn=original.column;if(original.name!=null){mapping.name=original.name}}}var source=mapping.source;if(source!=null&&!newSources.has(source)){newSources.add(source)}var name=mapping.name;if(name!=null&&!newNames.has(name)){newNames.add(name)}},this);this._sources=newSources;this._names=newNames;aSourceMapConsumer.sources.forEach(function(sourceFile){var content=aSourceMapConsumer.sourceContentFor(sourceFile);if(content!=null){if(aSourceMapPath!=null){sourceFile=util.join(aSourceMapPath,sourceFile)}if(sourceRoot!=null){sourceFile=util.relative(sourceRoot,sourceFile)}this.setSourceContent(sourceFile,content)}},this)};SourceMapGenerator.prototype._validateMapping=function SourceMapGenerator_validateMapping(aGenerated,aOriginal,aSource,aName){if(aGenerated&&"line"in aGenerated&&"column"in aGenerated&&aGenerated.line>0&&aGenerated.column>=0&&!aOriginal&&!aSource&&!aName){return}else if(aGenerated&&"line"in aGenerated&&"column"in aGenerated&&aOriginal&&"line"in aOriginal&&"column"in aOriginal&&aGenerated.line>0&&aGenerated.column>=0&&aOriginal.line>0&&aOriginal.column>=0&&aSource){return}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:aGenerated,source:aSource,original:aOriginal,name:aName}))}};SourceMapGenerator.prototype._serializeMappings=function SourceMapGenerator_serializeMappings(){var previousGeneratedColumn=0;var previousGeneratedLine=1;var previousOriginalColumn=0;var previousOriginalLine=0;var previousName=0;var previousSource=0;var result="";var mapping;var mappings=this._mappings.toArray();for(var i=0,len=mappings.length;i<len;i++){mapping=mappings[i];if(mapping.generatedLine!==previousGeneratedLine){previousGeneratedColumn=0;while(mapping.generatedLine!==previousGeneratedLine){result+=";";previousGeneratedLine++}}else{if(i>0){if(!util.compareByGeneratedPositions(mapping,mappings[i-1])){continue}result+=","}}result+=base64VLQ.encode(mapping.generatedColumn-previousGeneratedColumn);previousGeneratedColumn=mapping.generatedColumn;if(mapping.source!=null){result+=base64VLQ.encode(this._sources.indexOf(mapping.source)-previousSource);previousSource=this._sources.indexOf(mapping.source);result+=base64VLQ.encode(mapping.originalLine-1-previousOriginalLine);previousOriginalLine=mapping.originalLine-1;result+=base64VLQ.encode(mapping.originalColumn-previousOriginalColumn);previousOriginalColumn=mapping.originalColumn;if(mapping.name!=null){result+=base64VLQ.encode(this._names.indexOf(mapping.name)-previousName);previousName=this._names.indexOf(mapping.name)}}}return result};SourceMapGenerator.prototype._generateSourcesContent=function SourceMapGenerator_generateSourcesContent(aSources,aSourceRoot){return aSources.map(function(source){if(!this._sourcesContents){return null}if(aSourceRoot!=null){source=util.relative(aSourceRoot,source)}var key=util.toSetString(source);return Object.prototype.hasOwnProperty.call(this._sourcesContents,key)?this._sourcesContents[key]:null},this)};SourceMapGenerator.prototype.toJSON=function SourceMapGenerator_toJSON(){var map={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){map.file=this._file}if(this._sourceRoot!=null){map.sourceRoot=this._sourceRoot}if(this._sourcesContents){map.sourcesContent=this._generateSourcesContent(map.sources,map.sourceRoot)}return map};SourceMapGenerator.prototype.toString=function SourceMapGenerator_toString(){return JSON.stringify(this)};exports.SourceMapGenerator=SourceMapGenerator})},{"./array-set":290,"./base64-vlq":291,"./mapping-list":294,"./util":298,amdefine:299}],297:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var SourceMapGenerator=require("./source-map-generator").SourceMapGenerator;var util=require("./util");var REGEX_NEWLINE=/(\r?\n)/;var NEWLINE_CODE=10;var isSourceNode="$$$isSourceNode$$$";function SourceNode(aLine,aColumn,aSource,aChunks,aName){this.children=[];this.sourceContents={};this.line=aLine==null?null:aLine;this.column=aColumn==null?null:aColumn;this.source=aSource==null?null:aSource;this.name=aName==null?null:aName;this[isSourceNode]=true;if(aChunks!=null)this.add(aChunks)}SourceNode.fromStringWithSourceMap=function SourceNode_fromStringWithSourceMap(aGeneratedCode,aSourceMapConsumer,aRelativePath){var node=new SourceNode;var remainingLines=aGeneratedCode.split(REGEX_NEWLINE);var shiftNextLine=function(){var lineContents=remainingLines.shift();var newLine=remainingLines.shift()||"";return lineContents+newLine};var lastGeneratedLine=1,lastGeneratedColumn=0;var lastMapping=null;aSourceMapConsumer.eachMapping(function(mapping){if(lastMapping!==null){if(lastGeneratedLine<mapping.generatedLine){var code="";addMappingWithCode(lastMapping,shiftNextLine());lastGeneratedLine++;lastGeneratedColumn=0}else{var nextLine=remainingLines[0];var code=nextLine.substr(0,mapping.generatedColumn-lastGeneratedColumn);remainingLines[0]=nextLine.substr(mapping.generatedColumn-lastGeneratedColumn);lastGeneratedColumn=mapping.generatedColumn;addMappingWithCode(lastMapping,code);lastMapping=mapping;return}}while(lastGeneratedLine<mapping.generatedLine){node.add(shiftNextLine());lastGeneratedLine++}if(lastGeneratedColumn<mapping.generatedColumn){var nextLine=remainingLines[0];node.add(nextLine.substr(0,mapping.generatedColumn));remainingLines[0]=nextLine.substr(mapping.generatedColumn);lastGeneratedColumn=mapping.generatedColumn}lastMapping=mapping},this);if(remainingLines.length>0){if(lastMapping){addMappingWithCode(lastMapping,shiftNextLine())}node.add(remainingLines.join(""))}aSourceMapConsumer.sources.forEach(function(sourceFile){var content=aSourceMapConsumer.sourceContentFor(sourceFile);if(content!=null){if(aRelativePath!=null){sourceFile=util.join(aRelativePath,sourceFile)}node.setSourceContent(sourceFile,content)}});return node;function addMappingWithCode(mapping,code){if(mapping===null||mapping.source===undefined){node.add(code)}else{var source=aRelativePath?util.join(aRelativePath,mapping.source):mapping.source;node.add(new SourceNode(mapping.originalLine,mapping.originalColumn,source,code,mapping.name))}}};SourceNode.prototype.add=function SourceNode_add(aChunk){if(Array.isArray(aChunk)){aChunk.forEach(function(chunk){this.add(chunk)},this)}else if(aChunk[isSourceNode]||typeof aChunk==="string"){if(aChunk){this.children.push(aChunk)}}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+aChunk)}return this};SourceNode.prototype.prepend=function SourceNode_prepend(aChunk){if(Array.isArray(aChunk)){for(var i=aChunk.length-1;i>=0;i--){this.prepend(aChunk[i])}}else if(aChunk[isSourceNode]||typeof aChunk==="string"){this.children.unshift(aChunk)}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+aChunk)}return this};SourceNode.prototype.walk=function SourceNode_walk(aFn){var chunk;for(var i=0,len=this.children.length;i<len;i++){chunk=this.children[i];if(chunk[isSourceNode]){chunk.walk(aFn)}else{if(chunk!==""){aFn(chunk,{source:this.source,line:this.line,column:this.column,name:this.name})}}}};SourceNode.prototype.join=function SourceNode_join(aSep){var newChildren;var i;var len=this.children.length;if(len>0){newChildren=[];for(i=0;i<len-1;i++){newChildren.push(this.children[i]);newChildren.push(aSep)}newChildren.push(this.children[i]);this.children=newChildren}return this};SourceNode.prototype.replaceRight=function SourceNode_replaceRight(aPattern,aReplacement){var lastChild=this.children[this.children.length-1];if(lastChild[isSourceNode]){lastChild.replaceRight(aPattern,aReplacement)}else if(typeof lastChild==="string"){this.children[this.children.length-1]=lastChild.replace(aPattern,aReplacement)}else{this.children.push("".replace(aPattern,aReplacement))}return this};SourceNode.prototype.setSourceContent=function SourceNode_setSourceContent(aSourceFile,aSourceContent){this.sourceContents[util.toSetString(aSourceFile)]=aSourceContent};SourceNode.prototype.walkSourceContents=function SourceNode_walkSourceContents(aFn){for(var i=0,len=this.children.length;i<len;i++){if(this.children[i][isSourceNode]){this.children[i].walkSourceContents(aFn)}}var sources=Object.keys(this.sourceContents);for(var i=0,len=sources.length;i<len;i++){aFn(util.fromSetString(sources[i]),this.sourceContents[sources[i]])}};SourceNode.prototype.toString=function SourceNode_toString(){var str="";this.walk(function(chunk){str+=chunk});return str};SourceNode.prototype.toStringWithSourceMap=function SourceNode_toStringWithSourceMap(aArgs){var generated={code:"",line:1,column:0};var map=new SourceMapGenerator(aArgs);var sourceMappingActive=false;var lastOriginalSource=null;var lastOriginalLine=null;var lastOriginalColumn=null;var lastOriginalName=null;this.walk(function(chunk,original){generated.code+=chunk;if(original.source!==null&&original.line!==null&&original.column!==null){if(lastOriginalSource!==original.source||lastOriginalLine!==original.line||lastOriginalColumn!==original.column||lastOriginalName!==original.name){map.addMapping({source:original.source,original:{line:original.line,column:original.column},generated:{line:generated.line,column:generated.column},name:original.name})}lastOriginalSource=original.source;lastOriginalLine=original.line;lastOriginalColumn=original.column;lastOriginalName=original.name;sourceMappingActive=true}else if(sourceMappingActive){map.addMapping({generated:{line:generated.line,column:generated.column}});lastOriginalSource=null;sourceMappingActive=false}for(var idx=0,length=chunk.length;idx<length;idx++){if(chunk.charCodeAt(idx)===NEWLINE_CODE){generated.line++;generated.column=0;if(idx+1===length){lastOriginalSource=null;sourceMappingActive=false}else if(sourceMappingActive){map.addMapping({source:original.source,original:{line:original.line,column:original.column},generated:{line:generated.line,column:generated.column},name:original.name}) }}else{generated.column++}}});this.walkSourceContents(function(sourceFile,sourceContent){map.setSourceContent(sourceFile,sourceContent)});return{code:generated.code,map:map}};exports.SourceNode=SourceNode})},{"./source-map-generator":296,"./util":298,amdefine:299}],298:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){function getArg(aArgs,aName,aDefaultValue){if(aName in aArgs){return aArgs[aName]}else if(arguments.length===3){return aDefaultValue}else{throw new Error('"'+aName+'" is a required argument.')}}exports.getArg=getArg;var urlRegexp=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;var dataUrlRegexp=/^data:.+\,.+$/;function urlParse(aUrl){var match=aUrl.match(urlRegexp);if(!match){return null}return{scheme:match[1],auth:match[2],host:match[3],port:match[4],path:match[5]}}exports.urlParse=urlParse;function urlGenerate(aParsedUrl){var url="";if(aParsedUrl.scheme){url+=aParsedUrl.scheme+":"}url+="//";if(aParsedUrl.auth){url+=aParsedUrl.auth+"@"}if(aParsedUrl.host){url+=aParsedUrl.host}if(aParsedUrl.port){url+=":"+aParsedUrl.port}if(aParsedUrl.path){url+=aParsedUrl.path}return url}exports.urlGenerate=urlGenerate;function normalize(aPath){var path=aPath;var url=urlParse(aPath);if(url){if(!url.path){return aPath}path=url.path}var isAbsolute=path.charAt(0)==="/";var parts=path.split(/\/+/);for(var part,up=0,i=parts.length-1;i>=0;i--){part=parts[i];if(part==="."){parts.splice(i,1)}else if(part===".."){up++}else if(up>0){if(part===""){parts.splice(i+1,up);up=0}else{parts.splice(i,2);up--}}}path=parts.join("/");if(path===""){path=isAbsolute?"/":"."}if(url){url.path=path;return urlGenerate(url)}return path}exports.normalize=normalize;function join(aRoot,aPath){if(aRoot===""){aRoot="."}if(aPath===""){aPath="."}var aPathUrl=urlParse(aPath);var aRootUrl=urlParse(aRoot);if(aRootUrl){aRoot=aRootUrl.path||"/"}if(aPathUrl&&!aPathUrl.scheme){if(aRootUrl){aPathUrl.scheme=aRootUrl.scheme}return urlGenerate(aPathUrl)}if(aPathUrl||aPath.match(dataUrlRegexp)){return aPath}if(aRootUrl&&!aRootUrl.host&&!aRootUrl.path){aRootUrl.host=aPath;return urlGenerate(aRootUrl)}var joined=aPath.charAt(0)==="/"?aPath:normalize(aRoot.replace(/\/+$/,"")+"/"+aPath);if(aRootUrl){aRootUrl.path=joined;return urlGenerate(aRootUrl)}return joined}exports.join=join;function relative(aRoot,aPath){if(aRoot===""){aRoot="."}aRoot=aRoot.replace(/\/$/,"");var url=urlParse(aRoot);if(aPath.charAt(0)=="/"&&url&&url.path=="/"){return aPath.slice(1)}return aPath.indexOf(aRoot+"/")===0?aPath.substr(aRoot.length+1):aPath}exports.relative=relative;function toSetString(aStr){return"$"+aStr}exports.toSetString=toSetString;function fromSetString(aStr){return aStr.substr(1)}exports.fromSetString=fromSetString;function strcmp(aStr1,aStr2){var s1=aStr1||"";var s2=aStr2||"";return(s1>s2)-(s1<s2)}function compareByOriginalPositions(mappingA,mappingB,onlyCompareOriginal){var cmp;cmp=strcmp(mappingA.source,mappingB.source);if(cmp){return cmp}cmp=mappingA.originalLine-mappingB.originalLine;if(cmp){return cmp}cmp=mappingA.originalColumn-mappingB.originalColumn;if(cmp||onlyCompareOriginal){return cmp}cmp=strcmp(mappingA.name,mappingB.name);if(cmp){return cmp}cmp=mappingA.generatedLine-mappingB.generatedLine;if(cmp){return cmp}return mappingA.generatedColumn-mappingB.generatedColumn}exports.compareByOriginalPositions=compareByOriginalPositions;function compareByGeneratedPositions(mappingA,mappingB,onlyCompareGenerated){var cmp;cmp=mappingA.generatedLine-mappingB.generatedLine;if(cmp){return cmp}cmp=mappingA.generatedColumn-mappingB.generatedColumn;if(cmp||onlyCompareGenerated){return cmp}cmp=strcmp(mappingA.source,mappingB.source);if(cmp){return cmp}cmp=mappingA.originalLine-mappingB.originalLine;if(cmp){return cmp}cmp=mappingA.originalColumn-mappingB.originalColumn;if(cmp){return cmp}return strcmp(mappingA.name,mappingB.name)}exports.compareByGeneratedPositions=compareByGeneratedPositions})},{amdefine:299}],299:[function(require,module,exports){(function(process,__filename){"use strict";function amdefine(module,requireFn){"use strict";var defineCache={},loaderCache={},alreadyCalled=false,path=require("path"),makeRequire,stringRequire;function trimDots(ary){var i,part;for(i=0;ary[i];i+=1){part=ary[i];if(part==="."){ary.splice(i,1);i-=1}else if(part===".."){if(i===1&&(ary[2]===".."||ary[0]==="..")){break}else if(i>0){ary.splice(i-1,2);i-=2}}}}function normalize(name,baseName){var baseParts;if(name&&name.charAt(0)==="."){if(baseName){baseParts=baseName.split("/");baseParts=baseParts.slice(0,baseParts.length-1);baseParts=baseParts.concat(name.split("/"));trimDots(baseParts);name=baseParts.join("/")}}return name}function makeNormalize(relName){return function(name){return normalize(name,relName)}}function makeLoad(id){function load(value){loaderCache[id]=value}load.fromText=function(id,text){throw new Error("amdefine does not implement load.fromText")};return load}makeRequire=function(systemRequire,exports,module,relId){function amdRequire(deps,callback){if(typeof deps==="string"){return stringRequire(systemRequire,exports,module,deps,relId)}else{deps=deps.map(function(depName){return stringRequire(systemRequire,exports,module,depName,relId)});process.nextTick(function(){callback.apply(null,deps)})}}amdRequire.toUrl=function(filePath){if(filePath.indexOf(".")===0){return normalize(filePath,path.dirname(module.filename))}else{return filePath}};return amdRequire};requireFn=requireFn||function req(){return module.require.apply(module,arguments)};function runFactory(id,deps,factory){var r,e,m,result;if(id){e=loaderCache[id]={};m={id:id,uri:__filename,exports:e};r=makeRequire(requireFn,e,m,id)}else{if(alreadyCalled){throw new Error("amdefine with no module ID cannot be called more than once per file.")}alreadyCalled=true;e=module.exports;m=module;r=makeRequire(requireFn,e,m,module.id)}if(deps){deps=deps.map(function(depName){return r(depName)})}if(typeof factory==="function"){result=factory.apply(m.exports,deps)}else{result=factory}if(result!==undefined){m.exports=result;if(id){loaderCache[id]=m.exports}}}stringRequire=function(systemRequire,exports,module,id,relId){var index=id.indexOf("!"),originalId=id,prefix,plugin;if(index===-1){id=normalize(id,relId);if(id==="require"){return makeRequire(systemRequire,exports,module,relId)}else if(id==="exports"){return exports}else if(id==="module"){return module}else if(loaderCache.hasOwnProperty(id)){return loaderCache[id]}else if(defineCache[id]){runFactory.apply(null,defineCache[id]);return loaderCache[id]}else{if(systemRequire){return systemRequire(originalId)}else{throw new Error("No module with ID: "+id)}}}else{prefix=id.substring(0,index);id=id.substring(index+1,id.length);plugin=stringRequire(systemRequire,exports,module,prefix,relId);if(plugin.normalize){id=plugin.normalize(id,makeNormalize(relId))}else{id=normalize(id,relId)}if(loaderCache[id]){return loaderCache[id]}else{plugin.load(id,makeRequire(systemRequire,exports,module,relId),makeLoad(id),{});return loaderCache[id]}}};function define(id,deps,factory){if(Array.isArray(id)){factory=deps;deps=id;id=undefined}else if(typeof id!=="string"){factory=id;id=deps=undefined}if(deps&&!Array.isArray(deps)){factory=deps;deps=undefined}if(!deps){deps=["require","exports","module"]}if(id){defineCache[id]=[id,deps,factory]}else{runFactory(id,deps,factory)}}define.require=function(id){if(loaderCache[id]){return loaderCache[id]}if(defineCache[id]){runFactory.apply(null,defineCache[id]);return loaderCache[id]}};define.amd={};return define}module.exports=amdefine}).call(this,require("_process"),"/node_modules/source-map/node_modules/amdefine/amdefine.js")},{_process:136,path:135}],300:[function(require,module,exports){(function(process){"use strict";var argv=process.argv;module.exports=function(){if(argv.indexOf("--no-color")!==-1||argv.indexOf("--no-colors")!==-1||argv.indexOf("--color=false")!==-1){return false}if(argv.indexOf("--color")!==-1||argv.indexOf("--colors")!==-1||argv.indexOf("--color=true")!==-1||argv.indexOf("--color=always")!==-1){return true}if(process.stdout&&!process.stdout.isTTY){return false}if(process.platform==="win32"){return true}if("COLORTERM"in process.env){return true}if(process.env.TERM==="dumb"){return false}if(/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)){return true}return false}()}).call(this,require("_process"))},{_process:136}],301:[function(require,module,exports){module.exports={name:"6to5",description:"Turn ES6 code into readable vanilla ES5 with source maps",version:"3.3.10",author:"Sebastian McKenzie <[email protected]>",homepage:"https://6to5.org/",repository:"6to5/6to5",preferGlobal:true,main:"lib/6to5/index.js",bin:{"6to5":"./bin/6to5/index.js","6to5-minify":"./bin/6to5-minify","6to5-node":"./bin/6to5-node","6to5-runtime":"./bin/6to5-runtime"},browser:{"./lib/6to5/index.js":"./lib/6to5/browser.js","./lib/6to5/register.js":"./lib/6to5/register-browser.js"},keywords:["harmony","classes","modules","let","const","var","es6","transpile","transpiler","6to5"],scripts:{bench:"make bench",test:"make test"},dependencies:{"acorn-6to5":"0.11.1-25","ast-types":"~0.6.1",chalk:"^0.5.1",chokidar:"0.12.6",commander:"2.6.0","core-js":"^0.4.9",debug:"^2.1.1","detect-indent":"3.0.0",estraverse:"1.9.1",esutils:"1.1.6","fs-readdir-recursive":"0.1.0",globals:"^5.1.0","js-tokenizer":"1.3.3",lodash:"3.0.0","output-file-sync":"1.1.0","private":"0.1.6","regenerator-6to5":"0.8.9-8",regexpu:"1.1.0",roadrunner:"1.0.4","source-map":"0.1.43","source-map-support":"0.2.9","supports-color":"1.2.0",useragent:"^2.1.5"},devDependencies:{browserify:"8.1.1",chai:"1.10.0",esvalid:"1.1.0",istanbul:"0.3.5",jscs:"1.10.0",jshint:"2.6.0","jshint-stylish":"1.0.0",matcha:"0.6.0",mocha:"2.1.0",rimraf:"2.2.8","uglify-js":"2.4.16"},optionalDependencies:{kexec:"1.0.0"}}},{}],302:[function(require,module,exports){module.exports={"abstract-expression-call":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"PROPERTY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"referenceGet",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"call",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"abstract-expression-delete":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"PROPERTY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"referenceDelete",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"abstract-expression-get":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"PROPERTY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"referenceGet",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"abstract-expression-set":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"PROPERTY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"referenceSet",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VALUE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"apply-constructor":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Constructor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"args",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instance",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"create",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Constructor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"result",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Constructor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"apply",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instance",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"args",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"result",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!=",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"result",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"object",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"||",right:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"result",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"function",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"result",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instance",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"array-comprehension-container":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"ArrayExpression",start:null,end:null,loc:null,range:null,elements:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"array-from":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"from",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VALUE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"array-push":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"push",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"STATEMENT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"async-to-generator":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"fn",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"gen",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"fn",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"apply",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"ThisExpression",start:null,end:null,loc:null,range:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arguments",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"NewExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Promise",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"resolve",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"reject",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"callNext",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"step",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"bind",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},{type:"Literal",start:null,end:null,loc:null,range:null,value:"next",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"callThrow",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"step",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"bind",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},{type:"Literal",start:null,end:null,loc:null,range:null,value:"throw",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"FunctionDeclaration",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"step",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arg",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"TryStatement",start:null,end:null,loc:null,range:null,block:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"info",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"gen",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arg",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"info",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},handler:{type:"CatchClause",start:null,end:null,loc:null,range:null,param:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"error",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},guard:null,body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"reject",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"error",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},guardedHandlers:[],finalizer:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"info",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"done",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"resolve",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Promise",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"resolve",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"then",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"callNext",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"callThrow",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"callNext",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},bind:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Function",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"bind",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},call:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"call",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"CONTEXT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"class-call-check":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instance",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Constructor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"!",prefix:true,argument:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instance",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"instanceof",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Constructor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ThrowStatement",start:null,end:null,loc:null,range:null,argument:{type:"NewExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"TypeError",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Literal",start:null,end:null,loc:null,range:null,value:"Cannot call a class as a function",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"class-super-constructor-call-loose":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"SUPER_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!=",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"SUPER_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"apply",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"ThisExpression",start:null,end:null,loc:null,range:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arguments",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"class-super-constructor-call":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"SUPER_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!=",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"SUPER_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"apply",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"ThisExpression",start:null,end:null,loc:null,range:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arguments",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"corejs-iterator":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"CORE_ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"$for",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getIterator",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VALUE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"default-parameter":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VARIABLE_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARGUMENTS",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARGUMENT_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"DEFAULT_VALUE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARGUMENTS",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARGUMENT_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},defaults:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defaults",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ForInStatement",start:null,end:null,loc:null,range:null,left:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defaults",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defaults",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"define-property":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defineProperty",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"enumerable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Literal",start:null,end:null,loc:null,range:null,value:true,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"configurable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Literal",start:null,end:null,loc:null,range:null,value:true,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"writable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Literal",start:null,end:null,loc:null,range:null,value:true,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"exports-assign":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"exports",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VALUE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"exports-default-assign":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"module",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"exports",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VALUE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"exports-module-declaration":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"exports",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"__esModule",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Literal",start:null,end:null,loc:null,range:null,value:true,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"extends":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"assign",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"||",right:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"target",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ForStatement",start:null,end:null,loc:null,range:null,init:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"Literal",start:null,end:null,loc:null,range:null,value:1,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"<",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arguments",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"length",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},update:{type:"UpdateExpression",start:null,end:null,loc:null,range:null,operator:"++",prefix:false,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"source",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arguments",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ForInStatement",start:null,end:null,loc:null,range:null,left:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"source",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"hasOwnProperty",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"call",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"source",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"target",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"source",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"target",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"for-of-loose":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ForStatement",start:null,end:null,loc:null,range:null,init:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"IS_ARRAY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"isArray",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"INDEX",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"Literal",start:null,end:null,loc:null,range:null,value:0,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"IS_ARRAY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"iterator",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},test:null,update:null,body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"IS_ARRAY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"INDEX",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:">=",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"length",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BreakStatement",start:null,end:null,loc:null,range:null,label:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"UpdateExpression",start:null,end:null,loc:null,range:null,operator:"++",prefix:false,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"INDEX",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"INDEX",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"next",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"INDEX",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"done",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BreakStatement",start:null,end:null,loc:null,range:null,label:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"INDEX",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"for-of":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ForStatement",start:null,end:null,loc:null,range:null,init:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ITERATOR_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"iterator",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"STEP_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},test:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"!",prefix:true,argument:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"STEP_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ITERATOR_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"next",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"done",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},update:null,body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},get:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"get",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"property",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"receiver",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getOwnPropertyDescriptor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"property",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"parent",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getPrototypeOf",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"parent",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"get",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"parent",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"property",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"receiver",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Literal",start:null,end:null,loc:null,range:null,value:"value",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},operator:"in",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"writable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getter",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"get",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getter",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getter",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"call",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"receiver",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"has-own":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"hasOwnProperty",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},inherits:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"subClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"function",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ThrowStatement",start:null,end:null,loc:null,range:null,argument:{type:"NewExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"TypeError",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Literal",start:null,end:null,loc:null,range:null,value:"Super expression must either be null or a function, not ",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},operator:"+",right:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"subClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"create",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"constructor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"subClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"enumerable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Literal",start:null,end:null,loc:null,range:null,value:false,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"writable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Literal",start:null,end:null,loc:null,range:null,value:true,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"configurable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Literal",start:null,end:null,loc:null,range:null,value:true,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"subClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"__proto__",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"interop-require-wildcard":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"__esModule",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"default",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"interop-require":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"__esModule",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"default",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"let-scoping-return":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"RETURN",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"object",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"RETURN",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"v",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"object-destructuring-empty":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"ThrowStatement",start:null,end:null,loc:null,range:null,argument:{type:"NewExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"TypeError",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Literal",start:null,end:null,loc:null,range:null,value:"Cannot destructure undefined",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"object-without-properties":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"keys",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"target",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ForInStatement",start:null,end:null,loc:null,range:null,left:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"keys",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"indexOf",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:">=",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:0,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"ContinueStatement",start:null,end:null,loc:null,range:null,label:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"!",prefix:true,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"hasOwnProperty",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"call",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"ContinueStatement",start:null,end:null,loc:null,range:null,label:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"target",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"target",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"property-method-assignment-wrapper":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"WRAPPER_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},generator:false,expression:false,params:[],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"apply",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"ThisExpression",start:null,end:null,loc:null,range:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arguments",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"WRAPPER_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"toString",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"toString",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"WRAPPER_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"prototype-identifier":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"CLASS_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"prototype-properties":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"child",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"staticProps",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instanceProps",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"staticProps",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defineProperties",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"child",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"staticProps",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instanceProps",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defineProperties",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"child",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instanceProps",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"require-assign-key":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VARIABLE_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"require",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"MODULE_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},require:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"require",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"MODULE_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},rest:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ForStatement",start:null,end:null,loc:null,range:null,init:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LEN",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARGUMENTS",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"length",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARRAY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARRAY_LEN",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"START",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"<",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LEN",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},update:{type:"UpdateExpression",start:null,end:null,loc:null,range:null,operator:"++",prefix:false,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARRAY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARRAY_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARGUMENTS",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"self-global":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"global",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"undefined",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"self",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"global",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},set:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"set",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"property",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"receiver",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getOwnPropertyDescriptor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"property",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"parent",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getPrototypeOf",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"parent",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"set",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"parent",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"property",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"receiver",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Literal",start:null,end:null,loc:null,range:null,value:"value",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},operator:"in",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"writable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"setter",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"set",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"setter",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"setter",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"call",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"receiver",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},slice:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"slice",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"sliced-to-array":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"isArray",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"ArrayExpression",start:null,end:null,loc:null,range:null,elements:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ForStatement",start:null,end:null,loc:null,range:null,init:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_iterator",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"iterator",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:true,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_step",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},test:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"!",prefix:true,argument:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_step",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_iterator",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"next",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"done",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},update:null,body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"push",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_step",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"length",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BreakStatement",start:null,end:null,loc:null,range:null,label:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},system:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"System",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"register",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"MODULE_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"MODULE_DEPENDENCIES",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"EXPORT_IDENTIFIER",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"setters",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"SETTERS",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"execute",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"EXECUTE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"tagged-template-literal-loose":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"strings",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"raw",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"strings",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"raw",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"raw",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"strings",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"tagged-template-literal":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"strings",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"raw",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"freeze",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defineProperties",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"strings",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"raw",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:false,shorthand:false,computed:false,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"freeze",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"raw",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"test-exports":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"exports",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"undefined",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"test-module":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"module",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"undefined",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"to-array":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"isArray",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"from",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"typeof":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"constructor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"Literal",start:null,end:null,loc:null,range:null,value:"symbol",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},alternate:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"umd-runner-body":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:false,expression:false,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"factory",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:true,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"define",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"function",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"define",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"amd",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:false,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"define",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"AMD_ARGUMENTS",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"factory",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"COMMON_TEST",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"factory",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"COMMON_ARGUMENTS",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}} },{}]},{},[1])(1)});
Tutorial/js/project/2.MeiTuan/Component/Mine/XMGMineMiddleView.js
onezens/react-native-repo
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, Image, TouchableOpacity } from 'react-native'; /**-------导入外部的json数据-------***/ var MiddleData = require('./MiddleData.json'); var MineMiddleView = React.createClass({ render() { return ( <View style={styles.container}> {this.renderAllItem()} </View> ); }, renderAllItem(){ // 定义组件数组 var itemArr = []; // 遍历 for(var i=0; i<MiddleData.length; i++){ // 取出单独的数据 var data = MiddleData[i]; // 创建组件装入数组 itemArr.push( <InnerView key={i} iconName={data.iconName} title={data.title}/> ); } // 返回 return itemArr; } }); // 里面的组件类 var InnerView = React.createClass({ getDefaultProps(){ return{ iconName: '', title:'' } }, render(){ return( <TouchableOpacity activeOpacity={0.5} onPress={()=>{alert('0')}}> <View style={styles.innerViewStyle}> <Image source={{uri: this.props.iconName}} style={{width:40, height:30, marginBottom:3}}/> <Text style={{color:'gray'}}>{this.props.title}</Text> </View> </TouchableOpacity> ); } }); const styles = StyleSheet.create({ container: { // 设置主轴的方向 flexDirection:'row', alignItems: 'center', backgroundColor: 'white', // 设置主轴的对齐方式 justifyContent:'space-around' }, innerViewStyle:{ width:70, height:70, // 水平和垂直居中 justifyContent:'center', alignItems:'center' } }); // 输出组件类 module.exports = MineMiddleView;
stories/demos/exampleCode/backgroundEvents.js
jquense/react-big-calendar
import React, { Fragment, useMemo } from 'react' import PropTypes from 'prop-types' import { Calendar, Views, DateLocalizer } from 'react-big-calendar' import DemoLink from '../../DemoLink.component' import events from '../../resources/events' import backgroundEvents from '../../resources/backgroundEvents' import * as dates from '../../../src/utils/dates' let allViews = Object.keys(Views).map((k) => Views[k]) export default function BackgroundEventsCalendar({ localizer }) { const { defaultDate, max } = useMemo( () => ({ defaultDate: new Date(2015, 3, 13), max: dates.add(dates.endOf(new Date(2015, 17, 1), 'day'), -1, 'hours'), }), [] ) return ( <Fragment> <DemoLink fileName="backgroundEvents" /> <div className="height600"> <Calendar backgroundEvents={backgroundEvents} dayLayoutAlgorithm="no-overlap" defaultDate={defaultDate} defaultView={Views.DAY} events={events} localizer={localizer} max={max} showMultiDayTimes step={60} views={allViews} /> </div> </Fragment> ) } BackgroundEventsCalendar.propTypes = { localizer: PropTypes.instanceOf(DateLocalizer), }
src/components/Logo/Logo.js
neontribe/gbptm
import React from 'react'; import Box from '../Box'; import logo from './logo.svg'; const Logo = (props) => ( <Box as="img" src={logo} alt="The Great British Toilet Map" width={154} {...props} /> ); export default Logo;
ajax/libs/react-router/0.5.3/react-router.js
ericelliott/cdnjs
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.ReactRouter=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ module.exports = _dereq_('./modules/mixins/ActiveState'); },{"./modules/mixins/ActiveState":33}],2:[function(_dereq_,module,exports){ module.exports = _dereq_('./modules/mixins/AsyncState'); },{"./modules/mixins/AsyncState":34}],3:[function(_dereq_,module,exports){ module.exports = _dereq_('./modules/components/DefaultRoute'); },{"./modules/components/DefaultRoute":11}],4:[function(_dereq_,module,exports){ module.exports = _dereq_('./modules/components/Link'); },{"./modules/components/Link":12}],5:[function(_dereq_,module,exports){ module.exports = _dereq_('./modules/components/Redirect'); },{"./modules/components/Redirect":13}],6:[function(_dereq_,module,exports){ module.exports = _dereq_('./modules/components/Route'); },{"./modules/components/Route":14}],7:[function(_dereq_,module,exports){ module.exports = _dereq_('./modules/components/Routes'); },{"./modules/components/Routes":15}],8:[function(_dereq_,module,exports){ module.exports = _dereq_('./modules/helpers/goBack'); },{"./modules/helpers/goBack":21}],9:[function(_dereq_,module,exports){ exports.ActiveState = _dereq_('./ActiveState'); exports.AsyncState = _dereq_('./AsyncState'); exports.DefaultRoute = _dereq_('./DefaultRoute'); exports.Link = _dereq_('./Link'); exports.Redirect = _dereq_('./Redirect'); exports.Route = _dereq_('./Route'); exports.Routes = _dereq_('./Routes'); exports.goBack = _dereq_('./goBack'); exports.replaceWith = _dereq_('./replaceWith'); exports.transitionTo = _dereq_('./transitionTo'); exports.makeHref = _dereq_('./makeHref'); },{"./ActiveState":1,"./AsyncState":2,"./DefaultRoute":3,"./Link":4,"./Redirect":5,"./Route":6,"./Routes":7,"./goBack":8,"./makeHref":10,"./replaceWith":62,"./transitionTo":63}],10:[function(_dereq_,module,exports){ module.exports = _dereq_('./modules/helpers/makeHref'); },{"./modules/helpers/makeHref":23}],11:[function(_dereq_,module,exports){ var merge = _dereq_('react/lib/merge'); var Route = _dereq_('./Route'); /** * A <DefaultRoute> component is a special kind of <Route> that * renders when its parent matches but none of its siblings do. * Only one such route may be used at any given level in the * route hierarchy. */ function DefaultRoute(props) { return Route( merge(props, { name: null, path: null }) ); } module.exports = DefaultRoute; },{"./Route":14,"react/lib/merge":57}],12:[function(_dereq_,module,exports){ var React = (typeof window !== "undefined" ? window.React : typeof global !== "undefined" ? global.React : null); var ActiveState = _dereq_('../mixins/ActiveState'); var withoutProperties = _dereq_('../helpers/withoutProperties'); var transitionTo = _dereq_('../helpers/transitionTo'); var hasOwnProperty = _dereq_('../helpers/hasOwnProperty'); var makeHref = _dereq_('../helpers/makeHref'); function isLeftClickEvent(event) { return event.button === 0; } function isModifiedEvent(event) { return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey); } /** * A map of <Link> component props that are reserved for use by the * router and/or React. All other props are used as params that are * interpolated into the link's path. */ var RESERVED_PROPS = { to: true, key: true, className: true, activeClassName: true, query: true, children: true // ReactChildren }; /** * <Link> components are used to create an <a> element that links to a route. * When that route is active, the link gets an "active" class name (or the * value of its `activeClassName` prop). * * For example, assuming you have the following route: * * <Route name="showPost" path="/posts/:postId" handler={Post}/> * * You could use the following component to link to that route: * * <Link to="showPost" postId="123"/> * * In addition to params, links may pass along query string parameters * using the `query` prop. * * <Link to="showPost" postId="123" query={{show:true}}/> */ var Link = React.createClass({ displayName: 'Link', mixins: [ ActiveState ], statics: { getUnreservedProps: function (props) { return withoutProperties(props, RESERVED_PROPS); } }, propTypes: { to: React.PropTypes.string.isRequired, activeClassName: React.PropTypes.string.isRequired, query: React.PropTypes.object, onClick: React.PropTypes.func }, getDefaultProps: function () { return { activeClassName: 'active' }; }, getInitialState: function () { return { isActive: false }; }, /** * Returns a hash of URL parameters to use in this <Link>'s path. */ getParams: function () { return Link.getUnreservedProps(this.props); }, /** * Returns the value of the "href" attribute to use on the DOM element. */ getHref: function () { return makeHref(this.props.to, this.getParams(), this.props.query); }, /** * Returns the value of the "class" attribute to use on the DOM element, which contains * the value of the activeClassName property when this <Link> is active. */ getClassName: function () { var className = this.props.className || ''; if (this.state.isActive) return className + ' ' + this.props.activeClassName; return className; }, componentWillReceiveProps: function (nextProps) { var params = Link.getUnreservedProps(nextProps); this.setState({ isActive: Link.isActive(nextProps.to, params, nextProps.query) }); }, updateActiveState: function () { this.setState({ isActive: Link.isActive(this.props.to, this.getParams(), this.props.query) }); }, handleClick: function (event) { var allowTransition = true; var ret; if (this.props.onClick) ret = this.props.onClick(event); if (isModifiedEvent(event) || !isLeftClickEvent(event)) return; if (ret === false || event.defaultPrevented === true) allowTransition = false; event.preventDefault(); if (allowTransition) transitionTo(this.props.to, this.getParams(), this.props.query); }, render: function () { var props = { href: this.getHref(), className: this.getClassName(), onClick: this.handleClick }; // pull in props without overriding for (var propName in this.props) { if (hasOwnProperty(this.props, propName) && hasOwnProperty(props, propName) === false) props[propName] = this.props[propName]; } return React.DOM.a(props, this.props.children); } }); module.exports = Link; },{"../helpers/hasOwnProperty":22,"../helpers/makeHref":23,"../helpers/transitionTo":28,"../helpers/withoutProperties":29,"../mixins/ActiveState":33}],13:[function(_dereq_,module,exports){ var React = (typeof window !== "undefined" ? window.React : typeof global !== "undefined" ? global.React : null); var Route = _dereq_('./Route'); function createRedirectHandler(to) { return React.createClass({ statics: { willTransitionTo: function (transition, params, query) { transition.redirect(to, params, query); } }, render: function () { return null; } }); } /** * A <Redirect> component is a special kind of <Route> that always * redirects when it matches. */ function Redirect(props) { return Route({ name: props.name, path: props.from || props.path, handler: createRedirectHandler(props.to) }); } module.exports = Redirect; },{"./Route":14}],14:[function(_dereq_,module,exports){ var React = (typeof window !== "undefined" ? window.React : typeof global !== "undefined" ? global.React : null); var withoutProperties = _dereq_('../helpers/withoutProperties'); /** * A map of <Route> component props that are reserved for use by the * router and/or React. All other props are considered "static" and * are passed through to the route handler. */ var RESERVED_PROPS = { handler: true, path: true, defaultRoute: true, paramNames: true, children: true // ReactChildren }; /** * <Route> components specify components that are rendered to the page when the * URL matches a given pattern. * * Routes are arranged in a nested tree structure. When a new URL is requested, * the tree is searched depth-first to find a route whose path matches the URL. * When one is found, all routes in the tree that lead to it are considered * "active" and their components are rendered into the DOM, nested in the same * order as they are in the tree. * * Unlike Ember, a nested route's path does not build upon that of its parents. * This may seem like it creates more work up front in specifying URLs, but it * has the nice benefit of decoupling nested UI from "nested" URLs. * * The preferred way to configure a router is using JSX. The XML-like syntax is * a great way to visualize how routes are laid out in an application. * * React.renderComponent(( * <Routes handler={App}> * <Route name="login" handler={Login}/> * <Route name="logout" handler={Logout}/> * <Route name="about" handler={About}/> * </Routes> * ), document.body); * * If you don't use JSX, you can also assemble a Router programmatically using * the standard React component JavaScript API. * * React.renderComponent(( * Routes({ handler: App }, * Route({ name: 'login', handler: Login }), * Route({ name: 'logout', handler: Logout }), * Route({ name: 'about', handler: About }) * ) * ), document.body); * * Handlers for Route components that contain children can render their active * child route using the activeRouteHandler prop. * * var App = React.createClass({ * render: function () { * return ( * <div class="application"> * {this.props.activeRouteHandler()} * </div> * ); * } * }); */ var Route = React.createClass({ displayName: 'Route', statics: { getUnreservedProps: function (props) { return withoutProperties(props, RESERVED_PROPS); }, }, propTypes: { preserveScrollPosition: React.PropTypes.bool.isRequired, handler: React.PropTypes.any.isRequired, path: React.PropTypes.string, name: React.PropTypes.string }, getDefaultProps: function () { return { preserveScrollPosition: false }; }, render: function () { throw new Error( 'The <Route> component should not be rendered directly. You may be ' + 'missing a <Routes> wrapper around your list of routes.' ); } }); module.exports = Route; },{"../helpers/withoutProperties":29}],15:[function(_dereq_,module,exports){ var React = (typeof window !== "undefined" ? window.React : typeof global !== "undefined" ? global.React : null); var warning = _dereq_('react/lib/warning'); var copyProperties = _dereq_('react/lib/copyProperties'); var Promise = _dereq_('es6-promise').Promise; var Route = _dereq_('../components/Route'); var goBack = _dereq_('../helpers/goBack'); var replaceWith = _dereq_('../helpers/replaceWith'); var Path = _dereq_('../helpers/Path'); var Redirect = _dereq_('../helpers/Redirect'); var Transition = _dereq_('../helpers/Transition'); var HashLocation = _dereq_('../locations/HashLocation'); var HistoryLocation = _dereq_('../locations/HistoryLocation'); var RefreshLocation = _dereq_('../locations/RefreshLocation'); var ActiveStore = _dereq_('../stores/ActiveStore'); var PathStore = _dereq_('../stores/PathStore'); var RouteStore = _dereq_('../stores/RouteStore'); /** * The ref name that can be used to reference the active route component. */ var REF_NAME = '__activeRoute__'; /** * A hash of { name, location } pairs of all locations. */ var NAMED_LOCATIONS = { hash: HashLocation, history: HistoryLocation, refresh: RefreshLocation, disabled: RefreshLocation // TODO: Remove }; /** * The default handler for aborted transitions. Redirects replace * the current URL and all others roll it back. */ function defaultAbortedTransitionHandler(transition) { var reason = transition.abortReason; if (reason instanceof Redirect) { replaceWith(reason.to, reason.params, reason.query); } else { goBack(); } } /** * The default handler for active state updates. */ function defaultActiveStateChangeHandler(state) { ActiveStore.updateState(state); } /** * The default handler for errors that were thrown asynchronously * while transitioning. The default behavior is to re-throw the * error so that it isn't silently swallowed. */ function defaultTransitionErrorHandler(error) { throw error; // This error probably originated in a transition hook. } /** * The <Routes> component configures the route hierarchy and renders the * route matching the current location when rendered into a document. * * See the <Route> component for more details. */ var Routes = React.createClass({ displayName: 'Routes', propTypes: { onAbortedTransition: React.PropTypes.func.isRequired, onActiveStateChange: React.PropTypes.func.isRequired, onTransitionError: React.PropTypes.func.isRequired, preserveScrollPosition: React.PropTypes.bool, location: function (props, propName, componentName) { var location = props[propName]; if (typeof location === 'string' && !(location in NAMED_LOCATIONS)) return new Error('Unknown location "' + location + '", see ' + componentName); } }, getDefaultProps: function () { return { onAbortedTransition: defaultAbortedTransitionHandler, onActiveStateChange: defaultActiveStateChangeHandler, onTransitionError: defaultTransitionErrorHandler, preserveScrollPosition: false, location: HashLocation }; }, getInitialState: function () { return { routes: RouteStore.registerChildren(this.props.children, this) }; }, getLocation: function () { var location = this.props.location; if (typeof location === 'string') return NAMED_LOCATIONS[location]; return location; }, componentWillMount: function () { PathStore.setup(this.getLocation()); PathStore.addChangeListener(this.handlePathChange); }, componentDidMount: function () { this.handlePathChange(); }, componentWillUnmount: function () { PathStore.removeChangeListener(this.handlePathChange); }, handlePathChange: function () { this.dispatch(PathStore.getCurrentPath()); }, /** * Performs a depth-first search for the first route in the tree that matches * on the given path. Returns an array of all routes in the tree leading to * the one that matched in the format { route, params } where params is an * object that contains the URL parameters relevant to that route. Returns * null if no route in the tree matches the path. * * React.renderComponent( * <Routes> * <Route handler={App}> * <Route name="posts" handler={Posts}/> * <Route name="post" path="/posts/:id" handler={Post}/> * </Route> * </Routes> * ).match('/posts/123'); => [ { route: <AppRoute>, params: {} }, * { route: <PostRoute>, params: { id: '123' } } ] */ match: function (path) { return findMatches(Path.withoutQuery(path), this.state.routes, this.props.defaultRoute); }, /** * Performs a transition to the given path and returns a promise for the * Transition object that was used. * * In order to do this, the router first determines which routes are involved * in the transition beginning with the current route, up the route tree to * the first parent route that is shared with the destination route, and back * down the tree to the destination route. The willTransitionFrom static * method is invoked on all route handlers we're transitioning away from, in * reverse nesting order. Likewise, the willTransitionTo static method * is invoked on all route handlers we're transitioning to. * * Both willTransitionFrom and willTransitionTo hooks may either abort or * redirect the transition. If they need to resolve asynchronously, they may * return a promise. * * Any error that occurs asynchronously during the transition is re-thrown in * the top-level scope unless returnRejectedPromise is true, in which case a * rejected promise is returned so the caller may handle the error. * * Note: This function does not update the URL in a browser's location bar. * If you want to keep the URL in sync with transitions, use Router.transitionTo, * Router.replaceWith, or Router.goBack instead. */ dispatch: function (path, returnRejectedPromise) { var transition = new Transition(path); var routes = this; var promise = runTransitionHooks(routes, transition).then(function (nextState) { if (transition.isAborted) { routes.props.onAbortedTransition(transition); } else if (nextState) { routes.setState(nextState); routes.props.onActiveStateChange(nextState); // TODO: add functional test var rootMatch = getRootMatch(nextState.matches); if (rootMatch) maybeScrollWindow(routes, rootMatch.route); } return transition; }); if (!returnRejectedPromise) { promise = promise.then(undefined, function (error) { // Use setTimeout to break the promise chain. setTimeout(function () { routes.props.onTransitionError(error); }); }); } return promise; }, render: function () { if (!this.state.path) return null; var matches = this.state.matches; if (matches.length) { // matches[0] corresponds to the top-most match return matches[0].route.props.handler(computeHandlerProps(matches, this.state.activeQuery)); } else { return null; } } }); function findMatches(path, routes, defaultRoute) { var matches = null, route, params; for (var i = 0, len = routes.length; i < len; ++i) { route = routes[i]; // Check the subtree first to find the most deeply-nested match. matches = findMatches(path, route.props.children, route.props.defaultRoute); if (matches != null) { var rootParams = getRootMatch(matches).params; params = route.props.paramNames.reduce(function (params, paramName) { params[paramName] = rootParams[paramName]; return params; }, {}); matches.unshift(makeMatch(route, params)); return matches; } // No routes in the subtree matched, so check this route. params = Path.extractParams(route.props.path, path); if (params) return [ makeMatch(route, params) ]; } // No routes matched, so try the default route if there is one. params = defaultRoute && Path.extractParams(defaultRoute.props.path, path); if (params) return [ makeMatch(defaultRoute, params) ]; return matches; } function makeMatch(route, params) { return { route: route, params: params }; } function hasMatch(matches, match) { return matches.some(function (m) { if (m.route !== match.route) return false; for (var property in m.params) { if (m.params[property] !== match.params[property]) return false; } return true; }); } function getRootMatch(matches) { return matches[matches.length - 1]; } function updateMatchComponents(matches, refs) { var i = 0, component; while (component = refs[REF_NAME]) { matches[i++].component = component; refs = component.refs; } } /** * Runs all transition hooks that are required to get from the current state * to the state specified by the given transition and updates the current state * if they all pass successfully. Returns a promise that resolves to the new * state if it needs to be updated, or undefined if not. */ function runTransitionHooks(routes, transition) { if (routes.state.path === transition.path) return Promise.resolve(); // Nothing to do! var currentMatches = routes.state.matches; var nextMatches = routes.match(transition.path); warning( nextMatches, 'No route matches path "' + transition.path + '". Make sure you have ' + '<Route path="' + transition.path + '"> somewhere in your routes' ); if (!nextMatches) nextMatches = []; var fromMatches, toMatches; if (currentMatches) { updateMatchComponents(currentMatches, routes.refs); fromMatches = currentMatches.filter(function (match) { return !hasMatch(nextMatches, match); }); toMatches = nextMatches.filter(function (match) { return !hasMatch(currentMatches, match); }); } else { fromMatches = []; toMatches = nextMatches; } return runTransitionFromHooks(fromMatches, transition).then(function () { if (transition.isAborted) return; // No need to continue. return runTransitionToHooks(toMatches, transition).then(function () { if (transition.isAborted) return; // No need to continue. var rootMatch = getRootMatch(nextMatches); var params = (rootMatch && rootMatch.params) || {}; var query = Path.extractQuery(transition.path) || {}; return { path: transition.path, matches: nextMatches, activeParams: params, activeQuery: query, activeRoutes: nextMatches.map(function (match) { return match.route; }) }; }); }); } /** * Calls the willTransitionFrom hook of all handlers in the given matches * serially in reverse with the transition object and the current instance of * the route's handler, so that the deepest nested handlers are called first. * Returns a promise that resolves after the last handler. */ function runTransitionFromHooks(matches, transition) { var promise = Promise.resolve(); reversedArray(matches).forEach(function (match) { promise = promise.then(function () { var handler = match.route.props.handler; if (!transition.isAborted && handler.willTransitionFrom) return handler.willTransitionFrom(transition, match.component); }); }); return promise; } /** * Calls the willTransitionTo hook of all handlers in the given matches serially * with the transition object and any params that apply to that handler. Returns * a promise that resolves after the last handler. */ function runTransitionToHooks(matches, transition) { var promise = Promise.resolve(); matches.forEach(function (match) { promise = promise.then(function () { var handler = match.route.props.handler; if (!transition.isAborted && handler.willTransitionTo) return handler.willTransitionTo(transition, match.params); }); }); return promise; } /** * Given an array of matches as returned by findMatches, return a descriptor for * the handler hierarchy specified by the route. */ function computeHandlerProps(matches, query) { var props = { ref: null, key: null, params: null, query: null, activeRouteHandler: returnNull }; var childHandler; reversedArray(matches).forEach(function (match) { var route = match.route; props = Route.getUnreservedProps(route.props); props.ref = REF_NAME; props.key = Path.injectParams(route.props.path, match.params); props.params = match.params; props.query = query; if (childHandler) { props.activeRouteHandler = childHandler; } else { props.activeRouteHandler = returnNull; } childHandler = function (props, addedProps) { if (arguments.length > 2 && typeof arguments[2] !== 'undefined') throw new Error('Passing children to a route handler is not supported'); return route.props.handler(copyProperties(props, addedProps)); }.bind(this, props); }); return props; } function returnNull() { return null; } function reversedArray(array) { return array.slice(0).reverse(); } function maybeScrollWindow(routes, rootRoute) { if (routes.props.preserveScrollPosition || rootRoute.props.preserveScrollPosition) return; window.scrollTo(0, 0); } module.exports = Routes; },{"../components/Route":14,"../helpers/Path":16,"../helpers/Redirect":17,"../helpers/Transition":18,"../helpers/goBack":21,"../helpers/replaceWith":25,"../locations/HashLocation":30,"../locations/HistoryLocation":31,"../locations/RefreshLocation":32,"../stores/ActiveStore":35,"../stores/PathStore":36,"../stores/RouteStore":37,"es6-promise":42,"react/lib/copyProperties":53,"react/lib/warning":61}],16:[function(_dereq_,module,exports){ var invariant = _dereq_('react/lib/invariant'); var copyProperties = _dereq_('react/lib/copyProperties'); var qs = _dereq_('querystring'); var URL = _dereq_('./URL'); var paramMatcher = /((?::[a-z_$][a-z0-9_$]*)|\*)/ig; var queryMatcher = /\?(.+)/; function getParamName(pathSegment) { return pathSegment === '*' ? 'splat' : pathSegment.substr(1); } var _compiledPatterns = {}; function compilePattern(pattern) { if (_compiledPatterns[pattern]) return _compiledPatterns[pattern]; var compiled = _compiledPatterns[pattern] = {}; var paramNames = compiled.paramNames = []; var source = pattern.replace(paramMatcher, function (match, pathSegment) { paramNames.push(getParamName(pathSegment)); return pathSegment === '*' ? '(.*?)' : '([^/?#]+)'; }); compiled.matcher = new RegExp('^' + source + '$', 'i'); return compiled; } function isDynamicPattern(pattern) { return pattern.indexOf(':') !== -1 || pattern.indexOf('*') !== -1; } var Path = { /** * Extracts the portions of the given URL path that match the given pattern * and returns an object of param name => value pairs. Returns null if the * pattern does not match the given path. */ extractParams: function (pattern, path) { if (!pattern) return null; if (!isDynamicPattern(pattern)) { if (pattern === URL.decode(path)) return {}; // No dynamic segments, but the paths match. return null; } var compiled = compilePattern(pattern); var match = URL.decode(path).match(compiled.matcher); if (!match) return null; var params = {}; compiled.paramNames.forEach(function (paramName, index) { params[paramName] = match[index + 1]; }); return params; }, /** * Returns an array of the names of all parameters in the given pattern. */ extractParamNames: function (pattern) { if (!pattern) return []; return compilePattern(pattern).paramNames; }, /** * Returns a version of the given route path with params interpolated. Throws * if there is a dynamic segment of the route path for which there is no param. */ injectParams: function (pattern, params) { if (!pattern) return null; if (!isDynamicPattern(pattern)) return pattern; params = params || {}; return pattern.replace(paramMatcher, function (match, pathSegment) { var paramName = getParamName(pathSegment); invariant( params[paramName] != null, 'Missing "' + paramName + '" parameter for path "' + pattern + '"' ); // Preserve forward slashes. return String(params[paramName]).split('/').map(URL.encode).join('/'); }); }, /** * Returns an object that is the result of parsing any query string contained in * the given path, null if the path contains no query string. */ extractQuery: function (path) { var match = path.match(queryMatcher); return match && qs.parse(match[1]); }, /** * Returns a version of the given path without the query string. */ withoutQuery: function (path) { return path.replace(queryMatcher, ''); }, /** * Returns a version of the given path with the parameters in the given query * added to the query string. */ withQuery: function (path, query) { var existingQuery = Path.extractQuery(path); if (existingQuery) query = query ? copyProperties(existingQuery, query) : existingQuery; var queryString = query && qs.stringify(query); if (queryString) return Path.withoutQuery(path) + '?' + queryString; return path; }, /** * Returns a normalized version of the given path. */ normalize: function (path) { return path.replace(/^\/*/, '/'); } }; module.exports = Path; },{"./URL":19,"querystring":41,"react/lib/copyProperties":53,"react/lib/invariant":55}],17:[function(_dereq_,module,exports){ /** * Encapsulates a redirect to the given route. */ function Redirect(to, params, query) { this.to = to; this.params = params; this.query = query; } module.exports = Redirect; },{}],18:[function(_dereq_,module,exports){ var mixInto = _dereq_('react/lib/mixInto'); var transitionTo = _dereq_('./transitionTo'); var Redirect = _dereq_('./Redirect'); /** * Encapsulates a transition to a given path. * * The willTransitionTo and willTransitionFrom handlers receive * an instance of this class as their first argument. */ function Transition(path) { this.path = path; this.abortReason = null; this.isAborted = false; } mixInto(Transition, { abort: function (reason) { this.abortReason = reason; this.isAborted = true; }, redirect: function (to, params, query) { this.abort(new Redirect(to, params, query)); }, retry: function () { transitionTo(this.path); } }); module.exports = Transition; },{"./Redirect":17,"./transitionTo":28,"react/lib/mixInto":60}],19:[function(_dereq_,module,exports){ var urlEncodedSpaceRE = /\+/g; var encodedSpaceRE = /%20/g; var URL = { /* These functions were copied from the https://github.com/cujojs/rest source, MIT licensed */ decode: function (str) { // spec says space should be encoded as '+' str = str.replace(urlEncodedSpaceRE, ' '); return decodeURIComponent(str); }, encode: function (str) { str = encodeURIComponent(str); // spec says space should be encoded as '+' return str.replace(encodedSpaceRE, '+'); } }; module.exports = URL; },{}],20:[function(_dereq_,module,exports){ /** * Returns the current URL path from `window.location`, including query string */ function getWindowPath() { return window.location.pathname + window.location.search; } module.exports = getWindowPath; },{}],21:[function(_dereq_,module,exports){ var PathStore = _dereq_('../stores/PathStore'); /** * Transitions to the previous URL. */ function goBack() { PathStore.pop(); } module.exports = goBack; },{"../stores/PathStore":36}],22:[function(_dereq_,module,exports){ module.exports = Function.prototype.call.bind(Object.prototype.hasOwnProperty); },{}],23:[function(_dereq_,module,exports){ var HashLocation = _dereq_('../locations/HashLocation'); var PathStore = _dereq_('../stores/PathStore'); var makePath = _dereq_('./makePath'); /** * Returns a string that may safely be used as the href of a * link to the route with the given name. */ function makeHref(to, params, query) { var path = makePath(to, params, query); if (PathStore.getLocation() === HashLocation) return '#' + path; return path; } module.exports = makeHref; },{"../locations/HashLocation":30,"../stores/PathStore":36,"./makePath":24}],24:[function(_dereq_,module,exports){ var invariant = _dereq_('react/lib/invariant'); var RouteStore = _dereq_('../stores/RouteStore'); var Path = _dereq_('./Path'); /** * Returns an absolute URL path created from the given route name, URL * parameters, and query values. */ function makePath(to, params, query) { var path; if (to.charAt(0) === '/') { path = Path.normalize(to); // Absolute path. } else { var route = RouteStore.getRouteByName(to); invariant( route, 'Unable to find a route named "' + to + '". Make sure you have ' + 'a <Route name="' + to + '"> defined somewhere in your routes' ); path = route.props.path; } return Path.withQuery(Path.injectParams(path, params), query); } module.exports = makePath; },{"../stores/RouteStore":37,"./Path":16,"react/lib/invariant":55}],25:[function(_dereq_,module,exports){ var PathStore = _dereq_('../stores/PathStore'); var makePath = _dereq_('./makePath'); /** * Transitions to the URL specified in the arguments by replacing * the current URL in the history stack. */ function replaceWith(to, params, query) { PathStore.replace(makePath(to, params, query)); } module.exports = replaceWith; },{"../stores/PathStore":36,"./makePath":24}],26:[function(_dereq_,module,exports){ var Promise = _dereq_('es6-promise').Promise; /** * Resolves all values in asyncState and calls the setState * function with new state as they resolve. Returns a promise * that resolves after all values are resolved. */ function resolveAsyncState(asyncState, setState) { if (asyncState == null) return Promise.resolve(); var keys = Object.keys(asyncState); return Promise.all( keys.map(function (key) { return Promise.resolve(asyncState[key]).then(function (value) { var newState = {}; newState[key] = value; setState(newState); }); }) ); } module.exports = resolveAsyncState; },{"es6-promise":42}],27:[function(_dereq_,module,exports){ function supportsHistory() { /*! taken from modernizr * https://github.com/Modernizr/Modernizr/blob/master/LICENSE * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js */ var ua = navigator.userAgent; if ((ua.indexOf('Android 2.') !== -1 || (ua.indexOf('Android 4.0') !== -1)) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1) { return false; } return (window.history && 'pushState' in window.history); } module.exports = supportsHistory; },{}],28:[function(_dereq_,module,exports){ var PathStore = _dereq_('../stores/PathStore'); var makePath = _dereq_('./makePath'); /** * Transitions to the URL specified in the arguments by pushing * a new URL onto the history stack. */ function transitionTo(to, params, query) { PathStore.push(makePath(to, params, query)); } module.exports = transitionTo; },{"../stores/PathStore":36,"./makePath":24}],29:[function(_dereq_,module,exports){ function withoutProperties(object, properties) { var result = {}; for (var property in object) { if (object.hasOwnProperty(property) && !properties[property]) result[property] = object[property]; } return result; } module.exports = withoutProperties; },{}],30:[function(_dereq_,module,exports){ var invariant = _dereq_('react/lib/invariant'); var ExecutionEnvironment = _dereq_('react/lib/ExecutionEnvironment'); var getWindowPath = _dereq_('../helpers/getWindowPath'); var _onChange; /** * A Location that uses `window.location.hash`. */ var HashLocation = { setup: function (onChange) { invariant( ExecutionEnvironment.canUseDOM, 'You cannot use HashLocation in an environment with no DOM' ); _onChange = onChange; // Make sure the hash is at least / to begin with. if (window.location.hash === '') window.location.replace(getWindowPath() + '#/'); if (window.addEventListener) { window.addEventListener('hashchange', _onChange, false); } else { window.attachEvent('onhashchange', _onChange); } }, teardown: function () { if (window.removeEventListener) { window.removeEventListener('hashchange', _onChange, false); } else { window.detachEvent('onhashchange', _onChange); } }, push: function (path) { window.location.hash = path; }, replace: function (path) { window.location.replace(getWindowPath() + '#' + path); }, pop: function () { window.history.back(); }, getCurrentPath: function () { return window.location.hash.substr(1); }, toString: function () { return '<HashLocation>'; } }; module.exports = HashLocation; },{"../helpers/getWindowPath":20,"react/lib/ExecutionEnvironment":52,"react/lib/invariant":55}],31:[function(_dereq_,module,exports){ var invariant = _dereq_('react/lib/invariant'); var ExecutionEnvironment = _dereq_('react/lib/ExecutionEnvironment'); var getWindowPath = _dereq_('../helpers/getWindowPath'); var _onChange; /** * A Location that uses HTML5 history. */ var HistoryLocation = { setup: function (onChange) { invariant( ExecutionEnvironment.canUseDOM, 'You cannot use HistoryLocation in an environment with no DOM' ); _onChange = onChange; if (window.addEventListener) { window.addEventListener('popstate', _onChange, false); } else { window.attachEvent('popstate', _onChange); } }, teardown: function () { if (window.removeEventListener) { window.removeEventListener('popstate', _onChange, false); } else { window.detachEvent('popstate', _onChange); } }, push: function (path) { window.history.pushState({ path: path }, '', path); _onChange(); }, replace: function (path) { window.history.replaceState({ path: path }, '', path); _onChange(); }, pop: function () { window.history.back(); }, getCurrentPath: getWindowPath, toString: function () { return '<HistoryLocation>'; } }; module.exports = HistoryLocation; },{"../helpers/getWindowPath":20,"react/lib/ExecutionEnvironment":52,"react/lib/invariant":55}],32:[function(_dereq_,module,exports){ var invariant = _dereq_('react/lib/invariant'); var ExecutionEnvironment = _dereq_('react/lib/ExecutionEnvironment'); var getWindowPath = _dereq_('../helpers/getWindowPath'); /** * A Location that uses full page refreshes. This is used as * the fallback for HistoryLocation in browsers that do not * support the HTML5 history API. */ var RefreshLocation = { setup: function () { invariant( ExecutionEnvironment.canUseDOM, 'You cannot use RefreshLocation in an environment with no DOM' ); }, push: function (path) { window.location = path; }, replace: function (path) { window.location.replace(path); }, pop: function () { window.history.back(); }, getCurrentPath: getWindowPath, toString: function () { return '<RefreshLocation>'; } }; module.exports = RefreshLocation; },{"../helpers/getWindowPath":20,"react/lib/ExecutionEnvironment":52,"react/lib/invariant":55}],33:[function(_dereq_,module,exports){ var ActiveStore = _dereq_('../stores/ActiveStore'); /** * A mixin for components that need to know about the routes, params, * and query that are currently active. Components that use it get two * things: * * 1. An `isActive` static method they can use to check if a route, * params, and query are active. * 2. An `updateActiveState` instance method that is called when the * active state changes. * * Example: * * var Tab = React.createClass({ * * mixins: [ Router.ActiveState ], * * getInitialState: function () { * return { * isActive: false * }; * }, * * updateActiveState: function () { * this.setState({ * isActive: Tab.isActive(routeName, params, query) * }) * } * * }); */ var ActiveState = { statics: { /** * Returns true if the route with the given name, URL parameters, and query * are all currently active. */ isActive: ActiveStore.isActive }, componentWillMount: function () { ActiveStore.addChangeListener(this.handleActiveStateChange); }, componentDidMount: function () { if (this.updateActiveState) this.updateActiveState(); }, componentWillUnmount: function () { ActiveStore.removeChangeListener(this.handleActiveStateChange); }, handleActiveStateChange: function () { if (this.isMounted() && this.updateActiveState) this.updateActiveState(); } }; module.exports = ActiveState; },{"../stores/ActiveStore":35}],34:[function(_dereq_,module,exports){ var React = (typeof window !== "undefined" ? window.React : typeof global !== "undefined" ? global.React : null); var resolveAsyncState = _dereq_('../helpers/resolveAsyncState'); /** * A mixin for route handler component classes that fetch at least * part of their state asynchronously. Classes that use it should * declare a static `getInitialAsyncState` method that fetches state * for a component after it mounts. This function is given three * arguments: 1) the current route params, 2) the current query and * 3) a function that can be used to set state as it is received. * * Much like the familiar `getInitialState` method, `getInitialAsyncState` * should return a hash of key/value pairs to use in the component's * state. The difference is that the values may be promises. As these * values resolve, the component's state is updated. You should only * ever need to use the setState function for doing things like * streaming data and/or updating progress. * * Example: * * var User = React.createClass({ * * statics: { * * getInitialAsyncState: function (params, query, setState) { * // Return a hash with keys named after the state variables * // you want to set, as you normally do in getInitialState, * // except the values may be immediate values or promises. * // The state is automatically updated as promises resolve. * return { * user: getUserByID(params.userID) // may be a promise * }; * * // Or, use the setState function to stream data! * var buffer = ''; * * return { * * // Same as above, the stream state variable is set to the * // value returned by this promise when it resolves. * stream: getStreamingData(params.userID, function (chunk) { * buffer += chunk; * * // Notify of progress. * setState({ * streamBuffer: buffer * }); * }) * * }; * } * * }, * * getInitialState: function () { * return { * user: null, // Receives a value when getUserByID resolves. * stream: null, // Receives a value when getStreamingData resolves. * streamBuffer: '' // Used to track data as it loads. * }; * }, * * render: function () { * if (!this.state.user) * return <LoadingUser/>; * * return ( * <div> * <p>Welcome {this.state.user.name}!</p> * <p>So far, you've received {this.state.streamBuffer.length} data!</p> * </div> * ); * } * * }); * * When testing, use the `initialAsyncState` prop to simulate asynchronous * data fetching. When this prop is present, no attempt is made to retrieve * additional state via `getInitialAsyncState`. */ var AsyncState = { propTypes: { initialAsyncState: React.PropTypes.object }, getInitialState: function () { return this.props.initialAsyncState || null; }, updateAsyncState: function (state) { if (this.isMounted()) this.setState(state); }, componentDidMount: function () { if (this.props.initialAsyncState || typeof this.constructor.getInitialAsyncState !== 'function') return; resolveAsyncState( this.constructor.getInitialAsyncState(this.props.params, this.props.query, this.updateAsyncState), this.updateAsyncState ); } }; module.exports = AsyncState; },{"../helpers/resolveAsyncState":26}],35:[function(_dereq_,module,exports){ var EventEmitter = _dereq_('events').EventEmitter; var CHANGE_EVENT = 'change'; var _events = new EventEmitter; _events.setMaxListeners(0); function notifyChange() { _events.emit(CHANGE_EVENT); } var _activeRoutes = []; var _activeParams = {}; var _activeQuery = {}; function routeIsActive(routeName) { return _activeRoutes.some(function (route) { return route.props.name === routeName; }); } function paramsAreActive(params) { for (var property in params) { if (_activeParams[property] !== String(params[property])) return false; } return true; } function queryIsActive(query) { for (var property in query) { if (_activeQuery[property] !== String(query[property])) return false; } return true; } /** * The ActiveStore keeps track of which routes, URL and query parameters are * currently active on a page. <Link>s subscribe to the ActiveStore to know * whether or not they are active. */ var ActiveStore = { addChangeListener: function (listener) { _events.on(CHANGE_EVENT, listener); }, removeChangeListener: function (listener) { _events.removeListener(CHANGE_EVENT, listener); }, /** * Updates the currently active state and notifies all listeners. * This is automatically called by routes as they become active. */ updateState: function (state) { state = state || {}; _activeRoutes = state.activeRoutes || []; _activeParams = state.activeParams || {}; _activeQuery = state.activeQuery || {}; notifyChange(); }, /** * Returns true if the route with the given name, URL parameters, and query * are all currently active. */ isActive: function (routeName, params, query) { var isActive = routeIsActive(routeName) && paramsAreActive(params); if (query) return isActive && queryIsActive(query); return isActive; } }; module.exports = ActiveStore; },{"events":38}],36:[function(_dereq_,module,exports){ var warning = _dereq_('react/lib/warning'); var EventEmitter = _dereq_('events').EventEmitter; var supportsHistory = _dereq_('../helpers/supportsHistory'); var HistoryLocation = _dereq_('../locations/HistoryLocation'); var RefreshLocation = _dereq_('../locations/RefreshLocation'); var CHANGE_EVENT = 'change'; var _events = new EventEmitter; function notifyChange() { _events.emit(CHANGE_EVENT); } var _location; /** * The PathStore keeps track of the current URL path and manages * the location strategy that is used to update the URL. */ var PathStore = { addChangeListener: function (listener) { _events.on(CHANGE_EVENT, listener); }, removeChangeListener: function (listener) { _events.removeListener(CHANGE_EVENT, listener); // Automatically teardown when the last listener is removed. if (EventEmitter.listenerCount(_events, CHANGE_EVENT) === 0) PathStore.teardown(); }, setup: function (location) { // When using HistoryLocation, automatically fallback // to RefreshLocation in browsers that do not support // the HTML5 history API. if (location === HistoryLocation && !supportsHistory()) location = RefreshLocation; if (_location == null) { _location = location; if (_location && typeof _location.setup === 'function') _location.setup(notifyChange); } else { warning( _location === location, 'Cannot use location %s, already using %s', location, _location ); } }, teardown: function () { if (_location && typeof _location.teardown === 'function') _location.teardown(); _location = null; }, getLocation: function () { return _location; }, push: function (path) { if (_location.getCurrentPath() !== path) _location.push(path); }, replace: function (path) { if (_location.getCurrentPath() !== path) _location.replace(path); }, pop: function () { _location.pop(); }, getCurrentPath: function () { return _location.getCurrentPath(); } }; module.exports = PathStore; },{"../helpers/supportsHistory":27,"../locations/HistoryLocation":31,"../locations/RefreshLocation":32,"events":38,"react/lib/warning":61}],37:[function(_dereq_,module,exports){ var React = (typeof window !== "undefined" ? window.React : typeof global !== "undefined" ? global.React : null); var invariant = _dereq_('react/lib/invariant'); var warning = _dereq_('react/lib/warning'); var Path = _dereq_('../helpers/Path'); var _namedRoutes = {}; /** * The RouteStore contains a directory of all <Route>s in the system. It is * used primarily for looking up routes by name so that <Link>s can use a * route name in the "to" prop and users can use route names in `Router.transitionTo` * and other high-level utility methods. */ var RouteStore = { /** * Removes all references to <Route>s from the store. Should only ever * really be used in tests to clear the store between test runs. */ unregisterAllRoutes: function () { _namedRoutes = {}; }, /** * Removes the reference to the given <Route> and all of its children * from the store. */ unregisterRoute: function (route) { var props = route.props; if (props.name) delete _namedRoutes[props.name]; React.Children.forEach(props.children, RouteStore.unregisterRoute); }, /** * Registers a <Route> and all of its children with the store. Also, * does some normalization and validation on route props. */ registerRoute: function (route, parentRoute) { // Note: parentRoute may be a <Route> _or_ a <Routes>. var props = route.props; invariant( React.isValidClass(props.handler), 'The handler for the "%s" route must be a valid React class', props.name || props.path ); // Default routes have no name, path, or children. var isDefault = !(props.path || props.name || props.children); if (props.path || props.name) { props.path = Path.normalize(props.path || props.name); } else if (parentRoute && parentRoute.props.path) { props.path = parentRoute.props.path; } else { props.path = '/'; } props.paramNames = Path.extractParamNames(props.path); // Make sure the route's path has all params its parent needs. if (parentRoute && Array.isArray(parentRoute.props.paramNames)) { parentRoute.props.paramNames.forEach(function (paramName) { invariant( props.paramNames.indexOf(paramName) !== -1, 'The nested route path "%s" is missing the "%s" parameter of its parent path "%s"', props.path, paramName, parentRoute.props.path ); }); } // Make sure the route can be looked up by <Link>s. if (props.name) { var existingRoute = _namedRoutes[props.name]; invariant( !existingRoute || route === existingRoute, 'You cannot use the name "%s" for more than one route', props.name ); _namedRoutes[props.name] = route; } if (parentRoute && isDefault) { invariant( parentRoute.props.defaultRoute == null, 'You may not have more than one <DefaultRoute> per <Route>' ); parentRoute.props.defaultRoute = route; return null; } // Make sure children is an array. props.children = RouteStore.registerChildren(props.children, route); return route; }, /** * Registers many children routes at once, always returning an array. */ registerChildren: function (children, parentRoute) { var routes = []; React.Children.forEach(children, function (child) { // Exclude <DefaultRoute>s. if (child = RouteStore.registerRoute(child, parentRoute)) routes.push(child); }); return routes; }, /** * Returns the Route object with the given name, if one exists. */ getRouteByName: function (routeName) { return _namedRoutes[routeName] || null; } }; module.exports = RouteStore; },{"../helpers/Path":16,"react/lib/invariant":55,"react/lib/warning":61}],38:[function(_dereq_,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. function EventEmitter() { this._events = this._events || {}; this._maxListeners = this._maxListeners || undefined; } module.exports = EventEmitter; // Backwards-compat with node 0.10.x EventEmitter.EventEmitter = EventEmitter; EventEmitter.prototype._events = undefined; EventEmitter.prototype._maxListeners = undefined; // By default EventEmitters will print a warning if more than 10 listeners are // added to it. This is a useful default which helps finding memory leaks. EventEmitter.defaultMaxListeners = 10; // Obviously not all Emitters should be limited to 10. This function allows // that to be increased. Set to zero for unlimited. EventEmitter.prototype.setMaxListeners = function(n) { if (!isNumber(n) || n < 0 || isNaN(n)) throw TypeError('n must be a positive number'); this._maxListeners = n; return this; }; EventEmitter.prototype.emit = function(type) { var er, handler, len, args, i, listeners; if (!this._events) this._events = {}; // If there is no 'error' event listener then throw. if (type === 'error') { if (!this._events.error || (isObject(this._events.error) && !this._events.error.length)) { er = arguments[1]; if (er instanceof Error) { throw er; // Unhandled 'error' event } else { throw TypeError('Uncaught, unspecified "error" event.'); } return false; } } handler = this._events[type]; if (isUndefined(handler)) return false; if (isFunction(handler)) { switch (arguments.length) { // fast cases case 1: handler.call(this); break; case 2: handler.call(this, arguments[1]); break; case 3: handler.call(this, arguments[1], arguments[2]); break; // slower default: len = arguments.length; args = new Array(len - 1); for (i = 1; i < len; i++) args[i - 1] = arguments[i]; handler.apply(this, args); } } else if (isObject(handler)) { len = arguments.length; args = new Array(len - 1); for (i = 1; i < len; i++) args[i - 1] = arguments[i]; listeners = handler.slice(); len = listeners.length; for (i = 0; i < len; i++) listeners[i].apply(this, args); } return true; }; EventEmitter.prototype.addListener = function(type, listener) { var m; if (!isFunction(listener)) throw TypeError('listener must be a function'); if (!this._events) this._events = {}; // To avoid recursion in the case that type === "newListener"! Before // adding it to the listeners, first emit "newListener". if (this._events.newListener) this.emit('newListener', type, isFunction(listener.listener) ? listener.listener : listener); if (!this._events[type]) // Optimize the case of one listener. Don't need the extra array object. this._events[type] = listener; else if (isObject(this._events[type])) // If we've already got an array, just append. this._events[type].push(listener); else // Adding the second element, need to change to array. this._events[type] = [this._events[type], listener]; // Check for listener leak if (isObject(this._events[type]) && !this._events[type].warned) { var m; if (!isUndefined(this._maxListeners)) { m = this._maxListeners; } else { m = EventEmitter.defaultMaxListeners; } if (m && m > 0 && this._events[type].length > m) { this._events[type].warned = true; console.error('(node) warning: possible EventEmitter memory ' + 'leak detected. %d listeners added. ' + 'Use emitter.setMaxListeners() to increase limit.', this._events[type].length); if (typeof console.trace === 'function') { // not supported in IE 10 console.trace(); } } } return this; }; EventEmitter.prototype.on = EventEmitter.prototype.addListener; EventEmitter.prototype.once = function(type, listener) { if (!isFunction(listener)) throw TypeError('listener must be a function'); var fired = false; function g() { this.removeListener(type, g); if (!fired) { fired = true; listener.apply(this, arguments); } } g.listener = listener; this.on(type, g); return this; }; // emits a 'removeListener' event iff the listener was removed EventEmitter.prototype.removeListener = function(type, listener) { var list, position, length, i; if (!isFunction(listener)) throw TypeError('listener must be a function'); if (!this._events || !this._events[type]) return this; list = this._events[type]; length = list.length; position = -1; if (list === listener || (isFunction(list.listener) && list.listener === listener)) { delete this._events[type]; if (this._events.removeListener) this.emit('removeListener', type, listener); } else if (isObject(list)) { for (i = length; i-- > 0;) { if (list[i] === listener || (list[i].listener && list[i].listener === listener)) { position = i; break; } } if (position < 0) return this; if (list.length === 1) { list.length = 0; delete this._events[type]; } else { list.splice(position, 1); } if (this._events.removeListener) this.emit('removeListener', type, listener); } return this; }; EventEmitter.prototype.removeAllListeners = function(type) { var key, listeners; if (!this._events) return this; // not listening for removeListener, no need to emit if (!this._events.removeListener) { if (arguments.length === 0) this._events = {}; else if (this._events[type]) delete this._events[type]; return this; } // emit removeListener for all listeners on all events if (arguments.length === 0) { for (key in this._events) { if (key === 'removeListener') continue; this.removeAllListeners(key); } this.removeAllListeners('removeListener'); this._events = {}; return this; } listeners = this._events[type]; if (isFunction(listeners)) { this.removeListener(type, listeners); } else { // LIFO order while (listeners.length) this.removeListener(type, listeners[listeners.length - 1]); } delete this._events[type]; return this; }; EventEmitter.prototype.listeners = function(type) { var ret; if (!this._events || !this._events[type]) ret = []; else if (isFunction(this._events[type])) ret = [this._events[type]]; else ret = this._events[type].slice(); return ret; }; EventEmitter.listenerCount = function(emitter, type) { var ret; if (!emitter._events || !emitter._events[type]) ret = 0; else if (isFunction(emitter._events[type])) ret = 1; else ret = emitter._events[type].length; return ret; }; function isFunction(arg) { return typeof arg === 'function'; } function isNumber(arg) { return typeof arg === 'number'; } function isObject(arg) { return typeof arg === 'object' && arg !== null; } function isUndefined(arg) { return arg === void 0; } },{}],39:[function(_dereq_,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; // If obj.hasOwnProperty has been overridden, then calling // obj.hasOwnProperty(prop) will break. // See: https://github.com/joyent/node/issues/1707 function hasOwnProperty(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } module.exports = function(qs, sep, eq, options) { sep = sep || '&'; eq = eq || '='; var obj = {}; if (typeof qs !== 'string' || qs.length === 0) { return obj; } var regexp = /\+/g; qs = qs.split(sep); var maxKeys = 1000; if (options && typeof options.maxKeys === 'number') { maxKeys = options.maxKeys; } var len = qs.length; // maxKeys <= 0 means that we should not limit keys count if (maxKeys > 0 && len > maxKeys) { len = maxKeys; } for (var i = 0; i < len; ++i) { var x = qs[i].replace(regexp, '%20'), idx = x.indexOf(eq), kstr, vstr, k, v; if (idx >= 0) { kstr = x.substr(0, idx); vstr = x.substr(idx + 1); } else { kstr = x; vstr = ''; } k = decodeURIComponent(kstr); v = decodeURIComponent(vstr); if (!hasOwnProperty(obj, k)) { obj[k] = v; } else if (isArray(obj[k])) { obj[k].push(v); } else { obj[k] = [obj[k], v]; } } return obj; }; var isArray = Array.isArray || function (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; },{}],40:[function(_dereq_,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; var stringifyPrimitive = function(v) { switch (typeof v) { case 'string': return v; case 'boolean': return v ? 'true' : 'false'; case 'number': return isFinite(v) ? v : ''; default: return ''; } }; module.exports = function(obj, sep, eq, name) { sep = sep || '&'; eq = eq || '='; if (obj === null) { obj = undefined; } if (typeof obj === 'object') { return map(objectKeys(obj), function(k) { var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; if (isArray(obj[k])) { return map(obj[k], function(v) { return ks + encodeURIComponent(stringifyPrimitive(v)); }).join(sep); } else { return ks + encodeURIComponent(stringifyPrimitive(obj[k])); } }).join(sep); } if (!name) return ''; return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj)); }; var isArray = Array.isArray || function (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; function map (xs, f) { if (xs.map) return xs.map(f); var res = []; for (var i = 0; i < xs.length; i++) { res.push(f(xs[i], i)); } return res; } var objectKeys = Object.keys || function (obj) { var res = []; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); } return res; }; },{}],41:[function(_dereq_,module,exports){ 'use strict'; exports.decode = exports.parse = _dereq_('./decode'); exports.encode = exports.stringify = _dereq_('./encode'); },{"./decode":39,"./encode":40}],42:[function(_dereq_,module,exports){ "use strict"; var Promise = _dereq_("./promise/promise").Promise; var polyfill = _dereq_("./promise/polyfill").polyfill; exports.Promise = Promise; exports.polyfill = polyfill; },{"./promise/polyfill":46,"./promise/promise":47}],43:[function(_dereq_,module,exports){ "use strict"; /* global toString */ var isArray = _dereq_("./utils").isArray; var isFunction = _dereq_("./utils").isFunction; /** Returns a promise that is fulfilled when all the given promises have been fulfilled, or rejected if any of them become rejected. The return promise is fulfilled with an array that gives all the values in the order they were passed in the `promises` array argument. Example: ```javascript var promise1 = RSVP.resolve(1); var promise2 = RSVP.resolve(2); var promise3 = RSVP.resolve(3); var promises = [ promise1, promise2, promise3 ]; RSVP.all(promises).then(function(array){ // The array here would be [ 1, 2, 3 ]; }); ``` If any of the `promises` given to `RSVP.all` are rejected, the first promise that is rejected will be given as an argument to the returned promises's rejection handler. For example: Example: ```javascript var promise1 = RSVP.resolve(1); var promise2 = RSVP.reject(new Error("2")); var promise3 = RSVP.reject(new Error("3")); var promises = [ promise1, promise2, promise3 ]; RSVP.all(promises).then(function(array){ // Code here never runs because there are rejected promises! }, function(error) { // error.message === "2" }); ``` @method all @for RSVP @param {Array} promises @param {String} label @return {Promise} promise that is fulfilled when all `promises` have been fulfilled, or rejected if any of them become rejected. */ function all(promises) { /*jshint validthis:true */ var Promise = this; if (!isArray(promises)) { throw new TypeError('You must pass an array to all.'); } return new Promise(function(resolve, reject) { var results = [], remaining = promises.length, promise; if (remaining === 0) { resolve([]); } function resolver(index) { return function(value) { resolveAll(index, value); }; } function resolveAll(index, value) { results[index] = value; if (--remaining === 0) { resolve(results); } } for (var i = 0; i < promises.length; i++) { promise = promises[i]; if (promise && isFunction(promise.then)) { promise.then(resolver(i), reject); } else { resolveAll(i, promise); } } }); } exports.all = all; },{"./utils":51}],44:[function(_dereq_,module,exports){ "use strict"; var browserGlobal = (typeof window !== 'undefined') ? window : {}; var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver; var local = (typeof global !== 'undefined') ? global : (this === undefined? window:this); // node function useNextTick() { return function() { process.nextTick(flush); }; } function useMutationObserver() { var iterations = 0; var observer = new BrowserMutationObserver(flush); var node = document.createTextNode(''); observer.observe(node, { characterData: true }); return function() { node.data = (iterations = ++iterations % 2); }; } function useSetTimeout() { return function() { local.setTimeout(flush, 1); }; } var queue = []; function flush() { for (var i = 0; i < queue.length; i++) { var tuple = queue[i]; var callback = tuple[0], arg = tuple[1]; callback(arg); } queue = []; } var scheduleFlush; // Decide what async method to use to triggering processing of queued callbacks: if (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]') { scheduleFlush = useNextTick(); } else if (BrowserMutationObserver) { scheduleFlush = useMutationObserver(); } else { scheduleFlush = useSetTimeout(); } function asap(callback, arg) { var length = queue.push([callback, arg]); if (length === 1) { // If length is 1, that means that we need to schedule an async flush. // If additional callbacks are queued before the queue is flushed, they // will be processed by this flush that we are scheduling. scheduleFlush(); } } exports.asap = asap; },{}],45:[function(_dereq_,module,exports){ "use strict"; var config = { instrument: false }; function configure(name, value) { if (arguments.length === 2) { config[name] = value; } else { return config[name]; } } exports.config = config; exports.configure = configure; },{}],46:[function(_dereq_,module,exports){ "use strict"; /*global self*/ var RSVPPromise = _dereq_("./promise").Promise; var isFunction = _dereq_("./utils").isFunction; function polyfill() { var local; if (typeof global !== 'undefined') { local = global; } else if (typeof window !== 'undefined' && window.document) { local = window; } else { local = self; } var es6PromiseSupport = "Promise" in local && // Some of these methods are missing from // Firefox/Chrome experimental implementations "resolve" in local.Promise && "reject" in local.Promise && "all" in local.Promise && "race" in local.Promise && // Older version of the spec had a resolver object // as the arg rather than a function (function() { var resolve; new local.Promise(function(r) { resolve = r; }); return isFunction(resolve); }()); if (!es6PromiseSupport) { local.Promise = RSVPPromise; } } exports.polyfill = polyfill; },{"./promise":47,"./utils":51}],47:[function(_dereq_,module,exports){ "use strict"; var config = _dereq_("./config").config; var configure = _dereq_("./config").configure; var objectOrFunction = _dereq_("./utils").objectOrFunction; var isFunction = _dereq_("./utils").isFunction; var now = _dereq_("./utils").now; var all = _dereq_("./all").all; var race = _dereq_("./race").race; var staticResolve = _dereq_("./resolve").resolve; var staticReject = _dereq_("./reject").reject; var asap = _dereq_("./asap").asap; var counter = 0; config.async = asap; // default async is asap; function Promise(resolver) { if (!isFunction(resolver)) { throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); } if (!(this instanceof Promise)) { throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); } this._subscribers = []; invokeResolver(resolver, this); } function invokeResolver(resolver, promise) { function resolvePromise(value) { resolve(promise, value); } function rejectPromise(reason) { reject(promise, reason); } try { resolver(resolvePromise, rejectPromise); } catch(e) { rejectPromise(e); } } function invokeCallback(settled, promise, callback, detail) { var hasCallback = isFunction(callback), value, error, succeeded, failed; if (hasCallback) { try { value = callback(detail); succeeded = true; } catch(e) { failed = true; error = e; } } else { value = detail; succeeded = true; } if (handleThenable(promise, value)) { return; } else if (hasCallback && succeeded) { resolve(promise, value); } else if (failed) { reject(promise, error); } else if (settled === FULFILLED) { resolve(promise, value); } else if (settled === REJECTED) { reject(promise, value); } } var PENDING = void 0; var SEALED = 0; var FULFILLED = 1; var REJECTED = 2; function subscribe(parent, child, onFulfillment, onRejection) { var subscribers = parent._subscribers; var length = subscribers.length; subscribers[length] = child; subscribers[length + FULFILLED] = onFulfillment; subscribers[length + REJECTED] = onRejection; } function publish(promise, settled) { var child, callback, subscribers = promise._subscribers, detail = promise._detail; for (var i = 0; i < subscribers.length; i += 3) { child = subscribers[i]; callback = subscribers[i + settled]; invokeCallback(settled, child, callback, detail); } promise._subscribers = null; } Promise.prototype = { constructor: Promise, _state: undefined, _detail: undefined, _subscribers: undefined, then: function(onFulfillment, onRejection) { var promise = this; var thenPromise = new this.constructor(function() {}); if (this._state) { var callbacks = arguments; config.async(function invokePromiseCallback() { invokeCallback(promise._state, thenPromise, callbacks[promise._state - 1], promise._detail); }); } else { subscribe(this, thenPromise, onFulfillment, onRejection); } return thenPromise; }, 'catch': function(onRejection) { return this.then(null, onRejection); } }; Promise.all = all; Promise.race = race; Promise.resolve = staticResolve; Promise.reject = staticReject; function handleThenable(promise, value) { var then = null, resolved; try { if (promise === value) { throw new TypeError("A promises callback cannot return that same promise."); } if (objectOrFunction(value)) { then = value.then; if (isFunction(then)) { then.call(value, function(val) { if (resolved) { return true; } resolved = true; if (value !== val) { resolve(promise, val); } else { fulfill(promise, val); } }, function(val) { if (resolved) { return true; } resolved = true; reject(promise, val); }); return true; } } } catch (error) { if (resolved) { return true; } reject(promise, error); return true; } return false; } function resolve(promise, value) { if (promise === value) { fulfill(promise, value); } else if (!handleThenable(promise, value)) { fulfill(promise, value); } } function fulfill(promise, value) { if (promise._state !== PENDING) { return; } promise._state = SEALED; promise._detail = value; config.async(publishFulfillment, promise); } function reject(promise, reason) { if (promise._state !== PENDING) { return; } promise._state = SEALED; promise._detail = reason; config.async(publishRejection, promise); } function publishFulfillment(promise) { publish(promise, promise._state = FULFILLED); } function publishRejection(promise) { publish(promise, promise._state = REJECTED); } exports.Promise = Promise; },{"./all":43,"./asap":44,"./config":45,"./race":48,"./reject":49,"./resolve":50,"./utils":51}],48:[function(_dereq_,module,exports){ "use strict"; /* global toString */ var isArray = _dereq_("./utils").isArray; /** `RSVP.race` allows you to watch a series of promises and act as soon as the first promise given to the `promises` argument fulfills or rejects. Example: ```javascript var promise1 = new RSVP.Promise(function(resolve, reject){ setTimeout(function(){ resolve("promise 1"); }, 200); }); var promise2 = new RSVP.Promise(function(resolve, reject){ setTimeout(function(){ resolve("promise 2"); }, 100); }); RSVP.race([promise1, promise2]).then(function(result){ // result === "promise 2" because it was resolved before promise1 // was resolved. }); ``` `RSVP.race` is deterministic in that only the state of the first completed promise matters. For example, even if other promises given to the `promises` array argument are resolved, but the first completed promise has become rejected before the other promises became fulfilled, the returned promise will become rejected: ```javascript var promise1 = new RSVP.Promise(function(resolve, reject){ setTimeout(function(){ resolve("promise 1"); }, 200); }); var promise2 = new RSVP.Promise(function(resolve, reject){ setTimeout(function(){ reject(new Error("promise 2")); }, 100); }); RSVP.race([promise1, promise2]).then(function(result){ // Code here never runs because there are rejected promises! }, function(reason){ // reason.message === "promise2" because promise 2 became rejected before // promise 1 became fulfilled }); ``` @method race @for RSVP @param {Array} promises array of promises to observe @param {String} label optional string for describing the promise returned. Useful for tooling. @return {Promise} a promise that becomes fulfilled with the value the first completed promises is resolved with if the first completed promise was fulfilled, or rejected with the reason that the first completed promise was rejected with. */ function race(promises) { /*jshint validthis:true */ var Promise = this; if (!isArray(promises)) { throw new TypeError('You must pass an array to race.'); } return new Promise(function(resolve, reject) { var results = [], promise; for (var i = 0; i < promises.length; i++) { promise = promises[i]; if (promise && typeof promise.then === 'function') { promise.then(resolve, reject); } else { resolve(promise); } } }); } exports.race = race; },{"./utils":51}],49:[function(_dereq_,module,exports){ "use strict"; /** `RSVP.reject` returns a promise that will become rejected with the passed `reason`. `RSVP.reject` is essentially shorthand for the following: ```javascript var promise = new RSVP.Promise(function(resolve, reject){ reject(new Error('WHOOPS')); }); promise.then(function(value){ // Code here doesn't run because the promise is rejected! }, function(reason){ // reason.message === 'WHOOPS' }); ``` Instead of writing the above, your code now simply becomes the following: ```javascript var promise = RSVP.reject(new Error('WHOOPS')); promise.then(function(value){ // Code here doesn't run because the promise is rejected! }, function(reason){ // reason.message === 'WHOOPS' }); ``` @method reject @for RSVP @param {Any} reason value that the returned promise will be rejected with. @param {String} label optional string for identifying the returned promise. Useful for tooling. @return {Promise} a promise that will become rejected with the given `reason`. */ function reject(reason) { /*jshint validthis:true */ var Promise = this; return new Promise(function (resolve, reject) { reject(reason); }); } exports.reject = reject; },{}],50:[function(_dereq_,module,exports){ "use strict"; function resolve(value) { /*jshint validthis:true */ if (value && typeof value === 'object' && value.constructor === this) { return value; } var Promise = this; return new Promise(function(resolve) { resolve(value); }); } exports.resolve = resolve; },{}],51:[function(_dereq_,module,exports){ "use strict"; function objectOrFunction(x) { return isFunction(x) || (typeof x === "object" && x !== null); } function isFunction(x) { return typeof x === "function"; } function isArray(x) { return Object.prototype.toString.call(x) === "[object Array]"; } // Date.now is not available in browsers < IE9 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now#Compatibility var now = Date.now || function() { return new Date().getTime(); }; exports.objectOrFunction = objectOrFunction; exports.isFunction = isFunction; exports.isArray = isArray; exports.now = now; },{}],52:[function(_dereq_,module,exports){ /** * Copyright 2013-2014 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @providesModule ExecutionEnvironment */ /*jslint evil: true */ "use strict"; var canUseDOM = !!( typeof window !== 'undefined' && window.document && window.document.createElement ); /** * Simple, lightweight module assisting with the detection and context of * Worker. Helps avoid circular dependencies and allows code to reason about * whether or not they are in a Worker, even if they never include the main * `ReactWorker` dependency. */ var ExecutionEnvironment = { canUseDOM: canUseDOM, canUseWorkers: typeof Worker !== 'undefined', canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), canUseViewport: canUseDOM && !!window.screen, isInWorker: !canUseDOM // For now, this is true - might change in the future. }; module.exports = ExecutionEnvironment; },{}],53:[function(_dereq_,module,exports){ /** * Copyright 2013-2014 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @providesModule copyProperties */ /** * Copy properties from one or more objects (up to 5) into the first object. * This is a shallow copy. It mutates the first object and also returns it. * * NOTE: `arguments` has a very significant performance penalty, which is why * we don't support unlimited arguments. */ function copyProperties(obj, a, b, c, d, e, f) { obj = obj || {}; if ("production" !== "production") { if (f) { throw new Error('Too many arguments passed to copyProperties'); } } var args = [a, b, c, d, e]; var ii = 0, v; while (args[ii]) { v = args[ii++]; for (var k in v) { obj[k] = v[k]; } // IE ignores toString in object iteration.. See: // webreflection.blogspot.com/2007/07/quick-fix-internet-explorer-and.html if (v.hasOwnProperty && v.hasOwnProperty('toString') && (typeof v.toString != 'undefined') && (obj.toString !== v.toString)) { obj.toString = v.toString; } } return obj; } module.exports = copyProperties; },{}],54:[function(_dereq_,module,exports){ /** * Copyright 2013-2014 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @providesModule emptyFunction */ var copyProperties = _dereq_("./copyProperties"); function makeEmptyFunction(arg) { return function() { return arg; }; } /** * This function accepts and discards inputs; it has no side effects. This is * primarily useful idiomatically for overridable function endpoints which * always need to be callable, since JS lacks a null-call idiom ala Cocoa. */ function emptyFunction() {} copyProperties(emptyFunction, { thatReturns: makeEmptyFunction, thatReturnsFalse: makeEmptyFunction(false), thatReturnsTrue: makeEmptyFunction(true), thatReturnsNull: makeEmptyFunction(null), thatReturnsThis: function() { return this; }, thatReturnsArgument: function(arg) { return arg; } }); module.exports = emptyFunction; },{"./copyProperties":53}],55:[function(_dereq_,module,exports){ /** * Copyright 2013-2014 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @providesModule invariant */ "use strict"; /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments * to provide information about what broke and what you were * expecting. * * The invariant message will be stripped in production, but the invariant * will remain to ensure logic does not differ in production. */ var invariant = function(condition, format, a, b, c, d, e, f) { if ("production" !== "production") { if (format === undefined) { throw new Error('invariant requires an error message argument'); } } if (!condition) { var error; if (format === undefined) { error = new Error( 'Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.' ); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error( 'Invariant Violation: ' + format.replace(/%s/g, function() { return args[argIndex++]; }) ); } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } }; module.exports = invariant; },{}],56:[function(_dereq_,module,exports){ /** * Copyright 2013-2014 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @providesModule keyMirror * @typechecks static-only */ "use strict"; var invariant = _dereq_("./invariant"); /** * Constructs an enumeration with keys equal to their value. * * For example: * * var COLORS = keyMirror({blue: null, red: null}); * var myColor = COLORS.blue; * var isColorValid = !!COLORS[myColor]; * * The last line could not be performed if the values of the generated enum were * not equal to their keys. * * Input: {key1: val1, key2: val2} * Output: {key1: key1, key2: key2} * * @param {object} obj * @return {object} */ var keyMirror = function(obj) { var ret = {}; var key; ("production" !== "production" ? invariant( obj instanceof Object && !Array.isArray(obj), 'keyMirror(...): Argument must be an object.' ) : invariant(obj instanceof Object && !Array.isArray(obj))); for (key in obj) { if (!obj.hasOwnProperty(key)) { continue; } ret[key] = key; } return ret; }; module.exports = keyMirror; },{"./invariant":55}],57:[function(_dereq_,module,exports){ /** * Copyright 2013-2014 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @providesModule merge */ "use strict"; var mergeInto = _dereq_("./mergeInto"); /** * Shallow merges two structures into a return value, without mutating either. * * @param {?object} one Optional object with properties to merge from. * @param {?object} two Optional object with properties to merge from. * @return {object} The shallow extension of one by two. */ var merge = function(one, two) { var result = {}; mergeInto(result, one); mergeInto(result, two); return result; }; module.exports = merge; },{"./mergeInto":59}],58:[function(_dereq_,module,exports){ /** * Copyright 2013-2014 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @providesModule mergeHelpers * * requiresPolyfills: Array.isArray */ "use strict"; var invariant = _dereq_("./invariant"); var keyMirror = _dereq_("./keyMirror"); /** * Maximum number of levels to traverse. Will catch circular structures. * @const */ var MAX_MERGE_DEPTH = 36; /** * We won't worry about edge cases like new String('x') or new Boolean(true). * Functions are considered terminals, and arrays are not. * @param {*} o The item/object/value to test. * @return {boolean} true iff the argument is a terminal. */ var isTerminal = function(o) { return typeof o !== 'object' || o === null; }; var mergeHelpers = { MAX_MERGE_DEPTH: MAX_MERGE_DEPTH, isTerminal: isTerminal, /** * Converts null/undefined values into empty object. * * @param {?Object=} arg Argument to be normalized (nullable optional) * @return {!Object} */ normalizeMergeArg: function(arg) { return arg === undefined || arg === null ? {} : arg; }, /** * If merging Arrays, a merge strategy *must* be supplied. If not, it is * likely the caller's fault. If this function is ever called with anything * but `one` and `two` being `Array`s, it is the fault of the merge utilities. * * @param {*} one Array to merge into. * @param {*} two Array to merge from. */ checkMergeArrayArgs: function(one, two) { ("production" !== "production" ? invariant( Array.isArray(one) && Array.isArray(two), 'Tried to merge arrays, instead got %s and %s.', one, two ) : invariant(Array.isArray(one) && Array.isArray(two))); }, /** * @param {*} one Object to merge into. * @param {*} two Object to merge from. */ checkMergeObjectArgs: function(one, two) { mergeHelpers.checkMergeObjectArg(one); mergeHelpers.checkMergeObjectArg(two); }, /** * @param {*} arg */ checkMergeObjectArg: function(arg) { ("production" !== "production" ? invariant( !isTerminal(arg) && !Array.isArray(arg), 'Tried to merge an object, instead got %s.', arg ) : invariant(!isTerminal(arg) && !Array.isArray(arg))); }, /** * @param {*} arg */ checkMergeIntoObjectArg: function(arg) { ("production" !== "production" ? invariant( (!isTerminal(arg) || typeof arg === 'function') && !Array.isArray(arg), 'Tried to merge into an object, instead got %s.', arg ) : invariant((!isTerminal(arg) || typeof arg === 'function') && !Array.isArray(arg))); }, /** * Checks that a merge was not given a circular object or an object that had * too great of depth. * * @param {number} Level of recursion to validate against maximum. */ checkMergeLevel: function(level) { ("production" !== "production" ? invariant( level < MAX_MERGE_DEPTH, 'Maximum deep merge depth exceeded. You may be attempting to merge ' + 'circular structures in an unsupported way.' ) : invariant(level < MAX_MERGE_DEPTH)); }, /** * Checks that the supplied merge strategy is valid. * * @param {string} Array merge strategy. */ checkArrayStrategy: function(strategy) { ("production" !== "production" ? invariant( strategy === undefined || strategy in mergeHelpers.ArrayStrategies, 'You must provide an array strategy to deep merge functions to ' + 'instruct the deep merge how to resolve merging two arrays.' ) : invariant(strategy === undefined || strategy in mergeHelpers.ArrayStrategies)); }, /** * Set of possible behaviors of merge algorithms when encountering two Arrays * that must be merged together. * - `clobber`: The left `Array` is ignored. * - `indexByIndex`: The result is achieved by recursively deep merging at * each index. (not yet supported.) */ ArrayStrategies: keyMirror({ Clobber: true, IndexByIndex: true }) }; module.exports = mergeHelpers; },{"./invariant":55,"./keyMirror":56}],59:[function(_dereq_,module,exports){ /** * Copyright 2013-2014 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @providesModule mergeInto * @typechecks static-only */ "use strict"; var mergeHelpers = _dereq_("./mergeHelpers"); var checkMergeObjectArg = mergeHelpers.checkMergeObjectArg; var checkMergeIntoObjectArg = mergeHelpers.checkMergeIntoObjectArg; /** * Shallow merges two structures by mutating the first parameter. * * @param {object|function} one Object to be merged into. * @param {?object} two Optional object with properties to merge from. */ function mergeInto(one, two) { checkMergeIntoObjectArg(one); if (two != null) { checkMergeObjectArg(two); for (var key in two) { if (!two.hasOwnProperty(key)) { continue; } one[key] = two[key]; } } } module.exports = mergeInto; },{"./mergeHelpers":58}],60:[function(_dereq_,module,exports){ /** * Copyright 2013-2014 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @providesModule mixInto */ "use strict"; /** * Simply copies properties to the prototype. */ var mixInto = function(constructor, methodBag) { var methodName; for (methodName in methodBag) { if (!methodBag.hasOwnProperty(methodName)) { continue; } constructor.prototype[methodName] = methodBag[methodName]; } }; module.exports = mixInto; },{}],61:[function(_dereq_,module,exports){ /** * Copyright 2014 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @providesModule warning */ "use strict"; var emptyFunction = _dereq_("./emptyFunction"); /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var warning = emptyFunction; if ("production" !== "production") { warning = function(condition, format ) {var args=Array.prototype.slice.call(arguments,2); if (format === undefined) { throw new Error( '`warning(condition, format, ...args)` requires a warning ' + 'message argument' ); } if (!condition) { var argIndex = 0; console.warn('Warning: ' + format.replace(/%s/g, function() {return args[argIndex++];})); } }; } module.exports = warning; },{"./emptyFunction":54}],62:[function(_dereq_,module,exports){ module.exports = _dereq_('./modules/helpers/replaceWith'); },{"./modules/helpers/replaceWith":25}],63:[function(_dereq_,module,exports){ module.exports = _dereq_('./modules/helpers/transitionTo'); },{"./modules/helpers/transitionTo":28}]},{},[9]) (9) });
ajax/libs/react-data-grid/2.0.39/react-data-grid.js
maruilian11/cdnjs
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("react"), require("react-dom")); else if(typeof define === 'function' && define.amd) define(["react", "react-dom"], factory); else if(typeof exports === 'object') exports["ReactDataGrid"] = factory(require("react"), require("react-dom")); else root["ReactDataGrid"] = factory(root["React"], root["ReactDOM"]); })(this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_4__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(191); /***/ }), /* 1 */, /* 2 */ /***/ (function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE_2__; /***/ }), /* 3 */, /* 4 */ /***/ (function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE_4__; /***/ }), /* 5 */, /* 6 */, /* 7 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2015 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ function classNames() { var classes = ''; var arg; for (var i = 0; i < arguments.length; i++) { arg = arguments[i]; if (!arg) { continue; } if ('string' === typeof arg || 'number' === typeof arg) { classes += ' ' + arg; } else if (Object.prototype.toString.call(arg) === '[object Array]') { classes += ' ' + classNames.apply(null, arg); } else if ('object' === typeof arg) { for (var key in arg) { if (!arg.hasOwnProperty(key) || !arg[key]) { continue; } classes += ' ' + key; } } } return classes.substr(1); } // safely export classNames for node / browserify if (typeof module !== 'undefined' && module.exports) { module.exports = classNames; } // safely export classNames for RequireJS if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function() { return classNames; }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } /***/ }), /* 8 */ /***/ (function(module, exports) { 'use strict'; module.exports = { getColumn: function getColumn(columns, idx) { if (Array.isArray(columns)) { return columns[idx]; } else if (typeof Immutable !== 'undefined') { return columns.get(idx); } }, spliceColumn: function spliceColumn(metrics, idx, column) { if (Array.isArray(metrics.columns)) { metrics.columns.splice(idx, 1, column); } else if (typeof Immutable !== 'undefined') { metrics.columns = metrics.columns.splice(idx, 1, column); } return metrics; }, getSize: function getSize(columns) { if (Array.isArray(columns)) { return columns.length; } else if (typeof Immutable !== 'undefined') { return columns.size; } }, // Logic extented to allow for functions to be passed down in column.editable // this allows us to deicde whether we can be edting from a cell level canEdit: function canEdit(col, rowData, enableCellSelect) { if (col.editable != null && typeof col.editable === 'function') { return enableCellSelect === true && col.editable(rowData); } return enableCellSelect === true && (!!col.editor || !!col.editable); }, getValue: function getValue(column, property) { var value = void 0; if (column.toJSON && column.get) { value = column.get(property); } else { value = column[property]; } return value; } }; /***/ }), /* 9 */ /***/ (function(module, exports) { /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ // css base code, injected by the css-loader module.exports = function() { var list = []; // return the list of modules as css string list.toString = function toString() { var result = []; for(var i = 0; i < this.length; i++) { var item = this[i]; if(item[2]) { result.push("@media " + item[2] + "{" + item[1] + "}"); } else { result.push(item[1]); } } return result.join(""); }; // import a list of modules into the list list.i = function(modules, mediaQuery) { if(typeof modules === "string") modules = [[null, modules, ""]]; var alreadyImportedModules = {}; for(var i = 0; i < this.length; i++) { var id = this[i][0]; if(typeof id === "number") alreadyImportedModules[id] = true; } for(i = 0; i < modules.length; i++) { var item = modules[i]; // skip already imported module // this implementation is not 100% perfect for weird media query combinations // when a module is imported multiple times with different media queries. // I hope this will never occur (Hey this way we have smaller bundles) if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { if(mediaQuery && !item[2]) { item[2] = mediaQuery; } else if(mediaQuery) { item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; } list.push(item); } } }; return list; }; /***/ }), /* 10 */ /***/ (function(module, exports, __webpack_require__) { /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ var stylesInDom = {}, memoize = function(fn) { var memo; return function () { if (typeof memo === "undefined") memo = fn.apply(this, arguments); return memo; }; }, isOldIE = memoize(function() { return /msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase()); }), getHeadElement = memoize(function () { return document.head || document.getElementsByTagName("head")[0]; }), singletonElement = null, singletonCounter = 0, styleElementsInsertedAtTop = []; module.exports = function(list, options) { if(false) { if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment"); } options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style> // tags it will allow on a page if (typeof options.singleton === "undefined") options.singleton = isOldIE(); // By default, add <style> tags to the bottom of <head>. if (typeof options.insertAt === "undefined") options.insertAt = "bottom"; var styles = listToStyles(list); addStylesToDom(styles, options); return function update(newList) { var mayRemove = []; for(var i = 0; i < styles.length; i++) { var item = styles[i]; var domStyle = stylesInDom[item.id]; domStyle.refs--; mayRemove.push(domStyle); } if(newList) { var newStyles = listToStyles(newList); addStylesToDom(newStyles, options); } for(var i = 0; i < mayRemove.length; i++) { var domStyle = mayRemove[i]; if(domStyle.refs === 0) { for(var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j](); delete stylesInDom[domStyle.id]; } } }; } function addStylesToDom(styles, options) { for(var i = 0; i < styles.length; i++) { var item = styles[i]; var domStyle = stylesInDom[item.id]; if(domStyle) { domStyle.refs++; for(var j = 0; j < domStyle.parts.length; j++) { domStyle.parts[j](item.parts[j]); } for(; j < item.parts.length; j++) { domStyle.parts.push(addStyle(item.parts[j], options)); } } else { var parts = []; for(var j = 0; j < item.parts.length; j++) { parts.push(addStyle(item.parts[j], options)); } stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts}; } } } function listToStyles(list) { var styles = []; var newStyles = {}; for(var i = 0; i < list.length; i++) { var item = list[i]; var id = item[0]; var css = item[1]; var media = item[2]; var sourceMap = item[3]; var part = {css: css, media: media, sourceMap: sourceMap}; if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]}); else newStyles[id].parts.push(part); } return styles; } function insertStyleElement(options, styleElement) { var head = getHeadElement(); var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1]; if (options.insertAt === "top") { if(!lastStyleElementInsertedAtTop) { head.insertBefore(styleElement, head.firstChild); } else if(lastStyleElementInsertedAtTop.nextSibling) { head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling); } else { head.appendChild(styleElement); } styleElementsInsertedAtTop.push(styleElement); } else if (options.insertAt === "bottom") { head.appendChild(styleElement); } else { throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'."); } } function removeStyleElement(styleElement) { styleElement.parentNode.removeChild(styleElement); var idx = styleElementsInsertedAtTop.indexOf(styleElement); if(idx >= 0) { styleElementsInsertedAtTop.splice(idx, 1); } } function createStyleElement(options) { var styleElement = document.createElement("style"); styleElement.type = "text/css"; insertStyleElement(options, styleElement); return styleElement; } function createLinkElement(options) { var linkElement = document.createElement("link"); linkElement.rel = "stylesheet"; insertStyleElement(options, linkElement); return linkElement; } function addStyle(obj, options) { var styleElement, update, remove; if (options.singleton) { var styleIndex = singletonCounter++; styleElement = singletonElement || (singletonElement = createStyleElement(options)); update = applyToSingletonTag.bind(null, styleElement, styleIndex, false); remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true); } else if(obj.sourceMap && typeof URL === "function" && typeof URL.createObjectURL === "function" && typeof URL.revokeObjectURL === "function" && typeof Blob === "function" && typeof btoa === "function") { styleElement = createLinkElement(options); update = updateLink.bind(null, styleElement); remove = function() { removeStyleElement(styleElement); if(styleElement.href) URL.revokeObjectURL(styleElement.href); }; } else { styleElement = createStyleElement(options); update = applyToTag.bind(null, styleElement); remove = function() { removeStyleElement(styleElement); }; } update(obj); return function updateStyle(newObj) { if(newObj) { if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) return; update(obj = newObj); } else { remove(); } }; } var replaceText = (function () { var textStore = []; return function (index, replacement) { textStore[index] = replacement; return textStore.filter(Boolean).join('\n'); }; })(); function applyToSingletonTag(styleElement, index, remove, obj) { var css = remove ? "" : obj.css; if (styleElement.styleSheet) { styleElement.styleSheet.cssText = replaceText(index, css); } else { var cssNode = document.createTextNode(css); var childNodes = styleElement.childNodes; if (childNodes[index]) styleElement.removeChild(childNodes[index]); if (childNodes.length) { styleElement.insertBefore(cssNode, childNodes[index]); } else { styleElement.appendChild(cssNode); } } } function applyToTag(styleElement, obj) { var css = obj.css; var media = obj.media; if(media) { styleElement.setAttribute("media", media) } if(styleElement.styleSheet) { styleElement.styleSheet.cssText = css; } else { while(styleElement.firstChild) { styleElement.removeChild(styleElement.firstChild); } styleElement.appendChild(document.createTextNode(css)); } } function updateLink(linkElement, obj) { var css = obj.css; var sourceMap = obj.sourceMap; if(sourceMap) { // http://stackoverflow.com/a/26603875 css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */"; } var blob = new Blob([css], { type: "text/css" }); var oldSrc = linkElement.href; linkElement.href = URL.createObjectURL(blob); if(oldSrc) URL.revokeObjectURL(oldSrc); } /***/ }), /* 11 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var React = __webpack_require__(2); var ExcelColumnShape = { name: React.PropTypes.node.isRequired, key: React.PropTypes.string.isRequired, width: React.PropTypes.number.isRequired, filterable: React.PropTypes.bool }; module.exports = ExcelColumnShape; /***/ }), /* 12 */, /* 13 */, /* 14 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var PropTypes = __webpack_require__(2).PropTypes; module.exports = { selected: PropTypes.object.isRequired, copied: PropTypes.object, dragged: PropTypes.object, onCellClick: PropTypes.func.isRequired, onCellDoubleClick: PropTypes.func.isRequired, onCommit: PropTypes.func.isRequired, onCommitCancel: PropTypes.func.isRequired, handleDragEnterRow: PropTypes.func.isRequired, handleTerminateDrag: PropTypes.func.isRequired }; /***/ }), /* 15 */, /* 16 */, /* 17 */ /***/ (function(module, exports) { "use strict"; function createObjectWithProperties(originalObj, properties) { var result = {}; for (var _iterator = properties, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { var _ref; if (_isArray) { if (_i >= _iterator.length) break; _ref = _iterator[_i++]; } else { _i = _iterator.next(); if (_i.done) break; _ref = _i.value; } var property = _ref; if (originalObj[property]) { result[property] = originalObj[property]; } } return result; } module.exports = createObjectWithProperties; /***/ }), /* 18 */ /***/ (function(module, exports, __webpack_require__) { /** * Copyright (c) 2014-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ (function (global, factory) { true ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global.Immutable = factory()); }(this, function () { 'use strict';var SLICE$0 = Array.prototype.slice; function createClass(ctor, superClass) { if (superClass) { ctor.prototype = Object.create(superClass.prototype); } ctor.prototype.constructor = ctor; } function Iterable(value) { return isIterable(value) ? value : Seq(value); } createClass(KeyedIterable, Iterable); function KeyedIterable(value) { return isKeyed(value) ? value : KeyedSeq(value); } createClass(IndexedIterable, Iterable); function IndexedIterable(value) { return isIndexed(value) ? value : IndexedSeq(value); } createClass(SetIterable, Iterable); function SetIterable(value) { return isIterable(value) && !isAssociative(value) ? value : SetSeq(value); } function isIterable(maybeIterable) { return !!(maybeIterable && maybeIterable[IS_ITERABLE_SENTINEL]); } function isKeyed(maybeKeyed) { return !!(maybeKeyed && maybeKeyed[IS_KEYED_SENTINEL]); } function isIndexed(maybeIndexed) { return !!(maybeIndexed && maybeIndexed[IS_INDEXED_SENTINEL]); } function isAssociative(maybeAssociative) { return isKeyed(maybeAssociative) || isIndexed(maybeAssociative); } function isOrdered(maybeOrdered) { return !!(maybeOrdered && maybeOrdered[IS_ORDERED_SENTINEL]); } Iterable.isIterable = isIterable; Iterable.isKeyed = isKeyed; Iterable.isIndexed = isIndexed; Iterable.isAssociative = isAssociative; Iterable.isOrdered = isOrdered; Iterable.Keyed = KeyedIterable; Iterable.Indexed = IndexedIterable; Iterable.Set = SetIterable; var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@'; var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@'; var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@'; var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@'; // Used for setting prototype methods that IE8 chokes on. var DELETE = 'delete'; // Constants describing the size of trie nodes. var SHIFT = 5; // Resulted in best performance after ______? var SIZE = 1 << SHIFT; var MASK = SIZE - 1; // A consistent shared value representing "not set" which equals nothing other // than itself, and nothing that could be provided externally. var NOT_SET = {}; // Boolean references, Rough equivalent of `bool &`. var CHANGE_LENGTH = { value: false }; var DID_ALTER = { value: false }; function MakeRef(ref) { ref.value = false; return ref; } function SetRef(ref) { ref && (ref.value = true); } // A function which returns a value representing an "owner" for transient writes // to tries. The return value will only ever equal itself, and will not equal // the return of any subsequent call of this function. function OwnerID() {} // http://jsperf.com/copy-array-inline function arrCopy(arr, offset) { offset = offset || 0; var len = Math.max(0, arr.length - offset); var newArr = new Array(len); for (var ii = 0; ii < len; ii++) { newArr[ii] = arr[ii + offset]; } return newArr; } function ensureSize(iter) { if (iter.size === undefined) { iter.size = iter.__iterate(returnTrue); } return iter.size; } function wrapIndex(iter, index) { // This implements "is array index" which the ECMAString spec defines as: // // A String property name P is an array index if and only if // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal // to 2^32−1. // // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects if (typeof index !== 'number') { var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32 if ('' + uint32Index !== index || uint32Index === 4294967295) { return NaN; } index = uint32Index; } return index < 0 ? ensureSize(iter) + index : index; } function returnTrue() { return true; } function wholeSlice(begin, end, size) { return (begin === 0 || (size !== undefined && begin <= -size)) && (end === undefined || (size !== undefined && end >= size)); } function resolveBegin(begin, size) { return resolveIndex(begin, size, 0); } function resolveEnd(end, size) { return resolveIndex(end, size, size); } function resolveIndex(index, size, defaultIndex) { return index === undefined ? defaultIndex : index < 0 ? Math.max(0, size + index) : size === undefined ? index : Math.min(size, index); } /* global Symbol */ var ITERATE_KEYS = 0; var ITERATE_VALUES = 1; var ITERATE_ENTRIES = 2; var REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; var FAUX_ITERATOR_SYMBOL = '@@iterator'; var ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL; function Iterator(next) { this.next = next; } Iterator.prototype.toString = function() { return '[Iterator]'; }; Iterator.KEYS = ITERATE_KEYS; Iterator.VALUES = ITERATE_VALUES; Iterator.ENTRIES = ITERATE_ENTRIES; Iterator.prototype.inspect = Iterator.prototype.toSource = function () { return this.toString(); } Iterator.prototype[ITERATOR_SYMBOL] = function () { return this; }; function iteratorValue(type, k, v, iteratorResult) { var value = type === 0 ? k : type === 1 ? v : [k, v]; iteratorResult ? (iteratorResult.value = value) : (iteratorResult = { value: value, done: false }); return iteratorResult; } function iteratorDone() { return { value: undefined, done: true }; } function hasIterator(maybeIterable) { return !!getIteratorFn(maybeIterable); } function isIterator(maybeIterator) { return maybeIterator && typeof maybeIterator.next === 'function'; } function getIterator(iterable) { var iteratorFn = getIteratorFn(iterable); return iteratorFn && iteratorFn.call(iterable); } function getIteratorFn(iterable) { var iteratorFn = iterable && ( (REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) || iterable[FAUX_ITERATOR_SYMBOL] ); if (typeof iteratorFn === 'function') { return iteratorFn; } } function isArrayLike(value) { return value && typeof value.length === 'number'; } createClass(Seq, Iterable); function Seq(value) { return value === null || value === undefined ? emptySequence() : isIterable(value) ? value.toSeq() : seqFromValue(value); } Seq.of = function(/*...values*/) { return Seq(arguments); }; Seq.prototype.toSeq = function() { return this; }; Seq.prototype.toString = function() { return this.__toString('Seq {', '}'); }; Seq.prototype.cacheResult = function() { if (!this._cache && this.__iterateUncached) { this._cache = this.entrySeq().toArray(); this.size = this._cache.length; } return this; }; // abstract __iterateUncached(fn, reverse) Seq.prototype.__iterate = function(fn, reverse) { return seqIterate(this, fn, reverse, true); }; // abstract __iteratorUncached(type, reverse) Seq.prototype.__iterator = function(type, reverse) { return seqIterator(this, type, reverse, true); }; createClass(KeyedSeq, Seq); function KeyedSeq(value) { return value === null || value === undefined ? emptySequence().toKeyedSeq() : isIterable(value) ? (isKeyed(value) ? value.toSeq() : value.fromEntrySeq()) : keyedSeqFromValue(value); } KeyedSeq.prototype.toKeyedSeq = function() { return this; }; createClass(IndexedSeq, Seq); function IndexedSeq(value) { return value === null || value === undefined ? emptySequence() : !isIterable(value) ? indexedSeqFromValue(value) : isKeyed(value) ? value.entrySeq() : value.toIndexedSeq(); } IndexedSeq.of = function(/*...values*/) { return IndexedSeq(arguments); }; IndexedSeq.prototype.toIndexedSeq = function() { return this; }; IndexedSeq.prototype.toString = function() { return this.__toString('Seq [', ']'); }; IndexedSeq.prototype.__iterate = function(fn, reverse) { return seqIterate(this, fn, reverse, false); }; IndexedSeq.prototype.__iterator = function(type, reverse) { return seqIterator(this, type, reverse, false); }; createClass(SetSeq, Seq); function SetSeq(value) { return ( value === null || value === undefined ? emptySequence() : !isIterable(value) ? indexedSeqFromValue(value) : isKeyed(value) ? value.entrySeq() : value ).toSetSeq(); } SetSeq.of = function(/*...values*/) { return SetSeq(arguments); }; SetSeq.prototype.toSetSeq = function() { return this; }; Seq.isSeq = isSeq; Seq.Keyed = KeyedSeq; Seq.Set = SetSeq; Seq.Indexed = IndexedSeq; var IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@'; Seq.prototype[IS_SEQ_SENTINEL] = true; createClass(ArraySeq, IndexedSeq); function ArraySeq(array) { this._array = array; this.size = array.length; } ArraySeq.prototype.get = function(index, notSetValue) { return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue; }; ArraySeq.prototype.__iterate = function(fn, reverse) { var array = this._array; var maxIndex = array.length - 1; for (var ii = 0; ii <= maxIndex; ii++) { if (fn(array[reverse ? maxIndex - ii : ii], ii, this) === false) { return ii + 1; } } return ii; }; ArraySeq.prototype.__iterator = function(type, reverse) { var array = this._array; var maxIndex = array.length - 1; var ii = 0; return new Iterator(function() {return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii, array[reverse ? maxIndex - ii++ : ii++])} ); }; createClass(ObjectSeq, KeyedSeq); function ObjectSeq(object) { var keys = Object.keys(object); this._object = object; this._keys = keys; this.size = keys.length; } ObjectSeq.prototype.get = function(key, notSetValue) { if (notSetValue !== undefined && !this.has(key)) { return notSetValue; } return this._object[key]; }; ObjectSeq.prototype.has = function(key) { return this._object.hasOwnProperty(key); }; ObjectSeq.prototype.__iterate = function(fn, reverse) { var object = this._object; var keys = this._keys; var maxIndex = keys.length - 1; for (var ii = 0; ii <= maxIndex; ii++) { var key = keys[reverse ? maxIndex - ii : ii]; if (fn(object[key], key, this) === false) { return ii + 1; } } return ii; }; ObjectSeq.prototype.__iterator = function(type, reverse) { var object = this._object; var keys = this._keys; var maxIndex = keys.length - 1; var ii = 0; return new Iterator(function() { var key = keys[reverse ? maxIndex - ii : ii]; return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, key, object[key]); }); }; ObjectSeq.prototype[IS_ORDERED_SENTINEL] = true; createClass(IterableSeq, IndexedSeq); function IterableSeq(iterable) { this._iterable = iterable; this.size = iterable.length || iterable.size; } IterableSeq.prototype.__iterateUncached = function(fn, reverse) { if (reverse) { return this.cacheResult().__iterate(fn, reverse); } var iterable = this._iterable; var iterator = getIterator(iterable); var iterations = 0; if (isIterator(iterator)) { var step; while (!(step = iterator.next()).done) { if (fn(step.value, iterations++, this) === false) { break; } } } return iterations; }; IterableSeq.prototype.__iteratorUncached = function(type, reverse) { if (reverse) { return this.cacheResult().__iterator(type, reverse); } var iterable = this._iterable; var iterator = getIterator(iterable); if (!isIterator(iterator)) { return new Iterator(iteratorDone); } var iterations = 0; return new Iterator(function() { var step = iterator.next(); return step.done ? step : iteratorValue(type, iterations++, step.value); }); }; createClass(IteratorSeq, IndexedSeq); function IteratorSeq(iterator) { this._iterator = iterator; this._iteratorCache = []; } IteratorSeq.prototype.__iterateUncached = function(fn, reverse) { if (reverse) { return this.cacheResult().__iterate(fn, reverse); } var iterator = this._iterator; var cache = this._iteratorCache; var iterations = 0; while (iterations < cache.length) { if (fn(cache[iterations], iterations++, this) === false) { return iterations; } } var step; while (!(step = iterator.next()).done) { var val = step.value; cache[iterations] = val; if (fn(val, iterations++, this) === false) { break; } } return iterations; }; IteratorSeq.prototype.__iteratorUncached = function(type, reverse) { if (reverse) { return this.cacheResult().__iterator(type, reverse); } var iterator = this._iterator; var cache = this._iteratorCache; var iterations = 0; return new Iterator(function() { if (iterations >= cache.length) { var step = iterator.next(); if (step.done) { return step; } cache[iterations] = step.value; } return iteratorValue(type, iterations, cache[iterations++]); }); }; // # pragma Helper functions function isSeq(maybeSeq) { return !!(maybeSeq && maybeSeq[IS_SEQ_SENTINEL]); } var EMPTY_SEQ; function emptySequence() { return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([])); } function keyedSeqFromValue(value) { var seq = Array.isArray(value) ? new ArraySeq(value).fromEntrySeq() : isIterator(value) ? new IteratorSeq(value).fromEntrySeq() : hasIterator(value) ? new IterableSeq(value).fromEntrySeq() : typeof value === 'object' ? new ObjectSeq(value) : undefined; if (!seq) { throw new TypeError( 'Expected Array or iterable object of [k, v] entries, '+ 'or keyed object: ' + value ); } return seq; } function indexedSeqFromValue(value) { var seq = maybeIndexedSeqFromValue(value); if (!seq) { throw new TypeError( 'Expected Array or iterable object of values: ' + value ); } return seq; } function seqFromValue(value) { var seq = maybeIndexedSeqFromValue(value) || (typeof value === 'object' && new ObjectSeq(value)); if (!seq) { throw new TypeError( 'Expected Array or iterable object of values, or keyed object: ' + value ); } return seq; } function maybeIndexedSeqFromValue(value) { return ( isArrayLike(value) ? new ArraySeq(value) : isIterator(value) ? new IteratorSeq(value) : hasIterator(value) ? new IterableSeq(value) : undefined ); } function seqIterate(seq, fn, reverse, useKeys) { var cache = seq._cache; if (cache) { var maxIndex = cache.length - 1; for (var ii = 0; ii <= maxIndex; ii++) { var entry = cache[reverse ? maxIndex - ii : ii]; if (fn(entry[1], useKeys ? entry[0] : ii, seq) === false) { return ii + 1; } } return ii; } return seq.__iterateUncached(fn, reverse); } function seqIterator(seq, type, reverse, useKeys) { var cache = seq._cache; if (cache) { var maxIndex = cache.length - 1; var ii = 0; return new Iterator(function() { var entry = cache[reverse ? maxIndex - ii : ii]; return ii++ > maxIndex ? iteratorDone() : iteratorValue(type, useKeys ? entry[0] : ii - 1, entry[1]); }); } return seq.__iteratorUncached(type, reverse); } function fromJS(json, converter) { return converter ? fromJSWith(converter, json, '', {'': json}) : fromJSDefault(json); } function fromJSWith(converter, json, key, parentJSON) { if (Array.isArray(json)) { return converter.call(parentJSON, key, IndexedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)})); } if (isPlainObj(json)) { return converter.call(parentJSON, key, KeyedSeq(json).map(function(v, k) {return fromJSWith(converter, v, k, json)})); } return json; } function fromJSDefault(json) { if (Array.isArray(json)) { return IndexedSeq(json).map(fromJSDefault).toList(); } if (isPlainObj(json)) { return KeyedSeq(json).map(fromJSDefault).toMap(); } return json; } function isPlainObj(value) { return value && (value.constructor === Object || value.constructor === undefined); } /** * An extension of the "same-value" algorithm as [described for use by ES6 Map * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality) * * NaN is considered the same as NaN, however -0 and 0 are considered the same * value, which is different from the algorithm described by * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). * * This is extended further to allow Objects to describe the values they * represent, by way of `valueOf` or `equals` (and `hashCode`). * * Note: because of this extension, the key equality of Immutable.Map and the * value equality of Immutable.Set will differ from ES6 Map and Set. * * ### Defining custom values * * The easiest way to describe the value an object represents is by implementing * `valueOf`. For example, `Date` represents a value by returning a unix * timestamp for `valueOf`: * * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ... * var date2 = new Date(1234567890000); * date1.valueOf(); // 1234567890000 * assert( date1 !== date2 ); * assert( Immutable.is( date1, date2 ) ); * * Note: overriding `valueOf` may have other implications if you use this object * where JavaScript expects a primitive, such as implicit string coercion. * * For more complex types, especially collections, implementing `valueOf` may * not be performant. An alternative is to implement `equals` and `hashCode`. * * `equals` takes another object, presumably of similar type, and returns true * if the it is equal. Equality is symmetrical, so the same result should be * returned if this and the argument are flipped. * * assert( a.equals(b) === b.equals(a) ); * * `hashCode` returns a 32bit integer number representing the object which will * be used to determine how to store the value object in a Map or Set. You must * provide both or neither methods, one must not exist without the other. * * Also, an important relationship between these methods must be upheld: if two * values are equal, they *must* return the same hashCode. If the values are not * equal, they might have the same hashCode; this is called a hash collision, * and while undesirable for performance reasons, it is acceptable. * * if (a.equals(b)) { * assert( a.hashCode() === b.hashCode() ); * } * * All Immutable collections implement `equals` and `hashCode`. * */ function is(valueA, valueB) { if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { return true; } if (!valueA || !valueB) { return false; } if (typeof valueA.valueOf === 'function' && typeof valueB.valueOf === 'function') { valueA = valueA.valueOf(); valueB = valueB.valueOf(); if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) { return true; } if (!valueA || !valueB) { return false; } } if (typeof valueA.equals === 'function' && typeof valueB.equals === 'function' && valueA.equals(valueB)) { return true; } return false; } function deepEqual(a, b) { if (a === b) { return true; } if ( !isIterable(b) || a.size !== undefined && b.size !== undefined && a.size !== b.size || a.__hash !== undefined && b.__hash !== undefined && a.__hash !== b.__hash || isKeyed(a) !== isKeyed(b) || isIndexed(a) !== isIndexed(b) || isOrdered(a) !== isOrdered(b) ) { return false; } if (a.size === 0 && b.size === 0) { return true; } var notAssociative = !isAssociative(a); if (isOrdered(a)) { var entries = a.entries(); return b.every(function(v, k) { var entry = entries.next().value; return entry && is(entry[1], v) && (notAssociative || is(entry[0], k)); }) && entries.next().done; } var flipped = false; if (a.size === undefined) { if (b.size === undefined) { if (typeof a.cacheResult === 'function') { a.cacheResult(); } } else { flipped = true; var _ = a; a = b; b = _; } } var allEqual = true; var bSize = b.__iterate(function(v, k) { if (notAssociative ? !a.has(v) : flipped ? !is(v, a.get(k, NOT_SET)) : !is(a.get(k, NOT_SET), v)) { allEqual = false; return false; } }); return allEqual && a.size === bSize; } createClass(Repeat, IndexedSeq); function Repeat(value, times) { if (!(this instanceof Repeat)) { return new Repeat(value, times); } this._value = value; this.size = times === undefined ? Infinity : Math.max(0, times); if (this.size === 0) { if (EMPTY_REPEAT) { return EMPTY_REPEAT; } EMPTY_REPEAT = this; } } Repeat.prototype.toString = function() { if (this.size === 0) { return 'Repeat []'; } return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]'; }; Repeat.prototype.get = function(index, notSetValue) { return this.has(index) ? this._value : notSetValue; }; Repeat.prototype.includes = function(searchValue) { return is(this._value, searchValue); }; Repeat.prototype.slice = function(begin, end) { var size = this.size; return wholeSlice(begin, end, size) ? this : new Repeat(this._value, resolveEnd(end, size) - resolveBegin(begin, size)); }; Repeat.prototype.reverse = function() { return this; }; Repeat.prototype.indexOf = function(searchValue) { if (is(this._value, searchValue)) { return 0; } return -1; }; Repeat.prototype.lastIndexOf = function(searchValue) { if (is(this._value, searchValue)) { return this.size; } return -1; }; Repeat.prototype.__iterate = function(fn, reverse) { for (var ii = 0; ii < this.size; ii++) { if (fn(this._value, ii, this) === false) { return ii + 1; } } return ii; }; Repeat.prototype.__iterator = function(type, reverse) {var this$0 = this; var ii = 0; return new Iterator(function() {return ii < this$0.size ? iteratorValue(type, ii++, this$0._value) : iteratorDone()} ); }; Repeat.prototype.equals = function(other) { return other instanceof Repeat ? is(this._value, other._value) : deepEqual(other); }; var EMPTY_REPEAT; function invariant(condition, error) { if (!condition) throw new Error(error); } createClass(Range, IndexedSeq); function Range(start, end, step) { if (!(this instanceof Range)) { return new Range(start, end, step); } invariant(step !== 0, 'Cannot step a Range by 0'); start = start || 0; if (end === undefined) { end = Infinity; } step = step === undefined ? 1 : Math.abs(step); if (end < start) { step = -step; } this._start = start; this._end = end; this._step = step; this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1); if (this.size === 0) { if (EMPTY_RANGE) { return EMPTY_RANGE; } EMPTY_RANGE = this; } } Range.prototype.toString = function() { if (this.size === 0) { return 'Range []'; } return 'Range [ ' + this._start + '...' + this._end + (this._step !== 1 ? ' by ' + this._step : '') + ' ]'; }; Range.prototype.get = function(index, notSetValue) { return this.has(index) ? this._start + wrapIndex(this, index) * this._step : notSetValue; }; Range.prototype.includes = function(searchValue) { var possibleIndex = (searchValue - this._start) / this._step; return possibleIndex >= 0 && possibleIndex < this.size && possibleIndex === Math.floor(possibleIndex); }; Range.prototype.slice = function(begin, end) { if (wholeSlice(begin, end, this.size)) { return this; } begin = resolveBegin(begin, this.size); end = resolveEnd(end, this.size); if (end <= begin) { return new Range(0, 0); } return new Range(this.get(begin, this._end), this.get(end, this._end), this._step); }; Range.prototype.indexOf = function(searchValue) { var offsetValue = searchValue - this._start; if (offsetValue % this._step === 0) { var index = offsetValue / this._step; if (index >= 0 && index < this.size) { return index } } return -1; }; Range.prototype.lastIndexOf = function(searchValue) { return this.indexOf(searchValue); }; Range.prototype.__iterate = function(fn, reverse) { var maxIndex = this.size - 1; var step = this._step; var value = reverse ? this._start + maxIndex * step : this._start; for (var ii = 0; ii <= maxIndex; ii++) { if (fn(value, ii, this) === false) { return ii + 1; } value += reverse ? -step : step; } return ii; }; Range.prototype.__iterator = function(type, reverse) { var maxIndex = this.size - 1; var step = this._step; var value = reverse ? this._start + maxIndex * step : this._start; var ii = 0; return new Iterator(function() { var v = value; value += reverse ? -step : step; return ii > maxIndex ? iteratorDone() : iteratorValue(type, ii++, v); }); }; Range.prototype.equals = function(other) { return other instanceof Range ? this._start === other._start && this._end === other._end && this._step === other._step : deepEqual(this, other); }; var EMPTY_RANGE; createClass(Collection, Iterable); function Collection() { throw TypeError('Abstract'); } createClass(KeyedCollection, Collection);function KeyedCollection() {} createClass(IndexedCollection, Collection);function IndexedCollection() {} createClass(SetCollection, Collection);function SetCollection() {} Collection.Keyed = KeyedCollection; Collection.Indexed = IndexedCollection; Collection.Set = SetCollection; var imul = typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2 ? Math.imul : function imul(a, b) { a = a | 0; // int b = b | 0; // int var c = a & 0xffff; var d = b & 0xffff; // Shift by 0 fixes the sign on the high part. return (c * d) + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0) | 0; // int }; // v8 has an optimization for storing 31-bit signed numbers. // Values which have either 00 or 11 as the high order bits qualify. // This function drops the highest order bit in a signed number, maintaining // the sign bit. function smi(i32) { return ((i32 >>> 1) & 0x40000000) | (i32 & 0xBFFFFFFF); } function hash(o) { if (o === false || o === null || o === undefined) { return 0; } if (typeof o.valueOf === 'function') { o = o.valueOf(); if (o === false || o === null || o === undefined) { return 0; } } if (o === true) { return 1; } var type = typeof o; if (type === 'number') { if (o !== o || o === Infinity) { return 0; } var h = o | 0; if (h !== o) { h ^= o * 0xFFFFFFFF; } while (o > 0xFFFFFFFF) { o /= 0xFFFFFFFF; h ^= o; } return smi(h); } if (type === 'string') { return o.length > STRING_HASH_CACHE_MIN_STRLEN ? cachedHashString(o) : hashString(o); } if (typeof o.hashCode === 'function') { return o.hashCode(); } if (type === 'object') { return hashJSObj(o); } if (typeof o.toString === 'function') { return hashString(o.toString()); } throw new Error('Value type ' + type + ' cannot be hashed.'); } function cachedHashString(string) { var hash = stringHashCache[string]; if (hash === undefined) { hash = hashString(string); if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) { STRING_HASH_CACHE_SIZE = 0; stringHashCache = {}; } STRING_HASH_CACHE_SIZE++; stringHashCache[string] = hash; } return hash; } // http://jsperf.com/hashing-strings function hashString(string) { // This is the hash from JVM // The hash code for a string is computed as // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1], // where s[i] is the ith character of the string and n is the length of // the string. We "mod" the result to make it between 0 (inclusive) and 2^31 // (exclusive) by dropping high bits. var hash = 0; for (var ii = 0; ii < string.length; ii++) { hash = 31 * hash + string.charCodeAt(ii) | 0; } return smi(hash); } function hashJSObj(obj) { var hash; if (usingWeakMap) { hash = weakMap.get(obj); if (hash !== undefined) { return hash; } } hash = obj[UID_HASH_KEY]; if (hash !== undefined) { return hash; } if (!canDefineProperty) { hash = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY]; if (hash !== undefined) { return hash; } hash = getIENodeHash(obj); if (hash !== undefined) { return hash; } } hash = ++objHashUID; if (objHashUID & 0x40000000) { objHashUID = 0; } if (usingWeakMap) { weakMap.set(obj, hash); } else if (isExtensible !== undefined && isExtensible(obj) === false) { throw new Error('Non-extensible objects are not allowed as keys.'); } else if (canDefineProperty) { Object.defineProperty(obj, UID_HASH_KEY, { 'enumerable': false, 'configurable': false, 'writable': false, 'value': hash }); } else if (obj.propertyIsEnumerable !== undefined && obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable) { // Since we can't define a non-enumerable property on the object // we'll hijack one of the less-used non-enumerable properties to // save our hash on it. Since this is a function it will not show up in // `JSON.stringify` which is what we want. obj.propertyIsEnumerable = function() { return this.constructor.prototype.propertyIsEnumerable.apply(this, arguments); }; obj.propertyIsEnumerable[UID_HASH_KEY] = hash; } else if (obj.nodeType !== undefined) { // At this point we couldn't get the IE `uniqueID` to use as a hash // and we couldn't use a non-enumerable property to exploit the // dontEnum bug so we simply add the `UID_HASH_KEY` on the node // itself. obj[UID_HASH_KEY] = hash; } else { throw new Error('Unable to set a non-enumerable property on object.'); } return hash; } // Get references to ES5 object methods. var isExtensible = Object.isExtensible; // True if Object.defineProperty works as expected. IE8 fails this test. var canDefineProperty = (function() { try { Object.defineProperty({}, '@', {}); return true; } catch (e) { return false; } }()); // IE has a `uniqueID` property on DOM nodes. We can construct the hash from it // and avoid memory leaks from the IE cloneNode bug. function getIENodeHash(node) { if (node && node.nodeType > 0) { switch (node.nodeType) { case 1: // Element return node.uniqueID; case 9: // Document return node.documentElement && node.documentElement.uniqueID; } } } // If possible, use a WeakMap. var usingWeakMap = typeof WeakMap === 'function'; var weakMap; if (usingWeakMap) { weakMap = new WeakMap(); } var objHashUID = 0; var UID_HASH_KEY = '__immutablehash__'; if (typeof Symbol === 'function') { UID_HASH_KEY = Symbol(UID_HASH_KEY); } var STRING_HASH_CACHE_MIN_STRLEN = 16; var STRING_HASH_CACHE_MAX_SIZE = 255; var STRING_HASH_CACHE_SIZE = 0; var stringHashCache = {}; function assertNotInfinite(size) { invariant( size !== Infinity, 'Cannot perform this action with an infinite size.' ); } createClass(Map, KeyedCollection); // @pragma Construction function Map(value) { return value === null || value === undefined ? emptyMap() : isMap(value) && !isOrdered(value) ? value : emptyMap().withMutations(function(map ) { var iter = KeyedIterable(value); assertNotInfinite(iter.size); iter.forEach(function(v, k) {return map.set(k, v)}); }); } Map.of = function() {var keyValues = SLICE$0.call(arguments, 0); return emptyMap().withMutations(function(map ) { for (var i = 0; i < keyValues.length; i += 2) { if (i + 1 >= keyValues.length) { throw new Error('Missing value for key: ' + keyValues[i]); } map.set(keyValues[i], keyValues[i + 1]); } }); }; Map.prototype.toString = function() { return this.__toString('Map {', '}'); }; // @pragma Access Map.prototype.get = function(k, notSetValue) { return this._root ? this._root.get(0, undefined, k, notSetValue) : notSetValue; }; // @pragma Modification Map.prototype.set = function(k, v) { return updateMap(this, k, v); }; Map.prototype.setIn = function(keyPath, v) { return this.updateIn(keyPath, NOT_SET, function() {return v}); }; Map.prototype.remove = function(k) { return updateMap(this, k, NOT_SET); }; Map.prototype.deleteIn = function(keyPath) { return this.updateIn(keyPath, function() {return NOT_SET}); }; Map.prototype.update = function(k, notSetValue, updater) { return arguments.length === 1 ? k(this) : this.updateIn([k], notSetValue, updater); }; Map.prototype.updateIn = function(keyPath, notSetValue, updater) { if (!updater) { updater = notSetValue; notSetValue = undefined; } var updatedValue = updateInDeepMap( this, forceIterator(keyPath), notSetValue, updater ); return updatedValue === NOT_SET ? undefined : updatedValue; }; Map.prototype.clear = function() { if (this.size === 0) { return this; } if (this.__ownerID) { this.size = 0; this._root = null; this.__hash = undefined; this.__altered = true; return this; } return emptyMap(); }; // @pragma Composition Map.prototype.merge = function(/*...iters*/) { return mergeIntoMapWith(this, undefined, arguments); }; Map.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1); return mergeIntoMapWith(this, merger, iters); }; Map.prototype.mergeIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1); return this.updateIn( keyPath, emptyMap(), function(m ) {return typeof m.merge === 'function' ? m.merge.apply(m, iters) : iters[iters.length - 1]} ); }; Map.prototype.mergeDeep = function(/*...iters*/) { return mergeIntoMapWith(this, deepMerger, arguments); }; Map.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1); return mergeIntoMapWith(this, deepMergerWith(merger), iters); }; Map.prototype.mergeDeepIn = function(keyPath) {var iters = SLICE$0.call(arguments, 1); return this.updateIn( keyPath, emptyMap(), function(m ) {return typeof m.mergeDeep === 'function' ? m.mergeDeep.apply(m, iters) : iters[iters.length - 1]} ); }; Map.prototype.sort = function(comparator) { // Late binding return OrderedMap(sortFactory(this, comparator)); }; Map.prototype.sortBy = function(mapper, comparator) { // Late binding return OrderedMap(sortFactory(this, comparator, mapper)); }; // @pragma Mutability Map.prototype.withMutations = function(fn) { var mutable = this.asMutable(); fn(mutable); return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this; }; Map.prototype.asMutable = function() { return this.__ownerID ? this : this.__ensureOwner(new OwnerID()); }; Map.prototype.asImmutable = function() { return this.__ensureOwner(); }; Map.prototype.wasAltered = function() { return this.__altered; }; Map.prototype.__iterator = function(type, reverse) { return new MapIterator(this, type, reverse); }; Map.prototype.__iterate = function(fn, reverse) {var this$0 = this; var iterations = 0; this._root && this._root.iterate(function(entry ) { iterations++; return fn(entry[1], entry[0], this$0); }, reverse); return iterations; }; Map.prototype.__ensureOwner = function(ownerID) { if (ownerID === this.__ownerID) { return this; } if (!ownerID) { this.__ownerID = ownerID; this.__altered = false; return this; } return makeMap(this.size, this._root, ownerID, this.__hash); }; function isMap(maybeMap) { return !!(maybeMap && maybeMap[IS_MAP_SENTINEL]); } Map.isMap = isMap; var IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@'; var MapPrototype = Map.prototype; MapPrototype[IS_MAP_SENTINEL] = true; MapPrototype[DELETE] = MapPrototype.remove; MapPrototype.removeIn = MapPrototype.deleteIn; // #pragma Trie Nodes function ArrayMapNode(ownerID, entries) { this.ownerID = ownerID; this.entries = entries; } ArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) { var entries = this.entries; for (var ii = 0, len = entries.length; ii < len; ii++) { if (is(key, entries[ii][0])) { return entries[ii][1]; } } return notSetValue; }; ArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { var removed = value === NOT_SET; var entries = this.entries; var idx = 0; for (var len = entries.length; idx < len; idx++) { if (is(key, entries[idx][0])) { break; } } var exists = idx < len; if (exists ? entries[idx][1] === value : removed) { return this; } SetRef(didAlter); (removed || !exists) && SetRef(didChangeSize); if (removed && entries.length === 1) { return; // undefined } if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) { return createNodes(ownerID, entries, key, value); } var isEditable = ownerID && ownerID === this.ownerID; var newEntries = isEditable ? entries : arrCopy(entries); if (exists) { if (removed) { idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop()); } else { newEntries[idx] = [key, value]; } } else { newEntries.push([key, value]); } if (isEditable) { this.entries = newEntries; return this; } return new ArrayMapNode(ownerID, newEntries); }; function BitmapIndexedNode(ownerID, bitmap, nodes) { this.ownerID = ownerID; this.bitmap = bitmap; this.nodes = nodes; } BitmapIndexedNode.prototype.get = function(shift, keyHash, key, notSetValue) { if (keyHash === undefined) { keyHash = hash(key); } var bit = (1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK)); var bitmap = this.bitmap; return (bitmap & bit) === 0 ? notSetValue : this.nodes[popCount(bitmap & (bit - 1))].get(shift + SHIFT, keyHash, key, notSetValue); }; BitmapIndexedNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { if (keyHash === undefined) { keyHash = hash(key); } var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; var bit = 1 << keyHashFrag; var bitmap = this.bitmap; var exists = (bitmap & bit) !== 0; if (!exists && value === NOT_SET) { return this; } var idx = popCount(bitmap & (bit - 1)); var nodes = this.nodes; var node = exists ? nodes[idx] : undefined; var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter); if (newNode === node) { return this; } if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) { return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode); } if (exists && !newNode && nodes.length === 2 && isLeafNode(nodes[idx ^ 1])) { return nodes[idx ^ 1]; } if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) { return newNode; } var isEditable = ownerID && ownerID === this.ownerID; var newBitmap = exists ? newNode ? bitmap : bitmap ^ bit : bitmap | bit; var newNodes = exists ? newNode ? setIn(nodes, idx, newNode, isEditable) : spliceOut(nodes, idx, isEditable) : spliceIn(nodes, idx, newNode, isEditable); if (isEditable) { this.bitmap = newBitmap; this.nodes = newNodes; return this; } return new BitmapIndexedNode(ownerID, newBitmap, newNodes); }; function HashArrayMapNode(ownerID, count, nodes) { this.ownerID = ownerID; this.count = count; this.nodes = nodes; } HashArrayMapNode.prototype.get = function(shift, keyHash, key, notSetValue) { if (keyHash === undefined) { keyHash = hash(key); } var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; var node = this.nodes[idx]; return node ? node.get(shift + SHIFT, keyHash, key, notSetValue) : notSetValue; }; HashArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { if (keyHash === undefined) { keyHash = hash(key); } var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; var removed = value === NOT_SET; var nodes = this.nodes; var node = nodes[idx]; if (removed && !node) { return this; } var newNode = updateNode(node, ownerID, shift + SHIFT, keyHash, key, value, didChangeSize, didAlter); if (newNode === node) { return this; } var newCount = this.count; if (!node) { newCount++; } else if (!newNode) { newCount--; if (newCount < MIN_HASH_ARRAY_MAP_SIZE) { return packNodes(ownerID, nodes, newCount, idx); } } var isEditable = ownerID && ownerID === this.ownerID; var newNodes = setIn(nodes, idx, newNode, isEditable); if (isEditable) { this.count = newCount; this.nodes = newNodes; return this; } return new HashArrayMapNode(ownerID, newCount, newNodes); }; function HashCollisionNode(ownerID, keyHash, entries) { this.ownerID = ownerID; this.keyHash = keyHash; this.entries = entries; } HashCollisionNode.prototype.get = function(shift, keyHash, key, notSetValue) { var entries = this.entries; for (var ii = 0, len = entries.length; ii < len; ii++) { if (is(key, entries[ii][0])) { return entries[ii][1]; } } return notSetValue; }; HashCollisionNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { if (keyHash === undefined) { keyHash = hash(key); } var removed = value === NOT_SET; if (keyHash !== this.keyHash) { if (removed) { return this; } SetRef(didAlter); SetRef(didChangeSize); return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]); } var entries = this.entries; var idx = 0; for (var len = entries.length; idx < len; idx++) { if (is(key, entries[idx][0])) { break; } } var exists = idx < len; if (exists ? entries[idx][1] === value : removed) { return this; } SetRef(didAlter); (removed || !exists) && SetRef(didChangeSize); if (removed && len === 2) { return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]); } var isEditable = ownerID && ownerID === this.ownerID; var newEntries = isEditable ? entries : arrCopy(entries); if (exists) { if (removed) { idx === len - 1 ? newEntries.pop() : (newEntries[idx] = newEntries.pop()); } else { newEntries[idx] = [key, value]; } } else { newEntries.push([key, value]); } if (isEditable) { this.entries = newEntries; return this; } return new HashCollisionNode(ownerID, this.keyHash, newEntries); }; function ValueNode(ownerID, keyHash, entry) { this.ownerID = ownerID; this.keyHash = keyHash; this.entry = entry; } ValueNode.prototype.get = function(shift, keyHash, key, notSetValue) { return is(key, this.entry[0]) ? this.entry[1] : notSetValue; }; ValueNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { var removed = value === NOT_SET; var keyMatch = is(key, this.entry[0]); if (keyMatch ? value === this.entry[1] : removed) { return this; } SetRef(didAlter); if (removed) { SetRef(didChangeSize); return; // undefined } if (keyMatch) { if (ownerID && ownerID === this.ownerID) { this.entry[1] = value; return this; } return new ValueNode(ownerID, this.keyHash, [key, value]); } SetRef(didChangeSize); return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]); }; // #pragma Iterators ArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate = function (fn, reverse) { var entries = this.entries; for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) { if (fn(entries[reverse ? maxIndex - ii : ii]) === false) { return false; } } } BitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate = function (fn, reverse) { var nodes = this.nodes; for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) { var node = nodes[reverse ? maxIndex - ii : ii]; if (node && node.iterate(fn, reverse) === false) { return false; } } } ValueNode.prototype.iterate = function (fn, reverse) { return fn(this.entry); } createClass(MapIterator, Iterator); function MapIterator(map, type, reverse) { this._type = type; this._reverse = reverse; this._stack = map._root && mapIteratorFrame(map._root); } MapIterator.prototype.next = function() { var type = this._type; var stack = this._stack; while (stack) { var node = stack.node; var index = stack.index++; var maxIndex; if (node.entry) { if (index === 0) { return mapIteratorValue(type, node.entry); } } else if (node.entries) { maxIndex = node.entries.length - 1; if (index <= maxIndex) { return mapIteratorValue(type, node.entries[this._reverse ? maxIndex - index : index]); } } else { maxIndex = node.nodes.length - 1; if (index <= maxIndex) { var subNode = node.nodes[this._reverse ? maxIndex - index : index]; if (subNode) { if (subNode.entry) { return mapIteratorValue(type, subNode.entry); } stack = this._stack = mapIteratorFrame(subNode, stack); } continue; } } stack = this._stack = this._stack.__prev; } return iteratorDone(); }; function mapIteratorValue(type, entry) { return iteratorValue(type, entry[0], entry[1]); } function mapIteratorFrame(node, prev) { return { node: node, index: 0, __prev: prev }; } function makeMap(size, root, ownerID, hash) { var map = Object.create(MapPrototype); map.size = size; map._root = root; map.__ownerID = ownerID; map.__hash = hash; map.__altered = false; return map; } var EMPTY_MAP; function emptyMap() { return EMPTY_MAP || (EMPTY_MAP = makeMap(0)); } function updateMap(map, k, v) { var newRoot; var newSize; if (!map._root) { if (v === NOT_SET) { return map; } newSize = 1; newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]); } else { var didChangeSize = MakeRef(CHANGE_LENGTH); var didAlter = MakeRef(DID_ALTER); newRoot = updateNode(map._root, map.__ownerID, 0, undefined, k, v, didChangeSize, didAlter); if (!didAlter.value) { return map; } newSize = map.size + (didChangeSize.value ? v === NOT_SET ? -1 : 1 : 0); } if (map.__ownerID) { map.size = newSize; map._root = newRoot; map.__hash = undefined; map.__altered = true; return map; } return newRoot ? makeMap(newSize, newRoot) : emptyMap(); } function updateNode(node, ownerID, shift, keyHash, key, value, didChangeSize, didAlter) { if (!node) { if (value === NOT_SET) { return node; } SetRef(didAlter); SetRef(didChangeSize); return new ValueNode(ownerID, keyHash, [key, value]); } return node.update(ownerID, shift, keyHash, key, value, didChangeSize, didAlter); } function isLeafNode(node) { return node.constructor === ValueNode || node.constructor === HashCollisionNode; } function mergeIntoNode(node, ownerID, shift, keyHash, entry) { if (node.keyHash === keyHash) { return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]); } var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK; var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK; var newNode; var nodes = idx1 === idx2 ? [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)] : ((newNode = new ValueNode(ownerID, keyHash, entry)), idx1 < idx2 ? [node, newNode] : [newNode, node]); return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes); } function createNodes(ownerID, entries, key, value) { if (!ownerID) { ownerID = new OwnerID(); } var node = new ValueNode(ownerID, hash(key), [key, value]); for (var ii = 0; ii < entries.length; ii++) { var entry = entries[ii]; node = node.update(ownerID, 0, undefined, entry[0], entry[1]); } return node; } function packNodes(ownerID, nodes, count, excluding) { var bitmap = 0; var packedII = 0; var packedNodes = new Array(count); for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) { var node = nodes[ii]; if (node !== undefined && ii !== excluding) { bitmap |= bit; packedNodes[packedII++] = node; } } return new BitmapIndexedNode(ownerID, bitmap, packedNodes); } function expandNodes(ownerID, nodes, bitmap, including, node) { var count = 0; var expandedNodes = new Array(SIZE); for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) { expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined; } expandedNodes[including] = node; return new HashArrayMapNode(ownerID, count + 1, expandedNodes); } function mergeIntoMapWith(map, merger, iterables) { var iters = []; for (var ii = 0; ii < iterables.length; ii++) { var value = iterables[ii]; var iter = KeyedIterable(value); if (!isIterable(value)) { iter = iter.map(function(v ) {return fromJS(v)}); } iters.push(iter); } return mergeIntoCollectionWith(map, merger, iters); } function deepMerger(existing, value, key) { return existing && existing.mergeDeep && isIterable(value) ? existing.mergeDeep(value) : is(existing, value) ? existing : value; } function deepMergerWith(merger) { return function(existing, value, key) { if (existing && existing.mergeDeepWith && isIterable(value)) { return existing.mergeDeepWith(merger, value); } var nextValue = merger(existing, value, key); return is(existing, nextValue) ? existing : nextValue; }; } function mergeIntoCollectionWith(collection, merger, iters) { iters = iters.filter(function(x ) {return x.size !== 0}); if (iters.length === 0) { return collection; } if (collection.size === 0 && !collection.__ownerID && iters.length === 1) { return collection.constructor(iters[0]); } return collection.withMutations(function(collection ) { var mergeIntoMap = merger ? function(value, key) { collection.update(key, NOT_SET, function(existing ) {return existing === NOT_SET ? value : merger(existing, value, key)} ); } : function(value, key) { collection.set(key, value); } for (var ii = 0; ii < iters.length; ii++) { iters[ii].forEach(mergeIntoMap); } }); } function updateInDeepMap(existing, keyPathIter, notSetValue, updater) { var isNotSet = existing === NOT_SET; var step = keyPathIter.next(); if (step.done) { var existingValue = isNotSet ? notSetValue : existing; var newValue = updater(existingValue); return newValue === existingValue ? existing : newValue; } invariant( isNotSet || (existing && existing.set), 'invalid keyPath' ); var key = step.value; var nextExisting = isNotSet ? NOT_SET : existing.get(key, NOT_SET); var nextUpdated = updateInDeepMap( nextExisting, keyPathIter, notSetValue, updater ); return nextUpdated === nextExisting ? existing : nextUpdated === NOT_SET ? existing.remove(key) : (isNotSet ? emptyMap() : existing).set(key, nextUpdated); } function popCount(x) { x = x - ((x >> 1) & 0x55555555); x = (x & 0x33333333) + ((x >> 2) & 0x33333333); x = (x + (x >> 4)) & 0x0f0f0f0f; x = x + (x >> 8); x = x + (x >> 16); return x & 0x7f; } function setIn(array, idx, val, canEdit) { var newArray = canEdit ? array : arrCopy(array); newArray[idx] = val; return newArray; } function spliceIn(array, idx, val, canEdit) { var newLen = array.length + 1; if (canEdit && idx + 1 === newLen) { array[idx] = val; return array; } var newArray = new Array(newLen); var after = 0; for (var ii = 0; ii < newLen; ii++) { if (ii === idx) { newArray[ii] = val; after = -1; } else { newArray[ii] = array[ii + after]; } } return newArray; } function spliceOut(array, idx, canEdit) { var newLen = array.length - 1; if (canEdit && idx === newLen) { array.pop(); return array; } var newArray = new Array(newLen); var after = 0; for (var ii = 0; ii < newLen; ii++) { if (ii === idx) { after = 1; } newArray[ii] = array[ii + after]; } return newArray; } var MAX_ARRAY_MAP_SIZE = SIZE / 4; var MAX_BITMAP_INDEXED_SIZE = SIZE / 2; var MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4; createClass(List, IndexedCollection); // @pragma Construction function List(value) { var empty = emptyList(); if (value === null || value === undefined) { return empty; } if (isList(value)) { return value; } var iter = IndexedIterable(value); var size = iter.size; if (size === 0) { return empty; } assertNotInfinite(size); if (size > 0 && size < SIZE) { return makeList(0, size, SHIFT, null, new VNode(iter.toArray())); } return empty.withMutations(function(list ) { list.setSize(size); iter.forEach(function(v, i) {return list.set(i, v)}); }); } List.of = function(/*...values*/) { return this(arguments); }; List.prototype.toString = function() { return this.__toString('List [', ']'); }; // @pragma Access List.prototype.get = function(index, notSetValue) { index = wrapIndex(this, index); if (index >= 0 && index < this.size) { index += this._origin; var node = listNodeFor(this, index); return node && node.array[index & MASK]; } return notSetValue; }; // @pragma Modification List.prototype.set = function(index, value) { return updateList(this, index, value); }; List.prototype.remove = function(index) { return !this.has(index) ? this : index === 0 ? this.shift() : index === this.size - 1 ? this.pop() : this.splice(index, 1); }; List.prototype.insert = function(index, value) { return this.splice(index, 0, value); }; List.prototype.clear = function() { if (this.size === 0) { return this; } if (this.__ownerID) { this.size = this._origin = this._capacity = 0; this._level = SHIFT; this._root = this._tail = null; this.__hash = undefined; this.__altered = true; return this; } return emptyList(); }; List.prototype.push = function(/*...values*/) { var values = arguments; var oldSize = this.size; return this.withMutations(function(list ) { setListBounds(list, 0, oldSize + values.length); for (var ii = 0; ii < values.length; ii++) { list.set(oldSize + ii, values[ii]); } }); }; List.prototype.pop = function() { return setListBounds(this, 0, -1); }; List.prototype.unshift = function(/*...values*/) { var values = arguments; return this.withMutations(function(list ) { setListBounds(list, -values.length); for (var ii = 0; ii < values.length; ii++) { list.set(ii, values[ii]); } }); }; List.prototype.shift = function() { return setListBounds(this, 1); }; // @pragma Composition List.prototype.merge = function(/*...iters*/) { return mergeIntoListWith(this, undefined, arguments); }; List.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1); return mergeIntoListWith(this, merger, iters); }; List.prototype.mergeDeep = function(/*...iters*/) { return mergeIntoListWith(this, deepMerger, arguments); }; List.prototype.mergeDeepWith = function(merger) {var iters = SLICE$0.call(arguments, 1); return mergeIntoListWith(this, deepMergerWith(merger), iters); }; List.prototype.setSize = function(size) { return setListBounds(this, 0, size); }; // @pragma Iteration List.prototype.slice = function(begin, end) { var size = this.size; if (wholeSlice(begin, end, size)) { return this; } return setListBounds( this, resolveBegin(begin, size), resolveEnd(end, size) ); }; List.prototype.__iterator = function(type, reverse) { var index = 0; var values = iterateList(this, reverse); return new Iterator(function() { var value = values(); return value === DONE ? iteratorDone() : iteratorValue(type, index++, value); }); }; List.prototype.__iterate = function(fn, reverse) { var index = 0; var values = iterateList(this, reverse); var value; while ((value = values()) !== DONE) { if (fn(value, index++, this) === false) { break; } } return index; }; List.prototype.__ensureOwner = function(ownerID) { if (ownerID === this.__ownerID) { return this; } if (!ownerID) { this.__ownerID = ownerID; return this; } return makeList(this._origin, this._capacity, this._level, this._root, this._tail, ownerID, this.__hash); }; function isList(maybeList) { return !!(maybeList && maybeList[IS_LIST_SENTINEL]); } List.isList = isList; var IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@'; var ListPrototype = List.prototype; ListPrototype[IS_LIST_SENTINEL] = true; ListPrototype[DELETE] = ListPrototype.remove; ListPrototype.setIn = MapPrototype.setIn; ListPrototype.deleteIn = ListPrototype.removeIn = MapPrototype.removeIn; ListPrototype.update = MapPrototype.update; ListPrototype.updateIn = MapPrototype.updateIn; ListPrototype.mergeIn = MapPrototype.mergeIn; ListPrototype.mergeDeepIn = MapPrototype.mergeDeepIn; ListPrototype.withMutations = MapPrototype.withMutations; ListPrototype.asMutable = MapPrototype.asMutable; ListPrototype.asImmutable = MapPrototype.asImmutable; ListPrototype.wasAltered = MapPrototype.wasAltered; function VNode(array, ownerID) { this.array = array; this.ownerID = ownerID; } // TODO: seems like these methods are very similar VNode.prototype.removeBefore = function(ownerID, level, index) { if (index === level ? 1 << level : 0 || this.array.length === 0) { return this; } var originIndex = (index >>> level) & MASK; if (originIndex >= this.array.length) { return new VNode([], ownerID); } var removingFirst = originIndex === 0; var newChild; if (level > 0) { var oldChild = this.array[originIndex]; newChild = oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index); if (newChild === oldChild && removingFirst) { return this; } } if (removingFirst && !newChild) { return this; } var editable = editableVNode(this, ownerID); if (!removingFirst) { for (var ii = 0; ii < originIndex; ii++) { editable.array[ii] = undefined; } } if (newChild) { editable.array[originIndex] = newChild; } return editable; }; VNode.prototype.removeAfter = function(ownerID, level, index) { if (index === (level ? 1 << level : 0) || this.array.length === 0) { return this; } var sizeIndex = ((index - 1) >>> level) & MASK; if (sizeIndex >= this.array.length) { return this; } var newChild; if (level > 0) { var oldChild = this.array[sizeIndex]; newChild = oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index); if (newChild === oldChild && sizeIndex === this.array.length - 1) { return this; } } var editable = editableVNode(this, ownerID); editable.array.splice(sizeIndex + 1); if (newChild) { editable.array[sizeIndex] = newChild; } return editable; }; var DONE = {}; function iterateList(list, reverse) { var left = list._origin; var right = list._capacity; var tailPos = getTailOffset(right); var tail = list._tail; return iterateNodeOrLeaf(list._root, list._level, 0); function iterateNodeOrLeaf(node, level, offset) { return level === 0 ? iterateLeaf(node, offset) : iterateNode(node, level, offset); } function iterateLeaf(node, offset) { var array = offset === tailPos ? tail && tail.array : node && node.array; var from = offset > left ? 0 : left - offset; var to = right - offset; if (to > SIZE) { to = SIZE; } return function() { if (from === to) { return DONE; } var idx = reverse ? --to : from++; return array && array[idx]; }; } function iterateNode(node, level, offset) { var values; var array = node && node.array; var from = offset > left ? 0 : (left - offset) >> level; var to = ((right - offset) >> level) + 1; if (to > SIZE) { to = SIZE; } return function() { do { if (values) { var value = values(); if (value !== DONE) { return value; } values = null; } if (from === to) { return DONE; } var idx = reverse ? --to : from++; values = iterateNodeOrLeaf( array && array[idx], level - SHIFT, offset + (idx << level) ); } while (true); }; } } function makeList(origin, capacity, level, root, tail, ownerID, hash) { var list = Object.create(ListPrototype); list.size = capacity - origin; list._origin = origin; list._capacity = capacity; list._level = level; list._root = root; list._tail = tail; list.__ownerID = ownerID; list.__hash = hash; list.__altered = false; return list; } var EMPTY_LIST; function emptyList() { return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT)); } function updateList(list, index, value) { index = wrapIndex(list, index); if (index !== index) { return list; } if (index >= list.size || index < 0) { return list.withMutations(function(list ) { index < 0 ? setListBounds(list, index).set(0, value) : setListBounds(list, 0, index + 1).set(index, value) }); } index += list._origin; var newTail = list._tail; var newRoot = list._root; var didAlter = MakeRef(DID_ALTER); if (index >= getTailOffset(list._capacity)) { newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter); } else { newRoot = updateVNode(newRoot, list.__ownerID, list._level, index, value, didAlter); } if (!didAlter.value) { return list; } if (list.__ownerID) { list._root = newRoot; list._tail = newTail; list.__hash = undefined; list.__altered = true; return list; } return makeList(list._origin, list._capacity, list._level, newRoot, newTail); } function updateVNode(node, ownerID, level, index, value, didAlter) { var idx = (index >>> level) & MASK; var nodeHas = node && idx < node.array.length; if (!nodeHas && value === undefined) { return node; } var newNode; if (level > 0) { var lowerNode = node && node.array[idx]; var newLowerNode = updateVNode(lowerNode, ownerID, level - SHIFT, index, value, didAlter); if (newLowerNode === lowerNode) { return node; } newNode = editableVNode(node, ownerID); newNode.array[idx] = newLowerNode; return newNode; } if (nodeHas && node.array[idx] === value) { return node; } SetRef(didAlter); newNode = editableVNode(node, ownerID); if (value === undefined && idx === newNode.array.length - 1) { newNode.array.pop(); } else { newNode.array[idx] = value; } return newNode; } function editableVNode(node, ownerID) { if (ownerID && node && ownerID === node.ownerID) { return node; } return new VNode(node ? node.array.slice() : [], ownerID); } function listNodeFor(list, rawIndex) { if (rawIndex >= getTailOffset(list._capacity)) { return list._tail; } if (rawIndex < 1 << (list._level + SHIFT)) { var node = list._root; var level = list._level; while (node && level > 0) { node = node.array[(rawIndex >>> level) & MASK]; level -= SHIFT; } return node; } } function setListBounds(list, begin, end) { // Sanitize begin & end using this shorthand for ToInt32(argument) // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 if (begin !== undefined) { begin = begin | 0; } if (end !== undefined) { end = end | 0; } var owner = list.__ownerID || new OwnerID(); var oldOrigin = list._origin; var oldCapacity = list._capacity; var newOrigin = oldOrigin + begin; var newCapacity = end === undefined ? oldCapacity : end < 0 ? oldCapacity + end : oldOrigin + end; if (newOrigin === oldOrigin && newCapacity === oldCapacity) { return list; } // If it's going to end after it starts, it's empty. if (newOrigin >= newCapacity) { return list.clear(); } var newLevel = list._level; var newRoot = list._root; // New origin might need creating a higher root. var offsetShift = 0; while (newOrigin + offsetShift < 0) { newRoot = new VNode(newRoot && newRoot.array.length ? [undefined, newRoot] : [], owner); newLevel += SHIFT; offsetShift += 1 << newLevel; } if (offsetShift) { newOrigin += offsetShift; oldOrigin += offsetShift; newCapacity += offsetShift; oldCapacity += offsetShift; } var oldTailOffset = getTailOffset(oldCapacity); var newTailOffset = getTailOffset(newCapacity); // New size might need creating a higher root. while (newTailOffset >= 1 << (newLevel + SHIFT)) { newRoot = new VNode(newRoot && newRoot.array.length ? [newRoot] : [], owner); newLevel += SHIFT; } // Locate or create the new tail. var oldTail = list._tail; var newTail = newTailOffset < oldTailOffset ? listNodeFor(list, newCapacity - 1) : newTailOffset > oldTailOffset ? new VNode([], owner) : oldTail; // Merge Tail into tree. if (oldTail && newTailOffset > oldTailOffset && newOrigin < oldCapacity && oldTail.array.length) { newRoot = editableVNode(newRoot, owner); var node = newRoot; for (var level = newLevel; level > SHIFT; level -= SHIFT) { var idx = (oldTailOffset >>> level) & MASK; node = node.array[idx] = editableVNode(node.array[idx], owner); } node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail; } // If the size has been reduced, there's a chance the tail needs to be trimmed. if (newCapacity < oldCapacity) { newTail = newTail && newTail.removeAfter(owner, 0, newCapacity); } // If the new origin is within the tail, then we do not need a root. if (newOrigin >= newTailOffset) { newOrigin -= newTailOffset; newCapacity -= newTailOffset; newLevel = SHIFT; newRoot = null; newTail = newTail && newTail.removeBefore(owner, 0, newOrigin); // Otherwise, if the root has been trimmed, garbage collect. } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) { offsetShift = 0; // Identify the new top root node of the subtree of the old root. while (newRoot) { var beginIndex = (newOrigin >>> newLevel) & MASK; if (beginIndex !== (newTailOffset >>> newLevel) & MASK) { break; } if (beginIndex) { offsetShift += (1 << newLevel) * beginIndex; } newLevel -= SHIFT; newRoot = newRoot.array[beginIndex]; } // Trim the new sides of the new root. if (newRoot && newOrigin > oldOrigin) { newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift); } if (newRoot && newTailOffset < oldTailOffset) { newRoot = newRoot.removeAfter(owner, newLevel, newTailOffset - offsetShift); } if (offsetShift) { newOrigin -= offsetShift; newCapacity -= offsetShift; } } if (list.__ownerID) { list.size = newCapacity - newOrigin; list._origin = newOrigin; list._capacity = newCapacity; list._level = newLevel; list._root = newRoot; list._tail = newTail; list.__hash = undefined; list.__altered = true; return list; } return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail); } function mergeIntoListWith(list, merger, iterables) { var iters = []; var maxSize = 0; for (var ii = 0; ii < iterables.length; ii++) { var value = iterables[ii]; var iter = IndexedIterable(value); if (iter.size > maxSize) { maxSize = iter.size; } if (!isIterable(value)) { iter = iter.map(function(v ) {return fromJS(v)}); } iters.push(iter); } if (maxSize > list.size) { list = list.setSize(maxSize); } return mergeIntoCollectionWith(list, merger, iters); } function getTailOffset(size) { return size < SIZE ? 0 : (((size - 1) >>> SHIFT) << SHIFT); } createClass(OrderedMap, Map); // @pragma Construction function OrderedMap(value) { return value === null || value === undefined ? emptyOrderedMap() : isOrderedMap(value) ? value : emptyOrderedMap().withMutations(function(map ) { var iter = KeyedIterable(value); assertNotInfinite(iter.size); iter.forEach(function(v, k) {return map.set(k, v)}); }); } OrderedMap.of = function(/*...values*/) { return this(arguments); }; OrderedMap.prototype.toString = function() { return this.__toString('OrderedMap {', '}'); }; // @pragma Access OrderedMap.prototype.get = function(k, notSetValue) { var index = this._map.get(k); return index !== undefined ? this._list.get(index)[1] : notSetValue; }; // @pragma Modification OrderedMap.prototype.clear = function() { if (this.size === 0) { return this; } if (this.__ownerID) { this.size = 0; this._map.clear(); this._list.clear(); return this; } return emptyOrderedMap(); }; OrderedMap.prototype.set = function(k, v) { return updateOrderedMap(this, k, v); }; OrderedMap.prototype.remove = function(k) { return updateOrderedMap(this, k, NOT_SET); }; OrderedMap.prototype.wasAltered = function() { return this._map.wasAltered() || this._list.wasAltered(); }; OrderedMap.prototype.__iterate = function(fn, reverse) {var this$0 = this; return this._list.__iterate( function(entry ) {return entry && fn(entry[1], entry[0], this$0)}, reverse ); }; OrderedMap.prototype.__iterator = function(type, reverse) { return this._list.fromEntrySeq().__iterator(type, reverse); }; OrderedMap.prototype.__ensureOwner = function(ownerID) { if (ownerID === this.__ownerID) { return this; } var newMap = this._map.__ensureOwner(ownerID); var newList = this._list.__ensureOwner(ownerID); if (!ownerID) { this.__ownerID = ownerID; this._map = newMap; this._list = newList; return this; } return makeOrderedMap(newMap, newList, ownerID, this.__hash); }; function isOrderedMap(maybeOrderedMap) { return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap); } OrderedMap.isOrderedMap = isOrderedMap; OrderedMap.prototype[IS_ORDERED_SENTINEL] = true; OrderedMap.prototype[DELETE] = OrderedMap.prototype.remove; function makeOrderedMap(map, list, ownerID, hash) { var omap = Object.create(OrderedMap.prototype); omap.size = map ? map.size : 0; omap._map = map; omap._list = list; omap.__ownerID = ownerID; omap.__hash = hash; return omap; } var EMPTY_ORDERED_MAP; function emptyOrderedMap() { return EMPTY_ORDERED_MAP || (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList())); } function updateOrderedMap(omap, k, v) { var map = omap._map; var list = omap._list; var i = map.get(k); var has = i !== undefined; var newMap; var newList; if (v === NOT_SET) { // removed if (!has) { return omap; } if (list.size >= SIZE && list.size >= map.size * 2) { newList = list.filter(function(entry, idx) {return entry !== undefined && i !== idx}); newMap = newList.toKeyedSeq().map(function(entry ) {return entry[0]}).flip().toMap(); if (omap.__ownerID) { newMap.__ownerID = newList.__ownerID = omap.__ownerID; } } else { newMap = map.remove(k); newList = i === list.size - 1 ? list.pop() : list.set(i, undefined); } } else { if (has) { if (v === list.get(i)[1]) { return omap; } newMap = map; newList = list.set(i, [k, v]); } else { newMap = map.set(k, list.size); newList = list.set(list.size, [k, v]); } } if (omap.__ownerID) { omap.size = newMap.size; omap._map = newMap; omap._list = newList; omap.__hash = undefined; return omap; } return makeOrderedMap(newMap, newList); } createClass(ToKeyedSequence, KeyedSeq); function ToKeyedSequence(indexed, useKeys) { this._iter = indexed; this._useKeys = useKeys; this.size = indexed.size; } ToKeyedSequence.prototype.get = function(key, notSetValue) { return this._iter.get(key, notSetValue); }; ToKeyedSequence.prototype.has = function(key) { return this._iter.has(key); }; ToKeyedSequence.prototype.valueSeq = function() { return this._iter.valueSeq(); }; ToKeyedSequence.prototype.reverse = function() {var this$0 = this; var reversedSequence = reverseFactory(this, true); if (!this._useKeys) { reversedSequence.valueSeq = function() {return this$0._iter.toSeq().reverse()}; } return reversedSequence; }; ToKeyedSequence.prototype.map = function(mapper, context) {var this$0 = this; var mappedSequence = mapFactory(this, mapper, context); if (!this._useKeys) { mappedSequence.valueSeq = function() {return this$0._iter.toSeq().map(mapper, context)}; } return mappedSequence; }; ToKeyedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this; var ii; return this._iter.__iterate( this._useKeys ? function(v, k) {return fn(v, k, this$0)} : ((ii = reverse ? resolveSize(this) : 0), function(v ) {return fn(v, reverse ? --ii : ii++, this$0)}), reverse ); }; ToKeyedSequence.prototype.__iterator = function(type, reverse) { if (this._useKeys) { return this._iter.__iterator(type, reverse); } var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); var ii = reverse ? resolveSize(this) : 0; return new Iterator(function() { var step = iterator.next(); return step.done ? step : iteratorValue(type, reverse ? --ii : ii++, step.value, step); }); }; ToKeyedSequence.prototype[IS_ORDERED_SENTINEL] = true; createClass(ToIndexedSequence, IndexedSeq); function ToIndexedSequence(iter) { this._iter = iter; this.size = iter.size; } ToIndexedSequence.prototype.includes = function(value) { return this._iter.includes(value); }; ToIndexedSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this; var iterations = 0; return this._iter.__iterate(function(v ) {return fn(v, iterations++, this$0)}, reverse); }; ToIndexedSequence.prototype.__iterator = function(type, reverse) { var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); var iterations = 0; return new Iterator(function() { var step = iterator.next(); return step.done ? step : iteratorValue(type, iterations++, step.value, step) }); }; createClass(ToSetSequence, SetSeq); function ToSetSequence(iter) { this._iter = iter; this.size = iter.size; } ToSetSequence.prototype.has = function(key) { return this._iter.includes(key); }; ToSetSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this; return this._iter.__iterate(function(v ) {return fn(v, v, this$0)}, reverse); }; ToSetSequence.prototype.__iterator = function(type, reverse) { var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); return new Iterator(function() { var step = iterator.next(); return step.done ? step : iteratorValue(type, step.value, step.value, step); }); }; createClass(FromEntriesSequence, KeyedSeq); function FromEntriesSequence(entries) { this._iter = entries; this.size = entries.size; } FromEntriesSequence.prototype.entrySeq = function() { return this._iter.toSeq(); }; FromEntriesSequence.prototype.__iterate = function(fn, reverse) {var this$0 = this; return this._iter.__iterate(function(entry ) { // Check if entry exists first so array access doesn't throw for holes // in the parent iteration. if (entry) { validateEntry(entry); var indexedIterable = isIterable(entry); return fn( indexedIterable ? entry.get(1) : entry[1], indexedIterable ? entry.get(0) : entry[0], this$0 ); } }, reverse); }; FromEntriesSequence.prototype.__iterator = function(type, reverse) { var iterator = this._iter.__iterator(ITERATE_VALUES, reverse); return new Iterator(function() { while (true) { var step = iterator.next(); if (step.done) { return step; } var entry = step.value; // Check if entry exists first so array access doesn't throw for holes // in the parent iteration. if (entry) { validateEntry(entry); var indexedIterable = isIterable(entry); return iteratorValue( type, indexedIterable ? entry.get(0) : entry[0], indexedIterable ? entry.get(1) : entry[1], step ); } } }); }; ToIndexedSequence.prototype.cacheResult = ToKeyedSequence.prototype.cacheResult = ToSetSequence.prototype.cacheResult = FromEntriesSequence.prototype.cacheResult = cacheResultThrough; function flipFactory(iterable) { var flipSequence = makeSequence(iterable); flipSequence._iter = iterable; flipSequence.size = iterable.size; flipSequence.flip = function() {return iterable}; flipSequence.reverse = function () { var reversedSequence = iterable.reverse.apply(this); // super.reverse() reversedSequence.flip = function() {return iterable.reverse()}; return reversedSequence; }; flipSequence.has = function(key ) {return iterable.includes(key)}; flipSequence.includes = function(key ) {return iterable.has(key)}; flipSequence.cacheResult = cacheResultThrough; flipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this; return iterable.__iterate(function(v, k) {return fn(k, v, this$0) !== false}, reverse); } flipSequence.__iteratorUncached = function(type, reverse) { if (type === ITERATE_ENTRIES) { var iterator = iterable.__iterator(type, reverse); return new Iterator(function() { var step = iterator.next(); if (!step.done) { var k = step.value[0]; step.value[0] = step.value[1]; step.value[1] = k; } return step; }); } return iterable.__iterator( type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES, reverse ); } return flipSequence; } function mapFactory(iterable, mapper, context) { var mappedSequence = makeSequence(iterable); mappedSequence.size = iterable.size; mappedSequence.has = function(key ) {return iterable.has(key)}; mappedSequence.get = function(key, notSetValue) { var v = iterable.get(key, NOT_SET); return v === NOT_SET ? notSetValue : mapper.call(context, v, key, iterable); }; mappedSequence.__iterateUncached = function (fn, reverse) {var this$0 = this; return iterable.__iterate( function(v, k, c) {return fn(mapper.call(context, v, k, c), k, this$0) !== false}, reverse ); } mappedSequence.__iteratorUncached = function (type, reverse) { var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); return new Iterator(function() { var step = iterator.next(); if (step.done) { return step; } var entry = step.value; var key = entry[0]; return iteratorValue( type, key, mapper.call(context, entry[1], key, iterable), step ); }); } return mappedSequence; } function reverseFactory(iterable, useKeys) { var reversedSequence = makeSequence(iterable); reversedSequence._iter = iterable; reversedSequence.size = iterable.size; reversedSequence.reverse = function() {return iterable}; if (iterable.flip) { reversedSequence.flip = function () { var flipSequence = flipFactory(iterable); flipSequence.reverse = function() {return iterable.flip()}; return flipSequence; }; } reversedSequence.get = function(key, notSetValue) {return iterable.get(useKeys ? key : -1 - key, notSetValue)}; reversedSequence.has = function(key ) {return iterable.has(useKeys ? key : -1 - key)}; reversedSequence.includes = function(value ) {return iterable.includes(value)}; reversedSequence.cacheResult = cacheResultThrough; reversedSequence.__iterate = function (fn, reverse) {var this$0 = this; return iterable.__iterate(function(v, k) {return fn(v, k, this$0)}, !reverse); }; reversedSequence.__iterator = function(type, reverse) {return iterable.__iterator(type, !reverse)}; return reversedSequence; } function filterFactory(iterable, predicate, context, useKeys) { var filterSequence = makeSequence(iterable); if (useKeys) { filterSequence.has = function(key ) { var v = iterable.get(key, NOT_SET); return v !== NOT_SET && !!predicate.call(context, v, key, iterable); }; filterSequence.get = function(key, notSetValue) { var v = iterable.get(key, NOT_SET); return v !== NOT_SET && predicate.call(context, v, key, iterable) ? v : notSetValue; }; } filterSequence.__iterateUncached = function (fn, reverse) {var this$0 = this; var iterations = 0; iterable.__iterate(function(v, k, c) { if (predicate.call(context, v, k, c)) { iterations++; return fn(v, useKeys ? k : iterations - 1, this$0); } }, reverse); return iterations; }; filterSequence.__iteratorUncached = function (type, reverse) { var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); var iterations = 0; return new Iterator(function() { while (true) { var step = iterator.next(); if (step.done) { return step; } var entry = step.value; var key = entry[0]; var value = entry[1]; if (predicate.call(context, value, key, iterable)) { return iteratorValue(type, useKeys ? key : iterations++, value, step); } } }); } return filterSequence; } function countByFactory(iterable, grouper, context) { var groups = Map().asMutable(); iterable.__iterate(function(v, k) { groups.update( grouper.call(context, v, k, iterable), 0, function(a ) {return a + 1} ); }); return groups.asImmutable(); } function groupByFactory(iterable, grouper, context) { var isKeyedIter = isKeyed(iterable); var groups = (isOrdered(iterable) ? OrderedMap() : Map()).asMutable(); iterable.__iterate(function(v, k) { groups.update( grouper.call(context, v, k, iterable), function(a ) {return (a = a || [], a.push(isKeyedIter ? [k, v] : v), a)} ); }); var coerce = iterableClass(iterable); return groups.map(function(arr ) {return reify(iterable, coerce(arr))}); } function sliceFactory(iterable, begin, end, useKeys) { var originalSize = iterable.size; // Sanitize begin & end using this shorthand for ToInt32(argument) // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32 if (begin !== undefined) { begin = begin | 0; } if (end !== undefined) { if (end === Infinity) { end = originalSize; } else { end = end | 0; } } if (wholeSlice(begin, end, originalSize)) { return iterable; } var resolvedBegin = resolveBegin(begin, originalSize); var resolvedEnd = resolveEnd(end, originalSize); // begin or end will be NaN if they were provided as negative numbers and // this iterable's size is unknown. In that case, cache first so there is // a known size and these do not resolve to NaN. if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) { return sliceFactory(iterable.toSeq().cacheResult(), begin, end, useKeys); } // Note: resolvedEnd is undefined when the original sequence's length is // unknown and this slice did not supply an end and should contain all // elements after resolvedBegin. // In that case, resolvedSize will be NaN and sliceSize will remain undefined. var resolvedSize = resolvedEnd - resolvedBegin; var sliceSize; if (resolvedSize === resolvedSize) { sliceSize = resolvedSize < 0 ? 0 : resolvedSize; } var sliceSeq = makeSequence(iterable); // If iterable.size is undefined, the size of the realized sliceSeq is // unknown at this point unless the number of items to slice is 0 sliceSeq.size = sliceSize === 0 ? sliceSize : iterable.size && sliceSize || undefined; if (!useKeys && isSeq(iterable) && sliceSize >= 0) { sliceSeq.get = function (index, notSetValue) { index = wrapIndex(this, index); return index >= 0 && index < sliceSize ? iterable.get(index + resolvedBegin, notSetValue) : notSetValue; } } sliceSeq.__iterateUncached = function(fn, reverse) {var this$0 = this; if (sliceSize === 0) { return 0; } if (reverse) { return this.cacheResult().__iterate(fn, reverse); } var skipped = 0; var isSkipping = true; var iterations = 0; iterable.__iterate(function(v, k) { if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) { iterations++; return fn(v, useKeys ? k : iterations - 1, this$0) !== false && iterations !== sliceSize; } }); return iterations; }; sliceSeq.__iteratorUncached = function(type, reverse) { if (sliceSize !== 0 && reverse) { return this.cacheResult().__iterator(type, reverse); } // Don't bother instantiating parent iterator if taking 0. var iterator = sliceSize !== 0 && iterable.__iterator(type, reverse); var skipped = 0; var iterations = 0; return new Iterator(function() { while (skipped++ < resolvedBegin) { iterator.next(); } if (++iterations > sliceSize) { return iteratorDone(); } var step = iterator.next(); if (useKeys || type === ITERATE_VALUES) { return step; } else if (type === ITERATE_KEYS) { return iteratorValue(type, iterations - 1, undefined, step); } else { return iteratorValue(type, iterations - 1, step.value[1], step); } }); } return sliceSeq; } function takeWhileFactory(iterable, predicate, context) { var takeSequence = makeSequence(iterable); takeSequence.__iterateUncached = function(fn, reverse) {var this$0 = this; if (reverse) { return this.cacheResult().__iterate(fn, reverse); } var iterations = 0; iterable.__iterate(function(v, k, c) {return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$0)} ); return iterations; }; takeSequence.__iteratorUncached = function(type, reverse) {var this$0 = this; if (reverse) { return this.cacheResult().__iterator(type, reverse); } var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); var iterating = true; return new Iterator(function() { if (!iterating) { return iteratorDone(); } var step = iterator.next(); if (step.done) { return step; } var entry = step.value; var k = entry[0]; var v = entry[1]; if (!predicate.call(context, v, k, this$0)) { iterating = false; return iteratorDone(); } return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step); }); }; return takeSequence; } function skipWhileFactory(iterable, predicate, context, useKeys) { var skipSequence = makeSequence(iterable); skipSequence.__iterateUncached = function (fn, reverse) {var this$0 = this; if (reverse) { return this.cacheResult().__iterate(fn, reverse); } var isSkipping = true; var iterations = 0; iterable.__iterate(function(v, k, c) { if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) { iterations++; return fn(v, useKeys ? k : iterations - 1, this$0); } }); return iterations; }; skipSequence.__iteratorUncached = function(type, reverse) {var this$0 = this; if (reverse) { return this.cacheResult().__iterator(type, reverse); } var iterator = iterable.__iterator(ITERATE_ENTRIES, reverse); var skipping = true; var iterations = 0; return new Iterator(function() { var step, k, v; do { step = iterator.next(); if (step.done) { if (useKeys || type === ITERATE_VALUES) { return step; } else if (type === ITERATE_KEYS) { return iteratorValue(type, iterations++, undefined, step); } else { return iteratorValue(type, iterations++, step.value[1], step); } } var entry = step.value; k = entry[0]; v = entry[1]; skipping && (skipping = predicate.call(context, v, k, this$0)); } while (skipping); return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step); }); }; return skipSequence; } function concatFactory(iterable, values) { var isKeyedIterable = isKeyed(iterable); var iters = [iterable].concat(values).map(function(v ) { if (!isIterable(v)) { v = isKeyedIterable ? keyedSeqFromValue(v) : indexedSeqFromValue(Array.isArray(v) ? v : [v]); } else if (isKeyedIterable) { v = KeyedIterable(v); } return v; }).filter(function(v ) {return v.size !== 0}); if (iters.length === 0) { return iterable; } if (iters.length === 1) { var singleton = iters[0]; if (singleton === iterable || isKeyedIterable && isKeyed(singleton) || isIndexed(iterable) && isIndexed(singleton)) { return singleton; } } var concatSeq = new ArraySeq(iters); if (isKeyedIterable) { concatSeq = concatSeq.toKeyedSeq(); } else if (!isIndexed(iterable)) { concatSeq = concatSeq.toSetSeq(); } concatSeq = concatSeq.flatten(true); concatSeq.size = iters.reduce( function(sum, seq) { if (sum !== undefined) { var size = seq.size; if (size !== undefined) { return sum + size; } } }, 0 ); return concatSeq; } function flattenFactory(iterable, depth, useKeys) { var flatSequence = makeSequence(iterable); flatSequence.__iterateUncached = function(fn, reverse) { var iterations = 0; var stopped = false; function flatDeep(iter, currentDepth) {var this$0 = this; iter.__iterate(function(v, k) { if ((!depth || currentDepth < depth) && isIterable(v)) { flatDeep(v, currentDepth + 1); } else if (fn(v, useKeys ? k : iterations++, this$0) === false) { stopped = true; } return !stopped; }, reverse); } flatDeep(iterable, 0); return iterations; } flatSequence.__iteratorUncached = function(type, reverse) { var iterator = iterable.__iterator(type, reverse); var stack = []; var iterations = 0; return new Iterator(function() { while (iterator) { var step = iterator.next(); if (step.done !== false) { iterator = stack.pop(); continue; } var v = step.value; if (type === ITERATE_ENTRIES) { v = v[1]; } if ((!depth || stack.length < depth) && isIterable(v)) { stack.push(iterator); iterator = v.__iterator(type, reverse); } else { return useKeys ? step : iteratorValue(type, iterations++, v, step); } } return iteratorDone(); }); } return flatSequence; } function flatMapFactory(iterable, mapper, context) { var coerce = iterableClass(iterable); return iterable.toSeq().map( function(v, k) {return coerce(mapper.call(context, v, k, iterable))} ).flatten(true); } function interposeFactory(iterable, separator) { var interposedSequence = makeSequence(iterable); interposedSequence.size = iterable.size && iterable.size * 2 -1; interposedSequence.__iterateUncached = function(fn, reverse) {var this$0 = this; var iterations = 0; iterable.__iterate(function(v, k) {return (!iterations || fn(separator, iterations++, this$0) !== false) && fn(v, iterations++, this$0) !== false}, reverse ); return iterations; }; interposedSequence.__iteratorUncached = function(type, reverse) { var iterator = iterable.__iterator(ITERATE_VALUES, reverse); var iterations = 0; var step; return new Iterator(function() { if (!step || iterations % 2) { step = iterator.next(); if (step.done) { return step; } } return iterations % 2 ? iteratorValue(type, iterations++, separator) : iteratorValue(type, iterations++, step.value, step); }); }; return interposedSequence; } function sortFactory(iterable, comparator, mapper) { if (!comparator) { comparator = defaultComparator; } var isKeyedIterable = isKeyed(iterable); var index = 0; var entries = iterable.toSeq().map( function(v, k) {return [k, v, index++, mapper ? mapper(v, k, iterable) : v]} ).toArray(); entries.sort(function(a, b) {return comparator(a[3], b[3]) || a[2] - b[2]}).forEach( isKeyedIterable ? function(v, i) { entries[i].length = 2; } : function(v, i) { entries[i] = v[1]; } ); return isKeyedIterable ? KeyedSeq(entries) : isIndexed(iterable) ? IndexedSeq(entries) : SetSeq(entries); } function maxFactory(iterable, comparator, mapper) { if (!comparator) { comparator = defaultComparator; } if (mapper) { var entry = iterable.toSeq() .map(function(v, k) {return [v, mapper(v, k, iterable)]}) .reduce(function(a, b) {return maxCompare(comparator, a[1], b[1]) ? b : a}); return entry && entry[0]; } else { return iterable.reduce(function(a, b) {return maxCompare(comparator, a, b) ? b : a}); } } function maxCompare(comparator, a, b) { var comp = comparator(b, a); // b is considered the new max if the comparator declares them equal, but // they are not equal and b is in fact a nullish value. return (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) || comp > 0; } function zipWithFactory(keyIter, zipper, iters) { var zipSequence = makeSequence(keyIter); zipSequence.size = new ArraySeq(iters).map(function(i ) {return i.size}).min(); // Note: this a generic base implementation of __iterate in terms of // __iterator which may be more generically useful in the future. zipSequence.__iterate = function(fn, reverse) { /* generic: var iterator = this.__iterator(ITERATE_ENTRIES, reverse); var step; var iterations = 0; while (!(step = iterator.next()).done) { iterations++; if (fn(step.value[1], step.value[0], this) === false) { break; } } return iterations; */ // indexed: var iterator = this.__iterator(ITERATE_VALUES, reverse); var step; var iterations = 0; while (!(step = iterator.next()).done) { if (fn(step.value, iterations++, this) === false) { break; } } return iterations; }; zipSequence.__iteratorUncached = function(type, reverse) { var iterators = iters.map(function(i ) {return (i = Iterable(i), getIterator(reverse ? i.reverse() : i))} ); var iterations = 0; var isDone = false; return new Iterator(function() { var steps; if (!isDone) { steps = iterators.map(function(i ) {return i.next()}); isDone = steps.some(function(s ) {return s.done}); } if (isDone) { return iteratorDone(); } return iteratorValue( type, iterations++, zipper.apply(null, steps.map(function(s ) {return s.value})) ); }); }; return zipSequence } // #pragma Helper Functions function reify(iter, seq) { return isSeq(iter) ? seq : iter.constructor(seq); } function validateEntry(entry) { if (entry !== Object(entry)) { throw new TypeError('Expected [K, V] tuple: ' + entry); } } function resolveSize(iter) { assertNotInfinite(iter.size); return ensureSize(iter); } function iterableClass(iterable) { return isKeyed(iterable) ? KeyedIterable : isIndexed(iterable) ? IndexedIterable : SetIterable; } function makeSequence(iterable) { return Object.create( ( isKeyed(iterable) ? KeyedSeq : isIndexed(iterable) ? IndexedSeq : SetSeq ).prototype ); } function cacheResultThrough() { if (this._iter.cacheResult) { this._iter.cacheResult(); this.size = this._iter.size; return this; } else { return Seq.prototype.cacheResult.call(this); } } function defaultComparator(a, b) { return a > b ? 1 : a < b ? -1 : 0; } function forceIterator(keyPath) { var iter = getIterator(keyPath); if (!iter) { // Array might not be iterable in this environment, so we need a fallback // to our wrapped type. if (!isArrayLike(keyPath)) { throw new TypeError('Expected iterable or array-like: ' + keyPath); } iter = getIterator(Iterable(keyPath)); } return iter; } createClass(Record, KeyedCollection); function Record(defaultValues, name) { var hasInitialized; var RecordType = function Record(values) { if (values instanceof RecordType) { return values; } if (!(this instanceof RecordType)) { return new RecordType(values); } if (!hasInitialized) { hasInitialized = true; var keys = Object.keys(defaultValues); setProps(RecordTypePrototype, keys); RecordTypePrototype.size = keys.length; RecordTypePrototype._name = name; RecordTypePrototype._keys = keys; RecordTypePrototype._defaultValues = defaultValues; } this._map = Map(values); }; var RecordTypePrototype = RecordType.prototype = Object.create(RecordPrototype); RecordTypePrototype.constructor = RecordType; return RecordType; } Record.prototype.toString = function() { return this.__toString(recordName(this) + ' {', '}'); }; // @pragma Access Record.prototype.has = function(k) { return this._defaultValues.hasOwnProperty(k); }; Record.prototype.get = function(k, notSetValue) { if (!this.has(k)) { return notSetValue; } var defaultVal = this._defaultValues[k]; return this._map ? this._map.get(k, defaultVal) : defaultVal; }; // @pragma Modification Record.prototype.clear = function() { if (this.__ownerID) { this._map && this._map.clear(); return this; } var RecordType = this.constructor; return RecordType._empty || (RecordType._empty = makeRecord(this, emptyMap())); }; Record.prototype.set = function(k, v) { if (!this.has(k)) { throw new Error('Cannot set unknown key "' + k + '" on ' + recordName(this)); } if (this._map && !this._map.has(k)) { var defaultVal = this._defaultValues[k]; if (v === defaultVal) { return this; } } var newMap = this._map && this._map.set(k, v); if (this.__ownerID || newMap === this._map) { return this; } return makeRecord(this, newMap); }; Record.prototype.remove = function(k) { if (!this.has(k)) { return this; } var newMap = this._map && this._map.remove(k); if (this.__ownerID || newMap === this._map) { return this; } return makeRecord(this, newMap); }; Record.prototype.wasAltered = function() { return this._map.wasAltered(); }; Record.prototype.__iterator = function(type, reverse) {var this$0 = this; return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterator(type, reverse); }; Record.prototype.__iterate = function(fn, reverse) {var this$0 = this; return KeyedIterable(this._defaultValues).map(function(_, k) {return this$0.get(k)}).__iterate(fn, reverse); }; Record.prototype.__ensureOwner = function(ownerID) { if (ownerID === this.__ownerID) { return this; } var newMap = this._map && this._map.__ensureOwner(ownerID); if (!ownerID) { this.__ownerID = ownerID; this._map = newMap; return this; } return makeRecord(this, newMap, ownerID); }; var RecordPrototype = Record.prototype; RecordPrototype[DELETE] = RecordPrototype.remove; RecordPrototype.deleteIn = RecordPrototype.removeIn = MapPrototype.removeIn; RecordPrototype.merge = MapPrototype.merge; RecordPrototype.mergeWith = MapPrototype.mergeWith; RecordPrototype.mergeIn = MapPrototype.mergeIn; RecordPrototype.mergeDeep = MapPrototype.mergeDeep; RecordPrototype.mergeDeepWith = MapPrototype.mergeDeepWith; RecordPrototype.mergeDeepIn = MapPrototype.mergeDeepIn; RecordPrototype.setIn = MapPrototype.setIn; RecordPrototype.update = MapPrototype.update; RecordPrototype.updateIn = MapPrototype.updateIn; RecordPrototype.withMutations = MapPrototype.withMutations; RecordPrototype.asMutable = MapPrototype.asMutable; RecordPrototype.asImmutable = MapPrototype.asImmutable; function makeRecord(likeRecord, map, ownerID) { var record = Object.create(Object.getPrototypeOf(likeRecord)); record._map = map; record.__ownerID = ownerID; return record; } function recordName(record) { return record._name || record.constructor.name || 'Record'; } function setProps(prototype, names) { try { names.forEach(setProp.bind(undefined, prototype)); } catch (error) { // Object.defineProperty failed. Probably IE8. } } function setProp(prototype, name) { Object.defineProperty(prototype, name, { get: function() { return this.get(name); }, set: function(value) { invariant(this.__ownerID, 'Cannot set on an immutable record.'); this.set(name, value); } }); } createClass(Set, SetCollection); // @pragma Construction function Set(value) { return value === null || value === undefined ? emptySet() : isSet(value) && !isOrdered(value) ? value : emptySet().withMutations(function(set ) { var iter = SetIterable(value); assertNotInfinite(iter.size); iter.forEach(function(v ) {return set.add(v)}); }); } Set.of = function(/*...values*/) { return this(arguments); }; Set.fromKeys = function(value) { return this(KeyedIterable(value).keySeq()); }; Set.prototype.toString = function() { return this.__toString('Set {', '}'); }; // @pragma Access Set.prototype.has = function(value) { return this._map.has(value); }; // @pragma Modification Set.prototype.add = function(value) { return updateSet(this, this._map.set(value, true)); }; Set.prototype.remove = function(value) { return updateSet(this, this._map.remove(value)); }; Set.prototype.clear = function() { return updateSet(this, this._map.clear()); }; // @pragma Composition Set.prototype.union = function() {var iters = SLICE$0.call(arguments, 0); iters = iters.filter(function(x ) {return x.size !== 0}); if (iters.length === 0) { return this; } if (this.size === 0 && !this.__ownerID && iters.length === 1) { return this.constructor(iters[0]); } return this.withMutations(function(set ) { for (var ii = 0; ii < iters.length; ii++) { SetIterable(iters[ii]).forEach(function(value ) {return set.add(value)}); } }); }; Set.prototype.intersect = function() {var iters = SLICE$0.call(arguments, 0); if (iters.length === 0) { return this; } iters = iters.map(function(iter ) {return SetIterable(iter)}); var originalSet = this; return this.withMutations(function(set ) { originalSet.forEach(function(value ) { if (!iters.every(function(iter ) {return iter.includes(value)})) { set.remove(value); } }); }); }; Set.prototype.subtract = function() {var iters = SLICE$0.call(arguments, 0); if (iters.length === 0) { return this; } iters = iters.map(function(iter ) {return SetIterable(iter)}); var originalSet = this; return this.withMutations(function(set ) { originalSet.forEach(function(value ) { if (iters.some(function(iter ) {return iter.includes(value)})) { set.remove(value); } }); }); }; Set.prototype.merge = function() { return this.union.apply(this, arguments); }; Set.prototype.mergeWith = function(merger) {var iters = SLICE$0.call(arguments, 1); return this.union.apply(this, iters); }; Set.prototype.sort = function(comparator) { // Late binding return OrderedSet(sortFactory(this, comparator)); }; Set.prototype.sortBy = function(mapper, comparator) { // Late binding return OrderedSet(sortFactory(this, comparator, mapper)); }; Set.prototype.wasAltered = function() { return this._map.wasAltered(); }; Set.prototype.__iterate = function(fn, reverse) {var this$0 = this; return this._map.__iterate(function(_, k) {return fn(k, k, this$0)}, reverse); }; Set.prototype.__iterator = function(type, reverse) { return this._map.map(function(_, k) {return k}).__iterator(type, reverse); }; Set.prototype.__ensureOwner = function(ownerID) { if (ownerID === this.__ownerID) { return this; } var newMap = this._map.__ensureOwner(ownerID); if (!ownerID) { this.__ownerID = ownerID; this._map = newMap; return this; } return this.__make(newMap, ownerID); }; function isSet(maybeSet) { return !!(maybeSet && maybeSet[IS_SET_SENTINEL]); } Set.isSet = isSet; var IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@'; var SetPrototype = Set.prototype; SetPrototype[IS_SET_SENTINEL] = true; SetPrototype[DELETE] = SetPrototype.remove; SetPrototype.mergeDeep = SetPrototype.merge; SetPrototype.mergeDeepWith = SetPrototype.mergeWith; SetPrototype.withMutations = MapPrototype.withMutations; SetPrototype.asMutable = MapPrototype.asMutable; SetPrototype.asImmutable = MapPrototype.asImmutable; SetPrototype.__empty = emptySet; SetPrototype.__make = makeSet; function updateSet(set, newMap) { if (set.__ownerID) { set.size = newMap.size; set._map = newMap; return set; } return newMap === set._map ? set : newMap.size === 0 ? set.__empty() : set.__make(newMap); } function makeSet(map, ownerID) { var set = Object.create(SetPrototype); set.size = map ? map.size : 0; set._map = map; set.__ownerID = ownerID; return set; } var EMPTY_SET; function emptySet() { return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap())); } createClass(OrderedSet, Set); // @pragma Construction function OrderedSet(value) { return value === null || value === undefined ? emptyOrderedSet() : isOrderedSet(value) ? value : emptyOrderedSet().withMutations(function(set ) { var iter = SetIterable(value); assertNotInfinite(iter.size); iter.forEach(function(v ) {return set.add(v)}); }); } OrderedSet.of = function(/*...values*/) { return this(arguments); }; OrderedSet.fromKeys = function(value) { return this(KeyedIterable(value).keySeq()); }; OrderedSet.prototype.toString = function() { return this.__toString('OrderedSet {', '}'); }; function isOrderedSet(maybeOrderedSet) { return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet); } OrderedSet.isOrderedSet = isOrderedSet; var OrderedSetPrototype = OrderedSet.prototype; OrderedSetPrototype[IS_ORDERED_SENTINEL] = true; OrderedSetPrototype.__empty = emptyOrderedSet; OrderedSetPrototype.__make = makeOrderedSet; function makeOrderedSet(map, ownerID) { var set = Object.create(OrderedSetPrototype); set.size = map ? map.size : 0; set._map = map; set.__ownerID = ownerID; return set; } var EMPTY_ORDERED_SET; function emptyOrderedSet() { return EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap())); } createClass(Stack, IndexedCollection); // @pragma Construction function Stack(value) { return value === null || value === undefined ? emptyStack() : isStack(value) ? value : emptyStack().unshiftAll(value); } Stack.of = function(/*...values*/) { return this(arguments); }; Stack.prototype.toString = function() { return this.__toString('Stack [', ']'); }; // @pragma Access Stack.prototype.get = function(index, notSetValue) { var head = this._head; index = wrapIndex(this, index); while (head && index--) { head = head.next; } return head ? head.value : notSetValue; }; Stack.prototype.peek = function() { return this._head && this._head.value; }; // @pragma Modification Stack.prototype.push = function(/*...values*/) { if (arguments.length === 0) { return this; } var newSize = this.size + arguments.length; var head = this._head; for (var ii = arguments.length - 1; ii >= 0; ii--) { head = { value: arguments[ii], next: head }; } if (this.__ownerID) { this.size = newSize; this._head = head; this.__hash = undefined; this.__altered = true; return this; } return makeStack(newSize, head); }; Stack.prototype.pushAll = function(iter) { iter = IndexedIterable(iter); if (iter.size === 0) { return this; } assertNotInfinite(iter.size); var newSize = this.size; var head = this._head; iter.reverse().forEach(function(value ) { newSize++; head = { value: value, next: head }; }); if (this.__ownerID) { this.size = newSize; this._head = head; this.__hash = undefined; this.__altered = true; return this; } return makeStack(newSize, head); }; Stack.prototype.pop = function() { return this.slice(1); }; Stack.prototype.unshift = function(/*...values*/) { return this.push.apply(this, arguments); }; Stack.prototype.unshiftAll = function(iter) { return this.pushAll(iter); }; Stack.prototype.shift = function() { return this.pop.apply(this, arguments); }; Stack.prototype.clear = function() { if (this.size === 0) { return this; } if (this.__ownerID) { this.size = 0; this._head = undefined; this.__hash = undefined; this.__altered = true; return this; } return emptyStack(); }; Stack.prototype.slice = function(begin, end) { if (wholeSlice(begin, end, this.size)) { return this; } var resolvedBegin = resolveBegin(begin, this.size); var resolvedEnd = resolveEnd(end, this.size); if (resolvedEnd !== this.size) { // super.slice(begin, end); return IndexedCollection.prototype.slice.call(this, begin, end); } var newSize = this.size - resolvedBegin; var head = this._head; while (resolvedBegin--) { head = head.next; } if (this.__ownerID) { this.size = newSize; this._head = head; this.__hash = undefined; this.__altered = true; return this; } return makeStack(newSize, head); }; // @pragma Mutability Stack.prototype.__ensureOwner = function(ownerID) { if (ownerID === this.__ownerID) { return this; } if (!ownerID) { this.__ownerID = ownerID; this.__altered = false; return this; } return makeStack(this.size, this._head, ownerID, this.__hash); }; // @pragma Iteration Stack.prototype.__iterate = function(fn, reverse) { if (reverse) { return this.reverse().__iterate(fn); } var iterations = 0; var node = this._head; while (node) { if (fn(node.value, iterations++, this) === false) { break; } node = node.next; } return iterations; }; Stack.prototype.__iterator = function(type, reverse) { if (reverse) { return this.reverse().__iterator(type); } var iterations = 0; var node = this._head; return new Iterator(function() { if (node) { var value = node.value; node = node.next; return iteratorValue(type, iterations++, value); } return iteratorDone(); }); }; function isStack(maybeStack) { return !!(maybeStack && maybeStack[IS_STACK_SENTINEL]); } Stack.isStack = isStack; var IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@'; var StackPrototype = Stack.prototype; StackPrototype[IS_STACK_SENTINEL] = true; StackPrototype.withMutations = MapPrototype.withMutations; StackPrototype.asMutable = MapPrototype.asMutable; StackPrototype.asImmutable = MapPrototype.asImmutable; StackPrototype.wasAltered = MapPrototype.wasAltered; function makeStack(size, head, ownerID, hash) { var map = Object.create(StackPrototype); map.size = size; map._head = head; map.__ownerID = ownerID; map.__hash = hash; map.__altered = false; return map; } var EMPTY_STACK; function emptyStack() { return EMPTY_STACK || (EMPTY_STACK = makeStack(0)); } /** * Contributes additional methods to a constructor */ function mixin(ctor, methods) { var keyCopier = function(key ) { ctor.prototype[key] = methods[key]; }; Object.keys(methods).forEach(keyCopier); Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(methods).forEach(keyCopier); return ctor; } Iterable.Iterator = Iterator; mixin(Iterable, { // ### Conversion to other types toArray: function() { assertNotInfinite(this.size); var array = new Array(this.size || 0); this.valueSeq().__iterate(function(v, i) { array[i] = v; }); return array; }, toIndexedSeq: function() { return new ToIndexedSequence(this); }, toJS: function() { return this.toSeq().map( function(value ) {return value && typeof value.toJS === 'function' ? value.toJS() : value} ).__toJS(); }, toJSON: function() { return this.toSeq().map( function(value ) {return value && typeof value.toJSON === 'function' ? value.toJSON() : value} ).__toJS(); }, toKeyedSeq: function() { return new ToKeyedSequence(this, true); }, toMap: function() { // Use Late Binding here to solve the circular dependency. return Map(this.toKeyedSeq()); }, toObject: function() { assertNotInfinite(this.size); var object = {}; this.__iterate(function(v, k) { object[k] = v; }); return object; }, toOrderedMap: function() { // Use Late Binding here to solve the circular dependency. return OrderedMap(this.toKeyedSeq()); }, toOrderedSet: function() { // Use Late Binding here to solve the circular dependency. return OrderedSet(isKeyed(this) ? this.valueSeq() : this); }, toSet: function() { // Use Late Binding here to solve the circular dependency. return Set(isKeyed(this) ? this.valueSeq() : this); }, toSetSeq: function() { return new ToSetSequence(this); }, toSeq: function() { return isIndexed(this) ? this.toIndexedSeq() : isKeyed(this) ? this.toKeyedSeq() : this.toSetSeq(); }, toStack: function() { // Use Late Binding here to solve the circular dependency. return Stack(isKeyed(this) ? this.valueSeq() : this); }, toList: function() { // Use Late Binding here to solve the circular dependency. return List(isKeyed(this) ? this.valueSeq() : this); }, // ### Common JavaScript methods and properties toString: function() { return '[Iterable]'; }, __toString: function(head, tail) { if (this.size === 0) { return head + tail; } return head + ' ' + this.toSeq().map(this.__toStringMapper).join(', ') + ' ' + tail; }, // ### ES6 Collection methods (ES6 Array and Map) concat: function() {var values = SLICE$0.call(arguments, 0); return reify(this, concatFactory(this, values)); }, includes: function(searchValue) { return this.some(function(value ) {return is(value, searchValue)}); }, entries: function() { return this.__iterator(ITERATE_ENTRIES); }, every: function(predicate, context) { assertNotInfinite(this.size); var returnValue = true; this.__iterate(function(v, k, c) { if (!predicate.call(context, v, k, c)) { returnValue = false; return false; } }); return returnValue; }, filter: function(predicate, context) { return reify(this, filterFactory(this, predicate, context, true)); }, find: function(predicate, context, notSetValue) { var entry = this.findEntry(predicate, context); return entry ? entry[1] : notSetValue; }, forEach: function(sideEffect, context) { assertNotInfinite(this.size); return this.__iterate(context ? sideEffect.bind(context) : sideEffect); }, join: function(separator) { assertNotInfinite(this.size); separator = separator !== undefined ? '' + separator : ','; var joined = ''; var isFirst = true; this.__iterate(function(v ) { isFirst ? (isFirst = false) : (joined += separator); joined += v !== null && v !== undefined ? v.toString() : ''; }); return joined; }, keys: function() { return this.__iterator(ITERATE_KEYS); }, map: function(mapper, context) { return reify(this, mapFactory(this, mapper, context)); }, reduce: function(reducer, initialReduction, context) { assertNotInfinite(this.size); var reduction; var useFirst; if (arguments.length < 2) { useFirst = true; } else { reduction = initialReduction; } this.__iterate(function(v, k, c) { if (useFirst) { useFirst = false; reduction = v; } else { reduction = reducer.call(context, reduction, v, k, c); } }); return reduction; }, reduceRight: function(reducer, initialReduction, context) { var reversed = this.toKeyedSeq().reverse(); return reversed.reduce.apply(reversed, arguments); }, reverse: function() { return reify(this, reverseFactory(this, true)); }, slice: function(begin, end) { return reify(this, sliceFactory(this, begin, end, true)); }, some: function(predicate, context) { return !this.every(not(predicate), context); }, sort: function(comparator) { return reify(this, sortFactory(this, comparator)); }, values: function() { return this.__iterator(ITERATE_VALUES); }, // ### More sequential methods butLast: function() { return this.slice(0, -1); }, isEmpty: function() { return this.size !== undefined ? this.size === 0 : !this.some(function() {return true}); }, count: function(predicate, context) { return ensureSize( predicate ? this.toSeq().filter(predicate, context) : this ); }, countBy: function(grouper, context) { return countByFactory(this, grouper, context); }, equals: function(other) { return deepEqual(this, other); }, entrySeq: function() { var iterable = this; if (iterable._cache) { // We cache as an entries array, so we can just return the cache! return new ArraySeq(iterable._cache); } var entriesSequence = iterable.toSeq().map(entryMapper).toIndexedSeq(); entriesSequence.fromEntrySeq = function() {return iterable.toSeq()}; return entriesSequence; }, filterNot: function(predicate, context) { return this.filter(not(predicate), context); }, findEntry: function(predicate, context, notSetValue) { var found = notSetValue; this.__iterate(function(v, k, c) { if (predicate.call(context, v, k, c)) { found = [k, v]; return false; } }); return found; }, findKey: function(predicate, context) { var entry = this.findEntry(predicate, context); return entry && entry[0]; }, findLast: function(predicate, context, notSetValue) { return this.toKeyedSeq().reverse().find(predicate, context, notSetValue); }, findLastEntry: function(predicate, context, notSetValue) { return this.toKeyedSeq().reverse().findEntry(predicate, context, notSetValue); }, findLastKey: function(predicate, context) { return this.toKeyedSeq().reverse().findKey(predicate, context); }, first: function() { return this.find(returnTrue); }, flatMap: function(mapper, context) { return reify(this, flatMapFactory(this, mapper, context)); }, flatten: function(depth) { return reify(this, flattenFactory(this, depth, true)); }, fromEntrySeq: function() { return new FromEntriesSequence(this); }, get: function(searchKey, notSetValue) { return this.find(function(_, key) {return is(key, searchKey)}, undefined, notSetValue); }, getIn: function(searchKeyPath, notSetValue) { var nested = this; // Note: in an ES6 environment, we would prefer: // for (var key of searchKeyPath) { var iter = forceIterator(searchKeyPath); var step; while (!(step = iter.next()).done) { var key = step.value; nested = nested && nested.get ? nested.get(key, NOT_SET) : NOT_SET; if (nested === NOT_SET) { return notSetValue; } } return nested; }, groupBy: function(grouper, context) { return groupByFactory(this, grouper, context); }, has: function(searchKey) { return this.get(searchKey, NOT_SET) !== NOT_SET; }, hasIn: function(searchKeyPath) { return this.getIn(searchKeyPath, NOT_SET) !== NOT_SET; }, isSubset: function(iter) { iter = typeof iter.includes === 'function' ? iter : Iterable(iter); return this.every(function(value ) {return iter.includes(value)}); }, isSuperset: function(iter) { iter = typeof iter.isSubset === 'function' ? iter : Iterable(iter); return iter.isSubset(this); }, keyOf: function(searchValue) { return this.findKey(function(value ) {return is(value, searchValue)}); }, keySeq: function() { return this.toSeq().map(keyMapper).toIndexedSeq(); }, last: function() { return this.toSeq().reverse().first(); }, lastKeyOf: function(searchValue) { return this.toKeyedSeq().reverse().keyOf(searchValue); }, max: function(comparator) { return maxFactory(this, comparator); }, maxBy: function(mapper, comparator) { return maxFactory(this, comparator, mapper); }, min: function(comparator) { return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator); }, minBy: function(mapper, comparator) { return maxFactory(this, comparator ? neg(comparator) : defaultNegComparator, mapper); }, rest: function() { return this.slice(1); }, skip: function(amount) { return this.slice(Math.max(0, amount)); }, skipLast: function(amount) { return reify(this, this.toSeq().reverse().skip(amount).reverse()); }, skipWhile: function(predicate, context) { return reify(this, skipWhileFactory(this, predicate, context, true)); }, skipUntil: function(predicate, context) { return this.skipWhile(not(predicate), context); }, sortBy: function(mapper, comparator) { return reify(this, sortFactory(this, comparator, mapper)); }, take: function(amount) { return this.slice(0, Math.max(0, amount)); }, takeLast: function(amount) { return reify(this, this.toSeq().reverse().take(amount).reverse()); }, takeWhile: function(predicate, context) { return reify(this, takeWhileFactory(this, predicate, context)); }, takeUntil: function(predicate, context) { return this.takeWhile(not(predicate), context); }, valueSeq: function() { return this.toIndexedSeq(); }, // ### Hashable Object hashCode: function() { return this.__hash || (this.__hash = hashIterable(this)); } // ### Internal // abstract __iterate(fn, reverse) // abstract __iterator(type, reverse) }); // var IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@'; // var IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@'; // var IS_INDEXED_SENTINEL = '@@__IMMUTABLE_INDEXED__@@'; // var IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@'; var IterablePrototype = Iterable.prototype; IterablePrototype[IS_ITERABLE_SENTINEL] = true; IterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.values; IterablePrototype.__toJS = IterablePrototype.toArray; IterablePrototype.__toStringMapper = quoteString; IterablePrototype.inspect = IterablePrototype.toSource = function() { return this.toString(); }; IterablePrototype.chain = IterablePrototype.flatMap; IterablePrototype.contains = IterablePrototype.includes; mixin(KeyedIterable, { // ### More sequential methods flip: function() { return reify(this, flipFactory(this)); }, mapEntries: function(mapper, context) {var this$0 = this; var iterations = 0; return reify(this, this.toSeq().map( function(v, k) {return mapper.call(context, [k, v], iterations++, this$0)} ).fromEntrySeq() ); }, mapKeys: function(mapper, context) {var this$0 = this; return reify(this, this.toSeq().flip().map( function(k, v) {return mapper.call(context, k, v, this$0)} ).flip() ); } }); var KeyedIterablePrototype = KeyedIterable.prototype; KeyedIterablePrototype[IS_KEYED_SENTINEL] = true; KeyedIterablePrototype[ITERATOR_SYMBOL] = IterablePrototype.entries; KeyedIterablePrototype.__toJS = IterablePrototype.toObject; KeyedIterablePrototype.__toStringMapper = function(v, k) {return JSON.stringify(k) + ': ' + quoteString(v)}; mixin(IndexedIterable, { // ### Conversion to other types toKeyedSeq: function() { return new ToKeyedSequence(this, false); }, // ### ES6 Collection methods (ES6 Array and Map) filter: function(predicate, context) { return reify(this, filterFactory(this, predicate, context, false)); }, findIndex: function(predicate, context) { var entry = this.findEntry(predicate, context); return entry ? entry[0] : -1; }, indexOf: function(searchValue) { var key = this.keyOf(searchValue); return key === undefined ? -1 : key; }, lastIndexOf: function(searchValue) { var key = this.lastKeyOf(searchValue); return key === undefined ? -1 : key; }, reverse: function() { return reify(this, reverseFactory(this, false)); }, slice: function(begin, end) { return reify(this, sliceFactory(this, begin, end, false)); }, splice: function(index, removeNum /*, ...values*/) { var numArgs = arguments.length; removeNum = Math.max(removeNum | 0, 0); if (numArgs === 0 || (numArgs === 2 && !removeNum)) { return this; } // If index is negative, it should resolve relative to the size of the // collection. However size may be expensive to compute if not cached, so // only call count() if the number is in fact negative. index = resolveBegin(index, index < 0 ? this.count() : this.size); var spliced = this.slice(0, index); return reify( this, numArgs === 1 ? spliced : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum)) ); }, // ### More collection methods findLastIndex: function(predicate, context) { var entry = this.findLastEntry(predicate, context); return entry ? entry[0] : -1; }, first: function() { return this.get(0); }, flatten: function(depth) { return reify(this, flattenFactory(this, depth, false)); }, get: function(index, notSetValue) { index = wrapIndex(this, index); return (index < 0 || (this.size === Infinity || (this.size !== undefined && index > this.size))) ? notSetValue : this.find(function(_, key) {return key === index}, undefined, notSetValue); }, has: function(index) { index = wrapIndex(this, index); return index >= 0 && (this.size !== undefined ? this.size === Infinity || index < this.size : this.indexOf(index) !== -1 ); }, interpose: function(separator) { return reify(this, interposeFactory(this, separator)); }, interleave: function(/*...iterables*/) { var iterables = [this].concat(arrCopy(arguments)); var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, iterables); var interleaved = zipped.flatten(true); if (zipped.size) { interleaved.size = zipped.size * iterables.length; } return reify(this, interleaved); }, keySeq: function() { return Range(0, this.size); }, last: function() { return this.get(-1); }, skipWhile: function(predicate, context) { return reify(this, skipWhileFactory(this, predicate, context, false)); }, zip: function(/*, ...iterables */) { var iterables = [this].concat(arrCopy(arguments)); return reify(this, zipWithFactory(this, defaultZipper, iterables)); }, zipWith: function(zipper/*, ...iterables */) { var iterables = arrCopy(arguments); iterables[0] = this; return reify(this, zipWithFactory(this, zipper, iterables)); } }); IndexedIterable.prototype[IS_INDEXED_SENTINEL] = true; IndexedIterable.prototype[IS_ORDERED_SENTINEL] = true; mixin(SetIterable, { // ### ES6 Collection methods (ES6 Array and Map) get: function(value, notSetValue) { return this.has(value) ? value : notSetValue; }, includes: function(value) { return this.has(value); }, // ### More sequential methods keySeq: function() { return this.valueSeq(); } }); SetIterable.prototype.has = IterablePrototype.includes; SetIterable.prototype.contains = SetIterable.prototype.includes; // Mixin subclasses mixin(KeyedSeq, KeyedIterable.prototype); mixin(IndexedSeq, IndexedIterable.prototype); mixin(SetSeq, SetIterable.prototype); mixin(KeyedCollection, KeyedIterable.prototype); mixin(IndexedCollection, IndexedIterable.prototype); mixin(SetCollection, SetIterable.prototype); // #pragma Helper functions function keyMapper(v, k) { return k; } function entryMapper(v, k) { return [k, v]; } function not(predicate) { return function() { return !predicate.apply(this, arguments); } } function neg(predicate) { return function() { return -predicate.apply(this, arguments); } } function quoteString(value) { return typeof value === 'string' ? JSON.stringify(value) : String(value); } function defaultZipper() { return arrCopy(arguments); } function defaultNegComparator(a, b) { return a < b ? 1 : a > b ? -1 : 0; } function hashIterable(iterable) { if (iterable.size === Infinity) { return 0; } var ordered = isOrdered(iterable); var keyed = isKeyed(iterable); var h = ordered ? 1 : 0; var size = iterable.__iterate( keyed ? ordered ? function(v, k) { h = 31 * h + hashMerge(hash(v), hash(k)) | 0; } : function(v, k) { h = h + hashMerge(hash(v), hash(k)) | 0; } : ordered ? function(v ) { h = 31 * h + hash(v) | 0; } : function(v ) { h = h + hash(v) | 0; } ); return murmurHashOfSize(size, h); } function murmurHashOfSize(size, h) { h = imul(h, 0xCC9E2D51); h = imul(h << 15 | h >>> -15, 0x1B873593); h = imul(h << 13 | h >>> -13, 5); h = (h + 0xE6546B64 | 0) ^ size; h = imul(h ^ h >>> 16, 0x85EBCA6B); h = imul(h ^ h >>> 13, 0xC2B2AE35); h = smi(h ^ h >>> 16); return h; } function hashMerge(a, b) { return a ^ b + 0x9E3779B9 + (a << 6) + (a >> 2) | 0; // int } var Immutable = { Iterable: Iterable, Seq: Seq, Collection: Collection, Map: Map, OrderedMap: OrderedMap, List: List, Stack: Stack, Set: Set, OrderedSet: OrderedSet, Record: Record, Range: Range, Repeat: Repeat, is: is, fromJS: fromJS }; return Immutable; })); /***/ }), /* 19 */ /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a <style> tag // load the styles var content = __webpack_require__(200); if(typeof content === 'string') content = [[module.id, content, '']]; // add the styles to the DOM var update = __webpack_require__(10)(content, {}); if(content.locals) module.exports = content.locals; // Hot Module Replacement if(false) { // When the styles change, update the <style> tags if(!content.locals) { module.hot.accept("!!../node_modules/css-loader/index.js!./react-data-grid-header.css", function() { var newContent = require("!!../node_modules/css-loader/index.js!./react-data-grid-header.css"); if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; update(newContent); }); } // When the module is disposed, remove the <style> tags module.hot.dispose(function() { update(); }); } /***/ }), /* 20 */, /* 21 */, /* 22 */, /* 23 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var React = __webpack_require__(2); var shallowCloneObject = __webpack_require__(37); var contextTypes = { metricsComputator: React.PropTypes.object }; var MetricsComputatorMixin = { childContextTypes: contextTypes, getChildContext: function getChildContext() { return { metricsComputator: this }; }, getMetricImpl: function getMetricImpl(name) { return this._DOMMetrics.metrics[name].value; }, registerMetricsImpl: function registerMetricsImpl(component, metrics) { var getters = {}; var s = this._DOMMetrics; for (var name in metrics) { if (s.metrics[name] !== undefined) { throw new Error('DOM metric ' + name + ' is already defined'); } s.metrics[name] = { component: component, computator: metrics[name].bind(component) }; getters[name] = this.getMetricImpl.bind(null, name); } if (s.components.indexOf(component) === -1) { s.components.push(component); } return getters; }, unregisterMetricsFor: function unregisterMetricsFor(component) { var s = this._DOMMetrics; var idx = s.components.indexOf(component); if (idx > -1) { s.components.splice(idx, 1); var name = void 0; var metricsToDelete = {}; for (name in s.metrics) { if (s.metrics[name].component === component) { metricsToDelete[name] = true; } } for (name in metricsToDelete) { if (metricsToDelete.hasOwnProperty(name)) { delete s.metrics[name]; } } } }, updateMetrics: function updateMetrics() { var s = this._DOMMetrics; var needUpdate = false; for (var name in s.metrics) { if (!s.metrics.hasOwnProperty(name)) continue; var newMetric = s.metrics[name].computator(); if (newMetric !== s.metrics[name].value) { needUpdate = true; } s.metrics[name].value = newMetric; } if (needUpdate) { for (var i = 0, len = s.components.length; i < len; i++) { if (s.components[i].metricsUpdated) { s.components[i].metricsUpdated(); } } } }, componentWillMount: function componentWillMount() { this._DOMMetrics = { metrics: {}, components: [] }; }, componentDidMount: function componentDidMount() { if (window.addEventListener) { window.addEventListener('resize', this.updateMetrics); } else { window.attachEvent('resize', this.updateMetrics); } this.updateMetrics(); }, componentWillUnmount: function componentWillUnmount() { window.removeEventListener('resize', this.updateMetrics); } }; var MetricsMixin = { contextTypes: contextTypes, componentWillMount: function componentWillMount() { if (this.DOMMetrics) { this._DOMMetricsDefs = shallowCloneObject(this.DOMMetrics); this.DOMMetrics = {}; for (var name in this._DOMMetricsDefs) { if (!this._DOMMetricsDefs.hasOwnProperty(name)) continue; this.DOMMetrics[name] = function () {}; } } }, componentDidMount: function componentDidMount() { if (this.DOMMetrics) { this.DOMMetrics = this.registerMetrics(this._DOMMetricsDefs); } }, componentWillUnmount: function componentWillUnmount() { if (!this.registerMetricsImpl) { return this.context.metricsComputator.unregisterMetricsFor(this); } if (this.hasOwnProperty('DOMMetrics')) { delete this.DOMMetrics; } }, registerMetrics: function registerMetrics(metrics) { if (this.registerMetricsImpl) { return this.registerMetricsImpl(this, metrics); } return this.context.metricsComputator.registerMetricsImpl(this, metrics); }, getMetric: function getMetric(name) { if (this.getMetricImpl) { return this.getMetricImpl(name); } return this.context.metricsComputator.getMetricImpl(name); } }; module.exports = { MetricsComputatorMixin: MetricsComputatorMixin, MetricsMixin: MetricsMixin }; /***/ }), /* 24 */, /* 25 */, /* 26 */ /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a <style> tag // load the styles var content = __webpack_require__(199); if(typeof content === 'string') content = [[module.id, content, '']]; // add the styles to the DOM var update = __webpack_require__(10)(content, {}); if(content.locals) module.exports = content.locals; // Hot Module Replacement if(false) { // When the styles change, update the <style> tags if(!content.locals) { module.hot.accept("!!../node_modules/css-loader/index.js!./react-data-grid-core.css", function() { var newContent = require("!!../node_modules/css-loader/index.js!./react-data-grid-core.css"); if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; update(newContent); }); } // When the module is disposed, remove the <style> tags module.hot.dispose(function() { update(); }); } /***/ }), /* 27 */ /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a <style> tag // load the styles var content = __webpack_require__(201); if(typeof content === 'string') content = [[module.id, content, '']]; // add the styles to the DOM var update = __webpack_require__(10)(content, {}); if(content.locals) module.exports = content.locals; // Hot Module Replacement if(false) { // When the styles change, update the <style> tags if(!content.locals) { module.hot.accept("!!../node_modules/css-loader/index.js!./react-data-grid-row.css", function() { var newContent = require("!!../node_modules/css-loader/index.js!./react-data-grid-row.css"); if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; update(newContent); }); } // When the module is disposed, remove the <style> tags module.hot.dispose(function() { update(); }); } /***/ }), /* 28 */, /* 29 */, /* 30 */, /* 31 */, /* 32 */, /* 33 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var _keyMirror = __webpack_require__(203); var _keyMirror2 = _interopRequireDefault(_keyMirror); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var constants = { UpdateActions: (0, _keyMirror2['default'])({ CELL_UPDATE: null, COLUMN_FILL: null, COPY_PASTE: null, CELL_DRAG: null }), DragItemTypes: { Column: 'column' }, CellExpand: { DOWN_TRIANGLE: String.fromCharCode('9660'), RIGHT_TRIANGLE: String.fromCharCode('9654') } }; module.exports = constants; /***/ }), /* 34 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var shallowCloneObject = __webpack_require__(37); var sameColumn = __webpack_require__(165); var ColumnUtils = __webpack_require__(8); var getScrollbarSize = __webpack_require__(36); var isColumnsImmutable = __webpack_require__(69); function setColumnWidths(columns, totalWidth) { return columns.map(function (column) { var colInfo = Object.assign({}, column); if (column.width) { if (/^([0-9]+)%$/.exec(column.width.toString())) { colInfo.width = Math.floor(column.width / 100 * totalWidth); } } return colInfo; }); } function setDefferedColumnWidths(columns, unallocatedWidth, minColumnWidth) { var defferedColumns = columns.filter(function (c) { return !c.width; }); return columns.map(function (column) { if (!column.width) { if (unallocatedWidth <= 0) { column.width = minColumnWidth; } else { column.width = Math.floor(unallocatedWidth / ColumnUtils.getSize(defferedColumns)); } } return column; }); } function setColumnOffsets(columns) { var left = 0; return columns.map(function (column) { column.left = left; left += column.width; return column; }); } /** * Update column metrics calculation. * * @param {ColumnMetricsType} metrics */ function recalculate(metrics) { // compute width for columns which specify width var columns = setColumnWidths(metrics.columns, metrics.totalWidth); var unallocatedWidth = columns.filter(function (c) { return c.width; }).reduce(function (w, column) { return w - column.width; }, metrics.totalWidth); unallocatedWidth -= getScrollbarSize(); var width = columns.filter(function (c) { return c.width; }).reduce(function (w, column) { return w + column.width; }, 0); // compute width for columns which doesn't specify width columns = setDefferedColumnWidths(columns, unallocatedWidth, metrics.minColumnWidth); // compute left offset columns = setColumnOffsets(columns); return { columns: columns, width: width, totalWidth: metrics.totalWidth, minColumnWidth: metrics.minColumnWidth }; } /** * Update column metrics calculation by resizing a column. * * @param {ColumnMetricsType} metrics * @param {Column} column * @param {number} width */ function resizeColumn(metrics, index, width) { var column = ColumnUtils.getColumn(metrics.columns, index); var metricsClone = shallowCloneObject(metrics); metricsClone.columns = metrics.columns.slice(0); var updatedColumn = shallowCloneObject(column); updatedColumn.width = Math.max(width, metricsClone.minColumnWidth); metricsClone = ColumnUtils.spliceColumn(metricsClone, index, updatedColumn); return recalculate(metricsClone); } function areColumnsImmutable(prevColumns, nextColumns) { return isColumnsImmutable(prevColumns) && isColumnsImmutable(nextColumns); } function compareEachColumn(prevColumns, nextColumns, isSameColumn) { var i = void 0; var len = void 0; var column = void 0; var prevColumnsByKey = {}; var nextColumnsByKey = {}; if (ColumnUtils.getSize(prevColumns) !== ColumnUtils.getSize(nextColumns)) { return false; } for (i = 0, len = ColumnUtils.getSize(prevColumns); i < len; i++) { column = prevColumns[i]; prevColumnsByKey[column.key] = column; } for (i = 0, len = ColumnUtils.getSize(nextColumns); i < len; i++) { column = nextColumns[i]; nextColumnsByKey[column.key] = column; var prevColumn = prevColumnsByKey[column.key]; if (prevColumn === undefined || !isSameColumn(prevColumn, column)) { return false; } } for (i = 0, len = ColumnUtils.getSize(prevColumns); i < len; i++) { column = prevColumns[i]; var nextColumn = nextColumnsByKey[column.key]; if (nextColumn === undefined) { return false; } } return true; } function sameColumns(prevColumns, nextColumns, isSameColumn) { if (areColumnsImmutable(prevColumns, nextColumns)) { return prevColumns === nextColumns; } return compareEachColumn(prevColumns, nextColumns, isSameColumn); } module.exports = { recalculate: recalculate, resizeColumn: resizeColumn, sameColumn: sameColumn, sameColumns: sameColumns }; /***/ }), /* 35 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _OverflowCell = __webpack_require__(175); var _OverflowCell2 = _interopRequireDefault(_OverflowCell); var _RowComparer = __webpack_require__(62); var _RowComparer2 = _interopRequireDefault(_RowComparer); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var React = __webpack_require__(2); var joinClasses = __webpack_require__(7); var Cell = __webpack_require__(59); var ColumnUtilsMixin = __webpack_require__(8); var cellMetaDataShape = __webpack_require__(14); var PropTypes = React.PropTypes; var createObjectWithProperties = __webpack_require__(17); __webpack_require__(27); var CellExpander = React.createClass({ displayName: 'CellExpander', render: function render() { return React.createElement(Cell, this.props); } }); // The list of the propTypes that we want to include in the Row div var knownDivPropertyKeys = ['height']; var Row = React.createClass({ displayName: 'Row', propTypes: { height: PropTypes.number.isRequired, columns: PropTypes.oneOfType([PropTypes.object, PropTypes.array]).isRequired, row: PropTypes.any.isRequired, cellRenderer: PropTypes.func, cellMetaData: PropTypes.shape(cellMetaDataShape), isSelected: PropTypes.bool, idx: PropTypes.number.isRequired, expandedRows: PropTypes.arrayOf(PropTypes.object), extraClasses: PropTypes.string, forceUpdate: PropTypes.bool, subRowDetails: PropTypes.object, isRowHovered: PropTypes.bool, colVisibleStart: PropTypes.number.isRequired, colVisibleEnd: PropTypes.number.isRequired, colDisplayStart: PropTypes.number.isRequired, colDisplayEnd: PropTypes.number.isRequired, isScrolling: React.PropTypes.bool.isRequired }, mixins: [ColumnUtilsMixin], getDefaultProps: function getDefaultProps() { return { cellRenderer: Cell, isSelected: false, height: 35 }; }, shouldComponentUpdate: function shouldComponentUpdate(nextProps) { return (0, _RowComparer2['default'])(nextProps, this.props); }, handleDragEnter: function handleDragEnter() { var handleDragEnterRow = this.props.cellMetaData.handleDragEnterRow; if (handleDragEnterRow) { handleDragEnterRow(this.props.idx); } }, getSelectedColumn: function getSelectedColumn() { if (this.props.cellMetaData) { var selected = this.props.cellMetaData.selected; if (selected && selected.idx) { return this.getColumn(this.props.columns, selected.idx); } } }, getCellRenderer: function getCellRenderer(columnKey) { var CellRenderer = this.props.cellRenderer; if (this.props.subRowDetails && this.props.subRowDetails.field === columnKey) { return CellExpander; } return CellRenderer; }, getCell: function getCell(column, i, selectedColumn) { var _this = this; var CellRenderer = this.props.cellRenderer; var _props = this.props, colVisibleStart = _props.colVisibleStart, colVisibleEnd = _props.colVisibleEnd, idx = _props.idx, cellMetaData = _props.cellMetaData; var key = column.key, formatter = column.formatter, locked = column.locked; var baseCellProps = { key: key + '-' + idx, idx: i, rowIdx: idx, height: this.getRowHeight(), column: column, cellMetaData: cellMetaData }; if ((i < colVisibleStart || i > colVisibleEnd) && !locked) { return React.createElement(_OverflowCell2['default'], _extends({ ref: function ref(node) { return _this[key] = node; } }, baseCellProps)); } var _props2 = this.props, row = _props2.row, isSelected = _props2.isSelected; var cellProps = { ref: function ref(node) { return _this[key] = node; }, value: this.getCellValue(key || i), rowData: row, isRowSelected: isSelected, expandableOptions: this.getExpandableOptions(key), selectedColumn: selectedColumn, formatter: formatter, isScrolling: this.props.isScrolling }; return React.createElement(CellRenderer, _extends({}, baseCellProps, cellProps)); }, getCells: function getCells() { var _this2 = this; var cells = []; var lockedCells = []; var selectedColumn = this.getSelectedColumn(); if (this.props.columns) { this.props.columns.forEach(function (column, i) { var cell = _this2.getCell(column, i, selectedColumn); if (column.locked) { lockedCells.push(cell); } else { cells.push(cell); } }); } return cells.concat(lockedCells); }, getRowHeight: function getRowHeight() { var rows = this.props.expandedRows || null; if (rows && this.props.idx) { var row = rows[this.props.idx] || null; if (row) { return row.height; } } return this.props.height; }, getCellValue: function getCellValue(key) { var val = void 0; if (key === 'select-row') { return this.props.isSelected; } else if (typeof this.props.row.get === 'function') { val = this.props.row.get(key); } else { val = this.props.row[key]; } return val; }, isContextMenuDisplayed: function isContextMenuDisplayed() { if (this.props.cellMetaData) { var selected = this.props.cellMetaData.selected; if (selected && selected.contextMenuDisplayed && selected.rowIdx === this.props.idx) { return true; } } return false; }, getExpandableOptions: function getExpandableOptions(columnKey) { var subRowDetails = this.props.subRowDetails; if (subRowDetails) { return { canExpand: subRowDetails && subRowDetails.field === columnKey && (subRowDetails.children && subRowDetails.children.length > 0 || subRowDetails.group === true), field: subRowDetails.field, expanded: subRowDetails && subRowDetails.expanded, children: subRowDetails && subRowDetails.children, treeDepth: subRowDetails ? subRowDetails.treeDepth : 0, subRowDetails: subRowDetails }; } return {}; }, setScrollLeft: function setScrollLeft(scrollLeft) { var _this3 = this; this.props.columns.forEach(function (column) { if (column.locked) { if (!_this3[column.key]) return; _this3[column.key].setScrollLeft(scrollLeft); } }); }, getKnownDivProps: function getKnownDivProps() { return createObjectWithProperties(this.props, knownDivPropertyKeys); }, renderCell: function renderCell(props) { if (typeof this.props.cellRenderer === 'function') { this.props.cellRenderer.call(this, props); } if (React.isValidElement(this.props.cellRenderer)) { return React.cloneElement(this.props.cellRenderer, props); } return this.props.cellRenderer(props); }, render: function render() { var className = joinClasses('react-grid-Row', 'react-grid-Row--' + (this.props.idx % 2 === 0 ? 'even' : 'odd'), { 'row-selected': this.props.isSelected, 'row-context-menu': this.isContextMenuDisplayed() }, this.props.extraClasses); var style = { height: this.getRowHeight(this.props), overflow: 'hidden', contain: 'layout' }; var cells = this.getCells(); return React.createElement( 'div', _extends({}, this.getKnownDivProps(), { className: className, style: style, onDragEnter: this.handleDragEnter }), React.isValidElement(this.props.row) ? this.props.row : cells ); } }); module.exports = Row; /***/ }), /* 36 */ /***/ (function(module, exports) { 'use strict'; var size = void 0; function getScrollbarSize() { if (size === undefined) { var outer = document.createElement('div'); outer.style.width = '50px'; outer.style.height = '50px'; outer.style.position = 'absolute'; outer.style.top = '-200px'; outer.style.left = '-200px'; var inner = document.createElement('div'); inner.style.height = '100px'; inner.style.width = '100%'; outer.appendChild(inner); document.body.appendChild(outer); var outerWidth = outer.clientWidth; outer.style.overflowY = 'scroll'; var innerWidth = inner.clientWidth; document.body.removeChild(outer); size = outerWidth - innerWidth; } return size; } module.exports = getScrollbarSize; /***/ }), /* 37 */ /***/ (function(module, exports) { "use strict"; function shallowCloneObject(obj) { var result = {}; for (var k in obj) { if (obj.hasOwnProperty(k)) { result[k] = obj[k]; } } return result; } module.exports = shallowCloneObject; /***/ }), /* 38 */ /***/ (function(module, exports) { 'use strict'; var isFunction = function isFunction(functionToCheck) { var getType = {}; return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]'; }; module.exports = isFunction; /***/ }), /* 39 */ /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a <style> tag // load the styles var content = __webpack_require__(197); if(typeof content === 'string') content = [[module.id, content, '']]; // add the styles to the DOM var update = __webpack_require__(10)(content, {}); if(content.locals) module.exports = content.locals; // Hot Module Replacement if(false) { // When the styles change, update the <style> tags if(!content.locals) { module.hot.accept("!!../node_modules/css-loader/index.js!./react-data-grid-cell.css", function() { var newContent = require("!!../node_modules/css-loader/index.js!./react-data-grid-cell.css"); if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; update(newContent); }); } // When the module is disposed, remove the <style> tags module.hot.dispose(function() { update(); }); } /***/ }), /* 40 */, /* 41 */, /* 42 */, /* 43 */, /* 44 */, /* 45 */, /* 46 */, /* 47 */, /* 48 */, /* 49 */, /* 50 */, /* 51 */, /* 52 */, /* 53 */, /* 54 */, /* 55 */, /* 56 */, /* 57 */, /* 58 */, /* 59 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _underscore = __webpack_require__(98); var _underscore2 = _interopRequireDefault(_underscore); var _CellExpand = __webpack_require__(163); var _CellExpand2 = _interopRequireDefault(_CellExpand); var _ChildRowDeleteButton = __webpack_require__(164); var _ChildRowDeleteButton2 = _interopRequireDefault(_ChildRowDeleteButton); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var React = __webpack_require__(2); var ReactDOM = __webpack_require__(4); var joinClasses = __webpack_require__(7); var EditorContainer = __webpack_require__(185); var ExcelColumn = __webpack_require__(11); var isFunction = __webpack_require__(38); var CellMetaDataShape = __webpack_require__(14); var SimpleCellFormatter = __webpack_require__(188); var ColumnUtils = __webpack_require__(8); var createObjectWithProperties = __webpack_require__(17); __webpack_require__(39); // The list of the propTypes that we want to include in the Cell div var knownDivPropertyKeys = ['height', 'tabIndex', 'value']; var Cell = React.createClass({ displayName: 'Cell', propTypes: { rowIdx: React.PropTypes.number.isRequired, idx: React.PropTypes.number.isRequired, selected: React.PropTypes.shape({ idx: React.PropTypes.number.isRequired }), selectedColumn: React.PropTypes.object, height: React.PropTypes.number, tabIndex: React.PropTypes.number, column: React.PropTypes.shape(ExcelColumn).isRequired, value: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.number, React.PropTypes.object, React.PropTypes.bool]).isRequired, isExpanded: React.PropTypes.bool, isRowSelected: React.PropTypes.bool, cellMetaData: React.PropTypes.shape(CellMetaDataShape).isRequired, handleDragStart: React.PropTypes.func, className: React.PropTypes.string, cellControls: React.PropTypes.any, rowData: React.PropTypes.object.isRequired, forceUpdate: React.PropTypes.bool, expandableOptions: React.PropTypes.object.isRequired, isScrolling: React.PropTypes.bool.isRequired, tooltip: React.PropTypes.string, isCellValueChanging: React.PropTypes.func }, getDefaultProps: function getDefaultProps() { return { tabIndex: -1, isExpanded: false, value: '', isCellValueChanging: function isCellValueChanging(value, nextValue) { return value !== nextValue; } }; }, getInitialState: function getInitialState() { return { isCellValueChanging: false }; }, componentDidMount: function componentDidMount() { this.checkFocus(); }, componentWillReceiveProps: function componentWillReceiveProps(nextProps) { this.setState({ isCellValueChanging: this.props.isCellValueChanging(this.props.value, nextProps.value) }); }, componentDidUpdate: function componentDidUpdate() { this.checkFocus(); var dragged = this.props.cellMetaData.dragged; if (dragged && dragged.complete === true) { this.props.cellMetaData.handleTerminateDrag(); } if (this.state.isCellValueChanging && this.props.selectedColumn != null) { this.applyUpdateClass(); } }, shouldComponentUpdate: function shouldComponentUpdate(nextProps) { var shouldUpdate = this.props.column.width !== nextProps.column.width || this.props.column.left !== nextProps.column.left || this.props.column.cellClass !== nextProps.column.cellClass || this.props.height !== nextProps.height || this.props.rowIdx !== nextProps.rowIdx || this.isCellSelectionChanging(nextProps) || this.isDraggedCellChanging(nextProps) || this.isCopyCellChanging(nextProps) || this.props.isRowSelected !== nextProps.isRowSelected || this.isSelected() || this.props.isCellValueChanging(this.props.value, nextProps.value) || this.props.forceUpdate === true || this.props.className !== nextProps.className || this.props.expandableOptions !== nextProps.expandableOptions || this.hasChangedDependentValues(nextProps); return shouldUpdate; }, onCellClick: function onCellClick(e) { var meta = this.props.cellMetaData; if (meta != null && meta.onCellClick && typeof meta.onCellClick === 'function') { meta.onCellClick({ rowIdx: this.props.rowIdx, idx: this.props.idx }, e); } }, onCellContextMenu: function onCellContextMenu() { var meta = this.props.cellMetaData; if (meta != null && meta.onCellContextMenu && typeof meta.onCellContextMenu === 'function') { meta.onCellContextMenu({ rowIdx: this.props.rowIdx, idx: this.props.idx }); } }, onCellDoubleClick: function onCellDoubleClick(e) { var meta = this.props.cellMetaData; if (meta != null && meta.onCellDoubleClick && typeof meta.onCellDoubleClick === 'function') { meta.onCellDoubleClick({ rowIdx: this.props.rowIdx, idx: this.props.idx }, e); } }, onCellExpand: function onCellExpand(e) { e.stopPropagation(); var meta = this.props.cellMetaData; if (meta != null && meta.onCellExpand != null) { meta.onCellExpand({ rowIdx: this.props.rowIdx, idx: this.props.idx, rowData: this.props.rowData, expandArgs: this.props.expandableOptions }); } }, onCellKeyDown: function onCellKeyDown(e) { if (this.canExpand() && e.key === 'Enter') { this.onCellExpand(e); } }, onDeleteSubRow: function onDeleteSubRow() { var meta = this.props.cellMetaData; if (meta != null && meta.onDeleteSubRow != null) { meta.onDeleteSubRow({ rowIdx: this.props.rowIdx, idx: this.props.idx, rowData: this.props.rowData, expandArgs: this.props.expandableOptions }); } }, onDragHandleDoubleClick: function onDragHandleDoubleClick(e) { e.stopPropagation(); var meta = this.props.cellMetaData; if (meta != null && meta.onDragHandleDoubleClick && typeof meta.onDragHandleDoubleClick === 'function') { meta.onDragHandleDoubleClick({ rowIdx: this.props.rowIdx, idx: this.props.idx, rowData: this.getRowData(), e: e }); } }, onDragOver: function onDragOver(e) { e.preventDefault(); }, getStyle: function getStyle() { var style = { position: 'absolute', width: this.props.column.width, height: this.props.height, left: this.props.column.left, contain: 'layout' }; return style; }, getFormatter: function getFormatter() { var col = this.props.column; if (this.isActive()) { return React.createElement(EditorContainer, { rowData: this.getRowData(), rowIdx: this.props.rowIdx, value: this.props.value, idx: this.props.idx, cellMetaData: this.props.cellMetaData, column: col, height: this.props.height }); } return this.props.column.formatter; }, getRowData: function getRowData() { var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props; return props.rowData.toJSON ? props.rowData.toJSON() : props.rowData; }, getFormatterDependencies: function getFormatterDependencies() { // convention based method to get corresponding Id or Name of any Name or Id property if (typeof this.props.column.getRowMetaData === 'function') { return this.props.column.getRowMetaData(this.getRowData(), this.props.column); } }, getCellClass: function getCellClass() { var className = joinClasses(this.props.column.cellClass, 'react-grid-Cell', this.props.className, this.props.column.locked ? 'react-grid-Cell--locked' : null); var extraClasses = joinClasses({ 'row-selected': this.props.isRowSelected, editing: this.isActive(), copied: this.isCopied() || this.wasDraggedOver() || this.isDraggedOverUpwards() || this.isDraggedOverDownwards(), 'is-dragged-over-up': this.isDraggedOverUpwards(), 'is-dragged-over-down': this.isDraggedOverDownwards(), 'was-dragged-over': this.wasDraggedOver(), 'cell-tooltip': this.props.tooltip ? true : false, 'rdg-child-cell': this.props.expandableOptions && this.props.expandableOptions.subRowDetails && this.props.expandableOptions.treeDepth > 0 }); return joinClasses(className, extraClasses); }, getUpdateCellClass: function getUpdateCellClass() { return this.props.column.getUpdateCellClass ? this.props.column.getUpdateCellClass(this.props.selectedColumn, this.props.column, this.state.isCellValueChanging) : ''; }, isColumnSelected: function isColumnSelected() { var meta = this.props.cellMetaData; if (meta == null) { return false; } return meta.selected && meta.selected.idx === this.props.idx; }, isSelected: function isSelected() { var meta = this.props.cellMetaData; if (meta == null) { return false; } return meta.selected && meta.selected.rowIdx === this.props.rowIdx && meta.selected.idx === this.props.idx; }, isActive: function isActive() { var meta = this.props.cellMetaData; if (meta == null) { return false; } return this.isSelected() && meta.selected.active === true; }, isCellSelectionChanging: function isCellSelectionChanging(nextProps) { var meta = this.props.cellMetaData; if (meta == null) { return false; } var nextSelected = nextProps.cellMetaData.selected; if (meta.selected && nextSelected) { return this.props.idx === nextSelected.idx || this.props.idx === meta.selected.idx; } return true; }, isCellSelectEnabled: function isCellSelectEnabled() { var meta = this.props.cellMetaData; if (meta == null) { return false; } return meta.enableCellSelect; }, hasChangedDependentValues: function hasChangedDependentValues(nextProps) { var currentColumn = this.props.column; var hasChangedDependentValues = false; if (currentColumn.getRowMetaData) { var currentRowMetaData = currentColumn.getRowMetaData(this.getRowData(), currentColumn); var nextColumn = nextProps.column; var nextRowMetaData = nextColumn.getRowMetaData(this.getRowData(nextProps), nextColumn); hasChangedDependentValues = !_underscore2['default'].isEqual(currentRowMetaData, nextRowMetaData); } return hasChangedDependentValues; }, applyUpdateClass: function applyUpdateClass() { var updateCellClass = this.getUpdateCellClass(); // -> removing the class if (updateCellClass != null && updateCellClass !== '') { var cellDOMNode = ReactDOM.findDOMNode(this); if (cellDOMNode.classList) { cellDOMNode.classList.remove(updateCellClass); // -> and re-adding the class cellDOMNode.classList.add(updateCellClass); } else if (cellDOMNode.className.indexOf(updateCellClass) === -1) { // IE9 doesn't support classList, nor (I think) altering element.className // without replacing it wholesale. cellDOMNode.className = cellDOMNode.className + ' ' + updateCellClass; } } }, setScrollLeft: function setScrollLeft(scrollLeft) { var ctrl = this; // flow on windows has an outdated react declaration, once that gets updated, we can remove this if (ctrl.isMounted()) { var node = ReactDOM.findDOMNode(this); if (node) { var transform = 'translate3d(' + scrollLeft + 'px, 0px, 0px)'; node.style.webkitTransform = transform; node.style.transform = transform; } } }, isCopied: function isCopied() { var copied = this.props.cellMetaData.copied; return copied && copied.rowIdx === this.props.rowIdx && copied.idx === this.props.idx; }, isDraggedOver: function isDraggedOver() { var dragged = this.props.cellMetaData.dragged; return dragged && dragged.overRowIdx === this.props.rowIdx && dragged.idx === this.props.idx; }, wasDraggedOver: function wasDraggedOver() { var dragged = this.props.cellMetaData.dragged; return dragged && (dragged.overRowIdx < this.props.rowIdx && this.props.rowIdx < dragged.rowIdx || dragged.overRowIdx > this.props.rowIdx && this.props.rowIdx > dragged.rowIdx) && dragged.idx === this.props.idx; }, isDraggedCellChanging: function isDraggedCellChanging(nextProps) { var isChanging = void 0; var dragged = this.props.cellMetaData.dragged; var nextDragged = nextProps.cellMetaData.dragged; if (dragged) { isChanging = nextDragged && this.props.idx === nextDragged.idx || dragged && this.props.idx === dragged.idx; return isChanging; } return false; }, isCopyCellChanging: function isCopyCellChanging(nextProps) { var isChanging = void 0; var copied = this.props.cellMetaData.copied; var nextCopied = nextProps.cellMetaData.copied; if (copied) { isChanging = nextCopied && this.props.idx === nextCopied.idx || copied && this.props.idx === copied.idx; return isChanging; } return false; }, isDraggedOverUpwards: function isDraggedOverUpwards() { var dragged = this.props.cellMetaData.dragged; return !this.isSelected() && this.isDraggedOver() && this.props.rowIdx < dragged.rowIdx; }, isDraggedOverDownwards: function isDraggedOverDownwards() { var dragged = this.props.cellMetaData.dragged; return !this.isSelected() && this.isDraggedOver() && this.props.rowIdx > dragged.rowIdx; }, isFocusedOnBody: function isFocusedOnBody() { return document.activeElement == null || document.activeElement.nodeName && typeof document.activeElement.nodeName === 'string' && document.activeElement.nodeName.toLowerCase() === 'body'; }, isFocusedOnCell: function isFocusedOnCell() { return document.activeElement && document.activeElement.className === 'react-grid-Cell'; }, checkFocus: function checkFocus() { if (this.isSelected() && !this.isActive()) { if (this.props.isScrolling && !this.props.cellMetaData.isScrollingVerticallyWithKeyboard && !this.props.cellMetaData.isScrollingHorizontallyWithKeyboard) { return; } // Only focus to the current cell if the currently active node in the document is within the data grid. // Meaning focus should not be stolen from elements that the grid doesnt control. var dataGridDOMNode = this.props.cellMetaData && this.props.cellMetaData.getDataGridDOMNode ? this.props.cellMetaData.getDataGridDOMNode() : null; if (this.isFocusedOnCell() || this.isFocusedOnBody() || dataGridDOMNode && dataGridDOMNode.contains(document.activeElement)) { var cellDOMNode = ReactDOM.findDOMNode(this); if (cellDOMNode) { cellDOMNode.focus(); } } } }, canEdit: function canEdit() { return this.props.column.editor != null || this.props.column.editable; }, canExpand: function canExpand() { return this.props.expandableOptions && this.props.expandableOptions.canExpand; }, createColumEventCallBack: function createColumEventCallBack(onColumnEvent, info) { return function (e) { onColumnEvent(e, info); }; }, createCellEventCallBack: function createCellEventCallBack(gridEvent, columnEvent) { return function (e) { gridEvent(e); columnEvent(e); }; }, createEventDTO: function createEventDTO(gridEvents, columnEvents, onColumnEvent) { var allEvents = Object.assign({}, gridEvents); for (var eventKey in columnEvents) { if (columnEvents.hasOwnProperty(eventKey)) { var event = columnEvents[event]; var eventInfo = { rowIdx: this.props.rowIdx, idx: this.props.idx, name: eventKey }; var eventCallback = this.createColumEventCallBack(onColumnEvent, eventInfo); if (allEvents.hasOwnProperty(eventKey)) { var currentEvent = allEvents[eventKey]; allEvents[eventKey] = this.createCellEventCallBack(currentEvent, eventCallback); } else { allEvents[eventKey] = eventCallback; } } } return allEvents; }, getEvents: function getEvents() { var columnEvents = this.props.column ? Object.assign({}, this.props.column.events) : undefined; var onColumnEvent = this.props.cellMetaData ? this.props.cellMetaData.onColumnEvent : undefined; var gridEvents = { onClick: this.onCellClick, onDoubleClick: this.onCellDoubleClick, onContextMenu: this.onCellContextMenu, onDragOver: this.onDragOver }; if (!columnEvents || !onColumnEvent) { return gridEvents; } return this.createEventDTO(gridEvents, columnEvents, onColumnEvent); }, getKnownDivProps: function getKnownDivProps() { return createObjectWithProperties(this.props, knownDivPropertyKeys); }, renderCellContent: function renderCellContent(props) { var CellContent = void 0; var Formatter = this.getFormatter(); if (React.isValidElement(Formatter)) { props.dependentValues = this.getFormatterDependencies(); CellContent = React.cloneElement(Formatter, props); } else if (isFunction(Formatter)) { CellContent = React.createElement(Formatter, { value: this.props.value, dependentValues: this.getFormatterDependencies() }); } else { CellContent = React.createElement(SimpleCellFormatter, { value: this.props.value }); } var isExpandCell = this.props.expandableOptions ? this.props.expandableOptions.field === this.props.column.key : false; var treeDepth = this.props.expandableOptions ? this.props.expandableOptions.treeDepth : 0; var marginLeft = this.props.expandableOptions && isExpandCell ? this.props.expandableOptions.treeDepth * 30 : 0; var cellExpander = void 0; var cellDeleter = void 0; if (this.canExpand()) { cellExpander = React.createElement(_CellExpand2['default'], { expandableOptions: this.props.expandableOptions, onCellExpand: this.onCellExpand }); } var isDeleteSubRowEnabled = this.props.cellMetaData.onDeleteSubRow ? true : false; if (isDeleteSubRowEnabled && treeDepth > 0 && isExpandCell) { cellDeleter = React.createElement(_ChildRowDeleteButton2['default'], { treeDepth: treeDepth, cellHeight: this.props.height, siblingIndex: this.props.expandableOptions.subRowDetails.siblingIndex, numberSiblings: this.props.expandableOptions.subRowDetails.numberSiblings, onDeleteSubRow: this.onDeleteSubRow }); } return React.createElement( 'div', { className: 'react-grid-Cell__value' }, cellDeleter, React.createElement( 'div', { style: { marginLeft: marginLeft } }, React.createElement( 'span', null, CellContent ), ' ', this.props.cellControls, ' ', cellExpander ) ); }, render: function render() { if (this.props.column.hidden) { return null; } var style = this.getStyle(); var className = this.getCellClass(); var cellContent = this.renderCellContent({ value: this.props.value, column: this.props.column, rowIdx: this.props.rowIdx, isExpanded: this.props.isExpanded }); var dragHandle = !this.isActive() && ColumnUtils.canEdit(this.props.column, this.props.rowData, this.props.cellMetaData.enableCellSelect) ? React.createElement( 'div', { className: 'drag-handle', draggable: 'true', onDoubleClick: this.onDragHandleDoubleClick }, React.createElement('span', { style: { display: 'none' } }) ) : null; var events = this.getEvents(); var tooltip = this.props.tooltip ? React.createElement( 'span', { className: 'cell-tooltip-text' }, this.props.tooltip ) : null; return React.createElement( 'div', _extends({}, this.getKnownDivProps(), { className: className, style: style }, events), cellContent, dragHandle, tooltip ); } }); module.exports = Cell; /***/ }), /* 60 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var React = __webpack_require__(2); var ReactDOM = __webpack_require__(4); var joinClasses = __webpack_require__(7); var ExcelColumn = __webpack_require__(11); var ResizeHandle = __webpack_require__(178); __webpack_require__(19); var PropTypes = React.PropTypes; function simpleCellRenderer(objArgs) { var headerText = objArgs.column.rowType === 'header' ? objArgs.column.name : ''; return React.createElement( 'div', { className: 'widget-HeaderCell__value' }, headerText ); } var HeaderCell = React.createClass({ displayName: 'HeaderCell', propTypes: { renderer: PropTypes.oneOfType([PropTypes.func, PropTypes.element]).isRequired, column: PropTypes.shape(ExcelColumn).isRequired, onResize: PropTypes.func.isRequired, height: PropTypes.number.isRequired, onResizeEnd: PropTypes.func.isRequired, className: PropTypes.string }, getDefaultProps: function getDefaultProps() { return { renderer: simpleCellRenderer }; }, getInitialState: function getInitialState() { return { resizing: false }; }, onDragStart: function onDragStart(e) { this.setState({ resizing: true }); // need to set dummy data for FF if (e && e.dataTransfer && e.dataTransfer.setData) e.dataTransfer.setData('text/plain', 'dummy'); }, onDrag: function onDrag(e) { var resize = this.props.onResize || null; // for flows sake, doesnt recognise a null check direct if (resize) { var _width = this.getWidthFromMouseEvent(e); if (_width > 0) { resize(this.props.column, _width); } } }, onDragEnd: function onDragEnd(e) { var width = this.getWidthFromMouseEvent(e); this.props.onResizeEnd(this.props.column, width); this.setState({ resizing: false }); }, getWidthFromMouseEvent: function getWidthFromMouseEvent(e) { var right = e.pageX || e.touches && e.touches[0] && e.touches[0].pageX || e.changedTouches && e.changedTouches[e.changedTouches.length - 1].pageX; var left = ReactDOM.findDOMNode(this).getBoundingClientRect().left; return right - left; }, getCell: function getCell() { if (React.isValidElement(this.props.renderer)) { // if it is a string, it's an HTML element, and column is not a valid property, so only pass height if (typeof this.props.renderer.type === 'string') { return React.cloneElement(this.props.renderer, { height: this.props.height }); } return React.cloneElement(this.props.renderer, { column: this.props.column, height: this.props.height }); } return this.props.renderer({ column: this.props.column }); }, getStyle: function getStyle() { return { width: this.props.column.width, left: this.props.column.left, display: 'inline-block', position: 'absolute', height: this.props.height, margin: 0, textOverflow: 'ellipsis', whiteSpace: 'nowrap' }; }, setScrollLeft: function setScrollLeft(scrollLeft) { var node = ReactDOM.findDOMNode(this); node.style.webkitTransform = 'translate3d(' + scrollLeft + 'px, 0px, 0px)'; node.style.transform = 'translate3d(' + scrollLeft + 'px, 0px, 0px)'; }, removeScroll: function removeScroll() { var node = ReactDOM.findDOMNode(this); if (node) { var transform = 'none'; node.style.webkitTransform = transform; node.style.transform = transform; } }, render: function render() { var resizeHandle = void 0; if (this.props.column.resizable) { resizeHandle = React.createElement(ResizeHandle, { onDrag: this.onDrag, onDragStart: this.onDragStart, onDragEnd: this.onDragEnd }); } var className = joinClasses({ 'react-grid-HeaderCell': true, 'react-grid-HeaderCell--resizing': this.state.resizing, 'react-grid-HeaderCell--locked': this.props.column.locked }); className = joinClasses(className, this.props.className, this.props.column.cellClass); var cell = this.getCell(); return React.createElement( 'div', { className: className, style: this.getStyle() }, cell, resizeHandle ); } }); module.exports = HeaderCell; /***/ }), /* 61 */ /***/ (function(module, exports) { 'use strict'; var KeyboardHandlerMixin = { onKeyDown: function onKeyDown(e) { if (this.isCtrlKeyHeldDown(e)) { this.checkAndCall('onPressKeyWithCtrl', e); } else if (this.isKeyExplicitlyHandled(e.key)) { // break up individual keyPress events to have their own specific callbacks // this allows multiple mixins to listen to onKeyDown events and somewhat reduces methodName clashing var callBack = 'onPress' + e.key; this.checkAndCall(callBack, e); } else if (this.isKeyPrintable(e.keyCode)) { this.checkAndCall('onPressChar', e); } // Track which keys are currently down for shift clicking etc this._keysDown = this._keysDown || {}; this._keysDown[e.keyCode] = true; if (this.props.onGridKeyDown && typeof this.props.onGridKeyDown === 'function') { this.props.onGridKeyDown(e); } }, onKeyUp: function onKeyUp(e) { // Track which keys are currently down for shift clicking etc this._keysDown = this._keysDown || {}; delete this._keysDown[e.keyCode]; if (this.props.onGridKeyUp && typeof this.props.onGridKeyUp === 'function') { this.props.onGridKeyUp(e); } }, isKeyDown: function isKeyDown(keyCode) { if (!this._keysDown) return false; return keyCode in this._keysDown; }, isSingleKeyDown: function isSingleKeyDown(keyCode) { if (!this._keysDown) return false; return keyCode in this._keysDown && Object.keys(this._keysDown).length === 1; }, // taken from http://stackoverflow.com/questions/12467240/determine-if-javascript-e-keycode-is-a-printable-non-control-character isKeyPrintable: function isKeyPrintable(keycode) { var valid = keycode > 47 && keycode < 58 || // number keys keycode === 32 || keycode === 13 || // spacebar & return key(s) (if you want to allow carriage returns) keycode > 64 && keycode < 91 || // letter keys keycode > 95 && keycode < 112 || // numpad keys keycode > 185 && keycode < 193 || // ;=,-./` (in order) keycode > 218 && keycode < 223; // [\]' (in order) return valid; }, isKeyExplicitlyHandled: function isKeyExplicitlyHandled(key) { return typeof this['onPress' + key] === 'function'; }, isCtrlKeyHeldDown: function isCtrlKeyHeldDown(e) { return e.ctrlKey === true && e.key !== 'Control'; }, checkAndCall: function checkAndCall(methodName, args) { if (typeof this[methodName] === 'function') { this[methodName](args); } } }; module.exports = KeyboardHandlerMixin; /***/ }), /* 62 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports.shouldRowUpdate = undefined; var _ColumnMetrics = __webpack_require__(34); var _ColumnMetrics2 = _interopRequireDefault(_ColumnMetrics); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function doesRowContainSelectedCell(props) { var selected = props.cellMetaData.selected; if (selected && selected.rowIdx === props.idx) { return true; } return false; } function willRowBeDraggedOver(props) { var dragged = props.cellMetaData.dragged; return dragged != null && (dragged.rowIdx >= 0 || dragged.complete === true); } function hasRowBeenCopied(props) { var copied = props.cellMetaData.copied; return copied != null && copied.rowIdx === props.idx; } var shouldRowUpdate = exports.shouldRowUpdate = function shouldRowUpdate(nextProps, currentProps) { return !_ColumnMetrics2['default'].sameColumns(currentProps.columns, nextProps.columns, _ColumnMetrics2['default'].sameColumn) || doesRowContainSelectedCell(currentProps) || doesRowContainSelectedCell(nextProps) || willRowBeDraggedOver(nextProps) || nextProps.row !== currentProps.row || currentProps.colDisplayStart !== nextProps.colDisplayStart || currentProps.colDisplayEnd !== nextProps.colDisplayEnd || currentProps.colVisibleStart !== nextProps.colVisibleStart || currentProps.colVisibleEnd !== nextProps.colVisibleEnd || hasRowBeenCopied(currentProps) || currentProps.isSelected !== nextProps.isSelected || nextProps.height !== currentProps.height || currentProps.isOver !== nextProps.isOver || currentProps.expandedRows !== nextProps.expandedRows || currentProps.canDrop !== nextProps.canDrop || currentProps.forceUpdate === true; }; exports['default'] = shouldRowUpdate; /***/ }), /* 63 */ /***/ (function(module, exports) { 'use strict'; var RowUtils = { get: function get(row, property) { if (typeof row.get === 'function') { return row.get(property); } return row[property]; }, isRowSelected: function isRowSelected(keys, indexes, isSelectedKey, rowData, rowIdx) { if (indexes && Object.prototype.toString.call(indexes) === '[object Array]') { return indexes.indexOf(rowIdx) > -1; } else if (keys && keys.rowKey && keys.values && Object.prototype.toString.call(keys.values) === '[object Array]') { return keys.values.indexOf(rowData[keys.rowKey]) > -1; } else if (isSelectedKey && rowData && typeof isSelectedKey === 'string') { return rowData[isSelectedKey]; } return false; } }; module.exports = RowUtils; /***/ }), /* 64 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports.SimpleRowsContainer = undefined; var _react = __webpack_require__(2); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var SimpleRowsContainer = function SimpleRowsContainer(props) { return _react2['default'].createElement( 'div', { key: 'rows-container' }, props.rows ); }; SimpleRowsContainer.propTypes = { width: _react.PropTypes.number, rows: _react.PropTypes.array }; var RowsContainer = function (_React$Component) { _inherits(RowsContainer, _React$Component); function RowsContainer(props) { _classCallCheck(this, RowsContainer); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.plugins = props.window ? props.window.ReactDataGridPlugins : window.ReactDataGridPlugins; _this.hasContextMenu = _this.hasContextMenu.bind(_this); _this.renderRowsWithContextMenu = _this.renderRowsWithContextMenu.bind(_this); _this.getContextMenuContainer = _this.getContextMenuContainer.bind(_this); _this.state = { ContextMenuContainer: _this.getContextMenuContainer(props) }; return _this; } RowsContainer.prototype.getContextMenuContainer = function getContextMenuContainer() { if (this.hasContextMenu()) { if (!this.plugins) { throw new Error('You need to include ReactDataGrid UiPlugins in order to initialise context menu'); } return this.plugins.Menu.ContextMenuLayer('reactDataGridContextMenu')(SimpleRowsContainer); } }; RowsContainer.prototype.hasContextMenu = function hasContextMenu() { return this.props.contextMenu && _react2['default'].isValidElement(this.props.contextMenu); }; RowsContainer.prototype.renderRowsWithContextMenu = function renderRowsWithContextMenu() { var ContextMenuRowsContainer = this.state.ContextMenuContainer; var newProps = { rowIdx: this.props.rowIdx, idx: this.props.idx }; var contextMenu = _react2['default'].cloneElement(this.props.contextMenu, newProps); // Initialise the context menu if it is available return _react2['default'].createElement( 'div', null, _react2['default'].createElement(ContextMenuRowsContainer, this.props), contextMenu ); }; RowsContainer.prototype.render = function render() { return this.hasContextMenu() ? this.renderRowsWithContextMenu() : _react2['default'].createElement(SimpleRowsContainer, this.props); }; return RowsContainer; }(_react2['default'].Component); RowsContainer.propTypes = { contextMenu: _react.PropTypes.element, rowIdx: _react.PropTypes.number, idx: _react.PropTypes.number, window: _react.PropTypes.object }; exports['default'] = RowsContainer; exports.SimpleRowsContainer = SimpleRowsContainer; /***/ }), /* 65 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var React = __webpack_require__(2); __webpack_require__(72); var CheckboxEditor = React.createClass({ displayName: 'CheckboxEditor', propTypes: { value: React.PropTypes.bool, rowIdx: React.PropTypes.number, column: React.PropTypes.shape({ key: React.PropTypes.string, onCellChange: React.PropTypes.func }), dependentValues: React.PropTypes.object }, handleChange: function handleChange(e) { this.props.column.onCellChange(this.props.rowIdx, this.props.column.key, this.props.dependentValues, e); }, render: function render() { var checked = this.props.value != null ? this.props.value : false; var checkboxName = 'checkbox' + this.props.rowIdx; return React.createElement( 'div', { className: 'react-grid-checkbox-container checkbox-align', onClick: this.handleChange }, React.createElement('input', { className: 'react-grid-checkbox', type: 'checkbox', name: checkboxName, checked: checked }), React.createElement('label', { htmlFor: checkboxName, className: 'react-grid-checkbox-label' }) ); } }); module.exports = CheckboxEditor; /***/ }), /* 66 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var React = __webpack_require__(2); var ReactDOM = __webpack_require__(4); var ExcelColumn = __webpack_require__(11); var EditorBase = function (_React$Component) { _inherits(EditorBase, _React$Component); function EditorBase() { _classCallCheck(this, EditorBase); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); } EditorBase.prototype.getStyle = function getStyle() { return { width: '100%' }; }; EditorBase.prototype.getValue = function getValue() { var updated = {}; updated[this.props.column.key] = this.getInputNode().value; return updated; }; EditorBase.prototype.getInputNode = function getInputNode() { var domNode = ReactDOM.findDOMNode(this); if (domNode.tagName === 'INPUT') { return domNode; } return domNode.querySelector('input:not([type=hidden])'); }; EditorBase.prototype.inheritContainerStyles = function inheritContainerStyles() { return true; }; return EditorBase; }(React.Component); EditorBase.propTypes = { onKeyDown: React.PropTypes.func.isRequired, value: React.PropTypes.any.isRequired, onBlur: React.PropTypes.func.isRequired, column: React.PropTypes.shape(ExcelColumn).isRequired, commit: React.PropTypes.func.isRequired }; module.exports = EditorBase; /***/ }), /* 67 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var React = __webpack_require__(2); var EditorBase = __webpack_require__(66); var SimpleTextEditor = function (_EditorBase) { _inherits(SimpleTextEditor, _EditorBase); function SimpleTextEditor() { _classCallCheck(this, SimpleTextEditor); return _possibleConstructorReturn(this, _EditorBase.apply(this, arguments)); } SimpleTextEditor.prototype.render = function render() { var _this2 = this; return React.createElement('input', { ref: function ref(node) { return _this2.input = node; }, type: 'text', onBlur: this.props.onBlur, className: 'form-control', defaultValue: this.props.value }); }; return SimpleTextEditor; }(EditorBase); module.exports = SimpleTextEditor; /***/ }), /* 68 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _immutable = __webpack_require__(18); module.exports = { isEmptyArray: __webpack_require__(192), isEmptyObject: __webpack_require__(193), isFunction: __webpack_require__(38), isImmutableCollection: __webpack_require__(194), getMixedTypeValueRetriever: __webpack_require__(196), isColumnsImmutable: __webpack_require__(69), isImmutableMap: __webpack_require__(195), last: function last(arrayOrList) { if (arrayOrList == null) { throw new Error('arrayOrCollection is null'); } if (_immutable.List.isList(arrayOrList)) { return arrayOrList.last(); } if (Array.isArray(arrayOrList)) { return arrayOrList[arrayOrList.length - 1]; } throw new Error('Cant get last of: ' + (typeof arrayOrList === 'undefined' ? 'undefined' : _typeof(arrayOrList))); } }; /***/ }), /* 69 */ /***/ (function(module, exports) { 'use strict'; module.exports = function isColumnsImmutable(columns) { return typeof Immutable !== 'undefined' && columns instanceof Immutable.List; }; /***/ }), /* 70 */ /***/ (function(module, exports) { /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule shallowEqual * @typechecks * */ 'use strict'; var hasOwnProperty = Object.prototype.hasOwnProperty; /** * Performs equality by iterating through keys on an object and returning false * when any key has values which are not strictly equal between the arguments. * Returns true when the values of all keys are strictly equal. */ function shallowEqual(objA, objB) { if (objA === objB) { return true; } if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { return false; } var keysA = Object.keys(objA); var keysB = Object.keys(objB); if (keysA.length !== keysB.length) { return false; } // Test for A's keys different from B. var bHasOwnProperty = hasOwnProperty.bind(objB); for (var i = 0; i < keysA.length; i++) { if (!bHasOwnProperty(keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) { return false; } } return true; } module.exports = shallowEqual; /***/ }), /* 71 */ /***/ (function(module, exports) { 'use strict'; function ToObject(val) { if (val == null) { throw new TypeError('Object.assign cannot be called with null or undefined'); } return Object(val); } module.exports = Object.assign || function (target, source) { var from; var keys; var to = ToObject(target); for (var s = 1; s < arguments.length; s++) { from = arguments[s]; keys = Object.keys(Object(from)); for (var i = 0; i < keys.length; i++) { to[keys[i]] = from[keys[i]]; } } return to; }; /***/ }), /* 72 */ /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a <style> tag // load the styles var content = __webpack_require__(198); if(typeof content === 'string') content = [[module.id, content, '']]; // add the styles to the DOM var update = __webpack_require__(10)(content, {}); if(content.locals) module.exports = content.locals; // Hot Module Replacement if(false) { // When the styles change, update the <style> tags if(!content.locals) { module.hot.accept("!!../node_modules/css-loader/index.js!./react-data-grid-checkbox.css", function() { var newContent = require("!!../node_modules/css-loader/index.js!./react-data-grid-checkbox.css"); if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; update(newContent); }); } // When the module is disposed, remove the <style> tags module.hot.dispose(function() { update(); }); } /***/ }), /* 73 */, /* 74 */, /* 75 */, /* 76 */, /* 77 */, /* 78 */, /* 79 */, /* 80 */, /* 81 */, /* 82 */, /* 83 */, /* 84 */, /* 85 */, /* 86 */, /* 87 */, /* 88 */, /* 89 */, /* 90 */, /* 91 */, /* 92 */, /* 93 */, /* 94 */, /* 95 */, /* 96 */, /* 97 */, /* 98 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Underscore.js 1.8.3 // http://underscorejs.org // (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors // Underscore may be freely distributed under the MIT license. (function() { // Baseline setup // -------------- // Establish the root object, `window` in the browser, or `exports` on the server. var root = this; // Save the previous value of the `_` variable. var previousUnderscore = root._; // Save bytes in the minified (but not gzipped) version: var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; // Create quick reference variables for speed access to core prototypes. var push = ArrayProto.push, slice = ArrayProto.slice, toString = ObjProto.toString, hasOwnProperty = ObjProto.hasOwnProperty; // All **ECMAScript 5** native function implementations that we hope to use // are declared here. var nativeIsArray = Array.isArray, nativeKeys = Object.keys, nativeBind = FuncProto.bind, nativeCreate = Object.create; // Naked function reference for surrogate-prototype-swapping. var Ctor = function(){}; // Create a safe reference to the Underscore object for use below. var _ = function(obj) { if (obj instanceof _) return obj; if (!(this instanceof _)) return new _(obj); this._wrapped = obj; }; // Export the Underscore object for **Node.js**, with // backwards-compatibility for the old `require()` API. If we're in // the browser, add `_` as a global object. if (true) { if (typeof module !== 'undefined' && module.exports) { exports = module.exports = _; } exports._ = _; } else { root._ = _; } // Current version. _.VERSION = '1.8.3'; // Internal function that returns an efficient (for current engines) version // of the passed-in callback, to be repeatedly applied in other Underscore // functions. var optimizeCb = function(func, context, argCount) { if (context === void 0) return func; switch (argCount == null ? 3 : argCount) { case 1: return function(value) { return func.call(context, value); }; case 2: return function(value, other) { return func.call(context, value, other); }; case 3: return function(value, index, collection) { return func.call(context, value, index, collection); }; case 4: return function(accumulator, value, index, collection) { return func.call(context, accumulator, value, index, collection); }; } return function() { return func.apply(context, arguments); }; }; // A mostly-internal function to generate callbacks that can be applied // to each element in a collection, returning the desired result — either // identity, an arbitrary callback, a property matcher, or a property accessor. var cb = function(value, context, argCount) { if (value == null) return _.identity; if (_.isFunction(value)) return optimizeCb(value, context, argCount); if (_.isObject(value)) return _.matcher(value); return _.property(value); }; _.iteratee = function(value, context) { return cb(value, context, Infinity); }; // An internal function for creating assigner functions. var createAssigner = function(keysFunc, undefinedOnly) { return function(obj) { var length = arguments.length; if (length < 2 || obj == null) return obj; for (var index = 1; index < length; index++) { var source = arguments[index], keys = keysFunc(source), l = keys.length; for (var i = 0; i < l; i++) { var key = keys[i]; if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key]; } } return obj; }; }; // An internal function for creating a new object that inherits from another. var baseCreate = function(prototype) { if (!_.isObject(prototype)) return {}; if (nativeCreate) return nativeCreate(prototype); Ctor.prototype = prototype; var result = new Ctor; Ctor.prototype = null; return result; }; var property = function(key) { return function(obj) { return obj == null ? void 0 : obj[key]; }; }; // Helper for collection methods to determine whether a collection // should be iterated as an array or as an object // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094 var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1; var getLength = property('length'); var isArrayLike = function(collection) { var length = getLength(collection); return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX; }; // Collection Functions // -------------------- // The cornerstone, an `each` implementation, aka `forEach`. // Handles raw objects in addition to array-likes. Treats all // sparse array-likes as if they were dense. _.each = _.forEach = function(obj, iteratee, context) { iteratee = optimizeCb(iteratee, context); var i, length; if (isArrayLike(obj)) { for (i = 0, length = obj.length; i < length; i++) { iteratee(obj[i], i, obj); } } else { var keys = _.keys(obj); for (i = 0, length = keys.length; i < length; i++) { iteratee(obj[keys[i]], keys[i], obj); } } return obj; }; // Return the results of applying the iteratee to each element. _.map = _.collect = function(obj, iteratee, context) { iteratee = cb(iteratee, context); var keys = !isArrayLike(obj) && _.keys(obj), length = (keys || obj).length, results = Array(length); for (var index = 0; index < length; index++) { var currentKey = keys ? keys[index] : index; results[index] = iteratee(obj[currentKey], currentKey, obj); } return results; }; // Create a reducing function iterating left or right. function createReduce(dir) { // Optimized iterator function as using arguments.length // in the main function will deoptimize the, see #1991. function iterator(obj, iteratee, memo, keys, index, length) { for (; index >= 0 && index < length; index += dir) { var currentKey = keys ? keys[index] : index; memo = iteratee(memo, obj[currentKey], currentKey, obj); } return memo; } return function(obj, iteratee, memo, context) { iteratee = optimizeCb(iteratee, context, 4); var keys = !isArrayLike(obj) && _.keys(obj), length = (keys || obj).length, index = dir > 0 ? 0 : length - 1; // Determine the initial value if none is provided. if (arguments.length < 3) { memo = obj[keys ? keys[index] : index]; index += dir; } return iterator(obj, iteratee, memo, keys, index, length); }; } // **Reduce** builds up a single result from a list of values, aka `inject`, // or `foldl`. _.reduce = _.foldl = _.inject = createReduce(1); // The right-associative version of reduce, also known as `foldr`. _.reduceRight = _.foldr = createReduce(-1); // Return the first value which passes a truth test. Aliased as `detect`. _.find = _.detect = function(obj, predicate, context) { var key; if (isArrayLike(obj)) { key = _.findIndex(obj, predicate, context); } else { key = _.findKey(obj, predicate, context); } if (key !== void 0 && key !== -1) return obj[key]; }; // Return all the elements that pass a truth test. // Aliased as `select`. _.filter = _.select = function(obj, predicate, context) { var results = []; predicate = cb(predicate, context); _.each(obj, function(value, index, list) { if (predicate(value, index, list)) results.push(value); }); return results; }; // Return all the elements for which a truth test fails. _.reject = function(obj, predicate, context) { return _.filter(obj, _.negate(cb(predicate)), context); }; // Determine whether all of the elements match a truth test. // Aliased as `all`. _.every = _.all = function(obj, predicate, context) { predicate = cb(predicate, context); var keys = !isArrayLike(obj) && _.keys(obj), length = (keys || obj).length; for (var index = 0; index < length; index++) { var currentKey = keys ? keys[index] : index; if (!predicate(obj[currentKey], currentKey, obj)) return false; } return true; }; // Determine if at least one element in the object matches a truth test. // Aliased as `any`. _.some = _.any = function(obj, predicate, context) { predicate = cb(predicate, context); var keys = !isArrayLike(obj) && _.keys(obj), length = (keys || obj).length; for (var index = 0; index < length; index++) { var currentKey = keys ? keys[index] : index; if (predicate(obj[currentKey], currentKey, obj)) return true; } return false; }; // Determine if the array or object contains a given item (using `===`). // Aliased as `includes` and `include`. _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) { if (!isArrayLike(obj)) obj = _.values(obj); if (typeof fromIndex != 'number' || guard) fromIndex = 0; return _.indexOf(obj, item, fromIndex) >= 0; }; // Invoke a method (with arguments) on every item in a collection. _.invoke = function(obj, method) { var args = slice.call(arguments, 2); var isFunc = _.isFunction(method); return _.map(obj, function(value) { var func = isFunc ? method : value[method]; return func == null ? func : func.apply(value, args); }); }; // Convenience version of a common use case of `map`: fetching a property. _.pluck = function(obj, key) { return _.map(obj, _.property(key)); }; // Convenience version of a common use case of `filter`: selecting only objects // containing specific `key:value` pairs. _.where = function(obj, attrs) { return _.filter(obj, _.matcher(attrs)); }; // Convenience version of a common use case of `find`: getting the first object // containing specific `key:value` pairs. _.findWhere = function(obj, attrs) { return _.find(obj, _.matcher(attrs)); }; // Return the maximum element (or element-based computation). _.max = function(obj, iteratee, context) { var result = -Infinity, lastComputed = -Infinity, value, computed; if (iteratee == null && obj != null) { obj = isArrayLike(obj) ? obj : _.values(obj); for (var i = 0, length = obj.length; i < length; i++) { value = obj[i]; if (value > result) { result = value; } } } else { iteratee = cb(iteratee, context); _.each(obj, function(value, index, list) { computed = iteratee(value, index, list); if (computed > lastComputed || computed === -Infinity && result === -Infinity) { result = value; lastComputed = computed; } }); } return result; }; // Return the minimum element (or element-based computation). _.min = function(obj, iteratee, context) { var result = Infinity, lastComputed = Infinity, value, computed; if (iteratee == null && obj != null) { obj = isArrayLike(obj) ? obj : _.values(obj); for (var i = 0, length = obj.length; i < length; i++) { value = obj[i]; if (value < result) { result = value; } } } else { iteratee = cb(iteratee, context); _.each(obj, function(value, index, list) { computed = iteratee(value, index, list); if (computed < lastComputed || computed === Infinity && result === Infinity) { result = value; lastComputed = computed; } }); } return result; }; // Shuffle a collection, using the modern version of the // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle). _.shuffle = function(obj) { var set = isArrayLike(obj) ? obj : _.values(obj); var length = set.length; var shuffled = Array(length); for (var index = 0, rand; index < length; index++) { rand = _.random(0, index); if (rand !== index) shuffled[index] = shuffled[rand]; shuffled[rand] = set[index]; } return shuffled; }; // Sample **n** random values from a collection. // If **n** is not specified, returns a single random element. // The internal `guard` argument allows it to work with `map`. _.sample = function(obj, n, guard) { if (n == null || guard) { if (!isArrayLike(obj)) obj = _.values(obj); return obj[_.random(obj.length - 1)]; } return _.shuffle(obj).slice(0, Math.max(0, n)); }; // Sort the object's values by a criterion produced by an iteratee. _.sortBy = function(obj, iteratee, context) { iteratee = cb(iteratee, context); return _.pluck(_.map(obj, function(value, index, list) { return { value: value, index: index, criteria: iteratee(value, index, list) }; }).sort(function(left, right) { var a = left.criteria; var b = right.criteria; if (a !== b) { if (a > b || a === void 0) return 1; if (a < b || b === void 0) return -1; } return left.index - right.index; }), 'value'); }; // An internal function used for aggregate "group by" operations. var group = function(behavior) { return function(obj, iteratee, context) { var result = {}; iteratee = cb(iteratee, context); _.each(obj, function(value, index) { var key = iteratee(value, index, obj); behavior(result, value, key); }); return result; }; }; // Groups the object's values by a criterion. Pass either a string attribute // to group by, or a function that returns the criterion. _.groupBy = group(function(result, value, key) { if (_.has(result, key)) result[key].push(value); else result[key] = [value]; }); // Indexes the object's values by a criterion, similar to `groupBy`, but for // when you know that your index values will be unique. _.indexBy = group(function(result, value, key) { result[key] = value; }); // Counts instances of an object that group by a certain criterion. Pass // either a string attribute to count by, or a function that returns the // criterion. _.countBy = group(function(result, value, key) { if (_.has(result, key)) result[key]++; else result[key] = 1; }); // Safely create a real, live array from anything iterable. _.toArray = function(obj) { if (!obj) return []; if (_.isArray(obj)) return slice.call(obj); if (isArrayLike(obj)) return _.map(obj, _.identity); return _.values(obj); }; // Return the number of elements in an object. _.size = function(obj) { if (obj == null) return 0; return isArrayLike(obj) ? obj.length : _.keys(obj).length; }; // Split a collection into two arrays: one whose elements all satisfy the given // predicate, and one whose elements all do not satisfy the predicate. _.partition = function(obj, predicate, context) { predicate = cb(predicate, context); var pass = [], fail = []; _.each(obj, function(value, key, obj) { (predicate(value, key, obj) ? pass : fail).push(value); }); return [pass, fail]; }; // Array Functions // --------------- // Get the first element of an array. Passing **n** will return the first N // values in the array. Aliased as `head` and `take`. The **guard** check // allows it to work with `_.map`. _.first = _.head = _.take = function(array, n, guard) { if (array == null) return void 0; if (n == null || guard) return array[0]; return _.initial(array, array.length - n); }; // Returns everything but the last entry of the array. Especially useful on // the arguments object. Passing **n** will return all the values in // the array, excluding the last N. _.initial = function(array, n, guard) { return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n))); }; // Get the last element of an array. Passing **n** will return the last N // values in the array. _.last = function(array, n, guard) { if (array == null) return void 0; if (n == null || guard) return array[array.length - 1]; return _.rest(array, Math.max(0, array.length - n)); }; // Returns everything but the first entry of the array. Aliased as `tail` and `drop`. // Especially useful on the arguments object. Passing an **n** will return // the rest N values in the array. _.rest = _.tail = _.drop = function(array, n, guard) { return slice.call(array, n == null || guard ? 1 : n); }; // Trim out all falsy values from an array. _.compact = function(array) { return _.filter(array, _.identity); }; // Internal implementation of a recursive `flatten` function. var flatten = function(input, shallow, strict, startIndex) { var output = [], idx = 0; for (var i = startIndex || 0, length = getLength(input); i < length; i++) { var value = input[i]; if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) { //flatten current level of array or arguments object if (!shallow) value = flatten(value, shallow, strict); var j = 0, len = value.length; output.length += len; while (j < len) { output[idx++] = value[j++]; } } else if (!strict) { output[idx++] = value; } } return output; }; // Flatten out an array, either recursively (by default), or just one level. _.flatten = function(array, shallow) { return flatten(array, shallow, false); }; // Return a version of the array that does not contain the specified value(s). _.without = function(array) { return _.difference(array, slice.call(arguments, 1)); }; // Produce a duplicate-free version of the array. If the array has already // been sorted, you have the option of using a faster algorithm. // Aliased as `unique`. _.uniq = _.unique = function(array, isSorted, iteratee, context) { if (!_.isBoolean(isSorted)) { context = iteratee; iteratee = isSorted; isSorted = false; } if (iteratee != null) iteratee = cb(iteratee, context); var result = []; var seen = []; for (var i = 0, length = getLength(array); i < length; i++) { var value = array[i], computed = iteratee ? iteratee(value, i, array) : value; if (isSorted) { if (!i || seen !== computed) result.push(value); seen = computed; } else if (iteratee) { if (!_.contains(seen, computed)) { seen.push(computed); result.push(value); } } else if (!_.contains(result, value)) { result.push(value); } } return result; }; // Produce an array that contains the union: each distinct element from all of // the passed-in arrays. _.union = function() { return _.uniq(flatten(arguments, true, true)); }; // Produce an array that contains every item shared between all the // passed-in arrays. _.intersection = function(array) { var result = []; var argsLength = arguments.length; for (var i = 0, length = getLength(array); i < length; i++) { var item = array[i]; if (_.contains(result, item)) continue; for (var j = 1; j < argsLength; j++) { if (!_.contains(arguments[j], item)) break; } if (j === argsLength) result.push(item); } return result; }; // Take the difference between one array and a number of other arrays. // Only the elements present in just the first array will remain. _.difference = function(array) { var rest = flatten(arguments, true, true, 1); return _.filter(array, function(value){ return !_.contains(rest, value); }); }; // Zip together multiple lists into a single array -- elements that share // an index go together. _.zip = function() { return _.unzip(arguments); }; // Complement of _.zip. Unzip accepts an array of arrays and groups // each array's elements on shared indices _.unzip = function(array) { var length = array && _.max(array, getLength).length || 0; var result = Array(length); for (var index = 0; index < length; index++) { result[index] = _.pluck(array, index); } return result; }; // Converts lists into objects. Pass either a single array of `[key, value]` // pairs, or two parallel arrays of the same length -- one of keys, and one of // the corresponding values. _.object = function(list, values) { var result = {}; for (var i = 0, length = getLength(list); i < length; i++) { if (values) { result[list[i]] = values[i]; } else { result[list[i][0]] = list[i][1]; } } return result; }; // Generator function to create the findIndex and findLastIndex functions function createPredicateIndexFinder(dir) { return function(array, predicate, context) { predicate = cb(predicate, context); var length = getLength(array); var index = dir > 0 ? 0 : length - 1; for (; index >= 0 && index < length; index += dir) { if (predicate(array[index], index, array)) return index; } return -1; }; } // Returns the first index on an array-like that passes a predicate test _.findIndex = createPredicateIndexFinder(1); _.findLastIndex = createPredicateIndexFinder(-1); // Use a comparator function to figure out the smallest index at which // an object should be inserted so as to maintain order. Uses binary search. _.sortedIndex = function(array, obj, iteratee, context) { iteratee = cb(iteratee, context, 1); var value = iteratee(obj); var low = 0, high = getLength(array); while (low < high) { var mid = Math.floor((low + high) / 2); if (iteratee(array[mid]) < value) low = mid + 1; else high = mid; } return low; }; // Generator function to create the indexOf and lastIndexOf functions function createIndexFinder(dir, predicateFind, sortedIndex) { return function(array, item, idx) { var i = 0, length = getLength(array); if (typeof idx == 'number') { if (dir > 0) { i = idx >= 0 ? idx : Math.max(idx + length, i); } else { length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1; } } else if (sortedIndex && idx && length) { idx = sortedIndex(array, item); return array[idx] === item ? idx : -1; } if (item !== item) { idx = predicateFind(slice.call(array, i, length), _.isNaN); return idx >= 0 ? idx + i : -1; } for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) { if (array[idx] === item) return idx; } return -1; }; } // Return the position of the first occurrence of an item in an array, // or -1 if the item is not included in the array. // If the array is large and already in sort order, pass `true` // for **isSorted** to use binary search. _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex); _.lastIndexOf = createIndexFinder(-1, _.findLastIndex); // Generate an integer Array containing an arithmetic progression. A port of // the native Python `range()` function. See // [the Python documentation](http://docs.python.org/library/functions.html#range). _.range = function(start, stop, step) { if (stop == null) { stop = start || 0; start = 0; } step = step || 1; var length = Math.max(Math.ceil((stop - start) / step), 0); var range = Array(length); for (var idx = 0; idx < length; idx++, start += step) { range[idx] = start; } return range; }; // Function (ahem) Functions // ------------------ // Determines whether to execute a function as a constructor // or a normal function with the provided arguments var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) { if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args); var self = baseCreate(sourceFunc.prototype); var result = sourceFunc.apply(self, args); if (_.isObject(result)) return result; return self; }; // Create a function bound to a given object (assigning `this`, and arguments, // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if // available. _.bind = function(func, context) { if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function'); var args = slice.call(arguments, 2); var bound = function() { return executeBound(func, bound, context, this, args.concat(slice.call(arguments))); }; return bound; }; // Partially apply a function by creating a version that has had some of its // arguments pre-filled, without changing its dynamic `this` context. _ acts // as a placeholder, allowing any combination of arguments to be pre-filled. _.partial = function(func) { var boundArgs = slice.call(arguments, 1); var bound = function() { var position = 0, length = boundArgs.length; var args = Array(length); for (var i = 0; i < length; i++) { args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i]; } while (position < arguments.length) args.push(arguments[position++]); return executeBound(func, bound, this, this, args); }; return bound; }; // Bind a number of an object's methods to that object. Remaining arguments // are the method names to be bound. Useful for ensuring that all callbacks // defined on an object belong to it. _.bindAll = function(obj) { var i, length = arguments.length, key; if (length <= 1) throw new Error('bindAll must be passed function names'); for (i = 1; i < length; i++) { key = arguments[i]; obj[key] = _.bind(obj[key], obj); } return obj; }; // Memoize an expensive function by storing its results. _.memoize = function(func, hasher) { var memoize = function(key) { var cache = memoize.cache; var address = '' + (hasher ? hasher.apply(this, arguments) : key); if (!_.has(cache, address)) cache[address] = func.apply(this, arguments); return cache[address]; }; memoize.cache = {}; return memoize; }; // Delays a function for the given number of milliseconds, and then calls // it with the arguments supplied. _.delay = function(func, wait) { var args = slice.call(arguments, 2); return setTimeout(function(){ return func.apply(null, args); }, wait); }; // Defers a function, scheduling it to run after the current call stack has // cleared. _.defer = _.partial(_.delay, _, 1); // Returns a function, that, when invoked, will only be triggered at most once // during a given window of time. Normally, the throttled function will run // as much as it can, without ever going more than once per `wait` duration; // but if you'd like to disable the execution on the leading edge, pass // `{leading: false}`. To disable execution on the trailing edge, ditto. _.throttle = function(func, wait, options) { var context, args, result; var timeout = null; var previous = 0; if (!options) options = {}; var later = function() { previous = options.leading === false ? 0 : _.now(); timeout = null; result = func.apply(context, args); if (!timeout) context = args = null; }; return function() { var now = _.now(); if (!previous && options.leading === false) previous = now; var remaining = wait - (now - previous); context = this; args = arguments; if (remaining <= 0 || remaining > wait) { if (timeout) { clearTimeout(timeout); timeout = null; } previous = now; result = func.apply(context, args); if (!timeout) context = args = null; } else if (!timeout && options.trailing !== false) { timeout = setTimeout(later, remaining); } return result; }; }; // Returns a function, that, as long as it continues to be invoked, will not // be triggered. The function will be called after it stops being called for // N milliseconds. If `immediate` is passed, trigger the function on the // leading edge, instead of the trailing. _.debounce = function(func, wait, immediate) { var timeout, args, context, timestamp, result; var later = function() { var last = _.now() - timestamp; if (last < wait && last >= 0) { timeout = setTimeout(later, wait - last); } else { timeout = null; if (!immediate) { result = func.apply(context, args); if (!timeout) context = args = null; } } }; return function() { context = this; args = arguments; timestamp = _.now(); var callNow = immediate && !timeout; if (!timeout) timeout = setTimeout(later, wait); if (callNow) { result = func.apply(context, args); context = args = null; } return result; }; }; // Returns the first function passed as an argument to the second, // allowing you to adjust arguments, run code before and after, and // conditionally execute the original function. _.wrap = function(func, wrapper) { return _.partial(wrapper, func); }; // Returns a negated version of the passed-in predicate. _.negate = function(predicate) { return function() { return !predicate.apply(this, arguments); }; }; // Returns a function that is the composition of a list of functions, each // consuming the return value of the function that follows. _.compose = function() { var args = arguments; var start = args.length - 1; return function() { var i = start; var result = args[start].apply(this, arguments); while (i--) result = args[i].call(this, result); return result; }; }; // Returns a function that will only be executed on and after the Nth call. _.after = function(times, func) { return function() { if (--times < 1) { return func.apply(this, arguments); } }; }; // Returns a function that will only be executed up to (but not including) the Nth call. _.before = function(times, func) { var memo; return function() { if (--times > 0) { memo = func.apply(this, arguments); } if (times <= 1) func = null; return memo; }; }; // Returns a function that will be executed at most one time, no matter how // often you call it. Useful for lazy initialization. _.once = _.partial(_.before, 2); // Object Functions // ---------------- // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed. var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString'); var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; function collectNonEnumProps(obj, keys) { var nonEnumIdx = nonEnumerableProps.length; var constructor = obj.constructor; var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto; // Constructor is a special case. var prop = 'constructor'; if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop); while (nonEnumIdx--) { prop = nonEnumerableProps[nonEnumIdx]; if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) { keys.push(prop); } } } // Retrieve the names of an object's own properties. // Delegates to **ECMAScript 5**'s native `Object.keys` _.keys = function(obj) { if (!_.isObject(obj)) return []; if (nativeKeys) return nativeKeys(obj); var keys = []; for (var key in obj) if (_.has(obj, key)) keys.push(key); // Ahem, IE < 9. if (hasEnumBug) collectNonEnumProps(obj, keys); return keys; }; // Retrieve all the property names of an object. _.allKeys = function(obj) { if (!_.isObject(obj)) return []; var keys = []; for (var key in obj) keys.push(key); // Ahem, IE < 9. if (hasEnumBug) collectNonEnumProps(obj, keys); return keys; }; // Retrieve the values of an object's properties. _.values = function(obj) { var keys = _.keys(obj); var length = keys.length; var values = Array(length); for (var i = 0; i < length; i++) { values[i] = obj[keys[i]]; } return values; }; // Returns the results of applying the iteratee to each element of the object // In contrast to _.map it returns an object _.mapObject = function(obj, iteratee, context) { iteratee = cb(iteratee, context); var keys = _.keys(obj), length = keys.length, results = {}, currentKey; for (var index = 0; index < length; index++) { currentKey = keys[index]; results[currentKey] = iteratee(obj[currentKey], currentKey, obj); } return results; }; // Convert an object into a list of `[key, value]` pairs. _.pairs = function(obj) { var keys = _.keys(obj); var length = keys.length; var pairs = Array(length); for (var i = 0; i < length; i++) { pairs[i] = [keys[i], obj[keys[i]]]; } return pairs; }; // Invert the keys and values of an object. The values must be serializable. _.invert = function(obj) { var result = {}; var keys = _.keys(obj); for (var i = 0, length = keys.length; i < length; i++) { result[obj[keys[i]]] = keys[i]; } return result; }; // Return a sorted list of the function names available on the object. // Aliased as `methods` _.functions = _.methods = function(obj) { var names = []; for (var key in obj) { if (_.isFunction(obj[key])) names.push(key); } return names.sort(); }; // Extend a given object with all the properties in passed-in object(s). _.extend = createAssigner(_.allKeys); // Assigns a given object with all the own properties in the passed-in object(s) // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) _.extendOwn = _.assign = createAssigner(_.keys); // Returns the first key on an object that passes a predicate test _.findKey = function(obj, predicate, context) { predicate = cb(predicate, context); var keys = _.keys(obj), key; for (var i = 0, length = keys.length; i < length; i++) { key = keys[i]; if (predicate(obj[key], key, obj)) return key; } }; // Return a copy of the object only containing the whitelisted properties. _.pick = function(object, oiteratee, context) { var result = {}, obj = object, iteratee, keys; if (obj == null) return result; if (_.isFunction(oiteratee)) { keys = _.allKeys(obj); iteratee = optimizeCb(oiteratee, context); } else { keys = flatten(arguments, false, false, 1); iteratee = function(value, key, obj) { return key in obj; }; obj = Object(obj); } for (var i = 0, length = keys.length; i < length; i++) { var key = keys[i]; var value = obj[key]; if (iteratee(value, key, obj)) result[key] = value; } return result; }; // Return a copy of the object without the blacklisted properties. _.omit = function(obj, iteratee, context) { if (_.isFunction(iteratee)) { iteratee = _.negate(iteratee); } else { var keys = _.map(flatten(arguments, false, false, 1), String); iteratee = function(value, key) { return !_.contains(keys, key); }; } return _.pick(obj, iteratee, context); }; // Fill in a given object with default properties. _.defaults = createAssigner(_.allKeys, true); // Creates an object that inherits from the given prototype object. // If additional properties are provided then they will be added to the // created object. _.create = function(prototype, props) { var result = baseCreate(prototype); if (props) _.extendOwn(result, props); return result; }; // Create a (shallow-cloned) duplicate of an object. _.clone = function(obj) { if (!_.isObject(obj)) return obj; return _.isArray(obj) ? obj.slice() : _.extend({}, obj); }; // Invokes interceptor with the obj, and then returns obj. // The primary purpose of this method is to "tap into" a method chain, in // order to perform operations on intermediate results within the chain. _.tap = function(obj, interceptor) { interceptor(obj); return obj; }; // Returns whether an object has a given set of `key:value` pairs. _.isMatch = function(object, attrs) { var keys = _.keys(attrs), length = keys.length; if (object == null) return !length; var obj = Object(object); for (var i = 0; i < length; i++) { var key = keys[i]; if (attrs[key] !== obj[key] || !(key in obj)) return false; } return true; }; // Internal recursive comparison function for `isEqual`. var eq = function(a, b, aStack, bStack) { // Identical objects are equal. `0 === -0`, but they aren't identical. // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). if (a === b) return a !== 0 || 1 / a === 1 / b; // A strict comparison is necessary because `null == undefined`. if (a == null || b == null) return a === b; // Unwrap any wrapped objects. if (a instanceof _) a = a._wrapped; if (b instanceof _) b = b._wrapped; // Compare `[[Class]]` names. var className = toString.call(a); if (className !== toString.call(b)) return false; switch (className) { // Strings, numbers, regular expressions, dates, and booleans are compared by value. case '[object RegExp]': // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i') case '[object String]': // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is // equivalent to `new String("5")`. return '' + a === '' + b; case '[object Number]': // `NaN`s are equivalent, but non-reflexive. // Object(NaN) is equivalent to NaN if (+a !== +a) return +b !== +b; // An `egal` comparison is performed for other numeric values. return +a === 0 ? 1 / +a === 1 / b : +a === +b; case '[object Date]': case '[object Boolean]': // Coerce dates and booleans to numeric primitive values. Dates are compared by their // millisecond representations. Note that invalid dates with millisecond representations // of `NaN` are not equivalent. return +a === +b; } var areArrays = className === '[object Array]'; if (!areArrays) { if (typeof a != 'object' || typeof b != 'object') return false; // Objects with different constructors are not equivalent, but `Object`s or `Array`s // from different frames are. var aCtor = a.constructor, bCtor = b.constructor; if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor && _.isFunction(bCtor) && bCtor instanceof bCtor) && ('constructor' in a && 'constructor' in b)) { return false; } } // Assume equality for cyclic structures. The algorithm for detecting cyclic // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. // Initializing stack of traversed objects. // It's done here since we only need them for objects and arrays comparison. aStack = aStack || []; bStack = bStack || []; var length = aStack.length; while (length--) { // Linear search. Performance is inversely proportional to the number of // unique nested structures. if (aStack[length] === a) return bStack[length] === b; } // Add the first object to the stack of traversed objects. aStack.push(a); bStack.push(b); // Recursively compare objects and arrays. if (areArrays) { // Compare array lengths to determine if a deep comparison is necessary. length = a.length; if (length !== b.length) return false; // Deep compare the contents, ignoring non-numeric properties. while (length--) { if (!eq(a[length], b[length], aStack, bStack)) return false; } } else { // Deep compare objects. var keys = _.keys(a), key; length = keys.length; // Ensure that both objects contain the same number of properties before comparing deep equality. if (_.keys(b).length !== length) return false; while (length--) { // Deep compare each member key = keys[length]; if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return false; } } // Remove the first object from the stack of traversed objects. aStack.pop(); bStack.pop(); return true; }; // Perform a deep comparison to check if two objects are equal. _.isEqual = function(a, b) { return eq(a, b); }; // Is a given array, string, or object empty? // An "empty" object has no enumerable own-properties. _.isEmpty = function(obj) { if (obj == null) return true; if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0; return _.keys(obj).length === 0; }; // Is a given value a DOM element? _.isElement = function(obj) { return !!(obj && obj.nodeType === 1); }; // Is a given value an array? // Delegates to ECMA5's native Array.isArray _.isArray = nativeIsArray || function(obj) { return toString.call(obj) === '[object Array]'; }; // Is a given variable an object? _.isObject = function(obj) { var type = typeof obj; return type === 'function' || type === 'object' && !!obj; }; // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError. _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) { _['is' + name] = function(obj) { return toString.call(obj) === '[object ' + name + ']'; }; }); // Define a fallback version of the method in browsers (ahem, IE < 9), where // there isn't any inspectable "Arguments" type. if (!_.isArguments(arguments)) { _.isArguments = function(obj) { return _.has(obj, 'callee'); }; } // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8, // IE 11 (#1621), and in Safari 8 (#1929). if (typeof /./ != 'function' && typeof Int8Array != 'object') { _.isFunction = function(obj) { return typeof obj == 'function' || false; }; } // Is a given object a finite number? _.isFinite = function(obj) { return isFinite(obj) && !isNaN(parseFloat(obj)); }; // Is the given value `NaN`? (NaN is the only number which does not equal itself). _.isNaN = function(obj) { return _.isNumber(obj) && obj !== +obj; }; // Is a given value a boolean? _.isBoolean = function(obj) { return obj === true || obj === false || toString.call(obj) === '[object Boolean]'; }; // Is a given value equal to null? _.isNull = function(obj) { return obj === null; }; // Is a given variable undefined? _.isUndefined = function(obj) { return obj === void 0; }; // Shortcut function for checking if an object has a given property directly // on itself (in other words, not on a prototype). _.has = function(obj, key) { return obj != null && hasOwnProperty.call(obj, key); }; // Utility Functions // ----------------- // Run Underscore.js in *noConflict* mode, returning the `_` variable to its // previous owner. Returns a reference to the Underscore object. _.noConflict = function() { root._ = previousUnderscore; return this; }; // Keep the identity function around for default iteratees. _.identity = function(value) { return value; }; // Predicate-generating functions. Often useful outside of Underscore. _.constant = function(value) { return function() { return value; }; }; _.noop = function(){}; _.property = property; // Generates a function for a given object that returns a given property. _.propertyOf = function(obj) { return obj == null ? function(){} : function(key) { return obj[key]; }; }; // Returns a predicate for checking whether an object has a given set of // `key:value` pairs. _.matcher = _.matches = function(attrs) { attrs = _.extendOwn({}, attrs); return function(obj) { return _.isMatch(obj, attrs); }; }; // Run a function **n** times. _.times = function(n, iteratee, context) { var accum = Array(Math.max(0, n)); iteratee = optimizeCb(iteratee, context, 1); for (var i = 0; i < n; i++) accum[i] = iteratee(i); return accum; }; // Return a random integer between min and max (inclusive). _.random = function(min, max) { if (max == null) { max = min; min = 0; } return min + Math.floor(Math.random() * (max - min + 1)); }; // A (possibly faster) way to get the current timestamp as an integer. _.now = Date.now || function() { return new Date().getTime(); }; // List of HTML entities for escaping. var escapeMap = { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#x27;', '`': '&#x60;' }; var unescapeMap = _.invert(escapeMap); // Functions for escaping and unescaping strings to/from HTML interpolation. var createEscaper = function(map) { var escaper = function(match) { return map[match]; }; // Regexes for identifying a key that needs to be escaped var source = '(?:' + _.keys(map).join('|') + ')'; var testRegexp = RegExp(source); var replaceRegexp = RegExp(source, 'g'); return function(string) { string = string == null ? '' : '' + string; return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; }; }; _.escape = createEscaper(escapeMap); _.unescape = createEscaper(unescapeMap); // If the value of the named `property` is a function then invoke it with the // `object` as context; otherwise, return it. _.result = function(object, property, fallback) { var value = object == null ? void 0 : object[property]; if (value === void 0) { value = fallback; } return _.isFunction(value) ? value.call(object) : value; }; // Generate a unique integer id (unique within the entire client session). // Useful for temporary DOM ids. var idCounter = 0; _.uniqueId = function(prefix) { var id = ++idCounter + ''; return prefix ? prefix + id : id; }; // By default, Underscore uses ERB-style template delimiters, change the // following template settings to use alternative delimiters. _.templateSettings = { evaluate : /<%([\s\S]+?)%>/g, interpolate : /<%=([\s\S]+?)%>/g, escape : /<%-([\s\S]+?)%>/g }; // When customizing `templateSettings`, if you don't want to define an // interpolation, evaluation or escaping regex, we need one that is // guaranteed not to match. var noMatch = /(.)^/; // Certain characters need to be escaped so that they can be put into a // string literal. var escapes = { "'": "'", '\\': '\\', '\r': 'r', '\n': 'n', '\u2028': 'u2028', '\u2029': 'u2029' }; var escaper = /\\|'|\r|\n|\u2028|\u2029/g; var escapeChar = function(match) { return '\\' + escapes[match]; }; // JavaScript micro-templating, similar to John Resig's implementation. // Underscore templating handles arbitrary delimiters, preserves whitespace, // and correctly escapes quotes within interpolated code. // NB: `oldSettings` only exists for backwards compatibility. _.template = function(text, settings, oldSettings) { if (!settings && oldSettings) settings = oldSettings; settings = _.defaults({}, settings, _.templateSettings); // Combine delimiters into one regular expression via alternation. var matcher = RegExp([ (settings.escape || noMatch).source, (settings.interpolate || noMatch).source, (settings.evaluate || noMatch).source ].join('|') + '|$', 'g'); // Compile the template source, escaping string literals appropriately. var index = 0; var source = "__p+='"; text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { source += text.slice(index, offset).replace(escaper, escapeChar); index = offset + match.length; if (escape) { source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; } else if (interpolate) { source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; } else if (evaluate) { source += "';\n" + evaluate + "\n__p+='"; } // Adobe VMs need the match returned to produce the correct offest. return match; }); source += "';\n"; // If a variable is not specified, place data values in local scope. if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; source = "var __t,__p='',__j=Array.prototype.join," + "print=function(){__p+=__j.call(arguments,'');};\n" + source + 'return __p;\n'; try { var render = new Function(settings.variable || 'obj', '_', source); } catch (e) { e.source = source; throw e; } var template = function(data) { return render.call(this, data, _); }; // Provide the compiled source as a convenience for precompilation. var argument = settings.variable || 'obj'; template.source = 'function(' + argument + '){\n' + source + '}'; return template; }; // Add a "chain" function. Start chaining a wrapped Underscore object. _.chain = function(obj) { var instance = _(obj); instance._chain = true; return instance; }; // OOP // --------------- // If Underscore is called as a function, it returns a wrapped object that // can be used OO-style. This wrapper holds altered versions of all the // underscore functions. Wrapped objects may be chained. // Helper function to continue chaining intermediate results. var result = function(instance, obj) { return instance._chain ? _(obj).chain() : obj; }; // Add your own custom functions to the Underscore object. _.mixin = function(obj) { _.each(_.functions(obj), function(name) { var func = _[name] = obj[name]; _.prototype[name] = function() { var args = [this._wrapped]; push.apply(args, arguments); return result(this, func.apply(_, args)); }; }); }; // Add all of the Underscore functions to the wrapper object. _.mixin(_); // Add all mutator Array functions to the wrapper. _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { var method = ArrayProto[name]; _.prototype[name] = function() { var obj = this._wrapped; method.apply(obj, arguments); if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0]; return result(this, obj); }; }); // Add all accessor Array functions to the wrapper. _.each(['concat', 'join', 'slice'], function(name) { var method = ArrayProto[name]; _.prototype[name] = function() { return result(this, method.apply(this._wrapped, arguments)); }; }); // Extracts the result from a wrapped and chained object. _.prototype.value = function() { return this._wrapped; }; // Provide unwrapping proxy for some methods used in engine operations // such as arithmetic and JSON stringification. _.prototype.valueOf = _.prototype.toJSON = _.prototype.value; _.prototype.toString = function() { return '' + this._wrapped; }; // AMD registration happens at the end for compatibility with AMD loaders // that may not enforce next-turn semantics on modules. Even though general // practice for AMD registration is to be anonymous, underscore registers // as a named module because, like jQuery, it is a base library that is // popular enough to be bundled in a third party lib, but not be part of // an AMD load request. Those cases could generate an error when an // anonymous define() is called outside of a loader request. if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function() { return _; }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } }.call(this)); /***/ }), /* 99 */, /* 100 */, /* 101 */, /* 102 */, /* 103 */, /* 104 */, /* 105 */, /* 106 */, /* 107 */, /* 108 */, /* 109 */, /* 110 */, /* 111 */, /* 112 */, /* 113 */, /* 114 */, /* 115 */, /* 116 */, /* 117 */, /* 118 */, /* 119 */, /* 120 */, /* 121 */, /* 122 */, /* 123 */, /* 124 */, /* 125 */, /* 126 */, /* 127 */, /* 128 */, /* 129 */, /* 130 */, /* 131 */, /* 132 */, /* 133 */, /* 134 */, /* 135 */, /* 136 */, /* 137 */, /* 138 */, /* 139 */, /* 140 */, /* 141 */, /* 142 */, /* 143 */, /* 144 */, /* 145 */, /* 146 */, /* 147 */, /* 148 */, /* 149 */, /* 150 */, /* 151 */, /* 152 */, /* 153 */, /* 154 */, /* 155 */, /* 156 */, /* 157 */, /* 158 */, /* 159 */, /* 160 */, /* 161 */, /* 162 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _shallowEqual = __webpack_require__(70); var _shallowEqual2 = _interopRequireDefault(_shallowEqual); var _RowsContainer = __webpack_require__(64); var _RowsContainer2 = _interopRequireDefault(_RowsContainer); var _RowGroup = __webpack_require__(179); var _RowGroup2 = _interopRequireDefault(_RowGroup); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var React = __webpack_require__(2); var ReactDOM = __webpack_require__(4); var joinClasses = __webpack_require__(7); var PropTypes = React.PropTypes; var ScrollShim = __webpack_require__(180); var Row = __webpack_require__(35); var cellMetaDataShape = __webpack_require__(14); var RowUtils = __webpack_require__(63); __webpack_require__(26); var Canvas = React.createClass({ displayName: 'Canvas', mixins: [ScrollShim], propTypes: { rowRenderer: PropTypes.oneOfType([PropTypes.func, PropTypes.element]), rowHeight: PropTypes.number.isRequired, height: PropTypes.number.isRequired, width: PropTypes.number, totalWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), style: PropTypes.string, className: PropTypes.string, displayStart: PropTypes.number.isRequired, displayEnd: PropTypes.number.isRequired, visibleStart: PropTypes.number.isRequired, visibleEnd: PropTypes.number.isRequired, colVisibleStart: PropTypes.number.isRequired, colVisibleEnd: PropTypes.number.isRequired, colDisplayStart: PropTypes.number.isRequired, colDisplayEnd: PropTypes.number.isRequired, rowsCount: PropTypes.number.isRequired, rowGetter: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.array.isRequired]), expandedRows: PropTypes.array, onRows: PropTypes.func, onScroll: PropTypes.func, columns: PropTypes.oneOfType([PropTypes.object, PropTypes.array]).isRequired, cellMetaData: PropTypes.shape(cellMetaDataShape).isRequired, selectedRows: PropTypes.array, rowKey: React.PropTypes.string, rowScrollTimeout: React.PropTypes.number, contextMenu: PropTypes.element, getSubRowDetails: PropTypes.func, rowSelection: React.PropTypes.oneOfType([React.PropTypes.shape({ indexes: React.PropTypes.arrayOf(React.PropTypes.number).isRequired }), React.PropTypes.shape({ isSelectedKey: React.PropTypes.string.isRequired }), React.PropTypes.shape({ keys: React.PropTypes.shape({ values: React.PropTypes.array.isRequired, rowKey: React.PropTypes.string.isRequired }).isRequired })]), rowGroupRenderer: React.PropTypes.func, isScrolling: React.PropTypes.bool }, getDefaultProps: function getDefaultProps() { return { rowRenderer: Row, onRows: function onRows() {}, selectedRows: [], rowScrollTimeout: 0 }; }, rows: [], getInitialState: function getInitialState() { return { displayStart: this.props.displayStart, displayEnd: this.props.displayEnd, scrollingTimeout: null }; }, componentWillMount: function componentWillMount() { this._currentRowsLength = 0; this._currentRowsRange = { start: 0, end: 0 }; this._scroll = { scrollTop: 0, scrollLeft: 0 }; }, componentDidMount: function componentDidMount() { this.onRows(); }, componentWillReceiveProps: function componentWillReceiveProps(nextProps) { if (nextProps.displayStart !== this.state.displayStart || nextProps.displayEnd !== this.state.displayEnd) { this.setState({ displayStart: nextProps.displayStart, displayEnd: nextProps.displayEnd }); } }, shouldComponentUpdate: function shouldComponentUpdate(nextProps, nextState) { var shouldUpdate = nextState.displayStart !== this.state.displayStart || nextState.displayEnd !== this.state.displayEnd || nextState.scrollingTimeout !== this.state.scrollingTimeout || nextProps.rowsCount !== this.props.rowsCount || nextProps.rowHeight !== this.props.rowHeight || nextProps.columns !== this.props.columns || nextProps.width !== this.props.width || nextProps.height !== this.props.height || nextProps.cellMetaData !== this.props.cellMetaData || this.props.colDisplayStart !== nextProps.colDisplayStart || this.props.colDisplayEnd !== nextProps.colDisplayEnd || this.props.colVisibleStart !== nextProps.colVisibleStart || this.props.colVisibleEnd !== nextProps.colVisibleEnd || !(0, _shallowEqual2['default'])(nextProps.style, this.props.style); return shouldUpdate; }, componentWillUnmount: function componentWillUnmount() { this._currentRowsLength = 0; this._currentRowsRange = { start: 0, end: 0 }; this._scroll = { scrollTop: 0, scrollLeft: 0 }; }, componentDidUpdate: function componentDidUpdate() { if (this._scroll.scrollTop !== 0 && this._scroll.scrollLeft !== 0) { this.setScrollLeft(this._scroll.scrollLeft); } this.onRows(); }, onRows: function onRows() { if (this._currentRowsRange !== { start: 0, end: 0 }) { this.props.onRows(this._currentRowsRange); this._currentRowsRange = { start: 0, end: 0 }; } }, onScroll: function onScroll(e) { if (ReactDOM.findDOMNode(this) !== e.target) { return; } this.appendScrollShim(); var scrollLeft = e.target.scrollLeft; var scrollTop = e.target.scrollTop; var scroll = { scrollTop: scrollTop, scrollLeft: scrollLeft }; this._scroll = scroll; this.props.onScroll(scroll); }, getRows: function getRows(displayStart, displayEnd) { this._currentRowsRange = { start: displayStart, end: displayEnd }; if (Array.isArray(this.props.rowGetter)) { return this.props.rowGetter.slice(displayStart, displayEnd); } var rows = []; var i = displayStart; while (i < displayEnd) { var row = this.props.rowGetter(i); var subRowDetails = {}; if (this.props.getSubRowDetails) { subRowDetails = this.props.getSubRowDetails(row); } rows.push({ row: row, subRowDetails: subRowDetails }); i++; } return rows; }, getScrollbarWidth: function getScrollbarWidth() { var scrollbarWidth = 0; // Get the scrollbar width var canvas = ReactDOM.findDOMNode(this); scrollbarWidth = canvas.offsetWidth - canvas.clientWidth; return scrollbarWidth; }, getScroll: function getScroll() { var _ReactDOM$findDOMNode = ReactDOM.findDOMNode(this), scrollTop = _ReactDOM$findDOMNode.scrollTop, scrollLeft = _ReactDOM$findDOMNode.scrollLeft; return { scrollTop: scrollTop, scrollLeft: scrollLeft }; }, isRowSelected: function isRowSelected(idx, row) { var _this = this; // Use selectedRows if set if (this.props.selectedRows !== null) { var selectedRows = this.props.selectedRows.filter(function (r) { var rowKeyValue = row.get ? row.get(_this.props.rowKey) : row[_this.props.rowKey]; return r[_this.props.rowKey] === rowKeyValue; }); return selectedRows.length > 0 && selectedRows[0].isSelected; } // Else use new rowSelection props if (this.props.rowSelection) { var _props$rowSelection = this.props.rowSelection, keys = _props$rowSelection.keys, indexes = _props$rowSelection.indexes, isSelectedKey = _props$rowSelection.isSelectedKey; return RowUtils.isRowSelected(keys, indexes, isSelectedKey, row, idx); } return false; }, _currentRowsLength: 0, _currentRowsRange: { start: 0, end: 0 }, _scroll: { scrollTop: 0, scrollLeft: 0 }, setScrollLeft: function setScrollLeft(scrollLeft) { if (this._currentRowsLength !== 0) { if (!this.rows) return; for (var i = 0, len = this._currentRowsLength; i < len; i++) { if (this.rows[i]) { var row = this.getRowByRef(i); if (row && row.setScrollLeft) { row.setScrollLeft(scrollLeft); } } } } }, getRowByRef: function getRowByRef(i) { // check if wrapped with React DND drop target var wrappedRow = this.rows[i].getDecoratedComponentInstance ? this.rows[i].getDecoratedComponentInstance(i) : null; if (wrappedRow) { return wrappedRow.row; } return this.rows[i]; }, renderRow: function renderRow(props) { var row = props.row; if (row.__metaData && row.__metaData.getRowRenderer) { return row.__metaData.getRowRenderer(this.props); } if (row.__metaData && row.__metaData.isGroup) { return React.createElement(_RowGroup2['default'], _extends({ key: props.key, name: row.name }, row.__metaData, { row: props.row, idx: props.idx, height: props.height, cellMetaData: this.props.cellMetaData, renderer: this.props.rowGroupRenderer, columns: props.columns })); } var RowsRenderer = this.props.rowRenderer; if (typeof RowsRenderer === 'function') { return React.createElement(RowsRenderer, props); } if (React.isValidElement(this.props.rowRenderer)) { return React.cloneElement(this.props.rowRenderer, props); } }, renderPlaceholder: function renderPlaceholder(key, height) { // just renders empty cells // if we wanted to show gridlines, we'd need classes and position as with renderScrollingPlaceholder return React.createElement( 'div', { key: key, style: { height: height } }, this.props.columns.map(function (column, idx) { return React.createElement('div', { style: { width: column.width }, key: idx }); }) ); }, render: function render() { var _this2 = this; var _state = this.state, displayStart = _state.displayStart, displayEnd = _state.displayEnd; var _props = this.props, rowHeight = _props.rowHeight, rowsCount = _props.rowsCount; var rows = this.getRows(displayStart, displayEnd).map(function (r, idx) { return _this2.renderRow({ key: 'row-' + (displayStart + idx), ref: function ref(node) { return _this2.rows[idx] = node; }, idx: displayStart + idx, visibleStart: _this2.props.visibleStart, visibleEnd: _this2.props.visibleEnd, row: r.row, height: rowHeight, onMouseOver: _this2.onMouseOver, columns: _this2.props.columns, isSelected: _this2.isRowSelected(displayStart + idx, r.row, displayStart, displayEnd), expandedRows: _this2.props.expandedRows, cellMetaData: _this2.props.cellMetaData, subRowDetails: r.subRowDetails, colVisibleStart: _this2.props.colVisibleStart, colVisibleEnd: _this2.props.colVisibleEnd, colDisplayStart: _this2.props.colDisplayStart, colDisplayEnd: _this2.props.colDisplayEnd, isScrolling: _this2.props.isScrolling }); }); this._currentRowsLength = rows.length; if (displayStart > 0) { rows.unshift(this.renderPlaceholder('top', displayStart * rowHeight)); } if (rowsCount - displayEnd > 0) { rows.push(this.renderPlaceholder('bottom', (rowsCount - displayEnd) * rowHeight)); } var style = { position: 'absolute', top: 0, left: 0, overflowX: 'auto', overflowY: 'scroll', width: this.props.totalWidth, height: this.props.height }; return React.createElement( 'div', { style: style, onScroll: this.onScroll, className: joinClasses('react-grid-Canvas', this.props.className, { opaque: this.props.cellMetaData.selected && this.props.cellMetaData.selected.active }) }, React.createElement(_RowsContainer2['default'], { width: this.props.width, rows: rows, contextMenu: this.props.contextMenu, rowIdx: this.props.cellMetaData.selected.rowIdx, idx: this.props.cellMetaData.selected.idx }) ); } }); module.exports = Canvas; /***/ }), /* 163 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _react = __webpack_require__(2); var _react2 = _interopRequireDefault(_react); var _AppConstants = __webpack_require__(33); var _AppConstants2 = _interopRequireDefault(_AppConstants); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var CellExpand = _react2['default'].createClass({ displayName: 'CellExpand', getInitialState: function getInitialState() { var expanded = this.props.expandableOptions && this.props.expandableOptions.expanded; return { expanded: expanded }; }, propTypes: { expandableOptions: _react.PropTypes.object.isRequired, onCellExpand: _react.PropTypes.func.isRequired }, onCellExpand: function onCellExpand(e) { this.setState({ expanded: !this.state.expanded }); this.props.onCellExpand(e); }, render: function render() { return _react2['default'].createElement( 'span', { className: 'rdg-cell-expand', onClick: this.onCellExpand }, this.state.expanded ? _AppConstants2['default'].CellExpand.DOWN_TRIANGLE : _AppConstants2['default'].CellExpand.RIGHT_TRIANGLE ); } }); exports['default'] = CellExpand; /***/ }), /* 164 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _react = __webpack_require__(2); var _react2 = _interopRequireDefault(_react); var _classnames = __webpack_require__(7); var _classnames2 = _interopRequireDefault(_classnames); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var ChildRowDeleteButton = function ChildRowDeleteButton(_ref) { var treeDepth = _ref.treeDepth, cellHeight = _ref.cellHeight, siblingIndex = _ref.siblingIndex, numberSiblings = _ref.numberSiblings, onDeleteSubRow = _ref.onDeleteSubRow, _ref$allowAddChildRow = _ref.allowAddChildRow, allowAddChildRow = _ref$allowAddChildRow === undefined ? true : _ref$allowAddChildRow; var lastSibling = siblingIndex === numberSiblings - 1; var className = (0, _classnames2['default'])({ 'rdg-child-row-action-cross': allowAddChildRow === true || !lastSibling }, { 'rdg-child-row-action-cross-last': allowAddChildRow === false && (lastSibling || numberSiblings === 1) }); var height = 12; var width = 12; var left = treeDepth * 15; var top = (cellHeight - 12) / 2; return _react2['default'].createElement( 'div', null, _react2['default'].createElement('div', { className: className }), _react2['default'].createElement( 'div', { style: { left: left, top: top, width: width, height: height }, className: 'rdg-child-row-btn', onClick: onDeleteSubRow }, _react2['default'].createElement('div', { className: 'glyphicon glyphicon-remove-sign' }) ) ); }; exports['default'] = ChildRowDeleteButton; /***/ }), /* 165 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var isValidElement = __webpack_require__(2).isValidElement; module.exports = function sameColumn(a, b) { var k = void 0; for (k in a) { if (a.hasOwnProperty(k)) { if (typeof a[k] === 'function' && typeof b[k] === 'function' || isValidElement(a[k]) && isValidElement(b[k])) { continue; } if (!b.hasOwnProperty(k) || a[k] !== b[k]) { return false; } } } for (k in b) { if (b.hasOwnProperty(k) && !a.hasOwnProperty(k)) { return false; } } return true; }; /***/ }), /* 166 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var _reactDom = __webpack_require__(4); var _reactDom2 = _interopRequireDefault(_reactDom); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var ColumnMetrics = __webpack_require__(34); var DOMMetrics = __webpack_require__(23); Object.assign = __webpack_require__(71); var PropTypes = __webpack_require__(2).PropTypes; var ColumnUtils = __webpack_require__(8); var Column = function Column() { _classCallCheck(this, Column); }; module.exports = { mixins: [DOMMetrics.MetricsMixin], propTypes: { columns: PropTypes.arrayOf(Column), minColumnWidth: PropTypes.number, columnEquality: PropTypes.func, onColumnResize: PropTypes.func }, DOMMetrics: { gridWidth: function gridWidth() { return _reactDom2['default'].findDOMNode(this).parentElement.offsetWidth; } }, getDefaultProps: function getDefaultProps() { return { minColumnWidth: 80, columnEquality: ColumnMetrics.sameColumn }; }, componentWillMount: function componentWillMount() { this._mounted = true; }, componentWillReceiveProps: function componentWillReceiveProps(nextProps) { if (nextProps.columns) { if (!ColumnMetrics.sameColumns(this.props.columns, nextProps.columns, this.props.columnEquality) || nextProps.minWidth !== this.props.minWidth) { var columnMetrics = this.createColumnMetrics(nextProps); this.setState({ columnMetrics: columnMetrics }); } } }, getTotalWidth: function getTotalWidth() { var totalWidth = 0; if (this._mounted) { totalWidth = this.DOMMetrics.gridWidth(); } else { totalWidth = ColumnUtils.getSize(this.props.columns) * this.props.minColumnWidth; } return totalWidth; }, getColumnMetricsType: function getColumnMetricsType(metrics) { var totalWidth = metrics.totalWidth || this.getTotalWidth(); var currentMetrics = { columns: metrics.columns, totalWidth: totalWidth, minColumnWidth: metrics.minColumnWidth }; var updatedMetrics = ColumnMetrics.recalculate(currentMetrics); return updatedMetrics; }, getColumn: function getColumn(idx) { var columns = this.state.columnMetrics.columns; if (Array.isArray(columns)) { return columns[idx]; } else if (typeof Immutable !== 'undefined') { return columns.get(idx); } }, getSize: function getSize() { var columns = this.state.columnMetrics.columns; if (Array.isArray(columns)) { return columns.length; } else if (typeof Immutable !== 'undefined') { return columns.size; } }, metricsUpdated: function metricsUpdated() { var columnMetrics = this.createColumnMetrics(); this.setState({ columnMetrics: columnMetrics }); }, createColumnMetrics: function createColumnMetrics() { var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props; var gridColumns = this.setupGridColumns(props); return this.getColumnMetricsType({ columns: gridColumns, minColumnWidth: this.props.minColumnWidth, totalWidth: props.minWidth }); }, onColumnResize: function onColumnResize(index, width) { var columnMetrics = ColumnMetrics.resizeColumn(this.state.columnMetrics, index, width); this.setState({ columnMetrics: columnMetrics }); if (this.props.onColumnResize) { this.props.onColumnResize(index, width); } } }; /***/ }), /* 167 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = __webpack_require__(2); var PropTypes = React.PropTypes; var createObjectWithProperties = __webpack_require__(17); __webpack_require__(19); // The list of the propTypes that we want to include in the Draggable div var knownDivPropertyKeys = ['onDragStart', 'onDragEnd', 'onDrag', 'style']; var Draggable = React.createClass({ displayName: 'Draggable', propTypes: { onDragStart: PropTypes.func, onDragEnd: PropTypes.func, onDrag: PropTypes.func, component: PropTypes.oneOfType([PropTypes.func, PropTypes.constructor]), style: PropTypes.object }, getDefaultProps: function getDefaultProps() { return { onDragStart: function onDragStart() { return true; }, onDragEnd: function onDragEnd() {}, onDrag: function onDrag() {} }; }, getInitialState: function getInitialState() { return { drag: null }; }, componentWillUnmount: function componentWillUnmount() { this.cleanUp(); }, onMouseDown: function onMouseDown(e) { var drag = this.props.onDragStart(e); if (drag === null && e.button !== 0) { return; } window.addEventListener('mouseup', this.onMouseUp); window.addEventListener('mousemove', this.onMouseMove); window.addEventListener('touchend', this.onMouseUp); window.addEventListener('touchmove', this.onMouseMove); this.setState({ drag: drag }); }, onMouseMove: function onMouseMove(e) { if (this.state.drag === null) { return; } if (e.preventDefault) { e.preventDefault(); } this.props.onDrag(e); }, onMouseUp: function onMouseUp(e) { this.cleanUp(); this.props.onDragEnd(e, this.state.drag); this.setState({ drag: null }); }, cleanUp: function cleanUp() { window.removeEventListener('mouseup', this.onMouseUp); window.removeEventListener('mousemove', this.onMouseMove); window.removeEventListener('touchend', this.onMouseUp); window.removeEventListener('touchmove', this.onMouseMove); }, getKnownDivProps: function getKnownDivProps() { return createObjectWithProperties(this.props, knownDivPropertyKeys); }, render: function render() { return React.createElement('div', _extends({}, this.getKnownDivProps(), { onMouseDown: this.onMouseDown, onTouchStart: this.onMouseDown, className: 'react-grid-HeaderCell__draggable' })); } }); module.exports = Draggable; /***/ }), /* 168 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _react = __webpack_require__(2); var _react2 = _interopRequireDefault(_react); var _ColumnUtils = __webpack_require__(8); var _ColumnUtils2 = _interopRequireDefault(_ColumnUtils); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var EmptyChildRow = function (_React$Component) { _inherits(EmptyChildRow, _React$Component); function EmptyChildRow() { _classCallCheck(this, EmptyChildRow); var _this = _possibleConstructorReturn(this, _React$Component.call(this)); _this.onAddSubRow = _this.onAddSubRow.bind(_this); return _this; } EmptyChildRow.prototype.onAddSubRow = function onAddSubRow() { this.props.onAddSubRow(this.props.parentRowId); }; EmptyChildRow.prototype.getFixedColumnsWidth = function getFixedColumnsWidth() { var fixedWidth = 0; var size = _ColumnUtils2['default'].getSize(this.props.columns); for (var i = 0; i < size; i++) { var column = _ColumnUtils2['default'].getColumn(this.props.columns, i); if (column) { if (_ColumnUtils2['default'].getValue(column, 'locked')) { fixedWidth += _ColumnUtils2['default'].getValue(column, 'width'); } } } return fixedWidth; }; EmptyChildRow.prototype.render = function render() { var _this2 = this; var _props = this.props, cellHeight = _props.cellHeight, treeDepth = _props.treeDepth; var height = 12; var width = 12; var left = treeDepth * 15; var top = (cellHeight - 12) / 2; var style = { height: cellHeight, borderBottom: '1px solid #dddddd' }; var expandColumn = _ColumnUtils2['default'].getColumn(this.props.columns.filter(function (c) { return c.key === _this2.props.expandColumnKey; }), 0); var cellLeft = expandColumn ? expandColumn.left : 0; return _react2['default'].createElement( 'div', { className: 'react-grid-Row rdg-add-child-row-container', style: style }, _react2['default'].createElement( 'div', { className: 'react-grid-Cell', style: { position: 'absolute', height: cellHeight, width: '100%', left: cellLeft } }, _react2['default'].createElement( 'div', { className: 'rdg-empty-child-row', style: { marginLeft: '30px', lineHeight: cellHeight + 'px' } }, _react2['default'].createElement('div', { className: '\'rdg-child-row-action-cross rdg-child-row-action-cross-last' }), _react2['default'].createElement( 'div', { style: { left: left, top: top, width: width, height: height }, className: 'rdg-child-row-btn', onClick: this.onAddSubRow }, _react2['default'].createElement('div', { className: 'glyphicon glyphicon-plus-sign' }) ) ) ) ); }; return EmptyChildRow; }(_react2['default'].Component); EmptyChildRow.propTypes = { treeDepth: _react.PropTypes.number.isRequired, cellHeight: _react.PropTypes.number.isRequired, onAddSubRow: _react.PropTypes.func.isRequired, parentRowId: _react.PropTypes.number, columns: _react.PropTypes.array.isRequired, expandColumnKey: _react.PropTypes.string.isRequired }; exports['default'] = EmptyChildRow; /***/ }), /* 169 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var React = __webpack_require__(2); var PropTypes = React.PropTypes; var Header = __webpack_require__(171); var Viewport = __webpack_require__(181); var GridScrollMixin = __webpack_require__(170); var DOMMetrics = __webpack_require__(23); var cellMetaDataShape = __webpack_require__(14); __webpack_require__(26); var Grid = React.createClass({ displayName: 'Grid', propTypes: { rowGetter: PropTypes.oneOfType([PropTypes.array, PropTypes.func]).isRequired, columns: PropTypes.oneOfType([PropTypes.array, PropTypes.object]), columnMetrics: PropTypes.object, minHeight: PropTypes.number, totalWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), headerRows: PropTypes.oneOfType([PropTypes.array, PropTypes.func]), rowHeight: PropTypes.number, rowRenderer: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), emptyRowsView: PropTypes.func, expandedRows: PropTypes.oneOfType([PropTypes.array, PropTypes.func]), selectedRows: PropTypes.oneOfType([PropTypes.array, PropTypes.func]), rowSelection: React.PropTypes.oneOfType([React.PropTypes.shape({ indexes: React.PropTypes.arrayOf(React.PropTypes.number).isRequired }), React.PropTypes.shape({ isSelectedKey: React.PropTypes.string.isRequired }), React.PropTypes.shape({ keys: React.PropTypes.shape({ values: React.PropTypes.array.isRequired, rowKey: React.PropTypes.string.isRequired }).isRequired })]), rowsCount: PropTypes.number, onRows: PropTypes.func, sortColumn: React.PropTypes.string, sortDirection: React.PropTypes.oneOf(['ASC', 'DESC', 'NONE']), rowOffsetHeight: PropTypes.number.isRequired, onViewportKeydown: PropTypes.func.isRequired, onViewportKeyup: PropTypes.func, onViewportDragStart: PropTypes.func.isRequired, onViewportDragEnd: PropTypes.func.isRequired, onViewportDoubleClick: PropTypes.func.isRequired, onColumnResize: PropTypes.func, onSort: PropTypes.func, onHeaderDrop: PropTypes.func, cellMetaData: PropTypes.shape(cellMetaDataShape), rowKey: PropTypes.string.isRequired, rowScrollTimeout: PropTypes.number, contextMenu: PropTypes.element, getSubRowDetails: PropTypes.func, draggableHeaderCell: PropTypes.func, getValidFilterValues: PropTypes.func, rowGroupRenderer: PropTypes.func, overScan: PropTypes.object }, mixins: [GridScrollMixin, DOMMetrics.MetricsComputatorMixin], getDefaultProps: function getDefaultProps() { return { rowHeight: 35, minHeight: 350 }; }, getStyle: function getStyle() { return { overflow: 'hidden', outline: 0, position: 'relative', minHeight: this.props.minHeight }; }, render: function render() { var _this = this; var headerRows = this.props.headerRows || [{ ref: function ref(node) { return _this.row = node; } }]; var EmptyRowsView = this.props.emptyRowsView; return React.createElement( 'div', { style: this.getStyle(), className: 'react-grid-Grid' }, React.createElement(Header, { ref: function ref(input) { _this.header = input; }, columnMetrics: this.props.columnMetrics, onColumnResize: this.props.onColumnResize, height: this.props.rowHeight, totalWidth: this.props.totalWidth, headerRows: headerRows, sortColumn: this.props.sortColumn, sortDirection: this.props.sortDirection, draggableHeaderCell: this.props.draggableHeaderCell, onSort: this.props.onSort, onHeaderDrop: this.props.onHeaderDrop, onScroll: this.onHeaderScroll, getValidFilterValues: this.props.getValidFilterValues, cellMetaData: this.props.cellMetaData }), this.props.rowsCount >= 1 || this.props.rowsCount === 0 && !this.props.emptyRowsView ? React.createElement( 'div', { ref: function ref(node) { _this.viewPortContainer = node; }, tabIndex: '0', onKeyDown: this.props.onViewportKeydown, onKeyUp: this.props.onViewportKeyup, onDoubleClick: this.props.onViewportDoubleClick, onDragStart: this.props.onViewportDragStart, onDragEnd: this.props.onViewportDragEnd }, React.createElement(Viewport, { ref: function ref(node) { _this.viewport = node; }, rowKey: this.props.rowKey, width: this.props.columnMetrics.width, rowHeight: this.props.rowHeight, rowRenderer: this.props.rowRenderer, rowGetter: this.props.rowGetter, rowsCount: this.props.rowsCount, selectedRows: this.props.selectedRows, expandedRows: this.props.expandedRows, columnMetrics: this.props.columnMetrics, totalWidth: this.props.totalWidth, onScroll: this.onScroll, onRows: this.props.onRows, cellMetaData: this.props.cellMetaData, rowOffsetHeight: this.props.rowOffsetHeight || this.props.rowHeight * headerRows.length, minHeight: this.props.minHeight, rowScrollTimeout: this.props.rowScrollTimeout, contextMenu: this.props.contextMenu, rowSelection: this.props.rowSelection, getSubRowDetails: this.props.getSubRowDetails, rowGroupRenderer: this.props.rowGroupRenderer, overScan: this.props.overScan }) ) : React.createElement( 'div', { ref: function ref(node) { _this.emptyView = node; }, className: 'react-grid-Empty' }, React.createElement(EmptyRowsView, null) ) ); } }); module.exports = Grid; /***/ }), /* 170 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var ReactDOM = __webpack_require__(4); module.exports = { componentDidMount: function componentDidMount() { this._scrollLeft = this.viewport ? this.viewport.getScroll().scrollLeft : 0; this._onScroll(); }, componentDidUpdate: function componentDidUpdate() { this._onScroll(); }, componentWillMount: function componentWillMount() { this._scrollLeft = undefined; }, componentWillUnmount: function componentWillUnmount() { this._scrollLeft = undefined; }, onScroll: function onScroll(props) { if (this._scrollLeft !== props.scrollLeft) { this._scrollLeft = props.scrollLeft; this._onScroll(); } }, onHeaderScroll: function onHeaderScroll(e) { var scrollLeft = e.target.scrollLeft; if (this._scrollLeft !== scrollLeft) { this._scrollLeft = scrollLeft; this.header.setScrollLeft(scrollLeft); var canvas = ReactDOM.findDOMNode(this.viewport.canvas); canvas.scrollLeft = scrollLeft; this.viewport.canvas.setScrollLeft(scrollLeft); } }, _onScroll: function _onScroll() { if (this._scrollLeft !== undefined) { this.header.setScrollLeft(this._scrollLeft); if (this.viewport) { this.viewport.setScrollLeft(this._scrollLeft); } } } }; /***/ }), /* 171 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = __webpack_require__(2); var ReactDOM = __webpack_require__(4); var joinClasses = __webpack_require__(7); var shallowCloneObject = __webpack_require__(37); var ColumnMetrics = __webpack_require__(34); var ColumnUtils = __webpack_require__(8); var HeaderRow = __webpack_require__(173); var getScrollbarSize = __webpack_require__(36); var PropTypes = React.PropTypes; var createObjectWithProperties = __webpack_require__(17); var cellMetaDataShape = __webpack_require__(14); __webpack_require__(19); // The list of the propTypes that we want to include in the Header div var knownDivPropertyKeys = ['height', 'onScroll']; var Header = React.createClass({ displayName: 'Header', propTypes: { columnMetrics: PropTypes.shape({ width: PropTypes.number.isRequired, columns: PropTypes.any }).isRequired, totalWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), height: PropTypes.number.isRequired, headerRows: PropTypes.array.isRequired, sortColumn: PropTypes.string, sortDirection: PropTypes.oneOf(['ASC', 'DESC', 'NONE']), onSort: PropTypes.func, onColumnResize: PropTypes.func, onScroll: PropTypes.func, onHeaderDrop: PropTypes.func, draggableHeaderCell: PropTypes.func, getValidFilterValues: PropTypes.func, cellMetaData: PropTypes.shape(cellMetaDataShape) }, getInitialState: function getInitialState() { return { resizing: null }; }, componentWillReceiveProps: function componentWillReceiveProps() { this.setState({ resizing: null }); }, shouldComponentUpdate: function shouldComponentUpdate(nextProps, nextState) { var update = !ColumnMetrics.sameColumns(this.props.columnMetrics.columns, nextProps.columnMetrics.columns, ColumnMetrics.sameColumn) || this.props.totalWidth !== nextProps.totalWidth || this.props.headerRows.length !== nextProps.headerRows.length || this.state.resizing !== nextState.resizing || this.props.sortColumn !== nextProps.sortColumn || this.props.sortDirection !== nextProps.sortDirection; return update; }, onColumnResize: function onColumnResize(column, width) { var state = this.state.resizing || this.props; var pos = this.getColumnPosition(column); if (pos != null) { var _resizing = { columnMetrics: shallowCloneObject(state.columnMetrics) }; _resizing.columnMetrics = ColumnMetrics.resizeColumn(_resizing.columnMetrics, pos, width); // we don't want to influence scrollLeft while resizing if (_resizing.columnMetrics.totalWidth < state.columnMetrics.totalWidth) { _resizing.columnMetrics.totalWidth = state.columnMetrics.totalWidth; } _resizing.column = ColumnUtils.getColumn(_resizing.columnMetrics.columns, pos); this.setState({ resizing: _resizing }); } }, onColumnResizeEnd: function onColumnResizeEnd(column, width) { var pos = this.getColumnPosition(column); if (pos !== null && this.props.onColumnResize) { this.props.onColumnResize(pos, width || column.width); } }, getHeaderRows: function getHeaderRows() { var _this = this; var columnMetrics = this.getColumnMetrics(); var resizeColumn = void 0; if (this.state.resizing) { resizeColumn = this.state.resizing.column; } var headerRows = []; this.props.headerRows.forEach(function (row, index) { // To allow header filters to be visible var rowHeight = 'auto'; if (row.rowType === 'filter') { rowHeight = '500px'; } var scrollbarSize = getScrollbarSize() > 0 ? getScrollbarSize() : 0; var updatedWidth = isNaN(_this.props.totalWidth - scrollbarSize) ? _this.props.totalWidth : _this.props.totalWidth - scrollbarSize; var headerRowStyle = { position: 'absolute', top: _this.getCombinedHeaderHeights(index), left: 0, width: updatedWidth, overflowX: 'hidden', minHeight: rowHeight }; headerRows.push(React.createElement(HeaderRow, { key: row.ref, ref: function ref(node) { return _this.row = node; }, rowType: row.rowType, style: headerRowStyle, onColumnResize: _this.onColumnResize, onColumnResizeEnd: _this.onColumnResizeEnd, width: columnMetrics.width, height: row.height || _this.props.height, columns: columnMetrics.columns, resizing: resizeColumn, draggableHeaderCell: _this.props.draggableHeaderCell, filterable: row.filterable, onFilterChange: row.onFilterChange, onHeaderDrop: _this.props.onHeaderDrop, sortColumn: _this.props.sortColumn, sortDirection: _this.props.sortDirection, onSort: _this.props.onSort, onScroll: _this.props.onScroll, getValidFilterValues: _this.props.getValidFilterValues })); }); return headerRows; }, getColumnMetrics: function getColumnMetrics() { var columnMetrics = void 0; if (this.state.resizing) { columnMetrics = this.state.resizing.columnMetrics; } else { columnMetrics = this.props.columnMetrics; } return columnMetrics; }, getColumnPosition: function getColumnPosition(column) { var columnMetrics = this.getColumnMetrics(); var pos = -1; columnMetrics.columns.forEach(function (c, idx) { if (c.key === column.key) { pos = idx; } }); return pos === -1 ? null : pos; }, getCombinedHeaderHeights: function getCombinedHeaderHeights(until) { var stopAt = this.props.headerRows.length; if (typeof until !== 'undefined') { stopAt = until; } var height = 0; for (var index = 0; index < stopAt; index++) { height += this.props.headerRows[index].height || this.props.height; } return height; }, getStyle: function getStyle() { return { position: 'relative', height: this.getCombinedHeaderHeights() }; }, setScrollLeft: function setScrollLeft(scrollLeft) { var node = ReactDOM.findDOMNode(this.row); node.scrollLeft = scrollLeft; this.row.setScrollLeft(scrollLeft); if (this.filterRow) { var nodeFilters = this.filterRow; nodeFilters.scrollLeft = scrollLeft; this.filterRow.setScrollLeft(scrollLeft); } }, getKnownDivProps: function getKnownDivProps() { return createObjectWithProperties(this.props, knownDivPropertyKeys); }, // Set the cell selection to -1 x -1 when clicking on the header onHeaderClick: function onHeaderClick() { this.props.cellMetaData.onCellClick({ rowIdx: -1, idx: -1 }); }, render: function render() { var className = joinClasses({ 'react-grid-Header': true, 'react-grid-Header--resizing': !!this.state.resizing }); var headerRows = this.getHeaderRows(); return React.createElement( 'div', _extends({}, this.getKnownDivProps(), { style: this.getStyle(), className: className, onClick: this.onHeaderClick }), headerRows ); } }); module.exports = Header; /***/ }), /* 172 */ /***/ (function(module, exports) { "use strict"; var HeaderCellType = { SORTABLE: 0, FILTERABLE: 1, NONE: 2, CHECKBOX: 3 }; module.exports = HeaderCellType; /***/ }), /* 173 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = __webpack_require__(2); var shallowEqual = __webpack_require__(70); var BaseHeaderCell = __webpack_require__(60); var getScrollbarSize = __webpack_require__(36); var ExcelColumn = __webpack_require__(11); var ColumnUtilsMixin = __webpack_require__(8); var SortableHeaderCell = __webpack_require__(184); var FilterableHeaderCell = __webpack_require__(183); var HeaderCellType = __webpack_require__(172); var createObjectWithProperties = __webpack_require__(17); __webpack_require__(19); var PropTypes = React.PropTypes; var HeaderRowStyle = { overflow: React.PropTypes.string, width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), height: React.PropTypes.number, position: React.PropTypes.string }; // The list of the propTypes that we want to include in the HeaderRow div var knownDivPropertyKeys = ['width', 'height', 'style', 'onScroll']; var HeaderRow = React.createClass({ displayName: 'HeaderRow', propTypes: { width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), height: PropTypes.number.isRequired, columns: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).isRequired, onColumnResize: PropTypes.func, onSort: PropTypes.func.isRequired, onColumnResizeEnd: PropTypes.func, style: PropTypes.shape(HeaderRowStyle), sortColumn: PropTypes.string, sortDirection: React.PropTypes.oneOf(Object.keys(SortableHeaderCell.DEFINE_SORT)), cellRenderer: PropTypes.func, headerCellRenderer: PropTypes.func, filterable: PropTypes.bool, onFilterChange: PropTypes.func, resizing: PropTypes.object, onScroll: PropTypes.func, rowType: PropTypes.string, draggableHeaderCell: PropTypes.func, onHeaderDrop: PropTypes.func }, mixins: [ColumnUtilsMixin], componentWillMount: function componentWillMount() { this.cells = []; }, shouldComponentUpdate: function shouldComponentUpdate(nextProps) { return nextProps.width !== this.props.width || nextProps.height !== this.props.height || nextProps.columns !== this.props.columns || !shallowEqual(nextProps.style, this.props.style) || this.props.sortColumn !== nextProps.sortColumn || this.props.sortDirection !== nextProps.sortDirection; }, getHeaderCellType: function getHeaderCellType(column) { if (column.filterable) { if (this.props.filterable) return HeaderCellType.FILTERABLE; } if (column.sortable) return HeaderCellType.SORTABLE; return HeaderCellType.NONE; }, getFilterableHeaderCell: function getFilterableHeaderCell(column) { var FilterRenderer = FilterableHeaderCell; if (column.filterRenderer !== undefined) { FilterRenderer = column.filterRenderer; } return React.createElement(FilterRenderer, _extends({}, this.props, { onChange: this.props.onFilterChange })); }, getSortableHeaderCell: function getSortableHeaderCell(column) { var sortDirection = this.props.sortColumn === column.key ? this.props.sortDirection : SortableHeaderCell.DEFINE_SORT.NONE; return React.createElement(SortableHeaderCell, { columnKey: column.key, onSort: this.props.onSort, sortDirection: sortDirection }); }, getHeaderRenderer: function getHeaderRenderer(column) { var renderer = void 0; if (column.headerRenderer && !this.props.filterable) { renderer = column.headerRenderer; } else { var headerCellType = this.getHeaderCellType(column); switch (headerCellType) { case HeaderCellType.SORTABLE: renderer = this.getSortableHeaderCell(column); break; case HeaderCellType.FILTERABLE: renderer = this.getFilterableHeaderCell(column); break; default: break; } } return renderer; }, getStyle: function getStyle() { return { overflow: 'hidden', width: '100%', height: this.props.height, position: 'absolute' }; }, getCells: function getCells() { var _this = this; var cells = []; var lockedCells = []; var _loop = function _loop(i, len) { var column = Object.assign({ rowType: _this.props.rowType }, _this.getColumn(_this.props.columns, i)); var _renderer = _this.getHeaderRenderer(column); if (column.key === 'select-row' && _this.props.rowType === 'filter') { _renderer = React.createElement('div', null); } var HeaderCell = column.draggable ? _this.props.draggableHeaderCell : BaseHeaderCell; var cell = React.createElement(HeaderCell, { ref: function ref(node) { return _this.cells[i] = node; }, key: i, height: _this.props.height, column: column, renderer: _renderer, resizing: _this.props.resizing === column, onResize: _this.props.onColumnResize, onResizeEnd: _this.props.onColumnResizeEnd, onHeaderDrop: _this.props.onHeaderDrop }); if (column.locked) { lockedCells.push(cell); } else { cells.push(cell); } }; for (var i = 0, len = this.getSize(this.props.columns); i < len; i++) { _loop(i, len); } return cells.concat(lockedCells); }, setScrollLeft: function setScrollLeft(scrollLeft) { var _this2 = this; this.props.columns.forEach(function (column, i) { if (column.locked) { _this2.cells[i].setScrollLeft(scrollLeft); } else { if (_this2.cells[i] && _this2.cells[i].removeScroll) { _this2.cells[i].removeScroll(); } } }); }, getKnownDivProps: function getKnownDivProps() { return createObjectWithProperties(this.props, knownDivPropertyKeys); }, render: function render() { var cellsStyle = { width: this.props.width ? this.props.width + getScrollbarSize() : '100%', height: this.props.height, whiteSpace: 'nowrap', overflowX: 'hidden', overflowY: 'hidden' }; var cells = this.getCells(); return React.createElement( 'div', _extends({}, this.getKnownDivProps(), { className: 'react-grid-HeaderRow' }), React.createElement( 'div', { style: cellsStyle }, cells ) ); } }); module.exports = HeaderRow; /***/ }), /* 174 */ /***/ (function(module, exports) { "use strict"; module.exports = { Backspace: 8, Tab: 9, Enter: 13, Shift: 16, Ctrl: 17, Alt: 18, PauseBreak: 19, CapsLock: 20, Escape: 27, PageUp: 33, PageDown: 34, End: 35, Home: 36, LeftArrow: 37, UpArrow: 38, RightArrow: 39, DownArrow: 40, Insert: 45, Delete: 46, 0: 48, 1: 49, 2: 50, 3: 51, 4: 52, 5: 53, 6: 54, 7: 55, 8: 56, 9: 57, a: 65, b: 66, c: 67, d: 68, e: 69, f: 70, g: 71, h: 72, i: 73, j: 74, k: 75, l: 76, m: 77, n: 78, o: 79, p: 80, q: 81, r: 82, s: 83, t: 84, u: 85, v: 86, w: 87, x: 88, y: 89, z: 90, LeftWindowKey: 91, RightWindowKey: 92, SelectKey: 93, NumPad0: 96, NumPad1: 97, NumPad2: 98, NumPad3: 99, NumPad4: 100, NumPad5: 101, NumPad6: 102, NumPad7: 103, NumPad8: 104, NumPad9: 105, Multiply: 106, Add: 107, Subtract: 109, DecimalPoint: 110, Divide: 111, F1: 112, F2: 113, F3: 114, F4: 115, F5: 116, F6: 117, F7: 118, F8: 119, F9: 120, F10: 121, F12: 123, NumLock: 144, ScrollLock: 145, SemiColon: 186, EqualSign: 187, Comma: 188, Dash: 189, Period: 190, ForwardSlash: 191, GraveAccent: 192, OpenBracket: 219, BackSlash: 220, CloseBracket: 221, SingleQuote: 222 }; /***/ }), /* 175 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports.OverflowCellComponent = undefined; var _react = __webpack_require__(2); var _react2 = _interopRequireDefault(_react); var _focusableComponentWrapper = __webpack_require__(187); var _focusableComponentWrapper2 = _interopRequireDefault(_focusableComponentWrapper); __webpack_require__(39); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var OverflowCell = function (_React$Component) { _inherits(OverflowCell, _React$Component); function OverflowCell() { _classCallCheck(this, OverflowCell); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); } OverflowCell.prototype.getStyle = function getStyle() { var style = { position: 'absolute', width: this.props.column.width, height: this.props.height, left: this.props.column.left, border: '1px solid #eee' }; return style; }; OverflowCell.prototype.render = function render() { return _react2['default'].createElement('div', { tabIndex: '-1', style: this.getStyle(), width: '100%', className: 'react-grid-Cell' }); }; return OverflowCell; }(_react2['default'].Component); OverflowCell.isSelected = function (props) { var cellMetaData = props.cellMetaData, rowIdx = props.rowIdx, idx = props.idx; if (cellMetaData == null) { return false; } var selected = cellMetaData.selected; return selected && selected.rowIdx === rowIdx && selected.idx === idx; }; OverflowCell.isScrolling = function (props) { return props.cellMetaData.isScrollingHorizontallyWithKeyboard; }; OverflowCell.propTypes = { rowIdx: _react2['default'].PropTypes.number, idx: _react2['default'].PropTypes.number, height: _react2['default'].PropTypes.number, column: _react2['default'].PropTypes.object, cellMetaData: _react2['default'].PropTypes.object }; OverflowCell.displayName = 'Cell'; var OverflowCellComponent = OverflowCell; exports['default'] = (0, _focusableComponentWrapper2['default'])(OverflowCell); exports.OverflowCellComponent = OverflowCellComponent; /***/ }), /* 176 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _ExcelColumn = __webpack_require__(11); var _ExcelColumn2 = _interopRequireDefault(_ExcelColumn); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } exports['default'] = { ExcelColumn: _ExcelColumn2['default'] }; /***/ }), /* 177 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _AppConstants = __webpack_require__(33); var _AppConstants2 = _interopRequireDefault(_AppConstants); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var React = __webpack_require__(2); var ReactDOM = __webpack_require__(4); var BaseGrid = __webpack_require__(169); var Row = __webpack_require__(35); var ExcelColumn = __webpack_require__(11); var KeyboardHandlerMixin = __webpack_require__(61); var CheckboxEditor = __webpack_require__(65); var DOMMetrics = __webpack_require__(23); var ColumnMetricsMixin = __webpack_require__(166); var RowUtils = __webpack_require__(63); var ColumnUtils = __webpack_require__(8); var KeyCodes = __webpack_require__(174); __webpack_require__(26); __webpack_require__(72); if (!Object.assign) { Object.assign = __webpack_require__(71); } var ReactDataGrid = React.createClass({ displayName: 'ReactDataGrid', mixins: [ColumnMetricsMixin, DOMMetrics.MetricsComputatorMixin, KeyboardHandlerMixin], propTypes: { rowHeight: React.PropTypes.number.isRequired, headerRowHeight: React.PropTypes.number, headerFiltersHeight: React.PropTypes.number, minHeight: React.PropTypes.number.isRequired, minWidth: React.PropTypes.number, enableRowSelect: React.PropTypes.oneOfType([React.PropTypes.bool, React.PropTypes.string]), onRowUpdated: React.PropTypes.func, rowGetter: React.PropTypes.func.isRequired, rowsCount: React.PropTypes.number.isRequired, toolbar: React.PropTypes.element, enableCellSelect: React.PropTypes.bool, columns: React.PropTypes.oneOfType([React.PropTypes.object, React.PropTypes.array]).isRequired, onFilter: React.PropTypes.func, onCellCopyPaste: React.PropTypes.func, onCellsDragged: React.PropTypes.func, onAddFilter: React.PropTypes.func, onGridSort: React.PropTypes.func, onDragHandleDoubleClick: React.PropTypes.func, onGridRowsUpdated: React.PropTypes.func, onRowSelect: React.PropTypes.func, rowKey: React.PropTypes.string, rowScrollTimeout: React.PropTypes.number, onClearFilters: React.PropTypes.func, contextMenu: React.PropTypes.element, cellNavigationMode: React.PropTypes.oneOf(['none', 'loopOverRow', 'changeRow']), onCellSelected: React.PropTypes.func, onCellDeSelected: React.PropTypes.func, onCellExpand: React.PropTypes.func, enableDragAndDrop: React.PropTypes.bool, onRowExpandToggle: React.PropTypes.func, draggableHeaderCell: React.PropTypes.func, getValidFilterValues: React.PropTypes.func, rowSelection: React.PropTypes.shape({ enableShiftSelect: React.PropTypes.bool, onRowsSelected: React.PropTypes.func, onRowsDeselected: React.PropTypes.func, showCheckbox: React.PropTypes.bool, selectBy: React.PropTypes.oneOfType([React.PropTypes.shape({ indexes: React.PropTypes.arrayOf(React.PropTypes.number).isRequired }), React.PropTypes.shape({ isSelectedKey: React.PropTypes.string.isRequired }), React.PropTypes.shape({ keys: React.PropTypes.shape({ values: React.PropTypes.array.isRequired, rowKey: React.PropTypes.string.isRequired }).isRequired })]).isRequired }), onRowClick: React.PropTypes.func, onGridKeyUp: React.PropTypes.func, onGridKeyDown: React.PropTypes.func, rowGroupRenderer: React.PropTypes.func, rowActionsCell: React.PropTypes.func, onCheckCellIsEditable: React.PropTypes.func, /* called before cell is set active, returns a boolean to determine whether cell is editable */ overScan: React.PropTypes.object, onDeleteSubRow: React.PropTypes.func, onAddSubRow: React.PropTypes.func }, getDefaultProps: function getDefaultProps() { return { enableCellSelect: false, tabIndex: -1, rowHeight: 35, headerFiltersHeight: 45, enableRowSelect: false, minHeight: 350, rowKey: 'id', rowScrollTimeout: 0, cellNavigationMode: 'none', overScan: { colsStart: 5, colsEnd: 5, rowsStart: 5, rowsEnd: 5 } }; }, getInitialState: function getInitialState() { var columnMetrics = this.createColumnMetrics(); var initialState = { columnMetrics: columnMetrics, selectedRows: [], copied: null, expandedRows: [], canFilter: false, columnFilters: {}, sortDirection: null, sortColumn: null, dragged: null, scrollOffset: 0, lastRowIdxUiSelected: -1 }; if (this.props.enableCellSelect) { initialState.selected = { rowIdx: 0, idx: 0 }; } else { initialState.selected = { rowIdx: -1, idx: -1 }; } return initialState; }, hasSelectedCellChanged: function hasSelectedCellChanged(selected) { var previouslySelected = Object.assign({}, this.state.selected); return previouslySelected.rowIdx !== selected.rowIdx || previouslySelected.idx !== selected.idx || previouslySelected.active === false; }, onContextMenuHide: function onContextMenuHide() { document.removeEventListener('click', this.onContextMenuHide); var newSelected = Object.assign({}, this.state.selected, { contextMenuDisplayed: false }); this.setState({ selected: newSelected }); }, onColumnEvent: function onColumnEvent(ev, columnEvent) { var idx = columnEvent.idx, name = columnEvent.name; if (name && typeof idx !== 'undefined') { var column = this.getColumn(idx); if (column && column.events && column.events[name] && typeof column.events[name] === 'function') { var eventArgs = { rowIdx: columnEvent.rowIdx, idx: idx, column: column }; column.events[name](ev, eventArgs); } } }, onSelect: function onSelect(selected) { var _this = this; if (this.state.selected.rowIdx !== selected.rowIdx || this.state.selected.idx !== selected.idx || this.state.selected.active === false) { var _idx = selected.idx; var _rowIdx = selected.rowIdx; if (this.isCellWithinBounds(selected)) { var oldSelection = this.state.selected; this.setState({ selected: selected }, function () { if (typeof _this.props.onCellDeSelected === 'function') { _this.props.onCellDeSelected(oldSelection); } if (typeof _this.props.onCellSelected === 'function') { _this.props.onCellSelected(selected); } }); } else if (_rowIdx === -1 && _idx === -1) { // When it's outside of the grid, set rowIdx anyway this.setState({ selected: { idx: _idx, rowIdx: _rowIdx } }); } } }, onCellClick: function onCellClick(cell) { this.onSelect({ rowIdx: cell.rowIdx, idx: cell.idx }); if (this.props.onRowClick && typeof this.props.onRowClick === 'function') { this.props.onRowClick(cell.rowIdx, this.props.rowGetter(cell.rowIdx)); } }, onCellContextMenu: function onCellContextMenu(cell) { this.onSelect({ rowIdx: cell.rowIdx, idx: cell.idx, contextMenuDisplayed: this.props.contextMenu }); if (this.props.contextMenu) { document.addEventListener('click', this.onContextMenuHide); } }, onCellDoubleClick: function onCellDoubleClick(cell) { this.onSelect({ rowIdx: cell.rowIdx, idx: cell.idx }); this.setActive('DoubleClick'); }, onViewportDoubleClick: function onViewportDoubleClick() { this.setActive(); }, onPressArrowUp: function onPressArrowUp(e) { this.moveSelectedCell(e, -1, 0); }, onPressArrowDown: function onPressArrowDown(e) { this.moveSelectedCell(e, 1, 0); }, onPressArrowLeft: function onPressArrowLeft(e) { this.moveSelectedCell(e, 0, -1); }, onPressArrowRight: function onPressArrowRight(e) { this.moveSelectedCell(e, 0, 1); }, onPressTab: function onPressTab(e) { this.moveSelectedCell(e, 0, e.shiftKey ? -1 : 1); }, onPressEnter: function onPressEnter(e) { this.setActive(e.key); }, onPressDelete: function onPressDelete(e) { this.setActive(e.key); }, onPressEscape: function onPressEscape(e) { this.setInactive(e.key); this.handleCancelCopy(); }, onPressBackspace: function onPressBackspace(e) { this.setActive(e.key); }, onPressChar: function onPressChar(e) { if (this.isKeyPrintable(e.keyCode)) { this.setActive(e.keyCode); } }, onPressKeyWithCtrl: function onPressKeyWithCtrl(e) { var keys = { KeyCode_c: 99, KeyCode_C: 67, KeyCode_V: 86, KeyCode_v: 118 }; var rowIdx = this.state.selected.rowIdx; var row = this.props.rowGetter(rowIdx); var idx = this.state.selected.idx; var col = this.getColumn(idx); if (ColumnUtils.canEdit(col, row, this.props.enableCellSelect)) { if (e.keyCode === keys.KeyCode_c || e.keyCode === keys.KeyCode_C) { var _value = this.getSelectedValue(); this.handleCopy({ value: _value }); } else if (e.keyCode === keys.KeyCode_v || e.keyCode === keys.KeyCode_V) { this.handlePaste(); } } }, onGridRowsUpdated: function onGridRowsUpdated(cellKey, fromRow, toRow, updated, action, originRow) { var rowIds = []; for (var i = fromRow; i <= toRow; i++) { rowIds.push(this.props.rowGetter(i)[this.props.rowKey]); } var fromRowData = this.props.rowGetter(action === 'COPY_PASTE' ? originRow : fromRow); var fromRowId = fromRowData[this.props.rowKey]; var toRowId = this.props.rowGetter(toRow)[this.props.rowKey]; this.props.onGridRowsUpdated({ cellKey: cellKey, fromRow: fromRow, toRow: toRow, fromRowId: fromRowId, toRowId: toRowId, rowIds: rowIds, updated: updated, action: action, fromRowData: fromRowData }); }, onCellCommit: function onCellCommit(commit) { var selected = Object.assign({}, this.state.selected); selected.active = false; if (commit.key === 'Tab') { selected.idx += 1; } var expandedRows = this.state.expandedRows; // if(commit.changed && commit.changed.expandedHeight){ // expandedRows = this.expandRow(commit.rowIdx, commit.changed.expandedHeight); // } this.setState({ selected: selected, expandedRows: expandedRows }); if (this.props.onRowUpdated) { this.props.onRowUpdated(commit); } var targetRow = commit.rowIdx; if (this.props.onGridRowsUpdated) { this.onGridRowsUpdated(commit.cellKey, targetRow, targetRow, commit.updated, _AppConstants2['default'].UpdateActions.CELL_UPDATE); } }, onDragStart: function onDragStart(e) { var idx = this.state.selected.idx; // To prevent dragging down/up when reordering rows. var isViewportDragging = e && e.target && e.target.className; if (idx > -1 && isViewportDragging) { var _value2 = this.getSelectedValue(); this.handleDragStart({ idx: this.state.selected.idx, rowIdx: this.state.selected.rowIdx, value: _value2 }); // need to set dummy data for FF if (e && e.dataTransfer) { if (e.dataTransfer.setData) { e.dataTransfer.dropEffect = 'move'; e.dataTransfer.effectAllowed = 'move'; e.dataTransfer.setData('text/plain', ''); } } } }, onToggleFilter: function onToggleFilter() { var _this2 = this; // setState() does not immediately mutate this.state but creates a pending state transition. // Therefore if you want to do something after the state change occurs, pass it in as a callback function. this.setState({ canFilter: !this.state.canFilter }, function () { if (_this2.state.canFilter === false && _this2.props.onClearFilters) { _this2.props.onClearFilters(); } }); }, onDragHandleDoubleClick: function onDragHandleDoubleClick(e) { if (this.props.onDragHandleDoubleClick) { this.props.onDragHandleDoubleClick(e); } if (this.props.onGridRowsUpdated) { var _onGridRowsUpdated; var cellKey = this.getColumn(e.idx).key; this.onGridRowsUpdated(cellKey, e.rowIdx, this.props.rowsCount - 1, (_onGridRowsUpdated = {}, _onGridRowsUpdated[cellKey] = e.rowData[cellKey], _onGridRowsUpdated), _AppConstants2['default'].UpdateActions.COLUMN_FILL); } }, onCellExpand: function onCellExpand(args) { if (this.props.onCellExpand) { this.props.onCellExpand(args); } }, onRowExpandToggle: function onRowExpandToggle(args) { if (typeof this.props.onRowExpandToggle === 'function') { this.props.onRowExpandToggle(args); } }, isCellWithinBounds: function isCellWithinBounds(_ref) { var idx = _ref.idx, rowIdx = _ref.rowIdx; return idx >= 0 && rowIdx >= 0 && idx < ColumnUtils.getSize(this.state.columnMetrics.columns) && rowIdx < this.props.rowsCount; }, handleDragStart: function handleDragStart(dragged) { if (!this.dragEnabled()) { return; } if (this.isCellWithinBounds(dragged)) { this.setState({ dragged: dragged }); } }, handleDragEnd: function handleDragEnd() { if (!this.dragEnabled()) { return; } var _state = this.state, selected = _state.selected, dragged = _state.dragged; var column = this.getColumn(this.state.selected.idx); if (selected && dragged && column) { var cellKey = column.key; var fromRow = selected.rowIdx < dragged.overRowIdx ? selected.rowIdx : dragged.overRowIdx; var toRow = selected.rowIdx > dragged.overRowIdx ? selected.rowIdx : dragged.overRowIdx; if (this.props.onCellsDragged) { this.props.onCellsDragged({ cellKey: cellKey, fromRow: fromRow, toRow: toRow, value: dragged.value }); } if (this.props.onGridRowsUpdated) { var _onGridRowsUpdated2; this.onGridRowsUpdated(cellKey, fromRow, toRow, (_onGridRowsUpdated2 = {}, _onGridRowsUpdated2[cellKey] = dragged.value, _onGridRowsUpdated2), _AppConstants2['default'].UpdateActions.CELL_DRAG); } } this.setState({ dragged: { complete: true } }); }, handleDragEnter: function handleDragEnter(row) { if (!this.dragEnabled() || this.state.dragged == null) { return; } var dragged = this.state.dragged; dragged.overRowIdx = row; this.setState({ dragged: dragged }); }, handleTerminateDrag: function handleTerminateDrag() { if (!this.dragEnabled()) { return; } this.setState({ dragged: null }); }, handlePaste: function handlePaste() { if (!this.copyPasteEnabled() || !this.state.copied) { return; } var selected = this.state.selected; var cellKey = this.getColumn(this.state.selected.idx).key; var textToCopy = this.state.textToCopy; var fromRow = this.state.copied.rowIdx; var toRow = selected.rowIdx; if (this.props.onCellCopyPaste) { this.props.onCellCopyPaste({ cellKey: cellKey, rowIdx: toRow, value: textToCopy, fromRow: fromRow, toRow: toRow }); } if (this.props.onGridRowsUpdated) { var _onGridRowsUpdated3; this.onGridRowsUpdated(cellKey, toRow, toRow, (_onGridRowsUpdated3 = {}, _onGridRowsUpdated3[cellKey] = textToCopy, _onGridRowsUpdated3), _AppConstants2['default'].UpdateActions.COPY_PASTE, fromRow); } }, handleCancelCopy: function handleCancelCopy() { this.setState({ copied: null }); }, handleCopy: function handleCopy(args) { if (!this.copyPasteEnabled()) { return; } var textToCopy = args.value; var selected = this.state.selected; var copied = { idx: selected.idx, rowIdx: selected.rowIdx }; this.setState({ textToCopy: textToCopy, copied: copied }); }, handleSort: function handleSort(columnKey, direction) { this.setState({ sortDirection: direction, sortColumn: columnKey }, function () { this.props.onGridSort(columnKey, direction); }); }, getSelectedRow: function getSelectedRow(rows, key) { var _this3 = this; var selectedRow = rows.filter(function (r) { if (r[_this3.props.rowKey] === key) { return true; } return false; }); if (selectedRow.length > 0) { return selectedRow[0]; } }, useNewRowSelection: function useNewRowSelection() { return this.props.rowSelection && this.props.rowSelection.selectBy; }, // return false if not a shift select so can be handled as normal row selection handleShiftSelect: function handleShiftSelect(rowIdx) { if (this.state.lastRowIdxUiSelected > -1 && this.isSingleKeyDown(KeyCodes.Shift)) { var _props$rowSelection$s = this.props.rowSelection.selectBy, keys = _props$rowSelection$s.keys, indexes = _props$rowSelection$s.indexes, isSelectedKey = _props$rowSelection$s.isSelectedKey; var isPreviouslySelected = RowUtils.isRowSelected(keys, indexes, isSelectedKey, this.props.rowGetter(rowIdx), rowIdx); if (isPreviouslySelected) return false; var handled = false; if (rowIdx > this.state.lastRowIdxUiSelected) { var rowsSelected = []; for (var i = this.state.lastRowIdxUiSelected + 1; i <= rowIdx; i++) { rowsSelected.push({ rowIdx: i, row: this.props.rowGetter(i) }); } if (typeof this.props.rowSelection.onRowsSelected === 'function') { this.props.rowSelection.onRowsSelected(rowsSelected); } handled = true; } else if (rowIdx < this.state.lastRowIdxUiSelected) { var _rowsSelected = []; for (var _i = rowIdx; _i <= this.state.lastRowIdxUiSelected - 1; _i++) { _rowsSelected.push({ rowIdx: _i, row: this.props.rowGetter(_i) }); } if (typeof this.props.rowSelection.onRowsSelected === 'function') { this.props.rowSelection.onRowsSelected(_rowsSelected); } handled = true; } if (handled) { this.setState({ lastRowIdxUiSelected: rowIdx }); } return handled; } return false; }, handleNewRowSelect: function handleNewRowSelect(rowIdx, rowData) { if (this.selectAllCheckbox && this.selectAllCheckbox.checked === true) { this.selectAllCheckbox.checked = false; } var _props$rowSelection$s2 = this.props.rowSelection.selectBy, keys = _props$rowSelection$s2.keys, indexes = _props$rowSelection$s2.indexes, isSelectedKey = _props$rowSelection$s2.isSelectedKey; var isPreviouslySelected = RowUtils.isRowSelected(keys, indexes, isSelectedKey, rowData, rowIdx); this.setState({ lastRowIdxUiSelected: isPreviouslySelected ? -1 : rowIdx, selected: { rowIdx: rowIdx, idx: 0 } }); if (isPreviouslySelected && typeof this.props.rowSelection.onRowsDeselected === 'function') { this.props.rowSelection.onRowsDeselected([{ rowIdx: rowIdx, row: rowData }]); } else if (!isPreviouslySelected && typeof this.props.rowSelection.onRowsSelected === 'function') { this.props.rowSelection.onRowsSelected([{ rowIdx: rowIdx, row: rowData }]); } }, // columnKey not used here as this function will select the whole row, // but needed to match the function signature in the CheckboxEditor handleRowSelect: function handleRowSelect(rowIdx, columnKey, rowData, e) { e.stopPropagation(); if (this.useNewRowSelection()) { if (this.props.rowSelection.enableShiftSelect === true) { if (!this.handleShiftSelect(rowIdx)) { this.handleNewRowSelect(rowIdx, rowData); } } else { this.handleNewRowSelect(rowIdx, rowData); } } else { // Fallback to old onRowSelect handler var _selectedRows = this.props.enableRowSelect === 'single' ? [] : this.state.selectedRows.slice(0); var selectedRow = this.getSelectedRow(_selectedRows, rowData[this.props.rowKey]); if (selectedRow) { selectedRow.isSelected = !selectedRow.isSelected; } else { rowData.isSelected = true; _selectedRows.push(rowData); } this.setState({ selectedRows: _selectedRows, selected: { rowIdx: rowIdx, idx: 0 } }); if (this.props.onRowSelect) { this.props.onRowSelect(_selectedRows.filter(function (r) { return r.isSelected === true; })); } } }, handleCheckboxChange: function handleCheckboxChange(e) { var allRowsSelected = void 0; if (e.currentTarget instanceof HTMLInputElement && e.currentTarget.checked === true) { allRowsSelected = true; } else { allRowsSelected = false; } if (this.useNewRowSelection()) { var _props$rowSelection$s3 = this.props.rowSelection.selectBy, keys = _props$rowSelection$s3.keys, indexes = _props$rowSelection$s3.indexes, isSelectedKey = _props$rowSelection$s3.isSelectedKey; if (allRowsSelected && typeof this.props.rowSelection.onRowsSelected === 'function') { var _selectedRows2 = []; for (var i = 0; i < this.props.rowsCount; i++) { var rowData = this.props.rowGetter(i); if (!RowUtils.isRowSelected(keys, indexes, isSelectedKey, rowData, i)) { _selectedRows2.push({ rowIdx: i, row: rowData }); } } if (_selectedRows2.length > 0) { this.props.rowSelection.onRowsSelected(_selectedRows2); } } else if (!allRowsSelected && typeof this.props.rowSelection.onRowsDeselected === 'function') { var deselectedRows = []; for (var _i2 = 0; _i2 < this.props.rowsCount; _i2++) { var _rowData = this.props.rowGetter(_i2); if (RowUtils.isRowSelected(keys, indexes, isSelectedKey, _rowData, _i2)) { deselectedRows.push({ rowIdx: _i2, row: _rowData }); } } if (deselectedRows.length > 0) { this.props.rowSelection.onRowsDeselected(deselectedRows); } } } else { var _selectedRows3 = []; for (var _i3 = 0; _i3 < this.props.rowsCount; _i3++) { var row = Object.assign({}, this.props.rowGetter(_i3), { isSelected: allRowsSelected }); _selectedRows3.push(row); } this.setState({ selectedRows: _selectedRows3 }); if (typeof this.props.onRowSelect === 'function') { this.props.onRowSelect(_selectedRows3.filter(function (r) { return r.isSelected === true; })); } } }, getScrollOffSet: function getScrollOffSet() { var scrollOffset = 0; var canvas = ReactDOM.findDOMNode(this).querySelector('.react-grid-Canvas'); if (canvas) { scrollOffset = canvas.offsetWidth - canvas.clientWidth; } this.setState({ scrollOffset: scrollOffset }); }, getRowOffsetHeight: function getRowOffsetHeight() { var offsetHeight = 0; this.getHeaderRows().forEach(function (row) { return offsetHeight += parseFloat(row.height, 10); }); return offsetHeight; }, getHeaderRows: function getHeaderRows() { var _this4 = this; var rows = [{ ref: function ref(node) { return _this4.row = node; }, height: this.props.headerRowHeight || this.props.rowHeight, rowType: 'header' }]; if (this.state.canFilter === true) { rows.push({ ref: function ref(node) { return _this4.filterRow = node; }, filterable: true, onFilterChange: this.props.onAddFilter, height: this.props.headerFiltersHeight, rowType: 'filter' }); } return rows; }, getInitialSelectedRows: function getInitialSelectedRows() { var selectedRows = []; for (var i = 0; i < this.props.rowsCount; i++) { selectedRows.push(false); } return selectedRows; }, getRowSelectionProps: function getRowSelectionProps() { if (this.props.rowSelection) { return this.props.rowSelection.selectBy; } return null; }, getSelectedRows: function getSelectedRows() { if (this.props.rowSelection) { return null; } return this.state.selectedRows.filter(function (r) { return r.isSelected === true; }); }, getSelectedValue: function getSelectedValue() { var rowIdx = this.state.selected.rowIdx; var idx = this.state.selected.idx; var cellKey = this.getColumn(idx).key; var row = this.props.rowGetter(rowIdx); return RowUtils.get(row, cellKey); }, moveSelectedCell: function moveSelectedCell(e, rowDelta, cellDelta) { // we need to prevent default as we control grid scroll // otherwise it moves every time you left/right which is janky e.preventDefault(); var rowIdx = void 0; var idx = void 0; var cellNavigationMode = this.props.cellNavigationMode; if (cellNavigationMode !== 'none') { var _calculateNextSelecti = this.calculateNextSelectionPosition(cellNavigationMode, cellDelta, rowDelta); idx = _calculateNextSelecti.idx; rowIdx = _calculateNextSelecti.rowIdx; } else { rowIdx = this.state.selected.rowIdx + rowDelta; idx = this.state.selected.idx + cellDelta; } this.scrollToColumn(idx); this.onSelect({ idx: idx, rowIdx: rowIdx }); }, getNbrColumns: function getNbrColumns() { var _props = this.props, columns = _props.columns, enableRowSelect = _props.enableRowSelect; return enableRowSelect ? columns.length + 1 : columns.length; }, getDataGridDOMNode: function getDataGridDOMNode() { if (!this._gridNode) { this._gridNode = ReactDOM.findDOMNode(this); } return this._gridNode; }, calculateNextSelectionPosition: function calculateNextSelectionPosition(cellNavigationMode, cellDelta, rowDelta) { var _rowDelta = rowDelta; var idx = this.state.selected.idx + cellDelta; var nbrColumns = this.getNbrColumns(); if (cellDelta > 0) { if (this.isAtLastCellInRow(nbrColumns)) { if (cellNavigationMode === 'changeRow') { _rowDelta = this.isAtLastRow() ? rowDelta : rowDelta + 1; idx = this.isAtLastRow() ? idx : 0; } else { idx = 0; } } } else if (cellDelta < 0) { if (this.isAtFirstCellInRow()) { if (cellNavigationMode === 'changeRow') { _rowDelta = this.isAtFirstRow() ? rowDelta : rowDelta - 1; idx = this.isAtFirstRow() ? 0 : nbrColumns - 1; } else { idx = nbrColumns - 1; } } } var rowIdx = this.state.selected.rowIdx + _rowDelta; return { idx: idx, rowIdx: rowIdx }; }, isAtLastCellInRow: function isAtLastCellInRow(nbrColumns) { return this.state.selected.idx === nbrColumns - 1; }, isAtLastRow: function isAtLastRow() { return this.state.selected.rowIdx === this.props.rowsCount - 1; }, isAtFirstCellInRow: function isAtFirstCellInRow() { return this.state.selected.idx === 0; }, isAtFirstRow: function isAtFirstRow() { return this.state.selected.rowIdx === 0; }, openCellEditor: function openCellEditor(rowIdx, idx) { var _this5 = this; var row = this.props.rowGetter(rowIdx); var col = this.getColumn(idx); if (!ColumnUtils.canEdit(col, row, this.props.enableCellSelect)) { return; } var selected = { rowIdx: rowIdx, idx: idx }; if (this.hasSelectedCellChanged(selected)) { this.setState({ selected: selected }, function () { _this5.setActive('Enter'); }); } else { this.setActive('Enter'); } }, scrollToColumn: function scrollToColumn(colIdx) { var canvas = ReactDOM.findDOMNode(this).querySelector('.react-grid-Canvas'); if (canvas) { var left = 0; var locked = 0; for (var i = 0; i < colIdx; i++) { var column = this.getColumn(i); if (column) { if (column.width) { left += column.width; } if (column.locked) { locked += column.width; } } } var selectedColumn = this.getColumn(colIdx); if (selectedColumn) { var scrollLeft = left - locked - canvas.scrollLeft; var scrollRight = left + selectedColumn.width - canvas.scrollLeft; if (scrollLeft < 0) { canvas.scrollLeft += scrollLeft; } else if (scrollRight > canvas.clientWidth) { var scrollAmount = scrollRight - canvas.clientWidth; canvas.scrollLeft += scrollAmount; } } } }, setActive: function setActive(keyPressed) { var rowIdx = this.state.selected.rowIdx; var row = this.props.rowGetter(rowIdx); var idx = this.state.selected.idx; var column = this.getColumn(idx); if (ColumnUtils.canEdit(column, row, this.props.enableCellSelect) && !this.isActive()) { var _selected = Object.assign({}, this.state.selected, { idx: idx, rowIdx: rowIdx, active: true, initialKeyCode: keyPressed }); var showEditor = true; if (typeof this.props.onCheckCellIsEditable === 'function') { var args = Object.assign({}, { row: row, column: column }, _selected); showEditor = this.props.onCheckCellIsEditable(args); } if (showEditor !== false) { this.setState({ selected: _selected }, this.scrollToColumn(idx)); this.handleCancelCopy(); } } }, setInactive: function setInactive() { var rowIdx = this.state.selected.rowIdx; var row = this.props.rowGetter(rowIdx); var idx = this.state.selected.idx; var col = this.getColumn(idx); if (ColumnUtils.canEdit(col, row, this.props.enableCellSelect) && this.isActive()) { var _selected2 = Object.assign({}, this.state.selected, { idx: idx, rowIdx: rowIdx, active: false }); this.setState({ selected: _selected2 }); } }, isActive: function isActive() { return this.state.selected.active === true; }, setupGridColumns: function setupGridColumns() { var _this6 = this; var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props; var columns = props.columns; if (this._cachedColumns === columns) { return this._cachedComputedColumns; } this._cachedColumns = columns; var cols = columns.slice(0); var unshiftedCols = {}; if (this.props.rowActionsCell || props.enableRowSelect && !this.props.rowSelection || props.rowSelection && props.rowSelection.showCheckbox !== false) { var headerRenderer = props.enableRowSelect === 'single' ? null : React.createElement( 'div', { className: 'react-grid-checkbox-container checkbox-align' }, React.createElement('input', { className: 'react-grid-checkbox', type: 'checkbox', name: 'select-all-checkbox', id: 'select-all-checkbox', ref: function ref(grid) { return _this6.selectAllCheckbox = grid; }, onChange: this.handleCheckboxChange }), React.createElement('label', { htmlFor: 'select-all-checkbox', className: 'react-grid-checkbox-label' }) ); var Formatter = this.props.rowActionsCell ? this.props.rowActionsCell : CheckboxEditor; var selectColumn = { key: 'select-row', name: '', formatter: React.createElement(Formatter, { rowSelection: this.props.rowSelection }), onCellChange: this.handleRowSelect, filterable: false, headerRenderer: headerRenderer, width: 60, locked: true, getRowMetaData: function getRowMetaData(rowData) { return rowData; }, cellClass: this.props.rowActionsCell ? 'rdg-row-actions-cell' : '' }; unshiftedCols = cols.unshift(selectColumn); cols = unshiftedCols > 0 ? cols : unshiftedCols; } this._cachedComputedColumns = cols; return this._cachedComputedColumns; }, copyPasteEnabled: function copyPasteEnabled() { return this.props.onCellCopyPaste !== null; }, dragEnabled: function dragEnabled() { return this.props.onGridRowsUpdated !== undefined || this.props.onCellsDragged !== undefined; }, renderToolbar: function renderToolbar() { var Toolbar = this.props.toolbar; if (React.isValidElement(Toolbar)) { return React.cloneElement(Toolbar, { columns: this.props.columns, onToggleFilter: this.onToggleFilter, numberOfRows: this.props.rowsCount }); } }, render: function render() { var _this7 = this; var cellMetaData = { selected: this.state.selected, dragged: this.state.dragged, hoveredRowIdx: this.state.hoveredRowIdx, onCellClick: this.onCellClick, onCellContextMenu: this.onCellContextMenu, onCellDoubleClick: this.onCellDoubleClick, onCommit: this.onCellCommit, onCommitCancel: this.setInactive, copied: this.state.copied, handleDragEnterRow: this.handleDragEnter, handleTerminateDrag: this.handleTerminateDrag, enableCellSelect: this.props.enableCellSelect, onColumnEvent: this.onColumnEvent, openCellEditor: this.openCellEditor, onDragHandleDoubleClick: this.onDragHandleDoubleClick, onCellExpand: this.onCellExpand, onRowExpandToggle: this.onRowExpandToggle, onRowHover: this.onRowHover, getDataGridDOMNode: this.getDataGridDOMNode, onDeleteSubRow: this.props.onDeleteSubRow, onAddSubRow: this.props.onAddSubRow, isScrollingVerticallyWithKeyboard: this.isKeyDown(KeyCodes.DownArrow) || this.isKeyDown(KeyCodes.UpArrow), isScrollingHorizontallyWithKeyboard: this.isKeyDown(KeyCodes.LeftArrow) || this.isKeyDown(KeyCodes.RightArrow) || this.isKeyDown(KeyCodes.Tab) }; var toolbar = this.renderToolbar(); var containerWidth = this.props.minWidth || this.DOMMetrics.gridWidth(); var gridWidth = containerWidth - this.state.scrollOffset; // depending on the current lifecycle stage, gridWidth() may not initialize correctly // this also handles cases where it always returns undefined -- such as when inside a div with display:none // eg Bootstrap tabs and collapses if (typeof containerWidth === 'undefined' || isNaN(containerWidth) || containerWidth === 0) { containerWidth = '100%'; } if (typeof gridWidth === 'undefined' || isNaN(gridWidth) || gridWidth === 0) { gridWidth = '100%'; } return React.createElement( 'div', { className: 'react-grid-Container', style: { width: containerWidth } }, toolbar, React.createElement( 'div', { className: 'react-grid-Main' }, React.createElement(BaseGrid, _extends({ ref: function ref(node) { return _this7.base = node; } }, this.props, { rowKey: this.props.rowKey, headerRows: this.getHeaderRows(), columnMetrics: this.state.columnMetrics, rowGetter: this.props.rowGetter, rowsCount: this.props.rowsCount, rowHeight: this.props.rowHeight, cellMetaData: cellMetaData, selectedRows: this.getSelectedRows(), rowSelection: this.getRowSelectionProps(), expandedRows: this.state.expandedRows, rowOffsetHeight: this.getRowOffsetHeight(), sortColumn: this.state.sortColumn, sortDirection: this.state.sortDirection, onSort: this.handleSort, minHeight: this.props.minHeight, totalWidth: gridWidth, onViewportKeydown: this.onKeyDown, onViewportKeyup: this.onKeyUp, onViewportDragStart: this.onDragStart, onViewportDragEnd: this.handleDragEnd, onViewportDoubleClick: this.onViewportDoubleClick, onColumnResize: this.onColumnResize, rowScrollTimeout: this.props.rowScrollTimeout, contextMenu: this.props.contextMenu, overScan: this.props.overScan })) ) ); } }); module.exports = ReactDataGrid; /***/ }), /* 178 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = __webpack_require__(2); var Draggable = __webpack_require__(167); __webpack_require__(19); var ResizeHandle = React.createClass({ displayName: 'ResizeHandle', style: { position: 'absolute', top: 0, right: 0, width: 6, height: '100%' }, render: function render() { return React.createElement(Draggable, _extends({}, this.props, { className: 'react-grid-HeaderCell__resizeHandle', style: this.style })); } }); module.exports = ResizeHandle; /***/ }), /* 179 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _react = __webpack_require__(2); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(4); var _reactDom2 = _interopRequireDefault(_reactDom); var _classnames = __webpack_require__(7); var _classnames2 = _interopRequireDefault(_classnames); __webpack_require__(27); var _utils = __webpack_require__(68); var _utils2 = _interopRequireDefault(_utils); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var RowGroup = function (_Component) { _inherits(RowGroup, _Component); function RowGroup() { _classCallCheck(this, RowGroup); var _this = _possibleConstructorReturn(this, _Component.call(this)); _this.checkFocus = _this.checkFocus.bind(_this); _this.isSelected = _this.isSelected.bind(_this); _this.onClick = _this.onClick.bind(_this); _this.onRowExpandToggle = _this.onRowExpandToggle.bind(_this); _this.onKeyDown = _this.onKeyDown.bind(_this); _this.onRowExpandClick = _this.onRowExpandClick.bind(_this); return _this; } RowGroup.prototype.componentDidMount = function componentDidMount() { this.checkFocus(); }; RowGroup.prototype.componentDidUpdate = function componentDidUpdate() { this.checkFocus(); }; RowGroup.prototype.isSelected = function isSelected() { var meta = this.props.cellMetaData; if (meta == null) { return false; } return meta.selected && meta.selected.rowIdx === this.props.idx; }; RowGroup.prototype.onClick = function onClick(e) { var meta = this.props.cellMetaData; if (meta != null && meta.onCellClick && typeof meta.onCellClick === 'function') { meta.onCellClick({ rowIdx: this.props.idx, idx: 0 }, e); } }; RowGroup.prototype.onKeyDown = function onKeyDown(e) { if (e.key === 'ArrowLeft') { this.onRowExpandToggle(false); } if (e.key === 'ArrowRight') { this.onRowExpandToggle(true); } if (e.key === 'Enter') { this.onRowExpandToggle(!this.props.isExpanded); } }; RowGroup.prototype.onRowExpandClick = function onRowExpandClick() { this.onRowExpandToggle(!this.props.isExpanded); }; RowGroup.prototype.onRowExpandToggle = function onRowExpandToggle(expand) { var shouldExpand = expand == null ? !this.props.isExpanded : expand; var meta = this.props.cellMetaData; if (meta != null && meta.onRowExpandToggle && typeof meta.onRowExpandToggle === 'function') { meta.onRowExpandToggle({ rowIdx: this.props.idx, shouldExpand: shouldExpand, columnGroupName: this.props.columnGroupName, name: this.props.name }); } }; RowGroup.prototype.getClassName = function getClassName() { return (0, _classnames2['default'])('react-grid-row-group', 'react-grid-Row', { 'row-selected': this.isSelected() }); }; RowGroup.prototype.checkFocus = function checkFocus() { if (this.isSelected()) { _reactDom2['default'].findDOMNode(this).focus(); } }; RowGroup.prototype.render = function render() { var lastColumn = _utils2['default'].last(this.props.columns); var style = { height: '50px', overflow: 'hidden', border: '1px solid #dddddd', paddingTop: '15px', paddingLeft: '5px', width: lastColumn.left + lastColumn.width }; var rowGroupRendererProps = Object.assign({ onRowExpandClick: this.onRowExpandClick }, this.props); return _react2['default'].createElement( 'div', { style: style, className: this.getClassName(), onClick: this.onClick, onKeyDown: this.onKeyDown, tabIndex: -1 }, _react2['default'].createElement(this.props.renderer, rowGroupRendererProps) ); }; return RowGroup; }(_react.Component); RowGroup.propTypes = { name: _react.PropTypes.string.isRequired, columnGroupName: _react.PropTypes.string.isRequired, isExpanded: _react.PropTypes.bool.isRequired, treeDepth: _react.PropTypes.number.isRequired, height: _react.PropTypes.number.isRequired, cellMetaData: _react.PropTypes.object, idx: _react.PropTypes.number.isRequired, renderer: _react.PropTypes.func, columns: _react.PropTypes.array.isRequired }; var DefaultRowGroupRenderer = function DefaultRowGroupRenderer(props) { var treeDepth = props.treeDepth || 0; var marginLeft = treeDepth * 20; return _react2['default'].createElement( 'div', null, _react2['default'].createElement( 'span', { className: 'row-expand-icon', style: { float: 'left', marginLeft: marginLeft, cursor: 'pointer' }, onClick: props.onRowExpandClick }, props.isExpanded ? String.fromCharCode('9660') : String.fromCharCode('9658') ), _react2['default'].createElement( 'strong', null, props.columnGroupName, ' : ', props.name ) ); }; DefaultRowGroupRenderer.propTypes = { onRowExpandClick: _react.PropTypes.func.isRequired, isExpanded: _react.PropTypes.bool.isRequired, treeDepth: _react.PropTypes.number.isRequired, name: _react.PropTypes.string.isRequired, columnGroupName: _react.PropTypes.string.isRequired }; RowGroup.defaultProps = { renderer: DefaultRowGroupRenderer }; exports['default'] = RowGroup; /***/ }), /* 180 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var _reactDom = __webpack_require__(4); var _reactDom2 = _interopRequireDefault(_reactDom); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var ScrollShim = { appendScrollShim: function appendScrollShim() { if (!this._scrollShim) { var size = this._scrollShimSize(); var shim = document.createElement('div'); if (shim.classList) { shim.classList.add('react-grid-ScrollShim'); // flow - not compatible with HTMLElement } else { shim.className += ' react-grid-ScrollShim'; } shim.style.position = 'absolute'; shim.style.top = 0; shim.style.left = 0; shim.style.width = size.width + 'px'; shim.style.height = size.height + 'px'; _reactDom2['default'].findDOMNode(this).appendChild(shim); this._scrollShim = shim; } this._scheduleRemoveScrollShim(); }, _scrollShimSize: function _scrollShimSize() { return { width: this.props.width, height: this.props.length * this.props.rowHeight }; }, _scheduleRemoveScrollShim: function _scheduleRemoveScrollShim() { if (this._scheduleRemoveScrollShimTimer) { clearTimeout(this._scheduleRemoveScrollShimTimer); } this._scheduleRemoveScrollShimTimer = setTimeout(this._removeScrollShim, 200); }, _removeScrollShim: function _removeScrollShim() { if (this._scrollShim) { this._scrollShim.parentNode.removeChild(this._scrollShim); this._scrollShim = undefined; } } }; module.exports = ScrollShim; /***/ }), /* 181 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var React = __webpack_require__(2); var Canvas = __webpack_require__(162); var ViewportScroll = __webpack_require__(182); var cellMetaDataShape = __webpack_require__(14); var PropTypes = React.PropTypes; var Viewport = React.createClass({ displayName: 'Viewport', mixins: [ViewportScroll], propTypes: { rowOffsetHeight: PropTypes.number.isRequired, totalWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired, columnMetrics: PropTypes.object.isRequired, rowGetter: PropTypes.oneOfType([PropTypes.array, PropTypes.func]).isRequired, selectedRows: PropTypes.array, rowSelection: React.PropTypes.oneOfType([React.PropTypes.shape({ indexes: React.PropTypes.arrayOf(React.PropTypes.number).isRequired }), React.PropTypes.shape({ isSelectedKey: React.PropTypes.string.isRequired }), React.PropTypes.shape({ keys: React.PropTypes.shape({ values: React.PropTypes.array.isRequired, rowKey: React.PropTypes.string.isRequired }).isRequired })]), expandedRows: PropTypes.array, rowRenderer: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), rowsCount: PropTypes.number.isRequired, rowHeight: PropTypes.number.isRequired, onRows: PropTypes.func, onScroll: PropTypes.func, minHeight: PropTypes.number, cellMetaData: PropTypes.shape(cellMetaDataShape), rowKey: PropTypes.string.isRequired, rowScrollTimeout: PropTypes.number, contextMenu: PropTypes.element, getSubRowDetails: PropTypes.func, rowGroupRenderer: PropTypes.func }, onScroll: function onScroll(scroll) { this.updateScroll(scroll.scrollTop, scroll.scrollLeft, this.state.height, this.props.rowHeight, this.props.rowsCount); if (this.props.onScroll) { this.props.onScroll({ scrollTop: scroll.scrollTop, scrollLeft: scroll.scrollLeft }); } }, getScroll: function getScroll() { return this.canvas.getScroll(); }, setScrollLeft: function setScrollLeft(scrollLeft) { this.canvas.setScrollLeft(scrollLeft); }, render: function render() { var _this = this; var style = { padding: 0, bottom: 0, left: 0, right: 0, overflow: 'hidden', position: 'absolute', top: this.props.rowOffsetHeight }; return React.createElement( 'div', { className: 'react-grid-Viewport', style: style }, React.createElement(Canvas, { ref: function ref(node) { return _this.canvas = node; }, rowKey: this.props.rowKey, totalWidth: this.props.totalWidth, width: this.props.columnMetrics.width, rowGetter: this.props.rowGetter, rowsCount: this.props.rowsCount, selectedRows: this.props.selectedRows, expandedRows: this.props.expandedRows, columns: this.props.columnMetrics.columns, rowRenderer: this.props.rowRenderer, displayStart: this.state.displayStart, displayEnd: this.state.displayEnd, visibleStart: this.state.visibleStart, visibleEnd: this.state.visibleEnd, colVisibleStart: this.state.colVisibleStart, colVisibleEnd: this.state.colVisibleEnd, colDisplayStart: this.state.colDisplayStart, colDisplayEnd: this.state.colDisplayEnd, cellMetaData: this.props.cellMetaData, height: this.state.height, rowHeight: this.props.rowHeight, onScroll: this.onScroll, onRows: this.props.onRows, rowScrollTimeout: this.props.rowScrollTimeout, contextMenu: this.props.contextMenu, rowSelection: this.props.rowSelection, getSubRowDetails: this.props.getSubRowDetails, rowGroupRenderer: this.props.rowGroupRenderer, isScrolling: this.state.isScrolling || false }) ); } }); module.exports = Viewport; /***/ }), /* 182 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var _ColumnUtils = __webpack_require__(8); var _ColumnUtils2 = _interopRequireDefault(_ColumnUtils); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var React = __webpack_require__(2); var ReactDOM = __webpack_require__(4); var DOMMetrics = __webpack_require__(23); var min = Math.min; var max = Math.max; var floor = Math.floor; var ceil = Math.ceil; module.exports = { mixins: [DOMMetrics.MetricsMixin], DOMMetrics: { viewportHeight: function viewportHeight() { return ReactDOM.findDOMNode(this).offsetHeight; }, viewportWidth: function viewportWidth() { return ReactDOM.findDOMNode(this).offsetWidth; } }, propTypes: { rowHeight: React.PropTypes.number, rowsCount: React.PropTypes.number.isRequired }, getDefaultProps: function getDefaultProps() { return { rowHeight: 30 }; }, getInitialState: function getInitialState() { return this.getGridState(this.props); }, getGridState: function getGridState(props) { var totalNumberColumns = _ColumnUtils2['default'].getSize(props.columnMetrics.columns); var canvasHeight = props.minHeight - props.rowOffsetHeight; var renderedRowsCount = ceil((props.minHeight - props.rowHeight) / props.rowHeight); var totalRowCount = min(renderedRowsCount * 4, props.rowsCount); return { displayStart: 0, displayEnd: totalRowCount, visibleStart: 0, visibleEnd: totalRowCount, height: canvasHeight, scrollTop: 0, scrollLeft: 0, colVisibleStart: 0, colVisibleEnd: totalNumberColumns, colDisplayStart: 0, colDisplayEnd: totalNumberColumns }; }, getRenderedColumnCount: function getRenderedColumnCount(displayStart, width) { var remainingWidth = width && width > 0 ? width : this.props.columnMetrics.totalWidth; if (remainingWidth === 0) { remainingWidth = ReactDOM.findDOMNode(this).offsetWidth; } var columnIndex = displayStart; var columnCount = 0; while (remainingWidth > 0) { var column = _ColumnUtils2['default'].getColumn(this.props.columnMetrics.columns, columnIndex); if (!column) { break; } columnCount++; columnIndex++; remainingWidth -= column.width; } return columnCount; }, getVisibleColStart: function getVisibleColStart(scrollLeft) { var remainingScroll = scrollLeft; var columnIndex = -1; while (remainingScroll >= 0) { columnIndex++; remainingScroll -= _ColumnUtils2['default'].getColumn(this.props.columnMetrics.columns, columnIndex).width; } return columnIndex; }, resetScrollStateAfterDelay: function resetScrollStateAfterDelay() { if (this.resetScrollStateTimeoutId) { clearTimeout(this.resetScrollStateTimeoutId); } this.resetScrollStateTimeoutId = setTimeout(this.resetScrollStateAfterDelayCallback, 500); }, resetScrollStateAfterDelayCallback: function resetScrollStateAfterDelayCallback() { this.resetScrollStateTimeoutId = null; this.setState({ isScrolling: false }); }, updateScroll: function updateScroll(scrollTop, scrollLeft, height, rowHeight, length, width) { var isScrolling = true; this.resetScrollStateAfterDelay(); var renderedRowsCount = ceil(height / rowHeight); var visibleStart = max(0, floor(scrollTop / rowHeight)); var visibleEnd = min(visibleStart + renderedRowsCount, length); var displayStart = max(0, visibleStart - this.props.overScan.rowsStart); var displayEnd = min(visibleEnd + this.props.overScan.rowsEnd, length); var totalNumberColumns = _ColumnUtils2['default'].getSize(this.props.columnMetrics.columns); var colVisibleStart = totalNumberColumns > 0 ? max(0, this.getVisibleColStart(scrollLeft)) : 0; var renderedColumnCount = this.getRenderedColumnCount(colVisibleStart, width); var colVisibleEnd = renderedColumnCount !== 0 ? colVisibleStart + renderedColumnCount : totalNumberColumns; var colDisplayStart = max(0, colVisibleStart - this.props.overScan.colsStart); var colDisplayEnd = min(colVisibleEnd + this.props.overScan.colsEnd, totalNumberColumns); var nextScrollState = { visibleStart: visibleStart, visibleEnd: visibleEnd, displayStart: displayStart, displayEnd: displayEnd, height: height, scrollTop: scrollTop, scrollLeft: scrollLeft, colVisibleStart: colVisibleStart, colVisibleEnd: colVisibleEnd, colDisplayStart: colDisplayStart, colDisplayEnd: colDisplayEnd, isScrolling: isScrolling }; this.setState(nextScrollState); }, metricsUpdated: function metricsUpdated() { var height = this.DOMMetrics.viewportHeight(); var width = this.DOMMetrics.viewportWidth(); if (height) { this.updateScroll(this.state.scrollTop, this.state.scrollLeft, height, this.props.rowHeight, this.props.rowsCount, width); } }, componentWillReceiveProps: function componentWillReceiveProps(nextProps) { if (this.props.rowHeight !== nextProps.rowHeight || this.props.minHeight !== nextProps.minHeight || _ColumnUtils2['default'].getSize(this.props.columnMetrics.columns) !== _ColumnUtils2['default'].getSize(nextProps.columnMetrics.columns)) { this.setState(this.getGridState(nextProps)); } else if (this.props.rowsCount !== nextProps.rowsCount) { this.updateScroll(this.state.scrollTop, this.state.scrollLeft, this.state.height, nextProps.rowHeight, nextProps.rowsCount); // Added to fix the hiding of the bottom scrollbar when showing the filters. } else if (this.props.rowOffsetHeight !== nextProps.rowOffsetHeight) { // The value of height can be positive or negative and will be added to the current height to cater for changes in the header height (due to the filer) var _height = this.props.rowOffsetHeight - nextProps.rowOffsetHeight; this.updateScroll(this.state.scrollTop, this.state.scrollLeft, this.state.height + _height, nextProps.rowHeight, nextProps.rowsCount); } } }; /***/ }), /* 183 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var React = __webpack_require__(2); var ExcelColumn = __webpack_require__(11); var FilterableHeaderCell = React.createClass({ displayName: 'FilterableHeaderCell', propTypes: { onChange: React.PropTypes.func.isRequired, column: React.PropTypes.shape(ExcelColumn) }, getInitialState: function getInitialState() { return { filterTerm: '' }; }, handleChange: function handleChange(e) { var val = e.target.value; this.setState({ filterTerm: val }); this.props.onChange({ filterTerm: val, column: this.props.column }); }, renderInput: function renderInput() { if (this.props.column.filterable === false) { return React.createElement('span', null); } var inputKey = 'header-filter-' + this.props.column.key; return React.createElement('input', { key: inputKey, type: 'text', className: 'form-control input-sm', placeholder: 'Search', value: this.state.filterTerm, onChange: this.handleChange }); }, render: function render() { return React.createElement( 'div', null, React.createElement( 'div', { className: 'form-group' }, this.renderInput() ) ); } }); module.exports = FilterableHeaderCell; /***/ }), /* 184 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var React = __webpack_require__(2); var joinClasses = __webpack_require__(7); var DEFINE_SORT = { ASC: 'ASC', DESC: 'DESC', NONE: 'NONE' }; var SortableHeaderCell = React.createClass({ displayName: 'SortableHeaderCell', propTypes: { columnKey: React.PropTypes.string.isRequired, column: React.PropTypes.shape({ name: React.PropTypes.node }), onSort: React.PropTypes.func.isRequired, sortDirection: React.PropTypes.oneOf(Object.keys(DEFINE_SORT)) }, onClick: function onClick() { var direction = void 0; switch (this.props.sortDirection) { default: case null: case undefined: case DEFINE_SORT.NONE: direction = DEFINE_SORT.ASC; break; case DEFINE_SORT.ASC: direction = DEFINE_SORT.DESC; break; case DEFINE_SORT.DESC: direction = DEFINE_SORT.NONE; break; } this.props.onSort(this.props.columnKey, direction); }, getSortByText: function getSortByText() { var unicodeKeys = { ASC: '9650', DESC: '9660' }; return this.props.sortDirection === 'NONE' ? '' : String.fromCharCode(unicodeKeys[this.props.sortDirection]); }, render: function render() { var className = joinClasses({ 'react-grid-HeaderCell-sortable': true, 'react-grid-HeaderCell-sortable--ascending': this.props.sortDirection === 'ASC', 'react-grid-HeaderCell-sortable--descending': this.props.sortDirection === 'DESC' }); return React.createElement( 'div', { className: className, onClick: this.onClick, style: { cursor: 'pointer' } }, React.createElement( 'span', { className: 'pull-right' }, this.getSortByText() ), this.props.column.name ); } }); module.exports = SortableHeaderCell; module.exports.DEFINE_SORT = DEFINE_SORT; /***/ }), /* 185 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var React = __webpack_require__(2); var joinClasses = __webpack_require__(7); var keyboardHandlerMixin = __webpack_require__(61); var SimpleTextEditor = __webpack_require__(67); var isFunction = __webpack_require__(38); __webpack_require__(26); var EditorContainer = React.createClass({ displayName: 'EditorContainer', mixins: [keyboardHandlerMixin], propTypes: { rowIdx: React.PropTypes.number, rowData: React.PropTypes.object.isRequired, value: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.number, React.PropTypes.object, React.PropTypes.bool]).isRequired, cellMetaData: React.PropTypes.shape({ selected: React.PropTypes.object.isRequired, copied: React.PropTypes.object, dragged: React.PropTypes.object, onCellClick: React.PropTypes.func, onCellDoubleClick: React.PropTypes.func, onCommitCancel: React.PropTypes.func, onCommit: React.PropTypes.func }).isRequired, column: React.PropTypes.object.isRequired, height: React.PropTypes.number.isRequired }, changeCommitted: false, getInitialState: function getInitialState() { return { isInvalid: false }; }, componentDidMount: function componentDidMount() { var inputNode = this.getInputNode(); if (inputNode !== undefined) { this.setTextInputFocus(); if (!this.getEditor().disableContainerStyles) { inputNode.className += ' editor-main'; inputNode.style.height = this.props.height - 1 + 'px'; } } }, componentWillUnmount: function componentWillUnmount() { if (!this.changeCommitted && !this.hasEscapeBeenPressed()) { this.commit({ key: 'Enter' }); } }, createEditor: function createEditor() { var _this = this; var editorRef = function editorRef(c) { return _this.editor = c; }; var editorProps = { ref: editorRef, column: this.props.column, value: this.getInitialValue(), onCommit: this.commit, rowMetaData: this.getRowMetaData(), rowData: this.props.rowData, height: this.props.height, onBlur: this.commit, onOverrideKeyDown: this.onKeyDown, onCommitCancel: this.props.cellMetaData.onCommitCancel }; var CustomEditor = this.props.column.editor; // return custom column editor or SimpleEditor if none specified if (React.isValidElement(CustomEditor)) { return React.cloneElement(CustomEditor, editorProps); } if (isFunction(CustomEditor)) { return React.createElement(CustomEditor, _extends({ ref: editorRef }, editorProps)); } return React.createElement(SimpleTextEditor, { ref: editorRef, column: this.props.column, value: this.getInitialValue(), onBlur: this.commit, rowMetaData: this.getRowMetaData(), onKeyDown: function onKeyDown() {}, commit: function commit() {} }); }, onPressEnter: function onPressEnter() { this.commit({ key: 'Enter' }); }, onPressTab: function onPressTab() { this.commit({ key: 'Tab' }); }, onPressEscape: function onPressEscape(e) { if (!this.editorIsSelectOpen()) { this.props.cellMetaData.onCommitCancel(); } else { // prevent event from bubbling if editor has results to select e.stopPropagation(); } }, onPressArrowDown: function onPressArrowDown(e) { if (this.editorHasResults()) { // dont want to propogate as that then moves us round the grid e.stopPropagation(); } else { this.commit(e); } }, onPressArrowUp: function onPressArrowUp(e) { if (this.editorHasResults()) { // dont want to propogate as that then moves us round the grid e.stopPropagation(); } else { this.commit(e); } }, onPressArrowLeft: function onPressArrowLeft(e) { // prevent event propogation. this disables left cell navigation if (!this.isCaretAtBeginningOfInput()) { e.stopPropagation(); } else { this.commit(e); } }, onPressArrowRight: function onPressArrowRight(e) { // prevent event propogation. this disables right cell navigation if (!this.isCaretAtEndOfInput()) { e.stopPropagation(); } else { this.commit(e); } }, editorHasResults: function editorHasResults() { if (isFunction(this.getEditor().hasResults)) { return this.getEditor().hasResults(); } return false; }, editorIsSelectOpen: function editorIsSelectOpen() { if (isFunction(this.getEditor().isSelectOpen)) { return this.getEditor().isSelectOpen(); } return false; }, getRowMetaData: function getRowMetaData() { // clone row data so editor cannot actually change this // convention based method to get corresponding Id or Name of any Name or Id property if (typeof this.props.column.getRowMetaData === 'function') { return this.props.column.getRowMetaData(this.props.rowData, this.props.column); } }, getEditor: function getEditor() { return this.editor; }, getInputNode: function getInputNode() { return this.getEditor().getInputNode(); }, getInitialValue: function getInitialValue() { var selected = this.props.cellMetaData.selected; var keyCode = selected.initialKeyCode; if (keyCode === 'Delete' || keyCode === 'Backspace') { return ''; } else if (keyCode === 'Enter') { return this.props.value; } var text = keyCode ? String.fromCharCode(keyCode) : this.props.value; return text; }, getContainerClass: function getContainerClass() { return joinClasses({ 'has-error': this.state.isInvalid === true }); }, commit: function commit(args) { var opts = args || {}; var updated = this.getEditor().getValue(); if (this.isNewValueValid(updated)) { this.changeCommitted = true; var cellKey = this.props.column.key; this.props.cellMetaData.onCommit({ cellKey: cellKey, rowIdx: this.props.rowIdx, updated: updated, key: opts.key }); } }, isNewValueValid: function isNewValueValid(value) { if (isFunction(this.getEditor().validate)) { var isValid = this.getEditor().validate(value); this.setState({ isInvalid: !isValid }); return isValid; } return true; }, setCaretAtEndOfInput: function setCaretAtEndOfInput() { var input = this.getInputNode(); // taken from http://stackoverflow.com/questions/511088/use-javascript-to-place-cursor-at-end-of-text-in-text-input-element var txtLength = input.value.length; if (input.setSelectionRange) { input.setSelectionRange(txtLength, txtLength); } else if (input.createTextRange) { var fieldRange = input.createTextRange(); fieldRange.moveStart('character', txtLength); fieldRange.collapse(); fieldRange.select(); } }, isCaretAtBeginningOfInput: function isCaretAtBeginningOfInput() { var inputNode = this.getInputNode(); return inputNode.selectionStart === inputNode.selectionEnd && inputNode.selectionStart === 0; }, isCaretAtEndOfInput: function isCaretAtEndOfInput() { var inputNode = this.getInputNode(); return inputNode.selectionStart === inputNode.value.length; }, isBodyClicked: function isBodyClicked(e) { var relatedTarget = this.getRelatedTarget(e); return relatedTarget === null; }, isViewportClicked: function isViewportClicked(e) { var relatedTarget = this.getRelatedTarget(e); return relatedTarget.className.indexOf('react-grid-Viewport') > -1; }, isClickInisdeEditor: function isClickInisdeEditor(e) { var relatedTarget = this.getRelatedTarget(e); return e.currentTarget.contains(relatedTarget) || relatedTarget.className.indexOf('editing') > -1 || relatedTarget.className.indexOf('react-grid-Cell') > -1; }, getRelatedTarget: function getRelatedTarget(e) { return e.relatedTarget || e.explicitOriginalTarget || document.activeElement; // IE11 }, handleRightClick: function handleRightClick(e) { e.stopPropagation(); }, handleBlur: function handleBlur(e) { e.stopPropagation(); if (this.isBodyClicked(e)) { this.commit(e); } if (!this.isBodyClicked(e)) { // prevent null reference if (this.isViewportClicked(e) || !this.isClickInisdeEditor(e)) { this.commit(e); } } }, setTextInputFocus: function setTextInputFocus() { var selected = this.props.cellMetaData.selected; var keyCode = selected.initialKeyCode; var inputNode = this.getInputNode(); inputNode.focus(); if (inputNode.tagName === 'INPUT') { if (!this.isKeyPrintable(keyCode)) { inputNode.focus(); inputNode.select(); } else { inputNode.select(); } } }, hasEscapeBeenPressed: function hasEscapeBeenPressed() { var pressed = false; var escapeKey = 27; if (window.event) { if (window.event.keyCode === escapeKey) { pressed = true; } else if (window.event.which === escapeKey) { pressed = true; } } return pressed; }, renderStatusIcon: function renderStatusIcon() { if (this.state.isInvalid === true) { return React.createElement('span', { className: 'glyphicon glyphicon-remove form-control-feedback' }); } }, render: function render() { return React.createElement( 'div', { className: this.getContainerClass(), onBlur: this.handleBlur, onKeyDown: this.onKeyDown, onContextMenu: this.handleRightClick }, this.createEditor(), this.renderStatusIcon() ); } }); module.exports = EditorContainer; /***/ }), /* 186 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; module.exports = { CheckboxEditor: __webpack_require__(65), EditorBase: __webpack_require__(66), SimpleTextEditor: __webpack_require__(67) }; /***/ }), /* 187 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = __webpack_require__(2); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(4); var _reactDom2 = _interopRequireDefault(_reactDom); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint-disable react/prop-types */ var focusableComponentWrapper = function focusableComponentWrapper(WrappedComponent) { return function (_Component) { _inherits(ComponentWrapper, _Component); function ComponentWrapper() { _classCallCheck(this, ComponentWrapper); var _this = _possibleConstructorReturn(this, _Component.call(this)); _this.checkFocus = _this.checkFocus.bind(_this); _this.state = { isScrolling: false }; return _this; } ComponentWrapper.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { return WrappedComponent.isSelected(this.props) !== WrappedComponent.isSelected(nextProps); }; ComponentWrapper.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { var isScrolling = WrappedComponent.isScrolling(nextProps); if (isScrolling && !this.state.isScrolling) { this.setState({ isScrolling: isScrolling }); } }; ComponentWrapper.prototype.componentDidMount = function componentDidMount() { this.checkFocus(); }; ComponentWrapper.prototype.componentDidUpdate = function componentDidUpdate() { this.checkFocus(); }; ComponentWrapper.prototype.checkFocus = function checkFocus() { if (WrappedComponent.isSelected(this.props) && this.state.isScrolling) { this.focus(); this.setState({ isScrolling: false }); } }; ComponentWrapper.prototype.focus = function focus() { _reactDom2['default'].findDOMNode(this).focus(); }; ComponentWrapper.prototype.render = function render() { return _react2['default'].createElement(WrappedComponent, _extends({}, this.props, this.state)); }; return ComponentWrapper; }(_react.Component); }; exports['default'] = focusableComponentWrapper; /***/ }), /* 188 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var React = __webpack_require__(2); var SimpleCellFormatter = React.createClass({ displayName: 'SimpleCellFormatter', propTypes: { value: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.number, React.PropTypes.object, React.PropTypes.bool]).isRequired }, shouldComponentUpdate: function shouldComponentUpdate(nextProps) { return nextProps.value !== this.props.value; }, render: function render() { return React.createElement( 'div', { title: this.props.value }, this.props.value ); } }); module.exports = SimpleCellFormatter; /***/ }), /* 189 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var _GridPropHelpers = __webpack_require__(190); var _GridPropHelpers2 = _interopRequireDefault(_GridPropHelpers); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } module.exports = { test: { GridPropHelpers: _GridPropHelpers2['default'] } }; /***/ }), /* 190 */ /***/ (function(module, exports) { 'use strict'; var _rows = []; for (var i = 0; i < 1000; i++) { _rows.push({ id: i, title: 'Title ' + i, count: i * 1000 }); } module.exports = { columns: [{ key: 'id', name: 'ID', width: 100 }, { key: 'title', name: 'Title', width: 100 }, { key: 'count', name: 'Count', width: 100 }], rowGetter: function rowGetter(i) { return _rows[i]; }, rowsCount: function rowsCount() { return _rows.length; }, cellMetaData: { selected: { idx: 2, rowIdx: 3 }, dragged: null, copied: null } }; /***/ }), /* 191 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var _RowComparer = __webpack_require__(62); var _RowComparer2 = _interopRequireDefault(_RowComparer); var _RowsContainer = __webpack_require__(64); var _RowsContainer2 = _interopRequireDefault(_RowsContainer); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var Grid = __webpack_require__(177); module.exports = Grid; module.exports.Row = __webpack_require__(35); module.exports.Cell = __webpack_require__(59); module.exports.HeaderCell = __webpack_require__(60); module.exports.RowComparer = _RowComparer2['default']; module.exports.EmptyChildRow = __webpack_require__(168); module.exports.RowsContainer = _RowsContainer2['default']; module.exports.editors = __webpack_require__(186); module.exports.utils = __webpack_require__(68); module.exports.shapes = __webpack_require__(176); module.exports._constants = __webpack_require__(33); module.exports._helpers = __webpack_require__(189); /***/ }), /* 192 */ /***/ (function(module, exports) { "use strict"; var isEmptyArray = function isEmptyArray(obj) { return Array.isArray(obj) && obj.length === 0; }; module.exports = isEmptyArray; /***/ }), /* 193 */ /***/ (function(module, exports) { "use strict"; function isEmpty(obj) { return Object.keys(obj).length === 0 && obj.constructor === Object; } module.exports = isEmpty; /***/ }), /* 194 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var _immutable = __webpack_require__(18); var isImmutableCollection = function isImmutableCollection(objToVerify) { return _immutable.Iterable.isIterable(objToVerify); }; module.exports = isImmutableCollection; /***/ }), /* 195 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var _immutable = __webpack_require__(18); module.exports = _immutable.Map.isMap; /***/ }), /* 196 */ /***/ (function(module, exports) { "use strict"; var getMixedTypeValueRetriever = function getMixedTypeValueRetriever(isImmutable) { var retObj = {}; var retriever = function retriever(item, key) { return item[key]; }; var immutableRetriever = function immutableRetriever(immutable, key) { return immutable.get(key); }; retObj.getValue = isImmutable ? immutableRetriever : retriever; return retObj; }; module.exports = getMixedTypeValueRetriever; /***/ }), /* 197 */ /***/ (function(module, exports, __webpack_require__) { exports = module.exports = __webpack_require__(9)(); // imports // module exports.push([module.id, ".react-grid-Cell{background-color:#fff;padding-left:8px;padding-right:8px;border-right:1px solid #eee;border-bottom:1px solid #ddd}.react-grid-Cell:focus{outline:2px solid #66afe9;outline-offset:-2px}.react-grid-Cell:focus .drag-handle{position:absolute;bottom:-5px;right:-4px;background:#66afe9;width:8px;height:8px;border:1px solid #fff;border-right:0;border-bottom:0;z-index:8;cursor:crosshair;cursor:-webkit-grab}.react-grid-Cell:not(.editing) .react-grid-Cell__value{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.react-grid-Cell:not(.editing):not(.rdg-child-cell) .react-grid-Cell__value{position:relative;top:50%;transform:translateY(-50%)}.rdg-child-cell .react-grid-Cell__value{line-height:35px}.react-grid-Cell.readonly{background-color:#000}.react-grid-Cell.copied{background:rgba(0,0,255,.2)!important}.react-grid-Cell--locked:last-of-type{border-right:1px solid #ddd;box-shadow:none;z-index:99}.react-grid-Cell:hover:focus .drag-handle .glyphicon-arrow-down{display:\"block\"}.react-grid-Cell.is-dragged-over-down{border-right:1px dashed #000;border-left:1px dashed #000;border-bottom:1px dashed #000}.react-grid-Cell.is-dragged-over-up{border-right:1px dashed #000;border-left:1px dashed #000;border-top:1px dashed #000}.react-grid-Cell.is-dragged-over-up .drag-handle{top:-5px}.react-grid-Cell:hover{background:#eee}.react-grid-cell .form-control-feedback{color:#a94442;position:absolute;top:0;right:10px;z-index:1000000;display:block;width:34px;height:34px}.react-grid-Cell.was-dragged-over{border-right:1px dashed #000;border-left:1px dashed #000}.react-grid-Cell:hover:focus .drag-handle{position:absolute;bottom:-8px;right:-7px;background:#fff;width:16px;height:16px;border:1px solid #66afe9;z-index:8;cursor:crosshair;cursor:-webkit-grab}.react-grid-Row.row-selected .react-grid-Cell{background-color:#dbecfa}.react-grid-Cell.editing{padding:0;overflow:visible!important}.react-grid-Cell.editing .has-error input{border:2px solid red!important;border-radius:2px!important}.react-grid-Cell__value ul{margin-top:0;margin-bottom:0;display:inline-block}.react-grid-Cell__value .btn-sm{padding:0}.cell-tooltip{position:relative;display:inline-block}.cell-tooltip .cell-tooltip-text{visibility:hidden;width:150px;background-color:#000;color:#fff;text-align:center;border-radius:6px;padding:5px 0;position:absolute;z-index:1;bottom:-150%;left:50%;margin-left:-60px;opacity:1s}.cell-tooltip:hover .cell-tooltip-text{visibility:visible;opacity:.8}.cell-tooltip .cell-tooltip-text:after{content:\" \";position:absolute;bottom:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:transparent transparent #000}.react-grid-Canvas.opaque .react-grid-Cell.cell-tooltip:hover .cell-tooltip-text{visibility:hidden}.rdg-cell-expand{top:0;right:20px;position:absolute;cursor:pointer}.rdg-child-row-action-cross-last:before,.rdg-child-row-action-cross:before,rdg-child-row-action-cross-last:after,rdg-child-row-action-cross:after{content:\"\";position:absolute;background:grey;height:50%}.rdg-child-row-action-cross:before{left:21px;width:1px;height:35px}.rdg-child-row-action-cross-last:before{left:21px;width:1px}.rdg-child-row-action-cross-last:after,.rdg-child-row-action-cross:after{top:50%;left:20px;height:1px;width:15px;content:\"\";position:absolute;background:grey}.rdg-child-row-action-cross:hover{background:red}.rdg-child-row-btn{position:absolute;cursor:pointer;border:1px solid grey;border-radius:14px;z-index:3;background:#fff}.rdg-child-row-btn div{font-size:12px;text-align:center;line-height:19px;color:grey;height:20px;width:20px;position:absolute;top:60%;left:53%;margin-top:-10px;margin-left:-10px}.rdg-empty-child-row:hover .glyphicon-plus-sign,.rdg-empty-child-row:hover a{color:green}.rdg-child-row-btn .glyphicon-remove-sign:hover{color:red}", ""]); // exports /***/ }), /* 198 */ /***/ (function(module, exports, __webpack_require__) { exports = module.exports = __webpack_require__(9)(); // imports // module exports.push([module.id, ".radio-custom,.react-grid-checkbox{opacity:0;position:absolute}.radio-custom,.radio-custom-label,.react-grid-checkbox,.react-grid-checkbox-label{display:inline-block;vertical-align:middle;cursor:pointer}.radio-custom-label,.react-grid-checkbox-label{position:relative}.radio-custom+.radio-custom-label:before,.react-grid-checkbox+.react-grid-checkbox-label:before{content:\"\";background:#fff;border:2px solid #ddd;display:inline-block;vertical-align:middle;width:20px;height:20px;text-align:center}.react-grid-checkbox:checked+.react-grid-checkbox-label:before{background:#005295;box-shadow:inset 0 0 0 4px #fff}.radio-custom:focus+.radio-custom-label,.react-grid-checkbox:focus+.react-grid-checkbox-label{outline:1px solid #ddd}.react-grid-HeaderCell input[type=checkbox]{z-index:99999}.react-grid-HeaderCell>.react-grid-checkbox-container{padding:0 10px;height:100%}.react-grid-HeaderCell>.react-grid-checkbox-container>.react-grid-checkbox-label{margin:0;position:relative;top:50%;transform:translateY(-50%)}.radio-custom+.radio-custom-label:before{border-radius:50%}.radio-custom:checked+.radio-custom-label:before{background:#ccc;box-shadow:inset 0 0 0 4px #fff}.checkbox-align{text-align:center}", ""]); // exports /***/ }), /* 199 */ /***/ (function(module, exports, __webpack_require__) { exports = module.exports = __webpack_require__(9)(); // imports // module exports.push([module.id, ".react-grid-Container{clear:both;margin-top:0;padding:0}.react-grid-Main{background-color:#fff;color:inherit;padding:0;outline:1px solid #e7eaec;clear:both}.react-grid-Grid{border:1px solid #ddd}.react-grid-Canvas,.react-grid-Grid{background-color:#fff}.react-grid-Cell input.editor-main,select.editor-main{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}input.editor-main:focus,select.editor-main:focus{border-color:#66afe9;border:2px solid #66afe9;background:#eee;border-radius:4px}.react-grid-Cell input.editor-main::-moz-placeholder,select.editor-main::-moz-placeholder{color:#999;opacity:1}.react-grid-Cell input.editor-main:-ms-input-placeholder,select.editor-main:-ms-input-placeholder{color:#999}.react-grid-Cell input.editor-main::-webkit-input-placeholder,select.editor-main::-webkit-input-placeholder{color:#999}.react-grid-Cell input.editor-main[disabled],.react-grid-Cell input.editor-main[readonly],fieldset[disabled] .react-grid-Cell input.editor-main,fieldset[disabled] select.editor-main,select.editor-main[disabled],select.editor-main[readonly]{cursor:not-allowed;background-color:#eee;opacity:1}textarea.react-grid-Cell input.editor-main,textareaselect.editor-main{height:auto}.react-grid-ScrollShim{z-index:10002}", ""]); // exports /***/ }), /* 200 */ /***/ (function(module, exports, __webpack_require__) { exports = module.exports = __webpack_require__(9)(); // imports // module exports.push([module.id, ".react-grid-Header{box-shadow:0 0 4px 0 #ddd;background:#f9f9f9}.react-grid-Header--resizing{cursor:ew-resize}.react-grid-HeaderCell,.react-grid-HeaderRow{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.react-grid-HeaderCell{background:#f9f9f9;padding:8px;font-weight:700;border-right:1px solid #ddd;border-bottom:1px solid #ddd}.react-grid-HeaderCell__value{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;position:relative;top:50%;transform:translateY(-50%)}.react-grid-HeaderCell__resizeHandle:hover{cursor:ew-resize;background:#ddd}.react-grid-HeaderCell--locked:last-of-type{box-shadow:none}.react-grid-HeaderCell--resizing .react-grid-HeaderCell__resizeHandle{background:#ddd}.react-grid-HeaderCell__draggable{cursor:col-resize}.rdg-can-drop>.react-grid-HeaderCell{background:#ececec}.react-grid-HeaderCell .Select{max-height:30px;font-size:12px;font-weight:400}.react-grid-HeaderCell .Select-control{max-height:30px;border:1px solid #ccc;color:#555;border-radius:3px}.react-grid-HeaderCell .is-focused:not(.is-open)>.Select-control{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.react-grid-HeaderCell .Select-control .Select-placeholder{line-height:20px;color:#999;padding:4px}.react-grid-HeaderCell .Select-control .Select-input{max-height:28px;padding:4px;margin-left:0}.react-grid-HeaderCell .Select-control .Select-input input{padding:0;height:100%}.react-grid-HeaderCell .Select-control .Select-arrow-zone .Select-arrow{border-color:gray transparent transparent;border-width:4px 4px 2.5px}.react-grid-HeaderCell .Select-control .Select-value{padding:4px;line-height:20px!important}.react-grid-HeaderCell .Select--multi .Select-control .Select-value{padding:0;line-height:16px!important;max-height:20px}.react-grid-HeaderCell .Select--multi .Select-control .Select-value .Select-value-icon,.react-grid-HeaderCell .Select--multi .Select-control .Select-value .Select-value-label{max-height:20px}.react-grid-HeaderCell .Select-control .Select-value .Select-value-label{color:#555!important}.react-grid-HeaderCell .Select-menu-outer .Select-option{padding:4px;line-height:20px}.react-grid-HeaderCell .Select-menu-outer .Select-menu .Select-option.is-focused,.react-grid-HeaderCell .Select-menu-outer .Select-menu .Select-option.is-selected{color:#555}", ""]); // exports /***/ }), /* 201 */ /***/ (function(module, exports, __webpack_require__) { exports = module.exports = __webpack_require__(9)(); // imports // module exports.push([module.id, ".react-grid-Row.row-context-menu .react-grid-Cell,.react-grid-Row:hover .react-grid-Cell{background-color:#f2f2f2}.react-grid-Row:hover .rdg-row-index{display:none}.react-grid-Row:hover .rdg-actions-checkbox{display:block}.react-grid-Row:hover .rdg-drag-row-handle{cursor:move;cursor:grab;cursor:-moz-grab;cursor:-webkit-grab;width:12px;height:30px;margin-left:0;background-image:url(\"data:image/svg+xml;base64, PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjlweCIgaGVpZ2h0PSIyOXB4IiB2aWV3Qm94PSIwIDAgOSAyOSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggMzkgKDMxNjY3KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5kcmFnIGljb248L3RpdGxlPgogICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+CiAgICA8ZGVmcz48L2RlZnM+CiAgICA8ZyBpZD0iQWN0dWFsaXNhdGlvbi12MiIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9IkRlc2t0b3AiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xNS4wMDAwMDAsIC0yNjIuMDAwMDAwKSIgZmlsbD0iI0Q4RDhEOCI+CiAgICAgICAgICAgIDxnIGlkPSJJbnRlcmFjdGlvbnMiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDE1LjAwMDAwMCwgMjU4LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgPGcgaWQ9IlJvdy1Db250cm9scyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsIDIuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgPGcgaWQ9ImRyYWctaWNvbiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsIDIuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgICAgIDxjaXJjbGUgaWQ9Ik92YWwtMzAiIGN4PSIyIiBjeT0iMiIgcj0iMiI+PC9jaXJjbGU+CiAgICAgICAgICAgICAgICAgICAgICAgIDxjaXJjbGUgaWQ9Ik92YWwtMzAiIGN4PSI3IiBjeT0iMiIgcj0iMiI+PC9jaXJjbGU+CiAgICAgICAgICAgICAgICAgICAgICAgIDxjaXJjbGUgaWQ9Ik92YWwtMzAiIGN4PSIyIiBjeT0iNyIgcj0iMiI+PC9jaXJjbGU+CiAgICAgICAgICAgICAgICAgICAgICAgIDxjaXJjbGUgaWQ9Ik92YWwtMzAiIGN4PSI3IiBjeT0iNyIgcj0iMiI+PC9jaXJjbGU+CiAgICAgICAgICAgICAgICAgICAgICAgIDxjaXJjbGUgaWQ9Ik92YWwtMzAiIGN4PSIyIiBjeT0iMTIiIHI9IjIiPjwvY2lyY2xlPgogICAgICAgICAgICAgICAgICAgICAgICA8Y2lyY2xlIGlkPSJPdmFsLTMwIiBjeD0iNyIgY3k9IjEyIiByPSIyIj48L2NpcmNsZT4KICAgICAgICAgICAgICAgICAgICAgICAgPGNpcmNsZSBpZD0iT3ZhbC0zMCIgY3g9IjIiIGN5PSIxNyIgcj0iMiI+PC9jaXJjbGU+CiAgICAgICAgICAgICAgICAgICAgICAgIDxjaXJjbGUgaWQ9Ik92YWwtMzAiIGN4PSI3IiBjeT0iMTciIHI9IjIiPjwvY2lyY2xlPgogICAgICAgICAgICAgICAgICAgICAgICA8Y2lyY2xlIGlkPSJPdmFsLTMwIiBjeD0iMiIgY3k9IjIyIiByPSIyIj48L2NpcmNsZT4KICAgICAgICAgICAgICAgICAgICAgICAgPGNpcmNsZSBpZD0iT3ZhbC0zMCIgY3g9IjciIGN5PSIyMiIgcj0iMiI+PC9jaXJjbGU+CiAgICAgICAgICAgICAgICAgICAgICAgIDxjaXJjbGUgaWQ9Ik92YWwtMzAiIGN4PSIyIiBjeT0iMjciIHI9IjIiPjwvY2lyY2xlPgogICAgICAgICAgICAgICAgICAgICAgICA8Y2lyY2xlIGlkPSJPdmFsLTMwIiBjeD0iNyIgY3k9IjI3IiByPSIyIj48L2NpcmNsZT4KICAgICAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==\");background-repeat:no-repeat}.react-grid-Row.row-selected,.react-grid-Row .row-selected{background-color:#dbecfa}.react-grid-row-group .row-expand-icon:hover{color:#777}.react-grid-row-index{padding:0 18px}.rdg-row-index{display:block;text-align:center}.rdg-row-actions-cell{padding:0}.rdg-actions-checkbox{display:none;text-align:center}.rdg-actions-checkbox.selected{display:block}.rdg-dragging{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.rdg-dragged-row{border-bottom:1px solid #000}", ""]); // exports /***/ }), /* 202 */ /***/ (function(module, exports, __webpack_require__) { /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule invariant */ 'use strict'; /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments * to provide information about what broke and what you were * expecting. * * The invariant message will be stripped in production, but the invariant * will remain to ensure logic does not differ in production. */ function invariant(condition, format, a, b, c, d, e, f) { if (false) { if (format === undefined) { throw new Error('invariant requires an error message argument'); } } if (!condition) { var error; if (format === undefined) { error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error(format.replace(/%s/g, function () { return args[argIndex++]; })); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } } module.exports = invariant; /***/ }), /* 203 */ /***/ (function(module, exports, __webpack_require__) { /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule keyMirror * @typechecks static-only */ 'use strict'; var invariant = __webpack_require__(202); /** * Constructs an enumeration with keys equal to their value. * * For example: * * var COLORS = keyMirror({blue: null, red: null}); * var myColor = COLORS.blue; * var isColorValid = !!COLORS[myColor]; * * The last line could not be performed if the values of the generated enum were * not equal to their keys. * * Input: {key1: val1, key2: val2} * Output: {key1: key1, key2: key2} * * @param {object} obj * @return {object} */ var keyMirror = function (obj) { var ret = {}; var key; !(obj instanceof Object && !Array.isArray(obj)) ? false ? invariant(false, 'keyMirror(...): Argument must be an object.') : invariant(false) : undefined; for (key in obj) { if (!obj.hasOwnProperty(key)) { continue; } ret[key] = key; } return ret; }; module.exports = keyMirror; /***/ }) /******/ ]) }); ;
applications/lemessage/static/js/analytics.min.js
gcw/pycon2014-web2py-tutorial
!function(){function require(path,parent,orig){var resolved=require.resolve(path);if(null==resolved){orig=orig||path;parent=parent||"root";var err=new Error('Failed to require "'+orig+'" from "'+parent+'"');err.path=orig;err.parent=parent;err.require=true;throw err}var module=require.modules[resolved];if(!module.exports){module.exports={};module.client=module.component=true;module.call(this,module.exports,require.relative(resolved),module)}return module.exports}require.modules={};require.aliases={};require.resolve=function(path){if(path.charAt(0)==="/")path=path.slice(1);var paths=[path,path+".js",path+".json",path+"/index.js",path+"/index.json"];for(var i=0;i<paths.length;i++){var path=paths[i];if(require.modules.hasOwnProperty(path))return path;if(require.aliases.hasOwnProperty(path))return require.aliases[path]}};require.normalize=function(curr,path){var segs=[];if("."!=path.charAt(0))return path;curr=curr.split("/");path=path.split("/");for(var i=0;i<path.length;++i){if(".."==path[i]){curr.pop()}else if("."!=path[i]&&""!=path[i]){segs.push(path[i])}}return curr.concat(segs).join("/")};require.register=function(path,definition){require.modules[path]=definition};require.alias=function(from,to){if(!require.modules.hasOwnProperty(from)){throw new Error('Failed to alias "'+from+'", it does not exist')}require.aliases[to]=from};require.relative=function(parent){var p=require.normalize(parent,"..");function lastIndexOf(arr,obj){var i=arr.length;while(i--){if(arr[i]===obj)return i}return-1}function localRequire(path){var resolved=localRequire.resolve(path);return require(resolved,parent,path)}localRequire.resolve=function(path){var c=path.charAt(0);if("/"==c)return path.slice(1);if("."==c)return require.normalize(p,path);var segs=parent.split("/");var i=lastIndexOf(segs,"deps")+1;if(!i)i=0;path=segs.slice(0,i+1).join("/")+"/deps/"+path;return path};localRequire.exists=function(path){return require.modules.hasOwnProperty(localRequire.resolve(path))};return localRequire};require.register("avetisk-defaults/index.js",function(exports,require,module){"use strict";var defaults=function(dest,src,recursive){for(var prop in src){if(recursive&&dest[prop]instanceof Object&&src[prop]instanceof Object){dest[prop]=defaults(dest[prop],src[prop],true)}else if(!(prop in dest)){dest[prop]=src[prop]}}return dest};module.exports=defaults});require.register("component-clone/index.js",function(exports,require,module){var type;try{type=require("type")}catch(e){type=require("type-component")}module.exports=clone;function clone(obj){switch(type(obj)){case"object":var copy={};for(var key in obj){if(obj.hasOwnProperty(key)){copy[key]=clone(obj[key])}}return copy;case"array":var copy=new Array(obj.length);for(var i=0,l=obj.length;i<l;i++){copy[i]=clone(obj[i])}return copy;case"regexp":var flags="";flags+=obj.multiline?"m":"";flags+=obj.global?"g":"";flags+=obj.ignoreCase?"i":"";return new RegExp(obj.source,flags);case"date":return new Date(obj.getTime());default:return obj}}});require.register("component-cookie/index.js",function(exports,require,module){var encode=encodeURIComponent;var decode=decodeURIComponent;module.exports=function(name,value,options){switch(arguments.length){case 3:case 2:return set(name,value,options);case 1:return get(name);default:return all()}};function set(name,value,options){options=options||{};var str=encode(name)+"="+encode(value);if(null==value)options.maxage=-1;if(options.maxage){options.expires=new Date(+new Date+options.maxage)}if(options.path)str+="; path="+options.path;if(options.domain)str+="; domain="+options.domain;if(options.expires)str+="; expires="+options.expires.toUTCString();if(options.secure)str+="; secure";document.cookie=str}function all(){return parse(document.cookie)}function get(name){return all()[name]}function parse(str){var obj={};var pairs=str.split(/ *; */);var pair;if(""==pairs[0])return obj;for(var i=0;i<pairs.length;++i){pair=pairs[i].split("=");obj[decode(pair[0])]=decode(pair[1])}return obj}});require.register("component-each/index.js",function(exports,require,module){var type=require("type");var has=Object.prototype.hasOwnProperty;module.exports=function(obj,fn){switch(type(obj)){case"array":return array(obj,fn);case"object":if("number"==typeof obj.length)return array(obj,fn);return object(obj,fn);case"string":return string(obj,fn)}};function string(obj,fn){for(var i=0;i<obj.length;++i){fn(obj.charAt(i),i)}}function object(obj,fn){for(var key in obj){if(has.call(obj,key)){fn(key,obj[key])}}}function array(obj,fn){for(var i=0;i<obj.length;++i){fn(obj[i],i)}}});require.register("component-event/index.js",function(exports,require,module){exports.bind=function(el,type,fn,capture){if(el.addEventListener){el.addEventListener(type,fn,capture||false)}else{el.attachEvent("on"+type,fn)}return fn};exports.unbind=function(el,type,fn,capture){if(el.removeEventListener){el.removeEventListener(type,fn,capture||false)}else{el.detachEvent("on"+type,fn)}return fn}});require.register("component-inherit/index.js",function(exports,require,module){module.exports=function(a,b){var fn=function(){};fn.prototype=b.prototype;a.prototype=new fn;a.prototype.constructor=a}});require.register("component-object/index.js",function(exports,require,module){var has=Object.prototype.hasOwnProperty;exports.keys=Object.keys||function(obj){var keys=[];for(var key in obj){if(has.call(obj,key)){keys.push(key)}}return keys};exports.values=function(obj){var vals=[];for(var key in obj){if(has.call(obj,key)){vals.push(obj[key])}}return vals};exports.merge=function(a,b){for(var key in b){if(has.call(b,key)){a[key]=b[key]}}return a};exports.length=function(obj){return exports.keys(obj).length};exports.isEmpty=function(obj){return 0==exports.length(obj)}});require.register("component-trim/index.js",function(exports,require,module){exports=module.exports=trim;function trim(str){return str.replace(/^\s*|\s*$/g,"")}exports.left=function(str){return str.replace(/^\s*/,"")};exports.right=function(str){return str.replace(/\s*$/,"")}});require.register("component-querystring/index.js",function(exports,require,module){var trim=require("trim");exports.parse=function(str){if("string"!=typeof str)return{};str=trim(str);if(""==str)return{};var obj={};var pairs=str.split("&");for(var i=0;i<pairs.length;i++){var parts=pairs[i].split("=");obj[parts[0]]=null==parts[1]?"":decodeURIComponent(parts[1])}return obj};exports.stringify=function(obj){if(!obj)return"";var pairs=[];for(var key in obj){pairs.push(encodeURIComponent(key)+"="+encodeURIComponent(obj[key]))}return pairs.join("&")}});require.register("component-type/index.js",function(exports,require,module){var toString=Object.prototype.toString;module.exports=function(val){switch(toString.call(val)){case"[object Function]":return"function";case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array";case"[object String]":return"string"}if(val===null)return"null";if(val===undefined)return"undefined";if(val&&val.nodeType===1)return"element";if(val===Object(val))return"object";return typeof val}});require.register("component-url/index.js",function(exports,require,module){exports.parse=function(url){var a=document.createElement("a");a.href=url;return{href:a.href,host:a.host||location.host,port:"0"===a.port||""===a.port?location.port:a.port,hash:a.hash,hostname:a.hostname||location.hostname,pathname:a.pathname.charAt(0)!="/"?"/"+a.pathname:a.pathname,protocol:!a.protocol||":"==a.protocol?location.protocol:a.protocol,search:a.search,query:a.search.slice(1)}};exports.isAbsolute=function(url){return 0==url.indexOf("//")||!!~url.indexOf("://")};exports.isRelative=function(url){return!exports.isAbsolute(url)};exports.isCrossDomain=function(url){url=exports.parse(url);return url.hostname!==location.hostname||url.port!==location.port||url.protocol!==location.protocol}});require.register("segmentio-after/index.js",function(exports,require,module){module.exports=function after(times,func){if(times<=0)return func();return function(){if(--times<1){return func.apply(this,arguments)}}}});require.register("segmentio-alias/index.js",function(exports,require,module){module.exports=function alias(object,aliases){for(var oldKey in aliases){var newKey=aliases[oldKey];if(object[oldKey]!==undefined){object[newKey]=object[oldKey];delete object[oldKey]}}}});require.register("component-bind/index.js",function(exports,require,module){var slice=[].slice;module.exports=function(obj,fn){if("string"==typeof fn)fn=obj[fn];if("function"!=typeof fn)throw new Error("bind() requires a function");var args=[].slice.call(arguments,2);return function(){return fn.apply(obj,args.concat(slice.call(arguments)))}}});require.register("segmentio-bind-all/index.js",function(exports,require,module){var bind=require("bind"),type=require("type");module.exports=function(obj){for(var key in obj){var val=obj[key];if(type(val)==="function")obj[key]=bind(obj,obj[key])}return obj}});require.register("segmentio-canonical/index.js",function(exports,require,module){module.exports=function canonical(){var tags=document.getElementsByTagName("link");for(var i=0,tag;tag=tags[i];i++){if("canonical"==tag.getAttribute("rel"))return tag.getAttribute("href")}}});require.register("segmentio-extend/index.js",function(exports,require,module){module.exports=function extend(object){var args=Array.prototype.slice.call(arguments,1);for(var i=0,source;source=args[i];i++){if(!source)continue;for(var property in source){object[property]=source[property]}}return object}});require.register("segmentio-is-email/index.js",function(exports,require,module){module.exports=function isEmail(string){return/.+\@.+\..+/.test(string)}});require.register("segmentio-is-meta/index.js",function(exports,require,module){module.exports=function isMeta(e){if(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)return true;var which=e.which,button=e.button;if(!which&&button!==undefined){return!button&1&&!button&2&&button&4}else if(which===2){return true}return false}});require.register("component-json-fallback/index.js",function(exports,require,module){var JSON={};!function(){"use strict";function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){if(typeof rep[i]==="string"){k=rep[i];v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else if(typeof space==="string"){indent=space}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}}();module.exports=JSON});require.register("segmentio-json/index.js",function(exports,require,module){module.exports="undefined"==typeof JSON?require("json-fallback"):JSON});require.register("segmentio-load-date/index.js",function(exports,require,module){var time=new Date,perf=window.performance;if(perf&&perf.timing&&perf.timing.responseEnd){time=new Date(perf.timing.responseEnd)}module.exports=time});require.register("segmentio-load-script/index.js",function(exports,require,module){var type=require("type");module.exports=function loadScript(options,callback){if(!options)throw new Error("Cant load nothing...");if(type(options)==="string")options={src:options};var https=document.location.protocol==="https:";if(options.src&&options.src.indexOf("//")===0){options.src=https?"https:"+options.src:"http:"+options.src}if(https&&options.https)options.src=options.https;else if(!https&&options.http)options.src=options.http;var script=document.createElement("script");script.type="text/javascript";script.async=true;script.src=options.src;var firstScript=document.getElementsByTagName("script")[0];firstScript.parentNode.insertBefore(script,firstScript);if(callback&&type(callback)==="function"){if(script.addEventListener){script.addEventListener("load",callback,false)}else if(script.attachEvent){script.attachEvent("onreadystatechange",function(){if(/complete|loaded/.test(script.readyState))callback()})}}return script}});require.register("segmentio-type/index.js",function(exports,require,module){var toString=Object.prototype.toString;module.exports=function(val){switch(toString.call(val)){case"[object Function]":return"function";case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array";case"[object String]":return"string"}if(val===null)return"null";if(val===undefined)return"undefined";if(val&&val.nodeType===1)return"element";if(val===Object(val))return"object";return typeof val}});require.register("segmentio-new-date/index.js",function(exports,require,module){var type=require("type");module.exports=function newDate(input){input=toMilliseconds(input);var date=new Date(input);if(isNaN(date.getTime())&&"string"===type(input)){var milliseconds=toMilliseconds(parseInt(input,10));date=new Date(milliseconds)}return date};function toMilliseconds(seconds){if("number"===type(seconds)&&seconds<315576e5)return seconds*1e3;return seconds}});require.register("segmentio-on-body/index.js",function(exports,require,module){var each=require("each");var body=false;var callbacks=[];module.exports=function onBody(callback){if(body){call(callback)}else{callbacks.push(callback)}};var interval=setInterval(function(){if(!document.body)return;body=true;each(callbacks,call);clearInterval(interval)},5);function call(callback){callback(document.body)}});require.register("segmentio-store.js/store.js",function(exports,require,module){var json=require("json"),store={},win=window,doc=win.document,localStorageName="localStorage",namespace="__storejs__",storage;store.disabled=false;store.set=function(key,value){};store.get=function(key){};store.remove=function(key){};store.clear=function(){};store.transact=function(key,defaultVal,transactionFn){var val=store.get(key);if(transactionFn==null){transactionFn=defaultVal;defaultVal=null}if(typeof val=="undefined"){val=defaultVal||{}}transactionFn(val);store.set(key,val)};store.getAll=function(){};store.serialize=function(value){return json.stringify(value)};store.deserialize=function(value){if(typeof value!="string"){return undefined}try{return json.parse(value)}catch(e){return value||undefined}};function isLocalStorageNameSupported(){try{return localStorageName in win&&win[localStorageName]}catch(err){return false}}if(isLocalStorageNameSupported()){storage=win[localStorageName];store.set=function(key,val){if(val===undefined){return store.remove(key)}storage.setItem(key,store.serialize(val));return val};store.get=function(key){return store.deserialize(storage.getItem(key))};store.remove=function(key){storage.removeItem(key)};store.clear=function(){storage.clear()};store.getAll=function(){var ret={};for(var i=0;i<storage.length;++i){var key=storage.key(i);ret[key]=store.get(key)}return ret}}else if(doc.documentElement.addBehavior){var storageOwner,storageContainer;try{storageContainer=new ActiveXObject("htmlfile");storageContainer.open();storageContainer.write("<s"+"cript>document.w=window</s"+'cript><iframe src="/favicon.ico"></iframe>');storageContainer.close();storageOwner=storageContainer.w.frames[0].document;storage=storageOwner.createElement("div")}catch(e){storage=doc.createElement("div");storageOwner=doc.body}function withIEStorage(storeFunction){return function(){var args=Array.prototype.slice.call(arguments,0);args.unshift(storage);storageOwner.appendChild(storage);storage.addBehavior("#default#userData");storage.load(localStorageName);var result=storeFunction.apply(store,args);storageOwner.removeChild(storage);return result}}var forbiddenCharsRegex=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function ieKeyFix(key){return key.replace(forbiddenCharsRegex,"___")}store.set=withIEStorage(function(storage,key,val){key=ieKeyFix(key);if(val===undefined){return store.remove(key)}storage.setAttribute(key,store.serialize(val));storage.save(localStorageName);return val});store.get=withIEStorage(function(storage,key){key=ieKeyFix(key);return store.deserialize(storage.getAttribute(key))});store.remove=withIEStorage(function(storage,key){key=ieKeyFix(key);storage.removeAttribute(key);storage.save(localStorageName)});store.clear=withIEStorage(function(storage){var attributes=storage.XMLDocument.documentElement.attributes;storage.load(localStorageName);for(var i=0,attr;attr=attributes[i];i++){storage.removeAttribute(attr.name)}storage.save(localStorageName)});store.getAll=withIEStorage(function(storage){var attributes=storage.XMLDocument.documentElement.attributes;var ret={};for(var i=0,attr;attr=attributes[i];++i){var key=ieKeyFix(attr.name);ret[attr.name]=store.deserialize(storage.getAttribute(key))}return ret})}try{store.set(namespace,namespace);if(store.get(namespace)!=namespace){store.disabled=true}store.remove(namespace)}catch(e){store.disabled=true}store.enabled=!store.disabled;module.exports=store});require.register("segmentio-top-domain/index.js",function(exports,require,module){var url=require("url");module.exports=function(urlStr){var host=url.parse(urlStr).hostname,topLevel=host.match(/[a-z0-9][a-z0-9\-]*[a-z0-9]\.[a-z\.]{2,6}$/i);return topLevel?topLevel[0]:host}});require.register("timoxley-next-tick/index.js",function(exports,require,module){"use strict";if(typeof setImmediate=="function"){module.exports=function(f){setImmediate(f)}}else if(typeof process!="undefined"&&typeof process.nextTick=="function"){module.exports=process.nextTick}else if(typeof window=="undefined"||window.ActiveXObject||!window.postMessage){module.exports=function(f){setTimeout(f)}}else{var q=[];window.addEventListener("message",function(){var i=0;while(i<q.length){try{q[i++]()}catch(e){q=q.slice(i);window.postMessage("tic!","*");throw e}}q.length=0},true);module.exports=function(fn){if(!q.length)window.postMessage("tic!","*");q.push(fn)}}});require.register("yields-prevent/index.js",function(exports,require,module){module.exports=function(e){e=e||window.event;return e.preventDefault?e.preventDefault():e.returnValue=false}});require.register("analytics/src/index.js",function(exports,require,module){var Analytics=require("./analytics"),providers=require("./providers");module.exports=new Analytics(providers)});require.register("analytics/src/analytics.js",function(exports,require,module){var after=require("after"),bind=require("event").bind,clone=require("clone"),cookie=require("./cookie"),each=require("each"),extend=require("extend"),isEmail=require("is-email"),isMeta=require("is-meta"),localStore=require("./localStore"),newDate=require("new-date"),size=require("object").length,preventDefault=require("prevent"),Provider=require("./provider"),providers=require("./providers"),querystring=require("querystring"),type=require("type"),url=require("url"),user=require("./user"),utils=require("./utils");module.exports=Analytics;function Analytics(Providers){var self=this;this.VERSION="0.11.10";each(Providers,function(Provider){self.addProvider(Provider)});var oldonload=window.onload;window.onload=function(){self.loaded=true;if("function"===type(oldonload))oldonload()}}extend(Analytics.prototype,{loaded:false,initialized:false,readied:false,callbacks:[],timeout:300,user:user,Provider:Provider,_providers:{},providers:[],addProvider:function(Provider){this._providers[Provider.prototype.name]=Provider},initialize:function(providers,options){options||(options={});var self=this;this.providers=[];this.initialized=false;this.readied=false;cookie.options(options.cookie);localStore.options(options.localStorage);user.options(options.user);user.load();var ready=after(size(providers),function(){self.readied=true;var callback;while(callback=self.callbacks.shift()){callback()}});each(providers,function(key,options){var Provider=self._providers[key];if(!Provider)return;self.providers.push(new Provider(options,ready,self))});var query=url.parse(window.location.href).query;var queries=querystring.parse(query);if(queries.ajs_uid)this.identify(queries.ajs_uid);if(queries.ajs_event)this.track(queries.ajs_event);this.initialized=true},ready:function(callback){if(type(callback)!=="function")return;if(this.readied)return callback();this.callbacks.push(callback)},identify:function(userId,traits,options,callback){if(!this.initialized)return;if(type(options)==="function"){callback=options;options=undefined}if(type(traits)==="function"){callback=traits;traits=undefined}if(type(userId)==="object"){if(traits&&type(traits)==="function")callback=traits;traits=userId;userId=undefined}if(userId===undefined||user===null)userId=user.id();var alias=user.update(userId,traits);traits=cleanTraits(userId,clone(user.traits()));each(this.providers,function(provider){if(provider.identify&&isEnabled(provider,options)){var args=[userId,clone(traits),clone(options)];if(provider.ready){provider.identify.apply(provider,args)}else{provider.enqueue("identify",args)}}});if(callback&&type(callback)==="function"){setTimeout(callback,this.timeout)}},group:function(groupId,properties,options,callback){if(!this.initialized)return;if(type(options)==="function"){callback=options;options=undefined}if(type(properties)==="function"){callback=properties;properties=undefined}properties=clone(properties)||{};if(properties.created)properties.created=newDate(properties.created);each(this.providers,function(provider){if(provider.group&&isEnabled(provider,options)){var args=[groupId,clone(properties),clone(options)];if(provider.ready){provider.group.apply(provider,args)}else{provider.enqueue("group",args)}}});if(callback&&type(callback)==="function"){setTimeout(callback,this.timeout)}},track:function(event,properties,options,callback){if(!this.initialized)return;if(type(options)==="function"){callback=options;options=undefined}if(type(properties)==="function"){callback=properties;properties=undefined}each(this.providers,function(provider){if(provider.track&&isEnabled(provider,options)){var args=[event,clone(properties),clone(options)];if(provider.ready){provider.track.apply(provider,args)}else{provider.enqueue("track",args)}}});if(callback&&type(callback)==="function"){setTimeout(callback,this.timeout)}},trackLink:function(links,event,properties){if(!links)return;if("element"===type(links))links=[links];var self=this,eventFunction="function"===type(event),propertiesFunction="function"===type(properties);each(links,function(el){bind(el,"click",function(e){var newEvent=eventFunction?event(el):event;var newProperties=propertiesFunction?properties(el):properties;self.track(newEvent,newProperties);if(el.href&&el.target!=="_blank"&&!isMeta(e)){preventDefault(e);setTimeout(function(){window.location.href=el.href},self.timeout)}})})},trackForm:function(form,event,properties){if(!form)return;if("element"===type(form))form=[form];var self=this,eventFunction="function"===type(event),propertiesFunction="function"===type(properties);each(form,function(el){var handler=function(e){var newEvent=eventFunction?event(el):event;var newProperties=propertiesFunction?properties(el):properties;self.track(newEvent,newProperties);preventDefault(e);setTimeout(function(){el.submit()},self.timeout)};var dom=window.jQuery||window.Zepto;if(dom){dom(el).submit(handler)}else{bind(el,"submit",handler)}})},pageview:function(url,options){if(!this.initialized)return;each(this.providers,function(provider){if(provider.pageview&&isEnabled(provider,options)){var args=[url];if(provider.ready){provider.pageview.apply(provider,args)}else{provider.enqueue("pageview",args)}}})},alias:function(newId,originalId,options){if(!this.initialized)return;if(type(originalId)==="object"){options=originalId;originalId=undefined}each(this.providers,function(provider){if(provider.alias&&isEnabled(provider,options)){var args=[newId,originalId];if(provider.ready){provider.alias.apply(provider,args)}else{provider.enqueue("alias",args)}}})},log:function(error,properties,options){if(!this.initialized)return;each(this.providers,function(provider){if(provider.log&&isEnabled(provider,options)){var args=[error,properties,options];if(provider.ready){provider.log.apply(provider,args)}else{provider.enqueue("log",args)}}})}});Analytics.prototype.trackClick=Analytics.prototype.trackLink;Analytics.prototype.trackSubmit=Analytics.prototype.trackForm;var isEnabled=function(provider,options){var enabled=true;if(!options||!options.providers)return enabled;var map=options.providers;if(map.all!==undefined)enabled=map.all;if(map.All!==undefined)enabled=map.All;var name=provider.name;if(map[name]!==undefined)enabled=map[name];return enabled};var cleanTraits=function(userId,traits){if(!traits.email&&isEmail(userId))traits.email=userId;if(!traits.name&&traits.firstName&&traits.lastName){traits.name=traits.firstName+" "+traits.lastName}if(traits.created)traits.created=newDate(traits.created);if(traits.company&&traits.company.created){traits.company.created=newDate(traits.company.created)}return traits}});require.register("analytics/src/cookie.js",function(exports,require,module){var bindAll=require("bind-all"),cookie=require("cookie"),clone=require("clone"),defaults=require("defaults"),json=require("json"),topDomain=require("top-domain");function Cookie(options){this.options(options)}Cookie.prototype.options=function(options){if(arguments.length===0)return this._options;options||(options={});var domain="."+topDomain(window.location.href);if(domain===".localhost")domain="";defaults(options,{maxage:31536e6,path:"/",domain:domain});this._options=options};Cookie.prototype.set=function(key,value){try{value=json.stringify(value);cookie(key,value,clone(this._options));return true}catch(e){return false}};Cookie.prototype.get=function(key){try{var value=cookie(key);value=value?json.parse(value):null;return value}catch(e){return null}};Cookie.prototype.remove=function(key){try{cookie(key,null,clone(this._options));return true}catch(e){return false}};module.exports=bindAll(new Cookie);module.exports.Cookie=Cookie});require.register("analytics/src/localStore.js",function(exports,require,module){var bindAll=require("bind-all"),defaults=require("defaults"),store=require("store");function Store(options){this.options(options)}Store.prototype.options=function(options){if(arguments.length===0)return this._options;options||(options={});defaults(options,{enabled:true});this.enabled=options.enabled&&store.enabled;this._options=options};Store.prototype.set=function(key,value){if(!this.enabled)return false;return store.set(key,value)};Store.prototype.get=function(key){if(!this.enabled)return null;return store.get(key)};Store.prototype.remove=function(key){if(!this.enabled)return false;return store.remove(key)};module.exports=bindAll(new Store)});require.register("analytics/src/provider.js",function(exports,require,module){var each=require("each"),extend=require("extend"),type=require("type");module.exports=Provider;function Provider(options,ready,analytics){var self=this;this.analytics=analytics;this.queue=[];this.ready=false;if(type(options)!=="object"){if(options===true){options={}}else if(this.key){var key=options;options={};options[this.key]=key}else{throw new Error("Couldnt resolve options.")}}this.options=extend({},this.defaults,options);var dequeue=function(){each(self.queue,function(call){var method=call.method,args=call.args;self[method].apply(self,args)});self.ready=true;self.queue=[];ready()};this.initialize.call(this,this.options,dequeue)}Provider.extend=function(properties){var parent=this;var child=function(){return parent.apply(this,arguments)};var Surrogate=function(){this.constructor=child};Surrogate.prototype=parent.prototype;child.prototype=new Surrogate;extend(child.prototype,properties);return child};extend(Provider.prototype,{options:{},key:undefined,initialize:function(options,ready){ready()},enqueue:function(method,args){this.queue.push({method:method,args:args})}})});require.register("analytics/src/user.js",function(exports,require,module){var bindAll=require("bind-all"),clone=require("clone"),cookie=require("./cookie"),defaults=require("defaults"),extend=require("extend"),localStore=require("./localStore");function User(options){this._id=null;this._traits={};this.options(options)}User.prototype.options=function(options){options||(options={});defaults(options,{persist:true});this.cookie(options.cookie);this.localStorage(options.localStorage);this.persist=options.persist};User.prototype.cookie=function(options){if(arguments.length===0)return this.cookieOptions;options||(options={});defaults(options,{key:"ajs_user_id",oldKey:"ajs_user"});this.cookieOptions=options};User.prototype.localStorage=function(options){if(arguments.length===0)return this.localStorageOptions;options||(options={});defaults(options,{key:"ajs_user_traits"});this.localStorageOptions=options};User.prototype.id=function(id){if(arguments.length===0)return this._id;this._id=id};User.prototype.traits=function(traits){if(arguments.length===0)return clone(this._traits);traits||(traits={});this._traits=traits};User.prototype.update=function(userId,traits){var alias=!this.id()&&userId&&this.persist;traits||(traits={});if(this.id()&&userId&&this.id()!==userId)this.traits(traits); else this.traits(extend(this.traits(),traits));if(userId)this.id(userId);this.save();return alias};User.prototype.save=function(){if(!this.persist)return false;cookie.set(this.cookie().key,this.id());localStore.set(this.localStorage().key,this.traits());return true};User.prototype.load=function(){if(this.loadOldCookie())return this.toJSON();var id=cookie.get(this.cookie().key),traits=localStore.get(this.localStorage().key);this.id(id);this.traits(traits);return this.toJSON()};User.prototype.clear=function(){cookie.remove(this.cookie().key);localStore.remove(this.localStorage().key);this.id(null);this.traits({})};User.prototype.loadOldCookie=function(){var user=cookie.get(this.cookie().oldKey);if(!user)return false;this.id(user.id);this.traits(user.traits);cookie.remove(this.cookie().oldKey);return true};User.prototype.toJSON=function(){return{id:this.id(),traits:this.traits()}};module.exports=bindAll(new User)});require.register("analytics/src/utils.js",function(exports,require,module){exports.getUrlParameter=function(urlSearchParameter,paramKey){var params=urlSearchParameter.replace("?","").split("&");for(var i=0;i<params.length;i+=1){var param=params[i].split("=");if(param.length===2&&param[0]===paramKey){return decodeURIComponent(param[1])}}}});require.register("analytics/src/providers/adroll.js",function(exports,require,module){var Provider=require("../provider"),load=require("load-script");module.exports=Provider.extend({name:"AdRoll",defaults:{advId:null,pixId:null},initialize:function(options,ready){window.adroll_adv_id=options.advId;window.adroll_pix_id=options.pixId;window.__adroll_loaded=true;load({http:"http://a.adroll.com/j/roundtrip.js",https:"https://s.adroll.com/j/roundtrip.js"},ready)}})});require.register("analytics/src/providers/amplitude.js",function(exports,require,module){var Provider=require("../provider"),alias=require("alias"),load=require("load-script");module.exports=Provider.extend({name:"Amplitude",key:"apiKey",defaults:{apiKey:null,pageview:false},initialize:function(options,ready){!function(e,t){var r=e.amplitude||{};r._q=[];function i(e){r[e]=function(){r._q.push([e].concat(Array.prototype.slice.call(arguments,0)))}}var s=["init","logEvent","setUserId","setGlobalUserProperties","setVersionName"];for(var c=0;c<s.length;c++){i(s[c])}e.amplitude=r}(window,document);load("https://d24n15hnbwhuhn.cloudfront.net/libs/amplitude-1.0-min.js");window.amplitude.init(options.apiKey);ready()},identify:function(userId,traits){if(userId)window.amplitude.setUserId(userId);if(traits)window.amplitude.setGlobalUserProperties(traits)},track:function(event,properties){window.amplitude.logEvent(event,properties)},pageview:function(url){if(!this.options.pageview)return;var properties={url:url||document.location.href,name:document.title};this.track("Loaded a Page",properties)}})});require.register("analytics/src/providers/bitdeli.js",function(exports,require,module){var Provider=require("../provider"),load=require("load-script");module.exports=Provider.extend({name:"Bitdeli",defaults:{inputId:null,authToken:null,initialPageview:true},initialize:function(options,ready){window._bdq=window._bdq||[];window._bdq.push(["setAccount",options.inputId,options.authToken]);if(options.initialPageview)this.pageview();load("//d2flrkr957qc5j.cloudfront.net/bitdeli.min.js");ready()},identify:function(userId,traits){if(userId)window._bdq.push(["identify",userId]);if(traits)window._bdq.push(["set",traits])},track:function(event,properties){window._bdq.push(["track",event,properties])},pageview:function(url){window._bdq.push(["trackPageview",url])}})});require.register("analytics/src/providers/bugherd.js",function(exports,require,module){var Provider=require("../provider"),load=require("load-script");module.exports=Provider.extend({name:"BugHerd",key:"apiKey",defaults:{apiKey:null,showFeedbackTab:true},initialize:function(options,ready){if(!options.showFeedbackTab){window.BugHerdConfig={feedback:{hide:true}}}load("//www.bugherd.com/sidebarv2.js?apikey="+options.apiKey,ready)}})});require.register("analytics/src/providers/chartbeat.js",function(exports,require,module){var Provider=require("../provider"),load=require("load-script");module.exports=Provider.extend({name:"Chartbeat",defaults:{domain:null,uid:null},initialize:function(options,ready){window._sf_async_config=options;var loadChartbeat=function(){if(!document.body)return setTimeout(loadChartbeat,5);window._sf_endpt=(new Date).getTime();load({https:"https://a248.e.akamai.net/chartbeat.download.akamai.com/102508/js/chartbeat.js",http:"http://static.chartbeat.com/js/chartbeat.js"},ready)};loadChartbeat()},pageview:function(url){if(!window.pSUPERFLY)return;window.pSUPERFLY.virtualPage(url||window.location.pathname)}})});require.register("analytics/src/providers/clicktale.js",function(exports,require,module){var date=require("load-date"),Provider=require("../provider"),load=require("load-script"),onBody=require("on-body");module.exports=Provider.extend({name:"ClickTale",key:"projectId",defaults:{httpCdnUrl:"http://s.clicktale.net/WRe0.js",httpsCdnUrl:null,projectId:null,recordingRatio:.01,partitionId:null},initialize:function(options,ready){if(document.location.protocol==="https:"&&!options.httpsCdnUrl)return;window.WRInitTime=date.getTime();onBody(function(body){var div=document.createElement("div");div.setAttribute("id","ClickTaleDiv");div.setAttribute("style","display: none;");body.appendChild(div)});var onloaded=function(){window.ClickTale(options.projectId,options.recordingRatio,options.partitionId);ready()};load({http:options.httpCdnUrl,https:options.httpsCdnUrl},onloaded)},identify:function(userId,traits){if(window.ClickTaleSetUID)window.ClickTaleSetUID(userId);if(window.ClickTaleField){for(var traitKey in traits){window.ClickTaleField(traitKey,traits[traitKey])}}},track:function(event,properties){if(window.ClickTaleEvent)window.ClickTaleEvent(event)}})});require.register("analytics/src/providers/clicky.js",function(exports,require,module){var Provider=require("../provider"),user=require("../user"),extend=require("extend"),load=require("load-script");module.exports=Provider.extend({name:"Clicky",key:"siteId",defaults:{siteId:null},initialize:function(options,ready){window.clicky_site_ids=window.clicky_site_ids||[];window.clicky_site_ids.push(options.siteId);var userId=user.id(),traits=user.traits(),session={};if(userId)session.id=userId;extend(session,traits);window.clicky_custom={session:session};load("//static.getclicky.com/js",ready)},track:function(event,properties){window.clicky.log(window.location.href,event)}})});require.register("analytics/src/providers/comscore.js",function(exports,require,module){var Provider=require("../provider"),load=require("load-script");module.exports=Provider.extend({name:"comScore",key:"c2",defaults:{c1:"2",c2:null},initialize:function(options,ready){window._comscore=window._comscore||[];window._comscore.push(options);load({http:"http://b.scorecardresearch.com/beacon.js",https:"https://sb.scorecardresearch.com/beacon.js"},ready)}})});require.register("analytics/src/providers/crazyegg.js",function(exports,require,module){var Provider=require("../provider"),load=require("load-script");module.exports=Provider.extend({name:"CrazyEgg",key:"accountNumber",defaults:{accountNumber:null},initialize:function(options,ready){var accountPath=options.accountNumber.slice(0,4)+"/"+options.accountNumber.slice(4);load("//dnn506yrbagrg.cloudfront.net/pages/scripts/"+accountPath+".js?"+Math.floor((new Date).getTime()/36e5),ready)}})});require.register("analytics/src/providers/customerio.js",function(exports,require,module){var Provider=require("../provider"),isEmail=require("is-email"),load=require("load-script");module.exports=Provider.extend({name:"Customer.io",key:"siteId",defaults:{siteId:null},initialize:function(options,ready){var _cio=window._cio=window._cio||[];!function(){var a,b,c;a=function(f){return function(){_cio.push([f].concat(Array.prototype.slice.call(arguments,0)))}};b=["identify","track"];for(c=0;c<b.length;c++){_cio[b[c]]=a(b[c])}}();var script=load("https://assets.customer.io/assets/track.js");script.id="cio-tracker";script.setAttribute("data-site-id",options.siteId);ready()},identify:function(userId,traits){if(!userId)return;traits.id=userId;if(traits.created){traits.created_at=Math.floor(traits.created/1e3);delete traits.created}window._cio.identify(traits)},track:function(event,properties){window._cio.track(event,properties)}})});require.register("analytics/src/providers/errorception.js",function(exports,require,module){var Provider=require("../provider"),extend=require("extend"),load=require("load-script"),type=require("type");module.exports=Provider.extend({name:"Errorception",key:"projectId",defaults:{projectId:null,meta:true},initialize:function(options,ready){window._errs=window._errs||[options.projectId];load("//d15qhc0lu1ghnk.cloudfront.net/beacon.js");var oldOnError=window.onerror;window.onerror=function(){window._errs.push(arguments);if("function"===type(oldOnError)){oldOnError.apply(this,arguments)}};ready()},identify:function(userId,traits){if(!this.options.meta)return;window._errs.meta||(window._errs.meta={});traits.id=userId;extend(window._errs.meta,traits)}})});require.register("analytics/src/providers/foxmetrics.js",function(exports,require,module){var Provider=require("../provider"),load=require("load-script");module.exports=Provider.extend({name:"FoxMetrics",key:"appId",defaults:{appId:null},initialize:function(options,ready){var _fxm=window._fxm||{};window._fxm=_fxm.events||[];load("//d35tca7vmefkrc.cloudfront.net/scripts/"+options.appId+".js");ready()},identify:function(userId,traits){if(!userId)return;var firstName=traits.firstName,lastName=traits.lastName;if(!firstName&&traits.name)firstName=traits.name.split(" ")[0];if(!lastName&&traits.name)lastName=traits.name.split(" ")[1];window._fxm.push(["_fxm.visitor.profile",userId,firstName,lastName,traits.email,traits.address,undefined,undefined,traits])},track:function(event,properties){window._fxm.push([event,properties.category,properties])},pageview:function(url){window._fxm.push(["_fxm.pages.view",undefined,undefined,undefined,url,undefined])}})});require.register("analytics/src/providers/gauges.js",function(exports,require,module){var Provider=require("../provider"),load=require("load-script");module.exports=Provider.extend({name:"Gauges",key:"siteId",defaults:{siteId:null},initialize:function(options,ready){window._gauges=window._gauges||[];var script=load("//secure.gaug.es/track.js");script.id="gauges-tracker";script.setAttribute("data-site-id",options.siteId);ready()},pageview:function(url){window._gauges.push(["track"])}})});require.register("analytics/src/providers/get-satisfaction.js",function(exports,require,module){var Provider=require("../provider"),load=require("load-script"),onBody=require("on-body");module.exports=Provider.extend({name:"Get Satisfaction",key:"widgetId",defaults:{widgetId:null},initialize:function(options,ready){var div=document.createElement("div");var id=div.id="getsat-widget-"+options.widgetId;onBody(function(body){body.appendChild(div)});load("https://loader.engage.gsfn.us/loader.js",function(){if(window.GSFN!==undefined){window.GSFN.loadWidget(options.widgetId,{containerId:id})}ready()})}})});require.register("analytics/src/providers/google-analytics.js",function(exports,require,module){var Provider=require("../provider"),load=require("load-script"),type=require("type"),url=require("url"),canonical=require("canonical");module.exports=Provider.extend({name:"Google Analytics",key:"trackingId",defaults:{anonymizeIp:false,domain:null,doubleClick:false,enhancedLinkAttribution:false,ignoreReferrer:null,initialPageview:true,siteSpeedSampleRate:null,trackingId:null,universalClient:false},initialize:function(options,ready){if(options.universalClient)this.initializeUniversal(options,ready);else this.initializeClassic(options,ready)},initializeClassic:function(options,ready){window._gaq=window._gaq||[];window._gaq.push(["_setAccount",options.trackingId]);if(options.domain){window._gaq.push(["_setDomainName",options.domain])}if(options.enhancedLinkAttribution){var protocol="https:"===document.location.protocol?"https:":"http:";var pluginUrl=protocol+"//www.google-analytics.com/plugins/ga/inpage_linkid.js";window._gaq.push(["_require","inpage_linkid",pluginUrl])}if(type(options.siteSpeedSampleRate)==="number"){window._gaq.push(["_setSiteSpeedSampleRate",options.siteSpeedSampleRate])}if(options.anonymizeIp){window._gaq.push(["_gat._anonymizeIp"])}if(options.ignoreReferrer){window._gaq.push(["_addIgnoredRef",options.ignoreReferrer])}if(options.initialPageview){var path,canon=canonical();if(canon)path=url.parse(canon).pathname;this.pageview(path)}if(options.doubleClick){load("//stats.g.doubleclick.net/dc.js",ready)}else{load({http:"http://www.google-analytics.com/ga.js",https:"https://ssl.google-analytics.com/ga.js"},ready)}},initializeUniversal:function(options,ready){var global=this.global="ga";window["GoogleAnalyticsObject"]=global;window[global]=window[global]||function(){(window[global].q=window[global].q||[]).push(arguments)};window[global].l=1*new Date;var createOpts={};if(options.domain)createOpts.cookieDomain=options.domain||"none";if(type(options.siteSpeedSampleRate)==="number")createOpts.siteSpeedSampleRate=options.siteSpeedSampleRate;if(options.anonymizeIp)ga("set","anonymizeIp",true);ga("create",options.trackingId,createOpts);if(options.initialPageview){var path,canon=canonical();if(canon)path=url.parse(canon).pathname;this.pageview(path)}load("//www.google-analytics.com/analytics.js");ready()},track:function(event,properties){properties||(properties={});var value;if(type(properties.value)==="number")value=Math.round(properties.value);if(this.options.universalClient){var opts={};if(properties.noninteraction)opts.nonInteraction=properties.noninteraction;window[this.global]("send","event",properties.category||"All",event,properties.label,Math.round(properties.revenue)||value,opts)}else{window._gaq.push(["_trackEvent",properties.category||"All",event,properties.label,Math.round(properties.revenue)||value,properties.noninteraction])}},pageview:function(url){if(this.options.universalClient){window[this.global]("send","pageview",url)}else{window._gaq.push(["_trackPageview",url])}}})});require.register("analytics/src/providers/gosquared.js",function(exports,require,module){var Provider=require("../provider"),user=require("../user"),load=require("load-script"),onBody=require("on-body");module.exports=Provider.extend({name:"GoSquared",key:"siteToken",defaults:{siteToken:null},initialize:function(options,ready){onBody(function(){var GoSquared=window.GoSquared={};GoSquared.acct=options.siteToken;GoSquared.q=[];window._gstc_lt=+new Date;GoSquared.VisitorName=user.id();GoSquared.Visitor=user.traits();load("//d1l6p2sc9645hc.cloudfront.net/tracker.js");ready()})},identify:function(userId,traits){if(userId)window.GoSquared.UserName=userId;if(traits)window.GoSquared.Visitor=traits},track:function(event,properties){window.GoSquared.q.push(["TrackEvent",event,properties||{}])},pageview:function(url){window.GoSquared.q.push(["TrackView",url])}})});require.register("analytics/src/providers/heap.js",function(exports,require,module){var Provider=require("../provider"),load=require("load-script");module.exports=Provider.extend({name:"Heap",key:"apiKey",defaults:{apiKey:null},initialize:function(options,ready){window.heap=window.heap||[];window.heap.load=function(a){window._heapid=a;var b=document.createElement("script");b.type="text/javascript",b.async=!0,b.src=("https:"===document.location.protocol?"https:":"http:")+"//d36lvucg9kzous.cloudfront.net";var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c);var d=function(a){return function(){heap.push([a].concat(Array.prototype.slice.call(arguments,0)))}},e=["identify","track"];for(var f=0;f<e.length;f++)heap[e[f]]=d(e[f])};window.heap.load(options.apiKey);ready()},identify:function(userId,traits){window.heap.identify(traits)},track:function(event,properties){window.heap.track(event,properties)}})});require.register("analytics/src/providers/hittail.js",function(exports,require,module){var Provider=require("../provider"),load=require("load-script");module.exports=Provider.extend({name:"HitTail",key:"siteId",defaults:{siteId:null},initialize:function(options,ready){load("//"+options.siteId+".hittail.com/mlt.js",ready)}})});require.register("analytics/src/providers/hubspot.js",function(exports,require,module){var Provider=require("../provider"),isEmail=require("is-email"),load=require("load-script");module.exports=Provider.extend({name:"HubSpot",key:"portalId",defaults:{portalId:null},initialize:function(options,ready){if(!document.getElementById("hs-analytics")){window._hsq=window._hsq||[];var script=load("https://js.hubspot.com/analytics/"+Math.ceil(new Date/3e5)*3e5+"/"+options.portalId+".js");script.id="hs-analytics"}ready()},identify:function(userId,traits){window._hsq.push(["identify",traits])},track:function(event,properties){window._hsq.push(["trackEvent",event,properties])},pageview:function(url){window._hsq.push(["_trackPageview"])}})});require.register("analytics/src/providers/index.js",function(exports,require,module){module.exports=[require("./adroll"),require("./amplitude"),require("./bitdeli"),require("./bugherd"),require("./chartbeat"),require("./clicktale"),require("./clicky"),require("./comscore"),require("./crazyegg"),require("./customerio"),require("./errorception"),require("./foxmetrics"),require("./gauges"),require("./get-satisfaction"),require("./google-analytics"),require("./gosquared"),require("./heap"),require("./hittail"),require("./hubspot"),require("./improvely"),require("./intercom"),require("./keen-io"),require("./kissmetrics"),require("./klaviyo"),require("./livechat"),require("./lytics"),require("./mixpanel"),require("./olark"),require("./optimizely"),require("./perfect-audience"),require("./pingdom"),require("./preact"),require("./qualaroo"),require("./quantcast"),require("./sentry"),require("./snapengage"),require("./usercycle"),require("./userfox"),require("./uservoice"),require("./vero"),require("./visual-website-optimizer"),require("./woopra")]});require.register("analytics/src/providers/improvely.js",function(exports,require,module){var Provider=require("../provider"),alias=require("alias"),load=require("load-script");module.exports=Provider.extend({name:"Improvely",defaults:{domain:null,projectId:null},initialize:function(options,ready){window._improvely=window._improvely||[];window.improvely=window.improvely||{init:function(e,t){window._improvely.push(["init",e,t])},goal:function(e){window._improvely.push(["goal",e])},label:function(e){window._improvely.push(["label",e])}};load("//"+options.domain+".iljmp.com/improvely.js");window.improvely.init(options.domain,options.projectId);ready()},identify:function(userId,traits){if(userId)window.improvely.label(userId)},track:function(event,properties){properties||(properties={});properties.type=event;alias(properties,{revenue:"amount"});window.improvely.goal(properties)}})});require.register("analytics/src/providers/intercom.js",function(exports,require,module){var Provider=require("../provider"),extend=require("extend"),load=require("load-script"),isEmail=require("is-email");module.exports=Provider.extend({name:"Intercom",booted:false,key:"appId",defaults:{appId:null,activator:null,counter:true},initialize:function(options,ready){load("https://static.intercomcdn.com/intercom.v1.js",ready)},identify:function(userId,traits,options){if(!this.booted&&!userId)return;options||(options={});var Intercom=options.Intercom||options.intercom||{};traits.increments=Intercom.increments;traits.user_hash=Intercom.userHash||Intercom.user_hash;if(traits.created){traits.created_at=Math.floor(traits.created/1e3);delete traits.created}if(traits.company&&traits.company.created){traits.company.created_at=Math.floor(traits.company.created/1e3);delete traits.company.created}if(this.options.activator){traits.widget={activator:this.options.activator,use_counter:this.options.counter}}if(this.booted){window.Intercom("update",traits)}else{extend(traits,{app_id:this.options.appId,user_id:userId});window.Intercom("boot",traits)}this.booted=true},group:function(groupId,properties,options){properties.id=groupId;window.Intercom("update",{company:properties})}})});require.register("analytics/src/providers/keen-io.js",function(exports,require,module){var Provider=require("../provider"),load=require("load-script");module.exports=Provider.extend({name:"Keen IO",defaults:{projectId:null,writeKey:null,readKey:null,pageview:true,initialPageview:true},initialize:function(options,ready){window.Keen=window.Keen||{configure:function(e){this._cf=e},addEvent:function(e,t,n,i){this._eq=this._eq||[],this._eq.push([e,t,n,i])},setGlobalProperties:function(e){this._gp=e},onChartsReady:function(e){this._ocrq=this._ocrq||[],this._ocrq.push(e)}};window.Keen.configure({projectId:options.projectId,writeKey:options.writeKey,readKey:options.readKey});load("//dc8na2hxrj29i.cloudfront.net/code/keen-2.1.0-min.js");if(options.initialPageview)this.pageview();ready()},identify:function(userId,traits){var globalUserProps={};if(userId)globalUserProps.userId=userId;if(traits)globalUserProps.traits=traits;if(userId||traits){window.Keen.setGlobalProperties(function(eventCollection){return{user:globalUserProps}})}},track:function(event,properties){window.Keen.addEvent(event,properties)},pageview:function(url){if(!this.options.pageview)return;var properties={url:url||document.location.href,name:document.title};this.track("Loaded a Page",properties)}})});require.register("analytics/src/providers/kissmetrics.js",function(exports,require,module){var Provider=require("../provider"),alias=require("alias"),load=require("load-script");module.exports=Provider.extend({name:"KISSmetrics",key:"apiKey",defaults:{apiKey:null},initialize:function(options,ready){window._kmq=window._kmq||[];load("//i.kissmetrics.com/i.js");load("//doug1izaerwt3.cloudfront.net/"+options.apiKey+".1.js");ready()},identify:function(userId,traits){if(userId)window._kmq.push(["identify",userId]);if(traits)window._kmq.push(["set",traits])},track:function(event,properties){if(properties){alias(properties,{revenue:"Billing Amount"})}window._kmq.push(["record",event,properties])},alias:function(newId,originalId){window._kmq.push(["alias",newId,originalId])}})});require.register("analytics/src/providers/klaviyo.js",function(exports,require,module){var Provider=require("../provider"),load=require("load-script");module.exports=Provider.extend({name:"Klaviyo",key:"apiKey",defaults:{apiKey:null},initialize:function(options,ready){window._learnq=window._learnq||[];window._learnq.push(["account",options.apiKey]);load("//a.klaviyo.com/media/js/learnmarklet.js");ready()},identify:function(userId,traits){if(!userId)return;traits.$id=userId;window._learnq.push(["identify",traits])},track:function(event,properties){window._learnq.push(["track",event,properties])}})});require.register("analytics/src/providers/livechat.js",function(exports,require,module){var Provider=require("../provider"),each=require("each"),load=require("load-script");module.exports=Provider.extend({name:"LiveChat",key:"license",defaults:{license:null},initialize:function(options,ready){window.__lc={license:options.license};load("//cdn.livechatinc.com/tracking.js",ready)},identify:function(userId,traits){if(!window.LC_API)return;var variables=[];if(userId)variables.push({name:"User ID",value:userId});if(traits){each(traits,function(key,value){variables.push({name:key,value:value})})}window.LC_API.set_custom_variables(variables)}})});require.register("analytics/src/providers/lytics.js",function(exports,require,module){var Provider=require("../provider"),load=require("load-script");module.exports=Provider.extend({name:"Lytics",key:"cid",defaults:{cid:null},initialize:function(options,ready){window.jstag=function(){var t={_q:[],_c:{cid:options.cid,url:"//c.lytics.io"},ts:(new Date).getTime()};t.send=function(){this._q.push(["ready","send",Array.prototype.slice.call(arguments)]);return this};return t}();load("//c.lytics.io/static/io.min.js");ready()},identify:function(userId,traits){traits._uid=userId;window.jstag.send(traits)},track:function(event,properties){properties._e=event;window.jstag.send(properties)},pageview:function(url){window.jstag.send()}})});require.register("analytics/src/providers/mixpanel.js",function(exports,require,module){var Provider=require("../provider"),alias=require("alias"),isEmail=require("is-email"),load=require("load-script");module.exports=Provider.extend({name:"Mixpanel",key:"token",defaults:{nameTag:true,people:false,token:null,pageview:false,initialPageview:false,cookieName:null},initialize:function(options,ready){!function(c,a){window.mixpanel=a;var b,d,h,e;a._i=[];a.init=function(b,c,f){function d(a,b){var c=b.split(".");2==c.length&&(a=a[c[0]],b=c[1]);a[b]=function(){a.push([b].concat(Array.prototype.slice.call(arguments,0)))}}var g=a;"undefined"!==typeof f?g=a[f]=[]:f="mixpanel";g.people=g.people||[];h=["disable","track","track_pageview","track_links","track_forms","register","register_once","unregister","identify","alias","name_tag","set_config","people.set","people.increment","people.track_charge","people.append"];for(e=0;e<h.length;e++)d(g,h[e]);a._i.push([b,c,f])};a.__SV=1.2;load("//cdn.mxpnl.com/libs/mixpanel-2.2.min.js",ready)}(document,window.mixpanel||[]);options.cookie_name=options.cookieName;window.mixpanel.init(options.token,options);if(options.initialPageview)this.pageview()},identify:function(userId,traits){alias(traits,{created:"$created",email:"$email",firstName:"$first_name",lastName:"$last_name",lastSeen:"$last_seen",name:"$name",username:"$username",phone:"$phone"});if(userId){window.mixpanel.identify(userId);if(this.options.nameTag)window.mixpanel.name_tag(traits&&traits.$email||userId)}if(traits){window.mixpanel.register(traits);if(this.options.people)window.mixpanel.people.set(traits)}},track:function(event,properties){window.mixpanel.track(event,properties);if(properties&&properties.revenue&&this.options.people){window.mixpanel.people.track_charge(properties.revenue)}},pageview:function(url){window.mixpanel.track_pageview(url);if(!this.options.pageview)return;var properties={url:url||document.location.href,name:document.title};this.track("Loaded a Page",properties)},alias:function(newId,originalId){if(window.mixpanel.get_distinct_id&&window.mixpanel.get_distinct_id()===newId)return;if(window.mixpanel.get_property&&window.mixpanel.get_property("$people_distinct_id")===newId)return;window.mixpanel.alias(newId,originalId)}})});require.register("analytics/src/providers/olark.js",function(exports,require,module){var Provider=require("../provider"),isEmail=require("is-email");module.exports=Provider.extend({name:"Olark",key:"siteId",chatting:false,defaults:{siteId:null,identify:true,track:false,pageview:true},initialize:function(options,ready){window.olark||function(c){var f=window,d=document,l=f.location.protocol=="https:"?"https:":"http:",z=c.name,r="load";var nt=function(){f[z]=function(){(a.s=a.s||[]).push(arguments)};var a=f[z]._={},q=c.methods.length;while(q--){!function(n){f[z][n]=function(){f[z]("call",n,arguments)}}(c.methods[q])}a.l=c.loader;a.i=nt;a.p={0:+new Date};a.P=function(u){a.p[u]=new Date-a.p[0]};function s(){a.P(r);f[z](r)}f.addEventListener?f.addEventListener(r,s,false):f.attachEvent("on"+r,s);var ld=function(){function p(hd){hd="head";return["<",hd,"></",hd,"><",i," onl"+'oad="var d=',g,";d.getElementsByTagName('head')[0].",j,"(d.",h,"('script')).",k,"='",l,"//",a.l,"'",'"',"></",i,">"].join("")}var i="body",m=d[i];if(!m){return setTimeout(ld,100)}a.P(1);var j="appendChild",h="createElement",k="src",n=d[h]("div"),v=n[j](d[h](z)),b=d[h]("iframe"),g="document",e="domain",o;n.style.display="none";m.insertBefore(n,m.firstChild).id=z;b.frameBorder="0";b.id=z+"-loader";if(/MSIE[ ]+6/.test(navigator.userAgent)){b.src="javascript:false"}b.allowTransparency="true";v[j](b);try{b.contentWindow[g].open()}catch(w){c[e]=d[e];o="javascript:var d="+g+".open();d.domain='"+d.domain+"';";b[k]=o+"void(0);"}try{var t=b.contentWindow[g];t.write(p());t.close()}catch(x){b[k]=o+'d.write("'+p().replace(/"/g,String.fromCharCode(92)+'"')+'");d.close();'}a.P(2)};ld()};nt()}({loader:"static.olark.com/jsclient/loader0.js",name:"olark",methods:["configure","extend","declare","identify"]});window.olark.identify(options.siteId);var self=this;window.olark("api.box.onExpand",function(){self.chatting=true});window.olark("api.box.onShrink",function(){self.chatting=false});ready()},identify:function(userId,traits){if(!this.options.identify)return;var email=traits.email,name=traits.name||traits.firstName,phone=traits.phone,nickname=name||email||userId;if(name&&email)nickname+=" ("+email+")";window.olark("api.visitor.updateCustomFields",traits);if(email)window.olark("api.visitor.updateEmailAddress",{emailAddress:email});if(name)window.olark("api.visitor.updateFullName",{fullName:name});if(phone)window.olark("api.visitor.updatePhoneNumber",{phoneNumber:phone});if(nickname)window.olark("api.chat.updateVisitorNickname",{snippet:nickname})},track:function(event,properties){if(!this.options.track||!this.chatting)return;window.olark("api.chat.sendNotificationToOperator",{body:'visitor triggered "'+event+'"'})},pageview:function(url){if(!this.options.pageview||!this.chatting)return;window.olark("api.chat.sendNotificationToOperator",{body:"looking at "+window.location.href})}})});require.register("analytics/src/providers/optimizely.js",function(exports,require,module){var each=require("each"),nextTick=require("next-tick"),Provider=require("../provider");module.exports=Provider.extend({name:"Optimizely",defaults:{variations:true},initialize:function(options,ready,analytics){window.optimizely=window.optimizely||[];if(options.variations){var self=this;nextTick(function(){self.replay()})}ready()},track:function(event,properties){if(properties&&properties.revenue)properties.revenue=properties.revenue*100;window.optimizely.push(["trackEvent",event,properties])},replay:function(){var data=window.optimizely.data;if(!data)return;var experiments=data.experiments,variationNamesMap=data.state.variationNamesMap;var traits={};each(variationNamesMap,function(experimentId,variation){traits["Experiment: "+experiments[experimentId].name]=variation});this.analytics.identify(traits)}})});require.register("analytics/src/providers/perfect-audience.js",function(exports,require,module){var Provider=require("../provider"),load=require("load-script");module.exports=Provider.extend({name:"Perfect Audience",key:"siteId",defaults:{siteId:null},initialize:function(options,ready){window._pa||(window._pa={});load("//tag.perfectaudience.com/serve/"+options.siteId+".js",ready)},track:function(event,properties){window._pa.track(event,properties)}})});require.register("analytics/src/providers/pingdom.js",function(exports,require,module){var date=require("load-date"),Provider=require("../provider"),load=require("load-script");module.exports=Provider.extend({name:"Pingdom",key:"id",defaults:{id:null},initialize:function(options,ready){window._prum=[["id",options.id],["mark","firstbyte",date.getTime()]];load("//rum-static.pingdom.net/prum.min.js",ready)}})});require.register("analytics/src/providers/preact.js",function(exports,require,module){var Provider=require("../provider"),isEmail=require("is-email"),load=require("load-script");module.exports=Provider.extend({name:"Preact",key:"projectCode",defaults:{projectCode:null},initialize:function(options,ready){var _lnq=window._lnq=window._lnq||[];_lnq.push(["_setCode",options.projectCode]);load("//d2bbvl6dq48fa6.cloudfront.net/js/ln-2.4.min.js");ready()},identify:function(userId,traits){if(!userId)return;if(traits.created){traits.created_at=Math.floor(traits.created/1e3);delete traits.created }window._lnq.push(["_setPersonData",{name:traits.name,email:traits.email,uid:userId,properties:traits}])},group:function(groupId,properties){if(!groupId)return;properties.id=groupId;window._lnq.push(["_setAccount",properties])},track:function(event,properties){properties||(properties={});var special={name:event};if(properties.revenue){special.revenue=properties.revenue*100;delete properties.revenue}if(properties.note){special.note=properties.note;delete properties.note}window._lnq.push(["_logEvent",special,properties])}})});require.register("analytics/src/providers/qualaroo.js",function(exports,require,module){var Provider=require("../provider"),isEmail=require("is-email"),load=require("load-script");module.exports=Provider.extend({name:"Qualaroo",defaults:{customerId:null,siteToken:null,track:false},initialize:function(options,ready){window._kiq=window._kiq||[];load("//s3.amazonaws.com/ki.js/"+options.customerId+"/"+options.siteToken+".js");ready()},identify:function(userId,traits){var identity=traits.email||userId;if(identity)window._kiq.push(["identify",identity]);if(traits)window._kiq.push(["set",traits])},track:function(event,properties){if(!this.options.track)return;var traits={};traits["Triggered: "+event]=true;this.identify(null,traits)}})});require.register("analytics/src/providers/quantcast.js",function(exports,require,module){var Provider=require("../provider"),load=require("load-script");module.exports=Provider.extend({name:"Quantcast",key:"pCode",defaults:{pCode:null},initialize:function(options,ready){window._qevents=window._qevents||[];window._qevents.push({qacct:options.pCode});load({http:"http://edge.quantserve.com/quant.js",https:"https://secure.quantserve.com/quant.js"},ready)}})});require.register("analytics/src/providers/sentry.js",function(exports,require,module){var Provider=require("../provider"),load=require("load-script");module.exports=Provider.extend({name:"Sentry",key:"config",defaults:{config:null},initialize:function(options,ready){load("//d3nslu0hdya83q.cloudfront.net/dist/1.0/raven.min.js",function(){window.Raven.config(options.config).install();ready()})},identify:function(userId,traits){traits.id=userId;window.Raven.setUser(traits)},log:function(error,properties){window.Raven.captureException(error,properties)}})});require.register("analytics/src/providers/snapengage.js",function(exports,require,module){var Provider=require("../provider"),isEmail=require("is-email"),load=require("load-script");module.exports=Provider.extend({name:"SnapEngage",key:"apiKey",defaults:{apiKey:null},initialize:function(options,ready){load("//commondatastorage.googleapis.com/code.snapengage.com/js/"+options.apiKey+".js",ready)},identify:function(userId,traits,options){if(!traits.email)return;window.SnapABug.setUserEmail(traits.email)}})});require.register("analytics/src/providers/usercycle.js",function(exports,require,module){var Provider=require("../provider"),load=require("load-script"),user=require("../user");module.exports=Provider.extend({name:"USERcycle",key:"key",defaults:{key:null},initialize:function(options,ready){window._uc=window._uc||[];window._uc.push(["_key",options.key]);load("//api.usercycle.com/javascripts/track.js");ready()},identify:function(userId,traits){if(userId)window._uc.push(["uid",userId]);window._uc.push(["action","came_back",traits])},track:function(event,properties){window._uc.push(["action",event,properties])}})});require.register("analytics/src/providers/userfox.js",function(exports,require,module){var Provider=require("../provider"),extend=require("extend"),load=require("load-script"),isEmail=require("is-email");module.exports=Provider.extend({name:"userfox",key:"clientId",defaults:{clientId:null},initialize:function(options,ready){window._ufq=window._ufq||[];load("//d2y71mjhnajxcg.cloudfront.net/js/userfox-stable.js");ready()},identify:function(userId,traits){if(!traits.email)return;window._ufq.push(["init",{clientId:this.options.clientId,email:traits.email}]);if(traits.created){traits.signup_date=(traits.created.getTime()/1e3).toString();delete traits.created;window._ufq.push(["track",traits])}}})});require.register("analytics/src/providers/uservoice.js",function(exports,require,module){var Provider=require("../provider"),load=require("load-script"),alias=require("alias"),clone=require("clone");module.exports=Provider.extend({name:"UserVoice",defaults:{widgetId:null,forumId:null,showTab:true,mode:"full",primaryColor:"#cc6d00",linkColor:"#007dbf",defaultMode:"support",tabLabel:"Feedback & Support",tabColor:"#cc6d00",tabPosition:"middle-right",tabInverted:false},initialize:function(options,ready){window.UserVoice=window.UserVoice||[];load("//widget.uservoice.com/"+options.widgetId+".js",ready);var optionsClone=clone(options);alias(optionsClone,{forumId:"forum_id",primaryColor:"primary_color",linkColor:"link_color",defaultMode:"default_mode",tabLabel:"tab_label",tabColor:"tab_color",tabPosition:"tab_position",tabInverted:"tab_inverted"});window.showClassicWidget=function(showWhat){window.UserVoice.push([showWhat||"showLightbox","classic_widget",optionsClone])};if(options.showTab){window.showClassicWidget("showTab")}},identify:function(userId,traits){traits.id=userId;window.UserVoice.push(["setCustomFields",traits])}})});require.register("analytics/src/providers/vero.js",function(exports,require,module){var Provider=require("../provider"),isEmail=require("is-email"),load=require("load-script");module.exports=Provider.extend({name:"Vero",key:"apiKey",defaults:{apiKey:null},initialize:function(options,ready){window._veroq=window._veroq||[];window._veroq.push(["init",{api_key:options.apiKey}]);load("//d3qxef4rp70elm.cloudfront.net/m.js");ready()},identify:function(userId,traits){if(!userId||!traits.email)return;traits.id=userId;window._veroq.push(["user",traits])},track:function(event,properties){window._veroq.push(["track",event,properties])}})});require.register("analytics/src/providers/visual-website-optimizer.js",function(exports,require,module){var each=require("each"),inherit=require("inherit"),nextTick=require("next-tick"),Provider=require("../provider");module.exports=VWO;function VWO(){Provider.apply(this,arguments)}inherit(VWO,Provider);VWO.prototype.name="Visual Website Optimizer";VWO.prototype.defaults={replay:true};VWO.prototype.initialize=function(options,ready){if(options.replay)this.replay();ready()};VWO.prototype.replay=function(){var analytics=this.analytics;nextTick(function(){experiments(function(err,traits){if(traits)analytics.identify(traits)})})};function experiments(callback){enqueue(function(){var data={};var ids=window._vwo_exp_ids;if(!ids)return callback();each(ids,function(id){var name=variation(id);if(name)data["Experiment: "+id]=name});callback(null,data)})}function enqueue(fn){window._vis_opt_queue||(window._vis_opt_queue=[]);window._vis_opt_queue.push(fn)}function variation(id){var experiments=window._vwo_exp;if(!experiments)return null;var experiment=experiments[id];var variationId=experiment.combination_chosen;return variationId?experiment.comb_n[variationId]:null}});require.register("analytics/src/providers/woopra.js",function(exports,require,module){var Provider=require("../provider"),each=require("each"),extend=require("extend"),isEmail=require("is-email"),load=require("load-script"),type=require("type"),user=require("../user");module.exports=Provider.extend({name:"Woopra",key:"domain",defaults:{domain:null},initialize:function(options,ready){var self=this;window.woopraReady=function(tracker){tracker.setDomain(self.options.domain);tracker.setIdleTimeout(3e5);var userId=user.id(),traits=user.traits();addTraits(userId,traits,tracker);tracker.track();ready();return false};load("//static.woopra.com/js/woopra.js")},identify:function(userId,traits){if(!window.woopraTracker)return;addTraits(userId,traits,window.woopraTracker)},track:function(event,properties){if(!window.woopraTracker)return;properties||(properties={});properties.name=event;window.woopraTracker.pushEvent(properties)}});function addTraits(userId,traits,tracker){if(userId)traits.id=userId;each(traits,function(key,value){if("string"===type(value))tracker.addVisitorProperty(key,value)})}});require.alias("avetisk-defaults/index.js","analytics/deps/defaults/index.js");require.alias("avetisk-defaults/index.js","defaults/index.js");require.alias("component-clone/index.js","analytics/deps/clone/index.js");require.alias("component-clone/index.js","clone/index.js");require.alias("component-type/index.js","component-clone/deps/type/index.js");require.alias("component-cookie/index.js","analytics/deps/cookie/index.js");require.alias("component-cookie/index.js","cookie/index.js");require.alias("component-each/index.js","analytics/deps/each/index.js");require.alias("component-each/index.js","each/index.js");require.alias("component-type/index.js","component-each/deps/type/index.js");require.alias("component-event/index.js","analytics/deps/event/index.js");require.alias("component-event/index.js","event/index.js");require.alias("component-inherit/index.js","analytics/deps/inherit/index.js");require.alias("component-inherit/index.js","inherit/index.js");require.alias("component-object/index.js","analytics/deps/object/index.js");require.alias("component-object/index.js","object/index.js");require.alias("component-querystring/index.js","analytics/deps/querystring/index.js");require.alias("component-querystring/index.js","querystring/index.js");require.alias("component-trim/index.js","component-querystring/deps/trim/index.js");require.alias("component-type/index.js","analytics/deps/type/index.js");require.alias("component-type/index.js","type/index.js");require.alias("component-url/index.js","analytics/deps/url/index.js");require.alias("component-url/index.js","url/index.js");require.alias("segmentio-after/index.js","analytics/deps/after/index.js");require.alias("segmentio-after/index.js","after/index.js");require.alias("segmentio-alias/index.js","analytics/deps/alias/index.js");require.alias("segmentio-alias/index.js","alias/index.js");require.alias("segmentio-bind-all/index.js","analytics/deps/bind-all/index.js");require.alias("segmentio-bind-all/index.js","analytics/deps/bind-all/index.js");require.alias("segmentio-bind-all/index.js","bind-all/index.js");require.alias("component-bind/index.js","segmentio-bind-all/deps/bind/index.js");require.alias("component-type/index.js","segmentio-bind-all/deps/type/index.js");require.alias("segmentio-bind-all/index.js","segmentio-bind-all/index.js");require.alias("segmentio-canonical/index.js","analytics/deps/canonical/index.js");require.alias("segmentio-canonical/index.js","canonical/index.js");require.alias("segmentio-extend/index.js","analytics/deps/extend/index.js");require.alias("segmentio-extend/index.js","extend/index.js");require.alias("segmentio-is-email/index.js","analytics/deps/is-email/index.js");require.alias("segmentio-is-email/index.js","is-email/index.js");require.alias("segmentio-is-meta/index.js","analytics/deps/is-meta/index.js");require.alias("segmentio-is-meta/index.js","is-meta/index.js");require.alias("segmentio-json/index.js","analytics/deps/json/index.js");require.alias("segmentio-json/index.js","json/index.js");require.alias("component-json-fallback/index.js","segmentio-json/deps/json-fallback/index.js");require.alias("segmentio-load-date/index.js","analytics/deps/load-date/index.js");require.alias("segmentio-load-date/index.js","load-date/index.js");require.alias("segmentio-load-script/index.js","analytics/deps/load-script/index.js");require.alias("segmentio-load-script/index.js","load-script/index.js");require.alias("component-type/index.js","segmentio-load-script/deps/type/index.js");require.alias("segmentio-new-date/index.js","analytics/deps/new-date/index.js");require.alias("segmentio-new-date/index.js","new-date/index.js");require.alias("segmentio-type/index.js","segmentio-new-date/deps/type/index.js");require.alias("segmentio-on-body/index.js","analytics/deps/on-body/index.js");require.alias("segmentio-on-body/index.js","on-body/index.js");require.alias("component-each/index.js","segmentio-on-body/deps/each/index.js");require.alias("component-type/index.js","component-each/deps/type/index.js");require.alias("segmentio-store.js/store.js","analytics/deps/store/store.js");require.alias("segmentio-store.js/store.js","analytics/deps/store/index.js");require.alias("segmentio-store.js/store.js","store/index.js");require.alias("segmentio-json/index.js","segmentio-store.js/deps/json/index.js");require.alias("component-json-fallback/index.js","segmentio-json/deps/json-fallback/index.js");require.alias("segmentio-store.js/store.js","segmentio-store.js/index.js");require.alias("segmentio-top-domain/index.js","analytics/deps/top-domain/index.js");require.alias("segmentio-top-domain/index.js","analytics/deps/top-domain/index.js");require.alias("segmentio-top-domain/index.js","top-domain/index.js");require.alias("component-url/index.js","segmentio-top-domain/deps/url/index.js");require.alias("segmentio-top-domain/index.js","segmentio-top-domain/index.js");require.alias("timoxley-next-tick/index.js","analytics/deps/next-tick/index.js");require.alias("timoxley-next-tick/index.js","next-tick/index.js");require.alias("yields-prevent/index.js","analytics/deps/prevent/index.js");require.alias("yields-prevent/index.js","prevent/index.js");require.alias("analytics/src/index.js","analytics/index.js");if(typeof exports=="object"){module.exports=require("analytics")}else if(typeof define=="function"&&define.amd){define(function(){return require("analytics")})}else{this["analytics"]=require("analytics")}}();
public/app/components/ui-project-tab/index.js
vincent-tr/mylife-home-studio
'use strict'; import React from 'react'; import * as mui from 'material-ui'; import * as bs from 'react-bootstrap'; import PropertiesContainer from '../../containers/ui-project-tab/properties-container'; import ExplorerContainer from '../../containers/ui-project-tab/explorer-container'; import DialogConfirmImportComponents from '../../containers/ui-project-tab/dialog-confirm-import-components'; import Toolbox from './toolbox'; import CanvasContainer from '../../containers/ui-project-tab/canvas-container'; import TitleContainer from '../../containers/ui-project-tab/title-container'; import tabStyles from '../base/tab-styles'; const styles = { explorerHeight : { height: 'calc(100% - 144px)' } }; const UiProjectTab = ({ project, onTabClosed }) => ( <div style={Object.assign({}, tabStyles.fullHeight)}> <bs.Grid fluid={true} style={Object.assign({}, tabStyles.fullHeight)}> <bs.Row style={tabStyles.fullHeight}> <bs.Col sm={2} style={Object.assign({}, tabStyles.noPadding, tabStyles.fullHeight)}> <div style={tabStyles.fullHeight}> <mui.Paper> <Toolbox project={project} /> </mui.Paper> <mui.Paper style={Object.assign({}, tabStyles.scrollable, styles.explorerHeight)}> <ExplorerContainer project={project.uid}/> </mui.Paper> </div> </bs.Col> <bs.Col sm={8} style={Object.assign({}, tabStyles.noPadding, tabStyles.scrollable, tabStyles.fullHeight)}> <div style={Object.assign({marginTop: '-10px' /* WTF ?! */}, tabStyles.noPadding, tabStyles.fullHeight)}> <TitleContainer project={project.uid} onTabClosed={onTabClosed} /> <CanvasContainer project={project.uid} /> </div> </bs.Col> <bs.Col sm={2} style={Object.assign({}, tabStyles.noPadding, tabStyles.fullHeight)}> <mui.Paper style={Object.assign({}, tabStyles.scrollable, tabStyles.fullHeight)}> <PropertiesContainer project={project.uid} /> </mui.Paper> </bs.Col> </bs.Row> </bs.Grid> <DialogConfirmImportComponents project={project.uid}/> </div> ); UiProjectTab.propTypes = { project: React.PropTypes.object.isRequired, onTabClosed: React.PropTypes.func.isRequired }; export default UiProjectTab;
.eslintrc.js
lycophron/lycophron
module.exports = { "env": { "browser": true, "commonjs": true, "es6": true }, "extends": [ "eslint:recommended", "plugin:react/recommended" ], "globals": { "Atomics": "readonly", "SharedArrayBuffer": "readonly" }, "parserOptions": { "ecmaFeatures": { "jsx": true }, "ecmaVersion": 2018 }, "plugins": [ "react" ], "rules": { } };
examples/pinterest/app.js
shunitoh/react-router
import React from 'react' import { render } from 'react-dom' import { browserHistory, Router, Route, IndexRoute, Link } from 'react-router' import withExampleBasename from '../withExampleBasename' const PICTURES = [ { id: 0, src: 'http://placekitten.com/601/601' }, { id: 1, src: 'http://placekitten.com/610/610' }, { id: 2, src: 'http://placekitten.com/620/620' } ] const Modal = React.createClass({ styles: { position: 'fixed', top: '20%', right: '20%', bottom: '20%', left: '20%', padding: 20, boxShadow: '0px 0px 150px 130px rgba(0, 0, 0, 0.5)', overflow: 'auto', background: '#fff' }, render() { return ( <div style={this.styles}> <p><Link to={this.props.returnTo}>Back</Link></p> {this.props.children} </div> ) } }) const App = React.createClass({ componentWillReceiveProps(nextProps) { // if we changed routes... if (( nextProps.location.key !== this.props.location.key && nextProps.location.state && nextProps.location.state.modal )) { // save the old children (just like animation) this.previousChildren = this.props.children } }, render() { let { location } = this.props let isModal = ( location.state && location.state.modal && this.previousChildren ) return ( <div> <h1>Pinterest Style Routes</h1> <div> {isModal ? this.previousChildren : this.props.children } {isModal && ( <Modal isOpen={true} returnTo={location.state.returnTo}> {this.props.children} </Modal> )} </div> </div> ) } }) const Index = React.createClass({ render() { return ( <div> <p> The url `/pictures/:id` can be rendered anywhere in the app as a modal. Simply put `modal: true` in the location descriptor of the `to` prop. </p> <p> Click on an item and see its rendered as a modal, then copy/paste the url into a different browser window (with a different session, like Chrome -> Firefox), and see that the image does not render inside the overlay. One URL, two session dependent screens :D </p> <div> {PICTURES.map(picture => ( <Link key={picture.id} to={{ pathname: `/pictures/${picture.id}`, state: { modal: true, returnTo: this.props.location.pathname } }} > <img style={{ margin: 10 }} src={picture.src} height="100" /> </Link> ))} </div> <p><Link to="/some/123/deep/456/route">Go to some deep route</Link></p> </div> ) } }) const Deep = React.createClass({ render() { return ( <div> <p>You can link from anywhere really deep too</p> <p>Params stick around: {this.props.params.one} {this.props.params.two}</p> <p> <Link to={{ pathname: '/pictures/0', state: { modal: true, returnTo: this.props.location.pathname } }}> Link to picture with Modal </Link><br/> <Link to="/pictures/0"> Without modal </Link> </p> </div> ) } }) const Picture = React.createClass({ render() { return ( <div> <img src={PICTURES[this.props.params.id].src} style={{ height: '80%' }} /> </div> ) } }) render(( <Router history={withExampleBasename(browserHistory, __dirname)}> <Route path="/" component={App}> <IndexRoute component={Index}/> <Route path="/pictures/:id" component={Picture}/> <Route path="/some/:one/deep/:two/route" component={Deep}/> </Route> </Router> ), document.getElementById('example'))
ui/node_modules/react-bootstrap/src/Input.js
bpatters/eservice
import React from 'react'; import classSet from 'classnames'; import Button from './Button'; const Input = React.createClass({ propTypes: { type: React.PropTypes.string, label: React.PropTypes.node, help: React.PropTypes.node, addonBefore: React.PropTypes.node, addonAfter: React.PropTypes.node, buttonBefore: React.PropTypes.node, buttonAfter: React.PropTypes.node, bsSize: React.PropTypes.oneOf(['small', 'medium', 'large']), bsStyle(props) { if (props.type === 'submit') { // Return early if `type=submit` as the `Button` component // it transfers these props to has its own propType checks. return null; } return React.PropTypes.oneOf(['success', 'warning', 'error']).apply(null, arguments); }, hasFeedback: React.PropTypes.bool, groupClassName: React.PropTypes.string, wrapperClassName: React.PropTypes.string, labelClassName: React.PropTypes.string, disabled: React.PropTypes.bool }, getInputDOMNode() { return React.findDOMNode(this.refs.input); }, getValue() { if (this.props.type === 'static') { return this.props.value; } else if (this.props.type) { if (this.props.type === 'select' && this.props.multiple) { return this.getSelectedOptions(); } else { return this.getInputDOMNode().value; } } else { throw 'Cannot use getValue without specifying input type.'; } }, getChecked() { return this.getInputDOMNode().checked; }, getSelectedOptions() { let values = []; Array.prototype.forEach.call( this.getInputDOMNode().getElementsByTagName('option'), function (option) { if (option.selected) { let value = option.getAttribute('value') || option.innerHTML; values.push(value); } } ); return values; }, isCheckboxOrRadio() { return this.props.type === 'radio' || this.props.type === 'checkbox'; }, isFile() { return this.props.type === 'file'; }, renderInput() { let input = null; if (!this.props.type) { return this.props.children; } switch (this.props.type) { case 'select': input = ( <select {...this.props} className={classSet(this.props.className, 'form-control')} ref="input" key="input"> {this.props.children} </select> ); break; case 'textarea': input = <textarea {...this.props} className={classSet(this.props.className, 'form-control')} ref="input" key="input" />; break; case 'static': input = ( <p {...this.props} className={classSet(this.props.className, 'form-control-static')} ref="input" key="input"> {this.props.value} </p> ); break; case 'submit': input = ( <Button {...this.props} componentClass='input' ref='input' key='input' /> ); break; default: let className = this.isCheckboxOrRadio() || this.isFile() ? '' : 'form-control'; input = <input {...this.props} className={classSet(this.props.className, className)} ref="input" key="input" />; } return input; }, renderInputGroup(children) { let addonBefore = this.props.addonBefore ? ( <span className="input-group-addon" key="addonBefore"> {this.props.addonBefore} </span> ) : null; let addonAfter = this.props.addonAfter ? ( <span className="input-group-addon" key="addonAfter"> {this.props.addonAfter} </span> ) : null; let buttonBefore = this.props.buttonBefore ? ( <span className="input-group-btn"> {this.props.buttonBefore} </span> ) : null; let buttonAfter = this.props.buttonAfter ? ( <span className="input-group-btn"> {this.props.buttonAfter} </span> ) : null; let inputGroupClassName; switch (this.props.bsSize) { case 'small': inputGroupClassName = 'input-group-sm'; break; case 'large': inputGroupClassName = 'input-group-lg'; break; } return addonBefore || addonAfter || buttonBefore || buttonAfter ? ( <div className={classSet(inputGroupClassName, 'input-group')} key="input-group"> {addonBefore} {buttonBefore} {children} {addonAfter} {buttonAfter} </div> ) : children; }, renderIcon() { let classes = { 'glyphicon': true, 'form-control-feedback': true, 'glyphicon-ok': this.props.bsStyle === 'success', 'glyphicon-warning-sign': this.props.bsStyle === 'warning', 'glyphicon-remove': this.props.bsStyle === 'error' }; return this.props.hasFeedback ? ( <span className={classSet(classes)} key="icon" /> ) : null; }, renderHelp() { return this.props.help ? ( <span className="help-block" key="help"> {this.props.help} </span> ) : null; }, renderCheckboxandRadioWrapper(children) { let classes = { 'checkbox': this.props.type === 'checkbox', 'radio': this.props.type === 'radio' }; return ( <div className={classSet(classes)} key="checkboxRadioWrapper"> {children} </div> ); }, renderWrapper(children) { return this.props.wrapperClassName ? ( <div className={this.props.wrapperClassName} key="wrapper"> {children} </div> ) : children; }, renderLabel(children) { let classes = { 'control-label': !this.isCheckboxOrRadio() }; classes[this.props.labelClassName] = this.props.labelClassName; return this.props.label ? ( <label htmlFor={this.props.id} className={classSet(classes)} key="label"> {children} {this.props.label} </label> ) : children; }, renderFormGroup(children) { let classes = { 'form-group': true, 'has-feedback': this.props.hasFeedback, 'has-success': this.props.bsStyle === 'success', 'has-warning': this.props.bsStyle === 'warning', 'has-error': this.props.bsStyle === 'error' }; classes[this.props.groupClassName] = this.props.groupClassName; return ( <div className={classSet(classes)}> {children} </div> ); }, render() { if (this.isCheckboxOrRadio()) { return this.renderFormGroup( this.renderWrapper([ this.renderCheckboxandRadioWrapper( this.renderLabel( this.renderInput() ) ), this.renderHelp() ]) ); } else { return this.renderFormGroup([ this.renderLabel(), this.renderWrapper([ this.renderInputGroup( this.renderInput() ), this.renderIcon(), this.renderHelp() ]) ]); } } }); export default Input;
ajax/libs/yui/3.4.0/event-focus/event-focus.js
dakshshah96/cdnjs
YUI.add('event-focus', function(Y) { /** * Adds bubbling and delegation support to DOM events focus and blur. * * @module event * @submodule event-focus */ var Event = Y.Event, YLang = Y.Lang, isString = YLang.isString, useActivate = YLang.isFunction( Y.DOM.create('<p onbeforeactivate=";"/>').onbeforeactivate); function define(type, proxy, directEvent) { var nodeDataKey = '_' + type + 'Notifiers'; Y.Event.define(type, { _attach: function (el, notifier, delegate) { if (Y.DOM.isWindow(el)) { return Event._attach([type, function (e) { notifier.fire(e); }, el]); } else { return Event._attach( [proxy, this._proxy, el, this, notifier, delegate], { capture: true }); } }, _proxy: function (e, notifier, delegate) { var node = e.target, notifiers = node.getData(nodeDataKey), yuid = Y.stamp(e.currentTarget._node), defer = (useActivate || e.target !== e.currentTarget), sub = notifier.handle.sub, filterArgs = [node, e].concat(sub.args || []), directSub; notifier.currentTarget = (delegate) ? node : e.currentTarget; notifier.container = (delegate) ? e.currentTarget : null; if (!sub.filter || sub.filter.apply(node, filterArgs)) { // Maintain a list to handle subscriptions from nested // containers div#a>div#b>input #a.on(focus..) #b.on(focus..), // use one focus or blur subscription that fires notifiers from // #b then #a to emulate bubble sequence. if (!notifiers) { notifiers = {}; node.setData(nodeDataKey, notifiers); // only subscribe to the element's focus if the target is // not the current target ( if (defer) { directSub = Event._attach( [directEvent, this._notify, node._node]).sub; directSub.once = true; } } if (!notifiers[yuid]) { notifiers[yuid] = []; } notifiers[yuid].push(notifier); if (!defer) { this._notify(e); } } }, _notify: function (e, container) { var node = e.currentTarget, notifiers = node.getData(nodeDataKey), // document.get('ownerDocument') returns null doc = node.get('ownerDocument') || node, target = node, nots = [], notifier, i, len; if (notifiers) { // Walk up the parent axis until the origin node, while (target && target !== doc) { nots.push.apply(nots, notifiers[Y.stamp(target)] || []); target = target.get('parentNode'); } nots.push.apply(nots, notifiers[Y.stamp(doc)] || []); for (i = 0, len = nots.length; i < len; ++i) { notifier = nots[i]; e.currentTarget = nots[i].currentTarget; if (notifier.container) { e.container = notifier.container; } notifier.fire(e); } // clear the notifications list (mainly for delegation) node.clearData(nodeDataKey); } }, on: function (node, sub, notifier) { sub.onHandle = this._attach(node._node, notifier); }, detach: function (node, sub) { sub.onHandle.detach(); }, delegate: function (node, sub, notifier, filter) { if (isString(filter)) { sub.filter = Y.delegate.compileFilter(filter); } sub.delegateHandle = this._attach(node._node, notifier, true); }, detachDelegate: function (node, sub) { sub.delegateHandle.detach(); } }, true); } // For IE, we need to defer to focusin rather than focus because // `el.focus(); doSomething();` executes el.onbeforeactivate, el.onactivate, // el.onfocusin, doSomething, then el.onfocus. All others support capture // phase focus, which executes before doSomething. To guarantee consistent // behavior for this use case, IE's direct subscriptions are made against // focusin so subscribers will be notified before js following el.focus() is // executed. if (useActivate) { // name capture phase direct subscription define("focus", "beforeactivate", "focusin"); define("blur", "beforedeactivate", "focusout"); } else { define("focus", "focus", "focus"); define("blur", "blur", "blur"); } }, '@VERSION@' ,{requires:['event-synthetic']});
web/src/components/Icons/CreditCard.js
dnote-io/cli
/* Copyright (C) 2019, 2020 Monomax Software Pty Ltd * * This file is part of Dnote. * * Dnote is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Dnote is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Dnote. If not, see <https://www.gnu.org/licenses/>. */ import React from 'react'; const Icon = ({ fill, width, height, className }) => { const h = `${height}px`; const w = `${width}px`; return ( <svg viewBox="0 0 20 16" height={h} width={w} className={className}> <title /> <desc /> <defs /> <g fill="none" fillRule="evenodd" stroke="none" strokeWidth="1"> <g fill={fill} transform="translate(-254.000000, -130.000000)"> <g id="credit-card" transform="translate(254.000000, 130.000000)"> <path d="M18,0 L2,0 C0.9,0 0,0.9 0,2 L0,14 C0,15.1 0.9,16 2,16 L18,16 C19.1,16 20,15.1 20,14 L20,2 C20,0.9 19.1,0 18,0 L18,0 Z M18,14 L2,14 L2,8 L18,8 L18,14 L18,14 Z M18,4 L2,4 L2,2 L18,2 L18,4 L18,4 Z" /> </g> </g> </g> </svg> ); }; Icon.defaultProps = { fill: '#000', width: 32, height: 32 }; export default Icon;
client/modules/core/components/ui/col.js
pstuart/Open-Dash
import React, { Component } from 'react'; class Col extends Component { constructor(props) { super(props); this._classMap = { xs: 'col-xs', sm: 'col-sm', md: 'col-md', lg: 'col-lg', xsOffset: 'col-xs-offset', smOffset: 'col-sm-offset', mdOffset: 'col-md-offset', lgOffset: 'col-lg-offset' }; } render() { const classes = []; if (this.props.className) { classes.push(this.props.className); } if (this.props.reverse) { classes.push('reverse'); } for (const key in this.props) { if (this.props.hasOwnProperty(key) && this._classMap[key]) { let colBaseClass = this._classMap[key]; colBaseClass = Number.isInteger(this.props[key]) ? (colBaseClass + '-' + this.props[key]) : colBaseClass; classes.push(colBaseClass); } } const props = _.omit(this.props, ['className', 'children']); return ( <div className={classes.join(' ')} {...props} > {this.props.children} </div> ); } } const ModificatorType = React.PropTypes.oneOfType([ React.PropTypes.number, React.PropTypes.bool ]); Col.propTypes = { xs: ModificatorType, sm: ModificatorType, md: ModificatorType, lg: ModificatorType, xsOffset: React.PropTypes.number, smOffset: React.PropTypes.number, mdOffset: React.PropTypes.number, lgOffset: React.PropTypes.number, reverse: React.PropTypes.bool, className: React.PropTypes.string, children: React.PropTypes.node }; export default Col;
templates/rubix/rubix-bootstrap/src/Col.js
jeffthemaximum/Teachers-Dont-Pay-Jeff
import classNames from 'classnames'; import React from 'react'; import BCol from 'react-bootstrap/lib/Col'; const breakpoints = ['xs', 'sm', 'md', 'lg']; const directions = ['left', 'right', 'top', 'bottom']; function ucfirst(str) { return typeof str !="undefined" ? (str += '', str[0].toUpperCase() + str.substr(1)) : ''; } function setLayoutClass(props, name, what, key) { if (props[name] !== undefined && props[key] !== undefined) { props.className = classNames('col-' + name + '-' + what + ' ', props.className); delete props[key]; } } function convertAndSetCamelCaseClass(props, key) { var klass = 'col-' + key.replace(/([A-Z])/mg, function(a) { return '-' + a.toLowerCase() }); props.className = classNames(klass, props.className); delete props[key]; } export default class Col extends React.Component { render() { let props = { ...this.props, }; for (var i = 0; i < breakpoints.length; i++) { for (var j = 0; j < directions.length; j++) { setLayoutClass(props, breakpoints[i], `collapse-${directions[j]}`, `collapse${ucfirst(directions[j])}`) setLayoutClass(props, breakpoints[i], `gutter-${directions[j]}`, `gutter${ucfirst(directions[j])}`) } if (props.hasOwnProperty(breakpoints[i]+'Visible')) { props.className = classNames('visible-' + breakpoints[i], props.className); } } if (props.hasOwnProperty('visible') && typeof props.visible === 'string') { var visibleBreakpoints = props.visible.split(','); for (var i = 0; i < visibleBreakpoints.length; i++) { var visibleBreakpoint = visibleBreakpoints[i].trim(); props.className = classNames('visible-' + visibleBreakpoint, props.className); } } if (props.hasOwnProperty('hidden') && typeof props.hidden === 'string') { var hiddenBreakpoints = props.hidden.split(','); for (var i = 0; i < hiddenBreakpoints.length; i++) { var hiddenBreakpoint = hiddenBreakpoints[i].trim(); props.className = classNames('hidden-' + hiddenBreakpoint, props.className); } } for (var key in props) { if (props.hasOwnProperty(key)) { if (key.search('Collapse') !== -1 || key.search('Gutter') !== -1) { convertAndSetCamelCaseClass(props, key); } } } delete props.visible; return <BCol { ...props } />; } }
src/applications/appeals/10182/tests/components/AddIssue.unit.spec.js
department-of-veterans-affairs/vets-website
import React from 'react'; import { expect } from 'chai'; import { render } from '@testing-library/react'; import sinon from 'sinon'; import { AddIssue } from '../../components/AddIssue'; import { issueErrorMessages } from '../../content/addIssue'; import { MAX_LENGTH, LAST_NOD_ITEM } from '../../constants'; import { getDate } from '../../utils/dates'; import { $, $$ } from '../../utils/ui'; describe('<AddIssue>', () => { const validDate = getDate({ offset: { months: -2 } }); const contestableIssues = [ { type: 'contestableIssue', attributes: { ratingIssueSubjectText: 'test', approxDecisionDate: validDate, }, }, ]; const setup = ({ index = null, setFormData = () => {}, goToPath = () => {}, data = {}, onReviewPage = false, } = {}) => { if (index !== null) { window.sessionStorage.setItem(LAST_NOD_ITEM, index); } else { window.sessionStorage.removeItem(LAST_NOD_ITEM); } return ( <div> <AddIssue setFormData={setFormData} data={data} goToPath={goToPath} onReviewPage={onReviewPage} testingIndex={index} appStateData={data} /> </div> ); }; afterEach(() => { window.sessionStorage.removeItem(LAST_NOD_ITEM); }); it('should render', () => { const { container } = render(setup()); const textInput = $('input[name="add-nod-issue"]', container); expect(textInput).to.exist; expect($('.usa-datefields', container)).to.exist; }); it('should prevent submission when empty', () => { const goToPathSpy = sinon.spy(); const { container } = render(setup({ goToPath: goToPathSpy })); $('button#submit', container).click(); const errors = $$('.usa-input-error-message', container); expect(errors[0].textContent).to.contain(issueErrorMessages.missingIssue); expect(errors[1].textContent).to.contain( issueErrorMessages.missingDecisionDate, ); expect(goToPathSpy.called).to.be.false; }); it('should navigate on cancel', () => { const goToPathSpy = sinon.spy(); const { container } = render(setup({ goToPath: goToPathSpy })); $('button#cancel', container).click(); expect(goToPathSpy.called).to.be.true; }); it('should show error when issue name is too long', () => { const issue = 'abcdef '.repeat(MAX_LENGTH.ISSUE_NAME / 6); const { container } = render( setup({ data: { contestableIssues, additionalIssues: [{ issue }] }, index: 1, }), ); $('button#submit', container).click(); const error = $('.usa-input-error-message', container); expect(error.textContent).to.contain(issueErrorMessages.maxLength); }); it('should show error when issue date is not in range', () => { const decisionDate = getDate({ offset: { years: +200 } }); const { container } = render( setup({ data: { contestableIssues, additionalIssues: [{ decisionDate }] }, index: 1, }), ); $('button#submit', container).click(); const error = $('fieldset[id] .usa-input-error-message', container); expect(error.textContent).to.contain( // partial match issueErrorMessages.invalidDateRange('xxxx', '').split('xxxx')[0], ); }); it('should show an error when the issue date is > 1 year in the future', () => { const decisionDate = getDate({ offset: { months: +13 } }); const { container } = render( setup({ data: { contestableIssues, additionalIssues: [{ decisionDate }] }, index: 1, }), ); $('button#submit', container).click(); const error = $('fieldset[id] .usa-input-error-message', container); expect(error.textContent).to.contain(issueErrorMessages.pastDate); }); it('should show an error when the issue date is > 1 year in the past', () => { const decisionDate = getDate({ offset: { months: -13 } }); const { container } = render( setup({ data: { contestableIssues, additionalIssues: [{ decisionDate }] }, index: 1, }), ); $('button#submit', container).click(); const error = $('fieldset[id] .usa-input-error-message', container); expect(error.textContent).to.contain(issueErrorMessages.newerDate); }); it('should show an error when the issue is not unique', () => { const goToPathSpy = sinon.spy(); const additionalIssues = [{ issue: 'test', decisionDate: validDate }]; const { container } = render( setup({ goToPath: goToPathSpy, data: { contestableIssues, additionalIssues }, index: 1, }), ); $('button#submit', container).click(); const error = $('.usa-input-error-message', container); expect(error.textContent).to.contain(issueErrorMessages.uniqueIssue); }); it('should submit when everything is valid', () => { const goToPathSpy = sinon.spy(); const additionalIssues = [ { issue: 'test', decisionDate: getDate({ offset: { months: -3 } }) }, ]; const { container } = render( setup({ goToPath: goToPathSpy, data: { contestableIssues, additionalIssues }, index: 1, }), ); $('button#submit', container).click(); expect($('.usa-input-error-message', container)).to.not.exist; expect(goToPathSpy.called).to.be.true; }); });
ui/src/main/js/components/Tabs.js
rdelval/aurora
import React from 'react'; import Icon from 'components/Icon'; import { addClass } from 'utils/Common'; // Wrapping tabs in his component helps simplify testing of Tabs with enzyme's shallow renderer. export function Tab({ children, icon, id, name }) { return <div>{children}</div>; } export default class Tabs extends React.Component { constructor(props) { super(props); this.state = { active: props.activeTab || React.Children.toArray(props.children)[0].props.id }; } select(tab) { this.setState({active: tab.id}); if (this.props.onChange) { this.props.onChange(tab); } } componentWillReceiveProps(nextProps) { // Because this component manages its own state, we need to listen to changes to the activeTab // property - as the changes will not propagate without the component being remounted. if (nextProps.activeTab !== this.props.activeTab && nextProps.activeTab !== this.state.activeTab) { this.setState({active: nextProps.activeTab}); } } render() { const that = this; const isActive = (t) => t.id === that.state.active; return (<div className={addClass('tabs', this.props.className)}> <ul className='tab-navigation'> {React.Children.map(this.props.children, (t) => (<li className={isActive(t.props) ? 'active' : ''} key={t.props.name} onClick={(e) => this.select(t.props)}> {t.props.icon ? <Icon name={t.props.icon} /> : ''} {t.props.name} </li>))} </ul> <div className='active-tab'> {React.Children.toArray(this.props.children).find((t) => isActive(t.props))} </div> </div>); } }
ajax/libs/preact/5.0.0-beta8/preact.min.js
seogi1004/cdnjs
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e.preact=e.preact||{})}(this,function(e){"use strict";function n(e,n,t){this.nodeName=e,this.attributes=n,this.children=t,this.key=n&&n.key}function t(e,n){if(n)for(var t in n)e[t]=n[t];return e}function o(e){return t({},e)}function r(e){var n={};return function(t){return n[t]||(n[t]=e(t))}}function i(e,n){for(var t=n.split("."),o=0;t.length>o&&e;o++)e=e[t[o]];return e}function a(e,n){return[].slice.call(e,n)}function c(e){return"function"==typeof e}function u(e){return"string"==typeof e}function s(e){return void 0===e||null===e}function l(e){return e===!1||s(e)}function f(e){var n="";for(var t in e){var o=e[t];s(o)||(n&&(n+=" "),n+=ue(t),n+=": ",n+=o,"number"!=typeof o||ce[t]||(n+="px"),n+=";")}return n}function p(e){var n="";for(var t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function d(e,n,t){var o=e[n];o&&!u(o)&&(e[n]=t(o))}function v(e,n){return h(de,e,n)}function h(e,n,t,o,r){return e[n]?e[n](t,o,r):void 0}function m(e,n){do h(e,n);while(e=e._component)}function _(e,t,o){var r=arguments.length,i=void 0,a=void 0,c=void 0;if(r>2){var s=typeof o;if(3===r&&"object"!==s&&"function"!==s)l(o)||(i=[o+""]);else{i=[];for(var f=2;r>f;f++){var p=arguments[f];if(!l(p)){p.join?a=p:(a=ve,a[0]=p);for(var d=0;a.length>d;d++){var h=a[d],m=!(l(h)||h instanceof n);m&&!u(h)&&(h+=""),m&&c?i[i.length-1]+=h:l(h)||i.push(h),c=m}}}}}else if(t&&t.children)return _(e,t,t.children);var y=new n(e,t||void 0,i);return v("vnode",y),y}function y(e,n){return _(e.nodeName,t(o(e.attributes),n),arguments.length>2?a(arguments,2):e.children)}function b(e,n,t){var o=n.split("."),r=o[0],a=o.length;return function(n){var l,f=n&&n.currentTarget||this,p=e.state,d=p,v=void 0,h=void 0;if(u(t)?(v=i(n,t),s(v)&&(f=f._component)&&(v=i(f,t))):v=(f.nodeName+f.type).match(/^input(check|rad)/i)?f.checked:f.value,c(v)&&(v=v.call(f)),a>1){for(h=0;a-1>h;h++)d=d[o[h]]||(d[o[h]]={});d[o[h]]=v,v=p[r]}e.setState((l={},l[r]=v,l))}}function g(e){1===he.push(e)&&(de.debounceRendering||pe)(x)}function x(){if(he.length){var e=he,n=void 0;he=me,me=e;while(n=e.pop())n._dirty&&J(n)}}function C(e){var n=e.nodeName;return n&&c(n)&&!(n.prototype&&n.prototype.render)}function N(e,n){return e.nodeName(D(e),n||re)||ie}function k(e,n){return e[ae]||(e[ae]=n||{})}function S(e){return e instanceof Text?3:e instanceof Element?1:0}function w(e,n){for(var t=n.length,o=t>2,r=o?document.createDocumentFragment():e,i=0;t>i;i++)r.appendChild(n[i]);o&&e.appendChild(r)}function M(e){var n=e.parentNode;n&&n.removeChild(e)}function P(e,n,t){if(k(e)[n]=t,"key"!==n&&"children"!==n)if("class"===n)e.className=t||"";else if("style"===n)e.style.cssText=t||"";else if("dangerouslySetInnerHTML"===n)t&&t.__html&&(e.innerHTML=t.__html);else if("type"!==n&&n in e)T(e,n,s(t)?"":t),l(t)&&e.removeAttribute(n);else if("o"===n[0]&&"n"===n[1]){var o=_e(n),r=e._listeners||(e._listeners={});r[o]?t||e.removeEventListener(o,R):e.addEventListener(o,R),r[o]=t}else l(t)?e.removeAttribute(n):"object"==typeof t||c(t)||e.setAttribute(n,t)}function T(e,n,t){try{e[n]=t}catch(o){}}function R(e){return this._listeners[_e(e.type)](v("event",e)||e)}function U(e){var n=e.attributes,t={},o=n.length;while(o--)t[n[o].name]=n[o].value;return t}function W(e,n){if(u(n))return 3===S(e);var t=n.nodeName,o=typeof t;return"string"===o?e.normalizedNodeName===t||B(e,t):"function"===o?e._componentConstructor===t||C(n):void 0}function B(e,n){return se(e.nodeName)===se(n)}function D(e){var n=e.nodeName.defaultProps,r=o(n||e.attributes);return n&&t(r,e.attributes),e.children&&(r.children=e.children),r}function E(e){j(e);var n=se(e.nodeName),t=ye[n];t?t.push(e):ye[n]=[e]}function L(e){var n=se(e),t=ye[n],o=t&&t.pop()||document.createElement(e);return k(o),o.normalizedNodeName=n,o}function j(e){M(e),3!==S(e)&&(k(e,U(e)),e._component=e._componentConstructor=null)}function z(e,n,t,o,r){var i=n.attributes;while(C(n))n=N(n,t);if(u(n)){if(e){if(3===S(e))return e.nodeValue!==n&&(e.nodeValue=n),e;r||E(e)}return document.createTextNode(n)}if(c(n.nodeName))return K(e,n,t,o);var s=e,l=n.nodeName;return u(l)||(l+=""),e?B(e,l)||(s=L(l),w(s,a(e.childNodes)),r||V(e)):s=L(l),A(s,n,t,o),G(s,n),i&&i.ref&&(s[ae].ref=i.ref)(s),s}function A(e,n,t,o){var r=n.children,i=e.firstChild;r&&1===r.length&&"string"==typeof r[0]&&i instanceof Text&&1===e.childNodes.length?i.nodeValue=r[0]:(r||i)&&H(e,r,t,o)}function F(e){var n=e._component;if(n)return n.__key;var t=e[ae];return t?t.key:void 0}function H(e,n,t,o){var r=e.childNodes,i=void 0,a=void 0,c=0,u=0,l=n&&n.length,f=r.length,p=0;if(f){i=[];for(var d=0;f>d;d++){var v=r[d],h=F(v);h||0===h?(a||(a={}),a[h]=v,c++):i[p++]=v}}if(l)for(var d=0;l>d;d++){var _=n[d],v=void 0;if(0!==c&&_.attributes){var h=_.key;!s(h)&&h in a&&(v=a[h],a[h]=void 0,c--)}if(!v&&p>u)for(var y=u;p>y;y++){var b=i[y];if(b&&W(b,_)){v=b,i[y]=void 0,y===p-1&&p--,y===u&&u++;break}}v=z(v,_,t,o);var g=(o||v.parentNode!==e)&&v._component;g&&m(g,"componentWillMount");var x=r[d];x!==v&&(x?e.insertBefore(v,x):e.appendChild(v)),g&&m(g,"componentDidMount")}if(c)for(var d in a)a[d]&&(i[u=p++]=a[d]);p>u&&I(i)}function I(e,n){for(var t=e.length;t--;){var o=e[t];o&&V(o,n)}}function V(e,n){var t=e[ae];t&&h(t,"ref",null);var o=e._component;if(o)X(o,!n);else{if(!n){if(1!==S(e))return void M(e);E(e)}var r=e.childNodes;r&&r.length&&I(r,n)}}function G(e,n){var t=e[ae]||U(e),o=n.attributes;for(var r in t)o&&r in o||P(e,r,null);if(o)for(var i in o){var a=o[i];void 0===a&&(a=null),i in t&&a==t[i]||P(e,i,a)}}function O(e){var n=e.constructor.name,t=be[n];t?t.push(e):be[n]=[e]}function Z(e,n,t,o){var r=new e(n,t),i=!o&&be[e.name];if(i)for(var a=0;i.length>a;a++)if(i[a].constructor===e){r.nextBase=i[a].base,i.splice(a,1);break}return r}function $(e){e._dirty||(e._dirty=!0,g(e))}function q(e,n,t,o,r){var i=e._disableRendering===!0;e._disableRendering=!0,(e.__ref=n.ref)&&delete n.ref,(e.__key=n.key)&&delete n.key,s(e.base)||h(e,"componentWillReceiveProps",n,o),o&&o!==e.context&&(e.prevContext||(e.prevContext=e.context),e.context=o),e.prevProps||(e.prevProps=e.props),e.props=n,e._disableRendering=i,t!==ne&&(t===te||de.syncComponentUpdates!==!1?J(e,te,r):$(e)),h(e,"__ref",e)}function J(e,n,r){if(!e._disableRendering){var i=void 0,a=void 0,u=e.props,s=e.state,l=e.context,f=e.prevProps||u,p=e.prevState||s,d=e.prevContext||l,v=e.base,_=v||e.nextBase;if(v&&(e.props=f,e.state=p,e.context=d,n!==oe&&h(e,"shouldComponentUpdate",u,s,l)===!1?i=!0:h(e,"componentWillUpdate",u,s,l),e.props=u,e.state=s,e.context=l),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!i){a=h(e,"render",u,s,l),e.getChildContext&&(l=t(o(l),e.getChildContext()));while(C(a))a=N(a,l);var y=a&&a.nodeName,b=void 0,g=void 0;if(c(y)&&y.prototype.render){var x=e._component;x&&x.constructor!==y&&(b=x,x=null);var k=D(a);x?q(x,k,te,l):(x=Z(y,k,l,!1),x._parentComponent=e,e._component=x,v&&m(x,"componentWillMount"),q(x,k,ne,l),J(x,te),v&&m(x,"componentDidMount")),g=x.base}else{var S=_;b=e._component,b&&(S=e._component=null),(_||n===te)&&(S&&(S._component=null),g=z(S,a||ie,l,r||!v,!0))}if(_&&g!==_){var w=_.parentNode;w&&g!==w&&w.replaceChild(g,_),b||V(_)}if(b&&X(b,!0),e.base=g,g){var M=e,P=e;while(P=P._parentComponent)M=P;g._component=M,g._componentConstructor=M.constructor}v&&h(e,"componentDidUpdate",f,p,d)}var T=e._renderCallbacks,R=void 0;if(T)while(R=T.pop())R.call(e);return a}}function K(e,n,t,o){var r=e&&e._component,i=e,a=r&&e._componentConstructor===n.nodeName,c=a;while(r&&!c&&(r=r._parentComponent))c=r.constructor===n.nodeName;return!c||o&&!r._component?(r&&!a&&(X(r,!0),e=i=null),e=Q(n,e,t,o),i&&e!==i&&(i._component=null,V(i))):(q(r,D(n),te,t,o),e=r.base),e}function Q(e,n,t,o){var r=D(e),i=Z(e.nodeName,r,t,!!n);return n&&(i.nextBase=n),q(i,r,te,t,o),i.base}function X(e,n){h(e,"__ref",null),h(e,"componentWillUnmount");var t=e._component;t&&(X(t,n),n=!1);var o=e.base;o&&(n!==!1&&M(o),I(o.childNodes,!0)),n&&(e._parentComponent=null,O(e)),h(e,"componentDidUnmount")}function Y(e,n){this._dirty=!0,this._disableRendering=!1,this.prevState=this.prevProps=this.prevContext=this.base=this.nextBase=this._parentComponent=this._component=this.__ref=this.__key=this._linkedStates=this._renderCallbacks=null,this.context=n||{},this.props=e,this.state=h(this,"getInitialState")||{}}function ee(e,n,t){var o=t&&t._component&&t._componentConstructor===e.nodeName,r=z(t,e,{},!1),i=!o&&r._component;return i&&m(i,"componentWillMount"),r.parentNode!==n&&n.appendChild(r),i&&m(i,"componentDidMount"),r}var ne=0,te=1,oe=2,re={},ie="",ae="undefined"!=typeof Symbol?Symbol.for("preactattr"):"__preactattr_",ce={boxFlex:1,boxFlexGroup:1,columnCount:1,fillOpacity:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,fontWeight:1,lineClamp:1,lineHeight:1,opacity:1,order:1,orphans:1,strokeOpacity:1,widows:1,zIndex:1,zoom:1},ue=r(function(e){return se(e.replace(/([A-Z])/g,"-$1"))}),se=r(function(e){return e.toLowerCase()}),le=void 0;try{le=new MessageChannel}catch(fe){}var pe=le?function(e){le.port1.onmessage=e,le.port2.postMessage(ie)}:setTimeout,de={vnode:function(e){var n=e.attributes;if(n&&!c(e.nodeName)){var t=n.className;t&&(n.class=t,delete n.className),n.class&&d(n,"class",p),n.style&&d(n,"style",f)}}},ve=[],he=[],me=[],_e=r(function(e){return se(e.replace(/^on/i,""))}),ye={},be={};t(Y.prototype,{linkState:function(e,n){var t=this._linkedStates||(this._linkedStates={}),o=e+"|"+n;return t[o]||(t[o]=b(this,e,n))},setState:function(e,n){var r=this.state;this.prevState||(this.prevState=o(r)),t(r,c(e)?e(r,this.props):e),n&&(this._renderCallbacks=this._renderCallbacks||[]).push(n),$(this)},forceUpdate:function(){J(this,oe)},render:function(){return null}}),e.h=_,e.cloneElement=y,e.Component=Y,e.render=ee,e.rerender=x,e.options=de}); //# sourceMappingURL=preact.min.js.map
src/components/video_list.js
fahadqazi/react-redux
import React from 'react'; import VideoListItem from './video_list_item'; const VideoList = (props) => { const videoItems = props.videos.map((video) => { return <VideoListItem onVideoSelect={props.onVideoSelect} video={video} key={video.etag} /> }); return( <ul className="col-md-4 list-group"> {videoItems} </ul> ); }; export default VideoList;
examples/counter/containers/CounterApp.js
Bjvanminnen/redux-devtools
import React, { Component } from 'react'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import Counter from '../components/Counter'; import * as CounterActions from '../actions/CounterActions'; class CounterApp extends Component { render() { const { counter, dispatch } = this.props; return ( <Counter counter={counter} {...bindActionCreators(CounterActions, dispatch)} /> ); } } function select(state) { return { counter: state.counter }; } export default connect(select)(CounterApp);
src/ScrollMemory.js
ipatate/react-router-scroll-memory
// @flow import { Component } from "react"; import { withRouter } from "react-router-dom"; import { isBrowser, getScrollPage, getScrollElement, scrollTo, scrollToElement } from "./utils/utils"; type ScrollProps = { location: Object, elementID?: string }; class ScrollMemory extends Component<ScrollProps> { detectPop: () => void; url: Map<string, number>; constructor(props: ScrollProps) { super(props); // add event for click on previous or next browser button this.detectPop = this.detectPop.bind(this); // stock location key with scroll associate this.url = new Map(); } componentDidMount(): void { window.addEventListener("popstate", this.detectPop); } componentWillUnmount(): void { window.removeEventListener("popstate", this.detectPop); } shouldComponentUpdate(nextProps: ScrollProps): boolean { if (!isBrowser()) return false; const { location } = this.props; // location before change url const actual = location; // location after change url const next = nextProps.location; // the first page has not key, set "enter" for key const key = actual.key || "enter"; // if hash => let the normal operation of the browser const locationChanged = (next.pathname !== actual.pathname || next.search !== actual.search) && next.hash === ""; // get scroll of the page or the element before change location const scroll = this.props.elementID ? getScrollElement(this.props.elementID) : getScrollPage(); if (locationChanged) { // pass page or element scroll to top this.props.elementID ? scrollToElement(0, this.props.elementID) : scrollTo(0); // save scroll with key location this.url.set(key, scroll); } // never render return false; } /** * callback for event popstate * * @memberof ScrollMemory */ detectPop(location: Object): void { if (!isBrowser()) return; const { state } = location; // key or enter page const key = state && state.key ? state.key : "enter"; // get the next for scroll position const nextFind = this.url.get(key); // if find in url map => scroll to position if (nextFind) { this.props.elementID ? scrollToElement(nextFind, this.props.elementID) : scrollTo(nextFind); } } render() { return null; } } export default withRouter(ScrollMemory);
node_modules/react/lib/Transaction.js
kristiankyvik/chatter-widget
/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule Transaction */ 'use strict'; var invariant = require('fbjs/lib/invariant'); /** * `Transaction` creates a black box that is able to wrap any method such that * certain invariants are maintained before and after the method is invoked * (Even if an exception is thrown while invoking the wrapped method). Whoever * instantiates a transaction can provide enforcers of the invariants at * creation time. The `Transaction` class itself will supply one additional * automatic invariant for you - the invariant that any transaction instance * should not be run while it is already being run. You would typically create a * single instance of a `Transaction` for reuse multiple times, that potentially * is used to wrap several different methods. Wrappers are extremely simple - * they only require implementing two methods. * * <pre> * wrappers (injected at creation time) * + + * | | * +-----------------|--------|--------------+ * | v | | * | +---------------+ | | * | +--| wrapper1 |---|----+ | * | | +---------------+ v | | * | | +-------------+ | | * | | +----| wrapper2 |--------+ | * | | | +-------------+ | | | * | | | | | | * | v v v v | wrapper * | +---+ +---+ +---------+ +---+ +---+ | invariants * perform(anyMethod) | | | | | | | | | | | | maintained * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|--------> * | | | | | | | | | | | | * | | | | | | | | | | | | * | | | | | | | | | | | | * | +---+ +---+ +---------+ +---+ +---+ | * | initialize close | * +-----------------------------------------+ * </pre> * * Use cases: * - Preserving the input selection ranges before/after reconciliation. * Restoring selection even in the event of an unexpected error. * - Deactivating events while rearranging the DOM, preventing blurs/focuses, * while guaranteeing that afterwards, the event system is reactivated. * - Flushing a queue of collected DOM mutations to the main UI thread after a * reconciliation takes place in a worker thread. * - Invoking any collected `componentDidUpdate` callbacks after rendering new * content. * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue * to preserve the `scrollTop` (an automatic scroll aware DOM). * - (Future use case): Layout calculations before and after DOM updates. * * Transactional plugin API: * - A module that has an `initialize` method that returns any precomputation. * - and a `close` method that accepts the precomputation. `close` is invoked * when the wrapped process is completed, or has failed. * * @param {Array<TransactionalWrapper>} transactionWrapper Wrapper modules * that implement `initialize` and `close`. * @return {Transaction} Single transaction for reuse in thread. * * @class Transaction */ var Mixin = { /** * Sets up this instance so that it is prepared for collecting metrics. Does * so such that this setup method may be used on an instance that is already * initialized, in a way that does not consume additional memory upon reuse. * That can be useful if you decide to make your subclass of this mixin a * "PooledClass". */ reinitializeTransaction: function () { this.transactionWrappers = this.getTransactionWrappers(); if (this.wrapperInitData) { this.wrapperInitData.length = 0; } else { this.wrapperInitData = []; } this._isInTransaction = false; }, _isInTransaction: false, /** * @abstract * @return {Array<TransactionWrapper>} Array of transaction wrappers. */ getTransactionWrappers: null, isInTransaction: function () { return !!this._isInTransaction; }, /** * Executes the function within a safety window. Use this for the top level * methods that result in large amounts of computation/mutations that would * need to be safety checked. The optional arguments helps prevent the need * to bind in many cases. * * @param {function} method Member of scope to call. * @param {Object} scope Scope to invoke from. * @param {Object?=} a Argument to pass to the method. * @param {Object?=} b Argument to pass to the method. * @param {Object?=} c Argument to pass to the method. * @param {Object?=} d Argument to pass to the method. * @param {Object?=} e Argument to pass to the method. * @param {Object?=} f Argument to pass to the method. * * @return {*} Return value from `method`. */ perform: function (method, scope, a, b, c, d, e, f) { !!this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there ' + 'is already an outstanding transaction.') : invariant(false) : void 0; var errorThrown; var ret; try { this._isInTransaction = true; // Catching errors makes debugging more difficult, so we start with // errorThrown set to true before setting it to false after calling // close -- if it's still set to true in the finally block, it means // one of these calls threw. errorThrown = true; this.initializeAll(0); ret = method.call(scope, a, b, c, d, e, f); errorThrown = false; } finally { try { if (errorThrown) { // If `method` throws, prefer to show that stack trace over any thrown // by invoking `closeAll`. try { this.closeAll(0); } catch (err) {} } else { // Since `method` didn't throw, we don't want to silence the exception // here. this.closeAll(0); } } finally { this._isInTransaction = false; } } return ret; }, initializeAll: function (startIndex) { var transactionWrappers = this.transactionWrappers; for (var i = startIndex; i < transactionWrappers.length; i++) { var wrapper = transactionWrappers[i]; try { // Catching errors makes debugging more difficult, so we start with the // OBSERVED_ERROR state before overwriting it with the real return value // of initialize -- if it's still set to OBSERVED_ERROR in the finally // block, it means wrapper.initialize threw. this.wrapperInitData[i] = Transaction.OBSERVED_ERROR; this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null; } finally { if (this.wrapperInitData[i] === Transaction.OBSERVED_ERROR) { // The initializer for wrapper i threw an error; initialize the // remaining wrappers but silence any exceptions from them to ensure // that the first error is the one to bubble up. try { this.initializeAll(i + 1); } catch (err) {} } } } }, /** * Invokes each of `this.transactionWrappers.close[i]` functions, passing into * them the respective return values of `this.transactionWrappers.init[i]` * (`close`rs that correspond to initializers that failed will not be * invoked). */ closeAll: function (startIndex) { !this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : invariant(false) : void 0; var transactionWrappers = this.transactionWrappers; for (var i = startIndex; i < transactionWrappers.length; i++) { var wrapper = transactionWrappers[i]; var initData = this.wrapperInitData[i]; var errorThrown; try { // Catching errors makes debugging more difficult, so we start with // errorThrown set to true before setting it to false after calling // close -- if it's still set to true in the finally block, it means // wrapper.close threw. errorThrown = true; if (initData !== Transaction.OBSERVED_ERROR && wrapper.close) { wrapper.close.call(this, initData); } errorThrown = false; } finally { if (errorThrown) { // The closer for wrapper i threw an error; close the remaining // wrappers but silence any exceptions from them to ensure that the // first error is the one to bubble up. try { this.closeAll(i + 1); } catch (e) {} } } } this.wrapperInitData.length = 0; } }; var Transaction = { Mixin: Mixin, /** * Token to look for to determine if an error occurred. */ OBSERVED_ERROR: {} }; module.exports = Transaction;
test/fixtures/mjs-support/src/App.js
Timer/create-react-app
import React, { Component } from 'react'; import { graphql, GraphQLSchema, GraphQLObjectType, GraphQLString, } from 'graphql'; const schema = new GraphQLSchema({ query: new GraphQLObjectType({ name: 'RootQueryType', fields: { hello: { type: GraphQLString, resolve() { return 'world'; }, }, }, }), }); class App extends Component { state = {}; componentDidMount() { graphql(schema, '{ hello }').then(({ data }) => { this.setState({ result: data.hello }); }); } render() { const { result } = this.state; return result ? <div className="mjs-gql-result">{result}</div> : null; } } export default App;
packages/react-scripts/template/src/index.js
lopezator/create-react-app
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import './index.css'; ReactDOM.render( <App />, document.getElementById('root') );
src/routes.js
Bjorgvin/jumble
import React from 'react' import { Router, Route, Redirect, Switch } from 'react-router' import { Link } from 'react-router-dom' import styled from 'styled-components' import { darken } from 'polished' import jumble, { root } from './view/jumbles/routes' export default function routes(history) { const Navigation = styled.nav` top: 0; left: 0; width: 100%; height: 30px; position: fixed; display: flex; align-items: center; background-color: ${props => darken(0.3, props.theme.green)}; ` const StyledLink = styled(Link)` padding: 0px 0px 0px 15px; color: white; text-decoration: none; ` return ( <Router history={history}> <div> <Navigation> <StyledLink to={`${root}/new`}>New</StyledLink> <StyledLink to={`${root}`}>Jumbles</StyledLink> </Navigation> <Switch> {jumble} <Route component={() => <Redirect to={`${root}`} />} /> </Switch> </div> </Router> ) }
sources/csharp/csharp-web/sources/front/app/containers/HomePage/index.js
xunilrj/sandbox
/* * HomePage * * This is the first thing users see of our App, at the '/' route * * NOTE: while this component should technically be a stateless functional * component (SFC), hot reloading does not currently support SFCs. If hot * reloading is not a necessity for you then you can refactor it and remove * the linting exception. */ import React from 'react'; import { FormattedMessage } from 'react-intl'; import messages from './messages'; export default class HomePage extends React.Component { // eslint-disable-line react/prefer-stateless-function render() { return ( <h1> <FormattedMessage {...messages.header} /> </h1> ); } }
test/PagerSpec.js
rapilabs/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import Pager from '../src/Pager'; import PageItem from '../src/PageItem'; describe('Pager', function () { it('Should output a unordered list as root element with class "pager"', function () { let instance = ReactTestUtils.renderIntoDocument( <Pager/> ); assert.equal(React.findDOMNode(instance).nodeName, 'UL'); assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'pager')); }); it('Should allow "PageItem" as child element', function () { let instance = ReactTestUtils.renderIntoDocument( <Pager> <PageItem href="#">Top</PageItem> </Pager> ); assert.equal(React.findDOMNode(instance).children.length, 1); assert.equal(React.findDOMNode(instance).children[0].nodeName, 'LI'); }); it('Should allow multiple "PageItem" as child elements', function () { let instance = ReactTestUtils.renderIntoDocument( <Pager> <PageItem previous href="#">Previous</PageItem> <PageItem disabled href="#">Top</PageItem> <PageItem next href="#">Next</PageItem> </Pager> ); assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'previous')); assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'disabled')); assert.ok(ReactTestUtils.findRenderedDOMComponentWithClass(instance, 'next')); }); it('Should call "onSelect" when item is clicked', function (done) { function handleSelect(key, href) { assert.equal(key, 2); assert.equal(href, '#next'); done(); } let instance = ReactTestUtils.renderIntoDocument( <Pager onSelect={handleSelect}> <PageItem eventKey={1} href="#prev">Previous</PageItem> <PageItem eventKey={2} href="#next">Next</PageItem> </Pager> ); let items = ReactTestUtils.scryRenderedComponentsWithType(instance, PageItem); ReactTestUtils.Simulate.click( ReactTestUtils.findRenderedDOMComponentWithTag(items[1], 'a') ); }); });
src/index.js
GeoTIFF/geotiff.io
import OfflinePluginRuntime from 'offline-plugin/runtime'; import React from 'react'; import ReactDOM from 'react-dom'; import { BrowserRouter } from 'react-router-dom'; import App from './components/app'; import buildStore from './build-store'; import { Provider } from 'react-redux'; import { loadTools } from './actions/tool-list-actions'; import { addRaster } from './actions/raster-actions'; import UrlService from './services/UrlService'; import ToolListService from './services/ToolListService'; import Map from './Map'; import '../styles/style.less'; OfflinePluginRuntime.install(); const store = buildStore(); store.dispatch(loadTools()); window.store = store; // made this global so it can be accessed from Map const url = UrlService.get('url'); if (url) { store.dispatch(addRaster(url)); } const toolName = UrlService.get('tool'); if (toolName) { const toolList = ToolListService.getToolList(); const tool = toolList.find(tool => tool.param === toolName); if (tool) { // newSearch is usually something like ?auto_start=true&url=... const newSearch = window.location.search .replace(/(\?|&)tool=[a-z-]{3,100}/, '') // remove tool=... param from url .replace(/^./, '?'); // mark sure starting search param is a question mark // newPathName is usually something like 'identify' or 'min' const newPathName = tool.path; // newUrl is usually something like /identify?url=... const newUrl = newPathName + newSearch; /* global history */ history.replaceState({}, 'identify', newUrl); } } ReactDOM.render( <Provider store={store}> <BrowserRouter> <App /> </BrowserRouter> </Provider>, document.getElementById('app') ); Map.initialize();
docs/src/SupportPage.js
wjb12/react-bootstrap
import React from 'react'; import NavMain from './NavMain'; import PageHeader from './PageHeader'; import PageFooter from './PageFooter'; export default class Page extends React.Component { render() { return ( <div> <NavMain activePage="support" /> <PageHeader title="Need help?" subTitle="Community resources for answering your React-Bootstrap questions." /> <div className="container bs-docs-container"> <div className="row"> <div className="col-md-9" role="main"> <div className="bs-docs-section"> <p className="lead">Stay up to date on the development of React-Bootstrap and reach out to the community with these helpful resources.</p> <h3>Stack Overflow</h3> <p><a href="http://stackoverflow.com/questions/ask">Ask questions</a> about specific problems you have faced, including details about what exactly you are trying to do. Make sure you tag your question with <code className="js">react-bootstrap</code>. You can also read through <a href="http://stackoverflow.com/questions/tagged/react-bootstrap">existing React-Bootstrap questions</a>.</p> <h3>Live help</h3> <p>Bring your questions and pair with other react-bootstrap users in a <a href="http://start.thinkful.com/react/?utm_source=github&utm_medium=badge&utm_campaign=react-bootstrap">live Thinkful hangout</a>. Hear about the challenges other developers are running into, or screenshare your own code with the group for feedback.</p> <h3>Chat rooms</h3> <p>Discuss questions in the <code className="js">#react-bootstrap</code> channel on the <a href="http://www.reactiflux.com/">Reactiflux Slack</a> or on <a href="https://gitter.im/react-bootstrap/react-bootstrap">Gitter</a>.</p> <h3>GitHub issues</h3> <p>The issue tracker is the preferred channel for bug reports, features requests and submitting pull requests. See more about how we use issues in the <a href="https://github.com/react-bootstrap/react-bootstrap/blob/master/CONTRIBUTING.md#issues">contribution guidelines</a>.</p> </div> </div> </div> </div> <PageFooter /> </div> ); } shouldComponentUpdate() { return false; } }
ajax/libs/redux-form/8.3.1/redux-form.min.js
cdnjs/cdnjs
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react"),require("react-redux"),require("redux")):"function"==typeof define&&define.amd?define(["react","react-redux","redux"],r):"object"==typeof exports?exports.ReduxForm=r(require("react"),require("react-redux"),require("redux")):e.ReduxForm=r(e.React,e.ReactRedux,e.Redux)}(window,(function(e,r,t){return function(e){var r={};function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var i in e)t.d(n,i,function(r){return e[r]}.bind(null,i));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=61)}([function(e,r){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(76)),a=n(t(77)),u=n(t(84)),o=n(t(85)),s=n(t(101)),f=n(t(102)),l={allowsArrayErrors:!0,empty:{},emptyList:[],getIn:a.default,setIn:u.default,deepEqual:o.default,deleteIn:s.default,forEach:function(e,r){return e.forEach(r)},fromJS:function(e){return e},keys:f.default,size:function(e){return e?e.length:0},some:function(e,r){return e.some(r)},splice:i.default,equals:function(e,r){return r.every((function(r){return~e.indexOf(r)}))},orderChanged:function(e,r){return r.some((function(r,t){return r!==e[t]}))},toJS:function(e){return e}};r.default=l},function(e,r){function t(){return e.exports=t=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},t.apply(this,arguments)}e.exports=t},function(r,t){r.exports=e},function(e,r){e.exports=function(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r}},function(e,r){e.exports=function(e,r){if(null==e)return{};var t,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(i[t]=e[t]);return i}},function(e,r,t){var n=t(62);function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=i();if(r&&r.has(e))return r.get(e);var t={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){var o=a?Object.getOwnPropertyDescriptor(e,u):null;o&&(o.get||o.set)?Object.defineProperty(t,u,o):t[u]=e[u]}return t.default=e,r&&r.set(e,t),t}},function(e,r,t){e.exports=t(64)()},function(e,r,t){"use strict";var n=t(6),i=t(0);r.__esModule=!0,r.withReduxForm=r.renderChildren=r.ReduxFormContext=void 0;var a=i(t(4)),u=i(t(2)),o=i(t(5)),s=n(t(3)),f=s.createContext(null);r.ReduxFormContext=f;var l=function(e,r){var t=r.forwardedRef,n=(0,o.default)(r,["forwardedRef"]);return function(r){return s.createElement(e,(0,u.default)({},n,{_reduxForm:r,ref:t}))}};r.renderChildren=l;r.withReduxForm=function(e){var r=function(r){function t(){return r.apply(this,arguments)||this}return(0,a.default)(t,r),t.prototype.render=function(){return s.createElement(f.Consumer,{children:l(e,this.props)})},t}(s.Component),t=s.forwardRef((function(e,t){return s.createElement(r,(0,u.default)({},e,{forwardedRef:t}))}));return t.displayName=e.displayName||e.name||"Component",t}},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=t(36),i=function(e,r,t){return(0,n.isValidElementType)(e[r])?null:new Error("Invalid prop `"+r+"` supplied to `"+t+"`.")};r.default=i},function(e,t){e.exports=r},function(e,r,t){"use strict";function n(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function i(e){this.setState(function(r){var t=this.constructor.getDerivedStateFromProps(e,r);return null!=t?t:null}.bind(this))}function a(e,r){try{var t=this.props,n=this.state;this.props=e,this.state=r,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(t,n)}finally{this.props=t,this.state=n}}function u(e){var r=e.prototype;if(!r||!r.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof r.getSnapshotBeforeUpdate)return e;var t=null,u=null,o=null;if("function"==typeof r.componentWillMount?t="componentWillMount":"function"==typeof r.UNSAFE_componentWillMount&&(t="UNSAFE_componentWillMount"),"function"==typeof r.componentWillReceiveProps?u="componentWillReceiveProps":"function"==typeof r.UNSAFE_componentWillReceiveProps&&(u="UNSAFE_componentWillReceiveProps"),"function"==typeof r.componentWillUpdate?o="componentWillUpdate":"function"==typeof r.UNSAFE_componentWillUpdate&&(o="UNSAFE_componentWillUpdate"),null!==t||null!==u||null!==o){var s=e.displayName||e.name,f="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+f+" but also contains the following legacy lifecycles:"+(null!==t?"\n "+t:"")+(null!==u?"\n "+u:"")+(null!==o?"\n "+o:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(r.componentWillMount=n,r.componentWillReceiveProps=i),"function"==typeof r.getSnapshotBeforeUpdate){if("function"!=typeof r.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");r.componentWillUpdate=a;var l=r.componentDidUpdate;r.componentDidUpdate=function(e,r,t){var n=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:t;l.call(this,e,r,n)}}return e}t.r(r),t.d(r,"polyfill",(function(){return u})),n.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e,r){var t=e._reduxForm.sectionPrefix;return t?t+"."+r:r};r.default=n},function(e,r){function t(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}},function(e,r,t){"use strict";e.exports=function(e,r,t,n,i,a,u,o){if(!e){var s;if(void 0===r)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[t,n,i,a,u,o],l=0;(s=new Error(r.replace(/%s/g,(function(){return f[l++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},function(e,r){var t=Array.isArray;e.exports=t},function(e,r,t){var n=t(78),i=t(41),a=t(15),u=t(79),o=t(80),s=t(82),f=t(83);e.exports=function(e){return a(e)?n(e,s):u(e)?[e]:i(o(f(e)))}},function(e,r,t){var n=t(23);e.exports=function(e,r){for(var t=e.length;t--;)if(n(e[t][0],r))return t;return-1}},function(e,r){e.exports=function(e,r){return function(t){return e(r(t))}}},function(e,r,t){var n=t(111);e.exports=function(e,r,t){"__proto__"==r&&n?n(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t}},function(e,r){e.exports=function(e){var r=typeof e;return null!=e&&("object"==r||"function"==r)}},function(e,r,t){"use strict";r.__esModule=!0,r.UPDATE_SYNC_WARNINGS=r.UPDATE_SYNC_ERRORS=r.UNTOUCH=r.UNREGISTER_FIELD=r.TOUCH=r.SUBMIT=r.STOP_SUBMIT=r.STOP_ASYNC_VALIDATION=r.START_SUBMIT=r.START_ASYNC_VALIDATION=r.SET_SUBMIT_SUCCEEDED=r.SET_SUBMIT_FAILED=r.RESET_SECTION=r.RESET=r.REGISTER_FIELD=r.INITIALIZE=r.FOCUS=r.DESTROY=r.CLEAR_ASYNC_ERROR=r.CLEAR_SUBMIT_ERRORS=r.CLEAR_SUBMIT=r.CLEAR_FIELDS=r.CHANGE=r.BLUR=r.AUTOFILL=r.ARRAY_SWAP=r.ARRAY_UNSHIFT=r.ARRAY_SPLICE=r.ARRAY_SHIFT=r.ARRAY_REMOVE_ALL=r.ARRAY_REMOVE=r.ARRAY_PUSH=r.ARRAY_POP=r.ARRAY_MOVE=r.ARRAY_INSERT=r.prefix=void 0;var n="@@redux-form/";r.prefix=n;r.ARRAY_INSERT="@@redux-form/ARRAY_INSERT";r.ARRAY_MOVE="@@redux-form/ARRAY_MOVE";r.ARRAY_POP="@@redux-form/ARRAY_POP";r.ARRAY_PUSH="@@redux-form/ARRAY_PUSH";r.ARRAY_REMOVE="@@redux-form/ARRAY_REMOVE";r.ARRAY_REMOVE_ALL="@@redux-form/ARRAY_REMOVE_ALL";r.ARRAY_SHIFT="@@redux-form/ARRAY_SHIFT";r.ARRAY_SPLICE="@@redux-form/ARRAY_SPLICE";r.ARRAY_UNSHIFT="@@redux-form/ARRAY_UNSHIFT";r.ARRAY_SWAP="@@redux-form/ARRAY_SWAP";r.AUTOFILL="@@redux-form/AUTOFILL";r.BLUR="@@redux-form/BLUR";r.CHANGE="@@redux-form/CHANGE";r.CLEAR_FIELDS="@@redux-form/CLEAR_FIELDS";r.CLEAR_SUBMIT="@@redux-form/CLEAR_SUBMIT";r.CLEAR_SUBMIT_ERRORS="@@redux-form/CLEAR_SUBMIT_ERRORS";r.CLEAR_ASYNC_ERROR="@@redux-form/CLEAR_ASYNC_ERROR";r.DESTROY="@@redux-form/DESTROY";r.FOCUS="@@redux-form/FOCUS";r.INITIALIZE="@@redux-form/INITIALIZE";r.REGISTER_FIELD="@@redux-form/REGISTER_FIELD";r.RESET="@@redux-form/RESET";r.RESET_SECTION="@@redux-form/RESET_SECTION";r.SET_SUBMIT_FAILED="@@redux-form/SET_SUBMIT_FAILED";r.SET_SUBMIT_SUCCEEDED="@@redux-form/SET_SUBMIT_SUCCEEDED";r.START_ASYNC_VALIDATION="@@redux-form/START_ASYNC_VALIDATION";r.START_SUBMIT="@@redux-form/START_SUBMIT";r.STOP_ASYNC_VALIDATION="@@redux-form/STOP_ASYNC_VALIDATION";r.STOP_SUBMIT="@@redux-form/STOP_SUBMIT";r.SUBMIT="@@redux-form/SUBMIT";r.TOUCH="@@redux-form/TOUCH";r.UNREGISTER_FIELD="@@redux-form/UNREGISTER_FIELD";r.UNTOUCH="@@redux-form/UNTOUCH";r.UPDATE_SYNC_ERRORS="@@redux-form/UPDATE_SYNC_ERRORS";r.UPDATE_SYNC_WARNINGS="@@redux-form/UPDATE_SYNC_WARNINGS"},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e){return!!(e&&e.stopPropagation&&e.preventDefault)};r.default=n},function(e,r){e.exports=function(e,r){return e===r||e!=e&&r!=r}},function(e,r){e.exports=function(){return!1}},function(e,r){e.exports=function(){return!1}},function(e,r){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,r,t){var n=t(19),i=t(113),a=t(116);e.exports=function(e,r){var t={};return r=a(r,3),i(e,(function(e,i,a){n(t,i,r(e,i,a))})),t}},function(e,r,t){var n=t(51),i=t(20);e.exports=function(e){if(!i(e))return!1;var r=n(e);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(150)),a=function(e){var r=e.getIn,t=e.keys,n=(0,i.default)(e);return function(e,i,a){return void 0===a&&(a=!1),function(u){var o=(i||function(e){return r(e,"form")})(u);if(r(o,e+".syncError"))return!1;if(!a&&r(o,e+".error"))return!1;var s=r(o,e+".syncErrors"),f=r(o,e+".asyncErrors"),l=a?void 0:r(o,e+".submitErrors");if(!s&&!f&&!l)return!0;var d=r(o,e+".registeredFields");return!d||!t(d).filter((function(e){return r(d,"['"+e+"'].count")>0})).some((function(e){return n(r(d,"['"+e+"']"),s,f,l)}))}}};r.default=a},function(e,r){e.exports=function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(2)),a=t(21),u={arrayInsert:function(e,r,t,n){return{type:a.ARRAY_INSERT,meta:{form:e,field:r,index:t},payload:n}},arrayMove:function(e,r,t,n){return{type:a.ARRAY_MOVE,meta:{form:e,field:r,from:t,to:n}}},arrayPop:function(e,r){return{type:a.ARRAY_POP,meta:{form:e,field:r}}},arrayPush:function(e,r,t){return{type:a.ARRAY_PUSH,meta:{form:e,field:r},payload:t}},arrayRemove:function(e,r,t){return{type:a.ARRAY_REMOVE,meta:{form:e,field:r,index:t}}},arrayRemoveAll:function(e,r){return{type:a.ARRAY_REMOVE_ALL,meta:{form:e,field:r}}},arrayShift:function(e,r){return{type:a.ARRAY_SHIFT,meta:{form:e,field:r}}},arraySplice:function(e,r,t,n,i){var u={type:a.ARRAY_SPLICE,meta:{form:e,field:r,index:t,removeNum:n}};return void 0!==i&&(u.payload=i),u},arraySwap:function(e,r,t,n){if(t===n)throw new Error("Swap indices cannot be equal");if(t<0||n<0)throw new Error("Swap indices cannot be negative");return{type:a.ARRAY_SWAP,meta:{form:e,field:r,indexA:t,indexB:n}}},arrayUnshift:function(e,r,t){return{type:a.ARRAY_UNSHIFT,meta:{form:e,field:r},payload:t}},autofill:function(e,r,t){return{type:a.AUTOFILL,meta:{form:e,field:r},payload:t}},blur:function(e,r,t,n){return{type:a.BLUR,meta:{form:e,field:r,touch:n},payload:t}},change:function(e,r,t,n,i){return{type:a.CHANGE,meta:{form:e,field:r,touch:n,persistentSubmitErrors:i},payload:t}},clearFields:function(e,r,t){for(var n=arguments.length,i=new Array(n>3?n-3:0),u=3;u<n;u++)i[u-3]=arguments[u];return{type:a.CLEAR_FIELDS,meta:{form:e,keepTouched:r,persistentSubmitErrors:t,fields:i}}},clearSubmit:function(e){return{type:a.CLEAR_SUBMIT,meta:{form:e}}},clearSubmitErrors:function(e){return{type:a.CLEAR_SUBMIT_ERRORS,meta:{form:e}}},clearAsyncError:function(e,r){return{type:a.CLEAR_ASYNC_ERROR,meta:{form:e,field:r}}},destroy:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return{type:a.DESTROY,meta:{form:r}}},focus:function(e,r){return{type:a.FOCUS,meta:{form:e,field:r}}},initialize:function(e,r,t,n){return void 0===n&&(n={}),t instanceof Object&&(n=t,t=!1),{type:a.INITIALIZE,meta:(0,i.default)({form:e,keepDirty:t},n),payload:r}},registerField:function(e,r,t){return{type:a.REGISTER_FIELD,meta:{form:e},payload:{name:r,type:t}}},reset:function(e){return{type:a.RESET,meta:{form:e}}},resetSection:function(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];return{type:a.RESET_SECTION,meta:{form:e,sections:t}}},startAsyncValidation:function(e,r){return{type:a.START_ASYNC_VALIDATION,meta:{form:e,field:r}}},startSubmit:function(e){return{type:a.START_SUBMIT,meta:{form:e}}},stopAsyncValidation:function(e,r){return{type:a.STOP_ASYNC_VALIDATION,meta:{form:e},payload:r,error:!(!r||!Object.keys(r).length)}},stopSubmit:function(e,r){return{type:a.STOP_SUBMIT,meta:{form:e},payload:r,error:!(!r||!Object.keys(r).length)}},submit:function(e){return{type:a.SUBMIT,meta:{form:e}}},setSubmitFailed:function(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];return{type:a.SET_SUBMIT_FAILED,meta:{form:e,fields:t},error:!0}},setSubmitSucceeded:function(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];return{type:a.SET_SUBMIT_SUCCEEDED,meta:{form:e,fields:t},error:!1}},touch:function(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];return{type:a.TOUCH,meta:{form:e,fields:t}}},unregisterField:function(e,r,t){return void 0===t&&(t=!0),{type:a.UNREGISTER_FIELD,meta:{form:e},payload:{name:r,destroyOnUnmount:t}}},untouch:function(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];return{type:a.UNTOUCH,meta:{form:e,fields:t}}},updateSyncErrors:function(e,r,t){return void 0===r&&(r={}),{type:a.UPDATE_SYNC_ERRORS,meta:{form:e},payload:{syncErrors:r,error:t}}},updateSyncWarnings:function(e,r,t){return void 0===r&&(r={}),{type:a.UPDATE_SYNC_WARNINGS,meta:{form:e},payload:{syncWarnings:r,warning:t}}}};r.default=u},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e){var r=e.initialized,t=e.trigger,n=e.pristine;if(!e.syncValidationPasses)return!1;switch(t){case"blur":case"change":return!0;case"submit":return!n||!r;default:return!1}};r.default=n},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e){var r=e.values,t=e.nextProps,n=e.initialRender,i=e.lastFieldValidatorKeys,a=e.fieldValidatorKeys,u=e.structure;return!!n||(!u.deepEqual(r,t&&t.values)||!u.deepEqual(i,a))};r.default=n},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e){var r=e.values,t=e.nextProps,n=e.initialRender,i=e.lastFieldValidatorKeys,a=e.fieldValidatorKeys,u=e.structure;return!!n||(!u.deepEqual(r,t&&t.values)||!u.deepEqual(i,a))};r.default=n},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e){var r=e.values,t=e.nextProps,n=e.initialRender,i=e.lastFieldValidatorKeys,a=e.fieldValidatorKeys,u=e.structure;return!!n||(!u.deepEqual(r,t&&t.values)||!u.deepEqual(i,a))};r.default=n},function(e,r,t){"use strict";e.exports=t(68)},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(4)),a=function(e){function r(r){var t;return(t=e.call(this,"Submit Validation Failed")||this).errors=r,t}return(0,i.default)(r,e),r}(n(t(69)).default);r.default=a},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(5)),a=n(t(2)),u=function(e,r,t,n){var i=r.value;return"checkbox"===e?(0,a.default)({},r,{checked:!!i}):"radio"===e?(0,a.default)({},r,{checked:n(i,t),value:t}):"select-multiple"===e?(0,a.default)({},r,{value:i||[]}):"file"===e?(0,a.default)({},r,{value:i||void 0}):r},o=function(e,r,t){var n=e.getIn,o=e.toJS,s=e.deepEqual,f=t.asyncError,l=t.asyncValidating,d=t.onBlur,c=t.onChange,p=t.onDrop,v=t.onDragStart,m=t.dirty,y=t.dispatch,h=t.onFocus,g=t.form,_=t.format,b=t.initial,S=(t.parse,t.pristine),E=t.props,R=t.state,A=t.submitError,F=t.submitFailed,x=t.submitting,O=t.syncError,T=t.syncWarning,w=(t.validate,t.value),I=t._value,P=(t.warn,(0,i.default)(t,["asyncError","asyncValidating","onBlur","onChange","onDrop","onDragStart","dirty","dispatch","onFocus","form","format","initial","parse","pristine","props","state","submitError","submitFailed","submitting","syncError","syncWarning","validate","value","_value","warn"])),C=O||f||A,M=T,V=function(e,t){if(null===t)return e;var n=null==e?"":e;return t?t(e,r):n}(w,_);return{input:u(P.type,{name:r,onBlur:d,onChange:c,onDragStart:v,onDrop:p,onFocus:h,value:V},I,s),meta:(0,a.default)({},o(R),{active:!(!R||!n(R,"active")),asyncValidating:l,autofilled:!(!R||!n(R,"autofilled")),dirty:m,dispatch:y,error:C,form:g,initial:b,warning:M,invalid:!!C,pristine:S,submitting:!!x,submitFailed:!!F,touched:!(!R||!n(R,"touched")),valid:!C,visited:!(!R||!n(R,"visited"))}),custom:(0,a.default)({},P,{},E)}};r.default=o},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(74)),a=n(t(40)),u=function(e,r){var t=r.name,n=r.parse,u=r.normalize,o=(0,i.default)(e,a.default);return n&&(o=n(o,t)),u&&(o=u(t,o)),o};r.default=u},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n="undefined"!=typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product;r.default=n},function(e,r){e.exports=function(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}},function(e,r,t){var n=t(43);e.exports=function(e,r,t){var i=(t="function"==typeof t?t:void 0)?t(e,r):void 0;return void 0===i?n(e,r,void 0,t):!!i}},function(e,r,t){var n=t(87),i=t(26);e.exports=function e(r,t,a,u,o){return r===t||(null==r||null==t||!i(r)&&!i(t)?r!=r&&t!=t:n(r,t,a,u,e,o))}},function(e,r,t){var n=t(88),i=t(89),a=t(90),u=t(91),o=t(92);function s(e){var r=-1,t=null==e?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=u,s.prototype.set=o,e.exports=s},function(e,r){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(42)),a=function(e,r,t,n,i,a){if(a)return e===r},u=function(e,r,t){var n=(0,i.default)(e.props,r,a),u=(0,i.default)(e.state,t,a);return!n||!u};r.default=u},function(e,r,t){var n=t(114)();e.exports=n},function(e,r){e.exports=t},function(e,r){e.exports=function(){return!1}},function(e,r,t){var n=t(28),i=t(125);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},function(e,r){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},function(e,r){e.exports=function(){return!1}},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e){var r=e.deepEqual,t=e.empty,n=e.getIn;return function(e,i){return function(a){for(var u=i||function(e){return n(e,"form")},o=u(a),s=arguments.length,f=new Array(s>1?s-1:0),l=1;l<s;l++)f[l-1]=arguments[l];if(f&&f.length)return f.every((function(t){var i=n(o,e+".initial."+t),a=n(o,e+".values."+t);return r(i,a)}));var d=n(o,e+".initial")||t,c=n(o,e+".values")||d;return r(d,c)}}};r.default=n},function(e,r,t){var n=t(19),i=t(23);e.exports=function(e,r,t){(void 0===t||i(e[r],t))&&(void 0!==t||r in e)||n(e,r,t)}},function(e,r){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,r,t){var n=t(165),i="object"==typeof self&&self&&self.Object===Object&&self,a=n||i||Function("return this")();e.exports=a},function(e,r,t){var n=t(18)(Object.getPrototypeOf,Object);e.exports=n},function(e,r){e.exports=function(e,r){if(("constructor"!==r||"function"!=typeof e[r])&&"__proto__"!=r)return e[r]}},function(e,r){e.exports=function(e){var r=[];if(null!=e)for(var t in Object(e))r.push(t);return r}},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(22)),a=function(e){var r=(0,i.default)(e);return r&&e.preventDefault(),r};r.default=a},function(e,r,t){"use strict";var n=t(6),i=t(0);r.__esModule=!0,r.updateSyncErrors=r.updateSyncWarnings=r.untouch=r.unregisterField=r.touch=r.submit=r.stopSubmit=r.stopAsyncValidation=r.startSubmit=r.startAsyncValidation=r.setSubmitSucceeded=r.setSubmitFailed=r.resetSection=r.reset=r.registerField=r.initialize=r.focus=r.destroy=r.clearSubmitErrors=r.clearSubmit=r.clearFields=r.clearAsyncError=r.change=r.blur=r.autofill=r.arrayUnshift=r.arraySwap=r.arraySplice=r.arrayShift=r.arrayRemoveAll=r.arrayRemove=r.arrayPush=r.arrayPop=r.arrayMove=r.arrayInsert=r.actionTypes=r.formPropTypes=r.fieldArrayPropTypes=r.fieldArrayMetaPropTypes=r.fieldArrayFieldsPropTypes=r.fieldPropTypes=r.fieldMetaPropTypes=r.fieldInputPropTypes=r.values=r.reducer=r.reduxForm=r.hasSubmitFailed=r.hasSubmitSucceeded=r.isSubmitting=r.isValid=r.isPristine=r.isInvalid=r.isDirty=r.isAsyncValidating=r.getFormSubmitErrors=r.getFormSyncWarnings=r.getFormAsyncErrors=r.getFormMeta=r.getFormSyncErrors=r.getFormInitialValues=r.getFormValues=r.getFormNames=r.getFormError=r.formValues=r.formValueSelector=r.FieldArray=r.Fields=r.Field=r.propTypes=r.SubmissionError=r.FormSection=r.FormName=r.Form=r.defaultShouldWarn=r.defaultShouldError=r.defaultShouldValidate=r.defaultShouldAsyncValidate=r.ReduxFormContext=void 0;var a=i(t(31)),u=n(t(21)),o=t(8);r.ReduxFormContext=o.ReduxFormContext;var s=i(t(32));r.defaultShouldAsyncValidate=s.default;var f=i(t(33));r.defaultShouldValidate=f.default;var l=i(t(34));r.defaultShouldError=l.default;var d=i(t(35));r.defaultShouldWarn=d.default;var c=i(t(63));r.Form=c.default;var p=i(t(66));r.FormName=p.default;var v=i(t(67));r.FormSection=v.default;var m=i(t(37));r.SubmissionError=m.default;var y=n(t(70));r.propTypes=y.default,r.fieldInputPropTypes=y.fieldInputPropTypes,r.fieldMetaPropTypes=y.fieldMetaPropTypes,r.fieldPropTypes=y.fieldPropTypes,r.fieldArrayFieldsPropTypes=y.fieldArrayFieldsPropTypes,r.fieldArrayMetaPropTypes=y.fieldArrayMetaPropTypes,r.fieldArrayPropTypes=y.fieldArrayPropTypes,r.formPropTypes=y.formPropTypes;var h=i(t(71));r.Field=h.default;var g=i(t(103));r.Fields=g.default;var _=i(t(108));r.FieldArray=_.default;var b=i(t(118));r.formValueSelector=b.default;var S=i(t(120));r.formValues=S.default;var E=i(t(126));r.getFormError=E.default;var R=i(t(128));r.getFormNames=R.default;var A=i(t(130));r.getFormValues=A.default;var F=i(t(132));r.getFormInitialValues=F.default;var x=i(t(134));r.getFormSyncErrors=x.default;var O=i(t(136));r.getFormMeta=O.default;var T=i(t(138));r.getFormAsyncErrors=T.default;var w=i(t(140));r.getFormSyncWarnings=w.default;var I=i(t(142));r.getFormSubmitErrors=I.default;var P=i(t(144));r.isAsyncValidating=P.default;var C=i(t(146));r.isDirty=C.default;var M=i(t(148));r.isInvalid=M.default;var V=i(t(151));r.isPristine=V.default;var U=i(t(152));r.isValid=U.default;var N=i(t(153));r.isSubmitting=N.default;var j=i(t(155));r.hasSubmitSucceeded=j.default;var D=i(t(157));r.hasSubmitFailed=D.default;var q=i(t(159));r.reduxForm=q.default;var k=i(t(191));r.reducer=k.default;var W=i(t(194));r.values=W.default;var L=u;r.actionTypes=L;var Y=a.default.arrayInsert;r.arrayInsert=Y;var B=a.default.arrayMove;r.arrayMove=B;var z=a.default.arrayPop;r.arrayPop=z;var H=a.default.arrayPush;r.arrayPush=H;var $=a.default.arrayRemove;r.arrayRemove=$;var K=a.default.arrayRemoveAll;r.arrayRemoveAll=K;var G=a.default.arrayShift;r.arrayShift=G;var J=a.default.arraySplice;r.arraySplice=J;var Z=a.default.arraySwap;r.arraySwap=Z;var Q=a.default.arrayUnshift;r.arrayUnshift=Q;var X=a.default.autofill;r.autofill=X;var ee=a.default.blur;r.blur=ee;var re=a.default.change;r.change=re;var te=a.default.clearAsyncError;r.clearAsyncError=te;var ne=a.default.clearFields;r.clearFields=ne;var ie=a.default.clearSubmit;r.clearSubmit=ie;var ae=a.default.clearSubmitErrors;r.clearSubmitErrors=ae;var ue=a.default.destroy;r.destroy=ue;var oe=a.default.focus;r.focus=oe;var se=a.default.initialize;r.initialize=se;var fe=a.default.registerField;r.registerField=fe;var le=a.default.reset;r.reset=le;var de=a.default.resetSection;r.resetSection=de;var ce=a.default.setSubmitFailed;r.setSubmitFailed=ce;var pe=a.default.setSubmitSucceeded;r.setSubmitSucceeded=pe;var ve=a.default.startAsyncValidation;r.startAsyncValidation=ve;var me=a.default.startSubmit;r.startSubmit=me;var ye=a.default.stopAsyncValidation;r.stopAsyncValidation=ye;var he=a.default.stopSubmit;r.stopSubmit=he;var ge=a.default.submit;r.submit=ge;var _e=a.default.touch;r.touch=_e;var be=a.default.unregisterField;r.unregisterField=be;var Se=a.default.untouch;r.untouch=Se;var Ee=a.default.updateSyncWarnings;r.updateSyncWarnings=Ee;var Re=a.default.updateSyncErrors;r.updateSyncErrors=Re},function(e,r){function t(r){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}e.exports=t},function(e,r,t){"use strict";var n=t(6),i=t(0);r.__esModule=!0,r.default=void 0;var a=i(t(5)),u=i(t(4)),o=n(t(3)),s=t(11),f=i(t(7)),l=t(8),d=function(e){function r(r){var t;if(t=e.call(this,r)||this,!r._reduxForm)throw new Error("Form must be inside a component decorated with reduxForm()");return t}(0,u.default)(r,e);var t=r.prototype;return t.UNSAFE_componentWillMount=function(){this.props._reduxForm.registerInnerOnSubmit(this.props.onSubmit)},t.render=function(){var e=this.props,r=(e._reduxForm,(0,a.default)(e,["_reduxForm"]));return o.default.createElement("form",r)},r}(o.Component);d.propTypes={onSubmit:f.default.func.isRequired,_reduxForm:f.default.object},(0,s.polyfill)(d);var c=(0,l.withReduxForm)(d);r.default=c},function(e,r,t){"use strict";var n=t(65);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,r,t,i,a,u){if(u!==n){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function r(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:a,resetWarningCache:i};return t.PropTypes=t,t}},function(e,r,t){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,r,t){"use strict";var n=t(6);r.__esModule=!0,r.default=void 0;n(t(3));var i=(0,t(8).withReduxForm)((function(e){var r=e.children,t=e._reduxForm;return r({form:t&&t.form,sectionPrefix:t&&t.sectionPrefix})}));r.default=i},function(e,r,t){"use strict";var n=t(6),i=t(0);r.__esModule=!0,r.default=void 0;var a=i(t(2)),u=i(t(5)),o=i(t(4)),s=n(t(3)),f=i(t(7)),l=i(t(12)),d=t(8),c=i(t(9)),p=function(e){function r(r){var t;if(t=e.call(this,r)||this,!r._reduxForm)throw new Error("FormSection must be inside a component decorated with reduxForm()");return t}return(0,o.default)(r,e),r.prototype.render=function(){var e=this.props,r=(e._reduxForm,e.children),t=e.name,n=e.component,i=(0,u.default)(e,["_reduxForm","children","name","component"]);return s.default.isValidElement(r)?(0,s.createElement)(d.ReduxFormContext.Provider,{value:(0,a.default)({},this.props._reduxForm,{sectionPrefix:(0,l.default)(this.props,t)}),children:r}):(0,s.createElement)(d.ReduxFormContext.Provider,{value:(0,a.default)({},this.props._reduxForm,{sectionPrefix:(0,l.default)(this.props,t)}),children:(0,s.createElement)(n,(0,a.default)({},i,{children:r}))})},r}(s.Component);p.propTypes={name:f.default.string.isRequired,component:c.default},p.defaultProps={component:"div"};var v=(0,d.withReduxForm)(p);r.default=v},function(e,r,t){"use strict"; /** @license React v16.12.0 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */Object.defineProperty(r,"__esModule",{value:!0});var n="function"==typeof Symbol&&Symbol.for,i=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,u=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,f=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,d=n?Symbol.for("react.async_mode"):60111,c=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,v=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,y=n?Symbol.for("react.memo"):60115,h=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.fundamental"):60117,_=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function S(e){if("object"==typeof e&&null!==e){var r=e.$$typeof;switch(r){case i:switch(e=e.type){case d:case c:case u:case s:case o:case v:return e;default:switch(e=e&&e.$$typeof){case l:case p:case h:case y:case f:return e;default:return r}}case a:return r}}}function E(e){return S(e)===c}r.typeOf=S,r.AsyncMode=d,r.ConcurrentMode=c,r.ContextConsumer=l,r.ContextProvider=f,r.Element=i,r.ForwardRef=p,r.Fragment=u,r.Lazy=h,r.Memo=y,r.Portal=a,r.Profiler=s,r.StrictMode=o,r.Suspense=v,r.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===u||e===c||e===s||e===o||e===v||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===y||e.$$typeof===f||e.$$typeof===l||e.$$typeof===p||e.$$typeof===g||e.$$typeof===_||e.$$typeof===b)},r.isAsyncMode=function(e){return E(e)||S(e)===d},r.isConcurrentMode=E,r.isContextConsumer=function(e){return S(e)===l},r.isContextProvider=function(e){return S(e)===f},r.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},r.isForwardRef=function(e){return S(e)===p},r.isFragment=function(e){return S(e)===u},r.isLazy=function(e){return S(e)===h},r.isMemo=function(e){return S(e)===y},r.isPortal=function(e){return S(e)===a},r.isProfiler=function(e){return S(e)===s},r.isStrictMode=function(e){return S(e)===o},r.isSuspense=function(e){return S(e)===v}},function(e,r,t){"use strict";function n(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function i(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r}t.r(r);var a=function(e){function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";n(this,r);var t=i(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e));return Object.defineProperty(t,"message",{configurable:!0,enumerable:!1,value:e,writable:!0}),Object.defineProperty(t,"name",{configurable:!0,enumerable:!1,value:t.constructor.name,writable:!0}),Error.hasOwnProperty("captureStackTrace")?(Error.captureStackTrace(t,t.constructor),i(t)):(Object.defineProperty(t,"stack",{configurable:!0,enumerable:!1,value:new Error(e).stack,writable:!0}),t)}return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}(r,e),r}(function(e){function r(){e.apply(this,arguments)}return r.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e,r}(Error));r.default=a},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=r.fieldArrayPropTypes=r.fieldPropTypes=r.fieldArrayFieldsPropTypes=r.fieldArrayMetaPropTypes=r.fieldMetaPropTypes=r.fieldInputPropTypes=r.formPropTypes=void 0;var i=n(t(7)),a=i.default.any,u=i.default.bool,o=i.default.func,s=i.default.shape,f=i.default.string,l=i.default.oneOfType,d=i.default.object,c=i.default.number,p={anyTouched:u.isRequired,asyncValidating:l([u,f]).isRequired,dirty:u.isRequired,error:a,form:f.isRequired,invalid:u.isRequired,initialized:u.isRequired,initialValues:d,pristine:u.isRequired,pure:u.isRequired,submitting:u.isRequired,submitAsSideEffect:u.isRequired,submitFailed:u.isRequired,submitSucceeded:u.isRequired,valid:u.isRequired,warning:a,array:s({insert:o.isRequired,move:o.isRequired,pop:o.isRequired,push:o.isRequired,remove:o.isRequired,removeAll:o.isRequired,shift:o.isRequired,splice:o.isRequired,swap:o.isRequired,unshift:o.isRequired}),asyncValidate:o.isRequired,autofill:o.isRequired,blur:o.isRequired,change:o.isRequired,clearAsyncError:o.isRequired,clearFields:o.isRequired,clearSubmitErrors:o.isRequired,destroy:o.isRequired,dispatch:o.isRequired,handleSubmit:o.isRequired,initialize:o.isRequired,reset:o.isRequired,resetSection:o.isRequired,touch:o.isRequired,submit:o.isRequired,untouch:o.isRequired,triggerSubmit:u,clearSubmit:o.isRequired};r.formPropTypes=p;var v={checked:u,name:f.isRequired,onBlur:o.isRequired,onChange:o.isRequired,onDragStart:o.isRequired,onDrop:o.isRequired,onFocus:o.isRequired,value:a};r.fieldInputPropTypes=v;var m={active:u.isRequired,asyncValidating:u.isRequired,autofilled:u.isRequired,dirty:u.isRequired,dispatch:o.isRequired,error:a,form:f.isRequired,invalid:u.isRequired,pristine:u.isRequired,submitting:u.isRequired,submitFailed:u.isRequired,touched:u.isRequired,valid:u.isRequired,visited:u.isRequired,warning:f};r.fieldMetaPropTypes=m;var y={dirty:u.isRequired,error:a,form:f.isRequired,invalid:u.isRequired,pristine:u.isRequired,submitFailed:u,submitting:u,valid:u.isRequired,warning:f};r.fieldArrayMetaPropTypes=y;var h={name:f.isRequired,forEach:o.isRequired,get:o.isRequired,getAll:o.isRequired,insert:o.isRequired,length:c.isRequired,map:o.isRequired,move:o.isRequired,pop:o.isRequired,push:o.isRequired,reduce:o.isRequired,remove:o.isRequired,removeAll:o.isRequired,shift:o.isRequired,swap:o.isRequired,unshift:o.isRequired};r.fieldArrayFieldsPropTypes=h;var g={input:s(v).isRequired,meta:s(m).isRequired};r.fieldPropTypes=g;var _={fields:s(h).isRequired,meta:s(y).isRequired};r.fieldArrayPropTypes=_;var b=p;r.default=b},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(72)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";var n=t(6),i=t(0);r.__esModule=!0,r.default=void 0;var a=i(t(2)),u=i(t(13)),o=i(t(4)),s=n(t(3)),f=t(11),l=i(t(7)),d=i(t(14)),c=i(t(73)),p=i(t(46)),v=i(t(12)),m=i(t(1)),y=t(8),h=i(t(9)),g=function(e){var r=(0,c.default)(e),t=e.setIn,n=function(e){function n(r){var n;if((n=e.call(this,r)||this).ref=s.default.createRef(),n.normalize=function(e,r){var i=n.props.normalize;if(!i)return r;var a=n.props._reduxForm.getValues();return i(r,n.value,t(a,e,r),a,e)},!r._reduxForm)throw new Error("Field must be inside a component decorated with reduxForm()");return n}(0,o.default)(n,e);var i=n.prototype;return i.componentDidMount=function(){var e=this;this.props._reduxForm.register(this.name,"Field",(function(){return e.props.validate}),(function(){return e.props.warn}))},i.shouldComponentUpdate=function(e,r){return(0,p.default)(this,e,r)},i.UNSAFE_componentWillReceiveProps=function(e){var r=(0,v.default)(this.props,this.props.name),t=(0,v.default)(e,e.name);r===t&&m.default.deepEqual(this.props.validate,e.validate)&&m.default.deepEqual(this.props.warn,e.warn)||(this.props._reduxForm.unregister(r),this.props._reduxForm.register(t,"Field",(function(){return e.validate}),(function(){return e.warn})))},i.componentWillUnmount=function(){this.props._reduxForm.unregister(this.name)},i.getRenderedComponent=function(){return(0,d.default)(this.props.forwardRef,"If you want to access getRenderedComponent(), you must specify a forwardRef prop to Field"),this.ref.current?this.ref.current.getRenderedComponent():void 0},i.render=function(){return(0,s.createElement)(r,(0,a.default)({},this.props,{name:this.name,normalize:this.normalize,ref:this.ref}))},(0,u.default)(n,[{key:"name",get:function(){return(0,v.default)(this.props,this.props.name)}},{key:"dirty",get:function(){return!this.pristine}},{key:"pristine",get:function(){return!(!this.ref.current||!this.ref.current.isPristine())}},{key:"value",get:function(){return this.ref.current&&this.ref.current.getValue()}}]),n}(s.Component);return n.propTypes={name:l.default.string.isRequired,component:h.default,format:l.default.func,normalize:l.default.func,onBlur:l.default.func,onChange:l.default.func,onFocus:l.default.func,onDragStart:l.default.func,onDrop:l.default.func,parse:l.default.func,props:l.default.object,validate:l.default.oneOfType([l.default.func,l.default.arrayOf(l.default.func)]),warn:l.default.oneOfType([l.default.func,l.default.arrayOf(l.default.func)]),forwardRef:l.default.bool,immutableProps:l.default.arrayOf(l.default.string),_reduxForm:l.default.object},(0,f.polyfill)(n),(0,y.withReduxForm)(n)};r.default=g},function(e,r,t){"use strict";var n=t(6),i=t(0);r.__esModule=!0,r.default=void 0;var a=i(t(5)),u=i(t(2)),o=i(t(4)),s=n(t(3)),f=i(t(7)),l=t(10),d=i(t(38)),c=i(t(39)),p=t(75),v=i(t(1)),m=i(t(40)),y=i(t(9)),h=i(t(22)),g=["_reduxForm"],_=function(e){return e&&"object"==typeof e},b=function(e){return e&&"function"==typeof e},S=function(e){_(e)&&b(e.preventDefault)&&e.preventDefault()},E=function(e,r){if(_(e)&&_(e.dataTransfer)&&b(e.dataTransfer.getData))return e.dataTransfer.getData(r)},R=function(e,r,t){_(e)&&_(e.dataTransfer)&&b(e.dataTransfer.setData)&&e.dataTransfer.setData(r,t)},A=function(e){var r=e.deepEqual,t=e.getIn,n=function(t){function n(){for(var e,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).ref=s.default.createRef(),e.isPristine=function(){return e.props.pristine},e.getValue=function(){return e.props.value},e.handleChange=function(r){var t=e.props,n=t.name,i=t.dispatch,a=t.parse,o=t.normalize,s=t.onChange,f=t._reduxForm,l=t.value,d=(0,c.default)(r,{name:n,parse:a,normalize:o}),p=!1;if(s)if(!m.default&&(0,h.default)(r))s((0,u.default)({},r,{preventDefault:function(){return p=!0,S(r)}}),d,l,n);else{var v=s(r,d,l,n);m.default&&(p=v)}p||(i(f.change(n,d)),f.asyncValidate&&f.asyncValidate(n,d,"change"))},e.handleFocus=function(r){var t=e.props,n=t.name,i=t.dispatch,a=t.onFocus,o=t._reduxForm,s=!1;a&&(m.default?s=a(r,n):a((0,u.default)({},r,{preventDefault:function(){return s=!0,S(r)}}),n)),s||i(o.focus(n))},e.handleBlur=function(r){var t=e.props,n=t.name,i=t.dispatch,a=t.parse,o=t.normalize,s=t.onBlur,f=t._reduxForm,l=t._value,d=t.value,p=(0,c.default)(r,{name:n,parse:a,normalize:o});p===l&&void 0!==l&&(p=d);var v=!1;s&&(m.default?v=s(r,p,d,n):s((0,u.default)({},r,{preventDefault:function(){return v=!0,S(r)}}),p,d,n)),v||(i(f.blur(n,p)),f.asyncValidate&&f.asyncValidate(n,p,"blur"))},e.handleDragStart=function(r){var t=e.props,n=t.name,i=t.onDragStart,a=t.value;R(r,p.dataKey,null==a?"":a),i&&i(r,n)},e.handleDrop=function(r){var t=e.props,n=t.name,i=t.dispatch,a=t.onDrop,o=t._reduxForm,s=t.value,f=E(r,p.dataKey),l=!1;a&&a((0,u.default)({},r,{preventDefault:function(){return l=!0,S(r)}}),f,s,n),l||(i(o.change(n,f)),S(r))},e}(0,o.default)(n,t);var i=n.prototype;return i.shouldComponentUpdate=function(e){var t=this,n=Object.keys(e),i=Object.keys(this.props);return!!(this.props.children||e.children||n.length!==i.length||n.some((function(n){return~(e.immutableProps||[]).indexOf(n)?t.props[n]!==e[n]:!~g.indexOf(n)&&!r(t.props[n],e[n])})))},i.getRenderedComponent=function(){return this.ref.current},i.render=function(){var r=this.props,t=r.component,n=r.forwardRef,i=r.name,o=r._reduxForm,f=(r.normalize,r.onBlur,r.onChange,r.onFocus,r.onDragStart,r.onDrop,r.immutableProps,(0,a.default)(r,["component","forwardRef","name","_reduxForm","normalize","onBlur","onChange","onFocus","onDragStart","onDrop","immutableProps"])),l=(0,d.default)(e,i,(0,u.default)({},f,{form:o.form,onBlur:this.handleBlur,onChange:this.handleChange,onDrop:this.handleDrop,onDragStart:this.handleDragStart,onFocus:this.handleFocus})),c=l.custom,p=(0,a.default)(l,["custom"]);if(n&&(c.ref=this.ref),"string"==typeof t){var v=p.input;p.meta;return(0,s.createElement)(t,(0,u.default)({},v,{},c))}return(0,s.createElement)(t,(0,u.default)({},p,{},c))},n}(s.Component);return n.propTypes={component:y.default,props:f.default.object},(0,l.connect)((function(e,n){var i=n.name,a=n._reduxForm,u=a.initialValues,o=(0,a.getFormState)(e),s=t(o,"initial."+i),f=void 0!==s?s:u&&t(u,i),l=t(o,"values."+i),d=t(o,"submitting"),c=function(e,r){var t=v.default.getIn(e,r);return t&&t._error?t._error:t}(t(o,"syncErrors"),i),p=function(e,r){var n=t(e,r);return n&&n._warning?n._warning:n}(t(o,"syncWarnings"),i),m=r(l,f);return{asyncError:t(o,"asyncErrors."+i),asyncValidating:t(o,"asyncValidating")===i,dirty:!m,pristine:m,state:t(o,"fields."+i),submitError:t(o,"submitErrors."+i),submitFailed:t(o,"submitFailed"),submitting:d,syncError:c,syncWarning:p,initial:f,value:l,_value:n.value}}),void 0,void 0,{forwardRef:!0})(n)};r.default=A},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(22)),a=function(e,r){if((0,i.default)(e)){if(!r&&e.nativeEvent&&void 0!==e.nativeEvent.text)return e.nativeEvent.text;if(r&&void 0!==e.nativeEvent)return e.nativeEvent.text;var t=e,n=t.target,a=n.type,u=n.value,o=n.checked,s=n.files,f=t.dataTransfer;return"checkbox"===a?!!o:"file"===a?s||f&&f.files:"select-multiple"===a?function(e){var r=[];if(e)for(var t=0;t<e.length;t++){var n=e[t];n.selected&&r.push(n.value)}return r}(e.target.options):u}return e};r.default=a},function(e,r,t){"use strict";r.__esModule=!0,r.dataKey=void 0;r.dataKey="text"},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e,r,t,n){if(r<(e=e||[]).length){if(void 0===n&&!t){var i=[].concat(e);return i.splice(r,0,!0),i[r]=void 0,i}if(null!=n){var a=[].concat(e);return a.splice(r,t,n),a}var u=[].concat(e);return u.splice(r,t),u}if(t)return e;var o=[].concat(e);return o[r]=n,o};r.default=n},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(16)),a=function(e,r){if(!e)return e;var t=(0,i.default)(r),n=t.length;if(n){for(var a=e,u=0;u<n&&a;++u)a=a[t[u]];return a}};r.default=a},function(e,r){e.exports=function(e,r){for(var t=-1,n=null==e?0:e.length,i=Array(n);++t<n;)i[t]=r(e[t],t,e);return i}},function(e,r){e.exports=function(){return!1}},function(e,r,t){var n=t(81),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,u=n((function(e){var r=[];return 46===e.charCodeAt(0)&&r.push(""),e.replace(i,(function(e,t,n,i){r.push(n?i.replace(a,"$1"):t||e)})),r}));e.exports=u},function(e,r){e.exports=function(e){return e}},function(e,r){e.exports=function(e){return e}},function(e,r){e.exports=function(e){return e}},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(2)),a=n(t(16)),u=function(e,r,t){return function e(r,t,n,a){var u;if(a>=n.length)return t;var o=n[a],s=e(r&&(Array.isArray(r)?r[Number(o)]:r[o]),t,n,a+1);if(!r){var f;if(isNaN(o))return(f={})[o]=s,f;var l=[];return l[parseInt(o,10)]=s,l}if(Array.isArray(r)){var d=[].concat(r);return d[parseInt(o,10)]=s,d}return(0,i.default)({},r,((u={})[o]=s,u))}(e,t,(0,a.default)(r),0)};r.default=u},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(86)),a=n(t(42)),u=n(t(3)),o=function(e){return(0,i.default)(e)||""===e||isNaN(e)},s=function(e,r){return e===r||(e||r?(!e||!r||e._error===r._error)&&((!e||!r||e._warning===r._warning)&&(!u.default.isValidElement(e)&&!u.default.isValidElement(r)&&void 0)):o(e)===o(r))},f=function(e,r){return(0,a.default)(e,r,s)};r.default=f},function(e,r){e.exports=function(e){return null==e}},function(e,r,t){var n=t(44),i=t(93),a=t(98),u=t(99),o=t(45),s=t(15),f=t(24),l=t(25),d="[object Object]",c=Object.prototype.hasOwnProperty;e.exports=function(e,r,t,p,v,m){var y=s(e),h=s(r),g=y?"[object Array]":o(e),_=h?"[object Array]":o(r),b=(g="[object Arguments]"==g?d:g)==d,S=(_="[object Arguments]"==_?d:_)==d,E=g==_;if(E&&f(e)){if(!f(r))return!1;y=!0,b=!1}if(E&&!b)return m||(m=new n),y||l(e)?i(e,r,t,p,v,m):a(e,r,g,t,p,v,m);if(!(1&t)){var R=b&&c.call(e,"__wrapped__"),A=S&&c.call(r,"__wrapped__");if(R||A){var F=R?e.value():e,x=A?r.value():r;return m||(m=new n),v(F,x,t,p,m)}}return!!E&&(m||(m=new n),u(e,r,t,p,v,m))}},function(e,r){e.exports=function(){this.__data__=[],this.size=0}},function(e,r,t){var n=t(17),i=Array.prototype.splice;e.exports=function(e){var r=this.__data__,t=n(r,e);return!(t<0)&&(t==r.length-1?r.pop():i.call(r,t,1),--this.size,!0)}},function(e,r,t){var n=t(17);e.exports=function(e){var r=this.__data__,t=n(r,e);return t<0?void 0:r[t][1]}},function(e,r,t){var n=t(17);e.exports=function(e){return n(this.__data__,e)>-1}},function(e,r,t){var n=t(17);e.exports=function(e,r){var t=this.__data__,i=n(t,e);return i<0?(++this.size,t.push([e,r])):t[i][1]=r,this}},function(e,r,t){var n=t(94),i=t(95),a=t(96);e.exports=function(e,r,t,u,o,s){var f=1&t,l=e.length,d=r.length;if(l!=d&&!(f&&d>l))return!1;var c=s.get(e);if(c&&s.get(r))return c==r;var p=-1,v=!0,m=2&t?new n:void 0;for(s.set(e,r),s.set(r,e);++p<l;){var y=e[p],h=r[p];if(u)var g=f?u(h,y,p,r,e,s):u(y,h,p,e,r,s);if(void 0!==g){if(g)continue;v=!1;break}if(m){if(!i(r,(function(e,r){if(!a(m,r)&&(y===e||o(y,e,t,u,s)))return m.push(r)}))){v=!1;break}}else if(y!==h&&!o(y,h,t,u,s)){v=!1;break}}return s.delete(e),s.delete(r),v}},function(e,r,t){var n=t(15);e.exports=function(){if(!arguments.length)return[];var e=arguments[0];return n(e)?e:[e]}},function(e,r){e.exports=function(e,r){for(var t=-1,n=null==e?0:e.length;++t<n;)if(r(e[t],t,e))return!0;return!1}},function(e,r,t){var n=t(97);e.exports=function(e,r){return!!(null==e?0:e.length)&&n(e,r,0)>-1}},function(e,r){e.exports=function(e,r,t){for(var n=t-1,i=e.length;++n<i;)if(e[n]===r)return n;return-1}},function(e,r){e.exports=function(e,r){return e===r||e!=e&&r!=r}},function(e,r,t){var n=t(100),i=Object.prototype.hasOwnProperty;e.exports=function(e,r,t,a,u,o){var s=1&t,f=n(e),l=f.length;if(l!=n(r).length&&!s)return!1;for(var d=l;d--;){var c=f[d];if(!(s?c in r:i.call(r,c)))return!1}var p=o.get(e);if(p&&o.get(r))return p==r;var v=!0;o.set(e,r),o.set(r,e);for(var m=s;++d<l;){var y=e[c=f[d]],h=r[c];if(a)var g=s?a(h,y,c,r,e,o):a(y,h,c,e,r,o);if(!(void 0===g?y===h||u(y,h,t,a,o):g)){v=!1;break}m||(m="constructor"==c)}if(v&&!m){var _=e.constructor,b=r.constructor;_!=b&&"constructor"in e&&"constructor"in r&&!("function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b)&&(v=!1)}return o.delete(e),o.delete(r),v}},function(e,r,t){var n=t(18)(Object.keys,Object);e.exports=n},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(2)),a=n(t(16));function u(e,r){if(null==e||null==r)return e;for(var t=arguments.length,n=new Array(t>2?t-2:0),a=2;a<t;a++)n[a-2]=arguments[a];if(n.length){if(Array.isArray(e)){if(isNaN(r))throw new Error('Must access array elements with a number, not "'+String(r)+'".');var o=Number(r);if(o<e.length){var s=u.apply(void 0,[e&&e[o]].concat(n));if(s!==e[o]){var f=[].concat(e);return f[o]=s,f}}return e}if(r in e){var l,d=u.apply(void 0,[e&&e[r]].concat(n));return e[r]===d?e:(0,i.default)({},e,((l={})[r]=d,l))}return e}if(Array.isArray(e)){if(isNaN(r))throw new Error('Cannot delete non-numerical index from an array. Given: "'+String(r));var c=Number(r);if(c<e.length){var p=[].concat(e);return p.splice(c,1),p}return e}if(r in e){var v=(0,i.default)({},e);return delete v[r],v}return e}var o=function(e,r){return u.apply(void 0,[e].concat((0,a.default)(r)))};r.default=o},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e){return e?Array.isArray(e)?e.map((function(e){return e.name})):Object.keys(e):[]};r.default=n},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(104)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(2)),a=n(t(13)),u=n(t(4)),o=t(3),s=t(11),f=n(t(7)),l=n(t(14)),d=n(t(105)),c=n(t(107)),p=n(t(46)),v=n(t(1)),m=n(t(12)),y=t(8),h=n(t(9)),g=function(e){return e?Array.isArray(e)||e._isFieldArray?void 0:new Error('Invalid prop "names" supplied to <Fields/>. Must be either an array of strings or the fields array generated by FieldArray.'):new Error('No "names" prop was specified <Fields/>')},_=f.default.oneOfType([f.default.func,f.default.arrayOf(f.default.func),f.default.objectOf(f.default.oneOfType([f.default.func,f.default.arrayOf(f.default.func)]))]),b={component:h.default,format:f.default.func,parse:f.default.func,props:f.default.object,forwardRef:f.default.bool,validate:_,warn:_},S=function(e,r){return Array.isArray(e)||"function"==typeof e?e:(0,d.default)(e,r,void 0)},E=function(e){var r=(0,c.default)(e),t=function(e){function t(r){var t;if(t=e.call(this,r)||this,!r._reduxForm)throw new Error("Fields must be inside a component decorated with reduxForm()");var n=g(r.names);if(n)throw n;return t}(0,u.default)(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return(0,p.default)(this,e)},n.componentDidMount=function(){this.registerFields(this.props.names)},n.UNSAFE_componentWillReceiveProps=function(e){if(!v.default.deepEqual(this.props.names,e.names)){var r=this.props,t=r._reduxForm.unregister;this.props.names.forEach((function(e){return t((0,m.default)(r,e))})),this.registerFields(e.names)}},n.componentWillUnmount=function(){var e=this.props,r=e._reduxForm.unregister;this.props.names.forEach((function(t){return r((0,m.default)(e,t))}))},n.registerFields=function(e){var r=this,t=this.props,n=t._reduxForm.register;e.forEach((function(e){return n((0,m.default)(t,e),"Field",(function(){return S(r.props.validate,e)}),(function(){return S(r.props.warn,e)}))}))},n.getRenderedComponent=function(){return(0,l.default)(this.props.forwardRef,"If you want to access getRenderedComponent(), you must specify a forwardRef prop to Fields"),this.refs.connected.getRenderedComponent()},n.render=function(){var e=this.props;return(0,o.createElement)(r,(0,i.default)({},this.props,{names:this.props.names.map((function(r){return(0,m.default)(e,r)})),ref:"connected"}))},(0,a.default)(t,[{key:"names",get:function(){var e=this.props;return this.props.names.map((function(r){return(0,m.default)(e,r)}))}},{key:"dirty",get:function(){return this.refs.connected.isDirty()}},{key:"pristine",get:function(){return!this.dirty}},{key:"values",get:function(){return this.refs.connected&&this.refs.connected.getValues()}}]),t}(o.Component);return t.propTypes=(0,i.default)({names:function(e,r){return g(e[r])}},b),(0,s.polyfill)(t),(0,y.withReduxForm)(t)};r.default=E},function(e,r,t){var n=t(106);e.exports=function(e,r,t){var i=null==e?void 0:n(e,r);return void 0===i?t:i}},function(e,r){e.exports=function(e,r){return null==e?void 0:e[r]}},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(2)),a=n(t(5)),u=n(t(4)),o=n(t(3)),s=n(t(7)),f=t(10),l=n(t(38)),d=n(t(1)),c=n(t(39)),p=n(t(9)),v=["_reduxForm"],m=function(e){var r=e.deepEqual,t=e.getIn,n=e.size,m=function(t){function s(e){var r;return(r=t.call(this,e)||this).onChangeFns={},r.onFocusFns={},r.onBlurFns={},r.ref=o.default.createRef(),r.prepareEventHandlers=function(e){return e.names.forEach((function(e){r.onChangeFns[e]=function(t){return r.handleChange(e,t)},r.onFocusFns[e]=function(){return r.handleFocus(e)},r.onBlurFns[e]=function(t){return r.handleBlur(e,t)}}))},r.handleChange=function(e,t){var n=r.props,i=n.dispatch,a=n.parse,u=n._reduxForm,o=(0,c.default)(t,{name:e,parse:a});i(u.change(e,o)),u.asyncValidate&&u.asyncValidate(e,o,"change")},r.handleFocus=function(e){var t=r.props;(0,t.dispatch)(t._reduxForm.focus(e))},r.handleBlur=function(e,t){var n=r.props,i=n.dispatch,a=n.parse,u=n._reduxForm,o=(0,c.default)(t,{name:e,parse:a});i(u.blur(e,o)),u.asyncValidate&&u.asyncValidate(e,o,"blur")},r.prepareEventHandlers(e),r}(0,u.default)(s,t);var f=s.prototype;return f.UNSAFE_componentWillReceiveProps=function(e){var r=this;this.props.names===e.names||n(this.props.names)===n(e.names)&&!e.names.some((function(e){return!r.props._fields[e]}))||this.prepareEventHandlers(e)},f.shouldComponentUpdate=function(e){var t=this,n=Object.keys(e),i=Object.keys(this.props);return!!(this.props.children||e.children||n.length!==i.length||n.some((function(n){return!~v.indexOf(n)&&!r(t.props[n],e[n])})))},f.isDirty=function(){var e=this.props._fields;return Object.keys(e).some((function(r){return e[r].dirty}))},f.getValues=function(){var e=this.props._fields;return Object.keys(e).reduce((function(r,t){return d.default.setIn(r,t,e[t].value)}),{})},f.getRenderedComponent=function(){return this.ref.current},f.render=function(){var r=this,t=this.props,n=t.component,u=t.forwardRef,s=t._fields,f=t._reduxForm,c=(0,a.default)(t,["component","forwardRef","_fields","_reduxForm"]),p=f.sectionPrefix,v=f.form,m=Object.keys(s).reduce((function(t,n){var u=s[n],o=(0,l.default)(e,n,(0,i.default)({},u,{},c,{form:v,onBlur:r.onBlurFns[n],onChange:r.onChangeFns[n],onFocus:r.onFocusFns[n]})),f=o.custom,m=(0,a.default)(o,["custom"]);t.custom=f;var y=p?n.replace(p+".",""):n;return d.default.setIn(t,y,m)}),{}),y=m.custom,h=(0,a.default)(m,["custom"]);return u&&(h.ref=this.ref),o.default.createElement(n,(0,i.default)({},h,{},y))},s}(o.default.Component);return m.propTypes={component:p.default,_fields:s.default.object.isRequired,props:s.default.object},(0,f.connect)((function(e,r){var n=r.names,i=r._reduxForm,a=i.initialValues,u=(0,i.getFormState)(e);return{_fields:n.reduce((function(e,n){var i=t(u,"initial."+n),o=void 0!==i?i:a&&t(a,n),s=t(u,"values."+n),f=function(e,r){return d.default.getIn(e,r+"._error")||d.default.getIn(e,r)}(t(u,"syncErrors"),n),l=function(e,r){var n=t(e,r);return n&&n._warning?n._warning:n}(t(u,"syncWarnings"),n),c=t(u,"submitting"),p=s===o;return e[n]={asyncError:t(u,"asyncErrors."+n),asyncValidating:t(u,"asyncValidating")===n,dirty:!p,initial:o,pristine:p,state:t(u,"fields."+n),submitError:t(u,"submitErrors."+n),submitFailed:t(u,"submitFailed"),submitting:c,syncError:f,syncWarning:l,value:s,_value:r.value},e}),{})}}),void 0,void 0,{forwardRef:!0})(m)};r.default=m},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(109)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";var n=t(6),i=t(0);r.__esModule=!0,r.default=void 0;var a=i(t(2)),u=i(t(13)),o=i(t(4)),s=n(t(3)),f=t(11),l=i(t(7)),d=i(t(14)),c=i(t(110)),p=i(t(12)),v=t(8),m=i(t(9)),y=function(e){return Array.isArray(e)?e:[e]},h=function(e,r){return e&&function(){for(var t=y(e),n=0;n<t.length;n++){var i,a=t[n].apply(t,arguments);if(a)return(i={})[r]=a,i}}},g=function(e){var r=(0,c.default)(e),t=function(e){function t(r){var t;if((t=e.call(this,r)||this).ref=s.default.createRef(),!r._reduxForm)throw new Error("FieldArray must be inside a component decorated with reduxForm()");return t}(0,o.default)(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this;this.props._reduxForm.register(this.name,"FieldArray",(function(){return h(e.props.validate,"_error")}),(function(){return h(e.props.warn,"_warning")}))},n.UNSAFE_componentWillReceiveProps=function(e){var r=(0,p.default)(this.props,this.props.name),t=(0,p.default)(e,e.name);r!==t&&(this.props._reduxForm.unregister(r),this.props._reduxForm.register(t,"FieldArray"))},n.componentWillUnmount=function(){this.props._reduxForm.unregister(this.name)},n.getRenderedComponent=function(){return(0,d.default)(this.props.forwardRef,"If you want to access getRenderedComponent(), you must specify a forwardRef prop to FieldArray"),this.ref&&this.ref.current.getRenderedComponent()},n.render=function(){return(0,s.createElement)(r,(0,a.default)({},this.props,{name:this.name,ref:this.ref}))},(0,u.default)(t,[{key:"name",get:function(){return(0,p.default)(this.props,this.props.name)}},{key:"dirty",get:function(){return!this.ref||this.ref.current.dirty}},{key:"pristine",get:function(){return!(!this.ref||!this.ref.current.pristine)}},{key:"value",get:function(){return this.ref?this.ref.current.value:void 0}}]),t}(s.Component);return t.propTypes={name:l.default.string.isRequired,component:m.default,props:l.default.object,validate:l.default.oneOfType([l.default.func,l.default.arrayOf(l.default.func)]),warn:l.default.oneOfType([l.default.func,l.default.arrayOf(l.default.func)]),forwardRef:l.default.bool,_reduxForm:l.default.object},(0,f.polyfill)(t),(0,v.withReduxForm)(t)};r.default=g},function(e,r,t){"use strict";var n=t(6),i=t(0);r.__esModule=!0,r.default=void 0;var a=i(t(5)),u=i(t(13)),o=i(t(4)),s=i(t(27)),f=n(t(3)),l=i(t(7)),d=t(10),c=t(48),p=i(t(117)),v=i(t(1)),m=i(t(9)),y=["_reduxForm","value"],h=function(e){var r=e.deepEqual,t=e.getIn,n=e.size,i=e.equals,h=e.orderChanged,g=function(n){function s(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=n.call.apply(n,[this].concat(i))||this).ref=f.default.createRef(),e.getValue=function(r){return e.props.value&&t(e.props.value,String(r))},e}(0,o.default)(s,n);var l=s.prototype;return l.shouldComponentUpdate=function(e){var t=this,n=this.props.value,a=e.value;if(n&&a){var u=i(a,n),o=h(n,a);if((n.length||n.size)!==(a.length||a.size)||u&&o||e.rerenderOnEveryChange&&n.some((function(e,t){return!r(e,a[t])})))return!0}var s=Object.keys(e),f=Object.keys(this.props);return!!(this.props.children||e.children||s.length!==f.length||s.some((function(n){return!~y.indexOf(n)&&!r(t.props[n],e[n])})))},l.getRenderedComponent=function(){return this.ref.current},l.render=function(){var r=this.props,t=r.component,n=r.forwardRef,i=r.name,u=r._reduxForm,o=(r.validate,r.warn,r.rerenderOnEveryChange,(0,a.default)(r,["component","forwardRef","name","_reduxForm","validate","warn","rerenderOnEveryChange"])),s=(0,p.default)(e,i,u.form,u.sectionPrefix,this.getValue,o);return n&&(s.ref=this.ref),(0,f.createElement)(t,s)},(0,u.default)(s,[{key:"dirty",get:function(){return this.props.dirty}},{key:"pristine",get:function(){return this.props.pristine}},{key:"value",get:function(){return this.props.value}}]),s}(f.Component);return g.propTypes={component:m.default,props:l.default.object,rerenderOnEveryChange:l.default.bool},g.defaultProps={rerenderOnEveryChange:!1},(0,d.connect)((function(e,i){var a=i.name,u=i._reduxForm,o=u.initialValues,s=(0,u.getFormState)(e),f=t(s,"initial."+a)||o&&t(o,a),l=t(s,"values."+a),d=t(s,"submitting"),c=function(e,r){return v.default.getIn(e,r+"._error")}(t(s,"syncErrors"),a),p=function(e,r){return t(e,r+"._warning")}(t(s,"syncWarnings"),a),m=r(l,f);return{asyncError:t(s,"asyncErrors."+a+"._error"),dirty:!m,pristine:m,state:t(s,"fields."+a),submitError:t(s,"submitErrors."+a+"._error"),submitFailed:t(s,"submitFailed"),submitting:d,syncError:c,syncWarning:p,value:l,length:n(l)}}),(function(e,r){var t=r.name,n=r._reduxForm,i=n.arrayInsert,a=n.arrayMove,u=n.arrayPop,o=n.arrayPush,f=n.arrayRemove,l=n.arrayRemoveAll,d=n.arrayShift,p=n.arraySplice,v=n.arraySwap,m=n.arrayUnshift;return(0,s.default)({arrayInsert:i,arrayMove:a,arrayPop:u,arrayPush:o,arrayRemove:f,arrayRemoveAll:l,arrayShift:d,arraySplice:p,arraySwap:v,arrayUnshift:m},(function(r){return(0,c.bindActionCreators)(r.bind(null,t),e)}))}),void 0,{forwardRef:!0})(g)};r.default=h},function(e,r,t){var n=t(112),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},function(e,r){e.exports=function(e,r){return null==e?void 0:e[r]}},function(e,r,t){var n=t(47),i=t(115);e.exports=function(e,r){return e&&n(e,r,i)}},function(e,r){e.exports=function(e){return function(r,t,n){for(var i=-1,a=Object(r),u=n(r),o=u.length;o--;){var s=u[e?o:++i];if(!1===t(a[s],s,a))break}return r}}},function(e,r,t){var n=t(18)(Object.keys,Object);e.exports=n},function(e,r){e.exports=function(e){return e}},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(2)),a=n(t(5)),u=function(e,r,t,n,u,o){var s=e.getIn,f=o.arrayInsert,l=o.arrayMove,d=o.arrayPop,c=o.arrayPush,p=o.arrayRemove,v=o.arrayRemoveAll,m=o.arrayShift,y=o.arraySplice,h=o.arraySwap,g=o.arrayUnshift,_=o.asyncError,b=o.dirty,S=o.length,E=o.pristine,R=o.submitError,A=(o.state,o.submitFailed),F=o.submitting,x=o.syncError,O=o.syncWarning,T=o.value,w=o.props,I=(0,a.default)(o,["arrayInsert","arrayMove","arrayPop","arrayPush","arrayRemove","arrayRemoveAll","arrayShift","arraySplice","arraySwap","arrayUnshift","asyncError","dirty","length","pristine","submitError","state","submitFailed","submitting","syncError","syncWarning","value","props"]),P=x||_||R,C=O,M=n?r.replace(n+".",""):r,V=(0,i.default)({fields:{_isFieldArray:!0,forEach:function(e){return(T||[]).forEach((function(r,t){return e(M+"["+t+"]",t,V.fields)}))},get:u,getAll:function(){return T},insert:f,length:S,map:function(e){return(T||[]).map((function(r,t){return e(M+"["+t+"]",t,V.fields)}))},move:l,name:r,pop:function(){return d(),s(T,String(S-1))},push:c,reduce:function(e,r){return(T||[]).reduce((function(r,t,n){return e(r,M+"["+n+"]",n,V.fields)}),r)},remove:p,removeAll:v,shift:function(){return m(),s(T,"0")},splice:y,swap:h,unshift:g},meta:{dirty:b,error:P,form:t,warning:C,invalid:!!P,pristine:E,submitting:F,submitFailed:A,valid:!P}},w,{},I);return V};r.default=u},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(119)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(14)),a=n(t(1)),u=function(e){var r=e.getIn;return function(e,t){(0,i.default)(e,"Form value must be specified");var n=t||function(e){return r(e,"form")};return function(t){for(var u=arguments.length,o=new Array(u>1?u-1:0),s=1;s<u;s++)o[s-1]=arguments[s];return(0,i.default)(o.length,"No fields specified"),1===o.length?r(n(t),e+".values."+o[0]):o.reduce((function(i,u){var o=r(n(t),e+".values."+u);return void 0===o?i:a.default.setIn(i,u,o)}),{})}}};r.default=u},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(121)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(5)),a=n(t(2)),u=n(t(4)),o=n(t(27)),s=n(t(122)),f=n(t(123)),l=n(t(3)),d=t(10),c=n(t(12)),p=t(8),v=function(e){var r=e.getIn;return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),v=1;v<t;v++)n[v-1]=arguments[v];return function(t){var v=function(p){function v(e){var r;if(r=p.call(this,e)||this,!e._reduxForm)throw new Error("formValues() must be used inside a React tree decorated with reduxForm()");return r.updateComponent(e),r}(0,u.default)(v,p);var m=v.prototype;return m.UNSAFE_componentWillReceiveProps=function(r){"function"==typeof e&&this.updateComponent(r)},m.render=function(){var e=this.Component;return l.default.createElement(e,(0,a.default)({sectionPrefix:this.props._reduxForm.sectionPrefix},this.props))},m.updateComponent=function(r){var t,i,a="function"==typeof e?e(r):e;"string"==typeof a?t=n.reduce((function(e,r){return e[r]=r,e}),((i={})[a]=a,i)):t=a;if((0,f.default)(t))throw new Error("formValues(): You must specify values to get as formValues(name1, name2, ...) or formValues({propName1: propPath1, ...}) or formValues((props) => name) or formValues((props) => ({propName1: propPath1, ...}))");(0,s.default)(t,this._valuesMap)||(this._valuesMap=t,this.setComponent())},m.setComponent=function(){var e=this;this.Component=(0,d.connect)((function(t,n){n.sectionPrefix;var i=(0,e.props._reduxForm.getValues)();return(0,o.default)(e._valuesMap,(function(t){return r(i,(0,c.default)(e.props,t))}))}),(function(){return{}}))((function(e){e.sectionPrefix;var r=(0,i.default)(e,["sectionPrefix"]);return l.default.createElement(t,r)}))},v}(l.default.Component);return(0,p.withReduxForm)(v)}}};r.default=v},function(e,r,t){var n=t(43);e.exports=function(e,r){return n(e,r)}},function(e,r,t){var n=t(124),i=t(45),a=t(49),u=t(15),o=t(50),s=t(24),f=t(52),l=t(25),d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(o(e)&&(u(e)||"string"==typeof e||"function"==typeof e.splice||s(e)||l(e)||a(e)))return!e.length;var r=i(e);if("[object Map]"==r||"[object Set]"==r)return!e.size;if(f(e))return!n(e).length;for(var t in e)if(d.call(e,t))return!1;return!0}},function(e,r,t){var n=t(18)(Object.keys,Object);e.exports=n},function(e,r){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(127)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e){var r=e.getIn;return function(e,t){return function(n){var i=t||function(e){return r(e,"form")};return r(i(n),e+".error")}}};r.default=n},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(129)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e){var r=e.getIn,t=e.keys;return function(e){return function(n){return t((e||function(e){return r(e,"form")})(n))}}};r.default=n},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(131)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e){var r=e.getIn;return function(e,t){return function(n){var i=t||function(e){return r(e,"form")};return r(i(n),e+".values")}}};r.default=n},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(133)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e){var r=e.getIn;return function(e,t){return function(n){var i=t||function(e){return r(e,"form")};return r(i(n),e+".initial")}}};r.default=n},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(135)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e){var r=e.getIn,t=e.empty;return function(e,n){return function(i){var a=n||function(e){return r(e,"form")};return r(a(i),e+".syncErrors")||t}}};r.default=n},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(137)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e){var r=e.getIn,t=e.empty;return function(e,n){return function(i){var a=n||function(e){return r(e,"form")};return r(a(i),e+".fields")||t}}};r.default=n},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(139)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e){var r=e.getIn;return function(e,t){return function(n){var i=t||function(e){return r(e,"form")};return r(i(n),e+".asyncErrors")}}};r.default=n},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(141)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e){var r=e.getIn,t=e.empty;return function(e,n){return function(i){var a=n||function(e){return r(e,"form")};return r(a(i),e+".syncWarnings")||t}}};r.default=n},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(143)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e){var r=e.getIn,t=e.empty;return function(e,n){return function(i){var a=n||function(e){return r(e,"form")};return r(a(i),e+".submitErrors")||t}}};r.default=n},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(145)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e){var r=e.getIn;return function(e,t){return function(n){var i=t||function(e){return r(e,"form")};return!!r(i(n),e+".asyncValidating")}}};r.default=n},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(147)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(53)),a=function(e){return function(r,t){var n=(0,i.default)(e)(r,t);return function(e){for(var r=arguments.length,t=new Array(r>1?r-1:0),i=1;i<r;i++)t[i-1]=arguments[i];return!n.apply(void 0,[e].concat(t))}}};r.default=a},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(149)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(29)),a=function(e){return function(r,t){var n=(0,i.default)(e)(r,t);return function(e){return!n(e)}}};r.default=a},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e){var r=e.getIn;return function(e,t,n,i){return!!(t||n||i)&&function(e,r){switch(r){case"Field":return[e,e+"._error"];case"FieldArray":return[e+"._error"];default:throw new Error("Unknown field type")}}(r(e,"name"),r(e,"type")).some((function(e){return r(t,e)||r(n,e)||r(i,e)}))}};r.default=n},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(53)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(29)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(154)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e){var r=e.getIn;return function(e,t){return function(n){var i=t||function(e){return r(e,"form")};return!!r(i(n),e+".submitting")}}};r.default=n},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(156)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e){var r=e.getIn;return function(e,t){return function(n){var i=t||function(e){return r(e,"form")};return!!r(i(n),e+".submitSucceeded")}}};r.default=n},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(158)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e){var r=e.getIn;return function(e,t){return function(n){var i=t||function(e){return r(e,"form")};return!!r(i(n),e+".submitFailed")}}};r.default=n},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(160)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";var n=t(6),i=t(0);r.__esModule=!0,r.default=void 0;var a=i(t(13)),u=i(t(4)),o=i(t(2)),s=i(t(5)),f=i(t(161)),l=i(t(27)),d=t(11),c=i(t(184)),p=i(t(14)),v=i(t(30)),m=i(t(7)),y=n(t(3)),h=t(10),g=t(48),_=i(t(31)),b=i(t(185)),S=i(t(32)),E=i(t(33)),R=i(t(34)),A=i(t(35)),F=i(t(60)),x=i(t(186)),O=i(t(187)),T=i(t(188)),w=i(t(29)),I=i(t(1)),P=i(t(189)),C=i(t(190)),M=t(8),V=_.default.arrayInsert,U=_.default.arrayMove,N=_.default.arrayPop,j=_.default.arrayPush,D=_.default.arrayRemove,q=_.default.arrayRemoveAll,k=_.default.arrayShift,W=_.default.arraySplice,L=_.default.arraySwap,Y=_.default.arrayUnshift,B=_.default.blur,z=_.default.change,H=_.default.focus,$=(0,s.default)(_.default,["arrayInsert","arrayMove","arrayPop","arrayPush","arrayRemove","arrayRemoveAll","arrayShift","arraySplice","arraySwap","arrayUnshift","blur","change","focus"]),K={arrayInsert:V,arrayMove:U,arrayPop:N,arrayPush:j,arrayRemove:D,arrayRemoveAll:q,arrayShift:k,arraySplice:W,arraySwap:L,arrayUnshift:Y},G=[].concat(Object.keys(_.default),["array","asyncErrors","initialValues","syncErrors","syncWarnings","values","registeredFields"]),J=function(e){if(!e||"function"!=typeof e)throw new Error("You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop");return e},Z=function(e){var r=e.deepEqual,t=e.empty,n=e.getIn,i=e.setIn,_=e.keys,V=e.fromJS,U=e.toJS,N=(0,w.default)(e);return function(w){var j=(0,o.default)({touchOnBlur:!0,touchOnChange:!1,persistentSubmitErrors:!1,destroyOnUnmount:!0,shouldAsyncValidate:S.default,shouldValidate:E.default,shouldError:R.default,shouldWarn:A.default,enableReinitialize:!1,keepDirtyOnReinitialize:!1,updateUnregisteredFields:!1,getFormState:function(e){return n(e,"form")},pure:!0,forceUnregisterOnUnmount:!1,submitAsSideEffect:!1},w);return function(S){var w=function(t){function a(){for(var r,a=arguments.length,u=new Array(a),s=0;s<a;s++)u[s]=arguments[s];return(r=t.call.apply(t,[this].concat(u))||this).wrapped=y.default.createRef(),r.destroyed=!1,r.fieldCounts={},r.fieldValidators={},r.lastFieldValidatorKeys=[],r.fieldWarners={},r.lastFieldWarnerKeys=[],r.innerOnSubmit=void 0,r.submitPromise=void 0,r.getValues=function(){return r.props.values},r.isValid=function(){return r.props.valid},r.isPristine=function(){return r.props.pristine},r.register=function(e,t,n,i){var a=(r.fieldCounts[e]||0)+1;r.fieldCounts[e]=a,r.props.registerField(e,t),n&&(r.fieldValidators[e]=n),i&&(r.fieldWarners[e]=i)},r.unregister=function(e){var t=r.fieldCounts[e];if(1===t?delete r.fieldCounts[e]:null!=t&&(r.fieldCounts[e]=t-1),!r.destroyed){var n=r.props,i=n.destroyOnUnmount,a=n.forceUnregisterOnUnmount,u=n.unregisterField;i||a?(u(e,i),r.fieldCounts[e]||(delete r.fieldValidators[e],delete r.fieldWarners[e],r.lastFieldValidatorKeys=r.lastFieldValidatorKeys.filter((function(r){return r!==e})))):u(e,!1)}},r.getFieldList=function(e){var t=r.props.registeredFields;if(!t)return[];var i=_(t);return e&&(e.excludeFieldArray&&(i=i.filter((function(e){return"FieldArray"!==n(t,"['"+e+"'].type")}))),e.excludeUnregistered&&(i=i.filter((function(e){return 0!==n(t,"['"+e+"'].count")})))),U(i)},r.getValidators=function(){var e={};return Object.keys(r.fieldValidators).forEach((function(t){var n=r.fieldValidators[t]();n&&(e[t]=n)})),e},r.generateValidator=function(){var t=r.getValidators();return Object.keys(t).length?(0,O.default)(t,e):void 0},r.getWarners=function(){var e={};return Object.keys(r.fieldWarners).forEach((function(t){var n=r.fieldWarners[t]();n&&(e[t]=n)})),e},r.generateWarner=function(){var t=r.getWarners();return Object.keys(t).length?(0,O.default)(t,e):void 0},r.asyncValidate=function(e,t,a){var u,o,s=r.props,f=s.asyncBlurFields,l=s.asyncChangeFields,d=s.asyncErrors,c=s.asyncValidate,p=s.dispatch,v=s.initialized,m=s.pristine,y=s.shouldAsyncValidate,h=s.startAsyncValidation,g=s.stopAsyncValidation,_=s.syncErrors,S=s.values,E=!e;if(c){var R=E?S:i(S,e,t),A=E||!n(_,e);if(u=f&&e&&~f.indexOf(e.replace(/\[[0-9]+\]/g,"[]")),o=l&&e&&~l.indexOf(e.replace(/\[[0-9]+\]/g,"[]")),(E||!f&&!l||("blur"===a?u:o))&&y({asyncErrors:d,initialized:v,trigger:E?"submit":a,blurredField:e,pristine:m,syncValidationPasses:A}))return(0,b.default)((function(){return c(R,p,r.props,e)}),h,g,e)}},r.submitCompleted=function(e){return delete r.submitPromise,e},r.submitFailed=function(e){throw delete r.submitPromise,e},r.listenToSubmit=function(e){return(0,v.default)(e)?(r.submitPromise=e,e.then(r.submitCompleted,r.submitFailed)):e},r.submit=function(e){var t=r.props,n=t.onSubmit,i=t.blur,a=t.change,u=t.dispatch;return e&&!(0,F.default)(e)?(0,x.default)((function(){return!r.submitPromise&&r.listenToSubmit((0,T.default)(J(e),(0,o.default)({},r.props,{},(0,g.bindActionCreators)({blur:i,change:a},u)),r.props.validExceptSubmit,r.asyncValidate,r.getFieldList({excludeFieldArray:!0,excludeUnregistered:!0})))})):r.submitPromise?void 0:r.innerOnSubmit&&r.innerOnSubmit!==r.submit?r.innerOnSubmit():r.listenToSubmit((0,T.default)(J(n),(0,o.default)({},r.props,{},(0,g.bindActionCreators)({blur:i,change:a},u)),r.props.validExceptSubmit,r.asyncValidate,r.getFieldList({excludeFieldArray:!0,excludeUnregistered:!0})))},r.reset=function(){return r.props.reset()},r}(0,u.default)(a,t);var l=a.prototype;return l.initIfNeeded=function(e){var t=this.props.enableReinitialize;if(e){if((t||!e.initialized)&&!r(this.props.initialValues,e.initialValues)){var n=e.initialized&&this.props.keepDirtyOnReinitialize;this.props.initialize(e.initialValues,n,{keepValues:e.keepValues,lastInitialValues:this.props.initialValues,updateUnregisteredFields:e.updateUnregisteredFields})}}else!this.props.initialValues||this.props.initialized&&!t||this.props.initialize(this.props.initialValues,this.props.keepDirtyOnReinitialize,{keepValues:this.props.keepValues,updateUnregisteredFields:this.props.updateUnregisteredFields})},l.updateSyncErrorsIfNeeded=function(e,r,t){var n=this.props,i=n.error,a=n.updateSyncErrors,u=!(t&&Object.keys(t).length||i),o=!(e&&Object.keys(e).length||r);u&&o||I.default.deepEqual(t,e)&&I.default.deepEqual(i,r)||a(e,r)},l.clearSubmitPromiseIfNeeded=function(e){var r=this.props.submitting;this.submitPromise&&r&&!e.submitting&&delete this.submitPromise},l.submitIfNeeded=function(e){var r=this.props,t=r.clearSubmit;!r.triggerSubmit&&e.triggerSubmit&&(t(),this.submit())},l.shouldErrorFunction=function(){var e=this.props,r=e.shouldValidate,t=e.shouldError,n=r!==E.default,i=t!==R.default;return n&&!i?r:t},l.validateIfNeeded=function(r){var t=this.props,n=t.validate,i=t.values,a=this.shouldErrorFunction(),u=this.generateValidator();if(n||u){var o=void 0===r,l=Object.keys(this.getValidators());if(a({values:i,nextProps:r,props:this.props,initialRender:o,lastFieldValidatorKeys:this.lastFieldValidatorKeys,fieldValidatorKeys:l,structure:e})){var d=o||!r?this.props:r,c=(0,f.default)(n&&n(d.values,d)||{},u&&u(d.values,d)||{}),p=c._error,v=(0,s.default)(c,["_error"]);this.lastFieldValidatorKeys=l,this.updateSyncErrorsIfNeeded(v,p,d.syncErrors)}}else this.lastFieldValidatorKeys=[]},l.updateSyncWarningsIfNeeded=function(e,r,t){var n=this.props,i=n.warning,a=n.updateSyncWarnings,u=!(t&&Object.keys(t).length||i),o=!(e&&Object.keys(e).length||r);u&&o||I.default.deepEqual(t,e)&&I.default.deepEqual(i,r)||a(e,r)},l.shouldWarnFunction=function(){var e=this.props,r=e.shouldValidate,t=e.shouldWarn,n=r!==E.default,i=t!==A.default;return n&&!i?r:t},l.warnIfNeeded=function(r){var t=this.props,n=t.warn,i=t.values,a=this.shouldWarnFunction(),u=this.generateWarner();if(n||u){var o=void 0===r,l=Object.keys(this.getWarners());if(a({values:i,nextProps:r,props:this.props,initialRender:o,lastFieldValidatorKeys:this.lastFieldWarnerKeys,fieldValidatorKeys:l,structure:e})){var d=o||!r?this.props:r,c=(0,f.default)(n?n(d.values,d):{},u?u(d.values,d):{}),p=c._warning,v=(0,s.default)(c,["_warning"]);this.lastFieldWarnerKeys=l,this.updateSyncWarningsIfNeeded(v,p,d.syncWarnings)}}},l.UNSAFE_componentWillMount=function(){(0,C.default)()||(this.initIfNeeded(),this.validateIfNeeded(),this.warnIfNeeded()),(0,p.default)(this.props.shouldValidate,"shouldValidate() is deprecated and will be removed in v9.0.0. Use shouldWarn() or shouldError() instead.")},l.UNSAFE_componentWillReceiveProps=function(e){this.initIfNeeded(e),this.validateIfNeeded(e),this.warnIfNeeded(e),this.clearSubmitPromiseIfNeeded(e),this.submitIfNeeded(e);var t=e.onChange,n=e.values,i=e.dispatch;t&&!r(n,this.props.values)&&t(n,i,e,this.props.values)},l.shouldComponentUpdate=function(e){var t=this;if(!this.props.pure)return!0;var n=j.immutableProps,i=void 0===n?[]:n;return!!(this.props.children||e.children||Object.keys(e).some((function(n){return~i.indexOf(n)?t.props[n]!==e[n]:!~G.indexOf(n)&&!r(t.props[n],e[n])})))},l.componentDidMount=function(){(0,C.default)()||(this.initIfNeeded(this.props),this.validateIfNeeded(),this.warnIfNeeded()),(0,p.default)(this.props.shouldValidate,"shouldValidate() is deprecated and will be removed in v9.0.0. Use shouldWarn() or shouldError() instead.")},l.componentWillUnmount=function(){var e=this.props,r=e.destroyOnUnmount,t=e.destroy;r&&!(0,C.default)()&&(this.destroyed=!0,t())},l.render=function(){var e,r,t=this,i=this.props,a=i.anyTouched,u=i.array,f=(i.arrayInsert,i.arrayMove,i.arrayPop,i.arrayPush,i.arrayRemove,i.arrayRemoveAll,i.arrayShift,i.arraySplice,i.arraySwap,i.arrayUnshift,i.asyncErrors,i.asyncValidate,i.asyncValidating),l=i.blur,d=i.change,c=i.clearSubmit,p=i.destroy,v=(i.destroyOnUnmount,i.forceUnregisterOnUnmount,i.dirty),m=i.dispatch,h=(i.enableReinitialize,i.error),_=(i.focus,i.form),b=(i.getFormState,i.immutableProps,i.initialize),E=i.initialized,R=i.initialValues,A=i.invalid,F=(i.keepDirtyOnReinitialize,i.keepValues,i.updateUnregisteredFields,i.pristine),x=i.propNamespace,O=(i.registeredFields,i.registerField,i.reset),T=i.resetSection,w=(i.setSubmitFailed,i.setSubmitSucceeded,i.shouldAsyncValidate,i.shouldValidate,i.shouldError,i.shouldWarn,i.startAsyncValidation,i.startSubmit,i.stopAsyncValidation,i.stopSubmit,i.submitAsSideEffect),I=i.submitting,P=i.submitFailed,C=i.submitSucceeded,V=i.touch,U=(i.touchOnBlur,i.touchOnChange,i.persistentSubmitErrors,i.syncErrors,i.syncWarnings,i.unregisterField,i.untouch),N=(i.updateSyncErrors,i.updateSyncWarnings,i.valid),j=(i.validExceptSubmit,i.values,i.warning),D=(0,s.default)(i,["anyTouched","array","arrayInsert","arrayMove","arrayPop","arrayPush","arrayRemove","arrayRemoveAll","arrayShift","arraySplice","arraySwap","arrayUnshift","asyncErrors","asyncValidate","asyncValidating","blur","change","clearSubmit","destroy","destroyOnUnmount","forceUnregisterOnUnmount","dirty","dispatch","enableReinitialize","error","focus","form","getFormState","immutableProps","initialize","initialized","initialValues","invalid","keepDirtyOnReinitialize","keepValues","updateUnregisteredFields","pristine","propNamespace","registeredFields","registerField","reset","resetSection","setSubmitFailed","setSubmitSucceeded","shouldAsyncValidate","shouldValidate","shouldError","shouldWarn","startAsyncValidation","startSubmit","stopAsyncValidation","stopSubmit","submitAsSideEffect","submitting","submitFailed","submitSucceeded","touch","touchOnBlur","touchOnChange","persistentSubmitErrors","syncErrors","syncWarnings","unregisterField","untouch","updateSyncErrors","updateSyncWarnings","valid","validExceptSubmit","values","warning"]),q=(0,o.default)({array:u,anyTouched:a,asyncValidate:this.asyncValidate,asyncValidating:f},(0,g.bindActionCreators)({blur:l,change:d},m),{clearSubmit:c,destroy:p,dirty:v,dispatch:m,error:h,form:_,handleSubmit:this.submit,initialize:b,initialized:E,initialValues:R,invalid:A,pristine:F,reset:O,resetSection:T,submitting:I,submitAsSideEffect:w,submitFailed:P,submitSucceeded:C,touch:V,untouch:U,valid:N,warning:j}),k=(0,o.default)({},x?((e={})[x]=q,e):q,{},D);r=S,Boolean(r&&r.prototype&&"object"==typeof r.prototype.isReactComponent)&&(k.ref=this.wrapped);var W=(0,o.default)({},this.props,{getFormState:function(e){return n(t.props.getFormState(e),t.props.form)},asyncValidate:this.asyncValidate,getValues:this.getValues,sectionPrefix:void 0,register:this.register,unregister:this.unregister,registerInnerOnSubmit:function(e){return t.innerOnSubmit=e}});return(0,y.createElement)(M.ReduxFormContext.Provider,{value:W,children:(0,y.createElement)(S,k)})},a}(y.default.Component);w.displayName="Form("+(0,P.default)(S)+")",w.WrappedComponent=S,w.propTypes={destroyOnUnmount:m.default.bool,forceUnregisterOnUnmount:m.default.bool,form:m.default.string.isRequired,immutableProps:m.default.arrayOf(m.default.string),initialValues:m.default.oneOfType([m.default.array,m.default.object]),getFormState:m.default.func,onSubmitFail:m.default.func,onSubmitSuccess:m.default.func,propNamespace:m.default.string,validate:m.default.func,warn:m.default.func,touchOnBlur:m.default.bool,touchOnChange:m.default.bool,triggerSubmit:m.default.bool,persistentSubmitErrors:m.default.bool,registeredFields:m.default.any};var D=(0,h.connect)((function(e,i){var a=i.form,u=i.getFormState,o=i.initialValues,s=i.enableReinitialize,f=i.keepDirtyOnReinitialize,l=n(u(e)||t,a)||t,d=n(l,"initial"),c=!!d,p=s&&c&&!r(o,d),v=p&&!f,m=o||d||t;p||(m=d||t);var y=n(l,"values")||m;v&&(y=m);var h=v||r(m,y),g=n(l,"asyncErrors"),_=n(l,"syncErrors")||I.default.empty,b=n(l,"syncWarnings")||I.default.empty,S=n(l,"registeredFields"),E=N(a,u,!1)(e),R=N(a,u,!0)(e),A=!!n(l,"anyTouched"),F=!!n(l,"submitting"),x=!!n(l,"submitFailed"),O=!!n(l,"submitSucceeded"),T=n(l,"error"),w=n(l,"warning"),P=n(l,"triggerSubmit");return{anyTouched:A,asyncErrors:g,asyncValidating:n(l,"asyncValidating")||!1,dirty:!h,error:T,initialized:c,invalid:!E,pristine:h,registeredFields:S,submitting:F,submitFailed:x,submitSucceeded:O,syncErrors:_,syncWarnings:b,triggerSubmit:P,values:y,valid:E,validExceptSubmit:R,warning:w}}),(function(e,r){var t=function(e){return e.bind(null,r.form)},n=(0,l.default)($,t),i=(0,l.default)(K,t),a=t(H),u=(0,g.bindActionCreators)(n,e),s={insert:(0,g.bindActionCreators)(i.arrayInsert,e),move:(0,g.bindActionCreators)(i.arrayMove,e),pop:(0,g.bindActionCreators)(i.arrayPop,e),push:(0,g.bindActionCreators)(i.arrayPush,e),remove:(0,g.bindActionCreators)(i.arrayRemove,e),removeAll:(0,g.bindActionCreators)(i.arrayRemoveAll,e),shift:(0,g.bindActionCreators)(i.arrayShift,e),splice:(0,g.bindActionCreators)(i.arraySplice,e),swap:(0,g.bindActionCreators)(i.arraySwap,e),unshift:(0,g.bindActionCreators)(i.arrayUnshift,e)};return(0,o.default)({},u,{},i,{blur:function(e,t){return B(r.form,e,t,!!r.touchOnBlur)},change:function(e,t){return z(r.form,e,t,!!r.touchOnChange,!!r.persistentSubmitErrors)},array:s,focus:a,dispatch:e})}),void 0,{forwardRef:!0}),q=(0,c.default)(D(w),S);q.defaultProps=j;var k=function(e){function r(){for(var r,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(r=e.call.apply(e,[this].concat(n))||this).ref=y.default.createRef(),r}(0,u.default)(r,e);var n=r.prototype;return n.submit=function(){return this.ref.current&&this.ref.current.submit()},n.reset=function(){this.ref&&this.ref.current.reset()},n.render=function(){var e=this.props,r=e.initialValues,t=(0,s.default)(e,["initialValues"]);return(0,y.createElement)(q,(0,o.default)({},t,{ref:this.ref,initialValues:V(r)}))},(0,a.default)(r,[{key:"valid",get:function(){return!(!this.ref.current||!this.ref.current.isValid())}},{key:"invalid",get:function(){return!this.valid}},{key:"pristine",get:function(){return!(!this.ref.current||!this.ref.current.isPristine())}},{key:"dirty",get:function(){return!this.pristine}},{key:"values",get:function(){return this.ref.current?this.ref.current.getValues():t}},{key:"fieldList",get:function(){return this.ref.current?this.ref.current.getFieldList():[]}},{key:"wrappedInstance",get:function(){return this.ref.current&&this.ref.current.wrapped.current}}]),r}(y.default.Component);(0,d.polyfill)(k);var W=(0,c.default)((0,M.withReduxForm)(k),S);return W.defaultProps=j,W}}};r.default=Z},function(e,r,t){var n=t(162),i=t(177)((function(e,r,t){n(e,r,t)}));e.exports=i},function(e,r,t){var n=t(44),i=t(54),a=t(47),u=t(163),o=t(20),s=t(59),f=t(58);e.exports=function e(r,t,l,d,c){r!==t&&a(t,(function(a,s){if(c||(c=new n),o(a))u(r,t,s,l,e,d,c);else{var p=d?d(f(r,s),a,s+"",r,t,c):void 0;void 0===p&&(p=a),i(r,s,p)}}),s)}},function(e,r,t){var n=t(54),i=t(164),a=t(167),u=t(41),o=t(170),s=t(49),f=t(15),l=t(172),d=t(24),c=t(28),p=t(20),v=t(173),m=t(25),y=t(58),h=t(174);e.exports=function(e,r,t,g,_,b,S){var E=y(e,t),R=y(r,t),A=S.get(R);if(A)n(e,t,A);else{var F=b?b(E,R,t+"",e,r,S):void 0,x=void 0===F;if(x){var O=f(R),T=!O&&d(R),w=!O&&!T&&m(R);F=R,O||T||w?f(E)?F=E:l(E)?F=u(E):T?(x=!1,F=i(R,!0)):w?(x=!1,F=a(R,!0)):F=[]:v(R)||s(R)?(F=E,s(E)?F=h(E):p(E)&&!c(E)||(F=o(R))):x=!1}x&&(S.set(R,F),_(F,R,g,b,S),S.delete(R)),n(e,t,F)}}},function(e,r,t){(function(e){var n=t(56),i=r&&!r.nodeType&&r,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,u=a&&a.exports===i?n.Buffer:void 0,o=u?u.allocUnsafe:void 0;e.exports=function(e,r){if(r)return e.slice();var t=e.length,n=o?o(t):new e.constructor(t);return e.copy(n),n}}).call(this,t(55)(e))},function(e,r,t){(function(r){var t="object"==typeof r&&r&&r.Object===Object&&r;e.exports=t}).call(this,t(166))},function(e,r){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(e){"object"==typeof window&&(t=window)}e.exports=t},function(e,r,t){var n=t(168);e.exports=function(e,r){var t=r?n(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}},function(e,r,t){var n=t(169);e.exports=function(e){var r=new e.constructor(e.byteLength);return new n(r).set(new n(e)),r}},function(e,r,t){var n=t(56).Uint8Array;e.exports=n},function(e,r,t){var n=t(171),i=t(57),a=t(52);e.exports=function(e){return"function"!=typeof e.constructor||a(e)?{}:n(i(e))}},function(e,r,t){var n=t(20),i=Object.create,a=function(){function e(){}return function(r){if(!n(r))return{};if(i)return i(r);e.prototype=r;var t=new e;return e.prototype=void 0,t}}();e.exports=a},function(e,r,t){var n=t(50),i=t(26);e.exports=function(e){return i(e)&&n(e)}},function(e,r,t){var n=t(51),i=t(57),a=t(26),u=Function.prototype,o=Object.prototype,s=u.toString,f=o.hasOwnProperty,l=s.call(Object);e.exports=function(e){if(!a(e)||"[object Object]"!=n(e))return!1;var r=i(e);if(null===r)return!0;var t=f.call(r,"constructor")&&r.constructor;return"function"==typeof t&&t instanceof t&&s.call(t)==l}},function(e,r,t){var n=t(175),i=t(59);e.exports=function(e){return n(e,i(e))}},function(e,r,t){var n=t(176),i=t(19);e.exports=function(e,r,t,a){var u=!t;t||(t={});for(var o=-1,s=r.length;++o<s;){var f=r[o],l=a?a(t[f],e[f],f,t,e):void 0;void 0===l&&(l=e[f]),u?i(t,f,l):n(t,f,l)}return t}},function(e,r,t){var n=t(19),i=t(23),a=Object.prototype.hasOwnProperty;e.exports=function(e,r,t){var u=e[r];a.call(e,r)&&i(u,t)&&(void 0!==t||r in e)||n(e,r,t)}},function(e,r,t){var n=t(178),i=t(183);e.exports=function(e){return n((function(r,t){var n=-1,a=t.length,u=a>1?t[a-1]:void 0,o=a>2?t[2]:void 0;for(u=e.length>3&&"function"==typeof u?(a--,u):void 0,o&&i(t[0],t[1],o)&&(u=a<3?void 0:u,a=1),r=Object(r);++n<a;){var s=t[n];s&&e(r,s,n,u)}return r}))}},function(e,r,t){var n=t(179),i=t(180),a=t(182);e.exports=function(e,r){return a(i(e,r,n),e+"")}},function(e,r){e.exports=function(e){return e}},function(e,r,t){var n=t(181),i=Math.max;e.exports=function(e,r,t){return r=i(void 0===r?e.length-1:r,0),function(){for(var a=arguments,u=-1,o=i(a.length-r,0),s=Array(o);++u<o;)s[u]=a[r+u];u=-1;for(var f=Array(r+1);++u<r;)f[u]=a[u];return f[r]=t(s),n(e,this,f)}}},function(e,r){e.exports=function(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}},function(e,r){e.exports=function(e){return e}},function(e,r){e.exports=function(){return!1}},function(e,r,t){"use strict";var n=t(36),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},u={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function s(e){return n.isMemo(e)?u:o[e.$$typeof]||i}o[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[n.Memo]=u;var f=Object.defineProperty,l=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,v=Object.prototype;e.exports=function e(r,t,n){if("string"!=typeof t){if(v){var i=p(t);i&&i!==v&&e(r,i,n)}var u=l(t);d&&(u=u.concat(d(t)));for(var o=s(r),m=s(t),y=0;y<u.length;++y){var h=u[y];if(!(a[h]||n&&n[h]||m&&m[h]||o&&o[h])){var g=c(t,h);try{f(r,h,g)}catch(e){}}}}return r}},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(30)),a=function(e,r,t,n){r(n);var a=e();if(!(0,i.default)(a))throw new Error("asyncValidate function passed to reduxForm must return a promise");var u=function(e){return function(r){if(e){if(r&&Object.keys(r).length)return t(r),r;throw t(),new Error("Asynchronous validation promise was rejected without errors.")}return t(),Promise.resolve()}};return a.then(u(!1),u(!0))};r.default=a},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(60)),a=function(e){return function(r){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];return(0,i.default)(r)?e.apply(void 0,n):e.apply(void 0,[r].concat(n))}};r.default=a},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(1)),a=function(e,r,t,n,i){for(var a=function(e){return Array.isArray(e)?e:[e]}(n),u=0;u<a.length;u++){var o=a[u](e,r,t,i);if(o)return o}},u=function(e,r){var t=r.getIn;return function(r,n){var u={};return Object.keys(e).forEach((function(o){var s=t(r,o),f=a(s,r,n,e[o],o);f&&(u=i.default.setIn(u,o,f))})),u}};r.default=u},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(2)),a=n(t(30)),u=n(t(37)),o=function(e){return e&&e.name===u.default.name},s=function(e,r,t){var n,i=t.dispatch,u=t.submitAsSideEffect,s=t.onSubmitFail,f=t.onSubmitSuccess,l=t.startSubmit,d=t.stopSubmit,c=t.setSubmitFailed,p=t.setSubmitSucceeded,v=t.values;try{n=e(v,i,t)}catch(e){var m=o(e)?e.errors:void 0;if(d(m),c.apply(void 0,r),s&&s(m,i,e,t),m||s)return m;throw e}if(u)n&&i(n);else{if((0,a.default)(n))return l(),n.then((function(e){return d(),p(),f&&f(e,i,t),e}),(function(e){var n=o(e)?e.errors:void 0;if(d(n),c.apply(void 0,r),s&&s(n,i,e,t),n||s)return n;throw e}));p(),f&&f(n,i,t)}return n},f=function(e,r,t,n,a){var u=r.dispatch,o=r.onSubmitFail,f=r.setSubmitFailed,l=r.syncErrors,d=r.asyncErrors,c=r.touch,p=r.persistentSubmitErrors;if(c.apply(void 0,a),t||p){var v=n&&n();return v?v.then((function(t){if(t)throw t;return s(e,a,r)})).catch((function(e){return f.apply(void 0,a),o&&o(e,u,null,r),Promise.reject(e)})):s(e,a,r)}f.apply(void 0,a);var m=function(e){var r=e.asyncErrors,t=e.syncErrors;return r&&"function"==typeof r.merge?r.merge(t).toJS():(0,i.default)({},r,{},t)}({asyncErrors:d,syncErrors:l});return o&&o(m,u,null,r),m};r.default=f},function(e,r,t){"use strict";r.__esModule=!0,r.default=void 0;var n=function(e){return e.displayName||e.name||"Component"};r.default=n},function(e,r,t){"use strict";(function(e){r.__esModule=!0,r.default=void 0;var t=function(){var r=e;return!(void 0===r||!r.hot||"function"!=typeof r.hot.status||"apply"!==r.hot.status())};r.default=t}).call(this,t(55)(e))},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(192)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(5)),a=n(t(28)),u=t(21),o=n(t(193)),s=n(t(1)),f=function(e){var r=e.getIn;return function(e,t){var n=null;/^values/.test(t)&&(n=t.replace("values","initial"));var i=!n||void 0===r(e,n);return void 0!==r(e,t)&&i}};var l=function(e){var r,t=e.deepEqual,n=e.empty,l=e.forEach,d=e.getIn,c=e.setIn,p=e.deleteIn,v=e.fromJS,m=e.keys,y=e.size,h=e.some,g=e.splice,_=(0,o.default)(e)(f),b=(0,o.default)(s.default)(f),S=function(e,r,t,n,i,a,u){var o=d(e,r+"."+t);return o||u?c(e,r+"."+t,g(o,n,i,a)):e},E=function(e,r,t,n,i,a,u){var o=d(e,r),f=s.default.getIn(o,t);return f||u?c(e,r,s.default.setIn(o,t,s.default.splice(f,n,i,a))):e},R=["values","fields","submitErrors","asyncErrors"],A=function(e,r,t,i,a){var u=e,o=null!=a?n:void 0;return u=S(u,"values",r,t,i,a,!0),u=S(u,"fields",r,t,i,o),u=E(u,"syncErrors",r,t,i,void 0),u=E(u,"syncWarnings",r,t,i,void 0),u=S(u,"submitErrors",r,t,i,void 0),u=S(u,"asyncErrors",r,t,i,void 0)},F=((r={})[u.ARRAY_INSERT]=function(e,r){var t=r.meta,n=t.field,i=t.index,a=r.payload;return A(e,n,i,0,a)},r[u.ARRAY_MOVE]=function(e,r){var t=r.meta,n=t.field,i=t.from,a=t.to,u=d(e,"values."+n),o=u?y(u):0,s=e;return o&&R.forEach((function(e){var r=e+"."+n;if(d(s,r)){var t=d(s,r+"["+i+"]");s=c(s,r,g(d(s,r),i,1)),s=c(s,r,g(d(s,r),a,0,t))}})),s},r[u.ARRAY_POP]=function(e,r){var t=r.meta.field,n=d(e,"values."+t),i=n?y(n):0;return i?A(e,t,i-1,1):e},r[u.ARRAY_PUSH]=function(e,r){var t=r.meta.field,n=r.payload,i=d(e,"values."+t),a=i?y(i):0;return A(e,t,a,0,n)},r[u.ARRAY_REMOVE]=function(e,r){var t=r.meta,n=t.field,i=t.index;return A(e,n,i,1)},r[u.ARRAY_REMOVE_ALL]=function(e,r){var t=r.meta.field,n=d(e,"values."+t),i=n?y(n):0;return i?A(e,t,0,i):e},r[u.ARRAY_SHIFT]=function(e,r){var t=r.meta.field;return A(e,t,0,1)},r[u.ARRAY_SPLICE]=function(e,r){var t=r.meta,n=t.field,i=t.index,a=t.removeNum,u=r.payload;return A(e,n,i,a,u)},r[u.ARRAY_SWAP]=function(e,r){var t=r.meta,n=t.field,i=t.indexA,a=t.indexB,u=e;return R.forEach((function(e){var r=d(u,e+"."+n+"["+i+"]"),t=d(u,e+"."+n+"["+a+"]");void 0===r&&void 0===t||(u=c(u,e+"."+n+"["+i+"]",t),u=c(u,e+"."+n+"["+a+"]",r))})),u},r[u.ARRAY_UNSHIFT]=function(e,r){var t=r.meta.field,n=r.payload;return A(e,t,0,0,n)},r[u.AUTOFILL]=function(e,r){var t=r.meta.field,n=r.payload,i=e;return i=_(i,"asyncErrors."+t),i=_(i,"submitErrors."+t),i=c(i,"fields."+t+".autofilled",!0),i=c(i,"values."+t,n)},r[u.BLUR]=function(e,r){var t=r.meta,n=t.field,i=t.touch,a=r.payload,u=e;return void 0===d(u,"initial."+n)&&""===a?u=_(u,"values."+n):void 0!==a&&(u=c(u,"values."+n,a)),n===d(u,"active")&&(u=p(u,"active")),u=p(u,"fields."+n+".active"),i&&(u=c(u,"fields."+n+".touched",!0),u=c(u,"anyTouched",!0)),u},r[u.CHANGE]=function(e,r){var t=r.meta,n=t.field,i=t.touch,u=t.persistentSubmitErrors,o=r.payload,s=e;if(void 0===d(s,"initial."+n)&&""===o||void 0===o)s=_(s,"values."+n);else if((0,a.default)(o)){var f=d(e,"values."+n);s=c(s,"values."+n,o(f,e.values))}else s=c(s,"values."+n,o);return s=_(s,"asyncErrors."+n),u||(s=_(s,"submitErrors."+n)),s=_(s,"fields."+n+".autofilled"),i&&(s=c(s,"fields."+n+".touched",!0),s=c(s,"anyTouched",!0)),s},r[u.CLEAR_SUBMIT]=function(e){return p(e,"triggerSubmit")},r[u.CLEAR_SUBMIT_ERRORS]=function(e){var r=e;return r=_(r,"submitErrors"),r=p(r,"error")},r[u.CLEAR_ASYNC_ERROR]=function(e,r){var t=r.meta.field;return p(e,"asyncErrors."+t)},r[u.CLEAR_FIELDS]=function(e,r){var t=r.meta,n=t.keepTouched,i=t.persistentSubmitErrors,a=t.fields,u=e;a.forEach((function(r){u=_(u,"asyncErrors."+r),i||(u=_(u,"submitErrors."+r)),u=_(u,"fields."+r+".autofilled"),n||(u=p(u,"fields."+r+".touched"));var t=d(e,"initial."+r);u=t?c(u,"values."+r,t):_(u,"values."+r)}));var o=h(m(d(u,"registeredFields")),(function(e){return d(u,"fields."+e+".touched")}));return u=o?c(u,"anyTouched",!0):p(u,"anyTouched")},r[u.FOCUS]=function(e,r){var t=r.meta.field,n=e,i=d(e,"active");return n=p(n,"fields."+i+".active"),n=c(n,"fields."+t+".visited",!0),n=c(n,"fields."+t+".active",!0),n=c(n,"active",t)},r[u.INITIALIZE]=function(e,r){var i=r.payload,a=r.meta,u=a.keepDirty,o=a.keepSubmitSucceeded,s=a.updateUnregisteredFields,f=a.keepValues,p=v(i),y=n,h=d(e,"warning");h&&(y=c(y,"warning",h));var g=d(e,"syncWarnings");g&&(y=c(y,"syncWarnings",g));var _=d(e,"error");_&&(y=c(y,"error",_));var b=d(e,"syncErrors");b&&(y=c(y,"syncErrors",b));var S=d(e,"registeredFields");S&&(y=c(y,"registeredFields",S));var E=d(e,"values"),R=d(e,"initial"),A=p,F=E;if(u&&S){if(!t(A,R)){var x=function(e){var r=d(R,e),n=d(E,e);if(t(n,r)){var i=d(A,e);d(F,e)!==i&&(F=c(F,e,i))}};s||l(m(S),(function(e){return x(e)})),l(m(A),(function(e){if(void 0===d(R,e)){var r=d(A,e);F=c(F,e,r)}s&&x(e)}))}}else F=A;return f&&(l(m(E),(function(e){var r=d(E,e);F=c(F,e,r)})),l(m(R),(function(e){var r=d(R,e);A=c(A,e,r)}))),o&&d(e,"submitSucceeded")&&(y=c(y,"submitSucceeded",!0)),y=c(y,"values",F),y=c(y,"initial",A)},r[u.REGISTER_FIELD]=function(e,r){var t=r.payload,n=t.name,i=t.type,a="registeredFields['"+n+"']",u=d(e,a);if(u){var o=d(u,"count")+1;u=c(u,"count",o)}else u=v({name:n,type:i,count:1});return c(e,a,u)},r[u.RESET]=function(e){var r=n,t=d(e,"registeredFields");t&&(r=c(r,"registeredFields",t));var i=d(e,"initial");return i&&(r=c(r,"values",i),r=c(r,"initial",i)),r},r[u.RESET_SECTION]=function(e,r){var t=r.meta.sections,n=e;t.forEach((function(r){n=_(n,"asyncErrors."+r),n=_(n,"submitErrors."+r),n=_(n,"fields."+r);var t=d(e,"initial."+r);n=t?c(n,"values."+r,t):_(n,"values."+r)}));var i=h(m(d(n,"registeredFields")),(function(e){return d(n,"fields."+e+".touched")}));return n=i?c(n,"anyTouched",!0):p(n,"anyTouched")},r[u.SUBMIT]=function(e){return c(e,"triggerSubmit",!0)},r[u.START_ASYNC_VALIDATION]=function(e,r){var t=r.meta.field;return c(e,"asyncValidating",t||!0)},r[u.START_SUBMIT]=function(e){return c(e,"submitting",!0)},r[u.STOP_ASYNC_VALIDATION]=function(e,r){var t=r.payload,n=e;if(n=p(n,"asyncValidating"),t&&Object.keys(t).length){var a=t._error,u=(0,i.default)(t,["_error"]);a&&(n=c(n,"error",a)),Object.keys(u).length&&(n=c(n,"asyncErrors",v(u)))}else n=p(n,"error"),n=p(n,"asyncErrors");return n},r[u.STOP_SUBMIT]=function(e,r){var t=r.payload,n=e;if(n=p(n,"submitting"),n=p(n,"submitFailed"),n=p(n,"submitSucceeded"),t&&Object.keys(t).length){var a=t._error,u=(0,i.default)(t,["_error"]);n=a?c(n,"error",a):p(n,"error"),n=Object.keys(u).length?c(n,"submitErrors",v(u)):p(n,"submitErrors"),n=c(n,"submitFailed",!0)}else n=p(n,"error"),n=p(n,"submitErrors");return n},r[u.SET_SUBMIT_FAILED]=function(e,r){var t=r.meta.fields,n=e;return n=c(n,"submitFailed",!0),n=p(n,"submitSucceeded"),n=p(n,"submitting"),t.forEach((function(e){return n=c(n,"fields."+e+".touched",!0)})),t.length&&(n=c(n,"anyTouched",!0)),n},r[u.SET_SUBMIT_SUCCEEDED]=function(e){var r=e;return r=p(r,"submitFailed"),r=c(r,"submitSucceeded",!0)},r[u.TOUCH]=function(e,r){var t=r.meta.fields,n=e;return t.forEach((function(e){return n=c(n,"fields."+e+".touched",!0)})),n=c(n,"anyTouched",!0)},r[u.UNREGISTER_FIELD]=function(e,r){var i=r.payload,a=i.name,u=i.destroyOnUnmount,o=e,f="registeredFields['"+a+"']",l=d(o,f);if(!l)return o;var v=d(l,"count")-1;if(v<=0&&u){o=p(o,f),t(d(o,"registeredFields"),n)&&(o=p(o,"registeredFields"));var m=d(o,"syncErrors");m&&(m=b(m,a),o=s.default.deepEqual(m,s.default.empty)?p(o,"syncErrors"):c(o,"syncErrors",m));var y=d(o,"syncWarnings");y&&(y=b(y,a),o=s.default.deepEqual(y,s.default.empty)?p(o,"syncWarnings"):c(o,"syncWarnings",y)),o=_(o,"submitErrors."+a),o=_(o,"asyncErrors."+a)}else l=c(l,"count",v),o=c(o,f,l);return o},r[u.UNTOUCH]=function(e,r){var t=r.meta.fields,n=e;t.forEach((function(e){return n=p(n,"fields."+e+".touched")}));var i=h(m(d(n,"registeredFields")),(function(e){return d(n,"fields."+e+".touched")}));return n=i?c(n,"anyTouched",!0):p(n,"anyTouched")},r[u.UPDATE_SYNC_ERRORS]=function(e,r){var t=r.payload,n=t.syncErrors,i=t.error,a=e;return i?(a=c(a,"error",i),a=c(a,"syncError",!0)):(a=p(a,"error"),a=p(a,"syncError")),a=Object.keys(n).length?c(a,"syncErrors",n):p(a,"syncErrors")},r[u.UPDATE_SYNC_WARNINGS]=function(e,r){var t=r.payload,n=t.syncWarnings,i=t.warning,a=e;return a=i?c(a,"warning",i):p(a,"warning"),a=Object.keys(n).length?c(a,"syncWarnings",n):p(a,"syncWarnings")},r);return function e(r){return r.plugin=function(r,t){var i=this;return void 0===t&&(t={}),e((function(e,a){void 0===e&&(e=n),void 0===a&&(a={type:"NONE"});var u=function(t,n){var i=d(t,n),u=r[n](i,a,d(e,n));return u!==i?c(t,n,u):t},o=i(e,a),s=a&&a.meta&&a.meta.form;return s&&!t.receiveAllFormActions?r[s]?u(o,s):o:Object.keys(r).reduce(u,o)}))},r}(function(e){return function(r,t){void 0===r&&(r=n),void 0===t&&(t={type:"NONE"});var i=t&&t.meta&&t.meta.form;if(!i||!function(e){return e&&e.type&&e.type.length>u.prefix.length&&e.type.substring(0,u.prefix.length)===u.prefix}(t))return r;if(t.type===u.DESTROY&&t.meta&&t.meta.form)return t.meta.form.reduce((function(e,r){return _(e,r)}),r);var a=d(r,i),o=e(a,t);return o===a?r:c(r,i,o)}}((function(e,r){void 0===e&&(e=n);var t=F[r.type];return t?t(e,r):e})))};r.default=l},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(16));var a=function(e){var r=function(e){return function(r,t){return void 0!==e.getIn(r,t)}},t=e.deepEqual,n=e.empty,a=e.getIn,u=e.deleteIn,o=e.setIn;return function(s){void 0===s&&(s=r);return function r(f,l){if("]"===l[l.length-1]){var d=(0,i.default)(l);return d.pop(),a(f,d.join("."))?o(f,l):f}var c=f;s(e)(f,l)&&(c=u(f,l));var p=l.lastIndexOf(".");if(p>0){var v=l.substring(0,p);if("]"!==v[v.length-1]){var m=a(c,v);if(t(m,n))return r(c,v)}}return c}}};r.default=a},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(195)),a=n(t(1)),u=(0,i.default)(a.default);r.default=u},function(e,r,t){"use strict";var n=t(0);r.__esModule=!0,r.default=void 0;var i=n(t(2)),a=t(10),u=function(e){var r=e.getIn;return function(e){var t=(0,i.default)({prop:"values",getFormState:function(e){return r(e,"form")}},e),n=t.form,u=t.prop,o=t.getFormState;return(0,a.connect)((function(e){var t;return(t={})[u]=r(o(e),n+".values"),t}))}};r.default=u}])}));
node_modules/reactify/node_modules/react-tools/src/core/__tests__/ReactComponentLifeCycle-test.js
chi-sea-lions-2015/house-rules-frontend2
/** * Copyright 2013-2014, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @emails react-core */ "use strict"; var React; var ReactTestUtils; var ReactComponent; var ReactCompositeComponent; var ComponentLifeCycle; var CompositeComponentLifeCycle; var clone = function(o) { return JSON.parse(JSON.stringify(o)); }; var GET_INIT_STATE_RETURN_VAL = { hasWillMountCompleted: false, hasRenderCompleted: false, hasDidMountCompleted: false, hasWillUnmountCompleted: false }; var INIT_RENDER_STATE = { hasWillMountCompleted: true, hasRenderCompleted: false, hasDidMountCompleted: false, hasWillUnmountCompleted: false }; var DID_MOUNT_STATE = { hasWillMountCompleted: true, hasRenderCompleted: true, hasDidMountCompleted: false, hasWillUnmountCompleted: false }; var NEXT_RENDER_STATE = { hasWillMountCompleted: true, hasRenderCompleted: true, hasDidMountCompleted: true, hasWillUnmountCompleted: false }; var WILL_UNMOUNT_STATE = { hasWillMountCompleted: true, hasDidMountCompleted: true, hasRenderCompleted: true, hasWillUnmountCompleted: false }; var POST_WILL_UNMOUNT_STATE = { hasWillMountCompleted: true, hasDidMountCompleted: true, hasRenderCompleted: true, hasWillUnmountCompleted: true }; /** * TODO: We should make any setState calls fail in * `getInitialState` and `componentWillMount`. They will usually fail * anyways because `this._renderedComponent` is empty, however, if a component * is *reused*, then that won't be the case and things will appear to work in * some cases. Better to just block all updates in initialization. */ describe('ReactComponentLifeCycle', function() { beforeEach(function() { require('mock-modules').dumpCache(); React = require('React'); ReactTestUtils = require('ReactTestUtils'); ReactComponent = require('ReactComponent'); ReactCompositeComponent = require('ReactCompositeComponent'); ComponentLifeCycle = ReactComponent.LifeCycle; CompositeComponentLifeCycle = ReactCompositeComponent.LifeCycle; }); it('should not reuse an instance when it has been unmounted', function() { var container = document.createElement('div'); var StatefulComponent = React.createClass({ getInitialState: function() { return { }; }, render: function() { return ( <div></div> ); } }); var element = <StatefulComponent />; var firstInstance = React.render(element, container); React.unmountComponentAtNode(container); var secondInstance = React.render(element, container); expect(firstInstance).not.toBe(secondInstance); }); /** * If a state update triggers rerendering that in turn fires an onDOMReady, * that second onDOMReady should not fail. */ it('it should fire onDOMReady when already in onDOMReady', function() { var _testJournal = []; var Child = React.createClass({ componentDidMount: function() { _testJournal.push('Child:onDOMReady'); }, render: function() { return <div></div>; } }); var SwitcherParent = React.createClass({ getInitialState: function() { _testJournal.push('SwitcherParent:getInitialState'); return {showHasOnDOMReadyComponent: false}; }, componentDidMount: function() { _testJournal.push('SwitcherParent:onDOMReady'); this.switchIt(); }, switchIt: function() { this.setState({showHasOnDOMReadyComponent: true}); }, render: function() { return ( <div>{ this.state.showHasOnDOMReadyComponent ? <Child /> : <div> </div> }</div> ); } }); var instance = <SwitcherParent />; instance = ReactTestUtils.renderIntoDocument(instance); expect(_testJournal).toEqual([ 'SwitcherParent:getInitialState', 'SwitcherParent:onDOMReady', 'Child:onDOMReady' ]); }); // You could assign state here, but not access members of it, unless you // had provided a getInitialState method. it('throws when accessing state in componentWillMount', function() { var StatefulComponent = React.createClass({ componentWillMount: function() { this.state.yada; }, render: function() { return ( <div></div> ); } }); var instance = <StatefulComponent />; expect(function() { instance = ReactTestUtils.renderIntoDocument(instance); }).toThrow(); }); it('should allow update state inside of componentWillMount', function() { var StatefulComponent = React.createClass({ componentWillMount: function() { this.setState({stateField: 'something'}); }, render: function() { return ( <div></div> ); } }); var instance = <StatefulComponent />; expect(function() { instance = ReactTestUtils.renderIntoDocument(instance); }).not.toThrow(); }); it('should allow update state inside of getInitialState', function() { var StatefulComponent = React.createClass({ getInitialState: function() { this.setState({stateField: 'something'}); return {stateField: 'somethingelse'}; }, render: function() { return ( <div></div> ); } }); var instance = <StatefulComponent />; expect(function() { instance = ReactTestUtils.renderIntoDocument(instance); }).not.toThrow(); // The return value of getInitialState overrides anything from setState expect(instance.state.stateField).toEqual('somethingelse'); }); it('should carry through each of the phases of setup', function() { var LifeCycleComponent = React.createClass({ getInitialState: function() { this._testJournal = {}; var initState = { hasWillMountCompleted: false, hasDidMountCompleted: false, hasRenderCompleted: false, hasWillUnmountCompleted: false }; this._testJournal.returnedFromGetInitialState = clone(initState); this._testJournal.lifeCycleAtStartOfGetInitialState = this._lifeCycleState; this._testJournal.compositeLifeCycleAtStartOfGetInitialState = this._compositeLifeCycleState; return initState; }, componentWillMount: function() { this._testJournal.stateAtStartOfWillMount = clone(this.state); this._testJournal.lifeCycleAtStartOfWillMount = this._lifeCycleState; this._testJournal.compositeLifeCycleAtStartOfWillMount = this._compositeLifeCycleState; this.state.hasWillMountCompleted = true; }, componentDidMount: function() { this._testJournal.stateAtStartOfDidMount = clone(this.state); this._testJournal.lifeCycleAtStartOfDidMount = this._lifeCycleState; this.setState({hasDidMountCompleted: true}); }, render: function() { var isInitialRender = !this.state.hasRenderCompleted; if (isInitialRender) { this._testJournal.stateInInitialRender = clone(this.state); this._testJournal.lifeCycleInInitialRender = this._lifeCycleState; this._testJournal.compositeLifeCycleInInitialRender = this._compositeLifeCycleState; } else { this._testJournal.stateInLaterRender = clone(this.state); this._testJournal.lifeCycleInLaterRender = this._lifeCycleState; } // you would *NEVER* do anything like this in real code! this.state.hasRenderCompleted = true; return ( <div ref="theDiv"> I am the inner DIV </div> ); }, componentWillUnmount: function() { this._testJournal.stateAtStartOfWillUnmount = clone(this.state); this._testJournal.lifeCycleAtStartOfWillUnmount = this._lifeCycleState; this.state.hasWillUnmountCompleted = true; } }); // A component that is merely "constructed" (as in "constructor") but not // yet initialized, or rendered. // var instance = ReactTestUtils.renderIntoDocument(<LifeCycleComponent />); // getInitialState expect(instance._testJournal.returnedFromGetInitialState).toEqual( GET_INIT_STATE_RETURN_VAL ); expect(instance._testJournal.lifeCycleAtStartOfGetInitialState) .toBe(ComponentLifeCycle.MOUNTED); expect(instance._testJournal.compositeLifeCycleAtStartOfGetInitialState) .toBe(CompositeComponentLifeCycle.MOUNTING); // componentWillMount expect(instance._testJournal.stateAtStartOfWillMount).toEqual( instance._testJournal.returnedFromGetInitialState ); expect(instance._testJournal.lifeCycleAtStartOfWillMount) .toBe(ComponentLifeCycle.MOUNTED); expect(instance._testJournal.compositeLifeCycleAtStartOfWillMount) .toBe(CompositeComponentLifeCycle.MOUNTING); // componentDidMount expect(instance._testJournal.stateAtStartOfDidMount) .toEqual(DID_MOUNT_STATE); expect(instance._testJournal.lifeCycleAtStartOfDidMount).toBe( ComponentLifeCycle.MOUNTED ); // render expect(instance._testJournal.stateInInitialRender) .toEqual(INIT_RENDER_STATE); expect(instance._testJournal.lifeCycleInInitialRender).toBe( ComponentLifeCycle.MOUNTED ); expect(instance._testJournal.compositeLifeCycleInInitialRender).toBe( CompositeComponentLifeCycle.MOUNTING ); expect(instance._lifeCycleState).toBe(ComponentLifeCycle.MOUNTED); // Now *update the component* instance.forceUpdate(); // render 2nd time expect(instance._testJournal.stateInLaterRender) .toEqual(NEXT_RENDER_STATE); expect(instance._testJournal.lifeCycleInLaterRender).toBe( ComponentLifeCycle.MOUNTED ); expect(instance._lifeCycleState).toBe(ComponentLifeCycle.MOUNTED); // Now *unmountComponent* instance.unmountComponent(); expect(instance._testJournal.stateAtStartOfWillUnmount) .toEqual(WILL_UNMOUNT_STATE); // componentWillUnmount called right before unmount. expect(instance._testJournal.lifeCycleAtStartOfWillUnmount).toBe( ComponentLifeCycle.MOUNTED ); // But the current lifecycle of the component is unmounted. expect(instance._lifeCycleState).toBe(ComponentLifeCycle.UNMOUNTED); expect(instance.state).toEqual(POST_WILL_UNMOUNT_STATE); }); it('should throw when calling setProps() on an owned component', function() { /** * calls setProps in an componentDidMount. */ var PropsUpdaterInOnDOMReady = React.createClass({ componentDidMount: function() { this.refs.theSimpleComponent.setProps({ valueToUseInitially: this.props.valueToUseInOnDOMReady }); }, render: function() { return ( <div className={this.props.valueToUseInitially} ref="theSimpleComponent" /> ); } }); var instance = <PropsUpdaterInOnDOMReady valueToUseInitially="hello" valueToUseInOnDOMReady="goodbye" />; expect(function() { instance = ReactTestUtils.renderIntoDocument(instance); }).toThrow( 'Invariant Violation: replaceProps(...): You called `setProps` or ' + '`replaceProps` on a component with a parent. This is an anti-pattern ' + 'since props will get reactively updated when rendered. Instead, ' + 'change the owner\'s `render` method to pass the correct value as ' + 'props to the component where it is created.' ); }); it('should not throw when updating an auxiliary component', function() { var Tooltip = React.createClass({ render: function() { return <div>{this.props.children}</div>; }, componentDidMount: function() { this.container = document.createElement('div'); this.updateTooltip(); }, componentDidUpdate: function() { this.updateTooltip(); }, updateTooltip: function() { // Even though this.props.tooltip has an owner, updating it shouldn't // throw here because it's mounted as a root component React.render(this.props.tooltip, this.container); } }); var Component = React.createClass({ render: function() { return ( <Tooltip ref="tooltip" tooltip={<div>{this.props.tooltipText}</div>}> {this.props.text} </Tooltip> ); } }); var container = document.createElement('div'); var instance = React.render( <Component text="uno" tooltipText="one" />, container ); // Since `instance` is a root component, we can set its props. This also // makes Tooltip rerender the tooltip component, which shouldn't throw. instance.setProps({text: "dos", tooltipText: "two"}); }); it('should not allow setProps() called on an unmounted element', function() { var PropsToUpdate = React.createClass({ render: function() { return <div className={this.props.value} ref="theSimpleComponent" />; } }); var instance = <PropsToUpdate value="hello" />; expect(instance.setProps).not.toBeDefined(); }); it('should allow state updates in componentDidMount', function() { /** * calls setState in an componentDidMount. */ var SetStateInComponentDidMount = React.createClass({ getInitialState: function() { return { stateField: this.props.valueToUseInitially }; }, componentDidMount: function() { this.setState({stateField: this.props.valueToUseInOnDOMReady}); }, render: function() { return (<div></div>); } }); var instance = <SetStateInComponentDidMount valueToUseInitially="hello" valueToUseInOnDOMReady="goodbye" />; instance = ReactTestUtils.renderIntoDocument(instance); expect(instance.state.stateField).toBe('goodbye'); }); it('should call nested lifecycle methods in the right order', function() { var log; var logger = function(msg) { return function() { // return true for shouldComponentUpdate log.push(msg); return true; }; }; var Outer = React.createClass({ render: function() { return <div><Inner x={this.props.x} /></div>; }, componentWillMount: logger('outer componentWillMount'), componentDidMount: logger('outer componentDidMount'), componentWillReceiveProps: logger('outer componentWillReceiveProps'), shouldComponentUpdate: logger('outer shouldComponentUpdate'), componentWillUpdate: logger('outer componentWillUpdate'), componentDidUpdate: logger('outer componentDidUpdate'), componentWillUnmount: logger('outer componentWillUnmount') }); var Inner = React.createClass({ render: function() { return <span>{this.props.x}</span>; }, componentWillMount: logger('inner componentWillMount'), componentDidMount: logger('inner componentDidMount'), componentWillReceiveProps: logger('inner componentWillReceiveProps'), shouldComponentUpdate: logger('inner shouldComponentUpdate'), componentWillUpdate: logger('inner componentWillUpdate'), componentDidUpdate: logger('inner componentDidUpdate'), componentWillUnmount: logger('inner componentWillUnmount') }); var instance; log = []; instance = ReactTestUtils.renderIntoDocument(<Outer x={17} />); expect(log).toEqual([ 'outer componentWillMount', 'inner componentWillMount', 'inner componentDidMount', 'outer componentDidMount' ]); log = []; instance.setProps({x: 42}); expect(log).toEqual([ 'outer componentWillReceiveProps', 'outer shouldComponentUpdate', 'outer componentWillUpdate', 'inner componentWillReceiveProps', 'inner shouldComponentUpdate', 'inner componentWillUpdate', 'inner componentDidUpdate', 'outer componentDidUpdate' ]); log = []; instance.unmountComponent(); expect(log).toEqual([ 'outer componentWillUnmount', 'inner componentWillUnmount' ]); }); });
ajax/libs/js-data/1.5.0/js-data-debug.js
dmsanchez86/cdnjs
/** * @author Jason Dobry <[email protected]> * @file dist/js-data-debug.js * @version 1.5.0 - Homepage <http://www.js-data.io/> * @copyright (c) 2014 Jason Dobry * @license MIT <https://github.com/js-data/js-data/blob/master/LICENSE> * * @overview Data store. */ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.JSData=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ // Copyright 2012 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Modifications // Copyright 2014-2015 Jason Dobry // // Summary of modifications: // Fixed use of "delete" keyword for IE8 compatibility // Exposed diffObjectFromOldObject on the exported object // Added the "equals" argument to diffObjectFromOldObject to be used to check equality // Added a way to to define a default equality operator for diffObjectFromOldObject // Added a way in diffObjectFromOldObject to ignore changes to certain properties // Removed all code related to: // - ArrayObserver // - ArraySplice // - PathObserver // - CompoundObserver // - Path // - ObserverTransform (function(global) { 'use strict'; var equalityFn = function (a, b) { return a === b; }; var blacklist = []; // Detect and do basic sanity checking on Object/Array.observe. function detectObjectObserve() { if (typeof Object.observe !== 'function' || typeof Array.observe !== 'function') { return false; } var records = []; function callback(recs) { records = recs; } var test = {}; var arr = []; Object.observe(test, callback); Array.observe(arr, callback); test.id = 1; test.id = 2; delete test.id; arr.push(1, 2); arr.length = 0; Object.deliverChangeRecords(callback); if (records.length !== 5) return false; if (records[0].type != 'add' || records[1].type != 'update' || records[2].type != 'delete' || records[3].type != 'splice' || records[4].type != 'splice') { return false; } Object.unobserve(test, callback); Array.unobserve(arr, callback); return true; } var hasObserve = detectObjectObserve(); function detectEval() { // Don't test for eval if we're running in a Chrome App environment. // We check for APIs set that only exist in a Chrome App context. if (typeof chrome !== 'undefined' && chrome.app && chrome.app.runtime) { return false; } try { var f = new Function('', 'return true;'); return f(); } catch (ex) { return false; } } var hasEval = detectEval(); var createObject = ('__proto__' in {}) ? function(obj) { return obj; } : function(obj) { var proto = obj.__proto__; if (!proto) return obj; var newObject = Object.create(proto); Object.getOwnPropertyNames(obj).forEach(function(name) { Object.defineProperty(newObject, name, Object.getOwnPropertyDescriptor(obj, name)); }); return newObject; }; var MAX_DIRTY_CHECK_CYCLES = 1000; function dirtyCheck(observer) { var cycles = 0; while (cycles < MAX_DIRTY_CHECK_CYCLES && observer.check_()) { cycles++; } if (global.testingExposeCycleCount) global.dirtyCheckCycleCount = cycles; return cycles > 0; } function objectIsEmpty(object) { for (var prop in object) return false; return true; } function diffIsEmpty(diff) { return objectIsEmpty(diff.added) && objectIsEmpty(diff.removed) && objectIsEmpty(diff.changed); } function isBlacklisted(prop, bl) { if (!bl || !bl.length) { return false; } var matches; for (var i = 0; i < bl.length; i++) { if ((Object.prototype.toString.call(bl[i]) === '[object RegExp]' && bl[i].test(prop)) || bl[i] === prop) { return matches = prop; } } return !!matches; } function diffObjectFromOldObject(object, oldObject, equals, bl) { var added = {}; var removed = {}; var changed = {}; for (var prop in oldObject) { var newValue = object[prop]; if (isBlacklisted(prop, bl)) continue; if (newValue !== undefined && (equals ? equals(newValue, oldObject[prop]) : newValue === oldObject[prop])) continue; if (!(prop in object)) { removed[prop] = undefined; continue; } if (equals ? !equals(newValue, oldObject[prop]) : newValue !== oldObject[prop]) changed[prop] = newValue; } for (var prop in object) { if (prop in oldObject) continue; if (isBlacklisted(prop, bl)) continue; added[prop] = object[prop]; } if (Array.isArray(object) && object.length !== oldObject.length) changed.length = object.length; return { added: added, removed: removed, changed: changed }; } var eomTasks = []; function runEOMTasks() { if (!eomTasks.length) return false; for (var i = 0; i < eomTasks.length; i++) { eomTasks[i](); } eomTasks.length = 0; return true; } var runEOM = hasObserve ? (function(){ var eomObj = { pingPong: true }; var eomRunScheduled = false; Object.observe(eomObj, function() { runEOMTasks(); eomRunScheduled = false; }); return function(fn) { eomTasks.push(fn); if (!eomRunScheduled) { eomRunScheduled = true; eomObj.pingPong = !eomObj.pingPong; } }; })() : (function() { return function(fn) { eomTasks.push(fn); }; })(); var observedObjectCache = []; function newObservedObject() { var observer; var object; var discardRecords = false; var first = true; function callback(records) { if (observer && observer.state_ === OPENED && !discardRecords) observer.check_(records); } return { open: function(obs) { if (observer) throw Error('ObservedObject in use'); if (!first) Object.deliverChangeRecords(callback); observer = obs; first = false; }, observe: function(obj, arrayObserve) { object = obj; if (arrayObserve) Array.observe(object, callback); else Object.observe(object, callback); }, deliver: function(discard) { discardRecords = discard; Object.deliverChangeRecords(callback); discardRecords = false; }, close: function() { observer = undefined; Object.unobserve(object, callback); observedObjectCache.push(this); } }; } /* * The observedSet abstraction is a perf optimization which reduces the total * number of Object.observe observations of a set of objects. The idea is that * groups of Observers will have some object dependencies in common and this * observed set ensures that each object in the transitive closure of * dependencies is only observed once. The observedSet acts as a write barrier * such that whenever any change comes through, all Observers are checked for * changed values. * * Note that this optimization is explicitly moving work from setup-time to * change-time. * * TODO(rafaelw): Implement "garbage collection". In order to move work off * the critical path, when Observers are closed, their observed objects are * not Object.unobserve(d). As a result, it's possible that if the observedSet * is kept open, but some Observers have been closed, it could cause "leaks" * (prevent otherwise collectable objects from being collected). At some * point, we should implement incremental "gc" which keeps a list of * observedSets which may need clean-up and does small amounts of cleanup on a * timeout until all is clean. */ function getObservedObject(observer, object, arrayObserve) { var dir = observedObjectCache.pop() || newObservedObject(); dir.open(observer); dir.observe(object, arrayObserve); return dir; } var UNOPENED = 0; var OPENED = 1; var CLOSED = 2; var nextObserverId = 1; function Observer() { this.state_ = UNOPENED; this.callback_ = undefined; this.target_ = undefined; // TODO(rafaelw): Should be WeakRef this.directObserver_ = undefined; this.value_ = undefined; this.id_ = nextObserverId++; } Observer.prototype = { open: function(callback, target) { if (this.state_ != UNOPENED) throw Error('Observer has already been opened.'); addToAll(this); this.callback_ = callback; this.target_ = target; this.connect_(); this.state_ = OPENED; return this.value_; }, close: function() { if (this.state_ != OPENED) return; removeFromAll(this); this.disconnect_(); this.value_ = undefined; this.callback_ = undefined; this.target_ = undefined; this.state_ = CLOSED; }, deliver: function() { if (this.state_ != OPENED) return; dirtyCheck(this); }, report_: function(changes) { try { this.callback_.apply(this.target_, changes); } catch (ex) { Observer._errorThrownDuringCallback = true; console.error('Exception caught during observer callback: ' + (ex.stack || ex)); } }, discardChanges: function() { this.check_(undefined, true); return this.value_; } } var collectObservers = !hasObserve; var allObservers; Observer._allObserversCount = 0; if (collectObservers) { allObservers = []; } function addToAll(observer) { Observer._allObserversCount++; if (!collectObservers) return; allObservers.push(observer); } function removeFromAll(observer) { Observer._allObserversCount--; } var runningMicrotaskCheckpoint = false; var hasDebugForceFullDelivery = hasObserve && hasEval && (function() { try { eval('%RunMicrotasks()'); return true; } catch (ex) { return false; } })(); global.Platform = global.Platform || {}; global.Platform.performMicrotaskCheckpoint = function() { if (runningMicrotaskCheckpoint) return; if (hasDebugForceFullDelivery) { eval('%RunMicrotasks()'); return; } if (!collectObservers) return; runningMicrotaskCheckpoint = true; var cycles = 0; var anyChanged, toCheck; do { cycles++; toCheck = allObservers; allObservers = []; anyChanged = false; for (var i = 0; i < toCheck.length; i++) { var observer = toCheck[i]; if (observer.state_ != OPENED) continue; if (observer.check_()) anyChanged = true; allObservers.push(observer); } if (runEOMTasks()) anyChanged = true; } while (cycles < MAX_DIRTY_CHECK_CYCLES && anyChanged); if (global.testingExposeCycleCount) global.dirtyCheckCycleCount = cycles; runningMicrotaskCheckpoint = false; }; if (collectObservers) { global.Platform.clearObservers = function() { allObservers = []; }; } function ObjectObserver(object) { Observer.call(this); this.value_ = object; this.oldObject_ = undefined; } ObjectObserver.prototype = createObject({ __proto__: Observer.prototype, arrayObserve: false, connect_: function(callback, target) { if (hasObserve) { this.directObserver_ = getObservedObject(this, this.value_, this.arrayObserve); } else { this.oldObject_ = this.copyObject(this.value_); } }, copyObject: function(object) { var copy = Array.isArray(object) ? [] : {}; for (var prop in object) { copy[prop] = object[prop]; }; if (Array.isArray(object)) copy.length = object.length; return copy; }, check_: function(changeRecords, skipChanges) { var diff; var oldValues; if (hasObserve) { if (!changeRecords) return false; oldValues = {}; diff = diffObjectFromChangeRecords(this.value_, changeRecords, oldValues); } else { oldValues = this.oldObject_; diff = diffObjectFromOldObject(this.value_, this.oldObject_); } if (diffIsEmpty(diff)) return false; if (!hasObserve) this.oldObject_ = this.copyObject(this.value_); this.report_([ diff.added || {}, diff.removed || {}, diff.changed || {}, function(property) { return oldValues[property]; } ]); return true; }, disconnect_: function() { if (hasObserve) { this.directObserver_.close(); this.directObserver_ = undefined; } else { this.oldObject_ = undefined; } }, deliver: function() { if (this.state_ != OPENED) return; if (hasObserve) this.directObserver_.deliver(false); else dirtyCheck(this); }, discardChanges: function() { if (this.directObserver_) this.directObserver_.deliver(true); else this.oldObject_ = this.copyObject(this.value_); return this.value_; } }); var observerSentinel = {}; var expectedRecordTypes = { add: true, update: true, delete: true }; function diffObjectFromChangeRecords(object, changeRecords, oldValues) { var added = {}; var removed = {}; for (var i = 0; i < changeRecords.length; i++) { var record = changeRecords[i]; if (!expectedRecordTypes[record.type]) { console.error('Unknown changeRecord type: ' + record.type); console.error(record); continue; } if (!(record.name in oldValues)) oldValues[record.name] = record.oldValue; if (record.type == 'update') continue; if (record.type == 'add') { if (record.name in removed) delete removed[record.name]; else added[record.name] = true; continue; } // type = 'delete' if (record.name in added) { delete added[record.name]; delete oldValues[record.name]; } else { removed[record.name] = true; } } for (var prop in added) added[prop] = object[prop]; for (var prop in removed) removed[prop] = undefined; var changed = {}; for (var prop in oldValues) { if (prop in added || prop in removed) continue; var newValue = object[prop]; if (oldValues[prop] !== newValue) changed[prop] = newValue; } return { added: added, removed: removed, changed: changed }; } global.Observer = Observer; global.diffObjectFromOldObject = diffObjectFromOldObject; global.setEqualityFn = function (fn) { equalityFn = fn; }; global.setBlacklist = function (bl) { blacklist = bl; }; global.Observer.runEOM_ = runEOM; global.Observer.observerSentinel_ = observerSentinel; // for testing. global.Observer.hasObjectObserve = hasObserve; global.ObjectObserver = ObjectObserver; })(exports); },{}],2:[function(require,module,exports){ (function (process,global){ /*! * @overview es6-promise - a tiny implementation of Promises/A+. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) * @license Licensed under MIT license * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE * @version 2.0.1 */ (function() { "use strict"; function $$utils$$objectOrFunction(x) { return typeof x === 'function' || (typeof x === 'object' && x !== null); } function $$utils$$isFunction(x) { return typeof x === 'function'; } function $$utils$$isMaybeThenable(x) { return typeof x === 'object' && x !== null; } var $$utils$$_isArray; if (!Array.isArray) { $$utils$$_isArray = function (x) { return Object.prototype.toString.call(x) === '[object Array]'; }; } else { $$utils$$_isArray = Array.isArray; } var $$utils$$isArray = $$utils$$_isArray; var $$utils$$now = Date.now || function() { return new Date().getTime(); }; function $$utils$$F() { } var $$utils$$o_create = (Object.create || function (o) { if (arguments.length > 1) { throw new Error('Second argument not supported'); } if (typeof o !== 'object') { throw new TypeError('Argument must be an object'); } $$utils$$F.prototype = o; return new $$utils$$F(); }); var $$asap$$len = 0; var $$asap$$default = function asap(callback, arg) { $$asap$$queue[$$asap$$len] = callback; $$asap$$queue[$$asap$$len + 1] = arg; $$asap$$len += 2; if ($$asap$$len === 2) { // If len is 1, that means that we need to schedule an async flush. // If additional callbacks are queued before the queue is flushed, they // will be processed by this flush that we are scheduling. $$asap$$scheduleFlush(); } }; var $$asap$$browserGlobal = (typeof window !== 'undefined') ? window : {}; var $$asap$$BrowserMutationObserver = $$asap$$browserGlobal.MutationObserver || $$asap$$browserGlobal.WebKitMutationObserver; // test for web worker but not in IE10 var $$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined'; // node function $$asap$$useNextTick() { return function() { process.nextTick($$asap$$flush); }; } function $$asap$$useMutationObserver() { var iterations = 0; var observer = new $$asap$$BrowserMutationObserver($$asap$$flush); var node = document.createTextNode(''); observer.observe(node, { characterData: true }); return function() { node.data = (iterations = ++iterations % 2); }; } // web worker function $$asap$$useMessageChannel() { var channel = new MessageChannel(); channel.port1.onmessage = $$asap$$flush; return function () { channel.port2.postMessage(0); }; } function $$asap$$useSetTimeout() { return function() { setTimeout($$asap$$flush, 1); }; } var $$asap$$queue = new Array(1000); function $$asap$$flush() { for (var i = 0; i < $$asap$$len; i+=2) { var callback = $$asap$$queue[i]; var arg = $$asap$$queue[i+1]; callback(arg); $$asap$$queue[i] = undefined; $$asap$$queue[i+1] = undefined; } $$asap$$len = 0; } var $$asap$$scheduleFlush; // Decide what async method to use to triggering processing of queued callbacks: if (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]') { $$asap$$scheduleFlush = $$asap$$useNextTick(); } else if ($$asap$$BrowserMutationObserver) { $$asap$$scheduleFlush = $$asap$$useMutationObserver(); } else if ($$asap$$isWorker) { $$asap$$scheduleFlush = $$asap$$useMessageChannel(); } else { $$asap$$scheduleFlush = $$asap$$useSetTimeout(); } function $$$internal$$noop() {} var $$$internal$$PENDING = void 0; var $$$internal$$FULFILLED = 1; var $$$internal$$REJECTED = 2; var $$$internal$$GET_THEN_ERROR = new $$$internal$$ErrorObject(); function $$$internal$$selfFullfillment() { return new TypeError("You cannot resolve a promise with itself"); } function $$$internal$$cannotReturnOwn() { return new TypeError('A promises callback cannot return that same promise.') } function $$$internal$$getThen(promise) { try { return promise.then; } catch(error) { $$$internal$$GET_THEN_ERROR.error = error; return $$$internal$$GET_THEN_ERROR; } } function $$$internal$$tryThen(then, value, fulfillmentHandler, rejectionHandler) { try { then.call(value, fulfillmentHandler, rejectionHandler); } catch(e) { return e; } } function $$$internal$$handleForeignThenable(promise, thenable, then) { $$asap$$default(function(promise) { var sealed = false; var error = $$$internal$$tryThen(then, thenable, function(value) { if (sealed) { return; } sealed = true; if (thenable !== value) { $$$internal$$resolve(promise, value); } else { $$$internal$$fulfill(promise, value); } }, function(reason) { if (sealed) { return; } sealed = true; $$$internal$$reject(promise, reason); }, 'Settle: ' + (promise._label || ' unknown promise')); if (!sealed && error) { sealed = true; $$$internal$$reject(promise, error); } }, promise); } function $$$internal$$handleOwnThenable(promise, thenable) { if (thenable._state === $$$internal$$FULFILLED) { $$$internal$$fulfill(promise, thenable._result); } else if (promise._state === $$$internal$$REJECTED) { $$$internal$$reject(promise, thenable._result); } else { $$$internal$$subscribe(thenable, undefined, function(value) { $$$internal$$resolve(promise, value); }, function(reason) { $$$internal$$reject(promise, reason); }); } } function $$$internal$$handleMaybeThenable(promise, maybeThenable) { if (maybeThenable.constructor === promise.constructor) { $$$internal$$handleOwnThenable(promise, maybeThenable); } else { var then = $$$internal$$getThen(maybeThenable); if (then === $$$internal$$GET_THEN_ERROR) { $$$internal$$reject(promise, $$$internal$$GET_THEN_ERROR.error); } else if (then === undefined) { $$$internal$$fulfill(promise, maybeThenable); } else if ($$utils$$isFunction(then)) { $$$internal$$handleForeignThenable(promise, maybeThenable, then); } else { $$$internal$$fulfill(promise, maybeThenable); } } } function $$$internal$$resolve(promise, value) { if (promise === value) { $$$internal$$reject(promise, $$$internal$$selfFullfillment()); } else if ($$utils$$objectOrFunction(value)) { $$$internal$$handleMaybeThenable(promise, value); } else { $$$internal$$fulfill(promise, value); } } function $$$internal$$publishRejection(promise) { if (promise._onerror) { promise._onerror(promise._result); } $$$internal$$publish(promise); } function $$$internal$$fulfill(promise, value) { if (promise._state !== $$$internal$$PENDING) { return; } promise._result = value; promise._state = $$$internal$$FULFILLED; if (promise._subscribers.length === 0) { } else { $$asap$$default($$$internal$$publish, promise); } } function $$$internal$$reject(promise, reason) { if (promise._state !== $$$internal$$PENDING) { return; } promise._state = $$$internal$$REJECTED; promise._result = reason; $$asap$$default($$$internal$$publishRejection, promise); } function $$$internal$$subscribe(parent, child, onFulfillment, onRejection) { var subscribers = parent._subscribers; var length = subscribers.length; parent._onerror = null; subscribers[length] = child; subscribers[length + $$$internal$$FULFILLED] = onFulfillment; subscribers[length + $$$internal$$REJECTED] = onRejection; if (length === 0 && parent._state) { $$asap$$default($$$internal$$publish, parent); } } function $$$internal$$publish(promise) { var subscribers = promise._subscribers; var settled = promise._state; if (subscribers.length === 0) { return; } var child, callback, detail = promise._result; for (var i = 0; i < subscribers.length; i += 3) { child = subscribers[i]; callback = subscribers[i + settled]; if (child) { $$$internal$$invokeCallback(settled, child, callback, detail); } else { callback(detail); } } promise._subscribers.length = 0; } function $$$internal$$ErrorObject() { this.error = null; } var $$$internal$$TRY_CATCH_ERROR = new $$$internal$$ErrorObject(); function $$$internal$$tryCatch(callback, detail) { try { return callback(detail); } catch(e) { $$$internal$$TRY_CATCH_ERROR.error = e; return $$$internal$$TRY_CATCH_ERROR; } } function $$$internal$$invokeCallback(settled, promise, callback, detail) { var hasCallback = $$utils$$isFunction(callback), value, error, succeeded, failed; if (hasCallback) { value = $$$internal$$tryCatch(callback, detail); if (value === $$$internal$$TRY_CATCH_ERROR) { failed = true; error = value.error; value = null; } else { succeeded = true; } if (promise === value) { $$$internal$$reject(promise, $$$internal$$cannotReturnOwn()); return; } } else { value = detail; succeeded = true; } if (promise._state !== $$$internal$$PENDING) { // noop } else if (hasCallback && succeeded) { $$$internal$$resolve(promise, value); } else if (failed) { $$$internal$$reject(promise, error); } else if (settled === $$$internal$$FULFILLED) { $$$internal$$fulfill(promise, value); } else if (settled === $$$internal$$REJECTED) { $$$internal$$reject(promise, value); } } function $$$internal$$initializePromise(promise, resolver) { try { resolver(function resolvePromise(value){ $$$internal$$resolve(promise, value); }, function rejectPromise(reason) { $$$internal$$reject(promise, reason); }); } catch(e) { $$$internal$$reject(promise, e); } } function $$$enumerator$$makeSettledResult(state, position, value) { if (state === $$$internal$$FULFILLED) { return { state: 'fulfilled', value: value }; } else { return { state: 'rejected', reason: value }; } } function $$$enumerator$$Enumerator(Constructor, input, abortOnReject, label) { this._instanceConstructor = Constructor; this.promise = new Constructor($$$internal$$noop, label); this._abortOnReject = abortOnReject; if (this._validateInput(input)) { this._input = input; this.length = input.length; this._remaining = input.length; this._init(); if (this.length === 0) { $$$internal$$fulfill(this.promise, this._result); } else { this.length = this.length || 0; this._enumerate(); if (this._remaining === 0) { $$$internal$$fulfill(this.promise, this._result); } } } else { $$$internal$$reject(this.promise, this._validationError()); } } $$$enumerator$$Enumerator.prototype._validateInput = function(input) { return $$utils$$isArray(input); }; $$$enumerator$$Enumerator.prototype._validationError = function() { return new Error('Array Methods must be provided an Array'); }; $$$enumerator$$Enumerator.prototype._init = function() { this._result = new Array(this.length); }; var $$$enumerator$$default = $$$enumerator$$Enumerator; $$$enumerator$$Enumerator.prototype._enumerate = function() { var length = this.length; var promise = this.promise; var input = this._input; for (var i = 0; promise._state === $$$internal$$PENDING && i < length; i++) { this._eachEntry(input[i], i); } }; $$$enumerator$$Enumerator.prototype._eachEntry = function(entry, i) { var c = this._instanceConstructor; if ($$utils$$isMaybeThenable(entry)) { if (entry.constructor === c && entry._state !== $$$internal$$PENDING) { entry._onerror = null; this._settledAt(entry._state, i, entry._result); } else { this._willSettleAt(c.resolve(entry), i); } } else { this._remaining--; this._result[i] = this._makeResult($$$internal$$FULFILLED, i, entry); } }; $$$enumerator$$Enumerator.prototype._settledAt = function(state, i, value) { var promise = this.promise; if (promise._state === $$$internal$$PENDING) { this._remaining--; if (this._abortOnReject && state === $$$internal$$REJECTED) { $$$internal$$reject(promise, value); } else { this._result[i] = this._makeResult(state, i, value); } } if (this._remaining === 0) { $$$internal$$fulfill(promise, this._result); } }; $$$enumerator$$Enumerator.prototype._makeResult = function(state, i, value) { return value; }; $$$enumerator$$Enumerator.prototype._willSettleAt = function(promise, i) { var enumerator = this; $$$internal$$subscribe(promise, undefined, function(value) { enumerator._settledAt($$$internal$$FULFILLED, i, value); }, function(reason) { enumerator._settledAt($$$internal$$REJECTED, i, reason); }); }; var $$promise$all$$default = function all(entries, label) { return new $$$enumerator$$default(this, entries, true /* abort on reject */, label).promise; }; var $$promise$race$$default = function race(entries, label) { /*jshint validthis:true */ var Constructor = this; var promise = new Constructor($$$internal$$noop, label); if (!$$utils$$isArray(entries)) { $$$internal$$reject(promise, new TypeError('You must pass an array to race.')); return promise; } var length = entries.length; function onFulfillment(value) { $$$internal$$resolve(promise, value); } function onRejection(reason) { $$$internal$$reject(promise, reason); } for (var i = 0; promise._state === $$$internal$$PENDING && i < length; i++) { $$$internal$$subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection); } return promise; }; var $$promise$resolve$$default = function resolve(object, label) { /*jshint validthis:true */ var Constructor = this; if (object && typeof object === 'object' && object.constructor === Constructor) { return object; } var promise = new Constructor($$$internal$$noop, label); $$$internal$$resolve(promise, object); return promise; }; var $$promise$reject$$default = function reject(reason, label) { /*jshint validthis:true */ var Constructor = this; var promise = new Constructor($$$internal$$noop, label); $$$internal$$reject(promise, reason); return promise; }; var $$es6$promise$promise$$counter = 0; function $$es6$promise$promise$$needsResolver() { throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); } function $$es6$promise$promise$$needsNew() { throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); } var $$es6$promise$promise$$default = $$es6$promise$promise$$Promise; /** Promise objects represent the eventual result of an asynchronous operation. The primary way of interacting with a promise is through its `then` method, which registers callbacks to receive either a promise’s eventual value or the reason why the promise cannot be fulfilled. Terminology ----------- - `promise` is an object or function with a `then` method whose behavior conforms to this specification. - `thenable` is an object or function that defines a `then` method. - `value` is any legal JavaScript value (including undefined, a thenable, or a promise). - `exception` is a value that is thrown using the throw statement. - `reason` is a value that indicates why a promise was rejected. - `settled` the final resting state of a promise, fulfilled or rejected. A promise can be in one of three states: pending, fulfilled, or rejected. Promises that are fulfilled have a fulfillment value and are in the fulfilled state. Promises that are rejected have a rejection reason and are in the rejected state. A fulfillment value is never a thenable. Promises can also be said to *resolve* a value. If this value is also a promise, then the original promise's settled state will match the value's settled state. So a promise that *resolves* a promise that rejects will itself reject, and a promise that *resolves* a promise that fulfills will itself fulfill. Basic Usage: ------------ ```js var promise = new Promise(function(resolve, reject) { // on success resolve(value); // on failure reject(reason); }); promise.then(function(value) { // on fulfillment }, function(reason) { // on rejection }); ``` Advanced Usage: --------------- Promises shine when abstracting away asynchronous interactions such as `XMLHttpRequest`s. ```js function getJSON(url) { return new Promise(function(resolve, reject){ var xhr = new XMLHttpRequest(); xhr.open('GET', url); xhr.onreadystatechange = handler; xhr.responseType = 'json'; xhr.setRequestHeader('Accept', 'application/json'); xhr.send(); function handler() { if (this.readyState === this.DONE) { if (this.status === 200) { resolve(this.response); } else { reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']')); } } }; }); } getJSON('/posts.json').then(function(json) { // on fulfillment }, function(reason) { // on rejection }); ``` Unlike callbacks, promises are great composable primitives. ```js Promise.all([ getJSON('/posts'), getJSON('/comments') ]).then(function(values){ values[0] // => postsJSON values[1] // => commentsJSON return values; }); ``` @class Promise @param {function} resolver Useful for tooling. @constructor */ function $$es6$promise$promise$$Promise(resolver) { this._id = $$es6$promise$promise$$counter++; this._state = undefined; this._result = undefined; this._subscribers = []; if ($$$internal$$noop !== resolver) { if (!$$utils$$isFunction(resolver)) { $$es6$promise$promise$$needsResolver(); } if (!(this instanceof $$es6$promise$promise$$Promise)) { $$es6$promise$promise$$needsNew(); } $$$internal$$initializePromise(this, resolver); } } $$es6$promise$promise$$Promise.all = $$promise$all$$default; $$es6$promise$promise$$Promise.race = $$promise$race$$default; $$es6$promise$promise$$Promise.resolve = $$promise$resolve$$default; $$es6$promise$promise$$Promise.reject = $$promise$reject$$default; $$es6$promise$promise$$Promise.prototype = { constructor: $$es6$promise$promise$$Promise, /** The primary way of interacting with a promise is through its `then` method, which registers callbacks to receive either a promise's eventual value or the reason why the promise cannot be fulfilled. ```js findUser().then(function(user){ // user is available }, function(reason){ // user is unavailable, and you are given the reason why }); ``` Chaining -------- The return value of `then` is itself a promise. This second, 'downstream' promise is resolved with the return value of the first promise's fulfillment or rejection handler, or rejected if the handler throws an exception. ```js findUser().then(function (user) { return user.name; }, function (reason) { return 'default name'; }).then(function (userName) { // If `findUser` fulfilled, `userName` will be the user's name, otherwise it // will be `'default name'` }); findUser().then(function (user) { throw new Error('Found user, but still unhappy'); }, function (reason) { throw new Error('`findUser` rejected and we're unhappy'); }).then(function (value) { // never reached }, function (reason) { // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'. // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'. }); ``` If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream. ```js findUser().then(function (user) { throw new PedagogicalException('Upstream error'); }).then(function (value) { // never reached }).then(function (value) { // never reached }, function (reason) { // The `PedgagocialException` is propagated all the way down to here }); ``` Assimilation ------------ Sometimes the value you want to propagate to a downstream promise can only be retrieved asynchronously. This can be achieved by returning a promise in the fulfillment or rejection handler. The downstream promise will then be pending until the returned promise is settled. This is called *assimilation*. ```js findUser().then(function (user) { return findCommentsByAuthor(user); }).then(function (comments) { // The user's comments are now available }); ``` If the assimliated promise rejects, then the downstream promise will also reject. ```js findUser().then(function (user) { return findCommentsByAuthor(user); }).then(function (comments) { // If `findCommentsByAuthor` fulfills, we'll have the value here }, function (reason) { // If `findCommentsByAuthor` rejects, we'll have the reason here }); ``` Simple Example -------------- Synchronous Example ```javascript var result; try { result = findResult(); // success } catch(reason) { // failure } ``` Errback Example ```js findResult(function(result, err){ if (err) { // failure } else { // success } }); ``` Promise Example; ```javascript findResult().then(function(result){ // success }, function(reason){ // failure }); ``` Advanced Example -------------- Synchronous Example ```javascript var author, books; try { author = findAuthor(); books = findBooksByAuthor(author); // success } catch(reason) { // failure } ``` Errback Example ```js function foundBooks(books) { } function failure(reason) { } findAuthor(function(author, err){ if (err) { failure(err); // failure } else { try { findBoooksByAuthor(author, function(books, err) { if (err) { failure(err); } else { try { foundBooks(books); } catch(reason) { failure(reason); } } }); } catch(error) { failure(err); } // success } }); ``` Promise Example; ```javascript findAuthor(). then(findBooksByAuthor). then(function(books){ // found books }).catch(function(reason){ // something went wrong }); ``` @method then @param {Function} onFulfilled @param {Function} onRejected Useful for tooling. @return {Promise} */ then: function(onFulfillment, onRejection) { var parent = this; var state = parent._state; if (state === $$$internal$$FULFILLED && !onFulfillment || state === $$$internal$$REJECTED && !onRejection) { return this; } var child = new this.constructor($$$internal$$noop); var result = parent._result; if (state) { var callback = arguments[state - 1]; $$asap$$default(function(){ $$$internal$$invokeCallback(state, child, callback, result); }); } else { $$$internal$$subscribe(parent, child, onFulfillment, onRejection); } return child; }, /** `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same as the catch block of a try/catch statement. ```js function findAuthor(){ throw new Error('couldn't find that author'); } // synchronous try { findAuthor(); } catch(reason) { // something went wrong } // async with promises findAuthor().catch(function(reason){ // something went wrong }); ``` @method catch @param {Function} onRejection Useful for tooling. @return {Promise} */ 'catch': function(onRejection) { return this.then(null, onRejection); } }; var $$es6$promise$polyfill$$default = function polyfill() { var local; if (typeof global !== 'undefined') { local = global; } else if (typeof window !== 'undefined' && window.document) { local = window; } else { local = self; } var es6PromiseSupport = "Promise" in local && // Some of these methods are missing from // Firefox/Chrome experimental implementations "resolve" in local.Promise && "reject" in local.Promise && "all" in local.Promise && "race" in local.Promise && // Older version of the spec had a resolver object // as the arg rather than a function (function() { var resolve; new local.Promise(function(r) { resolve = r; }); return $$utils$$isFunction(resolve); }()); if (!es6PromiseSupport) { local.Promise = $$es6$promise$promise$$default; } }; var es6$promise$umd$$ES6Promise = { 'Promise': $$es6$promise$promise$$default, 'polyfill': $$es6$promise$polyfill$$default }; /* global define:true module:true window: true */ if (typeof define === 'function' && define['amd']) { define(function() { return es6$promise$umd$$ES6Promise; }); } else if (typeof module !== 'undefined' && module['exports']) { module['exports'] = es6$promise$umd$$ES6Promise; } else if (typeof this !== 'undefined') { this['ES6Promise'] = es6$promise$umd$$ES6Promise; } }).call(this); }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{"_process":3}],3:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; var queue = []; var draining = false; function drainQueue() { if (draining) { return; } draining = true; var currentQueue; var len = queue.length; while(len) { currentQueue = queue; queue = []; var i = -1; while (++i < len) { currentQueue[i](); } len = queue.length; } draining = false; } process.nextTick = function (fun) { queue.push(fun); if (!draining) { setTimeout(drainQueue, 0); } }; process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; process.version = ''; // empty string to avoid regexp issues function noop() {} process.on = noop; process.addListener = noop; process.once = noop; process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop; process.binding = function (name) { throw new Error('process.binding is not supported'); }; // TODO(shtylman) process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; process.umask = function() { return 0; }; },{}],4:[function(require,module,exports){ var indexOf = require('./indexOf'); /** * If array contains values. */ function contains(arr, val) { return indexOf(arr, val) !== -1; } module.exports = contains; },{"./indexOf":6}],5:[function(require,module,exports){ /** * Array forEach */ function forEach(arr, callback, thisObj) { if (arr == null) { return; } var i = -1, len = arr.length; while (++i < len) { // we iterate over sparse items since there is no way to make it // work properly on IE 7-8. see #64 if ( callback.call(thisObj, arr[i], i, arr) === false ) { break; } } } module.exports = forEach; },{}],6:[function(require,module,exports){ /** * Array.indexOf */ function indexOf(arr, item, fromIndex) { fromIndex = fromIndex || 0; if (arr == null) { return -1; } var len = arr.length, i = fromIndex < 0 ? len + fromIndex : fromIndex; while (i < len) { // we iterate over sparse items since there is no way to make it // work properly on IE 7-8. see #64 if (arr[i] === item) { return i; } i++; } return -1; } module.exports = indexOf; },{}],7:[function(require,module,exports){ var indexOf = require('./indexOf'); /** * Remove a single item from the array. * (it won't remove duplicates, just a single item) */ function remove(arr, item){ var idx = indexOf(arr, item); if (idx !== -1) arr.splice(idx, 1); } module.exports = remove; },{"./indexOf":6}],8:[function(require,module,exports){ /** * Create slice of source array or array-like object */ function slice(arr, start, end){ var len = arr.length; if (start == null) { start = 0; } else if (start < 0) { start = Math.max(len + start, 0); } else { start = Math.min(start, len); } if (end == null) { end = len; } else if (end < 0) { end = Math.max(len + end, 0); } else { end = Math.min(end, len); } var result = []; while (start < end) { result.push(arr[start++]); } return result; } module.exports = slice; },{}],9:[function(require,module,exports){ /** * Merge sort (http://en.wikipedia.org/wiki/Merge_sort) */ function mergeSort(arr, compareFn) { if (arr == null) { return []; } else if (arr.length < 2) { return arr; } if (compareFn == null) { compareFn = defaultCompare; } var mid, left, right; mid = ~~(arr.length / 2); left = mergeSort( arr.slice(0, mid), compareFn ); right = mergeSort( arr.slice(mid, arr.length), compareFn ); return merge(left, right, compareFn); } function defaultCompare(a, b) { return a < b ? -1 : (a > b? 1 : 0); } function merge(left, right, compareFn) { var result = []; while (left.length && right.length) { if (compareFn(left[0], right[0]) <= 0) { // if 0 it should preserve same order (stable) result.push(left.shift()); } else { result.push(right.shift()); } } if (left.length) { result.push.apply(result, left); } if (right.length) { result.push.apply(result, right); } return result; } module.exports = mergeSort; },{}],10:[function(require,module,exports){ /** * Checks if the value is created by the `Object` constructor. */ function isPlainObject(value) { return (!!value && typeof value === 'object' && value.constructor === Object); } module.exports = isPlainObject; },{}],11:[function(require,module,exports){ /** * Checks if the object is a primitive */ function isPrimitive(value) { // Using switch fallthrough because it's simple to read and is // generally fast: http://jsperf.com/testing-value-is-primitive/5 switch (typeof value) { case "string": case "number": case "boolean": return true; } return value == null; } module.exports = isPrimitive; },{}],12:[function(require,module,exports){ /** * Typecast a value to a String, using an empty string value for null or * undefined. */ function toString(val){ return val == null ? '' : val.toString(); } module.exports = toString; },{}],13:[function(require,module,exports){ var forOwn = require('./forOwn'); var isPlainObject = require('../lang/isPlainObject'); /** * Mixes objects into the target object, recursively mixing existing child * objects. */ function deepMixIn(target, objects) { var i = 0, n = arguments.length, obj; while(++i < n){ obj = arguments[i]; if (obj) { forOwn(obj, copyProp, target); } } return target; } function copyProp(val, key) { var existing = this[key]; if (isPlainObject(val) && isPlainObject(existing)) { deepMixIn(existing, val); } else { this[key] = val; } } module.exports = deepMixIn; },{"../lang/isPlainObject":10,"./forOwn":15}],14:[function(require,module,exports){ var hasOwn = require('./hasOwn'); var _hasDontEnumBug, _dontEnums; function checkDontEnum(){ _dontEnums = [ 'toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor' ]; _hasDontEnumBug = true; for (var key in {'toString': null}) { _hasDontEnumBug = false; } } /** * Similar to Array/forEach but works over object properties and fixes Don't * Enum bug on IE. * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation */ function forIn(obj, fn, thisObj){ var key, i = 0; // no need to check if argument is a real object that way we can use // it for arrays, functions, date, etc. //post-pone check till needed if (_hasDontEnumBug == null) checkDontEnum(); for (key in obj) { if (exec(fn, obj, key, thisObj) === false) { break; } } if (_hasDontEnumBug) { var ctor = obj.constructor, isProto = !!ctor && obj === ctor.prototype; while (key = _dontEnums[i++]) { // For constructor, if it is a prototype object the constructor // is always non-enumerable unless defined otherwise (and // enumerated above). For non-prototype objects, it will have // to be defined on this object, since it cannot be defined on // any prototype objects. // // For other [[DontEnum]] properties, check if the value is // different than Object prototype value. if ( (key !== 'constructor' || (!isProto && hasOwn(obj, key))) && obj[key] !== Object.prototype[key] ) { if (exec(fn, obj, key, thisObj) === false) { break; } } } } } function exec(fn, obj, key, thisObj){ return fn.call(thisObj, obj[key], key, obj); } module.exports = forIn; },{"./hasOwn":17}],15:[function(require,module,exports){ var hasOwn = require('./hasOwn'); var forIn = require('./forIn'); /** * Similar to Array/forEach but works over object properties and fixes Don't * Enum bug on IE. * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation */ function forOwn(obj, fn, thisObj){ forIn(obj, function(val, key){ if (hasOwn(obj, key)) { return fn.call(thisObj, obj[key], key, obj); } }); } module.exports = forOwn; },{"./forIn":14,"./hasOwn":17}],16:[function(require,module,exports){ var isPrimitive = require('../lang/isPrimitive'); /** * get "nested" object property */ function get(obj, prop){ var parts = prop.split('.'), last = parts.pop(); while (prop = parts.shift()) { obj = obj[prop]; if (obj == null) return; } return obj[last]; } module.exports = get; },{"../lang/isPrimitive":11}],17:[function(require,module,exports){ /** * Safer Object.hasOwnProperty */ function hasOwn(obj, prop){ return Object.prototype.hasOwnProperty.call(obj, prop); } module.exports = hasOwn; },{}],18:[function(require,module,exports){ var forEach = require('../array/forEach'); /** * Create nested object if non-existent */ function namespace(obj, path){ if (!path) return obj; forEach(path.split('.'), function(key){ if (!obj[key]) { obj[key] = {}; } obj = obj[key]; }); return obj; } module.exports = namespace; },{"../array/forEach":5}],19:[function(require,module,exports){ var slice = require('../array/slice'); /** * Return a copy of the object, filtered to only have values for the whitelisted keys. */ function pick(obj, var_keys){ var keys = typeof arguments[1] !== 'string'? arguments[1] : slice(arguments, 1), out = {}, i = 0, key; while (key = keys[i++]) { out[key] = obj[key]; } return out; } module.exports = pick; },{"../array/slice":8}],20:[function(require,module,exports){ var namespace = require('./namespace'); /** * set "nested" object property */ function set(obj, prop, val){ var parts = (/^(.+)\.(.+)$/).exec(prop); if (parts){ namespace(obj, parts[1])[parts[2]] = val; } else { obj[prop] = val; } } module.exports = set; },{"./namespace":18}],21:[function(require,module,exports){ var toString = require('../lang/toString'); var replaceAccents = require('./replaceAccents'); var removeNonWord = require('./removeNonWord'); var upperCase = require('./upperCase'); var lowerCase = require('./lowerCase'); /** * Convert string to camelCase text. */ function camelCase(str){ str = toString(str); str = replaceAccents(str); str = removeNonWord(str) .replace(/[\-_]/g, ' ') //convert all hyphens and underscores to spaces .replace(/\s[a-z]/g, upperCase) //convert first char of each word to UPPERCASE .replace(/\s+/g, '') //remove spaces .replace(/^[A-Z]/g, lowerCase); //convert first char to lowercase return str; } module.exports = camelCase; },{"../lang/toString":12,"./lowerCase":22,"./removeNonWord":24,"./replaceAccents":25,"./upperCase":26}],22:[function(require,module,exports){ var toString = require('../lang/toString'); /** * "Safer" String.toLowerCase() */ function lowerCase(str){ str = toString(str); return str.toLowerCase(); } module.exports = lowerCase; },{"../lang/toString":12}],23:[function(require,module,exports){ var toString = require('../lang/toString'); var camelCase = require('./camelCase'); var upperCase = require('./upperCase'); /** * camelCase + UPPERCASE first char */ function pascalCase(str){ str = toString(str); return camelCase(str).replace(/^[a-z]/, upperCase); } module.exports = pascalCase; },{"../lang/toString":12,"./camelCase":21,"./upperCase":26}],24:[function(require,module,exports){ var toString = require('../lang/toString'); // This pattern is generated by the _build/pattern-removeNonWord.js script var PATTERN = /[^\x20\x2D0-9A-Z\x5Fa-z\xC0-\xD6\xD8-\xF6\xF8-\xFF]/g; /** * Remove non-word chars. */ function removeNonWord(str){ str = toString(str); return str.replace(PATTERN, ''); } module.exports = removeNonWord; },{"../lang/toString":12}],25:[function(require,module,exports){ var toString = require('../lang/toString'); /** * Replaces all accented chars with regular ones */ function replaceAccents(str){ str = toString(str); // verifies if the String has accents and replace them if (str.search(/[\xC0-\xFF]/g) > -1) { str = str .replace(/[\xC0-\xC5]/g, "A") .replace(/[\xC6]/g, "AE") .replace(/[\xC7]/g, "C") .replace(/[\xC8-\xCB]/g, "E") .replace(/[\xCC-\xCF]/g, "I") .replace(/[\xD0]/g, "D") .replace(/[\xD1]/g, "N") .replace(/[\xD2-\xD6\xD8]/g, "O") .replace(/[\xD9-\xDC]/g, "U") .replace(/[\xDD]/g, "Y") .replace(/[\xDE]/g, "P") .replace(/[\xE0-\xE5]/g, "a") .replace(/[\xE6]/g, "ae") .replace(/[\xE7]/g, "c") .replace(/[\xE8-\xEB]/g, "e") .replace(/[\xEC-\xEF]/g, "i") .replace(/[\xF1]/g, "n") .replace(/[\xF2-\xF6\xF8]/g, "o") .replace(/[\xF9-\xFC]/g, "u") .replace(/[\xFE]/g, "p") .replace(/[\xFD\xFF]/g, "y"); } return str; } module.exports = replaceAccents; },{"../lang/toString":12}],26:[function(require,module,exports){ var toString = require('../lang/toString'); /** * "Safer" String.toUpperCase() */ function upperCase(str){ str = toString(str); return str.toUpperCase(); } module.exports = upperCase; },{"../lang/toString":12}],27:[function(require,module,exports){ var DSUtils = require('../../utils'); var DSErrors = require('../../errors'); function create(resourceName, attrs, options) { var _this = this; var definition = _this.defs[resourceName]; options = options || {}; attrs = attrs || {}; var rejectionError; if (!definition) { rejectionError = new DSErrors.NER(resourceName); } else if (!DSUtils._o(attrs)) { rejectionError = DSUtils._oErr('attrs'); } else { options = DSUtils._(definition, options); if (options.upsert && DSUtils._sn(attrs[definition.idAttribute])) { return _this.update(resourceName, attrs[definition.idAttribute], attrs, options); } options.logFn('create', attrs, options); } return new DSUtils.Promise(function (resolve, reject) { if (rejectionError) { reject(rejectionError); } else { resolve(attrs); } }) .then(function (attrs) { return options.beforeValidate.call(attrs, options, attrs); }) .then(function (attrs) { return options.validate.call(attrs, options, attrs); }) .then(function (attrs) { return options.afterValidate.call(attrs, options, attrs); }) .then(function (attrs) { return options.beforeCreate.call(attrs, options, attrs); }) .then(function (attrs) { if (options.notify) { definition.emit('DS.beforeCreate', definition, DSUtils.copy(attrs)); } return _this.getAdapter(options).create(definition, attrs, options); }) .then(function (attrs) { return options.afterCreate.call(attrs, options, attrs); }) .then(function (attrs) { if (options.notify) { definition.emit('DS.afterCreate', definition, DSUtils.copy(attrs)); } if (options.cacheResponse) { var created = _this.inject(definition.n, attrs, options); var id = created[definition.idAttribute]; _this.s[resourceName].completedQueries[id] = new Date().getTime(); return created; } else { return _this.createInstance(resourceName, attrs, options); } }); } module.exports = create; },{"../../errors":48,"../../utils":50}],28:[function(require,module,exports){ var DSUtils = require('../../utils'); var DSErrors = require('../../errors'); function destroy(resourceName, id, options) { var _this = this; var definition = _this.defs[resourceName]; var item; return new DSUtils.Promise(function (resolve, reject) { id = DSUtils.resolveId(definition, id); if (!definition) { reject(new DSErrors.NER(resourceName)); } else if (!DSUtils._sn(id)) { reject(DSUtils._snErr('id')); } else { item = _this.get(resourceName, id) || { id: id }; options = DSUtils._(definition, options); options.logFn('destroy', id, options); resolve(item); } }) .then(function (attrs) { return options.beforeDestroy.call(attrs, options, attrs); }) .then(function (attrs) { if (options.notify) { definition.emit('DS.beforeDestroy', definition, DSUtils.copy(attrs)); } if (options.eagerEject) { _this.eject(resourceName, id); } return _this.getAdapter(options).destroy(definition, id, options); }) .then(function () { return options.afterDestroy.call(item, options, item); }) .then(function (item) { if (options.notify) { definition.emit('DS.afterDestroy', definition, DSUtils.copy(item)); } _this.eject(resourceName, id); return id; })['catch'](function (err) { if (options && options.eagerEject && item) { _this.inject(resourceName, item, { notify: false }); } throw err; }); } module.exports = destroy; },{"../../errors":48,"../../utils":50}],29:[function(require,module,exports){ var DSUtils = require('../../utils'); var DSErrors = require('../../errors'); function destroyAll(resourceName, params, options) { var _this = this; var definition = _this.defs[resourceName]; var ejected, toEject; params = params || {}; return new DSUtils.Promise(function (resolve, reject) { if (!definition) { reject(new DSErrors.NER(resourceName)); } else if (!DSUtils._o(params)) { reject(DSUtils._oErr('attrs')); } else { options = DSUtils._(definition, options); options.logFn('destroyAll', params, options); resolve(); } }).then(function () { toEject = _this.defaults.defaultFilter.call(_this, resourceName, params); return options.beforeDestroy(options, toEject); }).then(function () { if (options.notify) { definition.emit('DS.beforeDestroy', definition, DSUtils.copy(toEject)); } if (options.eagerEject) { ejected = _this.ejectAll(resourceName, params); } return _this.getAdapter(options).destroyAll(definition, params, options); }).then(function () { return options.afterDestroy(options, toEject); }).then(function () { if (options.notify) { definition.emit('DS.afterDestroy', definition, DSUtils.copy(toEject)); } return ejected || _this.ejectAll(resourceName, params); })['catch'](function (err) { if (options && options.eagerEject && ejected) { _this.inject(resourceName, ejected, { notify: false }); } throw err; }); } module.exports = destroyAll; },{"../../errors":48,"../../utils":50}],30:[function(require,module,exports){ /* jshint -W082 */ var DSUtils = require('../../utils'); var DSErrors = require('../../errors'); function find(resourceName, id, options) { var _this = this; var definition = _this.defs[resourceName]; var resource = _this.s[resourceName]; return new DSUtils.Promise(function (resolve, reject) { if (!definition) { reject(new DSErrors.NER(resourceName)); } else if (!DSUtils._sn(id)) { reject(DSUtils._snErr('id')); } else { options = DSUtils._(definition, options); options.logFn('find', id, options); if (options.params) { options.params = DSUtils.copy(options.params); } if (options.bypassCache || !options.cacheResponse) { delete resource.completedQueries[id]; } if (id in resource.completedQueries && _this.get(resourceName, id)) { resolve(_this.get(resourceName, id)); } else { delete resource.completedQueries[id]; resolve(); } } }).then(function (item) { if (!item) { if (!(id in resource.pendingQueries)) { var promise; var strategy = options.findStrategy || options.strategy; if (strategy === 'fallback') { function makeFallbackCall(index) { return _this.getAdapter((options.findFallbackAdapters || options.fallbackAdapters)[index]).find(definition, id, options)['catch'](function (err) { index++; if (index < options.fallbackAdapters.length) { return makeFallbackCall(index); } else { return Promise.reject(err); } }); } promise = makeFallbackCall(0); } else { promise = _this.getAdapter(options).find(definition, id, options); } resource.pendingQueries[id] = promise.then(function (data) { // Query is no longer pending delete resource.pendingQueries[id]; if (options.cacheResponse) { var injected = _this.inject(resourceName, data, options); resource.completedQueries[id] = new Date().getTime(); return injected; } else { return _this.createInstance(resourceName, data, options); } }); } return resource.pendingQueries[id]; } else { return item; } })['catch'](function (err) { if (resource) { delete resource.pendingQueries[id]; } throw err; }); } module.exports = find; },{"../../errors":48,"../../utils":50}],31:[function(require,module,exports){ /* jshint -W082 */ var DSUtils = require('../../utils'); var DSErrors = require('../../errors'); function processResults(data, resourceName, queryHash, options) { var _this = this; var resource = _this.s[resourceName]; var idAttribute = _this.defs[resourceName].idAttribute; var date = new Date().getTime(); data = data || []; // Query is no longer pending delete resource.pendingQueries[queryHash]; resource.completedQueries[queryHash] = date; // Update modified timestamp of collection resource.collectionModified = DSUtils.updateTimestamp(resource.collectionModified); // Merge the new values into the cache var injected = _this.inject(resourceName, data, options); // Make sure each object is added to completedQueries if (DSUtils._a(injected)) { DSUtils.forEach(injected, function (item) { if (item && item[idAttribute]) { resource.completedQueries[item[idAttribute]] = date; } }); } else { options.errorFn('response is expected to be an array!'); resource.completedQueries[injected[idAttribute]] = date; } return injected; } function findAll(resourceName, params, options) { var _this = this; var definition = _this.defs[resourceName]; var resource = _this.s[resourceName]; var queryHash; return new DSUtils.Promise(function (resolve, reject) { params = params || {}; if (!_this.defs[resourceName]) { reject(new DSErrors.NER(resourceName)); } else if (!DSUtils._o(params)) { reject(DSUtils._oErr('params')); } else { options = DSUtils._(definition, options); queryHash = DSUtils.toJson(params); options.logFn('findAll', params, options); if (options.params) { options.params = DSUtils.copy(options.params); } if (options.bypassCache || !options.cacheResponse) { delete resource.completedQueries[queryHash]; delete resource.queryData[queryHash]; } if (queryHash in resource.completedQueries) { if (options.useFilter) { resolve(_this.filter(resourceName, params, options)); } else { resolve(resource.queryData[queryHash]); } } else { resolve(); } } }).then(function (items) { if (!(queryHash in resource.completedQueries)) { if (!(queryHash in resource.pendingQueries)) { var promise; var strategy = options.findAllStrategy || options.strategy; if (strategy === 'fallback') { function makeFallbackCall(index) { return _this.getAdapter((options.findAllFallbackAdapters || options.fallbackAdapters)[index]).findAll(definition, params, options)['catch'](function (err) { index++; if (index < options.fallbackAdapters.length) { return makeFallbackCall(index); } else { return Promise.reject(err); } }); } promise = makeFallbackCall(0); } else { promise = _this.getAdapter(options).findAll(definition, params, options); } resource.pendingQueries[queryHash] = promise.then(function (data) { delete resource.pendingQueries[queryHash]; if (options.cacheResponse) { resource.queryData[queryHash] = processResults.call(_this, data, resourceName, queryHash, options); resource.queryData[queryHash].$$injected = true; return resource.queryData[queryHash]; } else { DSUtils.forEach(data, function (item, i) { data[i] = _this.createInstance(resourceName, item, options); }); return data; } }); } return resource.pendingQueries[queryHash]; } else { return items; } })['catch'](function (err) { if (resource) { delete resource.pendingQueries[queryHash]; } throw err; }); } module.exports = findAll; },{"../../errors":48,"../../utils":50}],32:[function(require,module,exports){ var DSUtils = require('../../utils'); var DSErrors = require('../../errors'); function reap(resourceName, options) { var _this = this; var definition = _this.defs[resourceName]; var resource = _this.s[resourceName]; return new DSUtils.Promise(function (resolve, reject) { if (!definition) { reject(new _this.errors.NER(resourceName)); } else { options = DSUtils._(definition, options); if (!options.hasOwnProperty('notify')) { options.notify = false; } options.logFn('reap', options); var items = []; var now = new Date().getTime(); var expiredItem; while ((expiredItem = resource.expiresHeap.peek()) && expiredItem.expires < now) { items.push(expiredItem.item); delete expiredItem.item; resource.expiresHeap.pop(); } resolve(items); } }).then(function (items) { if (options.isInterval || options.notify) { definition.beforeReap(options, items); definition.emit('DS.beforeReap', definition, DSUtils.copy(items)); } if (options.reapAction === 'inject') { DSUtils.forEach(items, function (item) { var id = item[definition.idAttribute]; resource.expiresHeap.push({ item: item, timestamp: resource.saved[id], expires: definition.maxAge ? resource.saved[id] + definition.maxAge : Number.MAX_VALUE }); }); } else if (options.reapAction === 'eject') { DSUtils.forEach(items, function (item) { _this.eject(resourceName, item[definition.idAttribute]); }); } else if (options.reapAction === 'refresh') { var tasks = []; DSUtils.forEach(items, function (item) { tasks.push(_this.refresh(resourceName, item[definition.idAttribute])); }); return DSUtils.Promise.all(tasks); } return items; }).then(function (items) { if (options.isInterval || options.notify) { definition.afterReap(options, items); definition.emit('DS.afterReap', definition, DSUtils.copy(items)); } return items; }); } function refresh(resourceName, id, options) { var _this = this; return new DSUtils.Promise(function (resolve, reject) { var definition = _this.defs[resourceName]; id = DSUtils.resolveId(_this.defs[resourceName], id); if (!definition) { reject(new _this.errors.NER(resourceName)); } else if (!DSUtils._sn(id)) { reject(DSUtils._snErr('id')); } else { options = DSUtils._(definition, options); options.bypassCache = true; options.logFn('refresh', id, options); resolve(_this.get(resourceName, id)); } }).then(function (item) { if (item) { return _this.find(resourceName, id, options); } else { return item; } }); } module.exports = { create: require('./create'), destroy: require('./destroy'), destroyAll: require('./destroyAll'), find: require('./find'), findAll: require('./findAll'), loadRelations: require('./loadRelations'), reap: reap, refresh: refresh, save: require('./save'), update: require('./update'), updateAll: require('./updateAll') }; },{"../../errors":48,"../../utils":50,"./create":27,"./destroy":28,"./destroyAll":29,"./find":30,"./findAll":31,"./loadRelations":33,"./save":34,"./update":35,"./updateAll":36}],33:[function(require,module,exports){ var DSUtils = require('../../utils'); var DSErrors = require('../../errors'); function loadRelations(resourceName, instance, relations, options) { var _this = this; var definition = _this.defs[resourceName]; var fields = []; return new DSUtils.Promise(function (resolve, reject) { if (DSUtils._sn(instance)) { instance = _this.get(resourceName, instance); } if (DSUtils._s(relations)) { relations = [relations]; } if (!definition) { reject(new DSErrors.NER(resourceName)); } else if (!DSUtils._o(instance)) { reject(new DSErrors.IA('"instance(id)" must be a string, number or object!')); } else if (!DSUtils._a(relations)) { reject(new DSErrors.IA('"relations" must be a string or an array!')); } else { var _options = DSUtils._(definition, options); if (!_options.hasOwnProperty('findBelongsTo')) { _options.findBelongsTo = true; } if (!_options.hasOwnProperty('findHasMany')) { _options.findHasMany = true; } _options.logFn('loadRelations', instance, relations, _options); var tasks = []; DSUtils.forEach(definition.relationList, function (def) { var relationName = def.relation; var relationDef = definition.getResource(relationName); var __options = DSUtils._(relationDef, options); if (DSUtils.contains(relations, relationName) || DSUtils.contains(relations, def.localField)) { var task; var params = {}; if (__options.allowSimpleWhere) { params[def.foreignKey] = instance[definition.idAttribute]; } else { params.where = {}; params.where[def.foreignKey] = { '==': instance[definition.idAttribute] }; } if (def.type === 'hasMany' && params[def.foreignKey]) { task = _this.findAll(relationName, params, __options); } else if (def.type === 'hasOne') { if (def.localKey && instance[def.localKey]) { task = _this.find(relationName, instance[def.localKey], __options); } else if (def.foreignKey && params[def.foreignKey]) { task = _this.findAll(relationName, params, __options).then(function (hasOnes) { return hasOnes.length ? hasOnes[0] : null; }); } } else if (instance[def.localKey]) { task = _this.find(relationName, instance[def.localKey], options); } if (task) { tasks.push(task); fields.push(def.localField); } } }); resolve(tasks); } }) .then(function (tasks) { return DSUtils.Promise.all(tasks); }) .then(function (loadedRelations) { DSUtils.forEach(fields, function (field, index) { instance[field] = loadedRelations[index]; }); return instance; }); } module.exports = loadRelations; },{"../../errors":48,"../../utils":50}],34:[function(require,module,exports){ var DSUtils = require('../../utils'); var DSErrors = require('../../errors'); function save(resourceName, id, options) { var _this = this; var definition = _this.defs[resourceName]; var item; return new DSUtils.Promise(function (resolve, reject) { id = DSUtils.resolveId(definition, id); if (!definition) { reject(new DSErrors.NER(resourceName)); } else if (!DSUtils._sn(id)) { reject(DSUtils._snErr('id')); } else if (!_this.get(resourceName, id)) { reject(new DSErrors.R('id "' + id + '" not found in cache!')); } else { item = _this.get(resourceName, id); options = DSUtils._(definition, options); options.logFn('save', id, options); resolve(item); } }).then(function (attrs) { return options.beforeValidate.call(attrs, options, attrs); }) .then(function (attrs) { return options.validate.call(attrs, options, attrs); }) .then(function (attrs) { return options.afterValidate.call(attrs, options, attrs); }) .then(function (attrs) { return options.beforeUpdate.call(attrs, options, attrs); }) .then(function (attrs) { if (options.notify) { definition.emit('DS.beforeUpdate', definition, DSUtils.copy(attrs)); } if (options.changesOnly) { var resource = _this.s[resourceName]; if (DSUtils.w) { resource.observers[id].deliver(); } var toKeep = []; var changes = _this.changes(resourceName, id); for (var key in changes.added) { toKeep.push(key); } for (key in changes.changed) { toKeep.push(key); } changes = DSUtils.pick(attrs, toKeep); if (DSUtils.isEmpty(changes)) { // no changes, return return attrs; } else { attrs = changes; } } return _this.getAdapter(options).update(definition, id, attrs, options); }) .then(function (data) { return options.afterUpdate.call(data, options, data); }) .then(function (attrs) { if (options.notify) { definition.emit('DS.afterUpdate', definition, DSUtils.copy(attrs)); } if (options.cacheResponse) { return _this.inject(definition.n, attrs, options); } else { return _this.createInstance(resourceName, attrs, options); } }); } module.exports = save; },{"../../errors":48,"../../utils":50}],35:[function(require,module,exports){ var DSUtils = require('../../utils'); var DSErrors = require('../../errors'); function update(resourceName, id, attrs, options) { var _this = this; var definition = _this.defs[resourceName]; return new DSUtils.Promise(function (resolve, reject) { id = DSUtils.resolveId(definition, id); if (!definition) { reject(new DSErrors.NER(resourceName)); } else if (!DSUtils._sn(id)) { reject(DSUtils._snErr('id')); } else { options = DSUtils._(definition, options); options.logFn('update', id, attrs, options); resolve(attrs); } }).then(function (attrs) { return options.beforeValidate.call(attrs, options, attrs); }) .then(function (attrs) { return options.validate.call(attrs, options, attrs); }) .then(function (attrs) { return options.afterValidate.call(attrs, options, attrs); }) .then(function (attrs) { return options.beforeUpdate.call(attrs, options, attrs); }) .then(function (attrs) { if (options.notify) { definition.emit('DS.beforeUpdate', definition, DSUtils.copy(attrs)); } return _this.getAdapter(options).update(definition, id, attrs, options); }) .then(function (data) { return options.afterUpdate.call(data, options, data); }) .then(function (attrs) { if (options.notify) { definition.emit('DS.afterUpdate', definition, DSUtils.copy(attrs)); } if (options.cacheResponse) { return _this.inject(definition.n, attrs, options); } else { return _this.createInstance(resourceName, attrs, options); } }); } module.exports = update; },{"../../errors":48,"../../utils":50}],36:[function(require,module,exports){ var DSUtils = require('../../utils'); var DSErrors = require('../../errors'); function updateAll(resourceName, attrs, params, options) { var _this = this; var definition = _this.defs[resourceName]; return new DSUtils.Promise(function (resolve, reject) { if (!definition) { reject(new DSErrors.NER(resourceName)); } else { options = DSUtils._(definition, options); options.logFn('updateAll', attrs, params, options); resolve(attrs); } }).then(function (attrs) { return options.beforeValidate.call(attrs, options, attrs); }) .then(function (attrs) { return options.validate.call(attrs, options, attrs); }) .then(function (attrs) { return options.afterValidate.call(attrs, options, attrs); }) .then(function (attrs) { return options.beforeUpdate.call(attrs, options, attrs); }) .then(function (attrs) { if (options.notify) { definition.emit('DS.beforeUpdate', definition, DSUtils.copy(attrs)); } return _this.getAdapter(options).updateAll(definition, attrs, params, options); }) .then(function (data) { return options.afterUpdate.call(data, options, data); }) .then(function (data) { if (options.notify) { definition.emit('DS.afterUpdate', definition, DSUtils.copy(attrs)); } if (options.cacheResponse) { return _this.inject(definition.n, data, options); } else { var instances = []; DSUtils.forEach(data, function (item) { instances.push(_this.createInstance(resourceName, item, options)); }); return instances; } }); } module.exports = updateAll; },{"../../errors":48,"../../utils":50}],37:[function(require,module,exports){ var DSUtils = require('../utils'); var DSErrors = require('../errors'); var syncMethods = require('./sync_methods'); var asyncMethods = require('./async_methods'); var Schemator; function lifecycleNoopCb(resource, attrs, cb) { cb(null, attrs); } function lifecycleNoop(resource, attrs) { return attrs; } function compare(orderBy, index, a, b) { var def = orderBy[index]; var cA = DSUtils.get(a, def[0]), cB = DSUtils.get(b, def[0]); if (DSUtils._s(cA)) { cA = DSUtils.upperCase(cA); } if (DSUtils._s(cB)) { cB = DSUtils.upperCase(cB); } if (def[1] === 'DESC') { if (cB < cA) { return -1; } else if (cB > cA) { return 1; } else { if (index < orderBy.length - 1) { return compare(orderBy, index + 1, a, b); } else { return 0; } } } else { if (cA < cB) { return -1; } else if (cA > cB) { return 1; } else { if (index < orderBy.length - 1) { return compare(orderBy, index + 1, a, b); } else { return 0; } } } } function Defaults() { } var defaultsPrototype = Defaults.prototype; defaultsPrototype.actions = {}; defaultsPrototype.afterCreate = lifecycleNoopCb; defaultsPrototype.afterCreateInstance = lifecycleNoop; defaultsPrototype.afterDestroy = lifecycleNoopCb; defaultsPrototype.afterEject = lifecycleNoop; defaultsPrototype.afterInject = lifecycleNoop; defaultsPrototype.afterReap = lifecycleNoop; defaultsPrototype.afterUpdate = lifecycleNoopCb; defaultsPrototype.afterValidate = lifecycleNoopCb; defaultsPrototype.allowSimpleWhere = true; defaultsPrototype.basePath = ''; defaultsPrototype.beforeCreate = lifecycleNoopCb; defaultsPrototype.beforeCreateInstance = lifecycleNoop; defaultsPrototype.beforeDestroy = lifecycleNoopCb; defaultsPrototype.beforeEject = lifecycleNoop; defaultsPrototype.beforeInject = lifecycleNoop; defaultsPrototype.beforeReap = lifecycleNoop; defaultsPrototype.beforeUpdate = lifecycleNoopCb; defaultsPrototype.beforeValidate = lifecycleNoopCb; defaultsPrototype.bypassCache = false; defaultsPrototype.cacheResponse = !!DSUtils.w; defaultsPrototype.defaultAdapter = 'http'; defaultsPrototype.debug = true; defaultsPrototype.eagerEject = false; // TODO: Implement eagerInject in DS#create defaultsPrototype.eagerInject = false; defaultsPrototype.endpoint = ''; defaultsPrototype.error = console ? function (a, b, c) { console[typeof console.error === 'function' ? 'error' : 'log'](a, b, c); } : false; defaultsPrototype.errorFn = function (a, b) { if (this.error && typeof this.error === 'function') { try { if (typeof a === 'string') { throw new Error(a); } else { throw a; } } catch (err) { a = err; } this.error(this.name || null, a || null, b || null); } }; defaultsPrototype.fallbackAdapters = ['http']; defaultsPrototype.findBelongsTo = true; defaultsPrototype.findHasOne = true; defaultsPrototype.findHasMany = true; defaultsPrototype.findInverseLinks = true; defaultsPrototype.idAttribute = 'id'; defaultsPrototype.ignoredChanges = [/\$/]; defaultsPrototype.ignoreMissing = false; defaultsPrototype.keepChangeHistory = false; defaultsPrototype.loadFromServer = false; defaultsPrototype.log = console ? function (a, b, c, d, e) { console[typeof console.info === 'function' ? 'info' : 'log'](a, b, c, d, e); } : false; defaultsPrototype.logFn = function (a, b, c, d) { if (this.debug && this.log && typeof this.log === 'function') { this.log(this.name || null, a || null, b || null, c || null, d || null); } }; defaultsPrototype.maxAge = false; defaultsPrototype.notify = !!DSUtils.w; defaultsPrototype.reapAction = !!DSUtils.w ? 'inject' : 'none'; defaultsPrototype.reapInterval = !!DSUtils.w ? 30000 : false; defaultsPrototype.resetHistoryOnInject = true; defaultsPrototype.strategy = 'single'; defaultsPrototype.upsert = !!DSUtils.w; defaultsPrototype.useClass = true; defaultsPrototype.useFilter = false; defaultsPrototype.validate = lifecycleNoopCb; defaultsPrototype.defaultFilter = function (collection, resourceName, params, options) { var _this = this; var filtered = collection; var where = null; var reserved = { skip: '', offset: '', where: '', limit: '', orderBy: '', sort: '' }; params = params || {}; options = options || {}; if (DSUtils._o(params.where)) { where = params.where; } else { where = {}; } if (options.allowSimpleWhere) { DSUtils.forOwn(params, function (value, key) { if (!(key in reserved) && !(key in where)) { where[key] = { '==': value }; } }); } if (DSUtils.isEmpty(where)) { where = null; } if (where) { filtered = DSUtils.filter(filtered, function (attrs) { var first = true; var keep = true; DSUtils.forOwn(where, function (clause, field) { if (DSUtils._s(clause)) { clause = { '===': clause }; } else if (DSUtils._n(clause) || DSUtils.isBoolean(clause)) { clause = { '==': clause }; } if (DSUtils._o(clause)) { DSUtils.forOwn(clause, function (term, op) { var expr; var isOr = op[0] === '|'; var val = attrs[field]; op = isOr ? op.substr(1) : op; if (op === '==') { expr = val == term; } else if (op === '===') { expr = val === term; } else if (op === '!=') { expr = val != term; } else if (op === '!==') { expr = val !== term; } else if (op === '>') { expr = val > term; } else if (op === '>=') { expr = val >= term; } else if (op === '<') { expr = val < term; } else if (op === '<=') { expr = val <= term; } else if (op === 'isectEmpty') { expr = !DSUtils.intersection((val || []), (term || [])).length; } else if (op === 'isectNotEmpty') { expr = DSUtils.intersection((val || []), (term || [])).length; } else if (op === 'in') { if (DSUtils._s(term)) { expr = term.indexOf(val) !== -1; } else { expr = DSUtils.contains(term, val); } } else if (op === 'notIn') { if (DSUtils._s(term)) { expr = term.indexOf(val) === -1; } else { expr = !DSUtils.contains(term, val); } } else if (op === 'contains') { if (DSUtils._s(val)) { expr = val.indexOf(term) !== -1; } else { expr = DSUtils.contains(val, term); } } else if (op === 'notContains') { if (DSUtils._s(val)) { expr = val.indexOf(term) === -1; } else { expr = !DSUtils.contains(val, term); } } if (expr !== undefined) { keep = first ? expr : (isOr ? keep || expr : keep && expr); } first = false; }); } }); return keep; }); } var orderBy = null; if (DSUtils._s(params.orderBy)) { orderBy = [ [params.orderBy, 'ASC'] ]; } else if (DSUtils._a(params.orderBy)) { orderBy = params.orderBy; } if (!orderBy && DSUtils._s(params.sort)) { orderBy = [ [params.sort, 'ASC'] ]; } else if (!orderBy && DSUtils._a(params.sort)) { orderBy = params.sort; } // Apply 'orderBy' if (orderBy) { var index = 0; DSUtils.forEach(orderBy, function (def, i) { if (DSUtils._s(def)) { orderBy[i] = [def, 'ASC']; } else if (!DSUtils._a(def)) { throw new DSErrors.IA('DS.filter(resourceName[, params][, options]): ' + DSUtils.toJson(def) + ': Must be a string or an array!', { params: { 'orderBy[i]': { actual: typeof def, expected: 'string|array' } } }); } }); filtered = DSUtils.sort(filtered, function (a, b) { return compare(orderBy, index, a, b); }); } var limit = DSUtils._n(params.limit) ? params.limit : null; var skip = null; if (DSUtils._n(params.skip)) { skip = params.skip; } else if (DSUtils._n(params.offset)) { skip = params.offset; } // Apply 'limit' and 'skip' if (limit && skip) { filtered = DSUtils.slice(filtered, skip, Math.min(filtered.length, skip + limit)); } else if (DSUtils._n(limit)) { filtered = DSUtils.slice(filtered, 0, Math.min(filtered.length, limit)); } else if (DSUtils._n(skip)) { if (skip < filtered.length) { filtered = DSUtils.slice(filtered, skip); } else { filtered = []; } } return filtered; }; function DS(options) { var _this = this; options = options || {}; try { Schemator = require('js-data-schema'); } catch (e) { } if (!Schemator || DSUtils.isEmpty(Schemator)) { try { Schemator = window.Schemator; } catch (e) { } } if (Schemator || options.schemator) { _this.schemator = options.schemator || new Schemator(); } _this.store = {}; // alias store, shaves 0.1 kb off the minified build _this.s = _this.store; _this.definitions = {}; // alias definitions, shaves 0.3 kb off the minified build _this.defs = _this.definitions; _this.adapters = {}; _this.defaults = new Defaults(); _this.observe = DSUtils.observe; DSUtils.forOwn(options, function (v, k) { _this.defaults[k] = v; }); _this.defaults.logFn('new data store created', _this.defaults); } var dsPrototype = DS.prototype; dsPrototype.getAdapter = function getAdapter(options) { var errorIfNotExist = false; options = options || {}; this.defaults.logFn('getAdapter', options); if (DSUtils._s(options)) { errorIfNotExist = true; options = { adapter: options }; } var adapter = this.adapters[options.adapter]; if (adapter) { return adapter; } else if (errorIfNotExist) { throw new Error(options.adapter + ' is not a registered adapter!'); } else { return this.adapters[options.defaultAdapter]; } }; dsPrototype.getAdapter.shorthand = false; dsPrototype.registerAdapter = function registerAdapter(name, Adapter, options) { var _this = this; options = options || {}; _this.defaults.logFn('registerAdapter', name, Adapter, options); if (DSUtils.isFunction(Adapter)) { _this.adapters[name] = new Adapter(options); } else { _this.adapters[name] = Adapter; } if (options.default) { _this.defaults.defaultAdapter = name; } _this.defaults.logFn('default adapter is ' + _this.defaults.defaultAdapter); }; dsPrototype.registerAdapter.shorthand = false; dsPrototype.is = function is(resourceName, instance) { var definition = this.defs[resourceName]; if (!definition) { throw new DSErrors.NER(resourceName); } return instance instanceof definition[definition.class]; }; dsPrototype.errors = require('../errors'); dsPrototype.utils = DSUtils; DSUtils.deepMixIn(dsPrototype, syncMethods); DSUtils.deepMixIn(dsPrototype, asyncMethods); module.exports = DS; },{"../errors":48,"../utils":50,"./async_methods":32,"./sync_methods":42,"js-data-schema":"js-data-schema"}],38:[function(require,module,exports){ /*jshint evil:true, loopfunc:true*/ var DSUtils = require('../../utils'); var DSErrors = require('../../errors'); function Resource(options) { DSUtils.deepMixIn(this, options); if ('endpoint' in options) { this.endpoint = options.endpoint; } else { this.endpoint = this.name; } } var instanceMethods = [ 'compute', 'refresh', 'save', 'update', 'destroy', 'loadRelations', 'changeHistory', 'changes', 'hasChanges', 'lastModified', 'lastSaved', 'link', 'linkInverse', 'previous', 'unlinkInverse' ]; function defineResource(definition) { var _this = this; var definitions = _this.defs; if (DSUtils._s(definition)) { definition = { name: definition.replace(/\s/gi, '') }; } if (!DSUtils._o(definition)) { throw DSUtils._oErr('definition'); } else if (!DSUtils._s(definition.name)) { throw new DSErrors.IA('"name" must be a string!'); } else if (_this.s[definition.name]) { throw new DSErrors.R(definition.name + ' is already registered!'); } try { // Inherit from global defaults Resource.prototype = _this.defaults; definitions[definition.name] = new Resource(definition); var def = definitions[definition.name]; // alias name, shaves 0.08 kb off the minified build def.n = def.name; def.logFn('Preparing resource.'); if (!DSUtils._s(def.idAttribute)) { throw new DSErrors.IA('"idAttribute" must be a string!'); } // Setup nested parent configuration if (def.relations) { def.relationList = []; def.relationFields = []; DSUtils.forOwn(def.relations, function (relatedModels, type) { DSUtils.forOwn(relatedModels, function (defs, relationName) { if (!DSUtils._a(defs)) { relatedModels[relationName] = [defs]; } DSUtils.forEach(relatedModels[relationName], function (d) { d.type = type; d.relation = relationName; d.name = def.n; def.relationList.push(d); def.relationFields.push(d.localField); }); }); }); if (def.relations.belongsTo) { DSUtils.forOwn(def.relations.belongsTo, function (relatedModel, modelName) { DSUtils.forEach(relatedModel, function (relation) { if (relation.parent) { def.parent = modelName; def.parentKey = relation.localKey; def.parentField = relation.localField; } }); }); } if (typeof Object.freeze === 'function') { Object.freeze(def.relations); Object.freeze(def.relationList); } } def.getResource = function (resourceName) { return _this.defs[resourceName]; }; def.getEndpoint = function (id, options) { options.params = options.params || {}; var item; var parentKey = def.parentKey; var endpoint = options.hasOwnProperty('endpoint') ? options.endpoint : def.endpoint; var parentField = def.parentField; var parentDef = definitions[def.parent]; var parentId = options.params[parentKey]; if (parentId === false || !parentKey || !parentDef) { if (parentId === false) { delete options.params[parentKey]; } return endpoint; } else { delete options.params[parentKey]; if (DSUtils._sn(id)) { item = def.get(id); } else if (DSUtils._o(id)) { item = id; } if (item) { parentId = parentId || item[parentKey] || (item[parentField] ? item[parentField][parentDef.idAttribute] : null); } if (parentId) { delete options.endpoint; var _options = {}; DSUtils.forOwn(options, function (value, key) { _options[key] = value; }); return DSUtils.makePath(parentDef.getEndpoint(parentId, DSUtils._(parentDef, _options)), parentId, endpoint); } else { return endpoint; } } }; // Remove this in v0.11.0 and make a breaking change notice // the the `filter` option has been renamed to `defaultFilter` if (def.filter) { def.defaultFilter = def.filter; delete def.filter; } // Create the wrapper class for the new resource def['class'] = DSUtils.pascalCase(def.name); try { if (typeof def.useClass === 'function') { eval('function ' + def['class'] + '() { def.useClass.call(this); }'); def[def['class']] = eval(def['class']); def[def['class']].prototype = (function (proto) { function Ctor() { } Ctor.prototype = proto; return new Ctor(); })(def.useClass.prototype); } else { eval('function ' + def['class'] + '() {}'); def[def['class']] = eval(def['class']); } } catch (e) { def[def['class']] = function () { }; } // Apply developer-defined methods if (def.methods) { DSUtils.deepMixIn(def[def['class']].prototype, def.methods); } def[def['class']].prototype.set = function (key, value) { DSUtils.set(this, key, value); var observer = _this.s[def.n].observers[this[def.idAttribute]]; if (observer && !DSUtils.observe.hasObjectObserve) { observer.deliver(); } else { _this.compute(def.n, this); } return this; }; def[def['class']].prototype.get = function (key) { return DSUtils.get(this, key); }; // Prepare for computed properties if (def.computed) { DSUtils.forOwn(def.computed, function (fn, field) { if (DSUtils.isFunction(fn)) { def.computed[field] = [fn]; fn = def.computed[field]; } if (def.methods && field in def.methods) { def.errorFn('Computed property "' + field + '" conflicts with previously defined prototype method!'); } var deps; if (fn.length === 1) { var match = fn[0].toString().match(/function.*?\(([\s\S]*?)\)/); deps = match[1].split(','); def.computed[field] = deps.concat(fn); fn = def.computed[field]; if (deps.length) { def.errorFn('Use the computed property array syntax for compatibility with minified code!'); } } deps = fn.slice(0, fn.length - 1); DSUtils.forEach(deps, function (val, index) { deps[index] = val.trim(); }); fn.deps = DSUtils.filter(deps, function (dep) { return !!dep; }); }); } if (definition.schema && _this.schemator) { def.schema = _this.schemator.defineSchema(def.n, definition.schema); if (!definition.hasOwnProperty('validate')) { def.validate = function (resourceName, attrs, cb) { def.schema.validate(attrs, { ignoreMissing: def.ignoreMissing }, function (err) { if (err) { return cb(err); } else { return cb(null, attrs); } }); }; } } DSUtils.forEach(instanceMethods, function (name) { def[def['class']].prototype['DS' + DSUtils.pascalCase(name)] = function () { var args = Array.prototype.slice.call(arguments); args.unshift(this[def.idAttribute] || this); args.unshift(def.n); return _this[name].apply(_this, args); }; }); def[def['class']].prototype.DSCreate = function () { var args = Array.prototype.slice.call(arguments); args.unshift(this); args.unshift(def.n); return _this.create.apply(_this, args); }; // Initialize store data for the new resource _this.s[def.n] = { collection: [], expiresHeap: new DSUtils.DSBinaryHeap(function (x) { return x.expires; }, function (x, y) { return x.item === y; }), completedQueries: {}, queryData: {}, pendingQueries: {}, index: {}, modified: {}, saved: {}, previousAttributes: {}, observers: {}, changeHistories: {}, changeHistory: [], collectionModified: 0 }; if (def.reapInterval) { setInterval(function () { _this.reap(def.n, { isInterval: true }); }, def.reapInterval); } // Proxy DS methods with shorthand ones for (var key in _this) { if (typeof _this[key] === 'function') { if (_this[key].shorthand !== false) { (function (k) { def[k] = function () { var args = Array.prototype.slice.call(arguments); args.unshift(def.n); return _this[k].apply(_this, args); }; })(key); } else { (function (k) { def[k] = function () { return _this[k].apply(_this, Array.prototype.slice.call(arguments)); }; })(key); } } } def.beforeValidate = DSUtils.promisify(def.beforeValidate); def.validate = DSUtils.promisify(def.validate); def.afterValidate = DSUtils.promisify(def.afterValidate); def.beforeCreate = DSUtils.promisify(def.beforeCreate); def.afterCreate = DSUtils.promisify(def.afterCreate); def.beforeUpdate = DSUtils.promisify(def.beforeUpdate); def.afterUpdate = DSUtils.promisify(def.afterUpdate); def.beforeDestroy = DSUtils.promisify(def.beforeDestroy); def.afterDestroy = DSUtils.promisify(def.afterDestroy); DSUtils.forOwn(def.actions, function addAction(action, name) { if (def[name]) { throw new Error('Cannot override existing method "' + name + '"!'); } def[name] = function (options) { options = options || {}; var adapter = _this.getAdapter(action.adapter || 'http'); var config = DSUtils.deepMixIn({}, action); if (!options.hasOwnProperty('endpoint') && config.endpoint) { options.endpoint = config.endpoint; } if (typeof options.getEndpoint === 'function') { config.url = options.getEndpoint(def, options); } else { config.url = DSUtils.makePath(options.basePath || adapter.defaults.basePath || def.basePath, def.getEndpoint(null, options), name); } config.method = config.method || 'GET'; DSUtils.deepMixIn(config, options); return adapter.HTTP(config); }; }); // Mix-in events DSUtils.Events(def); def.logFn('Done preparing resource.'); return def; } catch (err) { delete definitions[definition.name]; delete _this.s[definition.name]; throw err; } } module.exports = defineResource; },{"../../errors":48,"../../utils":50}],39:[function(require,module,exports){ var DSUtils = require('../../utils'); var DSErrors = require('../../errors'); function eject(resourceName, id, options) { var _this = this; var definition = _this.defs[resourceName]; var resource = _this.s[resourceName]; var item; var found = false; id = DSUtils.resolveId(definition, id); if (!definition) { throw new DSErrors.NER(resourceName); } else if (!DSUtils._sn(id)) { throw DSUtils._snErr('id'); } options = DSUtils._(definition, options); options.logFn('eject', id, options); for (var i = 0; i < resource.collection.length; i++) { if (resource.collection[i][definition.idAttribute] == id) { item = resource.collection[i]; resource.expiresHeap.remove(item); found = true; break; } } if (found) { if (options.notify) { definition.beforeEject(options, item); definition.emit('DS.beforeEject', definition, DSUtils.copy(item)); } _this.unlinkInverse(definition.n, id); resource.collection.splice(i, 1); if (DSUtils.w) { resource.observers[id].close(); } delete resource.observers[id]; delete resource.index[id]; delete resource.previousAttributes[id]; delete resource.completedQueries[id]; delete resource.pendingQueries[id]; DSUtils.forEach(resource.changeHistories[id], function (changeRecord) { DSUtils.remove(resource.changeHistory, changeRecord); }); var toRemove = []; DSUtils.forOwn(resource.queryData, function (items, queryHash) { if (items.$$injected) { DSUtils.remove(items, item); } if (!items.length) { toRemove.push(queryHash); } }); DSUtils.forEach(toRemove, function (queryHash) { delete resource.completedQueries[queryHash]; delete resource.queryData[queryHash]; }); delete resource.changeHistories[id]; delete resource.modified[id]; delete resource.saved[id]; resource.collectionModified = DSUtils.updateTimestamp(resource.collectionModified); if (options.notify) { definition.afterEject(options, item); definition.emit('DS.afterEject', definition, DSUtils.copy(item)); } return item; } } module.exports = eject; },{"../../errors":48,"../../utils":50}],40:[function(require,module,exports){ var DSUtils = require('../../utils'); var DSErrors = require('../../errors'); function ejectAll(resourceName, params, options) { var _this = this; var definition = _this.defs[resourceName]; params = params || {}; if (!definition) { throw new DSErrors.NER(resourceName); } else if (!DSUtils._o(params)) { throw DSUtils._oErr('params'); } definition.logFn('ejectAll', params, options); var resource = _this.s[resourceName]; if (DSUtils.isEmpty(params)) { resource.completedQueries = {}; } var queryHash = DSUtils.toJson(params); var items = _this.filter(definition.n, params); var ids = []; DSUtils.forEach(items, function (item) { if (item && item[definition.idAttribute]) { ids.push(item[definition.idAttribute]); } }); DSUtils.forEach(ids, function (id) { _this.eject(definition.n, id, options); }); delete resource.completedQueries[queryHash]; resource.collectionModified = DSUtils.updateTimestamp(resource.collectionModified); return items; } module.exports = ejectAll; },{"../../errors":48,"../../utils":50}],41:[function(require,module,exports){ var DSUtils = require('../../utils'); var DSErrors = require('../../errors'); function filter(resourceName, params, options) { var _this = this; var definition = _this.defs[resourceName]; var resource = _this.s[resourceName]; if (!definition) { throw new DSErrors.NER(resourceName); } else if (params && !DSUtils._o(params)) { throw DSUtils._oErr('params'); } options = DSUtils._(definition, options); options.logFn('filter', params, options); // Protect against null params = params || {}; var queryHash = DSUtils.toJson(params); if (!(queryHash in resource.completedQueries) && options.loadFromServer) { // This particular query has never been completed if (!resource.pendingQueries[queryHash]) { // This particular query has never even been started _this.findAll(resourceName, params, options); } } return definition.defaultFilter.call(_this, resource.collection, resourceName, params, options); } module.exports = filter; },{"../../errors":48,"../../utils":50}],42:[function(require,module,exports){ var DSUtils = require('../../utils'); var DSErrors = require('../../errors'); var NER = DSErrors.NER; var IA = DSErrors.IA; var R = DSErrors.R; function changes(resourceName, id, options) { var _this = this; var definition = _this.defs[resourceName]; options = options || {}; id = DSUtils.resolveId(definition, id); if (!definition) { throw new NER(resourceName); } else if (!DSUtils._sn(id)) { throw DSUtils._snErr('id'); } options = DSUtils._(definition, options); options.logFn('changes', id, options); var item = _this.get(resourceName, id); if (item) { if (DSUtils.w) { _this.s[resourceName].observers[id].deliver(); } var diff = DSUtils.diffObjectFromOldObject(item, _this.s[resourceName].previousAttributes[id], DSUtils.equals, options.ignoredChanges); DSUtils.forOwn(diff, function (changeset, name) { var toKeep = []; DSUtils.forOwn(changeset, function (value, field) { if (!DSUtils.isFunction(value)) { toKeep.push(field); } }); diff[name] = DSUtils.pick(diff[name], toKeep); }); DSUtils.forEach(definition.relationFields, function (field) { delete diff.added[field]; delete diff.removed[field]; delete diff.changed[field]; }); return diff; } } function changeHistory(resourceName, id) { var _this = this; var definition = _this.defs[resourceName]; var resource = _this.s[resourceName]; id = DSUtils.resolveId(definition, id); if (resourceName && !_this.defs[resourceName]) { throw new NER(resourceName); } else if (id && !DSUtils._sn(id)) { throw DSUtils._snErr('id'); } definition.logFn('changeHistory', id); if (!definition.keepChangeHistory) { definition.errorFn('changeHistory is disabled for this resource!'); } else { if (resourceName) { var item = _this.get(resourceName, id); if (item) { return resource.changeHistories[id]; } } else { return resource.changeHistory; } } } function compute(resourceName, instance) { var _this = this; var definition = _this.defs[resourceName]; instance = DSUtils.resolveItem(_this.s[resourceName], instance); if (!definition) { throw new NER(resourceName); } else if (!instance) { throw new R('Item not in the store!'); } else if (!DSUtils._o(instance) && !DSUtils._sn(instance)) { throw new IA('"instance" must be an object, string or number!'); } definition.logFn('compute', instance); DSUtils.forOwn(definition.computed, function (fn, field) { DSUtils.compute.call(instance, fn, field); }); return instance; } function createInstance(resourceName, attrs, options) { var definition = this.defs[resourceName]; var item; attrs = attrs || {}; if (!definition) { throw new NER(resourceName); } else if (attrs && !DSUtils.isObject(attrs)) { throw new IA('"attrs" must be an object!'); } options = DSUtils._(definition, options); options.logFn('createInstance', attrs, options); if (options.notify) { options.beforeCreateInstance(options, attrs); } if (options.useClass) { var Constructor = definition[definition.class]; item = new Constructor(); } else { item = {}; } DSUtils.deepMixIn(item, attrs); if (options.notify) { options.afterCreateInstance(options, attrs); } return item; } function diffIsEmpty(diff) { return !(DSUtils.isEmpty(diff.added) && DSUtils.isEmpty(diff.removed) && DSUtils.isEmpty(diff.changed)); } function digest() { this.observe.Platform.performMicrotaskCheckpoint(); } function get(resourceName, id, options) { var _this = this; var definition = _this.defs[resourceName]; if (!definition) { throw new NER(resourceName); } else if (!DSUtils._sn(id)) { throw DSUtils._snErr('id'); } options = DSUtils._(definition, options); options.logFn('get', id, options); // cache miss, request resource from server var item = _this.s[resourceName].index[id]; if (!item && options.loadFromServer) { _this.find(resourceName, id, options); } // return resource from cache return item; } function getAll(resourceName, ids) { var _this = this; var definition = _this.defs[resourceName]; var resource = _this.s[resourceName]; var collection = []; if (!definition) { throw new NER(resourceName); } else if (ids && !DSUtils._a(ids)) { throw DSUtils._aErr('ids'); } definition.logFn('getAll', ids); if (DSUtils._a(ids)) { var length = ids.length; for (var i = 0; i < length; i++) { if (resource.index[ids[i]]) { collection.push(resource.index[ids[i]]); } } } else { collection = resource.collection.slice(); } return collection; } function hasChanges(resourceName, id) { var _this = this; var definition = _this.defs[resourceName]; id = DSUtils.resolveId(definition, id); if (!definition) { throw new NER(resourceName); } else if (!DSUtils._sn(id)) { throw DSUtils._snErr('id'); } definition.logFn('hasChanges', id); // return resource from cache if (_this.get(resourceName, id)) { return diffIsEmpty(_this.changes(resourceName, id)); } else { return false; } } function lastModified(resourceName, id) { var definition = this.defs[resourceName]; var resource = this.s[resourceName]; id = DSUtils.resolveId(definition, id); if (!definition) { throw new NER(resourceName); } definition.logFn('lastModified', id); if (id) { if (!(id in resource.modified)) { resource.modified[id] = 0; } return resource.modified[id]; } return resource.collectionModified; } function lastSaved(resourceName, id) { var definition = this.defs[resourceName]; var resource = this.s[resourceName]; id = DSUtils.resolveId(definition, id); if (!definition) { throw new NER(resourceName); } definition.logFn('lastSaved', id); if (!(id in resource.saved)) { resource.saved[id] = 0; } return resource.saved[id]; } function previous(resourceName, id) { var _this = this; var definition = _this.defs[resourceName]; var resource = _this.s[resourceName]; id = DSUtils.resolveId(definition, id); if (!definition) { throw new NER(resourceName); } else if (!DSUtils._sn(id)) { throw DSUtils._snErr('id'); } definition.logFn('previous', id); // return resource from cache return resource.previousAttributes[id] ? DSUtils.copy(resource.previousAttributes[id]) : undefined; } module.exports = { changes: changes, changeHistory: changeHistory, compute: compute, createInstance: createInstance, defineResource: require('./defineResource'), digest: digest, eject: require('./eject'), ejectAll: require('./ejectAll'), filter: require('./filter'), get: get, getAll: getAll, hasChanges: hasChanges, inject: require('./inject'), lastModified: lastModified, lastSaved: lastSaved, link: require('./link'), linkAll: require('./linkAll'), linkInverse: require('./linkInverse'), previous: previous, unlinkInverse: require('./unlinkInverse') }; },{"../../errors":48,"../../utils":50,"./defineResource":38,"./eject":39,"./ejectAll":40,"./filter":41,"./inject":43,"./link":44,"./linkAll":45,"./linkInverse":46,"./unlinkInverse":47}],43:[function(require,module,exports){ var DSUtils = require('../../utils'); var DSErrors = require('../../errors'); function _getReactFunction(DS, definition, resource) { var name = definition.n; return function _react(added, removed, changed, oldValueFn, firstTime) { var target = this; var item; var innerId = (oldValueFn && oldValueFn(definition.idAttribute)) ? oldValueFn(definition.idAttribute) : target[definition.idAttribute]; DSUtils.forEach(definition.relationFields, function (field) { delete added[field]; delete removed[field]; delete changed[field]; }); if (!DSUtils.isEmpty(added) || !DSUtils.isEmpty(removed) || !DSUtils.isEmpty(changed) || firstTime) { item = DS.get(name, innerId); resource.modified[innerId] = DSUtils.updateTimestamp(resource.modified[innerId]); resource.collectionModified = DSUtils.updateTimestamp(resource.collectionModified); if (definition.keepChangeHistory) { var changeRecord = { resourceName: name, target: item, added: added, removed: removed, changed: changed, timestamp: resource.modified[innerId] }; resource.changeHistories[innerId].push(changeRecord); resource.changeHistory.push(changeRecord); } } if (definition.computed) { item = item || DS.get(name, innerId); DSUtils.forOwn(definition.computed, function (fn, field) { var compute = false; // check if required fields changed DSUtils.forEach(fn.deps, function (dep) { if (dep in added || dep in removed || dep in changed || !(field in item)) { compute = true; } }); compute = compute || !fn.deps.length; if (compute) { DSUtils.compute.call(item, fn, field); } }); } if (definition.relations) { item = item || DS.get(name, innerId); DSUtils.forEach(definition.relationList, function (def) { if (item[def.localField] && (def.localKey in added || def.localKey in removed || def.localKey in changed)) { DS.link(name, item[definition.idAttribute], [def.relation]); } }); } if (definition.idAttribute in changed) { definition.errorFn('Doh! You just changed the primary key of an object! Your data for the "' + name + '" resource is now in an undefined (probably broken) state.'); } }; } function _inject(definition, resource, attrs, options) { var _this = this; var _react = _getReactFunction(_this, definition, resource, attrs, options); var injected; if (DSUtils._a(attrs)) { injected = []; for (var i = 0; i < attrs.length; i++) { injected.push(_inject.call(_this, definition, resource, attrs[i], options)); } } else { // check if "idAttribute" is a computed property var c = definition.computed; var idA = definition.idAttribute; if (c && c[idA]) { var args = []; DSUtils.forEach(c[idA].deps, function (dep) { args.push(attrs[dep]); }); attrs[idA] = c[idA][c[idA].length - 1].apply(attrs, args); } if (!(idA in attrs)) { var error = new DSErrors.R(definition.n + '.inject: "attrs" must contain the property specified by `idAttribute`!'); options.errorFn(error); throw error; } else { try { DSUtils.forEach(definition.relationList, function (def) { var relationName = def.relation; var relationDef = _this.defs[relationName]; var toInject = attrs[def.localField]; if (toInject) { if (!relationDef) { throw new DSErrors.R(definition.n + ' relation is defined but the resource is not!'); } if (DSUtils._a(toInject)) { var items = []; DSUtils.forEach(toInject, function (toInjectItem) { if (toInjectItem !== _this.s[relationName][toInjectItem[relationDef.idAttribute]]) { try { var injectedItem = _this.inject(relationName, toInjectItem, options); if (def.foreignKey) { injectedItem[def.foreignKey] = attrs[definition.idAttribute]; } items.push(injectedItem); } catch (err) { options.errorFn(err, 'Failed to inject ' + def.type + ' relation: "' + relationName + '"!'); } } }); attrs[def.localField] = items; } else { if (toInject !== _this.s[relationName][toInject[relationDef.idAttribute]]) { try { attrs[def.localField] = _this.inject(relationName, attrs[def.localField], options); if (def.foreignKey) { attrs[def.localField][def.foreignKey] = attrs[definition.idAttribute]; } } catch (err) { options.errorFn(err, 'Failed to inject ' + def.type + ' relation: "' + relationName + '"!'); } } } } }); var id = attrs[idA]; var item = _this.get(definition.n, id); var initialLastModified = item ? resource.modified[id] : 0; if (!item) { if (options.useClass) { if (attrs instanceof definition[definition['class']]) { item = attrs; } else { item = new definition[definition['class']](); } } else { item = {}; } resource.previousAttributes[id] = DSUtils.copy(attrs); DSUtils.deepMixIn(item, attrs); resource.collection.push(item); resource.changeHistories[id] = []; if (DSUtils.w) { resource.observers[id] = new _this.observe.ObjectObserver(item); resource.observers[id].open(_react, item); } resource.index[id] = item; _react.call(item, {}, {}, {}, null, true); } else { DSUtils.deepMixIn(item, attrs); if (definition.resetHistoryOnInject) { resource.previousAttributes[id] = {}; DSUtils.deepMixIn(resource.previousAttributes[id], attrs); if (resource.changeHistories[id].length) { DSUtils.forEach(resource.changeHistories[id], function (changeRecord) { DSUtils.remove(resource.changeHistory, changeRecord); }); resource.changeHistories[id].splice(0, resource.changeHistories[id].length); } } if (DSUtils.w) { resource.observers[id].deliver(); } } resource.saved[id] = DSUtils.updateTimestamp(resource.saved[id]); resource.modified[id] = initialLastModified && resource.modified[id] === initialLastModified ? DSUtils.updateTimestamp(resource.modified[id]) : resource.modified[id]; resource.expiresHeap.remove(item); resource.expiresHeap.push({ item: item, timestamp: resource.saved[id], expires: definition.maxAge ? resource.saved[id] + definition.maxAge : Number.MAX_VALUE }); injected = item; } catch (err) { options.errorFn(err, attrs); } } } return injected; } function _link(definition, injected, options) { var _this = this; DSUtils.forEach(definition.relationList, function (def) { if (options.findBelongsTo && def.type === 'belongsTo' && injected[definition.idAttribute]) { _this.link(definition.n, injected[definition.idAttribute], [def.relation]); } else if ((options.findHasMany && def.type === 'hasMany') || (options.findHasOne && def.type === 'hasOne')) { _this.link(definition.n, injected[definition.idAttribute], [def.relation]); } }); } function inject(resourceName, attrs, options) { var _this = this; var definition = _this.defs[resourceName]; var resource = _this.s[resourceName]; var injected; if (!definition) { throw new DSErrors.NER(resourceName); } else if (!DSUtils._o(attrs) && !DSUtils._a(attrs)) { throw new DSErrors.IA(resourceName + '.inject: "attrs" must be an object or an array!'); } var name = definition.n; options = DSUtils._(definition, options); options.logFn('inject', attrs, options); if (options.notify) { options.beforeInject(options, attrs); definition.emit('DS.beforeInject', definition, DSUtils.copy(attrs)); } injected = _inject.call(_this, definition, resource, attrs, options); resource.collectionModified = DSUtils.updateTimestamp(resource.collectionModified); if (options.findInverseLinks) { if (DSUtils._a(injected)) { if (injected.length) { _this.linkInverse(name, injected[0][definition.idAttribute]); } } else { _this.linkInverse(name, injected[definition.idAttribute]); } } if (DSUtils._a(injected)) { DSUtils.forEach(injected, function (injectedI) { _link.call(_this, definition, injectedI, options); }); } else { _link.call(_this, definition, injected, options); } if (options.notify) { options.afterInject(options, injected); definition.emit('DS.afterInject', definition, DSUtils.copy(injected)); } return injected; } module.exports = inject; },{"../../errors":48,"../../utils":50}],44:[function(require,module,exports){ var DSUtils = require('../../utils'); var DSErrors = require('../../errors'); function link(resourceName, id, relations) { var _this = this; var definition = _this.defs[resourceName]; relations = relations || []; id = DSUtils.resolveId(definition, id); if (!definition) { throw new DSErrors.NER(resourceName); } else if (!DSUtils._sn(id)) { throw DSUtils._snErr('id'); } else if (!DSUtils._a(relations)) { throw DSUtils._aErr('relations'); } definition.logFn('link', id, relations); var linked = _this.get(resourceName, id); if (linked) { DSUtils.forEach(definition.relationList, function (def) { var relationName = def.relation; if (relations.length && !DSUtils.contains(relations, relationName)) { return; } var params = {}; if (def.type === 'belongsTo') { var parent = linked[def.localKey] ? _this.get(relationName, linked[def.localKey]) : null; if (parent) { linked[def.localField] = parent; } } else if (def.type === 'hasMany') { params[def.foreignKey] = linked[definition.idAttribute]; linked[def.localField] = _this.defaults.constructor.prototype.defaultFilter.call(_this, _this.s[relationName].collection, relationName, params, { allowSimpleWhere: true }); } else if (def.type === 'hasOne') { params[def.foreignKey] = linked[definition.idAttribute]; var children = _this.defaults.constructor.prototype.defaultFilter.call(_this, _this.s[relationName].collection, relationName, params, { allowSimpleWhere: true }); if (children.length) { linked[def.localField] = children[0]; } } }); } return linked; } module.exports = link; },{"../../errors":48,"../../utils":50}],45:[function(require,module,exports){ var DSUtils = require('../../utils'); var DSErrors = require('../../errors'); function linkAll(resourceName, params, relations) { var _this = this; var definition = _this.defs[resourceName]; relations = relations || []; if (!definition) { throw new DSErrors.NER(resourceName); } else if (!DSUtils._a(relations)) { throw DSUtils._aErr('relations'); } definition.logFn('linkAll', params, relations); var linked = _this.filter(resourceName, params); if (linked) { DSUtils.forEach(definition.relationList, function (def) { var relationName = def.relation; if (relations.length && !DSUtils.contains(relations, relationName)) { return; } if (def.type === 'belongsTo') { DSUtils.forEach(linked, function (injectedItem) { var parent = injectedItem[def.localKey] ? _this.get(relationName, injectedItem[def.localKey]) : null; if (parent) { injectedItem[def.localField] = parent; } }); } else if (def.type === 'hasMany') { DSUtils.forEach(linked, function (injectedItem) { var params = {}; params[def.foreignKey] = injectedItem[definition.idAttribute]; injectedItem[def.localField] = _this.defaults.constructor.prototype.defaultFilter.call(_this, _this.s[relationName].collection, relationName, params, { allowSimpleWhere: true }); }); } else if (def.type === 'hasOne') { DSUtils.forEach(linked, function (injectedItem) { var params = {}; params[def.foreignKey] = injectedItem[definition.idAttribute]; var children = _this.defaults.constructor.prototype.defaultFilter.call(_this, _this.s[relationName].collection, relationName, params, { allowSimpleWhere: true }); if (children.length) { injectedItem[def.localField] = children[0]; } }); } }); } return linked; } module.exports = linkAll; },{"../../errors":48,"../../utils":50}],46:[function(require,module,exports){ var DSUtils = require('../../utils'); var DSErrors = require('../../errors'); function linkInverse(resourceName, id, relations) { var _this = this; var definition = _this.defs[resourceName]; relations = relations || []; id = DSUtils.resolveId(definition, id); if (!definition) { throw new DSErrors.NER(resourceName); } else if (!DSUtils._sn(id)) { throw DSUtils._snErr('id'); } else if (!DSUtils._a(relations)) { throw DSUtils._aErr('relations'); } definition.logFn('linkInverse', id, relations); var linked = _this.get(resourceName, id); if (linked) { DSUtils.forOwn(_this.defs, function (d) { DSUtils.forOwn(d.relations, function (relatedModels) { DSUtils.forOwn(relatedModels, function (defs, relationName) { if (relations.length && !DSUtils.contains(relations, d.n)) { return; } if (definition.n === relationName) { _this.linkAll(d.n, {}, [definition.n]); } }); }); }); } return linked; } module.exports = linkInverse; },{"../../errors":48,"../../utils":50}],47:[function(require,module,exports){ var DSUtils = require('../../utils'); var DSErrors = require('../../errors'); function unlinkInverse(resourceName, id, relations) { var _this = this; var definition = _this.defs[resourceName]; relations = relations || []; id = DSUtils.resolveId(definition, id); if (!definition) { throw new DSErrors.NER(resourceName); } else if (!DSUtils._sn(id)) { throw DSUtils._snErr('id'); } else if (!DSUtils._a(relations)) { throw DSUtils._aErr('relations'); } definition.logFn('unlinkInverse', id, relations); var linked = _this.get(resourceName, id); if (linked) { DSUtils.forOwn(_this.defs, function (d) { DSUtils.forOwn(d.relations, function (relatedModels) { DSUtils.forOwn(relatedModels, function (defs, relationName) { if (definition.n === relationName) { DSUtils.forEach(defs, function (def) { DSUtils.forEach(_this.s[def.name].collection, function (item) { if (def.type === 'hasMany' && item[def.localField]) { var index; DSUtils.forEach(item[def.localField], function (subItem, i) { if (subItem === linked) { index = i; } }); item[def.localField].splice(index, 1); } else if (item[def.localField] === linked) { delete item[def.localField]; } }); }); } }); }); }); } return linked; } module.exports = unlinkInverse; },{"../../errors":48,"../../utils":50}],48:[function(require,module,exports){ function IllegalArgumentError(message) { Error.call(this); if (typeof Error.captureStackTrace === 'function') { Error.captureStackTrace(this, this.constructor); } this.type = this.constructor.name; this.message = message || 'Illegal Argument!'; } IllegalArgumentError.prototype = new Error(); IllegalArgumentError.prototype.constructor = IllegalArgumentError; function RuntimeError(message) { Error.call(this); if (typeof Error.captureStackTrace === 'function') { Error.captureStackTrace(this, this.constructor); } this.type = this.constructor.name; this.message = message || 'RuntimeError Error!'; } RuntimeError.prototype = new Error(); RuntimeError.prototype.constructor = RuntimeError; function NonexistentResourceError(resourceName) { Error.call(this); if (typeof Error.captureStackTrace === 'function') { Error.captureStackTrace(this, this.constructor); } this.type = this.constructor.name; this.message = (resourceName || '') + ' is not a registered resource!'; } NonexistentResourceError.prototype = new Error(); NonexistentResourceError.prototype.constructor = NonexistentResourceError; module.exports = { IllegalArgumentError: IllegalArgumentError, IA: IllegalArgumentError, RuntimeError: RuntimeError, R: RuntimeError, NonexistentResourceError: NonexistentResourceError, NER: NonexistentResourceError }; },{}],49:[function(require,module,exports){ var DS = require('./datastore'); module.exports = { DS: DS, createStore: function (options) { return new DS(options); }, DSUtils: require('./utils'), DSErrors: require('./errors'), version: { full: '1.5.0', major: parseInt('1', 10), minor: parseInt('5', 10), patch: parseInt('0', 10), alpha: 'false' !== 'false' ? 'false' : false, beta: 'false' !== 'false' ? 'false' : false } }; },{"./datastore":37,"./errors":48,"./utils":50}],50:[function(require,module,exports){ /* jshint -W041 */ var w, _Promise; var objectProto = Object.prototype; var toString = objectProto.toString; var DSErrors = require('./errors'); var forEach = require('mout/array/forEach'); var slice = require('mout/array/slice'); var forOwn = require('mout/object/forOwn'); var observe = require('../lib/observe-js/observe-js'); var es6Promise = require('es6-promise'); es6Promise.polyfill(); var isArray = Array.isArray || function isArray(value) { return toString.call(value) == '[object Array]' || false; }; function isRegExp(value) { return toString.call(value) == '[object RegExp]' || false; } // adapted from lodash.isBoolean function isBoolean(value) { return (value === true || value === false || value && typeof value == 'object' && toString.call(value) == '[object Boolean]') || false; } // adapted from lodash.isString function isString(value) { return typeof value == 'string' || (value && typeof value == 'object' && toString.call(value) == '[object String]') || false; } function isObject(value) { return toString.call(value) == '[object Object]' || false; } // adapted from lodash.isDate function isDate(value) { return (value && typeof value == 'object' && toString.call(value) == '[object Date]') || false; } // adapted from lodash.isNumber function isNumber(value) { var type = typeof value; return type == 'number' || (value && type == 'object' && toString.call(value) == '[object Number]') || false; } // adapted from lodash.isFunction function isFunction(value) { return typeof value == 'function' || (value && toString.call(value) === '[object Function]') || false; } // shorthand argument checking functions, using these shaves 1.18 kb off of the minified build function isStringOrNumber(value) { return isString(value) || isNumber(value); } function isStringOrNumberErr(field) { return new DSErrors.IA('"' + field + '" must be a string or a number!'); } function isObjectErr(field) { return new DSErrors.IA('"' + field + '" must be an object!'); } function isArrayErr(field) { return new DSErrors.IA('"' + field + '" must be an array!'); } // adapted from mout.isEmpty function isEmpty(val) { if (val == null) { // typeof null == 'object' so we check it first return true; } else if (typeof val === 'string' || isArray(val)) { return !val.length; } else if (typeof val === 'object') { var result = true; forOwn(val, function () { result = false; return false; // break loop }); return result; } else { return true; } } function intersection(array1, array2) { if (!array1 || !array2) { return []; } var result = []; var item; for (var i = 0, length = array1.length; i < length; i++) { item = array1[i]; if (DSUtils.contains(result, item)) { continue; } if (DSUtils.contains(array2, item)) { result.push(item); } } return result; } function filter(array, cb, thisObj) { var results = []; forEach(array, function (value, key, arr) { if (cb(value, key, arr)) { results.push(value); } }, thisObj); return results; } function finallyPolyfill(cb) { var constructor = this.constructor; return this.then(function (value) { return constructor.resolve(cb()).then(function () { return value; }); }, function (reason) { return constructor.resolve(cb()).then(function () { throw reason; }); }); } try { w = window; if (!w.Promise.prototype['finally']) { w.Promise.prototype['finally'] = finallyPolyfill; } _Promise = w.Promise; w = {}; } catch (e) { w = null; _Promise = require('bluebird'); } function updateTimestamp(timestamp) { var newTimestamp = typeof Date.now === 'function' ? Date.now() : new Date().getTime(); if (timestamp && newTimestamp <= timestamp) { return timestamp + 1; } else { return newTimestamp; } } function Events(target) { var events = {}; target = target || this; target.on = function (type, func, ctx) { events[type] = events[type] || []; events[type].push({ f: func, c: ctx }); }; target.off = function (type, func) { var listeners = events[type]; if (!listeners) { events = {}; } else if (func) { for (var i = 0; i < listeners.length; i++) { if (listeners[i] === func) { listeners.splice(i, 1); break; } } } else { listeners.splice(0, listeners.length); } }; target.emit = function () { var args = Array.prototype.slice.call(arguments); var listeners = events[args.shift()] || []; if (listeners) { for (var i = 0; i < listeners.length; i++) { listeners[i].f.apply(listeners[i].c, args); } } }; } /** * @method bubbleUp * @param {array} heap The heap. * @param {function} weightFunc The weight function. * @param {number} n The index of the element to bubble up. */ function bubbleUp(heap, weightFunc, n) { var element = heap[n]; var weight = weightFunc(element); // When at 0, an element can not go up any further. while (n > 0) { // Compute the parent element's index, and fetch it. var parentN = Math.floor((n + 1) / 2) - 1; var parent = heap[parentN]; // If the parent has a lesser weight, things are in order and we // are done. if (weight >= weightFunc(parent)) { break; } else { heap[parentN] = element; heap[n] = parent; n = parentN; } } } /** * @method bubbleDown * @param {array} heap The heap. * @param {function} weightFunc The weight function. * @param {number} n The index of the element to sink down. */ function bubbleDown(heap, weightFunc, n) { var length = heap.length; var node = heap[n]; var nodeWeight = weightFunc(node); while (true) { var child2N = (n + 1) * 2, child1N = child2N - 1; var swap = null; if (child1N < length) { var child1 = heap[child1N], child1Weight = weightFunc(child1); // If the score is less than our node's, we need to swap. if (child1Weight < nodeWeight) { swap = child1N; } } // Do the same checks for the other child. if (child2N < length) { var child2 = heap[child2N], child2Weight = weightFunc(child2); if (child2Weight < (swap === null ? nodeWeight : weightFunc(heap[child1N]))) { swap = child2N; } } if (swap === null) { break; } else { heap[n] = heap[swap]; heap[swap] = node; n = swap; } } } function DSBinaryHeap(weightFunc, compareFunc) { if (weightFunc && !isFunction(weightFunc)) { throw new Error('DSBinaryHeap(weightFunc): weightFunc: must be a function!'); } weightFunc = weightFunc || function (x) { return x; }; compareFunc = compareFunc || function (x, y) { return x === y; }; this.weightFunc = weightFunc; this.compareFunc = compareFunc; this.heap = []; } var dsp = DSBinaryHeap.prototype; dsp.push = function (node) { this.heap.push(node); bubbleUp(this.heap, this.weightFunc, this.heap.length - 1); }; dsp.peek = function () { return this.heap[0]; }; dsp.pop = function () { var front = this.heap[0], end = this.heap.pop(); if (this.heap.length > 0) { this.heap[0] = end; bubbleDown(this.heap, this.weightFunc, 0); } return front; }; dsp.remove = function (node) { var length = this.heap.length; for (var i = 0; i < length; i++) { if (this.compareFunc(this.heap[i], node)) { var removed = this.heap[i]; var end = this.heap.pop(); if (i !== length - 1) { this.heap[i] = end; bubbleUp(this.heap, this.weightFunc, i); bubbleDown(this.heap, this.weightFunc, i); } return removed; } } return null; }; dsp.removeAll = function () { this.heap = []; }; dsp.size = function () { return this.heap.length; }; var toPromisify = [ 'beforeValidate', 'validate', 'afterValidate', 'beforeCreate', 'afterCreate', 'beforeUpdate', 'afterUpdate', 'beforeDestroy', 'afterDestroy' ]; // adapted from angular.copy function copy(source, destination, stackSource, stackDest) { if (!destination) { destination = source; if (source) { if (isArray(source)) { destination = copy(source, [], stackSource, stackDest); } else if (isDate(source)) { destination = new Date(source.getTime()); } else if (isRegExp(source)) { destination = new RegExp(source.source, source.toString().match(/[^\/]*$/)[0]); destination.lastIndex = source.lastIndex; } else if (isObject(source)) { var emptyObject = Object.create(Object.getPrototypeOf(source)); destination = copy(source, emptyObject, stackSource, stackDest); } } } else { if (source === destination) { throw new Error('Cannot copy! Source and destination are identical.'); } stackSource = stackSource || []; stackDest = stackDest || []; if (isObject(source)) { var index = stackSource.indexOf(source); if (index !== -1) return stackDest[index]; stackSource.push(source); stackDest.push(destination); } var result; if (isArray(source)) { destination.length = 0; for (var i = 0; i < source.length; i++) { result = copy(source[i], null, stackSource, stackDest); if (isObject(source[i])) { stackSource.push(source[i]); stackDest.push(result); } destination.push(result); } } else { if (isArray(destination)) { destination.length = 0; } else { forEach(destination, function (value, key) { delete destination[key]; }); } for (var key in source) { if (source.hasOwnProperty(key)) { result = copy(source[key], null, stackSource, stackDest); if (isObject(source[key])) { stackSource.push(source[key]); stackDest.push(result); } destination[key] = result; } } } } return destination; } // adapted from angular.equals function equals(o1, o2) { if (o1 === o2) return true; if (o1 === null || o2 === null) return false; if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN var t1 = typeof o1, t2 = typeof o2, length, key, keySet; if (t1 == t2) { if (t1 == 'object') { if (isArray(o1)) { if (!isArray(o2)) return false; if ((length = o1.length) == o2.length) { for (key = 0; key < length; key++) { if (!equals(o1[key], o2[key])) return false; } return true; } } else if (isDate(o1)) { if (!isDate(o2)) return false; return equals(o1.getTime(), o2.getTime()); } else if (isRegExp(o1) && isRegExp(o2)) { return o1.toString() == o2.toString(); } else { if (isArray(o2)) return false; keySet = {}; for (key in o1) { if (key.charAt(0) === '$' || isFunction(o1[key])) continue; if (!equals(o1[key], o2[key])) return false; keySet[key] = true; } for (key in o2) { if (!keySet.hasOwnProperty(key) && key.charAt(0) !== '$' && o2[key] !== undefined && !isFunction(o2[key])) return false; } return true; } } } return false; } function resolveId(definition, idOrInstance) { if (this.isString(idOrInstance) || isNumber(idOrInstance)) { return idOrInstance; } else if (idOrInstance && definition) { return idOrInstance[definition.idAttribute] || idOrInstance; } else { return idOrInstance; } } function resolveItem(resource, idOrInstance) { if (resource && (isString(idOrInstance) || isNumber(idOrInstance))) { return resource.index[idOrInstance] || idOrInstance; } else { return idOrInstance; } } function isValidString(val) { return (val != null && val !== ''); } function join(items, separator) { separator = separator || ''; return filter(items, isValidString).join(separator); } function makePath(var_args) { var result = join(slice(arguments), '/'); return result.replace(/([^:\/]|^)\/{2,}/g, '$1/'); } observe.setEqualityFn(equals); var DSUtils = { // Options that inherit from defaults _: function (parent, options) { var _this = this; options = options || {}; if (options && options.constructor === parent.constructor) { return options; } else if (!isObject(options)) { throw new DSErrors.IA('"options" must be an object!'); } forEach(toPromisify, function (name) { if (typeof options[name] === 'function' && options[name].toString().indexOf('var args = Array') === -1) { options[name] = _this.promisify(options[name]); } }); var O = function Options(attrs) { var self = this; forOwn(attrs, function (value, key) { self[key] = value; }); }; O.prototype = parent; return new O(options); }, _n: isNumber, _s: isString, _sn: isStringOrNumber, _snErr: isStringOrNumberErr, _o: isObject, _oErr: isObjectErr, _a: isArray, _aErr: isArrayErr, compute: function (fn, field) { var _this = this; var args = []; forEach(fn.deps, function (dep) { args.push(_this[dep]); }); // compute property _this[field] = fn[fn.length - 1].apply(_this, args); }, contains: require('mout/array/contains'), copy: copy, deepMixIn: require('mout/object/deepMixIn'), diffObjectFromOldObject: observe.diffObjectFromOldObject, DSBinaryHeap: DSBinaryHeap, equals: equals, Events: Events, filter: filter, forEach: forEach, forOwn: forOwn, fromJson: function (json) { return isString(json) ? JSON.parse(json) : json; }, get: require('mout/object/get'), intersection: intersection, isArray: isArray, isBoolean: isBoolean, isDate: isDate, isEmpty: isEmpty, isFunction: isFunction, isObject: isObject, isNumber: isNumber, isRegExp: isRegExp, isString: isString, makePath: makePath, observe: observe, pascalCase: require('mout/string/pascalCase'), pick: require('mout/object/pick'), Promise: _Promise, promisify: function (fn, target) { var Promise = this.Promise; if (!fn) { return; } else if (typeof fn !== 'function') { throw new Error('Can only promisify functions!'); } return function () { var args = Array.prototype.slice.apply(arguments); return new Promise(function (resolve, reject) { args.push(function (err, result) { if (err) { reject(err); } else { resolve(result); } }); try { var promise = fn.apply(target || this, args); if (promise && promise.then) { promise.then(resolve, reject); } } catch (err) { reject(err); } }); }; }, remove: require('mout/array/remove'), set: require('mout/object/set'), slice: slice, sort: require('mout/array/sort'), toJson: JSON.stringify, updateTimestamp: updateTimestamp, upperCase: require('mout/string/upperCase'), removeCircular: function (object) { var objects = []; return (function rmCirc(value) { var i; var nu; if (typeof value === 'object' && value !== null && !(value instanceof Boolean) && !(value instanceof Date) && !(value instanceof Number) && !(value instanceof RegExp) && !(value instanceof String)) { for (i = 0; i < objects.length; i += 1) { if (objects[i] === value) { return undefined; } } objects.push(value); if (DSUtils.isArray(value)) { nu = []; for (i = 0; i < value.length; i += 1) { nu[i] = rmCirc(value[i]); } } else { nu = {}; forOwn(value, function (v, k) { nu[k] = rmCirc(value[k]); }); } return nu; } return value; }(object)); }, resolveItem: resolveItem, resolveId: resolveId, w: w }; module.exports = DSUtils; },{"../lib/observe-js/observe-js":1,"./errors":48,"bluebird":"bluebird","es6-promise":2,"mout/array/contains":4,"mout/array/forEach":5,"mout/array/remove":7,"mout/array/slice":8,"mout/array/sort":9,"mout/object/deepMixIn":13,"mout/object/forOwn":15,"mout/object/get":16,"mout/object/pick":19,"mout/object/set":20,"mout/string/pascalCase":23,"mout/string/upperCase":26}]},{},[49])(49) });
ajax/libs/ag-grid/7.0.0/lib/utils.js
BenjaminVanRyseghem/cdnjs
/** * ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v7.0.0 * @link http://www.ag-grid.com/ * @license MIT */ "use strict"; var FUNCTION_STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg; var FUNCTION_ARGUMENT_NAMES = /([^\s,]+)/g; // util class, only used when debugging, for printing time to console var Timer = (function () { function Timer() { this.timestamp = new Date().getTime(); } Timer.prototype.print = function (msg) { var duration = (new Date().getTime()) - this.timestamp; console.log(msg + " = " + duration); this.timestamp = new Date().getTime(); }; return Timer; }()); exports.Timer = Timer; var Utils = (function () { function Utils() { } // returns true if the event is close to the original event by X pixels either vertically or horizontally. // we only start dragging after X pixels so this allows us to know if we should start dragging yet. Utils.areEventsNear = function (e1, e2, pixelCount) { // by default, we wait 4 pixels before starting the drag if (pixelCount === 0) { return false; } var diffX = Math.abs(e1.clientX - e2.clientX); var diffY = Math.abs(e1.clientY - e2.clientY); return Math.max(diffX, diffY) <= pixelCount; }; Utils.shallowCompare = function (arr1, arr2) { // if both are missing, then they are the same if (this.missing(arr1) && this.missing(arr2)) { return true; } // if one is present, but other is missing, then then are different if (this.missing(arr1) || this.missing(arr2)) { return false; } if (arr1.length !== arr2.length) { return false; } for (var i = 0; i < arr1.length; i++) { if (arr1[i] !== arr2[i]) { return false; } } return true; }; Utils.getNameOfClass = function (TheClass) { var funcNameRegex = /function (.{1,})\(/; var funcAsString = TheClass.toString(); var results = (funcNameRegex).exec(funcAsString); return (results && results.length > 1) ? results[1] : ""; }; Utils.values = function (object) { var result = []; this.iterateObject(object, function (key, value) { result.push(value); }); return result; }; Utils.getValueUsingField = function (data, field, fieldContainsDots) { if (!field || !data) { return; } // if no '.', then it's not a deep value if (!fieldContainsDots) { return data[field]; } else { // otherwise it is a deep value, so need to dig for it var fields = field.split('.'); var currentObject = data; for (var i = 0; i < fields.length; i++) { currentObject = currentObject[fields[i]]; if (this.missing(currentObject)) { return null; } } return currentObject; } }; Utils.iterateObject = function (object, callback) { if (this.missing(object)) { return; } var keys = Object.keys(object); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = object[key]; callback(key, value); } }; Utils.cloneObject = function (object) { var copy = {}; var keys = Object.keys(object); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = object[key]; copy[key] = value; } return copy; }; Utils.map = function (array, callback) { var result = []; for (var i = 0; i < array.length; i++) { var item = array[i]; var mappedItem = callback(item); result.push(mappedItem); } return result; }; Utils.mapObject = function (object, callback) { var result = []; Utils.iterateObject(object, function (key, value) { result.push(callback(value)); }); return result; }; Utils.forEach = function (array, callback) { if (!array) { return; } for (var i = 0; i < array.length; i++) { var value = array[i]; callback(value, i); } }; Utils.filter = function (array, callback) { var result = []; array.forEach(function (item) { if (callback(item)) { result.push(item); } }); return result; }; Utils.assign = function (object, source) { if (this.exists(source)) { this.iterateObject(source, function (key, value) { object[key] = value; }); } }; Utils.pushAll = function (target, source) { if (this.missing(source) || this.missing(target)) { return; } source.forEach(function (func) { return target.push(func); }); }; Utils.getFunctionParameters = function (func) { var fnStr = func.toString().replace(FUNCTION_STRIP_COMMENTS, ''); var result = fnStr.slice(fnStr.indexOf('(') + 1, fnStr.indexOf(')')).match(FUNCTION_ARGUMENT_NAMES); if (result === null) { return []; } else { return result; } }; Utils.find = function (collection, predicate, value) { if (collection === null || collection === undefined) { return null; } var firstMatchingItem; for (var i = 0; i < collection.length; i++) { var item = collection[i]; if (typeof predicate === 'string') { if (item[predicate] === value) { firstMatchingItem = item; break; } } else { var callback = predicate; if (callback(item)) { firstMatchingItem = item; break; } } } return firstMatchingItem; }; Utils.toStrings = function (array) { return this.map(array, function (item) { if (item === undefined || item === null || !item.toString) { return null; } else { return item.toString(); } }); }; Utils.iterateArray = function (array, callback) { for (var index = 0; index < array.length; index++) { var value = array[index]; callback(value, index); } }; //Returns true if it is a DOM node //taken from: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object Utils.isNode = function (o) { return (typeof Node === "function" ? o instanceof Node : o && typeof o === "object" && typeof o.nodeType === "number" && typeof o.nodeName === "string"); }; //Returns true if it is a DOM element //taken from: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object Utils.isElement = function (o) { return (typeof HTMLElement === "function" ? o instanceof HTMLElement : o && typeof o === "object" && o !== null && o.nodeType === 1 && typeof o.nodeName === "string"); }; Utils.isNodeOrElement = function (o) { return this.isNode(o) || this.isElement(o); }; //adds all type of change listeners to an element, intended to be a text field Utils.addChangeListener = function (element, listener) { element.addEventListener("changed", listener); element.addEventListener("paste", listener); element.addEventListener("input", listener); // IE doesn't fire changed for special keys (eg delete, backspace), so need to // listen for this further ones element.addEventListener("keydown", listener); element.addEventListener("keyup", listener); }; //if value is undefined, null or blank, returns null, otherwise returns the value Utils.makeNull = function (value) { if (value === null || value === undefined || value === "") { return null; } else { return value; } }; Utils.missing = function (value) { return !this.exists(value); }; Utils.missingOrEmpty = function (value) { return this.missing(value) || value.length === 0; }; Utils.missingOrEmptyObject = function (value) { return this.missing(value) || Object.keys(value).length === 0; }; Utils.exists = function (value) { if (value === null || value === undefined || value === '') { return false; } else { return true; } }; Utils.existsAndNotEmpty = function (value) { return this.exists(value) && value.length > 0; }; Utils.removeAllChildren = function (node) { if (node) { while (node.hasChildNodes()) { node.removeChild(node.lastChild); } } }; Utils.removeElement = function (parent, cssSelector) { this.removeFromParent(parent.querySelector(cssSelector)); }; Utils.removeFromParent = function (node) { if (node && node.parentNode) { node.parentNode.removeChild(node); } }; Utils.isVisible = function (element) { return (element.offsetParent !== null); }; /** * loads the template and returns it as an element. makes up for no simple way in * the dom api to load html directly, eg we cannot do this: document.createElement(template) */ Utils.loadTemplate = function (template) { var tempDiv = document.createElement("div"); tempDiv.innerHTML = template; return tempDiv.firstChild; }; Utils.addOrRemoveCssClass = function (element, className, addOrRemove) { if (addOrRemove) { this.addCssClass(element, className); } else { this.removeCssClass(element, className); } }; Utils.callIfPresent = function (func) { if (func) { func(); } }; Utils.addCssClass = function (element, className) { var _this = this; if (!className || className.length === 0) { return; } if (className.indexOf(' ') >= 0) { className.split(' ').forEach(function (value) { return _this.addCssClass(element, value); }); return; } if (element.classList) { element.classList.add(className); } else { if (element.className && element.className.length > 0) { var cssClasses = element.className.split(' '); if (cssClasses.indexOf(className) < 0) { cssClasses.push(className); element.className = cssClasses.join(' '); } } else { element.className = className; } } }; Utils.containsClass = function (element, className) { if (element.classList) { // for modern browsers return element.classList.contains(className); } else if (element.className) { // for older browsers, check against the string of class names // if only one class, can check for exact match var onlyClass = element.className === className; // if many classes, check for class name, we have to pad with ' ' to stop other // class names that are a substring of this class var contains = element.className.indexOf(' ' + className + ' ') >= 0; // the padding above then breaks when it's the first or last class names var startsWithClass = element.className.indexOf(className + ' ') === 0; var endsWithClass = element.className.lastIndexOf(' ' + className) === (element.className.length - className.length - 1); return onlyClass || contains || startsWithClass || endsWithClass; } else { // if item is not a node return false; } }; Utils.getElementAttribute = function (element, attributeName) { if (element.attributes) { if (element.attributes[attributeName]) { var attribute = element.attributes[attributeName]; return attribute.value; } else { return null; } } else { return null; } }; Utils.offsetHeight = function (element) { return element && element.clientHeight ? element.clientHeight : 0; }; Utils.offsetWidth = function (element) { return element && element.clientWidth ? element.clientWidth : 0; }; Utils.removeCssClass = function (element, className) { if (element.className && element.className.length > 0) { var cssClasses = element.className.split(' '); var index = cssClasses.indexOf(className); if (index >= 0) { cssClasses.splice(index, 1); element.className = cssClasses.join(' '); } } }; Utils.removeRepeatsFromArray = function (array, object) { if (!array) { return; } for (var index = array.length - 2; index >= 0; index--) { var thisOneMatches = array[index] === object; var nextOneMatches = array[index + 1] === object; if (thisOneMatches && nextOneMatches) { array.splice(index + 1, 1); } } }; Utils.removeFromArray = function (array, object) { if (array.indexOf(object) >= 0) { array.splice(array.indexOf(object), 1); } }; Utils.insertIntoArray = function (array, object, toIndex) { array.splice(toIndex, 0, object); }; Utils.insertArrayIntoArray = function (dest, src, toIndex) { if (this.missing(dest) || this.missing(src)) { return; } // put items in backwards, otherwise inserted items end up in reverse order for (var i = src.length - 1; i >= 0; i--) { var item = src[i]; this.insertIntoArray(dest, item, toIndex); } }; Utils.moveInArray = function (array, objectsToMove, toIndex) { var _this = this; // first take out it items from the array objectsToMove.forEach(function (obj) { _this.removeFromArray(array, obj); }); // now add the objects, in same order as provided to us, that means we start at the end // as the objects will be pushed to the right as they are inserted objectsToMove.slice().reverse().forEach(function (obj) { _this.insertIntoArray(array, obj, toIndex); }); }; Utils.defaultComparator = function (valueA, valueB) { var valueAMissing = valueA === null || valueA === undefined; var valueBMissing = valueB === null || valueB === undefined; if (valueAMissing && valueBMissing) { return 0; } if (valueAMissing) { return -1; } if (valueBMissing) { return 1; } if (typeof valueA === "string") { try { // using local compare also allows chinese comparisons return valueA.localeCompare(valueB); } catch (e) { } } if (valueA < valueB) { return -1; } else if (valueA > valueB) { return 1; } else { return 0; } }; Utils.compareArrays = function (array1, array2) { if (this.missing(array1) && this.missing(array2)) { return true; } if (this.missing(array1) || this.missing(array2)) { return false; } if (array1.length !== array2.length) { return false; } for (var i = 0; i < array1.length; i++) { if (array1[i] !== array2[i]) { return false; } } return true; }; Utils.toStringOrNull = function (value) { if (this.exists(value) && value.toString) { return value.toString(); } else { return null; } }; Utils.formatWidth = function (width) { if (typeof width === "number") { return width + "px"; } else { return width; } }; Utils.formatNumberTwoDecimalPlacesAndCommas = function (value) { // took this from: http://blog.tompawlak.org/number-currency-formatting-javascript if (typeof value === 'number') { return (Math.round(value * 100) / 100).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,"); } else { return ''; } }; Utils.prependDC = function (parent, documentFragment) { if (this.exists(parent.firstChild)) { parent.insertBefore(documentFragment, parent.firstChild); } else { parent.appendChild(documentFragment); } }; // static prepend(parent: HTMLElement, child: HTMLElement): void { // if (this.exists(parent.firstChild)) { // parent.insertBefore(child, parent.firstChild); // } else { // parent.appendChild(child); // } // } /** * If icon provided, use this (either a string, or a function callback). * if not, then use the second parameter, which is the svgFactory function */ Utils.createIcon = function (iconName, gridOptionsWrapper, column, svgFactoryFunc) { var eResult = document.createElement('span'); eResult.appendChild(this.createIconNoSpan(iconName, gridOptionsWrapper, column, svgFactoryFunc)); return eResult; }; Utils.createIconNoSpan = function (iconName, gridOptionsWrapper, column, svgFactoryFunc) { var userProvidedIcon; // check col for icon first if (column && column.getColDef().icons) { userProvidedIcon = column.getColDef().icons[iconName]; } // it not in col, try grid options if (!userProvidedIcon && gridOptionsWrapper.getIcons()) { userProvidedIcon = gridOptionsWrapper.getIcons()[iconName]; } // now if user provided, use it if (userProvidedIcon) { var rendererResult; if (typeof userProvidedIcon === 'function') { rendererResult = userProvidedIcon(); } else if (typeof userProvidedIcon === 'string') { rendererResult = userProvidedIcon; } else { throw 'icon from grid options needs to be a string or a function'; } if (typeof rendererResult === 'string') { return this.loadTemplate(rendererResult); } else if (this.isNodeOrElement(rendererResult)) { return rendererResult; } else { throw 'iconRenderer should return back a string or a dom object'; } } else { // otherwise we use the built in icon if (svgFactoryFunc) { return svgFactoryFunc(); } else { return null; } } }; Utils.addStylesToElement = function (eElement, styles) { if (!styles) { return; } Object.keys(styles).forEach(function (key) { eElement.style[key] = styles[key]; }); }; Utils.isScrollShowing = function (element) { return element.clientHeight < element.scrollHeight; }; Utils.getScrollbarWidth = function () { var outer = document.createElement("div"); outer.style.visibility = "hidden"; outer.style.width = "100px"; outer.style.msOverflowStyle = "scrollbar"; // needed for WinJS apps document.body.appendChild(outer); var widthNoScroll = outer.offsetWidth; // force scrollbars outer.style.overflow = "scroll"; // add innerdiv var inner = document.createElement("div"); inner.style.width = "100%"; outer.appendChild(inner); var widthWithScroll = inner.offsetWidth; // remove divs outer.parentNode.removeChild(outer); return widthNoScroll - widthWithScroll; }; Utils.isKeyPressed = function (event, keyToCheck) { var pressedKey = event.which || event.keyCode; return pressedKey === keyToCheck; }; Utils.setVisible = function (element, visible, visibleStyle) { if (visible) { if (this.exists(visibleStyle)) { element.style.display = visibleStyle; } else { element.style.display = 'inline'; } } else { element.style.display = 'none'; } }; Utils.isBrowserIE = function () { if (this.isIE === undefined) { this.isIE = false || !!document.documentMode; // At least IE6 } return this.isIE; }; Utils.isBrowserEdge = function () { if (this.isEdge === undefined) { this.isEdge = !this.isBrowserIE() && !!window.StyleMedia; } return this.isEdge; }; Utils.isBrowserSafari = function () { if (this.isSafari === undefined) { this.isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0; } return this.isSafari; }; // srcElement is only available in IE. In all other browsers it is target // http://stackoverflow.com/questions/5301643/how-can-i-make-event-srcelement-work-in-firefox-and-what-does-it-mean Utils.getTarget = function (event) { var eventNoType = event; return eventNoType.target || eventNoType.srcElement; }; // taken from: http://stackoverflow.com/questions/1038727/how-to-get-browser-width-using-javascript-code Utils.getBodyWidth = function () { if (document.body) { return document.body.clientWidth; } if (window.innerHeight) { return window.innerWidth; } if (document.documentElement && document.documentElement.clientWidth) { return document.documentElement.clientWidth; } return -1; }; // taken from: http://stackoverflow.com/questions/1038727/how-to-get-browser-width-using-javascript-code Utils.getBodyHeight = function () { if (document.body) { return document.body.clientHeight; } if (window.innerHeight) { return window.innerHeight; } if (document.documentElement && document.documentElement.clientHeight) { return document.documentElement.clientHeight; } return -1; }; Utils.setCheckboxState = function (eCheckbox, state) { if (typeof state === 'boolean') { eCheckbox.checked = state; eCheckbox.indeterminate = false; } else { // isNodeSelected returns back undefined if it's a group and the children // are a mix of selected and unselected eCheckbox.indeterminate = true; } }; Utils.traverseNodesWithKey = function (nodes, callback) { var keyParts = []; recursiveSearchNodes(nodes); function recursiveSearchNodes(nodes) { nodes.forEach(function (node) { if (node.group) { keyParts.push(node.key); var key = keyParts.join('|'); callback(node, key); recursiveSearchNodes(node.childrenAfterGroup); keyParts.pop(); } }); } }; // Taken from here: https://github.com/facebook/fixed-data-table/blob/master/src/vendor_upstream/dom/normalizeWheel.js /** * Mouse wheel (and 2-finger trackpad) support on the web sucks. It is * complicated, thus this doc is long and (hopefully) detailed enough to answer * your questions. * * If you need to react to the mouse wheel in a predictable way, this code is * like your bestest friend. * hugs * * * As of today, there are 4 DOM event types you can listen to: * * 'wheel' -- Chrome(31+), FF(17+), IE(9+) * 'mousewheel' -- Chrome, IE(6+), Opera, Safari * 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother! * 'DOMMouseScroll' -- FF(0.9.7+) since 2003 * * So what to do? The is the best: * * normalizeWheel.getEventType(); * * In your event callback, use this code to get sane interpretation of the * deltas. This code will return an object with properties: * * spinX -- normalized spin speed (use for zoom) - x plane * spinY -- " - y plane * pixelX -- normalized distance (to pixels) - x plane * pixelY -- " - y plane * * Wheel values are provided by the browser assuming you are using the wheel to * scroll a web page by a number of lines or pixels (or pages). Values can vary * significantly on different platforms and browsers, forgetting that you can * scroll at different speeds. Some devices (like trackpads) emit more events * at smaller increments with fine granularity, and some emit massive jumps with * linear speed or acceleration. * * This code does its best to normalize the deltas for you: * * - spin is trying to normalize how far the wheel was spun (or trackpad * dragged). This is super useful for zoom support where you want to * throw away the chunky scroll steps on the PC and make those equal to * the slow and smooth tiny steps on the Mac. Key data: This code tries to * resolve a single slow step on a wheel to 1. * * - pixel is normalizing the desired scroll delta in pixel units. You'll * get the crazy differences between browsers, but at least it'll be in * pixels! * * - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This * should translate to positive value zooming IN, negative zooming OUT. * This matches the newer 'wheel' event. * * Why are there spinX, spinY (or pixels)? * * - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn * with a mouse. It results in side-scrolling in the browser by default. * * - spinY is what you expect -- it's the classic axis of a mouse wheel. * * - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and * probably is by browsers in conjunction with fancy 3D controllers .. but * you know. * * Implementation info: * * Examples of 'wheel' event if you scroll slowly (down) by one step with an * average mouse: * * OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120) * OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12) * OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A) * Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120) * Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120) * * On the trackpad: * * OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6) * OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A) * * On other/older browsers.. it's more complicated as there can be multiple and * also missing delta values. * * The 'wheel' event is more standard: * * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents * * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and * deltaX, deltaY and deltaZ. Some browsers provide other values to maintain * backward compatibility with older events. Those other values help us * better normalize spin speed. Example of what the browsers provide: * * | event.wheelDelta | event.detail * ------------------+------------------+-------------- * Safari v5/OS X | -120 | 0 * Safari v5/Win7 | -120 | 0 * Chrome v17/OS X | -120 | 0 * Chrome v17/Win7 | -120 | 0 * IE9/Win7 | -120 | undefined * Firefox v4/OS X | undefined | 1 * Firefox v4/Win7 | undefined | 3 * */ Utils.normalizeWheel = function (event) { var PIXEL_STEP = 10; var LINE_HEIGHT = 40; var PAGE_HEIGHT = 800; // spinX, spinY var sX = 0; var sY = 0; // pixelX, pixelY var pX = 0; var pY = 0; // Legacy if ('detail' in event) { sY = event.detail; } if ('wheelDelta' in event) { sY = -event.wheelDelta / 120; } if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; } if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; } // side scrolling on FF with DOMMouseScroll if ('axis' in event && event.axis === event.HORIZONTAL_AXIS) { sX = sY; sY = 0; } pX = sX * PIXEL_STEP; pY = sY * PIXEL_STEP; if ('deltaY' in event) { pY = event.deltaY; } if ('deltaX' in event) { pX = event.deltaX; } if ((pX || pY) && event.deltaMode) { if (event.deltaMode == 1) { pX *= LINE_HEIGHT; pY *= LINE_HEIGHT; } else { pX *= PAGE_HEIGHT; pY *= PAGE_HEIGHT; } } // Fall-back if spin cannot be determined if (pX && !sX) { sX = (pX < 1) ? -1 : 1; } if (pY && !sY) { sY = (pY < 1) ? -1 : 1; } return { spinX: sX, spinY: sY, pixelX: pX, pixelY: pY }; }; return Utils; }()); exports.Utils = Utils; var NumberSequence = (function () { function NumberSequence(initValue, step) { if (initValue === void 0) { initValue = 0; } if (step === void 0) { step = 1; } this.nextValue = initValue; this.step = step; } NumberSequence.prototype.next = function () { var valToReturn = this.nextValue; this.nextValue += this.step; return valToReturn; }; return NumberSequence; }()); exports.NumberSequence = NumberSequence;
ajax/libs/primereact/7.0.1/menu/menu.esm.js
cdnjs/cdnjs
import React, { Component } from 'react'; import { DomHandler, ZIndexUtils, ConnectedOverlayScrollHandler, classNames, ObjectUtils } from 'primereact/utils'; import { CSSTransition } from 'primereact/csstransition'; import { OverlayService } from 'primereact/overlayservice'; import { Portal } from 'primereact/portal'; import PrimeReact from 'primereact/api'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var Menu = /*#__PURE__*/function (_Component) { _inherits(Menu, _Component); var _super = _createSuper(Menu); function Menu(props) { var _this; _classCallCheck(this, Menu); _this = _super.call(this, props); _this.state = { visible: !props.popup }; _this.onEnter = _this.onEnter.bind(_assertThisInitialized(_this)); _this.onEntered = _this.onEntered.bind(_assertThisInitialized(_this)); _this.onExit = _this.onExit.bind(_assertThisInitialized(_this)); _this.onExited = _this.onExited.bind(_assertThisInitialized(_this)); _this.onPanelClick = _this.onPanelClick.bind(_assertThisInitialized(_this)); _this.menuRef = /*#__PURE__*/React.createRef(); return _this; } _createClass(Menu, [{ key: "onPanelClick", value: function onPanelClick(event) { if (this.props.popup) { OverlayService.emit('overlay-click', { originalEvent: event, target: this.target }); } } }, { key: "onItemClick", value: function onItemClick(event, item) { if (item.disabled) { event.preventDefault(); return; } if (!item.url) { event.preventDefault(); } if (item.command) { item.command({ originalEvent: event, item: item }); } if (this.props.popup) { this.hide(event); } } }, { key: "onItemKeyDown", value: function onItemKeyDown(event, item) { var listItem = event.currentTarget.parentElement; switch (event.which) { //down case 40: var nextItem = this.findNextItem(listItem); if (nextItem) { nextItem.children[0].focus(); } event.preventDefault(); break; //up case 38: var prevItem = this.findPrevItem(listItem); if (prevItem) { prevItem.children[0].focus(); } event.preventDefault(); break; } } }, { key: "findNextItem", value: function findNextItem(item) { var nextItem = item.nextElementSibling; if (nextItem) return DomHandler.hasClass(nextItem, 'p-disabled') || !DomHandler.hasClass(nextItem, 'p-menuitem') ? this.findNextItem(nextItem) : nextItem;else return null; } }, { key: "findPrevItem", value: function findPrevItem(item) { var prevItem = item.previousElementSibling; if (prevItem) return DomHandler.hasClass(prevItem, 'p-disabled') || !DomHandler.hasClass(prevItem, 'p-menuitem') ? this.findPrevItem(prevItem) : prevItem;else return null; } }, { key: "toggle", value: function toggle(event) { if (this.props.popup) { if (this.state.visible) this.hide(event);else this.show(event); } } }, { key: "show", value: function show(event) { var _this2 = this; this.target = event.currentTarget; var currentEvent = event; this.setState({ visible: true }, function () { if (_this2.props.onShow) { _this2.props.onShow(currentEvent); } }); } }, { key: "hide", value: function hide(event) { var _this3 = this; var currentEvent = event; this.setState({ visible: false }, function () { if (_this3.props.onHide) { _this3.props.onHide(currentEvent); } }); } }, { key: "onEnter", value: function onEnter() { ZIndexUtils.set('menu', this.menuRef.current, PrimeReact.autoZIndex, this.props.baseZIndex || PrimeReact.zIndex['menu']); DomHandler.absolutePosition(this.menuRef.current, this.target); } }, { key: "onEntered", value: function onEntered() { this.bindDocumentListeners(); this.bindScrollListener(); } }, { key: "onExit", value: function onExit() { this.target = null; this.unbindDocumentListeners(); this.unbindScrollListener(); } }, { key: "onExited", value: function onExited() { ZIndexUtils.clear(this.menuRef.current); } }, { key: "bindDocumentListeners", value: function bindDocumentListeners() { var _this4 = this; if (!this.documentClickListener) { this.documentClickListener = function (event) { if (_this4.state.visible && _this4.isOutsideClicked(event)) { _this4.hide(event); } }; document.addEventListener('click', this.documentClickListener); } if (!this.documentResizeListener) { this.documentResizeListener = function (event) { if (_this4.state.visible && !DomHandler.isAndroid()) { _this4.hide(event); } }; window.addEventListener('resize', this.documentResizeListener); } } }, { key: "unbindDocumentListeners", value: function unbindDocumentListeners() { if (this.documentClickListener) { document.removeEventListener('click', this.documentClickListener); this.documentClickListener = null; } if (this.documentResizeListener) { window.removeEventListener('resize', this.documentResizeListener); this.documentResizeListener = null; } } }, { key: "bindScrollListener", value: function bindScrollListener() { var _this5 = this; if (!this.scrollHandler) { this.scrollHandler = new ConnectedOverlayScrollHandler(this.target, function (event) { if (_this5.state.visible) { _this5.hide(event); } }); } this.scrollHandler.bindScrollListener(); } }, { key: "unbindScrollListener", value: function unbindScrollListener() { if (this.scrollHandler) { this.scrollHandler.unbindScrollListener(); } } }, { key: "isOutsideClicked", value: function isOutsideClicked(event) { return this.menuRef && this.menuRef.current && !(this.menuRef.current.isSameNode(event.target) || this.menuRef.current.contains(event.target)); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.unbindDocumentListeners(); if (this.scrollHandler) { this.scrollHandler.destroy(); this.scrollHandler = null; } ZIndexUtils.clear(this.menuRef.current); } }, { key: "renderSubmenu", value: function renderSubmenu(submenu, index) { var _this6 = this; var className = classNames('p-submenu-header', { 'p-disabled': submenu.disabled }, submenu.className); var items = submenu.items.map(function (item, index) { return _this6.renderMenuitem(item, index); }); return /*#__PURE__*/React.createElement(React.Fragment, { key: submenu.label + '_' + index }, /*#__PURE__*/React.createElement("li", { className: className, style: submenu.style, role: "presentation", "aria-disabled": submenu.disabled }, submenu.label), items); } }, { key: "renderSeparator", value: function renderSeparator(index) { return /*#__PURE__*/React.createElement("li", { key: 'separator_' + index, className: "p-menu-separator", role: "separator" }); } }, { key: "renderMenuitem", value: function renderMenuitem(item, index) { var _this7 = this; var className = classNames('p-menuitem', item.className); var linkClassName = classNames('p-menuitem-link', { 'p-disabled': item.disabled }); var iconClassName = classNames('p-menuitem-icon', item.icon); var icon = item.icon && /*#__PURE__*/React.createElement("span", { className: iconClassName }); var label = item.label && /*#__PURE__*/React.createElement("span", { className: "p-menuitem-text" }, item.label); var tabIndex = item.disabled ? null : 0; var content = /*#__PURE__*/React.createElement("a", { href: item.url || '#', className: linkClassName, role: "menuitem", target: item.target, onClick: function onClick(event) { return _this7.onItemClick(event, item); }, onKeyDown: function onKeyDown(event) { return _this7.onItemKeyDown(event, item); }, tabIndex: tabIndex, "aria-disabled": item.disabled }, icon, label); if (item.template) { var defaultContentOptions = { onClick: function onClick(event) { return _this7.onItemClick(event, item); }, onKeyDown: function onKeyDown(event) { return _this7.onItemKeyDown(event, item); }, className: linkClassName, tabIndex: tabIndex, labelClassName: 'p-menuitem-text', iconClassName: iconClassName, element: content, props: this.props }; content = ObjectUtils.getJSXElement(item.template, item, defaultContentOptions); } return /*#__PURE__*/React.createElement("li", { key: item.label + '_' + index, className: className, style: item.style, role: "none" }, content); } }, { key: "renderItem", value: function renderItem(item, index) { if (item.separator) { return this.renderSeparator(index); } else { if (item.items) return this.renderSubmenu(item, index);else return this.renderMenuitem(item, index); } } }, { key: "renderMenu", value: function renderMenu() { var _this8 = this; return this.props.model.map(function (item, index) { return _this8.renderItem(item, index); }); } }, { key: "renderElement", value: function renderElement() { if (this.props.model) { var className = classNames('p-menu p-component', this.props.className, { 'p-menu-overlay': this.props.popup }); var menuitems = this.renderMenu(); return /*#__PURE__*/React.createElement(CSSTransition, { nodeRef: this.menuRef, classNames: "p-connected-overlay", in: this.state.visible, timeout: { enter: 120, exit: 100 }, options: this.props.transitionOptions, unmountOnExit: true, onEnter: this.onEnter, onEntered: this.onEntered, onExit: this.onExit, onExited: this.onExited }, /*#__PURE__*/React.createElement("div", { ref: this.menuRef, id: this.props.id, className: className, style: this.props.style, onClick: this.onPanelClick }, /*#__PURE__*/React.createElement("ul", { className: "p-menu-list p-reset", role: "menu" }, menuitems))); } return null; } }, { key: "render", value: function render() { var element = this.renderElement(); return this.props.popup ? /*#__PURE__*/React.createElement(Portal, { element: element, appendTo: this.props.appendTo }) : element; } }]); return Menu; }(Component); _defineProperty(Menu, "defaultProps", { id: null, model: null, popup: false, style: null, className: null, autoZIndex: true, baseZIndex: 0, appendTo: null, transitionOptions: null, onShow: null, onHide: null }); export { Menu };
jchemhub/controller/plugin.js
chemhack/jchemhub
goog.provide('jchemhub.controller.Plugin'); goog.require('goog.events.EventTarget'); goog.require('goog.functions'); goog.require('goog.debug.Logger'); goog.require('goog.object'); goog.require('goog.reflect'); /** * Abstract API for reaction editor plugins. * * @constructor * @extends {goog.events.EventTarget} */ jchemhub.controller.Plugin = function() { goog.events.EventTarget.call(this); /** * Whether this plugin is enabled for the registered field object. * * @type {boolean} * @private */ this.enabled_ = this.activeOnUneditableEditor(); }; goog.inherits(jchemhub.controller.Plugin, goog.events.EventTarget); /** * @return {boolean} If true, editor will not disable the command when the * editor becomes uneditable. */ jchemhub.controller.Plugin.prototype.activeOnUneditableEditor = goog.functions.FALSE; /** * Registers the reaction editor object for use with this plugin. * * @param {jchemhub.controller.ReactionEditor} * fieldObject The reaction editor object. */ jchemhub.controller.Plugin.prototype.registerEditorObject = function(editorObject) { this.editorObject = editorObject; }; /** * Enables this plugin for the specified, registered reaction editor object. A * reaction editor object should only be enabled when it is loaded. * * @param {jchemhub.controller.ReactionEditor} * editorObject The field object. */ jchemhub.controller.Plugin.prototype.enable = function(editorObject) { if (this.editorObject == editorObject) { this.enabled_ = true; } else { this.logger .severe('Trying to enable an unregistered field with ' + 'this plugin.'); } }; /** * Disables this plugin for the specified, registered reaction editor object. * * @param {jchemhub.controller.ReactionEditor} * editorObject The reaction editor object. */ jchemhub.controller.Plugin.prototype.disable = function(editorObject) { if (this.editorObject == editorObject) { this.enabled_ = false; } else { this.logger .severe('Trying to disable an unregistered field ' + 'with this plugin.'); } }; /** * The logger for this plugin. * * @type {goog.debug.Logger} * @protected */ jchemhub.controller.Plugin.prototype.logger = goog.debug.Logger .getLogger('jchemhub.controller.Plugin'); /** * Returns whether this plugin is enabled for the reaction editor object. * * @param {jchemhub.controller.ReactionEditor} * editorObject The reaction editor object. * @return {boolean} Whether this plugin is enabled for the reaction editor * object. */ jchemhub.controller.Plugin.prototype.isEnabled = function(editorObject) { return this.editorObject == editorObject ? this.enabled_ : false; }; /** @inheritDoc */ jchemhub.controller.Plugin.prototype.disposeInternal = function() { if (this.editorObject) { this.unregisterEditorObject(this.editorObject); } jchemhub.controller.Plugin.superClass_.disposeInternal.call(this); }; /** * Unregisters and disables this plugin for the current editor object. * */ jchemhub.controller.Plugin.prototype.unregisterEditorObject = function() { if (this.editorObject) { this.disable(this.editorObject); this.editorObject = null; } }; /** * Indicates if this plugin should be automatically disposed when the registered * editor is disposed. This should be changed to false for plugins used as * multi-editor plugins. * * @type {boolean} * @private */ jchemhub.controller.Plugin.prototype.autoDispose_ = true; /** * Set if this plugin should automatically be disposed when the registered * editor is disposed. * * @param {boolean} * autoDispose Whether to autoDispose. */ jchemhub.controller.Plugin.prototype.setAutoDispose = function(autoDispose) { this.autoDispose_ = autoDispose; }; /** * @return {boolean} Whether or not this plugin should automatically be disposed * when it's registered edtior is disposed. */ jchemhub.controller.Plugin.prototype.isAutoDispose = function() { return this.autoDispose_; }; /** * An enum of operations that plugins may support. * * @enum {number} */ jchemhub.controller.Plugin.Op = { KEYDOWN : 1, KEYPRESS : 2, KEYUP : 3, SELECTION : 4, SHORTCUT : 5, EXEC_COMMAND : 6, QUERY_COMMAND : 7, MOUSEDOWN: 8, MOUSEUP: 9, MOUSEOVER: 10, MOUSEOUT: 11, ATOM_MOUSEOVER : 12, ATOM_MOUSEOUT : 13, BOND_MOUSEOVER : 14, BOND_MOUSEOUT : 15, BOND_MOUSEDOWN: 16 }; /** * @return {boolean} If true, editor will not disable the command * when the field becomes uneditable. */ jchemhub.controller.Plugin.prototype.activeOnUneditableEditors = goog.functions.FALSE; /** * A map from plugin operations to the names of the methods that invoke those * operations. */ jchemhub.controller.Plugin.OPCODE = goog.object.transpose(goog.reflect.object( jchemhub.controller.Plugin, { handleKeyDown : jchemhub.controller.Plugin.Op.KEYDOWN, handleKeyPress : jchemhub.controller.Plugin.Op.KEYPRESS, handleKeyUp : jchemhub.controller.Plugin.Op.KEYUP, handleSelectionChange : jchemhub.controller.Plugin.Op.SELECTION, handleKeyboardShortcut : jchemhub.controller.Plugin.Op.SHORTCUT, execCommand : jchemhub.controller.Plugin.Op.EXEC_COMMAND, queryCommandValue : jchemhub.controller.Plugin.Op.QUERY_COMMAND, handleMouseDown : jchemhub.controller.Plugin.Op.MOUSEDOWN, handleMouseUp : jchemhub.controller.Plugin.Op.MOUSEUP, handleMouseOver : jchemhub.controller.Plugin.Op.MOUSEOVER, handleMouseOut : jchemhub.controller.Plugin.Op.MOUSEOUT, handleAtomMouseOver : jchemhub.controller.Plugin.Op.ATOM_MOUSEOVER, handleAtomMouseOut : jchemhub.controller.Plugin.Op.ATOM_MOUSEOUT, handleBondMouseOver : jchemhub.controller.Plugin.Op.BOND_MOUSEOVER, handleBondMouseOut : jchemhub.controller.Plugin.Op.BOND_MOUSEOUT, handleBondMouseDown : jchemhub.controller.Plugin.Op.BOND_MOUSEDOWN })); /** * Handles execCommand. This default implementation handles dispatching * BEFORECHANGE, CHANGE, and SELECTIONCHANGE events, and calls * execCommandInternal to perform the actual command. Plugins that want to do * their own event dispatching should override execCommand, otherwise it is * preferred to only override execCommandInternal. * * This version of execCommand will only work for single field plugins. * Multi-field plugins must override execCommand. * * @param {string} * command The command to execute. * @param {...*} * var_args Any additional parameters needed to execute the command. * @return {*} The result of the execCommand, if any. */ jchemhub.controller.Plugin.prototype.execCommand = function(command, var_args) { // TODO: Replace all uses of isSilentCommand with plugins that just // override this base execCommand method. var silent = this.isSilentCommand(command); if (!silent) { // Stop listening to mutation events in Firefox while text formatting // is happening. This prevents us from trying to size the field in the // middle of an execCommand, catching the field in a strange // intermediary // state where both replacement nodes and original nodes are appended to // the dom. Note that change events get turned back on by // editorObject.dispatchChange. if (goog.userAgent.GECKO) { this.editorObject.stopChangeEvents(true, true); } this.editorObject.dispatchBeforeChange(); } try { var result = this.execCommandInternal.apply(this, arguments); } finally { // If the above execCommandInternal call throws an exception, we still // need // to turn change events back on (see http://b/issue?id=1471355). // NOTE: If if you add to or change the methods called in this finally // block, please add them as expected calls to the unit test function // testExecCommandException(). if (!silent) { // dispatchChange includes a call to startChangeEvents, which // unwinds the // call to stopChangeEvents made before the try block. this.editorObject.dispatchChange(); this.editorObject.dispatchSelectionChangeEvent(); } } return result; }; /** * @param {string} * command The command to check. * @return {boolean} If true, field will not dispatch change events for commands * of this type. */ jchemhub.controller.Plugin.prototype.isSilentCommand = goog.functions.FALSE; /** * Whether the string corresponds to a command this plugin handles. * * @param {string} * command Command string to check. * @return {boolean} Whether the plugin handles this type of command. */ jchemhub.controller.Plugin.prototype.isSupportedCommand = function(command) { return false; };
docs/app/Examples/elements/Segment/Variations/SegmentExampleSizes.js
ben174/Semantic-UI-React
import React from 'react' import { Segment } from 'semantic-ui-react' const SegmentExampleSizes = () => { const sizes = ['mini', 'tiny', 'small', 'large', 'big', 'huge', 'massive'] return ( <div> {sizes.map(size => ( <Segment key={size} size={size}> It's a {size} segment </Segment> ))} </div> ) } export default SegmentExampleSizes
tests/routes/Counter/components/Counter.spec.js
VinodJayasinghe/CircleCI
import React from 'react' import { bindActionCreators } from 'redux' import { Counter } from 'routes/Counter/components/Counter' import { shallow } from 'enzyme' describe('(Component) Counter', () => { let _props, _spies, _wrapper beforeEach(() => { _spies = {} _props = { counter : 5, ...bindActionCreators({ doubleAsync : (_spies.doubleAsync = sinon.spy()), increment : (_spies.increment = sinon.spy()) }, _spies.dispatch = sinon.spy()) } _wrapper = shallow(<Counter {..._props} />) }) it('renders as a <div>.', () => { expect(_wrapper.is('div')).to.equal(true) }) it('renders with an <h2> that includes Counter label.', () => { expect(_wrapper.find('h2').text()).to.match(/Counter:/) }) it('renders {props.counter} at the end of the sample counter <h2>.', () => { expect(_wrapper.find('h2').text()).to.match(/5$/) _wrapper.setProps({ counter: 8 }) expect(_wrapper.find('h2').text()).to.match(/8$/) }) it('renders exactly two buttons.', () => { expect(_wrapper.find('button')).to.have.length(2) }) describe('Increment', () => { let _button beforeEach(() => { _button = _wrapper.find('button').filterWhere(a => a.text() === 'Increment') }) it('exists', () => { expect(_button).to.exist() }) it('is a primary button', () => { expect(_button.hasClass('btn btn-primary')).to.be.true() }) it('Calls props.increment when clicked', () => { _spies.dispatch.should.have.not.been.called() _button.simulate('click') _spies.dispatch.should.have.been.called() _spies.increment.should.have.been.called() }) }) describe('Double Async Button', () => { let _button beforeEach(() => { _button = _wrapper.find('button').filterWhere(a => a.text() === 'Double (Async)') }) it('exists', () => { expect(_button).to.exist() }) it('is a secondary button', () => { expect(_button.hasClass('btn btn-secondary')).to.be.true() }) it('Calls props.doubleAsync when clicked', () => { _spies.dispatch.should.have.not.been.called() _button.simulate('click') _spies.dispatch.should.have.been.called() _spies.doubleAsync.should.have.been.called() }) }) })
ajax/libs/babel-core/4.5.1/browser.min.js
alexmojaki/cdnjs
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self),n.babel=e()}}(function(){var e,n,l;return function t(e,n,l){function r(o,u){if(!n[o]){if(!e[o]){var s="function"==typeof require&&require;if(!u&&s)return s(o,!0);if(a)return a(o,!0);var i=new Error("Cannot find module '"+o+"'");throw i.code="MODULE_NOT_FOUND",i}var c=n[o]={exports:{}};e[o][0].call(c.exports,function(n){var l=e[o][1][n];return r(l?l:n)},c,c.exports,t,e,n,l)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o<l.length;o++)r(l[o]);return r}({1:[function(e,n){(function(l){"use strict";var t=n.exports=e("../transformation");t.version=e("../../../package").version,t.transform=t,t.run=function(e,n){return n=n||{},n.sourceMap="inline",new Function(t(e,n).code)()},t.load=function(e,n,r,a){r=r||{},r.filename=r.filename||e;var o=l.ActiveXObject?new l.ActiveXObject("Microsoft.XMLHTTP"):new l.XMLHttpRequest;o.open("GET",e,!0),"overrideMimeType"in o&&o.overrideMimeType("text/plain"),o.onreadystatechange=function(){if(4===o.readyState){var l=o.status;if(0!==l&&200!==l)throw new Error("Could not load "+e);var u=[o.responseText,r];a||t.run.apply(t,u),n&&n(u)}},o.send(null)};var r=function(){for(var e=[],n=["text/ecmascript-6","text/6to5","text/babel","module"],r=0,a=function(e){var n=function(){return e.apply(this,arguments)};return n.toString=function(){return e.toString()},n}(function(){var n=e[r];n instanceof Array&&(t.run.apply(t,n),r++,a())}),o=function(n,l){var r={};n.src?t.load(n.src,function(n){e[l]=n,a()},r,!0):(r.filename="embedded",e[l]=[n.innerHTML,r])},u=l.document.getElementsByTagName("script"),s=0;s<u.length;++s){var i=u[s];n.indexOf(i.type)>=0&&e.push(i)}for(s in e)o(e[s],s);a()};l.addEventListener?l.addEventListener("DOMContentLoaded",r,!1):l.attachEvent&&l.attachEvent("onload",r)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../../package":337,"../transformation":41}],2:[function(e,n){"use strict";function l(e,n){this.position=e,this._indent=n.indent.base,this.format=n,this.buf=""}n.exports=l;var t=e("repeating"),r=e("trim-right"),a=e("lodash/lang/isBoolean"),o=e("lodash/collection/includes"),u=e("lodash/lang/isNumber");l.prototype.get=function(){return r(this.buf)},l.prototype.getIndent=function(){return this.format.compact||this.format.concise?"":t(this.format.indent.style,this._indent)},l.prototype.indentSize=function(){return this.getIndent().length},l.prototype.indent=function(){this._indent++},l.prototype.dedent=function(){this._indent--},l.prototype.semicolon=function(){this.push(";")},l.prototype.ensureSemicolon=function(){this.isLast(";")||this.semicolon()},l.prototype.rightBrace=function(){this.newline(!0),this.push("}")},l.prototype.keyword=function(e){this.push(e),this.space()},l.prototype.space=function(){this.format.compact||!this.buf||this.isLast(" ")||this.isLast("\n")||this.push(" ")},l.prototype.removeLast=function(e){this.format.compact||this.isLast(e)&&(this.buf=this.buf.substr(0,this.buf.length-1),this.position.unshift(e))},l.prototype.newline=function(e,n){if(!this.format.compact){if(this.format.concise)return void this.space();if(n=n||!1,u(e)){if(e=Math.min(2,e),(this.endsWith("{\n")||this.endsWith(":\n"))&&e--,0>=e)return;for(;e>0;)this._newline(n),e--}else a(e)&&(n=e),this._newline(n)}},l.prototype._newline=function(e){this.endsWith("\n\n")||(e&&this.isLast("\n")&&this.removeLast("\n"),this.removeLast(" "),this._removeSpacesAfterLastNewline(),this._push("\n"))},l.prototype._removeSpacesAfterLastNewline=function(){var e=this.buf.lastIndexOf("\n");if(-1!==e){for(var n=this.buf.length-1;n>e&&" "===this.buf[n];)n--;n===e&&(this.buf=this.buf.substring(0,n+1))}},l.prototype.push=function(e,n){if(!this.format.compact&&this._indent&&!n&&"\n"!==e){var l=this.getIndent();e=e.replace(/\n/g,"\n"+l),this.isLast("\n")&&this._push(l)}this._push(e)},l.prototype._push=function(e){this.position.push(e),this.buf+=e},l.prototype.endsWith=function(e){return this.buf.slice(-e.length)===e},l.prototype.isLast=function(e){if(this.format.compact)return!1;var n=this.buf,l=n[n.length-1];return Array.isArray(e)?o(e,l):e===l}},{"lodash/collection/includes":200,"lodash/lang/isBoolean":283,"lodash/lang/isNumber":287,repeating:320,"trim-right":336}],3:[function(e,n,l){"use strict";l.File=function(e,n){n(e.program)},l.Program=function(e,n){n.sequence(e.body)},l.BlockStatement=function(e,n){0===e.body.length?this.push("{}"):(this.push("{"),this.newline(),n.sequence(e.body,{indent:!0}),this.removeLast("\n"),this.rightBrace())}},{}],4:[function(e,n,l){"use strict";l.ClassExpression=l.ClassDeclaration=function(e,n){this.push("class"),e.id&&(this.space(),n(e.id)),e.superClass&&(this.push(" extends "),n(e.superClass)),this.space(),n(e.body)},l.ClassBody=function(e,n){0===e.body.length?this.push("{}"):(this.push("{"),this.newline(),this.indent(),n.sequence(e.body),this.dedent(),this.rightBrace())},l.MethodDefinition=function(e,n){e["static"]&&this.push("static "),this._method(e,n)}},{}],5:[function(e,n,l){"use strict";l.ComprehensionBlock=function(e,n){this.keyword("for"),this.push("("),n(e.left),this.push(" of "),n(e.right),this.push(")")},l.ComprehensionExpression=function(e,n){this.push(e.generator?"(":"["),n.join(e.blocks,{separator:" "}),this.space(),e.filter&&(this.keyword("if"),this.push("("),n(e.filter),this.push(")"),this.space()),n(e.body),this.push(e.generator?")":"]")}},{}],6:[function(e,n,l){"use strict";var t=e("is-integer"),r=e("lodash/lang/isNumber"),a=e("../../types");l.UnaryExpression=function(e,n){var l=/[a-z]$/.test(e.operator),t=e.argument;(a.isUpdateExpression(t)||a.isUnaryExpression(t))&&(l=!0),a.isUnaryExpression(t)&&"!"===t.operator&&(l=!1),this.push(e.operator),l&&this.push(" "),n(e.argument)},l.UpdateExpression=function(e,n){e.prefix?(this.push(e.operator),n(e.argument)):(n(e.argument),this.push(e.operator))},l.ConditionalExpression=function(e,n){n(e.test),this.space(),this.push("?"),this.space(),n(e.consequent),this.space(),this.push(":"),this.space(),n(e.alternate)},l.NewExpression=function(e,n){this.push("new "),n(e.callee),this.push("("),n.list(e.arguments),this.push(")")},l.SequenceExpression=function(e,n){n.list(e.expressions)},l.ThisExpression=function(){this.push("this")},l.CallExpression=function(e,n){n(e.callee),this.push("(");var l=",";e._prettyCall?(l+="\n",this.newline(),this.indent()):l+=" ",n.list(e.arguments,{separator:l}),e._prettyCall&&(this.newline(),this.dedent()),this.push(")")};var o=function(e){return function(n,l){this.push(e),(n.delegate||n.all)&&this.push("*"),n.argument&&(this.space(),l(n.argument))}};l.YieldExpression=o("yield"),l.AwaitExpression=o("await"),l.EmptyStatement=function(){this.semicolon()},l.ExpressionStatement=function(e,n){n(e.expression),this.semicolon()},l.BinaryExpression=l.LogicalExpression=l.AssignmentPattern=l.AssignmentExpression=function(e,n){n(e.left),this.push(" "),this.push(e.operator),this.push(" "),n(e.right)};var u=/e/i;l.MemberExpression=function(e,n){var l=e.object;if(n(l),!e.computed&&a.isMemberExpression(e.property))throw new TypeError("Got a MemberExpression for MemberExpression property");var o=e.computed;a.isLiteral(e.property)&&r(e.property.value)&&(o=!0),o?(this.push("["),n(e.property),this.push("]")):(a.isLiteral(l)&&t(l.value)&&!u.test(l.value.toString())&&this.push("."),this.push("."),n(e.property))}},{"../../types":119,"is-integer":184,"lodash/lang/isNumber":287}],7:[function(e,n,l){"use strict";l.AnyTypeAnnotation=l.ArrayTypeAnnotation=l.BooleanTypeAnnotation=l.ClassProperty=l.DeclareClass=l.DeclareFunction=l.DeclareModule=l.DeclareVariable=l.FunctionTypeAnnotation=l.FunctionTypeParam=l.GenericTypeAnnotation=l.InterfaceExtends=l.InterfaceDeclaration=l.IntersectionTypeAnnotation=l.NullableTypeAnnotation=l.NumberTypeAnnotation=l.StringLiteralTypeAnnotation=l.StringTypeAnnotation=l.TupleTypeAnnotation=l.TypeofTypeAnnotation=l.TypeAlias=l.TypeAnnotation=l.TypeParameterDeclaration=l.TypeParameterInstantiation=l.ObjectTypeAnnotation=l.ObjectTypeCallProperty=l.ObjectTypeIndexer=l.ObjectTypeProperty=l.QualifiedTypeIdentifier=l.UnionTypeAnnotation=l.TypeCastExpression=l.VoidTypeAnnotation=function(){}},{}],8:[function(e,n,l){"use strict";var t=e("../../types"),r=e("lodash/collection/each");l.JSXAttribute=function(e,n){n(e.name),e.value&&(this.push("="),n(e.value))},l.JSXIdentifier=function(e){this.push(e.name)},l.JSXNamespacedName=function(e,n){n(e.namespace),this.push(":"),n(e.name)},l.JSXMemberExpression=function(e,n){n(e.object),this.push("."),n(e.property)},l.JSXSpreadAttribute=function(e,n){this.push("{..."),n(e.argument),this.push("}")},l.JSXExpressionContainer=function(e,n){this.push("{"),n(e.expression),this.push("}")},l.JSXElement=function(e,n){var l=this,a=e.openingElement;n(a),a.selfClosing||(this.indent(),r(e.children,function(e){t.isLiteral(e)?l.push(e.value):n(e)}),this.dedent(),n(e.closingElement))},l.JSXOpeningElement=function(e,n){this.push("<"),n(e.name),e.attributes.length>0&&(this.push(" "),n.join(e.attributes,{separator:" "})),this.push(e.selfClosing?" />":">")},l.JSXClosingElement=function(e,n){this.push("</"),n(e.name),this.push(">")},l.JSXEmptyExpression=function(){}},{"../../types":119,"lodash/collection/each":197}],9:[function(e,n,l){"use strict";var t=e("../../types");l._params=function(e,n){this.push("("),n.list(e.params),this.push(")")},l._method=function(e,n){var l=e.value,t=e.kind,r=e.key;t&&"init"!==t?this.push(t+" "):l.generator&&this.push("*"),l.async&&this.push("async "),e.computed?(this.push("["),n(r),this.push("]")):n(r),this._params(l,n),this.push(" "),n(l.body)},l.FunctionDeclaration=l.FunctionExpression=function(e,n){e.async&&this.push("async "),this.push("function"),e.generator&&this.push("*"),e.id?(this.push(" "),n(e.id)):this.space(),this._params(e,n),this.space(),n(e.body)},l.ArrowFunctionExpression=function(e,n){e.async&&this.push("async "),1===e.params.length&&t.isIdentifier(e.params[0])?n(e.params[0]):this._params(e,n),this.push(" => "),n(e.body)}},{"../../types":119}],10:[function(e,n,l){"use strict";var t=e("../../types"),r=e("lodash/collection/each");l.ImportSpecifier=function(e,n){return t.isSpecifierDefault(e)?void n(t.getSpecifierName(e)):l.ExportSpecifier.apply(this,arguments)},l.ExportSpecifier=function(e,n){n(e.id),e.name&&(this.push(" as "),n(e.name))},l.ExportBatchSpecifier=function(){this.push("*")},l.ExportDeclaration=function(e,n){this.push("export ");var l=e.specifiers;if(e["default"]&&this.push("default "),e.declaration){if(n(e.declaration),t.isStatement(e.declaration))return}else 1===l.length&&t.isExportBatchSpecifier(l[0])?n(l[0]):(this.push("{"),l.length&&(this.space(),n.join(l,{separator:", "}),this.space()),this.push("}")),e.source&&(this.push(" from "),n(e.source));this.ensureSemicolon()},l.ImportDeclaration=function(e,n){var l=this;this.push("import "),e.isType&&this.push("type ");var a=e.specifiers;if(a&&a.length){var o=!1;r(e.specifiers,function(e,r){+r>0&&l.push(", ");var a=t.isSpecifierDefault(e);a||"ImportBatchSpecifier"===e.type||o||(o=!0,l.push("{ ")),n(e)}),o&&this.push(" }"),this.push(" from ")}n(e.source),this.semicolon()},l.ImportBatchSpecifier=function(e,n){this.push("* as "),n(e.name)}},{"../../types":119,"lodash/collection/each":197}],11:[function(e,n,l){"use strict";var t=e("lodash/collection/each");t(["BindMemberExpression","BindFunctionExpression"],function(e){l[e]=function(){throw new ReferenceError("Trying to render non-standard playground node "+JSON.stringify(e))}})},{"lodash/collection/each":197}],12:[function(e,n,l){"use strict";var t=e("repeating"),r=e("../../types");l.WithStatement=function(e,n){this.keyword("with"),this.push("("),n(e.object),this.push(")"),n.block(e.body)},l.IfStatement=function(e,n){this.keyword("if"),this.push("("),n(e.test),this.push(")"),this.space(),n.indentOnComments(e.consequent),e.alternate&&(this.isLast("}")&&this.space(),this.push("else "),n.indentOnComments(e.alternate))},l.ForStatement=function(e,n){this.keyword("for"),this.push("("),n(e.init),this.push(";"),e.test&&(this.push(" "),n(e.test)),this.push(";"),e.update&&(this.push(" "),n(e.update)),this.push(")"),n.block(e.body)},l.WhileStatement=function(e,n){this.keyword("while"),this.push("("),n(e.test),this.push(")"),n.block(e.body)};var a=function(e){return function(n,l){this.keyword("for"),this.push("("),l(n.left),this.push(" "+e+" "),l(n.right),this.push(")"),l.block(n.body)}};l.ForInStatement=a("in"),l.ForOfStatement=a("of"),l.DoWhileStatement=function(e,n){this.keyword("do"),n(e.body),this.space(),this.keyword("while"),this.push("("),n(e.test),this.push(");")};var o=function(e,n){return function(l,t){this.push(e);var r=l[n||"label"];r&&(this.push(" "),t(r)),this.semicolon()}};l.ContinueStatement=o("continue"),l.ReturnStatement=o("return","argument"),l.BreakStatement=o("break"),l.LabeledStatement=function(e,n){n(e.label),this.push(": "),n(e.body)},l.TryStatement=function(e,n){this.keyword("try"),n(e.block),this.space(),n(e.handlers?e.handlers[0]:e.handler),e.finalizer&&(this.space(),this.push("finally "),n(e.finalizer))},l.CatchClause=function(e,n){this.keyword("catch"),this.push("("),n(e.param),this.push(") "),n(e.body)},l.ThrowStatement=function(e,n){this.push("throw "),n(e.argument),this.semicolon()},l.SwitchStatement=function(e,n){this.keyword("switch"),this.push("("),n(e.discriminant),this.push(")"),this.space(),this.push("{"),n.sequence(e.cases,{indent:!0,addNewlines:function(n,l){return n||e.cases[e.cases.length-1]!==l?void 0:-1}}),this.push("}")},l.SwitchCase=function(e,n){e.test?(this.push("case "),n(e.test),this.push(":")):this.push("default:"),e.consequent.length&&(this.newline(),n.sequence(e.consequent,{indent:!0}))},l.DebuggerStatement=function(){this.push("debugger;")},l.VariableDeclaration=function(e,n,l){this.push(e.kind+" ");var a=!1;if(!r.isFor(l))for(var o=0;o<e.declarations.length;o++)e.declarations[o].init&&(a=!0);var u=",";u+=!this.format.compact&&a?"\n"+t(" ",e.kind.length+1):" ",n.list(e.declarations,{separator:u}),r.isFor(l)||this.semicolon()},l.PrivateDeclaration=function(e,n){this.push("private "),n.join(e.declarations,{separator:", "}),this.semicolon()},l.VariableDeclarator=function(e,n){e.init?(n(e.id),this.space(),this.push("="),this.space(),n(e.init)):n(e.id)}},{"../../types":119,repeating:320}],13:[function(e,n,l){"use strict";var t=e("lodash/collection/each");l.TaggedTemplateExpression=function(e,n){n(e.tag),n(e.quasi)},l.TemplateElement=function(e){this._push(e.value.raw)},l.TemplateLiteral=function(e,n){var l=this;this.push("`");var r=e.quasis,a=r.length;t(r,function(t,r){n(t),a>r+1&&(l.push("${ "),n(e.expressions[r]),l.push(" }"))}),this._push("`")}},{"lodash/collection/each":197}],14:[function(e,n,l){"use strict";var t=e("lodash/collection/each");l.Identifier=function(e){this.push(e.name)},l.RestElement=l.SpreadElement=l.SpreadProperty=function(e,n){this.push("..."),n(e.argument)},l.VirtualPropertyExpression=function(e,n){n(e.object),this.push("::"),n(e.property)},l.ObjectExpression=l.ObjectPattern=function(e,n){var l=e.properties;l.length?(this.push("{"),this.space(),n.list(l,{indent:!0}),this.space(),this.push("}")):this.push("{}")},l.Property=function(e,n){if(e.method||"get"===e.kind||"set"===e.kind)this._method(e,n);else{if(e.computed)this.push("["),n(e.key),this.push("]");else if(n(e.key),e.shorthand)return;this.push(":"),this.space(),n(e.value)}},l.ArrayExpression=l.ArrayPattern=function(e,n){var l=this,r=e.elements,a=r.length;this.push("["),t(r,function(e,t){e?(t>0&&l.push(" "),n(e),a-1>t&&l.push(",")):l.push(",")}),this.push("]")},l.Literal=function(e){var n=e.value,l=typeof n;"string"===l?(n=JSON.stringify(n),n=n.replace(/[\u000A\u000D\u2028\u2029]/g,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}),this.push(n)):"number"===l?this.push(n+""):"boolean"===l?this.push(n?"true":"false"):e.regex?this.push("/"+e.regex.pattern+"/"+e.regex.flags):null===n&&this.push("null")}},{"lodash/collection/each":197}],15:[function(e,n){"use strict";function l(e,n,t){n=n||{},this.comments=e.comments||[],this.tokens=e.tokens||[],this.format=l.normalizeOptions(t,n),this.opts=n,this.ast=e,this.whitespace=new r(this.tokens,this.comments,this.format),this.position=new u,this.map=new o(this.position,n,t),this.buffer=new i(this.position,this.format)}n.exports=function(e,n,t){var r=new l(e,n,t);return r.generate()},n.exports.CodeGenerator=l;var t=e("detect-indent"),r=e("./whitespace"),a=e("repeating"),o=e("./source-map"),u=e("./position"),s=e("../messages"),i=e("./buffer"),c=e("lodash/object/extend"),d=e("lodash/collection/each"),p=e("./node"),f=e("../types");d(i.prototype,function(e,n){l.prototype[n]=function(){return e.apply(this.buffer,arguments)}}),l.normalizeOptions=function(e,n){var l=" ";if(e){var r=t(e).indent;r&&" "!==r&&(l=r)}var a={comments:null==n.comments||n.comments,compact:n.compact,indent:{adjustMultilineComment:!0,style:l,base:0}};return"auto"===a.compact&&(a.compact=e.length>1e5,a.compact&&console.error(s.get("codeGeneratorDeopt",n.filename,"100KB"))),a},l.generators={templateLiterals:e("./generators/template-literals"),comprehensions:e("./generators/comprehensions"),expressions:e("./generators/expressions"),statements:e("./generators/statements"),playground:e("./generators/playground"),classes:e("./generators/classes"),methods:e("./generators/methods"),modules:e("./generators/modules"),types:e("./generators/types"),flow:e("./generators/flow"),base:e("./generators/base"),jsx:e("./generators/jsx")},d(l.generators,function(e){c(l.prototype,e)}),l.prototype.generate=function(){var e=this.ast;this.print(e);var n=[];return d(e.comments,function(e){e._displayed||n.push(e)}),this._printComments(n),{map:this.map.get(),code:this.buffer.get()}},l.prototype.buildPrint=function(e){var n=this,l=function(l,t){return n.print(l,e,t)};return l.sequence=function(e,t){return t=t||{},t.statement=!0,n.printJoin(l,e,t)},l.join=function(e,t){return n.printJoin(l,e,t)},l.list=function(e,n){n=n||{},n.separator=n.separator||", ",l.join(e,n)},l.block=function(e){return n.printBlock(l,e)},l.indentOnComments=function(e){return n.printAndIndentOnComments(l,e)},l},l.prototype.print=function(e,n,l){var t=this;if(!e)return"";n&&n._compact&&(e._compact=!0);var r=this.format.concise;e._compact&&(this.format.concise=!0),l=l||{};var a=function(r){if(l.statement||p.isUserWhitespacable(e,n)){var a=0;if(null==e.start||e._ignoreUserWhitespace){r||a++,l.addNewlines&&(a+=l.addNewlines(r,e)||0);var o=p.needsWhitespaceAfter;r&&(o=p.needsWhitespaceBefore),o(e,n)&&a++,t.buffer.buf||(a=0)}else a=r?t.whitespace.getNewlinesBefore(e):t.whitespace.getNewlinesAfter(e);t.newline(a)}};if(!this[e.type])throw new ReferenceError("unknown node of type "+JSON.stringify(e.type)+" with constructor "+JSON.stringify(e&&e.constructor.name));var o=p.needsParensNoLineTerminator(e,n),u=o||p.needsParens(e,n);u&&this.push("("),o&&this.indent(),this.printLeadingComments(e,n),a(!0),l.before&&l.before(),this.map.mark(e,"start"),this[e.type](e,this.buildPrint(e),n),o&&(this.newline(),this.dedent()),u&&this.push(")"),this.map.mark(e,"end"),l.after&&l.after(),a(!1),this.printTrailingComments(e,n),this.format.concise=r},l.prototype.printJoin=function(e,n,l){var t=this;if(n&&n.length){l=l||{};var r=n.length;l.indent&&this.indent(),d(n,function(n,a){e(n,{statement:l.statement,addNewlines:l.addNewlines,after:function(){l.iterator&&l.iterator(n,a),l.separator&&r-1>a&&t.push(l.separator)}})}),l.indent&&this.dedent()}},l.prototype.printAndIndentOnComments=function(e,n){var l=!!n.leadingComments;l&&this.indent(),e(n),l&&this.dedent()},l.prototype.printBlock=function(e,n){f.isEmptyStatement(n)?this.semicolon():(this.push(" "),e(n))},l.prototype.generateComment=function(e){var n=e.value;return n="Line"===e.type?"//"+n:"/*"+n+"*/"},l.prototype.printTrailingComments=function(e,n){this._printComments(this.getComments("trailingComments",e,n))},l.prototype.printLeadingComments=function(e,n){this._printComments(this.getComments("leadingComments",e,n))},l.prototype.getComments=function(e,n,l){var t=this;if(f.isExpressionStatement(l))return[];var r=[],a=[n];return f.isExpressionStatement(n)&&a.push(n.argument),d(a,function(n){r=r.concat(t._getComments(e,n))}),r},l.prototype._getComments=function(e,n){return n&&n[e]||[]},l.prototype._printComments=function(e){var n=this;this.format.compact||this.format.comments&&e&&e.length&&d(e,function(e){var l=!1;if(d(n.ast.comments,function(n){return n.start===e.start?(n._displayed&&(l=!0),n._displayed=!0,!1):void 0}),!l){n.newline(n.whitespace.getNewlinesBefore(e));var t=n.position.column,r=n.generateComment(e);if(t&&!n.isLast(["\n"," ","[","{"])&&(n._push(" "),t++),"Block"===e.type&&n.format.indent.adjustMultilineComment){var o=e.loc.start.column;if(o){var u=new RegExp("\\n\\s{1,"+o+"}","g");r=r.replace(u,"\n")}var s=Math.max(n.indentSize(),t);r=r.replace(/\n/g,"\n"+a(" ",s))}0===t&&(r=n.getIndent()+r),n._push(r),n.newline(n.whitespace.getNewlinesAfter(e))}})}},{"../messages":27,"../types":119,"./buffer":2,"./generators/base":3,"./generators/classes":4,"./generators/comprehensions":5,"./generators/expressions":6,"./generators/flow":7,"./generators/jsx":8,"./generators/methods":9,"./generators/modules":10,"./generators/playground":11,"./generators/statements":12,"./generators/template-literals":13,"./generators/types":14,"./node":16,"./position":19,"./source-map":20,"./whitespace":21,"detect-indent":176,"lodash/collection/each":197,"lodash/object/extend":294,repeating:320}],16:[function(e,n){"use strict";function l(e,n){this.parent=n,this.node=e}n.exports=l;var t=e("./whitespace"),r=e("./parentheses"),a=e("lodash/collection/each"),o=e("lodash/collection/some"),u=e("../../types"),s=function(e,n,l){if(e){for(var t,r=Object.keys(e),a=0;a<r.length;a++){var o=r[a];if(u.is(o,n)){var s=e[o];if(t=s(n,l),null!=t)break}}return t}};l.isUserWhitespacable=function(e){return u.isUserWhitespacable(e)},l.needsWhitespace=function(e,n,r){if(!e)return 0;u.isExpressionStatement(e)&&(e=e.expression);var a=s(t.nodes,e,n);if(!a){var o=s(t.list,e,n);if(o)for(var i=0;i<o.length&&!(a=l.needsWhitespace(o[i],e,r));i++);}return a&&a[r]||0},l.needsWhitespaceBefore=function(e,n){return l.needsWhitespace(e,n,"before")},l.needsWhitespaceAfter=function(e,n){return l.needsWhitespace(e,n,"after")},l.needsParens=function(e,n){if(!n)return!1;if(u.isNewExpression(n)&&n.callee===e){if(u.isCallExpression(e))return!0;var l=o(e,function(e){return u.isCallExpression(e)});if(l)return!0}return s(r,e,n)},l.needsParensNoLineTerminator=function(e,n){return n&&e.leadingComments&&e.leadingComments.length?u.isYieldExpression(n)||u.isAwaitExpression(n)?!0:u.isContinueStatement(n)||u.isBreakStatement(n)||u.isReturnStatement(n)||u.isThrowStatement(n)?!0:!1:!1},a(l,function(e,n){l.prototype[n]=function(){var e=new Array(arguments.length+2);e[0]=this.node,e[1]=this.parent;for(var t=0;t<e.length;t++)e[t+2]=arguments[t];return l[n].apply(null,e)}})},{"../../types":119,"./parentheses":17,"./whitespace":18,"lodash/collection/each":197,"lodash/collection/some":203}],17:[function(e,n,l){"use strict";var t=e("../../types"),r=e("lodash/collection/each"),a={};r([["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]],function(e,n){r(e,function(e){a[e]=n})}),l.UpdateExpression=function(e,n){return t.isMemberExpression(n)&&n.object===e?!0:void 0},l.ObjectExpression=function(e,n){return t.isExpressionStatement(n)?!0:t.isMemberExpression(n)&&n.object===e?!0:!1},l.Binary=function(e,n){if((t.isCallExpression(n)||t.isNewExpression(n))&&n.callee===e)return!0;if(t.isUnaryLike(n))return!0;if(t.isMemberExpression(n)&&n.object===e)return!0;if(t.isBinary(n)){var l=n.operator,r=a[l],o=e.operator,u=a[o];if(r>u)return!0;if(r===u&&n.right===e)return!0}},l.BinaryExpression=function(e,n){if("in"===e.operator){if(t.isVariableDeclarator(n))return!0;if(t.isFor(n))return!0}},l.SequenceExpression=function(e,n){return t.isForStatement(n)?!1:t.isExpressionStatement(n)&&n.expression===e?!1:!0},l.YieldExpression=function(e,n){return t.isBinary(n)||t.isUnaryLike(n)||t.isCallExpression(n)||t.isMemberExpression(n)||t.isNewExpression(n)||t.isConditionalExpression(n)||t.isYieldExpression(n)},l.ClassExpression=function(e,n){return t.isExpressionStatement(n)},l.UnaryLike=function(e,n){return t.isMemberExpression(n)&&n.object===e},l.FunctionExpression=function(e,n){return t.isExpressionStatement(n)?!0:t.isMemberExpression(n)&&n.object===e?!0:t.isCallExpression(n)&&n.callee===e?!0:void 0},l.AssignmentExpression=l.ConditionalExpression=function(e,n){return t.isUnaryLike(n)?!0:t.isBinary(n)?!0:(t.isCallExpression(n)||t.isNewExpression(n))&&n.callee===e?!0:t.isConditionalExpression(n)&&n.test===e?!0:t.isMemberExpression(n)&&n.object===e?!0:!1}},{"../../types":119,"lodash/collection/each":197}],18:[function(e,n,l){"use strict";var t=e("lodash/lang/isBoolean"),r=e("lodash/collection/each"),a=e("lodash/collection/map"),o=e("../../types"),u=function(e){var n=function(){return e.apply(this,arguments)};return n.toString=function(){return e.toString()},n}(function(e,n){return n=n||{},o.isMemberExpression(e)?(u(e.object,n),e.computed&&u(e.property,n)):o.isBinary(e)||o.isAssignmentExpression(e)?(u(e.left,n),u(e.right,n)):o.isCallExpression(e)?(n.hasCall=!0,u(e.callee,n)):o.isFunction(e)?n.hasFunction=!0:o.isIdentifier(e)&&(n.hasHelper=n.hasHelper||s(e.callee)),n}),s=function(e){var n=function(){return e.apply(this,arguments)};return n.toString=function(){return e.toString()},n}(function(e){return o.isMemberExpression(e)?s(e.object)||s(e.property):o.isIdentifier(e)?"require"===e.name||"_"===e.name[0]:o.isCallExpression(e)?s(e.callee):o.isBinary(e)||o.isAssignmentExpression(e)?o.isIdentifier(e.left)&&s(e.left)||s(e.right):!1}),i=function(e){return o.isLiteral(e)||o.isObjectExpression(e)||o.isArrayExpression(e)||o.isIdentifier(e)||o.isMemberExpression(e)};l.nodes={AssignmentExpression:function(e){var n=u(e.right);return n.hasCall&&n.hasHelper||n.hasFunction?{before:n.hasFunction,after:!0}:void 0},SwitchCase:function(e,n){return{before:e.consequent.length||n.cases[0]===e}},LogicalExpression:function(e){return o.isFunction(e.left)||o.isFunction(e.right)?{after:!0}:void 0},Literal:function(e){return"use strict"===e.value?{after:!0}:void 0},CallExpression:function(e){return o.isFunction(e.callee)||s(e)?{before:!0,after:!0}:void 0},VariableDeclaration:function(e){for(var n=0;n<e.declarations.length;n++){var l=e.declarations[n],t=s(l.id)&&!i(l.init);if(!t){var r=u(l.init);t=s(l.init)&&r.hasCall||r.hasFunction}if(t)return{before:!0,after:!0}}},IfStatement:function(e){return o.isBlockStatement(e.consequent)?{before:!0,after:!0}:void 0}},l.nodes.Property=l.nodes.SpreadProperty=function(e,n){return n.properties[0]===e?{before:!0}:void 0},l.list={VariableDeclaration:function(e){return a(e.declarations,"init")},ArrayExpression:function(e){return e.elements},ObjectExpression:function(e){return e.properties}},r({Function:!0,Class:!0,Loop:!0,LabeledStatement:!0,SwitchStatement:!0,TryStatement:!0},function(e,n){t(e)&&(e={after:e,before:e}),r([n].concat(o.FLIPPED_ALIAS_KEYS[n]||[]),function(n){l.nodes[n]=function(){return e}})})},{"../../types":119,"lodash/collection/each":197,"lodash/collection/map":201,"lodash/lang/isBoolean":283}],19:[function(e,n){"use strict";function l(){this.line=1,this.column=0}n.exports=l,l.prototype.push=function(e){for(var n=0;n<e.length;n++)"\n"===e[n]?(this.line++,this.column=0):this.column++},l.prototype.unshift=function(e){for(var n=0;n<e.length;n++)"\n"===e[n]?this.line--:this.column--}},{}],20:[function(e,n){"use strict";function l(e,n,l){this.position=e,this.opts=n,n.sourceMap?(this.map=new t.SourceMapGenerator({file:n.sourceMapName,sourceRoot:n.sourceRoot}),this.map.setSourceContent(n.sourceFileName,l)):this.map=null}n.exports=l;var t=e("source-map"),r=e("../types");l.prototype.get=function(){var e=this.map;return e?e.toJSON():e},l.prototype.mark=function(e,n){var l=e.loc;if(l){var t=this.map;if(t&&!r.isProgram(e)&&!r.isFile(e)){var a=this.position,o={line:a.line,column:a.column},u=l[n];t.addMapping({source:this.opts.sourceFileName,generated:o,original:u})}}}},{"../types":119,"source-map":325}],21:[function(e,n){"use strict";function l(e,n,l){return e+=n,e>=l&&(e-=l),e}function t(e,n){this.tokens=r(e.concat(n),"start"),this.used={},this._lastFoundIndex=0}n.exports=t;var r=e("lodash/collection/sortBy");t.prototype.getNewlinesBefore=function(e){for(var n,t,r,a=this.tokens,o=0;o<a.length;o++){var u=l(o,this._lastFoundIndex,this.tokens.length);if(r=a[u],e.start===r.start){n=a[u-1],t=r,this._lastFoundIndex=u;break}}return this.getNewlinesBetween(n,t)},t.prototype.getNewlinesAfter=function(e){for(var n,t,r,a=this.tokens,o=0;o<a.length;o++){var u=l(o,this._lastFoundIndex,this.tokens.length);if(r=a[u],e.end===r.end){n=r,t=a[u+1],this._lastFoundIndex=u;break}}if(t&&"eof"===t.type.type)return 1;var s=this.getNewlinesBetween(n,t);return"Line"!==e.type||s?s:1},t.prototype.getNewlinesBetween=function(e,n){if(!n||!n.loc)return 0;for(var l=e?e.loc.end.line:1,t=n.loc.start.line,r=0,a=l;t>a;a++)"undefined"==typeof this.used[a]&&(this.used[a]=!0,r++);return r}},{"lodash/collection/sortBy":204}],22:[function(e,n){"use strict";var l=e("line-numbers"),t=e("repeating"),r=e("js-tokens"),a=e("esutils"),o=e("chalk"),u=e("lodash/function/ary"),s={string:o.red,punctuation:o.white.bold,operator:o.white.bold,curly:o.green,parens:o.blue.bold,square:o.yellow,name:o.white,keyword:o.cyan,number:o.magenta,regex:o.magenta,comment:o.grey,invalid:o.inverse},i=/\r\n|[\n\r\u2028\u2029]/,c=function(e){var n=function(e){var n=r.matchToToken(e);if("name"===n.type&&a.keyword.isKeywordES6(n.value))return"keyword";if("punctuation"===n.type)switch(n.value){case"{":case"}":return"curly";case"(":case")":return"parens";case"[":case"]":return"square"}return n.type};return e.replace(r,function(e){var l=n(arguments);if(l in s){var t=u(s[l],1);return e.split(i).map(t).join("\n")}return e})};n.exports=function(e,n,r){r=Math.max(r,0),o.supportsColor&&(e=c(e)),e=e.split(i);var a=Math.max(n-3,0),u=Math.min(e.length,n+3);return n||r||(a=0,u=e.length),"\n"+l(e.slice(a,u),{start:a+1,before:" ",after:" | ",transform:function(e){e.number===n&&(r&&(e.line+="\n"+e.before+t(" ",e.width)+e.after+t(" ",r-1)+"^"),e.before=e.before.replace(/^./,">"))}}).join("\n")}},{chalk:164,esutils:181,"js-tokens":187,"line-numbers":189,"lodash/function/ary":206,repeating:320}],23:[function(e,n){"use strict";var l=e("../types");n.exports=function(e,n,t){if(e&&"Program"===e.type)return l.file(e,n||[],t||[]);throw new Error("Not a valid ast?")}},{"../types":119}],24:[function(e,n){"use strict";n.exports=function(){return Object.create(null)}},{}],25:[function(e,n){"use strict";var l=e("./normalize-ast"),t=e("estraverse"),r=e("./code-frame"),a=e("acorn-babel");n.exports=function(e,n,o){try{var u=[],s=[],i=a.parse(n,{allowImportExportEverywhere:e.allowImportExportEverywhere,allowReturnOutsideFunction:!e._anal,ecmaVersion:e.experimental?7:6,playground:e.playground,strictMode:e.strictMode,onComment:u,locations:!0,onToken:s,ranges:!0});return t.attachComments(i,u,s),i=l(i,u,s),o?o(i):i}catch(c){if(!c._babel){c._babel=!0;var d=e.filename+": "+c.message,p=c.loc;if(p){var f=r(n,p.line,p.column+1);d+=f}c.stack&&(c.stack=c.stack.replace(c.message,d)),c.message=d}throw c}}},{"./code-frame":22,"./normalize-ast":23,"acorn-babel":122,estraverse:177}],26:[function(e,n,l){"use strict";n.exports=function t(e){function n(){}return n.prototype=e,n}},{}],27:[function(e,n,l){"use strict";var t=e("util");l.messages={tailCallReassignmentDeopt:"Function reference has been reassigned so it's probably be dereferenced so we can't optimise this with confidence",JSXNamespacedTags:"Namespace tags are not supported. ReactJSX is not XML.",classesIllegalBareSuper:"Illegal use of bare super",classesIllegalSuperCall:"Direct super call is illegal in non-constructor, use super.$1() instead",classesIllegalConstructorKind:"Illegal kind for constructor method",scopeDuplicateDeclaration:"Duplicate declaration $1",undeclaredVariable:"Reference to undeclared variable $1",undeclaredVariableSuggestion:"Reference to undeclared variable $1 - did you mean $2?",settersInvalidParamLength:"Setters must have exactly one parameter",noAssignmentsInForHead:"No assignments allowed in for-in/of head",expectedMemberExpressionOrIdentifier:"Expected type MemeberExpression or Identifier",invalidParentForThisNode:"We don't know how to handle this node within the current parent - please open an issue",readOnly:"$1 is read-only",modulesIllegalExportName:"Illegal export $1",unknownForHead:"Unknown node type $1 in ForStatement",didYouMean:"Did you mean $1?",evalInStrictMode:"eval is not allowed in strict mode",codeGeneratorDeopt:"Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2."},l.get=function(e){var n=l.messages[e]; if(!n)throw new ReferenceError("Unknown message `"+e+"`");for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);return t=l.parseArgs(t),n.replace(/\$(\d+)/g,function(e,n){return t[--n]})},l.parseArgs=function(e){return e.map(function(e){if(null!=e&&e.inspect)return e.inspect();try{return JSON.stringify(e)||e+""}catch(n){return t.inspect(e)}})}},{util:163}],28:[function(e){"use strict";var n=e("lodash/object/extend"),l=e("./types"),t=e("estraverse");n(t.VisitorKeys,l.VISITOR_KEYS);var r=e("ast-types"),a=r.Type.def,o=r.Type.or;a("File").bases("Node").build("program").field("program",a("Program")),a("AssignmentPattern").bases("Pattern").build("left","right").field("left",a("Pattern")).field("right",a("Expression")),a("ImportBatchSpecifier").bases("Specifier").build("name").field("name",a("Identifier")),a("RestElement").bases("Pattern").build("argument").field("argument",a("expression")),a("VirtualPropertyExpression").bases("Expression").build("object","property").field("object",a("Expression")).field("property",o(a("Identifier"),a("Expression"))),a("PrivateDeclaration").bases("Declaration").build("declarations").field("declarations",[a("Identifier")]),a("BindMemberExpression").bases("Expression").build("object","property","arguments").field("object",a("Expression")).field("property",o(a("Identifier"),a("Expression"))).field("arguments",[a("Expression")]),a("BindFunctionExpression").bases("Expression").build("callee","arguments").field("callee",a("Expression")).field("arguments",[a("Expression")]),r.finalize()},{"./types":119,"ast-types":136,estraverse:177,"lodash/object/extend":294}],29:[function(e,n){"use strict";function l(e){this.dynamicImportedNoDefault=[],this.dynamicImportIds={},this.dynamicImported=[],this.dynamicImports=[],this.dynamicData={},this.data={},this.lastStatements=[],this.opts=this.normalizeOptions(e),this.ast={},this.buildTransformers()}n.exports=l;var t=e("source-map-to-comment"),r=e("shebang-regex"),a=e("lodash/lang/isFunction"),o=e("./index"),u=e("../generation"),s=e("lodash/object/defaults"),i=e("lodash/collection/includes"),c=e("lodash/object/assign"),d=e("../helpers/parse"),p=e("../traversal/scope"),f=e("slash"),g=e("../util"),h=e("path"),m=e("lodash/collection/each"),y=e("../types");l.helpers=["inherits","defaults","prototype-properties","apply-constructor","tagged-template-literal","tagged-template-literal-loose","interop-require","to-array","to-consumable-array","sliced-to-array","object-without-properties","has-own","slice","bind","define-property","async-to-generator","interop-require-wildcard","typeof","extends","get","set","class-call-check","object-destructuring-empty","temporal-undefined","temporal-assert-defined","self-global"],l.validOptions=["filename","filenameRelative","blacklist","whitelist","loose","optional","modules","sourceMap","sourceMapName","sourceFileName","sourceRoot","moduleRoot","moduleIds","comments","reactCompat","keepModuleIdExtensions","code","ast","playground","experimental","externalHelpers","auxiliaryComment","compact","resolveModuleSource","moduleId","format","ignore","only","extensions","accept"],l.prototype.normalizeOptions=function(e){e=c({},e);for(var n in e)if("_"!==n[0]&&l.validOptions.indexOf(n)<0)throw new ReferenceError("Unknown option: "+n);s(e,{keepModuleIdExtensions:!1,resolveModuleSource:null,externalHelpers:!1,auxilaryComment:"",experimental:!1,reactCompat:!1,playground:!1,moduleIds:!1,blacklist:[],whitelist:[],sourceMap:!1,optional:[],comments:!0,filename:"unknown",modules:"common",compact:"auto",loose:[],code:!0,ast:!0}),e.filename=f(e.filename),e.sourceRoot&&(e.sourceRoot=f(e.sourceRoot)),e.moduleId&&(e.moduleIds=!0),e.basename=h.basename(e.filename,h.extname(e.filename)),e.blacklist=g.arrayify(e.blacklist),e.whitelist=g.arrayify(e.whitelist),e.optional=g.arrayify(e.optional),e.compact=g.booleanify(e.compact),e.loose=g.arrayify(e.loose),(i(e.loose,"all")||i(e.loose,!0))&&(e.loose=Object.keys(o.transformers)),s(e,{moduleRoot:e.sourceRoot}),s(e,{sourceRoot:e.moduleRoot}),s(e,{filenameRelative:e.filename}),s(e,{sourceFileName:e.filenameRelative,sourceMapName:e.filenameRelative}),e.playground&&(e.experimental=!0),e.externalHelpers&&this.set("helpersNamespace",y.identifier("babelHelpers")),e.blacklist=o._ensureTransformerNames("blacklist",e.blacklist),e.whitelist=o._ensureTransformerNames("whitelist",e.whitelist),e.optional=o._ensureTransformerNames("optional",e.optional),e.loose=o._ensureTransformerNames("loose",e.loose),e.reactCompat&&(e.optional.push("reactCompat"),console.error("The reactCompat option has been moved into the optional transformer `reactCompat`"));var t=function(n){var l=o.transformerNamespaces[n];"es7"===l&&(e.experimental=!0),"playground"===l&&(e.playground=!0)};return m(e.whitelist,t),m(e.optional,t),e},l.prototype.isLoose=function(e){return i(this.opts.loose,e)},l.prototype.buildTransformers=function(){var e=this,n={},l=[],t=[];m(o.transformers,function(r,a){var o=n[a]=r.buildPass(e);o.canRun(e)&&(t.push(o),r.secondPass&&l.push(o),r.manipulateOptions&&r.manipulateOptions(e.opts,e))}),this.transformerStack=t.concat(l),this.transformers=n},l.prototype.debug=function(e){var n=this.opts.filename;e&&(n+=": "+e),g.debug(n)},l.prototype.getModuleFormatter=function(n){var l=a(n)?n:o.moduleFormatters[n];if(!l){var t=g.resolve(n);t&&(l=e(t))}if(!l)throw new ReferenceError("Unknown module formatter type "+JSON.stringify(n));return new l(this)},l.prototype.parseShebang=function(e){var n=r.exec(e);return n&&(this.shebang=n[0],e=e.replace(r,"")),e},l.prototype.set=function(e,n){return this.data[e]=n},l.prototype.setDynamic=function(e,n){this.dynamicData[e]=n},l.prototype.get=function(e){var n=this.data[e];if(n)return n;var l=this.dynamicData[e];return l?this.set(e,l()):void 0},l.prototype.addImport=function(e,n,l){n=n||e;var t=this.dynamicImportIds[n];if(!t){t=this.dynamicImportIds[n]=this.scope.generateUidIdentifier(n);var r=[y.importSpecifier(y.identifier("default"),t)],a=y.importDeclaration(r,y.literal(e));a._blockHoist=3,this.dynamicImported.push(a),l&&this.dynamicImportedNoDefault.push(a),this.moduleFormatter.importSpecifier(r[0],a,this.dynamicImports)}return t},l.prototype.isConsequenceExpressionStatement=function(e){return y.isExpressionStatement(e)&&this.lastStatements.indexOf(e)>=0},l.prototype.attachAuxiliaryComment=function(e){var n=this.opts.auxiliaryComment;return n&&(e.leadingComments=e.leadingComments||[],e.leadingComments.push({type:"Line",value:" "+n})),e},l.prototype.addHelper=function(e){if(!i(l.helpers,e))throw new ReferenceError("Unknown helper "+e);var n=this.ast.program,t=n._declarations&&n._declarations[e];if(t)return t.id;var r=this.get("helpersNamespace");if(r)return e=y.identifier(y.toIdentifier(e)),y.memberExpression(r,e);var a=g.template(e);a._compact=!0;var o=this.scope.generateUidIdentifier(e);return this.scope.push({key:e,id:o,init:a}),o},l.prototype.logDeopt=function(){},l.prototype.errorWithNode=function(e,n,l){l=l||SyntaxError;var t=e.loc.start,r=new l("Line "+t.line+": "+n);return r.loc=t,r},l.prototype.addCode=function(e){return e=(e||"")+"",this.code=e,this.parseShebang(e)},l.prototype.parse=function(e){var n=this;e=this.addCode(e);var l=this.opts;return l.allowImportExportEverywhere=this.isLoose("es6.modules"),l.strictMode=this.transformers.useStrict.canRun(),d(l,e,function(e){return n.transform(e),n.generate()})},l.prototype.transform=function(e){this.debug(),this.ast=e,this.lastStatements=y.getLastStatements(e.program),this.scope=new p(e.program,e,null,this);var n=this.moduleFormatter=this.getModuleFormatter(this.opts.modules);n.init&&this.transformers["es6.modules"].canRun()&&n.init(),this.checkNode(e),this.call("pre"),m(this.transformerStack,function(e){e.transform()}),this.call("post")},l.prototype.call=function(e){for(var n=this.transformerStack,l=0;l<n.length;l++){var t=n[l].transformer;t[e]&&t[e](this)}};var x={enter:function(e,n,l,t){b(t.stack,e,l)}},b=function(e,n,l){m(e,function(e){e.shouldRun||e.checkNode(n,l)})};l.prototype.checkNode=function(e,n){var l=this.transformerStack;n=n||this.scope,b(l,e,n),n.traverse(e,x,{stack:l})},l.prototype.generate=function(){var e=this.opts,n=this.ast,l={code:"",map:null,ast:null};if(e.ast&&(l.ast=n),!e.code)return l;var r=u(n,e,this.code);return l.code=r.code,l.map=r.map,this.shebang&&(l.code=this.shebang+"\n"+l.code),"inline"===e.sourceMap&&(l.code+="\n"+t(l.map),l.map=null),l}},{"../generation":15,"../helpers/parse":25,"../traversal/scope":116,"../types":119,"../util":121,"./index":41,"lodash/collection/each":197,"lodash/collection/includes":200,"lodash/lang/isFunction":285,"lodash/object/assign":292,"lodash/object/defaults":293,path:146,"shebang-regex":322,slash:323,"source-map-to-comment":324}],30:[function(e,n){"use strict";var l=e("./explode-assignable-expression"),t=e("../../types");n.exports=function(e,n){var r=function(e){return e.operator===n.operator+"="},a=function(e,n){return t.assignmentExpression("=",e,n)};e.ExpressionStatement=function(e,o,u,s){if(!s.isConsequenceExpressionStatement(e)){var i=e.expression;if(r(i)){var c=[],d=l(i.left,c,s,u,!0);return c.push(t.expressionStatement(a(d.ref,n.build(d.uid,i.right)))),c}}},e.AssignmentExpression=function(e,o,u,s){if(r(e)){var i=[],c=l(e.left,i,s,u);return i.push(a(c.ref,n.build(c.uid,e.right))),t.toSequenceExpression(i,u)}},e.BinaryExpression=function(e){return e.operator===n.operator?n.build(e.left,e.right):void 0}}},{"../../types":119,"./explode-assignable-expression":35}],31:[function(e,n){"use strict";var l=e("../../types");n.exports=function t(e,n){var r=e.blocks.shift();if(r){var a=t(e,n);return a||(a=n(),e.filter&&(a=l.ifStatement(e.filter,l.blockStatement([a])))),l.forOfStatement(l.variableDeclaration("let",[l.variableDeclarator(r.left)]),r.right,l.blockStatement([a]))}}},{"../../types":119}],32:[function(e,n){"use strict";var l=e("./explode-assignable-expression"),t=e("../../types");n.exports=function(e,n){var r=function(e,n){return t.assignmentExpression("=",e,n)};e.ExpressionStatement=function(e,a,o,u){if(!u.isConsequenceExpressionStatement(e)){var s=e.expression;if(n.is(s,u)){var i=[],c=l(s.left,i,u,o);return i.push(t.ifStatement(n.build(c.uid,u),t.expressionStatement(r(c.ref,s.right)))),i}}},e.AssignmentExpression=function(e,a,o,u){if(n.is(e,u)){var s=[],i=l(e.left,s,u,o);return s.push(t.logicalExpression("&&",n.build(i.uid,u),r(i.ref,e.right))),s.push(i.ref),t.toSequenceExpression(s,o)}}}},{"../../types":119,"./explode-assignable-expression":35}],33:[function(e,n){"use strict";var l=e("lodash/lang/isString"),t=e("../../messages"),r=e("esutils"),a=e("./react"),o=e("../../types");n.exports=function(e,n){e.check=function(e){return o.isJSX(e)?!0:a.isCreateClass(e)?!0:!1},e.JSXIdentifier=function(e,n){return"this"===e.name&&o.isReferenced(e,n)?o.thisExpression():r.keyword.isIdentifierName(e.name)?void(e.type="Identifier"):o.literal(e.name)},e.JSXNamespacedName=function(e,n,l,r){throw r.errorWithNode(e,t.get("JSXNamespacedTags"))},e.JSXMemberExpression={exit:function(e){e.computed=o.isLiteral(e.property),e.type="MemberExpression"}},e.JSXExpressionContainer=function(e){return e.expression},e.JSXAttribute={enter:function(e){var n=e.value;o.isLiteral(n)&&l(n.value)&&(n.value=n.value.replace(/\n\s+/g," "))},exit:function(e){var n=e.value||o.literal(!0);return o.inherits(o.property("init",e.name,n),e)}},e.JSXOpeningElement={exit:function(e,l,t,r){var a,s=e.name,i=[];o.isIdentifier(s)?a=s.name:o.isLiteral(s)&&(a=s.value);var c={tagExpr:s,tagName:a,args:i};n.pre&&n.pre(c,r);var d=e.attributes;return d=d.length?u(d,r):o.literal(null),i.push(d),n.post&&n.post(c,r),c.call||o.callExpression(c.callee,i)}};var u=function(e,n){for(var l=[],t=[],r=function(){l.length&&(t.push(o.objectExpression(l)),l=[])};e.length;){var a=e.shift();o.isJSXSpreadAttribute(a)?(r(),t.push(a.argument)):l.push(a)}return r(),1===t.length?e=t[0]:(o.isObjectExpression(t[0])||t.unshift(o.objectExpression([])),e=o.callExpression(n.addHelper("extends"),t)),e};e.JSXElement={exit:function(e){for(var n=e.openingElement,l=0;l<e.children.length;l++){var t=e.children[l];o.isLiteral(t)&&"string"==typeof t.value?c(t,n.arguments):o.isJSXEmptyExpression(t)||n.arguments.push(t)}return n.arguments=i(n.arguments),n.arguments.length>=3&&(n._prettyCall=!0),o.inherits(n,e)}};var s=function(e){return o.isLiteral(e)&&l(e.value)},i=function(e){for(var n,l=[],t=0;t<e.length;t++){var r=e[t];s(r)&&s(n)?n.value+=r.value:(n=r,l.push(r))}return l},c=function(e,n){var l,t=e.value.split(/\r\n|\n|\r/),r=0;for(l=0;l<t.length;l++)t[l].match(/[^ \t]/)&&(r=l);for(l=0;l<t.length;l++){var a=t[l],u=0===l,s=l===t.length-1,i=l===r,c=a.replace(/\t/g," ");u||(c=c.replace(/^[ ]+/,"")),s||(c=c.replace(/[ ]+$/,"")),c&&(i||(c+=" "),n.push(o.literal(c)))}},d=function(e,n){for(var l=n.arguments[0].properties,t=!0,r=0;r<l.length;r++){var a=l[r];if(o.isIdentifier(a.key,{name:"displayName"})){t=!1;break}}t&&l.unshift(o.property("init",o.identifier("displayName"),o.literal(e)))};e.ExportDeclaration=function(e,n,l,t){e["default"]&&a.isCreateClass(e.declaration)&&d(t.opts.basename,e.declaration)},e.AssignmentExpression=e.Property=e.VariableDeclarator=function(e){var n,l;o.isAssignmentExpression(e)?(n=e.left,l=e.right):o.isProperty(e)?(n=e.key,l=e.value):o.isVariableDeclarator(e)&&(n=e.id,l=e.init),o.isMemberExpression(n)&&(n=n.property),o.isIdentifier(n)&&a.isCreateClass(l)&&d(n.name,l)}}},{"../../messages":27,"../../types":119,"./react":37,esutils:181,"lodash/lang/isString":290}],34:[function(e,n,l){"use strict";var t=e("lodash/lang/cloneDeep"),r=e("../../traversal"),a=e("lodash/lang/clone"),o=e("lodash/collection/each"),u=e("lodash/object/has"),s=e("../../types");l.push=function(e,n,l,a,o){var i;s.isIdentifier(n)?(i=n.name,a&&(i="computed:"+i)):i=s.isLiteral(n)?String(n.value):JSON.stringify(r.removeProperties(t(n)));var c;c=u(e,i)?e[i]:{},e[i]=c,c._key=n,a&&(c._computed=!0),c[l]=o},l.build=function(e){var n=s.objectExpression([]);return o(e,function(e){var l=s.objectExpression([]),t=s.property("init",e._key,l,e._computed);e.get||e.set||(e.writable=s.literal(!0)),e.enumerable===!1?delete e.enumerable:e.enumerable=s.literal(!0),e.configurable=s.literal(!0),o(e,function(e,n){if("_"!==n[0]){e=a(e);var t=e;s.isMethodDefinition(e)&&(e=e.value);var r=s.property("init",s.identifier(n),e);s.inheritsComments(r,t),s.removeComments(t),l.properties.push(r)}}),n.properties.push(t)}),n}},{"../../traversal":114,"../../types":119,"lodash/collection/each":197,"lodash/lang/clone":279,"lodash/lang/cloneDeep":280,"lodash/object/has":295}],35:[function(e,n){"use strict";var l=e("../../types"),t=function(e,n,t,r){var a;if(l.isIdentifier(e)){if(r.hasBinding(e.name))return e;a=e}else{if(!l.isMemberExpression(e))throw new Error("We can't explode this node type "+e.type);if(a=e.object,l.isIdentifier(a)&&r.hasGlobal(a.name))return a}var o=r.generateUidBasedOnNode(a);return n.push(l.variableDeclaration("var",[l.variableDeclarator(o,a)])),o},r=function(e,n,t,r){var a=e.property,o=l.toComputedKey(e,a);if(l.isLiteral(o))return o;var u=r.generateUidBasedOnNode(a);return n.push(l.variableDeclaration("var",[l.variableDeclarator(u,a)])),u};n.exports=function(e,n,a,o,u){var s;s=l.isIdentifier(e)&&u?e:t(e,n,a,o);var i,c;if(l.isIdentifier(e))i=e,c=s;else{var d=r(e,n,a,o),p=e.computed||l.isLiteral(d);c=i=l.memberExpression(s,d,p)}return{uid:c,ref:i}}},{"../../types":119}],36:[function(e,n,l){"use strict";var t=e("../../util"),r=e("../../types"),a={enter:function(e,n,l,t){if(r.isReferencedIdentifier(e,n,{name:t.name})){var a=l.getBindingIdentifier(t.name);a===t.outerDeclar&&(t.selfReference=!0,this.stop())}}},o=function(e,n,l,r){if(e.selfReference){var a="property-method-assignment-wrapper";return n.generator&&(a+="-generator"),t.template(a,{FUNCTION:n,FUNCTION_ID:l,FUNCTION_KEY:r.generateUidIdentifier(l.name),WRAPPER_KEY:r.generateUidIdentifier(l.name+"Wrapper")})}return n.id=l,n},u=function(e,n,l){var t={selfAssignment:!1,selfReference:!1,outerDeclar:l.getBindingIdentifier(n),references:[],name:n},r=null;return r?"param"===r.kind&&(t.selfReference=!0):l.traverse(e,a,t),t};l.property=function(e,n,l){var t=r.toComputedKey(e,e.key);if(!r.isLiteral(t))return e;var a=r.toIdentifier(t.value),s=r.identifier(a),i=e.value,c=u(i,a,l);e.value=o(c,i,s,l)},l.bare=function(e,n,l){if(!e.id){var t;if(r.isProperty(n)&&"init"===n.kind&&!n.computed)t=n.key;else{if(!r.isVariableDeclarator(n))return;t=n.id}if(r.isIdentifier(t)){var a=r.toIdentifier(t.name);t=r.identifier(a);var s=u(e,a,l);return o(s,e,t,l)}}}},{"../../types":119,"../../util":121}],37:[function(e,n,l){"use strict";var t=e("../../types"),r=t.buildMatchMemberExpression("React.createClass");l.isCreateClass=function(e){if(!e||!t.isCallExpression(e))return!1;if(!r(e.callee))return!1;var n=e.arguments;if(1!==n.length)return!1;var l=n[0];return t.isObjectExpression(l)?!0:!1},l.isReactComponent=t.buildMatchMemberExpression("React.Component"),l.isCompatTag=function(e){return e&&/^[a-z]|\-/.test(e)}},{"../../types":119}],38:[function(e,n){"use strict";var l=e("../../types"),t={enter:function(e){l.isFunction(e)&&this.skip(),l.isAwaitExpression(e)&&(e.type="YieldExpression",e.all&&(e.all=!1,e.argument=l.callExpression(l.memberExpression(l.identifier("Promise"),l.identifier("all")),[e.argument])))}};n.exports=function(e,n,r){e.async=!1,e.generator=!0,r.traverse(e,t);var a=l.callExpression(n,[e]),o=e.id;if(delete e.id,l.isFunctionDeclaration(e)){var u=l.variableDeclaration("let",[l.variableDeclarator(o,a)]);return u._blockHoist=!0,u}return a}},{"../../types":119}],39:[function(e,n){"use strict";function l(e,n){this.topLevelThisReference=e.topLevelThisReference,this.methodNode=e.methodNode,this.className=e.className,this.superName=e.superName,this.isStatic=e.isStatic,this.hasSuper=!1,this.inClass=n,this.isLoose=e.isLoose,this.scope=e.scope,this.file=e.file}n.exports=l;var t=e("../../messages"),r=e("../../types");l.prototype.setSuperProperty=function(e,n,l,t){return r.callExpression(this.file.addHelper("set"),[r.callExpression(r.memberExpression(r.identifier("Object"),r.identifier("getPrototypeOf")),[this.isStatic?this.className:r.memberExpression(this.className,r.identifier("prototype"))]),l?e:r.literal(e.name),n,t])},l.prototype.getSuperProperty=function(e,n,l){return r.callExpression(this.file.addHelper("get"),[r.callExpression(r.memberExpression(r.identifier("Object"),r.identifier("getPrototypeOf")),[this.isStatic?this.className:r.memberExpression(this.className,r.identifier("prototype"))]),n?e:r.literal(e.name),l])},l.prototype.replace=function(){this.traverseLevel(this.methodNode.value,!0)};var a={enter:function(e,n,l,t){var a=t.topLevel,o=t.self;if(r.isFunction(e)&&!r.isArrowFunctionExpression(e))return o.traverseLevel(e,!1),this.skip();if(r.isProperty(e,{method:!0})||r.isMethodDefinition(e))return this.skip();var u=a?r.thisExpression:o.getThisReference.bind(o),s=o.specHandle;return o.isLoose&&(s=o.looseHandle),s.call(o,u,e,n)}};l.prototype.traverseLevel=function(e,n){var l={self:this,topLevel:n};this.scope.traverse(e,a,l)},l.prototype.getThisReference=function(){if(this.topLevelThisReference)return this.topLevelThisReference;var e=this.topLevelThisReference=this.scope.generateUidIdentifier("this");return this.methodNode.value.body.body.unshift(r.variableDeclaration("var",[r.variableDeclarator(this.topLevelThisReference,r.thisExpression())])),e},l.prototype.getLooseSuperProperty=function(e,n){var l=this.methodNode,t=l.key,a=this.superName||r.identifier("Function");return n.property===e?void 0:r.isCallExpression(n,{callee:e})?(n.arguments.unshift(r.thisExpression()),"constructor"===t.name?r.memberExpression(a,r.identifier("call")):(e=a,l["static"]||(e=r.memberExpression(e,r.identifier("prototype"))),e=r.memberExpression(e,t,l.computed),r.memberExpression(e,r.identifier("call")))):r.isMemberExpression(n)&&!l["static"]?r.memberExpression(a,r.identifier("prototype")):a},l.prototype.looseHandle=function(e,n,l){if(r.isIdentifier(n,{name:"super"}))return this.hasSuper=!0,this.getLooseSuperProperty(n,l);if(r.isCallExpression(n)){var t=n.callee;if(!r.isMemberExpression(t))return;if("super"!==t.object.name)return;this.hasSuper=!0,r.appendToMemberExpression(t,r.identifier("call")),n.arguments.unshift(e())}},l.prototype.specHandle=function(e,n,l){var a,s,i,c,d=this.methodNode;if(o(n,l))throw this.file.errorWithNode(n,t.get("classesIllegalBareSuper"));if(r.isCallExpression(n)){var p=n.callee;if(u(p,n)){if(a=d.key,s=d.computed,i=n.arguments,"constructor"!==d.key.name||!this.inClass){var f=d.key.name||"METHOD_NAME";throw this.file.errorWithNode(n,t.get("classesIllegalSuperCall",f))}}else r.isMemberExpression(p)&&u(p.object,p)&&(a=p.property,s=p.computed,i=n.arguments)}else if(r.isMemberExpression(n)&&u(n.object,n))a=n.property,s=n.computed;else if(r.isAssignmentExpression(n)&&u(n.left.object,n.left)&&"set"===d.kind)return this.hasSuper=!0,this.setSuperProperty(n.left.property,n.right,n.left.computed,e());if(a){this.hasSuper=!0,c=e();var g=this.getSuperProperty(a,s,c);return i?1===i.length&&r.isSpreadElement(i[0])?r.callExpression(r.memberExpression(g,r.identifier("apply")),[c,i[0].argument]):r.callExpression(r.memberExpression(g,r.identifier("call")),[c].concat(i)):g}};var o=function(e,n){return u(e,n)?r.isMemberExpression(n,{computed:!1})?!1:r.isCallExpression(n,{callee:e})?!1:!0:!1},u=function(e,n){return r.isIdentifier(e,{name:"super"})&&r.isReferenced(e,n)}},{"../../messages":27,"../../types":119}],40:[function(e,n,l){"use strict";var t=e("../../types");l.has=function(e){var n=e.body[0];return t.isExpressionStatement(n)&&t.isLiteral(n.expression,{value:"use strict"})},l.wrap=function(e,n){var t;l.has(e)&&(t=e.body.shift()),n(),t&&e.body.unshift(t)}},{"../../types":119}],41:[function(e,n){"use strict";function l(e,n){var l=new o(n);return l.parse(e)}n.exports=l;var t=e("../helpers/normalize-ast"),r=e("./transformer"),a=e("../helpers/object"),o=e("./file"),u=e("lodash/collection/each");l.fromAst=function(e,n,l){e=t(e);var r=new o(l);return r.addCode(n),r.transform(e),r.generate()},l._ensureTransformerNames=function(e,n){for(var t=[],r=0;r<n.length;r++){var a=n[r],o=l.deprecatedTransformerMap[a];if(o)console.error("The transformer "+a+" has been renamed to "+o),n.push(o);else if(l.transformers[a])t.push(a);else{if(!l.namespaces[a])throw new ReferenceError("Unknown transformer "+a+" specified in "+e);t=t.concat(l.namespaces[a])}}return t},l.transformerNamespaces=a(),l.transformers=a(),l.namespaces=a(),l.deprecatedTransformerMap=e("./transformers/deprecated"),l.moduleFormatters=e("./modules");var s=e("./transformers");u(s,function(e,n){var t=n.split(".")[0];l.namespaces[t]=l.namespaces[t]||[],l.namespaces[t].push(n),l.transformerNamespaces[n]=t,l.transformers[n]=new r(n,e)})},{"../helpers/normalize-ast":23,"../helpers/object":24,"./file":29,"./modules":49,"./transformer":54,"./transformers":80,"./transformers/deprecated":55,"lodash/collection/each":197}],42:[function(e,n){"use strict";function l(e){this.scope=e.scope,this.file=e,this.ids=a(),this.hasNonDefaultExports=!1,this.hasLocalExports=!1,this.hasLocalImports=!1,this.localImportOccurences=a(),this.localExports=a(),this.localImports=a(),this.getLocalExports(),this.getLocalImports(),this.remapAssignments()}n.exports=l;var t=e("../../messages"),r=e("lodash/object/extend"),a=e("../../helpers/object"),o=e("../../util"),u=e("../../types");l.prototype.doDefaultExportInterop=function(e){return e["default"]&&!this.noInteropRequireExport&&!this.hasNonDefaultExports},l.prototype.bumpImportOccurences=function(e){var n=e.source.value,l=this.localImportOccurences;l[n]=l[n]||0,l[n]+=e.specifiers.length};var s={enter:function(e,n,l,t){var a=e&&e.declaration;u.isExportDeclaration(e)&&(t.hasLocalImports=!0,a&&u.isStatement(a)&&r(t.localExports,u.getBindingIdentifiers(a)),e["default"]||(t.hasNonDefaultExports=!0),e.source&&t.bumpImportOccurences(e))}};l.prototype.getLocalExports=function(){this.file.scope.traverse(this.file.ast,s,this)};var i={enter:function(e,n,l,t){u.isImportDeclaration(e)&&(t.hasLocalImports=!0,r(t.localImports,u.getBindingIdentifiers(e)),t.bumpImportOccurences(e))}};l.prototype.getLocalImports=function(){this.file.scope.traverse(this.file.ast,i,this)};var c={enter:function(e,n,l,t){if(u.isUpdateExpression(e)&&t.isLocalReference(e.argument,l)){this.skip();var r=u.assignmentExpression(e.operator[0]+"=",e.argument,u.literal(1)),a=t.remapExportAssignment(r);if(u.isExpressionStatement(n)||e.prefix)return a;var o=[];o.push(a);var s;return s="--"===e.operator?"+":"-",o.push(u.binaryExpression(s,e.argument,u.literal(1))),u.sequenceExpression(o)}return u.isAssignmentExpression(e)&&t.isLocalReference(e.left,l)?(this.skip(),t.remapExportAssignment(e)):void 0}};l.prototype.remapAssignments=function(){this.hasLocalImports&&this.file.scope.traverse(this.file.ast,c,this)},l.prototype.isLocalReference=function(e){var n=this.localImports;return u.isIdentifier(e)&&n[e.name]&&n[e.name]!==e},l.prototype.remapExportAssignment=function(e){return u.assignmentExpression("=",e.left,u.assignmentExpression(e.operator,u.memberExpression(u.identifier("exports"),e.left),e.right))},l.prototype.isLocalReference=function(e,n){var l=this.localExports,t=e.name;return u.isIdentifier(e)&&l[t]&&l[t]===n.getBindingIdentifier(t)},l.prototype.getModuleName=function(){var e=this.file.opts;if(e.moduleId)return e.moduleId;var n=e.filenameRelative,l="";if(e.moduleRoot&&(l=e.moduleRoot+"/"),!e.filenameRelative)return l+e.filename.replace(/^\//,"");if(e.sourceRoot){var t=new RegExp("^"+e.sourceRoot+"/?");n=n.replace(t,"")}return e.keepModuleIdExtensions||(n=n.replace(/\.(\w*?)$/,"")),l+=n,l=l.replace(/\\/g,"/")},l.prototype._pushStatement=function(e,n){return(u.isClass(e)||u.isFunction(e))&&e.id&&(n.push(u.toStatement(e)),e=e.id),e},l.prototype._hoistExport=function(e,n,l){return u.isFunctionDeclaration(e)&&(n._blockHoist=l||2),n},l.prototype.getExternalReference=function(e,n){var l=this.ids,t=e.source.value;return l[t]?l[t]:this.ids[t]=this._getExternalReference(e,n)},l.prototype.checkExportIdentifier=function(e){if(u.isIdentifier(e,{name:"__esModule"}))throw this.file.errorWithNode(e,t.get("modulesIllegalExportName",e.name))},l.prototype.exportSpecifier=function(e,n,l){if(n.source){var t=this.getExternalReference(n,l);u.isExportBatchSpecifier(e)?l.push(this.buildExportsWildcard(t,n)):(t=u.isSpecifierDefault(e)&&!this.noInteropRequireExport?u.callExpression(this.file.addHelper("interop-require"),[t]):u.memberExpression(t,u.getSpecifierId(e)),l.push(this.buildExportsAssignment(u.getSpecifierName(e),t,n)))}else l.push(this.buildExportsAssignment(u.getSpecifierName(e),e.id,n))},l.prototype.buildExportsWildcard=function(e){return u.expressionStatement(u.callExpression(this.file.addHelper("defaults"),[u.identifier("exports"),u.callExpression(this.file.addHelper("interop-require-wildcard"),[e])]))},l.prototype.buildExportsAssignment=function(e,n){return this.checkExportIdentifier(e),o.template("exports-assign",{VALUE:n,KEY:e},!0)},l.prototype.exportDeclaration=function(e,n){var l=e.declaration,t=l.id;e["default"]&&(t=u.identifier("default"));var r;if(u.isVariableDeclaration(l))for(var a=0;a<l.declarations.length;a++){var o=l.declarations[a];o.init=this.buildExportsAssignment(o.id,o.init,e).expression;var s=u.variableDeclaration(l.kind,[o]);0===a&&u.inherits(s,l),n.push(s)}else{var i=l;(u.isFunctionDeclaration(l)||u.isClassDeclaration(l))&&(i=l.id,n.push(l)),r=this.buildExportsAssignment(t,i,e),n.push(r),this._hoistExport(l,r)}}},{"../../helpers/object":24,"../../messages":27,"../../types":119,"../../util":121,"lodash/object/extend":294}],43:[function(e,n){"use strict";var l=e("../../util");n.exports=function(e){var n=function(){this.noInteropRequireImport=!0,this.noInteropRequireExport=!0,e.apply(this,arguments)};return l.inherits(n,e),n}},{"../../util":121}],44:[function(e,n){"use strict";n.exports=e("./_strict")(e("./amd"))},{"./_strict":43,"./amd":45}],45:[function(e,n){"use strict";function l(){r.apply(this,arguments)}n.exports=l;var t=e("./_default"),r=e("./common"),a=e("lodash/collection/includes"),o=e("lodash/object/values"),u=e("../../util"),s=e("../../types");u.inherits(l,t),l.prototype.init=r.prototype.init,l.prototype.buildDependencyLiterals=function(){var e=[];for(var n in this.ids)e.push(s.literal(n));return e},l.prototype.transform=function(e){var n=e.body,l=[s.literal("exports")];this.passModuleArg&&l.push(s.literal("module")),l=l.concat(this.buildDependencyLiterals()),l=s.arrayExpression(l);var t=o(this.ids);this.passModuleArg&&t.unshift(s.identifier("module")),t.unshift(s.identifier("exports"));var r=s.functionExpression(null,t,s.blockStatement(n)),a=[l,r],u=this.getModuleName();u&&a.unshift(s.literal(u));var i=s.callExpression(s.identifier("define"),a);e.body=[s.expressionStatement(i)]},l.prototype.getModuleName=function(){return this.file.opts.moduleIds?t.prototype.getModuleName.apply(this,arguments):null},l.prototype._getExternalReference=function(e){return this.scope.generateUidIdentifier(e.source.value)},l.prototype.importDeclaration=function(e){this.getExternalReference(e)},l.prototype.importSpecifier=function(e,n,l){var t=s.getSpecifierName(e),r=this.getExternalReference(n);a(this.file.dynamicImportedNoDefault,n)?this.ids[n.source.value]=r:s.isImportBatchSpecifier(e)||(r=a(this.file.dynamicImported,n)||!s.isSpecifierDefault(e)||this.noInteropRequireImport?s.memberExpression(r,s.getSpecifierId(e),!1):s.callExpression(this.file.addHelper("interop-require"),[r])),l.push(s.variableDeclaration("var",[s.variableDeclarator(t,r)]))},l.prototype.exportDeclaration=function(e){this.doDefaultExportInterop(e)&&(this.passModuleArg=!0),r.prototype.exportDeclaration.apply(this,arguments)}},{"../../types":119,"../../util":121,"./_default":42,"./common":47,"lodash/collection/includes":200,"lodash/object/values":298}],46:[function(e,n){"use strict";n.exports=e("./_strict")(e("./common"))},{"./_strict":43,"./common":47}],47:[function(e,n){"use strict";function l(){t.apply(this,arguments)}n.exports=l;var t=e("./_default"),r=e("lodash/collection/includes"),a=e("../../util"),o=e("../../types");a.inherits(l,t),l.prototype.init=function(){var e=this.file,n=e.scope;if(n.rename("module"),!this.noInteropRequireImport&&this.hasNonDefaultExports){var l="exports-module-declaration";this.file.isLoose("es6.modules")&&(l+="-loose"),e.ast.program.body.push(a.template(l,!0))}},l.prototype.importSpecifier=function(e,n,l){var t=o.getSpecifierName(e),a=this.getExternalReference(n,l);o.isSpecifierDefault(e)?(r(this.file.dynamicImportedNoDefault,n)||(a=this.noInteropRequireImport||r(this.file.dynamicImported,n)?o.memberExpression(a,o.identifier("default")):o.callExpression(this.file.addHelper("interop-require"),[a])),l.push(o.variableDeclaration("var",[o.variableDeclarator(t,a)]))):"ImportBatchSpecifier"===e.type?(this.noInteropRequireImport||(a=o.callExpression(this.file.addHelper("interop-require-wildcard"),[a])),l.push(o.variableDeclaration("var",[o.variableDeclarator(t,a)]))):l.push(o.variableDeclaration("var",[o.variableDeclarator(t,o.memberExpression(a,o.getSpecifierId(e)))]))},l.prototype.importDeclaration=function(e,n){n.push(a.template("require",{MODULE_NAME:e.source},!0))},l.prototype.exportDeclaration=function(e,n){if(this.doDefaultExportInterop(e)){var l=e.declaration,r=a.template("exports-default-assign",{VALUE:this._pushStatement(l,n)},!0);return o.isFunctionDeclaration(l)&&(r._blockHoist=3),void n.push(r)}t.prototype.exportDeclaration.apply(this,arguments)},l.prototype._getExternalReference=function(e,n){var l=e.source.value,t=o.callExpression(o.identifier("require"),[e.source]);if(this.localImportOccurences[l]>1){var r=this.scope.generateUidIdentifier(l);return n.push(o.variableDeclaration("var",[o.variableDeclarator(r,t)])),r}return t}},{"../../types":119,"../../util":121,"./_default":42,"lodash/collection/includes":200}],48:[function(e,n){"use strict";function l(){}n.exports=l;var t=e("../../types");l.prototype.exportDeclaration=function(e,n){var l=t.toStatement(e.declaration,!0); l&&n.push(t.inherits(l,e))},l.prototype.importDeclaration=l.prototype.importSpecifier=l.prototype.exportSpecifier=function(){}},{"../../types":119}],49:[function(e,n){"use strict";n.exports={commonStrict:e("./common-strict"),amdStrict:e("./amd-strict"),umdStrict:e("./umd-strict"),common:e("./common"),system:e("./system"),ignore:e("./ignore"),amd:e("./amd"),umd:e("./umd")}},{"./amd":45,"./amd-strict":44,"./common":47,"./common-strict":46,"./ignore":48,"./system":50,"./umd":52,"./umd-strict":51}],50:[function(e,n){"use strict";function l(e){this.exportIdentifier=e.scope.generateUidIdentifier("export"),this.noInteropRequireExport=!0,this.noInteropRequireImport=!0,t.apply(this,arguments)}n.exports=l;var t=e("./_default"),r=e("./amd"),a=e("../../util"),o=e("lodash/array/last"),u=e("lodash/collection/each"),s=e("lodash/collection/map"),i=e("../../types");a.inherits(l,r),l.prototype.init=function(){},l.prototype._addImportSource=function(e,n){return e._importSource=n.source&&n.source.value,e},l.prototype.buildExportsWildcard=function(e,n){var l=this.scope.generateUidIdentifier("key"),t=i.memberExpression(e,l,!0),r=i.variableDeclaration("var",[i.variableDeclarator(l)]),a=e,o=i.blockStatement([i.expressionStatement(this.buildExportCall(l,t))]);return this._addImportSource(i.forInStatement(r,a,o),n)},l.prototype.buildExportsAssignment=function(e,n,l){var t=this.buildExportCall(i.literal(e.name),n,!0);return this._addImportSource(t,l)},l.prototype.remapExportAssignment=function(e){return this.buildExportCall(i.literal(e.left.name),e)},l.prototype.buildExportCall=function(e,n,l){var t=i.callExpression(this.exportIdentifier,[e,n]);return l?i.expressionStatement(t):t},l.prototype.importSpecifier=function(e,n,l){r.prototype.importSpecifier.apply(this,arguments),this._addImportSource(o(l),n)};var c={enter:function(e,n,l,t){e._importSource===t.source&&(i.isVariableDeclaration(e)?u(e.declarations,function(e){t.hoistDeclarators.push(i.variableDeclarator(e.id)),t.nodes.push(i.expressionStatement(i.assignmentExpression("=",e.id,e.init)))}):t.nodes.push(e),this.remove())}};l.prototype.buildRunnerSetters=function(e,n){var l=this.file.scope;return i.arrayExpression(s(this.ids,function(t,r){var a={source:r,nodes:[],hoistDeclarators:n};return l.traverse(e,c,a),i.functionExpression(null,[t],i.blockStatement(a.nodes))}))};var d={enter:function(e,n,l,t){if(i.isFunction(e))return this.skip();if(i.isVariableDeclaration(e)){if("var"!==e.kind&&!i.isProgram(n))return;if(e._blockHoist)return;for(var r=[],a=0;a<e.declarations.length;a++){var o=e.declarations[a];if(t.push(i.variableDeclarator(o.id)),o.init){var u=i.expressionStatement(i.assignmentExpression("=",o.id,o.init));r.push(u)}}if(i.isFor(n)){if(n.left===e)return e.declarations[0].id;if(n.init===e)return i.toSequenceExpression(r,l)}return r}}},p={enter:function(e,n,l,t){i.isFunction(e)&&this.skip(),(i.isFunctionDeclaration(e)||e._blockHoist)&&(t.push(e),this.remove())}};l.prototype.transform=function(e){var n=[],l=this.getModuleName(),t=i.literal(l),r=i.blockStatement(e.body),o=a.template("system",{MODULE_NAME:t,MODULE_DEPENDENCIES:i.arrayExpression(this.buildDependencyLiterals()),EXPORT_IDENTIFIER:this.exportIdentifier,SETTERS:this.buildRunnerSetters(r,n),EXECUTE:i.functionExpression(null,[],r)},!0),u=o.expression.arguments[2].body.body;l||o.expression.arguments.shift();var s=u.pop();if(this.file.scope.traverse(r,d,n),n.length){var c=i.variableDeclaration("var",n);c._blockHoist=!0,u.unshift(c)}this.file.scope.traverse(r,p,u),u.push(s),e.body=[o]}},{"../../types":119,"../../util":121,"./_default":42,"./amd":45,"lodash/array/last":193,"lodash/collection/each":197,"lodash/collection/map":201}],51:[function(e,n){"use strict";n.exports=e("./_strict")(e("./umd"))},{"./_strict":43,"./umd":52}],52:[function(e,n){"use strict";function l(){t.apply(this,arguments)}n.exports=l;var t=e("./amd"),r=e("../../util"),a=e("../../types"),o=e("lodash/object/values");r.inherits(l,t),l.prototype.transform=function(e){var n=e.body,l=[];for(var t in this.ids)l.push(a.literal(t));var u=o(this.ids),s=[a.identifier("exports")];this.passModuleArg&&s.push(a.identifier("module")),s=s.concat(u);var i=a.functionExpression(null,s,a.blockStatement(n)),c=[a.literal("exports")];this.passModuleArg&&c.push(a.literal("module")),c=c.concat(l),c=[a.arrayExpression(c)];var d=r.template("test-exports"),p=r.template("test-module"),f=this.passModuleArg?a.logicalExpression("&&",d,p):d,g=[a.identifier("exports")];this.passModuleArg&&g.push(a.identifier("module")),g=g.concat(l.map(function(e){return a.callExpression(a.identifier("require"),[e])}));var h=this.getModuleName();h&&c.unshift(a.literal(h));var m=r.template("umd-runner-body",{AMD_ARGUMENTS:c,COMMON_TEST:f,COMMON_ARGUMENTS:g}),y=a.callExpression(m,[i]);e.body=[a.expressionStatement(y)]}},{"../../types":119,"../../util":121,"./amd":45,"lodash/object/values":298}],53:[function(e,n){"use strict";function l(e,n){this.transformer=n,this.shouldRun=!n.check,this.handlers=n.handlers,this.file=e}n.exports=l;var t=e("lodash/collection/includes");l.prototype.canRun=function(){var e=this.transformer,n=this.file.opts,l=e.key;if("_"===l[0])return!0;var r=n.blacklist;if(r.length&&t(r,l))return!1;var a=n.whitelist;return a.length?t(a,l):e.optional&&!t(n.optional,l)?!1:e.experimental&&!n.experimental?!1:e.playground&&!n.playground?!1:!0},l.prototype.checkNode=function(e){var n=this.transformer.check;return n?this.shouldRun=n(e):!0},l.prototype.transform=function(){if(this.shouldRun){var e=this.file;e.debug("Running transformer "+this.transformer.key),e.scope.traverse(e.ast,this.handlers,e)}}},{"lodash/collection/includes":200}],54:[function(e,n){"use strict";function l(e,n,l){n=u({},n);var t=function(e){var l=n[e];return delete n[e],l};this.manipulateOptions=t("manipulateOptions"),this.check=t("check"),this.post=t("post"),this.pre=t("pre"),this.experimental=!!t("experimental"),this.playground=!!t("playground"),this.secondPass=!!t("secondPass"),this.optional=!!t("optional"),this.handlers=this.normalize(n),this.opts=l||{},this.key=e}n.exports=l;var t=e("./transformer-pass"),r=e("lodash/lang/isFunction"),a=e("../traversal"),o=e("lodash/lang/isObject"),u=e("lodash/object/assign"),s=e("lodash/collection/each");l.prototype.normalize=function(e){var n=this;return r(e)&&(e={ast:e}),a.explode(e),s(e,function(l,t){return"_"===t[0]?void(n[t]=l):void("enter"!==t&&"exit"!==t&&(r(l)&&(l={enter:l}),o(l)&&(l.enter||(l.enter=function(){}),l.exit||(l.exit=function(){}),e[t]=l)))}),e},l.prototype.buildPass=function(e){return new t(e,this)}},{"../traversal":114,"./transformer-pass":53,"lodash/collection/each":197,"lodash/lang/isFunction":285,"lodash/lang/isObject":288,"lodash/object/assign":292}],55:[function(e,n){n.exports={selfContained:"runtime"}},{}],56:[function(e,n,l){"use strict";var t=e("../../../types");l.MemberExpression=function(e){var n=e.property;e.computed&&t.isLiteral(n)&&t.isValidIdentifier(n.value)?(e.property=t.identifier(n.value),e.computed=!1):e.computed||!t.isIdentifier(n)||t.isValidIdentifier(n.name)||(e.property=t.literal(n.name),e.computed=!0)}},{"../../../types":119}],57:[function(e,n,l){"use strict";var t=e("../../../types");l.Property=function(e){var n=e.key;t.isLiteral(n)&&t.isValidIdentifier(n.value)?(e.key=t.identifier(n.value),e.computed=!1):e.computed||!t.isIdentifier(n)||t.isValidIdentifier(n.name)||(e.key=t.literal(n.name))}},{"../../../types":119}],58:[function(e,n,l){"use strict";var t=e("../../helpers/define-map"),r=e("../../../types");l.check=function(e){return r.isProperty(e)&&("get"===e.kind||"set"===e.kind)},l.ObjectExpression=function(e){var n={},l=!1;return e.properties=e.properties.filter(function(e){return"get"===e.kind||"set"===e.kind?(l=!0,t.push(n,e.key,e.kind,e.computed,e.value),!1):!0}),l?r.callExpression(r.memberExpression(r.identifier("Object"),r.identifier("defineProperties")),[e,t.build(n)]):void 0}},{"../../../types":119,"../../helpers/define-map":34}],59:[function(e,n,l){"use strict";var t=e("../../../types");l.check=t.isArrowFunctionExpression,l.ArrowFunctionExpression=function(e){return t.ensureBlock(e),e._aliasFunction="arrow",e.expression=!1,e.type="FunctionExpression",e}},{"../../../types":119}],60:[function(e,n,l){"use strict";var t=e("../../../types"),r={enter:function(e,n,l,r){if(t.isReferencedIdentifier(e,n)){var a=r.letRefs[e.name];if(a&&l.getBindingIdentifier(e.name)===a){var o=t.callExpression(r.file.addHelper("temporal-assert-defined"),[e,t.literal(e.name),r.file.addHelper("temporal-undefined")]);return this.skip(),t.isAssignmentExpression(n)||t.isUpdateExpression(n)?void(n._ignoreBlockScopingTDZ||(this.parentPath.node=t.sequenceExpression([o,n]))):t.logicalExpression("&&",o,e)}}}};l.optional=!0,l.Loop=l.Program=l.BlockStatement=function(e,n,l,t){var a=e._letReferences;if(a){var o={letRefs:a,file:t};l.traverse(e,r,o)}}},{"../../../types":119}],61:[function(e,n,l){"use strict";function t(e,n,l,t,r){this.loopParent=e,this.parent=l,this.scope=t,this.block=n,this.file=r,this.outsideLetReferences=u(),this.hasLetReferences=!1,this.letReferences=n._letReferences=u(),this.body=[]}function r(e,n,l,t){if(i.isReferencedIdentifier(e,n)){var r=t[e.name];if(r){var a=l.getBindingIdentifier(e.name);a===r.binding?e.name=r.uid:this&&this.skip()}}}function a(e,n,l,t){r(e,n,l,t),l.traverse(e,m,t)}var o=e("../../../traversal"),u=e("../../../helpers/object"),s=e("../../../util"),i=e("../../../types"),c=e("lodash/object/values"),d=e("lodash/object/extend");l.check=function(e){return i.isVariableDeclaration(e)&&("let"===e.kind||"const"===e.kind)};var p=function(e,n){if(!i.isVariableDeclaration(e))return!1;if(e._let)return!0;if("let"!==e.kind)return!1;if(f(e,n))for(var l=0;l<e.declarations.length;l++){var t=e.declarations[l];t.init=t.init||i.identifier("undefined")}return e._let=!0,e.kind="var",!0},f=function(e,n){return!i.isFor(n)||!i.isFor(n,{left:e})},g=function(e,n){return i.isVariableDeclaration(e,{kind:"var"})&&!p(e,n)},h=function(e){for(var n=0;n<e.length;n++)delete e[n]._let};l.VariableDeclaration=function(e,n,l,t){if(p(e,n)&&f(e)&&t.transformers["es6.blockScopingTDZ"].canRun()){for(var r=[e],a=0;a<e.declarations.length;a++){var o=e.declarations[a];if(o.init){var u=i.assignmentExpression("=",o.id,o.init);u._ignoreBlockScopingTDZ=!0,r.push(i.expressionStatement(u))}o.init=t.addHelper("temporal-undefined")}return e._blockHoist=2,r}},l.Loop=function(e,n,l,r){var a=e.left||e.init;p(a,e)&&(i.ensureBlock(e),e.body._letDeclarators=[a]);var o=new t(e,e.body,n,l,r);o.run()},l.Program=l.BlockStatement=function(e,n,l,r){if(!i.isLoop(n)){var a=new t(!1,e,n,l,r);a.run()}},t.prototype.run=function(){var e=this.block;if(!e._letDone){e._letDone=!0;var n=this.getLetReferences();i.isFunction(this.parent)||i.isProgram(this.block)||this.hasLetReferences&&(n?this.wrapClosure():this.remap())}};var m={enter:r};t.prototype.remap=function(){var e=!1,n=this.letReferences,l=this.scope,t=u();for(var r in n){var o=n[r];if(l.parentHasBinding(r)||l.hasGlobal(r)){var s=l.generateUidIdentifier(o.name).name;o.name=s,e=!0,t[r]=t[s]={binding:o,uid:s}}}if(e){var i=this.loopParent;i&&(a(i.right,i,l,t),a(i.test,i,l,t),a(i.update,i,l,t)),l.traverse(this.block,m,t)}},t.prototype.wrapClosure=function(){var e=this.block,n=this.outsideLetReferences;if(this.loopParent)for(var l in n){var t=n[l];this.scope.hasGlobal(t.name)&&(delete n[t.name],delete this.letReferences[t.name],this.scope.rename(t.name),this.letReferences[t.name]=t,n[t.name]=t)}this.has=this.checkLoop(),this.hoistVarDeclarations();var r=c(n),a=i.functionExpression(null,r,i.blockStatement(e.body));a._aliasFunction=!0,e.body=this.body;var u=i.callExpression(a,r),s=this.scope.generateUidIdentifier("ret"),d=o.hasType(a.body,this.scope,"YieldExpression",i.FUNCTION_TYPES);d&&(a.generator=!0,u=i.yieldExpression(u,!0));var p=o.hasType(a.body,this.scope,"AwaitExpression",i.FUNCTION_TYPES);p&&(a.async=!0,u=i.awaitExpression(u,!0)),this.build(s,u)};var y={enter:function(e,n,l,t){i.isReferencedIdentifier(e,n)&&(l.hasOwnBinding(e.name)||t.letReferences[e.name]&&(t.closurify=!0))}},x={enter:function(e,n,l,t){return i.isFunction(e)?(l.traverse(e,y,t),this.skip()):void 0}};t.prototype.getLetReferences=function(){for(var e,n=this.block,l=n._letDeclarators||[],t=0;t<l.length;t++)e=l[t],d(this.outsideLetReferences,i.getBindingIdentifiers(e));if(n.body)for(t=0;t<n.body.length;t++)e=n.body[t],p(e,n)&&(l=l.concat(e.declarations));for(t=0;t<l.length;t++){e=l[t];var r=i.getBindingIdentifiers(e);d(this.letReferences,r),this.hasLetReferences=!0}if(this.hasLetReferences){h(l);var a={letReferences:this.letReferences,closurify:!1};return this.scope.traverse(this.block,x,a),a.closurify}};var b=function(e){return i.isBreakStatement(e)?"break":i.isContinueStatement(e)?"continue":void 0},_={enter:function(e,n,l,t){var r;if(i.isLoop(e)&&(t.ignoreLabeless=!0,l.traverse(e,_,t),t.ignoreLabeless=!1),i.isFunction(e)||i.isLoop(e))return this.skip();var a=b(e);if(a){if(e.label){if(t.innerLabels.indexOf(e.label.name)>=0)return;a=a+"|"+e.label.name}else{if(t.ignoreLabeless)return;if(i.isBreakStatement(e)&&i.isSwitchCase(n))return}t.hasBreakContinue=!0,t.map[a]=e,r=i.literal(a)}return i.isReturnStatement(e)&&(t.hasReturn=!0,r=i.objectExpression([i.property("init",i.identifier("v"),e.argument||i.identifier("undefined"))])),r?(r=i.returnStatement(r),i.inherits(r,e)):void 0}},v={enter:function(e,n,l,t){i.isLabeledStatement(e)&&t.innerLabels.push(e.label.name)}};t.prototype.checkLoop=function(){var e={hasBreakContinue:!1,ignoreLabeless:!1,innerLabels:[],hasReturn:!1,isLoop:!!this.loopParent,map:{}};return this.scope.traverse(this.block,v,e),this.scope.traverse(this.block,_,e),e};var I={enter:function(e,n,l,t){if(i.isForStatement(e))g(e.init,e)&&(e.init=i.sequenceExpression(t.pushDeclar(e.init)));else if(i.isFor(e))g(e.left,e)&&(e.left=e.left.declarations[0].id);else{if(g(e,n))return t.pushDeclar(e).map(i.expressionStatement);if(i.isFunction(e))return this.skip()}}};t.prototype.hoistVarDeclarations=function(){o(this.block,I,this.scope,this)},t.prototype.pushDeclar=function(e){this.body.push(i.variableDeclaration(e.kind,e.declarations.map(function(e){return i.variableDeclarator(e.id)})));for(var n=[],l=0;l<e.declarations.length;l++){var t=e.declarations[l];if(t.init){var r=i.assignmentExpression("=",t.id,t.init);n.push(i.inherits(r,t))}}return n},t.prototype.build=function(e,n){var l=this.has;l.hasReturn||l.hasBreakContinue?this.buildHas(e,n):this.body.push(i.expressionStatement(n))},t.prototype.buildHas=function(e,n){var l=this.body;l.push(i.variableDeclaration("var",[i.variableDeclarator(e,n)]));var t,r=this.loopParent,a=this.has,o=[];if(a.hasReturn&&(t=s.template("let-scoping-return",{RETURN:e})),a.hasBreakContinue){if(!r)throw new Error("Has no loop parent but we're trying to reassign breaks and continues, something is going wrong here.");for(var u in a.map)o.push(i.switchCase(i.literal(u),[a.map[u]]));if(a.hasReturn&&o.push(i.switchCase(null,[t])),1===o.length){var c=o[0];l.push(this.file.attachAuxiliaryComment(i.ifStatement(i.binaryExpression("===",e,c.test),c.consequent[0])))}else l.push(this.file.attachAuxiliaryComment(i.switchStatement(e,o)))}else a.hasReturn&&l.push(this.file.attachAuxiliaryComment(t))}},{"../../../helpers/object":24,"../../../traversal":114,"../../../types":119,"../../../util":121,"lodash/object/extend":294,"lodash/object/values":298}],62:[function(e,n,l){"use strict";function t(e,n,l,t){this.isStatement=t,this.scope=l,this.node=e,this.file=n,this.hasInstanceMutators=!1,this.hasStaticMutators=!1,this.instanceMutatorMap={},this.staticMutatorMap={},this.hasConstructor=!1,this.className=e.id||l.generateUidIdentifier("class"),this.superName=e.superClass||i.identifier("Function"),this.hasSuper=!!e.superClass,this.isLoose=n.isLoose("es6.classes")}var r=e("../../helpers/replace-supers"),a=e("../../helpers/name-method"),o=e("../../helpers/define-map"),u=e("../../../messages"),s=e("../../../util"),i=e("../../../types");l.check=i.isClass,l.ClassDeclaration=function(e,n,l,r){return new t(e,r,l,!0).run()},l.ClassExpression=function(e,n,l,r){return e.id||(i.isProperty(n)&&n.value===e&&!n.computed&&i.isIdentifier(n.key)&&(e.id=n.key),i.isVariableDeclarator(n)&&i.isIdentifier(n.id)&&(e.id=n.id)),new t(e,r,l,!1).run()},t.prototype.run=function(){var e,n=this.superName,l=this.className,t=this.node.body.body,r=this.file,a=this.body=[],o=i.blockStatement([i.expressionStatement(i.callExpression(r.addHelper("class-call-check"),[i.thisExpression(),l]))]);if(this.node.id)e=i.functionDeclaration(l,[],o),a.push(e);else{var u=null,s=1===t.length&&"constructor"===t[0].key.name;this.hasSuper||0!==t.length&&!s||(u=l),e=i.functionExpression(u,[],o),a.push(i.variableDeclaration("var",[i.variableDeclarator(l,e)]))}this.constructor=e;var c=[],d=[];this.hasSuper&&(d.push(n),i.isIdentifier(n)||(n=this.scope.generateUidBasedOnNode(n,this.file)),c.push(n),this.superName=n,a.push(i.expressionStatement(i.callExpression(r.addHelper("inherits"),[l,n])))),this.buildBody(),i.inheritsComments(a[0],this.node);var p;return 1===a.length?p=i.toExpression(e):(a.push(i.returnStatement(l)),p=i.callExpression(i.functionExpression(null,c,i.blockStatement(a)),d)),this.isStatement?i.variableDeclaration("let",[i.variableDeclarator(l,p)]):p},t.prototype.buildBody=function(){for(var e=this.constructor,n=this.className,l=this.superName,t=this.node.body.body,a=this.body,u=0;u<t.length;u++){var c=t[u];if(i.isMethodDefinition(c)){var d=new r({methodNode:c,className:this.className,superName:this.superName,isStatic:c["static"],isLoose:this.isLoose,scope:this.scope,file:this.file},!0);d.replace(),!c.computed&&i.isIdentifier(c.key,{name:"constructor"})||i.isLiteral(c.key,{value:"constructor"})?this.pushConstructor(c):this.pushMethod(c)}else i.isPrivateDeclaration(c)?(this.closure=!0,a.unshift(c)):i.isClassProperty(c)&&this.pushProperty(c)}if(!this.hasConstructor&&this.hasSuper&&!i.isFalsyExpression(l)){var p="class-super-constructor-call";this.isLoose&&(p+="-loose"),e.body.body.push(s.template(p,{CLASS_NAME:n,SUPER_NAME:this.superName},!0))}var f,g;if(this.hasInstanceMutators&&(f=o.build(this.instanceMutatorMap)),this.hasStaticMutators&&(g=o.build(this.staticMutatorMap)),f||g){g=g||i.literal(null);var h=[n,g];f&&h.push(f),a.push(i.expressionStatement(i.callExpression(this.file.addHelper("prototype-properties"),h)))}},t.prototype.pushMethod=function(e){var n=e.key,l=e.kind;if(""===l){if(a.property(e,this.file,this.scope),this.isLoose){var t=this.className;e["static"]||(t=i.memberExpression(t,i.identifier("prototype"))),n=i.memberExpression(t,n,e.computed);var r=i.expressionStatement(i.assignmentExpression("=",n,e.value));return i.inheritsComments(r,e),void this.body.push(r)}l="value"}var u=this.instanceMutatorMap;e["static"]?(this.hasStaticMutators=!0,u=this.staticMutatorMap):this.hasInstanceMutators=!0,o.push(u,n,l,e.computed,e),o.push(u,n,"enumerable",e.computed,!1)},t.prototype.pushProperty=function(e){if(e.value){var n;e["static"]?(n=i.memberExpression(this.className,e.key),this.body.push(i.expressionStatement(i.assignmentExpression("=",n,e.value)))):(n=i.memberExpression(i.thisExpression(),e.key),this.constructor.body.body.unshift(i.expressionStatement(i.assignmentExpression("=",n,e.value))))}},t.prototype.pushConstructor=function(e){if(e.kind)throw this.file.errorWithNode(e,u.get("classesIllegalConstructorKind"));var n=this.constructor,l=e.value;this.hasConstructor=!0,i.inherits(n,l),i.inheritsComments(n,e),n._ignoreUserWhitespace=!0,n.params=l.params,n.body.body=n.body.body.concat(l.body.body)}},{"../../../messages":27,"../../../types":119,"../../../util":121,"../../helpers/define-map":34,"../../helpers/name-method":36,"../../helpers/replace-supers":39}],63:[function(e,n,l){"use strict";var t=e("../../../messages"),r=e("../../../types");l.check=function(e){return r.isVariableDeclaration(e,{kind:"const"})};var a={enter:function(e,n,l,a){if(r.isAssignmentExpression(e)||r.isUpdateExpression(e)){var o=r.getBindingIdentifiers(e);for(var u in o){var s=o[u],i=a.constants[u];if(i){var c=i.identifier;if(s!==c&&l.bindingIdentifierEquals(u,c))throw a.file.errorWithNode(s,t.get("readOnly",u))}}}else r.isScope(e,n)&&this.skip()}};l.Scopable=function(e,n,l,t){l.traverse(e,a,{constants:l.getAllBindingsOfKind("const"),file:t})},l.VariableDeclaration=function(e){"const"===e.kind&&(e.kind="let")}},{"../../../messages":27,"../../../types":119}],64:[function(e,n,l){"use strict";function t(e){this.blockHoist=e.blockHoist,this.operator=e.operator,this.nodes=e.nodes,this.scope=e.scope,this.file=e.file,this.kind=e.kind}var r=e("../../../messages"),a=e("../../../types");l.check=a.isPattern,t.prototype.buildVariableAssignment=function(e,n){var l=this.operator;a.isMemberExpression(e)&&(l="=");var t;return t=l?a.expressionStatement(a.assignmentExpression(l,e,n)):a.variableDeclaration(this.kind,[a.variableDeclarator(e,n)]),t._blockHoist=this.blockHoist,t},t.prototype.buildVariableDeclaration=function(e,n){var l=a.variableDeclaration("var",[a.variableDeclarator(e,n)]);return l._blockHoist=this.blockHoist,l},t.prototype.push=function(e,n){a.isObjectPattern(e)?this.pushObjectPattern(e,n):a.isArrayPattern(e)?this.pushArrayPattern(e,n):a.isAssignmentPattern(e)?this.pushAssignmentPattern(e,n):this.nodes.push(this.buildVariableAssignment(e,n))},t.prototype.get=function(){},t.prototype.pushAssignmentPattern=function(e,n){var l=this.scope.generateUidBasedOnNode(n),t=a.variableDeclaration("var",[a.variableDeclarator(l,n)]);t._blockHoist=this.blockHoist,this.nodes.push(t),this.nodes.push(this.buildVariableAssignment(e.left,a.conditionalExpression(a.binaryExpression("===",l,a.identifier("undefined")),e.right,l)))},t.prototype.pushObjectSpread=function(e,n,l,t){for(var r=[],o=0;o<e.properties.length;o++){var u=e.properties[o];if(o>=t)break;if(!a.isSpreadProperty(u)){var s=u.key;a.isIdentifier(s)&&(s=a.literal(u.key.name)),r.push(s)}}r=a.arrayExpression(r);var i=a.callExpression(this.file.addHelper("object-without-properties"),[n,r]);this.nodes.push(this.buildVariableAssignment(l.argument,i))},t.prototype.pushObjectProperty=function(e,n){a.isLiteral(e.key)&&(e.computed=!0);var l=e.value,t=a.memberExpression(n,e.key,e.computed);a.isPattern(l)?this.push(l,t):this.nodes.push(this.buildVariableAssignment(l,t))},t.prototype.pushObjectPattern=function(e,n){if(e.properties.length||this.nodes.push(a.expressionStatement(a.callExpression(this.file.addHelper("object-destructuring-empty"),[n]))),e.properties.length>1&&a.isMemberExpression(n)){var l=this.scope.generateUidBasedOnNode(n,this.file);this.nodes.push(this.buildVariableDeclaration(l,n)),n=l}for(var t=0;t<e.properties.length;t++){var r=e.properties[t];a.isSpreadProperty(r)?this.pushObjectSpread(e,n,r,t):this.pushObjectProperty(r,n)}};var o=function(e){for(var n=0;n<e.elements.length;n++)if(a.isRestElement(e.elements[n]))return!0;return!1};t.prototype.canUnpackArrayPattern=function(e,n){if(!a.isArrayExpression(n))return!1;if(!(e.elements.length>n.elements.length)){if(e.elements.length<n.elements.length&&!o(e))return!1;for(var l=0;l<e.elements.length;l++)if(!e.elements[l])return!1;return!0}},t.prototype.pushUnpackedArrayPattern=function(e,n){for(var l=0;l<e.elements.length;l++){var t=e.elements[l];a.isRestElement(t)?this.push(t.argument,a.arrayExpression(n.elements.slice(l))):this.push(t,n.elements[l])}},t.prototype.pushArrayPattern=function(e,n){if(e.elements){if(this.canUnpackArrayPattern(e,n))return this.pushUnpackedArrayPattern(e,n);var l=!o(e)&&e.elements.length,t=this.scope.toArray(n,l);a.isIdentifier(t)?n=t:(n=this.scope.generateUidBasedOnNode(n),this.nodes.push(this.buildVariableDeclaration(n,t)),this.scope.assignTypeGeneric(n.name,"Array"));for(var r=0;r<e.elements.length;r++){var u=e.elements[r];if(u){var s;a.isRestElement(u)?(s=this.scope.toArray(n),r>0&&(s=a.callExpression(a.memberExpression(s,a.identifier("slice")),[a.literal(r)])),u=u.argument):s=a.memberExpression(n,a.literal(r),!0),this.push(u,s)}}}},t.prototype.init=function(e,n){if(!a.isArrayExpression(n)&&!a.isMemberExpression(n)&&!a.isIdentifier(n)){var l=this.scope.generateUidBasedOnNode(n);this.nodes.push(this.buildVariableDeclaration(l,n)),n=l}this.push(e,n)},l.ForInStatement=l.ForOfStatement=function(e,n,l,r){var o=e.left;if(a.isPattern(o)){var u=l.generateUidIdentifier("ref");return e.left=a.variableDeclaration("var",[a.variableDeclarator(u)]),a.ensureBlock(e),void e.body.body.unshift(a.variableDeclaration("var",[a.variableDeclarator(o,u)]))}if(a.isVariableDeclaration(o)){var s=o.declarations[0].id;if(a.isPattern(s)){var i=l.generateUidIdentifier("ref");e.left=a.variableDeclaration(o.kind,[a.variableDeclarator(i,null)]);var c=[],d=new t({kind:o.kind,file:r,scope:l,nodes:c});d.init(s,i),a.ensureBlock(e);var p=e.body;p.body=c.concat(p.body)}}},l.Function=function(e,n,l,r){var o=[],u=!1;if(e.params=e.params.map(function(n,s){if(!a.isPattern(n))return n;u=!0;var i=l.generateUidIdentifier("ref"),c=new t({blockHoist:e.params.length-s,nodes:o,scope:l,file:r,kind:"var"});return c.init(n,i),i}),u){a.ensureBlock(e);var s=e.body;s.body=o.concat(s.body)}},l.CatchClause=function(e,n,l,r){var o=e.param;if(a.isPattern(o)){var u=l.generateUidIdentifier("ref");e.param=u;var s=[],i=new t({kind:"let",file:r,scope:l,nodes:s});return i.init(o,u),e.body.body=s.concat(e.body.body),e}},l.ExpressionStatement=function(e,n,l,r){var o=e.expression;if("AssignmentExpression"===o.type&&a.isPattern(o.left)&&!r.isConsequenceExpressionStatement(e)){var u=[],s=l.generateUidIdentifier("ref");u.push(a.variableDeclaration("var",[a.variableDeclarator(s,o.right)]));var i=new t({operator:o.operator,file:r,scope:l,nodes:u});return i.init(o.left,s),u}},l.AssignmentExpression=function(e,n,l,r){if(a.isPattern(e.left)){var o=l.generateUidIdentifier("temp");l.push({key:o.name,id:o});var u=[];u.push(a.assignmentExpression("=",o,e.right));var s=new t({operator:e.operator,file:r,scope:l,nodes:u});return s.init(e.left,o),u.push(o),a.toSequenceExpression(u,l)}};var u=function(e){for(var n=0;n<e.declarations.length;n++)if(a.isPattern(e.declarations[n].id))return!0;return!1};l.VariableDeclaration=function(e,n,l,o){if(!a.isForInStatement(n)&&!a.isForOfStatement(n)&&u(e)){for(var s,i=[],c=0;c<e.declarations.length;c++){s=e.declarations[c];var d=s.init,p=s.id,f=new t({nodes:i,scope:l,kind:e.kind,file:o});a.isPattern(p)&&d?(f.init(p,d),+c!==e.declarations.length-1&&a.inherits(i[i.length-1],s)):i.push(a.inherits(f.buildVariableAssignment(s.id,s.init),s))}if(!a.isProgram(n)&&!a.isBlockStatement(n)){for(s=null,c=0;c<i.length;c++){if(e=i[c],s=s||a.variableDeclaration(e.kind,[]),!a.isVariableDeclaration(e)&&s.kind!==e.kind)throw o.errorWithNode(e,r.get("invalidParentForThisNode"));s.declarations=s.declarations.concat(e.declarations)}return s}return i}}},{"../../../messages":27,"../../../types":119}],65:[function(e,n,l){"use strict";var t=e("../../../messages"),r=e("../../../util"),a=e("../../../types");l.check=a.isForOfStatement,l.ForOfStatement=function(e,n,l,t){var r=s;t.isLoose("es6.forOf")&&(r=u);var o=r(e,n,l,t),i=o.declar,c=o.loop,d=c.body;return a.inheritsComments(c,e),a.ensureBlock(e),i&&d.body.push(i),d.body=d.body.concat(e.body.body),a.inherits(c,e),c._scopeInfo=e._scopeInfo,c};var o={enter:function(e,n,l,t){if(a.isLoop(e))return t.ignoreLabeless=!0,l.traverse(e,o,t),t.ignoreLabeless=!1,this.skip();if(a.isBreakStatement(e)){if(!e.label&&t.ignoreLabeless)return;if(e.label&&e.label.name!==t.label)return;var r=a.expressionStatement(a.callExpression(a.memberExpression(t.iteratorKey,a.identifier("return")),[]));return r=t.wrapReturn(r),this.skip(),[r,e]}}},u=function(e,n,l,u){var s,i,c=e.left;if(a.isIdentifier(c)||a.isPattern(c)||a.isMemberExpression(c))i=c;else{if(!a.isVariableDeclaration(c))throw u.errorWithNode(c,t.get("unknownForHead",c.type));i=l.generateUidIdentifier("ref"),s=a.variableDeclaration(c.kind,[a.variableDeclarator(c.declarations[0].id,i)])}var d=l.generateUidIdentifier("iterator"),p=l.generateUidIdentifier("isArray"),f=r.template("for-of-loose",{LOOP_OBJECT:d,IS_ARRAY:p,OBJECT:e.right,INDEX:l.generateUidIdentifier("i"),ID:i});return s||f.body.body.shift(),l.traverse(e,o,{iteratorKey:d,wrapReturn:function(e){return a.ifStatement(a.logicalExpression("&&",a.unaryExpression("!",p,!0),a.memberExpression(d,a.identifier("return"))),e)},label:a.isLabeledStatement(n)&&n.label.name}),{declar:s,loop:f}},s=function(e,n,l,u){var s,i=e.left,c=l.generateUidIdentifier("step"),d=a.memberExpression(c,a.identifier("value"));if(a.isIdentifier(i)||a.isPattern(i)||a.isMemberExpression(i))s=a.expressionStatement(a.assignmentExpression("=",i,d));else{if(!a.isVariableDeclaration(i))throw u.errorWithNode(i,t.get("unknownForHead",i.type));s=a.variableDeclaration(i.kind,[a.variableDeclarator(i.declarations[0].id,d)])}var p=l.generateUidIdentifier("iterator"),f=r.template("for-of",{ITERATOR_KEY:p,STEP_KEY:c,OBJECT:e.right});return l.traverse(e,o,{iteratorKey:p,wrapReturn:function(e){return a.ifStatement(a.memberExpression(p,a.identifier("return")),e)},label:a.isLabeledStatement(n)&&n.label.name}),{declar:s,loop:f}}},{"../../../messages":27,"../../../types":119,"../../../util":121}],66:[function(e,n,l){"use strict";var t=e("../../../types");l.check=e("../internal/modules").check,l.ImportDeclaration=function(e,n,l,t){if(!e.isType){var r=[];if(e.specifiers.length)for(var a=0;a<e.specifiers.length;a++)t.moduleFormatter.importSpecifier(e.specifiers[a],e,r,n);else t.moduleFormatter.importDeclaration(e,r,n);return 1===r.length&&(r[0]._blockHoist=e._blockHoist),r}},l.ExportDeclaration=function(e,n,l,r){if(!t.isTypeAlias(e.declaration)){var a,o=[];if(e.declaration){if(t.isVariableDeclaration(e.declaration)){var u=e.declaration.declarations[0];u.init=u.init||t.identifier("undefined")}r.moduleFormatter.exportDeclaration(e,o,n)}else if(e.specifiers)for(a=0;a<e.specifiers.length;a++)r.moduleFormatter.exportSpecifier(e.specifiers[a],e,o,n);if(e._blockHoist)for(a=0;a<o.length;a++)o[a]._blockHoist=e._blockHoist;return o}}},{"../../../types":119,"../internal/modules":86}],67:[function(e,n,l){"use strict";var t=e("../../helpers/replace-supers"),r=e("../../../types");l.check=function(e){return r.isIdentifier(e,{name:"super"})},l.Property=function(e,n,l,a){if(e.method){var o=e.value,u=l.generateUidIdentifier("this"),s=new t({topLevelThisReference:u,methodNode:e,className:u,isStatic:!0,scope:l,file:a});s.replace(),s.hasSuper&&o.body.body.unshift(r.variableDeclaration("var",[r.variableDeclarator(u,r.thisExpression())]))}}},{"../../../types":119,"../../helpers/replace-supers":39}],68:[function(e,n,l){"use strict";var t=e("../../../util"),r=e("../../../types");l.check=function(e){return r.isFunction(e)&&a(e)};var a=function(e){for(var n=0;n<e.params.length;n++)if(!r.isIdentifier(e.params[n]))return!0;return!1},o={enter:function(e,n,l,t){r.isReferencedIdentifier(e,n)&&t.scope.hasOwnBinding(e.name)&&(t.scope.bindingIdentifierEquals(e.name,e)||(t.iife=!0,this.stop()))}};l.Function=function(e,n,l,u){if(a(e)){r.ensureBlock(e);var s=[],i=r.identifier("arguments");i._ignoreAliasFunctions=!0;for(var c=0,d={iife:!1,scope:l},p=function(n,l,a){var o=t.template("default-parameter",{VARIABLE_NAME:n,DEFAULT_VALUE:l,ARGUMENT_KEY:r.literal(a),ARGUMENTS:i},!0);u.checkNode(o),o._blockHoist=e.params.length-a,s.push(o)},f=0;f<e.params.length;f++){var g=e.params[f];if(r.isAssignmentPattern(g)){var h=g.left,m=g.right,y=l.generateUidIdentifier("x");y._isDefaultPlaceholder=!0,e.params[f]=y,d.iife||(r.isIdentifier(m)&&l.hasOwnBinding(m.name)?d.iife=!0:l.traverse(m,o,d)),p(h,m,f)}else r.isRestElement(g)||(c=f+1),r.isIdentifier(g)||l.traverse(g,o,d),u.transformers["es6.blockScopingTDZ"].canRun()&&p(g,r.identifier("undefined"),f)}if(e.params=e.params.slice(0,c),d.iife){var x=r.functionExpression(null,[],e.body,e.generator);x._aliasFunction=!0,s.push(r.returnStatement(r.callExpression(x,[]))),e.body=r.blockStatement(s)}else e.body.body=s.concat(e.body.body)}}},{"../../../types":119,"../../../util":121}],69:[function(e,n,l){"use strict"; var t=e("../../../util"),r=e("../../../types");l.check=r.isRestElement;var a=function(e){return r.isRestElement(e.params[e.params.length-1])};l.Function=function(e,n,l){if(a(e)){var o=e.params.pop().argument,u=r.identifier("arguments");u._ignoreAliasFunctions=!0;var s=r.literal(e.params.length),i=l.generateUidIdentifier("key"),c=l.generateUidIdentifier("len"),d=i,p=c;if(e.params.length&&(d=r.binaryExpression("-",i,s),p=r.conditionalExpression(r.binaryExpression(">",c,s),r.binaryExpression("-",c,s),r.literal(0))),r.isPattern(o)){var f=o;o=l.generateUidIdentifier("ref");var g=r.variableDeclaration("var",[r.variableDeclarator(f,o)]);g._blockHoist=e.params.length+1,e.body.body.unshift(g)}l.assignTypeGeneric(o.name,"Array");var h=t.template("rest",{ARGUMENTS:u,ARRAY_KEY:d,ARRAY_LEN:p,START:s,ARRAY:o,KEY:i,LEN:c});h._blockHoist=e.params.length+1,e.body.body.unshift(h)}}},{"../../../types":119,"../../../util":121}],70:[function(e,n,l){"use strict";var t=e("../../../types");l.check=function(e){return t.isProperty(e)&&e.computed},l.ObjectExpression=function(e,n,l,o){for(var u=!1,s=0;s<e.properties.length&&!(u=t.isProperty(e.properties[s],{computed:!0,kind:"init"}));s++);if(u){var i=[],c=l.generateUidBasedOnNode(n),d=[],p=t.functionExpression(null,[],t.blockStatement(d));p._aliasFunction=!0;var f=a;o.isLoose("es6.properties.computed")&&(f=r);var g=f(e,d,c,i,o);return g?g:(d.unshift(t.variableDeclaration("var",[t.variableDeclarator(c,t.objectExpression(i))])),d.push(t.returnStatement(c)),t.callExpression(p,[]))}};var r=function(e,n,l){for(var r=0;r<e.properties.length;r++){var a=e.properties[r];n.push(t.expressionStatement(t.assignmentExpression("=",t.memberExpression(l,a.key,a.computed||t.isLiteral(a.key)),a.value)))}},a=function(e,n,l,r,a){for(var o,u,s=e.properties,i=0;i<s.length;i++)o=s[i],"init"===o.kind&&(u=o.key,!o.computed&&t.isIdentifier(u)&&(o.key=t.literal(u.name)));var c=!1;for(i=0;i<s.length;i++)o=s[i],o.computed&&(c=!0),("init"!==o.kind||!c||t.isLiteral(t.toComputedKey(o,o.key),{value:"__proto__"}))&&(r.push(o),s[i]=null);for(i=0;i<s.length;i++)if(o=s[i]){u=o.key;var d;d=o.computed&&t.isMemberExpression(u)&&t.isIdentifier(u.object,{name:"Symbol"})?t.assignmentExpression("=",t.memberExpression(l,u,!0),o.value):t.callExpression(a.addHelper("define-property"),[l,u,o.value]),n.push(t.expressionStatement(d))}if(1===n.length){var p=n[0].expression;if(t.isCallExpression(p))return p.arguments[0]=t.objectExpression(r),p}}},{"../../../types":119}],71:[function(e,n,l){"use strict";var t=e("lodash/lang/clone"),r=e("../../../types");l.check=function(e){return r.isProperty(e)&&(e.method||e.shorthand)},l.Property=function(e){e.method&&(e.method=!1),e.shorthand&&(e.shorthand=!1,e.key=r.removeComments(t(e.key)))}},{"../../../types":119,"lodash/lang/clone":279}],72:[function(e,n,l){"use strict";var t=e("lodash/collection/includes"),r=e("../../../types");l.check=r.isSpreadElement;var a=function(e,n){return n.toArray(e.argument,!0)},o=function(e){for(var n=0;n<e.length;n++)if(r.isSpreadElement(e[n]))return!0;return!1},u=function(e,n){for(var l=[],t=[],o=function(){t.length&&(l.push(r.arrayExpression(t)),t=[])},u=0;u<e.length;u++){var s=e[u];r.isSpreadElement(s)?(o(),l.push(a(s,n))):t.push(s)}return o(),l};l.ArrayExpression=function(e,n,l){var t=e.elements;if(o(t)){var a=u(t,l),s=a.shift();return r.isArrayExpression(s)||(a.unshift(s),s=r.arrayExpression([])),r.callExpression(r.memberExpression(s,r.identifier("concat")),a)}},l.CallExpression=function(e,n,l){var t=e.arguments;if(o(t)){var a=r.identifier("undefined");e.arguments=[];var s;s=1===t.length&&"arguments"===t[0].argument.name?[t[0].argument]:u(t,l);var i=s.shift();e.arguments.push(s.length?r.callExpression(r.memberExpression(i,r.identifier("concat")),s):i);var c=e.callee;if(r.isMemberExpression(c)){var d=l.generateTempBasedOnNode(c.object);d?(c.object=r.assignmentExpression("=",d,c.object),a=d):a=c.object,r.appendToMemberExpression(c,r.identifier("apply"))}else e.callee=r.memberExpression(e.callee,r.identifier("apply"));e.arguments.unshift(a)}},l.NewExpression=function(e,n,l,a){var s=e.arguments;if(o(s)){var i=r.isIdentifier(e.callee)&&t(r.NATIVE_TYPE_NAMES,e.callee.name),c=u(s,l);i&&c.unshift(r.arrayExpression([r.literal(null)]));var d=c.shift();return s=c.length?r.callExpression(r.memberExpression(d,r.identifier("concat")),c):d,i?r.newExpression(r.callExpression(r.memberExpression(a.addHelper("bind"),r.identifier("apply")),[e.callee,s]),[]):r.callExpression(a.addHelper("apply-constructor"),[e.callee,s])}}},{"../../../types":119,"lodash/collection/includes":200}],73:[function(e,n,l){"use strict";function t(e){return c.blockStatement([c.returnStatement(e)])}function r(e,n,l){this.hasTailRecursion=!1,this.needsArguments=!1,this.setsArguments=!1,this.needsThis=!1,this.ownerId=e.id,this.vars=[],this.scope=n,this.file=l,this.node=e}var a=e("lodash/collection/reduceRight"),o=e("../../../messages"),u=e("lodash/array/flatten"),s=e("../../../util"),i=e("lodash/collection/map"),c=e("../../../types");r.prototype.getArgumentsId=function(){return this.argumentsId=this.argumentsId||this.scope.generateUidIdentifier("arguments")},r.prototype.getThisId=function(){return this.thisId=this.thisId||this.scope.generateUidIdentifier("this")},r.prototype.getLeftId=function(){return this.leftId=this.leftId||this.scope.generateUidIdentifier("left")},r.prototype.getFunctionId=function(){return this.functionId=this.functionId||this.scope.generateUidIdentifier("function")},r.prototype.getAgainId=function(){return this.againId=this.againId||this.scope.generateUidIdentifier("again")},r.prototype.getParams=function(){var e=this.params;if(!e){e=this.node.params,this.paramDecls=[];for(var n=0;n<e.length;n++){var l=e[n];l._isDefaultPlaceholder||this.paramDecls.push(c.variableDeclarator(l,e[n]=this.scope.generateUidIdentifier("x")))}}return this.params=e},r.prototype.hasDeopt=function(){var e=this.scope.getBindingInfo(this.ownerId.name);return e&&e.reassigned},r.prototype.run=function(){var e=this.scope,n=this.node,l=this.ownerId;if(l&&(e.traverse(n,d,this),this.hasTailRecursion)){if(this.hasDeopt())return void this.file.logDeopt(n,o.get("tailCallReassignmentDeopt"));e.traverse(n,p,this),this.needsThis&&this.needsArguments||e.traverse(n,f,this);var t=c.ensureBlock(n).body;if(this.vars.length>0){var r=u(i(this.vars,function(e){return e.declarations},this)),g=a(r,function(e,n){return c.assignmentExpression("=",n.id,e)},c.identifier("undefined"));t.unshift(c.expressionStatement(g))}var h=this.paramDecls;h.length>0&&t.unshift(c.variableDeclaration("var",h)),t.unshift(c.expressionStatement(c.assignmentExpression("=",this.getAgainId(),c.literal(!1)))),n.body=s.template("tail-call-body",{AGAIN_ID:this.getAgainId(),THIS_ID:this.thisId,ARGUMENTS_ID:this.argumentsId,FUNCTION_ID:this.getFunctionId(),BLOCK:n.body});var m=[];if(this.needsThis&&m.push(c.variableDeclarator(this.getThisId(),c.thisExpression())),this.needsArguments||this.setsArguments){var y=c.variableDeclarator(this.getArgumentsId());this.needsArguments&&(y.init=c.identifier("arguments")),m.push(y)}var x=this.leftId;x&&m.push(c.variableDeclarator(x)),m.length>0&&n.body.body.unshift(c.variableDeclaration("var",m))}},r.prototype.subTransform=function(e){if(e){var n=this["subTransform"+e.type];return n?n.call(this,e):void 0}},r.prototype.subTransformConditionalExpression=function(e){var n=this.subTransform(e.consequent),l=this.subTransform(e.alternate);return n||l?(e.type="IfStatement",e.consequent=n?c.toBlock(n):t(e.consequent),e.alternate=l?c.isIfStatement(l)?l:c.toBlock(l):t(e.alternate),[e]):void 0},r.prototype.subTransformLogicalExpression=function(e){var n=this.subTransform(e.right);if(n){var l=this.getLeftId(),r=c.assignmentExpression("=",l,e.left);return"&&"===e.operator&&(r=c.unaryExpression("!",r)),[c.ifStatement(r,t(l))].concat(n)}},r.prototype.subTransformSequenceExpression=function(e){var n=e.expressions,l=this.subTransform(n[n.length-1]);return l?(1===--n.length&&(e=n[0]),[c.expressionStatement(e)].concat(l)):void 0},r.prototype.subTransformCallExpression=function(e){var n,l,t=e.callee;if(c.isMemberExpression(t,{computed:!1})&&c.isIdentifier(t.property)){switch(t.property.name){case"call":l=c.arrayExpression(e.arguments.slice(1));break;case"apply":l=e.arguments[1]||c.identifier("undefined");break;default:return}n=e.arguments[0],t=t.object}if(c.isIdentifier(t)&&this.scope.bindingIdentifierEquals(t.name,this.ownerId)&&(this.hasTailRecursion=!0,!this.hasDeopt())){var r=[];c.isThisExpression(n)||r.push(c.expressionStatement(c.assignmentExpression("=",this.getThisId(),n||c.identifier("undefined")))),l||(l=c.arrayExpression(e.arguments));var a=this.getArgumentsId(),o=this.getParams();r.push(c.expressionStatement(c.assignmentExpression("=",a,l)));var u,s;if(c.isArrayExpression(l)){var i=l.elements;for(u=0;u<i.length&&u<o.length;u++){s=o[u];var d=i[u]||(i[u]=c.identifier("undefined"));s._isDefaultPlaceholder||(i[u]=c.assignmentExpression("=",s,d))}}else for(this.setsArguments=!0,u=0;u<o.length;u++)s=o[u],s._isDefaultPlaceholder||r.push(c.expressionStatement(c.assignmentExpression("=",s,c.memberExpression(a,c.literal(u),!0))));return r.push(c.expressionStatement(c.assignmentExpression("=",this.getAgainId(),c.literal(!0)))),r.push(c.continueStatement(this.getFunctionId())),r}};var d={enter:function(e,n,l,t){if(c.isIfStatement(e))c.isReturnStatement(e.alternate)&&c.ensureBlock(e,"alternate"),c.isReturnStatement(e.consequent)&&c.ensureBlock(e,"consequent");else{if(c.isReturnStatement(e))return this.skip(),t.subTransform(e.argument);c.isTryStatement(n)?e===n.block?this.skip():n.finalizer&&e!==n.finalizer&&this.skip():c.isFunction(e)?this.skip():c.isVariableDeclaration(e)&&(this.skip(),t.vars.push(e))}}},p={enter:function(e,n,l,t){return c.isThisExpression(e)?(t.needsThis=!0,t.getThisId()):c.isReferencedIdentifier(e,n,{name:"arguments"})?(t.needsArguments=!0,t.getArgumentsId()):c.isFunction(e)&&(this.skip(),c.isFunctionDeclaration(e))?(e=c.variableDeclaration("var",[c.variableDeclarator(e.id,c.toExpression(e))]),e._blockHoist=2,e):void 0}},f={enter:function(e,n,l,t){if(c.isExpressionStatement(e)){var r=e.expression;if(c.isAssignmentExpression(r))if(t.needsThis||r.left!==t.getThisId()){if(!t.needsArguments&&r.left===t.getArgumentsId()&&c.isArrayExpression(r.right))return i(r.right.elements,function(e){return c.expressionStatement(e)})}else this.remove()}}};l.Function=function(e,n,l,t){var a=new r(e,l,t);a.run()}},{"../../../messages":27,"../../../types":119,"../../../util":121,"lodash/array/flatten":192,"lodash/collection/map":201,"lodash/collection/reduceRight":202}],74:[function(e,n,l){"use strict";var t=e("../../../types"),r=function(e,n){return t.binaryExpression("+",e,n)};l.check=function(e){return t.isTemplateLiteral(e)||t.isTaggedTemplateExpression(e)},l.TaggedTemplateExpression=function(e,n,l,r){for(var a=[],o=e.quasi,u=[],s=[],i=0;i<o.quasis.length;i++){var c=o.quasis[i];u.push(t.literal(c.value.cooked)),s.push(t.literal(c.value.raw))}u=t.arrayExpression(u),s=t.arrayExpression(s);var d="tagged-template-literal";return r.isLoose("es6.templateLiterals")&&(d+="-loose"),a.push(t.callExpression(r.addHelper(d),[u,s])),a=a.concat(o.expressions),t.callExpression(e.tag,a)},l.TemplateLiteral=function(e){var n,l=[];for(n=0;n<e.quasis.length;n++){var a=e.quasis[n];l.push(t.literal(a.value.cooked));var o=e.expressions.shift();o&&l.push(o)}if(l.length>1){var u=l[l.length-1];t.isLiteral(u,{value:""})&&l.pop();var s=r(l.shift(),l.shift());for(n=0;n<l.length;n++)s=r(s,l[n]);return s}return l[0]}},{"../../../types":119}],75:[function(e,n,l){"use strict";var t=e("regexpu/rewrite-pattern"),r=e("lodash/array/pull"),a=e("../../../types");l.check=function(e){return a.isLiteral(e)&&e.regex&&e.regex.flags.indexOf("u")>=0},l.Literal=function(e){var n=e.regex;if(n){var l=n.flags.split("");n.flags.indexOf("u")<0||(r(l,"u"),n.pattern=t(n.pattern,n.flags),n.flags=l.join(""))}}},{"../../../types":119,"lodash/array/pull":194,"regexpu/rewrite-pattern":319}],76:[function(e,n,l){"use strict";var t=e("../../../util"),r=e("../../../types");l.experimental=!0;var a=function(e,n,l,t){if(r.isExpressionStatement(e)&&!t.isConsequenceExpressionStatement(e))return n;var a=[];return r.isSequenceExpression(n)?a=n.expressions:a.push(n),a.push(l),r.sequenceExpression(a)};l.AssignmentExpression=function(e,n,l,o){var u=e.left;if(r.isVirtualPropertyExpression(u)){var s,i=e.right;r.isExpressionStatement(n)||(s=l.generateTempBasedOnNode(e.right),s&&(i=s)),"="!==e.operator&&(i=r.binaryExpression(e.operator[0],t.template("abstract-expression-get",{PROPERTY:e.property,OBJECT:e.object}),i));var c=t.template("abstract-expression-set",{PROPERTY:u.property,OBJECT:u.object,VALUE:i});return s&&(c=r.sequenceExpression([r.assignmentExpression("=",s,e.right),c])),a(n,c,i,o)}},l.UnaryExpression=function(e,n,l,o){var u=e.argument;if(r.isVirtualPropertyExpression(u)&&"delete"===e.operator){var s=t.template("abstract-expression-delete",{PROPERTY:u.property,OBJECT:u.object});return a(n,s,r.literal(!0),o)}},l.CallExpression=function(e,n,l){var a=e.callee;if(r.isVirtualPropertyExpression(a)){var o=l.generateTempBasedOnNode(a.object),u=t.template("abstract-expression-call",{PROPERTY:a.property,OBJECT:o||a.object});return u.arguments=u.arguments.concat(e.arguments),o?r.sequenceExpression([r.assignmentExpression("=",o,a.object),u]):u}},l.VirtualPropertyExpression=function(e){return t.template("abstract-expression-get",{PROPERTY:e.property,OBJECT:e.object})},l.PrivateDeclaration=function(e){return r.variableDeclaration("const",e.declarations.map(function(e){return r.variableDeclarator(e,r.newExpression(r.identifier("WeakMap"),[]))}))}},{"../../../types":119,"../../../util":121}],77:[function(e,n,l){"use strict";var t=e("../../helpers/build-comprehension"),r=e("../../../traversal"),a=e("../../../util"),o=e("../../../types");l.experimental=!0,l.ComprehensionExpression=function(e,n,l,t){var r=s;return e.generator&&(r=u),r(e,n,l,t)};var u=function(e){var n=[],l=o.functionExpression(null,[],o.blockStatement(n),!0);return l._aliasFunction=!0,n.push(t(e,function(){return o.expressionStatement(o.yieldExpression(e.body))})),o.callExpression(l,[])},s=function(e,n,l,u){var s=l.generateUidBasedOnNode(n,u),i=a.template("array-comprehension-container",{KEY:s});i.callee._aliasFunction=!0;var c=i.callee.body,d=c.body;r.hasType(e,l,"YieldExpression",o.FUNCTION_TYPES)&&(i.callee.generator=!0,i=o.yieldExpression(i,!0));var p=d.pop();return d.push(t(e,function(){return a.template("array-push",{STATEMENT:e.body,KEY:s},!0)})),d.push(p),i}},{"../../../traversal":114,"../../../types":119,"../../../util":121,"../../helpers/build-comprehension":31}],78:[function(e,n,l){"use strict";l.experimental=!0;var t=e("../../helpers/build-binary-assignment-operator-transformer"),r=e("../../../types"),a=r.memberExpression(r.identifier("Math"),r.identifier("pow"));t(l,{operator:"**",build:function(e,n){return r.callExpression(a,[e,n])}})},{"../../../types":119,"../../helpers/build-binary-assignment-operator-transformer":30}],79:[function(e,n,l){"use strict";var t=e("../../../types");l.experimental=!0,l.manipulateOptions=function(e){e.whitelist.length&&e.whitelist.push("es6.destructuring")};var r=function(e){for(var n=0;n<e.properties.length;n++)if(t.isSpreadProperty(e.properties[n]))return!0;return!1};l.ObjectExpression=function(e,n,l,a){if(r(e)){for(var o=[],u=[],s=function(){u.length&&(o.push(t.objectExpression(u)),u=[])},i=0;i<e.properties.length;i++){var c=e.properties[i];t.isSpreadProperty(c)?(s(),o.push(c.argument)):u.push(c)}return s(),t.isObjectExpression(o[0])||o.unshift(t.objectExpression([])),t.callExpression(a.addHelper("extends"),o)}}},{"../../../types":119}],80:[function(e,n){"use strict";n.exports={useStrict:e("./other/use-strict"),"spec.functionName":e("./spec/function-name"),"validation.undeclaredVariableCheck":e("./validation/undeclared-variable-check"),"validation.noForInOfAssignment":e("./validation/no-for-in-of-assignment"),"validation.setters":e("./validation/setters"),"validation.react":e("./validation/react"),"spec.blockScopedFunctions":e("./spec/block-scoped-functions"),"es6.arrowFunctions":e("./es6/arrow-functions"),"playground.malletOperator":e("./playground/mallet-operator"),"playground.methodBinding":e("./playground/method-binding"),"playground.memoizationOperator":e("./playground/memoization-operator"),"playground.objectGetterMemoization":e("./playground/object-getter-memoization"),reactCompat:e("./other/react-compat"),flow:e("./other/flow"),react:e("./other/react"),_modules:e("./internal/modules"),"es7.comprehensions":e("./es7/comprehensions"),"es6.classes":e("./es6/classes"),asyncToGenerator:e("./other/async-to-generator"),bluebirdCoroutines:e("./other/bluebird-coroutines"),"es6.objectSuper":e("./es6/object-super"),"es7.objectRestSpread":e("./es7/object-rest-spread"),"es7.exponentiationOperator":e("./es7/exponentiation-operator"),"es6.templateLiterals":e("./es6/template-literals"),"es5.properties.mutators":e("./es5/properties.mutators"),"es6.properties.shorthand":e("./es6/properties.shorthand"),"es6.properties.computed":e("./es6/properties.computed"),"es6.forOf":e("./es6/for-of"),"es6.unicodeRegex":e("./es6/unicode-regex"),"es7.abstractReferences":e("./es7/abstract-references"),"es6.constants":e("./es6/constants"),"es6.parameters.rest":e("./es6/parameters.rest"),"es6.spread":e("./es6/spread"),"es6.parameters.default":e("./es6/parameters.default"),"es6.destructuring":e("./es6/destructuring"),"es6.blockScoping":e("./es6/block-scoping"),"es6.blockScopingTDZ":e("./es6/block-scoping-tdz"),"es6.tailCall":e("./es6/tail-call"),regenerator:e("./other/regenerator"),runtime:e("./other/runtime"),"es6.modules":e("./es6/modules"),_blockHoist:e("./internal/block-hoist"),"spec.protoToAssign":e("./spec/proto-to-assign"),_declarations:e("./internal/declarations"),_aliasFunctions:e("./internal/alias-functions"),"spec.typeofSymbol":e("./spec/typeof-symbol"),"spec.undefinedToVoid":e("./spec/undefined-to-void"),_useStrict:e("./internal/use-strict"),_moduleFormatter:e("./internal/module-formatter"),"es3.propertyLiterals":e("./es3/property-literals"),"es3.memberExpressionLiterals":e("./es3/member-expression-literals"),"minification.removeDebugger":e("./minification/remove-debugger"),"minification.removeConsoleCalls":e("./minification/remove-console-calls"),"minification.deadCodeElimination":e("./minification/dead-code-elimination"),"minification.renameLocalVariables":e("./minification/rename-local-variables"),_cleanUp:e("./internal/cleanup")}},{"./es3/member-expression-literals":56,"./es3/property-literals":57,"./es5/properties.mutators":58,"./es6/arrow-functions":59,"./es6/block-scoping":61,"./es6/block-scoping-tdz":60,"./es6/classes":62,"./es6/constants":63,"./es6/destructuring":64,"./es6/for-of":65,"./es6/modules":66,"./es6/object-super":67,"./es6/parameters.default":68,"./es6/parameters.rest":69,"./es6/properties.computed":70,"./es6/properties.shorthand":71,"./es6/spread":72,"./es6/tail-call":73,"./es6/template-literals":74,"./es6/unicode-regex":75,"./es7/abstract-references":76,"./es7/comprehensions":77,"./es7/exponentiation-operator":78,"./es7/object-rest-spread":79,"./internal/alias-functions":81,"./internal/block-hoist":82,"./internal/cleanup":83,"./internal/declarations":84,"./internal/module-formatter":85,"./internal/modules":86,"./internal/use-strict":87,"./minification/dead-code-elimination":88,"./minification/remove-console-calls":89,"./minification/remove-debugger":90,"./minification/rename-local-variables":91,"./other/async-to-generator":92,"./other/bluebird-coroutines":93,"./other/flow":94,"./other/react":96,"./other/react-compat":95,"./other/regenerator":97,"./other/runtime":98,"./other/use-strict":99,"./playground/mallet-operator":100,"./playground/memoization-operator":101,"./playground/method-binding":102,"./playground/object-getter-memoization":103,"./spec/block-scoped-functions":104,"./spec/function-name":105,"./spec/proto-to-assign":106,"./spec/typeof-symbol":107,"./spec/undefined-to-void":108,"./validation/no-for-in-of-assignment":109,"./validation/react":110,"./validation/setters":111,"./validation/undeclared-variable-check":112}],81:[function(e,n,l){"use strict";var t=e("../../../types"),r={enter:function(e,n,l,r){if(t.isFunction(e)&&!e._aliasFunction)return this.skip();if(e._ignoreAliasFunctions)return this.skip();var a;if(t.isIdentifier(e)&&"arguments"===e.name)a=r.getArgumentsId;else{if(!t.isThisExpression(e))return;a=r.getThisId}return t.isReferenced(e,n)?a():void 0}},a={enter:function(e,n,l,a){return e._aliasFunction?(l.traverse(e,r,a),this.skip()):t.isFunction(e)?this.skip():void 0}},o=function(e,n,l){var r,o,u={getArgumentsId:function(){return r=r||l.generateUidIdentifier("arguments")},getThisId:function(){return o=o||l.generateUidIdentifier("this")}};l.traverse(n,a,u);var s,i=function(n,l){s=s||e(),s.unshift(t.variableDeclaration("var",[t.variableDeclarator(n,l)]))};r&&i(r,t.identifier("arguments")),o&&i(o,t.thisExpression())};l.Program=function(e,n,l){o(function(){return e.body},e,l)},l.FunctionDeclaration=l.FunctionExpression=function(e,n,l){o(function(){return t.ensureBlock(e),e.body.body},e,l)}},{"../../../types":119}],82:[function(e,n,l){"use strict";var t=e("lodash/collection/groupBy"),r=e("lodash/array/flatten"),a=e("lodash/object/values");l.BlockStatement=l.Program={exit:function(e){for(var n=!1,l=0;l<e.body.length;l++){var o=e.body[l];o&&null!=o._blockHoist&&(n=!0)}if(n){var u=t(e.body,function(e){var n=e._blockHoist;return null==n&&(n=1),n===!0&&(n=2),n});e.body=r(a(u).reverse())}}}},{"lodash/array/flatten":192,"lodash/collection/groupBy":199,"lodash/object/values":298}],83:[function(e,n,l){"use strict";l.SequenceExpression=function(e){return 1===e.expressions.length?e.expressions[0]:void 0}},{}],84:[function(e,n,l){"use strict";var t=e("../../helpers/use-strict"),r=e("../../../types");l.secondPass=!0,l.BlockStatement=l.Program=function(e,n,l,a){e._declarations&&t.wrap(e,function(){var n,l={};for(var t in e._declarations){var o=e._declarations[t];n=o.kind||"var";var u=r.variableDeclarator(o.id,o.init);o.init?e.body.unshift(a.attachAuxiliaryComment(r.variableDeclaration(n,[u]))):(l[n]=l[n]||[],l[n].push(u))}for(n in l)e.body.unshift(a.attachAuxiliaryComment(r.variableDeclaration(n,l[n])));e._declarations=null})}},{"../../../types":119,"../../helpers/use-strict":40}],85:[function(e,n,l){"use strict";var t=e("../../helpers/use-strict");l.Program=function(e,n,l,r){r.transformers["es6.modules"].canRun()&&(t.wrap(e,function(){e.body=r.dynamicImports.concat(e.body)}),r.moduleFormatter.transform&&r.moduleFormatter.transform(e))}},{"../../helpers/use-strict":40}],86:[function(e,n,l){"use strict";var t=e("../../../types"),r=function(e){var n=function(){return e.apply(this,arguments)};return n.toString=function(){return e.toString()},n}(function(e,n,l,t){var r=t.opts.resolveModuleSource;e.source&&r&&(e.source.value=r(e.source.value))});l.check=function(e){return t.isImportDeclaration(e)||t.isExportDeclaration(e)},l.ImportDeclaration=r,l.ExportDeclaration=function(e,n,l){if(r.apply(null,arguments),!e.isType){var a=e.declaration;if(e["default"]){if(t.isClassDeclaration(a))return e.declaration=a.id,[a,e];if(t.isClassExpression(a)){var o=l.generateUidIdentifier("default");return a=t.variableDeclaration("var",[t.variableDeclarator(o,a)]),e.declaration=o,[a,e]}if(t.isFunctionDeclaration(a))return e._blockHoist=2,e.declaration=a.id,[a,e]}else if(t.isFunctionDeclaration(a))return e.specifiers=[t.importSpecifier(a.id,a.id)],e.declaration=null,e._blockHoist=2,[a,e]}}},{"../../../types":119}],87:[function(e,n,l){"use strict";var t=e("../../../types");l.Program=function(e,n,l,r){r.transformers.useStrict.canRun()&&e.body.unshift(t.expressionStatement(t.literal("use strict")))}},{"../../../types":119}],88:[function(e,n,l){"use strict";var t=e("../../../types");l.optional=!0,l.ExpressionStatement=function(e){var n=e.expression;(t.isLiteral(n)||t.isIdentifier(e)&&t.hasBinding(e.name))&&this.remove()},l.IfStatement={exit:function(e){var n=e.consequent,l=e.alternate,r=e.test;return t.isLiteral(r)&&r.value?n:t.isFalsyExpression(r)?l?l:this.remove():(t.isBlockStatement(l)&&!l.body.length&&(l=e.alternate=null),void(t.blockStatement(n)&&!n.body.length&&t.isBlockStatement(l)&&l.body.length&&(e.consequent=e.alternate,e.alternate=null,e.test=t.unaryExpression("!",r,!0))))}}},{"../../../types":119}],89:[function(e,n,l){"use strict";var t=e("../../../types"),r=t.buildMatchMemberExpression("console",!0);l.optional=!0,l.CallExpression=function(e,n){r(e.callee)&&(t.isExpressionStatement(n)?this.parentPath.remove():this.remove())}},{"../../../types":119}],90:[function(e,n,l){"use strict";var t=e("../../../types");l.optional=!0,l.ExpressionStatement=function(e){t.isIdentifier(e.expression,{name:"debugger"})&&this.remove()}},{"../../../types":119}],91:[function(e,n,l){"use strict";l.optional=!0,l.Scopable=function(){}},{}],92:[function(e,n,l){"use strict";var t=e("../../helpers/remap-async-to-generator"),r=e("./bluebird-coroutines");l.optional=!0,l.manipulateOptions=r.manipulateOptions,l.Function=function(e,n,l,r){return e.async&&!e.generator?t(e,r.addHelper("async-to-generator"),l):void 0}},{"../../helpers/remap-async-to-generator":38,"./bluebird-coroutines":93}],93:[function(e,n,l){"use strict";var t=e("../../helpers/remap-async-to-generator"),r=e("../../../types");l.manipulateOptions=function(e){e.experimental=!0,e.blacklist.push("regenerator")},l.optional=!0,l.Function=function(e,n,l,a){return e.async&&!e.generator?t(e,r.memberExpression(a.addImport("bluebird",null,!0),r.identifier("coroutine")),l):void 0}},{"../../../types":119,"../../helpers/remap-async-to-generator":38}],94:[function(e,n,l){"use strict";var t=e("../../../types");l.TypeCastExpression=function(e){return e.expression},l.ImportDeclaration=function(e){e.isType&&this.remove()},l.ExportDeclaration=function(e){t.isTypeAlias(e.declaration)&&this.remove()}},{"../../../types":119}],95:[function(e,n,l){"use strict";var t=e("../../helpers/react"),r=e("../../../types");l.manipulateOptions=function(e){e.blacklist.push("react")},l.optional=!0,e("../../helpers/build-react-transformer")(l,{pre:function(e){e.callee=e.tagExpr},post:function(e){t.isCompatTag(e.tagName)&&(e.call=r.callExpression(r.memberExpression(r.memberExpression(r.identifier("React"),r.identifier("DOM")),e.tagExpr,r.isLiteral(e.tagExpr)),e.args))}})},{"../../../types":119,"../../helpers/build-react-transformer":33,"../../helpers/react":37}],96:[function(e,n,l){"use strict";var t=e("../../helpers/react"),r=e("../../../types"),a=/^\*\s*@jsx\s+([^\s]+)/;l.Program=function(e,n,l,t){for(var o="React.createElement",u=0;u<t.ast.comments.length;u++){var s=t.ast.comments[u],i=a.exec(s.value);if(i){if(o=i[1],"React.DOM"===o)throw t.errorWithNode(s,"The @jsx React.DOM pragma has been deprecated as of React 0.12");break}}t.set("jsxIdentifier",o.split(".").map(r.identifier).reduce(function(e,n){return r.memberExpression(e,n)}))},e("../../helpers/build-react-transformer")(l,{pre:function(e){var n=e.tagName,l=e.args;l.push(t.isCompatTag(n)?r.literal(n):e.tagExpr)},post:function(e,n){e.callee=n.get("jsxIdentifier")}})},{"../../../types":119,"../../helpers/build-react-transformer":33,"../../helpers/react":37}],97:[function(e,n,l){"use strict";var t=e("regenerator-babel"),r=e("../../../types");l.check=function(e){return r.isFunction(e)&&(e.async||e.generator)},l.Program={enter:function(e){t.transform(e),this.stop()}}},{"../../../types":119,"regenerator-babel":311}],98:[function(e,n,l){"use strict";var t=e("lodash/collection/includes"),r=e("../../../util"),a=e("core-js/library"),o=e("lodash/object/has"),u=e("../../../types"),s=u.buildMatchMemberExpression("Symbol.iterator"),i=function(e){return"_"!==e.name&&o(a,e.name)},c=["Symbol","Promise","Map","WeakMap","Set","WeakSet"],d={enter:function(e,n,l,d){var p;if(u.isMemberExpression(e)&&u.isReferenced(e,n)){var f=e.object;if(p=e.property,!u.isReferenced(f,e))return;if(!e.computed&&i(f)&&o(a[f.name],p.name)&&!l.getBindingIdentifier(f.name))return this.skip(),u.prependToMemberExpression(e,d.get("coreIdentifier"))}else{if(u.isReferencedIdentifier(e,n)&&!u.isMemberExpression(n)&&t(c,e.name)&&!l.getBindingIdentifier(e.name))return u.memberExpression(d.get("coreIdentifier"),e);if(u.isCallExpression(e)){var g=e.callee;return e.arguments.length?!1:u.isMemberExpression(g)&&g.computed?(p=g.property,s(p)?r.template("corejs-iterator",{CORE_ID:d.get("coreIdentifier"),VALUE:g.object}):!1):!1}if(u.isBinaryExpression(e)){if("in"!==e.operator)return;var h=e.left;if(!s(h))return;return r.template("corejs-is-iterator",{CORE_ID:d.get("coreIdentifier"),VALUE:e.right})}}}};l.optional=!0,l.manipulateOptions=function(e){e.whitelist.length&&e.whitelist.push("es6.modules")},l.Program=function(e,n,l,t){l.traverse(e,d,t)},l.pre=function(e){e.setDynamic("helpersNamespace",function(){return e.addImport("babel-runtime/helpers","babelHelpers")}),e.setDynamic("coreIdentifier",function(){return e.addImport("babel-runtime/core-js","core")}),e.setDynamic("regeneratorIdentifier",function(){return e.addImport("babel-runtime/regenerator","regeneratorRuntime")})},l.Identifier=function(e,n,l,t){return u.isReferencedIdentifier(e,n,{name:"regeneratorRuntime"})?t.get("regeneratorIdentifier"):void 0}},{"../../../types":119,"../../../util":121,"core-js/library":172,"lodash/collection/includes":200,"lodash/object/has":295}],99:[function(e,n,l){"use strict";var t=e("../../../messages"),r=e("../../../types");l.Program=function(e){var n=e.body[0];r.isExpressionStatement(n)&&r.isLiteral(n.expression,{value:"use strict"})&&e.body.shift()},l.FunctionDeclaration=l.FunctionExpression=function(){this.skip()},l.ThisExpression=function(){return r.identifier("undefined")},l.CallExpression=function(e,n,l,a){if(r.isIdentifier(e.callee,{name:"eval"}))throw a.errorWithNode(e,t.get("evalInStrictMode"))}},{"../../../messages":27,"../../../types":119}],100:[function(e,n,l){"use strict";var t=e("../../../messages"),r=e("../../helpers/build-conditional-assignment-operator-transformer"),a=e("../../../types");l.playground=!0,r(l,{is:function(e){var n=function(){return e.apply(this,arguments)};return n.toString=function(){return e.toString()},n}(function(e,n){var l=a.isAssignmentExpression(e)&&"||="===e.operator;if(l){var r=e.left;if(!a.isMemberExpression(r)&&!a.isIdentifier(r))throw n.errorWithNode(r,t.get("expectedMemberExpressionOrIdentifier"));return!0}}),build:function(e){return a.unaryExpression("!",e,!0)}})},{"../../../messages":27,"../../../types":119,"../../helpers/build-conditional-assignment-operator-transformer":32}],101:[function(e,n,l){"use strict";var t=e("../../helpers/build-conditional-assignment-operator-transformer"),r=e("../../../types");l.playground=!0,t(l,{is:function(e){var n=function(){return e.apply(this,arguments)};return n.toString=function(){return e.toString()},n}(function(e){var n=r.isAssignmentExpression(e)&&"?="===e.operator;return n&&r.assertMemberExpression(e.left),n}),build:function(e,n){return r.unaryExpression("!",r.callExpression(r.memberExpression(n.addHelper("has-own"),r.identifier("call")),[e.object,e.property]),!0)}})},{"../../../types":119,"../../helpers/build-conditional-assignment-operator-transformer":32}],102:[function(e,n,l){"use strict";var t=e("../../../types");l.playground=!0,l.BindMemberExpression=function(e,n,l){var r=e.object,a=e.property,o=l.generateTempBasedOnNode(e.object);o&&(r=o);var u=t.callExpression(t.memberExpression(t.memberExpression(r,a),t.identifier("bind")),[r].concat(e.arguments));return o?t.sequenceExpression([t.assignmentExpression("=",o,e.object),u]):u},l.BindFunctionExpression=function(e,n,l){var r=function(n){var r=l.generateUidIdentifier("val");return t.functionExpression(null,[r],t.blockStatement([t.returnStatement(t.callExpression(t.memberExpression(r,e.callee),n))]))},a=l.generateTemp("args");return t.sequenceExpression([t.assignmentExpression("=",a,t.arrayExpression(e.arguments)),r(e.arguments.map(function(e,n){return t.memberExpression(a,t.literal(n),!0) }))])}},{"../../../types":119}],103:[function(e,n,l){"use strict";var t=e("../../../types");l.playground=!0;var r={enter:function(e,n,l,r){return t.isFunction(e)?this.skip():void(t.isReturnStatement(e)&&e.argument&&(e.argument=t.memberExpression(t.callExpression(r.file.addHelper("define-property"),[t.thisExpression(),r.key,e.argument]),r.key,!0)))}};l.Property=l.MethodDefinition=function(e,n,l,a){if("memo"===e.kind){e.kind="get";var o=e.value;t.ensureBlock(o);var u=e.key;t.isIdentifier(u)&&!e.computed&&(u=t.literal(u.name));var s={key:u,file:a};return l.traverse(o,r,s),e}}},{"../../../types":119}],104:[function(e,n,l){"use strict";var t=e("../../../types");l.BlockStatement=function(e,n,l,r){if(!(t.isFunction(n)&&n.body===e||t.isExportDeclaration(n)))for(var a=0;a<e.body.length;a++){var o=e.body[a];if(t.isFunctionDeclaration(o)){var u=t.variableDeclaration("let",[t.variableDeclarator(o.id,t.toExpression(o))]);u._blockHoist=2,o.id=null,e.body[a]=u,r.checkNode(u)}}}},{"../../../types":119}],105:[function(e,n,l){"use strict";var t=e("../../helpers/name-method");l.FunctionExpression=t.bare},{"../../helpers/name-method":36}],106:[function(e,n,l){"use strict";var t=e("../../../types"),r=e("lodash/array/pull"),a=function(e){return t.isLiteral(t.toComputedKey(e,e.key),{value:"__proto__"})},o=function(e){var n=e.left;return t.isMemberExpression(n)&&t.isLiteral(t.toComputedKey(n,n.property),{value:"__proto__"})},u=function(e,n,l){return t.expressionStatement(t.callExpression(l.addHelper("defaults"),[n,e.right]))};l.optional=!0,l.secondPass=!0,l.AssignmentExpression=function(e,n,l,r){if(o(e)){var a=[],s=e.left.object,i=l.generateTempBasedOnNode(e.left.object);return a.push(t.expressionStatement(t.assignmentExpression("=",i,s))),a.push(u(e,i,r)),i&&a.push(i),t.toSequenceExpression(a)}},l.ExpressionStatement=function(e,n,l,r){var a=e.expression;if(t.isAssignmentExpression(a,{operator:"="}))return o(a)?u(a,a.left.object,r):void 0},l.ObjectExpression=function(e,n,l,o){for(var u,s=0;s<e.properties.length;s++){var i=e.properties[s];a(i)&&(u=i.value,r(e.properties,i))}if(u){var c=[t.objectExpression([]),u];return e.properties.length&&c.push(e),t.callExpression(o.addHelper("extends"),c)}}},{"../../../types":119,"lodash/array/pull":194}],107:[function(e,n,l){"use strict";var t=e("../../../types");l.optional=!0,l.UnaryExpression=function(e,n,l,r){if(this.skip(),"typeof"===e.operator){var a=t.callExpression(r.addHelper("typeof"),[e.argument]);if(t.isIdentifier(e.argument)){var o=t.literal("undefined");return t.conditionalExpression(t.binaryExpression("===",t.unaryExpression("typeof",e.argument),o),o,a)}return a}}},{"../../../types":119}],108:[function(e,n,l){"use strict";var t=e("../../../types");l.optional=!0,l.Identifier=function(e,n){return"undefined"===e.name&&t.isReferenced(e,n)?t.unaryExpression("void",t.literal(0),!0):void 0}},{"../../../types":119}],109:[function(e,n,l){"use strict";var t=e("../../../messages"),r=e("../../../types");l.check=r.isFor,l.ForInStatement=l.ForOfStatement=function(e,n,l,a){var o=e.left;if(r.isVariableDeclaration(o)){var u=o.declarations[0];if(u.init)throw a.errorWithNode(u,t.get("noAssignmentsInForHead"))}}},{"../../../messages":27,"../../../types":119}],110:[function(e,n,l){"use strict";var t=e("../../../messages"),r=e("../../../types"),a=function(e,n){if(r.isLiteral(e)){var l=e.value,a=l.toLowerCase();if("react"===a&&l!==a)throw n.errorWithNode(e,t.get("didYouMean","react"))}};l.CallExpression=function(e,n,l,t){r.isIdentifier(e.callee,{name:"require"})&&1===e.arguments.length&&a(e.arguments[0],t)},l.ImportDeclaration=l.ExportDeclaration=function(e,n,l,t){a(e.source,t)}},{"../../../messages":27,"../../../types":119}],111:[function(e,n,l){"use strict";var t=e("../../../messages");l.check=function(e){return"set"===e.kind},l.MethodDefinition=l.Property=function(e,n,l,r){if("set"===e.kind&&1!==e.value.params.length)throw r.errorWithNode(e.value,t.get("settersInvalidParamLength"))}},{"../../../messages":27}],112:[function(e,n,l){"use strict";var t=e("leven"),r=e("../../../messages"),a=e("../../../types");l.optional=!0,l.Identifier=function(e,n,l,o){if(a.isReferenced(e,n)&&!l.hasBinding(e.name)){var u,s=l.getAllBindings(),i=-1;for(var c in s){var d=t(e.name,c);0>=d||d>3||i>=d||(u=c,i=d)}var p;throw p=u?r.get("undeclaredVariableSuggestion",e.name,u):r.get("undeclaredVariable",e.name),o.errorWithNode(e,p,ReferenceError)}}},{"../../../messages":27,"../../../types":119,leven:188}],113:[function(e,n){"use strict";function l(e,n,l,t){this.shouldFlatten=!1,this.parentPath=t,this.scope=e,this.state=l,this.opts=n}n.exports=l;var t=e("./path"),r=e("lodash/array/flatten"),a=e("lodash/array/compact");l.prototype.flatten=function(){this.shouldFlatten=!0},l.prototype.visitNode=function(e,n,l){var r=new t(this,e,n,l);return r.visit()},l.prototype.visit=function(e,n){var l=e[n];if(l){if(!Array.isArray(l))return this.visitNode(e,e,n);if(0!==l.length){for(var t=0;t<l.length;t++)if(l[t]&&this.visitNode(e,l,t))return!0;this.shouldFlatten&&(e[n]=r(e[n]),"body"===n&&(e[n]=a(e[n])))}}}},{"./path":115,"lodash/array/compact":191,"lodash/array/flatten":192}],114:[function(e,n){"use strict";function l(e,n,t,r){if(e){if(!n.noScope&&!t&&"Program"!==e.type&&"File"!==e.type)throw new Error("Must pass a scope unless traversing a Program/File got a "+e.type+" node");if(n||(n={}),n.enter||(n.enter=function(){}),n.exit||(n.exit=function(){}),Array.isArray(e))for(var a=0;a<e.length;a++)l.node(e[a],n,t,r);else l.node(e,n,t,r)}}function t(e){e._declarations=null,e.extendedRange=null,e._scopeInfo=null,e.tokens=null,e.range=null,e.start=null,e.end=null,e.loc=null,e.raw=null,Array.isArray(e.trailingComments)&&r(e.trailingComments),Array.isArray(e.leadingComments)&&r(e.leadingComments)}function r(e){for(var n=0;n<e.length;n++)t(e[n])}function a(e,n,l,t){e.type===t.type&&(t.has=!0,this.skip())}n.exports=l;var o=e("./context"),u=e("lodash/collection/includes"),s=e("../types");l.node=function(e,n,l,t,r){var a=s.VISITOR_KEYS[e.type];if(a)for(var u=new o(l,n,t,r),i=0;i<a.length;i++)if(u.visit(e,a[i]))return};var i={noScope:!0,enter:t};l.removeProperties=function(e){return t(e),l(e,i),e},l.explode=function(e){for(var n in e){var l=e[n],t=s.FLIPPED_ALIAS_KEYS[n];if(t)for(var r=0;r<t.length;r++)e[t[r]]=l}return e},l.hasType=function(e,n,t,r){if(u(r,e.type))return!1;if(e.type===t)return!0;var o={has:!1,type:t};return l(e,{blacklist:r,enter:a},n,o),o.has}},{"../types":119,"./context":113,"lodash/collection/includes":200}],115:[function(e,n){"use strict";function l(e,n,l,t){this.shouldRemove=!1,this.shouldSkip=!1,this.shouldStop=!1,this.parentPath=e.parentPath,this.context=e,this.state=this.context.state,this.opts=this.context.opts,this.container=l,this.key=t,this.parent=n,this.state=e.state,this.setScope()}n.exports=l;var t=e("./index"),r=e("lodash/collection/includes"),a=e("./scope"),o=e("../types");l.getScope=function(e,n,l){var t=l;return o.isScope(e,n)&&(t=new a(e,n,l)),t},l.prototype.setScope=function(){this.scope=l.getScope(this.node,this.parent,this.context.scope)},l.prototype.remove=function(){this.shouldRemove=!0,this.shouldSkip=!0},l.prototype.skip=function(){this.shouldSkip=!0},l.prototype.stop=function(){this.shouldStop=!0,this.shouldSkip=!0},l.prototype.flatten=function(){this.context.flatten()},Object.defineProperty(l.prototype,"node",{get:function(){return this.container[this.key]},set:function(e){var n=Array.isArray(e),l=e;n&&(l=e[0]),l&&o.inheritsComments(l,this.node),this.container[this.key]=e,this.setScope();var t=this.scope&&this.scope.file;if(t)if(n)for(var a=0;a<e.length;a++)t.checkNode(e[a],this.scope);else t.checkNode(e,this.scope);n&&(r(o.STATEMENT_OR_BLOCK_KEYS,this.key)&&!o.isBlockStatement(this.container)&&o.ensureBlock(this.container,this.key),this.flatten())}}),l.prototype.call=function(e){var n=this.node;if(n){var l=this.opts,t=l[e]||l;l[n.type]&&(t=l[n.type][e]||t);var r=t.call(this,n,this.parent,this.scope,this.state);r&&(this.node=r),this.shouldRemove&&(this.container[this.key]=null,this.flatten())}},l.prototype.visit=function(){var e=this.opts,n=this.node;if(!(e.blacklist&&e.blacklist.indexOf(n.type)>-1)){if(this.call("enter"),this.shouldSkip)return this.shouldStop;if(n=this.node,Array.isArray(n))for(var l=0;l<n.length;l++)t.node(n[l],e,this.scope,this.state,this);else t.node(n,e,this.scope,this.state,this),this.call("exit");return this.shouldStop}},l.prototype.isReferencedIdentifier=function(){return o.isReferencedIdentifier(this.node)}},{"../types":119,"./index":114,"./scope":116,"lodash/collection/includes":200}],116:[function(e,n){"use strict";function l(e,n,l,t){this.parent=l,this.file=l?l.file:t,this.parentBlock=n,this.block=e,this.crawl()}n.exports=l;var t=e("lodash/collection/includes"),r=e("./index"),a=e("lodash/object/defaults"),o=e("../messages"),u=e("globals"),s=e("lodash/array/flatten"),i=e("lodash/object/extend"),c=e("../helpers/object"),d=e("lodash/collection/each"),p=e("../types");l.globals=s([u.builtin,u.browser,u.node].map(Object.keys)),l.prototype.traverse=function(e,n,l){r(e,n,this,l)},l.prototype.generateTemp=function(e){var n=this.generateUidIdentifier(e||"temp");return this.push({key:n.name,id:n}),n},l.prototype.generateUidIdentifier=function(e){var n=p.identifier(this.generateUid(e));return this.getFunctionParent().registerBinding("uid",n),n},l.prototype.generateUid=function(e){e=p.toIdentifier(e).replace(/^_+/,"");var n,l=0;do n=this._generateUid(e,l),l++;while(this.hasBinding(n)||this.hasGlobal(n));return n},l.prototype._generateUid=function(e,n){var l=e;return n>1&&(l+=n),"_"+l},l.prototype.generateUidBasedOnNode=function(e){var n=e;p.isAssignmentExpression(e)?n=e.left:p.isVariableDeclarator(e)?n=e.id:p.isProperty(n)&&(n=n.key);var l=[],t=function(e){var n=function(){return e.apply(this,arguments)};return n.toString=function(){return e.toString()},n}(function(e){p.isMemberExpression(e)?(t(e.object),t(e.property)):p.isIdentifier(e)?l.push(e.name):p.isLiteral(e)?l.push(e.value):p.isCallExpression(e)&&t(e.callee)});t(n);var r=l.join("$");return r=r.replace(/^_/,"")||"ref",this.generateUidIdentifier(r)},l.prototype.generateTempBasedOnNode=function(e){if(p.isIdentifier(e)&&this.hasBinding(e.name))return null;var n=this.generateUidBasedOnNode(e);return this.push({key:n.name,id:n}),n},l.prototype.checkBlockScopedCollisions=function(e,n,l){var t=this.getOwnBindingInfo(n);if(t&&"param"!==e&&!("hoisted"===e&&"let"===t.kind||"let"!==t.kind&&"const"!==t.kind&&"module"!==t.kind))throw this.file.errorWithNode(l,o.get("scopeDuplicateDeclaration",n),TypeError)},l.prototype.rename=function(e,n){n=n||this.generateUidIdentifier(e).name;var l=this.getBindingInfo(e);if(l){var t=l.identifier,r=l.scope;r.traverse(r.block,{enter:function(l,r,a){if(p.isReferencedIdentifier(l,r)&&l.name===e)l.name=n;else if(p.isDeclaration(l)){var o=p.getBindingIdentifiers(l);for(var u in o)u===e&&(o[u].name=n)}else p.isScope(l,r)&&(a.bindingIdentifierEquals(e,t)||this.skip())}}),this.clearOwnBinding(e),r.bindings[n]=l,t.name=n}},l.prototype.inferType=function(e){var n;if(p.isVariableDeclarator(e)&&(n=e.init),p.isArrayExpression(n))return p.genericTypeAnnotation(p.identifier("Array"));if(!p.isObjectExpression(n)&&!p.isLiteral(n)){if(p.isCallExpression(n)&&p.isIdentifier(n.callee)){var l=this.getBindingInfo(n.callee.name);if(l){var t=l.node;return!l.reassigned&&p.isFunction(t)&&e.returnType}}p.isIdentifier(n)}},l.prototype.isTypeGeneric=function(e,n){var l=this.getBindingInfo(e);if(!l)return!1;var t=l.typeAnnotation;return p.isGenericTypeAnnotation(t)&&p.isIdentifier(t.id,{name:n})},l.prototype.assignTypeGeneric=function(e,n){this.assignType(e,p.genericTypeAnnotation(p.identifier(n)))},l.prototype.assignType=function(e,n){var l=this.getBindingInfo(e);l&&(l.identifier.typeAnnotation=l.typeAnnotation=n)},l.prototype.getTypeAnnotation=function(e,n,l){var t,r={annotation:null,inferred:!1};return n.typeAnnotation&&(t=n.typeAnnotation),t||(r.inferred=!0,t=this.inferType(l)),t&&(p.isTypeAnnotation(t)&&(t=t.typeAnnotation),r.annotation=t),r},l.prototype.toArray=function(e,n){var l=this.file;if(p.isIdentifier(e)&&this.isTypeGeneric(e.name,"Array"))return e;if(p.isArrayExpression(e))return e;if(p.isIdentifier(e,{name:"arguments"}))return p.callExpression(p.memberExpression(l.addHelper("slice"),p.identifier("call")),[e]);var t="to-array",r=[e];return n===!0?t="to-consumable-array":n&&(r.push(p.literal(n)),t="sliced-to-array"),p.callExpression(l.addHelper(t),r)},l.prototype.clearOwnBinding=function(e){delete this.bindings[e]},l.prototype.registerDeclaration=function(e){if(p.isFunctionDeclaration(e))this.registerBinding("hoisted",e);else if(p.isVariableDeclaration(e))for(var n=0;n<e.declarations.length;n++)this.registerBinding(e.kind,e.declarations[n]);else p.isClassDeclaration(e)?this.registerBinding("let",e):p.isImportDeclaration(e)||p.isExportDeclaration(e)?this.registerBinding("module",e):this.registerBinding("unknown",e)},l.prototype.registerBindingReassignment=function(e){var n=p.getBindingIdentifiers(e);for(var l in n){var t=this.getBindingInfo(l);t&&(t.reassigned=!0,t.typeAnnotationInferred&&(t.typeAnnotation=null))}},l.prototype.registerBinding=function(e,n){if(!e)throw new ReferenceError("no `kind`");var l=p.getBindingIdentifiers(n);for(var t in l){var r=l[t];this.checkBlockScopedCollisions(e,t,r);var a=this.getTypeAnnotation(t,r,n);this.bindings[t]={typeAnnotationInferred:a.inferred,typeAnnotation:a.annotation,reassigned:!1,identifier:r,scope:this,node:n,kind:e}}},l.prototype.registerVariableDeclaration=function(e){for(var n=e.declarations,l=0;l<n.length;l++)this.registerBinding(n[l],e.kind)};var f={enter:function(e,n,l,t){return p.isFor(e)&&d(p.FOR_INIT_KEYS,function(n){var l=e[n];p.isVar(l)&&t.scope.registerBinding("var",l)}),p.isFunction(e)?this.skip():void(t.blockId&&e===t.blockId||p.isBlockScoped(e)||p.isExportDeclaration(e)&&p.isDeclaration(e.declaration)||p.isDeclaration(e)&&t.scope.registerDeclaration(e))}};l.prototype.addGlobal=function(e){this.globals[e.name]=e},l.prototype.hasGlobal=function(e){var n=this;do if(n.globals[e])return!0;while(n=n.parent);return!1};var g={enter:function(e,n,l,t){p.isReferencedIdentifier(e,n)&&!l.hasBinding(e.name)?t.addGlobal(e):p.isLabeledStatement(e)?t.addGlobal(e):(p.isAssignmentExpression(e)||p.isUpdateExpression(e)||p.isUnaryExpression(e)&&"delete"===e.operator)&&l.registerBindingReassignment(e)}},h={enter:function(e,n,l,t){p.isFunctionDeclaration(e)||p.isBlockScoped(e)?t.registerDeclaration(e):p.isScope(e,n)&&this.skip()}};l.prototype.crawl=function(){var e,n=this.block,l=n._scopeInfo;if(l)return void i(this,l);if(l=n._scopeInfo={bindings:c(),globals:c()},i(this,l),p.isLoop(n)){for(e=0;e<p.FOR_INIT_KEYS.length;e++){var t=n[p.FOR_INIT_KEYS[e]];p.isBlockScoped(t)&&this.registerBinding("let",t)}p.isBlockStatement(n.body)&&(n=n.body)}if(p.isFunctionExpression(n)&&n.id&&(p.isProperty(this.parentBlock,{method:!0})||this.registerBinding("var",n.id)),p.isFunction(n)){for(e=0;e<n.params.length;e++)this.registerBinding("param",n.params[e]);this.traverse(n.body,h,this)}(p.isBlockStatement(n)||p.isProgram(n))&&this.traverse(n,h,this),p.isCatchClause(n)&&this.registerBinding("let",n.param),p.isComprehensionExpression(n)&&this.registerBinding("let",n),(p.isProgram(n)||p.isFunction(n))&&this.traverse(n,f,{blockId:n.id,scope:this}),p.isProgram(n)&&this.traverse(n,g,this)},l.prototype.push=function(e){var n=this.block;if((p.isLoop(n)||p.isCatchClause(n)||p.isFunction(n))&&(p.ensureBlock(n),n=n.body),!p.isBlockStatement(n)&&!p.isProgram(n))throw new TypeError("cannot add a declaration here in node type "+n.type);n._declarations=n._declarations||{},n._declarations[e.key]={kind:e.kind,id:e.id,init:e.init}},l.prototype.getFunctionParent=function(){for(var e=this;e.parent&&!p.isFunction(e.block);)e=e.parent;return e},l.prototype.getAllBindings=function(){var e=c(),n=this;do a(e,n.bindings),n=n.parent;while(n);return e},l.prototype.getAllBindingsOfKind=function(e){var n=c(),l=this;do{for(var t in l.bindings){var r=l.bindings[t];r.kind===e&&(n[t]=r)}l=l.parent}while(l);return n},l.prototype.bindingIdentifierEquals=function(e,n){return this.getBindingIdentifier(e)===n},l.prototype.getBindingInfo=function(e){var n=this;do{var l=n.getOwnBindingInfo(e);if(l)return l}while(n=n.parent)},l.prototype.getOwnBindingInfo=function(e){return this.bindings[e]},l.prototype.getBindingIdentifier=function(e){var n=this.getBindingInfo(e);return n&&n.identifier},l.prototype.getOwnBindingIdentifier=function(e){var n=this.bindings[e];return n&&n.identifier},l.prototype.hasOwnBinding=function(e){return!!this.getOwnBindingInfo(e)},l.prototype.hasBinding=function(e){return e?this.hasOwnBinding(e)?!0:this.parentHasBinding(e)?!0:t(l.globals,e)?!0:!1:!1},l.prototype.parentHasBinding=function(e){return this.parent&&this.parent.hasBinding(e)}},{"../helpers/object":24,"../messages":27,"../types":119,"./index":114,globals:183,"lodash/array/flatten":192,"lodash/collection/each":197,"lodash/collection/includes":200,"lodash/object/defaults":293,"lodash/object/extend":294}],117:[function(e,n){n.exports={ExpressionStatement:["Statement"],BreakStatement:["Statement"],ContinueStatement:["Statement"],DebuggerStatement:["Statement"],DoWhileStatement:["Statement","Loop","While","Scopable"],IfStatement:["Statement"],ReturnStatement:["Statement"],SwitchStatement:["Statement"],ThrowStatement:["Statement"],TryStatement:["Statement"],WhileStatement:["Statement","Loop","While","Scopable"],WithStatement:["Statement"],EmptyStatement:["Statement"],LabeledStatement:["Statement"],VariableDeclaration:["Statement","Declaration"],ExportDeclaration:["Statement","Declaration"],ImportDeclaration:["Statement","Declaration"],PrivateDeclaration:["Statement","Declaration"],ArrowFunctionExpression:["Scopable","Function","Expression"],FunctionDeclaration:["Scopable","Function","Statement","Declaration"],FunctionExpression:["Scopable","Function","Expression"],ImportSpecifier:["ModuleSpecifier"],ExportSpecifier:["ModuleSpecifier"],BlockStatement:["Statement","Scopable"],Program:["Scopable"],CatchClause:["Scopable"],LogicalExpression:["Binary","Expression"],BinaryExpression:["Binary","Expression"],UnaryExpression:["UnaryLike","Expression"],SpreadProperty:["UnaryLike"],SpreadElement:["UnaryLike"],ClassDeclaration:["Statement","Declaration","Class"],ClassExpression:["Class","Expression"],ForOfStatement:["Scopable","Statement","For","Loop"],ForInStatement:["Scopable","Statement","For","Loop"],ForStatement:["Scopable","Statement","For","Loop"],ObjectPattern:["Pattern"],ArrayPattern:["Pattern"],AssignmentPattern:["Pattern"],Property:["UserWhitespacable"],ArrayExpression:["Expression"],AssignmentExpression:["Expression"],AwaitExpression:["Expression"],BindFunctionExpression:["Expression"],BindMemberExpression:["Expression"],CallExpression:["Expression"],ComprehensionExpression:["Expression","Scopable"],ConditionalExpression:["Expression"],Identifier:["Expression"],Literal:["Expression"],MemberExpression:["Expression"],NewExpression:["Expression"],ObjectExpression:["Expression"],SequenceExpression:["Expression"],TaggedTemplateExpression:["Expression"],ThisExpression:["Expression"],UpdateExpression:["Expression"],VirtualPropertyExpression:["Expression"],JSXEmptyExpression:["Expression"],JSXMemberExpression:["Expression"],YieldExpression:["Expression"],JSXAttribute:["JSX"],JSXClosingElement:["JSX"],JSXElement:["JSX","Expression"],JSXEmptyExpression:["JSX"],JSXExpressionContainer:["JSX"],JSXIdentifier:["JSX"],JSXMemberExpression:["JSX"],JSXNamespacedName:["JSX"],JSXOpeningElement:["JSX"],JSXSpreadAttribute:["JSX"]}},{}],118:[function(e,n){n.exports={ArrayExpression:{elements:null},ArrowFunctionExpression:{params:null,body:null},AssignmentExpression:{operator:null,left:null,right:null},BinaryExpression:{operator:null,left:null,right:null},BlockStatement:{body:null},CallExpression:{callee:null,arguments:null},ConditionalExpression:{test:null,consequent:null,alternate:null},ExpressionStatement:{expression:null},File:{program:null,comments:null,tokens:null},FunctionExpression:{id:null,params:null,body:null,generator:!1},FunctionDeclaration:{id:null,params:null,body:null,generator:!1},GenericTypeAnnotation:{id:null,typeParameters:null},Identifier:{name:null},IfStatement:{test:null,consequent:null,alternate:null},ImportDeclaration:{specifiers:null,source:null},ImportSpecifier:{id:null,name:null},Literal:{value:null},LogicalExpression:{operator:null,left:null,right:null},MemberExpression:{object:null,property:null,computed:!1},MethodDefinition:{key:null,value:null,computed:!1,"static":!1,kind:null},NewExpression:{callee:null,arguments:null},ObjectExpression:{properties:null},Program:{body:null},Property:{kind:null,key:null,value:null,computed:!1},ReturnStatement:{argument:null},SequenceExpression:{expressions:null},ThrowExpression:{argument:null},UnaryExpression:{operator:null,argument:null,prefix:null},VariableDeclaration:{kind:null,declarations:null},VariableDeclarator:{id:null,init:null},WithStatement:{object:null,body:null},YieldExpression:{argument:null,delegate:null}}},{}],119:[function(e,n,l){"use strict";function t(e,n){var l=d["is"+e]=function(l,t){return d.is(e,l,t,n)};d["assert"+e]=function(n,t){if(t=t||{},!l(n,t))throw new Error("Expected type "+JSON.stringify(e)+" with option "+JSON.stringify(t))}}var r=e("../helpers/to-fast-properties"),a=e("lodash/lang/isString"),o=e("lodash/array/compact"),u=e("esutils"),s=e("../helpers/object"),i=e("lodash/collection/each"),c=e("lodash/array/uniq"),d=l;d.STATEMENT_OR_BLOCK_KEYS=["consequent","body"],d.NATIVE_TYPE_NAMES=["Array","Object","Number","Boolean","Date","Array","String"],d.FOR_INIT_KEYS=["left","init"],d.VISITOR_KEYS=e("./visitor-keys"),d.ALIAS_KEYS=e("./alias-keys"),d.FLIPPED_ALIAS_KEYS={},i(d.VISITOR_KEYS,function(e,n){t(n,!0)}),i(d.ALIAS_KEYS,function(e,n){i(e,function(e){var l=d.FLIPPED_ALIAS_KEYS[e]=d.FLIPPED_ALIAS_KEYS[e]||[];l.push(n)})}),i(d.FLIPPED_ALIAS_KEYS,function(e,n){d[n.toUpperCase()+"_TYPES"]=e,t(n,!1)}),d.is=function(e,n,l,t){if(!n)return!1;var r=e===n.type;if(!r&&!t){var a=d.FLIPPED_ALIAS_KEYS[e];"undefined"!=typeof a&&(r=a.indexOf(n.type)>-1)}return r?"undefined"!=typeof l?d.shallowEqual(n,l):!0:!1},d.BUILDER_KEYS=e("./builder-keys"),i(d.VISITOR_KEYS,function(e,n){if(!d.BUILDER_KEYS[n]){var l={};i(e,function(e){l[e]=null}),d.BUILDER_KEYS[n]=l}}),i(d.BUILDER_KEYS,function(e,n){d[n[0].toLowerCase()+n.slice(1)]=function(){var l={};l.start=null,l.type=n;var t=0;for(var r in e){var a=arguments[t++];void 0===a&&(a=e[r]),l[r]=a}return l}}),d.toComputedKey=function(e,n){return e.computed||d.isIdentifier(n)&&(n=d.literal(n.name)),n},d.isFalsyExpression=function(e){return d.isLiteral(e)?!e.value:d.isIdentifier(e)?"undefined"===e.name:!1},d.toSequenceExpression=function(e,n){var l=[];return i(e,function(e){d.isExpression(e)&&l.push(e),d.isExpressionStatement(e)?l.push(e.expression):d.isVariableDeclaration(e)&&i(e.declarations,function(t){n.push({kind:e.kind,key:t.id.name,id:t.id}),l.push(d.assignmentExpression("=",t.id,t.init))})}),1===l.length?l[0]:d.sequenceExpression(l)},d.shallowEqual=function(e,n){for(var l=Object.keys(n),t=0;t<l.length;t++){var r=l[t];if(e[r]!==n[r])return!1}return!0},d.appendToMemberExpression=function(e,n,l){return e.object=d.memberExpression(e.object,e.property,e.computed),e.property=n,e.computed=!!l,e},d.prependToMemberExpression=function(e,n){return e.object=d.memberExpression(n,e.object),e},d.isReferenced=function(e,n){if(d.isMemberExpression(n))return n.property===e&&n.computed?!0:n.object===e?!0:!1;if(d.isProperty(n)&&n.key===e)return n.computed;if(d.isVariableDeclarator(n))return n.id!==e;if(d.isFunction(n)){for(var l=0;l<n.params.length;l++){var t=n.params[l];if(t===e)return!1}return n.id!==e}return d.isClass(n)?n.id!==e:d.isMethodDefinition(n)?n.key===e&&n.computed:d.isLabeledStatement(n)?!1:d.isCatchClause(n)?n.param!==e:d.isRestElement(n)?!1:d.isAssignmentPattern(n)?n.right===e:d.isPattern(n)?!1:d.isImportSpecifier(n)?!1:d.isImportBatchSpecifier(n)?!1:d.isPrivateDeclaration(n)?!1:!0},d.isReferencedIdentifier=function(e,n,l){return d.isIdentifier(e,l)&&d.isReferenced(e,n)},d.isValidIdentifier=function(e){return a(e)&&u.keyword.isIdentifierName(e)&&!u.keyword.isReservedWordES6(e,!0)},d.toIdentifier=function(e){return d.isIdentifier(e)?e.name:(e+="",e=e.replace(/[^a-zA-Z0-9$_]/g,"-"),e=e.replace(/^[-0-9]+/,""),e=e.replace(/[-\s]+(.)?/g,function(e,n){return n?n.toUpperCase():""}),d.isValidIdentifier(e)||(e="_"+e),e||"_")},d.ensureBlock=function(e,n){return n=n||"body",e[n]=d.toBlock(e[n],e)},d.buildMatchMemberExpression=function(e,n){var l=e.split(".");return function(e){if(!d.isMemberExpression(e))return!1;for(var t=[e],r=0;t.length;){var a=t.shift();if(n&&r===l.length)return!0;if(d.isIdentifier(a)){if(l[r]!==a.name)return!1}else{if(!d.isLiteral(a)){if(d.isMemberExpression(a)){if(a.computed&&!d.isLiteral(a.property))return!1;t.push(a.object),t.push(a.property);continue}return!1}if(l[r]!==a.value)return!1}if(++r>l.length)return!1}return!0}},d.toStatement=function(e,n){if(d.isStatement(e))return e;var l,t=!1;if(d.isClass(e))t=!0,l="ClassDeclaration";else if(d.isFunction(e))t=!0,l="FunctionDeclaration";else if(d.isAssignmentExpression(e))return d.expressionStatement(e);if(t&&!e.id&&(l=!1),!l){if(n)return!1;throw new Error("cannot turn "+e.type+" to a statement")}return e.type=l,e},l.toExpression=function(e){if(d.isExpressionStatement(e)&&(e=e.expression),d.isClass(e)?e.type="ClassExpression":d.isFunction(e)&&(e.type="FunctionExpression"),d.isExpression(e))return e;throw new Error("cannot turn "+e.type+" to an expression")},d.toBlock=function(e,n){return d.isBlockStatement(e)?e:(d.isEmptyStatement(e)&&(e=[]),Array.isArray(e)||(d.isStatement(e)||(e=d.isFunction(n)?d.returnStatement(e):d.expressionStatement(e)),e=[e]),d.blockStatement(e))},d.getBindingIdentifiers=function(e){for(var n=[].concat(e),l=s();n.length;){var t=n.shift();if(t){var r=d.getBindingIdentifiers.keys[t.type];if(d.isIdentifier(t))l[t.name]=t;else if(d.isImportSpecifier(t))n.push(t.name||t.id);else if(d.isExportDeclaration(t))d.isDeclaration(e.declaration)&&n.push(e.declaration);else if(r)for(var a=0;a<r.length;a++){var o=r[a];n=n.concat(t[o]||[])}}}return l},d.getBindingIdentifiers.keys={UnaryExpression:["argument"],AssignmentExpression:["left"],ImportBatchSpecifier:["name"],VariableDeclarator:["id"],FunctionDeclaration:["id"],ClassDeclaration:["id"],SpreadElement:["argument"],RestElement:["argument"],UpdateExpression:["argument"],SpreadProperty:["argument"],Property:["value"],ComprehensionBlock:["left"],AssignmentPattern:["left"],PrivateDeclaration:["declarations"],ComprehensionExpression:["blocks"],ImportDeclaration:["specifiers"],VariableDeclaration:["declarations"],ArrayPattern:["elements"],ObjectPattern:["properties"]},d.isLet=function(e){return d.isVariableDeclaration(e)&&("var"!==e.kind||e._let)},d.isBlockScoped=function(e){return d.isFunctionDeclaration(e)||d.isClassDeclaration(e)||d.isLet(e)},d.isVar=function(e){return d.isVariableDeclaration(e,{kind:"var"})&&!e._let},d.COMMENT_KEYS=["leadingComments","trailingComments"],d.removeComments=function(e){return i(d.COMMENT_KEYS,function(n){delete e[n]}),e},d.inheritsComments=function(e,n){return i(d.COMMENT_KEYS,function(l){e[l]=c(o([].concat(e[l],n[l])))}),e},d.inherits=function(e,n){return e._declarations=n._declarations,e._scopeInfo=n._scopeInfo,e.range=n.range,e.start=n.start,e.loc=n.loc,e.end=n.end,d.inheritsComments(e,n),e},d.getLastStatements=function(e){var n=[],l=function(e){n=n.concat(d.getLastStatements(e))};return d.isIfStatement(e)?(l(e.consequent),l(e.alternate)):d.isFor(e)||d.isWhile(e)?l(e.body):d.isProgram(e)||d.isBlockStatement(e)?l(e.body[e.body.length-1]):e&&n.push(e),n},d.getSpecifierName=function(e){return e.name||e.id},d.getSpecifierId=function(e){return e["default"]?d.identifier("default"):e.id},d.isSpecifierDefault=function(e){return e["default"]||d.isIdentifier(e.id)&&"default"===e.id.name},d.isScope=function(e,n){if(d.isBlockStatement(e)){if(d.isLoop(n.block,{body:e}))return!1;if(d.isFunction(n.block,{body:e}))return!1}return d.isScopable(e)},r(d),r(d.VISITOR_KEYS)},{"../helpers/object":24,"../helpers/to-fast-properties":26,"./alias-keys":117,"./builder-keys":118,"./visitor-keys":120,esutils:181,"lodash/array/compact":191,"lodash/array/uniq":195,"lodash/collection/each":197,"lodash/lang/isString":290}],120:[function(e,n){n.exports={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","defaults","rest","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BindFunctionExpression:["callee","arguments"],BindMemberExpression:["object","property","arguments"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","body","superClass"],ClassExpression:["id","body","superClass"],ComprehensionBlock:["left","right","body"],ComprehensionExpression:["filter","blocks","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportBatchSpecifier:[],ExportDeclaration:["declaration","specifiers","source"],ExportSpecifier:["id","name"],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","defaults","rest","body"],FunctionExpression:["id","params","defaults","rest","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportBatchSpecifier:["id"],ImportDeclaration:["specifiers","source"],ImportSpecifier:["id","name"],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MethodDefinition:["key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateDeclaration:["declarations"],Program:["body"],Property:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],SpreadProperty:["argument"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handlers","handler","guardedHandlers","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],VirtualPropertyExpression:["object","property"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"],AnyTypeAnnotation:[],ArrayTypeAnnotation:[],BooleanTypeAnnotation:[],ClassProperty:["key","value"],DeclareClass:[],DeclareFunction:[],DeclareModule:[],DeclareVariable:[],FunctionTypeAnnotation:[],FunctionTypeParam:[],GenericTypeAnnotation:[],InterfaceExtends:[],InterfaceDeclaration:[],IntersectionTypeAnnotation:[],NullableTypeAnnotation:[],NumberTypeAnnotation:[],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],TupleTypeAnnotation:[],TypeofTypeAnnotation:[],TypeAlias:[],TypeAnnotation:[],TypeCastExpression:["expression"],TypeParameterDeclaration:[],TypeParameterInstantiation:[],ObjectTypeAnnotation:[],ObjectTypeCallProperty:[],ObjectTypeIndexer:[],ObjectTypeProperty:[],QualifiedTypeIdentifier:[],UnionTypeAnnotation:[],VoidTypeAnnotation:[],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","closingElement","children"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXSpreadAttribute:["argument"]}},{}],121:[function(e,n,l){(function(n){"use strict"; e("./patch");var t=e("lodash/lang/cloneDeep"),r=e("lodash/lang/isBoolean"),a=e("lodash/collection/contains"),o=e("./traversal"),u=e("lodash/lang/isString"),s=e("lodash/lang/isRegExp"),i=e("lodash/lang/isEmpty"),c=e("./helpers/parse"),d=e("debug/node"),p=e("path"),f=e("util"),g=e("lodash/collection/each"),h=e("lodash/object/has"),m=e("fs"),y=e("./types");l.inherits=f.inherits,l.debug=d("babel"),l.canCompile=function(e,n){var t=n||l.canCompile.EXTENSIONS,r=p.extname(e);return a(t,r)},l.canCompile.EXTENSIONS=[".js",".jsx",".es6",".es"],l.resolve=function(n){try{return e.resolve(n)}catch(l){return null}},l.list=function(e){return e?e.split(","):[]},l.regexify=function(e){if(!e)return new RegExp(/.^/);if(Array.isArray(e)&&(e=e.join("|")),u(e))return new RegExp(e);if(s(e))return e;throw new TypeError("illegal type for regexify")},l.arrayify=function(e){if(!e)return[];if(r(e))return[e];if(u(e))return l.list(e);if(Array.isArray(e))return e;throw new TypeError("illegal type for arrayify")},l.booleanify=function(e){return"true"===e?!0:"false"===e?!1:e};var x={enter:function(e,n,l,t){return y.isExpressionStatement(e)&&(e=e.expression),y.isIdentifier(e)&&h(t,e.name)?(this.skip(),t[e.name]):void 0}};l.template=function(e,n,r){var a=l.templates[e];if(!a)throw new ReferenceError("unknown template "+e);if(n===!0&&(r=!0,n=null),a=t(a),i(n)||o(a,x,null,n),a.body.length>1)return a.body;var u=a.body[0];return!r&&y.isExpressionStatement(u)?u.expression:u},l.parseTemplate=function(e,n){var l=c({filename:e},n).program;return o.removeProperties(l)};var b=function(){var e={},t=n+"/transformation/templates";if(!m.existsSync(t))throw new Error("no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues");return g(m.readdirSync(t),function(n){if("."!==n[0]){var r=p.basename(n,p.extname(n)),a=t+"/"+n,o=m.readFileSync(a,"utf8");e[r]=l.parseTemplate(a,o)}}),e};try{l.templates=e("../../templates.json")}catch(_){if("MODULE_NOT_FOUND"!==_.code)throw _;l.templates=b()}}).call(this,"/lib/babel")},{"../../templates.json":338,"./helpers/parse":25,"./patch":28,"./traversal":114,"./types":119,"debug/node":174,fs:137,"lodash/collection/contains":196,"lodash/collection/each":197,"lodash/lang/cloneDeep":280,"lodash/lang/isBoolean":283,"lodash/lang/isEmpty":284,"lodash/lang/isRegExp":289,"lodash/lang/isString":290,"lodash/object/has":295,path:146,util:163}],122:[function(n,l,t){!function(n,r){return"object"==typeof t&&"object"==typeof l?r(t):"function"==typeof e&&e.amd?e(["exports"],r):void r(n.acorn||(n.acorn={}))}(this,function(e){"use strict";function n(e){xt={};for(var n in It)xt[n]=e&&cn(e,n)?e[n]:It[n];if(vt=xt.sourceFile||null,kt(xt.onToken)){var l=xt.onToken;xt.onToken=function(e){l.push(e)}}if(kt(xt.onComment)){var t=xt.onComment;xt.onComment=function(e,n,l,r,a,o){var u={type:e?"Block":"Line",value:n,start:l,end:r};xt.locations&&(u.loc=new J,u.loc.start=a,u.loc.end=o),xt.ranges&&(u.range=[l,r]),t.push(u)}}wa=xt.ecmaVersion>=6?Ea:ka}function l(){this.type=jt,this.value=Tt,this.start=Rt,this.end=St,xt.locations&&(this.loc=new J,this.loc.end=At),xt.ranges&&(this.range=[Rt,St])}function t(){Dt=Bt=wt,xt.locations&&(Nt=u()),Ft=Vt=Ut=!1,qt=[],g(),w()}function r(e,n){var l=Et(bt,e);n+=" ("+l.line+":"+l.column+")";var t=new SyntaxError(n);throw t.pos=e,t.loc=l,t.raisedAt=wt,t}function a(e){return 10===e||13===e||8232===e||8233==e}function o(e,n){this.line=e,this.column=n}function u(){return new o(Ot,wt-Mt)}function s(e){e?(wt=e,Mt=Math.max(0,bt.lastIndexOf("\n",e)),Ot=bt.slice(0,Mt).split(Pa).length):(Ot=1,wt=Mt=0),jt=Kt,Lt=[Ba],Pt=!0,Wt=Gt=!1,0===wt&&xt.allowHashBang&&"#!"===bt.slice(0,2)&&f(2)}function i(){return Lt[Lt.length-1]}function c(e){var n;return e===qr&&"{"==(n=i()).token?!n.isExpr:e===fr?Pa.test(bt.slice(Bt,Rt)):e===sr||e===Ur||e===Kt?!0:e==Dr?i()===Ba:!Pt}function d(e,n){St=wt,xt.locations&&(At=u());var l=jt,t=!1;if(jt=e,Tt=n,e===Fr||e===Br){var r=Lt.pop();r===Fa?t=Pt=!0:r===Ba&&i()===Ga?(Lt.pop(),Pt=!1):Pt=!(r&&r.isExpr)}else if(e===Dr){switch(i()){case Ha:Lt.push(Na);break;case Xa:Lt.push(Fa);break;default:Lt.push(c(l)?Ba:Na)}Pt=!0}else if(e===zr)Lt.push(Fa),Pt=!0;else if(e==Nr){var a=l===pr||l===cr||l===vr||l===_r;Lt.push(a?Va:Ua),Pt=!0}else if(e==la);else if(e.keyword&&l==Gr)Pt=!1;else if(e==dr)i()!==Ba&&Lt.push(Ga),Pt=!1;else if(e===Yr)i()===qa?Lt.pop():(Lt.push(qa),t=!0),Pt=!1;else if(e===ma)Lt.push(Xa),Lt.push(Ha),Pt=!1;else if(e===ya){var r=Lt.pop();r===Ha&&l===Zr||r===Wa?(Lt.pop(),t=Pt=i()===Xa):t=Pt=!0}else e===$r?t=Pt=!0:e===Zr&&l===ma?(Lt.length-=2,Lt.push(Wa),Pt=!1):Pt=e.beforeExpr;t||g()}function p(){var e=xt.onComment&&xt.locations&&u(),n=wt,l=bt.indexOf("*/",wt+=2);if(-1===l&&r(wt-2,"Unterminated comment"),wt=l+2,xt.locations){Oa.lastIndex=n;for(var t;(t=Oa.exec(bt))&&t.index<wt;)++Ot,Mt=t.index+t[0].length}xt.onComment&&xt.onComment(!0,bt.slice(n+2,l),n,wt,e,xt.locations&&u())}function f(e){for(var n=wt,l=xt.onComment&&xt.locations&&u(),t=bt.charCodeAt(wt+=e);_t>wt&&10!==t&&13!==t&&8232!==t&&8233!==t;)++wt,t=bt.charCodeAt(wt);xt.onComment&&xt.onComment(!1,bt.slice(n+e,wt),n,wt,l,xt.locations&&u())}function g(){for(;_t>wt;){var e=bt.charCodeAt(wt);if(32===e)++wt;else if(13===e){++wt;var n=bt.charCodeAt(wt);10===n&&++wt,xt.locations&&(++Ot,Mt=wt)}else if(10===e||8232===e||8233===e)++wt,xt.locations&&(++Ot,Mt=wt);else if(e>8&&14>e)++wt;else if(47===e){var n=bt.charCodeAt(wt+1);if(42===n)p();else{if(47!==n)break;f(2)}}else if(160===e)++wt;else{if(!(e>=5760&&Ra.test(String.fromCharCode(e))))break;++wt}}}function h(){var e=bt.charCodeAt(wt+1);if(e>=48&&57>=e)return j(!0);var n=bt.charCodeAt(wt+2);return xt.ecmaVersion>=6&&46===e&&46===n?(wt+=3,d(Jr)):(++wt,d(Gr))}function m(){var e=bt.charCodeAt(wt+1);return Pt?(++wt,S()):61===e?R(na,2):R(Zr,1)}function y(){var e=bt.charCodeAt(wt+1);return 61===e?R(na,2):R(fa,1)}function x(){var e=ga,n=1,l=bt.charCodeAt(wt+1);return xt.ecmaVersion>=7&&42===l&&(n++,l=bt.charCodeAt(wt+2),e=ha),61===l&&(n++,e=na),R(e,n)}function b(e){var n=bt.charCodeAt(wt+1);return n===e?xt.playground&&61===bt.charCodeAt(wt+2)?R(na,3):R(124===e?ra:aa,2):61===n?R(na,2):R(124===e?oa:sa,1)}function _(){var e=bt.charCodeAt(wt+1);return 61===e?R(na,2):R(ua,1)}function v(e){var n=bt.charCodeAt(wt+1);return n===e?45==n&&62==bt.charCodeAt(wt+2)&&Pa.test(bt.slice(Bt,wt))?(f(3),g(),w()):R(la,2):61===n?R(na,2):R(pa,1)}function I(e){var n=bt.charCodeAt(wt+1),l=1;if(!Wt&&n===e)return l=62===e&&62===bt.charCodeAt(wt+2)?3:2,61===bt.charCodeAt(wt+l)?R(na,l+1):R(da,l);if(33==n&&60==e&&45==bt.charCodeAt(wt+2)&&45==bt.charCodeAt(wt+3))return f(4),g(),w();if(!Wt){if(Pt&&60===e)return++wt,d(ma);if(62===e){var t=i();if(t===Ha||t===Wa)return++wt,d(ya)}}return 61===n&&(l=61===bt.charCodeAt(wt+2)?3:2),R(ca,l)}function k(e){var n=bt.charCodeAt(wt+1);return 61===n?R(ia,61===bt.charCodeAt(wt+2)?3:2):61===e&&62===n&&xt.ecmaVersion>=6?(wt+=2,d(Wr)):R(61===e?ea:ta,1)}function E(e){switch(e){case 46:return h();case 40:return++wt,d(Nr);case 41:return++wt,d(Fr);case 59:return++wt,d(Ur);case 44:return++wt,d(Vr);case 91:return++wt,d(Or);case 93:return++wt,d(Mr);case 123:return++wt,d(Dr);case 125:return++wt,d(Br);case 63:return++wt,d(Hr);case 35:if(xt.playground)return++wt,d(Qr);case 58:if(++wt,xt.ecmaVersion>=7){var n=bt.charCodeAt(wt);if(58===n)return++wt,d(Kr)}return d(qr);case 96:return xt.ecmaVersion>=6?(++wt,d(Yr)):!1;case 48:var n=bt.charCodeAt(wt+1);if(120===n||88===n)return A(16);if(xt.ecmaVersion>=6){if(111===n||79===n)return A(8);if(98===n||66===n)return A(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return j(!1);case 34:case 39:return Ht?F():L(e);case 47:return m();case 37:return y();case 42:return x();case 124:case 38:return b(e);case 94:return _();case 43:case 45:return v(e);case 60:case 62:return I(e);case 61:case 33:return k(e);case 126:return R(ta,1)}return!1}function w(){if(Rt=wt,xt.locations&&(Ct=u()),wt>=_t)return d(Kt);var e=i();if(e===qa)return P();if(e===Xa)return M();var n=bt.charCodeAt(wt);if(e===Ha||e===Wa){if(Ma(n))return G()}else{if(e===Xa)return M();if(Ma(n)||92===n)return q()}var l=E(n);if(l===!1){var t=String.fromCharCode(n);if("\\"===t||Aa.test(t))return q();r(wt,"Unexpected character '"+t+"'")}return l}function R(e,n,l){var t=bt.slice(wt,wt+n);wt+=n,d(e,t,l)}function S(){for(var e,n,l="",t=wt;;){wt>=_t&&r(t,"Unterminated regular expression");var a=un();if(Pa.test(a)&&r(t,"Unterminated regular expression"),e)e=!1;else{if("["===a)n=!0;else if("]"===a&&n)n=!1;else if("/"===a&&!n)break;e="\\"===a}++wt}var l=bt.slice(t,wt);++wt;var o=U(),u=l;if(o){var s=/^[gmsiy]*$/;xt.ecmaVersion>=6&&(s=/^[gmsiyu]*$/),s.test(o)||r(t,"Invalid regular expression flag"),o.indexOf("u")>=0&&!Ja&&(u=u.replace(/\\u\{([0-9a-fA-F]{5,6})\}/g,"x").replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"))}try{new RegExp(u)}catch(i){i instanceof SyntaxError&&r(t,"Error parsing regular expression: "+i.message),r(i)}try{var c=new RegExp(l,o)}catch(p){c=null}return d(Yt,{pattern:l,flags:o,value:c})}function C(e,n){for(var l=wt,t=0,r=0,a=null==n?1/0:n;a>r;++r){var o,u=bt.charCodeAt(wt);if(o=u>=97?u-97+10:u>=65?u-65+10:u>=48&&57>=u?u-48:1/0,o>=e)break;++wt,t=t*e+o}return wt===l||null!=n&&wt-l!==n?null:t}function A(e){wt+=2;var n=C(e);return null==n&&r(Rt+2,"Expected number in radix "+e),Ma(bt.charCodeAt(wt))&&r(wt,"Identifier directly after number"),d(Jt,n)}function j(e){var n=wt,l=!1,t=48===bt.charCodeAt(wt);e||null!==C(10)||r(n,"Invalid number"),46===bt.charCodeAt(wt)&&(++wt,C(10),l=!0);var a=bt.charCodeAt(wt);(69===a||101===a)&&(a=bt.charCodeAt(++wt),(43===a||45===a)&&++wt,null===C(10)&&r(n,"Invalid number"),l=!0),Ma(bt.charCodeAt(wt))&&r(wt,"Identifier directly after number");var o,u=bt.slice(n,wt);return l?o=parseFloat(u):t&&1!==u.length?/[89]/.test(u)||Gt?r(n,"Invalid number"):o=parseInt(u,8):o=parseInt(u,10),d(Jt,o)}function T(){var e,n=bt.charCodeAt(wt);if(123===n?(xt.ecmaVersion<6&&sn(),++wt,e=V(bt.indexOf("}",wt)-wt),++wt,e>1114111&&sn()):e=V(4),65535>=e)return String.fromCharCode(e);var l=(e-65536>>10)+55296,t=(e-65536&1023)+56320;return String.fromCharCode(l,t)}function L(e){for(var n=i()===Ha,l="",t=++wt;;){wt>=_t&&r(Rt,"Unterminated string constant");var o=bt.charCodeAt(wt);if(o===e)break;92!==o||n?38===o&&n?(l+=bt.slice(t,wt),l+=O(),t=wt):(a(o)&&!n&&r(Rt,"Unterminated string constant"),++wt):(l+=bt.slice(t,wt),l+=D(),t=wt)}return l+=bt.slice(t,wt++),d(zt,l)}function P(){for(var e="",n=wt;;){wt>=_t&&r(Rt,"Unterminated template");var l=bt.charCodeAt(wt);if(96===l||36===l&&123===bt.charCodeAt(wt+1))return wt===Rt&&jt===Xr?36===l?(wt+=2,d(zr)):(++wt,d(Yr)):(e+=bt.slice(n,wt),d(Xr,e));92===l?(e+=bt.slice(n,wt),e+=D(),n=wt):a(l)?(e+=bt.slice(n,wt),++wt,13===l&&10===bt.charCodeAt(wt)?(++wt,e+="\n"):e+=String.fromCharCode(l),xt.locations&&(++Ot,Mt=wt),n=wt):++wt}}function O(){var e,n="",l=0,t=bt[wt];"&"!==t&&r(wt,"Entity must start with an ampersand");for(var a=++wt;_t>wt&&l++<10;){if(t=bt[wt++],";"===t){"#"===n[0]?"x"===n[1]?(n=n.substr(2),La.test(n)&&(e=String.fromCharCode(parseInt(n,16)))):(n=n.substr(1),Ta.test(n)&&(e=String.fromCharCode(parseInt(n,10)))):e=$a[n];break}n+=t}return e?e:(wt=a,"&")}function M(){for(var e="",n=wt;;){wt>=_t&&r(Rt,"Unterminated JSX contents");var l=bt.charCodeAt(wt);switch(l){case 123:case 60:return wt===Rt?E(l):(e+=bt.slice(n,wt),d($r,e));case 38:e+=bt.slice(n,wt),e+=O(),n=wt;break;default:a(l)?(e+=bt.slice(n,wt),++wt,13===l&&10===bt.charCodeAt(wt)?(++wt,e+="\n"):e+=String.fromCharCode(l),xt.locations&&(++Ot,Mt=wt),n=wt):++wt}}}function D(){var e=bt.charCodeAt(++wt),n=/^[0-7]+/.exec(bt.slice(wt,wt+3));for(n&&(n=n[0]);n&&parseInt(n,8)>255;)n=n.slice(0,-1);if("0"===n&&(n=null),++wt,n)return Gt&&r(wt-2,"Octal literal in strict mode"),wt+=n.length-1,String.fromCharCode(parseInt(n,8));switch(e){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(V(2));case 117:return T();case 116:return" ";case 98:return"\b";case 118:return" ";case 102:return"\f";case 48:return"\x00";case 13:10===bt.charCodeAt(wt)&&++wt;case 10:return xt.locations&&(Mt=wt,++Ot),"";default:return String.fromCharCode(e)}}function B(){var e,n="",l=0,t=un();"&"!==t&&r(wt,"Entity must start with an ampersand");for(var a=++wt;_t>wt&&l++<10;){if(t=un(),wt++,";"===t){"#"===n[0]?"x"===n[1]?(n=n.substr(2),La.test(n)&&(e=String.fromCharCode(parseInt(n,16)))):(n=n.substr(1),Ta.test(n)&&(e=String.fromCharCode(parseInt(n,10)))):e=$a[n];break}n+=t}return e?e:(wt=a,"&")}function N(e){for(var n="";_t>wt;){var l=un();if(-1!==e.indexOf(l))break;"&"===l?n+=B():(++wt,"\r"===l&&"\n"===un()&&(n+=l,++wt,l="\n"),"\n"===l&&xt.locations&&(Mt=wt,++Ot),n+=l)}return d(er,n)}function F(){var e=bt.charCodeAt(wt);return 34!==e&&39!==e&&r("String literal must starts with a quote"),++wt,N([String.fromCharCode(e)]),e!==bt.charCodeAt(wt)&&sn(),++wt,d(jt,Tt)}function V(e){var n=C(16,e);return null===n&&r(Rt,"Bad character escape sequence"),n}function U(){za=!1;for(var e="",n=!0,l=wt;_t>wt;){var t=bt.charCodeAt(wt);if(Da(t))++wt;else{if(92!==t)break;za=!0,e+=bt.slice(l,wt),117!=bt.charCodeAt(++wt)&&r(wt,"Expecting Unicode escape sequence \\uXXXX"),++wt;var a=V(4),o=String.fromCharCode(a);o||r(wt-1,"Invalid Unicode escape"),(n?Ma(a):Da(a))||r(wt-4,"Invalid Unicode escape"),e+=o,l=wt}n=!1}return e+bt.slice(l,wt)}function q(){var e=U(),n=Ht?Zt:$t;return!za&&wa(e)&&(n=Pr[e]),d(n,e)}function G(){var e,n=wt;do e=bt.charCodeAt(++wt);while(Da(e)||45===e);return d(Qt,bt.slice(n,wt))}function H(){xt.onToken&&xt.onToken(new l),Dt=Rt,Bt=St,Nt=At,w()}function W(e){if(Gt=e,jt===Jt||jt===zt){if(wt=Rt,xt.locations)for(;Mt>wt;)Mt=bt.lastIndexOf("\n",Mt-2)+1,--Ot;g(),w()}}function X(){this.type=null,this.start=Rt,this.end=null}function J(){this.start=Ct,this.end=null,null!==vt&&(this.source=vt)}function Y(){var n=new e.Node;return xt.locations&&(n.loc=new J),xt.directSourceFile&&(n.sourceFile=xt.directSourceFile),xt.ranges&&(n.range=[Rt,0]),n}function z(){return xt.locations?[Rt,Ct]:Rt}function $(n){var l=new e.Node,t=n;return xt.locations&&(l.loc=new J,l.loc.start=t[1],t=n[0]),l.start=t,xt.directSourceFile&&(l.sourceFile=xt.directSourceFile),xt.ranges&&(l.range=[t,0]),l}function K(e,n){return e.type=n,e.end=Bt,xt.locations&&(e.loc.end=Nt),xt.ranges&&(e.range[1]=Bt),e}function Q(e,n,l){return xt.locations&&(e.loc.end=l[1],l=l[0]),e.type=n,e.end=l,xt.ranges&&(e.range[1]=l),e}function Z(e){return xt.ecmaVersion>=5&&"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"use strict"===e.expression.value}function en(e){return jt===e?(H(),!0):!1}function nn(e){return jt===$t&&Tt===e}function ln(e){return Tt===e&&en($t)}function tn(e){ln(e)||sn()}function rn(){return!xt.strictSemicolons&&(jt===Kt||jt===Br||Pa.test(bt.slice(Bt,Rt)))}function an(){en(Ur)||rn()||sn()}function on(e){en(e)||sn()}function un(){return bt.charAt(wt)}function sn(e){r(null!=e?e:Rt,"Unexpected token")}function cn(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function dn(e,n){if(xt.ecmaVersion>=6&&e)switch(e.type){case"Identifier":case"VirtualPropertyExpression":case"MemberExpression":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var l=0;l<e.properties.length;l++){var t=e.properties[l];"init"!==t.kind&&r(t.key.start,"Object pattern can't contain getter or setter"),dn(t.value,n)}break;case"ArrayExpression":e.type="ArrayPattern",pn(e.elements,n);break;case"AssignmentExpression":"="===e.operator?e.type="AssignmentPattern":r(e.left.end,"Only '=' operator can be used for specifying default value.");break;case"MemberExpression":if(!n)break;default:r(e.start,"Assigning to rvalue")}return e}function pn(e,n){if(e.length){for(var l=0;l<e.length-1;l++)dn(e[l],n);var t=e[e.length-1];switch(t.type){case"RestElement":break;case"SpreadElement":t.type="RestElement";var r=t.argument;dn(r,n),"Identifier"!==r.type&&"MemberExpression"!==r.type&&"ArrayPattern"!==r.type&&sn(r.start);break;default:dn(t,n)}}return e}function fn(e){var n=Y();return H(),n.argument=Xn(e),K(n,"SpreadElement")}function gn(){var e=Y();return H(),e.argument=jt===$t||jt===Or?hn():sn(),K(e,"RestElement")}function hn(){if(xt.ecmaVersion<6)return yl();switch(jt){case $t:return yl();case Or:var e=Y();return H(),e.elements=mn(Mr,!0),K(e,"ArrayPattern");case Dr:return al(!0);default:sn()}}function mn(e,n){for(var l=[],t=!0;!en(e);){if(t?t=!1:on(Vr),jt===Jr){l.push(yn(gn())),on(e);break}var r;if(n&&jt===Vr)r=null;else{var a=xn();yn(a),r=xn(null,a)}l.push(r)}return l}function yn(e){return en(Hr)&&(e.optional=!0),jt===qr&&(e.typeAnnotation=mt()),K(e,e.type),e}function xn(e,n){if(e=e||z(),n=n||hn(),!en(ea))return n;var l=$(e);return l.operator="=",l.left=n,l.right=Xn(),K(l,"AssignmentPattern")}function bn(e,n){switch(e.type){case"Identifier":(va(e.name)||Ia(e.name))&&r(e.start,"Defining '"+e.name+"' in strict mode"),cn(n,e.name)&&r(e.start,"Argument name clash in strict mode"),n[e.name]=!0;break;case"ObjectPattern":for(var l=0;l<e.properties.length;l++){var t=e.properties[l];"SpreadProperty"===t.type?bn(t.argument,n):bn(t.value,n)}break;case"ArrayPattern":for(var l=0;l<e.elements.length;l++){var a=e.elements[l];a&&bn(a,n)}break;case"RestElement":return bn(e.argument,n)}}function _n(e,n){if(!(xt.ecmaVersion>=6)){var l,t=e.key;switch(t.type){case"Identifier":l=t.name;break;case"Literal":l=String(t.value);break;default:return}var a,o=e.kind||"init";if(cn(n,l)){a=n[l];var u="init"!==o;((Gt||u)&&a[o]||!(u^a.init))&&r(t.start,"Redefinition of property")}else a=n[l]={init:!1,get:!1,set:!1};a[o]=!0}}function vn(e,n){switch(e.type){case"Identifier":Gt&&(Ia(e.name)||va(e.name))&&r(e.start,(n?"Binding ":"Assigning to ")+e.name+" in strict mode");break;case"MemberExpression":n&&r(e.start,"Binding to member expression");break;case"ObjectPattern":for(var l=0;l<e.properties.length;l++){var t=e.properties[l];"Property"===t.type&&(t=t.value),vn(t,n)}break;case"ArrayPattern":for(var l=0;l<e.elements.length;l++){var a=e.elements[l];a&&vn(a,n)}break;case"AssignmentPattern":vn(e.left);break;case"SpreadProperty":case"VirtualPropertyExpression":break;case"RestElement":vn(e.argument);break;default:r(e.start,"Assigning to rvalue")}}function In(e){var n=!0;for(e.body||(e.body=[]);jt!==Kt;){var l=kn(!0,!0);e.body.push(l),n&&Z(l)&&W(!0),n=!1}return H(),K(e,"Program")}function kn(e,n){var l=jt,t=Y();switch(l){case nr:case rr:return En(t,l.keyword);case ar:return wn(t);case ur:return Rn(t);case cr:return Sn(t);case dr:return!e&&xt.ecmaVersion>=6&&sn(),Cn(t);case Er:return e||sn(),gl(t,!0);case pr:return An(t);case fr:return jn(t);case gr:return Tn(t);case hr:return Ln(t);case mr:return Pn(t);case xr:case br:e||sn();case yr:return On(t,l.keyword);case _r:return Mn(t);case vr:return Dn(t);case Dr:return Un();case Ur:return Bn(t);case Rr:case Sr:return n||xt.allowImportExportEverywhere||r(Rt,"'import' and 'export' may only appear at the top level"),l===Sr?_l(t):xl(t);case $t:if(xt.ecmaVersion>=7&&jt===$t){if("private"===Tt)return H(),fl(t);if("async"===Tt&&"function "===bt.slice(St+1,St+10))return H(),on(dr),sl(t,!0,!0)}default:var a=Tt,o=Wn();if(l===$t&&"Identifier"===o.type){if(en(qr))return Nn(t,a,o);if("declare"===o.name){if(jt===Er||jt===$t||jt===dr||jt===yr)return ql(t)}else if(jt===$t){if("interface"===o.name)return Jl(t);if("type"===o.name)return Yl(t)}}return Fn(t,o)}}function En(e,n){var l="break"==n;H(),en(Ur)||rn()?e.label=null:jt!==$t?sn():(e.label=yl(),an());for(var t=0;t<qt.length;++t){var a=qt[t];if(null==e.label||a.name===e.label.name){if(null!=a.kind&&(l||"loop"===a.kind))break;if(e.label&&l)break}}return t===qt.length&&r(e.start,"Unsyntactic "+n),K(e,l?"BreakStatement":"ContinueStatement")}function wn(e){return H(),an(),K(e,"DebuggerStatement")}function Rn(e){return H(),qt.push(Ka),e.body=kn(!1),qt.pop(),on(_r),e.test=Vn(),xt.ecmaVersion>=6?en(Ur):an(),K(e,"DoWhileStatement")}function Sn(e){if(H(),qt.push(Ka),on(Nr),jt===Ur)return qn(e,null);if(jt===yr||jt===xr){var n=Y(),l=jt.keyword,t=jt===xr;return H(),Hn(n,!0,l),K(n,"VariableDeclaration"),!(jt===Lr||xt.ecmaVersion>=6&&nn("of"))||1!==n.declarations.length||t&&n.declarations[0].init?qn(e,n):Gn(e,n)}var r={start:0},n=Wn(!0,r);return jt===Lr||xt.ecmaVersion>=6&&nn("of")?(dn(n),vn(n),Gn(e,n)):(r.start&&sn(r.start),qn(e,n))}function Cn(e){return H(),sl(e,!0,!1)}function An(e){return H(),e.test=Vn(),e.consequent=kn(!1),e.alternate=en(sr)?kn(!1):null,K(e,"IfStatement")}function jn(e){return Ft||xt.allowReturnOutsideFunction||r(Rt,"'return' outside of function"),H(),en(Ur)||rn()?e.argument=null:(e.argument=Wn(),an()),K(e,"ReturnStatement")}function Tn(e){H(),e.discriminant=Vn(),e.cases=[],on(Dr),qt.push(Qa);for(var n,l;jt!=Br;)if(jt===lr||jt===or){var t=jt===lr;n&&K(n,"SwitchCase"),e.cases.push(n=Y()),n.consequent=[],H(),t?n.test=Wn():(l&&r(Dt,"Multiple default clauses"),l=!0,n.test=null),on(qr)}else n||sn(),n.consequent.push(kn(!0));return n&&K(n,"SwitchCase"),H(),qt.pop(),K(e,"SwitchStatement")}function Ln(e){return H(),Pa.test(bt.slice(Bt,Rt))&&r(Bt,"Illegal newline after throw"),e.argument=Wn(),an(),K(e,"ThrowStatement")}function Pn(e){if(H(),e.block=Un(),e.handler=null,jt===tr){var n=Y();H(),on(Nr),n.param=hn(),vn(n.param,!0),on(Fr),n.guard=null,n.body=Un(),e.handler=K(n,"CatchClause")}return e.guardedHandlers=Xt,e.finalizer=en(ir)?Un():null,e.handler||e.finalizer||r(e.start,"Missing catch or finally clause"),K(e,"TryStatement")}function On(e,n){return H(),Hn(e,!1,n),an(),K(e,"VariableDeclaration")}function Mn(e){return H(),e.test=Vn(),qt.push(Ka),e.body=kn(!1),qt.pop(),K(e,"WhileStatement")}function Dn(e){return Gt&&r(Rt,"'with' in strict mode"),H(),e.object=Vn(),e.body=kn(!1),K(e,"WithStatement")}function Bn(e){return H(),K(e,"EmptyStatement")}function Nn(e,n,l){for(var t=0;t<qt.length;++t)qt[t].name===n&&r(l.start,"Label '"+n+"' is already declared");var a=jt.isLoop?"loop":jt===gr?"switch":null;return qt.push({name:n,kind:a}),e.body=kn(!0),qt.pop(),e.label=l,K(e,"LabeledStatement")}function Fn(e,n){return e.expression=n,an(),K(e,"ExpressionStatement")}function Vn(){on(Nr);var e=Wn();return on(Fr),e}function Un(e){var n,l=Y(),t=!0;for(l.body=[],on(Dr);!en(Br);){var r=kn(!0);l.body.push(r),t&&e&&Z(r)&&(n=Gt,W(Gt=!0)),t=!1}return n===!1&&W(!1),K(l,"BlockStatement")}function qn(e,n){return e.init=n,on(Ur),e.test=jt===Ur?null:Wn(),on(Ur),e.update=jt===Fr?null:Wn(),on(Fr),e.body=kn(!1),qt.pop(),K(e,"ForStatement")}function Gn(e,n){var l=jt===Lr?"ForInStatement":"ForOfStatement";return H(),e.left=n,e.right=Wn(),on(Fr),e.body=kn(!1),qt.pop(),K(e,l)}function Hn(e,n,l){for(e.declarations=[],e.kind=l;;){var t=Y();if(t.id=hn(),vn(t.id,!0),jt===qr&&(t.id.typeAnnotation=mt(),K(t.id,t.id.type)),t.init=en(ea)?Xn(n):l===br.keyword?sn():null,e.declarations.push(K(t,"VariableDeclarator")),!en(Vr))break}return e}function Wn(e,n){var l=z(),t=Xn(e,n);if(jt===Vr){var r=$(l);for(r.expressions=[t];en(Vr);)r.expressions.push(Xn(e,n));return K(r,"SequenceExpression")}return t}function Xn(e,n,l){var t;n?t=!1:(n={start:0},t=!0);var r=z(),a=Jn(e,n);if(l&&(a=l(a,r)),jt.isAssign){var o=$(r);return o.operator=Tt,o.left=jt===ea?dn(a):a,n.start=0,vn(a),H(),o.right=Xn(e),K(o,"AssignmentExpression")}return t&&n.start&&sn(n.start),a}function Jn(e,n){var l=z(),t=Yn(e,n);if(n&&n.start)return t;if(en(Hr)){var a=$(l);if(xt.playground&&en(ea)){var o=a.left=dn(t);return"MemberExpression"!==o.type&&r(o.start,"You can only use member expressions in memoization assignment"),a.right=Xn(e),a.operator="?=",K(a,"AssignmentExpression")}return a.test=t,a.consequent=Xn(),on(qr),a.alternate=Xn(e),K(a,"ConditionalExpression")}return t}function Yn(e,n){var l=z(),t=$n(n);return n&&n.start?t:zn(t,l,-1,e)}function zn(e,n,l,t){var r=jt.binop;if(null!=r&&(!t||jt!==Lr)&&r>l){var a=$(n);a.left=e,a.operator=Tt;var o=jt;H();var u=z();return a.right=zn($n(),u,o.rightAssociative?r-1:r,t),K(a,o===ra||o===aa?"LogicalExpression":"BinaryExpression"),zn(a,n,l,t)}return e}function $n(e){if(jt.prefix){var n=Y(),l=jt.isUpdate;return n.operator=Tt,n.prefix=!0,H(),n.argument=$n(),e&&e.start&&sn(e.start),l?vn(n.argument):Gt&&"delete"===n.operator&&"Identifier"===n.argument.type&&r(n.start,"Deleting local variable in strict mode"),K(n,l?"UpdateExpression":"UnaryExpression")}var t=z(),a=Kn(e);if(e&&e.start)return a;for(;jt.postfix&&!rn();){var n=$(t);n.operator=Tt,n.prefix=!1,n.argument=a,vn(a),H(),a=K(n,"UpdateExpression")}return a}function Kn(e){var n=z(),l=Zn(e);return e&&e.start?l:Qn(l,n)}function Qn(e,n,l){if(xt.playground&&en(Qr)){var t=$(n);return t.object=e,t.property=yl(!0),t.arguments=en(Nr)?ml(Fr,!1):[],Qn(K(t,"BindMemberExpression"),n,l)}if(en(Kr)){var t=$(n);return t.object=e,t.property=yl(!0),Qn(K(t,"VirtualPropertyExpression"),n,l)}if(en(Gr)){var t=$(n);return t.object=e,t.property=yl(!0),t.computed=!1,Qn(K(t,"MemberExpression"),n,l)}if(en(Or)){var t=$(n);return t.object=e,t.property=Wn(),t.computed=!0,on(Mr),Qn(K(t,"MemberExpression"),n,l)}if(!l&&en(Nr)){var t=$(n);return t.callee=e,t.arguments=ml(Fr,!1),Qn(K(t,"CallExpression"),n,l)}if(jt===Yr){var t=$(n);return t.tag=e,t.quasi=rl(),Qn(K(t,"TaggedTemplateExpression"),n,l)}return e}function Zn(e){switch(jt){case kr:var n=Y();return H(),K(n,"ThisExpression");case Cr:if(Vt)return kl();case $t:var l=z(),n=Y(),t=yl(jt!==$t);if(xt.ecmaVersion>=7)if("async"===t.name){if(jt===Nr){var r=nl(l,!0);return"ArrowFunctionExpression"===r.type?r:(n.callee=t,n.arguments="SequenceExpression"===r.type?r.expressions:[r],Qn(K(n,"CallExpression"),l))}if(jt===$t)return t=yl(),on(Wr),dl(n,[t],!0);if(jt===dr&&!rn())return H(),sl(n,!1,!0)}else if("await"===t.name&&Ut)return El(n);return!rn()&&en(Wr)?dl($(l),[t]):t;case Yt:var n=Y();return n.regex={pattern:Tt.pattern,flags:Tt.flags},n.value=Tt.value,n.raw=bt.slice(Rt,St),H(),K(n,"Literal");case Jt:case zt:case $r:var n=Y();return n.value=Tt,n.raw=bt.slice(Rt,St),H(),K(n,"Literal");case Ar:case jr:case Tr:var n=Y();return n.value=jt.atomValue,n.raw=jt.keyword,H(),K(n,"Literal");case Nr:return nl();case Or:var n=Y();return H(),xt.ecmaVersion>=7&&jt===cr?wl(n,!1):(n.elements=ml(Mr,!0,!0,e),K(n,"ArrayExpression"));case Dr:return al(!1,e);case dr:var n=Y();return H(),sl(n,!1,!1);case Er:return gl(Y(),!1);case Ir:return ll();case Yr:return rl();case Qr:return el();case ma:return Fl();default:sn()}}function el(){var e=Y();H();var n=z();return e.callee=Qn(Zn(),n,!0),e.arguments=en(Nr)?ml(Fr,!1):[],K(e,"BindFunctionExpression")}function nl(e,n){e=e||z();var l;if(xt.ecmaVersion>=6){if(H(),xt.ecmaVersion>=7&&jt===cr)return wl($(e),!0);for(var t,r,a=z(),o=[],u=!0,s={start:0},i=function(e,n){if(jt===qr){var l=$(n);return l.expression=e,l.typeAnnotation=mt(),K(l,"TypeCastExpression")}return e};jt!==Fr;){if(u?u=!1:on(Vr),jt===Jr){var c=z();t=Rt,o.push(i(gn(),c));break}jt!==Nr||r||(r=Rt),o.push(Xn(!1,s,i))}var d=z();if(on(Fr),!rn()&&en(Wr)){r&&sn(r);for(var p=0;p<o.length;p++){var f=o[p];if("TypeCastExpression"===f.type){var g=f.expression;g.returnType=f.typeAnnotation,o[p]=g}}return dl($(e),o,n)}o.length||sn(Dt),t&&sn(t),s.start&&sn(s.start),o.length>1?(l=$(a),l.expressions=o,Q(l,"SequenceExpression",d)):l=o[0]}else l=Vn();if(xt.preserveParens){var h=$(e);return h.expression=l,K(h,"ParenthesizedExpression")}return l}function ll(){var e=Y();H();var n=z();return e.callee=Qn(Zn(),n,!0),e.arguments=en(Nr)?ml(Fr,!1):Xt,K(e,"NewExpression")}function tl(){var e=Y();return e.value={raw:bt.slice(Rt,St),cooked:Tt},H(),e.tail=jt===Yr,K(e,"TemplateElement")}function rl(){var e=Y();H(),e.expressions=[];var n=tl();for(e.quasis=[n];!n.tail;)on(zr),e.expressions.push(Wn()),on(Br),e.quasis.push(n=tl());return H(),K(e,"TemplateLiteral")}function al(e,n){var l=Y(),t=!0,r={};for(l.properties=[],H();!en(Br);){if(t)t=!1;else if(on(Vr),xt.allowTrailingCommas&&en(Br))break;var a,o=Y(),u=!1,s=!1;if(xt.ecmaVersion>=7&&jt===Jr)o=fn(),o.type="SpreadProperty",l.properties.push(o);else{if(xt.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||n)&&(a=z()),e||(u=en(ga))),xt.ecmaVersion>=7&&nn("async")){var i=yl();jt===qr||jt===Nr?o.key=i:(s=!0,ol(o))}else ol(o);var c;Bl("<")&&(c=zl(),jt!==Nr&&sn()),en(qr)?(o.value=e?xn():Xn(!1,n),o.kind="init"):xt.ecmaVersion>=6&&jt===Nr?(e&&sn(),o.kind="init",o.method=!0,o.value=il(u,s)):xt.ecmaVersion>=5&&!o.computed&&"Identifier"===o.key.type&&("get"===o.key.name||"set"===o.key.name||xt.playground&&"memo"===o.key.name)&&jt!=Vr&&jt!=Br?((u||s||e)&&sn(),o.kind=o.key.name,ol(o),o.value=il(!1,!1)):xt.ecmaVersion>=6&&!o.computed&&"Identifier"===o.key.type?(o.kind="init",e?o.value=xn(a,o.key):jt===ea&&n?(n.start||(n.start=Rt),o.value=xn(a,o.key)):o.value=o.key,o.shorthand=!0):sn(),o.value.typeParameters=c,_n(o,r),l.properties.push(K(o,"Property"))}}return K(l,e?"ObjectPattern":"ObjectExpression")}function ol(e){if(xt.ecmaVersion>=6){if(en(Or))return e.computed=!0,e.key=Wn(),void on(Mr);e.computed=!1}e.key=jt===Jt||jt===zt?Zn():yl(!0)}function ul(e,n){e.id=null,xt.ecmaVersion>=6&&(e.generator=!1,e.expression=!1),xt.ecmaVersion>=7&&(e.async=n)}function sl(e,n,l,t){return ul(e,l),xt.ecmaVersion>=6&&(e.generator=en(ga)),(n||jt===$t)&&(e.id=yl()),Bl("<")&&(e.typeParameters=zl()),cl(e),pl(e,t),K(e,n?"FunctionDeclaration":"FunctionExpression")}function il(e,n){var l=Y();ul(l,n),cl(l);var t;return xt.ecmaVersion>=6?(l.generator=e,t=!0):t=!1,pl(l,t),K(l,"FunctionExpression")}function cl(e){on(Nr),e.params=mn(Fr,!1),jt===qr&&(e.returnType=mt())}function dl(e,n,l){return ul(e,l),e.params=pn(n,!0),pl(e,!0),K(e,"ArrowFunctionExpression")}function pl(e,n){var l=n&&jt!==Dr,t=Ut;if(Ut=e.async,l)e.body=Xn(),e.expression=!0;else{var r=Ft,a=Vt,o=qt;Ft=!0,Vt=e.generator,qt=[],e.body=Un(!0),e.expression=!1,Ft=r,Vt=a,qt=o}if(Ut=t,Gt||!l&&e.body.body.length&&Z(e.body.body[0])){var u={};e.id&&bn(e.id,{});for(var s=0;s<e.params.length;s++)bn(e.params[s],u)}}function fl(e){e.declarations=[];do e.declarations.push(yl());while(en(Vr));return an(),K(e,"PrivateDeclaration")}function gl(e,n){H(),e.id=jt===$t?yl():n?sn():null,Bl("<")&&(e.typeParameters=zl()),e.superClass=en(wr)?Kn():null,e.superClass&&Bl("<")&&(e.superTypeParameters=$l()),nn("implements")&&(H(),e.implements=hl());var l=Y();for(l.body=[],on(Dr);!en(Br);)if(!en(Ur)){var t=Y();if(xt.ecmaVersion>=7&&nn("private"))H(),l.body.push(fl(t));else{var r=en(ga),a=!1;ol(t),jt===Nr||t.computed||"Identifier"!==t.key.type||"static"!==t.key.name?t["static"]=!1:((r||a)&&sn(),t["static"]=!0,r=en(ga),ol(t)),jt===Nr||t.computed||"Identifier"!==t.key.type||"async"!==t.key.name||(a=!0,ol(t)),jt!==Nr&&!t.computed&&"Identifier"===t.key.type&&("get"===t.key.name||"set"===t.key.name)||xt.playground&&"memo"===t.key.name?((r||a)&&sn(),t.kind=t.key.name,ol(t)):t.kind="";var o=!1;if(jt===qr&&(t.typeAnnotation=mt(),o=!0),xt.playground&&en(ea)&&(t.value=Xn(),o=!0),o)an(),l.body.push(K(t,"ClassProperty"));else{var u;Bl("<")&&(u=zl()),t.value=il(r,a),t.value.typeParameters=u,l.body.push(K(t,"MethodDefinition")),en(Ur)}}}return e.body=K(l,"ClassBody"),K(e,n?"ClassDeclaration":"ClassExpression")}function hl(){var e=[];do{var n=Y();n.id=yl(),n.typeParameters=Bl("<")?$l():null,e.push(K(n,"ClassImplements"))}while(en(Vr));return e}function ml(e,n,l,t){for(var r=[],a=!0;!en(e);){if(a)a=!1;else if(on(Vr),n&&xt.allowTrailingCommas&&en(e))break;r.push(l&&jt===Vr?null:jt===Jr?fn(t):Xn(!1,t))}return r}function yl(e){var n=Y();return e&&"everywhere"==xt.forbidReserved&&(e=!1),jt===$t?(!e&&(xt.forbidReserved&&(3===xt.ecmaVersion?ba:_a)(Tt)||Gt&&va(Tt))&&-1==bt.slice(Rt,St).indexOf("\\")&&r(Rt,"The keyword '"+Tt+"' is reserved"),n.name=Tt):e&&jt.keyword?n.name=jt.keyword:sn(),H(),K(n,"Identifier")}function xl(e){if(H(),jt===yr||jt===br||jt===xr||jt===dr||jt===Er||nn("async")||nn("type"))e.declaration=kn(!0),e["default"]=!1,e.specifiers=null,e.source=null;else if(en(or)){var n=Xn();if(n.id)switch(n.type){case"FunctionExpression":n.type="FunctionDeclaration";break;case"ClassExpression":n.type="ClassDeclaration"}e.declaration=n,e["default"]=!0,e.specifiers=null,e.source=null,an()}else{var l=jt===ga;e.declaration=null,e["default"]=!1,e.specifiers=bl(),ln("from")?e.source=jt===zt?Zn():sn():(l&&sn(),e.source=null),an() }return K(e,"ExportDeclaration")}function bl(){var e=[],n=!0;if(jt===ga){var l=Y();H(),e.push(K(l,"ExportBatchSpecifier"))}else for(on(Dr);!en(Br);){if(n)n=!1;else if(on(Vr),xt.allowTrailingCommas&&en(Br))break;var l=Y();l.id=yl(jt===or),l.name=ln("as")?yl(!0):null,e.push(K(l,"ExportSpecifier"))}return e}function _l(e){H(),e.isType=!1,e.specifiers=[];var n;if(nn("type")){var l=z();n=yl(),jt===$t&&"from"!==Tt||jt===Dr||jt===ga?e.isType=!0:(e.specifiers.push(Il(n,l)),en(Vr))}return jt===zt?(n&&sn(n.start),e.source=Zn()):(nn("from")||vl(e.specifiers),tn("from"),e.source=jt===zt?Zn():sn()),an(),K(e,"ImportDeclaration")}function vl(e){var n=!0;if(jt===$t){var l=z(),t=yl();if(e.push(Il(t,l)),!en(Vr))return e}if(jt===ga){var r=Y();return H(),tn("as"),r.name=yl(),vn(r.name,!0),e.push(K(r,"ImportBatchSpecifier")),e}for(on(Dr);!en(Br);){if(n)n=!1;else if(on(Vr),xt.allowTrailingCommas&&en(Br))break;var r=Y();r.id=yl(!0),r.name=ln("as")?yl():null,vn(r.name||r.id,!0),r["default"]=!1,e.push(K(r,"ImportSpecifier"))}return e}function Il(e,n){var l=$(n);return l.id=e,vn(l.id,!0),l.name=null,l["default"]=!0,K(l,"ImportSpecifier")}function kl(){var e=Y();return H(),en(Ur)||rn()?(e.delegate=!1,e.argument=null):(e.delegate=en(ga),e.argument=Xn()),K(e,"YieldExpression")}function El(e){return(en(Ur)||rn())&&sn(),e.all=en(ga),e.argument=Xn(!0),K(e,"AwaitExpression")}function wl(e,n){for(e.blocks=[];jt===cr;){var l=Y();H(),on(Nr),l.left=hn(),vn(l.left,!0),tn("of"),l.right=Wn(),on(Fr),e.blocks.push(K(l,"ComprehensionBlock"))}return e.filter=en(pr)?Vn():null,e.body=Wn(),on(n?Fr:Mr),e.generator=n,K(e,"ComprehensionExpression")}function Rl(e){return"JSXIdentifier"===e.type?e.name:"JSXNamespacedName"===e.type?e.namespace.name+":"+e.name.name:"JSXMemberExpression"===e.type?Rl(e.object)+"."+Rl(e.property):void 0}function Sl(){var e=Y();return jt===Qt?e.name=Tt:jt.keyword?e.name=jt.keyword:sn(),H(),K(e,"JSXIdentifier")}function Cl(){var e=z(),n=Sl();if(!en(qr))return n;var l=$(e);return l.namespace=n,l.name=Sl(),K(l,"JSXNamespacedName")}function Al(){for(var e=z(),n=Cl();en(Gr);){var l=$(e);l.object=n,l.property=Sl(),n=K(l,"JSXMemberExpression")}return n}function jl(){switch(jt){case Dr:var e=Ll();return"JSXEmptyExpression"===e.expression.type&&r(e.start,"JSX attributes must only be assigned a non-empty expression"),e;case ma:return Fl();case $r:case zt:return Zn();default:r(Rt,"JSX value should be either an expression or a quoted JSX text")}}function Tl(){jt!==Br&&sn();var e;return e=Rt,Rt=Bt,Bt=e,e=Ct,Ct=Nt,Nt=e,K(Y(),"JSXEmptyExpression")}function Ll(){var e=Y();return H(),e.expression=jt===Br?Tl():Wn(),on(Br),K(e,"JSXExpressionContainer")}function Pl(){var e=Y();return en(Dr)?(on(Jr),e.argument=Xn(),on(Br),K(e,"JSXSpreadAttribute")):(e.name=Cl(),e.value=en(ea)?jl():null,K(e,"JSXAttribute"))}function Ol(e){var n=$(e);for(n.attributes=[],n.name=Al();jt!==Zr&&jt!==ya;)n.attributes.push(Pl());return n.selfClosing=en(Zr),on(ya),K(n,"JSXOpeningElement")}function Ml(e){var n=$(e);return n.name=Al(),on(ya),K(n,"JSXClosingElement")}function Dl(e){var n=$(e),l=[],t=Ol(e),a=null;if(!t.selfClosing){e:for(;;)switch(jt){case ma:if(e=z(),H(),en(Zr)){a=Ml(e);break e}l.push(Dl(e));break;case $r:l.push(Zn());break;case Dr:l.push(Ll());break;default:sn()}Rl(a.name)!==Rl(t.name)&&r(a.start,"Expected corresponding JSX closing tag for <"+Rl(t.name)+">")}return n.openingElement=t,n.closingElement=a,n.children=l,K(n,"JSXElement")}function Bl(e){return jt===ca&&Tt===e}function Nl(e){Bl(e)?H():sn()}function Fl(){var e=z();return H(),Dl(e)}function Vl(e){return H(),Wl(e,!0),K(e,"DeclareClass")}function Ul(e){H();var n=e.id=yl(),l=Y(),t=Y();l.typeParameters=Bl("<")?zl():null,on(Nr);var r=st();return l.params=r.params,l.rest=r.rest,on(Fr),on(qr),l.returnType=ht(),t.typeAnnotation=K(l,"FunctionTypeAnnotation"),n.typeAnnotation=K(t,"TypeAnnotation"),K(n,n.type),an(),K(e,"DeclareFunction")}function ql(e){return jt===Er?Vl(e):jt===dr?Ul(e):jt===yr?Gl(e):nn("module")?Hl(e):void sn()}function Gl(e){return H(),e.id=yt(),an(),K(e,"DeclareVariable")}function Hl(e){H(),e.id=jt===zt?Zn():yl();var n=e.body=Y(),l=n.body=[];for(on(Dr);jt!==Br;){var t=Y();H(),l.push(ql(t))}return on(Br),K(n,"BlockStatement"),K(e,"DeclareModule")}function Wl(e,n){if(e.id=yl(),e.typeParameters=Bl("<")?zl():null,e.extends=[],en(wr))do e.extends.push(Xl());while(en(Vr));e.body=lt(n)}function Xl(){var e=Y();return e.id=yl(),e.typeParameters=Bl("<")?$l():null,K(e,"InterfaceExtends")}function Jl(e){return Wl(e,!1),K(e,"InterfaceDeclaration")}function Yl(e){return e.id=yl(),e.typeParameters=Bl("<")?zl():null,on(ea),e.right=ht(),an(),K(e,"TypeAlias")}function zl(){var e=Y();for(e.params=[],Nl("<");!Bl(">");)e.params.push(yl()),Bl(">")||on(Vr);return Nl(">"),K(e,"TypeParameterDeclaration")}function $l(){var e=Y(),n=Wt;for(e.params=[],Wt=!0,Nl("<");!Bl(">");)e.params.push(ht()),Bl(">")||on(Vr);return Nl(">"),Wt=n,K(e,"TypeParameterInstantiation")}function Kl(){return jt===Jt||jt===zt?Zn():yl(!0)}function Ql(e,n){return e.static=n,on(Or),e.id=Kl(),on(qr),e.key=ht(),on(Mr),on(qr),e.value=ht(),K(e,"ObjectTypeIndexer")}function Zl(e){for(e.params=[],e.rest=null,e.typeParameters=null,Bl("<")&&(e.typeParameters=zl()),on(Nr);jt===$t;)e.params.push(ut()),jt!==Fr&&on(Vr);return en(Jr)&&(e.rest=ut()),on(Fr),on(qr),e.returnType=ht(),K(e,"FunctionTypeAnnotation")}function et(e,n,l){var t=$(e);return t.value=Zl($(e)),t.static=n,t.key=l,t.optional=!1,K(t,"ObjectTypeProperty")}function nt(e,n){var l=Y();return e.static=n,e.value=Zl(l),K(e,"ObjectTypeCallProperty")}function lt(e){var n,l,t,r=Y(),a=!1;for(r.callProperties=[],r.properties=[],r.indexers=[],on(Dr);jt!==Br;){var o=z();n=Y(),e&&nn("static")&&(H(),t=!0),jt===Or?r.indexers.push(Ql(n,t)):jt===Nr||Bl("<")?r.callProperties.push(nt(n,e)):(l=t&&jt===qr?yl():Kl(),Bl("<")||jt===Nr?r.properties.push(et(o,t,l)):(en(Hr)&&(a=!0),on(qr),n.key=l,n.value=ht(),n.optional=a,n.static=t,r.properties.push(K(n,"ObjectTypeProperty")))),en(Ur)||jt===Br||sn()}return on(Br),K(r,"ObjectTypeAnnotation")}function tt(e,n){var l=$(e);for(l.typeParameters=null,l.id=n;en(Gr);){var t=$(e);t.qualification=l.id,t.id=yl(),l.id=K(t,"QualifiedTypeIdentifier")}return Bl("<")&&(l.typeParameters=$l()),K(l,"GenericTypeAnnotation")}function rt(){var e=Y();return on(Pr["void"]),K(e,"VoidTypeAnnotation")}function at(){var e=Y();return on(Pr["typeof"]),e.argument=ct(),K(e,"TypeofTypeAnnotation")}function ot(){var e=Y();for(e.types=[],on(Or);_t>wt&&jt!==Mr&&(e.types.push(ht()),jt!==Mr);)on(Vr);return on(Mr),K(e,"TupleTypeAnnotation")}function ut(){var e=!1,n=Y();return n.name=yl(),en(Hr)&&(e=!0),on(qr),n.optional=e,n.typeAnnotation=ht(),K(n,"FunctionTypeParam")}function st(){for(var e={params:[],rest:null};jt===$t;)e.params.push(ut()),jt!==Fr&&on(Vr);return en(Jr)&&(e.rest=ut()),e}function it(e,n,l){switch(l.name){case"any":return K(n,"AnyTypeAnnotation");case"bool":case"boolean":return K(n,"BooleanTypeAnnotation");case"number":return K(n,"NumberTypeAnnotation");case"string":return K(n,"StringTypeAnnotation");default:return tt(e,l)}}function ct(){var e,n,l=z(),t=Y(),a=!1;switch(jt){case $t:return it(l,t,yl());case Dr:return lt();case Or:return ot();case ca:if("<"===Tt)return t.typeParameters=zl(),on(Nr),e=st(),t.params=e.params,t.rest=e.rest,on(Fr),on(Wr),t.returnType=ht(),K(t,"FunctionTypeAnnotation");case Nr:H();var o;return jt!==Fr&&jt!==Jr&&(jt===$t||(a=!0)),a?(o&&Fr?n=o:(n=ht(),on(Fr)),en(Wr)&&r(t,"Unexpected token =>. It looks like you are trying to write a function type, but you ended up writing a grouped type followed by an =>, which is a syntax error. Remember, function type parameters are named so function types look like (name1: type1, name2: type2) => returnType. You probably wrote (type1) => returnType"),n):(e=st(),t.params=e.params,t.rest=e.rest,on(Fr),on(Wr),t.returnType=ht(),t.typeParameters=null,K(t,"FunctionTypeAnnotation"));case zt:return t.value=Tt,t.raw=bt.slice(Rt,St),H(),K(t,"StringLiteralTypeAnnotation");default:if(jt.keyword)switch(jt.keyword){case"void":return rt();case"typeof":return at()}}sn()}function dt(){var e=Y(),n=e.elementType=ct();return jt===Or?(on(Or),on(Mr),K(e,"ArrayTypeAnnotation")):n}function pt(){var e=Y();return en(Hr)?(e.typeAnnotation=pt(),K(e,"NullableTypeAnnotation")):dt()}function ft(){var e=Y(),n=pt();for(e.types=[n];en(sa);)e.types.push(pt());return 1===e.types.length?n:K(e,"IntersectionTypeAnnotation")}function gt(){var e=Y(),n=ft();for(e.types=[n];en(oa);)e.types.push(ft());return 1===e.types.length?n:K(e,"UnionTypeAnnotation")}function ht(){var e=Wt;Wt=!0;var n=gt();return Wt=e,n}function mt(){var e=Y(),n=Wt;return Wt=!0,on(qr),e.typeAnnotation=ht(),Wt=n,K(e,"TypeAnnotation")}function yt(e,n){var l=(Y(),yl()),t=!1;return n&&en(Hr)&&(on(Hr),t=!0),(e||jt===qr)&&(l.typeAnnotation=mt(),K(l,l.type)),t&&(l.optional=!0,K(l,l.type)),l}e.version="0.11.1";var xt,bt,_t,vt;e.parse=function(e,l){bt=String(e),_t=bt.length,n(l),s();var r=xt.locations?[wt,u()]:wt;return t(),xt.strictMode&&(Gt=!0),In(xt.program||$(r))};var It=e.defaultOptions={strictMode:!1,playground:!1,ecmaVersion:5,strictSemicolons:!1,allowTrailingCommas:!0,forbidReserved:!1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1};e.parseExpressionAt=function(e,l,r){return bt=String(e),_t=bt.length,n(r),s(l),t(),Wn()};var kt=function(e){return"[object Array]"===Object.prototype.toString.call(e)},Et=e.getLineInfo=function(e,n){for(var l=1,t=0;;){Oa.lastIndex=t;var r=Oa.exec(e);if(!(r&&r.index<n))break;++l,t=r.index+r[0].length}return{line:l,column:n-t}};e.Token=l,e.tokenize=function(e,t){function r(){return Bt=St,w(),new l}return bt=String(e),_t=bt.length,n(t),s(),g(),r.jumpTo=function(e,n){if(wt=e,xt.locations){Ot=1,Mt=Oa.lastIndex=0;for(var l;(l=Oa.exec(bt))&&l.index<e;)++Ot,Mt=l.index+l[0].length}Pt=!!n,g()},r.current=function(){return new l},"undefined"!=typeof Symbol&&(r[Symbol.iterator]=function(){return{next:function(){var e=r();return{done:e.type===Kt,value:e}}}}),r.options=xt,r};var wt,Rt,St,Ct,At,jt,Tt,Lt,Pt,Ot,Mt,Dt,Bt,Nt,Ft,Vt,Ut,qt,Gt,Ht,Wt,Xt=[],Jt={type:"num"},Yt={type:"regexp"},zt={type:"string"},$t={type:"name"},Kt={type:"eof"},Qt={type:"jsxName"},Zt={type:"xjsName"},er={type:"xjsText"},nr={keyword:"break"},lr={keyword:"case",beforeExpr:!0},tr={keyword:"catch"},rr={keyword:"continue"},ar={keyword:"debugger"},or={keyword:"default"},ur={keyword:"do",isLoop:!0},sr={keyword:"else",beforeExpr:!0},ir={keyword:"finally"},cr={keyword:"for",isLoop:!0},dr={keyword:"function"},pr={keyword:"if"},fr={keyword:"return",beforeExpr:!0},gr={keyword:"switch"},hr={keyword:"throw",beforeExpr:!0},mr={keyword:"try"},yr={keyword:"var"},xr={keyword:"let"},br={keyword:"const"},_r={keyword:"while",isLoop:!0},vr={keyword:"with"},Ir={keyword:"new",beforeExpr:!0},kr={keyword:"this"},Er={keyword:"class"},wr={keyword:"extends",beforeExpr:!0},Rr={keyword:"export"},Sr={keyword:"import"},Cr={keyword:"yield",beforeExpr:!0},Ar={keyword:"null",atomValue:null},jr={keyword:"true",atomValue:!0},Tr={keyword:"false",atomValue:!1},Lr={keyword:"in",binop:7,beforeExpr:!0},Pr={"break":nr,"case":lr,"catch":tr,"continue":rr,"debugger":ar,"default":or,"do":ur,"else":sr,"finally":ir,"for":cr,"function":dr,"if":pr,"return":fr,"switch":gr,"throw":hr,"try":mr,"var":yr,let:xr,"const":br,"while":_r,"with":vr,"null":Ar,"true":jr,"false":Tr,"new":Ir,"in":Lr,"instanceof":{keyword:"instanceof",binop:7,beforeExpr:!0},"this":kr,"typeof":{keyword:"typeof",prefix:!0,beforeExpr:!0},"void":{keyword:"void",prefix:!0,beforeExpr:!0},"delete":{keyword:"delete",prefix:!0,beforeExpr:!0},"class":Er,"extends":wr,"export":Rr,"import":Sr,"yield":Cr},Or={type:"[",beforeExpr:!0},Mr={type:"]"},Dr={type:"{",beforeExpr:!0},Br={type:"}"},Nr={type:"(",beforeExpr:!0},Fr={type:")"},Vr={type:",",beforeExpr:!0},Ur={type:";",beforeExpr:!0},qr={type:":",beforeExpr:!0},Gr={type:"."},Hr={type:"?",beforeExpr:!0},Wr={type:"=>",beforeExpr:!0},Xr={type:"template"},Jr={type:"...",beforeExpr:!0},Yr={type:"`"},zr={type:"${",beforeExpr:!0},$r={type:"jsxText"},Kr={type:"::",beforeExpr:!0},Qr={type:"#"},Zr={binop:10,beforeExpr:!0},ea={isAssign:!0,beforeExpr:!0},na={isAssign:!0,beforeExpr:!0},la={postfix:!0,prefix:!0,isUpdate:!0},ta={prefix:!0,beforeExpr:!0},ra={binop:1,beforeExpr:!0},aa={binop:2,beforeExpr:!0},oa={binop:3,beforeExpr:!0},ua={binop:4,beforeExpr:!0},sa={binop:5,beforeExpr:!0},ia={binop:6,beforeExpr:!0},ca={binop:7,beforeExpr:!0},da={binop:8,beforeExpr:!0},pa={binop:9,prefix:!0,beforeExpr:!0},fa={binop:10,beforeExpr:!0},ga={binop:10,beforeExpr:!0},ha={binop:11,beforeExpr:!0,rightAssociative:!0},ma={type:"jsxTagStart"},ya={type:"jsxTagEnd"};e.tokTypes={bracketL:Or,bracketR:Mr,braceL:Dr,braceR:Br,parenL:Nr,parenR:Fr,comma:Vr,semi:Ur,colon:qr,dot:Gr,ellipsis:Jr,question:Hr,slash:Zr,eq:ea,name:$t,eof:Kt,num:Jt,regexp:Yt,string:zt,paamayimNekudotayim:Kr,exponent:ha,hash:Qr,arrow:Wr,template:Xr,star:ga,assign:na,backQuote:Yr,dollarBraceL:zr,jsxName:Qt,jsxText:$r,jsxTagStart:ma,jsxTagEnd:ya};for(var xa in Pr)e.tokTypes["_"+xa]=Pr[xa];var ba=function(e){switch(e.length){case 6:switch(e){case"double":case"export":case"import":case"native":case"public":case"static":case"throws":return!0}return!1;case 4:switch(e){case"byte":case"char":case"enum":case"goto":case"long":return!0}return!1;case 5:switch(e){case"class":case"final":case"float":case"short":case"super":return!0}return!1;case 7:switch(e){case"boolean":case"extends":case"package":case"private":return!0}return!1;case 9:switch(e){case"interface":case"protected":case"transient":return!0}return!1;case 8:switch(e){case"abstract":case"volatile":return!0}return!1;case 10:return"implements"===e;case 3:return"int"===e;case 12:return"synchronized"===e}},_a=function(e){switch(e.length){case 5:switch(e){case"class":case"super":case"const":return!0}return!1;case 6:switch(e){case"export":case"import":return!0}return!1;case 4:return"enum"===e;case 7:return"extends"===e}},va=function(e){switch(e.length){case 9:switch(e){case"interface":case"protected":return!0}return!1;case 7:switch(e){case"package":case"private":return!0}return!1;case 6:switch(e){case"public":case"static":return!0}return!1;case 10:return"implements"===e;case 3:return"let"===e;case 5:return"yield"===e}},Ia=function(e){switch(e){case"eval":case"arguments":return!0}return!1},ka=function(e){switch(e.length){case 4:switch(e){case"case":case"else":case"with":case"null":case"true":case"void":case"this":return!0}return!1;case 5:switch(e){case"break":case"catch":case"throw":case"while":case"false":return!0}return!1;case 3:switch(e){case"for":case"try":case"var":case"new":return!0}return!1;case 6:switch(e){case"return":case"switch":case"typeof":case"delete":return!0}return!1;case 8:switch(e){case"continue":case"debugger":case"function":return!0}return!1;case 2:switch(e){case"do":case"if":case"in":return!0}return!1;case 7:switch(e){case"default":case"finally":return!0}return!1;case 10:return"instanceof"===e}},Ea=function(e){switch(e.length){case 5:switch(e){case"break":case"catch":case"throw":case"while":case"false":case"const":case"class":case"yield":return!0}return!1;case 4:switch(e){case"case":case"else":case"with":case"null":case"true":case"void":case"this":return!0}return!1;case 6:switch(e){case"return":case"switch":case"typeof":case"delete":case"export":case"import":return!0}return!1;case 3:switch(e){case"for":case"try":case"var":case"new":case"let":return!0}return!1;case 8:switch(e){case"continue":case"debugger":case"function":return!0}return!1;case 7:switch(e){case"default":case"finally":case"extends":return!0}return!1;case 2:switch(e){case"do":case"if":case"in":return!0}return!1;case 10:return"instanceof"===e}},wa=ka,Ra=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,Sa="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Ca="̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧙ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_",Aa=new RegExp("["+Sa+"]"),ja=new RegExp("["+Sa+Ca+"]"),Ta=/^\d+$/,La=/^[\da-fA-F]+$/,Pa=/[\n\r\u2028\u2029]/,Oa=/\r\n|[\n\r\u2028\u2029]/g,Ma=e.isIdentifierStart=function(e){return 65>e?36===e:91>e?!0:97>e?95===e:123>e?!0:e>=170&&Aa.test(String.fromCharCode(e))},Da=e.isIdentifierChar=function(e){return 48>e?36===e:58>e?!0:65>e?!1:91>e?!0:97>e?95===e:123>e?!0:e>=170&&ja.test(String.fromCharCode(e))};o.prototype.offset=function(e){return new o(this.line,this.column+e)};var Ba={token:"{",isExpr:!1},Na={token:"{",isExpr:!0},Fa={token:"${",isExpr:!0},Va={token:"(",isExpr:!1},Ua={token:"(",isExpr:!0},qa={token:"`",isExpr:!0},Ga={token:"function",isExpr:!0},Ha={token:"<tag",isExpr:!1},Wa={token:"</tag",isExpr:!1},Xa={token:"<tag>...</tag>",isExpr:!0},Ja=!1;try{new RegExp("￿","u"),Ja=!0}catch(Ya){}var za,$a={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪","int":"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},$a={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪","int":"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"};e.Node=X;var Ka={kind:"loop"},Qa={kind:"switch"}})},{}],123:[function(e){var n=e("../lib/types"),l=n.Type,t=l.def,r=l.or,a=n.builtInTypes,o=a.string,u=a.number,s=a.boolean,i=a.RegExp,c=e("../lib/shared"),d=c.defaults,p=c.geq;t("Printable").field("loc",r(t("SourceLocation"),null),d["null"],!0),t("Node").bases("Printable").field("type",o).field("comments",r([t("Comment")],null),d["null"],!0),t("SourceLocation").build("start","end","source").field("start",t("Position")).field("end",t("Position")).field("source",r(o,null),d["null"]),t("Position").build("line","column").field("line",p(1)).field("column",p(0)),t("Program").bases("Node").build("body").field("body",[t("Statement")]),t("Function").bases("Node").field("id",r(t("Identifier"),null),d["null"]).field("params",[t("Pattern")]).field("body",r(t("BlockStatement"),t("Expression"))),t("Statement").bases("Node"),t("EmptyStatement").bases("Statement").build(),t("BlockStatement").bases("Statement").build("body").field("body",[t("Statement")]),t("ExpressionStatement").bases("Statement").build("expression").field("expression",t("Expression")),t("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",t("Expression")).field("consequent",t("Statement")).field("alternate",r(t("Statement"),null),d["null"]),t("LabeledStatement").bases("Statement").build("label","body").field("label",t("Identifier")).field("body",t("Statement")),t("BreakStatement").bases("Statement").build("label").field("label",r(t("Identifier"),null),d["null"]),t("ContinueStatement").bases("Statement").build("label").field("label",r(t("Identifier"),null),d["null"]),t("WithStatement").bases("Statement").build("object","body").field("object",t("Expression")).field("body",t("Statement")),t("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",t("Expression")).field("cases",[t("SwitchCase")]).field("lexical",s,d["false"]),t("ReturnStatement").bases("Statement").build("argument").field("argument",r(t("Expression"),null)),t("ThrowStatement").bases("Statement").build("argument").field("argument",t("Expression")),t("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",t("BlockStatement")).field("handler",r(t("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[t("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[t("CatchClause")],d.emptyArray).field("finalizer",r(t("BlockStatement"),null),d["null"]),t("CatchClause").bases("Node").build("param","guard","body").field("param",t("Pattern")).field("guard",r(t("Expression"),null),d["null"]).field("body",t("BlockStatement")),t("WhileStatement").bases("Statement").build("test","body").field("test",t("Expression")).field("body",t("Statement")),t("DoWhileStatement").bases("Statement").build("body","test").field("body",t("Statement")).field("test",t("Expression")),t("ForStatement").bases("Statement").build("init","test","update","body").field("init",r(t("VariableDeclaration"),t("Expression"),null)).field("test",r(t("Expression"),null)).field("update",r(t("Expression"),null)).field("body",t("Statement")),t("ForInStatement").bases("Statement").build("left","right","body","each").field("left",r(t("VariableDeclaration"),t("Expression"))).field("right",t("Expression")).field("body",t("Statement")).field("each",s),t("DebuggerStatement").bases("Statement").build(),t("Declaration").bases("Statement"),t("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",t("Identifier")),t("FunctionExpression").bases("Function","Expression").build("id","params","body"),t("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",r("var","let","const")).field("declarations",[r(t("VariableDeclarator"),t("Identifier"))]),t("VariableDeclarator").bases("Node").build("id","init").field("id",t("Pattern")).field("init",r(t("Expression"),null)),t("Expression").bases("Node","Pattern"),t("ThisExpression").bases("Expression").build(),t("ArrayExpression").bases("Expression").build("elements").field("elements",[r(t("Expression"),null)]),t("ObjectExpression").bases("Expression").build("properties").field("properties",[t("Property")]),t("Property").bases("Node").build("kind","key","value").field("kind",r("init","get","set")).field("key",r(t("Literal"),t("Identifier"))).field("value",t("Expression")),t("SequenceExpression").bases("Expression").build("expressions").field("expressions",[t("Expression")]);var f=r("-","+","!","~","typeof","void","delete");t("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",f).field("argument",t("Expression")).field("prefix",s,d["true"]);var g=r("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof","..");t("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",g).field("left",t("Expression")).field("right",t("Expression"));var h=r("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");t("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",h).field("left",t("Pattern")).field("right",t("Expression"));var m=r("++","--");t("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",m).field("argument",t("Expression")).field("prefix",s);var y=r("||","&&");t("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",y).field("left",t("Expression")).field("right",t("Expression")),t("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",t("Expression")).field("consequent",t("Expression")).field("alternate",t("Expression")),t("NewExpression").bases("Expression").build("callee","arguments").field("callee",t("Expression")).field("arguments",[t("Expression")]),t("CallExpression").bases("Expression").build("callee","arguments").field("callee",t("Expression")).field("arguments",[t("Expression")]),t("MemberExpression").bases("Expression").build("object","property","computed").field("object",t("Expression")).field("property",r(t("Identifier"),t("Expression"))).field("computed",s),t("Pattern").bases("Node"),t("ObjectPattern").bases("Pattern").build("properties").field("properties",[t("PropertyPattern")]),t("PropertyPattern").bases("Pattern").build("key","pattern").field("key",r(t("Literal"),t("Identifier"))).field("pattern",t("Pattern")),t("ArrayPattern").bases("Pattern").build("elements").field("elements",[r(t("Pattern"),null)]),t("SwitchCase").bases("Node").build("test","consequent").field("test",r(t("Expression"),null)).field("consequent",[t("Statement")]),t("Identifier").bases("Node","Expression","Pattern").build("name").field("name",o),t("Literal").bases("Node","Expression").build("value").field("value",r(o,s,null,u,i)),t("Comment").bases("Printable").field("value",o).field("leading",s,d["true"]).field("trailing",s,d["false"]),t("Block").bases("Comment").build("value","leading","trailing"),t("Line").bases("Comment").build("value","leading","trailing")},{"../lib/shared":134,"../lib/types":135}],124:[function(e){e("./core");var n=e("../lib/types"),l=n.Type.def,t=n.Type.or,r=n.builtInTypes,a=r.string,o=r.boolean;l("XMLDefaultDeclaration").bases("Declaration").field("namespace",l("Expression")),l("XMLAnyName").bases("Expression"),l("XMLQualifiedIdentifier").bases("Expression").field("left",t(l("Identifier"),l("XMLAnyName"))).field("right",t(l("Identifier"),l("Expression"))).field("computed",o),l("XMLFunctionQualifiedIdentifier").bases("Expression").field("right",t(l("Identifier"),l("Expression"))).field("computed",o),l("XMLAttributeSelector").bases("Expression").field("attribute",l("Expression")),l("XMLFilterExpression").bases("Expression").field("left",l("Expression")).field("right",l("Expression")),l("XMLElement").bases("XML","Expression").field("contents",[l("XML")]),l("XMLList").bases("XML","Expression").field("contents",[l("XML")]),l("XML").bases("Node"),l("XMLEscape").bases("XML").field("expression",l("Expression")),l("XMLText").bases("XML").field("text",a),l("XMLStartTag").bases("XML").field("contents",[l("XML")]),l("XMLEndTag").bases("XML").field("contents",[l("XML")]),l("XMLPointTag").bases("XML").field("contents",[l("XML")]),l("XMLName").bases("XML").field("contents",t(a,[l("XML")])),l("XMLAttribute").bases("XML").field("value",a),l("XMLCdata").bases("XML").field("contents",a),l("XMLComment").bases("XML").field("contents",a),l("XMLProcessingInstruction").bases("XML").field("target",a).field("contents",t(a,null))},{"../lib/types":135,"./core":123}],125:[function(e){e("./core");var n=e("../lib/types"),l=n.Type.def,t=n.Type.or,r=n.builtInTypes,a=r.boolean,o=(r.object,r.string),u=e("../lib/shared").defaults;l("Function").field("generator",a,u["false"]).field("expression",a,u["false"]).field("defaults",[t(l("Expression"),null)],u.emptyArray).field("rest",t(l("Identifier"),null),u["null"]),l("FunctionDeclaration").build("id","params","body","generator","expression"),l("FunctionExpression").build("id","params","body","generator","expression"),l("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,u["null"]).field("generator",!1),l("YieldExpression").bases("Expression").build("argument","delegate").field("argument",t(l("Expression"),null)).field("delegate",a,u["false"]),l("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",l("Expression")).field("blocks",[l("ComprehensionBlock")]).field("filter",t(l("Expression"),null)),l("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",l("Expression")).field("blocks",[l("ComprehensionBlock")]).field("filter",t(l("Expression"),null)),l("ComprehensionBlock").bases("Node").build("left","right","each").field("left",l("Pattern")).field("right",l("Expression")).field("each",a),l("ModuleSpecifier").bases("Literal").build("value").field("value",o),l("Property").field("key",t(l("Literal"),l("Identifier"),l("Expression"))).field("method",a,u["false"]).field("shorthand",a,u["false"]).field("computed",a,u["false"]),l("PropertyPattern").field("key",t(l("Literal"),l("Identifier"),l("Expression"))).field("computed",a,u["false"]),l("MethodDefinition").bases("Declaration").build("kind","key","value").field("kind",t("init","get","set","")).field("key",t(l("Literal"),l("Identifier"),l("Expression"))).field("value",l("Function")).field("computed",a,u["false"]),l("SpreadElement").bases("Node").build("argument").field("argument",l("Expression")),l("ArrayExpression").field("elements",[t(l("Expression"),l("SpreadElement"),null)]),l("NewExpression").field("arguments",[t(l("Expression"),l("SpreadElement"))]),l("CallExpression").field("arguments",[t(l("Expression"),l("SpreadElement"))]),l("SpreadElementPattern").bases("Pattern").build("argument").field("argument",l("Pattern")); var s=t(l("MethodDefinition"),l("VariableDeclarator"),l("ClassPropertyDefinition"),l("ClassProperty"));l("ClassProperty").bases("Declaration").build("key").field("key",t(l("Literal"),l("Identifier"),l("Expression"))).field("computed",a,u["false"]),l("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",s),l("ClassBody").bases("Declaration").build("body").field("body",[s]),l("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",l("Identifier")).field("body",l("ClassBody")).field("superClass",t(l("Expression"),null),u["null"]),l("ClassExpression").bases("Expression").build("id","body","superClass").field("id",t(l("Identifier"),null),u["null"]).field("body",l("ClassBody")).field("superClass",t(l("Expression"),null),u["null"]).field("implements",[l("ClassImplements")],u.emptyArray),l("ClassImplements").bases("Node").build("id").field("id",l("Identifier")).field("superClass",t(l("Expression"),null),u["null"]),l("Specifier").bases("Node"),l("NamedSpecifier").bases("Specifier").field("id",l("Identifier")).field("name",t(l("Identifier"),null),u["null"]),l("ExportSpecifier").bases("NamedSpecifier").build("id","name"),l("ExportBatchSpecifier").bases("Specifier").build(),l("ImportSpecifier").bases("NamedSpecifier").build("id","name"),l("ImportNamespaceSpecifier").bases("Specifier").build("id").field("id",l("Identifier")),l("ImportDefaultSpecifier").bases("Specifier").build("id").field("id",l("Identifier")),l("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",a).field("declaration",t(l("Declaration"),l("Expression"),null)).field("specifiers",[t(l("ExportSpecifier"),l("ExportBatchSpecifier"))],u.emptyArray).field("source",t(l("ModuleSpecifier"),null),u["null"]),l("ImportDeclaration").bases("Declaration").build("specifiers","source").field("specifiers",[t(l("ImportSpecifier"),l("ImportNamespaceSpecifier"),l("ImportDefaultSpecifier"))],u.emptyArray).field("source",l("ModuleSpecifier")),l("TaggedTemplateExpression").bases("Expression").field("tag",l("Expression")).field("quasi",l("TemplateLiteral")),l("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[l("TemplateElement")]).field("expressions",[l("Expression")]),l("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:o,raw:o}).field("tail",a)},{"../lib/shared":134,"../lib/types":135,"./core":123}],126:[function(e){e("./core");var n=e("../lib/types"),l=n.Type.def,t=n.Type.or,r=n.builtInTypes,a=r.boolean,o=e("../lib/shared").defaults;l("Function").field("async",a,o["false"]),l("SpreadProperty").bases("Node").build("argument").field("argument",l("Expression")),l("ObjectExpression").field("properties",[t(l("Property"),l("SpreadProperty"))]),l("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",l("Pattern")),l("ObjectPattern").field("properties",[t(l("PropertyPattern"),l("SpreadPropertyPattern"))]),l("AwaitExpression").bases("Expression").build("argument","all").field("argument",t(l("Expression"),null)).field("all",a,o["false"])},{"../lib/shared":134,"../lib/types":135,"./core":123}],127:[function(e){e("./core");var n=e("../lib/types"),l=n.Type.def,t=n.Type.or,r=n.builtInTypes,a=r.string,o=r.boolean,u=e("../lib/shared").defaults;l("XJSAttribute").bases("Node").build("name","value").field("name",t(l("XJSIdentifier"),l("XJSNamespacedName"))).field("value",t(l("Literal"),l("XJSExpressionContainer"),null),u["null"]),l("XJSIdentifier").bases("Node").build("name").field("name",a),l("XJSNamespacedName").bases("Node").build("namespace","name").field("namespace",l("XJSIdentifier")).field("name",l("XJSIdentifier")),l("XJSMemberExpression").bases("MemberExpression").build("object","property").field("object",t(l("XJSIdentifier"),l("XJSMemberExpression"))).field("property",l("XJSIdentifier")).field("computed",o,u.false);var s=t(l("XJSIdentifier"),l("XJSNamespacedName"),l("XJSMemberExpression"));l("XJSSpreadAttribute").bases("Node").build("argument").field("argument",l("Expression"));var i=[t(l("XJSAttribute"),l("XJSSpreadAttribute"))];l("XJSExpressionContainer").bases("Expression").build("expression").field("expression",l("Expression")),l("XJSElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",l("XJSOpeningElement")).field("closingElement",t(l("XJSClosingElement"),null),u["null"]).field("children",[t(l("XJSElement"),l("XJSExpressionContainer"),l("XJSText"),l("Literal"))],u.emptyArray).field("name",s,function(){return this.openingElement.name}).field("selfClosing",o,function(){return this.openingElement.selfClosing}).field("attributes",i,function(){return this.openingElement.attributes}),l("XJSOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",s).field("attributes",i,u.emptyArray).field("selfClosing",o,u["false"]),l("XJSClosingElement").bases("Node").build("name").field("name",s),l("XJSText").bases("Literal").build("value").field("value",a),l("XJSEmptyExpression").bases("Expression").build(),l("Type").bases("Node"),l("AnyTypeAnnotation").bases("Type"),l("VoidTypeAnnotation").bases("Type"),l("NumberTypeAnnotation").bases("Type"),l("StringTypeAnnotation").bases("Type"),l("StringLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",a).field("raw",a),l("BooleanTypeAnnotation").bases("Type"),l("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",l("Type")),l("NullableTypeAnnotation").bases("Type").build("typeAnnotation").field("typeAnnotation",l("Type")),l("FunctionTypeAnnotation").bases("Type").build("params","returnType","rest","typeParameters").field("params",[l("FunctionTypeParam")]).field("returnType",l("Type")).field("rest",t(l("FunctionTypeParam"),null)).field("typeParameters",t(l("TypeParameterDeclaration"),null)),l("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",l("Identifier")).field("typeAnnotation",l("Type")).field("optional",o),l("ArrayTypeAnnotation").bases("Type").build("elementType").field("elementType",l("Type")),l("ObjectTypeAnnotation").bases("Type").build("properties").field("properties",[l("ObjectTypeProperty")]).field("indexers",[l("ObjectTypeIndexer")],u.emptyArray).field("callProperties",[l("ObjectTypeCallProperty")],u.emptyArray),l("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",t(l("Literal"),l("Identifier"))).field("value",l("Type")).field("optional",o),l("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",l("Identifier")).field("key",l("Type")).field("value",l("Type")),l("ObjectTypeCallProperty").bases("Node").build("value").field("value",l("FunctionTypeAnnotation")).field("static",o,!1),l("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",t(l("Identifier"),l("QualifiedTypeIdentifier"))).field("id",l("Identifier")),l("GenericTypeAnnotation").bases("Type").build("id","typeParameters").field("id",t(l("Identifier"),l("QualifiedTypeIdentifier"))).field("typeParameters",t(l("TypeParameterInstantiation"),null)),l("MemberTypeAnnotation").bases("Type").build("object","property").field("object",l("Identifier")).field("property",t(l("MemberTypeAnnotation"),l("GenericTypeAnnotation"))),l("UnionTypeAnnotation").bases("Type").build("types").field("types",[l("Type")]),l("IntersectionTypeAnnotation").bases("Type").build("types").field("types",[l("Type")]),l("TypeofTypeAnnotation").bases("Type").build("argument").field("argument",l("Type")),l("Identifier").field("typeAnnotation",t(l("TypeAnnotation"),null),u["null"]),l("TypeParameterDeclaration").bases("Node").build("params").field("params",[l("Identifier")]),l("TypeParameterInstantiation").bases("Node").build("params").field("params",[l("Type")]),l("Function").field("returnType",t(l("TypeAnnotation"),null),u["null"]).field("typeParameters",t(l("TypeParameterDeclaration"),null),u["null"]),l("ClassProperty").build("key","typeAnnotation").field("typeAnnotation",l("TypeAnnotation")).field("static",o,!1),l("ClassImplements").field("typeParameters",t(l("TypeParameterInstantiation"),null),u["null"]),l("InterfaceDeclaration").bases("Statement").build("id","body","extends").field("id",l("Identifier")).field("typeParameters",t(l("TypeParameterDeclaration"),null),u["null"]).field("body",l("ObjectTypeAnnotation")).field("extends",[l("InterfaceExtends")]),l("InterfaceExtends").bases("Node").build("id").field("id",l("Identifier")).field("typeParameters",t(l("TypeParameterInstantiation"),null)),l("TypeAlias").bases("Statement").build("id","typeParameters","right").field("id",l("Identifier")).field("typeParameters",t(l("TypeParameterDeclaration"),null)).field("right",l("Type")),l("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",l("Expression")).field("typeAnnotation",l("TypeAnnotation")),l("TupleTypeAnnotation").bases("Type").build("types").field("types",[l("Type")]),l("DeclareVariable").bases("Statement").build("id").field("id",l("Identifier")),l("DeclareFunction").bases("Statement").build("id").field("id",l("Identifier")),l("DeclareClass").bases("InterfaceDeclaration").build("id"),l("DeclareModule").bases("Statement").build("id","body").field("id",t(l("Identifier"),l("Literal"))).field("body",l("BlockStatement"))},{"../lib/shared":134,"../lib/types":135,"./core":123}],128:[function(e){e("./core");var n=e("../lib/types"),l=n.Type.def,t=n.Type.or,r=e("../lib/shared").geq;l("ForOfStatement").bases("Statement").build("left","right","body").field("left",t(l("VariableDeclaration"),l("Expression"))).field("right",l("Expression")).field("body",l("Statement")),l("LetStatement").bases("Statement").build("head","body").field("head",[l("VariableDeclarator")]).field("body",l("Statement")),l("LetExpression").bases("Expression").build("head","body").field("head",[l("VariableDeclarator")]).field("body",l("Expression")),l("GraphExpression").bases("Expression").build("index","expression").field("index",r(0)).field("expression",l("Literal")),l("GraphIndexExpression").bases("Expression").build("index").field("index",r(0))},{"../lib/shared":134,"../lib/types":135,"./core":123}],129:[function(e,n){function l(e,n,l){return d.check(l)?l.length=0:l=null,r(e,n,l)}function t(e){return/[_$a-z][_$a-z0-9]*/i.test(e)?"."+e:"["+JSON.stringify(e)+"]"}function r(e,n,l){return e===n?!0:d.check(e)?a(e,n,l):p.check(e)?o(e,n,l):f.check(e)?f.check(n)&&+e===+n:g.check(e)?g.check(n)&&e.source===n.source&&e.global===n.global&&e.multiline===n.multiline&&e.ignoreCase===n.ignoreCase:e==n}function a(e,n,l){d.assert(e);var t=e.length;if(!d.check(n)||n.length!==t)return l&&l.push("length"),!1;for(var a=0;t>a;++a){if(l&&l.push(a),a in e!=a in n)return!1;if(!r(e[a],n[a],l))return!1;l&&u.strictEqual(l.pop(),a)}return!0}function o(e,n,l){if(p.assert(e),!p.check(n))return!1;if(e.type!==n.type)return l&&l.push("type"),!1;var t=i(e),a=t.length,o=i(n),s=o.length;if(a===s){for(var d=0;a>d;++d){var f=t[d],g=c(e,f),m=c(n,f);if(l&&l.push(f),!r(g,m,l))return!1;l&&u.strictEqual(l.pop(),f)}return!0}if(!l)return!1;var y=Object.create(null);for(d=0;a>d;++d)y[t[d]]=!0;for(d=0;s>d;++d){if(f=o[d],!h.call(y,f))return l.push(f),!1;delete y[f]}for(f in y){l.push(f);break}return!1}var u=e("assert"),s=e("../main"),i=s.getFieldNames,c=s.getFieldValue,d=s.builtInTypes.array,p=s.builtInTypes.object,f=s.builtInTypes.Date,g=s.builtInTypes.RegExp,h=Object.prototype.hasOwnProperty;l.assert=function(e,n){var r=[];l(e,n,r)||(0===r.length?u.strictEqual(e,n):u.ok(!1,"Nodes differ in the following path: "+r.map(t).join("")))},n.exports=l},{"../main":136,assert:138}],130:[function(e,n){function l(e,n,t){s.ok(this instanceof l),g.call(this,e,n,t)}function t(e){return c.BinaryExpression.check(e)||c.LogicalExpression.check(e)}function r(e){return c.CallExpression.check(e)?!0:f.check(e)?e.some(r):c.Node.check(e)?i.someField(e,function(e,n){return r(n)}):!1}function a(e){for(var n,l;e.parent;e=e.parent){if(n=e.node,l=e.parent.node,c.BlockStatement.check(l)&&"body"===e.parent.name&&0===e.name)return s.strictEqual(l.body[0],n),!0;if(c.ExpressionStatement.check(l)&&"expression"===e.name)return s.strictEqual(l.expression,n),!0;if(c.SequenceExpression.check(l)&&"expressions"===e.parent.name&&0===e.name)s.strictEqual(l.expressions[0],n);else if(c.CallExpression.check(l)&&"callee"===e.name)s.strictEqual(l.callee,n);else if(c.MemberExpression.check(l)&&"object"===e.name)s.strictEqual(l.object,n);else if(c.ConditionalExpression.check(l)&&"test"===e.name)s.strictEqual(l.test,n);else if(t(l)&&"left"===e.name)s.strictEqual(l.left,n);else{if(!c.UnaryExpression.check(l)||l.prefix||"argument"!==e.name)return!1;s.strictEqual(l.argument,n)}}return!0}function o(e){if(c.VariableDeclaration.check(e.node)){var n=e.get("declarations").value;if(!n||0===n.length)return e.prune()}else if(c.ExpressionStatement.check(e.node)){if(!e.get("expression").value)return e.prune()}else c.IfStatement.check(e.node)&&u(e);return e}function u(e){var n=e.get("test").value,l=e.get("alternate").value,t=e.get("consequent").value;if(t||l){if(!t&&l){var r=d.unaryExpression("!",n,!0);c.UnaryExpression.check(n)&&"!"===n.operator&&(r=n.argument),e.get("test").replace(r),e.get("consequent").replace(l),e.get("alternate").replace()}}else{var a=d.expressionStatement(n);e.replace(a)}}var s=e("assert"),i=e("./types"),c=i.namedTypes,d=i.builders,p=i.builtInTypes.number,f=i.builtInTypes.array,g=e("./path"),h=e("./scope");e("util").inherits(l,g);var m=l.prototype;Object.defineProperties(m,{node:{get:function(){return Object.defineProperty(this,"node",{configurable:!0,value:this._computeNode()}),this.node}},parent:{get:function(){return Object.defineProperty(this,"parent",{configurable:!0,value:this._computeParent()}),this.parent}},scope:{get:function(){return Object.defineProperty(this,"scope",{configurable:!0,value:this._computeScope()}),this.scope}}}),m.replace=function(){return delete this.node,delete this.parent,delete this.scope,g.prototype.replace.apply(this,arguments)},m.prune=function(){var e=this.parent;return this.replace(),o(e)},m._computeNode=function(){var e=this.value;if(c.Node.check(e))return e;var n=this.parentPath;return n&&n.node||null},m._computeParent=function(){var e=this.value,n=this.parentPath;if(!c.Node.check(e)){for(;n&&!c.Node.check(n.value);)n=n.parentPath;n&&(n=n.parentPath)}for(;n&&!c.Node.check(n.value);)n=n.parentPath;return n||null},m._computeScope=function(){var e=this.value,n=this.parentPath,l=n&&n.scope;return c.Node.check(e)&&h.isEstablishedBy(e)&&(l=new h(this,l)),l||null},m.getValueProperty=function(e){return i.getFieldValue(this.value,e)},m.needsParens=function(e){var n=this.parentPath;if(!n)return!1;var l=this.value;if(!c.Expression.check(l))return!1;if("Identifier"===l.type)return!1;for(;!c.Node.check(n.value);)if(n=n.parentPath,!n)return!1;var t=n.value;switch(l.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return"MemberExpression"===t.type&&"object"===this.name&&t.object===l;case"BinaryExpression":case"LogicalExpression":switch(t.type){case"CallExpression":return"callee"===this.name&&t.callee===l;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return"object"===this.name&&t.object===l;case"BinaryExpression":case"LogicalExpression":var a=t.operator,n=y[a],o=l.operator,u=y[o];if(n>u)return!0;if(n===u&&"right"===this.name)return s.strictEqual(t.right,l),!0;default:return!1}case"SequenceExpression":switch(t.type){case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==this.name;default:return!0}case"YieldExpression":switch(t.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return"MemberExpression"===t.type&&p.check(l.value)&&"object"===this.name&&t.object===l;case"AssignmentExpression":case"ConditionalExpression":switch(t.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return"callee"===this.name&&t.callee===l;case"ConditionalExpression":return"test"===this.name&&t.test===l;case"MemberExpression":return"object"===this.name&&t.object===l;default:return!1}default:if("NewExpression"===t.type&&"callee"===this.name&&t.callee===l)return r(l)}return e!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement()?!0:!1};var y={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(e,n){e.forEach(function(e){y[e]=n})}),m.canBeFirstInStatement=function(){var e=this.node;return!c.FunctionExpression.check(e)&&!c.ObjectExpression.check(e)},m.firstInStatement=function(){return a(this)},n.exports=l},{"./path":132,"./scope":133,"./types":135,assert:138,util:163}],131:[function(e,n){function l(){s.ok(this instanceof l),this._reusableContextStack=[],this._methodNameTable=t(this),this.Context=o(this),this._visiting=!1,this._changeReported=!1}function t(e){var n=Object.create(null);for(var l in e)/^visit[A-Z]/.test(l)&&(n[l.slice("visit".length)]=!0);for(var t=i.computeSupertypeLookupTable(n),r=Object.create(null),n=Object.keys(t),a=n.length,o=0;a>o;++o){var u=n[o];l="visit"+t[u],g.check(e[l])&&(r[u]=l)}return r}function r(e,n){for(var l in n)h.call(n,l)&&(e[l]=n[l]);return e}function a(e,n){s.ok(e instanceof c),s.ok(n instanceof l);var t=e.value;if(p.check(t))e.each(n.visitWithoutReset,n);else if(f.check(t)){for(var r=i.getFieldNames(t),a=r.length,o=[],u=0;a>u;++u){var d=r[u];h.call(t,d)||(t[d]=i.getFieldValue(t,d)),o.push(e.get(d))}for(var u=0;a>u;++u)n.visitWithoutReset(o[u])}else;return e.value}function o(e){function n(t){s.ok(this instanceof n),s.ok(this instanceof l),s.ok(t instanceof c),Object.defineProperty(this,"visitor",{value:e,writable:!1,enumerable:!0,configurable:!1}),this.currentPath=t,this.needToCallTraverse=!0,Object.seal(this)}s.ok(e instanceof l);var t=n.prototype=Object.create(e);return t.constructor=n,r(t,x),n}var u,s=e("assert"),i=e("./types"),c=e("./node-path"),d=i.namedTypes.Node,p=i.builtInTypes.array,f=i.builtInTypes.object,g=i.builtInTypes.function,h=Object.prototype.hasOwnProperty;l.fromMethodsObject=function(e){function n(){s.ok(this instanceof n),l.call(this)}if(e instanceof l)return e;if(!f.check(e))return new l;var t=n.prototype=Object.create(m);return t.constructor=n,r(t,e),r(n,l),g.assert(n.fromMethodsObject),g.assert(n.visit),new n},l.visit=function(e,n){return l.fromMethodsObject(n).visit(e)};var m=l.prototype,y=["Recursively calling visitor.visit(path) resets visitor state.","Try this.visit(path) or this.traverse(path) instead."].join(" ");m.visit=function(){s.ok(!this._visiting,y),this._visiting=!0,this._changeReported=!1;for(var e=arguments.length,n=new Array(e),l=0;e>l;++l)n[l]=arguments[l];n[0]instanceof c||(n[0]=new c({root:n[0]}).get("root")),this.reset.apply(this,n);try{return this.visitWithoutReset(n[0])}finally{this._visiting=!1}},m.reset=function(){},m.visitWithoutReset=function(e){if(this instanceof this.Context)return this.visitor.visitWithoutReset(e);s.ok(e instanceof c);var n=e.value,l=d.check(n)&&this._methodNameTable[n.type];if(!l)return a(e,this);var t=this.acquireContext(e);try{return t.invokeVisitorMethod(l)}finally{this.releaseContext(t)}},m.acquireContext=function(e){return 0===this._reusableContextStack.length?new this.Context(e):this._reusableContextStack.pop().reset(e)},m.releaseContext=function(e){s.ok(e instanceof this.Context),this._reusableContextStack.push(e),e.currentPath=null},m.reportChanged=function(){this._changeReported=!0},m.wasChangeReported=function(){return this._changeReported};var x=Object.create(null);x.reset=function(e){return s.ok(this instanceof this.Context),s.ok(e instanceof c),this.currentPath=e,this.needToCallTraverse=!0,this},x.invokeVisitorMethod=function(e){s.ok(this instanceof this.Context),s.ok(this.currentPath instanceof c);var n=this.visitor[e].call(this,this.currentPath);n===!1?this.needToCallTraverse=!1:n!==u&&(this.currentPath=this.currentPath.replace(n)[0],this.needToCallTraverse&&this.traverse(this.currentPath)),s.strictEqual(this.needToCallTraverse,!1,"Must either call this.traverse or return false in "+e);var l=this.currentPath;return l&&l.value},x.traverse=function(e,n){return s.ok(this instanceof this.Context),s.ok(e instanceof c),s.ok(this.currentPath instanceof c),this.needToCallTraverse=!1,a(e,l.fromMethodsObject(n||this.visitor))},x.visit=function(e,n){return s.ok(this instanceof this.Context),s.ok(e instanceof c),s.ok(this.currentPath instanceof c),this.needToCallTraverse=!1,l.fromMethodsObject(n||this.visitor).visitWithoutReset(e)},x.reportChanged=function(){this.visitor.reportChanged()},n.exports=l},{"./node-path":130,"./types":135,assert:138}],132:[function(e,n){function l(e,n,t){s.ok(this instanceof l),n?s.ok(n instanceof l):(n=null,t=null),this.value=e,this.parentPath=n,this.name=t,this.__childCache=null}function t(e){return e.__childCache||(e.__childCache=Object.create(null))}function r(e,n){var l=t(e),r=e.getValueProperty(n),a=l[n];return c.call(l,n)&&a.value===r||(a=l[n]=new e.constructor(r,e,n)),a}function a(){}function o(e,n,l,r){if(p.assert(e.value),0===n)return a;var o=e.value.length;if(1>o)return a;var u=arguments.length;2===u?(l=0,r=o):3===u?(l=Math.max(l,0),r=o):(l=Math.max(l,0),r=Math.min(r,o)),f.assert(l),f.assert(r);for(var i=Object.create(null),d=t(e),g=l;r>g;++g)if(c.call(e.value,g)){var h=e.get(g);s.strictEqual(h.name,g);var m=g+n;h.name=m,i[m]=h,delete d[g]}return delete d.length,function(){for(var n in i){var l=i[n];s.strictEqual(l.name,+n),d[n]=l,e.value[n]=l.value}}}function u(e){s.ok(e instanceof l);var n=e.parentPath;if(!n)return e;var r=n.value,a=t(n);if(r[e.name]===e.value)a[e.name]=e;else if(p.check(r)){var o=r.indexOf(e.value);o>=0&&(a[e.name=o]=e)}else r[e.name]=e.value,a[e.name]=e;return s.strictEqual(r[e.name],e.value),s.strictEqual(e.parentPath.get(e.name),e),e}var s=e("assert"),i=Object.prototype,c=i.hasOwnProperty,d=e("./types"),p=d.builtInTypes.array,f=d.builtInTypes.number,g=Array.prototype,h=(g.slice,g.map,l.prototype);h.getValueProperty=function(e){return this.value[e]},h.get=function(){for(var e=this,n=arguments,l=n.length,t=0;l>t;++t)e=r(e,n[t]);return e},h.each=function(e,n){for(var l=[],t=this.value.length,r=0,r=0;t>r;++r)c.call(this.value,r)&&(l[r]=this.get(r));for(n=n||this,r=0;t>r;++r)c.call(l,r)&&e.call(n,l[r])},h.map=function(e,n){var l=[];return this.each(function(n){l.push(e.call(this,n))},n),l},h.filter=function(e,n){var l=[];return this.each(function(n){e.call(this,n)&&l.push(n)},n),l},h.shift=function(){var e=o(this,-1),n=this.value.shift();return e(),n},h.unshift=function(){var e=o(this,arguments.length),n=this.value.unshift.apply(this.value,arguments);return e(),n},h.push=function(){return p.assert(this.value),delete t(this).length,this.value.push.apply(this.value,arguments)},h.pop=function(){p.assert(this.value);var e=t(this);return delete e[this.value.length-1],delete e.length,this.value.pop()},h.insertAt=function(e){var n=arguments.length,l=o(this,n-1,e);if(l===a)return this;e=Math.max(e,0);for(var t=1;n>t;++t)this.value[e+t-1]=arguments[t];return l(),this},h.insertBefore=function(){for(var e=this.parentPath,n=arguments.length,l=[this.name],t=0;n>t;++t)l.push(arguments[t]);return e.insertAt.apply(e,l)},h.insertAfter=function(){for(var e=this.parentPath,n=arguments.length,l=[this.name+1],t=0;n>t;++t)l.push(arguments[t]);return e.insertAt.apply(e,l)},h.replace=function(e){var n=[],l=this.parentPath.value,r=t(this.parentPath),a=arguments.length;if(u(this),p.check(l)){for(var i=l.length,c=o(this.parentPath,a-1,this.name+1),d=[this.name,1],f=0;a>f;++f)d.push(arguments[f]);var g=l.splice.apply(l,d);if(s.strictEqual(g[0],this.value),s.strictEqual(l.length,i-1+a),c(),0===a)delete this.value,delete r[this.name],this.__childCache=null;else{for(s.strictEqual(l[this.name],e),this.value!==e&&(this.value=e,this.__childCache=null),f=0;a>f;++f)n.push(this.parentPath.get(this.name+f));s.strictEqual(n[0],this)}}else 1===a?(this.value!==e&&(this.__childCache=null),this.value=l[this.name]=e,n.push(this)):0===a?(delete l[this.name],delete this.value,this.__childCache=null):s.ok(!1,"Could not replace path");return n},n.exports=l},{"./types":135,assert:138}],133:[function(e,n){function l(n,t){u.ok(this instanceof l),u.ok(n instanceof e("./node-path")),y.assert(n.value);var r;t?(u.ok(t instanceof l),r=t.depth+1):(t=null,r=0),Object.defineProperties(this,{path:{value:n},node:{value:n.value},isGlobal:{value:!t,enumerable:!0},depth:{value:r},parent:{value:t},bindings:{value:{}}})}function t(e,n){var l=e.value;y.assert(l),c.CatchClause.check(l)?o(e.get("param"),n):r(e,n)}function r(e,n){var l=e.value;e.parent&&c.FunctionExpression.check(e.parent.node)&&e.parent.node.id&&o(e.parent.get("id"),n),l&&(f.check(l)?e.each(function(e){a(e,n)}):c.Function.check(l)?(e.get("params").each(function(e){o(e,n)}),a(e.get("body"),n)):c.VariableDeclarator.check(l)?(o(e.get("id"),n),a(e.get("init"),n)):"ImportSpecifier"===l.type||"ImportNamespaceSpecifier"===l.type||"ImportDefaultSpecifier"===l.type?o(e.get(l.name?"name":"id"),n):d.check(l)&&!p.check(l)&&s.eachField(l,function(l,t){var r=e.get(l);u.strictEqual(r.value,t),a(r,n)}))}function a(e,n){var l=e.value;if(!l||p.check(l));else if(c.FunctionDeclaration.check(l))o(e.get("id"),n);else if(c.ClassDeclaration&&c.ClassDeclaration.check(l))o(e.get("id"),n);else if(y.check(l)){if(c.CatchClause.check(l)){var t=l.param.name,a=g.call(n,t);r(e.get("body"),n),a||delete n[t]}}else r(e,n)}function o(e,n){var l=e.value;c.Pattern.assert(l),c.Identifier.check(l)?g.call(n,l.name)?n[l.name].push(e):n[l.name]=[e]:c.SpreadElement&&c.SpreadElement.check(l)&&o(e.get("argument"),n)}var u=e("assert"),s=e("./types"),i=s.Type,c=s.namedTypes,d=c.Node,p=c.Expression,f=s.builtInTypes.array,g=Object.prototype.hasOwnProperty,h=s.builders,m=[c.Program,c.Function,c.CatchClause],y=i.or.apply(i,m);l.isEstablishedBy=function(e){return y.check(e)};var x=l.prototype;x.didScan=!1,x.declares=function(e){return this.scan(),g.call(this.bindings,e)},x.declareTemporary=function(e){e?u.ok(/^[a-z$_]/i.test(e),e):e="t$",e+=this.depth.toString(36)+"$",this.scan();for(var n=0;this.declares(e+n);)++n;var l=e+n;return this.bindings[l]=s.builders.identifier(l)},x.injectTemporary=function(e,n){e||(e=this.declareTemporary());var l=this.path.get("body");return c.BlockStatement.check(l.value)&&(l=l.get("body")),l.unshift(h.variableDeclaration("var",[h.variableDeclarator(e,n||null)])),e},x.scan=function(e){if(e||!this.didScan){for(var n in this.bindings)delete this.bindings[n];t(this.path,this.bindings),this.didScan=!0}},x.getBindings=function(){return this.scan(),this.bindings},x.lookup=function(e){for(var n=this;n&&!n.declares(e);n=n.parent);return n},x.getGlobalScope=function(){for(var e=this;!e.isGlobal;)e=e.parent;return e},n.exports=l},{"./node-path":130,"./types":135,assert:138}],134:[function(e,n,l){var t=e("../lib/types"),r=t.Type,a=t.builtInTypes,o=a.number;l.geq=function(e){return new r(function(n){return o.check(n)&&n>=e},o+" >= "+e)},l.defaults={"null":function(){return null},emptyArray:function(){return[]},"false":function(){return!1},"true":function(){return!0},undefined:function(){}};var u=r.or(a.string,a.number,a.boolean,a.null,a.undefined);l.isPrimitive=new r(function(e){if(null===e)return!0;var n=typeof e;return!("object"===n||"function"===n)},u.toString())},{"../lib/types":135}],135:[function(e,n,l){function t(e,n){var l=this;g.ok(l instanceof t,l),g.strictEqual(b.call(e),_,e+" is not a function");var r=b.call(n);g.ok(r===_||r===v,n+" is neither a function nor a string"),Object.defineProperties(l,{name:{value:n},check:{value:function(n,t){var r=e.call(l,n,t);return!r&&t&&b.call(t)===_&&t(l,n),r}}})}function r(e){return C.check(e)?"{"+Object.keys(e).map(function(n){return n+": "+e[n]}).join(", ")+"}":S.check(e)?"["+e.map(r).join(", ")+"]":JSON.stringify(e)}function a(e,n){var l=b.call(e);return Object.defineProperty(E,n,{enumerable:!0,value:new t(function(e){return b.call(e)===l},n)}),E[n]}function o(e,n){return e instanceof t?e:e instanceof s?e.type:S.check(e)?t.fromArray(e):C.check(e)?t.fromObject(e):R.check(e)?new t(e,n):new t(function(n){return n===e},j.check(n)?function(){return e+""}:n)}function u(e,n,l,t){var r=this;g.ok(r instanceof u),w.assert(e),n=o(n);var a={name:{value:e},type:{value:n},hidden:{value:!!t}};R.check(l)&&(a.defaultFn={value:l}),Object.defineProperties(r,a)}function s(e){var n=this;g.ok(n instanceof s),Object.defineProperties(n,{typeName:{value:e},baseNames:{value:[]},ownFields:{value:Object.create(null)},allSupertypes:{value:Object.create(null)},supertypeList:{value:[]},allFields:{value:Object.create(null)},fieldNames:{value:[]},type:{value:new t(function(e,l){return n.check(e,l)},e)}})}function i(e){return e.replace(/^[A-Z]+/,function(e){var n=e.length;switch(n){case 0:return"";case 1:return e.toLowerCase();default:return e.slice(0,n-1).toLowerCase()+e.charAt(n-1)}})}function c(e){var n=s.fromValue(e);return n?n.fieldNames.slice(0):("type"in e&&g.ok(!1,"did not recognize object of type "+JSON.stringify(e.type)),Object.keys(e))}function d(e,n){var l=s.fromValue(e);if(l){var t=l.allFields[n];if(t)return t.getValue(e)}return e[n]}function p(e,n){n.length=0,n.push(e);for(var l=Object.create(null),t=0;t<n.length;++t){e=n[t];var r=L[e];g.strictEqual(r.finalized,!0),I.call(l,e)&&delete n[l[e]],l[e]=t,n.push.apply(n,r.baseNames)}for(var a=0,o=a,u=n.length;u>o;++o)I.call(n,o)&&(n[a++]=n[o]);n.length=a}function f(e,n){return Object.keys(n).forEach(function(l){e[l]=n[l]}),e}var g=e("assert"),h=Array.prototype,m=h.slice,y=(h.map,h.forEach),x=Object.prototype,b=x.toString,_=b.call(function(){}),v=b.call(""),I=x.hasOwnProperty,k=t.prototype;l.Type=t,k.assert=function(e,n){if(!this.check(e,n)){var l=r(e);return g.ok(!1,l+" does not match type "+this),!1}return!0},k.toString=function(){var e=this.name;return w.check(e)?e:R.check(e)?e.call(this)+"":e+" type"};var E={};l.builtInTypes=E;var w=a("","string"),R=a(function(){},"function"),S=a([],"array"),C=a({},"object"),A=(a(/./,"RegExp"),a(new Date,"Date"),a(3,"number")),j=(a(!0,"boolean"),a(null,"null"),a(void 0,"undefined"));t.or=function(){for(var e=[],n=arguments.length,l=0;n>l;++l)e.push(o(arguments[l]));return new t(function(l,t){for(var r=0;n>r;++r)if(e[r].check(l,t))return!0;return!1},function(){return e.join(" | ")})},t.fromArray=function(e){return g.ok(S.check(e)),g.strictEqual(e.length,1,"only one element type is permitted for typed arrays"),o(e[0]).arrayOf()},k.arrayOf=function(){var e=this;return new t(function(n,l){return S.check(n)&&n.every(function(n){return e.check(n,l)})},function(){return"["+e+"]"})},t.fromObject=function(e){var n=Object.keys(e).map(function(n){return new u(n,e[n])});return new t(function(e,l){return C.check(e)&&n.every(function(n){return n.type.check(e[n.name],l)})},function(){return"{ "+n.join(", ")+" }"})};var T=u.prototype;T.toString=function(){return JSON.stringify(this.name)+": "+this.type},T.getValue=function(e){var n=e[this.name];return j.check(n)?(this.defaultFn&&(n=this.defaultFn.call(e)),n):n},t.def=function(e){return w.assert(e),I.call(L,e)?L[e]:L[e]=new s(e)};var L=Object.create(null);s.fromValue=function(e){if(e&&"object"==typeof e){var n=e.type;if("string"==typeof n&&I.call(L,n)){var l=L[n];if(l.finalized)return l}}return null};var P=s.prototype;P.isSupertypeOf=function(e){return e instanceof s?(g.strictEqual(this.finalized,!0),g.strictEqual(e.finalized,!0),I.call(e.allSupertypes,this.typeName)):void g.ok(!1,e+" is not a Def")},l.getSupertypeNames=function(e){g.ok(I.call(L,e));var n=L[e];return g.strictEqual(n.finalized,!0),n.supertypeList.slice(1)},l.computeSupertypeLookupTable=function(e){for(var n={},l=Object.keys(L),t=l.length,r=0;t>r;++r){var a=l[r],o=L[a]; g.strictEqual(o.finalized,!0);for(var u=0;u<o.supertypeList.length;++u){var s=o.supertypeList[u];if(I.call(e,s)){n[a]=s;break}}}return n},P.checkAllFields=function(e,n){function l(l){var r=t[l],a=r.type,o=r.getValue(e);return a.check(o,n)}var t=this.allFields;return g.strictEqual(this.finalized,!0),C.check(e)&&Object.keys(t).every(l)},P.check=function(e,n){if(g.strictEqual(this.finalized,!0,"prematurely checking unfinalized type "+this.typeName),!C.check(e))return!1;var l=s.fromValue(e);return l?n&&l===this?this.checkAllFields(e,n):this.isSupertypeOf(l)?n?l.checkAllFields(e,n)&&this.checkAllFields(e,!1):!0:!1:"SourceLocation"===this.typeName||"Position"===this.typeName?this.checkAllFields(e,n):!1},P.bases=function(){var e=this.baseNames;return g.strictEqual(this.finalized,!1),y.call(arguments,function(n){w.assert(n),e.indexOf(n)<0&&e.push(n)}),this},Object.defineProperty(P,"buildable",{value:!1});var O={};l.builders=O;var M={};l.defineMethod=function(e,n){var l=M[e];return j.check(n)?delete M[e]:(R.assert(n),Object.defineProperty(M,e,{enumerable:!0,configurable:!0,value:n})),l},P.build=function(){var e=this;return Object.defineProperty(e,"buildParams",{value:m.call(arguments),writable:!1,enumerable:!1,configurable:!0}),g.strictEqual(e.finalized,!1),w.arrayOf().assert(e.buildParams),e.buildable?e:(e.field("type",e.typeName,function(){return e.typeName}),Object.defineProperty(e,"buildable",{value:!0}),Object.defineProperty(O,i(e.typeName),{enumerable:!0,value:function(){function n(n,o){if(!I.call(a,n)){var u=e.allFields;g.ok(I.call(u,n),n);var s,i=u[n],c=i.type;if(A.check(o)&&t>o)s=l[o];else if(i.defaultFn)s=i.defaultFn.call(a);else{var d="no value or default function given for field "+JSON.stringify(n)+" of "+e.typeName+"("+e.buildParams.map(function(e){return u[e]}).join(", ")+")";g.ok(!1,d)}c.check(s)||g.ok(!1,r(s)+" does not match field "+i+" of type "+e.typeName),a[n]=s}}var l=arguments,t=l.length,a=Object.create(M);return g.ok(e.finalized,"attempting to instantiate unfinalized type "+e.typeName),e.buildParams.forEach(function(e,l){n(e,l)}),Object.keys(e.allFields).forEach(function(e){n(e)}),g.strictEqual(a.type,e.typeName),a}}),e)},P.field=function(e,n,l,t){return g.strictEqual(this.finalized,!1),this.ownFields[e]=new u(e,n,l,t),this};var D={};l.namedTypes=D,l.getFieldNames=c,l.getFieldValue=d,l.eachField=function(e,n,l){c(e).forEach(function(l){n.call(this,l,d(e,l))},l)},l.someField=function(e,n,l){return c(e).some(function(l){return n.call(this,l,d(e,l))},l)},Object.defineProperty(P,"finalized",{value:!1}),P.finalize=function(){if(!this.finalized){var e=this.allFields,n=this.allSupertypes;this.baseNames.forEach(function(l){var t=L[l];t.finalize(),f(e,t.allFields),f(n,t.allSupertypes)}),f(e,this.ownFields),n[this.typeName]=this,this.fieldNames.length=0;for(var l in e)I.call(e,l)&&!e[l].hidden&&this.fieldNames.push(l);Object.defineProperty(D,this.typeName,{enumerable:!0,value:this.type}),Object.defineProperty(this,"finalized",{value:!0}),p(this.typeName,this.supertypeList)}},l.finalize=function(){Object.keys(L).forEach(function(e){L[e].finalize()})}},{assert:138}],136:[function(e,n,l){var t=e("./lib/types");e("./def/core"),e("./def/es6"),e("./def/es7"),e("./def/mozilla"),e("./def/e4x"),e("./def/fb-harmony"),t.finalize(),l.Type=t.Type,l.builtInTypes=t.builtInTypes,l.namedTypes=t.namedTypes,l.builders=t.builders,l.defineMethod=t.defineMethod,l.getFieldNames=t.getFieldNames,l.getFieldValue=t.getFieldValue,l.eachField=t.eachField,l.someField=t.someField,l.getSupertypeNames=t.getSupertypeNames,l.astNodesAreEquivalent=e("./lib/equiv"),l.finalize=t.finalize,l.NodePath=e("./lib/node-path"),l.PathVisitor=e("./lib/path-visitor"),l.visit=l.PathVisitor.visit},{"./def/core":123,"./def/e4x":124,"./def/es6":125,"./def/es7":126,"./def/fb-harmony":127,"./def/mozilla":128,"./lib/equiv":129,"./lib/node-path":130,"./lib/path-visitor":131,"./lib/types":135}],137:[function(){},{}],138:[function(e,n){function l(e,n){return p.isUndefined(n)?""+n:p.isNumber(n)&&!isFinite(n)?n.toString():p.isFunction(n)||p.isRegExp(n)?n.toString():n}function t(e,n){return p.isString(e)?e.length<n?e:e.slice(0,n):e}function r(e){return t(JSON.stringify(e.actual,l),128)+" "+e.operator+" "+t(JSON.stringify(e.expected,l),128)}function a(e,n,l,t,r){throw new h.AssertionError({message:l,actual:e,expected:n,operator:t,stackStartFunction:r})}function o(e,n){e||a(e,!0,n,"==",h.ok)}function u(e,n){if(e===n)return!0;if(p.isBuffer(e)&&p.isBuffer(n)){if(e.length!=n.length)return!1;for(var l=0;l<e.length;l++)if(e[l]!==n[l])return!1;return!0}return p.isDate(e)&&p.isDate(n)?e.getTime()===n.getTime():p.isRegExp(e)&&p.isRegExp(n)?e.source===n.source&&e.global===n.global&&e.multiline===n.multiline&&e.lastIndex===n.lastIndex&&e.ignoreCase===n.ignoreCase:p.isObject(e)||p.isObject(n)?i(e,n):e==n}function s(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function i(e,n){if(p.isNullOrUndefined(e)||p.isNullOrUndefined(n))return!1;if(e.prototype!==n.prototype)return!1;if(p.isPrimitive(e)||p.isPrimitive(n))return e===n;var l=s(e),t=s(n);if(l&&!t||!l&&t)return!1;if(l)return e=f.call(e),n=f.call(n),u(e,n);var r,a,o=m(e),i=m(n);if(o.length!=i.length)return!1;for(o.sort(),i.sort(),a=o.length-1;a>=0;a--)if(o[a]!=i[a])return!1;for(a=o.length-1;a>=0;a--)if(r=o[a],!u(e[r],n[r]))return!1;return!0}function c(e,n){return e&&n?"[object RegExp]"==Object.prototype.toString.call(n)?n.test(e):e instanceof n?!0:n.call({},e)===!0?!0:!1:!1}function d(e,n,l,t){var r;p.isString(l)&&(t=l,l=null);try{n()}catch(o){r=o}if(t=(l&&l.name?" ("+l.name+").":".")+(t?" "+t:"."),e&&!r&&a(r,l,"Missing expected exception"+t),!e&&c(r,l)&&a(r,l,"Got unwanted exception"+t),e&&r&&l&&!c(r,l)||!e&&r)throw r}var p=e("util/"),f=Array.prototype.slice,g=Object.prototype.hasOwnProperty,h=n.exports=o;h.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=r(this),this.generatedMessage=!0);var n=e.stackStartFunction||a;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var l=new Error;if(l.stack){var t=l.stack,o=n.name,u=t.indexOf("\n"+o);if(u>=0){var s=t.indexOf("\n",u+1);t=t.substring(s+1)}this.stack=t}}},p.inherits(h.AssertionError,Error),h.fail=a,h.ok=o,h.equal=function(e,n,l){e!=n&&a(e,n,l,"==",h.equal)},h.notEqual=function(e,n,l){e==n&&a(e,n,l,"!=",h.notEqual)},h.deepEqual=function(e,n,l){u(e,n)||a(e,n,l,"deepEqual",h.deepEqual)},h.notDeepEqual=function(e,n,l){u(e,n)&&a(e,n,l,"notDeepEqual",h.notDeepEqual)},h.strictEqual=function(e,n,l){e!==n&&a(e,n,l,"===",h.strictEqual)},h.notStrictEqual=function(e,n,l){e===n&&a(e,n,l,"!==",h.notStrictEqual)},h.throws=function(){d.apply(this,[!0].concat(f.call(arguments)))},h.doesNotThrow=function(){d.apply(this,[!1].concat(f.call(arguments)))},h.ifError=function(e){if(e)throw e};var m=Object.keys||function(e){var n=[];for(var l in e)g.call(e,l)&&n.push(l);return n}},{"util/":163}],139:[function(e,n,l){function t(e,n,l){if(!(this instanceof t))return new t(e,n,l);var r,a=typeof e;if("number"===a)r=+e;else if("string"===a)r=t.byteLength(e,n);else{if("object"!==a||null===e)throw new TypeError("must start with number, buffer, array or string");"Buffer"===e.type&&D(e.data)&&(e=e.data),r=+e.length}if(r>B)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+B.toString(16)+" bytes");0>r?r=0:r>>>=0;var o=this;t.TYPED_ARRAY_SUPPORT?o=t._augment(new Uint8Array(r)):(o.length=r,o._isBuffer=!0);var u;if(t.TYPED_ARRAY_SUPPORT&&"number"==typeof e.byteLength)o._set(e);else if(R(e))if(t.isBuffer(e))for(u=0;r>u;u++)o[u]=e.readUInt8(u);else for(u=0;r>u;u++)o[u]=(e[u]%256+256)%256;else if("string"===a)o.write(e,0,n);else if("number"===a&&!t.TYPED_ARRAY_SUPPORT&&!l)for(u=0;r>u;u++)o[u]=0;return r>0&&r<=t.poolSize&&(o.parent=N),o}function r(e,n,l){if(!(this instanceof r))return new r(e,n,l);var a=new t(e,n,l);return delete a.parent,a}function a(e,n,l,t){l=Number(l)||0;var r=e.length-l;t?(t=Number(t),t>r&&(t=r)):t=r;var a=n.length;if(a%2!==0)throw new Error("Invalid hex string");t>a/2&&(t=a/2);for(var o=0;t>o;o++){var u=parseInt(n.substr(2*o,2),16);if(isNaN(u))throw new Error("Invalid hex string");e[l+o]=u}return o}function o(e,n,l,t){var r=L(C(n,e.length-l),e,l,t);return r}function u(e,n,l,t){var r=L(A(n),e,l,t);return r}function s(e,n,l,t){return u(e,n,l,t)}function i(e,n,l,t){var r=L(T(n),e,l,t);return r}function c(e,n,l,t){var r=L(j(n,e.length-l),e,l,t,2);return r}function d(e,n,l){return O.fromByteArray(0===n&&l===e.length?e:e.slice(n,l))}function p(e,n,l){var t="",r="";l=Math.min(e.length,l);for(var a=n;l>a;a++)e[a]<=127?(t+=P(r)+String.fromCharCode(e[a]),r=""):r+="%"+e[a].toString(16);return t+P(r)}function f(e,n,l){var t="";l=Math.min(e.length,l);for(var r=n;l>r;r++)t+=String.fromCharCode(127&e[r]);return t}function g(e,n,l){var t="";l=Math.min(e.length,l);for(var r=n;l>r;r++)t+=String.fromCharCode(e[r]);return t}function h(e,n,l){var t=e.length;(!n||0>n)&&(n=0),(!l||0>l||l>t)&&(l=t);for(var r="",a=n;l>a;a++)r+=S(e[a]);return r}function m(e,n,l){for(var t=e.slice(n,l),r="",a=0;a<t.length;a+=2)r+=String.fromCharCode(t[a]+256*t[a+1]);return r}function y(e,n,l){if(e%1!==0||0>e)throw new RangeError("offset is not uint");if(e+n>l)throw new RangeError("Trying to access beyond buffer length")}function x(e,n,l,r,a,o){if(!t.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(n>a||o>n)throw new RangeError("value is out of bounds");if(l+r>e.length)throw new RangeError("index out of range")}function b(e,n,l,t){0>n&&(n=65535+n+1);for(var r=0,a=Math.min(e.length-l,2);a>r;r++)e[l+r]=(n&255<<8*(t?r:1-r))>>>8*(t?r:1-r)}function _(e,n,l,t){0>n&&(n=4294967295+n+1);for(var r=0,a=Math.min(e.length-l,4);a>r;r++)e[l+r]=n>>>8*(t?r:3-r)&255}function v(e,n,l,t,r,a){if(n>r||a>n)throw new RangeError("value is out of bounds");if(l+t>e.length)throw new RangeError("index out of range");if(0>l)throw new RangeError("index out of range")}function I(e,n,l,t,r){return r||v(e,n,l,4,3.4028234663852886e38,-3.4028234663852886e38),M.write(e,n,l,t,23,4),l+4}function k(e,n,l,t,r){return r||v(e,n,l,8,1.7976931348623157e308,-1.7976931348623157e308),M.write(e,n,l,t,52,8),l+8}function E(e){if(e=w(e).replace(V,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function w(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function R(e){return D(e)||t.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}function S(e){return 16>e?"0"+e.toString(16):e.toString(16)}function C(e,n){n=n||1/0;for(var l,t=e.length,r=null,a=[],o=0;t>o;o++){if(l=e.charCodeAt(o),l>55295&&57344>l){if(!r){if(l>56319){(n-=3)>-1&&a.push(239,191,189);continue}if(o+1===t){(n-=3)>-1&&a.push(239,191,189);continue}r=l;continue}if(56320>l){(n-=3)>-1&&a.push(239,191,189),r=l;continue}l=r-55296<<10|l-56320|65536,r=null}else r&&((n-=3)>-1&&a.push(239,191,189),r=null);if(128>l){if((n-=1)<0)break;a.push(l)}else if(2048>l){if((n-=2)<0)break;a.push(l>>6|192,63&l|128)}else if(65536>l){if((n-=3)<0)break;a.push(l>>12|224,l>>6&63|128,63&l|128)}else{if(!(2097152>l))throw new Error("Invalid code point");if((n-=4)<0)break;a.push(l>>18|240,l>>12&63|128,l>>6&63|128,63&l|128)}}return a}function A(e){for(var n=[],l=0;l<e.length;l++)n.push(255&e.charCodeAt(l));return n}function j(e,n){for(var l,t,r,a=[],o=0;o<e.length&&!((n-=2)<0);o++)l=e.charCodeAt(o),t=l>>8,r=l%256,a.push(r),a.push(t);return a}function T(e){return O.toByteArray(E(e))}function L(e,n,l,t,r){r&&(t-=t%r);for(var a=0;t>a&&!(a+l>=n.length||a>=e.length);a++)n[a+l]=e[a];return a}function P(e){try{return decodeURIComponent(e)}catch(n){return String.fromCharCode(65533)}}var O=e("base64-js"),M=e("ieee754"),D=e("is-array");l.Buffer=t,l.SlowBuffer=r,l.INSPECT_MAX_BYTES=50,t.poolSize=8192;var B=1073741823,N={};t.TYPED_ARRAY_SUPPORT=function(){try{var e=new ArrayBuffer(0),n=new Uint8Array(e);return n.foo=function(){return 42},42===n.foo()&&"function"==typeof n.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(l){return!1}}(),t.isBuffer=function(e){return!(null==e||!e._isBuffer)},t.compare=function(e,n){if(!t.isBuffer(e)||!t.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(e===n)return 0;for(var l=e.length,r=n.length,a=0,o=Math.min(l,r);o>a&&e[a]===n[a];a++);return a!==o&&(l=e[a],r=n[a]),r>l?-1:l>r?1:0},t.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,n){if(!D(e))throw new TypeError("Usage: Buffer.concat(list[, length])");if(0===e.length)return new t(0);if(1===e.length)return e[0];var l;if(void 0===n)for(n=0,l=0;l<e.length;l++)n+=e[l].length;var r=new t(n),a=0;for(l=0;l<e.length;l++){var o=e[l];o.copy(r,a),a+=o.length}return r},t.byteLength=function(e,n){var l;switch(e+="",n||"utf8"){case"ascii":case"binary":case"raw":l=e.length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":l=2*e.length;break;case"hex":l=e.length>>>1;break;case"utf8":case"utf-8":l=C(e).length;break;case"base64":l=T(e).length;break;default:l=e.length}return l},t.prototype.length=void 0,t.prototype.parent=void 0,t.prototype.toString=function(e,n,l){var t=!1;if(n>>>=0,l=void 0===l||1/0===l?this.length:l>>>0,e||(e="utf8"),0>n&&(n=0),l>this.length&&(l=this.length),n>=l)return"";for(;;)switch(e){case"hex":return h(this,n,l);case"utf8":case"utf-8":return p(this,n,l);case"ascii":return f(this,n,l);case"binary":return g(this,n,l);case"base64":return d(this,n,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,n,l);default:if(t)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),t=!0}},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===t.compare(this,e)},t.prototype.inspect=function(){var e="",n=l.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},t.prototype.compare=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:t.compare(this,e)},t.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},t.prototype.set=function(e,n){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,n)},t.prototype.write=function(e,n,l,t){if(isFinite(n))isFinite(l)||(t=l,l=void 0);else{var r=t;t=n,n=l,l=r}if(n=Number(n)||0,0>l||0>n||n>this.length)throw new RangeError("attempt to write outside buffer bounds");var d=this.length-n;l?(l=Number(l),l>d&&(l=d)):l=d,t=String(t||"utf8").toLowerCase();var p;switch(t){case"hex":p=a(this,e,n,l);break;case"utf8":case"utf-8":p=o(this,e,n,l);break;case"ascii":p=u(this,e,n,l);break;case"binary":p=s(this,e,n,l);break;case"base64":p=i(this,e,n,l);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":p=c(this,e,n,l);break;default:throw new TypeError("Unknown encoding: "+t)}return p},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},t.prototype.slice=function(e,n){var l=this.length;e=~~e,n=void 0===n?l:~~n,0>e?(e+=l,0>e&&(e=0)):e>l&&(e=l),0>n?(n+=l,0>n&&(n=0)):n>l&&(n=l),e>n&&(n=e);var r;if(t.TYPED_ARRAY_SUPPORT)r=t._augment(this.subarray(e,n));else{var a=n-e;r=new t(a,void 0,!0);for(var o=0;a>o;o++)r[o]=this[o+e]}return r.length&&(r.parent=this.parent||this),r},t.prototype.readUIntLE=function(e,n,l){e>>>=0,n>>>=0,l||y(e,n,this.length);for(var t=this[e],r=1,a=0;++a<n&&(r*=256);)t+=this[e+a]*r;return t},t.prototype.readUIntBE=function(e,n,l){e>>>=0,n>>>=0,l||y(e,n,this.length);for(var t=this[e+--n],r=1;n>0&&(r*=256);)t+=this[e+--n]*r;return t},t.prototype.readUInt8=function(e,n){return n||y(e,1,this.length),this[e]},t.prototype.readUInt16LE=function(e,n){return n||y(e,2,this.length),this[e]|this[e+1]<<8},t.prototype.readUInt16BE=function(e,n){return n||y(e,2,this.length),this[e]<<8|this[e+1]},t.prototype.readUInt32LE=function(e,n){return n||y(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},t.prototype.readUInt32BE=function(e,n){return n||y(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},t.prototype.readIntLE=function(e,n,l){e>>>=0,n>>>=0,l||y(e,n,this.length);for(var t=this[e],r=1,a=0;++a<n&&(r*=256);)t+=this[e+a]*r;return r*=128,t>=r&&(t-=Math.pow(2,8*n)),t},t.prototype.readIntBE=function(e,n,l){e>>>=0,n>>>=0,l||y(e,n,this.length);for(var t=n,r=1,a=this[e+--t];t>0&&(r*=256);)a+=this[e+--t]*r;return r*=128,a>=r&&(a-=Math.pow(2,8*n)),a},t.prototype.readInt8=function(e,n){return n||y(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},t.prototype.readInt16LE=function(e,n){n||y(e,2,this.length);var l=this[e]|this[e+1]<<8;return 32768&l?4294901760|l:l},t.prototype.readInt16BE=function(e,n){n||y(e,2,this.length);var l=this[e+1]|this[e]<<8;return 32768&l?4294901760|l:l},t.prototype.readInt32LE=function(e,n){return n||y(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},t.prototype.readInt32BE=function(e,n){return n||y(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},t.prototype.readFloatLE=function(e,n){return n||y(e,4,this.length),M.read(this,e,!0,23,4)},t.prototype.readFloatBE=function(e,n){return n||y(e,4,this.length),M.read(this,e,!1,23,4)},t.prototype.readDoubleLE=function(e,n){return n||y(e,8,this.length),M.read(this,e,!0,52,8)},t.prototype.readDoubleBE=function(e,n){return n||y(e,8,this.length),M.read(this,e,!1,52,8)},t.prototype.writeUIntLE=function(e,n,l,t){e=+e,n>>>=0,l>>>=0,t||x(this,e,n,l,Math.pow(2,8*l),0);var r=1,a=0;for(this[n]=255&e;++a<l&&(r*=256);)this[n+a]=e/r>>>0&255;return n+l},t.prototype.writeUIntBE=function(e,n,l,t){e=+e,n>>>=0,l>>>=0,t||x(this,e,n,l,Math.pow(2,8*l),0);var r=l-1,a=1;for(this[n+r]=255&e;--r>=0&&(a*=256);)this[n+r]=e/a>>>0&255;return n+l},t.prototype.writeUInt8=function(e,n,l){return e=+e,n>>>=0,l||x(this,e,n,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=e,n+1},t.prototype.writeUInt16LE=function(e,n,l){return e=+e,n>>>=0,l||x(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e,this[n+1]=e>>>8):b(this,e,n,!0),n+2},t.prototype.writeUInt16BE=function(e,n,l){return e=+e,n>>>=0,l||x(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=e):b(this,e,n,!1),n+2},t.prototype.writeUInt32LE=function(e,n,l){return e=+e,n>>>=0,l||x(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=e):_(this,e,n,!0),n+4},t.prototype.writeUInt32BE=function(e,n,l){return e=+e,n>>>=0,l||x(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=e):_(this,e,n,!1),n+4},t.prototype.writeIntLE=function(e,n,l,t){e=+e,n>>>=0,t||x(this,e,n,l,Math.pow(2,8*l-1)-1,-Math.pow(2,8*l-1));var r=0,a=1,o=0>e?1:0;for(this[n]=255&e;++r<l&&(a*=256);)this[n+r]=(e/a>>0)-o&255;return n+l},t.prototype.writeIntBE=function(e,n,l,t){e=+e,n>>>=0,t||x(this,e,n,l,Math.pow(2,8*l-1)-1,-Math.pow(2,8*l-1));var r=l-1,a=1,o=0>e?1:0;for(this[n+r]=255&e;--r>=0&&(a*=256);)this[n+r]=(e/a>>0)-o&255;return n+l},t.prototype.writeInt8=function(e,n,l){return e=+e,n>>>=0,l||x(this,e,n,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[n]=e,n+1},t.prototype.writeInt16LE=function(e,n,l){return e=+e,n>>>=0,l||x(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=e,this[n+1]=e>>>8):b(this,e,n,!0),n+2},t.prototype.writeInt16BE=function(e,n,l){return e=+e,n>>>=0,l||x(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=e):b(this,e,n,!1),n+2},t.prototype.writeInt32LE=function(e,n,l){return e=+e,n>>>=0,l||x(this,e,n,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[n]=e,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):_(this,e,n,!0),n+4},t.prototype.writeInt32BE=function(e,n,l){return e=+e,n>>>=0,l||x(this,e,n,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=e):_(this,e,n,!1),n+4},t.prototype.writeFloatLE=function(e,n,l){return I(this,e,n,!0,l)},t.prototype.writeFloatBE=function(e,n,l){return I(this,e,n,!1,l)},t.prototype.writeDoubleLE=function(e,n,l){return k(this,e,n,!0,l)},t.prototype.writeDoubleBE=function(e,n,l){return k(this,e,n,!1,l)},t.prototype.copy=function(e,n,l,r){var a=this;if(l||(l=0),r||0===r||(r=this.length),n>=e.length&&(n=e.length),n||(n=0),r>0&&l>r&&(r=l),r===l)return 0;if(0===e.length||0===a.length)return 0;if(0>n)throw new RangeError("targetStart out of bounds");if(0>l||l>=a.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-n<r-l&&(r=e.length-n+l);var o=r-l;if(1e3>o||!t.TYPED_ARRAY_SUPPORT)for(var u=0;o>u;u++)e[u+n]=this[u+l];else e._set(this.subarray(l,l+o),n);return o},t.prototype.fill=function(e,n,l){if(e||(e=0),n||(n=0),l||(l=this.length),n>l)throw new RangeError("end < start");if(l!==n&&0!==this.length){if(0>n||n>=this.length)throw new RangeError("start out of bounds");if(0>l||l>this.length)throw new RangeError("end out of bounds");var t;if("number"==typeof e)for(t=n;l>t;t++)this[t]=e;else{var r=C(e.toString()),a=r.length;for(t=n;l>t;t++)this[t]=r[t%a]}return this}},t.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(t.TYPED_ARRAY_SUPPORT)return new t(this).buffer;for(var e=new Uint8Array(this.length),n=0,l=e.length;l>n;n+=1)e[n]=this[n];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var F=t.prototype;t._augment=function(e){return e.constructor=t,e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=F.get,e.set=F.set,e.write=F.write,e.toString=F.toString,e.toLocaleString=F.toString,e.toJSON=F.toJSON,e.equals=F.equals,e.compare=F.compare,e.copy=F.copy,e.slice=F.slice,e.readUIntLE=F.readUIntLE,e.readUIntBE=F.readUIntBE,e.readUInt8=F.readUInt8,e.readUInt16LE=F.readUInt16LE,e.readUInt16BE=F.readUInt16BE,e.readUInt32LE=F.readUInt32LE,e.readUInt32BE=F.readUInt32BE,e.readIntLE=F.readIntLE,e.readIntBE=F.readIntBE,e.readInt8=F.readInt8,e.readInt16LE=F.readInt16LE,e.readInt16BE=F.readInt16BE,e.readInt32LE=F.readInt32LE,e.readInt32BE=F.readInt32BE,e.readFloatLE=F.readFloatLE,e.readFloatBE=F.readFloatBE,e.readDoubleLE=F.readDoubleLE,e.readDoubleBE=F.readDoubleBE,e.writeUInt8=F.writeUInt8,e.writeUIntLE=F.writeUIntLE,e.writeUIntBE=F.writeUIntBE,e.writeUInt16LE=F.writeUInt16LE,e.writeUInt16BE=F.writeUInt16BE,e.writeUInt32LE=F.writeUInt32LE,e.writeUInt32BE=F.writeUInt32BE,e.writeIntLE=F.writeIntLE,e.writeIntBE=F.writeIntBE,e.writeInt8=F.writeInt8,e.writeInt16LE=F.writeInt16LE,e.writeInt16BE=F.writeInt16BE,e.writeInt32LE=F.writeInt32LE,e.writeInt32BE=F.writeInt32BE,e.writeFloatLE=F.writeFloatLE,e.writeFloatBE=F.writeFloatBE,e.writeDoubleLE=F.writeDoubleLE,e.writeDoubleBE=F.writeDoubleBE,e.fill=F.fill,e.inspect=F.inspect,e.toArrayBuffer=F.toArrayBuffer,e};var V=/[^+\/0-9A-z\-]/g},{"base64-js":140,ieee754:141,"is-array":142}],140:[function(e,n,l){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function n(e){var n=e.charCodeAt(0);return n===o||n===d?62:n===u||n===p?63:s>n?-1:s+10>n?n-s+26+26:c+26>n?n-c:i+26>n?n-i+26:void 0}function l(e){function l(e){i[d++]=e}var t,r,o,u,s,i;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=e.length;s="="===e.charAt(c-2)?2:"="===e.charAt(c-1)?1:0,i=new a(3*e.length/4-s),o=s>0?e.length-4:e.length;var d=0;for(t=0,r=0;o>t;t+=4,r+=3)u=n(e.charAt(t))<<18|n(e.charAt(t+1))<<12|n(e.charAt(t+2))<<6|n(e.charAt(t+3)),l((16711680&u)>>16),l((65280&u)>>8),l(255&u);return 2===s?(u=n(e.charAt(t))<<2|n(e.charAt(t+1))>>4,l(255&u)):1===s&&(u=n(e.charAt(t))<<10|n(e.charAt(t+1))<<4|n(e.charAt(t+2))>>2,l(u>>8&255),l(255&u)),i}function r(e){function n(e){return t.charAt(e)}function l(e){return n(e>>18&63)+n(e>>12&63)+n(e>>6&63)+n(63&e)}var r,a,o,u=e.length%3,s="";for(r=0,o=e.length-u;o>r;r+=3)a=(e[r]<<16)+(e[r+1]<<8)+e[r+2],s+=l(a);switch(u){case 1:a=e[e.length-1],s+=n(a>>2),s+=n(a<<4&63),s+="==";break;case 2:a=(e[e.length-2]<<8)+e[e.length-1],s+=n(a>>10),s+=n(a>>4&63),s+=n(a<<2&63),s+="="}return s}var a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="+".charCodeAt(0),u="/".charCodeAt(0),s="0".charCodeAt(0),i="a".charCodeAt(0),c="A".charCodeAt(0),d="-".charCodeAt(0),p="_".charCodeAt(0);e.toByteArray=l,e.fromByteArray=r}("undefined"==typeof l?this.base64js={}:l)},{}],141:[function(e,n,l){l.read=function(e,n,l,t,r){var a,o,u=8*r-t-1,s=(1<<u)-1,i=s>>1,c=-7,d=l?r-1:0,p=l?-1:1,f=e[n+d];for(d+=p,a=f&(1<<-c)-1,f>>=-c,c+=u;c>0;a=256*a+e[n+d],d+=p,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=t;c>0;o=256*o+e[n+d],d+=p,c-=8);if(0===a)a=1-i;else{if(a===s)return o?0/0:1/0*(f?-1:1);o+=Math.pow(2,t),a-=i}return(f?-1:1)*o*Math.pow(2,a-t)},l.write=function(e,n,l,t,r,a){var o,u,s,i=8*a-r-1,c=(1<<i)-1,d=c>>1,p=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=t?0:a-1,g=t?1:-1,h=0>n||0===n&&0>1/n?1:0;for(n=Math.abs(n),isNaN(n)||1/0===n?(u=isNaN(n)?1:0,o=c):(o=Math.floor(Math.log(n)/Math.LN2),n*(s=Math.pow(2,-o))<1&&(o--,s*=2),n+=o+d>=1?p/s:p*Math.pow(2,1-d),n*s>=2&&(o++,s/=2),o+d>=c?(u=0,o=c):o+d>=1?(u=(n*s-1)*Math.pow(2,r),o+=d):(u=n*Math.pow(2,d-1)*Math.pow(2,r),o=0));r>=8;e[l+f]=255&u,f+=g,u/=256,r-=8);for(o=o<<r|u,i+=r;i>0;e[l+f]=255&o,f+=g,o/=256,i-=8);e[l+f-g]|=128*h}},{}],142:[function(e,n){var l=Array.isArray,t=Object.prototype.toString;n.exports=l||function(e){return!!e&&"[object Array]"==t.call(e)}},{}],143:[function(e,n){function l(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function t(e){return"function"==typeof e}function r(e){return"number"==typeof e}function a(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}n.exports=l,l.EventEmitter=l,l.prototype._events=void 0,l.prototype._maxListeners=void 0,l.defaultMaxListeners=10,l.prototype.setMaxListeners=function(e){if(!r(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},l.prototype.emit=function(e){var n,l,r,u,s,i;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if(n=arguments[1],n instanceof Error)throw n;throw TypeError('Uncaught, unspecified "error" event.')}if(l=this._events[e],o(l))return!1;if(t(l))switch(arguments.length){case 1:l.call(this);break;case 2:l.call(this,arguments[1]);break;case 3:l.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,u=new Array(r-1),s=1;r>s;s++)u[s-1]=arguments[s];l.apply(this,u)}else if(a(l)){for(r=arguments.length,u=new Array(r-1),s=1;r>s;s++)u[s-1]=arguments[s];for(i=l.slice(),r=i.length,s=0;r>s;s++)i[s].apply(this,u)}return!0},l.prototype.addListener=function(e,n){var r;if(!t(n))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,t(n.listener)?n.listener:n),this._events[e]?a(this._events[e])?this._events[e].push(n):this._events[e]=[this._events[e],n]:this._events[e]=n,a(this._events[e])&&!this._events[e].warned){var r;r=o(this._maxListeners)?l.defaultMaxListeners:this._maxListeners,r&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())}return this},l.prototype.on=l.prototype.addListener,l.prototype.once=function(e,n){function l(){this.removeListener(e,l),r||(r=!0,n.apply(this,arguments))}if(!t(n))throw TypeError("listener must be a function");var r=!1;return l.listener=n,this.on(e,l),this},l.prototype.removeListener=function(e,n){var l,r,o,u;if(!t(n))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(l=this._events[e],o=l.length,r=-1,l===n||t(l.listener)&&l.listener===n)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,n);else if(a(l)){for(u=o;u-->0;)if(l[u]===n||l[u].listener&&l[u].listener===n){r=u;break}if(0>r)return this;1===l.length?(l.length=0,delete this._events[e]):l.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,n)}return this},l.prototype.removeAllListeners=function(e){var n,l;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(n in this._events)"removeListener"!==n&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events={},this}if(l=this._events[e],t(l))this.removeListener(e,l);else for(;l.length;)this.removeListener(e,l[l.length-1]);return delete this._events[e],this},l.prototype.listeners=function(e){var n;return n=this._events&&this._events[e]?t(this._events[e])?[this._events[e]]:this._events[e].slice():[]},l.listenerCount=function(e,n){var l;return l=e._events&&e._events[n]?t(e._events[n])?1:e._events[n].length:0}},{}],144:[function(e,n){n.exports="function"==typeof Object.create?function(e,n){e.super_=n,e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,n){e.super_=n;var l=function(){};l.prototype=n.prototype,e.prototype=new l,e.prototype.constructor=e}},{}],145:[function(e,n){n.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},{}],146:[function(e,n,l){(function(e){function n(e,n){for(var l=0,t=e.length-1;t>=0;t--){var r=e[t];"."===r?e.splice(t,1):".."===r?(e.splice(t,1),l++):l&&(e.splice(t,1),l--)}if(n)for(;l--;l)e.unshift("..");return e}function t(e,n){if(e.filter)return e.filter(n);for(var l=[],t=0;t<e.length;t++)n(e[t],t,e)&&l.push(e[t]);return l}var r=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a=function(e){return r.exec(e).slice(1)};l.resolve=function(){for(var l="",r=!1,a=arguments.length-1;a>=-1&&!r;a--){var o=a>=0?arguments[a]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(l=o+"/"+l,r="/"===o.charAt(0))}return l=n(t(l.split("/"),function(e){return!!e}),!r).join("/"),(r?"/":"")+l||"."},l.normalize=function(e){var r=l.isAbsolute(e),a="/"===o(e,-1);return e=n(t(e.split("/"),function(e){return!!e}),!r).join("/"),e||r||(e="."),e&&a&&(e+="/"),(r?"/":"")+e},l.isAbsolute=function(e){return"/"===e.charAt(0)},l.join=function(){var e=Array.prototype.slice.call(arguments,0);return l.normalize(t(e,function(e){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},l.relative=function(e,n){function t(e){for(var n=0;n<e.length&&""===e[n];n++);for(var l=e.length-1;l>=0&&""===e[l];l--);return n>l?[]:e.slice(n,l-n+1)}e=l.resolve(e).substr(1),n=l.resolve(n).substr(1);for(var r=t(e.split("/")),a=t(n.split("/")),o=Math.min(r.length,a.length),u=o,s=0;o>s;s++)if(r[s]!==a[s]){u=s;break}for(var i=[],s=u;s<r.length;s++)i.push("..");return i=i.concat(a.slice(u)),i.join("/")},l.sep="/",l.delimiter=":",l.dirname=function(e){var n=a(e),l=n[0],t=n[1];return l||t?(t&&(t=t.substr(0,t.length-1)),l+t):"."},l.basename=function(e,n){var l=a(e)[2];return n&&l.substr(-1*n.length)===n&&(l=l.substr(0,l.length-n.length)),l},l.extname=function(e){return a(e)[3]};var o="b"==="ab".substr(-1)?function(e,n,l){return e.substr(n,l)}:function(e,n,l){return 0>n&&(n=e.length+n),e.substr(n,l)}}).call(this,e("_process"))},{_process:147}],147:[function(e,n){function l(){if(!o){o=!0;for(var e,n=a.length;n;){e=a,a=[];for(var l=-1;++l<n;)e[l]();n=a.length}o=!1}}function t(){}var r=n.exports={},a=[],o=!1;r.nextTick=function(e){a.push(e),o||setTimeout(l,0)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.on=t,r.addListener=t,r.once=t,r.off=t,r.removeListener=t,r.removeAllListeners=t,r.emit=t,r.binding=function(){throw new Error("process.binding is not supported") },r.cwd=function(){return"/"},r.chdir=function(){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},{}],148:[function(e,n){n.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":149}],149:[function(e,n){(function(l){function t(e){return this instanceof t?(s.call(this,e),i.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",r)):new t(e)}function r(){this.allowHalfOpen||this._writableState.ended||l.nextTick(this.end.bind(this))}function a(e,n){for(var l=0,t=e.length;t>l;l++)n(e[l],l)}n.exports=t;var o=Object.keys||function(e){var n=[];for(var l in e)n.push(l);return n},u=e("core-util-is");u.inherits=e("inherits");var s=e("./_stream_readable"),i=e("./_stream_writable");u.inherits(t,s),a(o(i.prototype),function(e){t.prototype[e]||(t.prototype[e]=i.prototype[e])})}).call(this,e("_process"))},{"./_stream_readable":151,"./_stream_writable":153,_process:147,"core-util-is":154,inherits:144}],150:[function(e,n){function l(e){return this instanceof l?void t.call(this,e):new l(e)}n.exports=l;var t=e("./_stream_transform"),r=e("core-util-is");r.inherits=e("inherits"),r.inherits(l,t),l.prototype._transform=function(e,n,l){l(null,e)}},{"./_stream_transform":152,"core-util-is":154,inherits:144}],151:[function(e,n){(function(l){function t(n){n=n||{};var l=n.highWaterMark;this.highWaterMark=l||0===l?l:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!n.objectMode,this.defaultEncoding=n.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,n.encoding&&(C||(C=e("string_decoder/").StringDecoder),this.decoder=new C(n.encoding),this.encoding=n.encoding)}function r(e){return this instanceof r?(this._readableState=new t(e,this),this.readable=!0,void R.call(this)):new r(e)}function a(e,n,l,t,r){var a=i(n,l);if(a)e.emit("error",a);else if(null===l||void 0===l)n.reading=!1,n.ended||c(e,n);else if(n.objectMode||l&&l.length>0)if(n.ended&&!r){var u=new Error("stream.push() after EOF");e.emit("error",u)}else if(n.endEmitted&&r){var u=new Error("stream.unshift() after end event");e.emit("error",u)}else!n.decoder||r||t||(l=n.decoder.write(l)),n.length+=n.objectMode?1:l.length,r?n.buffer.unshift(l):(n.reading=!1,n.buffer.push(l)),n.needReadable&&d(e),f(e,n);else r||(n.reading=!1);return o(n)}function o(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function u(e){if(e>=A)e=A;else{e--;for(var n=1;32>n;n<<=1)e|=e>>n;e++}return e}function s(e,n){return 0===n.length&&n.ended?0:n.objectMode?0===e?0:1:null===e||isNaN(e)?n.flowing&&n.buffer.length?n.buffer[0].length:n.length:0>=e?0:(e>n.highWaterMark&&(n.highWaterMark=u(e)),e>n.length?n.ended?n.length:(n.needReadable=!0,0):e)}function i(e,n){var l=null;return E.isBuffer(n)||"string"==typeof n||null===n||void 0===n||e.objectMode||(l=new TypeError("Invalid non-string/buffer chunk")),l}function c(e,n){if(n.decoder&&!n.ended){var l=n.decoder.end();l&&l.length&&(n.buffer.push(l),n.length+=n.objectMode?1:l.length)}n.ended=!0,n.length>0?d(e):_(e)}function d(e){var n=e._readableState;n.needReadable=!1,n.emittedReadable||(n.emittedReadable=!0,n.sync?l.nextTick(function(){p(e)}):p(e))}function p(e){e.emit("readable")}function f(e,n){n.readingMore||(n.readingMore=!0,l.nextTick(function(){g(e,n)}))}function g(e,n){for(var l=n.length;!n.reading&&!n.flowing&&!n.ended&&n.length<n.highWaterMark&&(e.read(0),l!==n.length);)l=n.length;n.readingMore=!1}function h(e){return function(){var n=e._readableState;n.awaitDrain--,0===n.awaitDrain&&m(e)}}function m(e){function n(e){var n=e.write(l);!1===n&&t.awaitDrain++}var l,t=e._readableState;for(t.awaitDrain=0;t.pipesCount&&null!==(l=e.read());)if(1===t.pipesCount?n(t.pipes,0,null):v(t.pipes,n),e.emit("data",l),t.awaitDrain>0)return;return 0===t.pipesCount?(t.flowing=!1,void(w.listenerCount(e,"data")>0&&x(e))):void(t.ranOut=!0)}function y(){this._readableState.ranOut&&(this._readableState.ranOut=!1,m(this))}function x(e,n){var t=e._readableState;if(t.flowing)throw new Error("Cannot switch to old mode now.");var r=n||!1,a=!1;e.readable=!0,e.pipe=R.prototype.pipe,e.on=e.addListener=R.prototype.on,e.on("readable",function(){a=!0;for(var n;!r&&null!==(n=e.read());)e.emit("data",n);null===n&&(a=!1,e._readableState.needReadable=!0)}),e.pause=function(){r=!0,this.emit("pause")},e.resume=function(){r=!1,a?l.nextTick(function(){e.emit("readable")}):this.read(0),this.emit("resume")},e.emit("readable")}function b(e,n){var l,t=n.buffer,r=n.length,a=!!n.decoder,o=!!n.objectMode;if(0===t.length)return null;if(0===r)l=null;else if(o)l=t.shift();else if(!e||e>=r)l=a?t.join(""):E.concat(t,r),t.length=0;else if(e<t[0].length){var u=t[0];l=u.slice(0,e),t[0]=u.slice(e)}else if(e===t[0].length)l=t.shift();else{l=a?"":new E(e);for(var s=0,i=0,c=t.length;c>i&&e>s;i++){var u=t[0],d=Math.min(e-s,u.length);a?l+=u.slice(0,d):u.copy(l,s,0,d),d<u.length?t[0]=u.slice(d):t.shift(),s+=d}}return l}function _(e){var n=e._readableState;if(n.length>0)throw new Error("endReadable called on non-empty stream");!n.endEmitted&&n.calledRead&&(n.ended=!0,l.nextTick(function(){n.endEmitted||0!==n.length||(n.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function v(e,n){for(var l=0,t=e.length;t>l;l++)n(e[l],l)}function I(e,n){for(var l=0,t=e.length;t>l;l++)if(e[l]===n)return l;return-1}n.exports=r;var k=e("isarray"),E=e("buffer").Buffer;r.ReadableState=t;var w=e("events").EventEmitter;w.listenerCount||(w.listenerCount=function(e,n){return e.listeners(n).length});var R=e("stream"),S=e("core-util-is");S.inherits=e("inherits");var C;S.inherits(r,R),r.prototype.push=function(e,n){var l=this._readableState;return"string"!=typeof e||l.objectMode||(n=n||l.defaultEncoding,n!==l.encoding&&(e=new E(e,n),n="")),a(this,l,e,n,!1)},r.prototype.unshift=function(e){var n=this._readableState;return a(this,n,e,"",!0)},r.prototype.setEncoding=function(n){C||(C=e("string_decoder/").StringDecoder),this._readableState.decoder=new C(n),this._readableState.encoding=n};var A=8388608;r.prototype.read=function(e){var n=this._readableState;n.calledRead=!0;var l,t=e;if(("number"!=typeof e||e>0)&&(n.emittedReadable=!1),0===e&&n.needReadable&&(n.length>=n.highWaterMark||n.ended))return d(this),null;if(e=s(e,n),0===e&&n.ended)return l=null,n.length>0&&n.decoder&&(l=b(e,n),n.length-=l.length),0===n.length&&_(this),l;var r=n.needReadable;return n.length-e<=n.highWaterMark&&(r=!0),(n.ended||n.reading)&&(r=!1),r&&(n.reading=!0,n.sync=!0,0===n.length&&(n.needReadable=!0),this._read(n.highWaterMark),n.sync=!1),r&&!n.reading&&(e=s(t,n)),l=e>0?b(e,n):null,null===l&&(n.needReadable=!0,e=0),n.length-=e,0!==n.length||n.ended||(n.needReadable=!0),n.ended&&!n.endEmitted&&0===n.length&&_(this),l},r.prototype._read=function(){this.emit("error",new Error("not implemented"))},r.prototype.pipe=function(e,n){function t(e){e===c&&a()}function r(){e.end()}function a(){e.removeListener("close",u),e.removeListener("finish",s),e.removeListener("drain",g),e.removeListener("error",o),e.removeListener("unpipe",t),c.removeListener("end",r),c.removeListener("end",a),(!e._writableState||e._writableState.needDrain)&&g()}function o(n){i(),e.removeListener("error",o),0===w.listenerCount(e,"error")&&e.emit("error",n)}function u(){e.removeListener("finish",s),i()}function s(){e.removeListener("close",u),i()}function i(){c.unpipe(e)}var c=this,d=this._readableState;switch(d.pipesCount){case 0:d.pipes=e;break;case 1:d.pipes=[d.pipes,e];break;default:d.pipes.push(e)}d.pipesCount+=1;var p=(!n||n.end!==!1)&&e!==l.stdout&&e!==l.stderr,f=p?r:a;d.endEmitted?l.nextTick(f):c.once("end",f),e.on("unpipe",t);var g=h(c);return e.on("drain",g),e._events&&e._events.error?k(e._events.error)?e._events.error.unshift(o):e._events.error=[o,e._events.error]:e.on("error",o),e.once("close",u),e.once("finish",s),e.emit("pipe",c),d.flowing||(this.on("readable",y),d.flowing=!0,l.nextTick(function(){m(c)})),e},r.prototype.unpipe=function(e){var n=this._readableState;if(0===n.pipesCount)return this;if(1===n.pipesCount)return e&&e!==n.pipes?this:(e||(e=n.pipes),n.pipes=null,n.pipesCount=0,this.removeListener("readable",y),n.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var l=n.pipes,t=n.pipesCount;n.pipes=null,n.pipesCount=0,this.removeListener("readable",y),n.flowing=!1;for(var r=0;t>r;r++)l[r].emit("unpipe",this);return this}var r=I(n.pipes,e);return-1===r?this:(n.pipes.splice(r,1),n.pipesCount-=1,1===n.pipesCount&&(n.pipes=n.pipes[0]),e.emit("unpipe",this),this)},r.prototype.on=function(e,n){var l=R.prototype.on.call(this,e,n);if("data"!==e||this._readableState.flowing||x(this),"readable"===e&&this.readable){var t=this._readableState;t.readableListening||(t.readableListening=!0,t.emittedReadable=!1,t.needReadable=!0,t.reading?t.length&&d(this,t):this.read(0))}return l},r.prototype.addListener=r.prototype.on,r.prototype.resume=function(){x(this),this.read(0),this.emit("resume")},r.prototype.pause=function(){x(this,!0),this.emit("pause")},r.prototype.wrap=function(e){var n=this._readableState,l=!1,t=this;e.on("end",function(){if(n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(r){if(n.decoder&&(r=n.decoder.write(r)),(!n.objectMode||null!==r&&void 0!==r)&&(n.objectMode||r&&r.length)){var a=t.push(r);a||(l=!0,e.pause())}});for(var r in e)"function"==typeof e[r]&&"undefined"==typeof this[r]&&(this[r]=function(n){return function(){return e[n].apply(e,arguments)}}(r));var a=["error","close","destroy","pause","resume"];return v(a,function(n){e.on(n,t.emit.bind(t,n))}),t._read=function(){l&&(l=!1,e.resume())},t},r._fromList=b}).call(this,e("_process"))},{_process:147,buffer:139,"core-util-is":154,events:143,inherits:144,isarray:145,stream:159,"string_decoder/":160}],152:[function(e,n){function l(e,n){this.afterTransform=function(e,l){return t(n,e,l)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function t(e,n,l){var t=e._transformState;t.transforming=!1;var r=t.writecb;if(!r)return e.emit("error",new Error("no writecb in Transform class"));t.writechunk=null,t.writecb=null,null!==l&&void 0!==l&&e.push(l),r&&r(n);var a=e._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&e._read(a.highWaterMark)}function r(e){if(!(this instanceof r))return new r(e);o.call(this,e);var n=(this._transformState=new l(e,this),this);this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("finish",function(){"function"==typeof this._flush?this._flush(function(e){a(n,e)}):a(n)})}function a(e,n){if(n)return e.emit("error",n);var l=e._writableState,t=(e._readableState,e._transformState);if(l.length)throw new Error("calling transform done when ws.length != 0");if(t.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}n.exports=r;var o=e("./_stream_duplex"),u=e("core-util-is");u.inherits=e("inherits"),u.inherits(r,o),r.prototype.push=function(e,n){return this._transformState.needTransform=!1,o.prototype.push.call(this,e,n)},r.prototype._transform=function(){throw new Error("not implemented")},r.prototype._write=function(e,n,l){var t=this._transformState;if(t.writecb=l,t.writechunk=e,t.writeencoding=n,!t.transforming){var r=this._readableState;(t.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}},r.prototype._read=function(){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0}},{"./_stream_duplex":149,"core-util-is":154,inherits:144}],153:[function(e,n){(function(l){function t(e,n,l){this.chunk=e,this.encoding=n,this.callback=l}function r(e,n){e=e||{};var l=e.highWaterMark;this.highWaterMark=l||0===l?l:16384,this.objectMode=!!e.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var t=e.decodeStrings===!1;this.decodeStrings=!t,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){f(n,e)},this.writecb=null,this.writelen=0,this.buffer=[],this.errorEmitted=!1}function a(n){var l=e("./_stream_duplex");return this instanceof a||this instanceof l?(this._writableState=new r(n,this),this.writable=!0,void I.call(this)):new a(n)}function o(e,n,t){var r=new Error("write after end");e.emit("error",r),l.nextTick(function(){t(r)})}function u(e,n,t,r){var a=!0;if(!_.isBuffer(t)&&"string"!=typeof t&&null!==t&&void 0!==t&&!n.objectMode){var o=new TypeError("Invalid non-string/buffer chunk");e.emit("error",o),l.nextTick(function(){r(o)}),a=!1}return a}function s(e,n,l){return e.objectMode||e.decodeStrings===!1||"string"!=typeof n||(n=new _(n,l)),n}function i(e,n,l,r,a){l=s(n,l,r),_.isBuffer(l)&&(r="buffer");var o=n.objectMode?1:l.length;n.length+=o;var u=n.length<n.highWaterMark;return u||(n.needDrain=!0),n.writing?n.buffer.push(new t(l,r,a)):c(e,n,o,l,r,a),u}function c(e,n,l,t,r,a){n.writelen=l,n.writecb=a,n.writing=!0,n.sync=!0,e._write(t,r,n.onwrite),n.sync=!1}function d(e,n,t,r,a){t?l.nextTick(function(){a(r)}):a(r),e._writableState.errorEmitted=!0,e.emit("error",r)}function p(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function f(e,n){var t=e._writableState,r=t.sync,a=t.writecb;if(p(t),n)d(e,t,r,n,a);else{var o=y(e,t);o||t.bufferProcessing||!t.buffer.length||m(e,t),r?l.nextTick(function(){g(e,t,o,a)}):g(e,t,o,a)}}function g(e,n,l,t){l||h(e,n),t(),l&&x(e,n)}function h(e,n){0===n.length&&n.needDrain&&(n.needDrain=!1,e.emit("drain"))}function m(e,n){n.bufferProcessing=!0;for(var l=0;l<n.buffer.length;l++){var t=n.buffer[l],r=t.chunk,a=t.encoding,o=t.callback,u=n.objectMode?1:r.length;if(c(e,n,u,r,a,o),n.writing){l++;break}}n.bufferProcessing=!1,l<n.buffer.length?n.buffer=n.buffer.slice(l):n.buffer.length=0}function y(e,n){return n.ending&&0===n.length&&!n.finished&&!n.writing}function x(e,n){var l=y(e,n);return l&&(n.finished=!0,e.emit("finish")),l}function b(e,n,t){n.ending=!0,x(e,n),t&&(n.finished?l.nextTick(t):e.once("finish",t)),n.ended=!0}n.exports=a;var _=e("buffer").Buffer;a.WritableState=r;var v=e("core-util-is");v.inherits=e("inherits");var I=e("stream");v.inherits(a,I),a.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},a.prototype.write=function(e,n,l){var t=this._writableState,r=!1;return"function"==typeof n&&(l=n,n=null),_.isBuffer(e)?n="buffer":n||(n=t.defaultEncoding),"function"!=typeof l&&(l=function(){}),t.ended?o(this,t,l):u(this,t,e,l)&&(r=i(this,t,e,n,l)),r},a.prototype._write=function(e,n,l){l(new Error("not implemented"))},a.prototype.end=function(e,n,l){var t=this._writableState;"function"==typeof e?(l=e,e=null,n=null):"function"==typeof n&&(l=n,n=null),"undefined"!=typeof e&&null!==e&&this.write(e,n),t.ending||t.finished||b(this,t,l)}}).call(this,e("_process"))},{"./_stream_duplex":149,_process:147,buffer:139,"core-util-is":154,inherits:144,stream:159}],154:[function(e,n,l){(function(e){function n(e){return Array.isArray(e)}function t(e){return"boolean"==typeof e}function r(e){return null===e}function a(e){return null==e}function o(e){return"number"==typeof e}function u(e){return"string"==typeof e}function s(e){return"symbol"==typeof e}function i(e){return void 0===e}function c(e){return d(e)&&"[object RegExp]"===y(e)}function d(e){return"object"==typeof e&&null!==e}function p(e){return d(e)&&"[object Date]"===y(e)}function f(e){return d(e)&&("[object Error]"===y(e)||e instanceof Error)}function g(e){return"function"==typeof e}function h(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function m(n){return e.isBuffer(n)}function y(e){return Object.prototype.toString.call(e)}l.isArray=n,l.isBoolean=t,l.isNull=r,l.isNullOrUndefined=a,l.isNumber=o,l.isString=u,l.isSymbol=s,l.isUndefined=i,l.isRegExp=c,l.isObject=d,l.isDate=p,l.isError=f,l.isFunction=g,l.isPrimitive=h,l.isBuffer=m}).call(this,e("buffer").Buffer)},{buffer:139}],155:[function(e,n){n.exports=e("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":150}],156:[function(e,n,l){var t=e("stream");l=n.exports=e("./lib/_stream_readable.js"),l.Stream=t,l.Readable=l,l.Writable=e("./lib/_stream_writable.js"),l.Duplex=e("./lib/_stream_duplex.js"),l.Transform=e("./lib/_stream_transform.js"),l.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":149,"./lib/_stream_passthrough.js":150,"./lib/_stream_readable.js":151,"./lib/_stream_transform.js":152,"./lib/_stream_writable.js":153,stream:159}],157:[function(e,n){n.exports=e("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":152}],158:[function(e,n){n.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":153}],159:[function(e,n){function l(){t.call(this)}n.exports=l;var t=e("events").EventEmitter,r=e("inherits");r(l,t),l.Readable=e("readable-stream/readable.js"),l.Writable=e("readable-stream/writable.js"),l.Duplex=e("readable-stream/duplex.js"),l.Transform=e("readable-stream/transform.js"),l.PassThrough=e("readable-stream/passthrough.js"),l.Stream=l,l.prototype.pipe=function(e,n){function l(n){e.writable&&!1===e.write(n)&&i.pause&&i.pause()}function r(){i.readable&&i.resume&&i.resume()}function a(){c||(c=!0,e.end())}function o(){c||(c=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(s(),0===t.listenerCount(this,"error"))throw e}function s(){i.removeListener("data",l),e.removeListener("drain",r),i.removeListener("end",a),i.removeListener("close",o),i.removeListener("error",u),e.removeListener("error",u),i.removeListener("end",s),i.removeListener("close",s),e.removeListener("close",s)}var i=this;i.on("data",l),e.on("drain",r),e._isStdio||n&&n.end===!1||(i.on("end",a),i.on("close",o));var c=!1;return i.on("error",u),e.on("error",u),i.on("end",s),i.on("close",s),e.on("close",s),e.emit("pipe",i),e}},{events:143,inherits:144,"readable-stream/duplex.js":148,"readable-stream/passthrough.js":155,"readable-stream/readable.js":156,"readable-stream/transform.js":157,"readable-stream/writable.js":158}],160:[function(e,n,l){function t(e){if(e&&!s(e))throw new Error("Unknown encoding: "+e)}function r(e){return e.toString(this.encoding)}function a(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function o(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var u=e("buffer").Buffer,s=u.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},i=l.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),t(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=a;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=o;break;default:return void(this.write=r)}this.charBuffer=new u(6),this.charReceived=0,this.charLength=0};i.prototype.write=function(e){for(var n="";this.charLength;){var l=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,l),this.charReceived+=l,this.charReceived<this.charLength)return"";e=e.slice(l,e.length),n=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var t=n.charCodeAt(n.length-1);if(!(t>=55296&&56319>=t)){if(this.charReceived=this.charLength=0,0===e.length)return n;break}this.charLength+=this.surrogateSize,n=""}this.detectIncompleteChar(e);var r=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,r),r-=this.charReceived),n+=e.toString(this.encoding,0,r);var r=n.length-1,t=n.charCodeAt(r);if(t>=55296&&56319>=t){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),e.copy(this.charBuffer,0,0,a),n.substring(0,r)}return n},i.prototype.detectIncompleteChar=function(e){for(var n=e.length>=3?3:e.length;n>0;n--){var l=e[e.length-n];if(1==n&&l>>5==6){this.charLength=2;break}if(2>=n&&l>>4==14){this.charLength=3;break}if(3>=n&&l>>3==30){this.charLength=4;break}}this.charReceived=n},i.prototype.end=function(e){var n="";if(e&&e.length&&(n=this.write(e)),this.charReceived){var l=this.charReceived,t=this.charBuffer,r=this.encoding;n+=t.slice(0,l).toString(r)}return n}},{buffer:139}],161:[function(e,n,l){function t(){throw new Error("tty.ReadStream is not implemented")}function r(){throw new Error("tty.ReadStream is not implemented")}l.isatty=function(){return!1},l.ReadStream=t,l.WriteStream=r},{}],162:[function(e,n){n.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],163:[function(e,n,l){(function(n,t){function r(e,n){var t={seen:[],stylize:o};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),h(n)?t.showHidden=n:n&&l._extend(t,n),v(t.showHidden)&&(t.showHidden=!1),v(t.depth)&&(t.depth=2),v(t.colors)&&(t.colors=!1),v(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=a),s(t,e,t.depth)}function a(e,n){var l=r.styles[n];return l?"["+r.colors[l][0]+"m"+e+"["+r.colors[l][1]+"m":e}function o(e){return e}function u(e){var n={};return e.forEach(function(e){n[e]=!0}),n}function s(e,n,t){if(e.customInspect&&n&&R(n.inspect)&&n.inspect!==l.inspect&&(!n.constructor||n.constructor.prototype!==n)){var r=n.inspect(t,e);return b(r)||(r=s(e,r,t)),r}var a=i(e,n);if(a)return a;var o=Object.keys(n),h=u(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(n)),w(n)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return c(n);if(0===o.length){if(R(n)){var m=n.name?": "+n.name:"";return e.stylize("[Function"+m+"]","special")}if(I(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(w(n))return c(n)}var y="",x=!1,_=["{","}"];if(g(n)&&(x=!0,_=["[","]"]),R(n)){var v=n.name?": "+n.name:"";y=" [Function"+v+"]"}if(I(n)&&(y=" "+RegExp.prototype.toString.call(n)),E(n)&&(y=" "+Date.prototype.toUTCString.call(n)),w(n)&&(y=" "+c(n)),0===o.length&&(!x||0==n.length))return _[0]+y+_[1];if(0>t)return I(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special");e.seen.push(n);var k;return k=x?d(e,n,t,h,o):o.map(function(l){return p(e,n,t,h,l,x)}),e.seen.pop(),f(k,y,_)}function i(e,n){if(v(n))return e.stylize("undefined","undefined");if(b(n)){var l="'"+JSON.stringify(n).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(l,"string")}return x(n)?e.stylize(""+n,"number"):h(n)?e.stylize(""+n,"boolean"):m(n)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,n,l,t,r){for(var a=[],o=0,u=n.length;u>o;++o)a.push(T(n,String(o))?p(e,n,l,t,String(o),!0):"");return r.forEach(function(r){r.match(/^\d+$/)||a.push(p(e,n,l,t,r,!0))}),a}function p(e,n,l,t,r,a){var o,u,i;if(i=Object.getOwnPropertyDescriptor(n,r)||{value:n[r]},i.get?u=i.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):i.set&&(u=e.stylize("[Setter]","special")),T(t,r)||(o="["+r+"]"),u||(e.seen.indexOf(i.value)<0?(u=m(l)?s(e,i.value,null):s(e,i.value,l-1),u.indexOf("\n")>-1&&(u=a?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n"))):u=e.stylize("[Circular]","special")),v(o)){if(a&&r.match(/^\d+$/))return u;o=JSON.stringify(""+r),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+u}function f(e,n,l){var t=0,r=e.reduce(function(e,n){return t++,n.indexOf("\n")>=0&&t++,e+n.replace(/\u001b\[\d\d?m/g,"").length+1},0);return r>60?l[0]+(""===n?"":n+"\n ")+" "+e.join(",\n ")+" "+l[1]:l[0]+n+" "+e.join(", ")+" "+l[1]}function g(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function y(e){return null==e}function x(e){return"number"==typeof e}function b(e){return"string"==typeof e}function _(e){return"symbol"==typeof e}function v(e){return void 0===e}function I(e){return k(e)&&"[object RegExp]"===C(e)}function k(e){return"object"==typeof e&&null!==e}function E(e){return k(e)&&"[object Date]"===C(e)}function w(e){return k(e)&&("[object Error]"===C(e)||e instanceof Error)}function R(e){return"function"==typeof e}function S(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function C(e){return Object.prototype.toString.call(e)}function A(e){return 10>e?"0"+e.toString(10):e.toString(10)}function j(){var e=new Date,n=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":");return[e.getDate(),M[e.getMonth()],n].join(" ")}function T(e,n){return Object.prototype.hasOwnProperty.call(e,n)}var L=/%[sdj%]/g;l.format=function(e){if(!b(e)){for(var n=[],l=0;l<arguments.length;l++)n.push(r(arguments[l]));return n.join(" ")}for(var l=1,t=arguments,a=t.length,o=String(e).replace(L,function(e){if("%%"===e)return"%";if(l>=a)return e;switch(e){case"%s":return String(t[l++]);case"%d":return Number(t[l++]);case"%j":try{return JSON.stringify(t[l++])}catch(n){return"[Circular]"}default:return e}}),u=t[l];a>l;u=t[++l])o+=m(u)||!k(u)?" "+u:" "+r(u);return o},l.deprecate=function(e,r){function a(){if(!o){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),o=!0}return e.apply(this,arguments)}if(v(t.process))return function(){return l.deprecate(e,r).apply(this,arguments)};if(n.noDeprecation===!0)return e;var o=!1;return a};var P,O={};l.debuglog=function(e){if(v(P)&&(P=n.env.NODE_DEBUG||""),e=e.toUpperCase(),!O[e])if(new RegExp("\\b"+e+"\\b","i").test(P)){var t=n.pid;O[e]=function(){var n=l.format.apply(l,arguments);console.error("%s %d: %s",e,t,n)}}else O[e]=function(){};return O[e]},l.inspect=r,r.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},r.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},l.isArray=g,l.isBoolean=h,l.isNull=m,l.isNullOrUndefined=y,l.isNumber=x,l.isString=b,l.isSymbol=_,l.isUndefined=v,l.isRegExp=I,l.isObject=k,l.isDate=E,l.isError=w,l.isFunction=R,l.isPrimitive=S,l.isBuffer=e("./support/isBuffer");var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];l.log=function(){console.log("%s - %s",j(),l.format.apply(l,arguments))},l.inherits=e("inherits"),l._extend=function(e,n){if(!n||!k(n))return e;for(var l=Object.keys(n),t=l.length;t--;)e[l[t]]=n[l[t]];return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":162,_process:147,inherits:144}],164:[function(e,n){(function(l){"use strict";function t(e){this.enabled=e&&void 0!==e.enabled?e.enabled:d}function r(e){var n=function l(){return a.apply(l,arguments)};return n._styles=e,n.enabled=this.enabled,n.__proto__=g,n}function a(){var e=arguments,n=e.length,l=0!==n&&String(arguments[0]);if(n>1)for(var t=1;n>t;t++)l+=" "+e[t];if(!this.enabled||!l)return l;for(var r=this._styles,a=r.length;a--;){var o=s[r[a]];l=o.open+l.replace(o.closeRe,o.open)+o.close}return l}function o(){var e={};return Object.keys(f).forEach(function(n){e[n]={get:function(){return r.call(this,[n])}}}),e}var u=e("escape-string-regexp"),s=e("ansi-styles"),i=e("strip-ansi"),c=e("has-ansi"),d=e("supports-color"),p=Object.defineProperties;"win32"===l.platform&&(s.blue.open="");var f=function(){var e={};return Object.keys(s).forEach(function(n){s[n].closeRe=new RegExp(u(s[n].close),"g"),e[n]={get:function(){return r.call(this,this._styles.concat(n))}}}),e}(),g=p(function(){},f);p(t.prototype,o()),n.exports=new t,n.exports.styles=s,n.exports.hasColor=c,n.exports.stripColor=i,n.exports.supportsColor=d}).call(this,e("_process"))},{_process:147,"ansi-styles":165,"escape-string-regexp":166,"has-ansi":167,"strip-ansi":169,"supports-color":171}],165:[function(e,n){"use strict";var l=n.exports={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};l.colors.grey=l.colors.gray,Object.keys(l).forEach(function(e){var n=l[e];Object.keys(n).forEach(function(e){var t=n[e];l[e]=n[e]={open:"["+t[0]+"m",close:"["+t[1]+"m"}}),Object.defineProperty(l,e,{value:n,enumerable:!1})})},{}],166:[function(e,n){"use strict";var l=/[|\\{}()[\]^$+*?.]/g;n.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(l,"\\$&")}},{}],167:[function(e,n){"use strict";var l=e("ansi-regex"),t=new RegExp(l().source);n.exports=t.test.bind(t)},{"ansi-regex":168}],168:[function(e,n){"use strict";n.exports=function(){return/(?:(?:\u001b\[)|\u009b)(?:(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m])|\u001b[A-M]/g}},{}],169:[function(e,n){"use strict";var l=e("ansi-regex")();n.exports=function(e){return"string"==typeof e?e.replace(l,""):e}},{"ansi-regex":170}],170:[function(e,n,l){arguments[4][168][0].apply(l,arguments)},{dup:168}],171:[function(e,n){(function(e){"use strict";var l=e.argv;n.exports=function(){return"FORCE_COLOR"in e.env?!0:-1!==l.indexOf("--no-color")||-1!==l.indexOf("--no-colors")||-1!==l.indexOf("--color=false")?!1:-1!==l.indexOf("--color")||-1!==l.indexOf("--colors")||-1!==l.indexOf("--color=true")||-1!==l.indexOf("--color=always")?!0:e.stdout&&!e.stdout.isTTY?!1:"UPSTART_JOB"in e.env?!1:"win32"===e.platform?!0:"COLORTERM"in e.env?!0:"dumb"===e.env.TERM?!1:/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(e.env.TERM)?!0:!1}()}).call(this,e("_process"))},{_process:147}],172:[function(e,n){!function(e,l,t){"use strict";function r(e){return null!==e&&("object"==typeof e||"function"==typeof e)}function a(e){return"function"==typeof e}function o(e,n,l){e&&!bl(e=l?e:e[_n],Ul)&&Dl(e,Ul,n)}function u(e){return ul.call(e).slice(8,-1)}function s(e){var n,l;return e==t?e===t?"Undefined":"Null":"string"==typeof(l=(n=Ln(e))[Ul])?l:u(n)}function i(){for(var e=T(this),n=arguments.length,l=Pn(n),t=0,r=Wl._,a=!1;n>t;)(l[t]=arguments[t++])===r&&(a=!0);return function(){var t,o=this,u=arguments.length,s=0,i=0;if(!a&&!u)return d(e,l,o);if(t=l.slice(),a)for(;n>s;s++)t[s]===r&&(t[s]=arguments[i++]);for(;u>i;)t.push(arguments[i++]);return d(e,t,o)}}function c(e,n,l){if(T(e),~l&&n===t)return e;switch(l){case 1:return function(l){return e.call(n,l)};case 2:return function(l,t){return e.call(n,l,t)};case 3:return function(l,t,r){return e.call(n,l,t,r)}}return function(){return e.apply(n,arguments)}}function d(e,n,l){var r=l===t;switch(0|n.length){case 0:return r?e():e.call(l);case 1:return r?e(n[0]):e.call(l,n[0]);case 2:return r?e(n[0],n[1]):e.call(l,n[0],n[1]);case 3:return r?e(n[0],n[1],n[2]):e.call(l,n[0],n[1],n[2]);case 4:return r?e(n[0],n[1],n[2],n[3]):e.call(l,n[0],n[1],n[2],n[3]);case 5:return r?e(n[0],n[1],n[2],n[3],n[4]):e.call(l,n[0],n[1],n[2],n[3],n[4])}return e.apply(l,n)}function p(e){return _l(j(e))}function f(e){return e}function g(){return this }function h(e,n){return bl(e,n)?e[n]:void 0}function m(e){return L(e),yl?ml(e).concat(yl(e)):ml(e)}function y(e,n){for(var l,t=p(e),r=hl(t),a=r.length,o=0;a>o;)if(t[l=r[o++]]===n)return l}function x(e){return On(e).split(",")}function b(e){var n=1==e,l=2==e,r=3==e,a=4==e,o=6==e,u=5==e||o;return function(s){for(var i,d,p=Ln(j(this)),f=arguments[1],g=_l(p),h=c(s,f,3),m=E(g.length),y=0,x=n?Pn(m):l?[]:t;m>y;y++)if((u||y in g)&&(i=g[y],d=h(i,y,p),e))if(n)x[y]=d;else if(d)switch(e){case 3:return!0;case 5:return i;case 6:return y;case 2:x.push(i)}else if(a)return!1;return o?-1:r||a?a:x}}function _(e){return function(n){var l=p(this),t=E(l.length),r=w(arguments[1],t);if(e&&n!=n){for(;t>r;r++)if(I(l[r]))return e||r}else for(;t>r;r++)if((e||r in l)&&l[r]===n)return e||r;return!e&&-1}}function v(e,n){return"function"==typeof e?e:n}function I(e){return e!=e}function k(e){return isNaN(e)?0:Ll(e)}function E(e){return e>0?jl(k(e),El):0}function w(e,n){var e=k(e);return 0>e?Al(e+n,0):jl(e,n)}function R(e){return e>9?e:"0"+e}function S(e,n,l){var t=r(n)?function(e){return n[e]}:n;return function(n){return On(l?n:this).replace(e,t)}}function C(e){return function(n){var l,r,a=On(j(this)),o=k(n),u=a.length;return 0>o||o>=u?e?"":t:(l=a.charCodeAt(o),55296>l||l>56319||o+1===u||(r=a.charCodeAt(o+1))<56320||r>57343?e?a.charAt(o):l:e?a.slice(o,o+2):(l-55296<<10)+(r-56320)+65536)}}function A(e,n,l){if(!e)throw qn(l?n+l:n)}function j(e){if(e==t)throw qn("Function called on null or undefined");return e}function T(e){return A(a(e),e," is not a function!"),e}function L(e){return A(r(e),e," is not an object!"),e}function P(e,n,l){A(e instanceof n,l,": use the 'new' operator!")}function O(e,n){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:n}}function M(e,n,l){return e[n]=l,e}function D(e){return Ol?function(n,l,t){return fl(n,l,O(e,t))}:M}function B(e){return mn+"("+e+")_"+(++Ml+Tl())[In](36)}function N(e,n){return Vn&&Vn[e]||(n?Vn:Nl)(mn+al+e)}function F(e,n){for(var l in n)Dl(e,l,n[l]);return e}function V(e){!Ol||!l&&ol(e)||fl(e,ql,{configurable:!0,get:g})}function U(n,t,r){var o,u,s,i,d=n&Yl,p=d?e:n&zl?e[t]:(e[t]||ll)[_n],f=d?Hl:Hl[t]||(Hl[t]={});d&&(r=t);for(o in r)u=!(n&Jl)&&p&&o in p&&(!a(p[o])||ol(p[o])),s=(u?p:r)[o],l||!d||a(p[o])?n&Kl&&u?i=c(s,e):n&Ql&&!l&&p[o]==s?(i=function(e){return this instanceof s?new s(e):s(e)},i[_n]=s[_n]):i=n&$l&&a(s)?c(sl,s):s:i=r[o],l&&p&&!u&&(d?p[o]=s:delete p[o]&&Dl(p,o,s)),f[o]!=s&&Dl(f,o,i)}function q(e,n){Dl(e,ln,n),Cn in nl&&Dl(e,Cn,n)}function G(e,n,l,t){e[_n]=cl(t||tt,{next:O(1,l)}),o(e,n+" Iterator")}function H(e,n,t,r){var a=e[_n],u=h(a,ln)||h(a,Cn)||r&&h(a,r)||t;if(l&&(q(a,u),u!==t)){var s=dl(u.call(new e));o(s,n+" Iterator",!0),bl(a,Cn)&&q(s,g)}return lt[n]=u,lt[n+" Iterator"]=g,u}function W(e,n,l,t,r,a){function o(e){return function(){return new l(this,e)}}G(l,n,t);var u=o(et+nt),s=o(nt);r==nt?s=H(e,n,s,"values"):u=H(e,n,u,"entries"),r&&U($l+Jl*rt,n,{entries:u,keys:a?s:o(et),values:s})}function X(e,n){return{value:n,done:!!e}}function J(n){var l=Ln(n),t=e[mn],r=(t&&t[Sn]||Cn)in l;return r||ln in l||bl(lt,s(l))}function Y(n){var l=e[mn],t=n[l&&l[Sn]||Cn],r=t||n[ln]||lt[s(n)];return L(r.call(n))}function z(e,n,l){return l?d(e,n):e(n)}function $(e){var n=!0,l={next:function(){throw 1},"return":function(){n=!1}};l[ln]=g;try{e(l)}catch(t){}return n}function K(e){var n=e["return"];n!==t&&n.call(e)}function Q(e,n){try{e(n)}catch(l){throw K(n),l}}function Z(e,n,l,t){Q(function(e){for(var r,a=c(l,t,n?2:1);!(r=e.next()).done;)if(z(a,r.value,n)===!1)return K(e)},Y(e))}var en,nn,ln,tn,rn="Object",an="Function",on="Array",un="String",sn="Number",cn="RegExp",dn="Date",pn="Map",fn="Set",gn="WeakMap",hn="WeakSet",mn="Symbol",yn="Promise",xn="Math",bn="Arguments",_n="prototype",vn="constructor",In="toString",kn=In+"Tag",En="toLocaleString",wn="hasOwnProperty",Rn="forEach",Sn="iterator",Cn="@@"+Sn,An="process",jn="createElement",Tn=e[an],Ln=e[rn],Pn=e[on],On=e[un],Mn=e[sn],Dn=(e[cn],e[dn],e[pn]),Bn=e[fn],Nn=e[gn],Fn=e[hn],Vn=e[mn],Un=e[xn],qn=e.TypeError,Gn=e.RangeError,Hn=e.setTimeout,Wn=e.setImmediate,Xn=e.clearImmediate,Jn=e.parseInt,Yn=e.isFinite,zn=e[An],$n=zn&&zn.nextTick,Kn=e.document,Qn=Kn&&Kn.documentElement,Zn=(e.navigator,e.define),el=e.console||{},nl=Pn[_n],ll=Ln[_n],tl=Tn[_n],rl=1/0,al=".",ol=c(/./.test,/\[native code\]\s*\}\s*$/,1),ul=ll[In],sl=tl.call,il=tl.apply,cl=Ln.create,dl=Ln.getPrototypeOf,pl=Ln.setPrototypeOf,fl=Ln.defineProperty,gl=(Ln.defineProperties,Ln.getOwnPropertyDescriptor),hl=Ln.keys,ml=Ln.getOwnPropertyNames,yl=Ln.getOwnPropertySymbols,xl=Ln.isFrozen,bl=c(sl,ll[wn],2),_l=Ln,vl=Ln.assign||function(e){for(var n=Ln(j(e)),l=arguments.length,t=1;l>t;)for(var r,a=_l(arguments[t++]),o=hl(a),u=o.length,s=0;u>s;)n[r=o[s++]]=a[r];return n},Il=nl.push,kl=(nl.unshift,nl.slice,nl.splice,nl.indexOf,nl[Rn]),El=9007199254740991,wl=Un.pow,Rl=Un.abs,Sl=Un.ceil,Cl=Un.floor,Al=Un.max,jl=Un.min,Tl=Un.random,Ll=Un.trunc||function(e){return(e>0?Cl:Sl)(e)},Pl="Reduce of empty object with no initial value",Ol=!!function(){try{return 2==fl({},"a",{get:function(){return 2}}).a}catch(e){}}(),Ml=0,Dl=D(1),Bl=Vn?M:Dl,Nl=Vn||B,Fl=N("unscopables"),Vl=nl[Fl]||{},Ul=N(kn),ql=N("species"),Gl=u(zn)==An,Hl={},Wl=l?e:Hl,Xl=e.core,Jl=1,Yl=2,zl=4,$l=8,Kl=16,Ql=32;"undefined"!=typeof n&&n.exports?n.exports=Hl:a(Zn)&&Zn.amd?Zn(function(){return Hl}):tn=!0,(tn||l)&&(Hl.noConflict=function(){return e.core=Xl,Hl},e.core=Hl),ln=N(Sn);var Zl=Nl("iter"),et=1,nt=2,lt={},tt={},rt="keys"in nl&&!("next"in[].keys());q(tt,g),!function(n,l,t,r){ol(Vn)||(Vn=function(e){A(!(this instanceof Vn),mn+" is not a "+vn);var l=B(e),a=Bl(cl(Vn[_n]),n,l);return t[l]=a,Ol&&r&&fl(ll,l,{configurable:!0,set:function(e){Dl(this,l,e)}}),a},Dl(Vn[_n],In,function(){return this[n]})),U(Yl+Ql,{Symbol:Vn});var a={"for":function(e){return bl(l,e+="")?l[e]:l[e]=Vn(e)},iterator:ln||N(Sn),keyFor:i.call(y,l),species:ql,toStringTag:Ul=N(kn,!0),unscopables:Fl,pure:Nl,set:Bl,useSetter:function(){r=!0},useSimple:function(){r=!1}};kl.call(x("hasInstance,isConcatSpreadable,match,replace,search,split,toPrimitive"),function(e){a[e]=N(e)}),U(zl,mn,a),o(Vn,mn),U(zl+Jl*!ol(Vn),rn,{getOwnPropertyNames:function(e){for(var n,l=ml(p(e)),r=[],a=0;l.length>a;)bl(t,n=l[a++])||r.push(n);return r},getOwnPropertySymbols:function(e){for(var n,l=ml(p(e)),r=[],a=0;l.length>a;)bl(t,n=l[a++])&&r.push(t[n]);return r}}),o(Un,xn,!0),o(e.JSON,"JSON",!0)}(Nl("tag"),{},{},!0),!function(){var e={assign:vl,is:function(e,n){return e===n?0!==e||1/e===1/n:e!=e&&n!=n}};"__proto__"in ll&&function(n,l){try{l=c(sl,gl(ll,"__proto__").set,2),l({},nl)}catch(t){n=!0}e.setPrototypeOf=pl=pl||function(e,t){return L(e),A(null===t||r(t),t,": can't set as prototype!"),n?e.__proto__=t:l(e,t),e}}(),U(zl,rn,e)}(),!function(){function e(e,n){var l=Ln[e],t=Hl[rn][e],a=0,o={};if(!t||ol(t)){o[e]=1==n?function(e){return r(e)?l(e):e}:2==n?function(e){return r(e)?l(e):!0}:3==n?function(e){return r(e)?l(e):!1}:4==n?function(e,n){return l(p(e),n)}:function(e){return l(p(e))};try{l(al)}catch(u){a=1}U(zl+Jl*a,rn,o)}}e("freeze",1),e("seal",1),e("preventExtensions",1),e("isFrozen",2),e("isSealed",2),e("isExtensible",3),e("getOwnPropertyDescriptor",4),e("getPrototypeOf"),e("keys"),e("getOwnPropertyNames")}(),!function(e){U(zl,sn,{EPSILON:wl(2,-52),isFinite:function(e){return"number"==typeof e&&Yn(e)},isInteger:e,isNaN:I,isSafeInteger:function(n){return e(n)&&Rl(n)<=El},MAX_SAFE_INTEGER:El,MIN_SAFE_INTEGER:-El,parseFloat:parseFloat,parseInt:Jn})}(Mn.isInteger||function(e){return!r(e)&&Yn(e)&&Cl(e)===e}),!function(){function e(n){return Yn(n=+n)&&0!=n?0>n?-e(-n):r(n+a(n*n+1)):n}function n(e){return 0==(e=+e)?e:e>-1e-6&&1e-6>e?e+e*e/2:t(e)-1}var l=Un.E,t=Un.exp,r=Un.log,a=Un.sqrt,o=Un.sign||function(e){return 0==(e=+e)||e!=e?e:0>e?-1:1};U(zl,xn,{acosh:function(e){return(e=+e)<1?0/0:Yn(e)?r(e/l+a(e+1)*a(e-1)/l)+1:e},asinh:e,atanh:function(e){return 0==(e=+e)?e:r((1+e)/(1-e))/2},cbrt:function(e){return o(e=+e)*wl(Rl(e),1/3)},clz32:function(e){return(e>>>=0)?32-e[In](2).length:32},cosh:function(e){return(t(e=+e)+t(-e))/2},expm1:n,fround:function(e){return new Float32Array([e])[0]},hypot:function(){for(var e,n=0,l=arguments.length,t=l,r=Pn(l),o=-rl;l--;){if(e=r[l]=+arguments[l],e==rl||e==-rl)return rl;e>o&&(o=e)}for(o=e||1;t--;)n+=wl(r[t]/o,2);return o*a(n)},imul:function(e,n){var l=65535,t=+e,r=+n,a=l&t,o=l&r;return 0|a*o+((l&t>>>16)*o+a*(l&r>>>16)<<16>>>0)},log1p:function(e){return(e=+e)>-1e-8&&1e-8>e?e-e*e/2:r(1+e)},log10:function(e){return r(e)/Un.LN10},log2:function(e){return r(e)/Un.LN2},sign:o,sinh:function(e){return Rl(e=+e)<1?(n(e)-n(-e))/2:(t(e-1)-t(-e-1))*(l/2)},tanh:function(e){var l=n(e=+e),r=n(-e);return l==rl?1:r==rl?-1:(l-r)/(t(e)+t(-e))},trunc:Ll})}(),!function(e){function n(e){if(u(e)==cn)throw qn()}U(zl,un,{fromCodePoint:function(){for(var n,l=[],t=arguments.length,r=0;t>r;){if(n=+arguments[r++],w(n,1114111)!==n)throw Gn(n+" is not a valid code point");l.push(65536>n?e(n):e(((n-=65536)>>10)+55296,n%1024+56320))}return l.join("")},raw:function(e){for(var n=p(e.raw),l=E(n.length),t=arguments.length,r=[],a=0;l>a;)r.push(On(n[a++])),t>a&&r.push(On(arguments[a]));return r.join("")}}),U($l,un,{codePointAt:C(!1),endsWith:function(e){n(e);var l=On(j(this)),r=arguments[1],a=E(l.length),o=r===t?a:jl(E(r),a);return e+="",l.slice(o-e.length,o)===e},includes:function(e){return n(e),!!~On(j(this)).indexOf(e,arguments[1])},repeat:function(e){var n=On(j(this)),l="",t=k(e);if(0>t||t==rl)throw Gn("Count can't be negative");for(;t>0;(t>>>=1)&&(n+=n))1&t&&(l+=n);return l},startsWith:function(e){n(e);var l=On(j(this)),t=E(jl(arguments[1],l.length));return e+="",l.slice(t,t+e.length)===e}})}(On.fromCharCode),!function(){U(zl+Jl*$(Pn.from),on,{from:function(e){var n,l,r,a=Ln(j(e)),o=arguments[1],u=o!==t,s=u?c(o,arguments[2],2):t,i=0;if(J(a))l=new(v(this,Pn)),Q(function(e){for(;!(r=e.next()).done;i++)l[i]=u?s(r.value,i):r.value},Y(a));else for(l=new(v(this,Pn))(n=E(a.length));n>i;i++)l[i]=u?s(a[i],i):a[i];return l.length=i,l}}),U(zl,on,{of:function(){for(var e=0,n=arguments.length,l=new(v(this,Pn))(n);n>e;)l[e]=arguments[e++];return l.length=n,l}}),V(Pn)}(),!function(){U($l,on,{copyWithin:function(e,n){var l=Ln(j(this)),r=E(l.length),a=w(e,r),o=w(n,r),u=arguments[2],s=u===t?r:w(u,r),i=jl(s-o,r-a),c=1;for(a>o&&o+i>a&&(c=-1,o=o+i-1,a=a+i-1);i-->0;)o in l?l[a]=l[o]:delete l[a],a+=c,o+=c;return l},fill:function(e){for(var n=Ln(j(this)),l=E(n.length),r=w(arguments[1],l),a=arguments[2],o=a===t?l:w(a,l);o>r;)n[r++]=e;return n},find:b(5),findIndex:b(6)}),l&&(kl.call(x("find,findIndex,fill,copyWithin,entries,keys,values"),function(e){Vl[e]=!0}),Fl in nl||Dl(nl,Fl,Vl))}(),!function(e){W(Pn,on,function(e,n){Bl(this,Zl,{o:p(e),i:0,k:n})},function(){var e=this[Zl],n=e.o,l=e.k,r=e.i++;return!n||r>=n.length?(e.o=t,X(1)):l==et?X(0,r):l==nt?X(0,n[r]):X(0,[r,n[r]])},nt),lt[bn]=lt[on],W(On,un,function(e){Bl(this,Zl,{o:On(e),i:0})},function(){var n,l=this[Zl],t=l.o,r=l.i;return r>=t.length?X(1):(n=e.call(t,r),l.i+=n.length,X(0,n))})}(C(!0)),a(Wn)&&a(Xn)||function(n){function l(e){if(bl(h,e)){var n=h[e];delete h[e],n()}}function t(e){l(e.data)}var r,o,u,s=e.postMessage,p=e.addEventListener,f=e.MessageChannel,g=0,h={};Wn=function(e){for(var n=[],l=1;arguments.length>l;)n.push(arguments[l++]);return h[++g]=function(){d(a(e)?e:Tn(e),n)},r(g),g},Xn=function(e){delete h[e]},Gl?r=function(e){$n(i.call(l,e))}:p&&a(s)&&!e.importScripts?(r=function(e){s(e,"*")},p("message",t,!1)):a(f)?(o=new f,u=o.port2,o.port1.onmessage=t,r=c(u.postMessage,u,1)):r=Kn&&n in Kn[jn]("script")?function(e){Qn.appendChild(Kn[jn]("script"))[n]=function(){Qn.removeChild(this),l(e)}}:function(e){Hn(l,0,e)}}("onreadystatechange"),U(Yl+Kl,{setImmediate:Wn,clearImmediate:Xn}),!function(e,n){a(e)&&a(e.resolve)&&e.resolve(n=new e(function(){}))==n||function(n,l){function o(e){var n;return r(e)&&(n=e.then),a(n)?n:!1}function u(e){var n,t=e[l],r=t.c,a=0;if(t.h)return!0;for(;r.length>a;)if(n=r[a++],n.fail||u(n.P))return!0}function s(e,l){var t=e.c;(l||t.length)&&n(function(){var n=e.p,r=e.v,s=1==e.s,i=0;if(l&&!u(n))Hn(function(){u(n)||(Gl?!zn.emit("unhandledRejection",r,n):a(el.error)&&el.error("Unhandled promise rejection",r))},1e3);else for(;t.length>i;)!function(n){var l,t,a=s?n.ok:n.fail;try{a?(s||(e.h=!0),l=a===!0?r:a(r),l===n.P?n.rej(qn(yn+"-chain cycle")):(t=o(l))?t.call(l,n.res,n.rej):n.res(l)):n.rej(r)}catch(u){n.rej(u)}}(t[i++]);t.length=0})}function i(e){var n,l,t=this;if(!t.d){t.d=!0,t=t.r||t;try{(n=o(e))?(l={r:t,d:!1},n.call(e,c(i,l,1),c(d,l,1))):(t.v=e,t.s=1,s(t))}catch(r){d.call(l||{r:t,d:!1},r)}}}function d(e){var n=this;n.d||(n.d=!0,n=n.r||n,n.v=e,n.s=2,s(n,!0))}function p(e){var n=L(e)[ql];return n!=t?n:e}e=function(n){T(n),P(this,e,yn);var r={p:this,c:[],s:0,d:!1,v:t,h:!1};Dl(this,l,r);try{n(c(i,r,1),c(d,r,1))}catch(a){d.call(r,a)}},F(e[_n],{then:function(n,r){var o=L(L(this)[vn])[ql],u={ok:a(n)?n:!0,fail:a(r)?r:!1},i=u.P=new(o!=t?o:e)(function(e,n){u.res=T(e),u.rej=T(n)}),c=this[l];return c.c.push(u),c.s&&s(c),i},"catch":function(e){return this.then(t,e)}}),F(e,{all:function(e){var n=p(this),l=[];return new n(function(t,r){Z(e,!1,Il,l);var a=l.length,o=Pn(a);a?kl.call(l,function(e,l){n.resolve(e).then(function(e){o[l]=e,--a||t(o)},r)}):t(o)})},race:function(e){var n=p(this);return new n(function(l,t){Z(e,!1,function(e){n.resolve(e).then(l,t)})})},reject:function(e){return new(p(this))(function(n,l){l(e)})},resolve:function(e){return r(e)&&l in e&&dl(e)===this[_n]?e:new(p(this))(function(n){n(e)})}})}($n||Wn,Nl("record")),o(e,yn),V(e),U(Yl+Jl*!ol(e),{Promise:e})}(e[yn]),!function(){function e(e,n,r,a,u,s){function i(e,n){return n!=t&&Z(n,u,e[f],e),e}function c(e,n){var t=g[e];l&&(g[e]=function(e,l){var r=t.call(this,0===e?0:e,l);return n?this:r})}var f=u?"set":"add",g=e&&e[_n],x={};if(ol(e)&&(s||!rt&&bl(g,Rn)&&bl(g,"entries"))){var _,v=e,I=new e,k=I[f](s?{}:-0,1);$(function(n){new e(n)})&&(e=function(l){return P(this,e,n),i(new v,l)},e[_n]=g,l&&(g[vn]=e)),s||I[Rn](function(e,n){_=1/n===-rl}),_&&(c("delete"),c("has"),u&&c("get")),(_||k!==I)&&c(f,!0)}else e=s?function(l){P(this,e,n),Bl(this,d,b++),i(this,l)}:function(l){var r=this;P(r,e,n),Bl(r,p,cl(null)),Bl(r,y,0),Bl(r,h,t),Bl(r,m,t),i(r,l)},F(F(e[_n],r),a),s||!Ol||fl(e[_n],"size",{get:function(){return j(this[y])}});return o(e,n),V(e),x[n]=e,U(Yl+Ql+Jl*!ol(e),x),s||W(e,n,function(e,n){Bl(this,Zl,{o:e,k:n})},function(){for(var e=this[Zl],n=e.k,l=e.l;l&&l.r;)l=l.p;return e.o&&(e.l=l=l?l.n:e.o[m])?n==et?X(0,l.k):n==nt?X(0,l.v):X(0,[l.k,l.v]):(e.o=t,X(1))},u?et+nt:nt,!u),e}function n(e,n){if(!r(e))return("string"==typeof e?"S":"P")+e;if(xl(e))return"F";if(!bl(e,d)){if(!n)return"E";Dl(e,d,++b)}return"O"+e[d]}function a(e,l){var t,r=n(l);if("F"!=r)return e[p][r];for(t=e[m];t;t=t.n)if(t.k==l)return t}function u(e,l,r){var o,u,s=a(e,l);return s?s.v=r:(e[h]=s={i:u=n(l,!0),k:l,v:r,p:o=e[h],n:t,r:!1},e[m]||(e[m]=s),o&&(o.n=s),e[y]++,"F"!=u&&(e[p][u]=s)),e}function s(e,n,l){return xl(L(n))?i(e).set(n,l):(bl(n,f)||Dl(n,f,{}),n[f][e[d]]=l),e}function i(e){return e[g]||Dl(e,g,new Dn)[g]}var d=Nl("uid"),p=Nl("O1"),f=Nl("weak"),g=Nl("leak"),h=Nl("last"),m=Nl("first"),y=Ol?Nl("size"):"size",b=0,_={},v={clear:function(){for(var e=this,n=e[p],l=e[m];l;l=l.n)l.r=!0,l.p&&(l.p=l.p.n=t),delete n[l.i];e[m]=e[h]=t,e[y]=0},"delete":function(e){var n=this,l=a(n,e);if(l){var t=l.n,r=l.p;delete n[p][l.i],l.r=!0,r&&(r.n=t),t&&(t.p=r),n[m]==l&&(n[m]=t),n[h]==l&&(n[h]=r),n[y]--}return!!l},forEach:function(e){for(var n,l=c(e,arguments[1],3);n=n?n.n:this[m];)for(l(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!a(this,e)}};Dn=e(Dn,pn,{get:function(e){var n=a(this,e);return n&&n.v},set:function(e,n){return u(this,0===e?0:e,n)}},v,!0),Bn=e(Bn,fn,{add:function(e){return u(this,e=0===e?0:e,e)}},v);var I={"delete":function(e){return r(e)?xl(e)?i(this)["delete"](e):bl(e,f)&&bl(e[f],this[d])&&delete e[f][this[d]]:!1},has:function(e){return r(e)?xl(e)?i(this).has(e):bl(e,f)&&bl(e[f],this[d]):!1}};Nn=e(Nn,gn,{get:function(e){if(r(e)){if(xl(e))return i(this).get(e);if(bl(e,f))return e[f][this[d]]}},set:function(e,n){return s(this,e,n)}},I,!0,!0),l&&7!=(new Nn).set(Ln.freeze(_),7).get(_)&&kl.call(x("delete,has,get,set"),function(e){var n=Nn[_n][e];Nn[_n][e]=function(l,t){if(r(l)&&xl(l)){var a=i(this)[e](l,t);return"set"==e?this:a}return n.call(this,l,t)}}),Fn=e(Fn,hn,{add:function(e){return s(this,e,!0)}},I,!1,!0)}(),!function(){function e(e){var n,l=[];for(n in e)l.push(n);Bl(this,Zl,{o:e,a:l,i:0})}function n(e){return function(n){L(n);try{return e.apply(t,arguments),!0}catch(l){return!1}}}function l(e,n){var a,o=arguments.length<3?e:arguments[2],u=gl(L(e),n);return u?bl(u,"value")?u.value:u.get===t?t:u.get.call(o):r(a=dl(e))?l(a,n,o):t}function a(e,n,l){var o,u,s=arguments.length<4?e:arguments[3],i=gl(L(e),n);if(!i){if(r(u=dl(e)))return a(u,n,l,s);i=O(0)}return bl(i,"value")?i.writable!==!1&&r(s)?(o=gl(s,n)||O(0),o.value=l,fl(s,n,o),!0):!1:i.set===t?!1:(i.set.call(s,l),!0)}G(e,rn,function(){var e,n=this[Zl],l=n.a;do if(n.i>=l.length)return X(1);while(!((e=l[n.i++])in n.o));return X(0,e)});var o=Ln.isExtensible||f,u={apply:c(sl,il,3),construct:function(e,n){var l=T(arguments.length<3?e:arguments[2])[_n],t=cl(r(l)?l:ll),a=il.call(e,t,n);return r(a)?a:t},defineProperty:n(fl),deleteProperty:function(e,n){var l=gl(L(e),n);return l&&!l.configurable?!1:delete e[n]},enumerate:function(n){return new e(L(n))},get:l,getOwnPropertyDescriptor:function(e,n){return gl(L(e),n)},getPrototypeOf:function(e){return dl(L(e))},has:function(e,n){return n in e},isExtensible:function(e){return!!o(L(e))},ownKeys:m,preventExtensions:n(Ln.preventExtensions||f),set:a};pl&&(u.setPrototypeOf=function(e,n){return pl(L(e),n),!0}),U(Yl,{Reflect:{}}),U(zl,"Reflect",u)}(),!function(){function e(e){return function(n){var l,t=p(n),r=hl(n),a=r.length,o=0,u=Pn(a);if(e)for(;a>o;)u[o]=[l=r[o++],t[l]];else for(;a>o;)u[o]=t[r[o++]];return u}}U($l,on,{includes:_(!0)}),U($l,un,{at:C(!0)}),U(zl,rn,{getOwnPropertyDescriptors:function(e){var n=p(e),l={};return kl.call(m(n),function(e){fl(l,e,O(0,gl(n,e)))}),l},values:e(!1),entries:e(!0)}),U(zl,cn,{escape:S(/([\\\-[\]{}()*+?.,^$|])/g,"\\$1",!0)})}(),!function(e){function n(e){if(e){var n=e[_n];Dl(n,en,n.get),Dl(n,l,n.set),Dl(n,t,n["delete"])}}en=N(e+"Get",!0);var l=N(e+fn,!0),t=N(e+"Delete",!0);U(zl,mn,{referenceGet:en,referenceSet:l,referenceDelete:t}),Dl(tl,en,g),n(Dn),n(Nn)}("reference"),!function(e){function n(e,n){Bl(this,Zl,{o:p(e),a:hl(e),i:0,k:n})}function l(e){return function(l){return new n(l,e)}}function a(e){var n=1==e,l=4==e;return function(r,a,o){var u,s,i,d=c(a,o,3),f=p(r),g=n||7==e||2==e?new(v(this,nn)):t;for(u in f)if(bl(f,u)&&(s=f[u],i=d(s,u,r),e))if(n)g[u]=i;else if(i)switch(e){case 2:g[u]=s;break;case 3:return!0;case 5:return s;case 6:return u;case 7:g[i[0]]=i[1]}else if(l)return!1;return 3==e||l?l:g}}function o(e){return function(n,l,r){T(l);var a,o,u,s=p(n),i=hl(s),c=i.length,d=0;for(e?a=r==t?new(v(this,nn)):Ln(r):arguments.length<3?(A(c,Pl),a=s[i[d++]]):a=Ln(r);c>d;)if(bl(s,o=i[d++]))if(u=l(a,s[o],o,n),e){if(u===!1)break}else a=u;return a}}function u(e,n){return(n==n?y(e,n):s(e,I))!==t}nn=function(e){var n=cl(null);return e!=t&&(J(e)?Z(e,!0,function(e,l){n[e]=l}):vl(n,e)),n},nn[_n]=null,G(n,e,function(){var e,n=this[Zl],l=n.o,r=n.a,a=n.k;do if(n.i>=r.length)return n.o=t,X(1);while(!bl(l,e=r[n.i++]));return a==et?X(0,e):a==nt?X(0,l[e]):X(0,[e,l[e]])});var s=a(6),i={keys:l(et),values:l(nt),entries:l(et+nt),forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findKey:s,mapPairs:a(7),reduce:o(!1),turn:o(!0),keyOf:y,includes:u,has:bl,get:h,set:D(0),isDict:function(e){return r(e)&&dl(e)===nn[_n]}};if(en)for(var f in i)!function(e){function n(){for(var n=[this],l=0;l<arguments.length;)n.push(arguments[l++]);return d(e,n)}e[en]=function(){return n}}(i[f]);U(Yl+Jl,{Dict:F(nn,i)})}("Dict"),!function(e,n){function l(n,t){return this instanceof l?(this[Zl]=Y(n),void(this[e]=!!t)):new l(n,t)}function r(l){function t(l,t,r){this[Zl]=Y(l),this[e]=l[e],this[n]=c(t,r,l[e]?2:1)}return G(t,"Chain",l,a),q(t[_n],g),t}G(l,"Wrapper",function(){return this[Zl].next()});var a=l[_n];q(a,function(){return this[Zl]});var o=r(function(){var l=this[Zl].next();return l.done?l:X(0,z(this[n],l.value,this[e]))}),u=r(function(){for(;;){var l=this[Zl].next();if(l.done||z(this[n],l.value,this[e]))return l}});F(a,{of:function(n,l){Z(this,this[e],n,l)},array:function(e,n){var l=[];return Z(e!=t?this.map(e,n):this,!1,Il,l),l},filter:function(e,n){return new u(this,e,n)},map:function(e,n){return new o(this,e,n)}}),l.isIterable=J,l.getIterator=Y,U(Yl+Jl,{$for:l})}("entries",Nl("fn")),U(Yl+Jl,{delay:function(e){return new Promise(function(n){Hn(n,e,!0)})}}),!function(e,n){function l(l){var r=this,a={};return Dl(r,e,function(e){return e!==t&&e in r?bl(a,e)?a[e]:a[e]=c(r[e],r,-1):n.call(r)})[e](l)}Hl._=Wl._=Wl._||{},U($l+Jl,an,{part:i,only:function(e,n){var l=T(this),t=E(e),r=arguments.length>1;return function(){for(var e=jl(t,arguments.length),a=Pn(e),o=0;e>o;)a[o]=arguments[o++];return d(l,a,r?n:this)}}}),Dl(Wl._,In,function(){return e}),Dl(ll,e,l),Ol||Dl(nl,e,l)}(Ol?B("tie"):En,ll[En]),!function(){function e(e,n){for(var l,t=m(p(n)),r=t.length,a=0;r>a;)fl(e,l=t[a++],gl(n,l));return e}U(zl+Jl,rn,{isObject:r,classof:s,define:e,make:function(n,l){return e(cl(n),l)}})}(),U($l+Jl,on,{turn:function(e,n){T(e);for(var l=n==t?[]:Ln(n),r=_l(this),a=E(r.length),o=0;a>o&&e(l,r[o],o++,this)!==!1;);return l}}),l&&(Vl.turn=!0),!function(e){function n(e){Bl(this,Zl,{l:E(e),i:0})}G(n,sn,function(){var e=this[Zl],n=e.i++;return n<e.l?X(0,n):X(1)}),H(Mn,sn,function(){return new n(this)}),e.random=function(e){var n=+this,l=e==t?0:+e,r=jl(n,l);return Tl()*(Al(n,l)-r)+r},kl.call(x("round,floor,ceil,abs,sin,asin,cos,acos,tan,atan,exp,sqrt,max,min,pow,atan2,acosh,asinh,atanh,cbrt,clz32,cosh,expm1,hypot,imul,log1p,log10,log2,sign,sinh,tanh,trunc"),function(n){var l=Un[n];l&&(e[n]=function(){for(var e=[+this],n=0;arguments.length>n;)e.push(arguments[n++]);return d(l,e)})}),U($l+Jl,sn,e)}({}),!function(){var e,n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"},l={};for(e in n)l[n[e]]=e;U($l+Jl,un,{escapeHTML:S(/[&<>"']/g,n),unescapeHTML:S(/&(?:amp|lt|gt|quot|apos);/g,l)})}(),!function(e,n,l,t,r,a,o,u,s){function i(n){return function(i,c){function d(e){return p[n+e]()}var p=this,f=l[bl(l,c)?c:t];return On(i).replace(e,function(e){switch(e){case"s":return d(r);case"ss":return R(d(r));case"m":return d(a);case"mm":return R(d(a));case"h":return d(o);case"hh":return R(d(o));case"D":return d(dn);case"DD":return R(d(dn));case"W":return f[0][d("Day")];case"N":return d(u)+1;case"NN":return R(d(u)+1);case"M":return f[2][d(u)];case"MM":return f[1][d(u)];case"Y":return d(s);case"YY":return R(d(s)%100)}return e})}}function c(e,t){function r(e){var l=[];return kl.call(x(t.months),function(t){l.push(t.replace(n,"$"+e))}),l}return l[e]=[x(t.weekdays),r(1),r(2)],Hl}U($l+Jl,dn,{format:i("get"),formatUTC:i("getUTC")}),c(t,{weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",months:"January,February,March,April,May,June,July,August,September,October,November,December"}),c("ru",{weekdays:"Воскресенье,Понедельник,Вторник,Среда,Четверг,Пятница,Суббота",months:"Январ:я|ь,Феврал:я|ь,Март:а|,Апрел:я|ь,Ма:я|й,Июн:я|ь,Июл:я|ь,Август:а|,Сентябр:я|ь,Октябр:я|ь,Ноябр:я|ь,Декабр:я|ь"}),Hl.locale=function(e){return bl(l,e)?t=e:t},Hl.addLocale=c}(/\b\w\w?\b/g,/:(.*)\|(.*)$/,{},"en","Seconds","Minutes","Hours","Month","FullYear"),U(Yl+Jl,{global:e}),!function(e){function n(n,l){kl.call(x(n),function(n){n in nl&&(e[n]=c(sl,nl[n],l))})}n("pop,reverse,shift,keys,values,entries",1),n("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3),n("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill,turn"),U(zl,on,e)}({}),!function(e){!l||!e||ln in e[_n]||Dl(e[_n],ln,lt[on]),lt.NodeList=lt[on]}(e.NodeList),!function(e,n){kl.call(x("assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,isIndependentlyComposed,log,markTimeline,profile,profileEnd,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn"),function(l){e[l]=function(){return n&&l in el?il.call(el[l],el,arguments):void 0}}),U(Yl+Jl,{log:vl(e.log,e,{enable:function(){n=!0},disable:function(){n=!1}})})}({},!0)}("undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),!1)},{}],173:[function(e,n,l){function t(){return l.colors[c++%l.colors.length]}function r(e){function n(){}function r(){var e=r,n=+new Date,a=n-(i||n);e.diff=a,e.prev=i,e.curr=n,i=n,null==e.useColors&&(e.useColors=l.useColors()),null==e.color&&e.useColors&&(e.color=t());var o=Array.prototype.slice.call(arguments);o[0]=l.coerce(o[0]),"string"!=typeof o[0]&&(o=["%o"].concat(o));var u=0;o[0]=o[0].replace(/%([a-z%])/g,function(n,t){if("%%"===n)return n;u++;var r=l.formatters[t];if("function"==typeof r){var a=o[u];n=r.call(e,a),o.splice(u,1),u--}return n}),"function"==typeof l.formatArgs&&(o=l.formatArgs.apply(e,o));var s=r.log||l.log||console.log.bind(console);s.apply(e,o)}n.enabled=!1,r.enabled=!0;var a=l.enabled(e)?r:n;return a.namespace=e,a}function a(e){l.save(e);for(var n=(e||"").split(/[\s,]+/),t=n.length,r=0;t>r;r++)n[r]&&(e=n[r].replace(/\*/g,".*?"),"-"===e[0]?l.skips.push(new RegExp("^"+e.substr(1)+"$")):l.names.push(new RegExp("^"+e+"$")))}function o(){l.enable("")}function u(e){var n,t;for(n=0,t=l.skips.length;t>n;n++)if(l.skips[n].test(e))return!1;for(n=0,t=l.names.length;t>n;n++)if(l.names[n].test(e))return!0;return!1}function s(e){return e instanceof Error?e.stack||e.message:e}l=n.exports=r,l.coerce=s,l.disable=o,l.enable=a,l.enabled=u,l.humanize=e("ms"),l.names=[],l.skips=[],l.formatters={};var i,c=0},{ms:175}],174:[function(e,n,l){(function(t){function r(){var e=(t.env.DEBUG_COLORS||"").trim().toLowerCase();return 0===e.length?c.isatty(p):"0"!==e&&"no"!==e&&"false"!==e&&"disabled"!==e}function a(){var e=arguments,n=this.useColors,t=this.namespace;if(n){var r=this.color;e[0]=" [9"+r+"m"+t+" "+e[0]+"[3"+r+"m +"+l.humanize(this.diff)+""}else e[0]=(new Date).toUTCString()+" "+t+" "+e[0];return e}function o(){return f.write(d.format.apply(this,arguments)+"\n")}function u(e){null==e?delete t.env.DEBUG:t.env.DEBUG=e}function s(){return t.env.DEBUG}function i(n){var l,r=t.binding("tty_wrap");switch(r.guessHandleType(n)){case"TTY":l=new c.WriteStream(n),l._type="tty",l._handle&&l._handle.unref&&l._handle.unref();break;case"FILE":var a=e("fs");l=new a.SyncWriteStream(n,{autoClose:!1}),l._type="fs";break;case"PIPE":case"TCP":var o=e("net");l=new o.Socket({fd:n,readable:!1,writable:!0}),l.readable=!1,l.read=null,l._type="pipe",l._handle&&l._handle.unref&&l._handle.unref();break;default:throw new Error("Implement me. Unknown stream file type!")}return l.fd=n,l._isStdio=!0,l}var c=e("tty"),d=e("util");l=n.exports=e("./debug"),l.log=o,l.formatArgs=a,l.save=u,l.load=s,l.useColors=r,l.colors=[6,2,3,4,5,1];var p=parseInt(t.env.DEBUG_FD,10)||2,f=1===p?t.stdout:2===p?t.stderr:i(p),g=4===d.inspect.length?function(e,n){return d.inspect(e,void 0,void 0,n)}:function(e,n){return d.inspect(e,{colors:n})};l.formatters.o=function(e){return g(e,this.useColors).replace(/\s*\n\s*/g," ")},l.enable(s())}).call(this,e("_process"))},{"./debug":173,_process:147,fs:137,net:137,tty:161,util:163}],175:[function(e,n){function l(e){var n=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(e);if(n){var l=parseFloat(n[1]),t=(n[2]||"ms").toLowerCase();switch(t){case"years":case"year":case"y":return l*c;case"days":case"day":case"d":return l*i;case"hours":case"hour":case"h":return l*s;case"minutes":case"minute":case"m":return l*u;case"seconds":case"second":case"s":return l*o;case"ms":return l}}}function t(e){return e>=i?Math.round(e/i)+"d":e>=s?Math.round(e/s)+"h":e>=u?Math.round(e/u)+"m":e>=o?Math.round(e/o)+"s":e+"ms"}function r(e){return a(e,i,"day")||a(e,s,"hour")||a(e,u,"minute")||a(e,o,"second")||e+" ms"}function a(e,n,l){return n>e?void 0:1.5*n>e?Math.floor(e/n)+" "+l:Math.ceil(e/n)+" "+l+"s"}var o=1e3,u=60*o,s=60*u,i=24*s,c=365.25*i;n.exports=function(e,n){return n=n||{},"string"==typeof e?l(e):n.long?r(e):t(e)}},{}],176:[function(e,n){"use strict";function l(e){var n=0,l=0,t=0;for(var r in e){var a=e[r],o=a[0],u=a[1];(o>l||o===l&&u>t)&&(l=o,t=u,n=+r)}return n}var t=e("repeating"),r=/^(?:( )+|\t+)/;n.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");var n,a,o=0,u=0,s=0,i={};e.split(/\n/g).forEach(function(e){if(e){var l,t=e.match(r);t?(l=t[0].length,t[1]?u++:o++):l=0;var c=l-s;s=l,c?(a=c>0,n=i[a?c:-c],n?n[0]++:n=i[c]=[1,0]):n&&(n[1]+=+a)}});var c,d,p=l(i);return p?u>=o?(c="space",d=t(" ",p)):(c="tab",d=t(" ",p)):(c=null,d=""),{amount:p,type:c,indent:d}}},{repeating:320}],177:[function(n,l,t){!function(n,l){"use strict";"function"==typeof e&&e.amd?e(["exports"],l):l("undefined"!=typeof t?t:n.estraverse={})}(this,function r(e){"use strict";function n(){}function l(e){var n,t,r={};for(n in e)e.hasOwnProperty(n)&&(t=e[n],r[n]="object"==typeof t&&null!==t?l(t):t);return r}function t(e){var n,l={};for(n in e)e.hasOwnProperty(n)&&(l[n]=e[n]);return l}function a(e,n){var l,t,r,a;for(t=e.length,r=0;t;)l=t>>>1,a=r+l,n(e[a])?t=l:(r=a+1,t-=l+1);return r}function o(e,n){var l,t,r,a;for(t=e.length,r=0;t;)l=t>>>1,a=r+l,n(e[a])?(r=a+1,t-=l+1):t=l;return r}function u(e,n){return I(n).forEach(function(l){e[l]=n[l]}),e}function s(e,n){this.parent=e,this.key=n}function i(e,n,l,t){this.node=e,this.path=n,this.wrap=l,this.ref=t}function c(){}function d(e){return null==e?!1:"object"==typeof e&&"string"==typeof e.type}function p(e,n){return(e===y.ObjectExpression||e===y.ObjectPattern)&&"properties"===n}function f(e,n){var l=new c;return l.traverse(e,n)}function g(e,n){var l=new c;return l.replace(e,n)}function h(e,n){var l;return l=a(n,function(n){return n.range[0]>e.range[0]}),e.extendedRange=[e.range[0],e.range[1]],l!==n.length&&(e.extendedRange[1]=n[l].range[0]),l-=1,l>=0&&(e.extendedRange[0]=n[l].range[1]),e}function m(e,n,t){var r,a,o,u,s=[];if(!e.range)throw new Error("attachComments needs range information");if(!t.length){if(n.length){for(o=0,a=n.length;a>o;o+=1)r=l(n[o]),r.extendedRange=[0,e.range[0]],s.push(r);e.leadingComments=s}return e}for(o=0,a=n.length;a>o;o+=1)s.push(h(l(n[o]),t));return u=0,f(e,{enter:function(e){for(var n;u<s.length&&(n=s[u],!(n.extendedRange[1]>e.range[0]));)n.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(n),s.splice(u,1)):u+=1;return u===s.length?b.Break:s[u].extendedRange[0]>e.range[1]?b.Skip:void 0}}),u=0,f(e,{leave:function(e){for(var n;u<s.length&&(n=s[u],!(e.range[1]<n.extendedRange[0]));)e.range[1]===n.extendedRange[0]?(e.trailingComments||(e.trailingComments=[]),e.trailingComments.push(n),s.splice(u,1)):u+=1;return u===s.length?b.Break:s[u].extendedRange[0]>e.range[1]?b.Skip:void 0}}),e}var y,x,b,_,v,I,k,E,w;return x=Array.isArray,x||(x=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),n(t),n(o),v=Object.create||function(){function e(){}return function(n){return e.prototype=n,new e}}(),I=Object.keys||function(e){var n,l=[];for(n in e)l.push(n);return l},y={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportBatchSpecifier:"ExportBatchSpecifier",ExportDeclaration:"ExportDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},_={AssignmentExpression:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","defaults","rest","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","body","superClass"],ClassExpression:["id","body","superClass"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportBatchSpecifier:[],ExportDeclaration:["declaration","specifiers","source"],ExportSpecifier:["id","name"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","defaults","rest","body"],FunctionExpression:["id","params","defaults","rest","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["id"],ImportNamespaceSpecifier:["id"],ImportSpecifier:["id","name"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],Program:["body"],Property:["key","value"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handlers","handler","guardedHandlers","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},k={},E={},w={},b={Break:k,Skip:E,Remove:w},s.prototype.replace=function(e){this.parent[this.key]=e },s.prototype.remove=function(){return x(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},c.prototype.path=function(){function e(e,n){if(x(n))for(t=0,r=n.length;r>t;++t)e.push(n[t]);else e.push(n)}var n,l,t,r,a,o;if(!this.__current.path)return null;for(a=[],n=2,l=this.__leavelist.length;l>n;++n)o=this.__leavelist[n],e(a,o.path);return e(a,this.__current.path),a},c.prototype.type=function(){var e=this.current();return e.type||this.__current.wrap},c.prototype.parents=function(){var e,n,l;for(l=[],e=1,n=this.__leavelist.length;n>e;++e)l.push(this.__leavelist[e].node);return l},c.prototype.current=function(){return this.__current.node},c.prototype.__execute=function(e,n){var l,t;return t=void 0,l=this.__current,this.__current=n,this.__state=null,e&&(t=e.call(this,n.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=l,t},c.prototype.notify=function(e){this.__state=e},c.prototype.skip=function(){this.notify(E)},c.prototype["break"]=function(){this.notify(k)},c.prototype.remove=function(){this.notify(w)},c.prototype.__initialize=function(e,n){this.visitor=n,this.root=e,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback="iteration"===n.fallback,this.__keys=_,n.keys&&(this.__keys=u(v(this.__keys),n.keys))},c.prototype.traverse=function(e,n){var l,t,r,a,o,u,s,c,f,g,h,m;for(this.__initialize(e,n),m={},l=this.__worklist,t=this.__leavelist,l.push(new i(e,null,null,null)),t.push(new i(null,null,null,null));l.length;)if(r=l.pop(),r!==m){if(r.node){if(u=this.__execute(n.enter,r),this.__state===k||u===k)return;if(l.push(m),t.push(r),this.__state===E||u===E)continue;if(a=r.node,o=r.wrap||a.type,g=this.__keys[o],!g){if(!this.__fallback)throw new Error("Unknown node type "+o+".");g=I(a)}for(c=g.length;(c-=1)>=0;)if(s=g[c],h=a[s])if(x(h)){for(f=h.length;(f-=1)>=0;)if(h[f]){if(p(o,g[c]))r=new i(h[f],[s,f],"Property",null);else{if(!d(h[f]))continue;r=new i(h[f],[s,f],null,null)}l.push(r)}}else d(h)&&l.push(new i(h,s,null,null))}}else if(r=t.pop(),u=this.__execute(n.leave,r),this.__state===k||u===k)return},c.prototype.replace=function(e,n){function l(e){var n,l,r,a;if(e.ref.remove())for(l=e.ref.key,a=e.ref.parent,n=t.length;n--;)if(r=t[n],r.ref&&r.ref.parent===a){if(r.ref.key<l)break;--r.ref.key}}var t,r,a,o,u,c,f,g,h,m,y,b,_;for(this.__initialize(e,n),y={},t=this.__worklist,r=this.__leavelist,b={root:e},c=new i(e,null,null,new s(b,"root")),t.push(c),r.push(c);t.length;)if(c=t.pop(),c!==y){if(u=this.__execute(n.enter,c),void 0!==u&&u!==k&&u!==E&&u!==w&&(c.ref.replace(u),c.node=u),(this.__state===w||u===w)&&(l(c),c.node=null),this.__state===k||u===k)return b.root;if(a=c.node,a&&(t.push(y),r.push(c),this.__state!==E&&u!==E)){if(o=c.wrap||a.type,h=this.__keys[o],!h){if(!this.__fallback)throw new Error("Unknown node type "+o+".");h=I(a)}for(f=h.length;(f-=1)>=0;)if(_=h[f],m=a[_])if(x(m)){for(g=m.length;(g-=1)>=0;)if(m[g]){if(p(o,h[f]))c=new i(m[g],[_,g],"Property",new s(m,g));else{if(!d(m[g]))continue;c=new i(m[g],[_,g],null,new s(m,g))}t.push(c)}}else d(m)&&t.push(new i(m,_,null,new s(a,_)))}}else if(c=r.pop(),u=this.__execute(n.leave,c),void 0!==u&&u!==k&&u!==E&&u!==w&&c.ref.replace(u),(this.__state===w||u===w)&&l(c),this.__state===k||u===k)return b.root;return b.root},e.version="1.8.1-dev",e.Syntax=y,e.traverse=f,e.replace=g,e.attachComments=m,e.VisitorKeys=_,e.VisitorOption=b,e.Controller=c,e.cloneEnvironment=function(){return r({})},e})},{}],178:[function(e,n){!function(){"use strict";function e(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function l(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function t(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function r(e){return t(e)||null!=e&&"FunctionDeclaration"===e.type}function a(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}function o(e){var n;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;n=e.consequent;do{if("IfStatement"===n.type&&null==n.alternate)return!0;n=a(n)}while(n);return!1}n.exports={isExpression:e,isStatement:t,isIterationStatement:l,isSourceElement:r,isProblematicIfStatement:o,trailingStatement:a}}()},{}],179:[function(e,n){!function(){"use strict";function e(e){return e>=48&&57>=e}function l(n){return e(n)||n>=97&&102>=n||n>=65&&70>=n}function t(e){return e>=48&&55>=e}function r(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&i.indexOf(e)>=0}function a(e){return 10===e||13===e||8232===e||8233===e}function o(e){return e>=97&&122>=e||e>=65&&90>=e||36===e||95===e||92===e||e>=128&&s.NonAsciiIdentifierStart.test(String.fromCharCode(e))}function u(e){return e>=97&&122>=e||e>=65&&90>=e||e>=48&&57>=e||36===e||95===e||92===e||e>=128&&s.NonAsciiIdentifierPart.test(String.fromCharCode(e))}var s,i;s={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},i=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],n.exports={isDecimalDigit:e,isHexDigit:l,isOctalDigit:t,isWhiteSpace:r,isLineTerminator:a,isIdentifierStart:o,isIdentifierPart:u}}()},{}],180:[function(e,n){!function(){"use strict";function l(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function t(e,n){return n||"yield"!==e?r(e,n):!1}function r(e,n){if(n&&l(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function a(e,n){return"null"===e||"true"===e||"false"===e||t(e,n)}function o(e,n){return"null"===e||"true"===e||"false"===e||r(e,n)}function u(e){return"eval"===e||"arguments"===e}function s(e){var n,l,t;if(0===e.length)return!1;if(t=e.charCodeAt(0),!d.isIdentifierStart(t)||92===t)return!1;for(n=1,l=e.length;l>n;++n)if(t=e.charCodeAt(n),!d.isIdentifierPart(t)||92===t)return!1;return!0}function i(e,n){return s(e)&&!a(e,n)}function c(e,n){return s(e)&&!o(e,n)}var d=e("./code");n.exports={isKeywordES5:t,isKeywordES6:r,isReservedWordES5:a,isReservedWordES6:o,isRestrictedWord:u,isIdentifierName:s,isIdentifierES5:i,isIdentifierES6:c}}()},{"./code":179}],181:[function(e,n,l){!function(){"use strict";l.ast=e("./ast"),l.code=e("./code"),l.keyword=e("./keyword")}()},{"./ast":178,"./code":179,"./keyword":180}],182:[function(e,n){n.exports={builtin:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},nonstandard:{escape:!1,unescape:!1},browser:{addEventListener:!1,alert:!1,applicationCache:!1,atob:!1,Audio:!1,AudioProcessingEvent:!1,BeforeUnloadEvent:!1,Blob:!1,blur:!1,btoa:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,CloseEvent:!1,Comment:!1,CompositionEvent:!1,confirm:!1,console:!1,crypto:!1,CSS:!1,CustomEvent:!1,DataView:!1,Debug:!1,defaultStatus:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,DOMParser:!1,DragEvent:!1,Element:!1,ElementTimeControl:!1,ErrorEvent:!1,event:!1,Event:!1,FileReader:!1,find:!1,focus:!1,FocusEvent:!1,FormData:!1,frameElement:!1,frames:!1,GamepadEvent:!1,getComputedStyle:!1,getSelection:!1,HashChangeEvent:!1,history:!1,HTMLAnchorElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPreElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLUListElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBEnvironment:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,Image:!1,indexedDB:!1,innerHeight:!1,innerWidth:!1,InputEvent:!1,Intl:!1,KeyboardEvent:!1,length:!1,localStorage:!1,location:!1,matchMedia:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationObserver:!1,name:!1,navigator:!1,Node:!1,NodeFilter:!1,NodeList:!1,Notification:!1,OfflineAudioCompletionEvent:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,opera:!1,Option:!1,outerHeight:!1,outerWidth:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,parent:!1,PopStateEvent:!1,postMessage:!1,print:!1,ProgressEvent:!1,prompt:!1,Range:!1,removeEventListener:!1,requestAnimationFrame:!1,resizeBy:!1,resizeTo:!1,screen:!1,screenX:!1,screenY:!1,scroll:!1,scrollbars:!1,scrollBy:!1,scrollTo:!1,scrollX:!1,scrollY:!1,self:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,SharedWorker:!1,showModalDialog:!1,status:!1,stop:!1,StorageEvent:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCSSRule:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGEvent:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGLocatable:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformable:!1,SVGTransformList:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGURIReference:!1,SVGUseElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGVKernElement:!1,SVGZoomAndPan:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TimeEvent:!1,top:!1,TouchEvent:!1,UIEvent:!1,URL:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLTexture:!1,WebGLUniformLocation:!1,WebSocket:!1,WheelEvent:!1,window:!1,Window:!1,Worker:!1,XDomainRequest:!1,XMLHttpRequest:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1},worker:{importScripts:!0,postMessage:!0,self:!0},node:{__dirname:!1,__filename:!1,arguments:!1,Buffer:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,console:!1,DataView:!1,exports:!0,GLOBAL:!1,global:!1,module:!1,process:!1,require:!1,setImmediate:!1,setInterval:!1,setTimeout:!1},amd:{define:!1,require:!1},mocha:{after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},jasmine:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},qunit:{asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,"throws":!1},phantomjs:{console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},couch:{emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},rhino:{defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},wsh:{ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WScript:!0,WSH:!0,XDomainRequest:!0},jquery:{$:!1,jQuery:!1},yui:{Y:!1,YUI:!1,YUI_config:!1},shelljs:{cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,ls:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,target:!1,tempdir:!1,test:!1,which:!1},prototypejs:{$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},meteor:{$:!1,_:!1,Accounts:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPServer:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},mongo:{_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,ObjectId:!1,PlanCache:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1}}},{}],183:[function(e,n){n.exports=e("./globals.json")},{"./globals.json":182}],184:[function(e,n){var l=e("is-nan"),t=e("is-finite");n.exports=Number.isInteger||function(e){return"number"==typeof e&&!l(e)&&t(e)&&parseInt(e,10)===e}},{"is-finite":185,"is-nan":186}],185:[function(e,n){"use strict";n.exports=Number.isFinite||function(e){return"number"!=typeof e||e!==e||1/0===e||e===-1/0?!1:!0}},{}],186:[function(e,n){"use strict";n.exports=function(e){return e!==e}},{}],187:[function(e,n){n.exports=/((['"])(?:(?!\2)[^\\\r\n\u2028\u2029]|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:[^\]\\\r\n\u2028\u2029]|\\.)*\]|[^\/\]\\\r\n\u2028\u2029]|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(-?(?:0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?))|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-*\/%&|^]|<{1,2}|>{1,3}|!=?|={1,2})=?|[?:~])|([;,.[\](){}])|(\s+)|(^$|[\s\S])/g,n.exports.matchToToken=function(e){return token={type:"invalid",value:e[0]},e[1]?(token.type="string",token.closed=!(!e[3]&&!e[4])):e[5]?token.type="comment":e[6]?(token.type="comment",token.closed=!!e[7]):e[8]?token.type="regex":e[9]?token.type="number":e[10]?token.type="name":e[11]?token.type="operator":e[12]?token.type="punctuation":e[13]&&(token.type="whitespace"),token}},{}],188:[function(e,n){var l=[],t=[];n.exports=function(e,n){if(e===n)return 0;var r=e.length,a=n.length;if(0===r)return a;if(0===a)return r;for(var o,u,s,i,c=0,d=0;r>c;)t[c]=e.charCodeAt(c),l[c]=++c;for(;a>d;)for(o=n.charCodeAt(d),s=d++,u=d,c=0;r>c;c++)i=o===t[c]?s:s+1,s=l[c],u=l[c]=s>u?i>u?u+1:i:i>s?s+1:i;return u}},{}],189:[function(e,n){function l(e,n,l){return n in e?e[n]:l}function t(e,n){var t=l.bind(null,n||{}),a=t("transform",Function.prototype),o=t("padding"," "),u=t("before"," "),s=t("after"," | "),i=t("start",1),c=Array.isArray(e),d=c?e:e.split("\n"),p=i+d.length-1,f=String(p).length,g=d.map(function(e,n){var l=i+n,t={before:u,number:l,width:f,after:s,line:e};return a(t),t.before+r(t.number,f,o)+t.after+t.line});return c?g:g.join("\n")}var r=e("left-pad");n.exports=t},{"left-pad":190}],190:[function(e,n){function l(e,n,l){e=String(e);var t=-1;for(l||(l=" "),n-=e.length;++t<n;)e=l+e;return e}n.exports=l},{}],191:[function(e,n){function l(e){for(var n=-1,l=e?e.length:0,t=-1,r=[];++n<l;){var a=e[n];a&&(r[++t]=a)}return r}n.exports=l},{}],192:[function(e,n){function l(e,n,l){var a=e?e.length:0;return l&&r(e,n,l)&&(n=!1),a?t(e,n):[]}var t=e("../internal/baseFlatten"),r=e("../internal/isIterateeCall");n.exports=l},{"../internal/baseFlatten":222,"../internal/isIterateeCall":267}],193:[function(e,n){function l(e){var n=e?e.length:0;return n?e[n-1]:void 0}n.exports=l},{}],194:[function(e,n){function l(){var e=arguments[0];if(!e||!e.length)return e;for(var n=0,l=t,r=arguments.length;++n<r;)for(var o=0,u=arguments[n];(o=l(e,u,o))>-1;)a.call(e,o,1);return e}var t=e("../internal/baseIndexOf"),r=Array.prototype,a=r.splice;n.exports=l},{"../internal/baseIndexOf":227}],195:[function(e,n){function l(e,n,l,u){var s=e?e.length:0;return s?("boolean"!=typeof n&&null!=n&&(u=l,l=a(e,n,u)?null:n,n=!1),l=null==l?l:t(l,u,3),n?o(e,l):r(e,l)):[]}var t=e("../internal/baseCallback"),r=e("../internal/baseUniq"),a=e("../internal/isIterateeCall"),o=e("../internal/sortedUniq");n.exports=l},{"../internal/baseCallback":215,"../internal/baseUniq":240,"../internal/isIterateeCall":267,"../internal/sortedUniq":277}],196:[function(e,n){n.exports=e("./includes")},{"./includes":200}],197:[function(e,n){n.exports=e("./forEach")},{"./forEach":198}],198:[function(e,n){function l(e,n,l){return"function"==typeof n&&"undefined"==typeof l&&o(e)?t(e,n):r(e,a(n,l,3))}var t=e("../internal/arrayEach"),r=e("../internal/baseEach"),a=e("../internal/bindCallback"),o=e("../lang/isArray");n.exports=l},{"../internal/arrayEach":209,"../internal/baseEach":220,"../internal/bindCallback":242,"../lang/isArray":282}],199:[function(e,n){var l=e("../internal/createAggregator"),t=Object.prototype,r=t.hasOwnProperty,a=l(function(e,n,l){r.call(e,l)?e[l].push(n):e[l]=[n]});n.exports=a},{"../internal/createAggregator":249}],200:[function(e,n){function l(e,n,l){var i=e?e.length:0;return a(i)||(e=u(e),i=e.length),i?(l="number"==typeof l?0>l?s(i+l,0):l||0:0,"string"==typeof e||!r(e)&&o(e)?i>l&&e.indexOf(n,l)>-1:t(e,n,l)>-1):!1}var t=e("../internal/baseIndexOf"),r=e("../lang/isArray"),a=e("../internal/isLength"),o=e("../lang/isString"),u=e("../object/values"),s=Math.max;n.exports=l},{"../internal/baseIndexOf":227,"../internal/isLength":268,"../lang/isArray":282,"../lang/isString":290,"../object/values":298}],201:[function(e,n){function l(e,n,l){var u=o(e)?t:a;return n=r(n,l,3),u(e,n)}var t=e("../internal/arrayMap"),r=e("../internal/baseCallback"),a=e("../internal/baseMap"),o=e("../lang/isArray");n.exports=l},{"../internal/arrayMap":210,"../internal/baseCallback":215,"../internal/baseMap":231,"../lang/isArray":282}],202:[function(e,n){function l(e,n,l,s){var i=u(e)?t:o;return i(e,r(n,s,4),l,arguments.length<3,a)}var t=e("../internal/arrayReduceRight"),r=e("../internal/baseCallback"),a=e("../internal/baseEachRight"),o=e("../internal/baseReduce"),u=e("../lang/isArray");n.exports=l},{"../internal/arrayReduceRight":211,"../internal/baseCallback":215,"../internal/baseEachRight":221,"../internal/baseReduce":235,"../lang/isArray":282}],203:[function(e,n){function l(e,n,l){var u=o(e)?t:a;return("function"!=typeof n||"undefined"!=typeof l)&&(n=r(n,l,3)),u(e,n)}var t=e("../internal/arraySome"),r=e("../internal/baseCallback"),a=e("../internal/baseSome"),o=e("../lang/isArray");n.exports=l},{"../internal/arraySome":212,"../internal/baseCallback":215,"../internal/baseSome":237,"../lang/isArray":282}],204:[function(e,n){function l(e,n,l){var i=-1,c=e?e.length:0,d=s(c)?Array(c):[];return l&&u(e,n,l)&&(n=null),n=t(n,l,3),r(e,function(e,l,t){d[++i]={criteria:n(e,l,t),index:i,value:e}}),a(d,o)}var t=e("../internal/baseCallback"),r=e("../internal/baseEach"),a=e("../internal/baseSortBy"),o=e("../internal/compareAscending"),u=e("../internal/isIterateeCall"),s=e("../internal/isLength");n.exports=l},{"../internal/baseCallback":215,"../internal/baseEach":220,"../internal/baseSortBy":238,"../internal/compareAscending":246,"../internal/isIterateeCall":267,"../internal/isLength":268}],205:[function(e,n){var l=e("../lang/isNative"),t=l(t=Date.now)&&t,r=t||function(){return(new Date).getTime()};n.exports=r},{"../lang/isNative":286}],206:[function(e,n){function l(e,n,l){return l&&r(e,n,l)&&(n=null),n=e&&null==n?e.length:o(+n||0,0),t(e,a,null,null,null,null,n)}var t=e("../internal/createWrapper"),r=e("../internal/isIterateeCall"),a=256,o=Math.max;n.exports=l},{"../internal/createWrapper":256,"../internal/isIterateeCall":267}],207:[function(e,n){(function(l){function t(e){var n=e?e.length:0;for(this.data={hash:u(null),set:new o};n--;)this.push(e[n])}var r=e("./cachePush"),a=e("../lang/isNative"),o=a(o=l.Set)&&o,u=a(u=Object.create)&&u;t.prototype.push=r,n.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../lang/isNative":286,"./cachePush":245}],208:[function(e,n){function l(e,n){var l=-1,t=e.length;for(n||(n=Array(t));++l<t;)n[l]=e[l];return n}n.exports=l},{}],209:[function(e,n){function l(e,n){for(var l=-1,t=e.length;++l<t&&n(e[l],l,e)!==!1;);return e}n.exports=l},{}],210:[function(e,n){function l(e,n){for(var l=-1,t=e.length,r=Array(t);++l<t;)r[l]=n(e[l],l,e);return r}n.exports=l},{}],211:[function(e,n){function l(e,n,l,t){var r=e.length;for(t&&r&&(l=e[--r]);r--;)l=n(l,e[r],r,e);return l}n.exports=l},{}],212:[function(e,n){function l(e,n){for(var l=-1,t=e.length;++l<t;)if(n(e[l],l,e))return!0;return!1}n.exports=l},{}],213:[function(e,n){function l(e,n){return"undefined"==typeof e?n:e}n.exports=l},{}],214:[function(e,n){function l(e,n,l){var a=r(n);if(!l)return t(n,e,a);for(var o=-1,u=a.length;++o<u;){var s=a[o],i=e[s],c=l(i,n[s],s,e,n);(c===c?c===i:i!==i)&&("undefined"!=typeof i||s in e)||(e[s]=c)}return e}var t=e("./baseCopy"),r=e("../object/keys");n.exports=l},{"../object/keys":296,"./baseCopy":218}],215:[function(e,n){function l(e,n,l){var i=typeof e;return"function"==i?"undefined"!=typeof n&&s(e)?o(e,n,l):e:null==e?u:"object"==i?t(e):"undefined"==typeof n?a(e+""):r(e+"",n)}var t=e("./baseMatches"),r=e("./baseMatchesProperty"),a=e("./baseProperty"),o=e("./bindCallback"),u=e("../utility/identity"),s=e("./isBindable");n.exports=l},{"../utility/identity":302,"./baseMatches":232,"./baseMatchesProperty":233,"./baseProperty":234,"./bindCallback":242,"./isBindable":265}],216:[function(e,n){function l(e,n,g,h,m,y,b){var _;if(g&&(_=m?g(e,h,m):g(e)),"undefined"!=typeof _)return _;if(!d(e))return e;var I=c(e);if(I){if(_=u(e),!n)return t(e,_)}else{var k=N.call(e),E=k==x;if(k!=v&&k!=f&&(!E||m))return D[k]?s(e,k,n):m?e:{};if(_=i(E?{}:e),!n)return a(e,_,p(e))}y||(y=[]),b||(b=[]);for(var w=y.length;w--;)if(y[w]==e)return b[w];return y.push(e),b.push(_),(I?r:o)(e,function(t,r){_[r]=l(t,n,g,r,e,y,b)}),_}var t=e("./arrayCopy"),r=e("./arrayEach"),a=e("./baseCopy"),o=e("./baseForOwn"),u=e("./initCloneArray"),s=e("./initCloneByTag"),i=e("./initCloneObject"),c=e("../lang/isArray"),d=e("../lang/isObject"),p=e("../object/keys"),f="[object Arguments]",g="[object Array]",h="[object Boolean]",m="[object Date]",y="[object Error]",x="[object Function]",b="[object Map]",_="[object Number]",v="[object Object]",I="[object RegExp]",k="[object Set]",E="[object String]",w="[object WeakMap]",R="[object ArrayBuffer]",S="[object Float32Array]",C="[object Float64Array]",A="[object Int8Array]",j="[object Int16Array]",T="[object Int32Array]",L="[object Uint8Array]",P="[object Uint8ClampedArray]",O="[object Uint16Array]",M="[object Uint32Array]",D={};D[f]=D[g]=D[R]=D[h]=D[m]=D[S]=D[C]=D[A]=D[j]=D[T]=D[_]=D[v]=D[I]=D[E]=D[L]=D[P]=D[O]=D[M]=!0,D[y]=D[x]=D[b]=D[k]=D[w]=!1;var B=Object.prototype,N=B.toString;n.exports=l},{"../lang/isArray":282,"../lang/isObject":288,"../object/keys":296,"./arrayCopy":208,"./arrayEach":209,"./baseCopy":218,"./baseForOwn":224,"./initCloneArray":262,"./initCloneByTag":263,"./initCloneObject":264}],217:[function(e,n){function l(e,n){if(e!==n){var l=e===e,t=n===n;if(e>n||!l||"undefined"==typeof e&&t)return 1;if(n>e||!t||"undefined"==typeof n&&l)return-1}return 0}n.exports=l},{}],218:[function(e,n){function l(e,n,l){l||(l=n,n={});for(var t=-1,r=l.length;++t<r;){var a=l[t];n[a]=e[a]}return n}n.exports=l},{}],219:[function(e,n){(function(l){var t=e("../lang/isObject"),r=function(){function e(){}return function(n){if(t(n)){e.prototype=n;var r=new e;e.prototype=null}return r||l.Object()}}();n.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../lang/isObject":288}],220:[function(e,n){function l(e,n){var l=e?e.length:0;if(!r(l))return t(e,n);for(var o=-1,u=a(e);++o<l&&n(u[o],o,u)!==!1;);return e}var t=e("./baseForOwn"),r=e("./isLength"),a=e("./toObject");n.exports=l},{"./baseForOwn":224,"./isLength":268,"./toObject":278}],221:[function(e,n){function l(e,n){var l=e?e.length:0;if(!r(l))return t(e,n);for(var o=a(e);l--&&n(o[l],l,o)!==!1;);return e}var t=e("./baseForOwnRight"),r=e("./isLength"),a=e("./toObject");n.exports=l},{"./baseForOwnRight":225,"./isLength":268,"./toObject":278}],222:[function(e,n){function l(e,n,u,s){for(var i=(s||0)-1,c=e.length,d=-1,p=[];++i<c;){var f=e[i]; if(o(f)&&a(f.length)&&(r(f)||t(f))){n&&(f=l(f,n,u));var g=-1,h=f.length;for(p.length+=h;++g<h;)p[++d]=f[g]}else u||(p[++d]=f)}return p}var t=e("../lang/isArguments"),r=e("../lang/isArray"),a=e("./isLength"),o=e("./isObjectLike");n.exports=l},{"../lang/isArguments":281,"../lang/isArray":282,"./isLength":268,"./isObjectLike":269}],223:[function(e,n){function l(e,n,l){for(var r=-1,a=t(e),o=l(e),u=o.length;++r<u;){var s=o[r];if(n(a[s],s,a)===!1)break}return e}var t=e("./toObject");n.exports=l},{"./toObject":278}],224:[function(e,n){function l(e,n){return t(e,n,r)}var t=e("./baseFor"),r=e("../object/keys");n.exports=l},{"../object/keys":296,"./baseFor":223}],225:[function(e,n){function l(e,n){return t(e,n,r)}var t=e("./baseForRight"),r=e("../object/keys");n.exports=l},{"../object/keys":296,"./baseForRight":226}],226:[function(e,n){function l(e,n,l){for(var r=t(e),a=l(e),o=a.length;o--;){var u=a[o];if(n(r[u],u,r)===!1)break}return e}var t=e("./toObject");n.exports=l},{"./toObject":278}],227:[function(e,n){function l(e,n,l){if(n!==n)return t(e,l);for(var r=(l||0)-1,a=e.length;++r<a;)if(e[r]===n)return r;return-1}var t=e("./indexOfNaN");n.exports=l},{"./indexOfNaN":261}],228:[function(e,n){function l(e,n,r,a,o,u){if(e===n)return 0!==e||1/e==1/n;var s=typeof e,i=typeof n;return"function"!=s&&"object"!=s&&"function"!=i&&"object"!=i||null==e||null==n?e!==e&&n!==n:t(e,n,l,r,a,o,u)}var t=e("./baseIsEqualDeep");n.exports=l},{"./baseIsEqualDeep":229}],229:[function(e,n){function l(e,n,l,d,g,h,m){var y=o(e),x=o(n),b=i,_=i;y||(b=f.call(e),b==s?b=c:b!=c&&(y=u(e))),x||(_=f.call(n),_==s?_=c:_!=c&&(x=u(n)));var v=b==c,I=_==c,k=b==_;if(k&&!y&&!v)return r(e,n,b);var E=v&&p.call(e,"__wrapped__"),w=I&&p.call(n,"__wrapped__");if(E||w)return l(E?e.value():e,w?n.value():n,d,g,h,m);if(!k)return!1;h||(h=[]),m||(m=[]);for(var R=h.length;R--;)if(h[R]==e)return m[R]==n;h.push(e),m.push(n);var S=(y?t:a)(e,n,l,d,g,h,m);return h.pop(),m.pop(),S}var t=e("./equalArrays"),r=e("./equalByTag"),a=e("./equalObjects"),o=e("../lang/isArray"),u=e("../lang/isTypedArray"),s="[object Arguments]",i="[object Array]",c="[object Object]",d=Object.prototype,p=d.hasOwnProperty,f=d.toString;n.exports=l},{"../lang/isArray":282,"../lang/isTypedArray":291,"./equalArrays":257,"./equalByTag":258,"./equalObjects":259}],230:[function(e,n){function l(e,n,l,r,o){var u=n.length;if(null==e)return!u;for(var s=-1,i=!o;++s<u;)if(i&&r[s]?l[s]!==e[n[s]]:!a.call(e,n[s]))return!1;for(s=-1;++s<u;){var c=n[s];if(i&&r[s])var d=a.call(e,c);else{var p=e[c],f=l[s];d=o?o(p,f,c):void 0,"undefined"==typeof d&&(d=t(f,p,o,!0))}if(!d)return!1}return!0}var t=e("./baseIsEqual"),r=Object.prototype,a=r.hasOwnProperty;n.exports=l},{"./baseIsEqual":228}],231:[function(e,n){function l(e,n){var l=[];return t(e,function(e,t,r){l.push(n(e,t,r))}),l}var t=e("./baseEach");n.exports=l},{"./baseEach":220}],232:[function(e,n){function l(e){var n=a(e),l=n.length;if(1==l){var o=n[0],s=e[o];if(r(s))return function(e){return null!=e&&s===e[o]&&u.call(e,o)}}for(var i=Array(l),c=Array(l);l--;)s=e[n[l]],i[l]=s,c[l]=r(s);return function(e){return t(e,n,i,c)}}var t=e("./baseIsMatch"),r=e("./isStrictComparable"),a=e("../object/keys"),o=Object.prototype,u=o.hasOwnProperty;n.exports=l},{"../object/keys":296,"./baseIsMatch":230,"./isStrictComparable":270}],233:[function(e,n){function l(e,n){return r(n)?function(l){return null!=l&&l[e]===n}:function(l){return null!=l&&t(n,l[e],null,!0)}}var t=e("./baseIsEqual"),r=e("./isStrictComparable");n.exports=l},{"./baseIsEqual":228,"./isStrictComparable":270}],234:[function(e,n){function l(e){return function(n){return null==n?void 0:n[e]}}n.exports=l},{}],235:[function(e,n){function l(e,n,l,t,r){return r(e,function(e,r,a){l=t?(t=!1,e):n(l,e,r,a)}),l}n.exports=l},{}],236:[function(e,n){var l=e("../utility/identity"),t=e("./metaMap"),r=t?function(e,n){return t.set(e,n),e}:l;n.exports=r},{"../utility/identity":302,"./metaMap":272}],237:[function(e,n){function l(e,n){var l;return t(e,function(e,t,r){return l=n(e,t,r),!l}),!!l}var t=e("./baseEach");n.exports=l},{"./baseEach":220}],238:[function(e,n){function l(e,n){var l=e.length;for(e.sort(n);l--;)e[l]=e[l].value;return e}n.exports=l},{}],239:[function(e,n){function l(e){return"string"==typeof e?e:null==e?"":e+""}n.exports=l},{}],240:[function(e,n){function l(e,n){var l=-1,o=t,u=e.length,s=!0,i=s&&u>=200,c=i&&a(),d=[];c?(o=r,s=!1):(i=!1,c=n?[]:d);e:for(;++l<u;){var p=e[l],f=n?n(p,l,e):p;if(s&&p===p){for(var g=c.length;g--;)if(c[g]===f)continue e;n&&c.push(f),d.push(p)}else o(c,f)<0&&((n||i)&&c.push(f),d.push(p))}return d}var t=e("./baseIndexOf"),r=e("./cacheIndexOf"),a=e("./createCache");n.exports=l},{"./baseIndexOf":227,"./cacheIndexOf":244,"./createCache":252}],241:[function(e,n){function l(e,n){for(var l=-1,t=n.length,r=Array(t);++l<t;)r[l]=e[n[l]];return r}n.exports=l},{}],242:[function(e,n){function l(e,n,l){if("function"!=typeof e)return t;if("undefined"==typeof n)return e;switch(l){case 1:return function(l){return e.call(n,l)};case 3:return function(l,t,r){return e.call(n,l,t,r)};case 4:return function(l,t,r,a){return e.call(n,l,t,r,a)};case 5:return function(l,t,r,a,o){return e.call(n,l,t,r,a,o)}}return function(){return e.apply(n,arguments)}}var t=e("../utility/identity");n.exports=l},{"../utility/identity":302}],243:[function(e,n){(function(l){function t(e){return u.call(e,0)}var r=e("../utility/constant"),a=e("../lang/isNative"),o=a(o=l.ArrayBuffer)&&o,u=a(u=o&&new o(0).slice)&&u,s=Math.floor,i=a(i=l.Uint8Array)&&i,c=function(){try{var e=a(e=l.Float64Array)&&e,n=new e(new o(10),0,1)&&e}catch(t){}return n}(),d=c?c.BYTES_PER_ELEMENT:0;u||(t=o&&i?function(e){var n=e.byteLength,l=c?s(n/d):0,t=l*d,r=new o(n);if(l){var a=new c(r,0,l);a.set(new c(e,0,l))}return n!=t&&(a=new i(r,t),a.set(new i(e,t))),r}:r(null)),n.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../lang/isNative":286,"../utility/constant":301}],244:[function(e,n){function l(e,n){var l=e.data,r="string"==typeof n||t(n)?l.set.has(n):l.hash[n];return r?0:-1}var t=e("../lang/isObject");n.exports=l},{"../lang/isObject":288}],245:[function(e,n){function l(e){var n=this.data;"string"==typeof e||t(e)?n.set.add(e):n.hash[e]=!0}var t=e("../lang/isObject");n.exports=l},{"../lang/isObject":288}],246:[function(e,n){function l(e,n){return t(e.criteria,n.criteria)||e.index-n.index}var t=e("./baseCompareAscending");n.exports=l},{"./baseCompareAscending":217}],247:[function(e,n){function l(e,n,l){for(var r=l.length,a=-1,o=t(e.length-r,0),u=-1,s=n.length,i=Array(o+s);++u<s;)i[u]=n[u];for(;++a<r;)i[l[a]]=e[a];for(;o--;)i[u++]=e[a++];return i}var t=Math.max;n.exports=l},{}],248:[function(e,n){function l(e,n,l){for(var r=-1,a=l.length,o=-1,u=t(e.length-a,0),s=-1,i=n.length,c=Array(u+i);++o<u;)c[o]=e[o];for(var d=o;++s<i;)c[d+s]=n[s];for(;++r<a;)c[d+l[r]]=e[o++];return c}var t=Math.max;n.exports=l},{}],249:[function(e,n){function l(e,n){return function(l,o,u){var s=n?n():{};if(o=t(o,u,3),a(l))for(var i=-1,c=l.length;++i<c;){var d=l[i];e(s,d,o(d,i,l),l)}else r(l,function(n,l,t){e(s,n,o(n,l,t),t)});return s}}var t=e("./baseCallback"),r=e("./baseEach"),a=e("../lang/isArray");n.exports=l},{"../lang/isArray":282,"./baseCallback":215,"./baseEach":220}],250:[function(e,n){function l(e){return function(){var n=arguments.length,l=arguments[0];if(2>n||null==l)return l;if(n>3&&r(arguments[1],arguments[2],arguments[3])&&(n=2),n>3&&"function"==typeof arguments[n-2])var a=t(arguments[--n-1],arguments[n--],5);else n>2&&"function"==typeof arguments[n-1]&&(a=arguments[--n]);for(var o=0;++o<n;){var u=arguments[o];u&&e(l,u,a)}return l}}var t=e("./bindCallback"),r=e("./isIterateeCall");n.exports=l},{"./bindCallback":242,"./isIterateeCall":267}],251:[function(e,n){function l(e,n){function l(){return(this instanceof l?r:e).apply(n,arguments)}var r=t(e);return l}var t=e("./createCtorWrapper");n.exports=l},{"./createCtorWrapper":253}],252:[function(e,n){(function(l){var t=e("./SetCache"),r=e("../utility/constant"),a=e("../lang/isNative"),o=a(o=l.Set)&&o,u=a(u=Object.create)&&u,s=u&&o?function(e){return new t(e)}:r(null);n.exports=s}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../lang/isNative":286,"../utility/constant":301,"./SetCache":207}],253:[function(e,n){function l(e){return function(){var n=t(e.prototype),l=e.apply(n,arguments);return r(l)?l:n}}var t=e("./baseCreate"),r=e("../lang/isObject");n.exports=l},{"../lang/isObject":288,"./baseCreate":219}],254:[function(e,n){function l(e,n,x,b,_,v,I,k,E,w){function R(){for(var d=arguments.length,p=d,f=Array(d);p--;)f[p]=arguments[p];if(b&&(f=r(f,b,_)),v&&(f=a(f,v,I)),j||L){var m=R.placeholder,M=s(f,m);if(d-=M.length,w>d){var D=k?t(k):null,B=y(w-d,0),N=j?M:null,F=j?null:M,V=j?f:null,U=j?null:f;n|=j?g:h,n&=~(j?h:g),T||(n&=~(i|c));var q=l(e,n,x,V,N,U,F,D,E,B);return q.placeholder=m,q}}var G=C?x:this;return A&&(e=G[O]),k&&(f=u(f,k)),S&&E<f.length&&(f.length=E),(this instanceof R?P||o(e):e).apply(G,f)}var S=n&m,C=n&i,A=n&c,j=n&p,T=n&d,L=n&f,P=!A&&o(e),O=e;return R}var t=e("./arrayCopy"),r=e("./composeArgs"),a=e("./composeArgsRight"),o=e("./createCtorWrapper"),u=e("./reorder"),s=e("./replaceHolders"),i=1,c=2,d=4,p=8,f=16,g=32,h=64,m=256,y=Math.max;n.exports=l},{"./arrayCopy":208,"./composeArgs":247,"./composeArgsRight":248,"./createCtorWrapper":253,"./reorder":273,"./replaceHolders":274}],255:[function(e,n){function l(e,n,l,a){function o(){for(var n=-1,t=arguments.length,r=-1,i=a.length,c=Array(t+i);++r<i;)c[r]=a[r];for(;t--;)c[r++]=arguments[++n];return(this instanceof o?s:e).apply(u?l:this,c)}var u=n&r,s=t(e);return o}var t=e("./createCtorWrapper"),r=1;n.exports=l},{"./createCtorWrapper":253}],256:[function(e,n){function l(e,n,l,m,y,x,b,_){var v=n&d;if(!v&&"function"!=typeof e)throw new TypeError(g);var I=m?m.length:0;if(I||(n&=~(p|f),m=y=null),I-=y?y.length:0,n&f){var k=m,E=y;m=y=null}var w=!v&&u(e),R=[e,n,l,m,y,k,E,x,b,_];if(w&&w!==!0&&(s(R,w),n=R[1],_=R[9]),R[9]=null==_?v?0:e.length:h(_-I,0)||0,n==c)var S=r(R[0],R[2]);else S=n!=p&&n!=(c|p)||R[4].length?a.apply(void 0,R):o.apply(void 0,R);var C=w?t:i;return C(S,R)}var t=e("./baseSetData"),r=e("./createBindWrapper"),a=e("./createHybridWrapper"),o=e("./createPartialWrapper"),u=e("./getData"),s=e("./mergeData"),i=e("./setData"),c=1,d=2,p=32,f=64,g="Expected a function",h=Math.max;n.exports=l},{"./baseSetData":236,"./createBindWrapper":251,"./createHybridWrapper":254,"./createPartialWrapper":255,"./getData":260,"./mergeData":271,"./setData":275}],257:[function(e,n){function l(e,n,l,t,r,a,o){var u=-1,s=e.length,i=n.length,c=!0;if(s!=i&&!(r&&i>s))return!1;for(;c&&++u<s;){var d=e[u],p=n[u];if(c=void 0,t&&(c=r?t(p,d,u):t(d,p,u)),"undefined"==typeof c)if(r)for(var f=i;f--&&(p=n[f],!(c=d&&d===p||l(d,p,t,r,a,o))););else c=d&&d===p||l(d,p,t,r,a,o)}return!!c}n.exports=l},{}],258:[function(e,n){function l(e,n,l){switch(l){case t:case r:return+e==+n;case a:return e.name==n.name&&e.message==n.message;case o:return e!=+e?n!=+n:0==e?1/e==1/n:e==+n;case u:case s:return e==n+""}return!1}var t="[object Boolean]",r="[object Date]",a="[object Error]",o="[object Number]",u="[object RegExp]",s="[object String]";n.exports=l},{}],259:[function(e,n){function l(e,n,l,r,o,u,s){var i=t(e),c=i.length,d=t(n),p=d.length;if(c!=p&&!o)return!1;for(var f,g=-1;++g<c;){var h=i[g],m=a.call(n,h);if(m){var y=e[h],x=n[h];m=void 0,r&&(m=o?r(x,y,h):r(y,x,h)),"undefined"==typeof m&&(m=y&&y===x||l(y,x,r,o,u,s))}if(!m)return!1;f||(f="constructor"==h)}if(!f){var b=e.constructor,_=n.constructor;if(b!=_&&"constructor"in e&&"constructor"in n&&!("function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _))return!1}return!0}var t=e("../object/keys"),r=Object.prototype,a=r.hasOwnProperty;n.exports=l},{"../object/keys":296}],260:[function(e,n){var l=e("./metaMap"),t=e("../utility/noop"),r=l?function(e){return l.get(e)}:t;n.exports=r},{"../utility/noop":303,"./metaMap":272}],261:[function(e,n){function l(e,n,l){for(var t=e.length,r=l?n||t:(n||0)-1;l?r--:++r<t;){var a=e[r];if(a!==a)return r}return-1}n.exports=l},{}],262:[function(e,n){function l(e){var n=e.length,l=new e.constructor(n);return n&&"string"==typeof e[0]&&r.call(e,"index")&&(l.index=e.index,l.input=e.input),l}var t=Object.prototype,r=t.hasOwnProperty;n.exports=l},{}],263:[function(e,n){function l(e,n,l){var _=e.constructor;switch(n){case i:return t(e);case r:case a:return new _(+e);case c:case d:case p:case f:case g:case h:case m:case y:case x:var v=e.buffer;return new _(l?t(v):v,e.byteOffset,e.length);case o:case s:return new _(e);case u:var I=new _(e.source,b.exec(e));I.lastIndex=e.lastIndex}return I}var t=e("./bufferClone"),r="[object Boolean]",a="[object Date]",o="[object Number]",u="[object RegExp]",s="[object String]",i="[object ArrayBuffer]",c="[object Float32Array]",d="[object Float64Array]",p="[object Int8Array]",f="[object Int16Array]",g="[object Int32Array]",h="[object Uint8Array]",m="[object Uint8ClampedArray]",y="[object Uint16Array]",x="[object Uint32Array]",b=/\w*$/;n.exports=l},{"./bufferClone":243}],264:[function(e,n){function l(e){var n=e.constructor;return"function"==typeof n&&n instanceof n||(n=Object),new n}n.exports=l},{}],265:[function(e,n){function l(e){var n=!(a.funcNames?e.name:a.funcDecomp);if(!n){var l=s.call(e);a.funcNames||(n=!o.test(l)),n||(n=u.test(l)||r(e),t(e,n))}return n}var t=e("./baseSetData"),r=e("../lang/isNative"),a=e("../support"),o=/^\s*function[ \n\r\t]+\w/,u=/\bthis\b/,s=Function.prototype.toString;n.exports=l},{"../lang/isNative":286,"../support":300,"./baseSetData":236}],266:[function(e,n){function l(e,n){return e=+e,n=null==n?t:n,e>-1&&e%1==0&&n>e}var t=Math.pow(2,53)-1;n.exports=l},{}],267:[function(e,n){function l(e,n,l){if(!a(l))return!1;var o=typeof n;if("number"==o)var u=l.length,s=r(u)&&t(n,u);else s="string"==o&&n in l;return s&&l[n]===e}var t=e("./isIndex"),r=e("./isLength"),a=e("../lang/isObject");n.exports=l},{"../lang/isObject":288,"./isIndex":266,"./isLength":268}],268:[function(e,n){function l(e){return"number"==typeof e&&e>-1&&e%1==0&&t>=e}var t=Math.pow(2,53)-1;n.exports=l},{}],269:[function(e,n){function l(e){return e&&"object"==typeof e||!1}n.exports=l},{}],270:[function(e,n){function l(e){return e===e&&(0===e?1/e>0:!t(e))}var t=e("../lang/isObject");n.exports=l},{"../lang/isObject":288}],271:[function(e,n){function l(e,n){var l=e[1],h=n[1],m=l|h,y=p|d,x=u|s,b=y|x|i|c,_=l&p&&!(h&p),v=l&d&&!(h&d),I=(v?e:n)[7],k=(_?e:n)[8],E=!(l>=d&&h>x||l>x&&h>=d),w=m>=y&&b>=m&&(d>l||(v||_)&&I.length<=k);if(!E&&!w)return e;h&u&&(e[2]=n[2],m|=l&u?0:i);var R=n[3];if(R){var S=e[3];e[3]=S?r(S,R,n[4]):t(R),e[4]=S?o(e[3],f):t(n[4])}return R=n[5],R&&(S=e[5],e[5]=S?a(S,R,n[6]):t(R),e[6]=S?o(e[5],f):t(n[6])),R=n[7],R&&(e[7]=t(R)),h&p&&(e[8]=null==e[8]?n[8]:g(e[8],n[8])),null==e[9]&&(e[9]=n[9]),e[0]=n[0],e[1]=m,e}var t=e("./arrayCopy"),r=e("./composeArgs"),a=e("./composeArgsRight"),o=e("./replaceHolders"),u=1,s=2,i=4,c=16,d=128,p=256,f="__lodash_placeholder__",g=Math.min;n.exports=l},{"./arrayCopy":208,"./composeArgs":247,"./composeArgsRight":248,"./replaceHolders":274}],272:[function(e,n){(function(l){var t=e("../lang/isNative"),r=t(r=l.WeakMap)&&r,a=r&&new r;n.exports=a}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../lang/isNative":286}],273:[function(e,n){function l(e,n){for(var l=e.length,o=a(n.length,l),u=t(e);o--;){var s=n[o];e[o]=r(s,l)?u[s]:void 0}return e}var t=e("./arrayCopy"),r=e("./isIndex"),a=Math.min;n.exports=l},{"./arrayCopy":208,"./isIndex":266}],274:[function(e,n){function l(e,n){for(var l=-1,r=e.length,a=-1,o=[];++l<r;)e[l]===n&&(e[l]=t,o[++a]=l);return o}var t="__lodash_placeholder__";n.exports=l},{}],275:[function(e,n){var l=e("./baseSetData"),t=e("../date/now"),r=150,a=16,o=function(){var e=0,n=0;return function(o,u){var s=t(),i=a-(s-n);if(n=s,i>0){if(++e>=r)return o}else e=0;return l(o,u)}}();n.exports=o},{"../date/now":205,"./baseSetData":236}],276:[function(e,n){function l(e){for(var n=u(e),l=n.length,i=l&&e.length,d=i&&o(i)&&(r(e)||s.nonEnumArgs&&t(e)),p=-1,f=[];++p<l;){var g=n[p];(d&&a(g,i)||c.call(e,g))&&f.push(g)}return f}var t=e("../lang/isArguments"),r=e("../lang/isArray"),a=e("./isIndex"),o=e("./isLength"),u=e("../object/keysIn"),s=e("../support"),i=Object.prototype,c=i.hasOwnProperty;n.exports=l},{"../lang/isArguments":281,"../lang/isArray":282,"../object/keysIn":297,"../support":300,"./isIndex":266,"./isLength":268}],277:[function(e,n){function l(e,n){for(var l,t=-1,r=e.length,a=-1,o=[];++t<r;){var u=e[t],s=n?n(u,t,e):u;t&&l===s||(l=s,o[++a]=u)}return o}n.exports=l},{}],278:[function(e,n){function l(e){return t(e)?e:Object(e)}var t=e("../lang/isObject");n.exports=l},{"../lang/isObject":288}],279:[function(e,n){function l(e,n,l,o){return"boolean"!=typeof n&&null!=n&&(o=l,l=a(e,n,o)?null:n,n=!1),l="function"==typeof l&&r(l,o,1),t(e,n,l)}var t=e("../internal/baseClone"),r=e("../internal/bindCallback"),a=e("../internal/isIterateeCall");n.exports=l},{"../internal/baseClone":216,"../internal/bindCallback":242,"../internal/isIterateeCall":267}],280:[function(e,n){function l(e,n,l){return n="function"==typeof n&&r(n,l,1),t(e,!0,n)}var t=e("../internal/baseClone"),r=e("../internal/bindCallback");n.exports=l},{"../internal/baseClone":216,"../internal/bindCallback":242}],281:[function(e,n){function l(e){var n=r(e)?e.length:void 0;return t(n)&&u.call(e)==a||!1}var t=e("../internal/isLength"),r=e("../internal/isObjectLike"),a="[object Arguments]",o=Object.prototype,u=o.toString;n.exports=l},{"../internal/isLength":268,"../internal/isObjectLike":269}],282:[function(e,n){var l=e("../internal/isLength"),t=e("./isNative"),r=e("../internal/isObjectLike"),a="[object Array]",o=Object.prototype,u=o.toString,s=t(s=Array.isArray)&&s,i=s||function(e){return r(e)&&l(e.length)&&u.call(e)==a||!1};n.exports=i},{"../internal/isLength":268,"../internal/isObjectLike":269,"./isNative":286}],283:[function(e,n){function l(e){return e===!0||e===!1||t(e)&&o.call(e)==r||!1}var t=e("../internal/isObjectLike"),r="[object Boolean]",a=Object.prototype,o=a.toString;n.exports=l},{"../internal/isObjectLike":269}],284:[function(e,n){function l(e){if(null==e)return!0;var n=e.length;return o(n)&&(r(e)||s(e)||t(e)||u(e)&&a(e.splice))?!n:!i(e).length}var t=e("./isArguments"),r=e("./isArray"),a=e("./isFunction"),o=e("../internal/isLength"),u=e("../internal/isObjectLike"),s=e("./isString"),i=e("../object/keys");n.exports=l},{"../internal/isLength":268,"../internal/isObjectLike":269,"../object/keys":296,"./isArguments":281,"./isArray":282,"./isFunction":285,"./isString":290}],285:[function(e,n){(function(l){function t(e){return"function"==typeof e||!1}var r=e("./isNative"),a="[object Function]",o=Object.prototype,u=o.toString,s=r(s=l.Uint8Array)&&s;(t(/x/)||s&&!t(s))&&(t=function(e){return u.call(e)==a}),n.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./isNative":286}],286:[function(e,n){function l(e){return null==e?!1:i.call(e)==a?c.test(s.call(e)):r(e)&&o.test(e)||!1}var t=e("../string/escapeRegExp"),r=e("../internal/isObjectLike"),a="[object Function]",o=/^\[object .+?Constructor\]$/,u=Object.prototype,s=Function.prototype.toString,i=u.toString,c=RegExp("^"+t(i).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");n.exports=l},{"../internal/isObjectLike":269,"../string/escapeRegExp":299}],287:[function(e,n){function l(e){return"number"==typeof e||t(e)&&o.call(e)==r||!1}var t=e("../internal/isObjectLike"),r="[object Number]",a=Object.prototype,o=a.toString;n.exports=l},{"../internal/isObjectLike":269}],288:[function(e,n){function l(e){var n=typeof e;return"function"==n||e&&"object"==n||!1}n.exports=l},{}],289:[function(e,n){function l(e){return t(e)&&o.call(e)==r||!1}var t=e("../internal/isObjectLike"),r="[object RegExp]",a=Object.prototype,o=a.toString;n.exports=l},{"../internal/isObjectLike":269}],290:[function(e,n){function l(e){return"string"==typeof e||t(e)&&o.call(e)==r||!1}var t=e("../internal/isObjectLike"),r="[object String]",a=Object.prototype,o=a.toString;n.exports=l},{"../internal/isObjectLike":269}],291:[function(e,n){function l(e){return r(e)&&t(e.length)&&C[j.call(e)]||!1}var t=e("../internal/isLength"),r=e("../internal/isObjectLike"),a="[object Arguments]",o="[object Array]",u="[object Boolean]",s="[object Date]",i="[object Error]",c="[object Function]",d="[object Map]",p="[object Number]",f="[object Object]",g="[object RegExp]",h="[object Set]",m="[object String]",y="[object WeakMap]",x="[object ArrayBuffer]",b="[object Float32Array]",_="[object Float64Array]",v="[object Int8Array]",I="[object Int16Array]",k="[object Int32Array]",E="[object Uint8Array]",w="[object Uint8ClampedArray]",R="[object Uint16Array]",S="[object Uint32Array]",C={};C[b]=C[_]=C[v]=C[I]=C[k]=C[E]=C[w]=C[R]=C[S]=!0,C[a]=C[o]=C[x]=C[u]=C[s]=C[i]=C[c]=C[d]=C[p]=C[f]=C[g]=C[h]=C[m]=C[y]=!1;var A=Object.prototype,j=A.toString;n.exports=l},{"../internal/isLength":268,"../internal/isObjectLike":269}],292:[function(e,n){var l=e("../internal/baseAssign"),t=e("../internal/createAssigner"),r=t(l);n.exports=r},{"../internal/baseAssign":214,"../internal/createAssigner":250}],293:[function(e,n){function l(e){if(null==e)return e;var n=t(arguments);return n.push(a),r.apply(void 0,n)}var t=e("../internal/arrayCopy"),r=e("./assign"),a=e("../internal/assignDefaults");n.exports=l},{"../internal/arrayCopy":208,"../internal/assignDefaults":213,"./assign":292}],294:[function(e,n){n.exports=e("./assign")},{"./assign":292}],295:[function(e,n){function l(e,n){return e?r.call(e,n):!1}var t=Object.prototype,r=t.hasOwnProperty;n.exports=l},{}],296:[function(e,n){var l=e("../internal/isLength"),t=e("../lang/isNative"),r=e("../lang/isObject"),a=e("../internal/shimKeys"),o=t(o=Object.keys)&&o,u=o?function(e){if(e)var n=e.constructor,t=e.length;return"function"==typeof n&&n.prototype===e||"function"!=typeof e&&t&&l(t)?a(e):r(e)?o(e):[]}:a;n.exports=u},{"../internal/isLength":268,"../internal/shimKeys":276,"../lang/isNative":286,"../lang/isObject":288}],297:[function(e,n){function l(e){if(null==e)return[];u(e)||(e=Object(e));var n=e.length;n=n&&o(n)&&(r(e)||s.nonEnumArgs&&t(e))&&n||0;for(var l=e.constructor,i=-1,d="function"==typeof l&&l.prototype===e,p=Array(n),f=n>0;++i<n;)p[i]=i+"";for(var g in e)f&&a(g,n)||"constructor"==g&&(d||!c.call(e,g))||p.push(g);return p}var t=e("../lang/isArguments"),r=e("../lang/isArray"),a=e("../internal/isIndex"),o=e("../internal/isLength"),u=e("../lang/isObject"),s=e("../support"),i=Object.prototype,c=i.hasOwnProperty;n.exports=l},{"../internal/isIndex":266,"../internal/isLength":268,"../lang/isArguments":281,"../lang/isArray":282,"../lang/isObject":288,"../support":300}],298:[function(e,n){function l(e){return t(e,r(e))}var t=e("../internal/baseValues"),r=e("./keys");n.exports=l},{"../internal/baseValues":241,"./keys":296}],299:[function(e,n){function l(e){return e=t(e),e&&a.test(e)?e.replace(r,"\\$&"):e}var t=e("../internal/baseToString"),r=/[.*+?^${}()|[\]\/\\]/g,a=RegExp(r.source);n.exports=l},{"../internal/baseToString":239}],300:[function(e,n){(function(l){var t=e("./lang/isNative"),r=/\bthis\b/,a=Object.prototype,o=(o=l.window)&&o.document,u=a.propertyIsEnumerable,s={};!function(){s.funcDecomp=!t(l.WinRTError)&&r.test(function(){return this}),s.funcNames="string"==typeof Function.name;try{s.dom=11===o.createDocumentFragment().nodeType}catch(e){s.dom=!1}try{s.nonEnumArgs=!u.call(arguments,1)}catch(e){s.nonEnumArgs=!0}}(0,0),n.exports=s}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lang/isNative":286}],301:[function(e,n){function l(e){return function(){return e}}n.exports=l},{}],302:[function(e,n){function l(e){return e}n.exports=l},{}],303:[function(e,n){function l(){}n.exports=l},{}],304:[function(e,n,l){"use strict";function t(e,n,l){if(d)try{d.call(c,e,n,{value:l})}catch(t){e[n]=l}else e[n]=l}function r(e){return e&&(t(e,"call",e.call),t(e,"apply",e.apply)),e}function a(e){return p?p.call(c,e):(m.prototype=e||null,new m)}function o(){do var e=u(h.call(g.call(y(),36),2));while(f.call(x,e));return x[e]=e}function u(e){var n={};return n[e]=!0,Object.keys(n)[0]}function s(){return a(null)}function i(e){function n(n){function l(l,t){return l===u?t?a=null:a||(a=e(n)):void 0}var a;t(n,r,l)}function l(e){return f.call(e,r)||n(e),e[r](u)}var r=o(),u=a(null);return e=e||s,l.forget=function(e){f.call(e,r)&&e[r](u,!0)},l}var c=Object,d=Object.defineProperty,p=Object.create;r(d),r(p);var f=r(Object.prototype.hasOwnProperty),g=r(Number.prototype.toString),h=r(String.prototype.slice),m=function(){},y=Math.random,x=a(null);t(l,"makeUniqueKey",o);var b=Object.getOwnPropertyNames;Object.getOwnPropertyNames=function(e){for(var n=b(e),l=0,t=0,r=n.length;r>l;++l)f.call(x,n[l])||(l>t&&(n[t]=n[l]),++t);return n.length=t,n},t(l,"makeAccessor",i)},{}],305:[function(e,n,l){function t(e){s.ok(this instanceof t),d.Identifier.assert(e),Object.defineProperties(this,{contextId:{value:e},listing:{value:[]},marked:{value:[!0]},finalLoc:{value:r()},tryEntries:{value:[]}}),Object.defineProperties(this,{leapManager:{value:new p.LeapManager(this)}})}function r(){return c.literal(-1)}function a(e){return d.BreakStatement.check(e)||d.ContinueStatement.check(e)||d.ReturnStatement.check(e)||d.ThrowStatement.check(e)}function o(e){return new Error("all declarations should have been transformed into assignments before the Exploder began its work: "+JSON.stringify(e))}function u(e){var n=e.type;return"normal"===n?!h.call(e,"target"):"break"===n||"continue"===n?!h.call(e,"value")&&d.Literal.check(e.target):"return"===n||"throw"===n?h.call(e,"value")&&!h.call(e,"target"):!1}var s=e("assert"),i=e("ast-types"),c=(i.builtInTypes.array,i.builders),d=i.namedTypes,p=e("./leap"),f=e("./meta"),g=e("./util"),h=Object.prototype.hasOwnProperty,m=t.prototype;l.Emitter=t,m.mark=function(e){d.Literal.assert(e);var n=this.listing.length;return-1===e.value?e.value=n:s.strictEqual(e.value,n),this.marked[n]=!0,e},m.emit=function(e){d.Expression.check(e)&&(e=c.expressionStatement(e)),d.Statement.assert(e),this.listing.push(e)},m.emitAssign=function(e,n){return this.emit(this.assign(e,n)),e},m.assign=function(e,n){return c.expressionStatement(c.assignmentExpression("=",e,n))},m.contextProperty=function(e,n){return c.memberExpression(this.contextId,n?c.literal(e):c.identifier(e),!!n)};var y={prev:!0,next:!0,sent:!0,rval:!0};m.isVolatileContextProperty=function(e){if(d.MemberExpression.check(e)){if(e.computed)return!0;if(d.Identifier.check(e.object)&&d.Identifier.check(e.property)&&e.object.name===this.contextId.name&&h.call(y,e.property.name))return!0}return!1},m.stop=function(e){e&&this.setReturnValue(e),this.jump(this.finalLoc)},m.setReturnValue=function(e){d.Expression.assert(e.value),this.emitAssign(this.contextProperty("rval"),this.explodeExpression(e))},m.clearPendingException=function(e,n){d.Literal.assert(e);var l=c.callExpression(this.contextProperty("catch",!0),[e]);n?this.emitAssign(n,l):this.emit(l)},m.jump=function(e){this.emitAssign(this.contextProperty("next"),e),this.emit(c.breakStatement())},m.jumpIf=function(e,n){d.Expression.assert(e),d.Literal.assert(n),this.emit(c.ifStatement(e,c.blockStatement([this.assign(this.contextProperty("next"),n),c.breakStatement()])))},m.jumpIfNot=function(e,n){d.Expression.assert(e),d.Literal.assert(n);var l;l=d.UnaryExpression.check(e)&&"!"===e.operator?e.argument:c.unaryExpression("!",e),this.emit(c.ifStatement(l,c.blockStatement([this.assign(this.contextProperty("next"),n),c.breakStatement()])))};var x=0;m.makeTempVar=function(){return this.contextProperty("t"+x++)},m.getContextFunction=function(e){var n=c.functionExpression(e||null,[this.contextId],c.blockStatement([this.getDispatchLoop()]),!1,!1);return n._aliasFunction=!0,n},m.getDispatchLoop=function(){var e,n=this,l=[],t=!1;return n.listing.forEach(function(r,o){n.marked.hasOwnProperty(o)&&(l.push(c.switchCase(c.literal(o),e=[])),t=!1),t||(e.push(r),a(r)&&(t=!0))}),this.finalLoc.value=this.listing.length,l.push(c.switchCase(this.finalLoc,[]),c.switchCase(c.literal("end"),[c.returnStatement(c.callExpression(this.contextProperty("stop"),[]))])),c.whileStatement(c.literal(1),c.switchStatement(c.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),l))},m.getTryLocsList=function(){if(0===this.tryEntries.length)return null;var e=0;return c.arrayExpression(this.tryEntries.map(function(n){var l=n.firstLoc.value;s.ok(l>=e,"try entries out of order"),e=l;var t=n.catchEntry,r=n.finallyEntry,a=[n.firstLoc,t?t.firstLoc:null];return r&&(a[2]=r.firstLoc,a[3]=r.afterLoc),c.arrayExpression(a)}))},m.explode=function(e,n){s.ok(e instanceof i.NodePath);var l=e.value,t=this;if(d.Node.assert(l),d.Statement.check(l))return t.explodeStatement(e);if(d.Expression.check(l))return t.explodeExpression(e,n);if(d.Declaration.check(l))throw o(l);switch(l.type){case"Program":return e.get("body").map(t.explodeStatement,t);case"VariableDeclarator":throw o(l);case"Property":case"SwitchCase":case"CatchClause":throw new Error(l.type+" nodes should be handled by their parents");default:throw new Error("unknown Node of type "+JSON.stringify(l.type))}},m.explodeStatement=function(e,n){s.ok(e instanceof i.NodePath);var l=e.value,t=this;if(d.Statement.assert(l),n?d.Identifier.assert(n):n=null,d.BlockStatement.check(l))return e.get("body").each(t.explodeStatement,t);if(!f.containsLeap(l))return void t.emit(l);switch(l.type){case"ExpressionStatement":t.explodeExpression(e.get("expression"),!0);break;case"LabeledStatement":var a=r();t.leapManager.withEntry(new p.LabeledEntry(a,l.label),function(){t.explodeStatement(e.get("body"),l.label)}),t.mark(a);break;case"WhileStatement":var o=r(),a=r();t.mark(o),t.jumpIfNot(t.explodeExpression(e.get("test")),a),t.leapManager.withEntry(new p.LoopEntry(a,o,n),function(){t.explodeStatement(e.get("body"))}),t.jump(o),t.mark(a);break;case"DoWhileStatement":var u=r(),h=r(),a=r();t.mark(u),t.leapManager.withEntry(new p.LoopEntry(a,h,n),function(){t.explode(e.get("body"))}),t.mark(h),t.jumpIf(t.explodeExpression(e.get("test")),u),t.mark(a);break;case"ForStatement":var m=r(),y=r(),a=r();l.init&&t.explode(e.get("init"),!0),t.mark(m),l.test&&t.jumpIfNot(t.explodeExpression(e.get("test")),a),t.leapManager.withEntry(new p.LoopEntry(a,y,n),function(){t.explodeStatement(e.get("body"))}),t.mark(y),l.update&&t.explode(e.get("update"),!0),t.jump(m),t.mark(a);break;case"ForInStatement":d.Identifier.assert(l.left);var m=r(),a=r(),x=t.makeTempVar();t.emitAssign(x,c.callExpression(g.runtimeProperty("keys"),[t.explodeExpression(e.get("right"))])),t.mark(m);var b=t.makeTempVar();t.jumpIf(c.memberExpression(c.assignmentExpression("=",b,c.callExpression(x,[])),c.identifier("done"),!1),a),t.emitAssign(l.left,c.memberExpression(b,c.identifier("value"),!1)),t.leapManager.withEntry(new p.LoopEntry(a,m,n),function(){t.explodeStatement(e.get("body"))}),t.jump(m),t.mark(a);break;case"BreakStatement":t.emitAbruptCompletion({type:"break",target:t.leapManager.getBreakLoc(l.label)});break;case"ContinueStatement":t.emitAbruptCompletion({type:"continue",target:t.leapManager.getContinueLoc(l.label)});break;case"SwitchStatement":for(var _=t.emitAssign(t.makeTempVar(),t.explodeExpression(e.get("discriminant"))),a=r(),v=r(),I=v,k=[],E=l.cases||[],w=E.length-1;w>=0;--w){var R=E[w];d.SwitchCase.assert(R),R.test?I=c.conditionalExpression(c.binaryExpression("===",_,R.test),k[w]=r(),I):k[w]=v}t.jump(t.explodeExpression(new i.NodePath(I,e,"discriminant"))),t.leapManager.withEntry(new p.SwitchEntry(a),function(){e.get("cases").each(function(e){var n=(e.value,e.name);t.mark(k[n]),e.get("consequent").each(t.explodeStatement,t)})}),t.mark(a),-1===v.value&&(t.mark(v),s.strictEqual(a.value,v.value));break;case"IfStatement":var S=l.alternate&&r(),a=r(); t.jumpIfNot(t.explodeExpression(e.get("test")),S||a),t.explodeStatement(e.get("consequent")),S&&(t.jump(a),t.mark(S),t.explodeStatement(e.get("alternate"))),t.mark(a);break;case"ReturnStatement":t.emitAbruptCompletion({type:"return",value:t.explodeExpression(e.get("argument"))});break;case"WithStatement":throw new Error(node.type+" not supported in generator functions.");case"TryStatement":var a=r(),C=l.handler;!C&&l.handlers&&(C=l.handlers[0]||null);var A=C&&r(),j=A&&new p.CatchEntry(A,C.param),T=l.finalizer&&r(),L=T&&new p.FinallyEntry(T,a),P=new p.TryEntry(t.getUnmarkedCurrentLoc(),j,L);t.tryEntries.push(P),t.updateContextPrevLoc(P.firstLoc),t.leapManager.withEntry(P,function(){if(t.explodeStatement(e.get("block")),A){t.jump(T?T:a),t.updateContextPrevLoc(t.mark(A));var n=e.get("handler","body"),l=t.makeTempVar();t.clearPendingException(P.firstLoc,l);var r=n.scope,o=C.param.name;d.CatchClause.assert(r.node),s.strictEqual(r.lookup(o),r),i.visit(n,{visitIdentifier:function(e){return g.isReference(e,o)&&e.scope.lookup(o)===r?l:void this.traverse(e)},visitFunction:function(e){return e.scope.declares(o)?!1:void this.traverse(e)}}),t.leapManager.withEntry(j,function(){t.explodeStatement(n)})}T&&(t.updateContextPrevLoc(t.mark(T)),t.leapManager.withEntry(L,function(){t.explodeStatement(e.get("finalizer"))}),t.emit(c.returnStatement(c.callExpression(t.contextProperty("finish"),[L.firstLoc]))))}),t.mark(a);break;case"ThrowStatement":t.emit(c.throwStatement(t.explodeExpression(e.get("argument"))));break;default:throw new Error("unknown Statement of type "+JSON.stringify(l.type))}},m.emitAbruptCompletion=function(e){u(e)||s.ok(!1,"invalid completion record: "+JSON.stringify(e)),s.notStrictEqual(e.type,"normal","normal completions are not abrupt");var n=[c.literal(e.type)];"break"===e.type||"continue"===e.type?(d.Literal.assert(e.target),n[1]=e.target):("return"===e.type||"throw"===e.type)&&e.value&&(d.Expression.assert(e.value),n[1]=e.value),this.emit(c.returnStatement(c.callExpression(this.contextProperty("abrupt"),n)))},m.getUnmarkedCurrentLoc=function(){return c.literal(this.listing.length)},m.updateContextPrevLoc=function(e){e?(d.Literal.assert(e),-1===e.value?e.value=this.listing.length:s.strictEqual(e.value,this.listing.length)):e=this.getUnmarkedCurrentLoc(),this.emitAssign(this.contextProperty("prev"),e)},m.explodeExpression=function(e,n){function l(e){return d.Expression.assert(e),n?void u.emit(e):e}function t(e,n,l){s.ok(n instanceof i.NodePath),s.ok(!l||!e,"Ignoring the result of a child expression but forcing it to be assigned to a temporary variable?");var t=u.explodeExpression(n,l);return l||(e||p&&(u.isVolatileContextProperty(t)||f.hasSideEffects(t)))&&(t=u.emitAssign(e||u.makeTempVar(),t)),t}s.ok(e instanceof i.NodePath);var a=e.value;if(!a)return a;d.Expression.assert(a);var o,u=this;if(!f.containsLeap(a))return l(a);var p=f.containsLeap.onlyChildren(a);switch(a.type){case"MemberExpression":return l(c.memberExpression(u.explodeExpression(e.get("object")),a.computed?t(null,e.get("property")):a.property,a.computed));case"CallExpression":var g=e.get("callee"),h=u.explodeExpression(g);return!d.MemberExpression.check(g.node)&&d.MemberExpression.check(h)&&(h=c.sequenceExpression([c.literal(0),h])),l(c.callExpression(h,e.get("arguments").map(function(e){return t(null,e)})));case"NewExpression":return l(c.newExpression(t(null,e.get("callee")),e.get("arguments").map(function(e){return t(null,e)})));case"ObjectExpression":return l(c.objectExpression(e.get("properties").map(function(e){return c.property(e.value.kind,e.value.key,t(null,e.get("value")))})));case"ArrayExpression":return l(c.arrayExpression(e.get("elements").map(function(e){return t(null,e)})));case"SequenceExpression":var m=a.expressions.length-1;return e.get("expressions").each(function(e){e.name===m?o=u.explodeExpression(e,n):u.explodeExpression(e,!0)}),o;case"LogicalExpression":var y=r();n||(o=u.makeTempVar());var x=t(o,e.get("left"));return"&&"===a.operator?u.jumpIfNot(x,y):(s.strictEqual(a.operator,"||"),u.jumpIf(x,y)),t(o,e.get("right"),n),u.mark(y),o;case"ConditionalExpression":var b=r(),y=r(),_=u.explodeExpression(e.get("test"));return u.jumpIfNot(_,b),n||(o=u.makeTempVar()),t(o,e.get("consequent"),n),u.jump(y),u.mark(b),t(o,e.get("alternate"),n),u.mark(y),o;case"UnaryExpression":return l(c.unaryExpression(a.operator,u.explodeExpression(e.get("argument")),!!a.prefix));case"BinaryExpression":return l(c.binaryExpression(a.operator,t(null,e.get("left")),t(null,e.get("right"))));case"AssignmentExpression":return l(c.assignmentExpression(a.operator,u.explodeExpression(e.get("left")),u.explodeExpression(e.get("right"))));case"UpdateExpression":return l(c.updateExpression(a.operator,u.explodeExpression(e.get("argument")),a.prefix));case"YieldExpression":var y=r(),v=a.argument&&u.explodeExpression(e.get("argument"));if(v&&a.delegate){var o=u.makeTempVar();return u.emit(c.returnStatement(c.callExpression(u.contextProperty("delegateYield"),[v,c.literal(o.property.name),y]))),u.mark(y),o}return u.emitAssign(u.contextProperty("next"),y),u.emit(c.returnStatement(v||null)),u.mark(y),u.contextProperty("sent");default:throw new Error("unknown Expression of type "+JSON.stringify(a.type))}}},{"./leap":307,"./meta":308,"./util":309,assert:138,"ast-types":136}],306:[function(e,n,l){var t=e("assert"),r=e("ast-types"),a=r.namedTypes,o=r.builders,u=Object.prototype.hasOwnProperty;l.hoist=function(e){function n(e,n){a.VariableDeclaration.assert(e);var t=[];return e.declarations.forEach(function(e){l[e.id.name]=e.id,e.init?t.push(o.assignmentExpression("=",e.id,e.init)):n&&t.push(e.id)}),0===t.length?null:1===t.length?t[0]:o.sequenceExpression(t)}t.ok(e instanceof r.NodePath),a.Function.assert(e.value);var l={};r.visit(e.get("body"),{visitVariableDeclaration:function(e){var l=n(e.value,!1);return null!==l?o.expressionStatement(l):(e.replace(),!1)},visitForStatement:function(e){var l=e.value.init;a.VariableDeclaration.check(l)&&e.get("init").replace(n(l,!1)),this.traverse(e)},visitForInStatement:function(e){var l=e.value.left;a.VariableDeclaration.check(l)&&e.get("left").replace(n(l,!0)),this.traverse(e)},visitFunctionDeclaration:function(e){var n=e.value;l[n.id.name]=n.id;var t=(e.parent.node,o.expressionStatement(o.assignmentExpression("=",n.id,o.functionExpression(n.id,n.params,n.body,n.generator,n.expression))));return a.BlockStatement.check(e.parent.node)?(e.parent.get("body").unshift(t),e.replace()):e.replace(t),!1},visitFunctionExpression:function(){return!1}});var s={};e.get("params").each(function(e){var n=e.value;a.Identifier.check(n)&&(s[n.name]=n)});var i=[];return Object.keys(l).forEach(function(e){u.call(s,e)||i.push(o.variableDeclarator(l[e],null))}),0===i.length?null:o.variableDeclaration("var",i)}},{assert:138,"ast-types":136}],307:[function(e,n,l){function t(){p.ok(this instanceof t)}function r(e){t.call(this),g.Literal.assert(e),this.returnLoc=e}function a(e,n,l){t.call(this),g.Literal.assert(e),g.Literal.assert(n),l?g.Identifier.assert(l):l=null,this.breakLoc=e,this.continueLoc=n,this.label=l}function o(e){t.call(this),g.Literal.assert(e),this.breakLoc=e}function u(e,n,l){t.call(this),g.Literal.assert(e),n?p.ok(n instanceof s):n=null,l?p.ok(l instanceof i):l=null,p.ok(n||l),this.firstLoc=e,this.catchEntry=n,this.finallyEntry=l}function s(e,n){t.call(this),g.Literal.assert(e),g.Identifier.assert(n),this.firstLoc=e,this.paramId=n}function i(e,n){t.call(this),g.Literal.assert(e),g.Literal.assert(n),this.firstLoc=e,this.afterLoc=n}function c(e,n){t.call(this),g.Literal.assert(e),g.Identifier.assert(n),this.breakLoc=e,this.label=n}function d(n){p.ok(this instanceof d);var l=e("./emit").Emitter;p.ok(n instanceof l),this.emitter=n,this.entryStack=[new r(n.finalLoc)]}{var p=e("assert"),f=e("ast-types"),g=f.namedTypes,h=(f.builders,e("util").inherits);Object.prototype.hasOwnProperty}h(r,t),l.FunctionEntry=r,h(a,t),l.LoopEntry=a,h(o,t),l.SwitchEntry=o,h(u,t),l.TryEntry=u,h(s,t),l.CatchEntry=s,h(i,t),l.FinallyEntry=i,h(c,t),l.LabeledEntry=c;var m=d.prototype;l.LeapManager=d,m.withEntry=function(e,n){p.ok(e instanceof t),this.entryStack.push(e);try{n.call(this.emitter)}finally{var l=this.entryStack.pop();p.strictEqual(l,e)}},m._findLeapLocation=function(e,n){for(var l=this.entryStack.length-1;l>=0;--l){var t=this.entryStack[l],r=t[e];if(r)if(n){if(t.label&&t.label.name===n.name)return r}else if(!(t instanceof c))return r}return null},m.getBreakLoc=function(e){return this._findLeapLocation("breakLoc",e)},m.getContinueLoc=function(e){return this._findLeapLocation("continueLoc",e)}},{"./emit":305,assert:138,"ast-types":136,util:163}],308:[function(e,n,l){function t(e,n){function l(e){function n(e){return l||(u.check(e)?e.some(n):s.Node.check(e)&&(r.strictEqual(l,!1),l=t(e))),l}s.Node.assert(e);var l=!1;return o.eachField(e,function(e,l){n(l)}),l}function t(t){s.Node.assert(t);var r=a(t);return i.call(r,e)?r[e]:r[e]=i.call(c,t.type)?!1:i.call(n,t.type)?!0:l(t)}return t.onlyChildren=l,t}var r=e("assert"),a=e("private").makeAccessor(),o=e("ast-types"),u=o.builtInTypes.array,s=o.namedTypes,i=Object.prototype.hasOwnProperty,c={FunctionExpression:!0},d={CallExpression:!0,ForInStatement:!0,UnaryExpression:!0,BinaryExpression:!0,AssignmentExpression:!0,UpdateExpression:!0,NewExpression:!0},p={YieldExpression:!0,BreakStatement:!0,ContinueStatement:!0,ReturnStatement:!0,ThrowStatement:!0};for(var f in p)i.call(p,f)&&(d[f]=p[f]);l.hasSideEffects=t("hasSideEffects",d),l.containsLeap=t("containsLeap",p)},{assert:138,"ast-types":136,"private":304}],309:[function(e,n,l){var t=(e("assert"),e("ast-types")),r=t.namedTypes,a=t.builders,o=Object.prototype.hasOwnProperty;l.defaults=function(e){for(var n,l=arguments.length,t=1;l>t;++t)if(n=arguments[t])for(var r in n)o.call(n,r)&&!o.call(e,r)&&(e[r]=n[r]);return e},l.runtimeProperty=function(e){return a.memberExpression(a.identifier("regeneratorRuntime"),a.identifier(e),!1)},l.isReference=function(e,n){var l=e.value;if(!r.Identifier.check(l))return!1;if(n&&l.name!==n)return!1;var t=e.parent.value;switch(t.type){case"VariableDeclarator":return"init"===e.name;case"MemberExpression":return"object"===e.name||t.computed&&"property"===e.name;case"FunctionExpression":case"FunctionDeclaration":case"ArrowFunctionExpression":return"id"===e.name?!1:t.params===e.parentPath&&t.params[e.name]===l?!1:!0;case"ClassDeclaration":case"ClassExpression":return"id"!==e.name;case"CatchClause":return"param"!==e.name;case"Property":case"MethodDefinition":return"key"!==e.name;case"ImportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"LabeledStatement":return!1;default:return!0}}},{assert:138,"ast-types":136}],310:[function(e,n,l){var t=(e("assert"),e("fs"),e("ast-types")),r=t.namedTypes,a=t.builders,o=(t.builtInTypes.array,t.builtInTypes.object,t.NodePath),u=e("./hoist").hoist,s=e("./emit").Emitter,i=e("./util").runtimeProperty;l.transform=function(e,n){n=n||{};var l=e instanceof o?e:new o(e);return c.visit(l,n),e=l.value,n.madeChanges=c.wasChangeReported(),e};var c=t.PathVisitor.fromMethodsObject({reset:function(e,n){this.options=n},visitFunction:function(e){this.traverse(e);var n=e.value,l=n.async&&!this.options.disableAsync;if(n.generator||l){this.reportChanged(),n.generator=!1,n.expression&&(n.expression=!1,n.body=a.blockStatement([a.returnStatement(n.body)])),l&&d.visit(e.get("body"));var t=n.id||(n.id=e.scope.parent.declareTemporary("callee$")),o=[],c=e.value.body;c.body=c.body.filter(function(e){return e&&null!=e._blockHoist?(o.push(e),!1):!0});var p=a.identifier(n.id.name+"$"),f=e.scope.declareTemporary("context$"),g=u(e),h=new s(f);h.explode(e.get("body")),g&&g.declarations.length>0&&o.push(g);var m=[h.getContextFunction(p),l?a.literal(null):t,a.thisExpression()],y=h.getTryLocsList();y&&m.push(y);var x=a.callExpression(i(l?"async":"wrap"),m);if(o.push(a.returnStatement(x)),n.body=a.blockStatement(o),n.body._declarations=c._declarations,l)return void(n.async=!1);if(!r.FunctionDeclaration.check(n))return r.FunctionExpression.assert(n),a.callExpression(i("mark"),[n]);for(var b=e.parent;b&&!r.BlockStatement.check(b.value)&&!r.Program.check(b.value);)b=b.parent;if(b){e.replace(),n.type="FunctionExpression";var _=a.variableDeclaration("var",[a.variableDeclarator(n.id,a.callExpression(i("mark"),[n]))]);n.comments&&(_.leadingComments=n.leadingComments,_.trailingComments=n.trailingComments,n.leadingComments=null,n.trailingComments=null),_._blockHoist=3;{var v=b.get("body");v.value.length}v.push(_)}}}}),d=t.PathVisitor.fromMethodsObject({visitFunction:function(){return!1},visitAwaitExpression:function(e){var n=e.value.argument;return e.value.all&&(n=a.callExpression(a.memberExpression(a.identifier("Promise"),a.identifier("all"),!1),[n])),a.yieldExpression(n,!1)}})},{"./emit":305,"./hoist":306,"./util":309,assert:138,"ast-types":136,fs:137}],311:[function(e,n){(function(l){function t(e,n){function l(e){r.push(e)}function t(){this.queue(compile(r.join(""),n).code),this.queue(null)}var r=[];return o(l,t)}function r(){e("./runtime")}{var a=(e("assert"),e("path")),o=(e("fs"),e("through")),u=e("./lib/visit").transform;e("./lib/util"),e("ast-types")}n.exports=t,t.runtime=r,r.path=a.join(l,"runtime.js"),t.transform=u}).call(this,"/node_modules/regenerator-babel")},{"./lib/util":309,"./lib/visit":310,"./runtime":313,assert:138,"ast-types":136,fs:137,path:146,through:312}],312:[function(e,n,l){(function(t){function r(e,n,l){function r(){for(;i.length&&!d.paused;){var e=i.shift();if(null===e)return d.emit("end");d.emit("data",e)}}function o(){d.writable=!1,n.call(d),!d.readable&&d.autoDestroy&&d.destroy()}e=e||function(e){this.queue(e)},n=n||function(){this.queue(null)};var u=!1,s=!1,i=[],c=!1,d=new a;return d.readable=d.writable=!0,d.paused=!1,d.autoDestroy=!(l&&l.autoDestroy===!1),d.write=function(n){return e.call(this,n),!d.paused},d.queue=d.push=function(e){return c?d:(null==e&&(c=!0),i.push(e),r(),d)},d.on("end",function(){d.readable=!1,!d.writable&&d.autoDestroy&&t.nextTick(function(){d.destroy()})}),d.end=function(e){return u?void 0:(u=!0,arguments.length&&d.write(e),o(),d)},d.destroy=function(){return s?void 0:(s=!0,u=!0,i.length=0,d.writable=d.readable=!1,d.emit("close"),d)},d.pause=function(){return d.paused?void 0:(d.paused=!0,d)},d.resume=function(){return d.paused&&(d.paused=!1,d.emit("resume")),r(),d.paused||d.emit("drain"),d},d}var a=e("stream");l=n.exports=r,r.through=r}).call(this,e("_process"))},{_process:147,stream:159}],313:[function(e,n){(function(e){!function(e){"use strict";function l(e,n,l,t){return new o(e,n,l||null,t||[])}function t(e,n,l){try{return{type:"normal",arg:e.call(n,l)}}catch(t){return{type:"throw",arg:t}}}function r(){}function a(){}function o(e,n,l,r){function a(n,r){if(s===b)throw new Error("Generator is already running");if(s===_)return d();for(;;){var a=u.delegate;if(a){var o=t(a.iterator[n],a.iterator,r);if("throw"===o.type){u.delegate=null,n="throw",r=o.arg;continue}n="next",r=p;var i=o.arg;if(!i.done)return s=x,i;u[a.resultName]=i.value,u.next=a.nextLoc,u.delegate=null}if("next"===n){if(s===y&&"undefined"!=typeof r)throw new TypeError("attempt to send "+JSON.stringify(r)+" to newborn generator");s===x?u.sent=r:delete u.sent}else if("throw"===n){if(s===y)throw s=_,r;u.dispatchException(r)&&(n="next",r=p)}else"return"===n&&u.abrupt("return",r);s=b;var o=t(e,l,u);if("normal"===o.type){s=u.done?_:x;var i={value:o.arg,done:u.done};if(o.arg!==v)return i;u.delegate&&"next"===n&&(r=p)}else"throw"===o.type&&(s=_,"next"===n?u.dispatchException(o.arg):r=o.arg)}}var o=n?Object.create(n.prototype):this,u=new i(r),s=y;return o.next=a.bind(o,"next"),o["throw"]=a.bind(o,"throw"),o["return"]=a.bind(o,"return"),o}function u(e){var n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),this.tryEntries.push(n)}function s(e){var n=e.completion||{};n.type="normal",delete n.arg,e.completion=n}function i(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(u,this),this.reset()}function c(e){if(e){var n=e[g];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var l=-1,t=function r(){for(;++l<e.length;)if(f.call(e,l))return r.value=e[l],r.done=!1,r;return r.value=p,r.done=!0,r};return t.next=t}}return{next:d}}function d(){return{value:p,done:!0}}var p,f=Object.prototype.hasOwnProperty,g="function"==typeof Symbol&&Symbol.iterator||"@@iterator",h="object"==typeof n,m=e.regeneratorRuntime;if(m)return void(h&&(n.exports=m));m=e.regeneratorRuntime=h?n.exports:{},m.wrap=l;var y="suspendedStart",x="suspendedYield",b="executing",_="completed",v={},I=a.prototype=o.prototype;r.prototype=I.constructor=a,a.constructor=r,r.displayName="GeneratorFunction",m.isGeneratorFunction=function(e){var n="function"==typeof e&&e.constructor;return n?n===r||"GeneratorFunction"===(n.displayName||n.name):!1},m.mark=function(e){return e.__proto__=a,e.prototype=Object.create(I),e},m.async=function(e,n,r,a){return new Promise(function(o,u){function s(e){var n=t(this,null,e);if("throw"===n.type)return void u(n.arg);var l=n.arg;l.done?o(l.value):Promise.resolve(l.value).then(c,d)}var i=l(e,n,r,a),c=s.bind(i.next),d=s.bind(i["throw"]);c()})},I[g]=function(){return this},I.toString=function(){return"[object Generator]"},m.keys=function(e){var n=[];for(var l in e)n.push(l);return n.reverse(),function t(){for(;n.length;){var l=n.pop();if(l in e)return t.value=l,t.done=!1,t}return t.done=!0,t}},m.values=c,i.prototype={constructor:i,reset:function(){this.prev=0,this.next=0,this.sent=p,this.done=!1,this.delegate=null,this.tryEntries.forEach(s);for(var e,n=0;f.call(this,e="t"+n)||20>n;++n)this[e]=null},stop:function(){this.done=!0;var e=this.tryEntries[0],n=e.completion;if("throw"===n.type)throw n.arg;return this.rval},dispatchException:function(e){function n(n,t){return a.type="throw",a.arg=e,l.next=n,!!t}if(this.done)throw e;for(var l=this,t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t],a=r.completion;if("root"===r.tryLoc)return n("end");if(r.tryLoc<=this.prev){var o=f.call(r,"catchLoc"),u=f.call(r,"finallyLoc");if(o&&u){if(this.prev<r.catchLoc)return n(r.catchLoc,!0);if(this.prev<r.finallyLoc)return n(r.finallyLoc)}else if(o){if(this.prev<r.catchLoc)return n(r.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return n(r.finallyLoc)}}}},abrupt:function(e,n){for(var l=this.tryEntries.length-1;l>=0;--l){var t=this.tryEntries[l];if(t.tryLoc<=this.prev&&f.call(t,"finallyLoc")&&this.prev<t.finallyLoc){var r=t;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=n&&n<r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=e,a.arg=n,r?this.next=r.finallyLoc:this.complete(a),v},complete:function(e,n){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=e.arg,this.next="end"):"normal"===e.type&&n&&(this.next=n),v},finish:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var l=this.tryEntries[n];if(l.finallyLoc===e)return this.complete(l.completion,l.afterLoc)}},"catch":function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var l=this.tryEntries[n];if(l.tryLoc===e){var t=l.completion;if("throw"===t.type){var r=t.arg;s(l)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,l){return this.delegate={iterator:c(e),resultName:n,nextLoc:l},v}}}("object"==typeof e?e:"object"==typeof window?window:this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],314:[function(e,n,l){var t=e("regenerate");l.REGULAR={d:t().addRange(48,57),D:t().addRange(0,47).addRange(58,65535),s:t(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:t().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,65535),w:t(95).addRange(48,57).addRange(65,90).addRange(97,122),W:t(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,65535)},l.UNICODE={d:t().addRange(48,57),D:t().addRange(0,47).addRange(58,1114111),s:t(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:t().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:t(95).addRange(48,57).addRange(65,90).addRange(97,122),W:t(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)},l.UNICODE_IGNORE_CASE={d:t().addRange(48,57),D:t().addRange(0,47).addRange(58,1114111),s:t(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:t().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:t(95,383,8490).addRange(48,57).addRange(65,90).addRange(97,122),W:t(75,83,96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)}},{regenerate:316}],315:[function(e,n){n.exports={75:8490,83:383,107:8490,115:383,181:924,197:8491,383:83,452:453,453:452,455:456,456:455,458:459,459:458,497:498,498:497,837:8126,914:976,917:1013,920:1012,921:8126,922:1008,924:181,928:982,929:1009,931:962,934:981,937:8486,962:931,976:914,977:1012,981:934,982:928,1008:922,1009:929,1012:[920,977],1013:917,7776:7835,7835:7776,8126:[837,921],8486:937,8490:75,8491:197,66560:66600,66561:66601,66562:66602,66563:66603,66564:66604,66565:66605,66566:66606,66567:66607,66568:66608,66569:66609,66570:66610,66571:66611,66572:66612,66573:66613,66574:66614,66575:66615,66576:66616,66577:66617,66578:66618,66579:66619,66580:66620,66581:66621,66582:66622,66583:66623,66584:66624,66585:66625,66586:66626,66587:66627,66588:66628,66589:66629,66590:66630,66591:66631,66592:66632,66593:66633,66594:66634,66595:66635,66596:66636,66597:66637,66598:66638,66599:66639,66600:66560,66601:66561,66602:66562,66603:66563,66604:66564,66605:66565,66606:66566,66607:66567,66608:66568,66609:66569,66610:66570,66611:66571,66612:66572,66613:66573,66614:66574,66615:66575,66616:66576,66617:66577,66618:66578,66619:66579,66620:66580,66621:66581,66622:66582,66623:66583,66624:66584,66625:66585,66626:66586,66627:66587,66628:66588,66629:66589,66630:66590,66631:66591,66632:66592,66633:66593,66634:66594,66635:66595,66636:66596,66637:66597,66638:66598,66639:66599,71840:71872,71841:71873,71842:71874,71843:71875,71844:71876,71845:71877,71846:71878,71847:71879,71848:71880,71849:71881,71850:71882,71851:71883,71852:71884,71853:71885,71854:71886,71855:71887,71856:71888,71857:71889,71858:71890,71859:71891,71860:71892,71861:71893,71862:71894,71863:71895,71864:71896,71865:71897,71866:71898,71867:71899,71868:71900,71869:71901,71870:71902,71871:71903,71872:71840,71873:71841,71874:71842,71875:71843,71876:71844,71877:71845,71878:71846,71879:71847,71880:71848,71881:71849,71882:71850,71883:71851,71884:71852,71885:71853,71886:71854,71887:71855,71888:71856,71889:71857,71890:71858,71891:71859,71892:71860,71893:71861,71894:71862,71895:71863,71896:71864,71897:71865,71898:71866,71899:71867,71900:71868,71901:71869,71902:71870,71903:71871}},{}],316:[function(n,l,t){(function(n){!function(r){var a="object"==typeof t&&t,o="object"==typeof l&&l&&l.exports==a&&l,u="object"==typeof n&&n;(u.global===u||u.window===u)&&(r=u);var s={rangeOrder:"A range’s `stop` value must be greater than or equal to the `start` value.",codePointRange:"Invalid code point value. Code points range from U+000000 to U+10FFFF."},i=55296,c=56319,d=56320,p=57343,f=/\\x00([^0123456789]|$)/g,g={},h=g.hasOwnProperty,m=function(e,n){var l;for(l in n)h.call(n,l)&&(e[l]=n[l]);return e},y=function(e,n){for(var l=-1,t=e.length;++l<t;)n(e[l],l)},x=g.toString,b=function(e){return"[object Array]"==x.call(e)},_=function(e){return"number"==typeof e||"[object Number]"==x.call(e)},v="0000",I=function(e,n){var l=String(e);return l.length<n?(v+l).slice(-n):l},k=function(e){return Number(e).toString(16).toUpperCase()},E=[].slice,w=function(e){for(var n,l=-1,t=e.length,r=t-1,a=[],o=!0,u=0;++l<t;)if(n=e[l],o)a.push(n),u=n,o=!1;else if(n==u+1){if(l!=r){u=n;continue}o=!0,a.push(n+1)}else a.push(u+1,n),u=n;return o||a.push(n+1),a},R=function(e,n){for(var l,t,r=0,a=e.length;a>r;){if(l=e[r],t=e[r+1],n>=l&&t>n)return n==l?t==l+1?(e.splice(r,2),e):(e[r]=n+1,e):n==t-1?(e[r+1]=n,e):(e.splice(r,2,l,n,n+1,t),e);r+=2}return e},S=function(e,n,l){if(n>l)throw Error(s.rangeOrder);for(var t,r,a=0;a<e.length;){if(t=e[a],r=e[a+1]-1,t>l)return e;if(t>=n&&l>=r)e.splice(a,2);else{if(n>=t&&r>l)return n==t?(e[a]=l+1,e[a+1]=r+1,e):(e.splice(a,2,t,n,l+1,r+1),e);if(n>=t&&r>=n)e[a+1]=n;else if(l>=t&&r>=l)return e[a]=l+1,e;a+=2}}return e},C=function(e,n){var l,t,r=0,a=null,o=e.length;if(0>n||n>1114111)throw RangeError(s.codePointRange);for(;o>r;){if(l=e[r],t=e[r+1],n>=l&&t>n)return e;if(n==l-1)return e[r]=n,e;if(l>n)return e.splice(null!=a?a+2:0,0,n,n+1),e;if(n==t)return n+1==e[r+2]?(e.splice(r,4,l,e[r+3]),e):(e[r+1]=n+1,e);a=r,r+=2}return e.push(n,n+1),e},A=function(e,n){for(var l,t,r=0,a=e.slice(),o=n.length;o>r;)l=n[r],t=n[r+1]-1,a=l==t?C(a,l):T(a,l,t),r+=2;return a},j=function(e,n){for(var l,t,r=0,a=e.slice(),o=n.length;o>r;)l=n[r],t=n[r+1]-1,a=l==t?R(a,l):S(a,l,t),r+=2;return a},T=function(e,n,l){if(n>l)throw Error(s.rangeOrder);if(0>n||n>1114111||0>l||l>1114111)throw RangeError(s.codePointRange);for(var t,r,a=0,o=!1,u=e.length;u>a;){if(t=e[a],r=e[a+1],o){if(t==l+1)return e.splice(a-1,2),e;if(t>l)return e;t>=n&&l>=t&&(r>n&&l>=r-1?(e.splice(a,2),a-=2):(e.splice(a-1,2),a-=2))}else{if(t==l+1)return e[a]=n,e;if(t>l)return e.splice(a,0,n,l+1),e;if(n>=t&&r>n&&r>=l+1)return e;n>=t&&r>n||r==n?(e[a+1]=l+1,o=!0):t>=n&&l+1>=r&&(e[a]=n,e[a+1]=l+1,o=!0)}a+=2}return o||e.push(n,l+1),e},L=function(e,n){var l=0,t=e.length,r=e[l],a=e[t-1];if(t>=2&&(r>n||n>a))return!1;for(;t>l;){if(r=e[l],a=e[l+1],n>=r&&a>n)return!0;l+=2}return!1},P=function(e,n){for(var l,t=0,r=n.length,a=[];r>t;)l=n[t],L(e,l)&&a.push(l),++t;return w(a)},O=function(e){return!e.length},M=function(e){return 2==e.length&&e[0]+1==e[1]},D=function(e){for(var n,l,t=0,r=[],a=e.length;a>t;){for(n=e[t],l=e[t+1];l>n;)r.push(n),++n;t+=2}return r},B=Math.floor,N=function(e){return parseInt(B((e-65536)/1024)+i,10)},F=function(e){return parseInt((e-65536)%1024+d,10)},V=String.fromCharCode,U=function(e){var n;return n=9==e?"\\t":10==e?"\\n":12==e?"\\f":13==e?"\\r":92==e?"\\\\":36==e||e>=40&&43>=e||45==e||46==e||63==e||e>=91&&94>=e||e>=123&&125>=e?"\\"+V(e):e>=32&&126>=e?V(e):255>=e?"\\x"+I(k(e),2):"\\u"+I(k(e),4)},q=function(e){var n,l=e.length,t=e.charCodeAt(0);return t>=i&&c>=t&&l>1?(n=e.charCodeAt(1),1024*(t-i)+n-d+65536):t},G=function(e){var n,l,t="",r=0,a=e.length;if(M(e))return U(e[0]);for(;a>r;)n=e[r],l=e[r+1]-1,t+=n==l?U(n):n+1==l?U(n)+U(l):U(n)+"-"+U(l),r+=2;return"["+t+"]"},H=function(e){for(var n,l,t=[],r=[],a=[],o=[],u=0,s=e.length;s>u;)n=e[u],l=e[u+1]-1,i>n?(i>l&&a.push(n,l+1),l>=i&&c>=l&&(a.push(n,i),t.push(i,l+1)),l>=d&&p>=l&&(a.push(n,i),t.push(i,c+1),r.push(d,l+1)),l>p&&(a.push(n,i),t.push(i,c+1),r.push(d,p+1),65535>=l?a.push(p+1,l+1):(a.push(p+1,65536),o.push(65536,l+1)))):n>=i&&c>=n?(l>=i&&c>=l&&t.push(n,l+1),l>=d&&p>=l&&(t.push(n,c+1),r.push(d,l+1)),l>p&&(t.push(n,c+1),r.push(d,p+1),65535>=l?a.push(p+1,l+1):(a.push(p+1,65536),o.push(65536,l+1)))):n>=d&&p>=n?(l>=d&&p>=l&&r.push(n,l+1),l>p&&(r.push(n,p+1),65535>=l?a.push(p+1,l+1):(a.push(p+1,65536),o.push(65536,l+1)))):n>p&&65535>=n?65535>=l?a.push(n,l+1):(a.push(n,65536),o.push(65536,l+1)):o.push(n,l+1),u+=2;return{loneHighSurrogates:t,loneLowSurrogates:r,bmp:a,astral:o}},W=function(e){for(var n,l,t,r,a,o,u=[],s=[],i=!1,c=-1,d=e.length;++c<d;)if(n=e[c],l=e[c+1]){for(t=n[0],r=n[1],a=l[0],o=l[1],s=r;a&&t[0]==a[0]&&t[1]==a[1];)s=M(o)?C(s,o[0]):T(s,o[0],o[1]-1),++c,n=e[c],t=n[0],r=n[1],l=e[c+1],a=l&&l[0],o=l&&l[1],i=!0;u.push([t,i?s:r]),i=!1}else u.push(n);return X(u)},X=function(e){if(1==e.length)return e;for(var n=-1,l=-1;++n<e.length;){var t=e[n],r=t[1],a=r[0],o=r[1];for(l=n;++l<e.length;){var u=e[l],s=u[1],i=s[0],c=s[1];a==i&&o==c&&(t[0]=M(u[0])?C(t[0],u[0][0]):T(t[0],u[0][0],u[0][1]-1),e.splice(l,1),--l)}}return e},J=function(e){if(!e.length)return[];for(var n,l,t,r,a,o,u=0,s=0,i=0,c=[],f=e.length;f>u;){n=e[u],l=e[u+1]-1,t=N(n),r=F(n),a=N(l),o=F(l);var g=r==d,h=o==p,m=!1;t==a||g&&h?(c.push([[t,a+1],[r,o+1]]),m=!0):c.push([[t,t+1],[r,p+1]]),!m&&a>t+1&&(h?(c.push([[t+1,a+1],[d,o+1]]),m=!0):c.push([[t+1,a],[d,p+1]])),m||c.push([[a,a+1],[d,o+1]]),s=t,i=a,u+=2}return W(c)},Y=function(e){var n=[];return y(e,function(e){var l=e[0],t=e[1];n.push(G(l)+G(t))}),n.join("|")},z=function(e,n){var l=[],t=H(e),r=t.loneHighSurrogates,a=t.loneLowSurrogates,o=t.bmp,u=t.astral,s=(!O(t.astral),!O(r)),i=!O(a),c=J(u);return n&&(o=A(o,r),s=!1,o=A(o,a),i=!1),O(o)||l.push(G(o)),c.length&&l.push(Y(c)),s&&l.push(G(r)+"(?![\\uDC00-\\uDFFF])"),i&&l.push("(?:[^\\uD800-\\uDBFF]|^)"+G(a)),l.join("|")},$=function(e){return arguments.length>1&&(e=E.call(arguments)),this instanceof $?(this.data=[],e?this.add(e):this):(new $).add(e)};$.version="1.2.0";var K=$.prototype;m(K,{add:function(e){var n=this;return null==e?n:e instanceof $?(n.data=A(n.data,e.data),n):(arguments.length>1&&(e=E.call(arguments)),b(e)?(y(e,function(e){n.add(e)}),n):(n.data=C(n.data,_(e)?e:q(e)),n))},remove:function(e){var n=this;return null==e?n:e instanceof $?(n.data=j(n.data,e.data),n):(arguments.length>1&&(e=E.call(arguments)),b(e)?(y(e,function(e){n.remove(e)}),n):(n.data=R(n.data,_(e)?e:q(e)),n))},addRange:function(e,n){var l=this;return l.data=T(l.data,_(e)?e:q(e),_(n)?n:q(n)),l},removeRange:function(e,n){var l=this,t=_(e)?e:q(e),r=_(n)?n:q(n);return l.data=S(l.data,t,r),l},intersection:function(e){var n=this,l=e instanceof $?D(e.data):e;return n.data=P(n.data,l),n},contains:function(e){return L(this.data,_(e)?e:q(e))},clone:function(){var e=new $;return e.data=this.data.slice(0),e},toString:function(e){var n=z(this.data,e?e.bmpOnly:!1);return n.replace(f,"\\0$1")},toRegExp:function(e){return RegExp(this.toString(),e||"")},valueOf:function(){return D(this.data)}}),K.toArray=K.valueOf,"function"==typeof e&&"object"==typeof e.amd&&e.amd?e(function(){return $}):a&&!a.nodeType?o?o.exports=$:a.regenerate=$:r.regenerate=$}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],317:[function(n,l,t){(function(n){(function(){"use strict";function r(){var e,n,l=16384,t=[],r=-1,a=arguments.length;if(!a)return"";for(var o="";++r<a;){var u=Number(arguments[r]);if(!isFinite(u)||0>u||u>1114111||S(u)!=u)throw RangeError("Invalid code point: "+u);65535>=u?t.push(u):(u-=65536,e=(u>>10)+55296,n=u%1024+56320,t.push(e,n)),(r+1==a||t.length>l)&&(o+=R.apply(null,t),t.length=0)}return o}function a(e,n){if(-1==n.indexOf("|")){if(e==n)return;throw Error("Invalid node type: "+e)}if(n=a.hasOwnProperty(n)?a[n]:a[n]=RegExp("^(?:"+n+")$"),!n.test(e))throw Error("Invalid node type: "+e)}function o(e){var n=e.type;if(o.hasOwnProperty(n)&&"function"==typeof o[n])return o[n](e);throw Error("Invalid node type: "+n)}function u(e){a(e.type,"alternative");var n=e.body,l=n?n.length:0;if(1==l)return b(n[0]);for(var t=-1,r="";++t<l;)r+=b(n[t]);return r}function s(e){switch(a(e.type,"anchor"),e.kind){case"start":return"^";case"end":return"$";case"boundary":return"\\b";case"not-boundary":return"\\B";default:throw Error("Invalid assertion")}}function i(e){return a(e.type,"anchor|characterClass|characterClassEscape|dot|group|reference|value"),o(e)}function c(e){a(e.type,"characterClass");var n=e.body,l=n?n.length:0,t=-1,r="[";for(e.negative&&(r+="^");++t<l;)r+=f(n[t]);return r+="]"}function d(e){return a(e.type,"characterClassEscape"),"\\"+e.value}function p(e){a(e.type,"characterClassRange"); var n=e.min,l=e.max;if("characterClassRange"==n.type||"characterClassRange"==l.type)throw Error("Invalid character class range");return f(n)+"-"+f(l)}function f(e){return a(e.type,"anchor|characterClassEscape|characterClassRange|dot|value"),o(e)}function g(e){a(e.type,"disjunction");var n=e.body,l=n?n.length:0;if(0==l)throw Error("No body");if(1==l)return o(n[0]);for(var t=-1,r="";++t<l;)0!=t&&(r+="|"),r+=o(n[t]);return r}function h(e){return a(e.type,"dot"),"."}function m(e){a(e.type,"group");var n="(";switch(e.behavior){case"normal":break;case"ignore":n+="?:";break;case"lookahead":n+="?=";break;case"negativeLookahead":n+="?!";break;default:throw Error("Invalid behaviour: "+e.behaviour)}var l=e.body,t=l?l.length:0;if(1==t)n+=o(l[0]);else for(var r=-1;++r<t;)n+=o(l[r]);return n+=")"}function y(e){a(e.type,"quantifier");var n="",l=e.min,t=e.max;switch(t){case void 0:case null:switch(l){case 0:n="*";break;case 1:n="+";break;default:n="{"+l+",}"}break;default:n=l==t?"{"+l+"}":0==l&&1==t?"?":"{"+l+","+t+"}"}return e.greedy||(n+="?"),i(e.body[0])+n}function x(e){return a(e.type,"reference"),"\\"+e.matchIndex}function b(e){return a(e.type,"anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|value"),o(e)}function _(e){a(e.type,"value");var n=e.kind,l=e.codePoint;switch(n){case"controlLetter":return"\\c"+r(l+64);case"hexadecimalEscape":return"\\x"+("00"+l.toString(16).toUpperCase()).slice(-2);case"identifier":return"\\"+r(l);case"null":return"\\"+l;case"octal":return"\\"+l.toString(8);case"singleEscape":switch(l){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 11:return"\\v";case 12:return"\\f";case 13:return"\\r";default:throw Error("Invalid codepoint: "+l)}case"symbol":return r(l);case"unicodeEscape":return"\\u"+("0000"+l.toString(16).toUpperCase()).slice(-4);case"unicodeCodePointEscape":return"\\u{"+l.toString(16).toUpperCase()+"}";default:throw Error("Unsupported node kind: "+n)}}var v={"function":!0,object:!0},I=v[typeof window]&&window||this,k=v[typeof t]&&t,E=v[typeof l]&&l&&!l.nodeType&&l,w=k&&E&&"object"==typeof n&&n;!w||w.global!==w&&w.window!==w&&w.self!==w||(I=w);var R=String.fromCharCode,S=Math.floor;o.alternative=u,o.anchor=s,o.characterClass=c,o.characterClassEscape=d,o.characterClassRange=p,o.disjunction=g,o.dot=h,o.group=m,o.quantifier=y,o.reference=x,o.value=_,"function"==typeof e&&"object"==typeof e.amd&&e.amd?e(function(){return{generate:o}}):k&&E?k.generate=o:I.regjsgen={generate:o}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],318:[function(e,n){!function(){function e(e,n){function l(n){return n.raw=e.substring(n.range[0],n.range[1]),n}function t(e,n){return e.range[0]=n,l(e)}function r(e,n){return l({type:"anchor",kind:e,range:[J-n,J]})}function a(e,n,t,r){return l({type:"value",kind:e,codePoint:n,range:[t,r]})}function o(e,n,l,t){return t=t||0,a(e,n,J-(l.length+t),J)}function u(e){var n=e[0],l=n.charCodeAt(0);if(X){var t;if(1===n.length&&l>=55296&&56319>=l&&(t=v().charCodeAt(0),t>=56320&&57343>=t))return J++,a("symbol",1024*(l-55296)+t-56320+65536,J-2,J)}return a("symbol",l,J-1,J)}function s(e,n,t){return l({type:"disjunction",body:e,range:[n,t]})}function i(){return l({type:"dot",range:[J-1,J]})}function c(e){return l({type:"characterClassEscape",value:e,range:[J-2,J]})}function d(e){return l({type:"reference",matchIndex:parseInt(e,10),range:[J-1-e.length,J]})}function p(e,n,t,r){return l({type:"group",behavior:e,body:n,range:[t,r]})}function f(e,n,t,r){return null==r&&(t=J-1,r=J),l({type:"quantifier",min:e,max:n,greedy:!0,body:null,range:[t,r]})}function g(e,n,t){return l({type:"alternative",body:e,range:[n,t]})}function h(e,n,t,r){return l({type:"characterClass",body:e,negative:n,range:[t,r]})}function m(e,n,t,r){if(e.codePoint>n.codePoint)throw SyntaxError("invalid range in character class");return l({type:"characterClassRange",min:e,max:n,range:[t,r]})}function y(e){return"alternative"===e.type?e.body:[e]}function x(n){n=n||1;var l=e.substring(J,J+n);return J+=n||1,l}function b(e){if(!_(e))throw SyntaxError("character: "+e)}function _(n){return e.indexOf(n,J)===J?x(n.length):void 0}function v(){return e[J]}function I(n){return e.indexOf(n,J)===J}function k(n){return e[J+1]===n}function E(n){var l=e.substring(J),t=l.match(n);return t&&(t.range=[],t.range[0]=J,x(t[0].length),t.range[1]=J),t}function w(){var e=[],n=J;for(e.push(R());_("|");)e.push(R());return 1===e.length?e[0]:s(e,n,J)}function R(){for(var e,n=[],l=J;e=S();)n.push(e);return 1===n.length?n[0]:g(n,l,J)}function S(){if(J>=e.length||I("|")||I(")"))return null;var n=A();if(n)return n;var l=T();if(!l)throw SyntaxError("Expected atom");var r=j()||!1;return r?(r.body=y(l),t(r,l.range[0]),r):l}function C(e,n,l,t){var r=null,a=J;if(_(e))r=n;else{if(!_(l))return!1;r=t}var o=w();if(!o)throw SyntaxError("Expected disjunction");b(")");var u=p(r,y(o),a,J);return"normal"==r&&Y++,u}function A(){return _("^")?r("start",1):_("$")?r("end",1):_("\\b")?r("boundary",2):_("\\B")?r("not-boundary",2):C("(?=","lookahead","(?!","negativeLookahead")}function j(){var e,n,l,t;if(_("*"))n=f(0);else if(_("+"))n=f(1);else if(_("?"))n=f(0,1);else if(e=E(/^\{([0-9]+)\}/))l=parseInt(e[1],10),n=f(l,l,e.range[0],e.range[1]);else if(e=E(/^\{([0-9]+),\}/))l=parseInt(e[1],10),n=f(l,void 0,e.range[0],e.range[1]);else if(e=E(/^\{([0-9]+),([0-9]+)\}/)){if(l=parseInt(e[1],10),t=parseInt(e[2],10),l>t)throw SyntaxError("numbers out of order in {} quantifier");n=f(l,t,e.range[0],e.range[1])}return n&&_("?")&&(n.greedy=!1,n.range[1]+=1),n}function T(){var e;if(e=E(/^[^^$\\.*+?(){[|]/))return u(e);if(_("."))return i();if(_("\\")){if(e=O(),!e)throw SyntaxError("atomEscape");return e}return(e=F())?e:C("(?:","ignore","(","normal")}function L(e){if(X){var n,t;if("unicodeEscape"==e.kind&&(n=e.codePoint)>=55296&&56319>=n&&I("\\")&&k("u")){var r=J;J++;var a=P();"unicodeEscape"==a.kind&&(t=a.codePoint)>=56320&&57343>=t?(e.range[1]=a.range[1],e.codePoint=1024*(n-55296)+t-56320+65536,e.type="value",e.kind="unicodeCodePointEscape",l(e)):J=r}}return e}function P(){return O(!0)}function O(e){var n;if(n=M())return n;if(e){if(_("b"))return o("singleEscape",8,"\\b");if(_("B"))throw SyntaxError("\\B not possible inside of CharacterClass")}return n=D()}function M(){var e,n;if(e=E(/^(?!0)\d+/)){n=e[0];var l=parseInt(e[0],10);return Y>=l?d(e[0]):(x(-e[0].length),(e=E(/^[0-7]{1,3}/))?o("octal",parseInt(e[0],8),e[0],1):(e=u(E(/^[89]/)),t(e,e.range[0]-1)))}return(e=E(/^[0-7]{1,3}/))?(n=e[0],/^0{1,3}$/.test(n)?o("null",0,"0",n.length+1):o("octal",parseInt(n,8),n,1)):(e=E(/^[dDsSwW]/))?c(e[0]):!1}function D(){var e;if(e=E(/^[fnrtv]/)){var n=0;switch(e[0]){case"t":n=9;break;case"n":n=10;break;case"v":n=11;break;case"f":n=12;break;case"r":n=13}return o("singleEscape",n,"\\"+e[0])}return(e=E(/^c([a-zA-Z])/))?o("controlLetter",e[1].charCodeAt(0)%32,e[1],2):(e=E(/^x([0-9a-fA-F]{2})/))?o("hexadecimalEscape",parseInt(e[1],16),e[1],2):(e=E(/^u([0-9a-fA-F]{4})/))?L(o("unicodeEscape",parseInt(e[1],16),e[1],2)):X&&(e=E(/^u\{([0-9a-fA-F]{1,})\}/))?o("unicodeCodePointEscape",parseInt(e[1],16),e[1],4):N()}function B(e){var n=new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]");return 36===e||95===e||e>=65&&90>=e||e>=97&&122>=e||e>=48&&57>=e||92===e||e>=128&&n.test(String.fromCharCode(e))}function N(){var e,n="‌",l="‍";return B(v())?_(n)?o("identifier",8204,n):_(l)?o("identifier",8205,l):null:(e=x(),o("identifier",e.charCodeAt(0),e,1))}function F(){var e,n=J;return(e=E(/^\[\^/))?(e=V(),b("]"),h(e,!0,n,J)):_("[")?(e=V(),b("]"),h(e,!1,n,J)):null}function V(){var e;if(I("]"))return[];if(e=q(),!e)throw SyntaxError("nonEmptyClassRanges");return e}function U(e){var n,l,t;if(I("-")&&!k("]")){if(b("-"),t=H(),!t)throw SyntaxError("classAtom");l=J;var r=V();if(!r)throw SyntaxError("classRanges");return n=e.range[0],"empty"===r.type?[m(e,t,n,l)]:[m(e,t,n,l)].concat(r)}if(t=G(),!t)throw SyntaxError("nonEmptyClassRangesNoDash");return[e].concat(t)}function q(){var e=H();if(!e)throw SyntaxError("classAtom");return I("]")?[e]:U(e)}function G(){var e=H();if(!e)throw SyntaxError("classAtom");return I("]")?e:U(e)}function H(){return _("-")?u("-"):W()}function W(){var e;if(e=E(/^[^\\\]-]/))return u(e[0]);if(_("\\")){if(e=P(),!e)throw SyntaxError("classEscape");return L(e)}}var X=-1!==(n||"").indexOf("u"),J=0,Y=0;e=String(e),""===e&&(e="(?:)");var z=w();if(z.range[1]!==e.length)throw SyntaxError("Could not parse entire input - got stuck: "+e);return z}var l={parse:e};"undefined"!=typeof n&&n.exports?n.exports=l:window.regjsparser=l}()},{}],319:[function(e,n){function l(e){return I?v?g.UNICODE_IGNORE_CASE[e]:g.UNICODE[e]:g.REGULAR[e]}function t(e,n){return m.call(e,n)}function r(e,n){for(var l in n)e[l]=n[l]}function a(e,n){if(n){var l=d(n,"");switch(l.type){case"characterClass":case"group":case"value":break;default:l=o(l,n)}r(e,l)}}function o(e,n){return{type:"group",behavior:"ignore",body:[e],raw:"(?:"+n+")"}}function u(e){return t(f,e)?f[e]:!1}function s(e){{var n=p();e.body.forEach(function(e){switch(e.type){case"value":if(n.add(e.codePoint),v&&I){var t=u(e.codePoint);t&&n.add(t)}break;case"characterClassRange":var r=e.min.codePoint,a=e.max.codePoint;n.addRange(r,a),v&&I&&n.iuAddRange(r,a);break;case"characterClassEscape":n.add(l(e.value));break;default:throw Error("Unknown term type: "+e.type)}})}return e.negative&&(n=(I?y:x).clone().remove(n)),a(e,n.toString()),e}function i(e){switch(e.type){case"dot":a(e,(I?b:_).toString());break;case"characterClass":e=s(e);break;case"characterClassEscape":a(e,l(e.value).toString());break;case"alternative":case"disjunction":case"group":case"quantifier":e.body=e.body.map(i);break;case"value":var n=e.codePoint,t=p(n);if(v&&I){var r=u(n);r&&t.add(r)}a(e,t.toString());break;case"anchor":case"empty":case"group":case"reference":break;default:throw Error("Unknown term type: "+e.type)}return e}var c=e("regjsgen").generate,d=e("regjsparser").parse,p=e("regenerate"),f=e("./data/iu-mappings.json"),g=e("./data/character-class-escape-sets.js"),h={},m=h.hasOwnProperty,y=p().addRange(0,1114111),x=p().addRange(0,65535),b=y.clone().remove(10,13,8232,8233),_=b.clone().intersection(x);p.prototype.iuAddRange=function(e,n){var l=this;do{var t=u(e);t&&l.add(t)}while(++e<=n);return l};var v=!1,I=!1;n.exports=function(e,n){var l=d(e,n);return v=n?n.indexOf("i")>-1:!1,I=n?n.indexOf("u")>-1:!1,r(l,i(l)),c(l)}},{"./data/character-class-escape-sets.js":314,"./data/iu-mappings.json":315,regenerate:316,regjsgen:317,regjsparser:318}],320:[function(e,n){"use strict";var l=e("is-finite");n.exports=function(e,n){if("string"!=typeof e)throw new TypeError("Expected a string as the first argument");if(0>n||!l(n))throw new TypeError("Expected a finite positive number");var t="";do 1&n&&(t+=e),e+=e;while(n>>=1);return t}},{"is-finite":321}],321:[function(e,n,l){arguments[4][185][0].apply(l,arguments)},{dup:185}],322:[function(e,n){"use strict";n.exports=/^#!.*/},{}],323:[function(e,n){"use strict";n.exports=function(e){var n=/^\\\\\?\\/.test(e),l=/[^\x00-\x80]+/.test(e);return n||l?e:e.replace(/\\/g,"/")}},{}],324:[function(e,n){(function(e){"use strict";n.exports=function(n){var l=new e(JSON.stringify(n)).toString("base64");return"//# sourceMappingURL=data:application/json;base64,"+l}}).call(this,e("buffer").Buffer)},{buffer:139}],325:[function(e,n,l){l.SourceMapGenerator=e("./source-map/source-map-generator").SourceMapGenerator,l.SourceMapConsumer=e("./source-map/source-map-consumer").SourceMapConsumer,l.SourceNode=e("./source-map/source-node").SourceNode},{"./source-map/source-map-consumer":331,"./source-map/source-map-generator":332,"./source-map/source-node":333}],326:[function(e,n){if("function"!=typeof l)var l=e("amdefine")(n,e);l(function(e,n){function l(){this._array=[],this._set={}}var t=e("./util");l.fromArray=function(e,n){for(var t=new l,r=0,a=e.length;a>r;r++)t.add(e[r],n);return t},l.prototype.add=function(e,n){var l=this.has(e),r=this._array.length;(!l||n)&&this._array.push(e),l||(this._set[t.toSetString(e)]=r)},l.prototype.has=function(e){return Object.prototype.hasOwnProperty.call(this._set,t.toSetString(e))},l.prototype.indexOf=function(e){if(this.has(e))return this._set[t.toSetString(e)];throw new Error('"'+e+'" is not in the set.')},l.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},l.prototype.toArray=function(){return this._array.slice()},n.ArraySet=l})},{"./util":334,amdefine:335}],327:[function(e,n){if("function"!=typeof l)var l=e("amdefine")(n,e);l(function(e,n){function l(e){return 0>e?(-e<<1)+1:(e<<1)+0}function t(e){var n=1===(1&e),l=e>>1;return n?-l:l}var r=e("./base64"),a=5,o=1<<a,u=o-1,s=o;n.encode=function(e){var n,t="",o=l(e);do n=o&u,o>>>=a,o>0&&(n|=s),t+=r.encode(n);while(o>0);return t},n.decode=function(e,n){var l,o,i=0,c=e.length,d=0,p=0;do{if(i>=c)throw new Error("Expected more digits in base 64 VLQ value.");o=r.decode(e.charAt(i++)),l=!!(o&s),o&=u,d+=o<<p,p+=a}while(l);n.value=t(d),n.rest=e.slice(i)}})},{"./base64":328,amdefine:335}],328:[function(e,n){if("function"!=typeof l)var l=e("amdefine")(n,e);l(function(e,n){var l={},t={};"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").forEach(function(e,n){l[e]=n,t[n]=e}),n.encode=function(e){if(e in t)return t[e];throw new TypeError("Must be between 0 and 63: "+e)},n.decode=function(e){if(e in l)return l[e];throw new TypeError("Not a valid base 64 digit: "+e)}})},{amdefine:335}],329:[function(e,n){if("function"!=typeof l)var l=e("amdefine")(n,e);l(function(e,n){function l(e,n,t,r,a){var o=Math.floor((n-e)/2)+e,u=a(t,r[o],!0);return 0===u?o:u>0?n-o>1?l(o,n,t,r,a):o:o-e>1?l(e,o,t,r,a):0>e?-1:e}n.search=function(e,n,t){return 0===n.length?-1:l(-1,n.length,e,n,t)}})},{amdefine:335}],330:[function(e,n){if("function"!=typeof l)var l=e("amdefine")(n,e);l(function(e,n){function l(e,n){var l=e.generatedLine,t=n.generatedLine,a=e.generatedColumn,o=n.generatedColumn;return t>l||t==l&&o>=a||r.compareByGeneratedPositions(e,n)<=0}function t(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var r=e("./util");t.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},t.prototype.add=function(e){l(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},t.prototype.toArray=function(){return this._sorted||(this._array.sort(r.compareByGeneratedPositions),this._sorted=!0),this._array},n.MappingList=t})},{"./util":334,amdefine:335}],331:[function(e,n){if("function"!=typeof l)var l=e("amdefine")(n,e);l(function(e,n){function l(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var l=t.getArg(n,"version"),r=t.getArg(n,"sources"),o=t.getArg(n,"names",[]),u=t.getArg(n,"sourceRoot",null),s=t.getArg(n,"sourcesContent",null),i=t.getArg(n,"mappings"),c=t.getArg(n,"file",null);if(l!=this._version)throw new Error("Unsupported version: "+l);r=r.map(t.normalize),this._names=a.fromArray(o,!0),this._sources=a.fromArray(r,!0),this.sourceRoot=u,this.sourcesContent=s,this._mappings=i,this.file=c}var t=e("./util"),r=e("./binary-search"),a=e("./array-set").ArraySet,o=e("./base64-vlq");l.fromSourceMap=function(e){var n=Object.create(l.prototype);return n._names=a.fromArray(e._names.toArray(),!0),n._sources=a.fromArray(e._sources.toArray(),!0),n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n.__generatedMappings=e._mappings.toArray().slice(),n.__originalMappings=e._mappings.toArray().slice().sort(t.compareByOriginalPositions),n},l.prototype._version=3,Object.defineProperty(l.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?t.join(this.sourceRoot,e):e},this)}}),l.prototype.__generatedMappings=null,Object.defineProperty(l.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot)),this.__generatedMappings}}),l.prototype.__originalMappings=null,Object.defineProperty(l.prototype,"_originalMappings",{get:function(){return this.__originalMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot)),this.__originalMappings}}),l.prototype._nextCharIsMappingSeparator=function(e){var n=e.charAt(0);return";"===n||","===n},l.prototype._parseMappings=function(e){for(var n,l=1,r=0,a=0,u=0,s=0,i=0,c=e,d={};c.length>0;)if(";"===c.charAt(0))l++,c=c.slice(1),r=0;else if(","===c.charAt(0))c=c.slice(1);else{if(n={},n.generatedLine=l,o.decode(c,d),n.generatedColumn=r+d.value,r=n.generatedColumn,c=d.rest,c.length>0&&!this._nextCharIsMappingSeparator(c)){if(o.decode(c,d),n.source=this._sources.at(s+d.value),s+=d.value,c=d.rest,0===c.length||this._nextCharIsMappingSeparator(c))throw new Error("Found a source, but no line and column");if(o.decode(c,d),n.originalLine=a+d.value,a=n.originalLine,n.originalLine+=1,c=d.rest,0===c.length||this._nextCharIsMappingSeparator(c))throw new Error("Found a source and line, but no column");o.decode(c,d),n.originalColumn=u+d.value,u=n.originalColumn,c=d.rest,c.length>0&&!this._nextCharIsMappingSeparator(c)&&(o.decode(c,d),n.name=this._names.at(i+d.value),i+=d.value,c=d.rest)}this.__generatedMappings.push(n),"number"==typeof n.originalLine&&this.__originalMappings.push(n)}this.__generatedMappings.sort(t.compareByGeneratedPositions),this.__originalMappings.sort(t.compareByOriginalPositions)},l.prototype._findMapping=function(e,n,l,t,a){if(e[l]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[l]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return r.search(e,n,a)},l.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var n=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var l=this._generatedMappings[e+1];if(n.generatedLine===l.generatedLine){n.lastGeneratedColumn=l.generatedColumn-1;continue}}n.lastGeneratedColumn=1/0}},l.prototype.originalPositionFor=function(e){var n={generatedLine:t.getArg(e,"line"),generatedColumn:t.getArg(e,"column")},l=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",t.compareByGeneratedPositions);if(l>=0){var r=this._generatedMappings[l];if(r.generatedLine===n.generatedLine){var a=t.getArg(r,"source",null);return null!=a&&null!=this.sourceRoot&&(a=t.join(this.sourceRoot,a)),{source:a,line:t.getArg(r,"originalLine",null),column:t.getArg(r,"originalColumn",null),name:t.getArg(r,"name",null)}}}return{source:null,line:null,column:null,name:null}},l.prototype.sourceContentFor=function(e){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=t.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var n;if(null!=this.sourceRoot&&(n=t.urlParse(this.sourceRoot))){var l=e.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(l))return this.sourcesContent[this._sources.indexOf(l)];if((!n.path||"/"==n.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}throw new Error('"'+e+'" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(e){var n={source:t.getArg(e,"source"),originalLine:t.getArg(e,"line"),originalColumn:t.getArg(e,"column")};null!=this.sourceRoot&&(n.source=t.relative(this.sourceRoot,n.source));var l=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",t.compareByOriginalPositions);if(l>=0){var r=this._originalMappings[l];return{line:t.getArg(r,"generatedLine",null),column:t.getArg(r,"generatedColumn",null),lastColumn:t.getArg(r,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},l.prototype.allGeneratedPositionsFor=function(e){var n={source:t.getArg(e,"source"),originalLine:t.getArg(e,"line"),originalColumn:1/0};null!=this.sourceRoot&&(n.source=t.relative(this.sourceRoot,n.source));var l=[],r=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",t.compareByOriginalPositions);if(r>=0)for(var a=this._originalMappings[r];a&&a.originalLine===n.originalLine;)l.push({line:t.getArg(a,"generatedLine",null),column:t.getArg(a,"generatedColumn",null),lastColumn:t.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[--r];return l.reverse()},l.GENERATED_ORDER=1,l.ORIGINAL_ORDER=2,l.prototype.eachMapping=function(e,n,r){var a,o=n||null,u=r||l.GENERATED_ORDER;switch(u){case l.GENERATED_ORDER:a=this._generatedMappings;break;case l.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var s=this.sourceRoot;a.map(function(e){var n=e.source;return null!=n&&null!=s&&(n=t.join(s,n)),{source:n,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name}}).forEach(e,o)},n.SourceMapConsumer=l})},{"./array-set":326,"./base64-vlq":327,"./binary-search":329,"./util":334,amdefine:335}],332:[function(e,n){if("function"!=typeof l)var l=e("amdefine")(n,e);l(function(e,n){function l(e){e||(e={}),this._file=r.getArg(e,"file",null),this._sourceRoot=r.getArg(e,"sourceRoot",null),this._skipValidation=r.getArg(e,"skipValidation",!1),this._sources=new a,this._names=new a,this._mappings=new o,this._sourcesContents=null}var t=e("./base64-vlq"),r=e("./util"),a=e("./array-set").ArraySet,o=e("./mapping-list").MappingList;l.prototype._version=3,l.fromSourceMap=function(e){var n=e.sourceRoot,t=new l({file:e.file,sourceRoot:n});return e.eachMapping(function(e){var l={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(l.source=e.source,null!=n&&(l.source=r.relative(n,l.source)),l.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(l.name=e.name)),t.addMapping(l)}),e.sources.forEach(function(n){var l=e.sourceContentFor(n);null!=l&&t.setSourceContent(n,l)}),t},l.prototype.addMapping=function(e){var n=r.getArg(e,"generated"),l=r.getArg(e,"original",null),t=r.getArg(e,"source",null),a=r.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,l,t,a),null==t||this._sources.has(t)||this._sources.add(t),null==a||this._names.has(a)||this._names.add(a),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=l&&l.line,originalColumn:null!=l&&l.column,source:t,name:a})},l.prototype.setSourceContent=function(e,n){var l=e;null!=this._sourceRoot&&(l=r.relative(this._sourceRoot,l)),null!=n?(this._sourcesContents||(this._sourcesContents={}),this._sourcesContents[r.toSetString(l)]=n):this._sourcesContents&&(delete this._sourcesContents[r.toSetString(l)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},l.prototype.applySourceMap=function(e,n,l){var t=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');t=e.file}var o=this._sourceRoot;null!=o&&(t=r.relative(o,t));var u=new a,s=new a;this._mappings.unsortedForEach(function(n){if(n.source===t&&null!=n.originalLine){var a=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=a.source&&(n.source=a.source,null!=l&&(n.source=r.join(l,n.source)),null!=o&&(n.source=r.relative(o,n.source)),n.originalLine=a.line,n.originalColumn=a.column,null!=a.name&&(n.name=a.name))}var i=n.source;null==i||u.has(i)||u.add(i);var c=n.name;null==c||s.has(c)||s.add(c)},this),this._sources=u,this._names=s,e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&(null!=l&&(n=r.join(l,n)),null!=o&&(n=r.relative(o,n)),this.setSourceContent(n,t))},this)},l.prototype._validateMapping=function(e,n,l,t){if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!n&&!l&&!t||e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&l))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:l,original:n,name:t}))},l.prototype._serializeMappings=function(){for(var e,n=0,l=1,a=0,o=0,u=0,s=0,i="",c=this._mappings.toArray(),d=0,p=c.length;p>d;d++){if(e=c[d],e.generatedLine!==l)for(n=0;e.generatedLine!==l;)i+=";",l++;else if(d>0){if(!r.compareByGeneratedPositions(e,c[d-1]))continue;i+=","}i+=t.encode(e.generatedColumn-n),n=e.generatedColumn,null!=e.source&&(i+=t.encode(this._sources.indexOf(e.source)-s),s=this._sources.indexOf(e.source),i+=t.encode(e.originalLine-1-o),o=e.originalLine-1,i+=t.encode(e.originalColumn-a),a=e.originalColumn,null!=e.name&&(i+=t.encode(this._names.indexOf(e.name)-u),u=this._names.indexOf(e.name)))}return i},l.prototype._generateSourcesContent=function(e,n){return e.map(function(e){if(!this._sourcesContents)return null;null!=n&&(e=r.relative(n,e));var l=r.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,l)?this._sourcesContents[l]:null},this)},l.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},l.prototype.toString=function(){return JSON.stringify(this)},n.SourceMapGenerator=l})},{"./array-set":326,"./base64-vlq":327,"./mapping-list":330,"./util":334,amdefine:335}],333:[function(e,n){if("function"!=typeof l)var l=e("amdefine")(n,e);l(function(e,n){function l(e,n,l,t,r){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==n?null:n,this.source=null==l?null:l,this.name=null==r?null:r,this[u]=!0,null!=t&&this.add(t)}var t=e("./source-map-generator").SourceMapGenerator,r=e("./util"),a=/(\r?\n)/,o=10,u="$$$isSourceNode$$$";l.fromStringWithSourceMap=function(e,n,t){function o(e,n){if(null===e||void 0===e.source)u.add(n);else{var a=t?r.join(t,e.source):e.source;u.add(new l(e.originalLine,e.originalColumn,a,n,e.name))}}var u=new l,s=e.split(a),i=function(){var e=s.shift(),n=s.shift()||"";return e+n},c=1,d=0,p=null;return n.eachMapping(function(e){if(null!==p){if(!(c<e.generatedLine)){var n=s[0],l=n.substr(0,e.generatedColumn-d);return s[0]=n.substr(e.generatedColumn-d),d=e.generatedColumn,o(p,l),void(p=e)}var l="";o(p,i()),c++,d=0}for(;c<e.generatedLine;)u.add(i()),c++;if(d<e.generatedColumn){var n=s[0];u.add(n.substr(0,e.generatedColumn)),s[0]=n.substr(e.generatedColumn),d=e.generatedColumn}p=e},this),s.length>0&&(p&&o(p,i()),u.add(s.join(""))),n.sources.forEach(function(e){var l=n.sourceContentFor(e);null!=l&&(null!=t&&(e=r.join(t,e)),u.setSourceContent(e,l))}),u},l.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},l.prototype.prepend=function(e){if(Array.isArray(e))for(var n=e.length-1;n>=0;n--)this.prepend(e[n]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},l.prototype.walk=function(e){for(var n,l=0,t=this.children.length;t>l;l++)n=this.children[l],n[u]?n.walk(e):""!==n&&e(n,{source:this.source,line:this.line,column:this.column,name:this.name})},l.prototype.join=function(e){var n,l,t=this.children.length;if(t>0){for(n=[],l=0;t-1>l;l++)n.push(this.children[l]),n.push(e);n.push(this.children[l]),this.children=n}return this},l.prototype.replaceRight=function(e,n){var l=this.children[this.children.length-1];return l[u]?l.replaceRight(e,n):"string"==typeof l?this.children[this.children.length-1]=l.replace(e,n):this.children.push("".replace(e,n)),this},l.prototype.setSourceContent=function(e,n){this.sourceContents[r.toSetString(e)]=n},l.prototype.walkSourceContents=function(e){for(var n=0,l=this.children.length;l>n;n++)this.children[n][u]&&this.children[n].walkSourceContents(e);for(var t=Object.keys(this.sourceContents),n=0,l=t.length;l>n;n++)e(r.fromSetString(t[n]),this.sourceContents[t[n]])},l.prototype.toString=function(){var e="";return this.walk(function(n){e+=n}),e},l.prototype.toStringWithSourceMap=function(e){var n={code:"",line:1,column:0},l=new t(e),r=!1,a=null,u=null,s=null,i=null;return this.walk(function(e,t){n.code+=e,null!==t.source&&null!==t.line&&null!==t.column?((a!==t.source||u!==t.line||s!==t.column||i!==t.name)&&l.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:n.line,column:n.column},name:t.name}),a=t.source,u=t.line,s=t.column,i=t.name,r=!0):r&&(l.addMapping({generated:{line:n.line,column:n.column}}),a=null,r=!1);for(var c=0,d=e.length;d>c;c++)e.charCodeAt(c)===o?(n.line++,n.column=0,c+1===d?(a=null,r=!1):r&&l.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:n.line,column:n.column},name:t.name})):n.column++}),this.walkSourceContents(function(e,n){l.setSourceContent(e,n)}),{code:n.code,map:l}},n.SourceNode=l})},{"./source-map-generator":332,"./util":334,amdefine:335}],334:[function(e,n){if("function"!=typeof l)var l=e("amdefine")(n,e);l(function(e,n){function l(e,n,l){if(n in e)return e[n];if(3===arguments.length)return l;throw new Error('"'+n+'" is a required argument.')}function t(e){var n=e.match(f);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}function r(e){var n="";return e.scheme&&(n+=e.scheme+":"),n+="//",e.auth&&(n+=e.auth+"@"),e.host&&(n+=e.host),e.port&&(n+=":"+e.port),e.path&&(n+=e.path),n}function a(e){var n=e,l=t(e);if(l){if(!l.path)return e;n=l.path}for(var a,o="/"===n.charAt(0),u=n.split(/\/+/),s=0,i=u.length-1;i>=0;i--)a=u[i],"."===a?u.splice(i,1):".."===a?s++:s>0&&(""===a?(u.splice(i+1,s),s=0):(u.splice(i,2),s--));return n=u.join("/"),""===n&&(n=o?"/":"."),l?(l.path=n,r(l)):n}function o(e,n){""===e&&(e="."),""===n&&(n=".");var l=t(n),o=t(e);if(o&&(e=o.path||"/"),l&&!l.scheme)return o&&(l.scheme=o.scheme),r(l);if(l||n.match(g))return n;if(o&&!o.host&&!o.path)return o.host=n,r(o);var u="/"===n.charAt(0)?n:a(e.replace(/\/+$/,"")+"/"+n);return o?(o.path=u,r(o)):u}function u(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");var l=t(e);return"/"==n.charAt(0)&&l&&"/"==l.path?n.slice(1):0===n.indexOf(e+"/")?n.substr(e.length+1):n}function s(e){return"$"+e}function i(e){return e.substr(1)}function c(e,n){var l=e||"",t=n||"";return(l>t)-(t>l)}function d(e,n,l){var t;return(t=c(e.source,n.source))?t:(t=e.originalLine-n.originalLine)?t:(t=e.originalColumn-n.originalColumn,t||l?t:(t=c(e.name,n.name))?t:(t=e.generatedLine-n.generatedLine,t?t:e.generatedColumn-n.generatedColumn))}function p(e,n,l){var t;return(t=e.generatedLine-n.generatedLine)?t:(t=e.generatedColumn-n.generatedColumn,t||l?t:(t=c(e.source,n.source))?t:(t=e.originalLine-n.originalLine)?t:(t=e.originalColumn-n.originalColumn,t?t:c(e.name,n.name))) }n.getArg=l;var f=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,g=/^data:.+\,.+$/;n.urlParse=t,n.urlGenerate=r,n.normalize=a,n.join=o,n.relative=u,n.toSetString=s,n.fromSetString=i,n.compareByOriginalPositions=d,n.compareByGeneratedPositions=p})},{amdefine:335}],335:[function(e,n){(function(l,t){"use strict";function r(n,r){function a(e){var n,l;for(n=0;e[n];n+=1)if(l=e[n],"."===l)e.splice(n,1),n-=1;else if(".."===l){if(1===n&&(".."===e[2]||".."===e[0]))break;n>0&&(e.splice(n-1,2),n-=2)}}function o(e,n){var l;return e&&"."===e.charAt(0)&&n&&(l=n.split("/"),l=l.slice(0,l.length-1),l=l.concat(e.split("/")),a(l),e=l.join("/")),e}function u(e){return function(n){return o(n,e)}}function s(e){function n(n){g[e]=n}return n.fromText=function(){throw new Error("amdefine does not implement load.fromText")},n}function i(e,l,a){var o,u,s,i;if(e)u=g[e]={},s={id:e,uri:t,exports:u},o=d(r,u,s,e);else{if(h)throw new Error("amdefine with no module ID cannot be called more than once per file.");h=!0,u=n.exports,s=n,o=d(r,u,s,n.id)}l&&(l=l.map(function(e){return o(e)})),i="function"==typeof a?a.apply(s.exports,l):a,void 0!==i&&(s.exports=i,e&&(g[e]=s.exports))}function c(e,n,l){Array.isArray(e)?(l=n,n=e,e=void 0):"string"!=typeof e&&(l=e,e=n=void 0),n&&!Array.isArray(n)&&(l=n,n=void 0),n||(n=["require","exports","module"]),e?f[e]=[e,n,l]:i(e,n,l)}var d,p,f={},g={},h=!1,m=e("path");return d=function(e,n,t,r){function a(a,o){return"string"==typeof a?p(e,n,t,a,r):(a=a.map(function(l){return p(e,n,t,l,r)}),void l.nextTick(function(){o.apply(null,a)}))}return a.toUrl=function(e){return 0===e.indexOf(".")?o(e,m.dirname(t.filename)):e},a},r=r||function(){return n.require.apply(n,arguments)},p=function(e,n,l,t,r){var a,c,h=t.indexOf("!"),m=t;if(-1===h){if(t=o(t,r),"require"===t)return d(e,n,l,r);if("exports"===t)return n;if("module"===t)return l;if(g.hasOwnProperty(t))return g[t];if(f[t])return i.apply(null,f[t]),g[t];if(e)return e(m);throw new Error("No module with ID: "+t)}return a=t.substring(0,h),t=t.substring(h+1,t.length),c=p(e,n,l,a,r),t=c.normalize?c.normalize(t,u(r)):o(t,r),g[t]?g[t]:(c.load(t,d(e,n,l,r),s(t),{}),g[t])},c.require=function(e){return g[e]?g[e]:f[e]?(i.apply(null,f[e]),g[e]):void 0},c.amd={},c}n.exports=r}).call(this,e("_process"),"/node_modules/source-map/node_modules/amdefine/amdefine.js")},{_process:147,path:146}],336:[function(e,n){"use strict";n.exports=function(e){return e.replace(/[\s\uFEFF\xA0]+$/g,"")}},{}],337:[function(e,n){n.exports={name:"babel",description:"Turn ES6 code into readable vanilla ES5 with source maps",version:"4.5.1",author:"Sebastian McKenzie <[email protected]>",homepage:"https://babeljs.io/",repository:"babel/babel",preferGlobal:!0,main:"lib/babel/api/node.js",browser:{"./lib/babel/api/register/node.js":"./lib/babel/api/register/browser.js"},bin:{"6to5":"./bin/deprecated/6to5","6to5-node":"./bin/deprecated/6to5-node","6to5-runtime":"./bin/deprecated/6to5-runtime",babel:"./bin/babel/index.js","babel-node":"./bin/babel-node","babel-external-helpers":"./bin/babel-external-helpers"},keywords:["harmony","classes","modules","let","const","var","es6","transpile","transpiler","6to5","babel"],scripts:{bench:"make bench",test:"make test"},dependencies:{"acorn-babel":"0.11.1-34","ast-types":"~0.6.1",chalk:"^1.0.0",chokidar:"^0.12.6",commander:"^2.6.0","core-js":"^0.6.1",debug:"^2.1.1","detect-indent":"^3.0.0",estraverse:"^1.9.1",esutils:"^1.1.6","fs-readdir-recursive":"^0.1.0",globals:"^6.2.0","is-integer":"^1.0.4","js-tokens":"0.4.1",leven:"^1.0.1","line-numbers":"0.2.0",lodash:"^3.2.0","output-file-sync":"^1.1.0","path-is-absolute":"^1.0.0","private":"^0.1.6","regenerator-babel":"0.8.13-1",regexpu:"^1.1.1",repeating:"^1.1.2","shebang-regex":"^1.0.0",slash:"^1.0.0","source-map":"^0.1.43","source-map-support":"^0.2.9","source-map-to-comment":"^1.0.0","trim-right":"^1.0.0"},devDependencies:{babel:"4.5.0",browserify:"^8.1.3",chai:"^2.0.0",esvalid:"^1.1.0",istanbul:"^0.3.5",jshint:"^2.6.0","jshint-stylish":"^1.0.0",matcha:"^0.6.0",mocha:"^2.1.0",rimraf:"^2.2.8","uglify-js":"^2.4.16"}}},{}],338:[function(e,n){n.exports={"abstract-expression-call":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"PROPERTY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"referenceGet",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"call",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"abstract-expression-delete":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"PROPERTY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"referenceDelete",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"abstract-expression-get":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"PROPERTY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"referenceGet",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"abstract-expression-set":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"PROPERTY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"referenceSet",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VALUE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"apply-constructor":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Constructor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"args",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instance",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"create",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Constructor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"result",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Constructor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"apply",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instance",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"args",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"result",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!=",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"result",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"object",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"||",right:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"result",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"function",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"result",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instance",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"array-comprehension-container":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"ArrayExpression",start:null,end:null,loc:null,range:null,elements:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"array-from":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"from",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VALUE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"array-push":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"push",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"STATEMENT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"async-to-generator":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"fn",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"gen",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"fn",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"apply",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"ThisExpression",start:null,end:null,loc:null,range:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arguments",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"NewExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Promise",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"resolve",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"reject",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"callNext",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"step",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"bind",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},{type:"Literal",start:null,end:null,loc:null,range:null,value:"next",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"callThrow",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"step",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"bind",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},{type:"Literal",start:null,end:null,loc:null,range:null,value:"throw",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"FunctionDeclaration",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"step",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arg",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"TryStatement",start:null,end:null,loc:null,range:null,block:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"info",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"gen",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arg",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"info",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},handler:{type:"CatchClause",start:null,end:null,loc:null,range:null,param:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"error",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},guard:null,body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"reject",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"error",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},guardedHandlers:[],finalizer:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"info",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"done",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"resolve",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Promise",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"resolve",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"then",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"callNext",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"callThrow",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"callNext",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},bind:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Function",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"bind",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},call:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"call",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"CONTEXT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"class-call-check":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instance",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Constructor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"!",prefix:!0,argument:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instance",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"instanceof",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Constructor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ThrowStatement",start:null,end:null,loc:null,range:null,argument:{type:"NewExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"TypeError",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Literal",start:null,end:null,loc:null,range:null,value:"Cannot call a class as a function",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"class-super-constructor-call-loose":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"SUPER_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!=",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"SUPER_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"apply",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"ThisExpression",start:null,end:null,loc:null,range:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arguments",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"class-super-constructor-call":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"SUPER_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!=",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"SUPER_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"apply",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"ThisExpression",start:null,end:null,loc:null,range:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arguments",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"corejs-is-iterator":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"CORE_ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"$for",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"isIterable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VALUE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"corejs-iterator":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"CORE_ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"$for",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getIterator",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VALUE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"default-parameter":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VARIABLE_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARGUMENTS",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARGUMENT_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"DEFAULT_VALUE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARGUMENTS",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARGUMENT_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"let",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},defaults:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defaults",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"keys",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getOwnPropertyNames",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defaults",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ForStatement",start:null,end:null,loc:null,range:null,init:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"Literal",start:null,end:null,loc:null,range:null,value:0,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"<",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"keys",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"length",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},update:{type:"UpdateExpression",start:null,end:null,loc:null,range:null,operator:"++",prefix:!1,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"keys",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getOwnPropertyDescriptor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defaults",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"configurable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defineProperty",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"define-property":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defineProperty",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Property",start:null,end:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"enumerable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Literal",start:null,end:null,loc:null,range:null,value:!0,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Property",start:null,end:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"configurable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Literal",start:null,end:null,loc:null,range:null,value:!0,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Property",start:null,end:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"writable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Literal",start:null,end:null,loc:null,range:null,value:!0,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"exports-assign":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"exports",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VALUE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"exports-default-assign":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"module",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"exports",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VALUE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"exports-module-declaration-loose":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"exports",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"__esModule",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Literal",start:null,end:null,loc:null,range:null,value:!0,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"exports-module-declaration":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defineProperty",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"exports",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Literal",start:null,end:null,loc:null,range:null,value:"__esModule",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Literal",start:null,end:null,loc:null,range:null,value:!0,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"extends":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"assign",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"||",right:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"target",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ForStatement",start:null,end:null,loc:null,range:null,init:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"Literal",start:null,end:null,loc:null,range:null,value:1,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"<",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arguments",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"length",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},update:{type:"UpdateExpression",start:null,end:null,loc:null,range:null,operator:"++",prefix:!1,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"source",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arguments",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ForInStatement",start:null,end:null,loc:null,range:null,left:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"source",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"hasOwnProperty",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"call",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"source",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"target",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"source",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"key",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"target",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"for-of-loose":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ForStatement",start:null,end:null,loc:null,range:null,init:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"IS_ARRAY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"isArray",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"INDEX",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"Literal",start:null,end:null,loc:null,range:null,value:0,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"IS_ARRAY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"iterator",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},test:null,update:null,body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"IS_ARRAY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"INDEX",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:">=",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"length",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BreakStatement",start:null,end:null,loc:null,range:null,label:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"UpdateExpression",start:null,end:null,loc:null,range:null,operator:"++",prefix:!1,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"INDEX",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"INDEX",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LOOP_OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"next",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"INDEX",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"done",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BreakStatement",start:null,end:null,loc:null,range:null,label:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"INDEX",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"for-of":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ForStatement",start:null,end:null,loc:null,range:null,init:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ITERATOR_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"OBJECT",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"iterator",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"STEP_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},test:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"!",prefix:!0,argument:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"STEP_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ITERATOR_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"next",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"done",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},update:null,body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},get:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"get",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"property",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"receiver",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getOwnPropertyDescriptor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"property",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"parent",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getPrototypeOf",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"parent",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"get",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"parent",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"property",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"receiver",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Literal",start:null,end:null,loc:null,range:null,value:"value",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},operator:"in",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"writable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getter",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"get",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getter",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getter",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"call",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"receiver",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"has-own":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"hasOwnProperty",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},inherits:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"subClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"function",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ThrowStatement",start:null,end:null,loc:null,range:null,argument:{type:"NewExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"TypeError",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Literal",start:null,end:null,loc:null,range:null,value:"Super expression must either be null or a function, not ",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},operator:"+",right:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"subClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"create",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"constructor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"subClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Property",start:null,end:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"enumerable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Literal",start:null,end:null,loc:null,range:null,value:!1,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Property",start:null,end:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"writable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Literal",start:null,end:null,loc:null,range:null,value:!0,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Property",start:null,end:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"configurable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Literal",start:null,end:null,loc:null,range:null,value:!0,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"subClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"__proto__",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"superClass",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"interop-require-wildcard":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"__esModule",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{type:"Literal",start:null,end:null,loc:null,range:null,value:"default",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},value:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"interop-require":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"__esModule",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Literal",start:null,end:null,loc:null,range:null,value:"default",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"let-scoping-return":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"RETURN",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"object",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"RETURN",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"v",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"named-function":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"FunctionDeclaration",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"GET_OUTER_ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},generator:!1,expression:!1,params:[],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"object-destructuring-empty":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"ThrowStatement",start:null,end:null,loc:null,range:null,argument:{type:"NewExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"TypeError",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Literal",start:null,end:null,loc:null,range:null,value:"Cannot destructure undefined",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"object-without-properties":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"keys",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"target",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ForInStatement",start:null,end:null,loc:null,range:null,left:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"keys",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"indexOf",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:">=",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:0,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"ContinueStatement",start:null,end:null,loc:null,range:null,label:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"!",prefix:!0,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"hasOwnProperty",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"call",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"ContinueStatement",start:null,end:null,loc:null,range:null,label:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"target",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"target",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"property-method-assignment-wrapper-generator":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"WRAPPER_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"regeneratorRuntime",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"mark",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},generator:!1,expression:!1,params:[],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_this",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"ThisExpression",start:null,end:null,loc:null,range:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_arguments",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arguments",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"regeneratorRuntime",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"wrap",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_ID$",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"context$2$0",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"WhileStatement",start:null,end:null,loc:null,range:null,test:{type:"Literal",start:null,end:null,loc:null,range:null,value:1,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},body:{type:"SwitchStatement",start:null,end:null,loc:null,range:null,discriminant:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"context$2$0",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prev",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"context$2$0",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"next",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},cases:[{type:"SwitchCase",start:null,end:null,loc:null,range:null,consequent:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"context$2$0",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"delegateYield",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"apply",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_this",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_arguments",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Literal",start:null,end:null,loc:null,range:null,value:"t0",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},{type:"Literal",start:null,end:null,loc:null,range:null,value:1,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],test:{type:"Literal",start:null,end:null,loc:null,range:null,value:0,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"SwitchCase",start:null,end:null,loc:null,range:null,consequent:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"context$2$0",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"abrupt",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Literal",start:null,end:null,loc:null,range:null,value:"return",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"context$2$0",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"t0",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],test:{type:"Literal",start:null,end:null,loc:null,range:null,value:1,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"SwitchCase",start:null,end:null,loc:null,range:null,consequent:[],test:{type:"Literal",start:null,end:null,loc:null,range:null,value:2,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"SwitchCase",start:null,end:null,loc:null,range:null,consequent:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"context$2$0",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"stop",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],test:{type:"Literal",start:null,end:null,loc:null,range:null,value:"end",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ThisExpression",start:null,end:null,loc:null,range:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"WRAPPER_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"toString",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"toString",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"WRAPPER_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"property-method-assignment-wrapper":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"WRAPPER_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},generator:!1,expression:!1,params:[],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"apply",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"ThisExpression",start:null,end:null,loc:null,range:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arguments",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"WRAPPER_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"toString",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"toString",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"WRAPPER_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"prototype-identifier":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"CLASS_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"prototype-properties":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"child",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"staticProps",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instanceProps",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"staticProps",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defineProperties",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"child",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"staticProps",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instanceProps",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defineProperties",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"child",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"instanceProps",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"require-assign-key":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"VARIABLE_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"require",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"MODULE_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},require:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"require",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"MODULE_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},rest:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ForStatement",start:null,end:null,loc:null,range:null,init:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LEN",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARGUMENTS",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"length",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARRAY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARRAY_LEN",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"START",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"<",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"LEN",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},update:{type:"UpdateExpression",start:null,end:null,loc:null,range:null,operator:"++",prefix:!1,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARRAY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARRAY_KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ARGUMENTS",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"KEY",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"self-contained-helpers-head":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"helpers",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"exports",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Literal",start:null,end:null,loc:null,range:null,value:"default",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"exports",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"__esModule",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Literal",start:null,end:null,loc:null,range:null,value:!0,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"self-global":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"global",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"undefined",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"self",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"global",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},set:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"set",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"property",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"receiver",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getOwnPropertyDescriptor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"property",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"parent",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"getPrototypeOf",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"parent",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:null,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"set",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"parent",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"property",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"receiver",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Literal",start:null,end:null,loc:null,range:null,value:"value",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},operator:"in",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"writable",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"setter",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"desc",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"set",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"setter",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!==",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undefined",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"setter",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"call",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"receiver",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},slice:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"prototype",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"slice",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"sliced-to-array":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"isArray",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"iterator",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"in",right:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"ArrayExpression",start:null,end:null,loc:null,range:null,elements:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ForStatement",start:null,end:null,loc:null,range:null,init:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_iterator",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"iterator",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_step",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},test:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"!",prefix:!0,argument:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_step",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_iterator",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"next",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"done",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},update:null,body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"push",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_step",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"length",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BreakStatement",start:null,end:null,loc:null,range:null,label:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"_arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ThrowStatement",start:null,end:null,loc:null,range:null,argument:{type:"NewExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"TypeError",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Literal",start:null,end:null,loc:null,range:null,value:"Invalid attempt to destructure non-iterable instance",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},system:{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"System",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"register",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"MODULE_NAME",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"MODULE_DEPENDENCIES",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"EXPORT_IDENTIFIER",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"setters",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"SETTERS",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Property",start:null,end:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"execute",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"EXECUTE",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"tagged-template-literal-loose":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"strings",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"raw",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"strings",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"raw",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"raw",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"strings",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"tagged-template-literal":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"strings",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"raw",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"freeze",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"defineProperties",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"strings",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"raw",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[{type:"Property",start:null,end:null,loc:null,range:null,method:!1,shorthand:!1,computed:!1,key:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"value",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},value:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Object",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"freeze",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"raw",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},kind:"init",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"tail-call-body":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"AGAIN_ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"Literal",start:null,end:null,loc:null,range:null,value:!0,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"LabeledStatement",start:null,end:null,loc:null,range:null,body:{type:"WhileStatement",start:null,end:null,loc:null,range:null,test:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"AGAIN_ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},body:{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"BLOCK",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},label:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"FUNCTION_ID",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"temporal-assert-defined":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"val",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"name",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undef",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"val",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"undef",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ThrowStatement",start:null,end:null,loc:null,range:null,argument:{type:"NewExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"ReferenceError",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"name",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"+",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:" is not defined - temporal dead zone",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Literal",start:null,end:null,loc:null,range:null,value:!0,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"temporal-undefined":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"ObjectExpression",start:null,end:null,loc:null,range:null,properties:[],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"test-exports":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"exports",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"undefined",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"test-module":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"module",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"!==",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"undefined",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"to-array":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"isArray",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},alternate:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"from",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"to-consumable-array":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"isArray",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ForStatement",start:null,end:null,loc:null,range:null,init:{type:"VariableDeclaration",start:null,end:null,loc:null,range:null,declarations:[{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"Literal",start:null,end:null,loc:null,range:null,value:0,raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"VariableDeclarator",start:null,end:null,loc:null,range:null,id:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr2",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},init:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"length",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],kind:"var",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},test:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"<",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"length",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},update:{type:"UpdateExpression",start:null,end:null,loc:null,range:null,operator:"++",prefix:!1,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},body:{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"AssignmentExpression",start:null,end:null,loc:null,range:null,operator:"=",left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr2",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"i",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!0,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr2",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Array",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"from",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"arr",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"typeof":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ReturnStatement",start:null,end:null,loc:null,range:null,argument:{type:"ConditionalExpression",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"constructor",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"Symbol",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"Literal",start:null,end:null,loc:null,range:null,value:"symbol",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},alternate:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"obj",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},"umd-runner-body":{type:"Program",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"FunctionExpression",start:null,end:null,loc:null,range:null,id:null,generator:!1,expression:!1,params:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"factory",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],body:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"LogicalExpression",start:null,end:null,loc:null,range:null,left:{type:"BinaryExpression",start:null,end:null,loc:null,range:null,left:{type:"UnaryExpression",start:null,end:null,loc:null,range:null,operator:"typeof",prefix:!0,argument:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"define",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"===",right:{type:"Literal",start:null,end:null,loc:null,range:null,value:"function",raw:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},operator:"&&",right:{type:"MemberExpression",start:null,end:null,loc:null,range:null,object:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"define",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},property:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"amd",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},computed:!1,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"define",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"AMD_ARGUMENTS",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},{type:"Identifier",start:null,end:null,loc:null,range:null,name:"factory",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:{type:"IfStatement",start:null,end:null,loc:null,range:null,test:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"COMMON_TEST",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},consequent:{type:"BlockStatement",start:null,end:null,loc:null,range:null,body:[{type:"ExpressionStatement",start:null,end:null,loc:null,range:null,expression:{type:"CallExpression",start:null,end:null,loc:null,range:null,callee:{type:"Identifier",start:null,end:null,loc:null,range:null,name:"factory",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},arguments:[{type:"Identifier",start:null,end:null,loc:null,range:null,name:"COMMON_ARGUMENTS",_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},alternate:null,_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_scopeInfo:null,_declarations:null,extendedRange:null,tokens:null,raw:null},_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}],_declarations:null,extendedRange:null,_scopeInfo:null,tokens:null,raw:null}} },{}]},{},[1])(1)});
packages/material-ui-icons/src/MailOutline.js
allanalexandre/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path fill="none" d="M0 0h24v24H0z" /><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V8l8 5 8-5v10zm-8-7L4 6h16l-8 5z" /></React.Fragment> , 'MailOutline');
src/components/Switch/Switch-test.js
wfp/ui
import React from 'react'; import Switch from '../Switch'; import { shallow } from 'enzyme'; describe('Switch', () => { describe('component rendering', () => { const buttonWrapper = shallow( <Switch kind="button" icon={<svg />} text="test" /> ); const linkWrapper = shallow( <Switch kind="anchor" icon={<svg className="testClass" />} text="test" /> ); it('should render a button when kind is button', () => { expect(buttonWrapper.is('button')).toEqual(true); }); it('should render a link when kind is link', () => { expect(linkWrapper.is('a')).toEqual(true); }); it('should have the expected text', () => { expect(buttonWrapper.text()).toEqual('test'); expect(linkWrapper.text()).toEqual('test'); }); it('should have the expected icon', () => { expect(buttonWrapper.find('svg').length).toEqual(1); expect(linkWrapper.find('svg').length).toEqual(1); }); it('icon should have the expected class', () => { const cls = 'wfp--content-switcher__icon'; expect(buttonWrapper.find('svg').hasClass(cls)).toEqual(true); expect(linkWrapper.find('svg').hasClass(cls)).toEqual(true); expect(linkWrapper.find('svg').hasClass('testClass')).toEqual(true); }); it('should have the expected class', () => { const cls = 'wfp--content-switcher-btn'; expect(buttonWrapper.hasClass(cls)).toEqual(true); expect(linkWrapper.hasClass(cls)).toEqual(true); }); it('should not have selected class', () => { const selectedClass = 'wfp--content-switcher--selected'; expect(buttonWrapper.hasClass(selectedClass)).toEqual(false); expect(linkWrapper.hasClass(selectedClass)).toEqual(false); }); it('should have a selected class when selected is set to true', () => { const selected = true; buttonWrapper.setProps({ selected }); linkWrapper.setProps({ selected }); expect(buttonWrapper.hasClass('wfp--content-switcher--selected')).toEqual( true ); expect(linkWrapper.hasClass('wfp--content-switcher--selected')).toEqual( true ); }); }); describe('events', () => { const buttonOnClick = jest.fn(); const linkOnClick = jest.fn(); const buttonOnKey = jest.fn(); const linkOnKey = jest.fn(); const index = 1; const name = 'first'; const text = 'test'; const spaceKey = 32; const enterKey = 13; const buttonWrapper = shallow( <Switch index={index} name={name} kind="button" onClick={buttonOnClick} onKeyDown={buttonOnKey} text={text} /> ); const linkWrapper = shallow( <Switch index={index} name={name} kind="anchor" onClick={linkOnClick} onKeyDown={linkOnKey} text={text} /> ); it('should invoke button onClick handler', () => { buttonWrapper.simulate('click', { preventDefault() {} }); expect(buttonOnClick).toBeCalledWith({ index, name, text }); }); it('should invoke link onClick handler', () => { linkWrapper.simulate('click', { preventDefault() {} }); expect(buttonOnClick).toBeCalledWith({ index, name, text }); }); it('should invoke button onKeyDown handler', () => { buttonWrapper.simulate('keydown', { which: spaceKey }); expect(buttonOnKey).toBeCalledWith({ index, name, text }); buttonWrapper.simulate('keydown', { which: enterKey }); expect(buttonOnKey).toBeCalledWith({ index, name, text }); }); it('should invoke link onKeyDown handler', () => { linkWrapper.simulate('keydown', { which: spaceKey }); expect(linkOnKey).toBeCalledWith({ index, name, text }); linkWrapper.simulate('keydown', { which: enterKey }); expect(linkOnKey).toBeCalledWith({ index, name, text }); }); }); });
Routers/__tests__/index.ios.js
victorditadi/IQApp
import 'react-native'; import React from 'react'; import Index from '../index.ios.js'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; it('renders correctly', () => { const tree = renderer.create( <Index /> ); });
build/assets/js/index.js
mtsee/mtui2.0
/*! mtui */ webpackJsonp([1],[function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}n(341);var l=n(1),r=a(l),u=n(16),i=n(120),s=n(76),o=n(473),d=a(o),c=n(21),f=n(179),m=n(196),p=a(m),h=n(278),_=a(h),E=(0,i.createStore)(_.default,(0,i.applyMiddleware)(d.default)),v=(0,f.syncHistoryWithStore)(c.browserHistory,E);(0,u.render)(r.default.createElement(s.Provider,{store:E},r.default.createElement(p.default,{history:v})),document.getElementById("App"));(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"store","C:/DT/mtui2.0/dev/index.jsx"),__REACT_HOT_LOADER__.register(v,"history","C:/DT/mtui2.0/dev/index.jsx"))})()},,function(e,t,n){e.exports={default:n(291),__esModule:!0}},function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var l=n(283),r=a(l);t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),(0,r.default)(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var l=n(284),r=a(l),u=n(282),i=a(u),s=n(62),o=a(s);t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":(0,o.default)(t)));e.prototype=(0,i.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(r.default?(0,r.default)(e,t):e.__proto__=t)}},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var l=n(62),r=a(l);t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":(0,r.default)(t))&&"function"!=typeof t?e:t}},,function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Limit=t.Popconfirm=t.Progress=t.LoadingModal=t.LoadingBox=t.Popover=t.Collapse=t.Swiper=t.Validate=t.Tree=t.SliderBar=t.Slider=t.Panel=t.Checkbox=t.Radio=t.Switch=t.DatePickers=t.DatePicker=t.TimePicker=t.Tabs=t.BackTop=t.Select=t.Dropdown=t.Modal=t.PageList=t.Tip=t.Input=t.Button=t.Grid=void 0,n(229);var l=n(206),r=a(l),u=n(122),i=a(u),s=n(125),o=a(s),d=n(211),c=a(d),f=n(209),m=a(f),p=n(124),h=a(p),_=n(218),E=a(_),v=n(197),y=a(v),b=n(224),g=a(b),C=n(225),T=a(C),k=n(203),O=a(k),x=n(204),D=a(x),w=n(223),R=a(w),A=n(217),N=a(A),P=n(198),L=a(P),j=n(212),I=a(j),H=n(221),M=a(H),S=n(220),B=a(S),G=n(227),U=a(G),V=n(233),z=a(V),W=n(222),$=a(W),F=n(199),X=a(F),Y=n(214),Z=a(Y),q=n(213),K=a(q),J=n(216),Q=a(J),ee=n(207),te=a(ee),ne=n(126),ae=a(ne),le=n(208),re=a(le),ue=n(226),ie=a(ue);t.Grid=r.default,t.Button=i.default,t.Input=o.default,t.Tip=ie.default,t.PageList=c.default,t.Modal=m.default,t.Dropdown=h.default,t.Select=E.default,t.BackTop=y.default,t.Tabs=g.default,t.TimePicker=T.default,t.DatePicker=O.default,t.DatePickers=D.default,t.Switch=R.default,t.Radio=N.default,t.Checkbox=L.default,t.Panel=I.default,t.Slider=M.default,t.SliderBar=B.default,t.Tree=U.default,t.Validate=z.default,t.Swiper=$.default,t.Collapse=X.default,t.Popover=Z.default,t.LoadingBox=ae.default,t.LoadingModal=re.default,t.Progress=Q.default,t.Popconfirm=K.default,t.Limit=te.default;(function(){"undefined"==typeof __REACT_HOT_LOADER__})()},function(e,t){},,,function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t){var n={};for(var a in e)t.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a]);return n}},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var l=n(281),r=a(l);t.default=r.default||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}},,,,,,,,,function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function l(e){var t={};if(e instanceof Array)for(var n=0;n<e.length;n++)if("object"===(0,u.default)(e[n]))for(var a in e[n])"object"===(0,u.default)(e[n])&&(t[a]=e[n][a]);return t}Object.defineProperty(t,"__esModule",{value:!0});var r=n(62),u=a(r);t.default=l;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(l,"assign","C:/DT/mtui2.0/dev/mtui/utils/assign.jsx")})()},function(e,t){var n=e.exports={version:"2.5.3"};"number"==typeof __e&&(__e=n)},,function(e,t,n){var a=n(90)("wks"),l=n(66),r=n(32).Symbol,u="function"==typeof r,i=e.exports=function(e){return a[e]||(a[e]=u&&r[e]||(u?r:l)("Symbol."+e))};i.store=a},,,,,function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function l(e){return e.getBoundingClientRect().left}function r(e){return e.getBoundingClientRect().top}function u(e){if(!e||"object"!==("undefined"==typeof e?"undefined":(0,s.default)(e)))return!1;var t=e.getBoundingClientRect(),n=document.documentElement.scrollTop||document.body.scrollTop,a=document.documentElement.scrollLeft||document.body.scrollLeft;return{left:t.left+(a||0),top:t.top+(n||0),width:e.offsetWidth,height:e.offsetHeight}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(62),s=a(i);t.offsetLeft=l,t.offsetTop=r,t.position=u;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(l,"offsetLeft","C:/DT/mtui2.0/dev/mtui/utils/offset.jsx"),__REACT_HOT_LOADER__.register(r,"offsetTop","C:/DT/mtui2.0/dev/mtui/utils/offset.jsx"),__REACT_HOT_LOADER__.register(u,"position","C:/DT/mtui2.0/dev/mtui/utils/offset.jsx"))})()},function(e,t,n){var a=n(32),l=n(23),r=n(82),u=n(43),i="prototype",s=function(e,t,n){var o,d,c,f=e&s.F,m=e&s.G,p=e&s.S,h=e&s.P,_=e&s.B,E=e&s.W,v=m?l:l[t]||(l[t]={}),y=v[i],b=m?a:p?a[t]:(a[t]||{})[i];m&&(n=t);for(o in n)d=!f&&b&&void 0!==b[o],d&&o in v||(c=d?b[o]:n[o],v[o]=m&&"function"!=typeof b[o]?n[o]:_&&d?r(c,a):E&&b[o]==c?function(e){var t=function(t,n,a){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,a)}return e.apply(this,arguments)};return t[i]=e[i],t}(c):h&&"function"==typeof c?r(Function.call,c):c,h&&((v.virtual||(v.virtual={}))[o]=c,e&s.R&&y&&!y[o]&&u(y,o,c)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var a=n(41),l=n(132),r=n(92),u=Object.defineProperty;t.f=n(36)?Object.defineProperty:function(e,t,n){if(a(e),t=r(t,!0),a(n),l)try{return u(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},,function(e,t){"use strict";function n(e){"IE"===MT_MS?e.removeNode(!0):e.remove()}Object.defineProperty(t,"__esModule",{value:!0}),t.removeDom=n;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(n,"removeDom","C:/DT/mtui2.0/dev/mtui/utils/dom.jsx")})()},function(e,t,n){e.exports=!n(42)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},,,,function(e,t,n){var a=n(44);e.exports=function(e){if(!a(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var a=n(33),l=n(55);e.exports=n(36)?function(e,t,n){return a.f(e,t,l(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var a=n(133),l=n(83);e.exports=function(e){return a(l(e))}},,,,,,,,function(e,t,n){"use strict";function a(e){return(0,u.position)(e)}function l(e,t,n,l,r){n=n||"click";var u=function(i){var s=a(e),o=document.documentElement.scrollTop||document.body.scrollTop,d=i.clientY+o||0,c=!1;if(l&&"mousemove"===n){var f=null;f=a(l),i.clientX>=f.left&&i.clientX<=f.left+f.width&&d>=f.top&&d<=f.top+f.height&&(c=!0)}!r&&i.clientX>=s.left&&i.clientX<=s.left+s.width&&d>=s.top&&d<=s.top+s.height||c?t(!0):(t(!1),l&&"mousemove"!==n&&(document.removeEventListener(n,u),u=null))};return document.addEventListener(n,u),u}function r(e,t){e&&(t=t||"click",document.removeEventListener(t,e),e=null)}Object.defineProperty(t,"__esModule",{value:!0}),t.offClickBlank=t.clickBlank=t.getXY=void 0;var u=n(30);t.getXY=a,t.clickBlank=l,t.offClickBlank=r;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(a,"getXY","C:/DT/mtui2.0/dev/mtui/utils/triggerBlank.jsx"),__REACT_HOT_LOADER__.register(l,"clickBlank","C:/DT/mtui2.0/dev/mtui/utils/triggerBlank.jsx"),__REACT_HOT_LOADER__.register(r,"offClickBlank","C:/DT/mtui2.0/dev/mtui/utils/triggerBlank.jsx"))})()},function(e,t){e.exports={}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},,,,,,function(e,t){"use strict";function n(e,t){var n=new Array(31,28,31,30,31,30,31,31,30,31,30,31);return(e%4===0&&e%100!==0||e%400===0)&&(n[1]=29),n[t-1]}function a(e,t,a){var l;if(t<=12&&t>=1)for(var r=1;r<t;++r)a+=n(e,r);return l=(e-1+(e-1)/4-(e-1)/100+(e-1)/400+a)%7,l=Math.round(l,10),Math.round(l,10)}function l(e,t,n){return e=parseInt(e,10),t=parseInt(t,10),"add"===n?12!==t?t++:(t=1,e++):"del"===n&&(1!==t?t--:(t=12,e--)),{year:e,month:t}}function r(e,t){var a=l(e.year,e.month,t),r=n(a.year,a.month);return e.day>r?a.day=r:a.day=e.day,a}function u(){var e=[],t=[],n=[],a=function(e,t){for(var n=0;n<t;n++)n<10?e.push("0"+n):e.push(n.toString())};return a(e,12),a(t,60),a(n,60),a=null,{years:[],months:[],days:[],hours:e,minutes:t,seconds:n}}function i(){var e=new Date;return{year:e.getFullYear(),month:1+parseInt(e.getMonth(),10),day:e.getDate()}}function s(e){var t=e.split("-");return{year:parseInt(t[0],10)||null,month:parseInt(t[1],10)||null,day:parseInt(t[2],10)||null}}function o(e){var t="",n=function(e){return e=parseInt(e,10),e=e<10?"0"+e:""+e};return t+=e.year?e.year:"null",t+=e.month?n(e.month):"null",t+=e.day?n(e.day):"null",n=null,t}function d(e,t){if(!t)return!0;t=t||",";var n=t.split(","),a=parseInt(n[0].replace(/-/g,""),10)||0,l=parseInt(n[1].replace(/-/g,""),10)||0;if(0===a&&0===l)return!0;var r=parseInt(o(e).replace(/null/g,"00"),10);return 0===a&&r<=l||(0===l&&r>=a||r<=l&&r>=a)}function c(e,t){var n=null,a=void 0,l=void 0,r=void 0;if(void 0!==t&&e){if(a=t.indexOf("y")===-1?0:t.match(/[y]/gi).length,l=t.indexOf("m")===-1?0:t.match(/[m]/gi).length,r=t.indexOf("d")===-1?0:t.match(/[d]/gi).length,n=t,a>4||l>2||r>2)return void console.error("format 格式错误,请参考 yyyy-mm-dd");for(var u="",i=0;i<a;i++)u+="y";n=n.replace(u,function(){return e.year=e.year.toString(),e.year.substr(e.year.length-a,a)}),n=2===l?n.replace("mm",e.month<10?"0"+e.month:e.month):n.replace("m",e.month),n=2===r?n.replace("dd",e.day<10?"0"+e.day:e.day):n.replace("d",e.day)}else e?(a=4,l=2,r=2,n=e.year+"/"+e.month+"/"+e.day):n="";return{val:n,show:{year:!!a,month:!!l,day:!!r}}}function f(e){return e=parseInt(e,10),e=e<10?"0"+e:e.toString()}function m(e,t,n){var a=parseInt(c(e,"yyyymmdd").val,10);return a>=t&&a<=n&&(e.inner=!0),a===t&&(e.active=!0,e.mark="start"),a===n&&(e.active=!0,e.mark="end"),e}function p(e,t,r){var u=void 0,i=void 0;t&&(u=parseInt(c(t.startDate,"yyyymmdd").val,10),i=parseInt(c(t.endDate,"yyyymmdd").val,10));var s=[],o=a(e.year,e.month,1),d=n(e.year,e.month),f=l(e.year,e.month,"add");if(7===o)for(var p=1;p<=42;p++)if(p<=d){var h={day:p,month:e.month,year:e.year,type:"now",active:p===e.day};r&&p===e.day&&(h.mark=r.split("_")[1]),r&&m(h,u,i),s.push(h)}else{var _={day:p-d,month:f.month,year:f.year,type:"next",active:!1};r&&m(_,u,i),s.push(_)}else for(var E=l(e.year,e.month,"del"),v=l(e.year,e.month,"del").month,y=n(e.year,v),b=1;b<=42;b++)if(b<=o){var g={day:y-o+b,month:E.month,year:E.year,type:"prev",active:!1};r&&m(g,u,i),s.push(g)}else if(b>o&&b<=d+o){var C={day:b-o,month:e.month,year:e.year,type:"now",active:b-o===e.day};r&&b-o===e.day&&(C.mark=r.split("_")[1]),r&&m(C,u,i),s.push(C)}else{var T={day:b-d-o,month:f.month,year:f.year,type:"next",active:!1};r&&m(T,u,i),s.push(T)}return s}function h(e){for(var t=[],n=0;n<12;n++)t.push({active:n+1===e.month,year:e.year,month:n+1});return t}Object.defineProperty(t,"__esModule",{value:!0}),t.getMDay=n,t.weekNumber=a,t.addAndDelOneMonth=l,t.addOrDelMonthDay=r,t.setHHMMSS=u,t.getDateNow=i,t.strToObj=s,t.objToStr=o,t.judgeDate=d,t.formatDate=c,t.fliterNum=f,t.setDatesDaysBg=m,t.setDays=p,t.setMonths=h;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(n,"getMDay","C:/DT/mtui2.0/dev/mtui/dateCore/dateCore.jsx"),__REACT_HOT_LOADER__.register(a,"weekNumber","C:/DT/mtui2.0/dev/mtui/dateCore/dateCore.jsx"),__REACT_HOT_LOADER__.register(l,"addAndDelOneMonth","C:/DT/mtui2.0/dev/mtui/dateCore/dateCore.jsx"),__REACT_HOT_LOADER__.register(r,"addOrDelMonthDay","C:/DT/mtui2.0/dev/mtui/dateCore/dateCore.jsx"),__REACT_HOT_LOADER__.register(u,"setHHMMSS","C:/DT/mtui2.0/dev/mtui/dateCore/dateCore.jsx"),__REACT_HOT_LOADER__.register(i,"getDateNow","C:/DT/mtui2.0/dev/mtui/dateCore/dateCore.jsx"),__REACT_HOT_LOADER__.register(s,"strToObj","C:/DT/mtui2.0/dev/mtui/dateCore/dateCore.jsx"),__REACT_HOT_LOADER__.register(o,"objToStr","C:/DT/mtui2.0/dev/mtui/dateCore/dateCore.jsx"),__REACT_HOT_LOADER__.register(d,"judgeDate","C:/DT/mtui2.0/dev/mtui/dateCore/dateCore.jsx"),__REACT_HOT_LOADER__.register(c,"formatDate","C:/DT/mtui2.0/dev/mtui/dateCore/dateCore.jsx"),__REACT_HOT_LOADER__.register(f,"fliterNum","C:/DT/mtui2.0/dev/mtui/dateCore/dateCore.jsx"),__REACT_HOT_LOADER__.register(m,"setDatesDaysBg","C:/DT/mtui2.0/dev/mtui/dateCore/dateCore.jsx"),__REACT_HOT_LOADER__.register(p,"setDays","C:/DT/mtui2.0/dev/mtui/dateCore/dateCore.jsx"),__REACT_HOT_LOADER__.register(h,"setMonths","C:/DT/mtui2.0/dev/mtui/dateCore/dateCore.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var l=n(286),r=a(l),u=n(285),i=a(u),s="function"==typeof i.default&&"symbol"==typeof r.default?function(e){return typeof e}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":typeof e};t.default="function"==typeof i.default&&"symbol"===s(r.default)?function(e){return"undefined"==typeof e?"undefined":s(e)}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":"undefined"==typeof e?"undefined":s(e)}},function(e,t,n){var a=n(138),l=n(84);e.exports=Object.keys||function(e){return a(e,l)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var a=n(83);e.exports=function(e){return Object(a(e))}},function(e,t){var n=0,a=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+a).toString(36))}},function(e,t){},,,,,,,,,function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.connect=t.Provider=void 0;var l=n(433),r=a(l),u=n(434),i=a(u);t.Provider=r.default,t.connect=i.default},,,function(e,t){"use strict";function n(e,t,n,a,l){var r=document.documentElement.scrollTop||document.body.scrollTop,u=document.documentElement.scrollLeft||document.body.scrollLeft;return{left:a+l.width>window.innerWidth+u?window.innerWidth-l.width-10:a,top:n+t+l.height>window.innerHeight+r?window.innerHeight-l.height:n+t}}Object.defineProperty(t,"__esModule",{value:!0}),t.outWindow=n;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(n,"outWindow","C:/DT/mtui2.0/dev/mtui/utils/outWindow.jsx")})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(67);var p=n(1),h=a(p),_=n(21),E=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){return h.default.createElement("div",{className:"index-header"},h.default.createElement("div",{className:"headerbox"},h.default.createElement("div",{className:"logo"},h.default.createElement(_.Link,{activeClassName:"active",to:HOME},h.default.createElement("img",{src:"assets/imgs/logo.png"}))),h.default.createElement("div",{className:"menus"},h.default.createElement("div",{className:"btns"},h.default.createElement(_.Link,{activeClassName:"active",to:HOME},h.default.createElement("i",null,"首页")),h.default.createElement(_.Link,{activeClassName:"active",to:HOME+"/help"},h.default.createElement("i",null,"帮助")),h.default.createElement(_.Link,{className:"update",activeClassName:"active",to:HOME+"/update"},h.default.createElement("i",null,"更新")),h.default.createElement(_.Link,{activeClassName:"active",to:HOME+"/ui/input"},h.default.createElement("i",null,"UI组件")),h.default.createElement(_.Link,{activeClassName:"active",to:HOME+"/ui/redux"},h.default.createElement("i",null,"Redux案例")),h.default.createElement("a",{target:"blank",href:"https://github.com/mtsee/mtui2.0"},h.default.createElement("i",null,"Github"))))))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"Header","C:/DT/mtui2.0/dev/pages/Common/IndexHeader.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/Common/IndexHeader.jsx"))})()},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var a=n(295);e.exports=function(e,t,n){if(a(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,a){return e.call(t,n,a)};case 3:return function(n,a,l){return e.call(t,n,a,l)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){e.exports=!0},function(e,t,n){var a=n(41),l=n(310),r=n(84),u=n(89)("IE_PROTO"),i=function(){},s="prototype",o=function(){var e,t=n(131)("iframe"),a=r.length,l="<",u=">";for(t.style.display="none",n(301).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(l+"script"+u+"document.F=Object"+l+"/script"+u),e.close(),o=e.F;a--;)delete o[s][r[a]];return o()};e.exports=Object.create||function(e,t){var n;return null!==e?(i[s]=a(e),n=new i,i[s]=null,n[u]=e):n=o(),void 0===t?n:l(n,t)}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var a=n(33).f,l=n(37),r=n(25)("toStringTag");e.exports=function(e,t,n){e&&!l(e=n?e:e.prototype,r)&&a(e,r,{configurable:!0,value:t})}},function(e,t,n){var a=n(90)("keys"),l=n(66);e.exports=function(e){return a[e]||(a[e]=l(e))}},function(e,t,n){var a=n(32),l="__core-js_shared__",r=a[l]||(a[l]={});e.exports=function(e){return r[e]||(r[e]={})}},function(e,t){var n=Math.ceil,a=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?a:n)(e)}},function(e,t,n){var a=n(44);e.exports=function(e,t){if(!a(e))return e;var n,l;if(t&&"function"==typeof(n=e.toString)&&!a(l=n.call(e)))return l;if("function"==typeof(n=e.valueOf)&&!a(l=n.call(e)))return l;if(!t&&"function"==typeof(n=e.toString)&&!a(l=n.call(e)))return l;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var a=n(32),l=n(23),r=n(85),u=n(94),i=n(33).f;e.exports=function(e){var t=l.Symbol||(l.Symbol=r?{}:a.Symbol||{});"_"==e.charAt(0)||e in t||i(t,e,{value:u.f(e)})}},function(e,t,n){t.f=n(25)},,,,,function(e,t,n){function a(e){if(!u(e)||l(e)!=i)return!1;var t=r(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&d.call(n)==f}var l=n(359),r=n(361),u=n(366),i="[object Object]",s=Function.prototype,o=Object.prototype,d=s.toString,c=o.hasOwnProperty,f=d.call(Object);e.exports=a},function(e,t,n){e.exports=n(368)()},,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.compose=t.applyMiddleware=t.bindActionCreators=t.combineReducers=t.createStore=void 0;var l=n(194),r=a(l),u=n(476),i=a(u),s=n(475),o=a(s),d=n(474),c=a(d),f=n(193),m=a(f),p=n(195);a(p);t.createStore=r.default,t.combineReducers=i.default,t.bindActionCreators=o.default,t.applyMiddleware=c.default,t.compose=m.default},function(e,t){"use strict";function n(e){return{type:a,data:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.setUserInfo=n;var a=t.SET_USER_INFO="SET_USER_INFO";(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(a,"SET_USER_INFO","C:/DT/mtui2.0/dev/actions/user.jsx"),__REACT_HOT_LOADER__.register(n,"setUserInfo","C:/DT/mtui2.0/dev/actions/user.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(13),r=a(l),u=n(12),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_),v=n(1),y=a(v),b=n(30),g=n(22),C=a(g),T=n(35),k=function(e){function t(e){(0,c.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.state={inks:[]},n}return(0,E.default)(t,e),(0,m.default)(t,[{key:"clickEvent",value:function(e){if(!this.props.disabled){this.props.onClick&&this.props.onClick(e);var t=e.pageX-(0,b.offsetLeft)(e.target),n=e.pageY-(0,b.offsetTop)(e.target),a=this.state.inks,l=(new Date).getTime(),r=this;a.push({x:t,y:n,tmp:l}),this.setState({inks:a},function(){window.applicationCache&&r.refs["ink_"+l].addEventListener("webkitAnimationEnd",function(){(0,T.removeDom)(this)},!1)})}}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.children,a=e.dom,l=e.style,u=e.type,s=e.size,o=e.block,d=e.disabled,c=e.prefix,f=e.suffix,m=e.htmlType,p=(e.onClick,(0,i.default)(e,["className","children","dom","style","type","size","block","disabled","prefix","suffix","htmlType","onClick"])),h=["mt-ink-reaction","mt-btn"],_=a;s&&h.push("mt-btn-"+s),u?h.push("mt-btn-"+u):h.push("mt-btn-primary"),o&&h.push("mt-btn-block"),d&&h.push("mt-btn-disabled"),t&&h.push(t),c&&h.push("mt-button-prefix-out"),f&&h.push("mt-button-suffix-out"),m&&(p.type=m),"submit"===m&&(_="button");var E=l||{};return E=(0,C.default)([{width:"submit"===m&&o?"100%":""},E]),y.default.createElement(_,(0,r.default)({style:E,onClick:this.clickEvent.bind(this)},p,{className:h.join(" ")}),c?y.default.createElement("span",{className:"mt-button-prefix"},c):null,y.default.createElement("span",null,n),f?y.default.createElement("span",{className:"mt-button-suffix"},f):null,this.state.inks.map(function(e,t){return y.default.createElement("div",{style:{left:e.x,top:e.y},key:e.tmp,ref:"ink_"+e.tmp,className:"mt-ink"})}))}}]),t}(v.Component);k.defaultProps={size:null,type:"default",block:!1,dom:"a",disabled:!1,prefix:null,suffix:null};var O=k;t.default=O;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(k,"Button","C:/DT/mtui2.0/dev/mtui/button/Button.jsx"),__REACT_HOT_LOADER__.register(O,"default","C:/DT/mtui2.0/dev/mtui/button/Button.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f),p=n(1),h=a(p),_=n(61),E=n(22),v=a(E),y=n(79),b=n(200),g=a(b),C=n(201),T=a(C),k=n(202),O=a(k),x=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.state={show:"day",headtime:null,yearList:[],defaultShow:"day",date:null},n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"setInner",value:function(){this.props.syncInner&&this.props.syncInner()}},{key:"prevClick",value:function(){var e=this.props.nowDate,t=e.year,n=e.month,a=e.day,l=(0,_.addAndDelOneMonth)(t,n,"del");l.day=a,this.props.resetDays(l,null,this.props.mid),this.setHeadTime(l),this.setInner()}},{key:"nextClick",value:function(){var e=this.props.nowDate,t=e.year,n=e.month,a=e.day,l=(0,_.addAndDelOneMonth)(t,n,"add");l.day=a,this.props.resetDays(l,null,this.props.mid),this.setHeadTime(l),this.setInner()}},{key:"prevOutClick",value:function(){var e=this.props.nowDate,t=e.year,n=e.month,a=e.day,l=this;t=parseInt(t,10);var r={year:"year"===this.state.show?t-30:--t,month:n,day:a};console.log(r),this.setHeadTime(r),this.props.resetDays(r,function(){"year"===l.state.show&&l.changeBox()},this.props.mid),this.setInner()}},{key:"nextOutClick",value:function(){var e=this.props.nowDate,t=e.year,n=e.month,a=e.day,l=this;t=parseInt(t,10);var r={year:"year"===this.state.show?t+30:++t,month:n,day:a};this.setHeadTime(r),this.props.resetDays(r,function(){"year"===l.state.show&&l.changeBox()},this.props.mid),this.setInner()}},{key:"iniYear",value:function(e){e=parseInt(e,10);for(var t=[],n=e-10;n<e+20;n++)t.push({year:n,type:"year",active:n===e});this.setState({show:"year",headtime:e-10+"-"+(e+19),yearList:t})}},{key:"changeBox",value:function(){if("day"===this.state.show)this.setState({show:"month",headtime:(0,_.formatDate)(this.props.nowDate,"yyyy").val});else{var e=(0,_.formatDate)(this.props.nowDate,"yyyy").val;this.iniYear(e)}}},{key:"clickYear",value:function(e){if(!e.active){var t=(0,_.getMDay)(e.year,e.month),n=this.props.nowDate,a=n.day,l=n.month;this.props.resetDays({year:e.year,month:l,day:a>t?t:a},null,this.props.mid),"year"===this.state.defaultShow?this.iniYear(e.year):this.setState({show:"month"},function(){this.setHeadTime(e)}.bind(this)),this.setInner()}}},{key:"clickMonth",value:function(e){if(this.setHeadTime(e),!e.active){var t=(0,_.getMDay)(e.year,e.month),n=this.props.nowDate.day;this.props.resetDays({year:e.year,month:e.month,day:n>t?t:n},null,this.props.mid),"month"===this.state.defaultShow?this.setHeadTime(e):this.setState({show:"day"},function(){this.setHeadTime(e)}.bind(this)),this.setInner()}}},{key:"clickDay",value:function(e){var t=(0,_.getMDay)(e.year,e.month);this.props.resetDays({year:e.year,month:e.month,day:e.day>t?t:e.day},null,this.props.mid),this.setInner()}},{key:"setHeadTime",value:function(e){"day"===this.state.show?this.setState({headtime:e.year+"-"+(0,_.fliterNum)(e.month)}):"month"===this.state.show?this.setState({headtime:e.year}):"year"===this.state.show&&(this.setState({headtime:e.year+"-"+(parseInt(e.year,10)+30)}),this.iniYear(e.year))}},{key:"dateForFormat",value:function(){var e=(0,_.formatDate)(this.props.nowDate,this.props.format);e.show.day||(e.show.month?this.setState({show:"month",defaultShow:"month"}):(this.setState({show:"year",defaultShow:"year"}),this.iniYear(e.val)))}},{key:"clickNowDay",value:function(e){var t=(0,_.getDateNow)();this.props.resetDays({year:t.year,month:t.month,day:t.day},null,this.props.mid),this.setInner()}},{key:"clickOk",value:function(e,t){e.stopPropagation();var n=null;n=this.props.dates?{str:(0,_.formatDate)(this.props.dates.startDate,this.props.format).val+" ~ "+(0,_.formatDate)(this.props.dates.endDate,this.props.format).val,obj:this.props.dates,clear:"clear"===t}:{str:(0,_.formatDate)(this.props.nowDate,this.props.format).val,obj:this.props.nowDate,clear:"clear"===t},this.props.showOrHide(!0,null,n,{target:{value:"clear"===t?"":n.str}})}},{key:"clearDate",value:function(e){this.clickOk(e,"clear")}},{key:"resetDateList",value:function(e,t){var n=null;n=this.props.dates?(0,_.setDays)(e,t,this.props.mid):(0,_.setDays)(e);var a=(0,_.setMonths)(e);this.setHeadTime(e),this.setState({date:{days:n,months:a}})}},{key:"componentWillMount",value:function(){this.setState({date:(0,_.setHHMMSS)()}),this.resetDateList(this.props.nowDate,this.props.dates)}},{key:"componentWillUpdate",value:function(e,t){(0,_.formatDate)(e.nowDate,"yyymmdd").val===(0,_.formatDate)(this.props.nowDate,"yyymmdd").val&&e.inner===this.props.inner||this.resetDateList(e.nowDate,e.dates)}},{key:"componentDidMount",value:function(){this.setState({headtime:(0,_.formatDate)(this.props.nowDate,"yyyy-mm").val}),this.dateForFormat()}},{key:"render",value:function(){var e=this.state.date,t=(e.years,e.months),n=e.days,a=(e.hours,e.minutes,e.seconds,null),l=["mt-date"],r=this.props.setPlace?this.props.setPlace():null;if(r){var u=r.height,i=r.left,s=r.top,o=r.width,d=(0,y.outWindow)(o,u,s,i,{width:230,height:280});a=(0,v.default)([{left:d.left,top:d.top},this.props.modalStyle,{display:this.props.show?"block":"none"}])}else a=this.props.modalStyle;return this.props.modalClass&&l.push(this.props.modalClass),h.default.createElement("div",{className:l.join(" "),id:this.props.mid,style:a},h.default.createElement("div",{className:"mt-date-head"},h.default.createElement("a",{onClick:this.prevOutClick.bind(this),className:"mt-date-btn-prev"},h.default.createElement("i",{className:"iconfont icon-arrow3l"})),"day"===this.state.show?h.default.createElement("a",{onClick:this.prevClick.bind(this),className:"mt-date-btn-prev"},h.default.createElement("i",{className:"iconfont icon-arrowl"})):null,h.default.createElement("span",{onClick:this.changeBox.bind(this),className:"mt-date-stime"},this.state.headtime),"day"===this.state.show?h.default.createElement("a",{onClick:this.nextClick.bind(this),className:"mt-date-btn-next"},h.default.createElement("i",{className:"iconfont icon-arrowr"})):null,h.default.createElement("a",{onClick:this.nextOutClick.bind(this),className:"mt-date-btn-next"},h.default.createElement("i",{className:"iconfont icon-arrow3r"}))),h.default.createElement(O.default,{range:this.props.range,clickYear:this.clickYear.bind(this),show:this.state.show,yearList:this.state.yearList}),"year"===this.state.defaultShow?null:h.default.createElement(T.default,{range:this.props.range,clickMonth:this.clickMonth.bind(this),show:this.state.show,months:t}),"month"===this.state.defaultShow||"year"===this.state.defaultShow?null:h.default.createElement(g.default,{range:this.props.range,clickDay:this.clickDay.bind(this),show:this.state.show,days:n}),h.default.createElement("div",{className:"mt-date-foot"},h.default.createElement("a",{onClick:this.clickNowDay.bind(this),className:"mt-date-btn-now"},"今天"),this.props.mid.indexOf("start")===-1?h.default.createElement("a",{onClick:this.clickOk.bind(this),className:"mt-btn-xs mt-btn-primary mt-date-btn-ok"},"确定"):null,this.props.mid.indexOf("start")===-1?h.default.createElement("a",{onClick:this.clearDate.bind(this),className:"mt-btn-xs mt-btn-warning mt-date-btn-clear"},"清除"):null))}}]),t}(p.Component),D=x;t.default=D;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(x,"DatePickerBox","C:/DT/mtui2.0/dev/mtui/dateCore/DatePickerBox.jsx"),__REACT_HOT_LOADER__.register(D,"default","C:/DT/mtui2.0/dev/mtui/dateCore/DatePickerBox.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(12),r=a(l),u=n(13),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_),v=n(1),y=a(v),b=n(16),g=a(b),C=n(205),T=a(C),k=n(35),O=n(30),x=n(53),D=function(e){function t(e){(0,c.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.state={show:e.visible},n.div=document.createElement("div"),n.div.setAttribute("class","mt-div"),n.handler=null,n.mid=null,n.refBtn=null,n}return(0,E.default)(t,e),(0,m.default)(t,[{key:"setMid",value:function(){null===this.mid&&(this.mid="mt_dropdown_"+ +new Date)}},{key:"getPlace",value:function(){return(0,O.position)(this.refBtn)}},{key:"renderDiv",value:function(e){this.setMid();var t=document.getElementById(this.mid);t&&!e||(e||document.body.appendChild(this.div),g.default.render(y.default.createElement(T.default,(0, i.default)({mid:this.mid,getPlace:this.getPlace.bind(this),show:this.state.show},this.props)),this.div))}},{key:"showOrHide",value:function(e,t){var n=this;this.renderDiv(),this.setState({show:!e},function(){n.state.show&&n.props.showBack?n.props.showBack():n.props.closeBack&&n.props.closeBack(),t&&t()}),this.hoverHandler=null}},{key:"handleClick",value:function(){var e=this,t=this.state.show;"click"===this.props.trigger&&this.showOrHide(t,function(){e.handler&&(0,x.offClickBlank)(e.handler),e.handler=(0,x.clickBlank)(document.getElementById(e.mid),function(t){t||(e.showOrHide(!0),(0,x.offClickBlank)(e.handler))})})}},{key:"componentDidUpdate",value:function(e){document.getElementById(this.mid)&&this.renderDiv(!0)}},{key:"componentDidMount",value:function(){if(this.props.visible&&this.renderDiv(),"hover"===this.props.trigger){var e=this;this.hoverHandler=function(t){e.state.show||e.showOrHide(!1,function(){e.handler&&(0,x.offClickBlank)(e.handler,"mousemove"),e.handler=(0,x.clickBlank)(document.getElementById(e.mid),function(t){t||(e.showOrHide(!0,null),(0,x.offClickBlank)(e.handler,"mousemove"))},"mousemove",e.refBtn)})},this.refBtn.addEventListener("mouseover",this.hoverHandler)}}},{key:"componentWillUnmount",value:function(){"hover"===this.props.trigger?((0,x.offClickBlank)(this.handler,"mousemove"),this.refBtn.removeEventListener("mouseover",this.hoverHandler)):(0,x.offClickBlank)(this.handler),(0,k.removeDom)(this.div),g.default.unmountComponentAtNode(this.div)}},{key:"render",value:function(){var e=this,t=this.props.btn.type,n=this.props.btn.props,a=n.children,l=n.className,u=(0,r.default)(n,["children","className"]),s=["mt-dropdown-btn"];return l&&s.push(l),y.default.createElement(t,(0,i.default)({ref:function(t){e.refBtn=t},className:s.join(" "),onClick:this.handleClick.bind(this)},u),a)}}]),t}(v.Component);D.defaultProps={btn:y.default.createElement("a",null,"dropdown"),style:{},visible:!1,showBack:null,closeBack:null,trigger:"hover"};var w=D;t.default=w;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(D,"DropDown","C:/DT/mtui2.0/dev/mtui/dropdown/Dropdown.jsx"),__REACT_HOT_LOADER__.register(w,"default","C:/DT/mtui2.0/dev/mtui/dropdown/Dropdown.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(13),r=a(l),u=n(12),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_),v=n(1),y=a(v),b=function(e){function t(e){(0,c.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.state={value:""},n}return(0,E.default)(t,e),(0,m.default)(t,[{key:"onChange",value:function(e){this.props.onChange&&this.props.onChange(e),void 0!==this.props.defaultValue&&this.setState({value:e.target.value})}},{key:"getValue",value:function(){return this.state.value}},{key:"componentWillUpdate",value:function(e,t){e.value!==this.props.value&&this.setState({value:e.value})}},{key:"componentWillMount",value:function(){void 0!==this.props.defaultValue&&this.setState({value:this.props.defaultValue}),this.props.value&&this.setState({value:this.props.value})}},{key:"render",value:function(){var e=this.props,t=e.size,n=e.prefix,a=e.block,l=e.suffix,u=e.type,s=(e.onPressEnter,e.className),o=e.validateInfo,d=(e.onChange,e.defaultValue),c=e.value,f=e.disabled,m=(0,i.default)(e,["size","prefix","block","suffix","type","onPressEnter","className","validateInfo","onChange","defaultValue","value","disabled"]),p=["mt-input"];s&&p.push(s),t&&p.push("mt-input-"+(t?t:"nm")),n&&p.push("mt-input-prefix-out"),l&&p.push("mt-input-suffix-out"),f&&p.push("mt-input-disabled");var h={};void 0!==c&&(h.value=c),void 0!==d&&(h.defaultValue=d);var _={};return a&&(_={display:"block"}),y.default.createElement("span",{style:_,className:p.join(" ")},n?y.default.createElement("span",{className:"mt-input-prefix"},n):null,"textarea"===u?y.default.createElement("textarea",(0,r.default)({disabled:f},h,m,{onChange:this.onChange.bind(this)})):y.default.createElement("input",(0,r.default)({type:u,disabled:f},h,m,{onChange:this.onChange.bind(this)})),l?y.default.createElement("span",{className:"mt-input-suffix"},l):null,o)}}]),t}(v.Component);b.defaultProps={size:"nm",type:"text",block:!1,prefix:null,suffix:null,onPressEnter:null,validateInfo:null};var g=b;t.default=g;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(b,"Input","C:/DT/mtui2.0/dev/mtui/input/Input.jsx"),__REACT_HOT_LOADER__.register(g,"default","C:/DT/mtui2.0/dev/mtui/input/Input.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f),p=n(1),h=a(p),_=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){var e=["mt-loading","animated fadeIn"];return this.props.bg&&e.push("mt-loading-bg"),h.default.createElement("div",{style:{display:this.props.show?"block":"none"},className:e.join(" ")},h.default.createElement("div",{className:"mt-loading-spin"},h.default.createElement("i",{className:"iconfont icon-"+this.props.type})),this.props.info?h.default.createElement("div",{className:"mt-loading-info"},this.props.info):null)}}]),t}(p.Component);_.defaultProps={type:"loading3",show:!0};var E=_;t.default=E;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(_,"LoadingBox","C:/DT/mtui2.0/dev/mtui/loadingBox/LoadingBox.jsx"),__REACT_HOT_LOADER__.register(E,"default","C:/DT/mtui2.0/dev/mtui/loadingBox/LoadingBox.jsx"))})()},function(e,t){"use strict";function n(e){l.style=""}function a(e){"IE"===MT_MS?l.style.paddingRight="17px":l.style.paddingRight="5px",l.style.overflow="hidden"}Object.defineProperty(t,"__esModule",{value:!0});var l=document.body;t.showScroll=n,t.hideScroll=a;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(l,"BODY","C:/DT/mtui2.0/dev/mtui/utils/bodyscroll.jsx"),__REACT_HOT_LOADER__.register(n,"showScroll","C:/DT/mtui2.0/dev/mtui/utils/bodyscroll.jsx"),__REACT_HOT_LOADER__.register(a,"hideScroll","C:/DT/mtui2.0/dev/mtui/utils/bodyscroll.jsx"))})()},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={onObj:{},oneObj:{},on:function(e,t){void 0===this.onObj[e]&&(this.onObj[e]=[]),this.onObj[e].push(t)},one:function(e,t){void 0===this.oneObj[e]&&(this.oneObj[e]=[]),this.oneObj[e].push(t)},off:function(e){this.onObj[e]=[],this.oneObj[e]=[]},trigger:function(){var e=void 0,t=void 0;if(0==arguments.length)return!1;if(e=arguments[0],t=[].concat(Array.prototype.slice.call(arguments,1)),void 0!==this.onObj[e]&&this.onObj[e].length>0)for(var n in this.onObj[e])this.onObj[e][n].apply(null,t);if(void 0!==this.oneObj[e]&&this.oneObj[e].length>0){for(var a in this.oneObj[e])this.oneObj[e][a].apply(null,t),this.oneObj[e][a]=void 0;this.oneObj[e]=[]}}},a=n;t.default=a;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(n,"eventProxy","C:/DT/mtui2.0/dev/mtui/utils/eventProxy.jsx"),__REACT_HOT_LOADER__.register(a,"default","C:/DT/mtui2.0/dev/mtui/utils/eventProxy.jsx"))})()},function(e,t){"use strict";function n(e,t){var n=[];if(e.width){var a=e.width.split("/");n.push("mt-grid mt-grid-"+a[1]+"-"+a[0])}if(e.offset){var l=e.offset.split("/");n.push("mt-grid-offset-"+l[1]+"-"+l[0])}if(e.smOffset){var r=e.smOffset.split("/");n.push("mt-grid-sm-offset-"+r[1]+"-"+r[0])}if(e.mdOffset){var u=e.mdOffset.split("/");n.push("mt-grid-md-offset-"+u[1]+"-"+u[0])}if(e.lgOffset){var i=e.lgOffset.split("/");n.push("mt-grid-lg-offset-"+i[1]+"-"+i[0])}if(e.sm){var s=e.sm.split("/");n.push("mt-grid-sm-"+s[1]+"-"+s[0])}if(e.md){var o=e.md.split("/");n.push("mt-grid-md-"+o[1]+"-"+o[0])}if(e.lg){var d=e.lg.split("/");n.push("mt-grid-lg-"+d[1]+"-"+d[0])}return t&&n.push(t),n=0!=n.length?n.join(" "):""}Object.defineProperty(t,"__esModule",{value:!0});var a=n;t.default=a;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(n,"setGridName","C:/DT/mtui2.0/dev/mtui/utils/setGridName.jsx"),__REACT_HOT_LOADER__.register(a,"default","C:/DT/mtui2.0/dev/mtui/utils/setGridName.jsx"))})()},function(e,t){"use strict";function n(e){return e instanceof Array||(e=e?[e]:[]),e}Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=n;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(n,"toArray","C:/DT/mtui2.0/dev/mtui/utils/toArray.jsx")})()},function(e,t,n){var a=n(44),l=n(32).document,r=a(l)&&a(l.createElement);e.exports=function(e){return r?l.createElement(e):{}}},function(e,t,n){e.exports=!n(36)&&!n(42)(function(){return 7!=Object.defineProperty(n(131)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var a=n(81);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==a(e)?e.split(""):Object(e)}},function(e,t,n){"use strict";var a=n(85),l=n(31),r=n(139),u=n(43),i=n(37),s=n(54),o=n(305),d=n(88),c=n(137),f=n(25)("iterator"),m=!([].keys&&"next"in[].keys()),p="@@iterator",h="keys",_="values",E=function(){return this};e.exports=function(e,t,n,v,y,b,g){o(n,t,v);var C,T,k,O=function(e){if(!m&&e in R)return R[e];switch(e){case h:return function(){return new n(this,e)};case _:return function(){return new n(this,e)}}return function(){return new n(this,e)}},x=t+" Iterator",D=y==_,w=!1,R=e.prototype,A=R[f]||R[p]||y&&R[y],N=!m&&A||O(y),P=y?D?O("entries"):N:void 0,L="Array"==t?R.entries||A:A;if(L&&(k=c(L.call(new e)),k!==Object.prototype&&k.next&&(d(k,x,!0),a||i(k,f)||u(k,f,E))),D&&A&&A.name!==_&&(w=!0,N=function(){return A.call(this)}),a&&!g||!m&&!w&&R[f]||u(R,f,N),s[t]=N,s[x]=E,y)if(C={values:D?N:O(_),keys:b?N:O(h),entries:P},g)for(T in C)T in R||r(R,T,C[T]);else l(l.P+l.F*(m||w),t,C);return C}},function(e,t,n){var a=n(64),l=n(55),r=n(45),u=n(92),i=n(37),s=n(132),o=Object.getOwnPropertyDescriptor;t.f=n(36)?o:function(e,t){if(e=r(e),t=u(t,!0),s)try{return o(e,t)}catch(e){}if(i(e,t))return l(!a.f.call(e,t),e[t])}},function(e,t,n){var a=n(138),l=n(84).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return a(e,l)}},function(e,t,n){var a=n(37),l=n(65),r=n(89)("IE_PROTO"),u=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=l(e),a(e,r)?e[r]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?u:null}},function(e,t,n){var a=n(37),l=n(45),r=n(297)(!1),u=n(89)("IE_PROTO");e.exports=function(e,t){var n,i=l(e),s=0,o=[];for(n in i)n!=u&&a(i,n)&&o.push(n);for(;t.length>s;)a(i,n=t[s++])&&(~r(o,n)||o.push(n));return o}},function(e,t,n){e.exports=n(43)},function(e,t,n){var a=n(91),l=Math.min;e.exports=function(e){return e>0?l(a(e),9007199254740991):0}},function(e,t,n){"use strict";var a=n(314)(!0);n(134)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=a(t,n),this._i+=e.length,{value:e,done:!1})})},,,,,,,,,,function(e,t,n){var a=n(365),l=a.Symbol;e.exports=l},,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var l=n(100),r=a(l);t.default=r.default.shape({subscribe:r.default.func.isRequired,dispatch:r.default.func.isRequired,getState:r.default.func.isRequired})},function(e,t){"use strict";function n(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}t.__esModule=!0,t.default=n},function(e,t){"use strict";function n(e){return function(){for(var t=arguments.length,n=Array(t),l=0;l<t;l++)n[l]=arguments[l];return{type:a,payload:{method:e,args:n}}}}Object.defineProperty(t,"__esModule",{value:!0});var a=t.CALL_HISTORY_METHOD="@@router/CALL_HISTORY_METHOD",l=t.push=n("push"),r=t.replace=n("replace"),u=t.go=n("go"),i=t.goBack=n("goBack"),s=t.goForward=n("goForward");t.routerActions={push:l,replace:r,go:u,goBack:i,goForward:s}},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.routerMiddleware=t.routerActions=t.goForward=t.goBack=t.go=t.replace=t.push=t.CALL_HISTORY_METHOD=t.routerReducer=t.LOCATION_CHANGE=t.syncHistoryWithStore=void 0;var l=n(180);Object.defineProperty(t,"LOCATION_CHANGE",{enumerable:!0,get:function(){return l.LOCATION_CHANGE}}),Object.defineProperty(t,"routerReducer",{enumerable:!0,get:function(){return l.routerReducer}});var r=n(178);Object.defineProperty(t,"CALL_HISTORY_METHOD",{enumerable:!0,get:function(){return r.CALL_HISTORY_METHOD}}),Object.defineProperty(t,"push",{enumerable:!0,get:function(){return r.push}}),Object.defineProperty(t,"replace",{enumerable:!0,get:function(){return r.replace}}),Object.defineProperty(t,"go",{enumerable:!0,get:function(){return r.go}}),Object.defineProperty(t,"goBack",{enumerable:!0,get:function(){return r.goBack}}),Object.defineProperty(t,"goForward",{enumerable:!0,get:function(){return r.goForward}}),Object.defineProperty(t,"routerActions",{enumerable:!0,get:function(){return r.routerActions}});var u=n(438),i=a(u),s=n(437),o=a(s);t.syncHistoryWithStore=i.default,t.routerMiddleware=o.default},function(e,t){"use strict";function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.type,u=t.payload;return n===l?a({},e,{locationBeforeTransitions:u}):e}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e};t.routerReducer=n;var l=t.LOCATION_CHANGE="@@router/LOCATION_CHANGE",r={locationBeforeTransitions:null}},,,,,,,,,,,,,function(e,t){"use strict";function n(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}t.__esModule=!0,t.default=n},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n){function a(){E===_&&(E=_.slice())}function r(){return h}function i(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return a(),E.push(e),function(){if(t){t=!1,a();var n=E.indexOf(e);E.splice(n,1)}}}function d(e){if(!(0,u.default)(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"==typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(v)throw new Error("Reducers may not dispatch actions.");try{v=!0,h=p(h,e)}finally{v=!1}for(var t=_=E,n=0;n<t.length;n++){var a=t[n];a()}return e}function c(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");p=e,d({type:o.INIT})}function f(){var e,t=i;return e={subscribe:function(e){function n(){e.next&&e.next(r())}if("object"!=typeof e)throw new TypeError("Expected the observer to be an object.");n();var a=t(n);return{unsubscribe:a}}},e[s.default]=function(){return this},e}var m;if("function"==typeof t&&"undefined"==typeof n&&(n=t,t=void 0),"undefined"!=typeof n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(l)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var p=e,h=t,_=[],E=_,v=!1;return d({type:o.INIT}),m={dispatch:d,subscribe:i,getState:r,replaceReducer:c},m[s.default]=f,m}t.__esModule=!0,t.ActionTypes=void 0,t.default=l;var r=n(99),u=a(r),i=n(478),s=a(i),o=t.ActionTypes={INIT:"@@redux/INIT"}},function(e,t){"use strict";function n(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}t.__esModule=!0,t.default=n},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f),p=n(1),h=a(p),_=n(21),E=n(242),v=a(E),y=n(241),b=a(y),g=n(277),C=a(g),T=n(239),k=a(T),O=n(243),x=a(O),D=n(252),w=a(D),R=n(253),A=a(R),N=n(245),P=a(N),L=n(268),j=a(L),I=n(265),H=a(I),M=n(266),S=a(M),B=n(264),G=a(B),U=n(263),V=a(U),z=n(272),W=a(z),$=n(248),F=a($),X=n(246),Y=a(X),Z=n(250),q=a(Z),K=n(259),J=a(K),Q=n(258),ee=a(Q),te=n(273),ne=a(te),ae=n(256),le=a(ae),re=n(249),ue=a(re),ie=n(244),se=a(ie),oe=n(270),de=a(oe),ce=n(257),fe=a(ce),me=n(271),pe=a(me),he=n(261),_e=a(he),Ee=n(255),ve=a(Ee),ye=n(262),be=a(ye),ge=n(274),Ce=a(ge),Te=n(275),ke=a(Te),Oe=n(269),xe=a(Oe),De=n(247),we=a(De),Re=n(260),Ae=a(Re),Ne=n(276),Pe=a(Ne),Le=n(267),je=a(Le),Ie=n(251),He=a(Ie),Me=n(254),Se=a(Me),Be=n(235),Ge=a(Be),Ue=function(e){function t(){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"leavePath",value:function(){}},{key:"enterPath",value:function(){document.body.scrollTop=0}},{key:"render",value:function(){return h.default.createElement(_.Router,{history:this.props.history},h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:HOME,component:Ge.default},h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"/",component:v.default}),h.default.createElement(_.IndexRoute,{onEnter:this.enterPath,onLeave:this.leavePath,component:v.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"ui",component:w.default},h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"input",component:A.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"button",component:P.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"switch",component:j.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"slider",component:H.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"sliderbar",component:S.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"select",component:G.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"radio",component:V.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"checkbox",component:Y.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"datepicker",component:F.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"timepicker",component:W.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"grid",component:q.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"panel",component:J.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"pagelist",component:ee.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"tip",component:ne.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"modal",component:le.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"dropdown",component:ue.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"backtop",component:se.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"tabs",component:de.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"tag",component:pe.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"popover",component:_e.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"loading",component:ve.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"progress",component:be.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"tree",component:Ce.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"upload",component:ke.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"table",component:xe.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"collapse",component:we.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"popconfirm",component:Ae.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"validate",component:Pe.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"swiper",component:je.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"icons",component:He.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"limit",component:Se.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"404",component:fe.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"redux",component:x.default})),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"help",component:b.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"update",component:C.default}),h.default.createElement(_.Route,{onEnter:this.enterPath,onLeave:this.leavePath,path:"*",component:k.default})))}}]),t}(p.Component),Ve=Ue;t.default=Ve;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(Ue,"Routers","C:/DT/mtui2.0/dev/Routers.jsx"),__REACT_HOT_LOADER__.register(Ve,"default","C:/DT/mtui2.0/dev/Routers.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(13),r=a(l),u=n(12),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_),v=n(1),y=a(v),b=n(16),g=(a(b),function(e){function t(e){(0,c.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.state={show:!1},n.timer=null,n.scrollEventHand=null,n}return(0,E.default)(t,e),(0,m.default)(t,[{key:"getScrollTop",value:function(e){var t=null;return t=e?e.scrollTop:document.documentElement.scrollTop||document.body.scrollTop}},{key:"setScrollTop",value:function(e,t){"document"===e?(document.body.scrollTop&&(document.body.scrollTop=t),document.documentElement.scrollTop&&(document.documentElement.scrollTop=t)):e.scrollTop=t}},{key:"scrollTopFun",value:function(){var e=this,t=this.getScrollTop();t-=e.props.top;var n=e.props.time,a=10,l=a*n/t;this.timer=setInterval(function(){t-=a,t<=e.props.top?(t=e.props.top,e.setScrollTop("document",t),clearInterval(e.timer)):e.setScrollTop("document",t)},l)}},{key:"handleClick",value:function(){this.props.callBack&&this.props.callBack(),this.scrollTopFun()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("scroll",this.scrollEventHand)}},{key:"componentDidMount",value:function(){var e=this;this.props.visibilityHeight?(this.scrollEventHand=function(t){e.getScrollTop()>=e.props.visibilityHeight?e.setState({show:!0}):e.setState({show:!1})},document.addEventListener("scroll",this.scrollEventHand)):e.setState({show:!0})}},{key:"render",value:function(){var e=null;if(this.props.dom){var t=this.props.dom.type,n=this.props.dom.props,a=n.children,l=(0,i.default)(n,["children"]);e=y.default.createElement(t,(0,r.default)({onClick:this.handleClick.bind(this)},l),a)}else e=y.default.createElement("a",{style:{display:this.state.show?"block":"none"},onClick:this.handleClick.bind(this),className:(this.props.className||"")+" mt-backtop"},"Top");return e}}]),t}(v.Component));g.defaultProps={top:0,time:1e3};var C=g;t.default=C;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(g,"BackTop","C:/DT/mtui2.0/dev/mtui/backtop/BackTop.jsx"),__REACT_HOT_LOADER__.register(C,"default","C:/DT/mtui2.0/dev/mtui/backtop/BackTop.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(13),r=a(l),u=n(12),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_),v=n(1),y=a(v),b=function(e){function t(e){(0,c.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.state={checked:!1,value:null},n}return(0,E.default)(t,e),(0,m.default)(t,[{key:"onClick",value:function(e,t){if(this.props.onClick&&this.props.onClick(t),!this.props.disabled&&(this.props.onChange&&this.props.onChange(!this.props.checked,this.props,t),void 0!==this.props.defaultChecked)){var n=!this.state.checked;this.setState({checked:n,value:e})}}},{key:"getValue",value:function(){return{checked:!this.state.checked,value:this.state.value}}},{key:"componentWillMount",value:function(){void 0!==this.props.defaultChecked&&this.setState({checked:this.props.defaultChecked,value:this.props.value}),this.props.checked&&this.setState({checked:this.props.checked,value:this.props.value})}},{key:"componentWillUpdate",value:function(e,t){e.checked!==this.props.checked&&this.setState({checked:e.checked,value:e.value})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.disabled,a=(e.onClick,e.checked,e.value),l=(0,i.default)(e,["className","disabled","onClick","checked","value"]),u=["mt-checkbox"];return this.state.checked&&"other"!==this.state.checked?u.push("mt-checkbox-checked"):"other"===this.state.checked&&u.push("mt-checkbox-other"),t&&u.push(t),n&&u.push("mt-checkbox-disabled"),y.default.createElement("div",(0,r.default)({},l,{onClick:this.onClick.bind(this,a),className:u.join(" ")}),y.default.createElement("span",{className:"mt-checkbox-icon"}),y.default.createElement("span",{className:"mt-text"},this.props.children))}}]),t}(v.Component);b.defaultProps={checked:!1,value:null};var g=function(e){function t(e){(0,c.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.state={value:[]},n}return(0,E.default)(t,e),(0,m.default)(t,[{key:"changeGroup",value:function(e,t,n){var a=this.state.value;e&&a.indexOf(t.value)===-1?a.push(t.value):a.splice(a.indexOf(t.value),1),this.props.onChange&&this.props.onChange(a),this.props.defaultValue&&this.setState({value:a})}},{key:"componentWillMount",value:function(){this.props.defaultValue&&this.setState({value:this.props.defaultValue}),this.props.value&&this.setState({value:this.props.value})}},{key:"componentWillUpdate",value:function(e,t){e.value!==this.props.value&&this.setState({value:e.value})}},{key:"render",value:function(){var e=this,t=this.props,n=(t.className,t.type),a=((0,i.default)(t,["className","type"]),["mt-checkbox-group"]);"button"===n&&a.push("mt-checkbox-group-button");var l="";return MT_IE9&&(l=(new Date).getTime()),y.default.createElement("div",{className:a.join(" ")},this.props.children.map(function(t,n){var a=t.props,u=(a.children,a.checked),s=(0,i.default)(a,["children","checked"]),o=!1;return e.state.value.indexOf(t.props.value)!==-1&&(o=!0),y.default.createElement(b,(0,r.default)({onChange:e.changeGroup.bind(e),checked:o||u},s,{key:n+l}),t.props.children)}))}}]),t}(v.Component);g.defaultProps={type:"checkbox",value:null},b.CheckboxGroup=g;var C=b;t.default=C;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(b,"Checkbox","C:/DT/mtui2.0/dev/mtui/checkbox/Checkbox.jsx"),__REACT_HOT_LOADER__.register(g,"CheckboxGroup","C:/DT/mtui2.0/dev/mtui/checkbox/Checkbox.jsx"),__REACT_HOT_LOADER__.register(C,"default","C:/DT/mtui2.0/dev/mtui/checkbox/Checkbox.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(13),r=a(l),u=n(12),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_),v=n(1),y=a(v),b=n(128),g=(a(b),function(e){function t(e){return(0,c.default)(this,t),(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e))}return(0,E.default)(t,e),(0,m.default)(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.children,a=e.header,l=e.active,u=(e.Itemclick,e.show,(0,i.default)(e,["className","children","header","active","Itemclick","show"])),s=["mt-collapse-item"];return t&&s.push(t),l&&s.push("mt-collapse-active"),y.default.createElement("div",(0,r.default)({},u,{className:s.join(" ")}),y.default.createElement("div",{onClick:this.props.Itemclick.bind(this),className:"mt-collapse-header"},y.default.createElement("i",{className:"iconfont icon-arrowr"}),a),y.default.createElement("div",{className:"mt-collapse-content"},n))}}]),t}(v.Component)),C=function(e){function t(e){(0,c.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.state={active:[]},n}return(0,E.default)(t,e),(0,m.default)(t,[{key:"componentWillMount",value:function(){var e=[];this.props.children.map(function(t,n){e.push(t.props.show)}),this.setState({active:e})}},{key:"showOnlyItem",value:function(e){for(var t=this.props.children,n=0;n<t.length;n++){var a=void 0;a=e===n}}},{key:"Itemclick",value:function(e){for(var t=this.state.active,n=0;n<t.length;n++)n===e?t[n]=!t[n]:this.props.only&&(t[n]=!1);this.setState({active:t})}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,a=t.children,l=(t.only,(0,i.default)(t,["className","children","only"])),u=["mt-collapse"];n&&u.push(n);var s=(new Date).getTime();return y.default.createElement("div",(0,r.default)({},l,{className:u.join(" ")}),a.map(function(t,n){var a=t.props,l=(a.children,(0,i.default)(a,["children"]));return y.default.createElement(g,(0,r.default)({active:e.state.active[n],Itemclick:e.Itemclick.bind(e,n)},l,{key:s+n}),t.props.children)}))}}]),t}(v.Component);C.defaultProps={only:!1},C.CollapseItem=g;var T=C;t.default=T;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(g,"CollapseItem","C:/DT/mtui2.0/dev/mtui/collapse/Collapse.jsx"),__REACT_HOT_LOADER__.register(C,"Collapse","C:/DT/mtui2.0/dev/mtui/collapse/Collapse.jsx"),__REACT_HOT_LOADER__.register(T,"default","C:/DT/mtui2.0/dev/mtui/collapse/Collapse.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f),p=n(1),h=a(p),_=n(61),E=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.state={setWeek:["日","一","二","三","四","五","六"]},n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){var e=this;return h.default.createElement("div",{className:"mt-date-body-days",style:{display:"day"===this.props.show?"block":"none"}},h.default.createElement("div",{className:"mt-date-week"},h.default.createElement("ul",null,this.state.setWeek.map(function(e,t){return h.default.createElement("li",{key:t},e)}))),h.default.createElement("div",{className:"mt-date-day"},h.default.createElement("ul",{className:"clearfix"},this.props.days.map(function(t,n){var a=["mt-date-day-"+t.type];t.active&&a.push("mt-date-active"),t.mark&&a.push("mt-dates-"+t.mark),t.inner&&a.push("mt-dates-inner");var l=null,r=(0,_.judgeDate)(t,e.props.range);return t.day&&r?l=h.default.createElement("li",{onClick:e.props.clickDay.bind(e,t),key:n,className:a.join(" ")},h.default.createElement("a",null,t.day)):t.day&&!r&&(a.push("mt-disable-date"),l=h.default.createElement("li",{ key:n,className:a.join(" ")},h.default.createElement("a",null,t.day))),l}))))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"DatePickerBoxDay","C:/DT/mtui2.0/dev/mtui/dateCore/DatePickerBoxDay.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/mtui/dateCore/DatePickerBoxDay.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f),p=n(1),h=a(p),_=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){var e=this;return h.default.createElement("div",{className:"mt-date-body-months",style:{display:"month"===this.props.show?"block":"none"}},h.default.createElement("div",{className:"mt-date-month"},h.default.createElement("ul",{className:"clearfix"},this.props.months.map(function(t,n){return h.default.createElement("li",{onClick:e.props.clickMonth.bind(e,t),key:n,className:"mt-date-month-item"+(t.active?" mt-date-active":"")},h.default.createElement("a",null,t.month,"月"))}))))}}]),t}(p.Component),E=_;t.default=E;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(_,"DatePickerBoxMonth","C:/DT/mtui2.0/dev/mtui/dateCore/DatePickerBoxMonth.jsx"),__REACT_HOT_LOADER__.register(E,"default","C:/DT/mtui2.0/dev/mtui/dateCore/DatePickerBoxMonth.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f),p=n(1),h=a(p),_=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){var e=this;return h.default.createElement("div",{className:"mt-date-body-years",style:{display:"year"===this.props.show?"block":"none"}},h.default.createElement("div",{className:"mt-date-year"},h.default.createElement("ul",{className:"clearfix"},this.props.yearList.map(function(t,n){return h.default.createElement("li",{onClick:e.props.clickYear.bind(e,t),key:n,className:"mt-date-yearli"+(t.active?" mt-date-active":"")},h.default.createElement("a",null,t.year))}))))}}]),t}(p.Component),E=_;t.default=E;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(_,"DatePickerBoxYear","C:/DT/mtui2.0/dev/mtui/dateCore/DatePickerBoxYear.jsx"),__REACT_HOT_LOADER__.register(E,"default","C:/DT/mtui2.0/dev/mtui/dateCore/DatePickerBoxYear.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(13),r=a(l),u=n(12),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_),v=n(1),y=a(v),b=n(16),g=a(b),C=n(61),T=n(123),k=a(T),O=n(30),x=n(35),D=n(53),w=function(e){function t(e){(0,c.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.dateToOBj=function(){return n.__dateToOBj__REACT_HOT_LOADER__.apply(n,arguments)},n.state={show:!1,nowDate:null,clear:!1,inputDate:null},n.div=document.createElement("div"),n.div.setAttribute("class","mt-div"),n.handler=null,n.mid=null,n.refBtn=null,n}return(0,E.default)(t,e),(0,m.default)(t,[{key:"__dateToOBj__REACT_HOT_LOADER__",value:function(){return this.__dateToOBj__REACT_HOT_LOADER__.apply(this,arguments)}},{key:"resetDays",value:function(e,t){t?this.setState({nowDate:e,inputDate:e}):this.setState({nowDate:e})}},{key:"setPlace",value:function(){return(0,O.position)(this.refBtn)}},{key:"renderDiv",value:function(e){null===this.mid&&(this.mid="mt_date_"+ +new Date);var t=document.getElementById(this.mid);t&&!e||(e||document.body.appendChild(this.div),g.default.render(y.default.createElement(k.default,{nowDate:this.state.nowDate,range:this.props.range,format:this.props.format,mid:this.mid,setPlace:this.setPlace.bind(this),show:this.state.show,modalStyle:this.props.modalStyle,modalClass:this.props.modalClass,resetDays:this.resetDays.bind(this),showOrHide:this.showOrHide.bind(this)}),this.div))}},{key:"showOrHide",value:function(e,t,n,a){var l=this,r=document.getElementById(this.mid);r||this.renderDiv(),this.setState({show:!e},function(){if(l.state.show)l.props.showBack&&l.props.showBack();else if(l.props.onChange&&n&&(0,C.judgeDate)(n.obj,l.props.range)){l.setState({clear:n.clear});for(var e in n.obj)n.obj[e]?n.obj[e]=parseInt(n.obj[e],10):delete n.obj[e];n.str=n.str.replace(/-NaN/g,""),n.str=n.str.replace(/-null/g,""),n.str=n.str.replace(/-undefined/g,""),l.props.onChange(a,n)}n&&(0,C.judgeDate)(n.obj,l.props.range)&&l.setState({inputDate:n.obj}),t&&t(n)})}},{key:"handleClick",value:function(e){var t=document.getElementById(this.mid);if(!t||"block"!==t.style.display){var n=this;this.showOrHide(n.state.show),this.handler&&(0,D.offClickBlank)(n.handler),this.handler=(0,D.clickBlank)(document.getElementById(n.mid),function(e){e||(n.showOrHide(!0),(0,D.offClickBlank)(n.handler))})}}},{key:"__dateToOBj__REACT_HOT_LOADER__",value:function(e){var t=null;if(e){var n=e.split("-");t={year:parseInt(n[0],10)||null,month:parseInt(n[1],10)||null,day:parseInt(n[2],10)||null}}else t=(0,C.getDateNow)(),this.setState({clear:!0,show:!!this.props.visible});return t}},{key:"componentWillMount",value:function(){var e=this.props.defaultValue||this.props.value;this.resetDays(this.dateToOBj(e),!0)}},{key:"componentDidMount",value:function(){this.props.visible&&this.handleClick()}},{key:"componentDidUpdate",value:function(e){document.getElementById(this.mid)&&this.renderDiv(!0)}},{key:"componentWillUnmount",value:function(){(0,D.offClickBlank)(this.handler),(0,x.removeDom)(this.div),g.default.unmountComponentAtNode(this.div)}},{key:"componentWillReceiveProps",value:function(e){e.value!==this.props.value&&this.setState({clear:!e.value,nowDate:this.dateToOBj(e.value),inputDate:this.dateToOBj(e.value)})}},{key:"render",value:function(){var e=this,t=this.props,n=t.mid,a=(t.format,t.showBack,t.range,t.modalClass,t.modalStyle,t.defaultValue,t.value,t.className),l=t.size,u=(t.datePickers,t.visible,t.suffix),s=t.validateInfo,o=(t.onChange,(0,i.default)(t,["mid","format","showBack","range","modalClass","modalStyle","defaultValue","value","className","size","datePickers","visible","suffix","validateInfo","onChange"])),d=["mt-input mt-input-date mt-input-suffix-out"],c=(0,C.formatDate)(this.state.inputDate,this.props.format).val;return a&&d.push(a),d.push("mt-input-"+(l?l:"nm")),n&&(this.mid=n),y.default.createElement("span",{ref:function(t){e.refBtn=t},className:d.join(" "),onClick:this.handleClick.bind(this)},y.default.createElement("input",(0,r.default)({value:this.state.clear?"":c,readOnly:!0,type:"text",placeholder:this.props.placeholder},o)),s?y.default.createElement("span",{className:"mt-input-suffix"},u):y.default.createElement("span",{className:"mt-input-suffix"},y.default.createElement("i",{className:"iconfont icon-date"})),s)}}]),t}(v.Component);w.defaultProps={placeholder:"日期",showBack:null,onChange:function(){},modalClass:"",modalStyle:{},validateInfo:null,format:"yyyy-mm-dd"};var R=w;t.default=R;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(w,"DatePicker","C:/DT/mtui2.0/dev/mtui/datePicker/DatePicker.jsx"),__REACT_HOT_LOADER__.register(R,"default","C:/DT/mtui2.0/dev/mtui/datePicker/DatePicker.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(13),r=a(l),u=n(12),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_),v=n(1),y=a(v),b=n(16),g=a(b),C=n(123),T=a(C),k=n(61),O=n(30),x=n(22),D=a(x),w=n(35),R=n(79),A=n(53),N=function(e){function t(e){(0,c.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.state={show:!1,startDate:null,endDate:null,clear:!1,selectDays:null,syncInner:(new Date).getTime()},n.div=document.createElement("div"),n.div.setAttribute("class","mt-div"),n.handler=null,n.mid=null,n.refBtn=null,n}return(0,E.default)(t,e),(0,m.default)(t,[{key:"syncInner",value:function(){this.setState({syncInner:(new Date).getTime()})}},{key:"setPlace",value:function(){return(0,O.position)(this.refBtn)}},{key:"setMid",value:function(){null===this.mid&&(this.mid="mt_dates_"+ +new Date)}},{key:"renderDiv",value:function(e){this.setMid();var t=document.getElementById(this.mid);if(!t||e){e||document.body.appendChild(this.div);var n=this.setPlace(),a=n.height,l=n.left,r=n.top,u=n.width,s=(0,R.outWindow)(u,a,r,l,{width:460,height:280}),o=(0,D.default)([{left:s.left,top:s.top},this.props.modalStyle||{},{display:this.state.show?"block":"none"}]),d=this.props,c=d.mid,f=d.format,m=((0,i.default)(d,["mid","format"]),["mt-dates"]);this.props.className&&m.push(this.props.className),this.props.modalClass&&m.push(this.props.modalClass),c&&(this.mid=c),g.default.render(y.default.createElement("div",{className:m.join(" "),style:o,id:this.mid},y.default.createElement(T.default,{inner:this.state.syncInner,syncInner:this.syncInner.bind(this),resetDays:this.resetDays.bind(this),range:this.props.range[0],showOrHide:this.showOrHide.bind(this),nowDate:this.state.startDate,dates:{startDate:this.state.startDate,endDate:this.state.endDate},format:f,mid:this.mid+"_start"}),y.default.createElement(T.default,{inner:this.state.syncInner+1,syncInner:this.syncInner.bind(this),range:this.props.range[1],resetDays:this.resetDays.bind(this),showOrHide:this.showOrHide.bind(this),nowDate:this.state.endDate,dates:{startDate:this.state.startDate,endDate:this.state.endDate},format:f,mid:this.mid+"_end"})),this.div)}}},{key:"dateChecked",value:function(e){var t=void 0,n=void 0;if(e.startDate?(t=e.startDate,n=this.state.endDate):(t=this.state.startDate,n=e.endDate),parseInt((0,k.formatDate)(t,"yyyymmdd").val,10)>parseInt((0,k.formatDate)(n,"yyyymmdd").val,10)){var a=e.startDate?t:n;return{startDate:a,endDate:a}}return{startDate:t,endDate:n}}},{key:"resetDays",value:function(e,t,n){n&&(n=n.split("_"),n=n[n.length-1]);var a={};a[n+"Date"]=e,a=this.dateChecked(a),this.setState(a,function(){t&&t()})}},{key:"showOrHide",value:function(e,t,n,a){var l=document.getElementById(this.mid);l||this.renderDiv(),this.setState({show:!e},function(){var e=this;e.state.show?e.props.showBack&&e.props.showBack():e.props.onChange&&n&&(e.setState({clear:n.clear}),e.props.onChange(a,n),e.setState({selectDays:n})),t&&t()})}},{key:"handleClick",value:function(e){var t=document.getElementById(this.mid);if(!t||"block"!==t.style.display){var n=this;n.showOrHide(n.state.show),n.handler&&(0,A.offClickBlank)(n.handler),n.handler=(0,A.clickBlank)(document.getElementById(n.mid),function(e){e||(n.showOrHide(!0),(0,A.offClickBlank)(n.handler))})}}},{key:"componentDidUpdate",value:function(e){document.getElementById(this.mid)&&this.renderDiv(!0)}},{key:"componentWillMount",value:function(){var e={};if(this.props.defaultValue){var t=this.props.defaultValue.split("/");e.startDate=(0,k.strToObj)(t[0]),e.endDate=(0,k.strToObj)(t[1])}else{var n=(0,k.getDateNow)();e.startDate=n,e.endDate=n}this.setState({startDate:e.startDate,endDate:e.endDate}),this.props.defaultValue&&this.setState({selectDays:{str:(0,k.formatDate)(e.startDate,this.props.format).val+" ~ "+(0,k.formatDate)(e.endDate,this.props.format).val}})}},{key:"componentWillUnmount",value:function(){(0,A.offClickBlank)(this.handler),(0,w.removeDom)(this.div),g.default.unmountComponentAtNode(this.div)}},{key:"render",value:function(){var e=this,t=this.props,n=t.mid,a=(t.format,t.showBack,t.range,t.modalClass,t.defaultValue,t.modalStyle,t.className),l=t.size,u=(t.onChange,(0,i.default)(t,["mid","format","showBack","range","modalClass","defaultValue","modalStyle","className","size","onChange"])),s=this.state.selectDays?this.state.selectDays.str:"",o=["mt-input mt-input-dates"];return a&&o.push(a),o.push("mt-input-"+(l?l:"nm")),n&&(this.mid=n),y.default.createElement("span",{ref:function(t){e.refBtn=t},className:o.join(" "),onClick:this.handleClick.bind(this)},y.default.createElement("input",(0,r.default)({value:this.state.clear?"":s,readOnly:!0,type:"text",placeholder:this.props.placeholder},u)),y.default.createElement("span",{className:"mt-input-suffix"},y.default.createElement("i",{className:"iconfont icon-date"})))}}]),t}(v.Component);N.defaultProps={placeholder:"选择时间段",showBack:null,onChange:null,modalClass:"",modalStyle:{},range:[",",","],format:"yyyy-mm-dd"};var P=N;t.default=P;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(N,"DatePickers","C:/DT/mtui2.0/dev/mtui/datePickers/DatePickers.jsx"),__REACT_HOT_LOADER__.register(P,"default","C:/DT/mtui2.0/dev/mtui/datePickers/DatePickers.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f),p=n(1),h=a(p),_=n(16),E=(a(_),n(22)),v=a(E),y=n(79),b=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){var e=this.props.getPlace?this.props.getPlace():null;if(e)var t=e.height,n=e.left,a=e.top,l=e.width,r=(0,y.outWindow)(l,t,a,n,{width:this.props.style.width||this.props.width,height:this.props.style.height||0}),u=(0,v.default)([{display:this.props.show?"block":"none"},{left:r.left,top:r.top},this.props.style||{}]);var i=["mt-dropdown"];return this.props.className&&i.push(this.props.className),h.default.createElement("div",{className:i.join(" "),style:u,id:this.props.mid},this.props.children)}}]),t}(p.Component),g=b;t.default=g;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(b,"DropModal","C:/DT/mtui2.0/dev/mtui/dropdown/DropModal.jsx"),__REACT_HOT_LOADER__.register(g,"default","C:/DT/mtui2.0/dev/mtui/dropdown/DropModal.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(13),r=a(l),u=n(12),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_),v=n(1),y=a(v),b=n(129),g=a(b),C=function(e){function t(e){return(0,c.default)(this,t),(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e))}return(0,E.default)(t,e),(0,m.default)(t,[{key:"render",value:function(){var e=this.props,t=e.width,n=e.sm,a=e.md,l=e.lg,u=e.smOffset,s=e.mdOffset,o=e.lgOffset,d=e.offset,c=e.className,f=e.style,m=e.children,p=(0,i.default)(e,["width","sm","md","lg","smOffset","mdOffset","lgOffset","offset","className","style","children"]),h=(0,g.default)({width:t,offset:d,sm:n,md:a,lg:l,smOffset:u,mdOffset:s,lgOffset:o},c);return y.default.createElement("div",(0,r.default)({className:h,style:f},p),m)}}]),t}(v.Component),T=C;t.default=T;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(C,"Grid","C:/DT/mtui2.0/dev/mtui/grid/Grid.jsx"),__REACT_HOT_LOADER__.register(T,"default","C:/DT/mtui2.0/dev/mtui/grid/Grid.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(13),r=a(l),u=n(12),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_);n(333);var v=n(1),y=a(v),b=function(e){function t(e){return(0,c.default)(this,t),(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e))}return(0,E.default)(t,e),(0,m.default)(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.children,a=e.size,l=(0,i.default)(e,["className","children","size"]);if(null===n)return null;var u=["mt-limit"];t&&u.push(t);var s="";return s=n.length>a?n.slice(0,a)+"...":n,y.default.createElement("div",(0,r.default)({title:n},l,{className:u.join(" ")}),s)}}]),t}(v.Component);b.defaultProps={size:10};var g=b;t.default=g;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(b,"Limit","C:/DT/mtui2.0/dev/mtui/limit/Limit.jsx"),__REACT_HOT_LOADER__.register(g,"default","C:/DT/mtui2.0/dev/mtui/limit/Limit.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(1),r=a(l),u=n(16),i=a(u),s=n(126),o=a(s),d=n(127),c={},f="mt-div-loading";c.show=function(e,t,n){if(!document.getElementById(f)){(0,d.hideScroll)();var a=document.createElement("div");a.setAttribute("class","mt-div"),a.setAttribute("id",f),document.body.appendChild(a),i.default.render(r.default.createElement(o.default,{bg:n||!0,type:t||"loading3",info:e||""}),a)}},c.hide=function(){var e=document.getElementById(f);(0,d.showScroll)(),e&&(MT_IE9?e.removeNode(!0):e.remove())};var m=c;t.default=m;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(c,"LoadingModal","C:/DT/mtui2.0/dev/mtui/loadingModal/LoadingModal.jsx"),__REACT_HOT_LOADER__.register(f,"id","C:/DT/mtui2.0/dev/mtui/loadingModal/LoadingModal.jsx"),__REACT_HOT_LOADER__.register(m,"default","C:/DT/mtui2.0/dev/mtui/loadingModal/LoadingModal.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(12),r=a(l),u=n(13),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_),v=n(1),y=a(v),b=n(16),g=a(b),C=n(210),T=a(C),k=n(35),O=n(127),x=function(e){function t(e){(0,c.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.state={show:e.visible},n.div=document.createElement("div"),n.div.setAttribute("class","mt-div"),n.mid=null,n}return(0,E.default)(t,e),(0,m.default)(t,[{key:"componentWillUnmount",value:function(){(0,k.removeDom)(this.div),g.default.unmountComponentAtNode(this.div)}},{key:"setMid",value:function(){null===this.mid&&(this.mid="mt_modal_"+ +new Date)}},{key:"renderDiv",value:function(e){this.setMid();var t=document.getElementById(this.mid);t&&!e||(t||document.body.appendChild(this.div),g.default.render(y.default.createElement(T.default,(0,i.default)({mid:this.mid,show:this.state.show,showOrHide:this.showOrHide.bind(this)},this.props)),this.div))}},{key:"showOrHide",value:function(e,t){var n=this;!e&&n.props.showBefore&&n.props.showBefore(),this.renderDiv(),this.setState({show:!e},function(){e?(0,O.showScroll)():(0,O.hideScroll)(),!e&&n.props.showBack?n.props.showBack():e&&n.props.closeBack&&n.props.closeBack(),t&&t()})}},{key:"componentDidUpdate",value:function(e){document.getElementById(this.mid)&&this.renderDiv(!0)}},{key:"handleClick",value:function(){this.showOrHide(this.state.show),this.props.onClick&&this.props.onClick()}},{key:"showModal",value:function(e){this.showOrHide(!e)}},{key:"render",value:function(){var e=null;if(this.props.btn){var t=this.props.btn.type,n=this.props.btn.props,a=n.children,l=(0,r.default)(n,["children"]);e=y.default.createElement(t,(0,i.default)({onClick:this.handleClick.bind(this)},l),a)}return e}}]),t}(v.Component);x.defaultProps={className:"",style:{width:400,height:260},showBack:null,closeBack:null};var D=x;t.default=D;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(x,"Modal","C:/DT/mtui2.0/dev/mtui/modal/Modal.jsx"),__REACT_HOT_LOADER__.register(D,"default","C:/DT/mtui2.0/dev/mtui/modal/Modal.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f),p=n(1),h=a(p),_=n(16),E=(a(_),n(22)),v=a(E),y=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.state={show:!1,className:""},n.timer=null,n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"closeModal",value:function(){this.props.showOrHide(!0)}},{key:"componentWillMount",value:function(){this.setState({show:this.props.show,className:"animated zoomIn "+this.props.className})}},{key:"componentWillUpdate",value:function(e,t){var n=this;e.show!==this.props.show&&(e.show?this.setState({className:"animated zoomIn "+e.className,show:e.show}):(this.setState({className:"animated zoomOut "+e.className}),this.timer=setTimeout(function(){n.setState({show:e.show})},600)))}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer)}},{key:"render",value:function(){var e=this.props.style,t=e.height,n=e.width,a=(0,v.default)([{marginLeft:-(n||600)/2,marginTop:-(t||400)/2},this.props.style||{}]),l=["mt-modal"];return this.props.className&&l.push(this.props.className),h.default.createElement("div",{className:l.join(" "),id:this.props.mid,style:{display:this.state.show?"block":"none",zIndex:this.props.zIndex||1e3}},h.default.createElement("div",{className:"mt-modal-box "+this.state.className,style:a},h.default.createElement("a",{className:"mt-modal-close",onClick:this.closeModal.bind(this)},h.default.createElement("i",{className:"iconfont icon-close"})),this.props.children))}}]),t}(p.Component),b=y;t.default=b;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(y,"ModalBox","C:/DT/mtui2.0/dev/mtui/modal/ModalBox.jsx"),__REACT_HOT_LOADER__.register(b,"default","C:/DT/mtui2.0/dev/mtui/modal/ModalBox.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(13),r=a(l),u=n(12),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_),v=n(1),y=a(v),b=n(129),g=a(b),C=function(e){function t(e){(0,c.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.refresh=function(){return n.__refresh__REACT_HOT_LOADER__.apply(n,arguments)},n.total=e.total,n.current=e.current,n.state={list:[]},n}return(0,E.default)(t,e),(0,m.default)(t,[{key:"__refresh__REACT_HOT_LOADER__",value:function(){return this.__refresh__REACT_HOT_LOADER__.apply(this,arguments)}},{key:"componentWillUpdate",value:function(e,t){e.total!==this.props.total&&(e.total?(this.total=e.total,this.setHtml(!0)):this.setState({list:[]}))}},{key:"getMaxPage",value:function(){var e=this.total,t=this.props.pageSize,n=Math.ceil(e/t);return n}},{key:"toPage",value:function(e){return""!==e&&e<=this.getMaxPage()&&e>0?(this.current=e,this.setHtml(),!0):(console.error("请输入正确的页码!"),!1)}},{key:"nextPage",value:function(){this.current=parseInt(this.current,10),this.current+1>this.getMaxPage()||this.toPage(this.current+1)}},{key:"prevPage",value:function(){this.current-1<1||this.toPage(this.current-1)}},{key:"prevSize",value:function(){var e=this.props.size;this.current-=e,this.current<1&&(this.current=1),this.setHtml()}},{key:"nextSize",value:function(){var e=this.props.size,t=this.getMaxPage();this.current=parseInt(this.current,10)+parseInt(e,10),this.current>t&&(this.current=t),this.setHtml()}},{key:"setHtml",value:function(e){var t=this.props,n=t.size,a=t.callback,l=parseInt(this.current,10);if(n<3)return void console.error("最小size:3!");var r=[],u=this,i=parseInt(this.getMaxPage(),10);if(i<=n||i<=n+3)for(var s=1;s<=i;s++)r.push(s===l?s+":active":s);else if(l<=n){for(var o=1;o<=n+1;o++)r.push(o===l?o+":active":o);r.push("next"),r.push(i)}else if(l>n&&l<=i-n){r.push(1),r.push("prev");for(var d=l-1;d<parseInt(n,10)+parseInt(l,10)-1;d++)r.push(d===l?d+":active":d);r.push("next"),r.push(i)}else{r.push(1),r.push("prev");for(var c=i-n;c<i;c++)r.push(c===l?c+":active":c);r.push(i===l?i+":active":i)}this.setState({list:r}),e||a({current:parseInt(u.current,10),total:u.total,pageSize:u.props.pageSize})}},{key:"__refresh__REACT_HOT_LOADER__",value:function(e){this.current=e||1,this.setHtml(!0)}},{key:"render",value:function(){var e=this.props,t=(e.className,e.grid),n=(e.size,e.pageSize,e.total),a=(e.current,e.callback,(0,i.default)(e,["className","grid","size","pageSize","total","current","callback"])),l="",u=this;return l=t?(0,g.default)(t,"mt-pagelist"):"mt-pagelist",0===n?null:y.default.createElement("div",(0,r.default)({},a,{className:l}),y.default.createElement("a",{className:"mt-btn mt-pagelist-prev",onClick:this.prevPage.bind(this)},"上一页"),y.default.createElement("div",{className:"mt-pagelist-list"},y.default.createElement("ul",null,this.state.list.map(function(e,t){if(e=e.toString(),t=+new Date+t,e.indexOf("active")!==-1){var n=e.replace(":active","");return y.default.createElement("li",{className:"active",key:t},y.default.createElement("a",{className:"mt-btn",onClick:u.toPage.bind(u,n)},n))}return e.indexOf("prev")!==-1?y.default.createElement("li",{key:t},y.default.createElement("a",{className:"mt-btn mt-pagelist-prevsize",onClick:u.prevSize.bind(u)})):e.indexOf("next")!==-1?y.default.createElement("li",{key:t},y.default.createElement("a",{className:"mt-btn mt-pagelist-nextsize",onClick:u.nextSize.bind(u)})):y.default.createElement("li",{key:t},y.default.createElement("a",{className:"mt-btn",onClick:u.toPage.bind(u,e)},e))}))),y.default.createElement("a",{className:"mt-btn mt-pagelist-next",onClick:this.nextPage.bind(this)},"下一页"))}}]),t}(y.default.Component);C.defaultProps={size:3,pageSize:10,total:0,current:1,callback:null};var T=C;t.default=T;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(C,"PageList","C:/DT/mtui2.0/dev/mtui/pagelist/PageList.jsx"),__REACT_HOT_LOADER__.register(T,"default","C:/DT/mtui2.0/dev/mtui/pagelist/PageList.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(13),r=a(l),u=n(12),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_),v=n(1),y=a(v),b=function(e){function t(e){return(0,c.default)(this,t),(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e))}return(0,E.default)(t,e),(0,m.default)(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.children,a=e.size,l=(e.header,(0,i.default)(e,["className","children","size","header"])),u=[];return a?u.push("mt-panel-"+a):u.push("mt-panel"),t&&u.push(t),y.default.createElement("div",(0,r.default)({},l,{className:u.join(" ")}),y.default.createElement("h3",{className:"mt-panel-h2"},this.props.header),y.default.createElement("div",{className:"mt-panel-box"},n))}}]),t}(v.Component);b.defaultProps={size:""};var g=b;t.default=g;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(b,"Panel","C:/DT/mtui2.0/dev/mtui/panel/Panel.jsx"),__REACT_HOT_LOADER__.register(g,"default","C:/DT/mtui2.0/dev/mtui/panel/Panel.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(13),r=a(l),u=n(12),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_),v=n(1),y=a(v),b=function(e){function t(e){return(0,c.default)(this,t),(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e))}return(0,E.default)(t,e),(0,m.default)(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.children,a=e.size,l=(e.header,(0,i.default)(e,["className","children","size","header"])),u=[];return a?u.push("mt-panle-"+a):u.push("mt-panle"),t&&u.push(t),y.default.createElement("div",(0,r.default)({},l,{className:u.join(" ")}),y.default.createElement("h3",{className:"mt-panle-h2"},this.props.header),y.default.createElement("div",{className:"mt-panle-box"},n))}}]),t}(v.Component);b.defaultProps={size:""};var g=b;t.default=g;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(b,"Popconfirm","C:/DT/mtui2.0/dev/mtui/popconfirm/Popconfirm.jsx"),__REACT_HOT_LOADER__.register(g,"default","C:/DT/mtui2.0/dev/mtui/popconfirm/Popconfirm.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(13),r=a(l),u=n(12),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_),v=n(1),y=a(v),b=n(16),g=a(b),C=n(215),T=a(C),k=n(30),O=n(53),x=n(22),D=a(x),w=n(35),R=function(e){function t(e){(0,c.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.state={show:!1},n.div=document.createElement("div"),n.div.setAttribute("class","mt-div"),n.handler=null,n.btn=null,n.mid=null,n}return(0,E.default)(t,e),(0,m.default)(t,[{key:"getPlace",value:function(){return(0,k.position)(this.btn)}},{key:"showOrHide",value:function(e,t){var n=this;this.setState({show:t},function(){this.renderDiv(!0),t?(this.props.showBack&&this.props.showBack(),"click"===this.props.trigger?(this.handler&&(0,O.offClickBlank)(this.handler),this.handler=(0,O.clickBlank)(document.getElementById(this.mid),function(e){e||n.setState({show:!1},function(){n.renderDiv(!0),(0,O.offClickBlank)(n.handler)})})):(this.handler&&(0,O.offClickBlank)(this.handler,"mousemove"),this.handler=(0,O.clickBlank)(document.getElementById(this.mid),function(e){e||n.setState({show:!1},function(){n.renderDiv(!0),(0,O.offClickBlank)(n.handler,"mousemove")})},"mousemove",n.btn,!0))):this.props.closeBack&&this.props.closeBack()})}},{key:"onMouseHandler",value:function(e){e.stopPropagation(),e.preventDefault(),this.state.show||this.showOrHide(e,!0),this.props.children.props.onMouseMove&&this.props.children.props.onMouseMove(e)}},{key:"onClickHandler",value:function(e){this.showOrHide(e,!this.state.show),this.props.children.props.onClick&&this.props.children.props.onClick(e),this.props.onClick&&this.props.onClick(e)}},{key:"componentWillUnmount",value:function(){"hover"===this.props.trigger?this.handler&&(0,O.offClickBlank)(this.handler,"mousemove"):(0,O.offClickBlank)(this.handler),(0,w.removeDom)(this.div),g.default.unmountComponentAtNode(this.div)}},{key:"componentDidMount",value:function(){this.btn=g.default.findDOMNode(this),this.props.show&&this.onClickHandler()}},{key:"componentDidUpdate",value:function(e,t){e.show!==this.props.show&&this.onClickHandler()}},{key:"setMid",value:function(){null===this.mid&&(this.mid="mt_popover_"+(new Date).getTime())}},{key:"renderDiv",value:function(e){this.setMid();var t=document.getElementById(this.mid);t&&!e||(document.body.appendChild(this.div),g.default.render(y.default.createElement(T.default,{className:this.props.className,style:this.props.style,mid:this.mid,getPlace:this.getPlace.bind(this),show:this.state.show,place:this.props.place,content:this.props.content}),this.div))}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.trigger,a=(e.showBack,e.closeBack,e.onMouseOver,(0,i.default)(e,["children","trigger","showBack","closeBack","onMouseOver"]),(0,i.default)(t.props,[])),l=y.default.Children.only(t),u={};"hover"===n?u.onMouseMove=this.onMouseHandler.bind(this):u.onClick=this.onClickHandler.bind(this),u=(0,D.default)([(0,r.default)({},a),u]);var s=y.default.cloneElement(l,u);return s}}]),t}(v.Component);R.defaultProps={trigger:"hover",show:!1,showBack:null,closeBack:null};var A=R;t.default=A;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(R,"Popover","C:/DT/mtui2.0/dev/mtui/popover/Popover.jsx"),__REACT_HOT_LOADER__.register(A,"default","C:/DT/mtui2.0/dev/mtui/popover/Popover.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f),p=n(1),h=a(p),_=n(16),E=(a(_),n(30)),v=n(22),y=a(v),b=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.state={show:!1,style:{}},n.refPopover=null,n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"closeModal",value:function(){this.props.showOrHide(!0)}},{key:"setStyle",value:function(){ var e={},t=this.props.getPlace(),n=(0,E.position)(this.refPopover),a=8;"top"===this.props.place?(e.left=t.left+(t.width-n.width)/2,e.top=t.top-n.height-a):"left"===this.props.place?(e.left=t.left-n.width-a,e.top=t.top+(t.height-n.height)/2):"right"===this.props.place?(e.left=t.left+t.width+a,e.top=t.top+(t.height-n.height)/2):"bottom"===this.props.place&&(e.left=t.left+(t.width-n.width)/2,e.top=t.top+t.height+a),this.setState({style:e,show:this.props.show})}},{key:"showOrHide",value:function(e){var t=this;this.setState({show:e},function(){t.setStyle()})}},{key:"componentDidMount",value:function(){this.showOrHide(this.props.show)}},{key:"componentWillUpdate",value:function(e,t){e.show!==this.props.show&&this.showOrHide(e.show)}},{key:"render",value:function(){var e=this,t=(0,y.default)([this.state.style,{display:this.state.show?"block":"none"},this.props.style||{}]),n=["mt-popover","animated bounceIn"];return this.props.place&&n.push("mt-popover-"+this.props.place),this.props.className&&n.push(this.props.className),h.default.createElement("div",{id:this.props.mid,ref:function(t){e.refPopover=t},className:n.join(" "),style:t},this.props.content,h.default.createElement("div",{className:"mt-popover-arrow"}))}}]),t}(p.Component),g=b;t.default=g;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(b,"PopoverBox","C:/DT/mtui2.0/dev/mtui/popover/PopoverBox.jsx"),__REACT_HOT_LOADER__.register(g,"default","C:/DT/mtui2.0/dev/mtui/popover/PopoverBox.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(13),r=a(l),u=n(12),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_),v=n(1),y=a(v),b=n(22),g=a(b),C=function(e){function t(e){return(0,c.default)(this,t),(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e))}return(0,E.default)(t,e),(0,m.default)(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=(e.children,e.size),a=e.type,l=e.style,u=e.fixed,s=e.bgColor,o=e.barColor,d=e.strokeWidth,c=e.value,f=(0,i.default)(e,["className","children","size","type","style","fixed","bgColor","barColor","strokeWidth","value"]),m=["mt-progress"],p={};t&&m.push(t),a&&m.push("mt-progress-circle"),n&&(p.width=n),p=(0,g.default)([l||{},p]);var h=(100*c).toFixed(u);return y.default.createElement("div",(0,r.default)({},f,{style:p,className:m.join(" ")}),y.default.createElement("div",{className:"mt-progress-text"},"0"===h?0:h+"%"),y.default.createElement("svg",{viewBox:"0 0 100 100"},y.default.createElement("path",{className:"ant-progress-circle-trail",d:"M 50,50 m 0,-47 a 47,47 0 1 1 0,94 a 47,47 0 1 1 0,-94",stroke:s,strokeWidth:d,fillOpacity:"0"}),y.default.createElement("path",{className:"ant-progress-circle-path",d:"M 50,50 m 0,-47 a 47,47 0 1 1 0,94 a 47,47 0 1 1 0,-94",strokeLinecap:"round",stroke:o,strokeWidth:d,fillOpacity:"0",style:{strokeDasharray:"295.31px, 295.31px",strokeDashoffset:295.31*(1-this.props.value),transition:"stroke-dashoffset 0.3s ease 0s, stroke 0.3s ease"}})))}}]),t}(v.Component);C.defaultProps={size:100,type:"circle",value:0,strokeWidth:6,fixed:1,bgColor:"#f3f3f3",barColor:"#108ee9"};var T=C;t.default=T;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(C,"Progress","C:/DT/mtui2.0/dev/mtui/progress/Progress.jsx"),__REACT_HOT_LOADER__.register(T,"default","C:/DT/mtui2.0/dev/mtui/progress/Progress.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(13),r=a(l),u=n(12),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_),v=n(1),y=a(v),b=function(e){function t(e){(0,c.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.state={checked:!1,value:null},n}return(0,E.default)(t,e),(0,m.default)(t,[{key:"onClick",value:function(e,t){if(this.props.onClick&&this.props.onClick(t),!this.props.disabled&&(this.props.onChange&&this.props.onChange(!this.props.checked,this.props,t),void 0!==this.props.defaultChecked)){var n=!this.state.checked;this.setState({checked:n,value:e})}}},{key:"getValue",value:function(){return{checked:!this.state.checked,value:this.state.value}}},{key:"componentWillUpdate",value:function(e,t){e.checked!==this.props.checked&&this.setState({checked:e.checked,value:e.value})}},{key:"componentWillMount",value:function(){void 0!==this.props.defaultChecked&&this.setState({checked:this.props.defaultChecked,value:this.props.value}),this.props.checked&&this.setState({checked:this.props.checked,value:this.props.value})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.disabled,a=(e.onClick,e.value),l=(0,i.default)(e,["className","disabled","onClick","value"]),u=["mt-radio"];return this.state.checked&&u.push("mt-radio-checked"),t&&u.push(t),n&&u.push("mt-radio-disabled"),y.default.createElement("div",(0,r.default)({},l,{onClick:this.onClick.bind(this,a),className:u.join(" ")}),y.default.createElement("span",{className:"mt-radio-icon"}),y.default.createElement("span",{className:"mt-text"},this.props.children))}}]),t}(v.Component);b.defaultProps={checked:!1,value:null};var g=function(e){function t(e){(0,c.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.state={value:""},n}return(0,E.default)(t,e),(0,m.default)(t,[{key:"onRadioChange",value:function(e,t,n){this.props.onChange&&this.props.onChange({value:t.value,children:t.children}),this.props.defaultValue&&this.setState({value:t.value})}},{key:"componentWillMount",value:function(){this.props.defaultValue&&this.setState({value:this.props.defaultValue})}},{key:"render",value:function(){var e=this.props,t=(e.className,e.type),n=(0,i.default)(e,["className","type"]),a=["mt-radio-group"],l=this,u=null;u=this.props.value?this.props.value:this.state.value,"button"==t&&a.push("mt-radio-group-button");var s="";return MT_IE9&&(s=(new Date).getTime()),y.default.createElement("div",(0,r.default)({},n,{className:a.join(" ")}),this.props.children.map(function(e,t){var n=e.props,a=(n.children,n.value),o=(0,i.default)(n,["children","value"]),d=u==a;return y.default.createElement(b,(0,r.default)({},o,{onChange:l.onRadioChange.bind(l),value:a,checked:d,key:t+s}),e.props.children)}))}}]),t}(v.Component);g.defaultProps={type:"radio"},b.RadioGroup=g;var C=b;t.default=C;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(b,"Radio","C:/DT/mtui2.0/dev/mtui/radio/Radio.jsx"),__REACT_HOT_LOADER__.register(g,"RadioGroup","C:/DT/mtui2.0/dev/mtui/radio/Radio.jsx"),__REACT_HOT_LOADER__.register(C,"default","C:/DT/mtui2.0/dev/mtui/radio/Radio.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(12),r=a(l),u=n(13),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_),v=n(1),y=a(v),b=n(16),g=a(b),C=n(219),T=a(C),k=(n(232),n(30)),O=n(130),x=n(53),D=n(22),w=a(D),R=n(35),A=function(e){function t(e){(0,c.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.state={show:!1,text:"",value:"",modalWidth:120},n.div=document.createElement("div"),n.div.setAttribute("class","mt-div"),n.handler=null,n.mid=null,n.refBtn=null,n}return(0,E.default)(t,e),(0,m.default)(t,[{key:"setMid",value:function(){null===this.mid&&(this.mid="mt_select_"+ +new Date)}},{key:"getPlace",value:function(){return(0,k.position)(this.refBtn)}},{key:"renderDiv",value:function(e){var t=document.getElementById(this.mid);t&&!e||(document.body.appendChild(this.div),this.renderDOM())}},{key:"renderDOM",value:function(){this.setMid(),g.default.render(y.default.createElement(T.default,(0,i.default)({mid:this.mid},this.state,{showOrHide:this.showOrHide.bind(this),modalWidth:this.state.modalWidth,show:this.state.show,getPlace:this.getPlace.bind(this)},this.props)),this.div)}},{key:"setValue",value:function(e,t){this.setState({text:e.children,value:e.value},function(){t&&t(e)})}},{key:"showOrHide",value:function(e,t,n,a){this.hoverHandler=null;var l=this;this.setState({show:!e,modalWidth:this.refBtn.offsetWidth},function(){this.renderDiv(!0),e?((0,x.offClickBlank)(l.handler),t&&(l.props.value?l.props.onChange&&l.props.onChange(a,t):this.setValue(t,function(e){l.props.onChange&&l.props.onChange(a,e)}))):l.props.showBack&&l.props.showBack(),n&&n()})}},{key:"handleClick",value:function(){if(!this.props.disabled){var e=this,t=this.state.show;"click"===this.props.trigger&&this.showOrHide(t,null,function(){e.handler&&(0,x.offClickBlank)(e.handler),e.handler=(0,x.clickBlank)(document.getElementById(e.mid),function(t){t||e.showOrHide(!0,null)})})}}},{key:"componentDidUpdate",value:function(e){(this.props.value||void 0!==this.props.defaultValue)&&document.getElementById(this.mid)&&this.renderDiv(!0)}},{key:"componentWillReceiveProps",value:function(e){if(this.props.value&&this.props.value!==e.value){var t=this;e.children.map(function(n,a){n.props.value===e.value&&t.setValue(n.props)})}}},{key:"componentDidMount",value:function(){var e=this;this.props.visible&&e.renderDiv();var t=(0,O.toArray)(this.props.children);if(void 0===this.props.defaultValue&&void 0===this.props.value||t.map(function(t,n){t.props.value!==e.props.defaultValue&&t.props.value!==e.props.value||e.setState({text:t.props.children,value:t.props.value})}),!this.props.disabled&&"hover"===this.props.trigger){var n=this;this.hoverHandler=function(e){n.showOrHide(!1,null,function(){n.handler&&(0,x.offClickBlank)(n.handler,"mousemove"),n.handler=(0,x.clickBlank)(document.getElementById(n.mid),function(e){e||((0,x.offClickBlank)(n.handler,"mousemove"),n.showOrHide(!0,null))},"mousemove",n.refBtn)})},this.refBtn.addEventListener("mouseover",this.hoverHandler)}}},{key:"componentWillUnmount",value:function(){"hover"===this.props.trigger?(0,x.offClickBlank)(this.handler,"mousemove"):(0,x.offClickBlank)(this.handler),this.refBtn.removeEventListener("mouseenter",this.hoverHandler),(0,R.removeDom)(this.div),g.default.unmountComponentAtNode(this.div)}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,a=t.prefix,l=t.suffix,u=t.disabled,i=t.width,s=t.height,o=t.block,d=t.style,c=t.validateInfo,f=((0,r.default)(t,["className","prefix","suffix","disabled","width","height","block","style","validateInfo"]),["mt-select-input"]);n&&f.push(n),u&&f.push("mt-input-disabled");var m={};return i&&(m.width=i),s&&(m.height=s),o&&(m.display=o?"block":"inline-block"),m&&(m=(0,w.default)([d||{},m])),y.default.createElement("div",{style:m,ref:function(t){e.refBtn=t},className:f.join(" "),onClick:this.handleClick.bind(this)},a?y.default.createElement("span",{className:"mt-input-prefix"},a):null,y.default.createElement("span",null,this.state.text||y.default.createElement("i",{className:"mt-placeholder"},this.props.placeholder)),y.default.createElement("i",{className:"iconfont icon-arrowd"}),y.default.createElement("input",{type:"text",value:this.state.value}),l?y.default.createElement("span",{className:"mt-input-suffix"},l):null,c)}}]),t}(v.Component);A.defaultProps={visible:!1,showBack:null,onChange:null,trigger:"hover",placeholder:"下拉选择框",defaultValue:void 0,value:void 0,prefix:null,suffix:null,validateInfo:null};var N=function(e){function t(){return(0,c.default)(this,t),(0,h.default)(this,(t.__proto__||(0,o.default)(t)).apply(this,arguments))}return(0,E.default)(t,e),(0,m.default)(t,[{key:"render",value:function(){return y.default.createElement("span",null,this.props.children)}}]),t}(v.Component);A.Option=N;var P=A;t.default=P;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(A,"Select","C:/DT/mtui2.0/dev/mtui/select/Select.jsx"),__REACT_HOT_LOADER__.register(N,"Option","C:/DT/mtui2.0/dev/mtui/select/Select.jsx"),__REACT_HOT_LOADER__.register(P,"default","C:/DT/mtui2.0/dev/mtui/select/Select.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f),p=n(1),h=a(p),_=n(16),E=(a(_),n(130)),v=n(22),y=a(v),b=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.state={cName:""},n.num=0,n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"clickOption",value:function(e,t){t.target.value=e.props;var n={target:t.target};n.target.value=e.props.value,n.target.childrens=e.props.children,this.props.showOrHide(!0,e.props,null,n)}},{key:"componentDidUpdate",value:function(e,t){if(e.show!==this.props.show){var n=" mt-select-animate",a=this;setTimeout(function(){a.setState({cName:a.props.show?n:""})},10)}}},{key:"render",value:function(){var e=this.props.getPlace(),t=this.props.modalStyle||{};if(e)var n=e.height,a=e.left,l=e.top,r=(e.width,(0,y.default)([{display:this.props.show?"block":"none"},{left:a,top:l+n},{width:this.props.modalWidth},{height:"auto"},t]));var u=this,i=["mt-select",this.state.cName];MT_IE9||i.push("mt-select-ie10");var s=(0,E.toArray)(this.props.children);return h.default.createElement("div",{className:i.join(" "),style:r,id:this.props.mid},s.map(function(e,t){return h.default.createElement("div",{onClick:u.clickOption.bind(u,e),key:t+ +new Date,className:"mt-select-option"},e.props.children)}))}}]),t}(p.Component),g=b;t.default=g;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(b,"SelectModal","C:/DT/mtui2.0/dev/mtui/select/SelectModal.jsx"),__REACT_HOT_LOADER__.register(g,"default","C:/DT/mtui2.0/dev/mtui/select/SelectModal.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(12),r=a(l),u=n(2),i=a(u),s=n(3),o=a(s),d=n(4),c=a(d),f=n(6),m=a(f),p=n(5),h=a(p),_=n(1),E=a(_),v=function(e){function t(e){return(0,o.default)(this,t),(0,m.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e))}return(0,h.default)(t,e),(0,c.default)(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=(e.type,(0,r.default)(e,["className","type"]),["mt-sliderbar-active"]);return t&&n.push(t),this.props.type?n.push("mt-sliderbar-active-"+this.props.type):n.push("mt-sliderbar-active"),E.default.createElement("div",{style:{width:this.props.width},className:n.join(" ")},E.default.createElement("div",{className:"mt-sliderbar-active-bar",style:{width:this.props.width*this.props.value}}))}}]),t}(_.Component);v.defaultProps={value:0,width:100};var y=v;t.default=y;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(v,"SliderBar","C:/DT/mtui2.0/dev/mtui/sliderBar/SliderBar.jsx"),__REACT_HOT_LOADER__.register(y,"default","C:/DT/mtui2.0/dev/mtui/sliderBar/SliderBar.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(13),r=a(l),u=n(12),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_),v=n(1),y=a(v),b=function(e){function t(e){(0,c.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.state={barWidth:0},n.startX=0,n.oldWid=0,n}return(0,E.default)(t,e),(0,m.default)(t,[{key:"onMouseDown",value:function(e){this.startX=e.pageX,this.oldWid=this.state.barWidth;var t=this,n=function e(n){document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",e),t.props.sliderEnd&&t.props.sliderEnd(t.getValue()+t.props.minValue)},a=function(e){var n=t.oldWid+e.pageX-t.startX;n>t.props.width?n=t.props.width:n<0&&(n=0),n<=t.props.width&&n>=0&&t.setState({barWidth:n},function(){t.props.onChange&&t.props.onChange(t.getValue()+t.props.minValue)})};document.addEventListener("mousemove",a),document.addEventListener("mouseup",n)}},{key:"getValue",value:function(){var e=this.state.barWidth/this.props.width*(this.props.maxValue-this.props.minValue);return e}},{key:"componentWillMount",value:function(){var e=this.props.defaultValue/(this.props.maxValue+this.props.minValue)*this.props.width;this.props.sliderStart&&this.props.sliderStart(this.props.defaultValue),this.setState({barWidth:e})}},{key:"render",value:function(){var e=this.props,t=e.size,n=e.className,a=(e.maxValue,e.minValue,e.width),l=(e.onChange,e.sliderEnd,(0,i.default)(e,["size","className","maxValue","minValue","width","onChange","sliderEnd"])),u=["mt-slider","clearfix"];return n&&u.push(n),t&&u.push("mt-slider-"+t),y.default.createElement("div",(0,r.default)({},l,{style:{width:a},className:u.join(" ")}),y.default.createElement("div",{className:"mt-slider-bar",style:{width:this.state.barWidth}},y.default.createElement("a",{onMouseDown:this.onMouseDown.bind(this),className:"mt-slider-btn"})))}}]),t}(v.Component);b.defaultProps={size:"nm",maxValue:100,minValue:0,width:100};var g=b;t.default=g;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(b,"Slider","C:/DT/mtui2.0/dev/mtui/slider/Slider.jsx"),__REACT_HOT_LOADER__.register(g,"default","C:/DT/mtui2.0/dev/mtui/slider/Slider.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(13),r=a(l),u=n(12),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_),v=n(1),y=a(v),b=function(e){function t(e){(0,c.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.state={activeIndex:e.activeIndex||0,transX:0,overflow:!1,disable:{prev:!1,next:!1}},n.timer=null,n}return(0,E.default)(t,e),(0,m.default)(t,[{key:"componentDidUpdate",value:function(e,t){e.activeIndex!==this.props.activeIndex&&this.setActiveIndex(e.activeIndex),e.children.length!==this.props.children.length&&this.setOverflow()}},{key:"setActiveIndex",value:function(e,t){var n=this.refs["swiper_"+e],a=this;this.setState({activeIndex:e},function(){a.setTranslate3d(n,e)}),this.props.changeback?this.props.changeback(e):null}},{key:"setTranslate3d",value:function(e,t){var n=e.offsetLeft+e.offsetWidth,a=this.refs.head.offsetWidth,l=Math.abs(this.state.transX);l=l>e.offsetLeft-10?e.offsetWidth-n+(0===t?0:e.previousSibling.offsetWidth):n-l>a-(e.nextSibling?e.nextSibling.offsetWidth:0)?a-n-(this.props.children.length===t+1?0:e.nextSibling.offsetWidth):-l,this.setTransX(l)}},{key:"setTransX",value:function(e){var t=null;t=0==e?{prev:!0,next:!1}:-e==this.refs.box.offsetWidth-this.refs.head.offsetWidth?{prev:!1,next:!0}:{prev:!1,next:!1},this.setState({transX:e,disable:t})}},{key:"changeswiper",value:function(e){this.setActiveIndex(e),this.props.clickback?this.props.clickback(e):null}},{key:"setOverflow",value:function(){this.refs.head.offsetWidth<this.refs.box.offsetWidth&&(this.setState({overflow:!0}),this.setTransX(this.state.transX))}},{key:"prevAndNextClick",value:function(e){var t=Math.abs(this.state.transX);"prev"===e?(t-=this.refs.head.offsetWidth,t<0&&(t=0)):(t+=this.refs.head.offsetWidth,this.refs.box.offsetWidth-t<this.refs.head.offsetWidth&&(t=this.refs.box.offsetWidth-this.refs.head.offsetWidth)),this.setTransX(-t)}},{key:"prevNextButtonClick",value:function(e){var t=this.state.activeIndex,n=this.props.children.length;"prev"===e?(t--,t<0&&(t=n-1)):(t++,t>n-1&&(t=0)),this.setActiveIndex(t)}},{key:"componentWillUnmount",value:function(){clearInterval(this.timer),this.timer=null}},{key:"componentDidMount",value:function(){if(0!==this.props.children.length&&(this.setActiveIndex(this.state.activeIndex),this.setOverflow()),this.props.autoPlay){var e=this;this.timer=setInterval(function(){var t=e.state.activeIndex;t>e.props.children.length-2?t=0:t++,e.setActiveIndex(t)},this.props.autoPlay)}}},{key:"render",value:function(){var e=this,t=this.props,n=(t.activeIndex,t.changeback,t.animate,t.button,t.autoPlay,(0,i.default)(t,["activeIndex","changeback","animate","button","autoPlay"])),a=y.default.createElement("div",{ref:"head",style:{width:this.props.style.width-40},className:"mt-swiper-header"+(this.state.overflow?" mt-swiper-overflow":"")},y.default.createElement("div",{className:"mt-swiper-headbox",style:{transform:"translate3d("+this.state.transX+"px,0,0)"}},y.default.createElement("ul",{ref:"box",className:"clearfix"},0!=this.props.children.length?this.props.children.map(function(t,n){return y.default.createElement("li",{ref:"swiper_"+n,onClick:e.changeswiper.bind(e,n),key:n,className:"mt-swiper-tab"+(e.state.activeIndex==n?" mt-swiper-tab-active":"")},t.props.name)}):null))),l=y.default.createElement("div",{className:"mt-swiper-content"},y.default.createElement("div",{className:"mt-swiper-items clearfix mt-swiper-animate-"+this.props.animate},0!=this.props.children.length?this.props.children.map(function(t,n){return y.default.createElement("div",{key:n,className:"mt-swiper-item"+(e.state.activeIndex==n?" mt-swiper-item-active":"")},t.props.children)}):null)),u=this.state.overflow?y.default.createElement("a",{onClick:this.prevAndNextClick.bind(e,"prev"),className:"mt-swiper-prev"+(this.state.disable.prev?" mt-swiper-disabled":"")},y.default.createElement("i",{className:"iconfont icon-arrowl"})):null,s=this.state.overflow?y.default.createElement("a",{onClick:this.prevAndNextClick.bind(e,"next"),className:"mt-swiper-next"+(this.state.disable.next?" mt-swiper-disabled":"")},y.default.createElement("i",{className:"iconfont icon-arrowr"})):null,o=this.props.button?y.default.createElement("a",{onClick:this.prevNextButtonClick.bind(e,"prev"),className:"mt-swiper-prevbutton"},y.default.createElement("i",{className:"iconfont icon-arrowl"})):null,d=this.props.button?y.default.createElement("a",{onClick:this.prevNextButtonClick.bind(e,"next"),className:"mt-swiper-nextbutton"},y.default.createElement("i",{className:"iconfont icon-arrowr"})):null;return y.default.createElement("div",(0,r.default)({className:"mt-swiper"},n),o,d,u,s,a,l)}}]),t}(v.Component);b.defaultProps={animate:"move",name:"",button:!0,autoPlay:!1};var g=function(e){function t(e){return(0,c.default)(this,t),(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e))}return(0,E.default)(t,e),(0,m.default)(t,[{key:"render",value:function(){return null}}]),t}(v.Component);b.SwiperItem=g;var C=b;t.default=C;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(b,"Swiper","C:/DT/mtui2.0/dev/mtui/swipers/Swiper.jsx"),__REACT_HOT_LOADER__.register(g,"SwiperItem","C:/DT/mtui2.0/dev/mtui/swipers/Swiper.jsx"),__REACT_HOT_LOADER__.register(C,"default","C:/DT/mtui2.0/dev/mtui/swipers/Swiper.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(13),r=a(l),u=n(12),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_),v=n(1),y=a(v),b=function(e){function t(e){(0,c.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.state={checked:!1},n}return(0,E.default)(t,e),(0,m.default)(t,[{key:"clickEvent",value:function(e){this.props.disabled||(this.props.onChange&&this.props.onChange(!this.state.checked),this.props.onClick&&this.props.onClick(),this.setState({checked:!this.state.checked}))}},{key:"componentWillUpdate",value:function(e,t){e.defaultValue!=this.props.defaultValue&&this.setState({checked:e.defaultValue},function(){this.props.onChange&&this.props.onChange(e.defaultValue)})}},{key:"componentWillMount",value:function(){this.setState({checked:this.props.defaultValue})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.size,a=e.disabled,l=(e.defaultValue,(0,i.default)(e,["className","size","disabled","defaultValue"])),u=["mt-switch"];return n&&u.push("mt-switch-"+n),t&&u.push(t),this.state.checked?u.push("mt-switch-on"):u.push("mt-switch-off"),a&&u.push("mt-switch-disabled"),y.default.createElement("span",(0,r.default)({onClick:this.clickEvent.bind(this)},l,{className:u.join(" ")}))}}]),t}(v.Component);b.defaultProps={size:"nm",disabled:!1,defaultValue:!1};var g=b;t.default=g;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(b,"Switch","C:/DT/mtui2.0/dev/mtui/switch/Switch.jsx"),__REACT_HOT_LOADER__.register(g,"default","C:/DT/mtui2.0/dev/mtui/switch/Switch.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(13),r=a(l),u=n(12),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_),v=n(1),y=a(v),b=function(e){function t(e){(0,c.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.state={activeIndex:e.activeIndex||0,barStyle:{width:0,left:0},transX:0,overflow:!1,disable:{prev:!1,next:!1}},n}return(0,E.default)(t,e),(0,m.default)(t,[{key:"setActiveIndex",value:function(e,t){var n=this.refs["tab_"+e],a=this,l=null;l="right"===this.props.type?{width:2,height:n.clientHeight,top:n.offsetTop}:"left"===this.props.type?{width:2,height:n.clientHeight,top:n.offsetTop,left:n.clientWidth-2}:{height:2,width:n.clientWidth,left:n.offsetLeft},this.setState({activeIndex:e,barStyle:l},function(){a.setTranslate3d(n,e)}),this.props.changeBack?this.props.changeBack(e):null}},{key:"setTranslate3d",value:function(e,t){if("left"!==this.props.type&&"right"!==this.props.type){var n=e.offsetLeft+e.offsetWidth,a=this.refs.head.offsetWidth,l=Math.abs(this.state.transX);l=l>e.offsetLeft-10?e.offsetWidth-n+(0==t?0:e.previousSibling.offsetWidth):n-l>a-(e.nextSibling?e.nextSibling.offsetWidth:0)?a-n-(this.props.children.length==t+1?0:e.nextSibling.offsetWidth):-l,this.setTransX(l)}}},{key:"setTransX",value:function(e){var t=null;t=0==e?{prev:!0,next:!1}:-e==this.refs.box.offsetWidth-this.refs.head.offsetWidth?{prev:!1,next:!0}:{prev:!1,next:!1},this.setState({transX:e,disable:t})}},{key:"changeTabs",value:function(e){this.setActiveIndex(e),this.props.clickBack?this.props.clickBack(e):null}},{key:"setOverflow",value:function(){this.refs.head.offsetWidth<this.refs.box.offsetWidth&&(this.setState({overflow:!0}),this.setTransX(this.state.transX))}},{key:"prevAndNextClick",value:function(e){var t=Math.abs(this.state.transX);"prev"==e?(t-=this.refs.head.offsetWidth,t<0&&(t=0)):(t+=this.refs.head.offsetWidth,this.refs.box.offsetWidth-t<this.refs.head.offsetWidth&&(t=this.refs.box.offsetWidth-this.refs.head.offsetWidth)),this.setTransX(-t)}},{key:"componentDidMount",value:function(){0!=this.props.children.length&&(this.setActiveIndex(this.state.activeIndex),this.setOverflow())}},{key:"componentWillReceiveProps",value:function(e){var t=this;e.children.length!==this.props.children.length&&this.setOverflow(),e.activeIndex!==this.props.activeIndex&&this.setState({activeIndex:e.activeIndex},function(){t.setActiveIndex(e.activeIndex)})}},{key:"render",value:function(){var e=this,t=this.props,n=(t.activeIndex,t.changeBack,t.className),a=(t.animate,(0,i.default)(t,["activeIndex","changeBack","className","animate"])),l=null;l=MT_IE9?{left:this.state.transX}:{transform:"translate3d("+this.state.transX+"px,0,0)"};var u=y.default.createElement("div",{ref:"head",className:"mt-tabs-header"+(this.state.overflow?" mt-tabs-overflow":"")},y.default.createElement("div",{className:"mt-tabs-headbox",style:l},y.default.createElement("ul",{ref:"box",className:"clearfix"},0!=this.props.children.length?this.props.children.map(function(t,n){return t?y.default.createElement("li",{ref:"tab_"+n,onClick:e.changeTabs.bind(e,n),key:t.key?t.key:n,className:"mt-tabs-tab"+(e.state.activeIndex==n?" mt-tabs-tab-active":"")},t.props.name):null}):null),y.default.createElement("div",{className:"mt-tabs-active-bar",style:this.state.barStyle}))),s=y.default.createElement("div",{className:"mt-tabs-content"},y.default.createElement("div",{className:"mt-tabs-items clearfix"+(this.props.animate?" mt-tabs-animate":"")},0!==this.props.children.length?this.props.children.map(function(t,n){return t?y.default.createElement("div",{key:t.key?t.key:n,className:"mt-tabs-item"+(e.state.activeIndex==n?" mt-tabs-item-active":"")},t.props.children):null}):null)),o=this.state.overflow?y.default.createElement("a",{onClick:this.prevAndNextClick.bind(e,"prev"),className:"mt-tabs-prev"+(this.state.disable.prev?" mt-tabs-disabled":"")},y.default.createElement("i",{className:"iconfont icon-arrowl"})):null,d=this.state.overflow?y.default.createElement("a",{onClick:this.prevAndNextClick.bind(e,"next"),className:"mt-tabs-next"+(this.state.disable.next?" mt-tabs-disabled":"")},y.default.createElement("i",{className:"iconfont icon-arrowr"})):null,c=["mt-tabs"];return n&&c.push(n),"top"===this.props.type?y.default.createElement("div",(0,r.default)({className:c.join(" ")},a),o,d,u,s):"bottom"===this.props.type?y.default.createElement("div",(0,r.default)({className:c.join(" ")},a),o,d,s,u):(c.push("clearfix"),c.push("mt-tabs-"+this.props.type),y.default.createElement("div",(0,r.default)({className:c.join(" ")},a),u,s))}}]),t}(v.Component);b.defaultProps={type:"top",animate:!0};var g=function(e){function t(e){return(0,c.default)(this,t),(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e))}return(0,E.default)(t,e),(0,m.default)(t,[{key:"render",value:function(){return null}}]),t}(v.Component);b.TabItem=g;var C=b;t.default=C;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(b,"Tabs","C:/DT/mtui2.0/dev/mtui/tab/Tabs.jsx"),__REACT_HOT_LOADER__.register(g,"TabItem","C:/DT/mtui2.0/dev/mtui/tab/Tabs.jsx"),__REACT_HOT_LOADER__.register(C,"default","C:/DT/mtui2.0/dev/mtui/tab/Tabs.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function l(e){return[(0,D.default)(e.getHours(),2,"0"),(0,D.default)(e.getMinutes(),2,"0"),(0,D.default)(e.getSeconds(),2,"0")].join(":")}function r(e){return e.split("")}Object.defineProperty(t,"__esModule",{value:!0});var u=n(2),i=a(u),s=n(3),o=a(s),d=n(4),c=a(d),f=n(6),m=a(f),p=n(5),h=a(p),_=n(1),E=a(_),v=n(124),y=a(v),b=n(125),g=a(b),C=n(122),T=a(C),k=n(100),O=a(k);n(335);var x=n(230),D=a(x),w=n(231),R=a(w),A=25,N=function(e){function t(e){(0,o.default)(this,t);var n=(0,m.default)(this,(t.__proto__||(0,i.default)(t)).call(this,e));return n.state={time:[],hourList:(0,R.default)(24).map(function(e){return(0,D.default)(e,2,"0")}),minList:(0,R.default)(60).map(function(e){return(0,D.default)(e,2,"0")}),secList:(0,R.default)(60).map(function(e){return(0,D.default)(e,2,"0")})},n.onScroll=n.onScroll.bind(n),n}return(0,h.default)(t,e),(0,c.default)(t,[{key:"componentWillMount",value:function(){this.setState({time:this.props.value?this.props.value.split(":"):l(new Date).split(":")})}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousewheel",this.onScroll)}},{key:"componentDidUpdate",value:function(e){}},{key:"showBack",value:function(e){this.setState({time:this.props.value?this.props.value.split(":"):l(new Date).split(":")}),document.addEventListener("mousewheel",this.onScroll)}},{key:"onScroll",value:function(e){function t(e,t){var n=e.indexOf(t),l=n+a;return l=Math.max(0,l),l=Math.min(e.length-1,l),e[l]}var n=e.target.parentNode;if(0!==e.wheelDeltaY){var a=e.wheelDeltaY>0?-1:1,l=this.state,r=l.time,u=l.hourList,i=l.minList,s=l.secList;n===this.hourWrap?this.inputHour(t(u,r[0])):n===this.minWrap?this.inputMin(t(i,r[1])):n===this.secWrap&&this.inputSec(t(s,r[2]))}}},{key:"closeBack",value:function(e){document.onmousewheel=null}},{key:"inputHour",value:function(e){var t=[].concat(this.state.time);t[0]=e,this.setState({time:t})}},{key:"inputMin",value:function(e){var t=[].concat(this.state.time);t[1]=e,this.setState({time:t})}},{key:"inputSec",value:function(e){var t=[].concat(this.state.time);t[2]=e,this.setState({time:t})}},{key:"btnCancel",value:function(){this.setState({time:this.props.value?this.props.value.split(":"):l(new Date).split(":")}),this.modal.handleClick()}},{key:"btnOkay",value:function(){ this.props.onChange(this.state.time.join(":")),this.modal.handleClick()}},{key:"render",value:function(){var e=this,t=this.props,n=t.itemsToshow,a=t.inputClassName,l=t.modalClassName,r=t.width,u=(t.value,["mt-input mt-input-timepicker mt-input-suffix-out"]);a&&u.push(a);var i=(n-1)/2*A,s=A*n,o=this.state,d=o.time,c=o.hourList,f=o.minList,m=o.secList,p=E.default.createElement("span",null,E.default.createElement(g.default,{readOnly:!0,value:this.props.value?this.props.value:"",className:u.join(" "),placeholder:this.props.hasOwnProperty("placeholder")?this.props.placeholder:"时间",style:{width:r},suffix:E.default.createElement("i",{className:"iconfont icon-time"})}));return E.default.createElement(y.default,{ref:function(t){return e.modal=t},btn:p,modalClass:l,showBack:this.showBack.bind(this),closeBack:this.closeBack.bind(this),style:{width:r},trigger:"click"},E.default.createElement("div",{className:"mt-timepicker-panel",onMouseEnter:function(){document.body.style.overflow="hidden"},onMouseLeave:function(){document.body.style.overflow="auto"}},E.default.createElement("div",{className:"mt-timepickers"},E.default.createElement("div",{className:"mt-itempicker"},E.default.createElement("div",{className:"mt-timepicker-title"},"时"),E.default.createElement("div",{className:"mt-itemList",style:{height:s}},E.default.createElement("div",{className:"mt-timepicker-pointer",style:{top:i}}),E.default.createElement("div",{ref:function(t){return e.hourWrap=t},className:"mt-listWrap",style:{top:i-c.indexOf(d[0])*A}},c.map(function(t){var n=d[0]===t?["timeItem","active"].join(" "):"timeItem";return E.default.createElement("div",{key:t,onClick:function(){return e.inputHour(t)},className:n},t)})))),E.default.createElement("div",{className:"mt-itempicker"},E.default.createElement("div",{className:"mt-timepicker-title"},"分钟"),E.default.createElement("div",{className:"mt-itemList",style:{height:s}},E.default.createElement("div",{className:"mt-timepicker-pointer",style:{top:i}}),E.default.createElement("div",{ref:function(t){return e.minWrap=t},className:"mt-listWrap",style:{top:i-f.indexOf(d[1])*A}},f.map(function(t){var n=d[1]===t?["timeItem","active"].join(" "):"timeItem";return E.default.createElement("div",{key:t,onClick:function(){return e.inputMin(t)},className:n},t)})))),E.default.createElement("div",{className:"mt-itempicker"},E.default.createElement("div",{className:"mt-timepicker-title"},"秒"),E.default.createElement("div",{className:"mt-itemList",style:{height:s}},E.default.createElement("div",{className:"mt-timepicker-pointer",style:{top:i}}),E.default.createElement("div",{ref:function(t){return e.secWrap=t},className:"mt-listWrap",style:{top:i-m.indexOf(d[2])*A}},m.map(function(t){var n=d[2]===t?["timeItem","active"].join(" "):"timeItem";return E.default.createElement("div",{key:t,onClick:function(){return e.inputSec(t)},className:n},t)}))))),E.default.createElement("div",{className:"mt-timepicker-operation"},E.default.createElement(T.default,{onClick:this.btnCancel.bind(this)},"取消"),"  ",E.default.createElement(T.default,{type:"primary",onClick:this.btnOkay.bind(this)},"确定"))))}}]),t}(_.Component);N.defaultProps={value:"",onChange:function(){},width:220,itemsToshow:7,inputClassName:"",modalClassName:""},N.propTypes={value:O.default.string.isRequired};var P=N;t.default=P;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(A,"itemHeight","C:/DT/mtui2.0/dev/mtui/timePicker/TimePicker.jsx"),__REACT_HOT_LOADER__.register(l,"format","C:/DT/mtui2.0/dev/mtui/timePicker/TimePicker.jsx"),__REACT_HOT_LOADER__.register(r,"parse","C:/DT/mtui2.0/dev/mtui/timePicker/TimePicker.jsx"),__REACT_HOT_LOADER__.register(N,"TimePicker","C:/DT/mtui2.0/dev/mtui/timePicker/TimePicker.jsx"),__REACT_HOT_LOADER__.register(P,"default","C:/DT/mtui2.0/dev/mtui/timePicker/TimePicker.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function l(e){var t="mt_tip_"+(new Date).getTime(),n="mt-tip mt-tip-"+e.type+" animated fadeInDown";setTimeout(function(){var n=document.getElementById(t);(0,o.removeClass)(n,"fadeInDown"),(0,o.addClass)(n,"fadeOutUp"),n.style.height=0,n.style.marginTop=0,setTimeout(function(){MT_IE9?n.removeNode(!0):n.remove(),e.callback&&e.callback(n)},800)},e.time||2e3);var a=document.createElement("div");document.getElementById("mt-div-tips")?(a.setAttribute("class",n),a.setAttribute("id",t),a.innerHTML='<div class="mt-tips-inline"><i class="iconfont icon-'+e.type+'"></i>&nbsp;&nbsp;'+e.msg+"</div>",document.getElementById("mt-div-tips").appendChild(a)):(a.setAttribute("class","mt-div"),a.setAttribute("id","mt-div-tips"),document.body.appendChild(a),s.default.render(u.default.createElement("div",{className:n,id:t},u.default.createElement("div",{className:"mt-tips-inline"},u.default.createElement("i",{className:"iconfont icon-"+e.type}),"  ",e.msg)),a))}Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),u=a(r),i=n(16),s=a(i),o=n(228),d={};d.success=function(e,t,n){l({msg:e,type:"success",time:t,callback:n})},d.error=function(e,t,n){l({msg:e,type:"danger",time:t,callback:n})},d.warning=function(e,t,n){l({msg:e,type:"warning",time:t,callback:n})};var c=d;t.default=c;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(l,"tipsMsg","C:/DT/mtui2.0/dev/mtui/tips/Tip.jsx"),__REACT_HOT_LOADER__.register(d,"Tip","C:/DT/mtui2.0/dev/mtui/tips/Tip.jsx"),__REACT_HOT_LOADER__.register(c,"default","C:/DT/mtui2.0/dev/mtui/tips/Tip.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(13),r=a(l),u=n(12),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_);n(336);var v=n(1),y=a(v),b=function(e){function t(e){(0,c.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.clickHeader=function(){return n.__clickHeader__REACT_HOT_LOADER__.apply(n,arguments)},n.state={show:e.show},n.refBody=null,n}return(0,E.default)(t,e),(0,m.default)(t,[{key:"__clickHeader__REACT_HOT_LOADER__",value:function(){return this.__clickHeader__REACT_HOT_LOADER__.apply(this,arguments)}},{key:"__clickHeader__REACT_HOT_LOADER__",value:function(e){this.setState({show:!this.state.show})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.children,a=e.header,l=(e.show,(0,i.default)(e,["className","children","header","show"])),u=["mt-tree"];return t&&u.push(t),y.default.createElement("div",(0,r.default)({},l,{className:u.join(" ")}),a?y.default.createElement("div",{className:"mt-tree-header",onClick:this.clickHeader},this.state.show?y.default.createElement("i",{className:"iconfont icon-xia"}):y.default.createElement("i",{className:"iconfont icon-you"}),a):null,y.default.createElement("div",{className:"mt-tree-body",style:{display:this.state.show?"block":"none"}},n))}}]),t}(v.Component);b.defaultProps={show:!0};var g=function(e){function t(e){return(0,c.default)(this,t),(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e))}return(0,E.default)(t,e),(0,m.default)(t,[{key:"render",value:function(){return y.default.createElement("div",{className:"mt-tree-child"},this.props.children)}}]),t}(v.Component);b.TreeChild=g;var C=b;t.default=C;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(b,"Tree","C:/DT/mtui2.0/dev/mtui/tree/Tree.jsx"),__REACT_HOT_LOADER__.register(g,"TreeChild","C:/DT/mtui2.0/dev/mtui/tree/Tree.jsx"),__REACT_HOT_LOADER__.register(C,"default","C:/DT/mtui2.0/dev/mtui/tree/Tree.jsx"))})()},function(e,t){"use strict";function n(e,t){return e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}function a(e,t){n(e,t)||(e.className+=" "+t)}function l(e,t){if(n(e,t)){var a=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(a," ")}}function r(e,t){n(e,t)?l(e,t):a(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.hasClass=n,t.addClass=a,t.removeClass=l,t.toggleClass=r;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(n,"hasClass","C:/DT/mtui2.0/dev/mtui/utils/classFun.jsx"),__REACT_HOT_LOADER__.register(a,"addClass","C:/DT/mtui2.0/dev/mtui/utils/classFun.jsx"),__REACT_HOT_LOADER__.register(l,"removeClass","C:/DT/mtui2.0/dev/mtui/utils/classFun.jsx"),__REACT_HOT_LOADER__.register(r,"toggleClass","C:/DT/mtui2.0/dev/mtui/utils/classFun.jsx"))})()},function(e,t){"use strict";!function(e){if(e.MT_IE9=!1,navigator.appVersion.indexOf(".NET")!==-1){e.MT_MS="IE";var t=navigator.appVersion.split(";")[1].replace(/[ ]/g,"");~~t.replace("MSIE","")>9?MT_IE9=!1:MT_IE9=!0}else e.MT_MS="other"}(window);(function(){"undefined"==typeof __REACT_HOT_LOADER__})()},function(e,t){"use strict";function n(e,t,n){if(e+="",t-=e.length,t<=0)return e;n||0===n||(n=" "),n+="";for(var a="";;){if(1&t&&(a+=n),t>>=1,!t)break;n+=n}return a+e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(n,"leftPad","C:/DT/mtui2.0/dev/mtui/utils/leftPad.jsx")})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function l(e){return(0,u.default)({length:e},function(e,t){return t})}Object.defineProperty(t,"__esModule",{value:!0});var r=n(280),u=a(r);t.default=l;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(l,"natureArray","C:/DT/mtui2.0/dev/mtui/utils/natureArray.jsx")})()},function(e,t){"use strict";function n(e,t){for(var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;e;){if(n.call(e,t))return e;e=e.parentElement}return null}Object.defineProperty(t,"__esModule",{value:!0}),t.closest=n;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&__REACT_HOT_LOADER__.register(n,"closest","C:/DT/mtui2.0/dev/mtui/utils/select.jsx")})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(13),r=a(l),u=n(12),i=a(u),s=n(2),o=a(s),d=n(3),c=a(d),f=n(4),m=a(f),p=n(6),h=a(p),_=n(5),E=a(_),v=n(1),y=a(v),b=n(234),g=a(b),C=n(128),T=a(C),k=n(16),O=a(k),x=n(22),D=a(x),w=function(e){function t(e){(0,c.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.state={type:"nomarl",info:""},n.onChange=null,n.onFocus=null,n.onBlur=null,n.lockChange=!0,n}return(0,E.default)(t,e),(0,m.default)(t,[{key:"setIcon",value:function(){var e=void 0;e="nomarl"===this.state.type?y.default.createElement("i",{className:"iconfont icon-null"}):y.default.createElement("i",{className:"iconfont icon-"+this.state.type}),this.setState({suffix:e})}},{key:"arrValLen",value:function(e){for(var t={},n=0;n<e.length;n++)t[e[n].reslt]?t[e[n].reslt]++:t[e[n].reslt]=1;return t}},{key:"setInfo",value:function(e,t){for(var n="",a=0;a<e.length;a++)if(e[a].reslt===t){n=e[a].info;break}return n}},{key:"validate",value:function(e){for(var t=this.props.exgs||[],n=[],a=0;a<t.length;a++){var l=void 0,r=void 0,u=void 0,i=void 0;l=t[a].regs?g.default[t[a].regs]:t[a].regx,r=t[a].info,u=t[a].type,i=new RegExp(l).test(e)?"success":u,n.push({type:u,info:r,reslt:i})}var s="normal",o=this.arrValLen(n);o=o||0,s=o.success===t.length?"success":o.warning||0>=o.danger?"warning":"danger";var d=this.setInfo(n,s);this.setState({type:s,info:"success"===s?"":d},function(){this.setIcon()})}},{key:"changeVal",value:function(e){this.onChange&&this.onChange(e),this.lockChange&&"div"!==e.target.localName||this.validate(e.target.value)}},{key:"onFocusDo",value:function(e){this.onFocus&&this.onFocus(e)}},{key:"onBlurDo",value:function(e){this.onBlur&&this.onBlur(e),this.lockChange&&(this.lockChange=!1,this.validate(e.target.value))}},{key:"componentDidMount",value:function(){this.setIcon(),T.default.on("mt-validate",function(){for(var e=O.default.findDOMNode(this.refs.input),t=0;t<e.children.length;t++)if("input"===e.children[t].localName){e=e.children[t];break}this.onBlurDo({target:e,value:e.value})}.bind(this))}},{key:"componentWillMount",value:function(){this.props.type&&this.setState({type:this.props.type})}},{key:"componentWillUpdate",value:function(e,t){e.type!==this.props.type&&this.setState({type:e.type})}},{key:"componentWillUnmount",value:function(){T.default.off("mt-validate")}},{key:"render",value:function(){var e=this,t=["mt-validate"],n=this.props,a=n.className,l=n.children,u=(n.exgs,(0,i.default)(n,["className","children","exgs"])),s=y.default.Children.only(l);a&&t.push(a),this.state.type&&t.push("mt-validate-"+this.state.type),!this.onChange&&l.props.onChange&&(this.onChange=l.props.onChange.bind(l)),!this.onFocus&&l.props.onFocus&&(this.onFocus=l.props.onFocus.bind(l)),!this.onBlur&&l.props.onBlur&&(this.onBlur=l.props.onBlur.bind(l));var o=(0,D.default)([{className:t.join(" "),ref:"input",suffix:e.state.suffix,onChange:e.changeVal.bind(e),onFocus:e.onFocusDo.bind(e),onBlur:e.onBlurDo.bind(e),validateInfo:e.state.info?y.default.createElement("span",{className:"mt-validate-info"},e.state.info):null},(0,r.default)({},u)]);return y.default.cloneElement(s,o)}}]),t}(v.Component);w.defaultProps={size:""};var R=function(e){function t(e){(0,c.default)(this,t);var n=(0,h.default)(this,(t.__proto__||(0,o.default)(t)).call(this,e));return n.refForm=null,n}return(0,E.default)(t,e),(0,m.default)(t,[{key:"submitEvent",value:function(e){e.preventDefault();for(var t=this.refForm.elements,n=0;n<t.length;n++)"input"===t[n].localName&&T.default.trigger("mt-validate");setTimeout(function(){var e={danger:this.refForm.getElementsByClassName("mt-validate-danger").length,warning:this.refForm.getElementsByClassName("mt-validate-warning").length};e.danger+e.warning===0?e.success=!0:e.success=!1,this.props.submit&&this.props.submit(e)}.bind(this),1)}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,a=(t.submit,(0,i.default)(t,["children","submit"]));return y.default.createElement("form",(0,r.default)({ref:function(t){e.refForm=t},onSubmit:this.submitEvent.bind(this)},a),n)}}]),t}(v.Component);w.ValidateGroup=R;var A=w;t.default=A;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(w,"Validate","C:/DT/mtui2.0/dev/mtui/validate/Validate.jsx"),__REACT_HOT_LOADER__.register(R,"ValidateGroup","C:/DT/mtui2.0/dev/mtui/validate/Validate.jsx"),__REACT_HOT_LOADER__.register(A,"default","C:/DT/mtui2.0/dev/mtui/validate/Validate.jsx"))})()},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={decmal:"^([+-]?)\\d*\\.\\d+$",decmal1:"^[1-9]\\d*.\\d*|0.\\d*[1-9]\\d*$",decmal2:"^-([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*)$",decmal3:"^-?([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*|0?.0+|0)$",decmal4:"^[1-9]\\d*.\\d*|0.\\d*[1-9]\\d*|0?.0+|0$",decmal5:"^(-([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*))|0?.0+|0$",intege:"^-?[1-9]\\d*$",intege1:"^[1-9]\\d*$",intege2:"^-[1-9]\\d*$",num:"^([+-]?)\\d*\\.?\\d+$",num1:"^[1-9]\\d*|0$",num2:"^-[1-9]\\d*|0$",ascii:"^[\\x00-\\xFF]+$",chinese:"^[\\u4e00-\\u9fa5]+$",color:"^[a-fA-F0-9]{6}$",date:"^\\d{4}(\\-|\\/|.)\\d{1,2}\\1\\d{1,2}$",email:"^\\w+((-\\w+)|(\\.\\w+))*\\@[A-Za-z0-9]+((\\.|-)[A-Za-z0-9]+)*\\.[A-Za-z0-9]+$",idcard:"^[1-9]([0-9]{14}|[0-9]{17})$",ip4:"^(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)\\.(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)\\.(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)\\.(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)$",letter:"^[A-Za-z]+$",letter_l:"^[a-z]+$",letter_u:"^[A-Z]+$",mobile:"^0?(13|15|18|14|17)[0-9]{9}$",notempty:"^\\S",password:"^.*[A-Za-z0-9\\w_-]+.*$",fullNumber:"^[0-9]+$",picture:"(.*)\\.(jpg|bmp|gif|ico|pcx|jpeg|tif|png|raw|tga)$",qq:"^[1-9]*[1-9][0-9]*$",rar:"(.*)\\.(rar|zip|7zip|tgz)$",tel:"^[0-9-()()]{7,18}$",url:"^http[s]?:\\/\\/([\\w-]+\\.)+[\\w-]+([\\w-./?%&=]*)?$",username:"^[A-Za-z0-9_\\-\\u4e00-\\u9fa5]+$",deptname:"^[A-Za-z0-9_()()\\-\\u4e00-\\u9fa5]+$",zipcode:"^\\d{6}$",realname:"^[A-Za-z\\u4e00-\\u9fa5]+$",companyname:"^[A-Za-z0-9_()()\\-\\u4e00-\\u9fa5]+$",companyaddr:"^[A-Za-z0-9_()()\\#\\-\\u4e00-\\u9fa5]+$",companysite:"^http[s]?:\\/\\/([\\w-]+\\.)+[\\w-]+([\\w-./?%&#=]*)?$"},a=n;t.default=a;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(n,"regex","C:/DT/mtui2.0/dev/mtui/validate/regex.jsx"),__REACT_HOT_LOADER__.register(a,"default","C:/DT/mtui2.0/dev/mtui/validate/regex.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f),p=n(1),h=a(p),_=(n(21),n(240));a(_);n(334);var E=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"componentDidUpdate",value:function(e,t){$("pre code").each(function(e,t){hljs.highlightBlock(t)})}},{key:"componentDidMount",value:function(){hljs.initHighlightingOnLoad()}},{key:"render",value:function(){return h.default.createElement("div",{className:"app"},this.props.children)}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"App","C:/DT/mtui2.0/dev/pages/App.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/App.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f),p=n(1),h=a(p),_=function(e){function t(){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){return h.default.createElement("div",{className:"footer"},"底部")}}]),t}(p.Component),E=_;t.default=E;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(_,"Footer","C:/DT/mtui2.0/dev/pages/Common/Footer.jsx"),__REACT_HOT_LOADER__.register(E,"default","C:/DT/mtui2.0/dev/pages/Common/Footer.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(67);var p=n(1),h=a(p),_=n(21),E=n(76),v=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){return h.default.createElement("div",{className:"header"},"基于React的一套轻量级的组件库 ",this.props.tips,h.default.createElement("div",{className:"menus"},h.default.createElement("div",{className:"btns"},h.default.createElement(_.Link,{to:HOME},h.default.createElement("i",null,"首页")),h.default.createElement(_.Link,{to:HOME+"/help"},h.default.createElement("i",null,"帮助")),h.default.createElement(_.Link,{className:"update",to:HOME+"/update"},h.default.createElement("i",null,"更新")),h.default.createElement(_.Link,{className:"active",to:HOME+"/ui/input"},h.default.createElement("i",null,"UI组件")),h.default.createElement(_.Link,{to:HOME+"/ui/redux"},h.default.createElement("i",null,"Redux案例")),h.default.createElement("a",{target:"blank",href:"https://github.com/mtsee/mtui2.0"},h.default.createElement("i",null,"Github")))))}}]),t}(p.Component),y=(0,E.connect)(function(e){return{tips:e.user.tips}},null)(v);t.default=y;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(v,"Header","C:/DT/mtui2.0/dev/pages/Common/Header.jsx"),__REACT_HOT_LOADER__.register(y,"default","C:/DT/mtui2.0/dev/pages/Common/Header.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(67);var p=n(1),h=a(p),_=n(21),E=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){return h.default.createElement("div",{className:"menu"},h.default.createElement("div",{className:"logo"},h.default.createElement(_.Link,{to:HOME},"MTUI 2.0")),h.default.createElement("div",{className:"navlist"},h.default.createElement("ul",null,h.default.createElement("li",{className:"classn"},"表单"),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/input"},"input",h.default.createElement("i",null,"输入框"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/button"},"button",h.default.createElement("i",null,"按钮"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/switch"},"switch",h.default.createElement("i",null,"开关"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/slider"},"slider",h.default.createElement("i",null,"拖动条"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/sliderbar"},"sliderbar",h.default.createElement("i",null,"进度条"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/select"},"select",h.default.createElement("i",null,"下拉选择"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/radio"},"radio",h.default.createElement("i",null,"单选"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/datepicker"},"datePicker",h.default.createElement("i",null,"日历"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/timepicker"},"timePicker",h.default.createElement("i",null,"时间"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/checkbox"},"checkbox",h.default.createElement("i",null,"多选"))),h.default.createElement("li",{className:"classn"},"数据处理"),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/validate"},"validate",h.default.createElement("i",null,"表单验证"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/limit"},"limit",h.default.createElement("i",null,"省略文字"))),h.default.createElement("li",{className:"classn"},"布局"),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/grid"},"grid",h.default.createElement("i",null,"栅格"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/panel"},"panel",h.default.createElement("i",null,"面板"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/table"},"table",h.default.createElement("i",null,"表格"))),h.default.createElement("li",{className:"classn"},"功能组件"),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/swiper"},"swiper",h.default.createElement("i",null,"图片切换"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/pagelist"},"pagelist",h.default.createElement("i",null,"分页"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/tip"},"tip",h.default.createElement("i",null,"提示"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/modal"},"modal",h.default.createElement("i",null,"弹窗"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/dropdown"},"dropdown",h.default.createElement("i",null,"下拉框"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/backtop"},"backtop",h.default.createElement("i",null,"返回顶部"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/tabs"},"tabs",h.default.createElement("i",null,"tabs切换"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/popover"},"popover",h.default.createElement("i",null,"气泡提示"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/loading"},"loading",h.default.createElement("i",null,"加载动画"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/progress"},"Progress",h.default.createElement("i",null,"百分比"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/tree"},"tree",h.default.createElement("i",null,"树形菜单"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/upload"},"upload",h.default.createElement("i",null,"文件上传"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/collapse"},"collapse",h.default.createElement("i",null,"折叠面板"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/popconfirm"},"popconfirm",h.default.createElement("i",null,"气泡对话"))),h.default.createElement("li",{className:"classn"},"样式组件"),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/tag"},"tag",h.default.createElement("i",null,"小标签"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/icons"},"icon",h.default.createElement("i",null,"小图标"))),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/404"},"404",h.default.createElement("i",null,"页面未找到"))),h.default.createElement("li",{className:"classn"},"Redux Demo"),h.default.createElement("li",null,h.default.createElement(_.Link,{activeClassName:"active-menu",to:HOME+"/ui/redux"},"redux Demo")))))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"Menu","C:/DT/mtui2.0/dev/pages/Common/Menu.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/Common/Menu.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(67);var p=n(1),h=a(p),_=(n(76),n(21),function(e){function t(){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){return h.default.createElement("div",{className:"menubox"},"404")}}]),t}(p.Component)),E=_;t.default=E;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(_,"NotFound","C:/DT/mtui2.0/dev/pages/Common/NotFound.jsx"),__REACT_HOT_LOADER__.register(E,"default","C:/DT/mtui2.0/dev/pages/Common/NotFound.jsx"))})()},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={env:"dev"},a=n;t.default=a;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(n,"Conf","C:/DT/mtui2.0/dev/pages/Conf/Conf.jsx"),__REACT_HOT_LOADER__.register(a,"default","C:/DT/mtui2.0/dev/pages/Conf/Conf.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(337);var p=n(1),h=a(p),_=(n(21),n(80)),E=a(_),v=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){return h.default.createElement("div",{className:"index help clearfix"},h.default.createElement(E.default,null),h.default.createElement("div",{className:"helpbox"},"HTML结构:",h.default.createElement("pre",null,h.default.createElement("code",null,"\n【MTUI2.0 UI React】\ncomponents build with React.\n\n基于 React 封装的 Web 组件库。\n\n【npm地址】\nhttps://www.npmjs.com/package/mtui \n[Node V6.9.5] [React V15+]\n\n【使用】\n安装使用 npm install mtui\n import 'mtui/style.css';\n import {DatePicker} from 'mtui/index';\n\n ReactDOM.render(<DatePicker format=\"yyyy-mm-dd\"/>, mountNode);\n\n【开发及构建】\n\n目录结构\n\n├── package.json\n├── build # 生成目录\n├── dev # 源文件目录 \n├── dev/mtui # 组件库目录 \n└── lib # npm 包构建目录\n\n【开发】\n\n使用之前先安装相关依赖:\n\nnpm install webpack -g\nnpm install\n开发 npm start\n构建 npm run build\n\n浏览器输入:127.0.0.1:4001\n\t\t\t\t\t\t"))))}}]),t}(p.Component),y=v;t.default=y;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(v,"Help","C:/DT/mtui2.0/dev/pages/Help/Index.jsx"),__REACT_HOT_LOADER__.register(y,"default","C:/DT/mtui2.0/dev/pages/Help/Index.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(338);var p=n(1),h=a(p),_=(n(21),n(80)),E=a(_),v=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){return h.default.createElement("div",{className:"index"},h.default.createElement(E.default,null),h.default.createElement("div",{className:"index-body"},h.default.createElement("div",{className:"indexbox sytle1"},h.default.createElement("h1",null,"MTUI2 技术栈说明*"),h.default.createElement("p",null,"技术栈:react , react-router , redux , es6 所有组件均采用ES6+react封装,没有集成任何插件,易于修改!"),h.default.createElement("p",null,h.default.createElement("span",null,"QQ群:105344750")))),h.default.createElement("div",{className:"index-body2"},h.default.createElement("div",{className:"indexbox sytle2"},h.default.createElement("h1",null,"麻雀虽小五脏俱全"),h.default.createElement("div",{className:"item"},h.default.createElement("div",{className:"icobox"},h.default.createElement("div",{className:"icon"},h.default.createElement("span",null,"React"))),h.default.createElement("div",{className:"info"},"采用React V15+ 版本")),h.default.createElement("div",{className:"item"},h.default.createElement("div",{className:"icobox"},h.default.createElement("div",{className:"icon"},h.default.createElement("span",null,"ES6"))),h.default.createElement("div",{className:"info"},"ES6语法编写,babel编译")),h.default.createElement("div",{className:"item"},h.default.createElement("div",{className:"icobox"},h.default.createElement("div",{className:"icon"},h.default.createElement("span",null,"Router"))),h.default.createElement("div",{className:"info"},"采用React-router前端路由")),h.default.createElement("div",{className:"item"},h.default.createElement("div",{className:"icobox"},h.default.createElement("div",{className:"icon"},h.default.createElement("span",null,"Redux"))),h.default.createElement("div",{className:"info"},"项目中包含一个Redux小案例,方便学习使用")))))}}]),t}(p.Component),y=v;t.default=y;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(v,"Index","C:/DT/mtui2.0/dev/pages/Index/Index.jsx"),__REACT_HOT_LOADER__.register(y,"default","C:/DT/mtui2.0/dev/pages/Index/Index.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(339);var p=n(1),h=a(p),_=(n(21),n(76)),E=n(121),v=n(8),y=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.state={value:"good"},n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"handleClickRead", value:function(){this.props.setUserInfo({tips:0})}},{key:"handleClickAdd",value:function(){var e=this.props.tips;e++,this.props.setUserInfo({tips:e})}},{key:"render",value:function(){return h.default.createElement(v.Panel,{className:"reduxdom",header:"Redux Dom"},h.default.createElement("div",{className:"tipsbox"},"当前有 ",h.default.createElement("em",null,this.props.tips)," 条未读通知   ",h.default.createElement("a",{href:"javascript:;",className:"mt-btn-green",onClick:this.handleClickRead.bind(this)},"清零"),"  ",h.default.createElement("a",{href:"javascript:;",className:"mt-btn-yellow",onClick:this.handleClickAdd.bind(this)},"添加一条"),h.default.createElement("pre",null,h.default.createElement("code",null,'\nimport \'./style.scss\' \nimport React, { Component } from \'react\';\nimport { Link } from \'react-router\' \nimport { connect} from \'react-redux\'\nimport { setUserInfo } from \'../../actions/user\'\nimport {Grid,Panel} from \'../../mtui/index\'\n\nclass ReduxDom extends Component {\n\n //构造函数\n constructor(props) {\n super(props);\n this.state = {\n value:\'good\'\n };\n }\n\n //点击\n handleClickRead(){\n this.props.setUserInfo({\n tips : 0\n });\n }\n\n //点击\n handleClickAdd(){\n var tips = this.props.tips;\n tips++;\n this.props.setUserInfo({\n tips : tips\n });\n }\n\n //渲染\n render() {\n return (\n <Panel className="reduxdom" header="Redux Dom">\n <div className="tipsbox">\n 当前有 <em>{this.props.tips}</em> 条未读通知 \n &nbsp; <a href="javascript:;" className="mt-btn-green" onClick={this.handleClickRead.bind(this)}>清零</a>\n &nbsp; <a href="javascript:;" className="mt-btn-yellow" onClick={this.handleClickAdd.bind(this)}>添加一条</a>\n <Link to={HOME+"/index"}>首页</Link>\n </div>\n </Panel>\n );\n }\n}\n\n//植入redux数据\nexport default connect(\n state => ({ \n tips: state.user.tips\n }),\n {setUserInfo}\n)(ReduxDom)\n'))))}}]),t}(p.Component),b=(0,_.connect)(function(e){return{tips:e.user.tips}},{setUserInfo:E.setUserInfo})(y);t.default=b;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(y,"ReduxDom","C:/DT/mtui2.0/dev/pages/ReduxDom/ReduxDom.jsx"),__REACT_HOT_LOADER__.register(b,"default","C:/DT/mtui2.0/dev/pages/ReduxDom/ReduxDom.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){return h.default.createElement("div",{className:"mt-panel"},h.default.createElement("h3",{className:"mt-panel-h2"},"backtop 返回顶部"),h.default.createElement("br",null),h.default.createElement("div",null,"使劲往下滑"),h.default.createElement("div",null,h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style 有效"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"top"),h.default.createElement("td",null,"滚动到顶部的距离"),h.default.createElement("td",null,"number"),h.default.createElement("td",null,"0")),h.default.createElement("tr",null,h.default.createElement("td",null,"time"),h.default.createElement("td",null,"滚动动画时间,单位毫秒ms"),h.default.createElement("td",null,"number"),h.default.createElement("td",null,"1000")),h.default.createElement("tr",null,h.default.createElement("td",null,"callBack"),h.default.createElement("td",null,"动画执行完成后的回调函数"),h.default.createElement("td",null,"function"),h.default.createElement("td",null)),h.default.createElement("tr",null,h.default.createElement("td",null,"dom"),h.default.createElement("td",null,"按钮DOM,null的时候是 ",'<a className="mt-backtop">Top</a>'),h.default.createElement("td",null,"Component"),h.default.createElement("td",null,"null"))))),h.default.createElement("pre",null,h.default.createElement("code",null,"\nimport './style.scss';\nimport React, { Component } from 'react';\nimport {Grid,Button,Tip, BackTop} from '../../mtui/index'\n\nclass Dom extends Component {\n //构造函数\n constructor (props) {\n super(props);\n }\n\n render(){\n return (\n <div className=\"mt-panel\">\n <h3 className=\"mt-panel-h2\">backtop 返回顶部</h3>\n <div className=\"mt-panel-box\">\n <BackTop time={500} top={100} dom={<a>back top</a>}/>\n <BackTop time={500} top={0} visibilityHeight={200}/>\n </div>\n </div>\n );\n }\n}\n"))),h.default.createElement("div",{style:{height:800}}),h.default.createElement("div",{className:"mt-panel-box"},h.default.createElement(_.BackTop,{time:500,top:100,dom:h.default.createElement("a",null,"back top")}),h.default.createElement(_.BackTop,{time:500,top:0,visibilityHeight:200})))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"Dom","C:/DT/mtui2.0/dev/pages/UI/Backtop.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/UI/Backtop.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){return h.default.createElement("div",{className:"mt-panel"},h.default.createElement("h3",{className:"mt-panel-h2"},"按钮"),h.default.createElement("div",{className:"mt-panel-box"},h.default.createElement(_.Grid,{width:"1/2",className:"btns"},h.default.createElement(_.Button,{type:"primary",block:!0},"block:true"),h.default.createElement("br",null),h.default.createElement(_.Button,{type:"success"},"block:false"),h.default.createElement(_.Button,{className:"btnw",dom:"button",type:"success"},"button")),h.default.createElement(_.Grid,{width:"2/2",className:"btns"},h.default.createElement(_.Button,null,"default"),h.default.createElement(_.Button,{type:"primary"},"primary"),h.default.createElement(_.Button,{type:"success"},"success"),h.default.createElement(_.Button,{type:"info"},"info"),h.default.createElement(_.Button,{type:"warning"},"warning"),h.default.createElement(_.Button,{type:"danger"},"danger")),h.default.createElement(_.Grid,{width:"2/2",className:"btns"},h.default.createElement(_.Button,{size:"lg",type:"info"},"大按钮"),h.default.createElement(_.Button,{type:"info"},"正常按钮"),h.default.createElement(_.Button,{size:"sm",type:"info"},"小按钮"),h.default.createElement(_.Button,{size:"xs",type:"info"},"超小按钮")),h.default.createElement(_.Grid,{width:"2/2",className:"btns"},h.default.createElement(_.Button,{dom:"a",type:"success"},"按钮"),h.default.createElement(_.Button,{disabled:!0,type:"warning"},"按钮")),h.default.createElement(_.Grid,{width:"2/2",className:"btns"},h.default.createElement(_.Button,{type:"success",prefix:h.default.createElement("i",{className:"iconfont icon-loading2 mt-animate-rotate"})},"按钮"),h.default.createElement(_.Button,{type:"success",suffix:h.default.createElement("i",{className:"iconfont icon-loading1 mt-animate-rotate"})},"按钮"),h.default.createElement(_.Button,{disabled:!0,type:"warning"},"按钮")),h.default.createElement(_.Grid,null,h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style 继承原来的标签默认"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"size"),h.default.createElement("td",null,"按钮尺寸,可用参数 lg,sm,xs 或者不添加"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"type"),h.default.createElement("td",null,"按钮样式,可用参数 default,primary,success,info,warning,danger"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"default")),h.default.createElement("tr",null,h.default.createElement("td",null,"block"),h.default.createElement("td",null,"按钮是否宽度100%,参数 true/false"),h.default.createElement("td",null,"bool"),h.default.createElement("td",null,"false")),h.default.createElement("tr",null,h.default.createElement("td",null,"dom"),h.default.createElement("td",null,"按钮DOM标签,参数 a, div, input, button, span ...."),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"a")),h.default.createElement("tr",null,h.default.createElement("td",null,"htmlType"),h.default.createElement("td",null,"当dom为input/button的时候,设置type参数,参数: submit, button"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"a")),h.default.createElement("tr",null,h.default.createElement("td",null,"disabled"),h.default.createElement("td",null,"按钮是否可用,参数 false/true"),h.default.createElement("td",null,"bool"),h.default.createElement("td",null,"false")),h.default.createElement("tr",null,h.default.createElement("td",null,"prefix"),h.default.createElement("td",null,"前面的图标,参数可以是一个字体图标",'<i className="iconfont ico-user"></i>'),h.default.createElement("td",null,"Component"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"suffix"),h.default.createElement("td",null,"后面的图标,参数可以是一个字体图标",'<i className="iconfont ico-search"></i>'),h.default.createElement("td",null,"Component"),h.default.createElement("td",null,"null"))))),h.default.createElement("pre",null,h.default.createElement("code",null,'\nimport \'./style.scss\';\nimport React, { Component } from \'react\';\nimport {Grid,Button} from \'../../mtui/index\'\n\nclass Dom extends Component {\n //构造函数\n constructor (props) {\n super(props);\n }\n\n render(){\n return (\n <div className="mt-panel">\n <h3 className="mt-panel-h2">按钮</h3>\n <div className="mt-panel-box">\n <Grid width="1/2" className="btns">\n <Button type="primary" block={true}>block:true</Button><br/>\n <Button type="success">block:false</Button>\n </Grid>\n <Grid width="2/2" className="btns">\n <Button>default</Button>\n <Button type="primary">primary</Button>\n <Button type="success">success</Button>\n <Button type="info">info</Button>\n <Button type="warning">warning</Button>\n <Button type="danger">danger</Button>\n </Grid>\n <Grid width="2/2" className="btns">\n <Button size="lg" type="info">大按钮</Button>\n <Button type="info">正常按钮</Button>\n <Button size="sm" type="info">小按钮</Button>\n <Button size="xs" type="info">超小按钮</Button>\n </Grid>\n <Grid width="2/2" className="btns">\n <Button dom="div" type="success">按钮</Button>\n <Button disabled={true} type="warning">按钮</Button>\n </Grid>\n </div>\n </div>\n );\n }\n}\n')))))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"Dom","C:/DT/mtui2.0/dev/pages/UI/Button.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/UI/Button.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=_.Checkbox.CheckboxGroup,v=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.state={checked:!0,value:[2],allValue:[2,4]},n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"onChange",value:function(e){console.log(e),this.setState({checked:e})}},{key:"onChangeGroup",value:function(e){console.log("不受控组件",e)}},{key:"onChangeGroupSK",value:function(e){console.log("受控组件",e),this.setState({value:e})}},{key:"onChangeAll",value:function(e){console.log(e),e?this.setState({allValue:[1,2,3,4]}):this.setState({allValue:[]})}},{key:"onChangeGroupSKAll",value:function(e){this.setState({allValue:e})}},{key:"defaultChecked",value:function(){console.log(this.refs.defaultChecked.getValue())}},{key:"render",value:function(){var e=null;return e=4===this.state.allValue.length||0!==this.state.allValue.length&&"other",h.default.createElement("div",{className:"mt-panel"},h.default.createElement("h3",{className:"mt-panel-h2"},"Checkbox"),h.default.createElement("div",{className:"mt-panel-box"},h.default.createElement(_.Grid,{width:"2/2"},h.default.createElement(_.Checkbox,{onChange:this.onChange.bind(this),checked:this.state.checked},"选项卡"),"  ",h.default.createElement(_.Checkbox,{disabled:!0},"选项卡"),"  ",h.default.createElement(_.Checkbox,{checked:!0,disabled:!0},"选项卡")),h.default.createElement("br",null),h.default.createElement("br",null),h.default.createElement(_.Grid,{width:"2/2"},h.default.createElement("h4",null,"不受控组件"),h.default.createElement(_.Checkbox,{value:"mantou",ref:"defaultChecked",onChange:this.defaultChecked.bind(this),defaultChecked:!0},"选项卡"),"  ",h.default.createElement(E,{onChange:this.onChangeGroup.bind(this),defaultValue:[2,4]},h.default.createElement(_.Checkbox,{value:1},"选项卡1"),h.default.createElement(_.Checkbox,{disabled:!0,value:2},"选项卡2"),h.default.createElement(_.Checkbox,{value:3},"选项卡3"),h.default.createElement(_.Checkbox,{value:4},"选项卡4"))),h.default.createElement("br",null),h.default.createElement("br",null),h.default.createElement(_.Grid,{width:"2/2"},h.default.createElement("h4",null,"受控组件"),h.default.createElement(E,{onChange:this.onChangeGroupSK.bind(this),value:this.state.value},h.default.createElement(_.Checkbox,{value:1},"选项卡1"),h.default.createElement(_.Checkbox,{disabled:!0,value:2},"选项卡2"),h.default.createElement(_.Checkbox,{value:3},"选项卡3"),h.default.createElement(_.Checkbox,{value:4},"选项卡4"))),h.default.createElement("br",null),h.default.createElement("br",null),h.default.createElement(_.Grid,{width:"2/2"},h.default.createElement("h4",null,"不受控组件"),h.default.createElement(E,{type:"button",onChange:this.onChangeGroup.bind(this),defaultValue:[2,4]},h.default.createElement(_.Checkbox,{value:1},"选项卡1"),h.default.createElement(_.Checkbox,{value:2},"选项卡2"),h.default.createElement(_.Checkbox,{value:3},"选项卡3"),h.default.createElement(_.Checkbox,{value:4},"选项卡4"))),h.default.createElement("br",null),h.default.createElement("br",null),h.default.createElement(_.Grid,{width:"2/2"},h.default.createElement("h4",null,"受控组件"),h.default.createElement(_.Checkbox,{onChange:this.onChangeAll.bind(this),checked:e},"全选"),"  ",h.default.createElement(E,{onChange:this.onChangeGroupSKAll.bind(this),value:this.state.allValue},h.default.createElement(_.Checkbox,{value:1},"选项卡1"),h.default.createElement(_.Checkbox,{value:2},"选项卡2"),h.default.createElement(_.Checkbox,{value:3},"选项卡3"),h.default.createElement(_.Checkbox,{value:4},"选项卡4"))),h.default.createElement(_.Grid,null,h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style 继承原来的标签默认"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"checked"),h.default.createElement("td",null,"选择框的状态 true/false/other,如果是other表示半选中状态"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"false")),h.default.createElement("tr",null,h.default.createElement("td",null,"value"),h.default.createElement("td",null,"选择框的值"),h.default.createElement("td",null,"anything"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"type(CheckboxGroup参数)"),h.default.createElement("td",null,"选择框的类型,可以是按钮, 参数:button, checkbox"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"checkbox"))))),h.default.createElement("pre",null,h.default.createElement("code",null,'\n\'use strict\';\n\nimport \'./style.scss\';\nimport React, { Component } from \'react\';\nimport {Grid,Button,Checkbox} from \'../../mtui/index\'\n\nconst CheckboxGroup = Checkbox.CheckboxGroup;\n\nclass Dom extends Component {\n //构造函数\n constructor (props) {\n super(props);\n this.state = {\n checked : true,\n value: [2],\n allValue:[2,4]\n }\n }\n\n onChange(data){\n console.log(data)\n\n this.setState({\n checked: data\n })\n }\n\n onChangeGroup(data){\n console.log(\'不受控组件\',data)\n }\n\n onChangeGroupSK(data){\n console.log(\'受控组件\',data)\n this.setState({\n value:data\n })\n }\n\n onChangeAll(data){\n console.log(data)\n\n if(data){\n this.setState({\n allValue:[1,2,3,4]\n })\n }else{\n this.setState({\n allValue:[]\n })\n }\n }\n\n onChangeGroupSKAll(data){\n this.setState({\n allValue:data\n })\n }\n\n //默认参数\n defaultChecked(){\n console.log(this.refs.defaultChecked.getValue());\n }\n\n render(){\n\n let checkAll = null;\n\n if(this.state.allValue.length == 4){\n checkAll = true\n }else if(this.state.allValue.length == 0){\n checkAll = false\n }else{\n checkAll = \'other\';\n }\n\n return (\n <div className="mt-panel">\n <h3 className="mt-panel-h2">Checkbox</h3>\n <div className="mt-panel-box">\n <Grid width="2/2">\n <Checkbox onChange={this.onChange.bind(this)} checked={this.state.checked}>选项卡</Checkbox> &nbsp;\n <Checkbox disabled={true}>选项卡</Checkbox> &nbsp;\n <Checkbox checked={true} disabled={true}>选项卡</Checkbox>\n </Grid>\n <br/>\n <br/>\n <Grid width="2/2">\n <h4>不受控组件</h4>\n <Checkbox value="mantou" ref="defaultChecked" onChange={this.defaultChecked.bind(this)} defaultChecked={true}>选项卡</Checkbox> &nbsp;\n <CheckboxGroup onChange={this.onChangeGroup.bind(this)} defaultValue={[2,4]}>\n <Checkbox value={1}>选项卡1</Checkbox>\n <Checkbox disabled={true} value={2}>选项卡2</Checkbox>\n <Checkbox value={3}>选项卡3</Checkbox>\n <Checkbox value={4}>选项卡4</Checkbox>\n </CheckboxGroup>\n </Grid>\n <br/>\n <br/>\n <Grid width="2/2">\n <h4>受控组件</h4>\n <CheckboxGroup onChange={this.onChangeGroupSK.bind(this)} value={this.state.value}>\n <Checkbox value={1}>选项卡1</Checkbox>\n <Checkbox disabled={true} value={2}>选项卡2</Checkbox>\n <Checkbox value={3}>选项卡3</Checkbox>\n <Checkbox value={4}>选项卡4</Checkbox>\n </CheckboxGroup>\n </Grid>\n <br/>\n <br/>\n <Grid width="2/2">\n <h4>不受控组件</h4>\n <CheckboxGroup type="button" onChange={this.onChangeGroup.bind(this)} defaultValue={[2,4]}>\n <Checkbox value={1}>选项卡1</Checkbox>\n <Checkbox value={2}>选项卡2</Checkbox>\n <Checkbox value={3}>选项卡3</Checkbox>\n <Checkbox value={4}>选项卡4</Checkbox>\n </CheckboxGroup>\n </Grid>\n <br/>\n <br/>\n <Grid width="2/2">\n <h4>受控组件</h4>\n <Checkbox onChange={this.onChangeAll.bind(this)} checked={checkAll}>全选</Checkbox> &nbsp;\n <CheckboxGroup onChange={this.onChangeGroupSKAll.bind(this)} value={this.state.allValue}>\n <Checkbox value={1}>选项卡1</Checkbox>\n <Checkbox value={2}>选项卡2</Checkbox>\n <Checkbox value={3}>选项卡3</Checkbox>\n <Checkbox value={4}>选项卡4</Checkbox>\n </CheckboxGroup>\n </Grid>\n </div>\n </div>\n );\n }\n}\n\n//主页\nexport default Dom;\n')))))}}]),t}(p.Component),y=v;t.default=y;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"CheckboxGroup","C:/DT/mtui2.0/dev/pages/UI/Checkbox.jsx"),__REACT_HOT_LOADER__.register(v,"Dom","C:/DT/mtui2.0/dev/pages/UI/Checkbox.jsx"),__REACT_HOT_LOADER__.register(y,"default","C:/DT/mtui2.0/dev/pages/UI/Checkbox.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=_.Collapse.CollapseItem,v=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){return h.default.createElement(_.Panel,{header:"Collapse"},h.default.createElement(_.Grid,{width:"1/2"},h.default.createElement(_.Collapse,{className:"collapse",only:!0},h.default.createElement(E,{header:"我小的时候"},"我小的时候,盼望着过年。从农历的腊月二十三开始,接下来的每一天似乎都是色彩斑斓的,都散发着温馨绵厚的香味儿。村里的老婆婆坐在厚厚的蒲团上教我们唱着童谣:“二十三,祭灶官;二十四,扫房子;二十五,磨豆腐;二十六,蒸馒头;二十七,杀只鸡;二十八,贴画画;二十九,去买酒;年三十,包饺子;大初一,撅着屁股乱作揖。”这首童谣像是我们村里人的过年指南,农历二十三的时候就吃灶糖、祭灶神,二十四的时候就忙着用笤帚打扫屋子,二十五的时候就准备过年吃的豆腐,二十六的时候家家户户蒸枣花馒头、蒸萝卜缨包子……千百年来,太阳沿着亘古不变的轨迹东升西落;冬去春来,人们世世代代遵循着这样的过年流程过年。"),h.default.createElement(E,{show:!0,header:"到了农历的年末"},"到了农历的年末,城市的超市里挂满了玲珑华美的红灯笼,玻璃橱窗上也贴上了各式花样的剪纸,这些都是年的符号,也是年的名片。我内心深藏的年味儿犹如一只脆弱不堪的老酒坛被这些符号与名片猛然击碎,老酒倾泻满地,浓郁醇厚的味道漫然飘散。"),h.default.createElement(E,{header:"还要点我?"},"我已经编不下去了~"))),h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style 等默认属性继承DIV标签默认"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"Collapse: only"),h.default.createElement("td",null,"是否每次只展示一个选项卡,点击的时候,其他关闭"),h.default.createElement("td",null,"bool"),h.default.createElement("td",null,"false")),h.default.createElement("tr",null,h.default.createElement("td",null,"CollapseItem: header"),h.default.createElement("td",null,"item的标题"),h.default.createElement("td",null,"Component"),h.default.createElement("td",null,"''")),h.default.createElement("tr",null,h.default.createElement("td",null,"CollapseItem: show"),h.default.createElement("td",null,"是否默认显示"),h.default.createElement("td",null,"bool"),h.default.createElement("td",null,"false"))))),h.default.createElement("pre",null,h.default.createElement("code",null,'\n\'use strict\';\n\nimport \'./style.scss\';\nimport React, { Component } from \'react\';\nimport {Grid,Panel,Collapse} from \'../../mtui/index\'\n\nconst CollapseItem = Collapse.CollapseItem;\n\nclass UI extends Component {\n\t//构造函数\n\tconstructor (props) {\n\t\tsuper(props);\n\t}\n\n\trender(){\n\t\treturn (\n\t\t\t<Panel header="Collapse">\n\t\t\t\t<Grid width="1/2">\n\t\t\t\t\t<Collapse className="collapse" only={true}>\n\t\t\t\t\t\t<CollapseItem header="我小的时候">\n\t\t\t\t\t\t\t我小的时候,盼望着过年。从农历的腊月二十三开始,接下来的每一天似乎都是色彩斑斓的,都散发着温馨绵厚的香味儿。村里的老婆婆坐在厚厚的蒲团上教我们唱着童谣:“二十三,祭灶官;二十四,扫房子;二十五,磨豆腐;二十六,蒸馒头;二十七,杀只鸡;二十八,贴画画;二十九,去买酒;年三十,包饺子;大初一,撅着屁股乱作揖。”这首童谣像是我们村里人的过年指南,农历二十三的时候就吃灶糖、祭灶神,二十四的时候就忙着用笤帚打扫屋子,二十五的时候就准备过年吃的豆腐,二十六的时候家家户户蒸枣花馒头、蒸萝卜缨包子……千百年来,太阳沿着亘古不变的轨迹东升西落;冬去春来,人们世世代代遵循着这样的过年流程过年。\n\t\t\t\t\t\t</CollapseItem>\n\t\t\t\t\t\t<CollapseItem show={true} header="到了农历的年末">\n\t\t\t\t\t\t\t到了农历的年末,城市的超市里挂满了玲珑华美的红灯笼,玻璃橱窗上也贴上了各式花样的剪纸,这些都是年的符号,也是年的名片。我内心深藏的年味儿犹如一只脆弱不堪的老酒坛被这些符号与名片猛然击碎,老酒倾泻满地,浓郁醇厚的味道漫然飘散。 \n\t\t\t\t\t\t</CollapseItem>\n\t\t\t\t\t\t<CollapseItem header="还要点我?">\n\t\t\t\t\t\t\t我已经编不下去了~\n\t\t\t\t\t\t</CollapseItem>\n\t\t\t\t\t</Collapse>\n\t\t\t\t</Grid>\n\t\t\t</Panel>\t\n\t );\n\t}\n}\n\n\t\t\t\t')))}}]),t}(p.Component),y=v;t.default=y;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"CollapseItem","C:/DT/mtui2.0/dev/pages/UI/Collapse.jsx"),__REACT_HOT_LOADER__.register(v,"UI","C:/DT/mtui2.0/dev/pages/UI/Collapse.jsx"),__REACT_HOT_LOADER__.register(y,"default","C:/DT/mtui2.0/dev/pages/UI/Collapse.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(16),E=(a(_),n(8)),v=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.state={name:"111",date:""},n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"onChange",value:function(e){console.log("弹窗关闭",e)}},{key:"componentDidMount",value:function(){var e=this;setTimeout(function(){e.setState({date:"2017-03-18"})},1e3)}},{key:"render",value:function(){return h.default.createElement("div",{className:"mt-panel"},h.default.createElement("div",{className:"mt-panel-h2"},"日期组件"),h.default.createElement("div",{className:"mt-panel-box"},h.default.createElement(E.DatePicker,{size:"xs",style:{width:100},defaultValue:"",format:"yyyy-mm-dd",placeholder:"选择日期"})," ",h.default.createElement(E.DatePicker,{size:"xs",defaultValue:"2017-03-14",visible:!0,onChange:this.onChange.bind(this),format:"yyyy-mm-dd"})," ",h.default.createElement(E.DatePicker,{size:"xs",defaultValue:"2017",onChange:this.onChange.bind(this),format:"yyyy"})," ",h.default.createElement(E.DatePickers,{size:"xs",defaultValue:"2017-03-14/2017-03-16",onChange:this.onChange.bind(this),format:"yyyy-mm-dd"}),"  一秒后变化:",h.default.createElement(E.DatePicker,{size:"xs",value:this.state.date,onChange:this.onChange.bind(this),format:"yyyy-mm-dd"})," ",h.default.createElement(E.DatePicker,{range:"2017-03-14,",size:"xs",defaultValue:"2017-03-14",onChange:this.onChange.bind(this),format:"yyyy-mm-dd"})," "),h.default.createElement(E.Grid,{className:"code",width:"2/2"},h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style, placeholder继承原来的标签默认"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"showBack"),h.default.createElement("td",null,"选择值后的回调函数"),h.default.createElement("td",null,"function"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"onChange"),h.default.createElement("td",null,"选择值后的回调函数 callback(e, data)"),h.default.createElement("td",null,"function"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"modalClass"),h.default.createElement("td",null,"日历弹窗的class"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"modalStyle"),h.default.createElement("td",null,"日历弹窗的style"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"validateInfo"),h.default.createElement("td",null,"表单验证的提示图标,或者DIV"),h.default.createElement("td",null,"Component"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"format"),h.default.createElement("td",null,"日期格式化 格式: yyyy年mm月dd日 "),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"yyyy-mm-dd")),h.default.createElement("tr",null,h.default.createElement("td",null,"size"),h.default.createElement("td",null,"输入框大小,继承 Input 组件, nm, lg, sm, xs"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"nm")),h.default.createElement("tr",null,h.default.createElement("td",null,"mid"),h.default.createElement("td",null,"日期弹窗的id, 如果为null, 会用 mt_date_时间戳 做ID"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"visible"),h.default.createElement("td",null,"日期弹窗默认状态,显示还是隐藏"),h.default.createElement("td",null,"bool"),h.default.createElement("td",null,"false")),h.default.createElement("tr",null,h.default.createElement("td",null,"defaultValue"),h.default.createElement("td",null,'日期默认值,固定格式:yyyy-mm-dd。 如果是日期范围,固定格式:"yyyy-mm-dd/yyyy-mm-dd" 或 "yyyy-mm-dd/"或 "/yyyy-mm-dd"'),h.default.createElement("td",null,"function"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"range(DatePickers 参数)"),h.default.createElement("td",null,'日期范围, 固定格式:yyyy-mm-dd。 如果是日期范围,固定格式:"yyyy-mm-dd,yyyy-mm-dd" 或 "yyyy-mm-dd," 或 ",yyyy-mm-dd"'),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"null"))))),h.default.createElement("pre",null,h.default.createElement("code",null,'\n\'use strict\';\n\nimport \'./style.scss\';\nimport React, { Component } from \'react\';\nimport ReactDOM from \'react-dom\';\nimport { Grid, Button, DatePicker, DatePickers, Input } from \'../../mtui/index\';\n\nclass Dates extends Component {\n // 构造函数\n constructor(props) {\n super(props);\n this.state = {\n name: \'111\',\n date: \'2017-03-14\'\n };\n }\n\n onChange(data) {\n console.log(\'弹窗关闭\', data);\n }\n\n componentDidMount() {\n setTimeout(() => {\n this.setState({\n date: \'2017-03-18\'\n });\n }, 1000);\n }\n\n render() {\n return (\n <div className="mt-panel">\n <div className="mt-panel-h2">日期组件</div>\n <div className="mt-panel-box">\n <DatePicker size="xs" style={{ width: 100 }} defaultValue="" format="yyyy-mm-dd" placeholder="选择日期" />&nbsp;\n <DatePicker size="xs" defaultValue="2017-03-14" visible={true} onChange={this.onChange.bind(this)} format="yyyy-mm-dd" />&nbsp;\n <DatePicker size="xs" defaultValue="2017" onChange={this.onChange.bind(this)} format="yyyy" />&nbsp;\n <DatePickers size="xs" defaultValue="2017-03-14/2017-03-16" onChange={this.onChange.bind(this)} format="yyyy-mm-dd" />&nbsp;\n 一秒后变化:<DatePicker size="xs" value={this.state.date} onChange={this.onChange.bind(this)} format="yyyy-mm-dd" />&nbsp;\n <DatePicker range="2017-03-14," size="xs" defaultValue="2017-03-14" onChange={this.onChange.bind(this)} format="yyyy-mm-dd" />&nbsp;\n </div>\n </div>\n );\n }\n}\n\n// 主页\nexport default Dates;\n')))); }}]),t}(p.Component),y=v;t.default=y;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(v,"Dates","C:/DT/mtui2.0/dev/pages/UI/DatePicker.jsx"),__REACT_HOT_LOADER__.register(y,"default","C:/DT/mtui2.0/dev/pages/UI/DatePicker.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.state={name:10},n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"closeBack",value:function(){console.log("close")}},{key:"showBack",value:function(){var e=this;console.log("show"),e.setState({name:++this.state.name})}},{key:"render",value:function(){return h.default.createElement(_.Panel,{header:"Dropdown 弹窗"},h.default.createElement(_.Dropdown,{btn:h.default.createElement("a",{className:"mt-btn mt-btn-success"},h.default.createElement("i",null,"下拉框hover")),style:{width:200,height:200},visible:!1,showBack:this.showBack.bind(this),closeBack:this.closeBack.bind(this),trigger:"hover"},h.default.createElement(_.Panel,{header:"弹窗"},this.state.name)),"   ",h.default.createElement(_.Dropdown,{btn:h.default.createElement("a",{className:"mt-btn mt-btn-success"},h.default.createElement("i",null,"下拉框hover")),style:{width:200,height:200}},h.default.createElement(_.Panel,{header:"弹窗"},this.state.name)),"   ",h.default.createElement(_.Dropdown,{btn:h.default.createElement("a",{className:"mt-btn mt-btn-info"},h.default.createElement("i",null,"下拉框click")),style:{width:100,height:100},showBack:this.showBack.bind(this),closeBack:this.closeBack.bind(this),trigger:"click"},h.default.createElement(_.Panel,{size:"min",header:"弹窗2"},this.state.name)),h.default.createElement("div",null,h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style 有效"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"btn"),h.default.createElement("td",null,"按钮组件"),h.default.createElement("td",null,"Component"),h.default.createElement("td",null,"<a>dropdown</a>")),h.default.createElement("tr",null,h.default.createElement("td",null,"showBack"),h.default.createElement("td",null,"显示前的回调函数"),h.default.createElement("td",null,"function"),h.default.createElement("td",null)),h.default.createElement("tr",null,h.default.createElement("td",null,"closeBack"),h.default.createElement("td",null,"关闭前的回调函数"),h.default.createElement("td",null,"function"),h.default.createElement("td",null)),h.default.createElement("tr",null,h.default.createElement("td",null,"trigger"),h.default.createElement("td",null,"触发方式,可用参数 hover/click"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"hover")),h.default.createElement("tr",null,h.default.createElement("td",null,"visible"),h.default.createElement("td",null,"默认显示状态,true/false"),h.default.createElement("td",null,"bool"),h.default.createElement("td",null,"false"))))),h.default.createElement("pre",null,h.default.createElement("code",null,'\n\'use strict\';\n\nimport \'./style.scss\';\nimport React, { Component } from \'react\';\nimport {Grid,Button,Dropdown,Panel} from \'../../mtui/index\'\n\nclass UI extends Component {\n //构造函数\n constructor (props) {\n super(props);\n this.state = {\n name : 10\n }\n }\n\n closeBack(){\n console.log(\'close\')\n }\n\n showBack(){\n const _this = this;\n console.log(\'show\')\n _this.setState({\n name: ++this.state.name\n })\n }\n\n render(){\n return (\n <Panel header="Dropdown 弹窗">\n <Dropdown btn={<a className="mt-btn mt-btn-success"><i>下拉框hover</i></a>} style={{width:200, height:200}} visible={false} showBack={this.showBack.bind(this)} closeBack={this.closeBack.bind(this)} trigger="hover">\n <Panel header="弹窗">\n {this.state.name}\n </Panel>\n </Dropdown>\n &nbsp;\n &nbsp;\n <Dropdown btn={<a className="mt-btn mt-btn-success"><i>下拉框hover</i></a>} style={{width: 200, height: 200}}>\n <Panel header="弹窗">\n {this.state.name}\n </Panel>\n </Dropdown>\n\n &nbsp;\n &nbsp;\n\n <Dropdown btn={<a className="mt-btn mt-btn-info"><i>下拉框click</i></a>} style={{width:100, height:100}} showBack={this.showBack.bind(this)} closeBack={this.closeBack.bind(this)} trigger="click">\n <Panel size="min" header="弹窗2">\n {this.state.name}\n </Panel>\n </Dropdown>\n </Panel>\n );\n }\n}\n\n//主页\nexport default UI;\n'))))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"UI","C:/DT/mtui2.0/dev/pages/UI/Dropdown.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/UI/Dropdown.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.state={num:5},n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"selectGrid",value:function(e){console.log(e.target.value),this.setState({num:e.target.value})}},{key:"render",value:function(){for(var e=[],t=[],n=0;n<16;n++)t.push(n);for(var a=0;a<this.state.num;a++)e.push(a);return h.default.createElement("div",{className:"mt-panel"},h.default.createElement("h3",{className:"mt-panel-h2"},"栅格系统"),h.default.createElement("div",{className:"mt-panel"},"选择栅格:",h.default.createElement("select",{value:this.state.num,onChange:this.selectGrid.bind(this)},t.map(function(e,t){return t=parseInt(t,10)+1,t<=16?h.default.createElement("option",{key:t,value:t},t):null})),h.default.createElement(_.Grid,{sm:"2/2",md:"1/2",lg:"1/2",className:"grids"},e.map(function(t,n){return n=parseInt(n,10),h.default.createElement("div",{key:n},h.default.createElement(_.Grid,{width:n+1+"/"+e.length},n+1,"/",e.length))})),h.default.createElement("div",{className:"code"},"width:正常 ",h.default.createElement("br",null),"sm ","<="," 640px ",h.default.createElement("br",null),"640px ","<"," md ","<="," 1024px ",h.default.createElement("br",null),"lg ",">"," 1024px ",h.default.createElement("br",null),"可用参数:sm, md, lg, smOffset, mdOffset, lgOffset, offset, width"),h.default.createElement("div",null,h.default.createElement("br",null),h.default.createElement("br",null),h.default.createElement(_.Grid,{sm:"1/1",md:"1/2",lg:"1/4",offset:"1/12"},h.default.createElement(_.Button,{block:!0,type:"info"},"栅格"))),h.default.createElement("div",null,h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style, 继承DOM标签默认"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"响应式参数说明"),h.default.createElement("td",null,"width: 正常 ",h.default.createElement("br",null),"sm: 小于等于640px 生效 ",h.default.createElement("br",null),"md: 大于640px 且 小于等于1024px 生效 ",h.default.createElement("br",null),"lg: 大于1024px 生效"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"sm"),h.default.createElement("td",null,"屏幕宽度小于640px 生效, 参数 n/m n和m 都是数字 eg: 1/2 "),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"1/1")),h.default.createElement("tr",null,h.default.createElement("td",null,"md"),h.default.createElement("td",null,"大于640px 且 小于等于1024px 生效, 参数 n/m n和m 都是数字 eg: 1/2 "),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"1/1")),h.default.createElement("tr",null,h.default.createElement("td",null,"lg"),h.default.createElement("td",null,"大于1024px 生效, 参数 n/m n和m 都是数字 eg: 1/2 "),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"1/1")),h.default.createElement("tr",null,h.default.createElement("td",null,"smOffset"),h.default.createElement("td",null,"屏幕宽度小于640px 生效,左偏移宽度, 参数 n/m n和m 都是数字 eg: 1/2 "),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"mdOffset"),h.default.createElement("td",null,"大于640px 且 小于等于1024px 生效,左偏移宽度, 参数 n/m n和m 都是数字 eg: 1/2 "),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"lgOffset"),h.default.createElement("td",null,"大于1024px 生效,左偏移宽度, 参数 n/m n和m 都是数字 eg: 1/2 "),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"offset"),h.default.createElement("td",null,"正常左偏移宽度, 参数 n/m n和m 都是数字 eg: 1/2 "),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"width"),h.default.createElement("td",null,"正常宽度, 参数 n/m n和m 都是数字 eg: 1/2 "),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"1/1"))))),h.default.createElement("pre",null,h.default.createElement("code",null,'\nimport \'./style.scss\';\nimport React, { Component } from \'react\';\nimport {Grid,Button} from \'../../mtui/index\'\n\nclass UI extends Component {\n\t//构造函数\n\tconstructor (props) {\n\t\tsuper(props);\n\t}\n\n\trender(){\n\t\treturn (\n\t\t\t<Grid width="1/1" sm="1/1" md="1/2" lg="1/4" offset="1/12"><Button block={true} type="info">栅格</Button></Grid>\n\t\t)\n\t}\n}\n')))))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"UI","C:/DT/mtui2.0/dev/pages/UI/Grid.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/UI/Grid.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.state={val:""},n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"handleChange",value:function(e){this.setState({val:e.target.value})}},{key:"searchClick",value:function(){console.log("搜索值:",this.state.val)}},{key:"render",value:function(){return h.default.createElement(_.Panel,{header:"小图标"},h.default.createElement(_.Grid,{width:"1/1"},"图标采用:wwww.iconfont.cn ",h.default.createElement("br",null),"项目引用地址:http://at.alicdn.com/t/font_xn4aez16mb3jif6r.css ",h.default.createElement("br",null),h.default.createElement("ul",{className:"ui-icons"},h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-arrow3l"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-arrow3r"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-xia"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-shang"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-checkbox"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-checkbox1"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-loading1"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-loading2"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-danger"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-error1"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-date"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-time"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-success"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-warn"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-warning"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-search"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-user"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-password"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-arrow2l"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-arrow2b"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-arrow2r"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-arrow2t"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-more"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-arrowd"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-arrowt"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-arrowl"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-arrowr"})),h.default.createElement("li",null,h.default.createElement("i",{className:"iconfont icon-close"})))),h.default.createElement("br",null),h.default.createElement("br",null))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"Dom","C:/DT/mtui2.0/dev/pages/UI/Icons.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/UI/Icons.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=(n(8),n(16)),E=(a(_),n(237)),v=a(E),y=n(236),b=a(y),g=n(238),C=a(g),T=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){return h.default.createElement("div",{className:"ui"},h.default.createElement(v.default,null),h.default.createElement(C.default,null),h.default.createElement("div",{className:"uibody"},this.props.children),h.default.createElement(b.default,null))}}]),t}(p.Component),k=T;t.default=k;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(T,"UI","C:/DT/mtui2.0/dev/pages/UI/Index.jsx"),__REACT_HOT_LOADER__.register(k,"default","C:/DT/mtui2.0/dev/pages/UI/Index.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.state={val:""},n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"handleChange",value:function(e){this.setState({val:e.target.value})}},{key:"searchClick",value:function(){console.log("搜索值:",this.state.val)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){return h.default.createElement("div",{className:"mt-panel"},h.default.createElement("h3",{className:"mt-panel-h2"},"input"),h.default.createElement("div",{className:"mt-panel-box"},h.default.createElement(_.Grid,{width:"1/1"},h.default.createElement(_.Input,{disabled:!0,placeholder:"size:lg",size:"lg"})," ",h.default.createElement(_.Input,{placeholder:"size:nm",size:"nm"})," ",h.default.createElement(_.Input,{placeholder:"size:sm",size:"sm"})," ",h.default.createElement(_.Input,{placeholder:"size:xs",size:"xs"})," ",h.default.createElement(_.Input,{placeholder:"密码",type:"password",size:"xs"})," ",h.default.createElement(_.Input,{type:"textarea",placeholder:"textarea"})," "),h.default.createElement("br",null),h.default.createElement("br",null),h.default.createElement(_.Grid,{width:"1/1"},h.default.createElement(_.Input,{placeholder:"带小图标",prefix:h.default.createElement("i",{className:"iconfont icon-user"})})," ",h.default.createElement(_.Input,{onChange:this.handleChange.bind(this),value:this.state.val,placeholder:"带小图标",suffix:h.default.createElement("a",{onClick:this.searchClick.bind(this)},h.default.createElement("i",{className:"iconfont icon-search"}))})," "),h.default.createElement(_.Grid,null,h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style, type, defaultValue, value 继承input的标签默认"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"size"),h.default.createElement("td",null,"按钮尺寸,可用参数 nm,lg,sm,xs 或者不添加"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"type"),h.default.createElement("td",null,"按钮样式,可用参数 default,primary,success,info,warning,danger"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"default")),h.default.createElement("tr",null,h.default.createElement("td",null,"block"),h.default.createElement("td",null,"按钮是否宽度100%,参数 true/false"),h.default.createElement("td",null,"bool"),h.default.createElement("td",null,"false")),h.default.createElement("tr",null,h.default.createElement("td",null,"disabled"),h.default.createElement("td",null,"按钮是否可用,参数 false/true"),h.default.createElement("td",null,"bool"),h.default.createElement("td",null,"false")),h.default.createElement("tr",null,h.default.createElement("td",null,"prefix"),h.default.createElement("td",null,"前面的图标,参数可以是一个字体图标",'<i className="iconfont ico-user"></i>'),h.default.createElement("td",null,"Component"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"suffix"),h.default.createElement("td",null,"后面的图标,参数可以是一个字体图标",'<i className="iconfont ico-search"></i>'),h.default.createElement("td",null,"Component"),h.default.createElement("td",null,"null"))))),h.default.createElement("pre",null,h.default.createElement("code",null,'\n\'use strict\';\n\nimport \'./style.scss\';\nimport React, { Component } from \'react\';\nimport {Grid,Input} from \'../../mtui/index\'\n\nclass Dom extends Component {\n\t//构造函数\n\tconstructor (props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tval : \'\'\n\t\t}\n\t}\n\n\thandleChange(e){\n\t\tthis.setState({\n\t\t\tval:e.target.value\n\t\t})\n\t}\n\n\tsearchClick(){\n\t\tconsole.log("搜索值:",this.state.val)\n\t}\n\n\tcomponentDidMount() {\n\t \t \n\t}\n\n\trender(){\n\t\treturn (\n\t <div className="mt-panel">\n \t\t<h3 className="mt-panel-h2">input</h3>\n\t \t<div className="mt-panel-box">\n\t \t\t<Grid width="1/1">\n\t \t\t\t<Input placeholder="size:lg" size="lg"/>&nbsp;\n\t \t\t\t<Input placeholder="size:nm" size="nm"/>&nbsp;\n\t \t\t\t<Input placeholder="size:sm" size="sm"/>&nbsp;\n\t \t\t\t<Input placeholder="size:xs" size="xs"/>&nbsp;\n\t \t\t</Grid>\n\t \t\t<br/>\n\t \t\t<br/>\n\t \t\t<Grid width="1/1">\n\t \t\t\t<Input placeholder="带小图标" prefix={<i className="iconfont icon-user"></i>}/>&nbsp;\n\t \t\t\t<Input onChange={this.handleChange.bind(this)} value={this.state.val} placeholder="带小图标" suffix={<a onClick={this.searchClick.bind(this)}><i className="iconfont icon-search"></i></a>}/>&nbsp;\n\t \t\t</Grid>\n\t \t</div>\n\t </div>\n\t );\n\t}\n}\n\n//主页\nexport default Dom;\n')))))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"Dom","C:/DT/mtui2.0/dev/pages/UI/Input.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/UI/Input.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){return h.default.createElement(_.Grid,{width:"1/1"},h.default.createElement(_.Grid,{width:"1/1"},h.default.createElement(_.Panel,{header:"Limit"},h.default.createElement(_.Limit,{size:"10"},"字数超过10个会自动以省略号结束。这个组件很有用!"),h.default.createElement("div",null,h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style, 继承DOM标签默认"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"size"),h.default.createElement("td",null,"字数限制,超出字数限制就会出现..."),h.default.createElement("td",null,"number"),h.default.createElement("td",null,"null"))))),h.default.createElement("pre",null,h.default.createElement("code",null,"\n'use strict';\n\nimport './style.scss';\nimport React, { Component } from 'react';\nimport { Grid, Panel, Limit } from '../../mtui/index';\n\nclass UI extends Component {\n\t//构造函数\n\tconstructor(props) {\n\t\tsuper(props);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Grid width=\"1/1\">\n\t\t\t\t<Grid width=\"1/1\">\n\t\t\t\t\t<Panel header=\"Limit\">\n\t\t\t\t\t\t<Limit size=\"10\">字数超过10个会自动以省略号结束。这个组件很有用!</Limit>\n\t\t\t\t\t</Panel>\n\t\t\t\t</Grid>\n\t\t\t</Grid>\n\t\t);\n\t}\n}\n\n//主页\nexport default UI;\n"))))))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"UI","C:/DT/mtui2.0/dev/pages/UI/Limit.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/UI/Limit.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"onClickLoading",value:function(e){e?_.LoadingModal.show("loading"):_.LoadingModal.hide(),setTimeout(function(){_.LoadingModal.hide()},2e3)}},{key:"render",value:function(){return h.default.createElement(_.Panel,{header:"Loading"},h.default.createElement(_.Grid,{style:{background:"rgba(0,0,0,.1)",height:100},width:"1/7"},h.default.createElement(_.LoadingBox,{show:!0,info:"loading...",type:"loading1"}))," ",h.default.createElement(_.Grid,{style:{background:"rgba(0,0,0,.1)",height:100},width:"2/7"},h.default.createElement(_.LoadingBox,{info:"数据载入中",type:"loading2"}))," ",h.default.createElement(_.Grid,{style:{background:"rgba(0,0,0,.1)",height:100},width:"1/7"},h.default.createElement(_.LoadingBox,{info:"数据载入中",type:"loading3"}))," ",h.default.createElement(_.Grid,{style:{background:"rgba(0,0,0,.1)",height:100},width:"1/7"},h.default.createElement(_.LoadingBox,{info:"数据载入中",type:"loading4"}))," ",h.default.createElement(_.Grid,{style:{background:"rgba(0,0,0,.1)",height:100},width:"1/7"},h.default.createElement(_.LoadingBox,{info:"数据载入中",type:"loading5"})),h.default.createElement("br",null),h.default.createElement("br",null),h.default.createElement(_.Button,{onClick:this.onClickLoading.bind(this,!0),type:"success"},"Loading弹出")," ",h.default.createElement(_.Button,{onClick:this.onClickLoading.bind(this,!1),type:"warning"},"Loading销毁"),h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"LoadingBox: className, style 等默认属性继承DIV标签默认, LoadingModal是一个对象。下面有 show(), hide() 方法。"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"info"),h.default.createElement("td",null,"加载提示内容,默认参数:loading..."),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"loading...")),h.default.createElement("tr",null,h.default.createElement("td",null,"show"),h.default.createElement("td",null,"loading显示状态"),h.default.createElement("td",null,"bool"),h.default.createElement("td",null,"true")),h.default.createElement("tr",null,h.default.createElement("td",null,"type"),h.default.createElement("td",null,"loading的样式,有五种。 loading1 ~ loading5"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"loading3"))))),h.default.createElement("pre",null,h.default.createElement("code",null,"\n'use strict';\n\nimport './style.scss';\nimport React, { Component } from 'react';\nimport {Grid,Panel,LoadingBox,LoadingModal,Button} from '../../mtui/index'\n\nclass UI extends Component {\n //构造函数\n constructor (props) {\n super(props);\n }\n\n onClickLoading(mark){\n if(mark){\n LoadingModal.show('loading')\n }else{\n LoadingModal.hide()\n }\n }\n\n render(){\n return (\n <Panel header=\"Loading\">\n\n <Grid style={{background:'rgba(0,0,0,.1)', height:100}} width=\"1/7\">\n <LoadingBox show={true} info='loading...' type=\"loading1\"/>\n </Grid>\n &nbsp;\n <Grid style={{background:'rgba(0,0,0,.1)', height:100}} width=\"2/7\">\n <LoadingBox info='数据载入中' type=\"loading2\"/>\n </Grid>\n &nbsp;\n <Grid style={{background:'rgba(0,0,0,.1)', height:100}} width=\"1/7\">\n <LoadingBox info='数据载入中' type=\"loading3\"/>\n </Grid>\n &nbsp;\n <Grid style={{background:'rgba(0,0,0,.1)', height:100}} width=\"1/7\">\n <LoadingBox info='数据载入中' type=\"loading4\"/>\n </Grid>\n &nbsp;\n <Grid style={{background:'rgba(0,0,0,.1)', height:100}} width=\"1/7\">\n <LoadingBox info='数据载入中' type=\"loading5\"/>\n </Grid>\n\n <br/><br/>\n <Button onClick={this.onClickLoading.bind(this,true)} type=\"success\">Loading弹出</Button>\n &nbsp;\n <Button onClick={this.onClickLoading.bind(this,false)} type=\"warning\">Loading销毁</Button>\n </Panel> \n );\n }\n}\n ")))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"UI","C:/DT/mtui2.0/dev/pages/UI/Loading.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/UI/Loading.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.addArr=function(){return n.__addArr__REACT_HOT_LOADER__.apply(n,arguments)},n.state={name:"111",arr:[0,0,0]},n.modalID2=null,n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"__addArr__REACT_HOT_LOADER__",value:function(){return this.__addArr__REACT_HOT_LOADER__.apply(this,arguments)}},{key:"__addArr__REACT_HOT_LOADER__",value:function(){this.state.arr.push(0),this.setState({arr:this.state.arr})}},{key:"showBack",value:function(){console.log("弹窗开启,2秒后,自动变化值!");var e=this;setTimeout(function(){e.setState({name:"2222"})},2e3)}},{key:"closeBack",value:function(){console.log("弹窗关闭")}},{key:"showOrHide",value:function(){this.modalID2.showModal(!0)}},{key:"render",value:function(){var e=this;return h.default.createElement("div",{className:"mt-panel"},h.default.createElement("div",{className:"mt-panel-h2"},"Modal弹窗"),h.default.createElement("div",{className:"mt-panel-box"},h.default.createElement(_.Modal,{btn:h.default.createElement("a",{className:"mt-btn mt-btn-success"},h.default.createElement("i",null,"弹窗")),modalClassName:"animated bounceInDown",style:{width:200,height:180},showBack:this.showBack.bind(this),closeBack:this.closeBack.bind(this)},h.default.createElement("div",{className:"mt-panel-min"},h.default.createElement("div",{className:"mt-panel-h2"},"标题"),h.default.createElement("div",{className:"mt-panel-box"},this.state.name,"内容...")))," ",h.default.createElement(_.Modal,{ref:function(t){e.modalID2=t},style:{width:200,height:180}},h.default.createElement("div",{className:"mt-panel-min"},h.default.createElement("div",{className:"mt-panel-h2",onClick:this.addArr},"标题"),h.default.createElement("div",{className:"mt-panel-box",style:{height:100,overflow:"auto"}},this.state.arr.map(function(e,t){return h.default.createElement("li",{style:{marginBottom:20},key:t},h.default.createElement(_.DatePicker,{size:"xs",style:{width:100},defaultValue:"",format:"yyyy-mm-dd", placeholder:"选择日期"}))})))),h.default.createElement(_.Button,{onClick:this.showOrHide.bind(this)},"点击我控制弹窗"),h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style 等继承DIV"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"showBack"),h.default.createElement("td",null,"显示弹窗的回调函数"),h.default.createElement("td",null,"function"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"closeBack"),h.default.createElement("td",null,"关闭弹窗的回调函数"),h.default.createElement("td",null,"function"),h.default.createElement("td",null,"null"))))),h.default.createElement("pre",null,h.default.createElement("code",null,'\n\'use strict\';\n\nimport \'./style.scss\';\nimport React, { Component } from \'react\';\nimport {Modal, Grid, Button} from \'../../mtui/index\'\n\nclass UI extends Component {\n //构造函数\n constructor (props) {\n super(props);\n this.state = {\n name : \'111\'\n }\n }\n\n showBack() {\n console.log(\'弹窗开启,2秒后,自动变化值!\')\n var _this = this;\n setTimeout(function(){\n _this.setState({\n name: \'2222\'\n });\n }, 2000) \n }\n\n closeBack(){\n console.log(\'弹窗关闭\');\n }\n\n showOrHide(){\n this.refs.modalID2.showModal(true);\n }\n\n render(){\n return (\n <div className="mt-panel">\n <div className="mt-panel-h2">Modal弹窗</div>\n <div className="mt-panel-box">\n <Modal btn={<a className="mt-btn mt-btn-success"><i>弹窗</i></a>} modalClassName="animated bounceInDown" style={{width:200, height:180}} showBack={this.showBack.bind(this)} closeBack={this.closeBack.bind(this)}>\n <div className="mt-panel-min">\n <div className="mt-panel-h2">标题</div>\n <div className="mt-panel-box">{this.state.name}内容...</div>\n </div>\n </Modal>\n &nbsp;\n <Modal ref="modalID2" modalClassName="animated bounceInDown" style={{width:200, height:180}} showBack={this.showBack.bind(this)} closeBack={this.closeBack.bind(this)}>\n <div className="mt-panel-min">\n <div className="mt-panel-h2">标题</div>\n <div className="mt-panel-box">{this.state.name}内容...</div>\n </div>\n </Modal>\n <Button onClick={this.showOrHide.bind(this)}>点击我控制弹窗</Button>\n </div>\n </div>\n );\n }\n}\n\n//主页\nexport default UI;\n'))),h.default.createElement(_.Grid,{className:"code",width:"2/2"}))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"UI","C:/DT/mtui2.0/dev/pages/UI/Modal.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/UI/Modal.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=(n(8),function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){return h.default.createElement("div",{className:"mt-panel"},h.default.createElement("div",{className:"mt-404"},h.default.createElement("div",{className:"mt-404-title"},"404"),h.default.createElement("div",{className:"mt-404-info"},"Page Not Found"),h.default.createElement("div",{className:"mt-404-content"},h.default.createElement("p",null,"对不起,没有找到您所需要的页面,可能是URL不确定,或者页面已被移除。"),h.default.createElement("button",{type:"button",className:"mt-btn mt-btn-primary"},"Back Home"))))}}]),t}(p.Component)),E=_;t.default=E;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(_,"UI","C:/DT/mtui2.0/dev/pages/UI/Page404.jsx"),__REACT_HOT_LOADER__.register(E,"default","C:/DT/mtui2.0/dev/pages/UI/Page404.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.ajax=function(){return n.__ajax__REACT_HOT_LOADER__.apply(n,arguments)},n.callback=function(){return n.__callback__REACT_HOT_LOADER__.apply(n,arguments)},n.onNewPage=function(){return n.__onNewPage__REACT_HOT_LOADER__.apply(n,arguments)},n.state={total:0,pageListKey:+new Date},n.timer=null,n.refsPageList=null,n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"__onNewPage__REACT_HOT_LOADER__",value:function(){return this.__onNewPage__REACT_HOT_LOADER__.apply(this,arguments)}},{key:"__callback__REACT_HOT_LOADER__",value:function(){return this.__callback__REACT_HOT_LOADER__.apply(this,arguments)}},{key:"__ajax__REACT_HOT_LOADER__",value:function(){return this.__ajax__REACT_HOT_LOADER__.apply(this,arguments)}},{key:"__ajax__REACT_HOT_LOADER__",value:function(e,t){var n=this;console.log("分页回调 ajax 请求 current:",e),this.timer=setTimeout(function(){var e=200;n.setState({total:e},function(){t&&n.refsPageList.refresh()})},100)}},{key:"__callback__REACT_HOT_LOADER__",value:function(e){console.log(e),this.ajax(e.current)}},{key:"__onNewPage__REACT_HOT_LOADER__",value:function(){this.ajax(1,!0)}},{key:"componentWillUnmount",value:function(){this.timer&&clearTimeout(this.timer)}},{key:"componentDidMount",value:function(){this.ajax(1)}},{key:"toPage",value:function(e){this.refsPageList.toPage(this.refs.num.getValue())}},{key:"render",value:function(){var e=this;return h.default.createElement("div",{className:"mt-panel"},h.default.createElement("h3",{className:"mt-panel-h2"},"分页"),h.default.createElement("div",{className:"mt-panel-box"},h.default.createElement(_.Grid,{width:"2/2"},h.default.createElement("a",{onClick:this.onNewPage},"切换"),"  ",h.default.createElement(_.PageList,{ref:function(t){e.refsPageList=t},current:1,pageSize:10,callback:this.callback,total:this.state.total})," ",h.default.createElement(_.Input,{style:{width:50},defaultValue:"",ref:"num",size:"xm",type:"text"})," ",h.default.createElement(_.Button,{size:"sm",onClick:this.toPage.bind(this)},"跳转")),h.default.createElement(_.Grid,{width:"1/1",className:"code"},h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style 继承DOM标签默认"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"size"),h.default.createElement("td",null,"中间预留页码个数"),h.default.createElement("td",null,"number"),h.default.createElement("td",null,"3")),h.default.createElement("tr",null,h.default.createElement("td",null,"pageSize"),h.default.createElement("td",null,"每页显示多少条数据"),h.default.createElement("td",null,"number"),h.default.createElement("td",null,"10")),h.default.createElement("tr",null,h.default.createElement("td",null,"total"),h.default.createElement("td",null,"总共有多少条数据,这里必须是异步设置total的,同步设置无效"),h.default.createElement("td",null,"number"),h.default.createElement("td",null,"0")),h.default.createElement("tr",null,h.default.createElement("td",null,"current"),h.default.createElement("td",null,"默认选中页码"),h.default.createElement("td",null,"number"),h.default.createElement("td",null,"1")),h.default.createElement("tr",null,h.default.createElement("td",null,"callback"),h.default.createElement("td",null,"选择页码后的回调函数。callback(current, total, pageSize)"),h.default.createElement("td",null,"function"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"toPage()"),h.default.createElement("td",null,"这个方法不重新渲染组件进行页面的自动跳转,使用说明: this.refs.pageList.toPage(current)"),h.default.createElement("td",null,"function"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"refresh()"),h.default.createElement("td",null,"这个方法是手动刷新组件的方法。传入 一个 current 刷新后,默认跳转到第几页。可不填,默认是第一页, 使用说明: this.refs.pageList.refresh(current)"),h.default.createElement("td",null,"function"),h.default.createElement("td",null,"null"))))),h.default.createElement("pre",null,h.default.createElement("code",null,'\n// pagelist 提供了两个方法\n// @param toPage:这个方法不重新渲染组件进行页面的自动跳转\n// @param refresh: 这个方法是刷新组件的方法。传入 一个 current 刷新后,默认跳转到第几页。可不填,默认是第一页\n\n\'use strict\';\n\nimport \'./style.scss\';\nimport React, { Component } from \'react\';\nimport {PageList, Input, Button, Grid} from \'../../mtui/index\';\n\nclass UI extends Component {\n // 构造函数\n constructor (props) {\n super(props);\n this.state = {\n total: 0,\n pageListKey: +new Date()\n };\n this.timer = null;\n\n this.refsPageList = null;\n }\n\n // 模拟 ajax 异步\n ajax = (current, refresh) => {\n console.log(\'分页回调 ajax 请求 current:\', current);\n this.timer = setTimeout(() => {\n let total = 200;\n this.setState({\n total: total\n }, () => {\n if(refresh){\n this.refsPageList.refresh();\n }\n });\n }, 100);\n }\n\n // 分页点击后执行\n callback = (obj) => {\n console.log(obj);\n // this.ajax(obj);\n this.ajax(obj.current);\n }\n\n onNewPage = () => {\n this.ajax(1, true);\n \n }\n\n componentWillUnmount() {\n if(this.timer){\n clearTimeout(this.timer); \n }\n }\n\n componentDidMount() {\n this.ajax(1);\n }\n\n toPage(e){\n this.refsPageList.toPage(this.refs.num.getValue());\n }\n\n render(){\n return (\n <div className="mt-panel">\n <h3 className="mt-panel-h2">分页</h3>\n <div className="mt-panel-box">\n <Grid width=\'2/2\'>\n <a onClick={ this.onNewPage }>切换</a>&nbsp;&nbsp;\n <PageList ref={ (c) => { this.refsPageList = c; }} current={1} pageSize={10} callback={this.callback} total={this.state.total}/>\n &nbsp;<Input style={{width: 50}} defaultValue="" ref="num" size="xm" type="text" />\n &nbsp;<Button size="sm" onClick={this.toPage.bind(this)}>跳转</Button>\n </Grid>\n </div>\n </div>\n );\n }\n\n //\n}\n\n//主页\nexport default UI;\n')))))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"UI","C:/DT/mtui2.0/dev/pages/UI/Pagelist.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/UI/Pagelist.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){return h.default.createElement(_.Grid,{width:"1/1"},h.default.createElement(_.Grid,{width:"1/2",sm:"2/2"},h.default.createElement(_.Panel,{header:"面板1"},"这是一个响应式案例,缩小到640px试试",h.default.createElement("br",null),".mt-panel",h.default.createElement("br",null),".mt-panel-h2",h.default.createElement("br",null),".mt-panel-box",h.default.createElement("br",null))),h.default.createElement(_.Grid,{width:"1/2",sm:"2/2"},h.default.createElement(_.Panel,{header:"面板2"},"这是一个响应式案例,缩小到640px试试",h.default.createElement("br",null),".mt-panel",h.default.createElement("br",null),".mt-panel-h2",h.default.createElement("br",null),".mt-panel-box",h.default.createElement("br",null))),h.default.createElement(_.Grid,{width:"1/1"},h.default.createElement(_.Panel,{size:"min",header:"面板3"},"小面板")),h.default.createElement(_.Grid,{width:"1/1"},h.default.createElement(_.Panel,{size:"xm",header:"面板3"},"小面板")),h.default.createElement("div",null,h.default.createElement(_.Panel,null,h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style, 继承DOM标签默认"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"header"),h.default.createElement("td",null,"面板标题内容"),h.default.createElement("td",null,"Component/string"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"size"),h.default.createElement("td",null,"面板大小,参数:min,或者不填写"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"null")))))),h.default.createElement("pre",null,h.default.createElement("code",null,'\n\'use strict\';\n\nimport \'./style.scss\';\nimport React, { Component } from \'react\';\nimport {Grid,Panel} from \'../../mtui/index\'\n\nclass UI extends Component {\n\t//构造函数\n\tconstructor (props) {\n\t\tsuper(props);\n\t}\n\n\trender(){\n\t\treturn (\n\t\t\t<Grid width="1/1">\n\t\t\t\t<Grid width="1/2" sm="2/2">\n\t\t\t\t\t<Panel header="面板1">\n\t\t\t\t\t\t这是一个响应式案例,缩小到640px试试<br/>\n\t\t\t \t.mt-panel<br/>\n\t\t\t \t.mt-panel-h2<br/>\n\t\t\t \t.mt-panel-box<br/>\n\t\t\t\t\t</Panel>\t\n\t\t </Grid>\n\t\t <Grid width="1/2" sm="2/2">\n\t\t \t<Panel header="面板2">\n\t\t\t\t\t\t这是一个响应式案例,缩小到640px试试<br/>\n\t\t\t \t.mt-panel<br/>\n\t\t\t \t.mt-panel-h2<br/>\n\t\t\t \t.mt-panel-box<br/>\n\t\t\t\t\t</Panel>\n\t\t </Grid>\n\t\t <Grid width="1/1">\n\t\t \t<Panel size="min" header="面板3">\n\t\t \t\t小面板\n\t\t\t\t\t</Panel>\n\t\t </Grid>\n\t </Grid>\n\t );\n\t}\n}\n'))))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"UI","C:/DT/mtui2.0/dev/pages/UI/Panel.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/UI/Panel.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){return h.default.createElement(_.Panel,{header:"Popconfirm"},h.default.createElement("pre",null,h.default.createElement("code",null,"\n作者很懒,还没来得及做...\n")))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"UI","C:/DT/mtui2.0/dev/pages/UI/Popconfirm.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/UI/Popconfirm.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.state={show:!1},n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"onClickHandler",value:function(e,t){console.log("点击了button的click",e),this.setState({show:!this.state.show})}},{key:"render",value:function(){var e=this;return h.default.createElement(_.Panel,{header:"Popover"},h.default.createElement(_.Popover,{show:this.state.show,trigger:"click",content:"就是一个小提示!",place:"top"},h.default.createElement("a",null,"click弹窗在上")),"   ",h.default.createElement(_.Popover,{show:this.state.show,trigger:"click",content:"就是一个小提示!",place:"top"},h.default.createElement(_.Button,{type:"info"},"click弹窗在上")),"   ",h.default.createElement(_.Popover,{trigger:"click",content:"就是一个小提示!",place:"bottom"},h.default.createElement(_.Button,{onClick:function(){return e.onClickHandler(1)},type:"warning"},"click弹窗在下")),"   ",h.default.createElement(_.Popover,{trigger:"click",content:"就是一个小提示!",place:"left"},h.default.createElement(_.Button,{type:"success"},"click弹窗在左")),"   ",h.default.createElement(_.Popover,{trigger:"click",content:"就是一个小提示!",place:"right"},h.default.createElement(_.Button,{type:"danger"},"click弹窗在右")),h.default.createElement("br",null),h.default.createElement("br",null),h.default.createElement("br",null),h.default.createElement("br",null),h.default.createElement(_.Popover,{trigger:"hover",content:"就是一个小提示!",place:"top"},h.default.createElement(_.Button,{type:"info"},"hover弹窗在上")),"   ",h.default.createElement(_.Popover,{trigger:"hover",content:"就是一个小提示!",place:"bottom"},h.default.createElement(_.Button,{type:"warning"},"hover弹窗在下")),"   ",h.default.createElement(_.Popover,{trigger:"hover",content:"就是一个小提示!",place:"left"},h.default.createElement(_.Button,{type:"success"},"hover弹窗在左")),"   ",h.default.createElement(_.Popover,{trigger:"hover",content:"就是一个小提示!",place:"right"},h.default.createElement(_.Button,{type:"danger"},"hover弹窗在右")),h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style 等默认属性继承DIV标签默认"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"trigger"),h.default.createElement("td",null,"交互方式,参数:hover,click"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"hover")),h.default.createElement("tr",null,h.default.createElement("td",null,"content"),h.default.createElement("td",null,"提示框里面的内容"),h.default.createElement("td",null,"Component"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"place"),h.default.createElement("td",null,"提示框的位置,参数:top, left, right, bottom"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"top")),h.default.createElement("tr",null,h.default.createElement("td",null,"show"),h.default.createElement("td",null,"提示框默认显示状态, 参数 true/false"),h.default.createElement("td",null,"bool"),h.default.createElement("td",null,"false"))))),h.default.createElement("pre",null,h.default.createElement("code",null,"\n'use strict';\n\nimport './style.scss';\nimport React, { Component } from 'react';\nimport {Grid,Panel,Button,Popover} from '../../mtui/index'\n\nclass UI extends Component {\n //构造函数\n constructor (props) {\n super(props);\n }\n\n onClickHandler(data,e){\n console.log('点击了button的click',data)\n this.setState({\n show: !this.state.show\n })\n }\n\n render(){\n return (\n <Panel header=\"Popover\">\n <Popover show={this.state.show} trigger=\"click\" content={'就是一个小提示!'} place=\"top\">\n <Button type=\"info\">click弹窗在上</Button>\n </Popover>\n &nbsp;\n &nbsp;\n <Popover trigger=\"click\" content={'就是一个小提示!'} place='bottom'>\n <Button onClick={() => this.onClickHandler(1) } type=\"warning\">click弹窗在下</Button>\n </Popover>\n &nbsp;\n &nbsp;\n <Popover trigger=\"click\" content={'就是一个小提示!'} place='left'>\n <Button type=\"success\">click弹窗在左</Button>\n </Popover>\n &nbsp;\n &nbsp;\n <Popover trigger=\"click\" content={'就是一个小提示!'} place='right'>\n <Button type=\"danger\">click弹窗在右</Button>\n </Popover>\n <br/>\n <br/>\n <br/>\n <br/>\n <Popover trigger=\"hover\" content={'就是一个小提示!'} place=\"top\">\n <Button type=\"info\">hover弹窗在上</Button>\n </Popover>\n &nbsp;\n &nbsp;\n <Popover trigger=\"hover\" content={'就是一个小提示!'} place='bottom'>\n <Button type=\"warning\">hover弹窗在下</Button>\n </Popover>\n &nbsp;\n &nbsp;\n <Popover trigger=\"hover\" content={'就是一个小提示!'} place='left'>\n <Button type=\"success\">hover弹窗在左</Button>\n </Popover>\n &nbsp;\n &nbsp;\n <Popover trigger=\"hover\" content={'就是一个小提示!'} place='right'>\n <Button type=\"danger\">hover弹窗在右</Button>\n </Popover>\n </Panel> \n );\n }\n}\n ")))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"UI","C:/DT/mtui2.0/dev/pages/UI/Popover.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/UI/Popover.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.state={value:.5},n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"add",value:function(){var e=this.state.value;e+=.1,e>1&&(e=1),this.setState({value:e})}},{key:"del",value:function(){var e=this.state.value;e-=.1,e<0&&(e=0),this.setState({value:e})}},{key:"render",value:function(){return h.default.createElement(_.Panel,{header:"Progress"},h.default.createElement(_.Progress,{fixed:0,value:this.state.value,strokeWidth:4}),"  ",h.default.createElement(_.Progress,{size:200,fixed:1,bgColor:"#dcdcdc",barColor:"#F00",value:this.state.value,strokeWidth:4}),"  ",h.default.createElement(_.Button,{type:"info",onClick:this.add.bind(this)},"+")," ",h.default.createElement(_.Button,{type:"info",onClick:this.del.bind(this)},"-"),h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style 等默认属性继承DIV标签默认"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"fixed"),h.default.createElement("td",null,"保留小数点的位数"),h.default.createElement("td",null,"number"),h.default.createElement("td",null,"1")),h.default.createElement("tr",null,h.default.createElement("td",null,"size"),h.default.createElement("td",null,"圆的大小"),h.default.createElement("td",null,"number"),h.default.createElement("td",null,"100")),h.default.createElement("tr",null,h.default.createElement("td",null,"value"),h.default.createElement("td",null,"默认值,参数 0 ~ 1"),h.default.createElement("td",null,"float"),h.default.createElement("td",null,"0")),h.default.createElement("tr",null,h.default.createElement("td",null,"strokeWidth"),h.default.createElement("td",null,"边框的宽度"),h.default.createElement("td",null,"number"),h.default.createElement("td",null,"6")),h.default.createElement("tr",null,h.default.createElement("td",null,"bgColor"),h.default.createElement("td",null,"边框的底色"),h.default.createElement("td",null,"color"),h.default.createElement("td",null,"#f3f3f3")),h.default.createElement("tr",null,h.default.createElement("td",null,"barColor"),h.default.createElement("td",null,"边框颜色"),h.default.createElement("td",null,"color"),h.default.createElement("td",null,"#108ee9"))))),h.default.createElement("pre",null,h.default.createElement("code",null,'\n\'use strict\';\n\nimport \'./style.scss\';\nimport React, { Component } from \'react\';\nimport {Grid,Panel,Progress,Button} from \'../../mtui/index\'\n\nclass UI extends Component {\n //构造函数\n constructor (props) {\n super(props);\n this.state = {\n value : 0.5\n }\n }\n\n add(){\n let val = this.state.value;\n val+=0.1;\n if(val > 1){\n val = 1;\n }\n this.setState({\n value: val\n })\n }\n\n del(){\n let val = this.state.value;\n val-=0.1;\n if(val < 0){\n val = 0;\n }\n this.setState({\n value: val\n })\n }\n\n render(){\n return (\n <Panel header="Progress">\n <Progress fixed={0} value={this.state.value} strokeWidth={4}/>\n &nbsp;&nbsp;\n <Progress size={200} fixed={1} bgColor="#dcdcdc" barColor="#F00" value={this.state.value} strokeWidth={4}/>\n &nbsp;&nbsp;\n <Button type="info" onClick={this.add.bind(this)}>+</Button>\n &nbsp;\n <Button type="info" onClick={this.del.bind(this)}>-</Button>\n </Panel>\t\n );\n }\n}\n ')))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"UI","C:/DT/mtui2.0/dev/pages/UI/Progress.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/UI/Progress.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=_.Radio.RadioGroup,v=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.state={checked:!0,value:"1"},n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"onChange",value:function(e){this.setState({checked:e})}},{key:"onChangeGroup",value:function(e){this.setState({value:e.value})}},{key:"defaultClick",value:function(){console.log(this.refs.radioDefault.getValue())}},{key:"onChangeGroup2",value:function(e){console.log(e)}},{key:"render",value:function(){return h.default.createElement("div",{className:"mt-panel"},h.default.createElement("h3",{className:"mt-panel-h2"},"按钮"),h.default.createElement("div",{className:"mt-panel-box"},h.default.createElement(_.Grid,{width:"2/2",className:"btns"},h.default.createElement(_.Radio,{checked:this.state.checked,onChange:this.onChange.bind(this),value:"0"},"选项0"),"  ",h.default.createElement(_.Radio,{disabled:!0,checked:!0,onChange:this.onChange.bind(this),value:"0"},"选项0"),h.default.createElement("br",null),h.default.createElement("br",null),h.default.createElement("h4",null,"受控组件"),h.default.createElement(E,{value:this.state.value,onChange:this.onChangeGroup.bind(this)},h.default.createElement(_.Radio,{value:"1"},"选项1"),h.default.createElement(_.Radio,{value:"2"},"选项2"),h.default.createElement(_.Radio,{value:"3"},"选项3")),h.default.createElement("br",null),h.default.createElement("h4",null,"不受控组件"),h.default.createElement(_.Radio,{ref:"radioDefault",defaultChecked:!0,value:"MT",onClick:this.defaultClick.bind(this)},"选项MT"),h.default.createElement(E,{defaultValue:"2",onChange:this.onChangeGroup2.bind(this)},h.default.createElement(_.Radio,{value:"1"},"选项1"),h.default.createElement(_.Radio,{value:"2"},"选项2"),h.default.createElement(_.Radio,{value:"3"},"选项3")),h.default.createElement("br",null),h.default.createElement("h4",null,"不受控组件"),h.default.createElement(E,{type:"button",defaultValue:"2",onChange:this.onChangeGroup2.bind(this)},h.default.createElement(_.Radio,{value:"1"},"选项1"),h.default.createElement(_.Radio,{value:"2"},"选项2"),h.default.createElement(_.Radio,{value:"3"},"选项3"))),h.default.createElement(_.Grid,{width:"1/1"},h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style, defaultValue, value, checked 继承原来的标签默认"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"onChange"),h.default.createElement("td",null,"选择值后的回调函数 callback(data, props, e)"),h.default.createElement("td",null,"function"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"checked"),h.default.createElement("td",null,"受控组件 选中状态 true/false"),h.default.createElement("td",null,"bool"),h.default.createElement("td",null,"false")),h.default.createElement("tr",null,h.default.createElement("td",null,"defaultValue"),h.default.createElement("td",null,"不受控组件 选中状态 true/false"),h.default.createElement("td",null,"bool"),h.default.createElement("td",null,"false"))))),h.default.createElement("pre",null,h.default.createElement("code",null,'\nimport \'./style.scss\';\nimport React, { Component } from \'react\';\nimport {Grid,Button,Radio} from \'../../mtui/index\'\n\nconst RadioGroup = Radio.RadioGroup;\n\nclass Dom extends Component {\n //构造函数\n constructor (props) {\n super(props);\n this.state = {\n checked: true,\n value:\'1\'\n }\n }\n\n onChange(data){\n this.setState({\n checked:data\n })\n }\n\n onChangeGroup(data){\n this.setState({\n value: data.value\n })\n }\n\n onChangeGroup2(data){\n console.log(data)\n }\n\n render(){\n return (\n <div className="mt-panel">\n <h3 className="mt-panel-h2">按钮</h3>\n <div className="mt-panel-box">\n <Grid width="2/2" className="btns">\n\n <Radio checked={this.state.checked} onChange={this.onChange.bind(this)} value="0">选项0</Radio> &nbsp;\n <Radio disabled={true} checked={true} onChange={this.onChange.bind(this)} value="0">选项0</Radio>\n\n <br/>\n <br/>\n <h4>受控组件</h4>\n <RadioGroup value={this.state.value} onChange={this.onChangeGroup.bind(this)}>\n <Radio value="1">选项1</Radio>\n <Radio value="2">选项2</Radio>\n <Radio value="3">选项3</Radio>\n </RadioGroup>\n <br/>\n\n <h4>不受控组件</h4>\n <RadioGroup defaultValue=\'2\' onChange={this.onChangeGroup2.bind(this)}>\n <Radio value="1">选项1</Radio>\n <Radio value="2">选项2</Radio>\n <Radio value="3">选项3</Radio>\n </RadioGroup>\n <br/>\n\n <h4>不受控组件</h4>\n <RadioGroup type="button" defaultValue=\'2\' onChange={this.onChangeGroup2.bind(this)}>\n <Radio value="1">选项1</Radio>\n <Radio value="2">选项2</Radio>\n <Radio value="3">选项3</Radio>\n </RadioGroup>\n\n </Grid>\n </div>\n </div>\n );\n }\n}\n'))))); }}]),t}(p.Component),y=v;t.default=y;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"RadioGroup","C:/DT/mtui2.0/dev/pages/UI/Radio.jsx"),__REACT_HOT_LOADER__.register(v,"Dom","C:/DT/mtui2.0/dev/pages/UI/Radio.jsx"),__REACT_HOT_LOADER__.register(y,"default","C:/DT/mtui2.0/dev/pages/UI/Radio.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=_.Select.Option,v=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.state={name:10,val:"2"},n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"onChange",value:function(e){console.log("close",e.target.value),this.setState({val:e.target.value})}},{key:"showBack",value:function(){console.log("show")}},{key:"setValue",value:function(){this.setState({val:"2"})}},{key:"render",value:function(){return h.default.createElement("div",{className:"mt-panel"},h.default.createElement("div",{className:"mt-panel-h2"},"Select"),h.default.createElement("div",{className:"mt-panel-box"},h.default.createElement(_.Select,{defaultValue:"",style:{width:90},modalStyle:{height:100},showBack:this.showBack.bind(this),onChange:this.onChange.bind(this),trigger:"click"},h.default.createElement(E,{value:""},"all"),h.default.createElement(E,{value:"1"},"选项1"),h.default.createElement(E,{value:"2"},"选项2"),h.default.createElement(E,{value:"3"},"选项3"),h.default.createElement(E,{value:"4"},"选项4"),h.default.createElement(E,{value:"5"},"选项5"),h.default.createElement(E,{value:"6"},"选项6"),h.default.createElement(E,{value:"7"},"选项7"),h.default.createElement(E,{value:"8"},"选项8"),h.default.createElement(E,{value:"9"},"选项9"),h.default.createElement(E,{value:"10"},"选项10"))," ",h.default.createElement(_.Select,{defaultValue:null,style:{width:90},trigger:"click"},h.default.createElement(E,{value:""},"all"),h.default.createElement(E,{value:"1"},"选项1"),h.default.createElement(E,{value:"2"},"选项2"),h.default.createElement(E,{value:"3"},"选项3"))," ",h.default.createElement(_.Select,{value:this.state.val,style:{width:90},showBack:this.showBack.bind(this),onChange:this.onChange.bind(this),trigger:"hover"},h.default.createElement(E,{value:"1"},"选项1"),h.default.createElement(E,{value:"2"},"选项2"),h.default.createElement(E,{value:"3"},"选项3"),h.default.createElement(E,{value:"4"},"选项4"),h.default.createElement(E,{value:"5"},"选项5"),h.default.createElement(E,{value:"6"},"选项6"),h.default.createElement(E,{value:"7"},"选项7"),h.default.createElement(E,{value:"8"},"选项8"),h.default.createElement(E,{value:"9"},"选项9"),h.default.createElement(E,{value:"10"},"选项10"))," ",h.default.createElement(_.Select,{trigger:"click",disabled:!0,defaultValue:"2"},h.default.createElement(E,{value:"1"},"选项1"),h.default.createElement(E,{value:"2"},"选项2"),h.default.createElement(E,{value:"3"},"选项3"),h.default.createElement(E,{value:"4"},"选项4"),h.default.createElement(E,{value:"5"},"选项5"),h.default.createElement(E,{value:"6"},"选项6"),h.default.createElement(E,{value:"7"},"选项7"),h.default.createElement(E,{value:"8"},"选项8"),h.default.createElement(E,{value:"9"},"选项9"),h.default.createElement(E,{value:"10"},"选项10"))," ",h.default.createElement(_.Button,{size:"sm",type:"success",onClick:this.setValue.bind(this)},"设置select的值")),h.default.createElement(_.Grid,{className:"code",width:"2/2"},h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style, placeholder, defaultValue, value 继承原来的标签默认"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"visible"),h.default.createElement("td",null,"默认显示状态 true/false"),h.default.createElement("td",null,"bool"),h.default.createElement("td",null,"false")),h.default.createElement("tr",null,h.default.createElement("td",null,"showBack"),h.default.createElement("td",null,"显示的回调函数"),h.default.createElement("td",null,"function"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"onChange"),h.default.createElement("td",null,"选择值后的回调函数 callback(e, data)"),h.default.createElement("td",null,"function"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"trigger"),h.default.createElement("td",null,"交互方式 ,可用参数 hover/click"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"click")),h.default.createElement("tr",null,h.default.createElement("td",null,"prefix"),h.default.createElement("td",null,"前面的图标,参数可以是一个字体图标",'<i className="iconfont ico-user"></i>'),h.default.createElement("td",null,"Component"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"suffix"),h.default.createElement("td",null,"后面的图标,参数可以是一个字体图标",'<i className="iconfont ico-search"></i>'),h.default.createElement("td",null,"Component"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"validateInfo"),h.default.createElement("td",null,"表单验证的提示图标,或者DIV"),h.default.createElement("td",null,"Component"),h.default.createElement("td",null,"null"))))),h.default.createElement("pre",null,h.default.createElement("code",null,'\n\'use strict\';\n\nimport \'./style.scss\';\nimport React, { Component } from \'react\';\nimport {Grid, Button, Select} from \'../../mtui/index\';\n\nconst Option = Select.Option;\n\nclass UI extends Component {\n // 构造函数\n constructor (props) {\n super(props);\n this.state = {\n name: 10,\n val: \'2\'\n };\n }\n\n onChange(e){\n console.log(\'close\', e.target.value);\n this.setState({\n val: e.target.value\n });\n\n }\n\n showBack(){\n console.log(\'show\');\n }\n\n setValue(){\n this.setState({\n val: \'2\'\n });\n }\n\n render(){\n return (\n <div className="mt-panel">\n <div className="mt-panel-h2">Select</div>\n <div className="mt-panel-box">\n <Select\n defaultValue="" \n style={{width: 90}} \n modalStyle={{height: 100}} \n showBack={this.showBack.bind(this)} \n onChange={this.onChange.bind(this)} \n trigger="click">\n <Option value="" >all</Option>\n <Option value="1" >选项1</Option>\n <Option value="2" >选项2</Option>\n <Option value="3" >选项3</Option>\n <Option value="4" >选项4</Option>\n <Option value="5" >选项5</Option>\n <Option value="6" >选项6</Option>\n <Option value="7" >选项7</Option>\n <Option value="8" >选项8</Option>\n <Option value="9" >选项9</Option>\n <Option value="10" >选项10</Option>\n </Select>\n &nbsp;\n <Select\n defaultValue={null} \n style={{width: 90}} \n trigger="click">\n <Option value="" >all</Option>\n <Option value="1" >选项1</Option>\n <Option value="2" >选项2</Option>\n <Option value="3" >选项3</Option>\n </Select>\n &nbsp;\n <Select\n value={this.state.val} \n style={{width: 90}} \n showBack={this.showBack.bind(this)} \n onChange={this.onChange.bind(this)} \n trigger="hover">\n <Option value="1" >选项1</Option>\n <Option value="2" >选项2</Option>\n <Option value="3" >选项3</Option>\n <Option value="4" >选项4</Option>\n <Option value="5" >选项5</Option>\n <Option value="6" >选项6</Option>\n <Option value="7" >选项7</Option>\n <Option value="8" >选项8</Option>\n <Option value="9" >选项9</Option>\n <Option value="10" >选项10</Option>\n </Select>\n &nbsp;\n <Select disabled={true} defaultValue="">\n <Option value="1" >选项1</Option>\n <Option value="2" >选项2</Option>\n <Option value="3" >选项3</Option>\n <Option value="4" >选项4</Option>\n <Option value="5" >选项5</Option>\n <Option value="6" >选项6</Option>\n <Option value="7" >选项7</Option>\n <Option value="8" >选项8</Option>\n <Option value="9" >选项9</Option>\n <Option value="10" >选项10</Option>\n </Select>\n &nbsp;\n <Button size="sm" type="success" onClick={this.setValue.bind(this)}>设置select的值</Button>\n </div>\n </div>\n );\n }\n}\n\n//主页\nexport default UI;\n'))))}}]),t}(p.Component),y=v;t.default=y;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"Option","C:/DT/mtui2.0/dev/pages/UI/Select.jsx"),__REACT_HOT_LOADER__.register(v,"UI","C:/DT/mtui2.0/dev/pages/UI/Select.jsx"),__REACT_HOT_LOADER__.register(y,"default","C:/DT/mtui2.0/dev/pages/UI/Select.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.state={val:300},n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"onChange",value:function(e){console.log(e),this.setState({val:parseInt(e,10)})}},{key:"sliderEnd",value:function(e){console.log(e)}},{key:"render",value:function(){return h.default.createElement(_.Panel,{header:"slider"},h.default.createElement(_.Slider,{sliderEnd:this.sliderEnd.bind(this),onChange:this.onChange.bind(this),width:300,defaultValue:300,minValue:200,maxValue:1e3}),this.state.val,h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style 继承原来的标签默认"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"size"),h.default.createElement("td",null,"尺寸,可用参数 nm,lg,sm,xs 或者不添加"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"nm")),h.default.createElement("tr",null,h.default.createElement("td",null,"maxValue"),h.default.createElement("td",null,"滑动范围的最大值"),h.default.createElement("td",null,"number"),h.default.createElement("td",null,"100")),h.default.createElement("tr",null,h.default.createElement("td",null,"minValue"),h.default.createElement("td",null,"滑动范围的最小值"),h.default.createElement("td",null,"number"),h.default.createElement("td",null,"0")),h.default.createElement("tr",null,h.default.createElement("td",null,"width"),h.default.createElement("td",null,"滑动条的宽度"),h.default.createElement("td",null,"number"),h.default.createElement("td",null,"100"))))),h.default.createElement("div",null,h.default.createElement("pre",null,h.default.createElement("code",null,"\n\nimport './style.scss';\nimport React, { Component } from 'react';\nimport {Grid,Button,Panel,Slider} from '../../mtui/index'\n\nclass Dom extends Component {\n //构造函数\n constructor (props) {\n super(props);\n }\n\n onChange(data){\n console.log(data)\n }\n\n sliderEnd(data){\n console.log(data)\n }\n\n render(){\n return (\n <Panel header=\"slider\">\n <Slider sliderEnd={this.sliderEnd.bind(this)} \n onChange={this.onChange.bind(this)} \n width={300} \n defaultValue={150} \n minValue={100} \n maxValue={200} />\n </Panel>\n );\n }\n}\n"))))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"Dom","C:/DT/mtui2.0/dev/pages/UI/Slider.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/UI/Slider.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"onChange",value:function(e){console.log(e)}},{key:"sliderEnd",value:function(e){console.log(e)}},{key:"render",value:function(){return h.default.createElement(_.Panel,{header:"sliderBar"},h.default.createElement(_.SliderBar,{type:"danger",width:300,value:.5})," ",h.default.createElement("br",null),h.default.createElement("br",null),h.default.createElement(_.SliderBar,{type:"success",width:300,value:.6})," ",h.default.createElement("br",null),h.default.createElement("br",null),h.default.createElement(_.SliderBar,{type:"default",width:300,value:.7})," ",h.default.createElement("br",null),h.default.createElement("br",null),h.default.createElement(_.SliderBar,{type:"primary",width:300,value:.8})," ",h.default.createElement("br",null),h.default.createElement("br",null),h.default.createElement(_.SliderBar,{type:"info",width:300,value:.9})," ",h.default.createElement("br",null),h.default.createElement("br",null),h.default.createElement("div",null,h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style 继承原来的标签默认"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"value"),h.default.createElement("td",null,"0~1 百分比值"),h.default.createElement("td",null,"number"),h.default.createElement("td",null,"0")),h.default.createElement("tr",null,h.default.createElement("td",null,"width"),h.default.createElement("td",null,"进度条的宽度"),h.default.createElement("td",null,"number"),h.default.createElement("td",null,"100"))))),h.default.createElement("pre",null,h.default.createElement("code",null,'\n\nimport \'./style.scss\';\nimport React, { Component } from \'react\';\nimport {Grid,Button,Panel,SliderBar} from \'../../mtui/index\'\n\nclass Dom extends Component {\n //构造函数\n constructor (props) {\n super(props);\n }\n\n render(){\n return (\n <Panel header="slider">\n <SliderBar type="danger" width={300} value={0.5} /> <br/><br/>\n <SliderBar type="success" width={300} value={0.6} /> <br/><br/>\n <SliderBar type="default" width={300} value={0.7} /> <br/><br/>\n <SliderBar type="primary" width={300} value={0.8} /> <br/><br/>\n <SliderBar type="info" width={300} value={0.9} /> <br/><br/>\n </Panel>\n );\n }\n}\n'))))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"Dom","C:/DT/mtui2.0/dev/pages/UI/SliderBar.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/UI/SliderBar.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=_.Swiper,v=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"changeback",value:function(e){console.log(e)}},{key:"render",value:function(){return h.default.createElement(_.Panel,{header:"Swiper"},h.default.createElement(_.Swiper,{autoPlay:3e3,button:!0,style:{width:600},activeIndex:"1",animate:"move",changeback:this.changeback.bind(this)},h.default.createElement(E,null,h.default.createElement("img",{src:"/assets/imgs/p1.jpg"})),h.default.createElement(E,null,h.default.createElement("img",{src:"/assets/imgs/p2.jpg"})),h.default.createElement(E,null,h.default.createElement("img",{src:"/assets/imgs/p3.jpg"})),h.default.createElement(E,null,h.default.createElement("img",{src:"/assets/imgs/p4.jpg"})),h.default.createElement(E,null,h.default.createElement("img",{src:"/assets/imgs/p5.jpg"}))),h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style 继承DOM标签默认"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"autoPlay"),h.default.createElement("td",null,"自动播放时间"),h.default.createElement("td",null,"number"),h.default.createElement("td",null,"3000")),h.default.createElement("tr",null,h.default.createElement("td",null,"button"),h.default.createElement("td",null,"是否显示切换按钮"),h.default.createElement("td",null,"bool"),h.default.createElement("td",null,"true")),h.default.createElement("tr",null,h.default.createElement("td",null,"activeIndex"),h.default.createElement("td",null,"默认选中第几页"),h.default.createElement("td",null,"number"),h.default.createElement("td",null,"1")),h.default.createElement("tr",null,h.default.createElement("td",null,"animate"),h.default.createElement("td",null,"切换动画,参数:move, fade"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"move")),h.default.createElement("tr",null,h.default.createElement("td",null,"changeback"),h.default.createElement("td",null,"切换动画后,执行的回调函数 callback(index)"),h.default.createElement("td",null,"function"),h.default.createElement("td",null,"null"))))),h.default.createElement("pre",null,h.default.createElement("code",null,"\n'use strict';\n\nimport './style.scss';\nimport React, { Component } from 'react';\nimport {Grid,Button,Panel,Swiper} from '../../mtui/index'\n\nconst SwiperItem = Swiper;\n\nclass Dom extends Component {\n //构造函数\n constructor (props) {\n super(props);\n }\n\n changeback(a){\n console.log(a)\n }\n\n render(){\n return (\n <Panel header=\"Swiper\">\n <Swiper autoPlay={5000} button={true} style={{width:600}} activeIndex='1' animate='move' changeback={this.changeback.bind(this)}>\n <SwiperItem><img src=\"/assets/imgs/p1.jpg\" /></SwiperItem>\n <SwiperItem><img src=\"/assets/imgs/p2.jpg\" /></SwiperItem>\n <SwiperItem><img src=\"/assets/imgs/p3.jpg\" /></SwiperItem>\n <SwiperItem><img src=\"/assets/imgs/p4.jpg\" /></SwiperItem>\n <SwiperItem><img src=\"/assets/imgs/p5.jpg\" /></SwiperItem>\n </Swiper>\n </Panel>\n );\n }\n}\n")))}}]),t}(p.Component),y=v;t.default=y;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"SwiperItem","C:/DT/mtui2.0/dev/pages/UI/Swiper.jsx"),__REACT_HOT_LOADER__.register(v,"Dom","C:/DT/mtui2.0/dev/pages/UI/Swiper.jsx"),__REACT_HOT_LOADER__.register(y,"default","C:/DT/mtui2.0/dev/pages/UI/Swiper.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.state={val:!0},n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"onChange",value:function(e){console.log(e)}},{key:"onClick",value:function(){this.setState({val:!this.state.val})}},{key:"render",value:function(){return h.default.createElement("div",{className:"mt-panel"},h.default.createElement("h3",{className:"mt-panel-h2"},"switch"),h.default.createElement("div",{className:"mt-panel-box"},h.default.createElement(_.Grid,{width:"1/1"},"默认值true",h.default.createElement(_.Switch,{defaultValue:this.state.val,size:"lg",onChange:this.onChange}),"   默认值false",h.default.createElement(_.Switch,{defaultValue:!1,onChange:this.onChange}),"   disabled=true",h.default.createElement(_.Switch,{disabled:!0,onChange:this.onChange}),'   size="sm"',h.default.createElement(_.Switch,{size:"sm",onChange:this.onChange}),'   size="xs"',h.default.createElement(_.Switch,{size:"xs",onChange:this.onChange}),"  ",h.default.createElement(_.Button,{type:"info",onClick:this.onClick.bind(this)},"控制")),h.default.createElement(_.Grid,{width:"1/1"},h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style 继承原来的标签默认"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"size"),h.default.createElement("td",null,"尺寸,可用参数 nm,lg,sm,xs 或者不添加"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"nm")),h.default.createElement("tr",null,h.default.createElement("td",null,"disabled"),h.default.createElement("td",null,"按钮是否可用,参数 false/true"),h.default.createElement("td",null,"bool"),h.default.createElement("td",null,"false")),h.default.createElement("tr",null,h.default.createElement("td",null,"defaultValue"),h.default.createElement("td",null,"当前的按钮状态"),h.default.createElement("td",null,"bool"),h.default.createElement("td",null,"false"))))),h.default.createElement("pre",null,h.default.createElement("code",null,'\nimport \'./style.scss\';\nimport React, { Component } from \'react\';\nimport {Grid,Switch} from \'../../mtui/index\'\n\nclass Dom extends Component {\n //构造函数\n constructor (props) {\n super(props);\n this.state = {\n val : true\n }\n }\n\n onChange(data){\n console.log(data) //\n }\n\n onClick(){\n this.setState({\n val: !this.state.val\n })\n }\n\n render(){\n return (\n <div className="mt-panel">\n <h3 className="mt-panel-h2">switch</h3>\n <div className="mt-panel-box">\n <Grid width="1/1">\n 默认值true<Switch defaultValue={this.state.val} size="lg" onChange={this.onChange}/> &nbsp;\n 默认值false<Switch defaultValue={false} onChange={this.onChange}/> &nbsp;\n disabled=true<Switch disabled={true} onChange={this.onChange}/> &nbsp;\n size="sm"<Switch size="sm" onChange={this.onChange}/> &nbsp;\n size="xs"<Switch size="xs" onChange={this.onChange}/> &nbsp;\n\n <Button type="info" onClick={this.onClick.bind(this)}>控制</Button>\n\n </Grid>\n </div>\n </div>\n );\n }\n}\n\n')))))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"Dom","C:/DT/mtui2.0/dev/pages/UI/Switch.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/UI/Switch.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=function(e){function t(){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){return h.default.createElement("table",{className:this.props.className},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"id"),h.default.createElement("th",null,"name"),h.default.createElement("th",null,"age"),h.default.createElement("th",null,"six"),h.default.createElement("th",null,"date"),h.default.createElement("th",null,"option"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"1"),h.default.createElement("td",null,'乱"七八糟的东西"~'),h.default.createElement("td",null,"25"),h.default.createElement("td",null,"男"),h.default.createElement("td",null,"1990.07.20"),h.default.createElement("td",null,"更多")),h.default.createElement("tr",null,h.default.createElement("td",null,"2"),h.default.createElement("td",null,h.default.createElement(_.Limit,{size:"10"},'乱"七八糟的东西七八糟的东西七八糟的东西七八糟的东西"~')),h.default.createElement("td",null,"23"),h.default.createElement("td",null,"女"),h.default.createElement("td",null,"1991.02.22"),h.default.createElement("td",null,"更多")),h.default.createElement("tr",null,h.default.createElement("td",null,"3"),h.default.createElement("td",null,"饺子"),h.default.createElement("td",null,"22"),h.default.createElement("td",null,"男"),h.default.createElement("td",null,"1992.12.22"),h.default.createElement("td",null,"更多")),h.default.createElement("tr",null,h.default.createElement("td",null,"4"),h.default.createElement("td",null,"花卷"),h.default.createElement("td",null,"18"),h.default.createElement("td",null,"男"),h.default.createElement("td",null,"1992.12.22"),h.default.createElement("td",null,"更多"))))}}]),t}(p.Component),v=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){return h.default.createElement(_.Panel,{header:"Table"},h.default.createElement(_.Grid,{width:"1/2"},h.default.createElement(E,{className:"mt-table"})),h.default.createElement(_.Grid,{width:"1/2"},h.default.createElement(E,{className:"mt-table mt-table-border"})),h.default.createElement(_.Grid,{width:"1/2"},h.default.createElement(E,{className:"mt-table mt-table-bordered"})),h.default.createElement(_.Grid,{width:"1/2"},h.default.createElement(E,{className:"mt-table mt-table-striped"})),h.default.createElement(_.Grid,{width:"1/2"},h.default.createElement(E,{className:"mt-table mt-table-center mt-table-striped"})),h.default.createElement(_.Grid,{width:"1/2"},h.default.createElement(E,{className:"mt-table mt-table-hover mt-table-striped"})),h.default.createElement("pre",null,h.default.createElement("code",null,'\n\'use strict\';\n\nimport \'./style.scss\';\nimport React, { Component } from \'react\';\nimport { Grid, Panel, Limit } from \'../../mtui/index\';\n\nclass Table extends Component {\n render() {\n return (\n <table className={this.props.className}>\n <thead>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th>id</th>\n\t\t\t\t\t\t\t\t<th>name</th>\n\t\t\t\t\t\t\t\t<th>age</th>\n\t\t\t\t\t\t\t\t<th>six</th>\n\t\t\t\t\t\t\t\t<th>date</th> \n\t\t\t\t\t\t\t\t<th>option</th>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</thead>\n <tbody>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>1</td>\n\t\t\t\t\t\t\t\t<td>乱"七八糟的东西"~</td>\n\t\t\t\t\t\t\t\t<td>25</td>\n\t\t\t\t\t\t\t\t<td>男</td>\n\t\t\t\t\t\t\t\t<td>1990.07.20</td>\n\t\t\t\t\t\t\t\t<td>更多</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>2</td>\n\t\t\t\t\t\t\t\t<td><Limit size="10">乱"七八糟的东西七八糟的东西七八糟的东西七八糟的东西"~</Limit></td>\n\t\t\t\t\t\t\t\t<td>23</td>\n\t\t\t\t\t\t\t\t<td>女</td>\n\t\t\t\t\t\t\t\t<td>1991.02.22</td>\n\t\t\t\t\t\t\t\t<td>更多</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>3</td>\n\t\t\t\t\t\t\t\t<td>饺子</td>\n\t\t\t\t\t\t\t\t<td>22</td>\n\t\t\t\t\t\t\t\t<td>男</td>\n\t\t\t\t\t\t\t\t<td>1992.12.22</td>\n\t\t\t\t\t\t\t\t<td>更多</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>4</td>\n\t\t\t\t\t\t\t\t<td>花卷</td>\n\t\t\t\t\t\t\t\t<td>18</td>\n\t\t\t\t\t\t\t\t<td>男</td>\n\t\t\t\t\t\t\t\t<td>1992.12.22</td>\n\t\t\t\t\t\t\t\t<td>更多</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</tbody>\n </table>\n )\n }\n}\n\nclass UI extends Component {\n // 构造函数\n constructor(props) {\n super(props);\n }\n\n render() {\n return (\n <Panel header="Table">\n <Grid width="1/2">\n <Table className="mt-table" />\n </Grid>\n <Grid width="1/2">\n <Table className="mt-table mt-table-border" />\n </Grid>\n <Grid width="1/2">\n <Table className="mt-table mt-table-bordered" />\n </Grid>\n <Grid width="1/2">\n <Table className="mt-table mt-table-striped" />\n </Grid>\n <Grid width="1/2">\n <Table className="mt-table mt-table-center mt-table-striped" />\n </Grid>\n <Grid width="1/2">\n <Table className="mt-table mt-table-hover mt-table-striped" />\n </Grid>\n </Panel>\n );\n }\n}\n\n//主页\nexport default UI;\n ')))}}]),t}(p.Component),y=v;t.default=y;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"Table","C:/DT/mtui2.0/dev/pages/UI/Table.jsx"),__REACT_HOT_LOADER__.register(v,"UI","C:/DT/mtui2.0/dev/pages/UI/Table.jsx"), __REACT_HOT_LOADER__.register(y,"default","C:/DT/mtui2.0/dev/pages/UI/Table.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=_.Tabs.TabItem,v=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.state={text:"111111111111",num:0,items:[],index:10},n.num=0,n.timer=null,n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"changeBack",value:function(){this.setState({text:"2222222222222"})}},{key:"componentDidMount",value:function(){var e=this;this.timer=setTimeout(function(){e.setState({index:3})},3e3)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer)}},{key:"addItems",value:function(){var e=this.state.items;e.push({name:"标题"+this.num++,contents:h.default.createElement("span",null,"我就想写点什么~")}),this.setState({items:e})}},{key:"render",value:function(){return h.default.createElement("div",{className:"mt-panel"},h.default.createElement("h3",{className:"mt-panel-h2"},"Tabs 切换"),h.default.createElement("div",{className:"mt-panel-box"},h.default.createElement("div",null,h.default.createElement(_.Tabs,{type:"top",className:"tabsStyle",animate:!1},h.default.createElement(E,{name:"数据源"},"数据源"),h.default.createElement(E,{name:"接口"},"接口")),h.default.createElement(_.Grid,{width:"1/4",className:"grids"},h.default.createElement(_.Tabs,{type:"top",activeIndex:this.state.index,changeBack:this.changeBack.bind(this)},h.default.createElement(E,{name:"标题1"},"内容1"),h.default.createElement(E,{name:"标题2"},this.state.text),h.default.createElement(E,{name:"标题3"},"内容 3"),h.default.createElement(E,{name:"标题名字很长也没关系"},"内容 4"),h.default.createElement(E,{name:"标题5"},"内容 5"),h.default.createElement(E,{name:"标题6"},"内容 6"),h.default.createElement(E,{name:"标题7"},"内容 7"),h.default.createElement(E,{name:"标题8"},"内容 8"),h.default.createElement(E,{name:"标题9"},"内容 9"),h.default.createElement(E,{name:"标题10"},"内容 10"),h.default.createElement(E,{name:"标题11"},"内容 11"),h.default.createElement(E,{name:"标题12"},"内容 12"),h.default.createElement(E,{name:"标题13"},"内容 13"),h.default.createElement(E,{name:"标题14"},"内容 14"),h.default.createElement(E,{name:"标题15"},"内容 15"),h.default.createElement(E,{name:"标题16"},"内容 16")))),h.default.createElement("div",null,h.default.createElement(_.Grid,{width:"1/4",className:"grids"},h.default.createElement(_.Tabs,{type:"bottom",animate:!1,activeIndex:0,changeBack:this.changeBack.bind(this)},h.default.createElement(E,{name:"标题1"},"内容1"),h.default.createElement(E,{name:"标题2"},"内容 2"),h.default.createElement(E,{name:"标题3"},"内容 3")))),h.default.createElement("div",null,h.default.createElement(_.Grid,{width:"1/4",className:"grids"},h.default.createElement(_.Tabs,{type:"left",activeIndex:0,changeBack:this.changeBack.bind(this)},h.default.createElement(E,{name:"标题1"},"内容1"),h.default.createElement(E,{name:"标题2"},"内容 2"),h.default.createElement(E,{name:"标题3"},"内容 3")))),h.default.createElement("div",null,h.default.createElement(_.Grid,{width:"1/4",className:"grids"},h.default.createElement(_.Tabs,{type:"right",activeIndex:0,changeBack:this.changeBack.bind(this)},h.default.createElement(E,{name:"标题1"},"内容 1"),h.default.createElement(E,{name:"标题2"},"内容 2"),h.default.createElement(E,{name:"标题3"},"内容 3")))),h.default.createElement("div",null,h.default.createElement(_.Grid,{width:"1/4",className:"grids"},h.default.createElement(_.Tabs,{activeIndex:0,animate:!1,changeBack:this.changeBack.bind(this)},this.state.items.map(function(e,t){return h.default.createElement(E,{key:t,name:e.name},e.contents,t)}))),h.default.createElement("br",null),h.default.createElement("br",null),h.default.createElement("a",{onClick:this.addItems.bind(this),className:"mt-btn"},"add")),h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style 继承原来的标签默认"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"type"),h.default.createElement("td",null,"tabs标题的位置,参数:top, left, right, bottom"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"top")),h.default.createElement("tr",null,h.default.createElement("td",null,"animate"),h.default.createElement("td",null,"是否开启切换动画,参数 false/true"),h.default.createElement("td",null,"bool"),h.default.createElement("td",null,"true")),h.default.createElement("tr",null,h.default.createElement("td",null,"activeIndex"),h.default.createElement("td",null,"默认选中"),h.default.createElement("td",null,"number"),h.default.createElement("td",null,"1")),h.default.createElement("tr",null,h.default.createElement("td",null,"changeBack"),h.default.createElement("td",null,"切换后的回调函数 callback(index)"),h.default.createElement("td",null,"function"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"clickBack"),h.default.createElement("td",null,"点击后的回调函数 callback(index)"),h.default.createElement("td",null,"function"),h.default.createElement("td",null,"null"))))),h.default.createElement("pre",null,h.default.createElement("code",null,"\n/*\n* @type Tabs 组件\n* @author Mantou\n*/\n\nimport './style.scss';\nimport React, { Component } from 'react';\nimport { Grid, Button, Tip, Tabs } from '../../mtui/index';\n\nconst TabItem = Tabs.TabItem;\nclass Dom extends Component {\n // 构造函数\n constructor(props) {\n super(props);\n this.state = {\n text: '111111111111',\n num: 0,\n items: [],\n index: 10\n };\n this.num = 0;\n }\n\n changeBack() {\n this.setState({\n text: '2222222222222'\n });\n }\n\n componentDidMount() {\n setTimeout(() => {\n this.setState({\n index: 3\n });\n }, 3000);\n }\n\n addItems() {\n var arr = this.state.items;\n arr.push({\n name: '标题' + this.num++,\n contents: <span>我就想写点什么~</span>\n });\n this.setState({\n items: arr\n });\n }\n\n render() {\n return (\n <div className=\"mt-panel\">\n <h3 className=\"mt-panel-h2\">Tabs 切换</h3>\n <div className=\"mt-panel-box\">\n <div>\n <Grid width=\"1/4\" className=\"grids\">\n <Tabs type=\"top\" activeIndex={this.state.index} changeBack={this.changeBack.bind(this)}>\n <TabItem name='标题1'>内容1</TabItem>\n <TabItem name='标题2'>{this.state.text}</TabItem>\n <TabItem name='标题3'>内容 3</TabItem>\n <TabItem name='标题名字很长也没关系'>内容 4</TabItem>\n <TabItem name='标题5'>内容 5</TabItem>\n <TabItem name='标题6'>内容 6</TabItem>\n <TabItem name='标题7'>内容 7</TabItem>\n <TabItem name='标题8'>内容 8</TabItem>\n <TabItem name='标题9'>内容 9</TabItem>\n <TabItem name='标题10'>内容 10</TabItem>\n <TabItem name='标题11'>内容 11</TabItem>\n <TabItem name='标题12'>内容 12</TabItem>\n <TabItem name='标题13'>内容 13</TabItem>\n <TabItem name='标题14'>内容 14</TabItem>\n <TabItem name='标题15'>内容 15</TabItem>\n <TabItem name='标题16'>内容 16</TabItem>\n </Tabs>\n </Grid>\n </div>\n <div>\n <Grid width=\"1/4\" className=\"grids\">\n <Tabs type=\"bottom\" activeIndex={0} changeBack={this.changeBack.bind(this)}>\n <TabItem name='标题1'>内容1</TabItem>\n <TabItem name='标题2'>内容 2</TabItem>\n <TabItem name='标题3'>内容 3</TabItem>\n </Tabs>\n </Grid>\n </div>\n <div>\n <Grid width=\"1/4\" className=\"grids\">\n <Tabs type=\"left\" activeIndex={0} changeBack={this.changeBack.bind(this)}>\n <TabItem name='标题1'>内容1</TabItem>\n <TabItem name='标题2'>内容 2</TabItem>\n <TabItem name='标题3'>内容 3</TabItem>\n </Tabs>\n </Grid>\n </div>\n <div>\n <Grid width=\"1/4\" className=\"grids\">\n <Tabs type=\"right\" activeIndex={0} changeBack={this.changeBack.bind(this)}>\n <TabItem name='标题1'>内容 1</TabItem>\n <TabItem name='标题2'>内容 2</TabItem>\n <TabItem name='标题3'>内容 3</TabItem>\n </Tabs>\n </Grid>\n </div>\n <div>\n <Grid width=\"1/4\" className=\"grids\">\n <Tabs activeIndex={0} changeBack={this.changeBack.bind(this)}>\n {\n this.state.items.map(function (elem, index) {\n return <TabItem key={index} name={elem.name}>{elem.contents}</TabItem>;\n })\n }\n </Tabs>\n </Grid>\n <br />\n <br />\n <a onClick={this.addItems.bind(this)} className=\"mt-btn\">add</a>\n </div>\n </div>\n </div>\n );\n }\n}\n\n//主页\nexport default Dom;\n"))))}}]),t}(p.Component),y=v;t.default=y;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"TabItem","C:/DT/mtui2.0/dev/pages/UI/Tabs.jsx"),__REACT_HOT_LOADER__.register(v,"Dom","C:/DT/mtui2.0/dev/pages/UI/Tabs.jsx"),__REACT_HOT_LOADER__.register(y,"default","C:/DT/mtui2.0/dev/pages/UI/Tabs.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){return h.default.createElement(_.Panel,{header:"Tag"},h.default.createElement("pre",null,h.default.createElement("code",null,"\n作者很懒,还没来得及做...\n")))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"UI","C:/DT/mtui2.0/dev/pages/UI/Tag.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/UI/Tag.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.state={time:""},n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){var e=this;return h.default.createElement("div",{className:"mt-panel"},h.default.createElement("h3",{className:"mt-panel-h2"},"TIP 提示框"),h.default.createElement("div",{className:"mt-panel-box"},h.default.createElement(_.Grid,{width:"2/2",className:"btns"},h.default.createElement(_.TimePicker,{value:this.state.time,onChange:function(t){return e.setState({time:t})}})),h.default.createElement(_.Grid,{className:"code"},h.default.createElement("pre",null,h.default.createElement("code",null,"\nimport './style.scss';\nimport React, { Component } from 'react';\nimport {Tip} from '../../mtui/index'\n\nclass Dom extends Component {\n //构造函数\n constructor (props) {\n super(props);\n\n this.state = {\n time: ''\n }\n }\n\n render(){\n return (\n <div>\n <TimePicker \n value={this.state.time}\n onChange={\n (time) => this.setState({time})\n }/>\n </div>\n );\n }\n}\n"))),h.default.createElement(_.Grid,{width:"2/2"},h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"没有tips,LOL"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"onChange"),h.default.createElement("td",null,"点击确定后的时间值 function(time)"),h.default.createElement("td",null,"function"),h.default.createElement("td",null,"function()","{return;}")),h.default.createElement("tr",null,h.default.createElement("td",null,"value"),h.default.createElement("td",null,"受控组件的值,时间格式为:hh:mm:ss"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"''")),h.default.createElement("tr",null,h.default.createElement("td",null,"width"),h.default.createElement("td",null,"Input组件占的宽度"),h.default.createElement("td",null,"Number"),h.default.createElement("td",null,"240")),h.default.createElement("tr",null,h.default.createElement("td",null,"placeholder"),h.default.createElement("td",null,"Input的placeholder"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"'时间'")),h.default.createElement("tr",null,h.default.createElement("td",null,"itemsToshow"),h.default.createElement("td",null,"时间选择时,显示的选择项个数"),h.default.createElement("td",null,"Number"),h.default.createElement("td",null,"7")),h.default.createElement("tr",null,h.default.createElement("td",null,"inputClassName"),h.default.createElement("td",null,"input框的class"),h.default.createElement("td",null,"function"),h.default.createElement("td",null,"''")),h.default.createElement("tr",null,h.default.createElement("td",null,"modalClassName"),h.default.createElement("td",null,"时间组件弹窗的class"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"''"))))))))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"Dom","C:/DT/mtui2.0/dev/pages/UI/TimePicker.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/UI/TimePicker.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){return h.default.createElement("div",{className:"mt-panel"},h.default.createElement("h3",{className:"mt-panel-h2"},"TIP 提示框"),h.default.createElement("div",{className:"mt-panel-box"},h.default.createElement(_.Grid,{width:"2/2",className:"btns"},h.default.createElement("a",{className:"mt-btn mt-btn-success",onClick:function(){_.Tip.success("成功!")}},"成功"),h.default.createElement("a",{className:"mt-btn mt-btn-danger",onClick:function(){_.Tip.error("失败了吧~")}},"失败"),h.default.createElement("a",{className:"mt-btn mt-btn-warning",onClick:function(){_.Tip.warning("警告你,别点我!")}},"警告")),h.default.createElement(_.Grid,{className:"code"},h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"这个方法是一个JS的方法,在js中调用。"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"Tip.success('成功')"),h.default.createElement("td",null,"成功的提示"),h.default.createElement("td",null,"function"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"Tip.error('失败了吧~')"),h.default.createElement("td",null,"失败提示"),h.default.createElement("td",null,"function"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"Tip.warning('警告你,别点我!')"),h.default.createElement("td",null,"警告提示"),h.default.createElement("td",null,"function"),h.default.createElement("td",null,"null"))))),h.default.createElement("pre",null,h.default.createElement("code",null,"\nimport './style.scss';\nimport React, { Component } from 'react';\nimport {Tip} from '../../mtui/index'\n\nclass Dom extends Component {\n\t//构造函数\n\tconstructor (props) {\n\t\tsuper(props);\n\t}\n\n\trender(){\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<a className=\"mt-btn mt-btn-success\" onClick={()=>{Tip.success('成功!')}}>成功</a>\n\t\t\t\t<a className=\"mt-btn mt-btn-danger\" onClick={()=>{Tip.error('失败了吧~')}}>失败</a>\n\t\t\t\t<a className=\"mt-btn mt-btn-warning\" onClick={()=>{Tip.warning('警告你,别点我!')}}>警告</a>\n\t </div>\n\t );\n\t}\n}\n")))))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"Dom","C:/DT/mtui2.0/dev/pages/UI/Tip.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/UI/Tip.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=_.Tree.TreeChild,v=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){return h.default.createElement(_.Panel,{header:"Tree"},h.default.createElement(_.Tree,null,h.default.createElement(E,null,h.default.createElement(_.Tree,{header:"标题1",show:!1},h.default.createElement(E,null,"子菜单1"),h.default.createElement(E,null,"子菜单2"),h.default.createElement(E,null,h.default.createElement(_.Tree,{header:"子菜单3"},h.default.createElement(E,null,"子菜单1"),h.default.createElement(E,null,"子菜单2"))))),h.default.createElement(E,null,h.default.createElement(_.Tree,{header:"标题2"},h.default.createElement(E,null,"子菜单1"),h.default.createElement(E,null,"子菜单2")))),h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style 等默认属性继承DIV标签默认"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"header"),h.default.createElement("td",null,"Tree的DOM"),h.default.createElement("td",null,"Component"),h.default.createElement("td",null,"标题")),h.default.createElement("tr",null,h.default.createElement("td",null,"show"),h.default.createElement("td",null,"是否显示选项卡"),h.default.createElement("td",null,"bool"),h.default.createElement("td",null,"true"))))),h.default.createElement("pre",null,h.default.createElement("code",null,"\n// header 可以传入一个 HTML, show 是默认展开或者收起\n'use strict';\n\nimport './style.scss';\nimport React, { Component } from 'react';\nimport {Grid, Panel, Tree} from '../../mtui/index';\n\nconst TreeChild = Tree.TreeChild;\n\nclass UI extends Component {\n // 构造函数\n constructor (props) {\n super(props);\n }\n\n render(){\n return (\n <Panel header=\"Tree\">\n <Tree>\n <TreeChild>\n <Tree header=\"标题1\" show={false}>\n <TreeChild>子菜单1</TreeChild>\n <TreeChild>子菜单2</TreeChild>\n <TreeChild>\n <Tree header=\"子菜单3\">\n <TreeChild>子菜单1</TreeChild>\n <TreeChild>子菜单2</TreeChild>\n </Tree>\n </TreeChild>\n </Tree>\n </TreeChild>\n <TreeChild>\n <Tree header=\"标题2\">\n <TreeChild>子菜单1</TreeChild>\n <TreeChild>子菜单2</TreeChild>\n </Tree>\n </TreeChild>\n </Tree>\n </Panel>\t\n );\n }\n}\n\n//主页\nexport default UI;\n ")))}}]),t}(p.Component),y=v;t.default=y;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"TreeChild","C:/DT/mtui2.0/dev/pages/UI/Tree.jsx"),__REACT_HOT_LOADER__.register(v,"UI","C:/DT/mtui2.0/dev/pages/UI/Tree.jsx"),__REACT_HOT_LOADER__.register(y,"default","C:/DT/mtui2.0/dev/pages/UI/Tree.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){return h.default.createElement(_.Panel,{header:"Upload"},h.default.createElement("pre",null,h.default.createElement("code",null,"\n作者很懒,还没来得及做...\n")))}}]),t}(p.Component),v=E;t.default=v;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"UI","C:/DT/mtui2.0/dev/pages/UI/Upload.jsx"),__REACT_HOT_LOADER__.register(v,"default","C:/DT/mtui2.0/dev/pages/UI/Upload.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(9);var p=n(1),h=a(p),_=n(8),E=_.Validate.ValidateGroup,v=function(e){function t(e){(0,i.default)(this,t);var n=(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e));return n.state={type:"danger"},n}return(0,m.default)(t,e),(0,o.default)(t,[{key:"setType",value:function(e){this.setState({type:e.target.value})}},{key:"onChange",value:function(e){console.log(">>",e.target.value)}},{key:"onEnd",value:function(e){console.log("submit=>",e)}},{key:"render",value:function(){return h.default.createElement(_.Panel,{header:"Validate"},h.default.createElement(E,{submit:this.onEnd},h.default.createElement("div",null,h.default.createElement(_.Validate,{exgs:[{regs:"notempty",type:"warning",info:"不能为空!"},{regs:"email",type:"danger",info:"邮箱错误!"}]},h.default.createElement(_.Input,{onChange:this.onChange.bind(this),placeholder:"邮箱"}))),h.default.createElement("br",null),h.default.createElement("div",null,h.default.createElement(_.Validate,{exgs:[{regx:"^[2-6]+$",type:"danger",info:"请输入2~6的数字"}]},h.default.createElement(_.Input,{onChange:this.onChange.bind(this),placeholder:"请输入2~6的数字"}))),h.default.createElement("br",null),h.default.createElement("div",null,h.default.createElement(_.Validate,{exgs:[{regx:"^[1-2]+$",type:"danger",info:"请输入1,2的数字"}]},h.default.createElement(_.Select,{defaultValue:"",modalStyle:{width:180,height:100},onChange:this.onChange.bind(this),trigger:"click"},h.default.createElement(Option,{value:"1"},"选项1"),h.default.createElement(Option,{value:"2"},"选项2"),h.default.createElement(Option,{value:"3"},"选项3"),h.default.createElement(Option,{value:"4"},"选项4"),h.default.createElement(Option,{value:"5"},"选项5"),h.default.createElement(Option,{value:"6"},"选项6"),h.default.createElement(Option,{value:"7"},"选项7"),h.default.createElement(Option,{value:"8"},"选项8"),h.default.createElement(Option,{value:"9"},"选项9"),h.default.createElement(Option,{value:"10"},"选项10")))),h.default.createElement("br",null),h.default.createElement("div",null,h.default.createElement(_.Validate,{exgs:[{regs:"notempty",type:"warning",info:"不能为空!"},{regx:"(2017-03-)((0[1-9])|([1-2][0-9]|31))",type:"danger",info:"只能輸入2017年3月的日期"}]},h.default.createElement(_.DatePicker,{style:{width:152},size:"xs",defaultValue:"",mid:"dateId2",format:"yyyy-mm-dd"}))),h.default.createElement("br",null),h.default.createElement("br",null),h.default.createElement(_.Button,{style:{width:181},dom:"button",htmlType:"submit",type:"primary",className:"login-form-button"},"submit")),h.default.createElement("div",null,"表单验证案例",h.default.createElement("br",null),"regs 可用参数请参考 mtui/Validate/regex",h.default.createElement("br",null),"regx: 自定义验证规则"),h.default.createElement("br",null),h.default.createElement("br",null),h.default.createElement("br",null),h.default.createElement(_.Validate,{type:this.state.type},h.default.createElement(_.Input,{style:{width:200},onChange:this.setType.bind(this),defaultValue:"",placeholder:"danger/success/warning"})),h.default.createElement("div",{className:"api"},h.default.createElement("p",{className:"tips"},h.default.createElement("span",{className:"apispan"},"API"),h.default.createElement("span",{className:"tipspan"},"tips"),"className, style 继承原来的标签默认"),h.default.createElement("table",{className:"mt-table mt-table-hover mt-table-striped mt-table-bordered"},h.default.createElement("thead",null,h.default.createElement("tr",null,h.default.createElement("th",null,"属性"),h.default.createElement("th",null,"说明"),h.default.createElement("th",null,"类型"),h.default.createElement("th",null,"默认值"))),h.default.createElement("tbody",null,h.default.createElement("tr",null,h.default.createElement("td",null,"exgs"),h.default.createElement("td",null,"验证规则参数",h.default.createElement("br",null),"固定规则: ","[{regs:'notempty',type:'warning',info:'不能为空!'}]"," ",h.default.createElement("br",null),"自定义规则: ","{regx:'^[2-6]+$',type:'danger',info:'请输入2~6的数字'}"," ",h.default.createElement("br",null),"regs: 固定的参数",h.default.createElement("br",null),"regx: 自定义正则规则",h.default.createElement("br",null),"type: danger, warning, success. ",h.default.createElement("br",null),"info: 出错提示 ",h.default.createElement("br",null),"regs:",h.default.createElement("div",{className:"max-pre-code"},h.default.createElement("pre",null,h.default.createElement("code",null,'\ndecmal: "^([+-]?)\\d*\\.\\d+$",// 浮点数\ndecmal1: "^[1-9]\\d*.\\d*|0.\\d*[1-9]\\d*$",// 正浮点数\ndecmal2: "^-([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*)$",// 负浮点数\ndecmal3: "^-?([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*|0?.0+|0)$",// 浮点数\ndecmal4: "^[1-9]\\d*.\\d*|0.\\d*[1-9]\\d*|0?.0+|0$",// 非负浮点数(正浮点数 + 0)\ndecmal5: "^(-([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*))|0?.0+|0$",// 非正浮点数(负浮点数 +0\nintege: "^-?[1-9]\\d*$",// 整数\nintege1: "^[1-9]\\d*$", // 正整数\nintege2: "^-[1-9]\\d*$",// 负整数\nnum: "^([+-]?)\\d*\\.?\\d+$",// 数字\nnum1: "^[1-9]\\d*|0$",// 正数(正整数 + 0)\nnum2: "^-[1-9]\\d*|0$",// 负数(负整数 + 0)\nascii: "^[\\x00-\\xFF]+$",// 仅ACSII字符\nchinese: "^[\\u4e00-\\u9fa5]+$",// 仅中文\ncolor: "^[a-fA-F0-9]{6}$",// 颜色\ndate: "^\\d{4}(\\-|\\/|.)\\d{1,2}\\1\\d{1,2}$",// 日期\nemail: "^\\w+((-\\w+)|(\\.\\w+))*\\@[A-Za-z0-9]+((\\.|-)[A-Za-z0-9]+)*\\.[A-Za-z0-9]+$",// 邮件\nidcard: "^[1-9]([0-9]{14}|[0-9]{17})$",// 身份证\nip4: "^(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)\\.(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)\\.(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)\\.(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)$",// ip地址\nletter: "^[A-Za-z]+$",// 字母\nletter_l: "^[a-z]+$",// 小写字母\nletter_u: "^[A-Z]+$",// 大写字母\nmobile: "^0?(13|15|18|14|17)[0-9]{9}$",// 手机\nnotempty: "^\\S",// 非空\npassword: "^.*[A-Za-z0-9\\w_-]+.*$",// 密码\nfullNumber: "^[0-9]+$",// 数字\npicture: "(.*)\\.(jpg|bmp|gif|ico|pcx|jpeg|tif|png|raw|tga)$",// 图片\nqq: "^[1-9]*[1-9][0-9]*$",// QQ号码\nrar: "(.*)\\.(rar|zip|7zip|tgz)$",// 压缩文件\ntel: "^[0-9-()()]{7,18}$",// 电话号码的函数(包括验证国内区号,国际区号,分机号)\nurl: "^http[s]?:\\/\\/([\\w-]+\\.)+[\\w-]+([\\w-./?%&=]*)?$",// url\nusername: "^[A-Za-z0-9_\\-\\u4e00-\\u9fa5]+$",// 户名\ndeptname: "^[A-Za-z0-9_()()\\-\\u4e00-\\u9fa5]+$",// 单位名\nzipcode: "^\\d{6}$",// 邮编\nrealname: "^[A-Za-z\\u4e00-\\u9fa5]+$",// 真实姓名\ncompanyname: "^[A-Za-z0-9_()()\\-\\u4e00-\\u9fa5]+$",\ncompanyaddr: "^[A-Za-z0-9_()()\\#\\-\\u4e00-\\u9fa5]+$",\ncompanysite: "^http[s]?:\\/\\/([\\w-]+\\.)+[\\w-]+([\\w-./?%&#=]*)?$"\n')))),h.default.createElement("td",null,"array"),h.default.createElement("td",null,"null")),h.default.createElement("tr",null,h.default.createElement("td",null,"type"),h.default.createElement("td",null,"提示样式 success,warning,danger"),h.default.createElement("td",null,"string"),h.default.createElement("td",null,"null"))))),h.default.createElement("pre",null,h.default.createElement("code",null,'\n\'use strict\';\n\nimport \'./style.scss\';\nimport React, { Component } from \'react\';\nimport {Grid,Panel,Validate,DatePicker,Input,Button,Select} from \'../../mtui/index\'\n\nconst ValidateGroup = Validate.ValidateGroup;\n\nclass UI extends Component {\n //构造函数\n constructor (props) {\n super(props);\n this.state = {\n type: \'danger\'\n }\n }\n\n setType(e){\n this.setState({\n type: e.target.value\n });\n }\n\n onChange(e){\n console.log(\'>>\',e.target.value)\n }\n\n onEnd(data){\n console.log("submit=>",data)\n }\n\n render(){\n return (\n <Panel header="Validate">\n <ValidateGroup submit={this.onEnd}>\n <div>\n <Validate exgs={[\n {regs:\'notempty\',type:\'warning\',info:\'不能为空!\'},\n {regs:\'email\',type:\'danger\',info:\'邮箱错误!\'}\n ]}><Input onChange={this.onChange.bind(this)} placeholder="邮箱"/></Validate>\n </div>\n <br/>\n <div>\n <Validate exgs={[\n {regx:\'^[2-6]+$\',type:\'danger\',info:\'请输入2~6的数字\'}\n ]}><Input onChange={this.onChange.bind(this)} placeholder="请输入2~6的数字"/></Validate>\n </div>\n <br/>\n <div>\n <Validate exgs={[{regx:\'^[1-2]+$\',type:\'danger\',info:\'请输入1,2的数字\'} ]}>\n <Select defaultValue=""\n modalStyle={{width:180, height:100}} \n onChange={this.onChange.bind(this)} \n trigger="click">\n <Option value="1" >选项1</Option>\n <Option value="2" >选项2</Option>\n <Option value="3" >选项3</Option>\n <Option value="4" >选项4</Option>\n <Option value="5" >选项5</Option>\n <Option value="6" >选项6</Option>\n <Option value="7" >选项7</Option>\n <Option value="8" >选项8</Option>\n <Option value="9" >选项9</Option>\n <Option value="10" >选项10</Option>\n </Select>\n </Validate>\n </div>\n <br/>\n <div>\n <Validate exgs={[\n {regs:\'notempty\',type:\'warning\',info:\'不能为空!\'},\n {regx:\'(2017-03-)((0[1-9])|([1-2][0-9]|31))\',type:\'danger\',info:\'只能輸入2017年3月的日期\'}\n ]}>\n <DatePicker style={{width:152}} size="xs" defaultValue="" mid="dateId2" format="yyyy-mm-dd"/>\n </Validate>\n </div>\n <br/>\n <br/>\n <Button style={{width:181}} dom="button" htmlType="submit" type="primary" className="login-form-button">submit</Button>\n </ValidateGroup>\n <div>\n 表单验证案例\n <br/>regs 可用参数请参考 mtui/Validate/regex \n <br/>regx: 自定义验证规则\n </div>\n <br/>\n <br/>\n <br/>\n <Validate type={this.state.type}>\n <Input onChange={this.setType.bind(this)} defaultValue="" placeholder="danger/success/warning"/>\n </Validate>\n </Panel>\t\n );\n }\n}\n\n//主页\nexport default UI;\n '))); }}]),t}(p.Component),y=v;t.default=y;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(E,"ValidateGroup","C:/DT/mtui2.0/dev/pages/UI/Validate.jsx"),__REACT_HOT_LOADER__.register(v,"UI","C:/DT/mtui2.0/dev/pages/UI/Validate.jsx"),__REACT_HOT_LOADER__.register(y,"default","C:/DT/mtui2.0/dev/pages/UI/Validate.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(2),r=a(l),u=n(3),i=a(u),s=n(4),o=a(s),d=n(6),c=a(d),f=n(5),m=a(f);n(340);var p=n(1),h=a(p),_=(n(21),n(80)),E=a(_),v=function(e){function t(e){return(0,i.default)(this,t),(0,c.default)(this,(t.__proto__||(0,r.default)(t)).call(this,e))}return(0,m.default)(t,e),(0,o.default)(t,[{key:"render",value:function(){return h.default.createElement("div",{className:"index update clearfix"},h.default.createElement(E.default,null),h.default.createElement("div",{className:"list"},h.default.createElement("ul",null,h.default.createElement("li",null,h.default.createElement("i",null,"2017-08-25")," 修改了 Tabs 组件,key=index 的问题,这个问题会导致删除tab时的BUG,修改了日期年切换的BUG"),h.default.createElement("li",null,h.default.createElement("i",null,"2017-08-03")," 修改了document.body.style = 'string' 的 BUG ,会导致谷歌4.4版本的兼容性问题"),h.default.createElement("li",null,h.default.createElement("i",null,"2017-07-17")," 给tabs 添加 className 参数"),h.default.createElement("li",null,h.default.createElement("i",null,"2017-07-05")," 添加了API说明。修改了callBack驼峰的命名标准,格式化了部分代码"),h.default.createElement("li",null,h.default.createElement("i",null,"2017-06-28"),' 添加了Input type="textarea" 的支持'),h.default.createElement("li",null,h.default.createElement("i",null,"2017-06-05")," 修改了 utils/offset.jsx 里面的获取DOM的宽和高有误,导致弹窗定位不准确的问题"),h.default.createElement("li",null,h.default.createElement("i",null,"2017-05-24")," 修改所有弹窗的componentDidUpdate数据更新方法,如果DOM不存在,就不更新数据,只在初次渲染后,才会去更新数据。"),h.default.createElement("li",null,h.default.createElement("i",null,"2017-05-22")," 修改了日历组件 value 变化无效的问题。"),h.default.createElement("li",null,h.default.createElement("i",null,"2017-05-18")," 修改了Button为 button属性的时候,宽度不能设置的bug, 给pagelist添加了 refresh 方法。用来刷新组件"),h.default.createElement("li",null,h.default.createElement("i",null,"2017-05-11")," 修改了日历弹窗的超出window的定位,添加了日期插件range参数(格式:xxxx-xx-xx,xxxx-xx-xx)设置日期范围;修改了一些弹窗定位的BUG。修改了tabs设置activeIndex 不能自动刷新的BUG"),h.default.createElement("li",null,h.default.createElement("i",null,"2017-05-10")," 所有弹窗的样式统一使用modalStyle,与之直接关联的样式依然使用style"),h.default.createElement("li",null,h.default.createElement("i",null,"2017-05-06")," 修改一些BUG,添加了limit组件,限制尺寸"))))}}]),t}(p.Component),y=v;t.default=y;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(v,"Update","C:/DT/mtui2.0/dev/pages/Update/Index.jsx"),__REACT_HOT_LOADER__.register(y,"default","C:/DT/mtui2.0/dev/pages/Update/Index.jsx"))})()},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var l=n(120),r=n(179),u=n(279),i=a(u),s=(0,l.combineReducers)({user:i.default,routing:r.routerReducer}),o=s;t.default=o;(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(s,"rootReducer","C:/DT/mtui2.0/dev/reducers/index.jsx"),__REACT_HOT_LOADER__.register(o,"default","C:/DT/mtui2.0/dev/reducers/index.jsx"))})()},function(e,t,n){"use strict";function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,t=arguments[1];switch(t.type){case l.SET_USER_INFO:return{name:t.data.name,phone:t.data.phone,tips:t.data.tips,tipsNumber:t.data.tipsNumber};default:return e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var l=n(121),r={name:"",photo:"",tips:2};(function(){"undefined"!=typeof __REACT_HOT_LOADER__&&(__REACT_HOT_LOADER__.register(r,"initialState","C:/DT/mtui2.0/dev/reducers/user.jsx"),__REACT_HOT_LOADER__.register(a,"todo","C:/DT/mtui2.0/dev/reducers/user.jsx"))})()},function(e,t,n){e.exports={default:n(287),__esModule:!0}},function(e,t,n){e.exports={default:n(288),__esModule:!0}},function(e,t,n){e.exports={default:n(289),__esModule:!0}},function(e,t,n){e.exports={default:n(290),__esModule:!0}},function(e,t,n){e.exports={default:n(292),__esModule:!0}},function(e,t,n){e.exports={default:n(293),__esModule:!0}},function(e,t,n){e.exports={default:n(294),__esModule:!0}},function(e,t,n){n(141),n(317),e.exports=n(23).Array.from},function(e,t,n){n(319),e.exports=n(23).Object.assign},function(e,t,n){n(320);var a=n(23).Object;e.exports=function(e,t){return a.create(e,t)}},function(e,t,n){n(321);var a=n(23).Object;e.exports=function(e,t,n){return a.defineProperty(e,t,n)}},function(e,t,n){n(322),e.exports=n(23).Object.getPrototypeOf},function(e,t,n){n(323),e.exports=n(23).Object.setPrototypeOf},function(e,t,n){n(325),n(324),n(326),n(327),e.exports=n(23).Symbol},function(e,t,n){n(141),n(328),e.exports=n(94).f("iterator")},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=function(){}},function(e,t,n){var a=n(45),l=n(140),r=n(315);e.exports=function(e){return function(t,n,u){var i,s=a(t),o=l(s.length),d=r(u,o);if(e&&n!=n){for(;o>d;)if(i=s[d++],i!=i)return!0}else for(;o>d;d++)if((e||d in s)&&s[d]===n)return e||d||0;return!e&&-1}}},function(e,t,n){var a=n(81),l=n(25)("toStringTag"),r="Arguments"==a(function(){return arguments}()),u=function(e,t){try{return e[t]}catch(e){}};e.exports=function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=u(t=Object(e),l))?n:r?a(t):"Object"==(i=a(t))&&"function"==typeof t.callee?"Arguments":i}},function(e,t,n){"use strict";var a=n(33),l=n(55);e.exports=function(e,t,n){t in e?a.f(e,t,l(0,n)):e[t]=n}},function(e,t,n){var a=n(63),l=n(87),r=n(64);e.exports=function(e){var t=a(e),n=l.f;if(n)for(var u,i=n(e),s=r.f,o=0;i.length>o;)s.call(e,u=i[o++])&&t.push(u);return t}},function(e,t,n){var a=n(32).document;e.exports=a&&a.documentElement},function(e,t,n){var a=n(54),l=n(25)("iterator"),r=Array.prototype;e.exports=function(e){return void 0!==e&&(a.Array===e||r[l]===e)}},function(e,t,n){var a=n(81);e.exports=Array.isArray||function(e){return"Array"==a(e)}},function(e,t,n){var a=n(41);e.exports=function(e,t,n,l){try{return l?t(a(n)[0],n[1]):t(n)}catch(t){var r=e.return;throw void 0!==r&&a(r.call(e)),t}}},function(e,t,n){"use strict";var a=n(86),l=n(55),r=n(88),u={};n(43)(u,n(25)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=a(u,{next:l(1,n)}),r(e,t+" Iterator")}},function(e,t,n){var a=n(25)("iterator"),l=!1;try{var r=[7][a]();r.return=function(){l=!0},Array.from(r,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!l)return!1;var n=!1;try{var r=[7],u=r[a]();u.next=function(){return{done:n=!0}},r[a]=function(){return u},e(r)}catch(e){}return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var a=n(66)("meta"),l=n(44),r=n(37),u=n(33).f,i=0,s=Object.isExtensible||function(){return!0},o=!n(42)(function(){return s(Object.preventExtensions({}))}),d=function(e){u(e,a,{value:{i:"O"+ ++i,w:{}}})},c=function(e,t){if(!l(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!r(e,a)){if(!s(e))return"F";if(!t)return"E";d(e)}return e[a].i},f=function(e,t){if(!r(e,a)){if(!s(e))return!0;if(!t)return!1;d(e)}return e[a].w},m=function(e){return o&&p.NEED&&s(e)&&!r(e,a)&&d(e),e},p=e.exports={KEY:a,NEED:!1,fastKey:c,getWeak:f,onFreeze:m}},function(e,t,n){"use strict";var a=n(63),l=n(87),r=n(64),u=n(65),i=n(133),s=Object.assign;e.exports=!s||n(42)(function(){var e={},t={},n=Symbol(),a="abcdefghijklmnopqrst";return e[n]=7,a.split("").forEach(function(e){t[e]=e}),7!=s({},e)[n]||Object.keys(s({},t)).join("")!=a})?function(e,t){for(var n=u(e),s=arguments.length,o=1,d=l.f,c=r.f;s>o;)for(var f,m=i(arguments[o++]),p=d?a(m).concat(d(m)):a(m),h=p.length,_=0;h>_;)c.call(m,f=p[_++])&&(n[f]=m[f]);return n}:s},function(e,t,n){var a=n(33),l=n(41),r=n(63);e.exports=n(36)?Object.defineProperties:function(e,t){l(e);for(var n,u=r(t),i=u.length,s=0;i>s;)a.f(e,n=u[s++],t[n]);return e}},function(e,t,n){var a=n(45),l=n(136).f,r={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],i=function(e){try{return l(e)}catch(e){return u.slice()}};e.exports.f=function(e){return u&&"[object Window]"==r.call(e)?i(e):l(a(e))}},function(e,t,n){var a=n(31),l=n(23),r=n(42);e.exports=function(e,t){var n=(l.Object||{})[e]||Object[e],u={};u[e]=t(n),a(a.S+a.F*r(function(){n(1)}),"Object",u)}},function(e,t,n){var a=n(44),l=n(41),r=function(e,t){if(l(e),!a(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,a){try{a=n(82)(Function.call,n(135).f(Object.prototype,"__proto__").set,2),a(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return r(e,n),t?e.__proto__=n:a(e,n),e}}({},!1):void 0),check:r}},function(e,t,n){var a=n(91),l=n(83);e.exports=function(e){return function(t,n){var r,u,i=String(l(t)),s=a(n),o=i.length;return s<0||s>=o?e?"":void 0:(r=i.charCodeAt(s),r<55296||r>56319||s+1===o||(u=i.charCodeAt(s+1))<56320||u>57343?e?i.charAt(s):r:e?i.slice(s,s+2):(r-55296<<10)+(u-56320)+65536)}}},function(e,t,n){var a=n(91),l=Math.max,r=Math.min;e.exports=function(e,t){return e=a(e),e<0?l(e+t,0):r(e,t)}},function(e,t,n){var a=n(298),l=n(25)("iterator"),r=n(54);e.exports=n(23).getIteratorMethod=function(e){if(void 0!=e)return e[l]||e["@@iterator"]||r[a(e)]}},function(e,t,n){"use strict";var a=n(82),l=n(31),r=n(65),u=n(304),i=n(302),s=n(140),o=n(299),d=n(316);l(l.S+l.F*!n(306)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,l,c,f=r(e),m="function"==typeof this?this:Array,p=arguments.length,h=p>1?arguments[1]:void 0,_=void 0!==h,E=0,v=d(f);if(_&&(h=a(h,p>2?arguments[2]:void 0,2)),void 0==v||m==Array&&i(v))for(t=s(f.length),n=new m(t);t>E;E++)o(n,E,_?h(f[E],E):f[E]);else for(c=v.call(f),n=new m;!(l=c.next()).done;E++)o(n,E,_?u(c,h,[l.value,E],!0):l.value);return n.length=E,n}})},function(e,t,n){"use strict";var a=n(296),l=n(307),r=n(54),u=n(45);e.exports=n(134)(Array,"Array",function(e,t){this._t=u(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,l(1)):"keys"==t?l(0,n):"values"==t?l(0,e[n]):l(0,[n,e[n]])},"values"),r.Arguments=r.Array,a("keys"),a("values"),a("entries")},function(e,t,n){var a=n(31);a(a.S+a.F,"Object",{assign:n(309)})},function(e,t,n){var a=n(31);a(a.S,"Object",{create:n(86)})},function(e,t,n){var a=n(31);a(a.S+a.F*!n(36),"Object",{defineProperty:n(33).f})},function(e,t,n){var a=n(65),l=n(137);n(312)("getPrototypeOf",function(){return function(e){return l(a(e))}})},function(e,t,n){var a=n(31);a(a.S,"Object",{setPrototypeOf:n(313).set})},function(e,t){},function(e,t,n){"use strict";var a=n(32),l=n(37),r=n(36),u=n(31),i=n(139),s=n(308).KEY,o=n(42),d=n(90),c=n(88),f=n(66),m=n(25),p=n(94),h=n(93),_=n(300),E=n(303),v=n(41),y=n(44),b=n(45),g=n(92),C=n(55),T=n(86),k=n(311),O=n(135),x=n(33),D=n(63),w=O.f,R=x.f,A=k.f,N=a.Symbol,P=a.JSON,L=P&&P.stringify,j="prototype",I=m("_hidden"),H=m("toPrimitive"),M={}.propertyIsEnumerable,S=d("symbol-registry"),B=d("symbols"),G=d("op-symbols"),U=Object[j],V="function"==typeof N,z=a.QObject,W=!z||!z[j]||!z[j].findChild,$=r&&o(function(){return 7!=T(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a})?function(e,t,n){var a=w(U,t);a&&delete U[t],R(e,t,n),a&&e!==U&&R(U,t,a)}:R,F=function(e){var t=B[e]=T(N[j]);return t._k=e,t},X=V&&"symbol"==typeof N.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof N},Y=function(e,t,n){return e===U&&Y(G,t,n),v(e),t=g(t,!0),v(n),l(B,t)?(n.enumerable?(l(e,I)&&e[I][t]&&(e[I][t]=!1),n=T(n,{enumerable:C(0,!1)})):(l(e,I)||R(e,I,C(1,{})),e[I][t]=!0),$(e,t,n)):R(e,t,n)},Z=function(e,t){v(e);for(var n,a=_(t=b(t)),l=0,r=a.length;r>l;)Y(e,n=a[l++],t[n]);return e},q=function(e,t){return void 0===t?T(e):Z(T(e),t)},K=function(e){var t=M.call(this,e=g(e,!0));return!(this===U&&l(B,e)&&!l(G,e))&&(!(t||!l(this,e)||!l(B,e)||l(this,I)&&this[I][e])||t)},J=function(e,t){if(e=b(e),t=g(t,!0),e!==U||!l(B,t)||l(G,t)){var n=w(e,t);return!n||!l(B,t)||l(e,I)&&e[I][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=A(b(e)),a=[],r=0;n.length>r;)l(B,t=n[r++])||t==I||t==s||a.push(t);return a},ee=function(e){for(var t,n=e===U,a=A(n?G:b(e)),r=[],u=0;a.length>u;)!l(B,t=a[u++])||n&&!l(U,t)||r.push(B[t]);return r};V||(N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===U&&t.call(G,n),l(this,I)&&l(this[I],e)&&(this[I][e]=!1),$(this,e,C(1,n))};return r&&W&&$(U,e,{configurable:!0,set:t}),F(e)},i(N[j],"toString",function(){return this._k}),O.f=J,x.f=Y,n(136).f=k.f=Q,n(64).f=K,n(87).f=ee,r&&!n(85)&&i(U,"propertyIsEnumerable",K,!0),p.f=function(e){return F(m(e))}),u(u.G+u.W+u.F*!V,{Symbol:N});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)m(te[ne++]);for(var ae=D(m.store),le=0;ae.length>le;)h(ae[le++]);u(u.S+u.F*!V,"Symbol",{for:function(e){return l(S,e+="")?S[e]:S[e]=N(e)},keyFor:function(e){if(!X(e))throw TypeError(e+" is not a symbol!");for(var t in S)if(S[t]===e)return t},useSetter:function(){W=!0},useSimple:function(){W=!1}}),u(u.S+u.F*!V,"Object",{create:q,defineProperty:Y,defineProperties:Z,getOwnPropertyDescriptor:J,getOwnPropertyNames:Q,getOwnPropertySymbols:ee}),P&&u(u.S+u.F*(!V||o(function(){var e=N();return"[null]"!=L([e])||"{}"!=L({a:e})||"{}"!=L(Object(e))})),"JSON",{stringify:function(e){for(var t,n,a=[e],l=1;arguments.length>l;)a.push(arguments[l++]);if(n=t=a[1],(y(t)||void 0!==e)&&!X(e))return E(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!X(t))return t}),a[1]=t,L.apply(P,a)}}),N[j][H]||n(43)(N[j],H,N[j].valueOf),c(N,"Symbol"),c(Math,"Math",!0),c(a.JSON,"JSON",!0)},function(e,t,n){n(93)("asyncIterator")},function(e,t,n){n(93)("observable")},function(e,t,n){n(318);for(var a=n(32),l=n(43),r=n(54),u=n(25)("toStringTag"),i="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),s=0;s<i.length;s++){var o=i[s],d=a[o],c=d&&d.prototype;c&&!c[u]&&l(c,u,o),r[o]=r.Array}},,,,,function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,function(e,t,n){function a(e){return null==e?void 0===e?s:i:o&&o in Object(e)?r(e):u(e)}var l=n(151),r=n(362),u=n(363),i="[object Null]",s="[object Undefined]",o=l?l.toStringTag:void 0;e.exports=a},function(e,t){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,function(){return this}())},function(e,t,n){var a=n(364),l=a(Object.getPrototypeOf,Object);e.exports=l},function(e,t,n){function a(e){var t=u.call(e,s),n=e[s];try{e[s]=void 0;var a=!0}catch(e){}var l=i.call(e);return a&&(t?e[s]=n:delete e[s]),l}var l=n(151),r=Object.prototype,u=r.hasOwnProperty,i=r.toString,s=l?l.toStringTag:void 0;e.exports=a},function(e,t){function n(e){return l.call(e)}var a=Object.prototype,l=a.toString;e.exports=n},function(e,t){function n(e,t){return function(n){return e(t(n))}}e.exports=n},function(e,t,n){var a=n(360),l="object"==typeof self&&self&&self.Object===Object&&self,r=a||l||Function("return this")();e.exports=r},function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n},,function(e,t,n){"use strict";var a=n(20),l=n(7),r=n(154);e.exports=function(){function e(e,t,n,a,u,i){i!==r&&l(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=a,n.PropTypes=n,n}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t.default=void 0;var i=n(1),s=n(100),o=a(s),d=n(176),c=a(d),f=n(177),m=(a(f),function(e){function t(n,a){l(this,t);var u=r(this,e.call(this,n,a));return u.store=n.store,u}return u(t,e),t.prototype.getChildContext=function(){return{store:this.store}},t.prototype.render=function(){return i.Children.only(this.props.children)},t}(i.Component));t.default=m,m.propTypes={store:c.default.isRequired,children:o.default.element.isRequired},m.childContextTypes={store:c.default.isRequired}},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e){return e.displayName||e.name||"Component"}function s(e,t){try{return e.apply(t)}catch(e){return D.value=e,D}}function o(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=Boolean(e),f=e||k,p=void 0;p="function"==typeof t?t:t?(0,E.default)(t):O;var _=n||x,v=a.pure,y=void 0===v||v,b=a.withRef,C=void 0!==b&&b,R=y&&_!==x,A=w++;return function(e){function t(e,t,n){var a=_(e,t,n);return a}var n="Connect("+i(e)+")",a=function(a){function i(e,t){l(this,i);var u=r(this,a.call(this,e,t));u.version=A,u.store=e.store||t.store,(0,T.default)(u.store,'Could not find "store" in either the context or '+('props of "'+n+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "store" as a prop to "'+n+'".'));var s=u.store.getState();return u.state={storeState:s},u.clearCache(),u}return u(i,a),i.prototype.shouldComponentUpdate=function(){return!y||this.haveOwnPropsChanged||this.hasStoreStateChanged},i.prototype.computeStateProps=function(e,t){if(!this.finalMapStateToProps)return this.configureFinalMapState(e,t);var n=e.getState(),a=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(n,t):this.finalMapStateToProps(n);return a},i.prototype.configureFinalMapState=function(e,t){var n=f(e.getState(),t),a="function"==typeof n;return this.finalMapStateToProps=a?n:f,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,a?this.computeStateProps(e,t):n},i.prototype.computeDispatchProps=function(e,t){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(e,t);var n=e.dispatch,a=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(n,t):this.finalMapDispatchToProps(n);return a},i.prototype.configureFinalMapDispatch=function(e,t){var n=p(e.dispatch,t),a="function"==typeof n;return this.finalMapDispatchToProps=a?n:p,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,a?this.computeDispatchProps(e,t):n},i.prototype.updateStatePropsIfNeeded=function(){var e=this.computeStateProps(this.store,this.props);return(!this.stateProps||!(0,h.default)(e,this.stateProps))&&(this.stateProps=e,!0)},i.prototype.updateDispatchPropsIfNeeded=function(){var e=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!(0,h.default)(e,this.dispatchProps))&&(this.dispatchProps=e,!0)},i.prototype.updateMergedPropsIfNeeded=function(){var e=t(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&R&&(0,h.default)(e,this.mergedProps))&&(this.mergedProps=e,!0)},i.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},i.prototype.trySubscribe=function(){o&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},i.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},i.prototype.componentDidMount=function(){this.trySubscribe()},i.prototype.componentWillReceiveProps=function(e){y&&(0,h.default)(e,this.props)||(this.haveOwnPropsChanged=!0)},i.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},i.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},i.prototype.handleChange=function(){if(this.unsubscribe){var e=this.store.getState(),t=this.state.storeState;if(!y||t!==e){if(y&&!this.doStatePropsDependOnOwnProps){var n=s(this.updateStatePropsIfNeeded,this);if(!n)return;n===D&&(this.statePropsPrecalculationError=D.value),this.haveStatePropsBeenPrecalculated=!0}this.hasStoreStateChanged=!0,this.setState({storeState:e})}}},i.prototype.getWrappedInstance=function(){return(0,T.default)(C,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},i.prototype.render=function(){var t=this.haveOwnPropsChanged,n=this.hasStoreStateChanged,a=this.haveStatePropsBeenPrecalculated,l=this.statePropsPrecalculationError,r=this.renderedElement;if(this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,l)throw l;var u=!0,i=!0;y&&r&&(u=n||t&&this.doStatePropsDependOnOwnProps,i=t&&this.doDispatchPropsDependOnOwnProps);var s=!1,o=!1;a?s=!0:u&&(s=this.updateStatePropsIfNeeded()),i&&(o=this.updateDispatchPropsIfNeeded());var f=!0;return f=!!(s||o||t)&&this.updateMergedPropsIfNeeded(),!f&&r?r:(C?this.renderedElement=(0,c.createElement)(e,d({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,c.createElement)(e,this.mergedProps),this.renderedElement)},i}(c.Component);return a.displayName=n,a.WrappedComponent=e,a.contextTypes={store:m.default},a.propTypes={store:m.default},(0,g.default)(a,e)}}t.__esModule=!0;var d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e};t.default=o;var c=n(1),f=n(176),m=a(f),p=n(435),h=a(p),_=n(436),E=a(_),v=n(177),y=(a(v),n(99)),b=(a(y),n(150)),g=a(b),C=n(18),T=a(C),k=function(e){return{}},O=function(e){return{dispatch:e}},x=function(e,t,n){return d({},n,e,t)},D={value:null},w=0},function(e,t){"use strict";function n(e,t){if(e===t)return!0;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(var l=Object.prototype.hasOwnProperty,r=0;r<n.length;r++)if(!l.call(t,n[r])||e[n[r]]!==t[n[r]])return!1;return!0}t.__esModule=!0,t.default=n},function(e,t,n){"use strict";function a(e){return function(t){return(0,l.bindActionCreators)(e,t)}}t.__esModule=!0,t.default=a;var l=n(120)},function(e,t,n){"use strict";function a(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function l(e){return function(){return function(t){return function(n){if(n.type!==r.CALL_HISTORY_METHOD)return t(n);var l=n.payload,u=l.method,i=l.args;e[u].apply(e,a(i))}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=n(178)},function(e,t,n){"use strict";function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=n.selectLocationState,i=void 0===a?u:a,s=n.adjustUrlOnReplay,o=void 0===s||s;if("undefined"==typeof i(t.getState()))throw new Error("Expected the routing state to be available either as `state.routing` or as the custom expression you can specify as `selectLocationState` in the `syncHistoryWithStore()` options. Ensure you have added the `routerReducer` to your store's reducers via `combineReducers` or whatever method you use to isolate your reducers.");var d=void 0,c=void 0,f=void 0,m=void 0,p=void 0,h=function(e){var n=i(t.getState());return n.locationBeforeTransitions||(e?d:void 0)};if(d=h(),o){var _=function(){var t=h(!0);p!==t&&d!==t&&(c=!0,p=t,e.transitionTo(l({},t,{action:"PUSH"})),c=!1)};f=t.subscribe(_),_()}var E=function(e){c||(p=e,!d&&(d=e,h())||t.dispatch({type:r.LOCATION_CHANGE,payload:e}))};return m=e.listen(E),e.getCurrentLocation&&E(e.getCurrentLocation()),l({},e,{listen:function(n){var a=h(!0),l=!1,r=t.subscribe(function(){var e=h(!0);e!==a&&(a=e,l||n(a))});return e.getCurrentLocation||n(a),function(){l=!0,r()}},unsubscribe:function(){o&&f(),m()}})}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e};t.default=a;var r=n(180),u=function(e){return e.routing}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){"use strict";function n(e){return function(t){var n=t.dispatch,a=t.getState;return function(t){return function(l){return"function"==typeof l?l(n,a,e):t(l)}}}}t.__esModule=!0;var a=n();a.withExtraArgument=n,t.default=a},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function l(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(n,a,l){var u=e(n,a,l),s=u.dispatch,o=[],d={getState:u.getState,dispatch:function(e){return s(e)}};return o=t.map(function(e){return e(d)}),s=i.default.apply(void 0,o)(u.dispatch),r({},u,{dispatch:s})}}}t.__esModule=!0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e};t.default=l;var u=n(193),i=a(u)},function(e,t){"use strict";function n(e,t){return function(){return t(e.apply(void 0,arguments))}}function a(e,t){if("function"==typeof e)return n(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var a=Object.keys(e),l={},r=0;r<a.length;r++){var u=a[r],i=e[u];"function"==typeof i&&(l[u]=n(i,t))}return l}t.__esModule=!0,t.default=a},function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var n=t&&t.type,a=n&&'"'+n.toString()+'"'||"an action";return"Given action "+a+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function r(e){Object.keys(e).forEach(function(t){var n=e[t],a=n(void 0,{type:i.ActionTypes.INIT});if("undefined"==typeof a)throw new Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");var l="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof n(void 0,{type:l}))throw new Error('Reducer "'+t+'" returned undefined when probed with a random type. '+("Don't try to handle "+i.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.")})}function u(e){for(var t=Object.keys(e),n={},a=0;a<t.length;a++){var u=t[a];"function"==typeof e[u]&&(n[u]=e[u])}var i=Object.keys(n),s=void 0;try{r(n)}catch(e){s=e}return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if(s)throw s;for(var a=!1,r={},u=0;u<i.length;u++){var o=i[u],d=n[o],c=e[o],f=d(c,t);if("undefined"==typeof f){var m=l(o,t);throw new Error(m)}r[o]=f,a=a||f!==c}return a?r:e}}t.__esModule=!0,t.default=u;var i=n(194),s=n(99),o=(a(s),n(195));a(o)},,function(e,t,n){e.exports=n(479)},function(e,t,n){(function(e,a){"use strict";function l(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r,u=n(480),i=l(u);r="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof e?e:a;var s=(0,i.default)(r);t.default=s}).call(t,function(){return this}(),n(481)(e))},function(e,t){"use strict";function n(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}}]);
traveller/App/Components/FullButton.js
Alabaster-Aardvarks/traveller
// @flow import React from 'react' import { TouchableOpacity, Text } from 'react-native' import styles from './Styles/FullButtonStyle' import ExamplesRegistry from '../Services/ExamplesRegistry' // Example ExamplesRegistry.add('Full Button', () => <FullButton text='Hey there, Harambe' onPress={() => window.alert('Full Button Pressed!')} /> ) type FullButtonProps = { text: string, onPress: () => void, styles?: Object } export default class FullButton extends React.Component { props: FullButtonProps render () { return ( <TouchableOpacity style={[styles.button, this.props.styles]} onPress={this.props.onPress}> <Text style={styles.buttonText}>{this.props.text && this.props.text.toUpperCase()}</Text> </TouchableOpacity> ) } }
packages/react-linked-input/__test__/LinkedInput-test.js
iamchenxin/react
/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @emails react-core */ 'use strict'; describe('LinkedStateMixin', function() { var LinkedInput; var React; var ReactDOM; beforeEach(function() { LinkedInput = require('LinkedInput'); React = require('React'); ReactDOM = require('ReactDOM'); }); it('should basically work', function() { var container = document.createElement('div'); var component = ReactDOM.render(<LinkedInput value="foo" onChange={function() {}} />, container); var input = ReactDOM.findDOMNode(component); expect(input.value).toBe('foo'); ReactDOM.render(<LinkedInput valueLink={{value: 'boo', requestChange: function() {}}} />, container); expect(input.value).toBe('boo'); }); it('should throw', function() { var container = document.createElement('div'); var element = <LinkedInput value="foo" valueLink={{value: 'boo', requestChange: function() {}}} />; expect(function() { ReactDOM.render(element, container); }).toThrow(); }); });
src/ButtonGroup/index.js
Paratron/modoJS
import React from 'react'; // import PropTypes from 'prop-types'; const propTypes = {}; const defaultProps = {}; export default class ButtonGroup extends React.Component { render() { const classNames = ['mdo-buttongroup']; if (this.props.className) { classNames.push(this.props.className); } return ( <div {...this.props} className={classNames.join(' ')}/> ); } } ButtonGroup.propTypes = propTypes; ButtonGroup.defaultProps = defaultProps;
ui/src/components/Navigation/Navigation.js
ebradshaw/insight
import React, { Component } from 'react'; import Navbar from 'react-bootstrap/lib/Navbar' import NavItem from 'react-bootstrap/lib/NavItem' import Nav from 'react-bootstrap/lib/Nav' class Navigation extends Component { render() { return ( <Navbar> <Navbar.Header> <Navbar.Brand> Insight UI </Navbar.Brand> <Navbar.Toggle /> <Navbar.Collapse> <Nav> <NavItem href="#metrics">Metrics</NavItem> </Nav> </Navbar.Collapse> </Navbar.Header> </Navbar> ) } } export default Navigation;
packages/material-ui-icons/legacy/Battery30Sharp.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path fillOpacity=".3" d="M17 4h-3V2h-4v2H7v11h10V4z" /><path d="M7 15v7h10v-7H7z" /></React.Fragment> , 'Battery30Sharp');
ajax/libs/mobx-react/3.3.0/index.min.js
cdnjs/cdnjs
!function(){function e(e,t,n){function o(e){return n?n.findDOMNode(e):null}function r(e){var t=o(e);t&&u.set(t,e),d.emit({event:"render",renderTime:e.__$mobRenderEnd-e.__$mobRenderStart,totalTime:Date.now()-e.__$mobRenderStart,component:e,node:t})}function i(e,t){var n=e[t],o=m[t];n?e[t]=function(){n.apply(this,arguments),o.apply(this,arguments)}:e[t]=o}function s(e){if("function"==typeof e&&!e.prototype.render&&!e.isReactClass&&!t.Component.isPrototypeOf(e))return s(t.createClass({displayName:e.displayName||e.name,propTypes:e.propTypes,contextTypes:e.contextTypes,getDefaultProps:function(){return e.defaultProps},render:function(){return e.call(this,this.props,this.context)}}));if(!e)throw new Error("Please pass a valid component to 'observer'");var n=e.prototype||e;return["componentWillMount","componentWillUnmount","componentDidMount","componentDidUpdate"].forEach(function(e){i(n,e)}),n.shouldComponentUpdate||(n.shouldComponentUpdate=m.shouldComponentUpdate),e.isMobXReactObserver=!0,e}function a(){if("undefined"==typeof WeakMap)throw new Error("[mobx-react] tracking components is not supported in this browser.");p||(p=!0)}function c(){this.listeners=[]}if(!e)throw new Error("mobx-react requires the MobX package");if(!t)throw new Error("mobx-react requires React to be available");var p=!1,u="undefined"!=typeof WeakMap?new WeakMap:void 0,d=new c,m={componentWillMount:function(){function n(){return a=new e.Reaction(r,function(){c||(c=!0,"function"==typeof s.componentWillReact&&s.componentWillReact(),t.Component.prototype.forceUpdate.call(s))}),o.$mobx=a,s.render=o,o()}function o(){c=!1;var t;return a.track(function(){p&&(s.__$mobRenderStart=Date.now()),t=e.extras.allowStateChanges(!1,i),p&&(s.__$mobRenderEnd=Date.now())}),t}var r=[this.displayName||this.name||this.constructor&&(this.constructor.displayName||this.constructor.name)||"<component>","#",this._reactInternalInstance&&this._reactInternalInstance._rootNodeID,".render()"].join(""),i=this.render.bind(this),s=this,a=null,c=!1;this.render=n},componentWillUnmount:function(){if(this.render.$mobx&&this.render.$mobx.dispose(),p){var e=o(this);e&&u.delete(e),d.emit({event:"destroy",component:this,node:e})}},componentDidMount:function(){p&&r(this)},componentDidUpdate:function(){p&&r(this)},shouldComponentUpdate:function(t,n){if(this.render.$mobx&&this.render.$mobx.isScheduled()===!0)return!1;if(this.state!==n)return!0;var o,r=Object.keys(this.props);if(r.length!==Object.keys(t).length)return!0;for(var i=r.length-1;o=r[i];i--){var s=t[o];if(s!==this.props[o])return!0;if(s&&"object"==typeof s&&!e.isObservable(s))return!0}return!1}};return c.prototype.on=function(e){this.listeners.push(e);var t=this;return function(){var n=t.listeners.indexOf(e);n!==-1&&t.listeners.splice(n,1)}},c.prototype.emit=function(e){this.listeners.forEach(function(t){t(e)})},{observer:s,reactiveComponent:function(){return console.warn("[mobx-react] `reactiveComponent` has been renamed to `observer` and will be removed in 1.1."),s.apply(null,arguments)},renderReporter:d,componentByNodeRegistery:u,trackComponents:a}}"object"==typeof exports?module.exports=e(require("mobx"),require("react"),require("react-dom")):"function"==typeof define&&define.amd?define("mobx-react",["mobx","react","react-dom"],e):this.mobxReact=e(this.mobx,this.React,this.ReactDOM)}(); //# sourceMappingURL=index.min.js.map
src/app/components/Footer.js
Boluwatifes/andela24
import React from 'react'; const Footer = () => ( <div className="col s12 home-inner footer" > <div className="inner-content center m-auto"> <p> Copyright &copy; 2017 Andela24 News - All rights reserved </p> </div> </div> ); export default Footer;
3_compress_ensure_render/component/extPage/index.js
chkui/react-server-demo
import React from 'react' const ExtPage = props =>{ return( <div>这就是一个为了静态看的页面</div> ) } module.exports = ExtPage module.exports.default = module.exports
cm19/ReactJS/your-first-react-app-exercises-master/exercise-17/friends/Friends.entry.js
Brandon-J-Campbell/codemash
import React from 'react'; import getFriendsFromApi from './get-friends-from-api'; import Friends from './Friends'; export default class FriendsEntry extends React.Component { state = { friends: [] } async componentDidMount() { const friends = await getFriendsFromApi(); this.setState({ friends }); } render() { return <Friends friends={this.state.friends} />; } }
src/components/Header/Header.js
jlopezh/donation-project
import React from 'react'; import withStyles from 'isomorphic-style-loader/lib/withStyles'; import s from './Header.scss'; import Link from '../Link'; import Navigation from '../Navigation'; function Header() { return ( <div className={s.root}> <div className={s.container}> <Navigation className={s.nav} /> <Link className={s.brand} to="/"> <img src={require('./logo-small.png')} width="38" height="38" alt="React" /> <span className={s.brandTxt}>Blood Donors App</span> </Link> </div> </div> ); } export default withStyles(Header, s);
src/views/components/icon/index.spec.js
zerubeus/sawt
import React from 'react'; import { render, shallow } from 'enzyme'; import Icon from './index'; describe('views', () => { describe('Icon', () => { it('should render an icon', () => { let wrapper = shallow(<Icon name="play" />); let svg = wrapper.find('svg'); expect(svg.length).toBe(1); expect(svg.hasClass('icon')).toBe(true); expect(svg.contains(<use xlinkHref="#icon-play" />)).toBe(true); }); it('should add css classes', () => { const wrapper = render(<Icon className="foo bar" name="play" />); let svg = wrapper.find('svg'); expect(svg.hasClass('icon icon--play foo bar')).toBe(true); }); }); });
node_modules/react-bootstrap/lib/Jumbotron.js
rblin081/drafting-client
'use strict'; exports.__esModule = true; var _extends2 = require('babel-runtime/helpers/extends'); var _extends3 = _interopRequireDefault(_extends2); var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties'); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck'); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn'); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = require('babel-runtime/helpers/inherits'); var _inherits3 = _interopRequireDefault(_inherits2); var _react = require('react'); var _react2 = _interopRequireDefault(_react); var _classnames = require('classnames'); var _classnames2 = _interopRequireDefault(_classnames); var _elementType = require('prop-types-extra/lib/elementType'); var _elementType2 = _interopRequireDefault(_elementType); var _bootstrapUtils = require('./utils/bootstrapUtils'); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var propTypes = { componentClass: _elementType2['default'] }; var defaultProps = { componentClass: 'div' }; var Jumbotron = function (_React$Component) { (0, _inherits3['default'])(Jumbotron, _React$Component); function Jumbotron() { (0, _classCallCheck3['default'])(this, Jumbotron); return (0, _possibleConstructorReturn3['default'])(this, _React$Component.apply(this, arguments)); } Jumbotron.prototype.render = function render() { var _props = this.props, Component = _props.componentClass, className = _props.className, props = (0, _objectWithoutProperties3['default'])(_props, ['componentClass', 'className']); var _splitBsProps = (0, _bootstrapUtils.splitBsProps)(props), bsProps = _splitBsProps[0], elementProps = _splitBsProps[1]; var classes = (0, _bootstrapUtils.getClassSet)(bsProps); return _react2['default'].createElement(Component, (0, _extends3['default'])({}, elementProps, { className: (0, _classnames2['default'])(className, classes) })); }; return Jumbotron; }(_react2['default'].Component); Jumbotron.propTypes = propTypes; Jumbotron.defaultProps = defaultProps; exports['default'] = (0, _bootstrapUtils.bsClass)('jumbotron', Jumbotron); module.exports = exports['default'];
src/svg-icons/action/timeline.js
pancho111203/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionTimeline = (props) => ( <SvgIcon {...props}> <path d="M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2z"/> </SvgIcon> ); ActionTimeline = pure(ActionTimeline); ActionTimeline.displayName = 'ActionTimeline'; ActionTimeline.muiName = 'SvgIcon'; export default ActionTimeline;
src/components/tab2/Step1.js
dfw-chris-diaz/react-demo
import React from 'react'; import { Link } from 'react-router'; export default function Step1() { return ( <div> <h1 id="setp3_hdr"><span className="brightRedText">Step 1</span></h1> <div>Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. <Link to="/Tab1">"Tab 1"</Link></div> </div> ); }
mobile/__tests__/index.android.js
sradevski/homeAutomate
import 'react-native'; import React from 'react'; import Index from '../index.android.js'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; it('renders correctly', () => { const tree = renderer.create( <Index /> ); });
node_modules/enzyme/src/ShallowTraversal.js
furgat/sabertoot
import React from 'react'; import isEmpty from 'lodash/isEmpty'; import isSubset from 'is-subset'; import functionName from 'function.prototype.name'; import { propsOfNode, splitSelector, isCompoundSelector, selectorType, AND, SELECTOR, nodeHasType, nodeHasProperty, } from './Utils'; export function childrenOfNode(node) { if (!node) return []; const maybeArray = propsOfNode(node).children; const result = []; React.Children.forEach(maybeArray, (child) => { if (child !== null && child !== false && typeof child !== 'undefined') { result.push(child); } }); return result; } export function hasClassName(node, className) { let classes = propsOfNode(node).className || ''; classes = String(classes).replace(/\s/g, ' '); return ` ${classes} `.indexOf(` ${className} `) > -1; } export function treeForEach(tree, fn) { if (tree !== null && tree !== false && typeof tree !== 'undefined') { fn(tree); } childrenOfNode(tree).forEach(node => treeForEach(node, fn)); } export function treeFilter(tree, fn) { const results = []; treeForEach(tree, (node) => { if (fn(node)) { results.push(node); } }); return results; } function pathFilter(path, fn) { return path.filter(tree => treeFilter(tree, fn).length !== 0); } export function pathToNode(node, root) { const queue = [root]; const path = []; const hasNode = testNode => node === testNode; while (queue.length) { const current = queue.pop(); const children = childrenOfNode(current); if (current === node) return pathFilter(path, hasNode); path.push(current); if (children.length === 0) { // leaf node. if it isn't the node we are looking for, we pop. path.pop(); } queue.push(...children); } return null; } export function parentsOfNode(node, root) { return pathToNode(node, root).reverse(); } export function nodeHasId(node, id) { return propsOfNode(node).id === id; } export { nodeHasProperty }; export function nodeMatchesObjectProps(node, props) { return isSubset(propsOfNode(node), props); } export function buildPredicate(selector) { switch (typeof selector) { case 'function': // selector is a component constructor return node => node && node.type === selector; case 'string': if (isCompoundSelector.test(selector)) { return AND(splitSelector(selector).map(buildPredicate)); } switch (selectorType(selector)) { case SELECTOR.CLASS_TYPE: return node => hasClassName(node, selector.slice(1)); case SELECTOR.ID_TYPE: return node => nodeHasId(node, selector.slice(1)); case SELECTOR.PROP_TYPE: { const propKey = selector.split(/\[([a-zA-Z-]*?)(=|])/)[1]; const propValue = selector.split(/=(.*?)]/)[1]; return node => nodeHasProperty(node, propKey, propValue); } default: // selector is a string. match to DOM tag or constructor displayName return node => nodeHasType(node, selector); } case 'object': if (!Array.isArray(selector) && selector !== null && !isEmpty(selector)) { return node => nodeMatchesObjectProps(node, selector); } throw new TypeError( 'Enzyme::Selector does not support an array, null, or empty object as a selector', ); default: throw new TypeError('Enzyme::Selector expects a string, object, or Component Constructor'); } } export function getTextFromNode(node) { if (node === null || node === undefined) { return ''; } if (typeof node === 'string' || typeof node === 'number') { return String(node); } if (node.type && typeof node.type === 'function') { return `<${node.type.displayName || functionName(node.type)} />`; } return childrenOfNode(node).map(getTextFromNode) .join('') .replace(/\s+/, ' '); }
src/ItemView.js
jdaudier/Timo-Plato
import React, { Component } from 'react'; import { Button } from './Button'; import { styles } from './styles/styles'; export class ItemView extends Component { constructor(props) { super(props); this.state = { editMode: false, origProjectName: this.props.projectName, projectName: this.props.projectName, time: 0, formattedTime: '00:00:00', running: false }; var icons = ['at_sign', 'clock', 'coffee', 'doc', 'download', 'globe', 'heart', 'hi', 'home', 'lightbulb', 'money', 'phone', 'pizza', 'plant', 'play_btn', 'profile', 'rocket', 'settings', 'vader']; this.icon = icons[Math.floor(Math.random()*icons.length)]; var startIcons = ['heart', 'start', 'sun', 'timer', 'traffic-lights']; this.startIcons = startIcons[Math.floor(Math.random()*startIcons.length)]; } componentWillMount() { this.intervals = []; this.timeouts = []; } setInterval() { this.intervals.push(setInterval.apply(null, arguments)); } setTimeout() { this.timeouts.push(setTimeout.apply(null, arguments)); } componentWillUnmount() { this.intervals.map(clearInterval); this.timeouts.map(clearTimeout); } clearIntervals() { this.intervals.map(clearInterval); } clearTimeouts() { this.timeouts.map(clearTimeout); } createNotification(title, body, icon, requireInteraction) { var options = { body: body, icon: icon, requireInteraction: requireInteraction }; var notification = new Notification(title, options); if (requireInteraction) { this.notification = notification; notification.onclick = () => this.addTime(); notification.onshow = () => this.onShow(); notification.onclose = () => this.onCloseClick(); } else { // For self-closing notifications this.setTimeout(() => { notification.close(); }, 3000); } } addTime() { this.startTimer(); } onShow() { this.clearIntervals(); if (this.state.running) { this.setState({ running: false }); } } onCloseClick() { if (this.state.running) { this.setState({ running: false }); } } tick() { this.setState({ time: this.state.time + 1 }, this.formatTime.bind(this)); if (!this.state.running) { this.setState({ running: true }); } } pad(num) { var s = '0000' + num; return s.substr(s.length - 2); } formatTime() { var unformattedTime = this.state.time; var hours = Math.floor((unformattedTime % 86400) / 3600); var minutes = Math.floor(((unformattedTime % 86400) % 3600) / 60); var seconds = ((unformattedTime % 86400) % 3600) % 60; var formattedTime = `${this.pad(hours)}:${this.pad(minutes)}:${this.pad(seconds)}`; this.setState({ formattedTime: formattedTime }); } createInteractiveNotification() { this.createNotification( `Still working on ${this.state.projectName}?`, `Click this message if YES. Close if NO.`, 'images/clock.png', true ); } handleClick() { this.setState({ running: !this.state.running }, function() { this.toggleNotifications(); }); } toggleNotifications() { if (this.state.running) { this.createNotification( 'IT HAS BEGAN!', 'Timo Plato has started!.', 'images/start/' + this.startIcons + '.png' ); this.startTimer(); } else { this.pauseTimer(); } } closeNotification() { if (this.notification) { this.notification.close(); } } startTimer() { this.closeNotification(); this.setInterval(() => this.tick(), 1000); this.setTimeout(() => { this.createInteractiveNotification(); }, 900000); } pauseTimer() { this.clearTimeouts(); this.clearIntervals(); this.closeNotification(); this.createNotification( 'PAUSED!', 'Click me to un-pause!', 'images/moon.png', true ); } handleEdit() { this.save(); } handleChange(e) { this.setState({ projectName: e.target.value }); } handleSubmit(e) { if (e.key === 'Enter') { this.save(); } } save() { if (this.state.origProjectName !== this.state.projectName) { if (this.props.isProjectNameUnique(this.state.projectName)) { this.props.editProjectList(this.state); this.setState({ editMode: !this.state.editMode }); } } else { this.setState({ editMode: !this.state.editMode }); } } handleReset() { this.clearTimeouts(); this.clearIntervals(); this.closeNotification(); this.setState({ time: 0 }); this.setState({ formattedTime: '00:00:00' }); this.setState({ running: false }); } handleDelete() { this.closeNotification(); this.props.onDelete(this.state.projectName); } render() { return ( <li style={styles.li}> <img style={styles.image} src={`images/icons/${this.icon}.png`} /> <h1 style={this.state.editMode ? styles.hidden : styles.h1}>{this.state.projectName}</h1> <input style={this.state.editMode ? styles.projectNameInput : styles.hidden} type='text' name='projectName' value={this.state.projectName} onChange={this.handleChange.bind(this)} onKeyUp={this.handleSubmit.bind(this)} /> <h2 style={styles.h2}>{this.state.formattedTime}</h2> <Button onClick={() => this.handleClick()} buttonType={this.state.running ? 'pause' : 'play'} /> <Button onClick={() => this.handleEdit()} buttonType={this.state.editMode ? 'save' : 'edit'} /> <Button onClick={() => this.handleReset()} buttonType='reset' /> <Button onClick={() => this.handleDelete()} buttonType='delete' /> </li> ); } }
packages/material-ui-icons/src/LastPageRounded.js
Kagami/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path fill="none" d="M0 0h24v24H0V0z" opacity=".87" /><path d="M6.29 8.11L10.18 12l-3.89 3.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0l4.59-4.59c.39-.39.39-1.02 0-1.41L7.7 6.7a.9959.9959 0 0 0-1.41 0c-.38.39-.38 1.03 0 1.41zM17 6c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1s-1-.45-1-1V7c0-.55.45-1 1-1z" /></React.Fragment> , 'LastPageRounded');
src/EventCell.js
manishksmd/react-scheduler-smartdata
import PropTypes from 'prop-types'; import React from 'react'; import cn from 'classnames'; import dates from './utils/dates'; import { accessor, elementType } from './utils/propTypes'; import { accessor as get } from './utils/accessors'; import Img from './img/doctor.png'; import AppointmentBox from './AppointmentBox'; let propTypes = { event: PropTypes.object.isRequired, slotStart: PropTypes.instanceOf(Date), slotEnd: PropTypes.instanceOf(Date), selected: PropTypes.bool, eventPropGetter: PropTypes.func, titleAccessor: accessor, // @Appointment field info declaration patientNameAccessor: accessor, clinicianImageAccessor: accessor, clinicianNameAccessor: accessor, appointmentTypeAccessor: accessor, appointmentTimeAccessor: accessor, appointmentAddressAccessor: accessor, coPayAccessor: accessor, soapNoteTitleAccessor: accessor, setProfileTitleAccessor: accessor, staffsAccessor: accessor, isRecurrenceAccessor: accessor, isRecurrenceEditAccessor: accessor, isEditAccessor: accessor, isDeleteAccessor: accessor, isCancelAccessor: accessor, isUnCancelAccessor: accessor, isApproveAccessor: accessor, cancellationReasonAccessor: accessor, isAppointmentRenderedAccessor: accessor, isVideoCallAccessor: accessor, isAppoinmentCancelledAccessor: accessor, practitionerNameAccessor: accessor, allDayAccessor: accessor, startAccessor: accessor, endAccessor: accessor, eventComponent: elementType, eventWrapperComponent: elementType.isRequired, onSelect: PropTypes.func } class EventCell extends React.Component { constructor(props) { super(props); this.hoverDialogActions = this.hoverDialogActions.bind(this); } render() { let { className , event , selected , eventPropGetter , startAccessor , endAccessor , titleAccessor , isAppointmentRenderedAccessor , isVideoCallAccessor , isAppoinmentCancelledAccessor , isRecurrenceAccessor , slotStart , slotEnd , eventComponent: Event , eventWrapperComponent: EventWrapper , ...props } = this.props; let title = get(event, titleAccessor) , isRecurrence = get(event, isRecurrenceAccessor) , isAppointmentRendered = get(event, isAppointmentRenderedAccessor) , isVideoCall = get(event, isVideoCallAccessor) , isAppoinmentCancelled = get(event, isAppoinmentCancelledAccessor) , end = get(event, endAccessor) , start = get(event, startAccessor) , isAllDay = get(event, props.allDayAccessor) , continuesPrior = dates.lt(start, slotStart, 'day') , continuesAfter = dates.gt(end, slotEnd, 'day') if (eventPropGetter) var { style, className: xClassName } = eventPropGetter(event, start, end, selected); return ( <EventWrapper event={event} isRow={true} isMonthView={true}> <div style={{...props.style, ...style}} className={cn('rbc-event', className, xClassName, { 'rbc-selected': selected, 'rbc-event-allday': isAllDay || dates.diff(start, dates.ceil(end, 'day'), 'day') > 1, 'rbc-event-continues-prior': continuesPrior, 'rbc-event-continues-after': continuesAfter })} // onClick={(e) => onSelect(event, e)} > <div className='rbc-event-content'> <ul className="quickview"> {isRecurrence === true ? <li><i className="fa fa-repeat" aria-hidden="true"></i></li> : ''} {isAppointmentRendered ? <li><i className="fa fa-check-circle-o" aria-hidden="true"></i></li> : ''} {isVideoCall ? <li><i className="fa fa-video-camera" aria-hidden="true"></i></li> : ''} {isAppoinmentCancelled ? <li><i className="fa fa-ban" aria-hidden="true"></i></li> : ''} </ul> { Event ? <Event event={event} title={title}/> : title } <AppointmentBox {...this.props} popupClassName="appointment_box month_box" hoverDialogActions={this.hoverDialogActions} /> </div> </div> </EventWrapper> ); } hoverDialogActions(event, e, action) { e.preventDefault(); event.action = action; this.props.onSelect(event, e); } } EventCell.propTypes = propTypes; export default EventCell
src/tools/index.js
edabot/supa
/** * React Static Boilerplate * https://github.com/kriasoft/react-static-boilerplate * * Copyright © 2015-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import Layout from '../../components/Layout'; import s from './styles.css'; import { title, html } from './index.md'; import App from './App'; class AboutPage extends React.Component { componentDidMount() { document.title = title; } render() { return ( <Layout className={s.content}> <App /> </Layout> ); } } export default AboutPage;
tests/framework.spec.js
janceChun/redux-docker-swarm
import assert from 'assert' import React from 'react' import {mount, render, shallow} from 'enzyme' class Fixture extends React.Component { render () { return ( <div> <input id='checked' defaultChecked /> <input id='not' defaultChecked={false} /> </div> ) } } describe('(Framework) Karma Plugins', function () { it('Should expose "expect" globally.', function () { assert.ok(expect) }) it('Should expose "should" globally.', function () { assert.ok(should) }) it('Should have chai-as-promised helpers.', function () { const pass = new Promise(res => res('test')) const fail = new Promise((res, rej) => rej()) return Promise.all([ expect(pass).to.be.fulfilled, expect(fail).to.not.be.fulfilled ]) }) it('should have chai-enzyme working', function() { let wrapper = shallow(<Fixture />) expect(wrapper.find('#checked')).to.be.checked() wrapper = mount(<Fixture />) expect(wrapper.find('#checked')).to.be.checked() wrapper = render(<Fixture />) expect(wrapper.find('#checked')).to.be.checked() }) })
src/shared/Error.js
kashisau/enroute
/** * Error.js * * (C) 2017 mobile.de GmbH * * @author <a href="mailto:[email protected]">Patrick Hund</a> * @since 10 Feb 2017 */ import React from 'react'; const style = { padding: '16px' }; export default () => ( <div style={style}> <h1>Sorry!</h1> <p>Something went horribly wrong…</p> </div> );
docs/src/components/Docs/Props/index.js
michalko/draft-wyswig
/* @flow */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { EditorState, convertToRaw, ContentState, Modifier } from 'draft-js'; import draftToHtml from 'draftjs-to-html'; import htmlToDraft from 'html-to-draftjs'; import { Editor } from 'react-draft-wysiwyg'; import Codemirror from 'react-codemirror'; import sampleEditorContent from '../../../util/sampleEditorContent'; import EditorStyleProp from './EditorStyleProp'; import EditorStateProp from './EditorStateProp'; import CustomizingToolbarProp from './CustomizingToolbarProp'; import MentionProp from './MentionProp'; import HashtagProp from './HashtagProp'; import EventCallbackProp from './EventCallbackProp'; import DraftjsProp from './DraftjsProp'; import TextAlignmentProp from './TextAlignmentProp'; import ReadOnlyProp from './ReadOnlyProp'; import DecoratorProp from './DecoratorProp'; import BlockRenderingProp from './BlockRenderingProp'; import WrapperIdProp from './WrapperIdProp'; const Props = () => ( <div className="docs-section"> <h2>Properties</h2> <EditorStyleProp /> <EditorStateProp /> <CustomizingToolbarProp /> <MentionProp /> <HashtagProp /> <EventCallbackProp /> <DraftjsProp /> <TextAlignmentProp /> <ReadOnlyProp /> <DecoratorProp /> <BlockRenderingProp /> <WrapperIdProp /> </div> ); export default Props;
ajax/libs/yui/3.4.1/yui/yui-debug.js
hristozov/cdnjs
/** * The YUI module contains the components required for building the YUI seed * file. This includes the script loading mechanism, a simple queue, and * the core utilities for the library. * @module yui * @submodule yui-base */ if (typeof YUI != 'undefined') { YUI._YUI = YUI; } /** The YUI global namespace object. If YUI is already defined, the existing YUI object will not be overwritten so that defined namespaces are preserved. It is the constructor for the object the end user interacts with. As indicated below, each instance has full custom event support, but only if the event system is available. This is a self-instantiable factory function. You can invoke it directly like this: YUI().use('*', function(Y) { // ready }); But it also works like this: var Y = YUI(); @class YUI @constructor @global @uses EventTarget @param o* {Object} 0..n optional configuration objects. these values are store in Y.config. See <a href="config.html">Config</a> for the list of supported properties. */ /*global YUI*/ /*global YUI_config*/ var YUI = function() { var i = 0, Y = this, args = arguments, l = args.length, instanceOf = function(o, type) { return (o && o.hasOwnProperty && (o instanceof type)); }, gconf = (typeof YUI_config !== 'undefined') && YUI_config; if (!(instanceOf(Y, YUI))) { Y = new YUI(); } else { // set up the core environment Y._init(); /** YUI.GlobalConfig is a master configuration that might span multiple contexts in a non-browser environment. It is applied first to all instances in all contexts. @property GlobalConfig @type {Object} @global @static @example YUI.GlobalConfig = { filter: 'debug' }; YUI().use('node', function(Y) { //debug files used here }); YUI({ filter: 'min' }).use('node', function(Y) { //min files used here }); */ if (YUI.GlobalConfig) { Y.applyConfig(YUI.GlobalConfig); } /** YUI_config is a page-level config. It is applied to all instances created on the page. This is applied after YUI.GlobalConfig, and before the instance level configuration objects. @global @property YUI_config @type {Object} @example //Single global var to include before YUI seed file YUI_config = { filter: 'debug' }; YUI().use('node', function(Y) { //debug files used here }); YUI({ filter: 'min' }).use('node', function(Y) { //min files used here }); */ if (gconf) { Y.applyConfig(gconf); } // bind the specified additional modules for this instance if (!l) { Y._setup(); } } if (l) { // Each instance can accept one or more configuration objects. // These are applied after YUI.GlobalConfig and YUI_Config, // overriding values set in those config files if there is a ' // matching property. for (; i < l; i++) { Y.applyConfig(args[i]); } Y._setup(); } Y.instanceOf = instanceOf; return Y; }; (function() { var proto, prop, VERSION = '@VERSION@', PERIOD = '.', BASE = 'http://yui.yahooapis.com/', DOC_LABEL = 'yui3-js-enabled', NOOP = function() {}, SLICE = Array.prototype.slice, APPLY_TO_AUTH = { 'io.xdrReady': 1, // the functions applyTo 'io.xdrResponse': 1, // can call. this should 'SWF.eventHandler': 1 }, // be done at build time hasWin = (typeof window != 'undefined'), win = (hasWin) ? window : null, doc = (hasWin) ? win.document : null, docEl = doc && doc.documentElement, docClass = docEl && docEl.className, instances = {}, time = new Date().getTime(), add = function(el, type, fn, capture) { if (el && el.addEventListener) { el.addEventListener(type, fn, capture); } else if (el && el.attachEvent) { el.attachEvent('on' + type, fn); } }, remove = function(el, type, fn, capture) { if (el && el.removeEventListener) { // this can throw an uncaught exception in FF try { el.removeEventListener(type, fn, capture); } catch (ex) {} } else if (el && el.detachEvent) { el.detachEvent('on' + type, fn); } }, handleLoad = function() { YUI.Env.windowLoaded = true; YUI.Env.DOMReady = true; if (hasWin) { remove(window, 'load', handleLoad); } }, getLoader = function(Y, o) { var loader = Y.Env._loader; if (loader) { //loader._config(Y.config); loader.ignoreRegistered = false; loader.onEnd = null; loader.data = null; loader.required = []; loader.loadType = null; } else { loader = new Y.Loader(Y.config); Y.Env._loader = loader; } YUI.Env.core = Y.Array.dedupe([].concat(YUI.Env.core, [ 'loader-base', 'loader-rollup', 'loader-yui3' ])); return loader; }, clobber = function(r, s) { for (var i in s) { if (s.hasOwnProperty(i)) { r[i] = s[i]; } } }, ALREADY_DONE = { success: true }; // Stamp the documentElement (HTML) with a class of "yui-loaded" to // enable styles that need to key off of JS being enabled. if (docEl && docClass.indexOf(DOC_LABEL) == -1) { if (docClass) { docClass += ' '; } docClass += DOC_LABEL; docEl.className = docClass; } if (VERSION.indexOf('@') > -1) { VERSION = '3.3.0'; // dev time hack for cdn test } proto = { /** * Applies a new configuration object to the YUI instance config. * This will merge new group/module definitions, and will also * update the loader cache if necessary. Updating Y.config directly * will not update the cache. * @method applyConfig * @param {Object} o the configuration object. * @since 3.2.0 */ applyConfig: function(o) { o = o || NOOP; var attr, name, // detail, config = this.config, mods = config.modules, groups = config.groups, rls = config.rls, loader = this.Env._loader; for (name in o) { if (o.hasOwnProperty(name)) { attr = o[name]; if (mods && name == 'modules') { clobber(mods, attr); } else if (groups && name == 'groups') { clobber(groups, attr); } else if (rls && name == 'rls') { clobber(rls, attr); } else if (name == 'win') { config[name] = attr.contentWindow || attr; config.doc = config[name].document; } else if (name == '_yuid') { // preserve the guid } else { config[name] = attr; } } } if (loader) { loader._config(o); } }, /** * Old way to apply a config to the instance (calls `applyConfig` under the hood) * @private * @method _config * @param {Object} o The config to apply */ _config: function(o) { this.applyConfig(o); }, /** * Initialize this YUI instance * @private * @method _init */ _init: function() { var filter, Y = this, G_ENV = YUI.Env, Env = Y.Env, prop; /** * The version number of the YUI instance. * @property version * @type string */ Y.version = VERSION; if (!Env) { Y.Env = { core: ['get','features','intl-base','yui-log','yui-later','loader-base', 'loader-rollup', 'loader-yui3'], mods: {}, // flat module map versions: {}, // version module map base: BASE, cdn: BASE + VERSION + '/build/', // bootstrapped: false, _idx: 0, _used: {}, _attached: {}, _missed: [], _yidx: 0, _uidx: 0, _guidp: 'y', _loaded: {}, // serviced: {}, // Regex in English: // I'll start at the \b(simpleyui). // 1. Look in the test string for "simpleyui" or "yui" or // "yui-base" or "yui-rls" or "yui-foobar" that comes after a word break. That is, it // can't match "foyui" or "i_heart_simpleyui". This can be anywhere in the string. // 2. After #1 must come a forward slash followed by the string matched in #1, so // "yui-base/yui-base" or "simpleyui/simpleyui" or "yui-pants/yui-pants". // 3. The second occurence of the #1 token can optionally be followed by "-debug" or "-min", // so "yui/yui-min", "yui/yui-debug", "yui-base/yui-base-debug". NOT "yui/yui-tshirt". // 4. This is followed by ".js", so "yui/yui.js", "simpleyui/simpleyui-min.js" // 0. Going back to the beginning, now. If all that stuff in 1-4 comes after a "?" in the string, // then capture the junk between the LAST "&" and the string in 1-4. So // "blah?foo/yui/yui.js" will capture "foo/" and "blah?some/thing.js&3.3.0/build/yui-rls/yui-rls.js" // will capture "3.3.0/build/" // // Regex Exploded: // (?:\? Find a ? // (?:[^&]*&) followed by 0..n characters followed by an & // * in fact, find as many sets of characters followed by a & as you can // ([^&]*) capture the stuff after the last & in \1 // )? but it's ok if all this ?junk&more_junk stuff isn't even there // \b(simpleyui| after a word break find either the string "simpleyui" or // yui(?:-\w+)? the string "yui" optionally followed by a -, then more characters // ) and store the simpleyui or yui-* string in \2 // \/\2 then comes a / followed by the simpleyui or yui-* string in \2 // (?:-(min|debug))? optionally followed by "-min" or "-debug" // .js and ending in ".js" _BASE_RE: /(?:\?(?:[^&]*&)*([^&]*))?\b(simpleyui|yui(?:-\w+)?)\/\2(?:-(min|debug))?\.js/, parseBasePath: function(src, pattern) { var match = src.match(pattern), path, filter; if (match) { path = RegExp.leftContext || src.slice(0, src.indexOf(match[0])); // this is to set up the path to the loader. The file // filter for loader should match the yui include. filter = match[3]; // extract correct path for mixed combo urls // http://yuilibrary.com/projects/yui3/ticket/2528423 if (match[1]) { path += '?' + match[1]; } path = { filter: filter, path: path } } return path; }, getBase: G_ENV && G_ENV.getBase || function(pattern) { var nodes = (doc && doc.getElementsByTagName('script')) || [], path = Env.cdn, parsed, i, len, src; for (i = 0, len = nodes.length; i < len; ++i) { src = nodes[i].src; if (src) { parsed = Y.Env.parseBasePath(src, pattern); if (parsed) { filter = parsed.filter; path = parsed.path; break; } } } // use CDN default return path; } }; Env = Y.Env; Env._loaded[VERSION] = {}; if (G_ENV && Y !== YUI) { Env._yidx = ++G_ENV._yidx; Env._guidp = ('yui_' + VERSION + '_' + Env._yidx + '_' + time).replace(/\./g, '_'); } else if (YUI._YUI) { G_ENV = YUI._YUI.Env; Env._yidx += G_ENV._yidx; Env._uidx += G_ENV._uidx; for (prop in G_ENV) { if (!(prop in Env)) { Env[prop] = G_ENV[prop]; } } delete YUI._YUI; } Y.id = Y.stamp(Y); instances[Y.id] = Y; } Y.constructor = YUI; // configuration defaults Y.config = Y.config || { win: win, doc: doc, debug: true, useBrowserConsole: true, throwFail: true, bootstrap: true, cacheUse: true, fetchCSS: true, use_rls: false, rls_timeout: 2000 }; if (YUI.Env.rls_disabled) { Y.config.use_rls = false; } Y.config.lang = Y.config.lang || 'en-US'; Y.config.base = YUI.config.base || Y.Env.getBase(Y.Env._BASE_RE); if (!filter || (!('mindebug').indexOf(filter))) { filter = 'min'; } filter = (filter) ? '-' + filter : filter; Y.config.loaderPath = YUI.config.loaderPath || 'loader/loader' + filter + '.js'; }, /** * Finishes the instance setup. Attaches whatever modules were defined * when the yui modules was registered. * @method _setup * @private */ _setup: function(o) { var i, Y = this, core = [], mods = YUI.Env.mods, //extras = Y.config.core || ['get','features','intl-base','yui-log','yui-later','loader-base', 'loader-rollup', 'loader-yui3']; extras = Y.config.core || [].concat(YUI.Env.core); //Clone it.. for (i = 0; i < extras.length; i++) { if (mods[extras[i]]) { core.push(extras[i]); } } Y._attach(['yui-base']); Y._attach(core); if (Y.Loader) { getLoader(Y); } // Y.log(Y.id + ' initialized', 'info', 'yui'); }, /** * Executes a method on a YUI instance with * the specified id if the specified method is whitelisted. * @method applyTo * @param id {String} the YUI instance id. * @param method {String} the name of the method to exectute. * Ex: 'Object.keys'. * @param args {Array} the arguments to apply to the method. * @return {Object} the return value from the applied method or null. */ applyTo: function(id, method, args) { if (!(method in APPLY_TO_AUTH)) { this.log(method + ': applyTo not allowed', 'warn', 'yui'); return null; } var instance = instances[id], nest, m, i; if (instance) { nest = method.split('.'); m = instance; for (i = 0; i < nest.length; i = i + 1) { m = m[nest[i]]; if (!m) { this.log('applyTo not found: ' + method, 'warn', 'yui'); } } return m.apply(instance, args); } return null; }, /** Registers a module with the YUI global. The easiest way to create a first-class YUI module is to use the YUI component build tool. http://yuilibrary.com/projects/builder The build system will produce the `YUI.add` wrapper for you module, along with any configuration info required for the module. @method add @param name {String} module name. @param fn {Function} entry point into the module that is used to bind module to the YUI instance. @param {YUI} fn.Y The YUI instance this module is executed in. @param {String} fn.name The name of the module @param version {String} version string. @param details {Object} optional config data: @param details.requires {Array} features that must be present before this module can be attached. @param details.optional {Array} optional features that should be present if loadOptional is defined. Note: modules are not often loaded this way in YUI 3, but this field is still useful to inform the user that certain features in the component will require additional dependencies. @param details.use {Array} features that are included within this module which need to be attached automatically when this module is attached. This supports the YUI 3 rollup system -- a module with submodules defined will need to have the submodules listed in the 'use' config. The YUI component build tool does this for you. @return {YUI} the YUI instance. @example YUI.add('davglass', function(Y, name) { Y.davglass = function() { alert('Dav was here!'); }; }, '3.4.0', { requires: ['yui-base', 'harley-davidson', 'mt-dew'] }); */ add: function(name, fn, version, details) { details = details || {}; var env = YUI.Env, mod = { name: name, fn: fn, version: version, details: details }, loader, i, versions = env.versions; env.mods[name] = mod; versions[version] = versions[version] || {}; versions[version][name] = mod; for (i in instances) { if (instances.hasOwnProperty(i)) { loader = instances[i].Env._loader; if (loader) { if (!loader.moduleInfo[name]) { loader.addModule(details, name); } } } } return this; }, /** * Executes the function associated with each required * module, binding the module to the YUI instance. * @param {Array} r The array of modules to attach * @param {Boolean} [moot=false] Don't throw a warning if the module is not attached * @method _attach * @private */ _attach: function(r, moot) { var i, name, mod, details, req, use, after, mods = YUI.Env.mods, aliases = YUI.Env.aliases, Y = this, j, loader = Y.Env._loader, done = Y.Env._attached, len = r.length, loader, c = []; //Check for conditional modules (in a second+ instance) and add their requirements //TODO I hate this entire method, it needs to be fixed ASAP (3.5.0) ^davglass for (i = 0; i < len; i++) { name = r[i]; mod = mods[name]; c.push(name); if (loader && loader.conditions[name]) { Y.Object.each(loader.conditions[name], function(def) { var go = def && ((def.ua && Y.UA[def.ua]) || (def.test && def.test(Y))); if (go) { c.push(def.name); } }); } } r = c; len = r.length; for (i = 0; i < len; i++) { if (!done[r[i]]) { name = r[i]; mod = mods[name]; if (aliases && aliases[name]) { Y._attach(aliases[name]); continue; } if (!mod) { if (loader && loader.moduleInfo[name]) { mod = loader.moduleInfo[name]; moot = true; } // Y.log('no js def for: ' + name, 'info', 'yui'); //if (!loader || !loader.moduleInfo[name]) { //if ((!loader || !loader.moduleInfo[name]) && !moot) { if (!moot) { if ((name.indexOf('skin-') === -1) && (name.indexOf('css') === -1)) { Y.Env._missed.push(name); Y.Env._missed = Y.Array.dedupe(Y.Env._missed); Y.message('NOT loaded: ' + name, 'warn', 'yui'); } } } else { done[name] = true; //Don't like this, but in case a mod was asked for once, then we fetch it //We need to remove it from the missed list ^davglass for (j = 0; j < Y.Env._missed.length; j++) { if (Y.Env._missed[j] === name) { Y.message('Found: ' + name + ' (was reported as missing earlier)', 'warn', 'yui'); Y.Env._missed.splice(j, 1); } } details = mod.details; req = details.requires; use = details.use; after = details.after; if (req) { for (j = 0; j < req.length; j++) { if (!done[req[j]]) { if (!Y._attach(req)) { return false; } break; } } } if (after) { for (j = 0; j < after.length; j++) { if (!done[after[j]]) { if (!Y._attach(after, true)) { return false; } break; } } } if (mod.fn) { try { mod.fn(Y, name); } catch (e) { Y.error('Attach error: ' + name, e, name); return false; } } if (use) { for (j = 0; j < use.length; j++) { if (!done[use[j]]) { if (!Y._attach(use)) { return false; } break; } } } } } } return true; }, /** * Attaches one or more modules to the YUI instance. When this * is executed, the requirements are analyzed, and one of * several things can happen: * * * All requirements are available on the page -- The modules * are attached to the instance. If supplied, the use callback * is executed synchronously. * * * Modules are missing, the Get utility is not available OR * the 'bootstrap' config is false -- A warning is issued about * the missing modules and all available modules are attached. * * * Modules are missing, the Loader is not available but the Get * utility is and boostrap is not false -- The loader is bootstrapped * before doing the following.... * * * Modules are missing and the Loader is available -- The loader * expands the dependency tree and fetches missing modules. When * the loader is finshed the callback supplied to use is executed * asynchronously. * * @method use * @param modules* {String} 1-n modules to bind (uses arguments array). * @param *callback {Function} callback function executed when * the instance has the required functionality. If included, it * must be the last parameter. * * @example * // loads and attaches dd and its dependencies * YUI().use('dd', function(Y) {}); * * // loads and attaches dd and node as well as all of their dependencies (since 3.4.0) * YUI().use(['dd', 'node'], function(Y) {}); * * // attaches all modules that are available on the page * YUI().use('*', function(Y) {}); * * // intrinsic YUI gallery support (since 3.1.0) * YUI().use('gallery-yql', function(Y) {}); * * // intrinsic YUI 2in3 support (since 3.1.0) * YUI().use('yui2-datatable', function(Y) {}); * * @return {YUI} the YUI instance. */ use: function() { var args = SLICE.call(arguments, 0), callback = args[args.length - 1], Y = this, i = 0, name, Env = Y.Env, provisioned = true; // The last argument supplied to use can be a load complete callback if (Y.Lang.isFunction(callback)) { args.pop(); } else { callback = null; } if (Y.Lang.isArray(args[0])) { args = args[0]; } if (Y.config.cacheUse) { while ((name = args[i++])) { if (!Env._attached[name]) { provisioned = false; break; } } if (provisioned) { if (args.length) { Y.log('already provisioned: ' + args, 'info', 'yui'); } Y._notify(callback, ALREADY_DONE, args); return Y; } } if (Y._loading) { Y._useQueue = Y._useQueue || new Y.Queue(); Y._useQueue.add([args, callback]); } else { Y._use(args, function(Y, response) { Y._notify(callback, response, args); }); } return Y; }, /** * Notify handler from Loader for attachment/load errors * @method _notify * @param callback {Function} The callback to pass to the `Y.config.loadErrorFn` * @param response {Object} The response returned from Loader * @param args {Array} The aruments passed from Loader * @private */ _notify: function(callback, response, args) { if (!response.success && this.config.loadErrorFn) { this.config.loadErrorFn.call(this, this, callback, response, args); } else if (callback) { try { callback(this, response); } catch (e) { this.error('use callback error', e, args); } } }, /** * This private method is called from the `use` method queue. To ensure that only one set of loading * logic is performed at a time. * @method _use * @private * @param args* {String} 1-n modules to bind (uses arguments array). * @param *callback {Function} callback function executed when * the instance has the required functionality. If included, it * must be the last parameter. */ _use: function(args, callback) { if (!this.Array) { this._attach(['yui-base']); } var len, loader, handleBoot, handleRLS, Y = this, G_ENV = YUI.Env, mods = G_ENV.mods, Env = Y.Env, used = Env._used, queue = G_ENV._loaderQueue, firstArg = args[0], YArray = Y.Array, config = Y.config, boot = config.bootstrap, missing = [], r = [], ret = true, fetchCSS = config.fetchCSS, process = function(names, skip) { if (!names.length) { return; } YArray.each(names, function(name) { // add this module to full list of things to attach if (!skip) { r.push(name); } // only attach a module once if (used[name]) { return; } var m = mods[name], req, use; if (m) { used[name] = true; req = m.details.requires; use = m.details.use; } else { // CSS files don't register themselves, see if it has // been loaded if (!G_ENV._loaded[VERSION][name]) { missing.push(name); } else { used[name] = true; // probably css } } // make sure requirements are attached if (req && req.length) { process(req); } // make sure we grab the submodule dependencies too if (use && use.length) { process(use, 1); } }); }, handleLoader = function(fromLoader) { var response = fromLoader || { success: true, msg: 'not dynamic' }, redo, origMissing, ret = true, data = response.data; Y._loading = false; if (data) { origMissing = missing; missing = []; r = []; process(data); redo = missing.length; if (redo) { if (missing.sort().join() == origMissing.sort().join()) { redo = false; } } } if (redo && data) { Y._loading = false; Y._use(args, function() { Y.log('Nested use callback: ' + data, 'info', 'yui'); if (Y._attach(data)) { Y._notify(callback, response, data); } }); } else { if (data) { // Y.log('attaching from loader: ' + data, 'info', 'yui'); ret = Y._attach(data); } if (ret) { Y._notify(callback, response, args); } } if (Y._useQueue && Y._useQueue.size() && !Y._loading) { Y._use.apply(Y, Y._useQueue.next()); } }; // Y.log(Y.id + ': use called: ' + a + ' :: ' + callback, 'info', 'yui'); // YUI().use('*'); // bind everything available if (firstArg === '*') { ret = Y._attach(Y.Object.keys(mods)); if (ret) { handleLoader(); } return Y; } // Y.log('before loader requirements: ' + args, 'info', 'yui'); // use loader to expand dependencies and sort the // requirements if it is available. if (boot && Y.Loader && args.length) { loader = getLoader(Y); loader.require(args); loader.ignoreRegistered = true; loader.calculate(null, (fetchCSS) ? null : 'js'); args = loader.sorted; } // process each requirement and any additional requirements // the module metadata specifies process(args); len = missing.length; if (len) { missing = Y.Object.keys(YArray.hash(missing)); len = missing.length; Y.log('Modules missing: ' + missing + ', ' + missing.length, 'info', 'yui'); } // dynamic load if (boot && len && Y.Loader) { // Y.log('Using loader to fetch missing deps: ' + missing, 'info', 'yui'); Y.log('Using Loader', 'info', 'yui'); Y._loading = true; loader = getLoader(Y); loader.onEnd = handleLoader; loader.context = Y; loader.data = args; loader.ignoreRegistered = false; loader.require(args); loader.insert(null, (fetchCSS) ? null : 'js'); // loader.partial(missing, (fetchCSS) ? null : 'js'); } else if (len && Y.config.use_rls && !YUI.Env.rls_enabled) { G_ENV._rls_queue = G_ENV._rls_queue || new Y.Queue(); // server side loader service handleRLS = function(instance, argz) { var rls_end = function(o) { handleLoader(o); instance.rls_advance(); }, rls_url = instance._rls(argz); if (rls_url) { Y.log('Fetching RLS url', 'info', 'rls'); instance.rls_oncomplete(function(o) { rls_end(o); }); instance.Get.script(rls_url, { data: argz, timeout: instance.config.rls_timeout, onFailure: instance.rls_handleFailure, onTimeout: instance.rls_handleTimeout }); } else { rls_end({ success: true, data: argz }); } }; G_ENV._rls_queue.add(function() { Y.log('executing queued rls request', 'info', 'rls'); G_ENV._rls_in_progress = true; Y.rls_callback = callback; Y.rls_locals(Y, args, handleRLS); }); if (!G_ENV._rls_in_progress && G_ENV._rls_queue.size()) { G_ENV._rls_queue.next()(); } } else if (boot && len && Y.Get && !Env.bootstrapped) { Y._loading = true; handleBoot = function() { Y._loading = false; queue.running = false; Env.bootstrapped = true; G_ENV._bootstrapping = false; if (Y._attach(['loader'])) { Y._use(args, callback); } }; if (G_ENV._bootstrapping) { Y.log('Waiting for loader', 'info', 'yui'); queue.add(handleBoot); } else { G_ENV._bootstrapping = true; Y.log('Fetching loader: ' + config.base + config.loaderPath, 'info', 'yui'); Y.Get.script(config.base + config.loaderPath, { onEnd: handleBoot }); } } else { Y.log('Attaching available dependencies: ' + args, 'info', 'yui'); ret = Y._attach(args); if (ret) { handleLoader(); } } return Y; }, /** Adds a namespace object onto the YUI global if called statically. // creates YUI.your.namespace.here as nested objects YUI.namespace("your.namespace.here"); If called as a method on a YUI <em>instance</em>, it creates the namespace on the instance. // creates Y.property.package Y.namespace("property.package"); Dots in the input string cause `namespace` to create nested objects for each token. If any part of the requested namespace already exists, the current object will be left in place. This allows multiple calls to `namespace` to preserve existing namespaced properties. If the first token in the namespace string is "YAHOO", the token is discarded. Be careful with namespace tokens. Reserved words may work in some browsers and not others. For instance, the following will fail in some browsers because the supported version of JavaScript reserves the word "long": Y.namespace("really.long.nested.namespace"); @method namespace @param {String} namespace* namespaces to create. @return {Object} A reference to the last namespace object created. **/ namespace: function() { var a = arguments, o = this, i = 0, j, d, arg; for (; i < a.length; i++) { // d = ('' + a[i]).split('.'); arg = a[i]; if (arg.indexOf(PERIOD)) { d = arg.split(PERIOD); for (j = (d[0] == 'YAHOO') ? 1 : 0; j < d.length; j++) { o[d[j]] = o[d[j]] || {}; o = o[d[j]]; } } else { o[arg] = o[arg] || {}; } } return o; }, // this is replaced if the log module is included log: NOOP, message: NOOP, // this is replaced if the dump module is included dump: function (o) { return ''+o; }, /** * Report an error. The reporting mechanism is controled by * the `throwFail` configuration attribute. If throwFail is * not specified, the message is written to the Logger, otherwise * a JS error is thrown * @method error * @param msg {String} the error message. * @param e {Error|String} Optional JS error that was caught, or an error string. * @param data Optional additional info * and `throwFail` is specified, this error will be re-thrown. * @return {YUI} this YUI instance. */ error: function(msg, e, data) { var Y = this, ret; if (Y.config.errorFn) { ret = Y.config.errorFn.apply(Y, arguments); } if (Y.config.throwFail && !ret) { throw (e || new Error(msg)); } else { Y.message(msg, 'error'); // don't scrub this one } return Y; }, /** * Generate an id that is unique among all YUI instances * @method guid * @param pre {String} optional guid prefix. * @return {String} the guid. */ guid: function(pre) { var id = this.Env._guidp + '_' + (++this.Env._uidx); return (pre) ? (pre + id) : id; }, /** * Returns a `guid` associated with an object. If the object * does not have one, a new one is created unless `readOnly` * is specified. * @method stamp * @param o {Object} The object to stamp. * @param readOnly {Boolean} if `true`, a valid guid will only * be returned if the object has one assigned to it. * @return {String} The object's guid or null. */ stamp: function(o, readOnly) { var uid; if (!o) { return o; } // IE generates its own unique ID for dom nodes // The uniqueID property of a document node returns a new ID if (o.uniqueID && o.nodeType && o.nodeType !== 9) { uid = o.uniqueID; } else { uid = (typeof o === 'string') ? o : o._yuid; } if (!uid) { uid = this.guid(); if (!readOnly) { try { o._yuid = uid; } catch (e) { uid = null; } } } return uid; }, /** * Destroys the YUI instance * @method destroy * @since 3.3.0 */ destroy: function() { var Y = this; if (Y.Event) { Y.Event._unload(); } delete instances[Y.id]; delete Y.Env; delete Y.config; } /** * instanceof check for objects that works around * memory leak in IE when the item tested is * window/document * @method instanceOf * @since 3.3.0 */ }; YUI.prototype = proto; // inheritance utilities are not available yet for (prop in proto) { if (proto.hasOwnProperty(prop)) { YUI[prop] = proto[prop]; } } // set up the environment YUI._init(); if (hasWin) { // add a window load event at load time so we can capture // the case where it fires before dynamic loading is // complete. add(window, 'load', handleLoad); } else { handleLoad(); } YUI.Env.add = add; YUI.Env.remove = remove; /*global exports*/ // Support the CommonJS method for exporting our single global if (typeof exports == 'object') { exports.YUI = YUI; } }()); /** * The config object contains all of the configuration options for * the `YUI` instance. This object is supplied by the implementer * when instantiating a `YUI` instance. Some properties have default * values if they are not supplied by the implementer. This should * not be updated directly because some values are cached. Use * `applyConfig()` to update the config object on a YUI instance that * has already been configured. * * @class config * @static */ /** * Allows the YUI seed file to fetch the loader component and library * metadata to dynamically load additional dependencies. * * @property bootstrap * @type boolean * @default true */ /** * Log to the browser console if debug is on and the browser has a * supported console. * * @property useBrowserConsole * @type boolean * @default true */ /** * A hash of log sources that should be logged. If specified, only * log messages from these sources will be logged. * * @property logInclude * @type object */ /** * A hash of log sources that should be not be logged. If specified, * all sources are logged if not on this list. * * @property logExclude * @type object */ /** * Set to true if the yui seed file was dynamically loaded in * order to bootstrap components relying on the window load event * and the `domready` custom event. * * @property injected * @type boolean * @default false */ /** * If `throwFail` is set, `Y.error` will generate or re-throw a JS Error. * Otherwise the failure is logged. * * @property throwFail * @type boolean * @default true */ /** * The window/frame that this instance should operate in. * * @property win * @type Window * @default the window hosting YUI */ /** * The document associated with the 'win' configuration. * * @property doc * @type Document * @default the document hosting YUI */ /** * A list of modules that defines the YUI core (overrides the default). * * @property core * @type string[] */ /** * A list of languages in order of preference. This list is matched against * the list of available languages in modules that the YUI instance uses to * determine the best possible localization of language sensitive modules. * Languages are represented using BCP 47 language tags, such as "en-GB" for * English as used in the United Kingdom, or "zh-Hans-CN" for simplified * Chinese as used in China. The list can be provided as a comma-separated * list or as an array. * * @property lang * @type string|string[] */ /** * The default date format * @property dateFormat * @type string * @deprecated use configuration in `DataType.Date.format()` instead. */ /** * The default locale * @property locale * @type string * @deprecated use `config.lang` instead. */ /** * The default interval when polling in milliseconds. * @property pollInterval * @type int * @default 20 */ /** * The number of dynamic nodes to insert by default before * automatically removing them. This applies to script nodes * because removing the node will not make the evaluated script * unavailable. Dynamic CSS is not auto purged, because removing * a linked style sheet will also remove the style definitions. * @property purgethreshold * @type int * @default 20 */ /** * The default interval when polling in milliseconds. * @property windowResizeDelay * @type int * @default 40 */ /** * Base directory for dynamic loading * @property base * @type string */ /* * The secure base dir (not implemented) * For dynamic loading. * @property secureBase * @type string */ /** * The YUI combo service base dir. Ex: `http://yui.yahooapis.com/combo?` * For dynamic loading. * @property comboBase * @type string */ /** * The root path to prepend to module path for the combo service. * Ex: 3.0.0b1/build/ * For dynamic loading. * @property root * @type string */ /** * A filter to apply to result urls. This filter will modify the default * path for all modules. The default path for the YUI library is the * minified version of the files (e.g., event-min.js). The filter property * can be a predefined filter or a custom filter. The valid predefined * filters are: * <dl> * <dt>DEBUG</dt> * <dd>Selects the debug versions of the library (e.g., event-debug.js). * This option will automatically include the Logger widget</dd> * <dt>RAW</dt> * <dd>Selects the non-minified version of the library (e.g., event.js).</dd> * </dl> * You can also define a custom filter, which must be an object literal * containing a search expression and a replace string: * * myFilter: { * 'searchExp': "-min\\.js", * 'replaceStr': "-debug.js" * } * * For dynamic loading. * * @property filter * @type string|object */ /** * The `skin` config let's you configure application level skin * customizations. It contains the following attributes which * can be specified to override the defaults: * * // The default skin, which is automatically applied if not * // overriden by a component-specific skin definition. * // Change this in to apply a different skin globally * defaultSkin: 'sam', * * // This is combined with the loader base property to get * // the default root directory for a skin. * base: 'assets/skins/', * * // Any component-specific overrides can be specified here, * // making it possible to load different skins for different * // components. It is possible to load more than one skin * // for a given component as well. * overrides: { * slider: ['capsule', 'round'] * } * * For dynamic loading. * * @property skin */ /** * Hash of per-component filter specification. If specified for a given * component, this overrides the filter config. * * For dynamic loading. * * @property filters */ /** * Use the YUI combo service to reduce the number of http connections * required to load your dependencies. Turning this off will * disable combo handling for YUI and all module groups configured * with a combo service. * * For dynamic loading. * * @property combine * @type boolean * @default true if 'base' is not supplied, false if it is. */ /** * A list of modules that should never be dynamically loaded * * @property ignore * @type string[] */ /** * A list of modules that should always be loaded when required, even if already * present on the page. * * @property force * @type string[] */ /** * Node or id for a node that should be used as the insertion point for new * nodes. For dynamic loading. * * @property insertBefore * @type string */ /** * Object literal containing attributes to add to dynamically loaded script * nodes. * @property jsAttributes * @type string */ /** * Object literal containing attributes to add to dynamically loaded link * nodes. * @property cssAttributes * @type string */ /** * Number of milliseconds before a timeout occurs when dynamically * loading nodes. If not set, there is no timeout. * @property timeout * @type int */ /** * Callback for the 'CSSComplete' event. When dynamically loading YUI * components with CSS, this property fires when the CSS is finished * loading but script loading is still ongoing. This provides an * opportunity to enhance the presentation of a loading page a little * bit before the entire loading process is done. * * @property onCSS * @type function */ /** * A hash of module definitions to add to the list of YUI components. * These components can then be dynamically loaded side by side with * YUI via the `use()` method. This is a hash, the key is the module * name, and the value is an object literal specifying the metdata * for the module. See `Loader.addModule` for the supported module * metadata fields. Also see groups, which provides a way to * configure the base and combo spec for a set of modules. * * modules: { * mymod1: { * requires: ['node'], * fullpath: 'http://myserver.mydomain.com/mymod1/mymod1.js' * }, * mymod2: { * requires: ['mymod1'], * fullpath: 'http://myserver.mydomain.com/mymod2/mymod2.js' * } * } * * @property modules * @type object */ /** * A hash of module group definitions. It for each group you * can specify a list of modules and the base path and * combo spec to use when dynamically loading the modules. * * groups: { * yui2: { * // specify whether or not this group has a combo service * combine: true, * * // the base path for non-combo paths * base: 'http://yui.yahooapis.com/2.8.0r4/build/', * * // the path to the combo service * comboBase: 'http://yui.yahooapis.com/combo?', * * // a fragment to prepend to the path attribute when * // when building combo urls * root: '2.8.0r4/build/', * * // the module definitions * modules: { * yui2_yde: { * path: "yahoo-dom-event/yahoo-dom-event.js" * }, * yui2_anim: { * path: "animation/animation.js", * requires: ['yui2_yde'] * } * } * } * } * * @property groups * @type object */ /** * The loader 'path' attribute to the loader itself. This is combined * with the 'base' attribute to dynamically load the loader component * when boostrapping with the get utility alone. * * @property loaderPath * @type string * @default loader/loader-min.js */ /** * Specifies whether or not YUI().use(...) will attempt to load CSS * resources at all. Any truthy value will cause CSS dependencies * to load when fetching script. The special value 'force' will * cause CSS dependencies to be loaded even if no script is needed. * * @property fetchCSS * @type boolean|string * @default true */ /** * The default gallery version to build gallery module urls * @property gallery * @type string * @since 3.1.0 */ /** * The default YUI 2 version to build yui2 module urls. This is for * intrinsic YUI 2 support via the 2in3 project. Also see the '2in3' * config for pulling different revisions of the wrapped YUI 2 * modules. * @since 3.1.0 * @property yui2 * @type string * @default 2.8.1 */ /** * The 2in3 project is a deployment of the various versions of YUI 2 * deployed as first-class YUI 3 modules. Eventually, the wrapper * for the modules will change (but the underlying YUI 2 code will * be the same), and you can select a particular version of * the wrapper modules via this config. * @since 3.1.0 * @property 2in3 * @type string * @default 1 */ /** * Alternative console log function for use in environments without * a supported native console. The function is executed in the * YUI instance context. * @since 3.1.0 * @property logFn * @type Function */ /** * A callback to execute when Y.error is called. It receives the * error message and an javascript error object if Y.error was * executed because a javascript error was caught. The function * is executed in the YUI instance context. * * @since 3.2.0 * @property errorFn * @type Function */ /** * A callback to execute when the loader fails to load one or * more resource. This could be because of a script load * failure. It can also fail if a javascript module fails * to register itself, but only when the 'requireRegistration' * is true. If this function is defined, the use() callback will * only be called when the loader succeeds, otherwise it always * executes unless there was a javascript error when attaching * a module. * * @since 3.3.0 * @property loadErrorFn * @type Function */ /** * When set to true, the YUI loader will expect that all modules * it is responsible for loading will be first-class YUI modules * that register themselves with the YUI global. If this is * set to true, loader will fail if the module registration fails * to happen after the script is loaded. * * @since 3.3.0 * @property requireRegistration * @type boolean * @default false */ /** * Cache serviced use() requests. * @since 3.3.0 * @property cacheUse * @type boolean * @default true * @deprecated no longer used */ /** * The parameter defaults for the remote loader service. **Requires the rls seed file.** The properties that are supported: * * * `m`: comma separated list of module requirements. This * must be the param name even for custom implemetations. * * `v`: the version of YUI to load. Defaults to the version * of YUI that is being used. * * `gv`: the version of the gallery to load (see the gallery config) * * `env`: comma separated list of modules already on the page. * this must be the param name even for custom implemetations. * * `lang`: the languages supported on the page (see the lang config) * * `'2in3v'`: the version of the 2in3 wrapper to use (see the 2in3 config). * * `'2v'`: the version of yui2 to use in the yui 2in3 wrappers * * `filt`: a filter def to apply to the urls (see the filter config). * * `filts`: a list of custom filters to apply per module * * `tests`: this is a map of conditional module test function id keys * with the values of 1 if the test passes, 0 if not. This must be * the name of the querystring param in custom templates. * * @since 3.2.0 * @property rls * @type {Object} */ /** * The base path to the remote loader service. **Requires the rls seed file.** * * @since 3.2.0 * @property rls_base * @type {String} */ /** * The template to use for building the querystring portion * of the remote loader service url. The default is determined * by the rls config -- each property that has a value will be * represented. **Requires the rls seed file.** * * @since 3.2.0 * @property rls_tmpl * @type {String} * @example * m={m}&v={v}&env={env}&lang={lang}&filt={filt}&tests={tests} * */ /** * Configure the instance to use a remote loader service instead of * the client loader. **Requires the rls seed file.** * * @since 3.2.0 * @property use_rls * @type {Boolean} */ YUI.add('yui-base', function(Y) { /* * YUI stub * @module yui * @submodule yui-base */ /** * The YUI module contains the components required for building the YUI * seed file. This includes the script loading mechanism, a simple queue, * and the core utilities for the library. * @module yui * @submodule yui-base */ /** * Provides core language utilites and extensions used throughout YUI. * * @class Lang * @static */ var L = Y.Lang || (Y.Lang = {}), STRING_PROTO = String.prototype, TOSTRING = Object.prototype.toString, TYPES = { 'undefined' : 'undefined', 'number' : 'number', 'boolean' : 'boolean', 'string' : 'string', '[object Function]': 'function', '[object RegExp]' : 'regexp', '[object Array]' : 'array', '[object Date]' : 'date', '[object Error]' : 'error' }, SUBREGEX = /\{\s*([^|}]+?)\s*(?:\|([^}]*))?\s*\}/g, TRIMREGEX = /^\s+|\s+$/g, // If either MooTools or Prototype is on the page, then there's a chance that we // can't trust "native" language features to actually be native. When this is // the case, we take the safe route and fall back to our own non-native // implementation. win = Y.config.win, unsafeNatives = win && !!(win.MooTools || win.Prototype); /** * Determines whether or not the provided item is an array. * * Returns `false` for array-like collections such as the function `arguments` * collection or `HTMLElement` collections. Use `Y.Array.test()` if you want to * test for an array-like collection. * * @method isArray * @param o The object to test. * @return {boolean} true if o is an array. * @static */ L.isArray = (!unsafeNatives && Array.isArray) || function (o) { return L.type(o) === 'array'; }; /** * Determines whether or not the provided item is a boolean. * @method isBoolean * @static * @param o The object to test. * @return {boolean} true if o is a boolean. */ L.isBoolean = function(o) { return typeof o === 'boolean'; }; /** * <p> * Determines whether or not the provided item is a function. * Note: Internet Explorer thinks certain functions are objects: * </p> * * <pre> * var obj = document.createElement("object"); * Y.Lang.isFunction(obj.getAttribute) // reports false in IE * &nbsp; * var input = document.createElement("input"); // append to body * Y.Lang.isFunction(input.focus) // reports false in IE * </pre> * * <p> * You will have to implement additional tests if these functions * matter to you. * </p> * * @method isFunction * @static * @param o The object to test. * @return {boolean} true if o is a function. */ L.isFunction = function(o) { return L.type(o) === 'function'; }; /** * Determines whether or not the supplied item is a date instance. * @method isDate * @static * @param o The object to test. * @return {boolean} true if o is a date. */ L.isDate = function(o) { return L.type(o) === 'date' && o.toString() !== 'Invalid Date' && !isNaN(o); }; /** * Determines whether or not the provided item is null. * @method isNull * @static * @param o The object to test. * @return {boolean} true if o is null. */ L.isNull = function(o) { return o === null; }; /** * Determines whether or not the provided item is a legal number. * @method isNumber * @static * @param o The object to test. * @return {boolean} true if o is a number. */ L.isNumber = function(o) { return typeof o === 'number' && isFinite(o); }; /** * Determines whether or not the provided item is of type object * or function. Note that arrays are also objects, so * <code>Y.Lang.isObject([]) === true</code>. * @method isObject * @static * @param o The object to test. * @param failfn {boolean} fail if the input is a function. * @return {boolean} true if o is an object. * @see isPlainObject */ L.isObject = function(o, failfn) { var t = typeof o; return (o && (t === 'object' || (!failfn && (t === 'function' || L.isFunction(o))))) || false; }; /** * Determines whether or not the provided item is a string. * @method isString * @static * @param o The object to test. * @return {boolean} true if o is a string. */ L.isString = function(o) { return typeof o === 'string'; }; /** * Determines whether or not the provided item is undefined. * @method isUndefined * @static * @param o The object to test. * @return {boolean} true if o is undefined. */ L.isUndefined = function(o) { return typeof o === 'undefined'; }; /** * Returns a string without any leading or trailing whitespace. If * the input is not a string, the input will be returned untouched. * @method trim * @static * @param s {string} the string to trim. * @return {string} the trimmed string. */ L.trim = STRING_PROTO.trim ? function(s) { return s && s.trim ? s.trim() : s; } : function (s) { try { return s.replace(TRIMREGEX, ''); } catch (e) { return s; } }; /** * Returns a string without any leading whitespace. * @method trimLeft * @static * @param s {string} the string to trim. * @return {string} the trimmed string. */ L.trimLeft = STRING_PROTO.trimLeft ? function (s) { return s.trimLeft(); } : function (s) { return s.replace(/^\s+/, ''); }; /** * Returns a string without any trailing whitespace. * @method trimRight * @static * @param s {string} the string to trim. * @return {string} the trimmed string. */ L.trimRight = STRING_PROTO.trimRight ? function (s) { return s.trimRight(); } : function (s) { return s.replace(/\s+$/, ''); }; /** * A convenience method for detecting a legitimate non-null value. * Returns false for null/undefined/NaN, true for other values, * including 0/false/'' * @method isValue * @static * @param o The item to test. * @return {boolean} true if it is not null/undefined/NaN || false. */ L.isValue = function(o) { var t = L.type(o); switch (t) { case 'number': return isFinite(o); case 'null': // fallthru case 'undefined': return false; default: return !!t; } }; /** * <p> * Returns a string representing the type of the item passed in. * </p> * * <p> * Known issues: * </p> * * <ul> * <li> * <code>typeof HTMLElementCollection</code> returns function in Safari, but * <code>Y.type()</code> reports object, which could be a good thing -- * but it actually caused the logic in <code>Y.Lang.isObject</code> to fail. * </li> * </ul> * * @method type * @param o the item to test. * @return {string} the detected type. * @static */ L.type = function(o) { return TYPES[typeof o] || TYPES[TOSTRING.call(o)] || (o ? 'object' : 'null'); }; /** * Lightweight version of <code>Y.substitute</code>. Uses the same template * structure as <code>Y.substitute</code>, but doesn't support recursion, * auto-object coersion, or formats. * @method sub * @param {string} s String to be modified. * @param {object} o Object containing replacement values. * @return {string} the substitute result. * @static * @since 3.2.0 */ L.sub = function(s, o) { return s.replace ? s.replace(SUBREGEX, function (match, key) { return L.isUndefined(o[key]) ? match : o[key]; }) : s; }; /** * Returns the current time in milliseconds. * * @method now * @return {Number} Current time in milliseconds. * @static * @since 3.3.0 */ L.now = Date.now || function () { return new Date().getTime(); }; /** @module yui @submodule yui-base */ var Lang = Y.Lang, Native = Array.prototype, hasOwn = Object.prototype.hasOwnProperty; /** Provides utility methods for working with arrays. Additional array helpers can be found in the `collection` and `array-extras` modules. `Y.Array(thing)` returns a native array created from _thing_. Depending on _thing_'s type, one of the following will happen: * Arrays are returned unmodified unless a non-zero _startIndex_ is specified. * Array-like collections (see `Array.test()`) are converted to arrays. * For everything else, a new array is created with _thing_ as the sole item. Note: elements that are also collections, such as `<form>` and `<select>` elements, are not automatically converted to arrays. To force a conversion, pass `true` as the value of the _force_ parameter. @class Array @constructor @param {Any} thing The thing to arrayify. @param {Number} [startIndex=0] If non-zero and _thing_ is an array or array-like collection, a subset of items starting at the specified index will be returned. @param {Boolean} [force=false] If `true`, _thing_ will be treated as an array-like collection no matter what. @return {Array} A native array created from _thing_, according to the rules described above. **/ function YArray(thing, startIndex, force) { var len, result; startIndex || (startIndex = 0); if (force || YArray.test(thing)) { // IE throws when trying to slice HTMLElement collections. try { return Native.slice.call(thing, startIndex); } catch (ex) { result = []; for (len = thing.length; startIndex < len; ++startIndex) { result.push(thing[startIndex]); } return result; } } return [thing]; } Y.Array = YArray; /** Dedupes an array of strings, returning an array that's guaranteed to contain only one copy of a given string. This method differs from `Array.unique()` in that it's optimized for use only with strings, whereas `unique` may be used with other types (but is slower). Using `dedupe()` with non-string values may result in unexpected behavior. @method dedupe @param {String[]} array Array of strings to dedupe. @return {Array} Deduped copy of _array_. @static @since 3.4.0 **/ YArray.dedupe = function (array) { var hash = {}, results = [], i, item, len; for (i = 0, len = array.length; i < len; ++i) { item = array[i]; if (!hasOwn.call(hash, item)) { hash[item] = 1; results.push(item); } } return results; }; /** Executes the supplied function on each item in the array. This method wraps the native ES5 `Array.forEach()` method if available. @method each @param {Array} array Array to iterate. @param {Function} fn Function to execute on each item in the array. The function will receive the following arguments: @param {Any} fn.item Current array item. @param {Number} fn.index Current array index. @param {Array} fn.array Array being iterated. @param {Object} [thisObj] `this` object to use when calling _fn_. @return {YUI} The YUI instance. @static **/ YArray.each = YArray.forEach = Native.forEach ? function (array, fn, thisObj) { Native.forEach.call(array || [], fn, thisObj || Y); return Y; } : function (array, fn, thisObj) { for (var i = 0, len = (array && array.length) || 0; i < len; ++i) { if (i in array) { fn.call(thisObj || Y, array[i], i, array); } } return Y; }; /** Alias for `each()`. @method forEach @static **/ /** Returns an object using the first array as keys and the second as values. If the second array is not provided, or if it doesn't contain the same number of values as the first array, then `true` will be used in place of the missing values. @example Y.Array.hash(['a', 'b', 'c'], ['foo', 'bar']); // => {a: 'foo', b: 'bar', c: true} @method hash @param {String[]} keys Array of strings to use as keys. @param {Array} [values] Array to use as values. @return {Object} Hash using the first array as keys and the second as values. @static **/ YArray.hash = function (keys, values) { var hash = {}, vlen = (values && values.length) || 0, i, len; for (i = 0, len = keys.length; i < len; ++i) { if (i in keys) { hash[keys[i]] = vlen > i && i in values ? values[i] : true; } } return hash; }; /** Returns the index of the first item in the array that's equal (using a strict equality check) to the specified _value_, or `-1` if the value isn't found. This method wraps the native ES5 `Array.indexOf()` method if available. @method indexOf @param {Array} array Array to search. @param {Any} value Value to search for. @return {Number} Index of the item strictly equal to _value_, or `-1` if not found. @static **/ YArray.indexOf = Native.indexOf ? function (array, value) { // TODO: support fromIndex return Native.indexOf.call(array, value); } : function (array, value) { for (var i = 0, len = array.length; i < len; ++i) { if (i in array && array[i] === value) { return i; } } return -1; }; /** Numeric sort convenience function. The native `Array.prototype.sort()` function converts values to strings and sorts them in lexicographic order, which is unsuitable for sorting numeric values. Provide `Array.numericSort` as a custom sort function when you want to sort values in numeric order. @example [42, 23, 8, 16, 4, 15].sort(Y.Array.numericSort); // => [4, 8, 15, 16, 23, 42] @method numericSort @param {Number} a First value to compare. @param {Number} b Second value to compare. @return {Number} Difference between _a_ and _b_. @static **/ YArray.numericSort = function (a, b) { return a - b; }; /** Executes the supplied function on each item in the array. Returning a truthy value from the function will stop the processing of remaining items. @method some @param {Array} array Array to iterate over. @param {Function} fn Function to execute on each item. The function will receive the following arguments: @param {Any} fn.value Current array item. @param {Number} fn.index Current array index. @param {Array} fn.array Array being iterated over. @param {Object} [thisObj] `this` object to use when calling _fn_. @return {Boolean} `true` if the function returns a truthy value on any of the items in the array; `false` otherwise. @static **/ YArray.some = Native.some ? function (array, fn, thisObj) { return Native.some.call(array, fn, thisObj); } : function (array, fn, thisObj) { for (var i = 0, len = array.length; i < len; ++i) { if (i in array && fn.call(thisObj, array[i], i, array)) { return true; } } return false; }; /** Evaluates _obj_ to determine if it's an array, an array-like collection, or something else. This is useful when working with the function `arguments` collection and `HTMLElement` collections. Note: This implementation doesn't consider elements that are also collections, such as `<form>` and `<select>`, to be array-like. @method test @param {Object} obj Object to test. @return {Number} A number indicating the results of the test: * 0: Neither an array nor an array-like collection. * 1: Real array. * 2: Array-like collection. @static **/ YArray.test = function (obj) { var result = 0; if (Lang.isArray(obj)) { result = 1; } else if (Lang.isObject(obj)) { try { // indexed, but no tagName (element) or alert (window), // or functions without apply/call (Safari // HTMLElementCollection bug). if ('length' in obj && !obj.tagName && !obj.alert && !obj.apply) { result = 2; } } catch (ex) {} } return result; }; /** * The YUI module contains the components required for building the YUI * seed file. This includes the script loading mechanism, a simple queue, * and the core utilities for the library. * @module yui * @submodule yui-base */ /** * A simple FIFO queue. Items are added to the Queue with add(1..n items) and * removed using next(). * * @class Queue * @constructor * @param {MIXED} item* 0..n items to seed the queue. */ function Queue() { this._init(); this.add.apply(this, arguments); } Queue.prototype = { /** * Initialize the queue * * @method _init * @protected */ _init: function() { /** * The collection of enqueued items * * @property _q * @type Array * @protected */ this._q = []; }, /** * Get the next item in the queue. FIFO support * * @method next * @return {MIXED} the next item in the queue. */ next: function() { return this._q.shift(); }, /** * Get the last in the queue. LIFO support. * * @method last * @return {MIXED} the last item in the queue. */ last: function() { return this._q.pop(); }, /** * Add 0..n items to the end of the queue. * * @method add * @param {MIXED} item* 0..n items. * @return {object} this queue. */ add: function() { this._q.push.apply(this._q, arguments); return this; }, /** * Returns the current number of queued items. * * @method size * @return {Number} The size. */ size: function() { return this._q.length; } }; Y.Queue = Queue; YUI.Env._loaderQueue = YUI.Env._loaderQueue || new Queue(); /** The YUI module contains the components required for building the YUI seed file. This includes the script loading mechanism, a simple queue, and the core utilities for the library. @module yui @submodule yui-base **/ var CACHED_DELIMITER = '__', hasOwn = Object.prototype.hasOwnProperty, isObject = Y.Lang.isObject; /** Returns a wrapper for a function which caches the return value of that function, keyed off of the combined string representation of the argument values provided when the wrapper is called. Calling this function again with the same arguments will return the cached value rather than executing the wrapped function. Note that since the cache is keyed off of the string representation of arguments passed to the wrapper function, arguments that aren't strings and don't provide a meaningful `toString()` method may result in unexpected caching behavior. For example, the objects `{}` and `{foo: 'bar'}` would both be converted to the string `[object Object]` when used as a cache key. @method cached @param {Function} source The function to memoize. @param {Object} [cache={}] Object in which to store cached values. You may seed this object with pre-existing cached values if desired. @param {any} [refetch] If supplied, this value is compared with the cached value using a `==` comparison. If the values are equal, the wrapped function is executed again even though a cached value exists. @return {Function} Wrapped function. @for YUI **/ Y.cached = function (source, cache, refetch) { cache || (cache = {}); return function (arg) { var key = arguments.length > 1 ? Array.prototype.join.call(arguments, CACHED_DELIMITER) : String(arg); if (!(key in cache) || (refetch && cache[key] == refetch)) { cache[key] = source.apply(source, arguments); } return cache[key]; }; }; /** Returns a new object containing all of the properties of all the supplied objects. The properties from later objects will overwrite those in earlier objects. Passing in a single object will create a shallow copy of it. For a deep copy, use `clone()`. @method merge @param {Object} objects* One or more objects to merge. @return {Object} A new merged object. **/ Y.merge = function () { var args = arguments, i = 0, len = args.length, result = {}; for (; i < len; ++i) { Y.mix(result, args[i], true); } return result; }; /** Mixes _supplier_'s properties into _receiver_. Properties on _receiver_ or _receiver_'s prototype will not be overwritten or shadowed unless the _overwrite_ parameter is `true`, and will not be merged unless the _merge_ parameter is `true`. In the default mode (0), only properties the supplier owns are copied (prototype properties are not copied). The following copying modes are available: * `0`: _Default_. Object to object. * `1`: Prototype to prototype. * `2`: Prototype to prototype and object to object. * `3`: Prototype to object. * `4`: Object to prototype. @method mix @param {Function|Object} receiver The object or function to receive the mixed properties. @param {Function|Object} supplier The object or function supplying the properties to be mixed. @param {Boolean} [overwrite=false] If `true`, properties that already exist on the receiver will be overwritten with properties from the supplier. @param {String[]} [whitelist] An array of property names to copy. If specified, only the whitelisted properties will be copied, and all others will be ignored. @param {Number} [mode=0] Mix mode to use. See above for available modes. @param {Boolean} [merge=false] If `true`, objects and arrays that already exist on the receiver will have the corresponding object/array from the supplier merged into them, rather than being skipped or overwritten. When both _overwrite_ and _merge_ are `true`, _merge_ takes precedence. @return {Function|Object|YUI} The receiver, or the YUI instance if the specified receiver is falsy. **/ Y.mix = function(receiver, supplier, overwrite, whitelist, mode, merge) { var alwaysOverwrite, exists, from, i, key, len, to; // If no supplier is given, we return the receiver. If no receiver is given, // we return Y. Returning Y doesn't make much sense to me, but it's // grandfathered in for backcompat reasons. if (!receiver || !supplier) { return receiver || Y; } if (mode) { // In mode 2 (prototype to prototype and object to object), we recurse // once to do the proto to proto mix. The object to object mix will be // handled later on. if (mode === 2) { Y.mix(receiver.prototype, supplier.prototype, overwrite, whitelist, 0, merge); } // Depending on which mode is specified, we may be copying from or to // the prototypes of the supplier and receiver. from = mode === 1 || mode === 3 ? supplier.prototype : supplier; to = mode === 1 || mode === 4 ? receiver.prototype : receiver; // If either the supplier or receiver doesn't actually have a // prototype property, then we could end up with an undefined `from` // or `to`. If that happens, we abort and return the receiver. if (!from || !to) { return receiver; } } else { from = supplier; to = receiver; } // If `overwrite` is truthy and `merge` is falsy, then we can skip a // property existence check on each iteration and save some time. alwaysOverwrite = overwrite && !merge; if (whitelist) { for (i = 0, len = whitelist.length; i < len; ++i) { key = whitelist[i]; // We call `Object.prototype.hasOwnProperty` instead of calling // `hasOwnProperty` on the object itself, since the object's // `hasOwnProperty` method may have been overridden or removed. // Also, some native objects don't implement a `hasOwnProperty` // method. if (!hasOwn.call(from, key)) { continue; } // The `key in to` check here is (sadly) intentional for backwards // compatibility reasons. It prevents undesired shadowing of // prototype members on `to`. exists = alwaysOverwrite ? false : key in to; if (merge && exists && isObject(to[key], true) && isObject(from[key], true)) { // If we're in merge mode, and the key is present on both // objects, and the value on both objects is either an object or // an array (but not a function), then we recurse to merge the // `from` value into the `to` value instead of overwriting it. // // Note: It's intentional that the whitelist isn't passed to the // recursive call here. This is legacy behavior that lots of // code still depends on. Y.mix(to[key], from[key], overwrite, null, 0, merge); } else if (overwrite || !exists) { // We're not in merge mode, so we'll only copy the `from` value // to the `to` value if we're in overwrite mode or if the // current key doesn't exist on the `to` object. to[key] = from[key]; } } } else { for (key in from) { // The code duplication here is for runtime performance reasons. // Combining whitelist and non-whitelist operations into a single // loop or breaking the shared logic out into a function both result // in worse performance, and Y.mix is critical enough that the byte // tradeoff is worth it. if (!hasOwn.call(from, key)) { continue; } // The `key in to` check here is (sadly) intentional for backwards // compatibility reasons. It prevents undesired shadowing of // prototype members on `to`. exists = alwaysOverwrite ? false : key in to; if (merge && exists && isObject(to[key], true) && isObject(from[key], true)) { Y.mix(to[key], from[key], overwrite, null, 0, merge); } else if (overwrite || !exists) { to[key] = from[key]; } } // If this is an IE browser with the JScript enumeration bug, force // enumeration of the buggy properties by making a recursive call with // the buggy properties as the whitelist. if (Y.Object._hasEnumBug) { Y.mix(to, from, overwrite, Y.Object._forceEnum, mode, merge); } } return receiver; }; /** * The YUI module contains the components required for building the YUI * seed file. This includes the script loading mechanism, a simple queue, * and the core utilities for the library. * @module yui * @submodule yui-base */ /** * Adds utilities to the YUI instance for working with objects. * * @class Object */ var hasOwn = Object.prototype.hasOwnProperty, // If either MooTools or Prototype is on the page, then there's a chance that we // can't trust "native" language features to actually be native. When this is // the case, we take the safe route and fall back to our own non-native // implementations. win = Y.config.win, unsafeNatives = win && !!(win.MooTools || win.Prototype), UNDEFINED, // <-- Note the comma. We're still declaring vars. /** * Returns a new object that uses _obj_ as its prototype. This method wraps the * native ES5 `Object.create()` method if available, but doesn't currently * pass through `Object.create()`'s second argument (properties) in order to * ensure compatibility with older browsers. * * @method () * @param {Object} obj Prototype object. * @return {Object} New object using _obj_ as its prototype. * @static */ O = Y.Object = (!unsafeNatives && Object.create) ? function (obj) { // We currently wrap the native Object.create instead of simply aliasing it // to ensure consistency with our fallback shim, which currently doesn't // support Object.create()'s second argument (properties). Once we have a // safe fallback for the properties arg, we can stop wrapping // Object.create(). return Object.create(obj); } : (function () { // Reusable constructor function for the Object.create() shim. function F() {} // The actual shim. return function (obj) { F.prototype = obj; return new F(); }; }()), /** * Property names that IE doesn't enumerate in for..in loops, even when they * should be enumerable. When `_hasEnumBug` is `true`, it's necessary to * manually enumerate these properties. * * @property _forceEnum * @type String[] * @protected * @static */ forceEnum = O._forceEnum = [ 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toString', 'toLocaleString', 'valueOf' ], /** * `true` if this browser has the JScript enumeration bug that prevents * enumeration of the properties named in the `_forceEnum` array, `false` * otherwise. * * See: * - <https://developer.mozilla.org/en/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug> * - <http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation> * * @property _hasEnumBug * @type Boolean * @protected * @static */ hasEnumBug = O._hasEnumBug = !{valueOf: 0}.propertyIsEnumerable('valueOf'), /** * `true` if this browser incorrectly considers the `prototype` property of * functions to be enumerable. Currently known to affect Opera 11.50. * * @property _hasProtoEnumBug * @type Boolean * @protected * @static */ hasProtoEnumBug = O._hasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'), /** * Returns `true` if _key_ exists on _obj_, `false` if _key_ doesn't exist or * exists only on _obj_'s prototype. This is essentially a safer version of * `obj.hasOwnProperty()`. * * @method owns * @param {Object} obj Object to test. * @param {String} key Property name to look for. * @return {Boolean} `true` if _key_ exists on _obj_, `false` otherwise. * @static */ owns = O.owns = function (obj, key) { return !!obj && hasOwn.call(obj, key); }; // <-- End of var declarations. /** * Alias for `owns()`. * * @method hasKey * @param {Object} obj Object to test. * @param {String} key Property name to look for. * @return {Boolean} `true` if _key_ exists on _obj_, `false` otherwise. * @static */ O.hasKey = owns; /** * Returns an array containing the object's enumerable keys. Does not include * prototype keys or non-enumerable keys. * * Note that keys are returned in enumeration order (that is, in the same order * that they would be enumerated by a `for-in` loop), which may not be the same * as the order in which they were defined. * * This method is an alias for the native ES5 `Object.keys()` method if * available. * * @example * * Y.Object.keys({a: 'foo', b: 'bar', c: 'baz'}); * // => ['a', 'b', 'c'] * * @method keys * @param {Object} obj An object. * @return {String[]} Array of keys. * @static */ O.keys = (!unsafeNatives && Object.keys) || function (obj) { if (!Y.Lang.isObject(obj)) { throw new TypeError('Object.keys called on a non-object'); } var keys = [], i, key, len; if (hasProtoEnumBug && typeof obj === 'function') { for (key in obj) { if (owns(obj, key) && key !== 'prototype') { keys.push(key); } } } else { for (key in obj) { if (owns(obj, key)) { keys.push(key); } } } if (hasEnumBug) { for (i = 0, len = forceEnum.length; i < len; ++i) { key = forceEnum[i]; if (owns(obj, key)) { keys.push(key); } } } return keys; }; /** * Returns an array containing the values of the object's enumerable keys. * * Note that values are returned in enumeration order (that is, in the same * order that they would be enumerated by a `for-in` loop), which may not be the * same as the order in which they were defined. * * @example * * Y.Object.values({a: 'foo', b: 'bar', c: 'baz'}); * // => ['foo', 'bar', 'baz'] * * @method values * @param {Object} obj An object. * @return {Array} Array of values. * @static */ O.values = function (obj) { var keys = O.keys(obj), i = 0, len = keys.length, values = []; for (; i < len; ++i) { values.push(obj[keys[i]]); } return values; }; /** * Returns the number of enumerable keys owned by an object. * * @method size * @param {Object} obj An object. * @return {Number} The object's size. * @static */ O.size = function (obj) { try { return O.keys(obj).length; } catch (ex) { return 0; // Legacy behavior for non-objects. } }; /** * Returns `true` if the object owns an enumerable property with the specified * value. * * @method hasValue * @param {Object} obj An object. * @param {any} value The value to search for. * @return {Boolean} `true` if _obj_ contains _value_, `false` otherwise. * @static */ O.hasValue = function (obj, value) { return Y.Array.indexOf(O.values(obj), value) > -1; }; /** * Executes a function on each enumerable property in _obj_. The function * receives the value, the key, and the object itself as parameters (in that * order). * * By default, only properties owned by _obj_ are enumerated. To include * prototype properties, set the _proto_ parameter to `true`. * * @method each * @param {Object} obj Object to enumerate. * @param {Function} fn Function to execute on each enumerable property. * @param {mixed} fn.value Value of the current property. * @param {String} fn.key Key of the current property. * @param {Object} fn.obj Object being enumerated. * @param {Object} [thisObj] `this` object to use when calling _fn_. * @param {Boolean} [proto=false] Include prototype properties. * @return {YUI} the YUI instance. * @chainable * @static */ O.each = function (obj, fn, thisObj, proto) { var key; for (key in obj) { if (proto || owns(obj, key)) { fn.call(thisObj || Y, obj[key], key, obj); } } return Y; }; /** * Executes a function on each enumerable property in _obj_, but halts if the * function returns a truthy value. The function receives the value, the key, * and the object itself as paramters (in that order). * * By default, only properties owned by _obj_ are enumerated. To include * prototype properties, set the _proto_ parameter to `true`. * * @method some * @param {Object} obj Object to enumerate. * @param {Function} fn Function to execute on each enumerable property. * @param {mixed} fn.value Value of the current property. * @param {String} fn.key Key of the current property. * @param {Object} fn.obj Object being enumerated. * @param {Object} [thisObj] `this` object to use when calling _fn_. * @param {Boolean} [proto=false] Include prototype properties. * @return {Boolean} `true` if any execution of _fn_ returns a truthy value, * `false` otherwise. * @static */ O.some = function (obj, fn, thisObj, proto) { var key; for (key in obj) { if (proto || owns(obj, key)) { if (fn.call(thisObj || Y, obj[key], key, obj)) { return true; } } } return false; }; /** * Retrieves the sub value at the provided path, * from the value object provided. * * @method getValue * @static * @param o The object from which to extract the property value. * @param path {Array} A path array, specifying the object traversal path * from which to obtain the sub value. * @return {Any} The value stored in the path, undefined if not found, * undefined if the source is not an object. Returns the source object * if an empty path is provided. */ O.getValue = function(o, path) { if (!Y.Lang.isObject(o)) { return UNDEFINED; } var i, p = Y.Array(path), l = p.length; for (i = 0; o !== UNDEFINED && i < l; i++) { o = o[p[i]]; } return o; }; /** * Sets the sub-attribute value at the provided path on the * value object. Returns the modified value object, or * undefined if the path is invalid. * * @method setValue * @static * @param o The object on which to set the sub value. * @param path {Array} A path array, specifying the object traversal path * at which to set the sub value. * @param val {Any} The new value for the sub-attribute. * @return {Object} The modified object, with the new sub value set, or * undefined, if the path was invalid. */ O.setValue = function(o, path, val) { var i, p = Y.Array(path), leafIdx = p.length - 1, ref = o; if (leafIdx >= 0) { for (i = 0; ref !== UNDEFINED && i < leafIdx; i++) { ref = ref[p[i]]; } if (ref !== UNDEFINED) { ref[p[i]] = val; } else { return UNDEFINED; } } return o; }; /** * Returns `true` if the object has no enumerable properties of its own. * * @method isEmpty * @param {Object} obj An object. * @return {Boolean} `true` if the object is empty. * @static * @since 3.2.0 */ O.isEmpty = function (obj) { return !O.keys(obj).length; }; /** * The YUI module contains the components required for building the YUI seed * file. This includes the script loading mechanism, a simple queue, and the * core utilities for the library. * @module yui * @submodule yui-base */ /** * YUI user agent detection. * Do not fork for a browser if it can be avoided. Use feature detection when * you can. Use the user agent as a last resort. For all fields listed * as @type float, UA stores a version number for the browser engine, * 0 otherwise. This value may or may not map to the version number of * the browser using the engine. The value is presented as a float so * that it can easily be used for boolean evaluation as well as for * looking for a particular range of versions. Because of this, * some of the granularity of the version info may be lost. The fields that * are @type string default to null. The API docs list the values that * these fields can have. * @class UA * @static */ /** * Static method on `YUI.Env` for parsing a UA string. Called at instantiation * to populate `Y.UA`. * * @static * @method parseUA * @param {String} [subUA=navigator.userAgent] UA string to parse * @returns {Object} The Y.UA object */ YUI.Env.parseUA = function(subUA) { var numberify = function(s) { var c = 0; return parseFloat(s.replace(/\./g, function() { return (c++ == 1) ? '' : '.'; })); }, win = Y.config.win, nav = win && win.navigator, o = { /** * Internet Explorer version number or 0. Example: 6 * @property ie * @type float * @static */ ie: 0, /** * Opera version number or 0. Example: 9.2 * @property opera * @type float * @static */ opera: 0, /** * Gecko engine revision number. Will evaluate to 1 if Gecko * is detected but the revision could not be found. Other browsers * will be 0. Example: 1.8 * <pre> * Firefox 1.0.0.4: 1.7.8 <-- Reports 1.7 * Firefox 1.5.0.9: 1.8.0.9 <-- 1.8 * Firefox 2.0.0.3: 1.8.1.3 <-- 1.81 * Firefox 3.0 <-- 1.9 * Firefox 3.5 <-- 1.91 * </pre> * @property gecko * @type float * @static */ gecko: 0, /** * AppleWebKit version. KHTML browsers that are not WebKit browsers * will evaluate to 1, other browsers 0. Example: 418.9 * <pre> * Safari 1.3.2 (312.6): 312.8.1 <-- Reports 312.8 -- currently the * latest available for Mac OSX 10.3. * Safari 2.0.2: 416 <-- hasOwnProperty introduced * Safari 2.0.4: 418 <-- preventDefault fixed * Safari 2.0.4 (419.3): 418.9.1 <-- One version of Safari may run * different versions of webkit * Safari 2.0.4 (419.3): 419 <-- Tiger installations that have been * updated, but not updated * to the latest patch. * Webkit 212 nightly: 522+ <-- Safari 3.0 precursor (with native * SVG and many major issues fixed). * Safari 3.0.4 (523.12) 523.12 <-- First Tiger release - automatic * update from 2.x via the 10.4.11 OS patch. * Webkit nightly 1/2008:525+ <-- Supports DOMContentLoaded event. * yahoo.com user agent hack removed. * </pre> * http://en.wikipedia.org/wiki/Safari_version_history * @property webkit * @type float * @static */ webkit: 0, /** * Safari will be detected as webkit, but this property will also * be populated with the Safari version number * @property safari * @type float * @static */ safari: 0, /** * Chrome will be detected as webkit, but this property will also * be populated with the Chrome version number * @property chrome * @type float * @static */ chrome: 0, /** * The mobile property will be set to a string containing any relevant * user agent information when a modern mobile browser is detected. * Currently limited to Safari on the iPhone/iPod Touch, Nokia N-series * devices with the WebKit-based browser, and Opera Mini. * @property mobile * @type string * @default null * @static */ mobile: null, /** * Adobe AIR version number or 0. Only populated if webkit is detected. * Example: 1.0 * @property air * @type float */ air: 0, /** * Detects Apple iPad's OS version * @property ipad * @type float * @static */ ipad: 0, /** * Detects Apple iPhone's OS version * @property iphone * @type float * @static */ iphone: 0, /** * Detects Apples iPod's OS version * @property ipod * @type float * @static */ ipod: 0, /** * General truthy check for iPad, iPhone or iPod * @property ios * @type float * @default null * @static */ ios: null, /** * Detects Googles Android OS version * @property android * @type float * @static */ android: 0, /** * Detects Palms WebOS version * @property webos * @type float * @static */ webos: 0, /** * Google Caja version number or 0. * @property caja * @type float */ caja: nav && nav.cajaVersion, /** * Set to true if the page appears to be in SSL * @property secure * @type boolean * @static */ secure: false, /** * The operating system. Currently only detecting windows or macintosh * @property os * @type string * @default null * @static */ os: null }, ua = subUA || nav && nav.userAgent, loc = win && win.location, href = loc && loc.href, m; /** * The User Agent string that was parsed * @property userAgent * @type String * @static */ o.userAgent = ua; o.secure = href && (href.toLowerCase().indexOf('https') === 0); if (ua) { if ((/windows|win32/i).test(ua)) { o.os = 'windows'; } else if ((/macintosh/i).test(ua)) { o.os = 'macintosh'; } else if ((/rhino/i).test(ua)) { o.os = 'rhino'; } // Modern KHTML browsers should qualify as Safari X-Grade if ((/KHTML/).test(ua)) { o.webkit = 1; } // Modern WebKit browsers are at least X-Grade m = ua.match(/AppleWebKit\/([^\s]*)/); if (m && m[1]) { o.webkit = numberify(m[1]); o.safari = o.webkit; // Mobile browser check if (/ Mobile\//.test(ua)) { o.mobile = 'Apple'; // iPhone or iPod Touch m = ua.match(/OS ([^\s]*)/); if (m && m[1]) { m = numberify(m[1].replace('_', '.')); } o.ios = m; o.ipad = o.ipod = o.iphone = 0; m = ua.match(/iPad|iPod|iPhone/); if (m && m[0]) { o[m[0].toLowerCase()] = o.ios; } } else { m = ua.match(/NokiaN[^\/]*|webOS\/\d\.\d/); if (m) { // Nokia N-series, webOS, ex: NokiaN95 o.mobile = m[0]; } if (/webOS/.test(ua)) { o.mobile = 'WebOS'; m = ua.match(/webOS\/([^\s]*);/); if (m && m[1]) { o.webos = numberify(m[1]); } } if (/ Android/.test(ua)) { if (/Mobile/.test(ua)) { o.mobile = 'Android'; } m = ua.match(/Android ([^\s]*);/); if (m && m[1]) { o.android = numberify(m[1]); } } } m = ua.match(/Chrome\/([^\s]*)/); if (m && m[1]) { o.chrome = numberify(m[1]); // Chrome o.safari = 0; //Reset safari back to 0 } else { m = ua.match(/AdobeAIR\/([^\s]*)/); if (m) { o.air = m[0]; // Adobe AIR 1.0 or better } } } if (!o.webkit) { // not webkit // @todo check Opera/8.01 (J2ME/MIDP; Opera Mini/2.0.4509/1316; fi; U; ssr) m = ua.match(/Opera[\s\/]([^\s]*)/); if (m && m[1]) { o.opera = numberify(m[1]); m = ua.match(/Version\/([^\s]*)/); if (m && m[1]) { o.opera = numberify(m[1]); // opera 10+ } m = ua.match(/Opera Mini[^;]*/); if (m) { o.mobile = m[0]; // ex: Opera Mini/2.0.4509/1316 } } else { // not opera or webkit m = ua.match(/MSIE\s([^;]*)/); if (m && m[1]) { o.ie = numberify(m[1]); } else { // not opera, webkit, or ie m = ua.match(/Gecko\/([^\s]*)/); if (m) { o.gecko = 1; // Gecko detected, look for revision m = ua.match(/rv:([^\s\)]*)/); if (m && m[1]) { o.gecko = numberify(m[1]); } } } } } } //It was a parsed UA, do not assign the global value. if (!subUA) { YUI.Env.UA = o; } return o; }; Y.UA = YUI.Env.UA || YUI.Env.parseUA(); YUI.Env.aliases = { "anim": ["anim-base","anim-color","anim-curve","anim-easing","anim-node-plugin","anim-scroll","anim-xy"], "app": ["controller","model","model-list","view"], "attribute": ["attribute-base","attribute-complex"], "autocomplete": ["autocomplete-base","autocomplete-sources","autocomplete-list","autocomplete-plugin"], "base": ["base-base","base-pluginhost","base-build"], "cache": ["cache-base","cache-offline","cache-plugin"], "collection": ["array-extras","arraylist","arraylist-add","arraylist-filter","array-invoke"], "dataschema": ["dataschema-base","dataschema-json","dataschema-xml","dataschema-array","dataschema-text"], "datasource": ["datasource-local","datasource-io","datasource-get","datasource-function","datasource-cache","datasource-jsonschema","datasource-xmlschema","datasource-arrayschema","datasource-textschema","datasource-polling"], "datatable": ["datatable-base","datatable-datasource","datatable-sort","datatable-scroll"], "datatype": ["datatype-number","datatype-date","datatype-xml"], "datatype-date": ["datatype-date-parse","datatype-date-format"], "datatype-number": ["datatype-number-parse","datatype-number-format"], "datatype-xml": ["datatype-xml-parse","datatype-xml-format"], "dd": ["dd-ddm-base","dd-ddm","dd-ddm-drop","dd-drag","dd-proxy","dd-constrain","dd-drop","dd-scroll","dd-delegate"], "dom": ["dom-base","dom-screen","dom-style","selector-native","selector"], "editor": ["frame","selection","exec-command","editor-base","editor-para","editor-br","editor-bidi","editor-tab","createlink-base"], "event": ["event-base","event-delegate","event-synthetic","event-mousewheel","event-mouseenter","event-key","event-focus","event-resize","event-hover","event-outside"], "event-custom": ["event-custom-base","event-custom-complex"], "event-gestures": ["event-flick","event-move"], "highlight": ["highlight-base","highlight-accentfold"], "history": ["history-base","history-hash","history-hash-ie","history-html5"], "io": ["io-base","io-xdr","io-form","io-upload-iframe","io-queue"], "json": ["json-parse","json-stringify"], "loader": ["loader-base","loader-rollup","loader-yui3"], "node": ["node-base","node-event-delegate","node-pluginhost","node-screen","node-style"], "pluginhost": ["pluginhost-base","pluginhost-config"], "querystring": ["querystring-parse","querystring-stringify"], "recordset": ["recordset-base","recordset-sort","recordset-filter","recordset-indexer"], "resize": ["resize-base","resize-proxy","resize-constrain"], "slider": ["slider-base","slider-value-range","clickable-rail","range-slider"], "text": ["text-accentfold","text-wordbreak"], "widget": ["widget-base","widget-htmlparser","widget-uievents","widget-skin"] }; }, '@VERSION@' ); YUI.add('get', function(Y) { /** * Provides a mechanism to fetch remote resources and * insert them into a document. * @module yui * @submodule get */ /** * Fetches and inserts one or more script or link nodes into the document * @class Get * @static */ var ua = Y.UA, L = Y.Lang, TYPE_JS = 'text/javascript', TYPE_CSS = 'text/css', STYLESHEET = 'stylesheet', SCRIPT = 'script', AUTOPURGE = 'autopurge', UTF8 = 'utf-8', LINK = 'link', ASYNC = 'async', ALL = true, // FireFox does not support the onload event for link nodes, so // there is no way to make the css requests synchronous. This means // that the css rules in multiple files could be applied out of order // in this browser if a later request returns before an earlier one. // Safari too. ONLOAD_SUPPORTED = { script: ALL, css: !(ua.webkit || ua.gecko) }, /** * hash of queues to manage multiple requests * @property queues * @private */ queues = {}, /** * queue index used to generate transaction ids * @property qidx * @type int * @private */ qidx = 0, /** * interal property used to prevent multiple simultaneous purge * processes * @property purging * @type boolean * @private */ purging, /** * Clear timeout state * * @method _clearTimeout * @param {Object} q Queue data * @private */ _clearTimeout = function(q) { var timer = q.timer; if (timer) { clearTimeout(timer); q.timer = null; } }, /** * Generates an HTML element, this is not appended to a document * @method _node * @param {string} type the type of element. * @param {Object} attr the fixed set of attribute for the type. * @param {Object} custAttrs optional Any custom attributes provided by the user. * @param {Window} win optional window to create the element in. * @return {HTMLElement} the generated node. * @private */ _node = function(type, attr, custAttrs, win) { var w = win || Y.config.win, d = w.document, n = d.createElement(type), i; if (custAttrs) { Y.mix(attr, custAttrs); } for (i in attr) { if (attr[i] && attr.hasOwnProperty(i)) { n.setAttribute(i, attr[i]); } } return n; }, /** * Generates a link node * @method _linkNode * @param {string} url the url for the css file. * @param {Window} win optional window to create the node in. * @param {object} attributes optional attributes collection to apply to the * new node. * @return {HTMLElement} the generated node. * @private */ _linkNode = function(url, win, attributes) { return _node(LINK, { id: Y.guid(), type: TYPE_CSS, rel: STYLESHEET, href: url }, attributes, win); }, /** * Generates a script node * @method _scriptNode * @param {string} url the url for the script file. * @param {Window} win optional window to create the node in. * @param {object} attributes optional attributes collection to apply to the * new node. * @return {HTMLElement} the generated node. * @private */ _scriptNode = function(url, win, attributes) { return _node(SCRIPT, { id: Y.guid(), type: TYPE_JS, src: url }, attributes, win); }, /** * Returns the data payload for callback functions. * @method _returnData * @param {object} q the queue. * @param {string} msg the result message. * @param {string} result the status message from the request. * @return {object} the state data from the request. * @private */ _returnData = function(q, msg, result) { return { tId: q.tId, win: q.win, data: q.data, nodes: q.nodes, msg: msg, statusText: result, purge: function() { _purge(this.tId); } }; }, /** * The transaction is finished * @method _end * @param {string} id the id of the request. * @param {string} msg the result message. * @param {string} result the status message from the request. * @private */ _end = function(id, msg, result) { var q = queues[id], onEnd = q && q.onEnd; q.finished = true; if (onEnd) { onEnd.call(q.context, _returnData(q, msg, result)); } }, /** * The request failed, execute fail handler with whatever * was accomplished. There isn't a failure case at the * moment unless you count aborted transactions * @method _fail * @param {string} id the id of the request * @private */ _fail = function(id, msg) { Y.log('get failure: ' + msg, 'warn', 'get'); var q = queues[id], onFailure = q.onFailure; _clearTimeout(q); if (onFailure) { onFailure.call(q.context, _returnData(q, msg)); } _end(id, msg, 'failure'); }, /** * Abort the transaction * * @method _abort * @param {Object} id * @private */ _abort = function(id) { _fail(id, 'transaction ' + id + ' was aborted'); }, /** * The request is complete, so executing the requester's callback * @method _complete * @param {string} id the id of the request. * @private */ _complete = function(id) { Y.log("Finishing transaction " + id, "info", "get"); var q = queues[id], onSuccess = q.onSuccess; _clearTimeout(q); if (q.aborted) { _abort(id); } else { if (onSuccess) { onSuccess.call(q.context, _returnData(q)); } // 3.3.0 had undefined msg for this path. _end(id, undefined, 'OK'); } }, /** * Get node reference, from string * * @method _getNodeRef * @param {String|HTMLElement} nId The node id to find. If an HTMLElement is passed in, it will be returned. * @param {String} tId Queue id, used to determine document for queue * @private */ _getNodeRef = function(nId, tId) { var q = queues[tId], n = (L.isString(nId)) ? q.win.document.getElementById(nId) : nId; if (!n) { _fail(tId, 'target node not found: ' + nId); } return n; }, /** * Removes the nodes for the specified queue * @method _purge * @param {string} tId the transaction id. * @private */ _purge = function(tId) { var nodes, doc, parent, sibling, node, attr, insertBefore, i, l, q = queues[tId]; if (q) { nodes = q.nodes; l = nodes.length; // TODO: Why is node.parentNode undefined? Which forces us to do this... /* doc = q.win.document; parent = doc.getElementsByTagName('head')[0]; insertBefore = q.insertBefore || doc.getElementsByTagName('base')[0]; if (insertBefore) { sibling = _getNodeRef(insertBefore, tId); if (sibling) { parent = sibling.parentNode; } } */ for (i = 0; i < l; i++) { node = nodes[i]; parent = node.parentNode; if (node.clearAttributes) { node.clearAttributes(); } else { // This destroys parentNode ref, so we hold onto it above first. for (attr in node) { if (node.hasOwnProperty(attr)) { delete node[attr]; } } } parent.removeChild(node); } } q.nodes = []; }, /** * Progress callback * * @method _progress * @param {string} id The id of the request. * @param {string} The url which just completed. * @private */ _progress = function(id, url) { var q = queues[id], onProgress = q.onProgress, o; if (onProgress) { o = _returnData(q); o.url = url; onProgress.call(q.context, o); } }, /** * Timeout detected * @method _timeout * @param {string} id the id of the request. * @private */ _timeout = function(id) { Y.log('Timeout ' + id, 'info', 'get'); var q = queues[id], onTimeout = q.onTimeout; if (onTimeout) { onTimeout.call(q.context, _returnData(q)); } _end(id, 'timeout', 'timeout'); }, /** * onload callback * @method _loaded * @param {string} id the id of the request. * @return {string} the result. * @private */ _loaded = function(id, url) { var q = queues[id], sync = (q && !q.async); if (!q) { return; } if (sync) { _clearTimeout(q); } _progress(id, url); // TODO: Cleaning up flow to have a consistent end point // !q.finished check is for the async case, // where scripts may still be loading when we've // already aborted. Ideally there should be a single path // for this. if (!q.finished) { if (q.aborted) { _abort(id); } else { if ((--q.remaining) === 0) { _complete(id); } else if (sync) { _next(id); } } } }, /** * Detects when a node has been loaded. In the case of * script nodes, this does not guarantee that contained * script is ready to use. * @method _trackLoad * @param {string} type the type of node to track. * @param {HTMLElement} n the node to track. * @param {string} id the id of the request. * @param {string} url the url that is being loaded. * @private */ _trackLoad = function(type, n, id, url) { // TODO: Can we massage this to use ONLOAD_SUPPORTED[type]? // IE supports the readystatechange event for script and css nodes // Opera only for script nodes. Opera support onload for script // nodes, but this doesn't fire when there is a load failure. // The onreadystatechange appears to be a better way to respond // to both success and failure. if (ua.ie) { n.onreadystatechange = function() { var rs = this.readyState; if ('loaded' === rs || 'complete' === rs) { // Y.log(id + " onreadstatechange " + url, "info", "get"); n.onreadystatechange = null; _loaded(id, url); } }; } else if (ua.webkit) { // webkit prior to 3.x is no longer supported if (type === SCRIPT) { // Safari 3.x supports the load event for script nodes (DOM2) n.addEventListener('load', function() { _loaded(id, url); }, false); } } else { // FireFox and Opera support onload (but not DOM2 in FF) handlers for // script nodes. Opera, but not FF, supports the onload event for link nodes. n.onload = function() { // Y.log(id + " onload " + url, "info", "get"); _loaded(id, url); }; n.onerror = function(e) { _fail(id, e + ': ' + url); }; } }, _insertInDoc = function(node, id, win) { // Add it to the head or insert it before 'insertBefore'. // Work around IE bug if there is a base tag. var q = queues[id], doc = win.document, insertBefore = q.insertBefore || doc.getElementsByTagName('base')[0], sibling; if (insertBefore) { sibling = _getNodeRef(insertBefore, id); if (sibling) { Y.log('inserting before: ' + insertBefore, 'info', 'get'); sibling.parentNode.insertBefore(node, sibling); } } else { // 3.3.0 assumed head is always around. doc.getElementsByTagName('head')[0].appendChild(node); } }, /** * Loads the next item for a given request * @method _next * @param {string} id the id of the request. * @return {string} the result. * @private */ _next = function(id) { // Assigning out here for readability var q = queues[id], type = q.type, attrs = q.attributes, win = q.win, timeout = q.timeout, node, url; if (q.url.length > 0) { url = q.url.shift(); Y.log('attempting to load ' + url, 'info', 'get'); // !q.timer ensures that this only happens once for async if (timeout && !q.timer) { q.timer = setTimeout(function() { _timeout(id); }, timeout); } if (type === SCRIPT) { node = _scriptNode(url, win, attrs); } else { node = _linkNode(url, win, attrs); } // add the node to the queue so we can return it in the callback q.nodes.push(node); _trackLoad(type, node, id, url); _insertInDoc(node, id, win); if (!ONLOAD_SUPPORTED[type]) { _loaded(id, url); } if (q.async) { // For sync, the _next call is chained in _loaded _next(id); } } }, /** * Removes processed queues and corresponding nodes * @method _autoPurge * @private */ _autoPurge = function() { if (purging) { return; } purging = true; var i, q; for (i in queues) { if (queues.hasOwnProperty(i)) { q = queues[i]; if (q.autopurge && q.finished) { _purge(q.tId); delete queues[i]; } } } purging = false; }, /** * Saves the state for the request and begins loading * the requested urls * @method queue * @param {string} type the type of node to insert. * @param {string} url the url to load. * @param {object} opts the hash of options for this request. * @return {object} transaction object. * @private */ _queue = function(type, url, opts) { opts = opts || {}; var id = 'q' + (qidx++), thresh = opts.purgethreshold || Y.Get.PURGE_THRESH, q; if (qidx % thresh === 0) { _autoPurge(); } // Merge to protect opts (grandfathered in). q = queues[id] = Y.merge(opts); // Avoid mix, merge overhead. Known set of props. q.tId = id; q.type = type; q.url = url; q.finished = false; q.nodes = []; q.win = q.win || Y.config.win; q.context = q.context || q; q.autopurge = (AUTOPURGE in q) ? q.autopurge : (type === SCRIPT) ? true : false; q.attributes = q.attributes || {}; q.attributes.charset = opts.charset || q.attributes.charset || UTF8; if (ASYNC in q && type === SCRIPT) { q.attributes.async = q.async; } q.url = (L.isString(q.url)) ? [q.url] : q.url; // TODO: Do we really need to account for this developer error? // If the url is undefined, this is probably a trailing comma problem in IE. if (!q.url[0]) { q.url.shift(); Y.log('skipping empty url'); } q.remaining = q.url.length; _next(id); return { tId: id }; }; Y.Get = { /** * The number of request required before an automatic purge. * Can be configured via the 'purgethreshold' config * @property PURGE_THRESH * @static * @type int * @default 20 * @private */ PURGE_THRESH: 20, /** * Abort a transaction * @method abort * @static * @param {string|object} o Either the tId or the object returned from * script() or css(). */ abort : function(o) { var id = (L.isString(o)) ? o : o.tId, q = queues[id]; if (q) { Y.log('Aborting ' + id, 'info', 'get'); q.aborted = true; } }, /** * Fetches and inserts one or more script nodes into the head * of the current document or the document in a specified window. * * @method script * @static * @param {string|string[]} url the url or urls to the script(s). * @param {object} opts Options: * <dl> * <dt>onSuccess</dt> * <dd> * callback to execute when the script(s) are finished loading * The callback receives an object back with the following * data: * <dl> * <dt>win</dt> * <dd>the window the script(s) were inserted into</dd> * <dt>data</dt> * <dd>the data object passed in when the request was made</dd> * <dt>nodes</dt> * <dd>An array containing references to the nodes that were * inserted</dd> * <dt>purge</dt> * <dd>A function that, when executed, will remove the nodes * that were inserted</dd> * <dt> * </dl> * </dd> * <dt>onTimeout</dt> * <dd> * callback to execute when a timeout occurs. * The callback receives an object back with the following * data: * <dl> * <dt>win</dt> * <dd>the window the script(s) were inserted into</dd> * <dt>data</dt> * <dd>the data object passed in when the request was made</dd> * <dt>nodes</dt> * <dd>An array containing references to the nodes that were * inserted</dd> * <dt>purge</dt> * <dd>A function that, when executed, will remove the nodes * that were inserted</dd> * <dt> * </dl> * </dd> * <dt>onEnd</dt> * <dd>a function that executes when the transaction finishes, * regardless of the exit path</dd> * <dt>onFailure</dt> * <dd> * callback to execute when the script load operation fails * The callback receives an object back with the following * data: * <dl> * <dt>win</dt> * <dd>the window the script(s) were inserted into</dd> * <dt>data</dt> * <dd>the data object passed in when the request was made</dd> * <dt>nodes</dt> * <dd>An array containing references to the nodes that were * inserted successfully</dd> * <dt>purge</dt> * <dd>A function that, when executed, will remove any nodes * that were inserted</dd> * <dt> * </dl> * </dd> * <dt>onProgress</dt> * <dd>callback to execute when each individual file is done loading * (useful when passing in an array of js files). Receives the same * payload as onSuccess, with the addition of a <code>url</code> * property, which identifies the file which was loaded.</dd> * <dt>async</dt> * <dd> * <p>When passing in an array of JS files, setting this flag to true * will insert them into the document in parallel, as opposed to the * default behavior, which is to chain load them serially. It will also * set the async attribute on the script node to true.</p> * <p>Setting async:true * will lead to optimal file download performance allowing the browser to * download multiple scripts in parallel, and execute them as soon as they * are available.</p> * <p>Note that async:true does not guarantee execution order of the * scripts being downloaded. They are executed in whichever order they * are received.</p> * </dd> * <dt>context</dt> * <dd>the execution context for the callbacks</dd> * <dt>win</dt> * <dd>a window other than the one the utility occupies</dd> * <dt>autopurge</dt> * <dd> * setting to true will let the utilities cleanup routine purge * the script once loaded * </dd> * <dt>purgethreshold</dt> * <dd> * The number of transaction before autopurge should be initiated * </dd> * <dt>data</dt> * <dd> * data that is supplied to the callback when the script(s) are * loaded. * </dd> * <dt>insertBefore</dt> * <dd>node or node id that will become the new node's nextSibling. * If this is not specified, nodes will be inserted before a base * tag should it exist. Otherwise, the nodes will be appended to the * end of the document head.</dd> * </dl> * <dt>charset</dt> * <dd>Node charset, default utf-8 (deprecated, use the attributes * config)</dd> * <dt>attributes</dt> * <dd>An object literal containing additional attributes to add to * the link tags</dd> * <dt>timeout</dt> * <dd>Number of milliseconds to wait before aborting and firing * the timeout event</dd> * <pre> * &nbsp; Y.Get.script( * &nbsp; ["http://yui.yahooapis.com/2.5.2/build/yahoo/yahoo-min.js", * &nbsp; "http://yui.yahooapis.com/2.5.2/build/event/event-min.js"], * &nbsp; &#123; * &nbsp; onSuccess: function(o) &#123; * &nbsp; this.log("won't cause error because Y is the context"); * &nbsp; Y.log(o.data); // foo * &nbsp; Y.log(o.nodes.length === 2) // true * &nbsp; // o.purge(); // optionally remove the script nodes * &nbsp; // immediately * &nbsp; &#125;, * &nbsp; onFailure: function(o) &#123; * &nbsp; Y.log("transaction failed"); * &nbsp; &#125;, * &nbsp; onTimeout: function(o) &#123; * &nbsp; Y.log("transaction timed out"); * &nbsp; &#125;, * &nbsp; data: "foo", * &nbsp; timeout: 10000, // 10 second timeout * &nbsp; context: Y, // make the YUI instance * &nbsp; // win: otherframe // target another window/frame * &nbsp; autopurge: true // allow the utility to choose when to * &nbsp; // remove the nodes * &nbsp; purgetheshold: 1 // purge previous transaction before * &nbsp; // next transaction * &nbsp; &#125;);. * </pre> * @return {tId: string} an object containing info about the * transaction. */ script: function(url, opts) { return _queue(SCRIPT, url, opts); }, /** * Fetches and inserts one or more css link nodes into the * head of the current document or the document in a specified * window. * @method css * @static * @param {string} url the url or urls to the css file(s). * @param {object} opts Options: * <dl> * <dt>onSuccess</dt> * <dd> * callback to execute when the css file(s) are finished loading * The callback receives an object back with the following * data: * <dl>win</dl> * <dd>the window the link nodes(s) were inserted into</dd> * <dt>data</dt> * <dd>the data object passed in when the request was made</dd> * <dt>nodes</dt> * <dd>An array containing references to the nodes that were * inserted</dd> * <dt>purge</dt> * <dd>A function that, when executed, will remove the nodes * that were inserted</dd> * <dt> * </dl> * </dd> * <dt>onProgress</dt> * <dd>callback to execute when each individual file is done loading (useful when passing in an array of css files). Receives the same * payload as onSuccess, with the addition of a <code>url</code> property, which identifies the file which was loaded. Currently only useful for non Webkit/Gecko browsers, * where onload for css is detected accurately.</dd> * <dt>async</dt> * <dd>When passing in an array of css files, setting this flag to true will insert them * into the document in parallel, as oppposed to the default behavior, which is to chain load them (where possible). * This flag is more useful for scripts currently, since for css Get only chains if not Webkit/Gecko.</dd> * <dt>context</dt> * <dd>the execution context for the callbacks</dd> * <dt>win</dt> * <dd>a window other than the one the utility occupies</dd> * <dt>data</dt> * <dd> * data that is supplied to the callbacks when the nodes(s) are * loaded. * </dd> * <dt>insertBefore</dt> * <dd>node or node id that will become the new node's nextSibling</dd> * <dt>charset</dt> * <dd>Node charset, default utf-8 (deprecated, use the attributes * config)</dd> * <dt>attributes</dt> * <dd>An object literal containing additional attributes to add to * the link tags</dd> * </dl> * <pre> * Y.Get.css("http://localhost/css/menu.css"); * </pre> * <pre> * &nbsp; Y.Get.css( * &nbsp; ["http://localhost/css/menu.css", * &nbsp; "http://localhost/css/logger.css"], &#123; * &nbsp; insertBefore: 'custom-styles' // nodes will be inserted * &nbsp; // before the specified node * &nbsp; &#125;);. * </pre> * @return {tId: string} an object containing info about the * transaction. */ css: function(url, opts) { return _queue('css', url, opts); } }; }, '@VERSION@' ,{requires:['yui-base']}); YUI.add('features', function(Y) { var feature_tests = {}; /** Contains the core of YUI's feature test architecture. @module features */ /** * Feature detection * @class Features * @static */ Y.mix(Y.namespace('Features'), { /** * Object hash of all registered feature tests * @property tests * @type Object */ tests: feature_tests, /** * Add a test to the system * * ``` * Y.Features.add("load", "1", {}); * ``` * * @method add * @param {String} cat The category, right now only 'load' is supported * @param {String} name The number sequence of the test, how it's reported in the URL or config: 1, 2, 3 * @param {Object} o Object containing test properties * @param {String} o.name The name of the test * @param {Function} o.test The test function to execute, the only argument to the function is the `Y` instance * @param {String} o.trigger The module that triggers this test. */ add: function(cat, name, o) { feature_tests[cat] = feature_tests[cat] || {}; feature_tests[cat][name] = o; }, /** * Execute all tests of a given category and return the serialized results * * ``` * caps=1:1;2:1;3:0 * ``` * @method all * @param {String} cat The category to execute * @param {Array} args The arguments to pass to the test function * @return {String} A semi-colon separated string of tests and their success/failure: 1:1;2:1;3:0 */ all: function(cat, args) { var cat_o = feature_tests[cat], // results = {}; result = []; if (cat_o) { Y.Object.each(cat_o, function(v, k) { result.push(k + ':' + (Y.Features.test(cat, k, args) ? 1 : 0)); }); } return (result.length) ? result.join(';') : ''; }, /** * Run a sepecific test and return a Boolean response. * * ``` * Y.Features.test("load", "1"); * ``` * * @method test * @param {String} cat The category of the test to run * @param {String} name The name of the test to run * @param {Array} args The arguments to pass to the test function * @return {Boolean} True or false if the test passed/failed. */ test: function(cat, name, args) { args = args || []; var result, ua, test, cat_o = feature_tests[cat], feature = cat_o && cat_o[name]; if (!feature) { Y.log('Feature test ' + cat + ', ' + name + ' not found'); } else { result = feature.result; if (Y.Lang.isUndefined(result)) { ua = feature.ua; if (ua) { result = (Y.UA[ua]); } test = feature.test; if (test && ((!ua) || result)) { result = test.apply(Y, args); } feature.result = result; } } return result; } }); // Y.Features.add("load", "1", {}); // Y.Features.test("load", "1"); // caps=1:1;2:0;3:1; /* This file is auto-generated by src/loader/scripts/meta_join.py */ var add = Y.Features.add; // graphics-canvas-default add('load', '0', { "name": "graphics-canvas-default", "test": function(Y) { var DOCUMENT = Y.config.doc, canvas = DOCUMENT && DOCUMENT.createElement("canvas"); return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (canvas && canvas.getContext && canvas.getContext("2d"))); }, "trigger": "graphics" }); // autocomplete-list-keys add('load', '1', { "name": "autocomplete-list-keys", "test": function (Y) { // Only add keyboard support to autocomplete-list if this doesn't appear to // be an iOS or Android-based mobile device. // // There's currently no feasible way to actually detect whether a device has // a hardware keyboard, so this sniff will have to do. It can easily be // overridden by manually loading the autocomplete-list-keys module. // // Worth noting: even though iOS supports bluetooth keyboards, Mobile Safari // doesn't fire the keyboard events used by AutoCompleteList, so there's // no point loading the -keys module even when a bluetooth keyboard may be // available. return !(Y.UA.ios || Y.UA.android); }, "trigger": "autocomplete-list" }); // graphics-svg add('load', '2', { "name": "graphics-svg", "test": function(Y) { var DOCUMENT = Y.config.doc; return (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")); }, "trigger": "graphics" }); // history-hash-ie add('load', '3', { "name": "history-hash-ie", "test": function (Y) { var docMode = Y.config.doc && Y.config.doc.documentMode; return Y.UA.ie && (!('onhashchange' in Y.config.win) || !docMode || docMode < 8); }, "trigger": "history-hash" }); // graphics-vml-default add('load', '4', { "name": "graphics-vml-default", "test": function(Y) { var DOCUMENT = Y.config.doc, canvas = DOCUMENT && DOCUMENT.createElement("canvas"); return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (!canvas || !canvas.getContext || !canvas.getContext("2d"))); }, "trigger": "graphics" }); // graphics-svg-default add('load', '5', { "name": "graphics-svg-default", "test": function(Y) { var DOCUMENT = Y.config.doc; return (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")); }, "trigger": "graphics" }); // widget-base-ie add('load', '6', { "name": "widget-base-ie", "trigger": "widget-base", "ua": "ie" }); // transition-timer add('load', '7', { "name": "transition-timer", "test": function (Y) { var DOCUMENT = Y.config.doc, node = (DOCUMENT) ? DOCUMENT.documentElement: null, ret = true; if (node && node.style) { ret = !('MozTransition' in node.style || 'WebkitTransition' in node.style); } return ret; }, "trigger": "transition" }); // dom-style-ie add('load', '8', { "name": "dom-style-ie", "test": function (Y) { var testFeature = Y.Features.test, addFeature = Y.Features.add, WINDOW = Y.config.win, DOCUMENT = Y.config.doc, DOCUMENT_ELEMENT = 'documentElement', ret = false; addFeature('style', 'computedStyle', { test: function() { return WINDOW && 'getComputedStyle' in WINDOW; } }); addFeature('style', 'opacity', { test: function() { return DOCUMENT && 'opacity' in DOCUMENT[DOCUMENT_ELEMENT].style; } }); ret = (!testFeature('style', 'opacity') && !testFeature('style', 'computedStyle')); return ret; }, "trigger": "dom-style" }); // selector-css2 add('load', '9', { "name": "selector-css2", "test": function (Y) { var DOCUMENT = Y.config.doc, ret = DOCUMENT && !('querySelectorAll' in DOCUMENT); return ret; }, "trigger": "selector" }); // event-base-ie add('load', '10', { "name": "event-base-ie", "test": function(Y) { var imp = Y.config.doc && Y.config.doc.implementation; return (imp && (!imp.hasFeature('Events', '2.0'))); }, "trigger": "node-base" }); // dd-gestures add('load', '11', { "name": "dd-gestures", "test": function(Y) { return (Y.config.win && ('ontouchstart' in Y.config.win && !Y.UA.chrome)); }, "trigger": "dd-drag" }); // scrollview-base-ie add('load', '12', { "name": "scrollview-base-ie", "trigger": "scrollview-base", "ua": "ie" }); // graphics-canvas add('load', '13', { "name": "graphics-canvas", "test": function(Y) { var DOCUMENT = Y.config.doc, canvas = DOCUMENT && DOCUMENT.createElement("canvas"); return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (canvas && canvas.getContext && canvas.getContext("2d"))); }, "trigger": "graphics" }); // graphics-vml add('load', '14', { "name": "graphics-vml", "test": function(Y) { var DOCUMENT = Y.config.doc, canvas = DOCUMENT && DOCUMENT.createElement("canvas"); return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (!canvas || !canvas.getContext || !canvas.getContext("2d"))); }, "trigger": "graphics" }); }, '@VERSION@' ,{requires:['yui-base']}); YUI.add('intl-base', function(Y) { /** * The Intl utility provides a central location for managing sets of * localized resources (strings and formatting patterns). * * @class Intl * @uses EventTarget * @static */ var SPLIT_REGEX = /[, ]/; Y.mix(Y.namespace('Intl'), { /** * Returns the language among those available that * best matches the preferred language list, using the Lookup * algorithm of BCP 47. * If none of the available languages meets the user's preferences, * then "" is returned. * Extended language ranges are not supported. * * @method lookupBestLang * @param {String[] | String} preferredLanguages The list of preferred * languages in descending preference order, represented as BCP 47 * language tags. A string array or a comma-separated list. * @param {String[]} availableLanguages The list of languages * that the application supports, represented as BCP 47 language * tags. * * @return {String} The available language that best matches the * preferred language list, or "". * @since 3.1.0 */ lookupBestLang: function(preferredLanguages, availableLanguages) { var i, language, result, index; // check whether the list of available languages contains language; // if so return it function scan(language) { var i; for (i = 0; i < availableLanguages.length; i += 1) { if (language.toLowerCase() === availableLanguages[i].toLowerCase()) { return availableLanguages[i]; } } } if (Y.Lang.isString(preferredLanguages)) { preferredLanguages = preferredLanguages.split(SPLIT_REGEX); } for (i = 0; i < preferredLanguages.length; i += 1) { language = preferredLanguages[i]; if (!language || language === '*') { continue; } // check the fallback sequence for one language while (language.length > 0) { result = scan(language); if (result) { return result; } else { index = language.lastIndexOf('-'); if (index >= 0) { language = language.substring(0, index); // one-character subtags get cut along with the // following subtag if (index >= 2 && language.charAt(index - 2) === '-') { language = language.substring(0, index - 2); } } else { // nothing available for this language break; } } } } return ''; } }); }, '@VERSION@' ,{requires:['yui-base']}); YUI.add('yui-log', function(Y) { /** * Provides console log capability and exposes a custom event for * console implementations. This module is a `core` YUI module, <a href="../classes/YUI.html#method_log">it's documentation is located under the YUI class</a>. * * @module yui * @submodule yui-log */ var INSTANCE = Y, LOGEVENT = 'yui:log', UNDEFINED = 'undefined', LEVELS = { debug: 1, info: 1, warn: 1, error: 1 }; /** * If the 'debug' config is true, a 'yui:log' event will be * dispatched, which the Console widget and anything else * can consume. If the 'useBrowserConsole' config is true, it will * write to the browser console if available. YUI-specific log * messages will only be present in the -debug versions of the * JS files. The build system is supposed to remove log statements * from the raw and minified versions of the files. * * @method log * @for YUI * @param {String} msg The message to log. * @param {String} cat The log category for the message. Default * categories are "info", "warn", "error", time". * Custom categories can be used as well. (opt). * @param {String} src The source of the the message (opt). * @param {boolean} silent If true, the log event won't fire. * @return {YUI} YUI instance. */ INSTANCE.log = function(msg, cat, src, silent) { var bail, excl, incl, m, f, Y = INSTANCE, c = Y.config, publisher = (Y.fire) ? Y : YUI.Env.globalEvents; // suppress log message if the config is off or the event stack // or the event call stack contains a consumer of the yui:log event if (c.debug) { // apply source filters if (src) { excl = c.logExclude; incl = c.logInclude; if (incl && !(src in incl)) { bail = 1; } else if (incl && (src in incl)) { bail = !incl[src]; } else if (excl && (src in excl)) { bail = excl[src]; } } if (!bail) { if (c.useBrowserConsole) { m = (src) ? src + ': ' + msg : msg; if (Y.Lang.isFunction(c.logFn)) { c.logFn.call(Y, msg, cat, src); } else if (typeof console != UNDEFINED && console.log) { f = (cat && console[cat] && (cat in LEVELS)) ? cat : 'log'; console[f](m); } else if (typeof opera != UNDEFINED) { opera.postError(m); } } if (publisher && !silent) { if (publisher == Y && (!publisher.getEvent(LOGEVENT))) { publisher.publish(LOGEVENT, { broadcast: 2 }); } publisher.fire(LOGEVENT, { msg: msg, cat: cat, src: src }); } } } return Y; }; /** * Write a system message. This message will be preserved in the * minified and raw versions of the YUI files, unlike log statements. * @method message * @for YUI * @param {String} msg The message to log. * @param {String} cat The log category for the message. Default * categories are "info", "warn", "error", time". * Custom categories can be used as well. (opt). * @param {String} src The source of the the message (opt). * @param {boolean} silent If true, the log event won't fire. * @return {YUI} YUI instance. */ INSTANCE.message = function() { return INSTANCE.log.apply(INSTANCE, arguments); }; }, '@VERSION@' ,{requires:['yui-base']}); YUI.add('yui-later', function(Y) { /** * Provides a setTimeout/setInterval wrapper. This module is a `core` YUI module, <a href="../classes/YUI.html#method_later">it's documentation is located under the YUI class</a>. * * @module yui * @submodule yui-later */ var NO_ARGS = []; /** * Executes the supplied function in the context of the supplied * object 'when' milliseconds later. Executes the function a * single time unless periodic is set to true. * @for YUI * @method later * @param when {int} the number of milliseconds to wait until the fn * is executed. * @param o the context object. * @param fn {Function|String} the function to execute or the name of * the method in the 'o' object to execute. * @param data [Array] data that is provided to the function. This * accepts either a single item or an array. If an array is provided, * the function is executed with one parameter for each array item. * If you need to pass a single array parameter, it needs to be wrapped * in an array [myarray]. * * Note: native methods in IE may not have the call and apply methods. * In this case, it will work, but you are limited to four arguments. * * @param periodic {boolean} if true, executes continuously at supplied * interval until canceled. * @return {object} a timer object. Call the cancel() method on this * object to stop the timer. */ Y.later = function(when, o, fn, data, periodic) { when = when || 0; data = (!Y.Lang.isUndefined(data)) ? Y.Array(data) : NO_ARGS; o = o || Y.config.win || Y; var cancelled = false, method = (o && Y.Lang.isString(fn)) ? o[fn] : fn, wrapper = function() { // IE 8- may execute a setInterval callback one last time // after clearInterval was called, so in order to preserve // the cancel() === no more runny-run, we have to jump through // an extra hoop. if (!cancelled) { if (!method.apply) { method(data[0], data[1], data[2], data[3]); } else { method.apply(o, data || NO_ARGS); } } }, id = (periodic) ? setInterval(wrapper, when) : setTimeout(wrapper, when); return { id: id, interval: periodic, cancel: function() { cancelled = true; if (this.interval) { clearInterval(id); } else { clearTimeout(id); } } }; }; Y.Lang.later = Y.later; }, '@VERSION@' ,{requires:['yui-base']}); YUI.add('loader-base', function(Y) { /** * The YUI loader core * @module loader * @submodule loader-base */ if (!YUI.Env[Y.version]) { (function() { var VERSION = Y.version, BUILD = '/build/', ROOT = VERSION + BUILD, CDN_BASE = Y.Env.base, GALLERY_VERSION = 'gallery-2011.09.14-20-40', TNT = '2in3', TNT_VERSION = '4', YUI2_VERSION = '2.9.0', COMBO_BASE = CDN_BASE + 'combo?', META = { version: VERSION, root: ROOT, base: Y.Env.base, comboBase: COMBO_BASE, skin: { defaultSkin: 'sam', base: 'assets/skins/', path: 'skin.css', after: ['cssreset', 'cssfonts', 'cssgrids', 'cssbase', 'cssreset-context', 'cssfonts-context']}, groups: {}, patterns: {} }, groups = META.groups, yui2Update = function(tnt, yui2) { var root = TNT + '.' + (tnt || TNT_VERSION) + '/' + (yui2 || YUI2_VERSION) + BUILD; groups.yui2.base = CDN_BASE + root; groups.yui2.root = root; }, galleryUpdate = function(tag) { var root = (tag || GALLERY_VERSION) + BUILD; groups.gallery.base = CDN_BASE + root; groups.gallery.root = root; }; groups[VERSION] = {}; groups.gallery = { ext: false, combine: true, comboBase: COMBO_BASE, update: galleryUpdate, patterns: { 'gallery-': { }, 'lang/gallery-': {}, 'gallerycss-': { type: 'css' } } }; groups.yui2 = { combine: true, ext: false, comboBase: COMBO_BASE, update: yui2Update, patterns: { 'yui2-': { configFn: function(me) { if (/-skin|reset|fonts|grids|base/.test(me.name)) { me.type = 'css'; me.path = me.path.replace(/\.js/, '.css'); // this makes skins in builds earlier than // 2.6.0 work as long as combine is false me.path = me.path.replace(/\/yui2-skin/, '/assets/skins/sam/yui2-skin'); } } } } }; galleryUpdate(); yui2Update(); YUI.Env[VERSION] = META; }()); } /** * Loader dynamically loads script and css files. It includes the dependency * info for the version of the library in use, and will automatically pull in * dependencies for the modules requested. It supports rollup files and will * automatically use these when appropriate in order to minimize the number of * http connections required to load all of the dependencies. It can load the * files from the Yahoo! CDN, and it can utilize the combo service provided on * this network to reduce the number of http connections required to download * YUI files. * * @module loader * @main loader * @submodule loader-base */ var NOT_FOUND = {}, NO_REQUIREMENTS = [], MAX_URL_LENGTH = 2048, GLOBAL_ENV = YUI.Env, GLOBAL_LOADED = GLOBAL_ENV._loaded, CSS = 'css', JS = 'js', INTL = 'intl', VERSION = Y.version, ROOT_LANG = '', YObject = Y.Object, oeach = YObject.each, YArray = Y.Array, _queue = GLOBAL_ENV._loaderQueue, META = GLOBAL_ENV[VERSION], SKIN_PREFIX = 'skin-', L = Y.Lang, ON_PAGE = GLOBAL_ENV.mods, modulekey, cache, _path = function(dir, file, type, nomin) { var path = dir + '/' + file; if (!nomin) { path += '-min'; } path += '.' + (type || CSS); return path; }; if (YUI.Env.aliases) { YUI.Env.aliases = {}; //Don't need aliases if Loader is present } /** * The component metadata is stored in Y.Env.meta. * Part of the loader module. * @property meta * @for YUI */ Y.Env.meta = META; /** * Loader dynamically loads script and css files. It includes the dependency * info for the version of the library in use, and will automatically pull in * dependencies for the modules requested. It supports rollup files and will * automatically use these when appropriate in order to minimize the number of * http connections required to load all of the dependencies. It can load the * files from the Yahoo! CDN, and it can utilize the combo service provided on * this network to reduce the number of http connections required to download * YUI files. * * While the loader can be instantiated by the end user, it normally is not. * @see YUI.use for the normal use case. The use function automatically will * pull in missing dependencies. * * @constructor * @class Loader * @param {object} o an optional set of configuration options. Valid options: * <ul> * <li>base: * The base dir</li> * <li>comboBase: * The YUI combo service base dir. Ex: http://yui.yahooapis.com/combo?</li> * <li>root: * The root path to prepend to module names for the combo service. * Ex: 2.5.2/build/</li> * <li>filter:. * * A filter to apply to result urls. This filter will modify the default * path for all modules. The default path for the YUI library is the * minified version of the files (e.g., event-min.js). The filter property * can be a predefined filter or a custom filter. The valid predefined * filters are: * <dl> * <dt>DEBUG</dt> * <dd>Selects the debug versions of the library (e.g., event-debug.js). * This option will automatically include the Logger widget</dd> * <dt>RAW</dt> * <dd>Selects the non-minified version of the library (e.g., event.js). * </dd> * </dl> * You can also define a custom filter, which must be an object literal * containing a search expression and a replace string: * <pre> * myFilter: &#123; * 'searchExp': "-min\\.js", * 'replaceStr': "-debug.js" * &#125; * </pre> * * </li> * <li>filters: per-component filter specification. If specified * for a given component, this overrides the filter config. _Note:_ This does not work on combo urls, use the filter property instead.</li> * <li>combine: * Use the YUI combo service to reduce the number of http connections * required to load your dependencies</li> * <li>ignore: * A list of modules that should never be dynamically loaded</li> * <li>force: * A list of modules that should always be loaded when required, even if * already present on the page</li> * <li>insertBefore: * Node or id for a node that should be used as the insertion point for * new nodes</li> * <li>charset: * charset for dynamic nodes (deprecated, use jsAttributes or cssAttributes) * </li> * <li>jsAttributes: object literal containing attributes to add to script * nodes</li> * <li>cssAttributes: object literal containing attributes to add to link * nodes</li> * <li>timeout: * The number of milliseconds before a timeout occurs when dynamically * loading nodes. If not set, there is no timeout</li> * <li>context: * execution context for all callbacks</li> * <li>onSuccess: * callback for the 'success' event</li> * <li>onFailure: callback for the 'failure' event</li> * <li>onCSS: callback for the 'CSSComplete' event. When loading YUI * components with CSS the CSS is loaded first, then the script. This * provides a moment you can tie into to improve * the presentation of the page while the script is loading.</li> * <li>onTimeout: * callback for the 'timeout' event</li> * <li>onProgress: * callback executed each time a script or css file is loaded</li> * <li>modules: * A list of module definitions. See Loader.addModule for the supported * module metadata</li> * <li>groups: * A list of group definitions. Each group can contain specific definitions * for base, comboBase, combine, and accepts a list of modules. See above * for the description of these properties.</li> * <li>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.</li> * <li>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, and 2.8.1 [default] -- plus all versions of YUI 2 * going forward.</li> * </ul> */ Y.Loader = function(o) { var defaults = META.modules, self = this; modulekey = META.md5; /** * Internal callback to handle multiple internal insert() calls * so that css is inserted prior to js * @property _internalCallback * @private */ // self._internalCallback = null; /** * Callback that will be executed when the loader is finished * with an insert * @method onSuccess * @type function */ // self.onSuccess = null; /** * Callback that will be executed if there is a failure * @method onFailure * @type function */ // self.onFailure = null; /** * Callback for the 'CSSComplete' event. When loading YUI components * with CSS the CSS is loaded first, then the script. This provides * a moment you can tie into to improve the presentation of the page * while the script is loading. * @method onCSS * @type function */ // self.onCSS = null; /** * Callback executed each time a script or css file is loaded * @method onProgress * @type function */ // self.onProgress = null; /** * Callback that will be executed if a timeout occurs * @method onTimeout * @type function */ // self.onTimeout = null; /** * The execution context for all callbacks * @property context * @default {YUI} the YUI instance */ self.context = Y; /** * Data that is passed to all callbacks * @property data */ // self.data = null; /** * Node reference or id where new nodes should be inserted before * @property insertBefore * @type string|HTMLElement */ // self.insertBefore = null; /** * The charset attribute for inserted nodes * @property charset * @type string * @deprecated , use cssAttributes or jsAttributes. */ // self.charset = null; /** * An object literal containing attributes to add to link nodes * @property cssAttributes * @type object */ // self.cssAttributes = null; /** * An object literal containing attributes to add to script nodes * @property jsAttributes * @type object */ // self.jsAttributes = null; /** * The base directory. * @property base * @type string * @default http://yui.yahooapis.com/[YUI VERSION]/build/ */ self.base = Y.Env.meta.base + Y.Env.meta.root; /** * Base path for the combo service * @property comboBase * @type string * @default http://yui.yahooapis.com/combo? */ self.comboBase = Y.Env.meta.comboBase; /* * Base path for language packs. */ // self.langBase = Y.Env.meta.langBase; // self.lang = ""; /** * If configured, the loader will attempt to use the combo * service for YUI resources and configured external resources. * @property combine * @type boolean * @default true if a base dir isn't in the config */ self.combine = o.base && (o.base.indexOf(self.comboBase.substr(0, 20)) > -1); /** * The default seperator to use between files in a combo URL * @property comboSep * @type {String} * @default Ampersand */ self.comboSep = '&'; /** * Max url length for combo urls. The default is 2048. This is the URL * limit for the Yahoo! hosted combo servers. If consuming * a different combo service that has a different URL limit * it is possible to override this default by supplying * the maxURLLength config option. The config option will * only take effect if lower than the default. * * @property maxURLLength * @type int */ self.maxURLLength = MAX_URL_LENGTH; /** * Ignore modules registered on the YUI global * @property ignoreRegistered * @default false */ // self.ignoreRegistered = false; /** * Root path to prepend to module path for the combo * service * @property root * @type string * @default [YUI VERSION]/build/ */ self.root = Y.Env.meta.root; /** * Timeout value in milliseconds. If set, self value will be used by * the get utility. the timeout event will fire if * a timeout occurs. * @property timeout * @type int */ self.timeout = 0; /** * A list of modules that should not be loaded, even if * they turn up in the dependency tree * @property ignore * @type string[] */ // self.ignore = null; /** * A list of modules that should always be loaded, even * if they have already been inserted into the page. * @property force * @type string[] */ // self.force = null; self.forceMap = {}; /** * Should we allow rollups * @property allowRollup * @type boolean * @default false */ self.allowRollup = false; /** * A filter to apply to result urls. This filter will modify the default * path for all modules. The default path for the YUI library is the * minified version of the files (e.g., event-min.js). The filter property * can be a predefined filter or a custom filter. The valid predefined * filters are: * <dl> * <dt>DEBUG</dt> * <dd>Selects the debug versions of the library (e.g., event-debug.js). * This option will automatically include the Logger widget</dd> * <dt>RAW</dt> * <dd>Selects the non-minified version of the library (e.g., event.js). * </dd> * </dl> * You can also define a custom filter, which must be an object literal * containing a search expression and a replace string: * <pre> * myFilter: &#123; * 'searchExp': "-min\\.js", * 'replaceStr': "-debug.js" * &#125; * </pre> * @property filter * @type string| {searchExp: string, replaceStr: string} */ // self.filter = null; /** * per-component filter specification. If specified for a given * component, this overrides the filter config. * @property filters * @type object */ self.filters = {}; /** * The list of requested modules * @property required * @type {string: boolean} */ self.required = {}; /** * If a module name is predefined when requested, it is checked againsts * the patterns provided in this property. If there is a match, the * module is added with the default configuration. * * At the moment only supporting module prefixes, but anticipate * supporting at least regular expressions. * @property patterns * @type Object */ // self.patterns = Y.merge(Y.Env.meta.patterns); self.patterns = {}; /** * The library metadata * @property moduleInfo */ // self.moduleInfo = Y.merge(Y.Env.meta.moduleInfo); self.moduleInfo = {}; self.groups = Y.merge(Y.Env.meta.groups); /** * Provides the information used to skin the skinnable components. * The following skin definition would result in 'skin1' and 'skin2' * being loaded for calendar (if calendar was requested), and * 'sam' for all other skinnable components: * * <code> * skin: { * * // The default skin, which is automatically applied if not * // overriden by a component-specific skin definition. * // Change this in to apply a different skin globally * defaultSkin: 'sam', * * // This is combined with the loader base property to get * // the default root directory for a skin. ex: * // http://yui.yahooapis.com/2.3.0/build/assets/skins/sam/ * base: 'assets/skins/', * * // Any component-specific overrides can be specified here, * // making it possible to load different skins for different * // components. It is possible to load more than one skin * // for a given component as well. * overrides: { * calendar: ['skin1', 'skin2'] * } * } * </code> * @property skin */ self.skin = Y.merge(Y.Env.meta.skin); /* * Map of conditional modules * @since 3.2.0 */ self.conditions = {}; // map of modules with a hash of modules that meet the requirement // self.provides = {}; self.config = o; self._internal = true; cache = GLOBAL_ENV._renderedMods; if (cache) { oeach(cache, function modCache(v, k) { //self.moduleInfo[k] = Y.merge(v); self.moduleInfo[k] = v; }); cache = GLOBAL_ENV._conditions; oeach(cache, function condCache(v, k) { //self.conditions[k] = Y.merge(v); self.conditions[k] = v; }); } else { oeach(defaults, self.addModule, self); } if (!GLOBAL_ENV._renderedMods) { //GLOBAL_ENV._renderedMods = Y.merge(self.moduleInfo); //GLOBAL_ENV._conditions = Y.merge(self.conditions); GLOBAL_ENV._renderedMods = self.moduleInfo; GLOBAL_ENV._conditions = self.conditions; } self._inspectPage(); self._internal = false; self._config(o); self.testresults = null; if (Y.config.tests) { self.testresults = Y.config.tests; } /** * List of rollup files found in the library metadata * @property rollups */ // self.rollups = null; /** * Whether or not to load optional dependencies for * the requested modules * @property loadOptional * @type boolean * @default false */ // self.loadOptional = false; /** * All of the derived dependencies in sorted order, which * will be populated when either calculate() or insert() * is called * @property sorted * @type string[] */ self.sorted = []; /** * Set when beginning to compute the dependency tree. * Composed of what YUI reports to be loaded combined * with what has been loaded by any instance on the page * with the version number specified in the metadata. * @property loaded * @type {string: boolean} */ self.loaded = GLOBAL_LOADED[VERSION]; /* * A list of modules to attach to the YUI instance when complete. * If not supplied, the sorted list of dependencies are applied. * @property attaching */ // self.attaching = null; /** * Flag to indicate the dependency tree needs to be recomputed * if insert is called again. * @property dirty * @type boolean * @default true */ self.dirty = true; /** * List of modules inserted by the utility * @property inserted * @type {string: boolean} */ self.inserted = {}; /** * List of skipped modules during insert() because the module * was not defined * @property skipped */ self.skipped = {}; // Y.on('yui:load', self.loadNext, self); self.tested = {}; /* * Cached sorted calculate results * @property results * @since 3.2.0 */ //self.results = {}; }; Y.Loader.prototype = { FILTER_DEFS: { RAW: { 'searchExp': '-min\\.js', 'replaceStr': '.js' }, DEBUG: { 'searchExp': '-min\\.js', 'replaceStr': '-debug.js' } }, /* * Check the pages meta-data and cache the result. * @method _inspectPage * @private */ _inspectPage: function() { oeach(ON_PAGE, function(v, k) { if (v.details) { var m = this.moduleInfo[k], req = v.details.requires, mr = m && m.requires; if (m) { if (!m._inspected && req && mr.length != req.length) { // console.log('deleting ' + m.name); // m.requres = YObject.keys(Y.merge(YArray.hash(req), YArray.hash(mr))); delete m.expanded; // delete m.expanded_map; } } else { m = this.addModule(v.details, k); } m._inspected = true; } }, this); }, /* * returns true if b is not loaded, and is required directly or by means of modules it supersedes. * @private * @method _requires * @param {String} mod1 The first module to compare * @param {String} mod2 The second module to compare */ _requires: function(mod1, mod2) { var i, rm, after_map, s, info = this.moduleInfo, m = info[mod1], other = info[mod2]; if (!m || !other) { return false; } rm = m.expanded_map; after_map = m.after_map; // check if this module should be sorted after the other // do this first to short circut circular deps if (after_map && (mod2 in after_map)) { return true; } after_map = other.after_map; // and vis-versa if (after_map && (mod1 in after_map)) { return false; } // check if this module requires one the other supersedes s = info[mod2] && info[mod2].supersedes; if (s) { for (i = 0; i < s.length; i++) { if (this._requires(mod1, s[i])) { return true; } } } s = info[mod1] && info[mod1].supersedes; if (s) { for (i = 0; i < s.length; i++) { if (this._requires(mod2, s[i])) { return false; } } } // check if this module requires the other directly // if (r && YArray.indexOf(r, mod2) > -1) { if (rm && (mod2 in rm)) { return true; } // external css files should be sorted below yui css if (m.ext && m.type == CSS && !other.ext && other.type == CSS) { return true; } return false; }, /** * Apply a new config to the Loader instance * @method _config * @param {Object} o The new configuration */ _config: function(o) { var i, j, val, f, group, groupName, self = this; // apply config values if (o) { for (i in o) { if (o.hasOwnProperty(i)) { val = o[i]; if (i == 'require') { self.require(val); } else if (i == 'skin') { Y.mix(self.skin, o[i], true); } else if (i == 'groups') { for (j in val) { if (val.hasOwnProperty(j)) { // Y.log('group: ' + j); groupName = j; group = val[j]; self.addGroup(group, groupName); } } } else if (i == 'modules') { // add a hash of module definitions oeach(val, self.addModule, self); } else if (i == 'gallery') { this.groups.gallery.update(val); } else if (i == 'yui2' || i == '2in3') { this.groups.yui2.update(o['2in3'], o.yui2); } else if (i == 'maxURLLength') { self[i] = Math.min(MAX_URL_LENGTH, val); } else { self[i] = val; } } } } // fix filter f = self.filter; if (L.isString(f)) { f = f.toUpperCase(); self.filterName = f; self.filter = self.FILTER_DEFS[f]; if (f == 'DEBUG') { self.require('yui-log', 'dump'); } } if (self.lang) { self.require('intl-base', 'intl'); } }, /** * Returns the skin module name for the specified skin name. If a * module name is supplied, the returned skin module name is * specific to the module passed in. * @method formatSkin * @param {string} skin the name of the skin. * @param {string} mod optional: the name of a module to skin. * @return {string} the full skin module name. */ formatSkin: function(skin, mod) { var s = SKIN_PREFIX + skin; if (mod) { s = s + '-' + mod; } return s; }, /** * Adds the skin def to the module info * @method _addSkin * @param {string} skin the name of the skin. * @param {string} mod the name of the module. * @param {string} parent parent module if this is a skin of a * submodule or plugin. * @return {string} the module name for the skin. * @private */ _addSkin: function(skin, mod, parent) { var mdef, pkg, name, nmod, info = this.moduleInfo, sinf = this.skin, ext = info[mod] && info[mod].ext; // Add a module definition for the module-specific skin css if (mod) { name = this.formatSkin(skin, mod); if (!info[name]) { mdef = info[mod]; pkg = mdef.pkg || mod; nmod = { name: name, group: mdef.group, type: 'css', after: sinf.after, path: (parent || pkg) + '/' + sinf.base + skin + '/' + mod + '.css', ext: ext }; if (mdef.base) { nmod.base = mdef.base; } if (mdef.configFn) { nmod.configFn = mdef.configFn; } this.addModule(nmod, name); Y.log('adding skin ' + name + ', ' + parent + ', ' + pkg + ', ' + info[name].path); } } return name; }, /** * Add a new module group * <dl> * <dt>name:</dt> <dd>required, the group name</dd> * <dt>base:</dt> <dd>The base dir for this module group</dd> * <dt>root:</dt> <dd>The root path to add to each combo * resource path</dd> * <dt>combine:</dt> <dd>combo handle</dd> * <dt>comboBase:</dt> <dd>combo service base path</dd> * <dt>modules:</dt> <dd>the group of modules</dd> * </dl> * @method addGroup * @param {object} o An object containing the module data. * @param {string} name the group name. */ addGroup: function(o, name) { var mods = o.modules, self = this; name = name || o.name; o.name = name; self.groups[name] = o; if (o.patterns) { oeach(o.patterns, function(v, k) { v.group = name; self.patterns[k] = v; }); } if (mods) { oeach(mods, function(v, k) { v.group = name; self.addModule(v, k); }, self); } }, /** * Add a new module to the component metadata. * <dl> * <dt>name:</dt> <dd>required, the component name</dd> * <dt>type:</dt> <dd>required, the component type (js or css) * </dd> * <dt>path:</dt> <dd>required, the path to the script from * "base"</dd> * <dt>requires:</dt> <dd>array of modules required by this * component</dd> * <dt>optional:</dt> <dd>array of optional modules for this * component</dd> * <dt>supersedes:</dt> <dd>array of the modules this component * replaces</dd> * <dt>after:</dt> <dd>array of modules the components which, if * present, should be sorted above this one</dd> * <dt>after_map:</dt> <dd>faster alternative to 'after' -- supply * a hash instead of an array</dd> * <dt>rollup:</dt> <dd>the number of superseded modules required * for automatic rollup</dd> * <dt>fullpath:</dt> <dd>If fullpath is specified, this is used * instead of the configured base + path</dd> * <dt>skinnable:</dt> <dd>flag to determine if skin assets should * automatically be pulled in</dd> * <dt>submodules:</dt> <dd>a hash of submodules</dd> * <dt>group:</dt> <dd>The group the module belongs to -- this * is set automatically when it is added as part of a group * configuration.</dd> * <dt>lang:</dt> * <dd>array of BCP 47 language tags of languages for which this * module has localized resource bundles, * e.g., ["en-GB","zh-Hans-CN"]</dd> * <dt>condition:</dt> * <dd>Specifies that the module should be loaded automatically if * a condition is met. This is an object with up to three fields: * [trigger] - the name of a module that can trigger the auto-load * [test] - a function that returns true when the module is to be * loaded. * [when] - specifies the load order of the conditional module * with regard to the position of the trigger module. * This should be one of three values: 'before', 'after', or * 'instead'. The default is 'after'. * </dd> * <dt>testresults:</dt><dd>a hash of test results from Y.Features.all()</dd> * </dl> * @method addModule * @param {object} o An object containing the module data. * @param {string} name the module name (optional), required if not * in the module data. * @return {object} the module definition or null if * the object passed in did not provide all required attributes. */ addModule: function(o, name) { name = name || o.name; //Only merge this data if the temp flag is set //from an earlier pass from a pattern or else //an override module (YUI_config) can not be used to //replace a default module. if (this.moduleInfo[name] && this.moduleInfo[name].temp) { //This catches temp modules loaded via a pattern // The module will be added twice, once from the pattern and // Once from the actual add call, this ensures that properties // that were added to the module the first time around (group: gallery) // are also added the second time around too. o = Y.merge(this.moduleInfo[name], o); } o.name = name; if (!o || !o.name) { return null; } if (!o.type) { o.type = JS; } if (!o.path && !o.fullpath) { o.path = _path(name, name, o.type); } o.supersedes = o.supersedes || o.use; o.ext = ('ext' in o) ? o.ext : (this._internal) ? false : true; o.requires = this.filterRequires(o.requires) || []; // Handle submodule logic var subs = o.submodules, i, l, t, sup, s, smod, plugins, plug, j, langs, packName, supName, flatSup, flatLang, lang, ret, overrides, skinname, when, conditions = this.conditions, trigger; // , existing = this.moduleInfo[name], newr; this.moduleInfo[name] = o; if (!o.langPack && o.lang) { langs = YArray(o.lang); for (j = 0; j < langs.length; j++) { lang = langs[j]; packName = this.getLangPackName(lang, name); smod = this.moduleInfo[packName]; if (!smod) { smod = this._addLangPack(lang, o, packName); } } } if (subs) { sup = o.supersedes || []; l = 0; for (i in subs) { if (subs.hasOwnProperty(i)) { s = subs[i]; s.path = s.path || _path(name, i, o.type); s.pkg = name; s.group = o.group; if (s.supersedes) { sup = sup.concat(s.supersedes); } smod = this.addModule(s, i); sup.push(i); if (smod.skinnable) { o.skinnable = true; overrides = this.skin.overrides; if (overrides && overrides[i]) { for (j = 0; j < overrides[i].length; j++) { skinname = this._addSkin(overrides[i][j], i, name); sup.push(skinname); } } skinname = this._addSkin(this.skin.defaultSkin, i, name); sup.push(skinname); } // looks like we are expected to work out the metadata // for the parent module language packs from what is // specified in the child modules. if (s.lang && s.lang.length) { langs = YArray(s.lang); for (j = 0; j < langs.length; j++) { lang = langs[j]; packName = this.getLangPackName(lang, name); supName = this.getLangPackName(lang, i); smod = this.moduleInfo[packName]; if (!smod) { smod = this._addLangPack(lang, o, packName); } flatSup = flatSup || YArray.hash(smod.supersedes); if (!(supName in flatSup)) { smod.supersedes.push(supName); } o.lang = o.lang || []; flatLang = flatLang || YArray.hash(o.lang); if (!(lang in flatLang)) { o.lang.push(lang); } // Y.log('pack ' + packName + ' should supersede ' + supName); // Add rollup file, need to add to supersedes list too // default packages packName = this.getLangPackName(ROOT_LANG, name); supName = this.getLangPackName(ROOT_LANG, i); smod = this.moduleInfo[packName]; if (!smod) { smod = this._addLangPack(lang, o, packName); } if (!(supName in flatSup)) { smod.supersedes.push(supName); } // Y.log('pack ' + packName + ' should supersede ' + supName); // Add rollup file, need to add to supersedes list too } } l++; } } //o.supersedes = YObject.keys(YArray.hash(sup)); o.supersedes = YArray.dedupe(sup); if (this.allowRollup) { o.rollup = (l < 4) ? l : Math.min(l - 1, 4); } } plugins = o.plugins; if (plugins) { for (i in plugins) { if (plugins.hasOwnProperty(i)) { plug = plugins[i]; plug.pkg = name; plug.path = plug.path || _path(name, i, o.type); plug.requires = plug.requires || []; plug.group = o.group; this.addModule(plug, i); if (o.skinnable) { this._addSkin(this.skin.defaultSkin, i, name); } } } } if (o.condition) { t = o.condition.trigger; if (YUI.Env.aliases[t]) { t = YUI.Env.aliases[t]; } if (!Y.Lang.isArray(t)) { t = [t]; } for (i = 0; i < t.length; i++) { trigger = t[i]; when = o.condition.when; conditions[trigger] = conditions[trigger] || {}; conditions[trigger][name] = o.condition; // the 'when' attribute can be 'before', 'after', or 'instead' // the default is after. if (when && when != 'after') { if (when == 'instead') { // replace the trigger o.supersedes = o.supersedes || []; o.supersedes.push(trigger); } else { // before the trigger // the trigger requires the conditional mod, // so it should appear before the conditional // mod if we do not intersede. } } else { // after the trigger o.after = o.after || []; o.after.push(trigger); } } } if (o.after) { o.after_map = YArray.hash(o.after); } // this.dirty = true; if (o.configFn) { ret = o.configFn(o); if (ret === false) { delete this.moduleInfo[name]; o = null; } } return o; }, /** * Add a requirement for one or more module * @method require * @param {string[] | string*} what the modules to load. */ require: function(what) { var a = (typeof what === 'string') ? YArray(arguments) : what; this.dirty = true; this.required = Y.merge(this.required, YArray.hash(this.filterRequires(a))); this._explodeRollups(); }, /** * Grab all the items that were asked for, check to see if the Loader * meta-data contains a "use" array. If it doesm remove the asked item and replace it with * the content of the "use". * This will make asking for: "dd" * Actually ask for: "dd-ddm-base,dd-ddm,dd-ddm-drop,dd-drag,dd-proxy,dd-constrain,dd-drop,dd-scroll,dd-drop-plugin" * @private * @method _explodeRollups */ _explodeRollups: function() { var self = this, m, r = self.required; if (!self.allowRollup) { oeach(r, function(v, name) { m = self.getModule(name); if (m && m.use) { //delete r[name]; YArray.each(m.use, function(v) { m = self.getModule(v); if (m && m.use) { //delete r[v]; YArray.each(m.use, function(v) { r[v] = true; }); } else { r[v] = true; } }); } }); self.required = r; } }, /** * Explodes the required array to remove aliases and replace them with real modules * @method filterRequires * @param {Array} r The original requires array * @return {Array} The new array of exploded requirements */ filterRequires: function(r) { if (r) { if (!Y.Lang.isArray(r)) { r = [r]; } r = Y.Array(r); var c = [], i, mod, o, m; for (i = 0; i < r.length; i++) { mod = this.getModule(r[i]); if (mod && mod.use) { for (o = 0; o < mod.use.length; o++) { //Must walk the other modules in case a module is a rollup of rollups (datatype) m = this.getModule(mod.use[o]); if (m && m.use) { c = Y.Array.dedupe([].concat(c, this.filterRequires(m.use))); } else { c.push(mod.use[o]); } } } else { c.push(r[i]); } } r = c; } return r; }, /** * Returns an object containing properties for all modules required * in order to load the requested module * @method getRequires * @param {object} mod The module definition from moduleInfo. * @return {array} the expanded requirement list. */ getRequires: function(mod) { if (!mod || mod._parsed) { // Y.log('returning no reqs for ' + mod.name); return NO_REQUIREMENTS; } var i, m, j, add, packName, lang, testresults = this.testresults, name = mod.name, cond, go, adddef = ON_PAGE[name] && ON_PAGE[name].details, d, k, m1, r, old_mod, o, skinmod, skindef, skinpar, skinname, intl = mod.lang || mod.intl, info = this.moduleInfo, ftests = Y.Features && Y.Features.tests.load, hash; // console.log(name); // pattern match leaves module stub that needs to be filled out if (mod.temp && adddef) { old_mod = mod; mod = this.addModule(adddef, name); mod.group = old_mod.group; mod.pkg = old_mod.pkg; delete mod.expanded; } // console.log('cache: ' + mod.langCache + ' == ' + this.lang); // if (mod.expanded && (!mod.langCache || mod.langCache == this.lang)) { if (mod.expanded && (!this.lang || mod.langCache === this.lang)) { //Y.log('Already expanded ' + name + ', ' + mod.expanded); return mod.expanded; } d = []; hash = {}; r = this.filterRequires(mod.requires); if (mod.lang) { //If a module has a lang attribute, auto add the intl requirement. d.unshift('intl'); r.unshift('intl'); intl = true; } o = this.filterRequires(mod.optional); // Y.log("getRequires: " + name + " (dirty:" + this.dirty + // ", expanded:" + mod.expanded + ")"); mod._parsed = true; mod.langCache = this.lang; for (i = 0; i < r.length; i++) { //Y.log(name + ' requiring ' + r[i], 'info', 'loader'); if (!hash[r[i]]) { d.push(r[i]); hash[r[i]] = true; m = this.getModule(r[i]); if (m) { add = this.getRequires(m); intl = intl || (m.expanded_map && (INTL in m.expanded_map)); for (j = 0; j < add.length; j++) { d.push(add[j]); } } } } // get the requirements from superseded modules, if any r = this.filterRequires(mod.supersedes); if (r) { for (i = 0; i < r.length; i++) { if (!hash[r[i]]) { // if this module has submodules, the requirements list is // expanded to include the submodules. This is so we can // prevent dups when a submodule is already loaded and the // parent is requested. if (mod.submodules) { d.push(r[i]); } hash[r[i]] = true; m = this.getModule(r[i]); if (m) { add = this.getRequires(m); intl = intl || (m.expanded_map && (INTL in m.expanded_map)); for (j = 0; j < add.length; j++) { d.push(add[j]); } } } } } if (o && this.loadOptional) { for (i = 0; i < o.length; i++) { if (!hash[o[i]]) { d.push(o[i]); hash[o[i]] = true; m = info[o[i]]; if (m) { add = this.getRequires(m); intl = intl || (m.expanded_map && (INTL in m.expanded_map)); for (j = 0; j < add.length; j++) { d.push(add[j]); } } } } } cond = this.conditions[name]; if (cond) { if (testresults && ftests) { oeach(testresults, function(result, id) { var condmod = ftests[id].name; if (!hash[condmod] && ftests[id].trigger == name) { if (result && ftests[id]) { hash[condmod] = true; d.push(condmod); } } }); } else { oeach(cond, function(def, condmod) { if (!hash[condmod]) { go = def && ((def.ua && Y.UA[def.ua]) || (def.test && def.test(Y, r))); if (go) { hash[condmod] = true; d.push(condmod); m = this.getModule(condmod); // Y.log('conditional', m); if (m) { add = this.getRequires(m); for (j = 0; j < add.length; j++) { d.push(add[j]); } } } } }, this); } } // Create skin modules if (mod.skinnable) { skindef = this.skin.overrides; oeach(YUI.Env.aliases, function(o, n) { if (Y.Array.indexOf(o, name) > -1) { skinpar = n; } }); if (skindef && (skindef[name] || (skinpar && skindef[skinpar]))) { skinname = name; if (skindef[skinpar]) { skinname = skinpar; } for (i = 0; i < skindef[skinname].length; i++) { skinmod = this._addSkin(skindef[skinname][i], name); d.push(skinmod); } } else { skinmod = this._addSkin(this.skin.defaultSkin, name); d.push(skinmod); } } mod._parsed = false; if (intl) { if (mod.lang && !mod.langPack && Y.Intl) { lang = Y.Intl.lookupBestLang(this.lang || ROOT_LANG, mod.lang); //Y.log('Best lang: ' + lang + ', this.lang: ' + this.lang + ', mod.lang: ' + mod.lang); packName = this.getLangPackName(lang, name); if (packName) { d.unshift(packName); } } d.unshift(INTL); } mod.expanded_map = YArray.hash(d); mod.expanded = YObject.keys(mod.expanded_map); return mod.expanded; }, /** * Returns a hash of module names the supplied module satisfies. * @method getProvides * @param {string} name The name of the module. * @return {object} what this module provides. */ getProvides: function(name) { var m = this.getModule(name), o, s; // supmap = this.provides; if (!m) { return NOT_FOUND; } if (m && !m.provides) { o = {}; s = m.supersedes; if (s) { YArray.each(s, function(v) { Y.mix(o, this.getProvides(v)); }, this); } o[name] = true; m.provides = o; } return m.provides; }, /** * Calculates the dependency tree, the result is stored in the sorted * property. * @method calculate * @param {object} o optional options object. * @param {string} type optional argument to prune modules. */ calculate: function(o, type) { if (o || type || this.dirty) { if (o) { this._config(o); } if (!this._init) { this._setup(); } this._explode(); if (this.allowRollup) { this._rollup(); } else { this._explodeRollups(); } this._reduce(); this._sort(); } }, /** * Creates a "psuedo" package for languages provided in the lang array * @method _addLangPack * @param {String} lang The language to create * @param {Object} m The module definition to create the language pack around * @param {String} packName The name of the package (e.g: lang/datatype-date-en-US) * @return {Object} The module definition */ _addLangPack: function(lang, m, packName) { var name = m.name, packPath, existing = this.moduleInfo[packName]; if (!existing) { packPath = _path((m.pkg || name), packName, JS, true); this.addModule({ path: packPath, intl: true, langPack: true, ext: m.ext, group: m.group, supersedes: [] }, packName); if (lang) { Y.Env.lang = Y.Env.lang || {}; Y.Env.lang[lang] = Y.Env.lang[lang] || {}; Y.Env.lang[lang][name] = true; } } return this.moduleInfo[packName]; }, /** * Investigates the current YUI configuration on the page. By default, * modules already detected will not be loaded again unless a force * option is encountered. Called by calculate() * @method _setup * @private */ _setup: function() { var info = this.moduleInfo, name, i, j, m, l, packName; for (name in info) { if (info.hasOwnProperty(name)) { m = info[name]; if (m) { // remove dups //m.requires = YObject.keys(YArray.hash(m.requires)); m.requires = YArray.dedupe(m.requires); // Create lang pack modules if (m.lang && m.lang.length) { // Setup root package if the module has lang defined, // it needs to provide a root language pack packName = this.getLangPackName(ROOT_LANG, name); this._addLangPack(null, m, packName); } } } } //l = Y.merge(this.inserted); l = {}; // available modules if (!this.ignoreRegistered) { Y.mix(l, GLOBAL_ENV.mods); } // add the ignore list to the list of loaded packages if (this.ignore) { Y.mix(l, YArray.hash(this.ignore)); } // expand the list to include superseded modules for (j in l) { if (l.hasOwnProperty(j)) { Y.mix(l, this.getProvides(j)); } } // remove modules on the force list from the loaded list if (this.force) { for (i = 0; i < this.force.length; i++) { if (this.force[i] in l) { delete l[this.force[i]]; } } } Y.mix(this.loaded, l); this._init = true; }, /** * Builds a module name for a language pack * @method getLangPackName * @param {string} lang the language code. * @param {string} mname the module to build it for. * @return {string} the language pack module name. */ getLangPackName: function(lang, mname) { return ('lang/' + mname + ((lang) ? '_' + lang : '')); }, /** * Inspects the required modules list looking for additional * dependencies. Expands the required list to include all * required modules. Called by calculate() * @method _explode * @private */ _explode: function() { var r = this.required, m, reqs, done = {}, self = this; // the setup phase is over, all modules have been created self.dirty = false; self._explodeRollups(); r = self.required; oeach(r, function(v, name) { if (!done[name]) { done[name] = true; m = self.getModule(name); if (m) { var expound = m.expound; if (expound) { r[expound] = self.getModule(expound); reqs = self.getRequires(r[expound]); Y.mix(r, YArray.hash(reqs)); } reqs = self.getRequires(m); Y.mix(r, YArray.hash(reqs)); } } }); // Y.log('After explode: ' + YObject.keys(r)); }, /** * Get's the loader meta data for the requested module * @method getModule * @param {String} mname The module name to get * @return {Object} The module metadata */ getModule: function(mname) { //TODO: Remove name check - it's a quick hack to fix pattern WIP if (!mname) { return null; } var p, found, pname, m = this.moduleInfo[mname], patterns = this.patterns; // check the patterns library to see if we should automatically add // the module with defaults if (!m) { // Y.log('testing patterns ' + YObject.keys(patterns)); for (pname in patterns) { if (patterns.hasOwnProperty(pname)) { // Y.log('testing pattern ' + i); p = patterns[pname]; // use the metadata supplied for the pattern // as the module definition. if (mname.indexOf(pname) > -1) { found = p; break; } } } if (found) { if (p.action) { // Y.log('executing pattern action: ' + pname); p.action.call(this, mname, pname); } else { Y.log('Undefined module: ' + mname + ', matched a pattern: ' + pname, 'info', 'loader'); // ext true or false? m = this.addModule(Y.merge(found), mname); m.temp = true; } } } return m; }, // impl in rollup submodule _rollup: function() { }, /** * Remove superceded modules and loaded modules. Called by * calculate() after we have the mega list of all dependencies * @method _reduce * @return {object} the reduced dependency hash. * @private */ _reduce: function(r) { r = r || this.required; var i, j, s, m, type = this.loadType, ignore = this.ignore ? YArray.hash(this.ignore) : false; for (i in r) { if (r.hasOwnProperty(i)) { m = this.getModule(i); // remove if already loaded if (((this.loaded[i] || ON_PAGE[i]) && !this.forceMap[i] && !this.ignoreRegistered) || (type && m && m.type != type)) { delete r[i]; } if (ignore && ignore[i]) { delete r[i]; } // remove anything this module supersedes s = m && m.supersedes; if (s) { for (j = 0; j < s.length; j++) { if (s[j] in r) { delete r[s[j]]; } } } } } return r; }, /** * Handles the queue when a module has been loaded for all cases * @method _finish * @private * @param {String} msg The message from Loader * @param {Boolean} success A boolean denoting success or failure */ _finish: function(msg, success) { Y.log('loader finishing: ' + msg + ', ' + Y.id + ', ' + this.data, 'info', 'loader'); _queue.running = false; var onEnd = this.onEnd; if (onEnd) { onEnd.call(this.context, { msg: msg, data: this.data, success: success }); } this._continue(); }, /** * The default Loader onSuccess handler, calls this.onSuccess with a payload * @method _onSuccess * @private */ _onSuccess: function() { var self = this, skipped = Y.merge(self.skipped), fn, failed = [], rreg = self.requireRegistration, success, msg; oeach(skipped, function(k) { delete self.inserted[k]; }); self.skipped = {}; oeach(self.inserted, function(v, k) { var mod = self.getModule(k); if (mod && rreg && mod.type == JS && !(k in YUI.Env.mods)) { failed.push(k); } else { Y.mix(self.loaded, self.getProvides(k)); } }); fn = self.onSuccess; msg = (failed.length) ? 'notregistered' : 'success'; success = !(failed.length); if (fn) { fn.call(self.context, { msg: msg, data: self.data, success: success, failed: failed, skipped: skipped }); } self._finish(msg, success); }, /** * The default Loader onFailure handler, calls this.onFailure with a payload * @method _onFailure * @private */ _onFailure: function(o) { Y.log('load error: ' + o.msg + ', ' + Y.id, 'error', 'loader'); var f = this.onFailure, msg = 'failure: ' + o.msg; if (f) { f.call(this.context, { msg: msg, data: this.data, success: false }); } this._finish(msg, false); }, /** * The default Loader onTimeout handler, calls this.onTimeout with a payload * @method _onTimeout * @private */ _onTimeout: function() { Y.log('loader timeout: ' + Y.id, 'error', 'loader'); var f = this.onTimeout; if (f) { f.call(this.context, { msg: 'timeout', data: this.data, success: false }); } this._finish('timeout', false); }, /** * Sorts the dependency tree. The last step of calculate() * @method _sort * @private */ _sort: function() { // create an indexed list var s = YObject.keys(this.required), // loaded = this.loaded, done = {}, p = 0, l, a, b, j, k, moved, doneKey; // keep going until we make a pass without moving anything for (;;) { l = s.length; moved = false; // start the loop after items that are already sorted for (j = p; j < l; j++) { // check the next module on the list to see if its // dependencies have been met a = s[j]; // check everything below current item and move if we // find a requirement for the current item for (k = j + 1; k < l; k++) { doneKey = a + s[k]; if (!done[doneKey] && this._requires(a, s[k])) { // extract the dependency so we can move it up b = s.splice(k, 1); // insert the dependency above the item that // requires it s.splice(j, 0, b[0]); // only swap two dependencies once to short circut // circular dependencies done[doneKey] = true; // keep working moved = true; break; } } // jump out of loop if we moved something if (moved) { break; // this item is sorted, move our pointer and keep going } else { p++; } } // when we make it here and moved is false, we are // finished sorting if (!moved) { break; } } this.sorted = s; }, /** * (Unimplemented) * @method partial * @unimplemented */ partial: function(partial, o, type) { this.sorted = partial; this.insert(o, type, true); }, /** * Handles the actual insertion of script/link tags * @method _insert * @param {Object} source The YUI instance the request came from * @param {Object} o The metadata to include * @param {String} type JS or CSS * @param {Boolean} [skipcalc=false] Do a Loader.calculate on the meta */ _insert: function(source, o, type, skipcalc) { // Y.log('private _insert() ' + (type || '') + ', ' + Y.id, "info", "loader"); // restore the state at the time of the request if (source) { this._config(source); } // build the dependency list // don't include type so we can process CSS and script in // one pass when the type is not specified. if (!skipcalc) { this.calculate(o); } this.loadType = type; if (!type) { var self = this; // Y.log("trying to load css first"); this._internalCallback = function() { var f = self.onCSS, n, p, sib; // IE hack for style overrides that are not being applied if (this.insertBefore && Y.UA.ie) { n = Y.config.doc.getElementById(this.insertBefore); p = n.parentNode; sib = n.nextSibling; p.removeChild(n); if (sib) { p.insertBefore(n, sib); } else { p.appendChild(n); } } if (f) { f.call(self.context, Y); } self._internalCallback = null; self._insert(null, null, JS); }; this._insert(null, null, CSS); return; } // set a flag to indicate the load has started this._loading = true; // flag to indicate we are done with the combo service // and any additional files will need to be loaded // individually this._combineComplete = {}; // start the load this.loadNext(); }, /** * Once a loader operation is completely finished, process any additional queued items. * @method _continue * @private */ _continue: function() { if (!(_queue.running) && _queue.size() > 0) { _queue.running = true; _queue.next()(); } }, /** * inserts the requested modules and their dependencies. * <code>type</code> can be "js" or "css". Both script and * css are inserted if type is not provided. * @method insert * @param {object} o optional options object. * @param {string} type the type of dependency to insert. */ insert: function(o, type, skipsort) { // Y.log('public insert() ' + (type || '') + ', ' + // Y.Object.keys(this.required), "info", "loader"); var self = this, copy = Y.merge(this); delete copy.require; delete copy.dirty; _queue.add(function() { self._insert(copy, o, type, skipsort); }); this._continue(); }, /** * Executed every time a module is loaded, and if we are in a load * cycle, we attempt to load the next script. Public so that it * is possible to call this if using a method other than * Y.register to determine when scripts are fully loaded * @method loadNext * @param {string} mname optional the name of the module that has * been loaded (which is usually why it is time to load the next * one). */ loadNext: function(mname) { // It is possible that this function is executed due to something // else on the page loading a YUI module. Only react when we // are actively loading something if (!this._loading) { return; } var s, len, i, m, url, fn, msg, attr, group, groupName, j, frag, comboSource, comboSources, mods, combining, urls, comboBase, self = this, type = self.loadType, handleSuccess = function(o) { self.loadNext(o.data); }, handleCombo = function(o) { self._combineComplete[type] = true; var i, len = combining.length; for (i = 0; i < len; i++) { self.inserted[combining[i]] = true; } handleSuccess(o); }; if (self.combine && (!self._combineComplete[type])) { combining = []; self._combining = combining; s = self.sorted; len = s.length; // the default combo base comboBase = self.comboBase; url = comboBase; urls = []; comboSources = {}; for (i = 0; i < len; i++) { comboSource = comboBase; m = self.getModule(s[i]); groupName = m && m.group; if (groupName) { group = self.groups[groupName]; if (!group.combine) { m.combine = false; continue; } m.combine = true; if (group.comboBase) { comboSource = group.comboBase; } if ("root" in group && L.isValue(group.root)) { m.root = group.root; } } comboSources[comboSource] = comboSources[comboSource] || []; comboSources[comboSource].push(m); } for (j in comboSources) { if (comboSources.hasOwnProperty(j)) { url = j; mods = comboSources[j]; len = mods.length; for (i = 0; i < len; i++) { // m = self.getModule(s[i]); m = mods[i]; // Do not try to combine non-yui JS unless combo def // is found if (m && (m.type === type) && (m.combine || !m.ext)) { frag = ((L.isValue(m.root)) ? m.root : self.root) + m.path; frag = self._filter(frag, m.name); if ((url !== j) && (i <= (len - 1)) && ((frag.length + url.length) > self.maxURLLength)) { //Hack until this is rewritten to use an array and not string concat: if (url.substr(url.length - 1, 1) === self.comboSep) { url = url.substr(0, (url.length - 1)); } urls.push(self._filter(url)); url = j; } url += frag; if (i < (len - 1)) { url += self.comboSep; } combining.push(m.name); } } if (combining.length && (url != j)) { //Hack until this is rewritten to use an array and not string concat: if (url.substr(url.length - 1, 1) === self.comboSep) { url = url.substr(0, (url.length - 1)); } urls.push(self._filter(url)); } } } if (combining.length) { Y.log('Attempting to use combo: ' + combining, 'info', 'loader'); // if (m.type === CSS) { if (type === CSS) { fn = Y.Get.css; attr = self.cssAttributes; } else { fn = Y.Get.script; attr = self.jsAttributes; } fn(urls, { data: self._loading, onSuccess: handleCombo, onFailure: self._onFailure, onTimeout: self._onTimeout, insertBefore: self.insertBefore, charset: self.charset, attributes: attr, timeout: self.timeout, autopurge: false, context: self }); return; } else { self._combineComplete[type] = true; } } if (mname) { // if the module that was just loaded isn't what we were expecting, // continue to wait if (mname !== self._loading) { return; } // Y.log("loadNext executing, just loaded " + mname + ", " + // Y.id, "info", "loader"); // The global handler that is called when each module is loaded // will pass that module name to this function. Storing this // data to avoid loading the same module multiple times // centralize this in the callback self.inserted[mname] = true; // self.loaded[mname] = true; // provided = self.getProvides(mname); // Y.mix(self.loaded, provided); // Y.mix(self.inserted, provided); if (self.onProgress) { self.onProgress.call(self.context, { name: mname, data: self.data }); } } s = self.sorted; len = s.length; for (i = 0; i < len; i = i + 1) { // this.inserted keeps track of what the loader has loaded. // move on if this item is done. if (s[i] in self.inserted) { continue; } // Because rollups will cause multiple load notifications // from Y, loadNext may be called multiple times for // the same module when loading a rollup. We can safely // skip the subsequent requests if (s[i] === self._loading) { Y.log('still loading ' + s[i] + ', waiting', 'info', 'loader'); return; } // log("inserting " + s[i]); m = self.getModule(s[i]); if (!m) { if (!self.skipped[s[i]]) { msg = 'Undefined module ' + s[i] + ' skipped'; Y.log(msg, 'warn', 'loader'); // self.inserted[s[i]] = true; self.skipped[s[i]] = true; } continue; } group = (m.group && self.groups[m.group]) || NOT_FOUND; // The load type is stored to offer the possibility to load // the css separately from the script. if (!type || type === m.type) { self._loading = s[i]; Y.log('attempting to load ' + s[i] + ', ' + self.base, 'info', 'loader'); if (m.type === CSS) { fn = Y.Get.css; attr = self.cssAttributes; } else { fn = Y.Get.script; attr = self.jsAttributes; } url = (m.fullpath) ? self._filter(m.fullpath, s[i]) : self._url(m.path, s[i], group.base || m.base); fn(url, { data: s[i], onSuccess: handleSuccess, insertBefore: self.insertBefore, charset: self.charset, attributes: attr, onFailure: self._onFailure, onTimeout: self._onTimeout, timeout: self.timeout, autopurge: false, context: self }); return; } } // we are finished self._loading = null; fn = self._internalCallback; // internal callback for loading css first if (fn) { // Y.log('loader internal'); self._internalCallback = null; fn.call(self); } else { // Y.log('loader complete'); self._onSuccess(); } }, /** * Apply filter defined for this instance to a url/path * @method _filter * @param {string} u the string to filter. * @param {string} name the name of the module, if we are processing * a single module as opposed to a combined url. * @return {string} the filtered string. * @private */ _filter: function(u, name) { var f = this.filter, hasFilter = name && (name in this.filters), modFilter = hasFilter && this.filters[name], groupName = this.moduleInfo[name] ? this.moduleInfo[name].group:null; if (groupName && this.groups[groupName].filter) { modFilter = this.groups[groupName].filter; hasFilter = true; }; if (u) { if (hasFilter) { f = (L.isString(modFilter)) ? this.FILTER_DEFS[modFilter.toUpperCase()] || null : modFilter; } if (f) { u = u.replace(new RegExp(f.searchExp, 'g'), f.replaceStr); } } return u; }, /** * Generates the full url for a module * @method _url * @param {string} path the path fragment. * @param {String} name The name of the module * @pamra {String} [base=self.base] The base url to use * @return {string} the full url. * @private */ _url: function(path, name, base) { return this._filter((base || this.base || '') + path, name); }, /** * Returns an Object hash of file arrays built from `loader.sorted` or from an arbitrary list of sorted modules. * @method resolve * @param {Boolean} [calc=false] Perform a loader.calculate() before anything else * @param {Array} [s=loader.sorted] An override for the loader.sorted array * @return {Object} Object hash (js and css) of two arrays of file lists * @example This method can be used as an off-line dep calculator * * var Y = YUI(); * var loader = new Y.Loader({ * filter: 'debug', * base: '../../', * root: 'build/', * combine: true, * require: ['node', 'dd', 'console'] * }); * var out = loader.resolve(true); * */ resolve: function(calc, s) { var self = this, i, m, url, out = { js: [], css: [] }; if (calc) { self.calculate(); } s = s || self.sorted; for (i = 0; i < s.length; i++) { m = self.getModule(s[i]); if (m) { if (self.combine) { url = self._filter((self.root + m.path), m.name, self.root); } else { url = self._filter(m.fullpath, m.name, '') || self._url(m.path, m.name); } out[m.type].push(url); } } if (self.combine) { out.js = [self.comboBase + out.js.join(self.comboSep)]; out.css = [self.comboBase + out.css.join(self.comboSep)]; } return out; }, /** * Returns an Object hash of hashes built from `loader.sorted` or from an arbitrary list of sorted modules. * @method hash * @private * @param {Boolean} [calc=false] Perform a loader.calculate() before anything else * @param {Array} [s=loader.sorted] An override for the loader.sorted array * @return {Object} Object hash (js and css) of two object hashes of file lists, with the module name as the key * @example This method can be used as an off-line dep calculator * * var Y = YUI(); * var loader = new Y.Loader({ * filter: 'debug', * base: '../../', * root: 'build/', * combine: true, * require: ['node', 'dd', 'console'] * }); * var out = loader.hash(true); * */ hash: function(calc, s) { var self = this, i, m, url, out = { js: {}, css: {} }; if (calc) { self.calculate(); } s = s || self.sorted; for (i = 0; i < s.length; i++) { m = self.getModule(s[i]); if (m) { url = self._filter(m.fullpath, m.name, '') || self._url(m.path, m.name); out[m.type][m.name] = url; } } return out; } }; }, '@VERSION@' ,{requires:['get']}); YUI.add('loader-rollup', function(Y) { /** * Optional automatic rollup logic for reducing http connections * when not using a combo service. * @module loader * @submodule rollup */ /** * Look for rollup packages to determine if all of the modules a * rollup supersedes are required. If so, include the rollup to * help reduce the total number of connections required. Called * by calculate(). This is an optional feature, and requires the * appropriate submodule to function. * @method _rollup * @for Loader * @private */ Y.Loader.prototype._rollup = function() { var i, j, m, s, r = this.required, roll, info = this.moduleInfo, rolled, c, smod; // find and cache rollup modules if (this.dirty || !this.rollups) { this.rollups = {}; for (i in info) { if (info.hasOwnProperty(i)) { m = this.getModule(i); // if (m && m.rollup && m.supersedes) { if (m && m.rollup) { this.rollups[i] = m; } } } this.forceMap = (this.force) ? Y.Array.hash(this.force) : {}; } // make as many passes as needed to pick up rollup rollups for (;;) { rolled = false; // go through the rollup candidates for (i in this.rollups) { if (this.rollups.hasOwnProperty(i)) { // there can be only one, unless forced if (!r[i] && ((!this.loaded[i]) || this.forceMap[i])) { m = this.getModule(i); s = m.supersedes || []; roll = false; // @TODO remove continue if (!m.rollup) { continue; } c = 0; // check the threshold for (j = 0; j < s.length; j++) { smod = info[s[j]]; // if the superseded module is loaded, we can't // load the rollup unless it has been forced. if (this.loaded[s[j]] && !this.forceMap[s[j]]) { roll = false; break; // increment the counter if this module is required. // if we are beyond the rollup threshold, we will // use the rollup module } else if (r[s[j]] && m.type == smod.type) { c++; // Y.log("adding to thresh: " + c + ", " + s[j]); roll = (c >= m.rollup); if (roll) { // Y.log("over thresh " + c + ", " + s[j]); break; } } } if (roll) { // Y.log("adding rollup: " + i); // add the rollup r[i] = true; rolled = true; // expand the rollup's dependencies this.getRequires(m); } } } } // if we made it here w/o rolling up something, we are done if (!rolled) { break; } } }; }, '@VERSION@' ,{requires:['loader-base']}); YUI.add('loader-yui3', function(Y) { /* This file is auto-generated by src/loader/scripts/meta_join.py */ /** * YUI 3 module metadata * @module loader * @submodule yui3 */ YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || { "align-plugin": { "requires": [ "node-screen", "node-pluginhost" ] }, "anim": { "use": [ "anim-base", "anim-color", "anim-curve", "anim-easing", "anim-node-plugin", "anim-scroll", "anim-xy" ] }, "anim-base": { "requires": [ "base-base", "node-style" ] }, "anim-color": { "requires": [ "anim-base" ] }, "anim-curve": { "requires": [ "anim-xy" ] }, "anim-easing": { "requires": [ "anim-base" ] }, "anim-node-plugin": { "requires": [ "node-pluginhost", "anim-base" ] }, "anim-scroll": { "requires": [ "anim-base" ] }, "anim-xy": { "requires": [ "anim-base", "node-screen" ] }, "app": { "use": [ "controller", "model", "model-list", "view" ] }, "array-extras": { "requires": [ "yui-base" ] }, "array-invoke": { "requires": [ "yui-base" ] }, "arraylist": { "requires": [ "yui-base" ] }, "arraylist-add": { "requires": [ "arraylist" ] }, "arraylist-filter": { "requires": [ "arraylist" ] }, "arraysort": { "requires": [ "yui-base" ] }, "async-queue": { "requires": [ "event-custom" ] }, "attribute": { "use": [ "attribute-base", "attribute-complex" ] }, "attribute-base": { "requires": [ "event-custom" ] }, "attribute-complex": { "requires": [ "attribute-base" ] }, "autocomplete": { "use": [ "autocomplete-base", "autocomplete-sources", "autocomplete-list", "autocomplete-plugin" ] }, "autocomplete-base": { "optional": [ "autocomplete-sources" ], "requires": [ "array-extras", "base-build", "escape", "event-valuechange", "node-base" ] }, "autocomplete-filters": { "requires": [ "array-extras", "text-wordbreak" ] }, "autocomplete-filters-accentfold": { "requires": [ "array-extras", "text-accentfold", "text-wordbreak" ] }, "autocomplete-highlighters": { "requires": [ "array-extras", "highlight-base" ] }, "autocomplete-highlighters-accentfold": { "requires": [ "array-extras", "highlight-accentfold" ] }, "autocomplete-list": { "after": [ "autocomplete-sources" ], "lang": [ "en" ], "requires": [ "autocomplete-base", "event-resize", "node-screen", "selector-css3", "shim-plugin", "widget", "widget-position", "widget-position-align" ], "skinnable": true }, "autocomplete-list-keys": { "condition": { "name": "autocomplete-list-keys", "test": function (Y) { // Only add keyboard support to autocomplete-list if this doesn't appear to // be an iOS or Android-based mobile device. // // There's currently no feasible way to actually detect whether a device has // a hardware keyboard, so this sniff will have to do. It can easily be // overridden by manually loading the autocomplete-list-keys module. // // Worth noting: even though iOS supports bluetooth keyboards, Mobile Safari // doesn't fire the keyboard events used by AutoCompleteList, so there's // no point loading the -keys module even when a bluetooth keyboard may be // available. return !(Y.UA.ios || Y.UA.android); }, "trigger": "autocomplete-list" }, "requires": [ "autocomplete-list", "base-build" ] }, "autocomplete-plugin": { "requires": [ "autocomplete-list", "node-pluginhost" ] }, "autocomplete-sources": { "optional": [ "io-base", "json-parse", "jsonp", "yql" ], "requires": [ "autocomplete-base" ] }, "base": { "use": [ "base-base", "base-pluginhost", "base-build" ] }, "base-base": { "after": [ "attribute-complex" ], "requires": [ "attribute-base" ] }, "base-build": { "requires": [ "base-base" ] }, "base-pluginhost": { "requires": [ "base-base", "pluginhost" ] }, "cache": { "use": [ "cache-base", "cache-offline", "cache-plugin" ] }, "cache-base": { "requires": [ "base" ] }, "cache-offline": { "requires": [ "cache-base", "json" ] }, "cache-plugin": { "requires": [ "plugin", "cache-base" ] }, "calendar": { "lang": [ "en", "ja", "ru" ], "requires": [ "calendar-base", "calendarnavigator" ], "skinnable": true }, "calendar-base": { "lang": [ "en", "ja", "ru" ], "requires": [ "widget", "substitute", "datatype-date", "datatype-date-math", "cssgrids" ], "skinnable": true }, "calendarnavigator": { "requires": [ "plugin", "classnamemanager", "datatype-date", "node", "substitute" ], "skinnable": true }, "charts": { "requires": [ "dom", "datatype-number", "datatype-date", "event-custom", "event-mouseenter", "widget", "widget-position", "widget-stack", "graphics" ] }, "classnamemanager": { "requires": [ "yui-base" ] }, "clickable-rail": { "requires": [ "slider-base" ] }, "collection": { "use": [ "array-extras", "arraylist", "arraylist-add", "arraylist-filter", "array-invoke" ] }, "console": { "lang": [ "en", "es", "ja" ], "requires": [ "yui-log", "widget", "substitute" ], "skinnable": true }, "console-filters": { "requires": [ "plugin", "console" ], "skinnable": true }, "controller": { "optional": [ "querystring-parse" ], "requires": [ "array-extras", "base-build", "history" ] }, "cookie": { "requires": [ "yui-base" ] }, "createlink-base": { "requires": [ "editor-base" ] }, "cssbase": { "after": [ "cssreset", "cssfonts", "cssgrids", "cssreset-context", "cssfonts-context", "cssgrids-context" ], "type": "css" }, "cssbase-context": { "after": [ "cssreset", "cssfonts", "cssgrids", "cssreset-context", "cssfonts-context", "cssgrids-context" ], "type": "css" }, "cssfonts": { "type": "css" }, "cssfonts-context": { "type": "css" }, "cssgrids": { "optional": [ "cssreset", "cssfonts" ], "type": "css" }, "cssreset": { "type": "css" }, "cssreset-context": { "type": "css" }, "dataschema": { "use": [ "dataschema-base", "dataschema-json", "dataschema-xml", "dataschema-array", "dataschema-text" ] }, "dataschema-array": { "requires": [ "dataschema-base" ] }, "dataschema-base": { "requires": [ "base" ] }, "dataschema-json": { "requires": [ "dataschema-base", "json" ] }, "dataschema-text": { "requires": [ "dataschema-base" ] }, "dataschema-xml": { "requires": [ "dataschema-base" ] }, "datasource": { "use": [ "datasource-local", "datasource-io", "datasource-get", "datasource-function", "datasource-cache", "datasource-jsonschema", "datasource-xmlschema", "datasource-arrayschema", "datasource-textschema", "datasource-polling" ] }, "datasource-arrayschema": { "requires": [ "datasource-local", "plugin", "dataschema-array" ] }, "datasource-cache": { "requires": [ "datasource-local", "plugin", "cache-base" ] }, "datasource-function": { "requires": [ "datasource-local" ] }, "datasource-get": { "requires": [ "datasource-local", "get" ] }, "datasource-io": { "requires": [ "datasource-local", "io-base" ] }, "datasource-jsonschema": { "requires": [ "datasource-local", "plugin", "dataschema-json" ] }, "datasource-local": { "requires": [ "base" ] }, "datasource-polling": { "requires": [ "datasource-local" ] }, "datasource-textschema": { "requires": [ "datasource-local", "plugin", "dataschema-text" ] }, "datasource-xmlschema": { "requires": [ "datasource-local", "plugin", "dataschema-xml" ] }, "datatable": { "use": [ "datatable-base", "datatable-datasource", "datatable-sort", "datatable-scroll" ] }, "datatable-base": { "requires": [ "recordset-base", "widget", "substitute", "event-mouseenter" ], "skinnable": true }, "datatable-datasource": { "requires": [ "datatable-base", "plugin", "datasource-local" ] }, "datatable-scroll": { "requires": [ "datatable-base", "plugin" ] }, "datatable-sort": { "lang": [ "en" ], "requires": [ "datatable-base", "plugin", "recordset-sort" ] }, "datatype": { "use": [ "datatype-number", "datatype-date", "datatype-xml" ] }, "datatype-date": { "supersedes": [ "datatype-date-format" ], "use": [ "datatype-date-parse", "datatype-date-format" ] }, "datatype-date-format": { "lang": [ "ar", "ar-JO", "ca", "ca-ES", "da", "da-DK", "de", "de-AT", "de-DE", "el", "el-GR", "en", "en-AU", "en-CA", "en-GB", "en-IE", "en-IN", "en-JO", "en-MY", "en-NZ", "en-PH", "en-SG", "en-US", "es", "es-AR", "es-BO", "es-CL", "es-CO", "es-EC", "es-ES", "es-MX", "es-PE", "es-PY", "es-US", "es-UY", "es-VE", "fi", "fi-FI", "fr", "fr-BE", "fr-CA", "fr-FR", "hi", "hi-IN", "id", "id-ID", "it", "it-IT", "ja", "ja-JP", "ko", "ko-KR", "ms", "ms-MY", "nb", "nb-NO", "nl", "nl-BE", "nl-NL", "pl", "pl-PL", "pt", "pt-BR", "ro", "ro-RO", "ru", "ru-RU", "sv", "sv-SE", "th", "th-TH", "tr", "tr-TR", "vi", "vi-VN", "zh-Hans", "zh-Hans-CN", "zh-Hant", "zh-Hant-HK", "zh-Hant-TW" ] }, "datatype-date-math": { "requires": [ "yui-base" ] }, "datatype-date-parse": {}, "datatype-number": { "use": [ "datatype-number-parse", "datatype-number-format" ] }, "datatype-number-format": {}, "datatype-number-parse": {}, "datatype-xml": { "use": [ "datatype-xml-parse", "datatype-xml-format" ] }, "datatype-xml-format": {}, "datatype-xml-parse": {}, "dd": { "use": [ "dd-ddm-base", "dd-ddm", "dd-ddm-drop", "dd-drag", "dd-proxy", "dd-constrain", "dd-drop", "dd-scroll", "dd-delegate" ] }, "dd-constrain": { "requires": [ "dd-drag" ] }, "dd-ddm": { "requires": [ "dd-ddm-base", "event-resize" ] }, "dd-ddm-base": { "requires": [ "node", "base", "yui-throttle", "classnamemanager" ] }, "dd-ddm-drop": { "requires": [ "dd-ddm" ] }, "dd-delegate": { "requires": [ "dd-drag", "dd-drop-plugin", "event-mouseenter" ] }, "dd-drag": { "requires": [ "dd-ddm-base" ] }, "dd-drop": { "requires": [ "dd-drag", "dd-ddm-drop" ] }, "dd-drop-plugin": { "requires": [ "dd-drop" ] }, "dd-gestures": { "condition": { "name": "dd-gestures", "test": function(Y) { return (Y.config.win && ('ontouchstart' in Y.config.win && !Y.UA.chrome)); }, "trigger": "dd-drag" }, "requires": [ "dd-drag", "event-synthetic", "event-gestures" ] }, "dd-plugin": { "optional": [ "dd-constrain", "dd-proxy" ], "requires": [ "dd-drag" ] }, "dd-proxy": { "requires": [ "dd-drag" ] }, "dd-scroll": { "requires": [ "dd-drag" ] }, "dial": { "lang": [ "en", "es" ], "requires": [ "widget", "dd-drag", "substitute", "event-mouseenter", "event-move", "event-key", "transition", "intl" ], "skinnable": true }, "dom": { "use": [ "dom-base", "dom-screen", "dom-style", "selector-native", "selector" ] }, "dom-base": { "requires": [ "dom-core" ] }, "dom-core": { "requires": [ "oop", "features" ] }, "dom-deprecated": { "requires": [ "dom-base" ] }, "dom-screen": { "requires": [ "dom-base", "dom-style" ] }, "dom-style": { "requires": [ "dom-base" ] }, "dom-style-ie": { "condition": { "name": "dom-style-ie", "test": function (Y) { var testFeature = Y.Features.test, addFeature = Y.Features.add, WINDOW = Y.config.win, DOCUMENT = Y.config.doc, DOCUMENT_ELEMENT = 'documentElement', ret = false; addFeature('style', 'computedStyle', { test: function() { return WINDOW && 'getComputedStyle' in WINDOW; } }); addFeature('style', 'opacity', { test: function() { return DOCUMENT && 'opacity' in DOCUMENT[DOCUMENT_ELEMENT].style; } }); ret = (!testFeature('style', 'opacity') && !testFeature('style', 'computedStyle')); return ret; }, "trigger": "dom-style" }, "requires": [ "dom-style" ] }, "dump": { "requires": [ "yui-base" ] }, "editor": { "use": [ "frame", "selection", "exec-command", "editor-base", "editor-para", "editor-br", "editor-bidi", "editor-tab", "createlink-base" ] }, "editor-base": { "requires": [ "base", "frame", "node", "exec-command", "selection" ] }, "editor-bidi": { "requires": [ "editor-base" ] }, "editor-br": { "requires": [ "editor-base" ] }, "editor-lists": { "requires": [ "editor-base" ] }, "editor-para": { "requires": [ "editor-base" ] }, "editor-tab": { "requires": [ "editor-base" ] }, "escape": { "requires": [ "yui-base" ] }, "event": { "after": [ "node-base" ], "use": [ "event-base", "event-delegate", "event-synthetic", "event-mousewheel", "event-mouseenter", "event-key", "event-focus", "event-resize", "event-hover", "event-outside" ] }, "event-base": { "after": [ "node-base" ], "requires": [ "event-custom-base" ] }, "event-base-ie": { "after": [ "event-base" ], "condition": { "name": "event-base-ie", "test": function(Y) { var imp = Y.config.doc && Y.config.doc.implementation; return (imp && (!imp.hasFeature('Events', '2.0'))); }, "trigger": "node-base" }, "requires": [ "node-base" ] }, "event-custom": { "use": [ "event-custom-base", "event-custom-complex" ] }, "event-custom-base": { "requires": [ "oop" ] }, "event-custom-complex": { "requires": [ "event-custom-base" ] }, "event-delegate": { "requires": [ "node-base" ] }, "event-flick": { "requires": [ "node-base", "event-touch", "event-synthetic" ] }, "event-focus": { "requires": [ "event-synthetic" ] }, "event-gestures": { "use": [ "event-flick", "event-move" ] }, "event-hover": { "requires": [ "event-mouseenter" ] }, "event-key": { "requires": [ "event-synthetic" ] }, "event-mouseenter": { "requires": [ "event-synthetic" ] }, "event-mousewheel": { "requires": [ "node-base" ] }, "event-move": { "requires": [ "node-base", "event-touch", "event-synthetic" ] }, "event-outside": { "requires": [ "event-synthetic" ] }, "event-resize": { "requires": [ "node-base", "event-synthetic" ] }, "event-simulate": { "requires": [ "event-base" ] }, "event-synthetic": { "requires": [ "node-base", "event-custom-complex" ] }, "event-touch": { "requires": [ "node-base" ] }, "event-valuechange": { "requires": [ "event-focus", "event-synthetic" ] }, "exec-command": { "requires": [ "frame" ] }, "features": { "requires": [ "yui-base" ] }, "frame": { "requires": [ "base", "node", "selector-css3", "substitute", "yui-throttle" ] }, "get": { "requires": [ "yui-base" ] }, "graphics": { "requires": [ "node", "event-custom", "pluginhost" ] }, "graphics-canvas": { "condition": { "name": "graphics-canvas", "test": function(Y) { var DOCUMENT = Y.config.doc, canvas = DOCUMENT && DOCUMENT.createElement("canvas"); return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (canvas && canvas.getContext && canvas.getContext("2d"))); }, "trigger": "graphics" }, "requires": [ "graphics" ] }, "graphics-canvas-default": { "condition": { "name": "graphics-canvas-default", "test": function(Y) { var DOCUMENT = Y.config.doc, canvas = DOCUMENT && DOCUMENT.createElement("canvas"); return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (canvas && canvas.getContext && canvas.getContext("2d"))); }, "trigger": "graphics" } }, "graphics-svg": { "condition": { "name": "graphics-svg", "test": function(Y) { var DOCUMENT = Y.config.doc; return (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")); }, "trigger": "graphics" }, "requires": [ "graphics" ] }, "graphics-svg-default": { "condition": { "name": "graphics-svg-default", "test": function(Y) { var DOCUMENT = Y.config.doc; return (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")); }, "trigger": "graphics" } }, "graphics-vml": { "condition": { "name": "graphics-vml", "test": function(Y) { var DOCUMENT = Y.config.doc, canvas = DOCUMENT && DOCUMENT.createElement("canvas"); return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (!canvas || !canvas.getContext || !canvas.getContext("2d"))); }, "trigger": "graphics" }, "requires": [ "graphics" ] }, "graphics-vml-default": { "condition": { "name": "graphics-vml-default", "test": function(Y) { var DOCUMENT = Y.config.doc, canvas = DOCUMENT && DOCUMENT.createElement("canvas"); return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (!canvas || !canvas.getContext || !canvas.getContext("2d"))); }, "trigger": "graphics" } }, "highlight": { "use": [ "highlight-base", "highlight-accentfold" ] }, "highlight-accentfold": { "requires": [ "highlight-base", "text-accentfold" ] }, "highlight-base": { "requires": [ "array-extras", "classnamemanager", "escape", "text-wordbreak" ] }, "history": { "use": [ "history-base", "history-hash", "history-hash-ie", "history-html5" ] }, "history-base": { "requires": [ "event-custom-complex" ] }, "history-hash": { "after": [ "history-html5" ], "requires": [ "event-synthetic", "history-base", "yui-later" ] }, "history-hash-ie": { "condition": { "name": "history-hash-ie", "test": function (Y) { var docMode = Y.config.doc && Y.config.doc.documentMode; return Y.UA.ie && (!('onhashchange' in Y.config.win) || !docMode || docMode < 8); }, "trigger": "history-hash" }, "requires": [ "history-hash", "node-base" ] }, "history-html5": { "optional": [ "json" ], "requires": [ "event-base", "history-base", "node-base" ] }, "imageloader": { "requires": [ "base-base", "node-style", "node-screen" ] }, "intl": { "requires": [ "intl-base", "event-custom" ] }, "intl-base": { "requires": [ "yui-base" ] }, "io": { "use": [ "io-base", "io-xdr", "io-form", "io-upload-iframe", "io-queue" ] }, "io-base": { "requires": [ "event-custom-base", "querystring-stringify-simple" ] }, "io-form": { "requires": [ "io-base", "node-base" ] }, "io-queue": { "requires": [ "io-base", "queue-promote" ] }, "io-upload-iframe": { "requires": [ "io-base", "node-base" ] }, "io-xdr": { "requires": [ "io-base", "datatype-xml-parse" ] }, "json": { "use": [ "json-parse", "json-stringify" ] }, "json-parse": { "requires": [ "yui-base" ] }, "json-stringify": { "requires": [ "yui-base" ] }, "jsonp": { "requires": [ "get", "oop" ] }, "jsonp-url": { "requires": [ "jsonp" ] }, "loader": { "use": [ "loader-base", "loader-rollup", "loader-yui3" ] }, "loader-base": { "requires": [ "get" ] }, "loader-rollup": { "requires": [ "loader-base" ] }, "loader-yui3": { "requires": [ "loader-base" ] }, "model": { "requires": [ "base-build", "escape", "json-parse" ] }, "model-list": { "requires": [ "array-extras", "array-invoke", "arraylist", "base-build", "escape", "json-parse", "model" ] }, "node": { "use": [ "node-base", "node-event-delegate", "node-pluginhost", "node-screen", "node-style" ] }, "node-base": { "requires": [ "event-base", "node-core", "dom-base" ] }, "node-core": { "requires": [ "dom-core", "selector" ] }, "node-deprecated": { "requires": [ "node-base" ] }, "node-event-delegate": { "requires": [ "node-base", "event-delegate" ] }, "node-event-html5": { "requires": [ "node-base" ] }, "node-event-simulate": { "requires": [ "node-base", "event-simulate" ] }, "node-flick": { "requires": [ "classnamemanager", "transition", "event-flick", "plugin" ], "skinnable": true }, "node-focusmanager": { "requires": [ "attribute", "node", "plugin", "node-event-simulate", "event-key", "event-focus" ] }, "node-load": { "requires": [ "node-base", "io-base" ] }, "node-menunav": { "requires": [ "node", "classnamemanager", "plugin", "node-focusmanager" ], "skinnable": true }, "node-pluginhost": { "requires": [ "node-base", "pluginhost" ] }, "node-screen": { "requires": [ "dom-screen", "node-base" ] }, "node-style": { "requires": [ "dom-style", "node-base" ] }, "oop": { "requires": [ "yui-base" ] }, "overlay": { "requires": [ "widget", "widget-stdmod", "widget-position", "widget-position-align", "widget-stack", "widget-position-constrain" ], "skinnable": true }, "panel": { "requires": [ "widget", "widget-stdmod", "widget-position", "widget-position-align", "widget-stack", "widget-position-constrain", "widget-modality", "widget-autohide", "widget-buttons" ], "skinnable": true }, "plugin": { "requires": [ "base-base" ] }, "pluginhost": { "use": [ "pluginhost-base", "pluginhost-config" ] }, "pluginhost-base": { "requires": [ "yui-base" ] }, "pluginhost-config": { "requires": [ "pluginhost-base" ] }, "profiler": { "requires": [ "yui-base" ] }, "querystring": { "use": [ "querystring-parse", "querystring-stringify" ] }, "querystring-parse": { "requires": [ "yui-base", "array-extras" ] }, "querystring-parse-simple": { "requires": [ "yui-base" ] }, "querystring-stringify": { "requires": [ "yui-base" ] }, "querystring-stringify-simple": { "requires": [ "yui-base" ] }, "queue-promote": { "requires": [ "yui-base" ] }, "range-slider": { "requires": [ "slider-base", "slider-value-range", "clickable-rail" ] }, "recordset": { "use": [ "recordset-base", "recordset-sort", "recordset-filter", "recordset-indexer" ] }, "recordset-base": { "requires": [ "base", "arraylist" ] }, "recordset-filter": { "requires": [ "recordset-base", "array-extras", "plugin" ] }, "recordset-indexer": { "requires": [ "recordset-base", "plugin" ] }, "recordset-sort": { "requires": [ "arraysort", "recordset-base", "plugin" ] }, "resize": { "use": [ "resize-base", "resize-proxy", "resize-constrain" ] }, "resize-base": { "requires": [ "base", "widget", "substitute", "event", "oop", "dd-drag", "dd-delegate", "dd-drop" ], "skinnable": true }, "resize-constrain": { "requires": [ "plugin", "resize-base" ] }, "resize-plugin": { "optional": [ "resize-constrain" ], "requires": [ "resize-base", "plugin" ] }, "resize-proxy": { "requires": [ "plugin", "resize-base" ] }, "rls": { "requires": [ "get", "features" ] }, "scrollview": { "requires": [ "scrollview-base", "scrollview-scrollbars" ] }, "scrollview-base": { "requires": [ "widget", "event-gestures", "transition" ], "skinnable": true }, "scrollview-base-ie": { "condition": { "name": "scrollview-base-ie", "trigger": "scrollview-base", "ua": "ie" }, "requires": [ "scrollview-base" ] }, "scrollview-list": { "requires": [ "plugin", "classnamemanager" ], "skinnable": true }, "scrollview-paginator": { "requires": [ "plugin" ] }, "scrollview-scrollbars": { "requires": [ "classnamemanager", "transition", "plugin" ], "skinnable": true }, "selection": { "requires": [ "node" ] }, "selector": { "requires": [ "selector-native" ] }, "selector-css2": { "condition": { "name": "selector-css2", "test": function (Y) { var DOCUMENT = Y.config.doc, ret = DOCUMENT && !('querySelectorAll' in DOCUMENT); return ret; }, "trigger": "selector" }, "requires": [ "selector-native" ] }, "selector-css3": { "requires": [ "selector-native", "selector-css2" ] }, "selector-native": { "requires": [ "dom-base" ] }, "shim-plugin": { "requires": [ "node-style", "node-pluginhost" ] }, "slider": { "use": [ "slider-base", "slider-value-range", "clickable-rail", "range-slider" ] }, "slider-base": { "requires": [ "widget", "dd-constrain", "substitute" ], "skinnable": true }, "slider-value-range": { "requires": [ "slider-base" ] }, "sortable": { "requires": [ "dd-delegate", "dd-drop-plugin", "dd-proxy" ] }, "sortable-scroll": { "requires": [ "dd-scroll", "sortable" ] }, "stylesheet": { "requires": [ "yui-base" ] }, "substitute": { "optional": [ "dump" ], "requires": [ "yui-base" ] }, "swf": { "requires": [ "event-custom", "node", "swfdetect", "escape" ] }, "swfdetect": { "requires": [ "yui-base" ] }, "tabview": { "requires": [ "widget", "widget-parent", "widget-child", "tabview-base", "node-pluginhost", "node-focusmanager" ], "skinnable": true }, "tabview-base": { "requires": [ "node-event-delegate", "classnamemanager", "skin-sam-tabview" ] }, "tabview-plugin": { "requires": [ "tabview-base" ] }, "test": { "requires": [ "event-simulate", "event-custom", "substitute", "json-stringify" ], "skinnable": true }, "text": { "use": [ "text-accentfold", "text-wordbreak" ] }, "text-accentfold": { "requires": [ "array-extras", "text-data-accentfold" ] }, "text-data-accentfold": { "requires": [ "yui-base" ] }, "text-data-wordbreak": { "requires": [ "yui-base" ] }, "text-wordbreak": { "requires": [ "array-extras", "text-data-wordbreak" ] }, "transition": { "requires": [ "node-style" ] }, "transition-timer": { "condition": { "name": "transition-timer", "test": function (Y) { var DOCUMENT = Y.config.doc, node = (DOCUMENT) ? DOCUMENT.documentElement: null, ret = true; if (node && node.style) { ret = !('MozTransition' in node.style || 'WebkitTransition' in node.style); } return ret; }, "trigger": "transition" }, "requires": [ "transition" ] }, "uploader": { "requires": [ "event-custom", "node", "base", "swf" ] }, "view": { "requires": [ "base-build", "node-event-delegate" ] }, "widget": { "use": [ "widget-base", "widget-htmlparser", "widget-uievents", "widget-skin" ] }, "widget-anim": { "requires": [ "plugin", "anim-base", "widget" ] }, "widget-autohide": { "requires": [ "widget", "event-outside", "base-build", "event-key" ], "skinnable": false }, "widget-base": { "requires": [ "attribute", "event-focus", "base-base", "base-pluginhost", "node-base", "node-style", "classnamemanager" ], "skinnable": true }, "widget-base-ie": { "condition": { "name": "widget-base-ie", "trigger": "widget-base", "ua": "ie" }, "requires": [ "widget-base" ] }, "widget-buttons": { "requires": [ "widget", "base-build", "widget-stdmod" ], "skinnable": true }, "widget-child": { "requires": [ "base-build", "widget" ] }, "widget-htmlparser": { "requires": [ "widget-base" ] }, "widget-locale": { "requires": [ "widget-base" ] }, "widget-modality": { "requires": [ "widget", "event-outside", "base-build" ], "skinnable": false }, "widget-parent": { "requires": [ "base-build", "arraylist", "widget" ] }, "widget-position": { "requires": [ "base-build", "node-screen", "widget" ] }, "widget-position-align": { "requires": [ "widget-position" ] }, "widget-position-constrain": { "requires": [ "widget-position" ] }, "widget-skin": { "requires": [ "widget-base" ] }, "widget-stack": { "requires": [ "base-build", "widget" ], "skinnable": true }, "widget-stdmod": { "requires": [ "base-build", "widget" ] }, "widget-uievents": { "requires": [ "widget-base", "node-event-delegate" ] }, "yql": { "requires": [ "jsonp", "jsonp-url" ] }, "yui": {}, "yui-base": {}, "yui-later": { "requires": [ "yui-base" ] }, "yui-log": { "requires": [ "yui-base" ] }, "yui-rls": {}, "yui-throttle": { "requires": [ "yui-base" ] } }; YUI.Env[Y.version].md5 = '105ebffae27a0e3d7331f8cf5c0bb282'; }, '@VERSION@' ,{requires:['loader-base']}); YUI.add('yui', function(Y){}, '@VERSION@' ,{use:['yui-base','get','features','intl-base','yui-log','yui-later','loader-base', 'loader-rollup', 'loader-yui3' ]});
client-src/components/comparison/header/Header.js
minimus/final-task
import React from 'react' import propTypes from 'prop-types' import { NavLink } from 'react-router-dom' export default function Header({ text, link }) { return ( <h1 className="item-header"> <NavLink to={link}>{text}</NavLink> </h1> ) } Header.propTypes = { text: propTypes.string.isRequired, link: propTypes.string.isRequired, }
src/parser/warrior/arms/modules/features/Checklist/Module.js
ronaldpereira/WoWAnalyzer
import React from 'react'; import BaseChecklist from 'parser/shared/modules/features/Checklist/Module'; import CastEfficiency from 'parser/shared/modules/CastEfficiency'; import Combatants from 'parser/shared/modules/Combatants'; import PreparationRuleAnalyzer from 'parser/shared/modules/features/Checklist/PreparationRuleAnalyzer'; import AlwaysBeCasting from '../AlwaysBeCasting'; import DeepWoundsUptime from '../../core/Dots/DeepWoundsUptime'; import RendUptime from '../../core/Dots/RendUptime'; import MortalStrike from '../../core/Execute/MortalStrike'; import SweepingStrikes from '../../core/SweepingStrikes'; import Component from './Component'; class Checklist extends BaseChecklist { static dependencies = { combatants: Combatants, castEfficiency: CastEfficiency, alwaysBeCasting: AlwaysBeCasting, preparationRuleAnalyzer: PreparationRuleAnalyzer, deepWoundsUptime: DeepWoundsUptime, rendUptime: RendUptime, mortalStrike: MortalStrike, sweepingStrikes: SweepingStrikes, }; render() { return ( <Component combatant={this.combatants.selected} castEfficiency={this.castEfficiency} thresholds={{ ...this.preparationRuleAnalyzer.thresholds, deepWounds: this.deepWoundsUptime.suggestionThresholds, rend: this.rendUptime.suggestionThresholds, downtimeSuggestionThresholds: this.alwaysBeCasting.downtimeSuggestionThresholds, goodMortalStrike: this.mortalStrike.goodMortalStrikeThresholds, badMortalStrike: this.mortalStrike.badMortalStrikeThresholds, badSweepingStrikes: this.sweepingStrikes.suggestionThresholds, }} /> ); } } export default Checklist;
ajax/libs/js-data/0.0.1/js-data.js
amoyeh/cdnjs
/** * @author Jason Dobry <[email protected]> * @file js-data.js * @version 0.0.1 - Homepage <http://js-data.io/> * @copyright (c) 2014 Jason Dobry * @license MIT <https://github.com/js-data/js-data/blob/master/LICENSE> * * @overview Data store. */ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.JSData=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ // Copyright 2012 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Modifications // Copyright 2014 Jason Dobry // // Summary of modifications: // Removed all code related to: // - ArrayObserver // - ArraySplice // - PathObserver // - CompoundObserver // - Path // - ObserverTransform (function(global) { 'use strict'; // Detect and do basic sanity checking on Object/Array.observe. function detectObjectObserve() { if (typeof Object.observe !== 'function' || typeof Array.observe !== 'function') { return false; } var records = []; function callback(recs) { records = recs; } var test = {}; var arr = []; Object.observe(test, callback); Array.observe(arr, callback); test.id = 1; test.id = 2; delete test.id; arr.push(1, 2); arr.length = 0; Object.deliverChangeRecords(callback); if (records.length !== 5) return false; if (records[0].type != 'add' || records[1].type != 'update' || records[2].type != 'delete' || records[3].type != 'splice' || records[4].type != 'splice') { return false; } Object.unobserve(test, callback); Array.unobserve(arr, callback); return true; } var hasObserve = detectObjectObserve(); function detectEval() { // Don't test for eval if we're running in a Chrome App environment. // We check for APIs set that only exist in a Chrome App context. if (typeof chrome !== 'undefined' && chrome.app && chrome.app.runtime) { return false; } try { var f = new Function('', 'return true;'); return f(); } catch (ex) { return false; } } var hasEval = detectEval(); var createObject = ('__proto__' in {}) ? function(obj) { return obj; } : function(obj) { var proto = obj.__proto__; if (!proto) return obj; var newObject = Object.create(proto); Object.getOwnPropertyNames(obj).forEach(function(name) { Object.defineProperty(newObject, name, Object.getOwnPropertyDescriptor(obj, name)); }); return newObject; }; var MAX_DIRTY_CHECK_CYCLES = 1000; function dirtyCheck(observer) { var cycles = 0; while (cycles < MAX_DIRTY_CHECK_CYCLES && observer.check_()) { cycles++; } if (global.testingExposeCycleCount) global.dirtyCheckCycleCount = cycles; return cycles > 0; } function objectIsEmpty(object) { for (var prop in object) return false; return true; } function diffIsEmpty(diff) { return objectIsEmpty(diff.added) && objectIsEmpty(diff.removed) && objectIsEmpty(diff.changed); } function diffObjectFromOldObject(object, oldObject) { var added = {}; var removed = {}; var changed = {}; for (var prop in oldObject) { var newValue = object[prop]; if (newValue !== undefined && newValue === oldObject[prop]) continue; if (!(prop in object)) { removed[prop] = undefined; continue; } if (newValue !== oldObject[prop]) changed[prop] = newValue; } for (var prop in object) { if (prop in oldObject) continue; added[prop] = object[prop]; } if (Array.isArray(object) && object.length !== oldObject.length) changed.length = object.length; return { added: added, removed: removed, changed: changed }; } var eomTasks = []; function runEOMTasks() { if (!eomTasks.length) return false; for (var i = 0; i < eomTasks.length; i++) { eomTasks[i](); } eomTasks.length = 0; return true; } var runEOM = hasObserve ? (function(){ var eomObj = { pingPong: true }; var eomRunScheduled = false; Object.observe(eomObj, function() { runEOMTasks(); eomRunScheduled = false; }); return function(fn) { eomTasks.push(fn); if (!eomRunScheduled) { eomRunScheduled = true; eomObj.pingPong = !eomObj.pingPong; } }; })() : (function() { return function(fn) { eomTasks.push(fn); }; })(); var observedObjectCache = []; function newObservedObject() { var observer; var object; var discardRecords = false; var first = true; function callback(records) { if (observer && observer.state_ === OPENED && !discardRecords) observer.check_(records); } return { open: function(obs) { if (observer) throw Error('ObservedObject in use'); if (!first) Object.deliverChangeRecords(callback); observer = obs; first = false; }, observe: function(obj, arrayObserve) { object = obj; if (arrayObserve) Array.observe(object, callback); else Object.observe(object, callback); }, deliver: function(discard) { discardRecords = discard; Object.deliverChangeRecords(callback); discardRecords = false; }, close: function() { observer = undefined; Object.unobserve(object, callback); observedObjectCache.push(this); } }; } /* * The observedSet abstraction is a perf optimization which reduces the total * number of Object.observe observations of a set of objects. The idea is that * groups of Observers will have some object dependencies in common and this * observed set ensures that each object in the transitive closure of * dependencies is only observed once. The observedSet acts as a write barrier * such that whenever any change comes through, all Observers are checked for * changed values. * * Note that this optimization is explicitly moving work from setup-time to * change-time. * * TODO(rafaelw): Implement "garbage collection". In order to move work off * the critical path, when Observers are closed, their observed objects are * not Object.unobserve(d). As a result, it's possible that if the observedSet * is kept open, but some Observers have been closed, it could cause "leaks" * (prevent otherwise collectable objects from being collected). At some * point, we should implement incremental "gc" which keeps a list of * observedSets which may need clean-up and does small amounts of cleanup on a * timeout until all is clean. */ function getObservedObject(observer, object, arrayObserve) { var dir = observedObjectCache.pop() || newObservedObject(); dir.open(observer); dir.observe(object, arrayObserve); return dir; } var UNOPENED = 0; var OPENED = 1; var CLOSED = 2; var nextObserverId = 1; function Observer() { this.state_ = UNOPENED; this.callback_ = undefined; this.target_ = undefined; // TODO(rafaelw): Should be WeakRef this.directObserver_ = undefined; this.value_ = undefined; this.id_ = nextObserverId++; } Observer.prototype = { open: function(callback, target) { if (this.state_ != UNOPENED) throw Error('Observer has already been opened.'); addToAll(this); this.callback_ = callback; this.target_ = target; this.connect_(); this.state_ = OPENED; return this.value_; }, close: function() { if (this.state_ != OPENED) return; removeFromAll(this); this.disconnect_(); this.value_ = undefined; this.callback_ = undefined; this.target_ = undefined; this.state_ = CLOSED; }, deliver: function() { if (this.state_ != OPENED) return; dirtyCheck(this); }, report_: function(changes) { try { this.callback_.apply(this.target_, changes); } catch (ex) { Observer._errorThrownDuringCallback = true; console.error('Exception caught during observer callback: ' + (ex.stack || ex)); } }, discardChanges: function() { this.check_(undefined, true); return this.value_; } } var collectObservers = !hasObserve; var allObservers; Observer._allObserversCount = 0; if (collectObservers) { allObservers = []; } function addToAll(observer) { Observer._allObserversCount++; if (!collectObservers) return; allObservers.push(observer); } function removeFromAll(observer) { Observer._allObserversCount--; } var runningMicrotaskCheckpoint = false; var hasDebugForceFullDelivery = hasObserve && hasEval && (function() { try { eval('%RunMicrotasks()'); return true; } catch (ex) { return false; } })(); global.Platform = global.Platform || {}; global.Platform.performMicrotaskCheckpoint = function() { if (runningMicrotaskCheckpoint) return; if (hasDebugForceFullDelivery) { eval('%RunMicrotasks()'); return; } if (!collectObservers) return; runningMicrotaskCheckpoint = true; var cycles = 0; var anyChanged, toCheck; do { cycles++; toCheck = allObservers; allObservers = []; anyChanged = false; for (var i = 0; i < toCheck.length; i++) { var observer = toCheck[i]; if (observer.state_ != OPENED) continue; if (observer.check_()) anyChanged = true; allObservers.push(observer); } if (runEOMTasks()) anyChanged = true; } while (cycles < MAX_DIRTY_CHECK_CYCLES && anyChanged); if (global.testingExposeCycleCount) global.dirtyCheckCycleCount = cycles; runningMicrotaskCheckpoint = false; }; if (collectObservers) { global.Platform.clearObservers = function() { allObservers = []; }; } function ObjectObserver(object) { Observer.call(this); this.value_ = object; this.oldObject_ = undefined; } ObjectObserver.prototype = createObject({ __proto__: Observer.prototype, arrayObserve: false, connect_: function(callback, target) { if (hasObserve) { this.directObserver_ = getObservedObject(this, this.value_, this.arrayObserve); } else { this.oldObject_ = this.copyObject(this.value_); } }, copyObject: function(object) { var copy = Array.isArray(object) ? [] : {}; for (var prop in object) { copy[prop] = object[prop]; }; if (Array.isArray(object)) copy.length = object.length; return copy; }, check_: function(changeRecords, skipChanges) { var diff; var oldValues; if (hasObserve) { if (!changeRecords) return false; oldValues = {}; diff = diffObjectFromChangeRecords(this.value_, changeRecords, oldValues); } else { oldValues = this.oldObject_; diff = diffObjectFromOldObject(this.value_, this.oldObject_); } if (diffIsEmpty(diff)) return false; if (!hasObserve) this.oldObject_ = this.copyObject(this.value_); this.report_([ diff.added || {}, diff.removed || {}, diff.changed || {}, function(property) { return oldValues[property]; } ]); return true; }, disconnect_: function() { if (hasObserve) { this.directObserver_.close(); this.directObserver_ = undefined; } else { this.oldObject_ = undefined; } }, deliver: function() { if (this.state_ != OPENED) return; if (hasObserve) this.directObserver_.deliver(false); else dirtyCheck(this); }, discardChanges: function() { if (this.directObserver_) this.directObserver_.deliver(true); else this.oldObject_ = this.copyObject(this.value_); return this.value_; } }); var observerSentinel = {}; var expectedRecordTypes = { add: true, update: true, delete: true }; function diffObjectFromChangeRecords(object, changeRecords, oldValues) { var added = {}; var removed = {}; for (var i = 0; i < changeRecords.length; i++) { var record = changeRecords[i]; if (!expectedRecordTypes[record.type]) { console.error('Unknown changeRecord type: ' + record.type); console.error(record); continue; } if (!(record.name in oldValues)) oldValues[record.name] = record.oldValue; if (record.type == 'update') continue; if (record.type == 'add') { if (record.name in removed) delete removed[record.name]; else added[record.name] = true; continue; } // type = 'delete' if (record.name in added) { delete added[record.name]; delete oldValues[record.name]; } else { removed[record.name] = true; } } for (var prop in added) added[prop] = object[prop]; for (var prop in removed) removed[prop] = undefined; var changed = {}; for (var prop in oldValues) { if (prop in added || prop in removed) continue; var newValue = object[prop]; if (oldValues[prop] !== newValue) changed[prop] = newValue; } return { added: added, removed: removed, changed: changed }; } global.Observer = Observer; global.Observer.runEOM_ = runEOM; global.Observer.observerSentinel_ = observerSentinel; // for testing. global.Observer.hasObjectObserve = hasObserve; global.ObjectObserver = ObjectObserver; })((exports.Number = { isNaN: window.isNaN }) ? exports : exports); },{}],2:[function(require,module,exports){ module.exports = require('./lib/axios'); },{"./lib/axios":3}],3:[function(require,module,exports){ var Promise = require('es6-promise').Promise; var buildUrl = require('./buildUrl'); var cookies = require('./cookies'); var defaults = require('./defaults'); var parseHeaders = require('./parseHeaders'); var transformData = require('./transformData'); var urlIsSameOrigin = require('./urlIsSameOrigin'); var utils = require('./utils'); var axios = module.exports = function axios(config) { config = utils.merge({ method: 'get', transformRequest: defaults.transformRequest, transformResponse: defaults.transformResponse }, config); // Don't allow overriding defaults.withCredentials config.withCredentials = config.withCredentials || defaults.withCredentials; var promise = new Promise(function (resolve, reject) { // Create the request var request = new(XMLHttpRequest || ActiveXObject)('Microsoft.XMLHTTP'); var data = transformData( config.data, config.headers, config.transformRequest ); // Open the request request.open(config.method, buildUrl(config.url, config.params), true); // Listen for ready state request.onreadystatechange = function () { if (request && request.readyState === 4) { // Prepare the response var headers = parseHeaders(request.getAllResponseHeaders()); var response = { data: transformData( request.responseText, headers, config.transformResponse ), status: request.status, headers: headers, config: config }; // Resolve or reject the Promise based on the status (request.status >= 200 && request.status < 300 ? resolve : reject)( response.data, response.status, response.headers, response.config ); // Clean up request request = null; } }; // Merge headers and add to request var headers = utils.merge( defaults.headers.common, defaults.headers[config.method] || {}, config.headers || {} ); // Add xsrf header var xsrfValue = urlIsSameOrigin(config.url) ? cookies.read(config.xsrfCookieName || defaults.xsrfCookieName) : undefined; if (xsrfValue) { headers[config.xsrfHeaderName || defaults.xsrfHeaderName] = xsrfValue; } utils.forEach(headers, function (val, key) { // Remove Content-Type if data is undefined if (!data && key.toLowerCase() === 'content-type') { delete headers[key]; } // Otherwise add header to the request else { request.setRequestHeader(key, val); } }); // Add withCredentials to request if needed if (config.withCredentials) { request.withCredentials = true; } // Add responseType to request if needed if (config.responseType) { try { request.responseType = config.responseType; } catch (e) { if (request.responseType !== 'json') { throw e; } } } // Send the request request.send(data); }); // Provide alias for success promise.success = function success(fn) { promise.then(function(response) { fn(response); }); return promise; }; // Provide alias for error promise.error = function error(fn) { promise.then(null, function(response) { fn(response); }); return promise; }; return promise; }; // Expose defaults axios.defaults = defaults; // Provide aliases for supported request methods createShortMethods('delete', 'get', 'head'); createShortMethodsWithData('post', 'put', 'patch'); function createShortMethods() { utils.forEach(arguments, function (method) { axios[method] = function (url, config) { return axios(utils.merge(config || {}, { method: method, url: url })); }; }); } function createShortMethodsWithData() { utils.forEach(arguments, function (method) { axios[method] = function (url, data, config) { return axios(utils.merge(config || {}, { method: method, url: url, data: data })); }; }); } },{"./buildUrl":4,"./cookies":5,"./defaults":6,"./parseHeaders":7,"./transformData":8,"./urlIsSameOrigin":9,"./utils":10,"es6-promise":11}],4:[function(require,module,exports){ 'use strict'; var utils = require('./utils'); function encode(val) { return encodeURIComponent(val). replace(/%40/gi, '@'). replace(/%3A/gi, ':'). replace(/%24/g, '$'). replace(/%2C/gi, ','). replace(/%20/g, '+'); } module.exports = function buildUrl(url, params) { if (!params) { return url; } var parts = []; utils.forEach(params, function (val, key) { if (val === null || typeof val === 'undefined') { return; } if (!utils.isArray(val)) { val = [val]; } utils.forEach(val, function (v) { if (utils.isDate(v)) { v = v.toISOString(); } else if (utils.isObject(v)) { v = JSON.stringify(v); } parts.push(encode(key) + '=' + encode(v)); }); }); if (parts.length > 0) { url += (url.indexOf('?') === -1 ? '?' : '&') + parts.join('&'); } return url; }; },{"./utils":10}],5:[function(require,module,exports){ 'use strict'; var utils = require('./utils'); module.exports = { write: function write(name, value, expires, path, domain, secure) { var cookie = []; cookie.push(name + '=' + encodeURIComponent(value)); if (utils.isNumber(expires)) { cookie.push('expires=' + new Date(expires).toGMTString()); } if (utils.isString(path)) { cookie.push('path=' + path); } if (utils.isString(domain)) { cookie.push('domain=' + domain); } if (secure === true) { cookie.push('secure'); } document.cookie = cookie.join('; '); }, read: function read(name) { var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); return (match ? decodeURIComponent(match[3]) : null); }, remove: function remove(name) { this.write(name, '', Date.now() - 86400000); } }; },{"./utils":10}],6:[function(require,module,exports){ 'use strict'; var utils = require('./utils'); var JSON_START = /^\s*(\[|\{[^\{])/; var JSON_END = /[\}\]]\s*$/; var PROTECTION_PREFIX = /^\)\]\}',?\n/; var CONTENT_TYPE_APPLICATION_JSON = { 'Content-Type': 'application/json;charset=utf-8' }; module.exports = { transformRequest: [function (data) { return utils.isObject(data) && !utils.isFile(data) && !utils.isBlob(data) ? JSON.stringify(data) : null; }], transformResponse: [function (data) { if (typeof data === 'string') { data = data.replace(PROTECTION_PREFIX, ''); if (JSON_START.test(data) && JSON_END.test(data)) { data = JSON.parse(data); } } return data; }], headers: { common: { 'Accept': 'application/json, text/plain, */*' }, patch: utils.merge(CONTENT_TYPE_APPLICATION_JSON), post: utils.merge(CONTENT_TYPE_APPLICATION_JSON), put: utils.merge(CONTENT_TYPE_APPLICATION_JSON) }, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN' }; },{"./utils":10}],7:[function(require,module,exports){ 'use strict'; var utils = require('./utils'); /** * Parse headers into an object * * ``` * Date: Wed, 27 Aug 2014 08:58:49 GMT * Content-Type: application/json * Connection: keep-alive * Transfer-Encoding: chunked * ``` * * @param {String} headers Headers needing to be parsed * @returns {Object} Headers parsed into an object */ module.exports = function parseHeaders(headers) { var parsed = {}, key, val, i; if (!headers) return parsed; utils.forEach(headers.split('\n'), function(line) { i = line.indexOf(':'); key = utils.trim(line.substr(0, i)).toLowerCase(); val = utils.trim(line.substr(i + 1)); if (key) { parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; } }); return parsed; }; },{"./utils":10}],8:[function(require,module,exports){ 'use strict'; var utils = require('./utils'); /** * Transform the data for a request or a response * * @param {Object|String} data The data to be transformed * @param {Array} headers The headers for the request or response * @param {Array|Function} fns A single function or Array of functions * @returns {*} The resulting transformed data */ module.exports = function transformData(data, headers, fns) { utils.forEach(fns, function (fn) { data = fn(data, headers); }); return data; }; },{"./utils":10}],9:[function(require,module,exports){ 'use strict'; var msie = /(msie|trident)/i.test(navigator.userAgent); var utils = require('./utils'); var urlParsingNode = document.createElement('a'); var originUrl = urlResolve(window.location.href); /** * Parse a URL to discover it's components * * @param {String} url The URL to be parsed * @returns {Object} */ function urlResolve(url) { var href = url; if (msie) { // IE needs attribute set twice to normalize properties urlParsingNode.setAttribute('href', href); href = urlParsingNode.href; } urlParsingNode.setAttribute('href', href); // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils return { href: urlParsingNode.href, protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', host: urlParsingNode.host, search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', hostname: urlParsingNode.hostname, port: urlParsingNode.port, pathname: (urlParsingNode.pathname.charAt(0) === '/') ? urlParsingNode.pathname : '/' + urlParsingNode.pathname }; } /** * Determine if a URL shares the same origin as the current location * * @param {String} requestUrl The URL to test * @returns {boolean} True if URL shares the same origin, otherwise false */ module.exports = function urlIsSameOrigin(requestUrl) { var parsed = (utils.isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl; return (parsed.protocol === originUrl.protocol && parsed.host === originUrl.host); }; },{"./utils":10}],10:[function(require,module,exports){ // utils is a library of generic helper functions non-specific to axios var toString = Object.prototype.toString; /** * Determine if a value is an Array * * @param {Object} val The value to test * @returns {boolean} True if value is an Array, otherwise false */ function isArray(val) { return toString.call(val) === '[object Array]'; } /** * Determine if a value is a String * * @param {Object} val The value to test * @returns {boolean} True if value is a String, otherwise false */ function isString(val) { return typeof val === 'string'; } /** * Determine if a value is a Number * * @param {Object} val The value to test * @returns {boolean} True if value is a Number, otherwise false */ function isNumber(val) { return typeof val === 'number'; } /** * Determine if a value is an Object * * @param {Object} val The value to test * @returns {boolean} True if value is an Object, otherwise false */ function isObject(val) { return val !== null && typeof val === 'object'; } /** * Determine if a value is a Date * * @param {Object} val The value to test * @returns {boolean} True if value is a Date, otherwise false */ function isDate(val) { return toString.call(val) === '[object Date]'; } /** * Determine if a value is a File * * @param {Object} val The value to test * @returns {boolean} True if value is a File, otherwise false */ function isFile(val) { return toString.call(val) === '[object File]'; } /** * Determine if a value is a Blob * * @param {Object} val The value to test * @returns {boolean} True if value is a Blob, otherwise false */ function isBlob(val) { return toString.call(val) === '[object Blob]'; } /** * Trim excess whitespace off the beginning and end of a string * * @param {String} str The String to trim * @returns {String} The String freed of excess whitespace */ function trim(str) { return str.replace(/^\s*/, '').replace(/\s*$/, ''); } /** * Iterate over an Array or an Object invoking a function for each item. * * If `obj` is an Array or arguments callback will be called passing * the value, index, and complete array for each item. * * If 'obj' is an Object callback will be called passing * the value, key, and complete object for each property. * * @param {Object|Array} obj The object to iterate * @param {Function} fn The callback to invoke for each item */ function forEach(obj, fn) { // Don't bother if no value provided if (obj === null || typeof obj === 'undefined') { return; } // Check if obj is array-like var isArray = obj.constructor === Array || typeof obj.callee === 'function'; // Force an array if not already something iterable if (typeof obj !== 'object' && !isArray) { obj = [obj]; } // Iterate over array values if (isArray) { for (var i=0, l=obj.length; i<l; i++) { fn.call(null, obj[i], i, obj); } } // Iterate over object keys else { for (var key in obj) { if (obj.hasOwnProperty(key)) { fn.call(null, obj[key], key, obj); } } } } /** * Accepts varargs expecting each argument to be an object, then * immutably merges the properties of each object and returns result. * * When multiple objects contain the same key the later object in * the arguments list will take precedence. * * Example: * * ```js * var result = merge({foo: 123}, {foo: 456}); * console.log(result.foo); // outputs 456 * ``` * * @param {Object} obj1 Object to merge * @returns {Object} Result of all merge properties */ function merge(obj1/*, obj2, obj3, ...*/) { var result = {}; forEach(arguments, function (obj) { forEach(obj, function (val, key) { result[key] = val; }); }); return result; } module.exports = { isArray: isArray, isString: isString, isNumber: isNumber, isObject: isObject, isDate: isDate, isFile: isFile, isBlob: isBlob, forEach: forEach, merge: merge, trim: trim }; },{}],11:[function(require,module,exports){ "use strict"; var Promise = require("./promise/promise").Promise; var polyfill = require("./promise/polyfill").polyfill; exports.Promise = Promise; exports.polyfill = polyfill; },{"./promise/polyfill":15,"./promise/promise":16}],12:[function(require,module,exports){ "use strict"; /* global toString */ var isArray = require("./utils").isArray; var isFunction = require("./utils").isFunction; /** Returns a promise that is fulfilled when all the given promises have been fulfilled, or rejected if any of them become rejected. The return promise is fulfilled with an array that gives all the values in the order they were passed in the `promises` array argument. Example: ```javascript var promise1 = RSVP.resolve(1); var promise2 = RSVP.resolve(2); var promise3 = RSVP.resolve(3); var promises = [ promise1, promise2, promise3 ]; RSVP.all(promises).then(function(array){ // The array here would be [ 1, 2, 3 ]; }); ``` If any of the `promises` given to `RSVP.all` are rejected, the first promise that is rejected will be given as an argument to the returned promises's rejection handler. For example: Example: ```javascript var promise1 = RSVP.resolve(1); var promise2 = RSVP.reject(new Error("2")); var promise3 = RSVP.reject(new Error("3")); var promises = [ promise1, promise2, promise3 ]; RSVP.all(promises).then(function(array){ // Code here never runs because there are rejected promises! }, function(error) { // error.message === "2" }); ``` @method all @for RSVP @param {Array} promises @param {String} label @return {Promise} promise that is fulfilled when all `promises` have been fulfilled, or rejected if any of them become rejected. */ function all(promises) { /*jshint validthis:true */ var Promise = this; if (!isArray(promises)) { throw new TypeError('You must pass an array to all.'); } return new Promise(function(resolve, reject) { var results = [], remaining = promises.length, promise; if (remaining === 0) { resolve([]); } function resolver(index) { return function(value) { resolveAll(index, value); }; } function resolveAll(index, value) { results[index] = value; if (--remaining === 0) { resolve(results); } } for (var i = 0; i < promises.length; i++) { promise = promises[i]; if (promise && isFunction(promise.then)) { promise.then(resolver(i), reject); } else { resolveAll(i, promise); } } }); } exports.all = all; },{"./utils":20}],13:[function(require,module,exports){ (function (process,global){ "use strict"; var browserGlobal = (typeof window !== 'undefined') ? window : {}; var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver; var local = (typeof global !== 'undefined') ? global : (this === undefined? window:this); // node function useNextTick() { return function() { process.nextTick(flush); }; } function useMutationObserver() { var iterations = 0; var observer = new BrowserMutationObserver(flush); var node = document.createTextNode(''); observer.observe(node, { characterData: true }); return function() { node.data = (iterations = ++iterations % 2); }; } function useSetTimeout() { return function() { local.setTimeout(flush, 1); }; } var queue = []; function flush() { for (var i = 0; i < queue.length; i++) { var tuple = queue[i]; var callback = tuple[0], arg = tuple[1]; callback(arg); } queue = []; } var scheduleFlush; // Decide what async method to use to triggering processing of queued callbacks: if (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]') { scheduleFlush = useNextTick(); } else if (BrowserMutationObserver) { scheduleFlush = useMutationObserver(); } else { scheduleFlush = useSetTimeout(); } function asap(callback, arg) { var length = queue.push([callback, arg]); if (length === 1) { // If length is 1, that means that we need to schedule an async flush. // If additional callbacks are queued before the queue is flushed, they // will be processed by this flush that we are scheduling. scheduleFlush(); } } exports.asap = asap; }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{"_process":22}],14:[function(require,module,exports){ "use strict"; var config = { instrument: false }; function configure(name, value) { if (arguments.length === 2) { config[name] = value; } else { return config[name]; } } exports.config = config; exports.configure = configure; },{}],15:[function(require,module,exports){ (function (global){ "use strict"; /*global self*/ var RSVPPromise = require("./promise").Promise; var isFunction = require("./utils").isFunction; function polyfill() { var local; if (typeof global !== 'undefined') { local = global; } else if (typeof window !== 'undefined' && window.document) { local = window; } else { local = self; } var es6PromiseSupport = "Promise" in local && // Some of these methods are missing from // Firefox/Chrome experimental implementations "resolve" in local.Promise && "reject" in local.Promise && "all" in local.Promise && "race" in local.Promise && // Older version of the spec had a resolver object // as the arg rather than a function (function() { var resolve; new local.Promise(function(r) { resolve = r; }); return isFunction(resolve); }()); if (!es6PromiseSupport) { local.Promise = RSVPPromise; } } exports.polyfill = polyfill; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{"./promise":16,"./utils":20}],16:[function(require,module,exports){ "use strict"; var config = require("./config").config; var configure = require("./config").configure; var objectOrFunction = require("./utils").objectOrFunction; var isFunction = require("./utils").isFunction; var now = require("./utils").now; var all = require("./all").all; var race = require("./race").race; var staticResolve = require("./resolve").resolve; var staticReject = require("./reject").reject; var asap = require("./asap").asap; var counter = 0; config.async = asap; // default async is asap; function Promise(resolver) { if (!isFunction(resolver)) { throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); } if (!(this instanceof Promise)) { throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); } this._subscribers = []; invokeResolver(resolver, this); } function invokeResolver(resolver, promise) { function resolvePromise(value) { resolve(promise, value); } function rejectPromise(reason) { reject(promise, reason); } try { resolver(resolvePromise, rejectPromise); } catch(e) { rejectPromise(e); } } function invokeCallback(settled, promise, callback, detail) { var hasCallback = isFunction(callback), value, error, succeeded, failed; if (hasCallback) { try { value = callback(detail); succeeded = true; } catch(e) { failed = true; error = e; } } else { value = detail; succeeded = true; } if (handleThenable(promise, value)) { return; } else if (hasCallback && succeeded) { resolve(promise, value); } else if (failed) { reject(promise, error); } else if (settled === FULFILLED) { resolve(promise, value); } else if (settled === REJECTED) { reject(promise, value); } } var PENDING = void 0; var SEALED = 0; var FULFILLED = 1; var REJECTED = 2; function subscribe(parent, child, onFulfillment, onRejection) { var subscribers = parent._subscribers; var length = subscribers.length; subscribers[length] = child; subscribers[length + FULFILLED] = onFulfillment; subscribers[length + REJECTED] = onRejection; } function publish(promise, settled) { var child, callback, subscribers = promise._subscribers, detail = promise._detail; for (var i = 0; i < subscribers.length; i += 3) { child = subscribers[i]; callback = subscribers[i + settled]; invokeCallback(settled, child, callback, detail); } promise._subscribers = null; } Promise.prototype = { constructor: Promise, _state: undefined, _detail: undefined, _subscribers: undefined, then: function(onFulfillment, onRejection) { var promise = this; var thenPromise = new this.constructor(function() {}); if (this._state) { var callbacks = arguments; config.async(function invokePromiseCallback() { invokeCallback(promise._state, thenPromise, callbacks[promise._state - 1], promise._detail); }); } else { subscribe(this, thenPromise, onFulfillment, onRejection); } return thenPromise; }, 'catch': function(onRejection) { return this.then(null, onRejection); } }; Promise.all = all; Promise.race = race; Promise.resolve = staticResolve; Promise.reject = staticReject; function handleThenable(promise, value) { var then = null, resolved; try { if (promise === value) { throw new TypeError("A promises callback cannot return that same promise."); } if (objectOrFunction(value)) { then = value.then; if (isFunction(then)) { then.call(value, function(val) { if (resolved) { return true; } resolved = true; if (value !== val) { resolve(promise, val); } else { fulfill(promise, val); } }, function(val) { if (resolved) { return true; } resolved = true; reject(promise, val); }); return true; } } } catch (error) { if (resolved) { return true; } reject(promise, error); return true; } return false; } function resolve(promise, value) { if (promise === value) { fulfill(promise, value); } else if (!handleThenable(promise, value)) { fulfill(promise, value); } } function fulfill(promise, value) { if (promise._state !== PENDING) { return; } promise._state = SEALED; promise._detail = value; config.async(publishFulfillment, promise); } function reject(promise, reason) { if (promise._state !== PENDING) { return; } promise._state = SEALED; promise._detail = reason; config.async(publishRejection, promise); } function publishFulfillment(promise) { publish(promise, promise._state = FULFILLED); } function publishRejection(promise) { publish(promise, promise._state = REJECTED); } exports.Promise = Promise; },{"./all":12,"./asap":13,"./config":14,"./race":17,"./reject":18,"./resolve":19,"./utils":20}],17:[function(require,module,exports){ "use strict"; /* global toString */ var isArray = require("./utils").isArray; /** `RSVP.race` allows you to watch a series of promises and act as soon as the first promise given to the `promises` argument fulfills or rejects. Example: ```javascript var promise1 = new RSVP.Promise(function(resolve, reject){ setTimeout(function(){ resolve("promise 1"); }, 200); }); var promise2 = new RSVP.Promise(function(resolve, reject){ setTimeout(function(){ resolve("promise 2"); }, 100); }); RSVP.race([promise1, promise2]).then(function(result){ // result === "promise 2" because it was resolved before promise1 // was resolved. }); ``` `RSVP.race` is deterministic in that only the state of the first completed promise matters. For example, even if other promises given to the `promises` array argument are resolved, but the first completed promise has become rejected before the other promises became fulfilled, the returned promise will become rejected: ```javascript var promise1 = new RSVP.Promise(function(resolve, reject){ setTimeout(function(){ resolve("promise 1"); }, 200); }); var promise2 = new RSVP.Promise(function(resolve, reject){ setTimeout(function(){ reject(new Error("promise 2")); }, 100); }); RSVP.race([promise1, promise2]).then(function(result){ // Code here never runs because there are rejected promises! }, function(reason){ // reason.message === "promise2" because promise 2 became rejected before // promise 1 became fulfilled }); ``` @method race @for RSVP @param {Array} promises array of promises to observe @param {String} label optional string for describing the promise returned. Useful for tooling. @return {Promise} a promise that becomes fulfilled with the value the first completed promises is resolved with if the first completed promise was fulfilled, or rejected with the reason that the first completed promise was rejected with. */ function race(promises) { /*jshint validthis:true */ var Promise = this; if (!isArray(promises)) { throw new TypeError('You must pass an array to race.'); } return new Promise(function(resolve, reject) { var results = [], promise; for (var i = 0; i < promises.length; i++) { promise = promises[i]; if (promise && typeof promise.then === 'function') { promise.then(resolve, reject); } else { resolve(promise); } } }); } exports.race = race; },{"./utils":20}],18:[function(require,module,exports){ "use strict"; /** `RSVP.reject` returns a promise that will become rejected with the passed `reason`. `RSVP.reject` is essentially shorthand for the following: ```javascript var promise = new RSVP.Promise(function(resolve, reject){ reject(new Error('WHOOPS')); }); promise.then(function(value){ // Code here doesn't run because the promise is rejected! }, function(reason){ // reason.message === 'WHOOPS' }); ``` Instead of writing the above, your code now simply becomes the following: ```javascript var promise = RSVP.reject(new Error('WHOOPS')); promise.then(function(value){ // Code here doesn't run because the promise is rejected! }, function(reason){ // reason.message === 'WHOOPS' }); ``` @method reject @for RSVP @param {Any} reason value that the returned promise will be rejected with. @param {String} label optional string for identifying the returned promise. Useful for tooling. @return {Promise} a promise that will become rejected with the given `reason`. */ function reject(reason) { /*jshint validthis:true */ var Promise = this; return new Promise(function (resolve, reject) { reject(reason); }); } exports.reject = reject; },{}],19:[function(require,module,exports){ "use strict"; function resolve(value) { /*jshint validthis:true */ if (value && typeof value === 'object' && value.constructor === this) { return value; } var Promise = this; return new Promise(function(resolve) { resolve(value); }); } exports.resolve = resolve; },{}],20:[function(require,module,exports){ "use strict"; function objectOrFunction(x) { return isFunction(x) || (typeof x === "object" && x !== null); } function isFunction(x) { return typeof x === "function"; } function isArray(x) { return Object.prototype.toString.call(x) === "[object Array]"; } // Date.now is not available in browsers < IE9 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now#Compatibility var now = Date.now || function() { return new Date().getTime(); }; exports.objectOrFunction = objectOrFunction; exports.isFunction = isFunction; exports.isArray = isArray; exports.now = now; },{}],21:[function(require,module,exports){ /** * Promise polyfill v1.0.8 * requires setImmediate * * © 2014 Dmitry Korobkin * Released under the MIT license * github.com/Octane/Promise */ (function (global) {'use strict'; var setImmediate = global.setImmediate || require('timers').setImmediate; function toPromise(thenable) { if (isPromise(thenable)) { return thenable; } return new Promise(function (resolve, reject) { setImmediate(function () { try { thenable.then(resolve, reject); } catch (error) { reject(error); } }); }); } function isCallable(anything) { return 'function' == typeof anything; } function isPromise(anything) { return anything instanceof Promise; } function isThenable(anything) { return Object(anything) === anything && isCallable(anything.then); } function isSettled(promise) { return promise._fulfilled || promise._rejected; } function identity(value) { return value; } function thrower(reason) { throw reason; } function call(callback) { callback(); } function dive(thenable, onFulfilled, onRejected) { function interimOnFulfilled(value) { if (isThenable(value)) { toPromise(value).then(interimOnFulfilled, interimOnRejected); } else { onFulfilled(value); } } function interimOnRejected(reason) { if (isThenable(reason)) { toPromise(reason).then(interimOnFulfilled, interimOnRejected); } else { onRejected(reason); } } toPromise(thenable).then(interimOnFulfilled, interimOnRejected); } function Promise(resolver) { this._fulfilled = false; this._rejected = false; this._value = undefined; this._reason = undefined; this._onFulfilled = []; this._onRejected = []; this._resolve(resolver); } Promise.resolve = function (value) { if (isThenable(value)) { return toPromise(value); } return new Promise(function (resolve) { resolve(value); }); }; Promise.reject = function (reason) { return new Promise(function (resolve, reject) { reject(reason); }); }; Promise.race = function (values) { return new Promise(function (resolve, reject) { var value, length = values.length, i = 0; while (i < length) { value = values[i]; if (isThenable(value)) { dive(value, resolve, reject); } else { resolve(value); } i++; } }); }; Promise.all = function (values) { return new Promise(function (resolve, reject) { var thenables = 0, fulfilled = 0, value, length = values.length, i = 0; values = values.slice(0); while (i < length) { value = values[i]; if (isThenable(value)) { thenables++; dive( value, function (index) { return function (value) { values[index] = value; fulfilled++; if (fulfilled == thenables) { resolve(values); } }; }(i), reject ); } else { //[1, , 3] → [1, undefined, 3] values[i] = value; } i++; } if (!thenables) { resolve(values); } }); }; Promise.prototype = { constructor: Promise, _resolve: function (resolver) { var promise = this; function resolve(value) { promise._fulfill(value); } function reject(reason) { promise._reject(reason); } try { resolver(resolve, reject); } catch(error) { if (!isSettled(promise)) { reject(error); } } }, _fulfill: function (value) { if (!isSettled(this)) { this._fulfilled = true; this._value = value; this._onFulfilled.forEach(call); this._clearQueue(); } }, _reject: function (reason) { if (!isSettled(this)) { this._rejected = true; this._reason = reason; this._onRejected.forEach(call); this._clearQueue(); } }, _enqueue: function (onFulfilled, onRejected) { this._onFulfilled.push(onFulfilled); this._onRejected.push(onRejected); }, _clearQueue: function () { this._onFulfilled = []; this._onRejected = []; }, then: function (onFulfilled, onRejected) { var promise = this; onFulfilled = isCallable(onFulfilled) ? onFulfilled : identity; onRejected = isCallable(onRejected) ? onRejected : thrower; return new Promise(function (resolve, reject) { function asyncOnFulfilled() { setImmediate(function () { var value; try { value = onFulfilled(promise._value); } catch (error) { reject(error); return; } if (isThenable(value)) { toPromise(value).then(resolve, reject); } else { resolve(value); } }); } function asyncOnRejected() { setImmediate(function () { var reason; try { reason = onRejected(promise._reason); } catch (error) { reject(error); return; } if (isThenable(reason)) { toPromise(reason).then(resolve, reject); } else { resolve(reason); } }); } if (promise._fulfilled) { asyncOnFulfilled(); } else if (promise._rejected) { asyncOnRejected(); } else { promise._enqueue(asyncOnFulfilled, asyncOnRejected); } }); }, 'catch': function (onRejected) { return this.then(undefined, onRejected); } }; if ('undefined' != typeof module && module.exports) { module.exports = global.Promise || Promise; } else if (!global.Promise) { global.Promise = Promise; } }(this)); },{"timers":23}],22:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; process.nextTick = (function () { var canSetImmediate = typeof window !== 'undefined' && window.setImmediate; var canPost = typeof window !== 'undefined' && window.postMessage && window.addEventListener ; if (canSetImmediate) { return function (f) { return window.setImmediate(f) }; } if (canPost) { var queue = []; window.addEventListener('message', function (ev) { var source = ev.source; if ((source === window || source === null) && ev.data === 'process-tick') { ev.stopPropagation(); if (queue.length > 0) { var fn = queue.shift(); fn(); } } }, true); return function nextTick(fn) { queue.push(fn); window.postMessage('process-tick', '*'); }; } return function nextTick(fn) { setTimeout(fn, 0); }; })(); process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; function noop() {} process.on = noop; process.addListener = noop; process.once = noop; process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop; process.binding = function (name) { throw new Error('process.binding is not supported'); } // TODO(shtylman) process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; },{}],23:[function(require,module,exports){ var nextTick = require('process/browser.js').nextTick; var slice = Array.prototype.slice; var immediateIds = {}; var nextImmediateId = 0; // DOM APIs, for completeness if (typeof setTimeout !== 'undefined') exports.setTimeout = function() { return setTimeout.apply(window, arguments); }; if (typeof clearTimeout !== 'undefined') exports.clearTimeout = function() { clearTimeout.apply(window, arguments); }; if (typeof setInterval !== 'undefined') exports.setInterval = function() { return setInterval.apply(window, arguments); }; if (typeof clearInterval !== 'undefined') exports.clearInterval = function() { clearInterval.apply(window, arguments); }; // TODO: Change to more efficient list approach used in Node.js // For now, we just implement the APIs using the primitives above. exports.enroll = function(item, delay) { item._timeoutID = setTimeout(item._onTimeout, delay); }; exports.unenroll = function(item) { clearTimeout(item._timeoutID); }; exports.active = function(item) { // our naive impl doesn't care (correctness is still preserved) }; // That's not how node.js implements it but the exposed api is the same. exports.setImmediate = function(fn) { var id = nextImmediateId++; var args = arguments.length < 2 ? false : slice.call(arguments, 1); immediateIds[id] = true; nextTick(function onNextTick() { if (immediateIds[id]) { // fn.call() is faster so we optimize for the common use-case // @see http://jsperf.com/call-apply-segu if (args) { fn.apply(null, args); } else { fn.call(null); } // Prevent ids from leaking exports.clearImmediate(id); } }); return id; }; exports.clearImmediate = function(id) { delete immediateIds[id]; }; },{"process/browser.js":24}],24:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; process.nextTick = (function () { var canSetImmediate = typeof window !== 'undefined' && window.setImmediate; var canPost = typeof window !== 'undefined' && window.postMessage && window.addEventListener ; if (canSetImmediate) { return function (f) { return window.setImmediate(f) }; } if (canPost) { var queue = []; window.addEventListener('message', function (ev) { var source = ev.source; if ((source === window || source === null) && ev.data === 'process-tick') { ev.stopPropagation(); if (queue.length > 0) { var fn = queue.shift(); fn(); } } }, true); return function nextTick(fn) { queue.push(fn); window.postMessage('process-tick', '*'); }; } return function nextTick(fn) { setTimeout(fn, 0); }; })(); process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; process.binding = function (name) { throw new Error('process.binding is not supported'); } // TODO(shtylman) process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; },{}],25:[function(require,module,exports){ var indexOf = require('./indexOf'); /** * If array contains values. */ function contains(arr, val) { return indexOf(arr, val) !== -1; } module.exports = contains; },{"./indexOf":28}],26:[function(require,module,exports){ var makeIterator = require('../function/makeIterator_'); /** * Array filter */ function filter(arr, callback, thisObj) { callback = makeIterator(callback, thisObj); var results = []; if (arr == null) { return results; } var i = -1, len = arr.length, value; while (++i < len) { value = arr[i]; if (callback(value, i, arr)) { results.push(value); } } return results; } module.exports = filter; },{"../function/makeIterator_":34}],27:[function(require,module,exports){ /** * Array forEach */ function forEach(arr, callback, thisObj) { if (arr == null) { return; } var i = -1, len = arr.length; while (++i < len) { // we iterate over sparse items since there is no way to make it // work properly on IE 7-8. see #64 if ( callback.call(thisObj, arr[i], i, arr) === false ) { break; } } } module.exports = forEach; },{}],28:[function(require,module,exports){ /** * Array.indexOf */ function indexOf(arr, item, fromIndex) { fromIndex = fromIndex || 0; if (arr == null) { return -1; } var len = arr.length, i = fromIndex < 0 ? len + fromIndex : fromIndex; while (i < len) { // we iterate over sparse items since there is no way to make it // work properly on IE 7-8. see #64 if (arr[i] === item) { return i; } i++; } return -1; } module.exports = indexOf; },{}],29:[function(require,module,exports){ var filter = require('./filter'); function isValidString(val) { return (val != null && val !== ''); } /** * Joins strings with the specified separator inserted between each value. * Null values and empty strings will be excluded. */ function join(items, separator) { separator = separator || ''; return filter(items, isValidString).join(separator); } module.exports = join; },{"./filter":26}],30:[function(require,module,exports){ /** * Create slice of source array or array-like object */ function slice(arr, start, end){ var len = arr.length; if (start == null) { start = 0; } else if (start < 0) { start = Math.max(len + start, 0); } else { start = Math.min(start, len); } if (end == null) { end = len; } else if (end < 0) { end = Math.max(len + end, 0); } else { end = Math.min(end, len); } var result = []; while (start < end) { result.push(arr[start++]); } return result; } module.exports = slice; },{}],31:[function(require,module,exports){ /** * Merge sort (http://en.wikipedia.org/wiki/Merge_sort) */ function mergeSort(arr, compareFn) { if (arr == null) { return []; } else if (arr.length < 2) { return arr; } if (compareFn == null) { compareFn = defaultCompare; } var mid, left, right; mid = ~~(arr.length / 2); left = mergeSort( arr.slice(0, mid), compareFn ); right = mergeSort( arr.slice(mid, arr.length), compareFn ); return merge(left, right, compareFn); } function defaultCompare(a, b) { return a < b ? -1 : (a > b? 1 : 0); } function merge(left, right, compareFn) { var result = []; while (left.length && right.length) { if (compareFn(left[0], right[0]) <= 0) { // if 0 it should preserve same order (stable) result.push(left.shift()); } else { result.push(right.shift()); } } if (left.length) { result.push.apply(result, left); } if (right.length) { result.push.apply(result, right); } return result; } module.exports = mergeSort; },{}],32:[function(require,module,exports){ var isFunction = require('../lang/isFunction'); /** * Creates an object that holds a lookup for the objects in the array. */ function toLookup(arr, key) { var result = {}; if (arr == null) { return result; } var i = -1, len = arr.length, value; if (isFunction(key)) { while (++i < len) { value = arr[i]; result[key(value)] = value; } } else { while (++i < len) { value = arr[i]; result[value[key]] = value; } } return result; } module.exports = toLookup; },{"../lang/isFunction":41}],33:[function(require,module,exports){ /** * Returns the first argument provided to it. */ function identity(val){ return val; } module.exports = identity; },{}],34:[function(require,module,exports){ var identity = require('./identity'); var prop = require('./prop'); var deepMatches = require('../object/deepMatches'); /** * Converts argument into a valid iterator. * Used internally on most array/object/collection methods that receives a * callback/iterator providing a shortcut syntax. */ function makeIterator(src, thisObj){ if (src == null) { return identity; } switch(typeof src) { case 'function': // function is the first to improve perf (most common case) // also avoid using `Function#call` if not needed, which boosts // perf a lot in some cases return (typeof thisObj !== 'undefined')? function(val, i, arr){ return src.call(thisObj, val, i, arr); } : src; case 'object': return function(val){ return deepMatches(val, src); }; case 'string': case 'number': return prop(src); } } module.exports = makeIterator; },{"../object/deepMatches":49,"./identity":33,"./prop":35}],35:[function(require,module,exports){ /** * Returns a function that gets a property of the passed object */ function prop(name){ return function(obj){ return obj[name]; }; } module.exports = prop; },{}],36:[function(require,module,exports){ var kindOf = require('./kindOf'); var isPlainObject = require('./isPlainObject'); var mixIn = require('../object/mixIn'); /** * Clone native types. */ function clone(val){ switch (kindOf(val)) { case 'Object': return cloneObject(val); case 'Array': return cloneArray(val); case 'RegExp': return cloneRegExp(val); case 'Date': return cloneDate(val); default: return val; } } function cloneObject(source) { if (isPlainObject(source)) { return mixIn({}, source); } else { return source; } } function cloneRegExp(r) { var flags = ''; flags += r.multiline ? 'm' : ''; flags += r.global ? 'g' : ''; flags += r.ignorecase ? 'i' : ''; return new RegExp(r.source, flags); } function cloneDate(date) { return new Date(+date); } function cloneArray(arr) { return arr.slice(); } module.exports = clone; },{"../object/mixIn":55,"./isPlainObject":45,"./kindOf":47}],37:[function(require,module,exports){ var clone = require('./clone'); var forOwn = require('../object/forOwn'); var kindOf = require('./kindOf'); var isPlainObject = require('./isPlainObject'); /** * Recursively clone native types. */ function deepClone(val, instanceClone) { switch ( kindOf(val) ) { case 'Object': return cloneObject(val, instanceClone); case 'Array': return cloneArray(val, instanceClone); default: return clone(val); } } function cloneObject(source, instanceClone) { if (isPlainObject(source)) { var out = {}; forOwn(source, function(val, key) { this[key] = deepClone(val, instanceClone); }, out); return out; } else if (instanceClone) { return instanceClone(source); } else { return source; } } function cloneArray(arr, instanceClone) { var out = [], i = -1, n = arr.length, val; while (++i < n) { out[i] = deepClone(arr[i], instanceClone); } return out; } module.exports = deepClone; },{"../object/forOwn":52,"./clone":36,"./isPlainObject":45,"./kindOf":47}],38:[function(require,module,exports){ var isKind = require('./isKind'); /** */ var isArray = Array.isArray || function (val) { return isKind(val, 'Array'); }; module.exports = isArray; },{"./isKind":42}],39:[function(require,module,exports){ var isKind = require('./isKind'); /** */ function isBoolean(val) { return isKind(val, 'Boolean'); } module.exports = isBoolean; },{"./isKind":42}],40:[function(require,module,exports){ var forOwn = require('../object/forOwn'); var isArray = require('./isArray'); function isEmpty(val){ if (val == null) { // typeof null == 'object' so we check it first return true; } else if ( typeof val === 'string' || isArray(val) ) { return !val.length; } else if ( typeof val === 'object' ) { var result = true; forOwn(val, function(){ result = false; return false; // break loop }); return result; } else { return true; } } module.exports = isEmpty; },{"../object/forOwn":52,"./isArray":38}],41:[function(require,module,exports){ var isKind = require('./isKind'); /** */ function isFunction(val) { return isKind(val, 'Function'); } module.exports = isFunction; },{"./isKind":42}],42:[function(require,module,exports){ var kindOf = require('./kindOf'); /** * Check if value is from a specific "kind". */ function isKind(val, kind){ return kindOf(val) === kind; } module.exports = isKind; },{"./kindOf":47}],43:[function(require,module,exports){ var isKind = require('./isKind'); /** */ function isNumber(val) { return isKind(val, 'Number'); } module.exports = isNumber; },{"./isKind":42}],44:[function(require,module,exports){ var isKind = require('./isKind'); /** */ function isObject(val) { return isKind(val, 'Object'); } module.exports = isObject; },{"./isKind":42}],45:[function(require,module,exports){ /** * Checks if the value is created by the `Object` constructor. */ function isPlainObject(value) { return (!!value && typeof value === 'object' && value.constructor === Object); } module.exports = isPlainObject; },{}],46:[function(require,module,exports){ var isKind = require('./isKind'); /** */ function isString(val) { return isKind(val, 'String'); } module.exports = isString; },{"./isKind":42}],47:[function(require,module,exports){ var _rKind = /^\[object (.*)\]$/, _toString = Object.prototype.toString, UNDEF; /** * Gets the "kind" of value. (e.g. "String", "Number", etc) */ function kindOf(val) { if (val === null) { return 'Null'; } else if (val === UNDEF) { return 'Undefined'; } else { return _rKind.exec( _toString.call(val) )[1]; } } module.exports = kindOf; },{}],48:[function(require,module,exports){ /** * Typecast a value to a String, using an empty string value for null or * undefined. */ function toString(val){ return val == null ? '' : val.toString(); } module.exports = toString; },{}],49:[function(require,module,exports){ var forOwn = require('./forOwn'); var isArray = require('../lang/isArray'); function containsMatch(array, pattern) { var i = -1, length = array.length; while (++i < length) { if (deepMatches(array[i], pattern)) { return true; } } return false; } function matchArray(target, pattern) { var i = -1, patternLength = pattern.length; while (++i < patternLength) { if (!containsMatch(target, pattern[i])) { return false; } } return true; } function matchObject(target, pattern) { var result = true; forOwn(pattern, function(val, key) { if (!deepMatches(target[key], val)) { // Return false to break out of forOwn early return (result = false); } }); return result; } /** * Recursively check if the objects match. */ function deepMatches(target, pattern){ if (target && typeof target === 'object') { if (isArray(target) && isArray(pattern)) { return matchArray(target, pattern); } else { return matchObject(target, pattern); } } else { return target === pattern; } } module.exports = deepMatches; },{"../lang/isArray":38,"./forOwn":52}],50:[function(require,module,exports){ var forOwn = require('./forOwn'); var isPlainObject = require('../lang/isPlainObject'); /** * Mixes objects into the target object, recursively mixing existing child * objects. */ function deepMixIn(target, objects) { var i = 0, n = arguments.length, obj; while(++i < n){ obj = arguments[i]; if (obj) { forOwn(obj, copyProp, target); } } return target; } function copyProp(val, key) { var existing = this[key]; if (isPlainObject(val) && isPlainObject(existing)) { deepMixIn(existing, val); } else { this[key] = val; } } module.exports = deepMixIn; },{"../lang/isPlainObject":45,"./forOwn":52}],51:[function(require,module,exports){ var hasOwn = require('./hasOwn'); var _hasDontEnumBug, _dontEnums; function checkDontEnum(){ _dontEnums = [ 'toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor' ]; _hasDontEnumBug = true; for (var key in {'toString': null}) { _hasDontEnumBug = false; } } /** * Similar to Array/forEach but works over object properties and fixes Don't * Enum bug on IE. * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation */ function forIn(obj, fn, thisObj){ var key, i = 0; // no need to check if argument is a real object that way we can use // it for arrays, functions, date, etc. //post-pone check till needed if (_hasDontEnumBug == null) checkDontEnum(); for (key in obj) { if (exec(fn, obj, key, thisObj) === false) { break; } } if (_hasDontEnumBug) { var ctor = obj.constructor, isProto = !!ctor && obj === ctor.prototype; while (key = _dontEnums[i++]) { // For constructor, if it is a prototype object the constructor // is always non-enumerable unless defined otherwise (and // enumerated above). For non-prototype objects, it will have // to be defined on this object, since it cannot be defined on // any prototype objects. // // For other [[DontEnum]] properties, check if the value is // different than Object prototype value. if ( (key !== 'constructor' || (!isProto && hasOwn(obj, key))) && obj[key] !== Object.prototype[key] ) { if (exec(fn, obj, key, thisObj) === false) { break; } } } } } function exec(fn, obj, key, thisObj){ return fn.call(thisObj, obj[key], key, obj); } module.exports = forIn; },{"./hasOwn":53}],52:[function(require,module,exports){ var hasOwn = require('./hasOwn'); var forIn = require('./forIn'); /** * Similar to Array/forEach but works over object properties and fixes Don't * Enum bug on IE. * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation */ function forOwn(obj, fn, thisObj){ forIn(obj, function(val, key){ if (hasOwn(obj, key)) { return fn.call(thisObj, obj[key], key, obj); } }); } module.exports = forOwn; },{"./forIn":51,"./hasOwn":53}],53:[function(require,module,exports){ /** * Safer Object.hasOwnProperty */ function hasOwn(obj, prop){ return Object.prototype.hasOwnProperty.call(obj, prop); } module.exports = hasOwn; },{}],54:[function(require,module,exports){ var hasOwn = require('./hasOwn'); var deepClone = require('../lang/deepClone'); var isObject = require('../lang/isObject'); /** * Deep merge objects. */ function merge() { var i = 1, key, val, obj, target; // make sure we don't modify source element and it's properties // objects are passed by reference target = deepClone( arguments[0] ); while (obj = arguments[i++]) { for (key in obj) { if ( ! hasOwn(obj, key) ) { continue; } val = obj[key]; if ( isObject(val) && isObject(target[key]) ){ // inception, deep merge objects target[key] = merge(target[key], val); } else { // make sure arrays, regexp, date, objects are cloned target[key] = deepClone(val); } } } return target; } module.exports = merge; },{"../lang/deepClone":37,"../lang/isObject":44,"./hasOwn":53}],55:[function(require,module,exports){ var forOwn = require('./forOwn'); /** * Combine properties from all the objects into first one. * - This method affects target object in place, if you want to create a new Object pass an empty object as first param. * @param {object} target Target Object * @param {...object} objects Objects to be combined (0...n objects). * @return {object} Target Object. */ function mixIn(target, objects){ var i = 0, n = arguments.length, obj; while(++i < n){ obj = arguments[i]; if (obj != null) { forOwn(obj, copyProp, target); } } return target; } function copyProp(val, key){ this[key] = val; } module.exports = mixIn; },{"./forOwn":52}],56:[function(require,module,exports){ var forEach = require('../array/forEach'); /** * Create nested object if non-existent */ function namespace(obj, path){ if (!path) return obj; forEach(path.split('.'), function(key){ if (!obj[key]) { obj[key] = {}; } obj = obj[key]; }); return obj; } module.exports = namespace; },{"../array/forEach":27}],57:[function(require,module,exports){ var slice = require('../array/slice'); /** * Return a copy of the object, filtered to only have values for the whitelisted keys. */ function pick(obj, var_keys){ var keys = typeof arguments[1] !== 'string'? arguments[1] : slice(arguments, 1), out = {}, i = 0, key; while (key = keys[i++]) { out[key] = obj[key]; } return out; } module.exports = pick; },{"../array/slice":30}],58:[function(require,module,exports){ var namespace = require('./namespace'); /** * set "nested" object property */ function set(obj, prop, val){ var parts = (/^(.+)\.(.+)$/).exec(prop); if (parts){ namespace(obj, parts[1])[parts[2]] = val; } else { obj[prop] = val; } } module.exports = set; },{"./namespace":56}],59:[function(require,module,exports){ var toString = require('../lang/toString'); var replaceAccents = require('./replaceAccents'); var removeNonWord = require('./removeNonWord'); var upperCase = require('./upperCase'); var lowerCase = require('./lowerCase'); /** * Convert string to camelCase text. */ function camelCase(str){ str = toString(str); str = replaceAccents(str); str = removeNonWord(str) .replace(/[\-_]/g, ' ') //convert all hyphens and underscores to spaces .replace(/\s[a-z]/g, upperCase) //convert first char of each word to UPPERCASE .replace(/\s+/g, '') //remove spaces .replace(/^[A-Z]/g, lowerCase); //convert first char to lowercase return str; } module.exports = camelCase; },{"../lang/toString":48,"./lowerCase":60,"./removeNonWord":63,"./replaceAccents":64,"./upperCase":65}],60:[function(require,module,exports){ var toString = require('../lang/toString'); /** * "Safer" String.toLowerCase() */ function lowerCase(str){ str = toString(str); return str.toLowerCase(); } module.exports = lowerCase; },{"../lang/toString":48}],61:[function(require,module,exports){ var join = require('../array/join'); var slice = require('../array/slice'); /** * Group arguments as path segments, if any of the args is `null` or an * empty string it will be ignored from resulting path. */ function makePath(var_args){ var result = join(slice(arguments), '/'); // need to disconsider duplicate '/' after protocol (eg: 'http://') return result.replace(/([^:\/]|^)\/{2,}/g, '$1/'); } module.exports = makePath; },{"../array/join":29,"../array/slice":30}],62:[function(require,module,exports){ var toString = require('../lang/toString'); var camelCase = require('./camelCase'); var upperCase = require('./upperCase'); /** * camelCase + UPPERCASE first char */ function pascalCase(str){ str = toString(str); return camelCase(str).replace(/^[a-z]/, upperCase); } module.exports = pascalCase; },{"../lang/toString":48,"./camelCase":59,"./upperCase":65}],63:[function(require,module,exports){ var toString = require('../lang/toString'); // This pattern is generated by the _build/pattern-removeNonWord.js script var PATTERN = /[^\x20\x2D0-9A-Z\x5Fa-z\xC0-\xD6\xD8-\xF6\xF8-\xFF]/g; /** * Remove non-word chars. */ function removeNonWord(str){ str = toString(str); return str.replace(PATTERN, ''); } module.exports = removeNonWord; },{"../lang/toString":48}],64:[function(require,module,exports){ var toString = require('../lang/toString'); /** * Replaces all accented chars with regular ones */ function replaceAccents(str){ str = toString(str); // verifies if the String has accents and replace them if (str.search(/[\xC0-\xFF]/g) > -1) { str = str .replace(/[\xC0-\xC5]/g, "A") .replace(/[\xC6]/g, "AE") .replace(/[\xC7]/g, "C") .replace(/[\xC8-\xCB]/g, "E") .replace(/[\xCC-\xCF]/g, "I") .replace(/[\xD0]/g, "D") .replace(/[\xD1]/g, "N") .replace(/[\xD2-\xD6\xD8]/g, "O") .replace(/[\xD9-\xDC]/g, "U") .replace(/[\xDD]/g, "Y") .replace(/[\xDE]/g, "P") .replace(/[\xE0-\xE5]/g, "a") .replace(/[\xE6]/g, "ae") .replace(/[\xE7]/g, "c") .replace(/[\xE8-\xEB]/g, "e") .replace(/[\xEC-\xEF]/g, "i") .replace(/[\xF1]/g, "n") .replace(/[\xF2-\xF6\xF8]/g, "o") .replace(/[\xF9-\xFC]/g, "u") .replace(/[\xFE]/g, "p") .replace(/[\xFD\xFF]/g, "y"); } return str; } module.exports = replaceAccents; },{"../lang/toString":48}],65:[function(require,module,exports){ var toString = require('../lang/toString'); /** * "Safer" String.toUpperCase() */ function upperCase(str){ str = toString(str); return str.toUpperCase(); } module.exports = upperCase; },{"../lang/toString":48}],66:[function(require,module,exports){ var DSUtils = require('../utils'); function Defaults() { } /** * @doc property * @id DSHttpAdapter.properties:defaults.queryTransform * @name defaults.queryTransform * @description * Transform the js-data query to something your server understands. You might just do this on the server instead. * * ## Example: * ```js * DSHttpAdapter.defaults.queryTransform = function (resourceName, params) { * if (params && params.userId) { * params.user_id = params.userId; * delete params.userId; * } * return params; * }; * ``` * * @param {string} resourceName The name of the resource. * @param {object} params Params that will be passed to `http`. * @returns {*} By default just returns `params` as-is. */ Defaults.prototype.queryTransform = function (resourceName, params) { return params; }; /** * @doc property * @id DSHttpAdapter.properties:defaults.httpConfig * @name defaults.httpConfig * @description * Default http configuration options used whenever `DSHttpAdapter` uses `http`. * * ## Example: * ```js * var dsHttpAdapter = new DSHttpAdapter({ * httpConfig: { * headers: { * Authorization: 'Basic YmVlcDpib29w' * }, * timeout: 20000 * }); * }); * ``` */ Defaults.prototype.httpConfig = {}; /** * @doc constructor * @id DSHttpAdapter * @name DSHttpAdapter * @description * Default adapter used by js-data. This adapter uses AJAX and JSON to send/retrieve data to/from a server. * Developers may provide custom adapters that implement the adapter interface. */ function DSHttpAdapter(options) { /** * @doc property * @id DSHttpAdapter.properties:defaults * @name defaults * @description * Reference to [DSHttpAdapter.defaults](/documentation/api/api/DSHttpAdapter.properties:defaults). */ this.defaults = new Defaults(); DSUtils.deepMixIn(this.defaults, options); } /** * @doc method * @id DSHttpAdapter.methods:HTTP * @name HTTP * @description * A wrapper for `http()`. * * ## Signature: * ```js * DSHttpAdapter.HTTP(config) * ``` * * @param {object} config Configuration object. * @returns {Promise} Promise. */ DSHttpAdapter.prototype.HTTP = function (config) { var start = new Date().getTime(); config = DSUtils.deepMixIn(config, this.defaults.httpConfig); return DSUtils.http(config).then(function (data) { console.log(config.method + ' request:' + config.url + ' Time taken: ' + (new Date().getTime() - start) + 'ms', arguments); return data; }); }; /** * @doc method * @id DSHttpAdapter.methods:GET * @name GET * @description * A wrapper for `http.get()`. * * ## Signature: * ```js * DSHttpAdapter.GET(url[, config]) * ``` * * @param {string} url The url of the request. * @param {object=} config Optional configuration. * @returns {Promise} Promise. */ DSHttpAdapter.prototype.GET = function (url, config) { config = config || {}; if (!('method' in config)) { config.method = 'get'; } return this.HTTP(DSUtils.deepMixIn(config, { url: url })); }; /** * @doc method * @id DSHttpAdapter.methods:POST * @name POST * @description * A wrapper for `http.post()`. * * ## Signature: * ```js * DSHttpAdapter.POST(url[, attrs][, config]) * ``` * * @param {string} url The url of the request. * @param {object=} attrs Request payload. * @param {object=} config Optional configuration. * @returns {Promise} Promise. */ DSHttpAdapter.prototype.POST = function (url, attrs, config) { config = config || {}; if (!('method' in config)) { config.method = 'post'; } return this.HTTP(DSUtils.deepMixIn(config, { url: url, data: attrs })); }; /** * @doc method * @id DSHttpAdapter.methods:PUT * @name PUT * @description * A wrapper for `http.put()`. * * ## Signature: * ```js * DSHttpAdapter.PUT(url[, attrs][, config]) * ``` * * @param {string} url The url of the request. * @param {object=} attrs Request payload. * @param {object=} config Optional configuration. * @returns {Promise} Promise. */ DSHttpAdapter.prototype.PUT = function (url, attrs, config) { config = config || {}; if (!('method' in config)) { config.method = 'put'; } return this.HTTP(DSUtils.deepMixIn(config, { url: url, data: attrs || {} })); }; /** * @doc method * @id DSHttpAdapter.methods:DEL * @name DEL * @description * A wrapper for `http.delete()`. * * ## Signature: * ```js * DSHttpAdapter.DEL(url[, config]) * ``` * * @param {string} url The url of the request. * @param {object=} config Optional configuration. * @returns {Promise} Promise. */ DSHttpAdapter.prototype.DEL = function (url, config) { config = config || {}; if (!('method' in config)) { config.method = 'delete'; } return this.HTTP(DSUtils.deepMixIn(config, { url: url })); }; /** * @doc method * @id DSHttpAdapter.methods:find * @name find * @description * Retrieve a single entity from the server. * * Makes a `GET` request. * * ## Signature: * ```js * DSHttpAdapter.find(resourceConfig, id[, options]) * ``` * * @param {object} resourceConfig DS resource definition object: * @param {string|number} id Primary key of the entity to update. * @param {object=} options Optional configuration. Also passed along to `http([config])`. Properties: * * - `{string=}` - `baseUrl` - Override the default base url. * - `{string=}` - `endpoint` - Override the default endpoint. * - `{object=}` - `params` - Additional query string parameters to add to the url. * * @returns {Promise} Promise. */ DSHttpAdapter.prototype.find = function (resourceConfig, id, options) { options = options || {}; return this.GET( DSUtils.makePath(options.baseUrl || resourceConfig.baseUrl, resourceConfig.getEndpoint(id, options), id), options ); }; /** * @doc method * @id DSHttpAdapter.methods:findAll * @name findAll * @description * Retrieve a collection of entities from the server. * * Makes a `GET` request. * * ## Signature: * ```js * DSHttpAdapter.findAll(resourceConfig[, params][, options]) * ``` * * @param {object} resourceConfig DS resource definition object: * @param {object=} params Search query parameters. See the [query guide](/documentation/guide/queries/index). * @param {object=} options Optional configuration. Also passed along to `http([config])`. Properties: * * - `{string=}` - `baseUrl` - Override the default base url. * - `{string=}` - `endpoint` - Override the default endpoint. * - `{object=}` - `params` - Additional query string parameters to add to the url. * * @returns {Promise} Promise. */ DSHttpAdapter.prototype.findAll = function (resourceConfig, params, options) { options = options || {}; options.params = options.params || {}; if (params) { params = this.defaults.queryTransform(resourceConfig.name, params); DSUtils.deepMixIn(options.params, params); } return this.GET( DSUtils.makePath(options.baseUrl || resourceConfig.baseUrl, resourceConfig.getEndpoint(null, options)), options ); }; /** * @doc method * @id DSHttpAdapter.methods:create * @name create * @description * Create a new entity on the server. * * Makes a `POST` request. * * ## Signature: * ```js * DSHttpAdapter.create(resourceConfig, attrs[, options]) * ``` * * @param {object} resourceConfig DS resource definition object: * @param {object} attrs The attribute payload. * @param {object=} options Optional configuration. Also passed along to `http([config])`. Properties: * * - `{string=}` - `baseUrl` - Override the default base url. * - `{string=}` - `endpoint` - Override the default endpoint. * - `{object=}` - `params` - Additional query string parameters to add to the url. * * @returns {Promise} Promise. */ DSHttpAdapter.prototype.create = function (resourceConfig, attrs, options) { options = options || {}; return this.POST( DSUtils.makePath(options.baseUrl || resourceConfig.baseUrl, resourceConfig.getEndpoint(attrs, options)), attrs, options ); }; /** * @doc method * @id DSHttpAdapter.methods:update * @name update * @description * Update an entity on the server. * * Makes a `PUT` request. * * ## Signature: * ```js * DSHttpAdapter.update(resourceConfig, id, attrs[, options]) * ``` * * @param {object} resourceConfig DS resource definition object: * @param {string|number} id Primary key of the entity to update. * @param {object} attrs The attribute payload. * @param {object=} options Optional configuration. Also passed along to `http([config])`. Properties: * * - `{string=}` - `baseUrl` - Override the default base url. * - `{string=}` - `endpoint` - Override the default endpoint. * - `{object=}` - `params` - Additional query string parameters to add to the url. * * @returns {Promise} Promise. */ DSHttpAdapter.prototype.update = function (resourceConfig, id, attrs, options) { options = options || {}; return this.PUT( DSUtils.makePath(options.baseUrl || resourceConfig.baseUrl, resourceConfig.getEndpoint(id, options), id), attrs, options ); }; /** * @doc method * @id DSHttpAdapter.methods:updateAll * @name updateAll * @description * Update a collection of entities on the server. * * Makes a `PUT` request. * * ## Signature: * ```js * DSHttpAdapter.updateAll(resourceConfig, attrs[, params][, options]) * ``` * * @param {object} resourceConfig DS resource definition object: * @param {object} attrs The attribute payload. * @param {object=} params Search query parameters. See the [query guide](/documentation/guide/queries/index). * @param {object=} options Optional configuration. Also passed along to `http([config])`. Properties: * * - `{string=}` - `baseUrl` - Override the default base url. * - `{string=}` - `endpoint` - Override the default endpoint. * - `{object=}` - `params` - Additional query string parameters to add to the url. * * @returns {Promise} Promise. */ DSHttpAdapter.prototype.updateAll = function (resourceConfig, attrs, params, options) { options = options || {}; options.params = options.params || {}; if (params) { params = this.defaults.queryTransform(resourceConfig.name, params); DSUtils.deepMixIn(options.params, params); } return this.PUT( DSUtils.makePath(options.baseUrl || resourceConfig.baseUrl, resourceConfig.getEndpoint(null, options)), attrs, options ); }; /** * @doc method * @id DSHttpAdapter.methods:destroy * @name destroy * @description * Delete an entity on the server. * * Makes a `DELETE` request. * * ## Signature: * ```js * DSHttpAdapter.destroy(resourceConfig, id[, options) * ``` * * @param {object} resourceConfig DS resource definition object: * @param {string|number} id Primary key of the entity to update. * @param {object=} options Optional configuration. Also passed along to `http([config])`. Properties: * * - `{string=}` - `baseUrl` - Override the default base url. * - `{string=}` - `endpoint` - Override the default endpoint. * - `{object=}` - `params` - Additional query string parameters to add to the url. * * @returns {Promise} Promise. */ DSHttpAdapter.prototype.destroy = function (resourceConfig, id, options) { options = options || {}; return this.DEL( DSUtils.makePath(options.baseUrl || resourceConfig.baseUrl, resourceConfig.getEndpoint(id, options), id), options ); }; /** * @doc method * @id DSHttpAdapter.methods:destroyAll * @name destroyAll * @description * Delete a collection of entities on the server. * * Makes `DELETE` request. * * ## Signature: * ```js * DSHttpAdapter.destroyAll(resourceConfig[, params][, options]) * ``` * * @param {object} resourceConfig DS resource definition object: * @param {object=} params Search query parameters. See the [query guide](/documentation/guide/queries/index). * @param {object=} options Optional configuration. Also passed along to `http([config])`. Properties: * * - `{string=}` - `baseUrl` - Override the default base url. * - `{string=}` - `endpoint` - Override the default endpoint. * - `{object=}` - `params` - Additional query string parameters to add to the url. * * @returns {Promise} Promise. */ DSHttpAdapter.prototype.destroyAll = function (resourceConfig, params, options) { options = options || {}; options.params = options.params || {}; if (params) { params = this.defaults.queryTransform(resourceConfig.name, params); DSUtils.deepMixIn(options.params, params); } return this.DEL( DSUtils.makePath(options.baseUrl || resourceConfig.baseUrl, resourceConfig.getEndpoint(null, options)), options ); }; module.exports = DSHttpAdapter; },{"../utils":101}],67:[function(require,module,exports){ var DSUtils = require('../utils'); var DSErrors = require('../errors'); /** * @doc constructor * @id DSLocalStorageAdapter * @name DSLocalStorageAdapter * @description * Adapter that uses `localStorage` as its persistence layer. The localStorage adapter does not support operations * on collections because localStorage itself is a key-value store. */ function DSLocalStorageAdapter() { } /** * @doc method * @id DSLocalStorageAdapter.methods:GET * @name GET * @description * An asynchronous wrapper for `localStorage.getItem(key)`. * * ## Signature: * ```js * DSLocalStorageAdapter.GET(key) * ``` * * @param {string} key The key path of the item to retrieve. * @returns {Promise} Promise. */ DSLocalStorageAdapter.prototype.GET = function (key) { return new DSUtils.Promise(function (resolve) { var item = localStorage.getItem(key); resolve(item ? DSUtils.fromJson(item) : undefined); }); }; /** * @doc method * @id DSLocalStorageAdapter.methods:PUT * @name PUT * @description * An asynchronous wrapper for `localStorage.setItem(key, value)`. * * ## Signature: * ```js * DSLocalStorageAdapter.PUT(key, value) * ``` * * @param {string} key The key to update. * @param {object} value Attributes to put. * @returns {Promise} Promise. */ DSLocalStorageAdapter.prototype.PUT = function (key, value) { var DSLocalStorageAdapter = this; return DSLocalStorageAdapter.GET(key).then(function (item) { if (item) { DSUtils.deepMixIn(item, value); } localStorage.setItem(key, DSUtils.toJson(item || value)); return DSLocalStorageAdapter.GET(key); }); }; /** * @doc method * @id DSLocalStorageAdapter.methods:DEL * @name DEL * @description * An asynchronous wrapper for `localStorage.removeItem(key)`. * * ## Signature: * ```js * DSLocalStorageAdapter.DEL(key) * ``` * * @param {string} key The key to remove. * @returns {Promise} Promise. */ DSLocalStorageAdapter.prototype.DEL = function (key) { return new DSUtils.Promise(function (resolve) { localStorage.removeItem(key); resolve(); }); }; /** * @doc method * @id DSLocalStorageAdapter.methods:find * @name find * @description * Retrieve a single entity from localStorage. * * ## Signature: * ```js * DSLocalStorageAdapter.find(resourceConfig, id[, options]) * ``` * * ## Example: * ```js * DS.find('user', 5, { * adapter: 'DSLocalStorageAdapter' * }).then(function (user) { * user; // { id: 5, ... } * }); * ``` * * @param {object} resourceConfig DS resource definition object: * @param {string|number} id Primary key of the entity to retrieve. * @param {object=} options Optional configuration. Properties: * * - `{string=}` - `baseUrl` - Base path to use. * * @returns {Promise} Promise. */ DSLocalStorageAdapter.prototype.find = function find(resourceConfig, id, options) { options = options || {}; return this.GET(DSUtils.makePath(options.baseUrl || resourceConfig.baseUrl, resourceConfig.endpoint, id)); }; /** * @doc method * @id DSLocalStorageAdapter.methods:findAll * @name findAll * @description * Not supported. */ DSLocalStorageAdapter.prototype.findAll = function () { throw new Error('DSLocalStorageAdapter.findAll is not supported!'); }; /** * @doc method * @id DSLocalStorageAdapter.methods:create * @name create * @description * Create an entity in `localStorage`. You must generate the primary key and include it in the `attrs` object. * * ## Signature: * ```js * DSLocalStorageAdapter.create(resourceConfig, attrs[, options]) * ``` * * ## Example: * ```js * DS.create('user', { * id: 1, * name: 'john' * }, { * adapter: 'DSLocalStorageAdapter' * }).then(function (user) { * user; // { id: 1, name: 'john' } * }); * ``` * * @param {object} resourceConfig DS resource definition object: * @param {object} attrs Attributes to create in localStorage. * @param {object=} options Optional configuration. Properties: * * - `{string=}` - `baseUrl` - Base path to use. * * @returns {Promise} Promise. */ DSLocalStorageAdapter.prototype.create = function (resourceConfig, attrs, options) { if (!(resourceConfig.idAttribute in attrs)) { throw new DSErrors.IA('DSLocalStorageAdapter.create: You must provide a primary key in the attrs object!'); } options = options || {}; return this.PUT( DSUtils.makePath(options.baseUrl || resourceConfig.baseUrl, resourceConfig.getEndpoint(attrs, options), attrs[resourceConfig.idAttribute]), attrs ); }; /** * @doc method * @id DSLocalStorageAdapter.methods:update * @name update * @description * Update an entity in localStorage. * * ## Signature: * ```js * DSLocalStorageAdapter.update(resourceConfig, id, attrs[, options]) * ``` * * ## Example: * ```js * DS.update('user', 5, { * name: 'john' * }, { * adapter: 'DSLocalStorageAdapter' * }).then(function (user) { * user; // { id: 5, ... } * }); * ``` * * @param {object} resourceConfig DS resource definition object: * @param {string|number} id Primary key of the entity to retrieve. * @param {object} attrs Attributes with which to update the entity. * @param {object=} options Optional configuration. Properties: * * - `{string=}` - `baseUrl` - Base path to use. * * @returns {Promise} Promise. */ DSLocalStorageAdapter.prototype.update = function (resourceConfig, id, attrs, options) { options = options || {}; return this.PUT(DSUtils.makePath(options.baseUrl || resourceConfig.baseUrl, resourceConfig.getEndpoint(id, options), id), attrs); }; /** * @doc method * @id DSLocalStorageAdapter.methods:updateAll * @name updateAll * @description * Not supported. */ DSLocalStorageAdapter.prototype.updateAll = function () { throw new Error('DSLocalStorageAdapter.updateAll is not supported!'); }; /** * @doc method * @id DSLocalStorageAdapter.methods:destroy * @name destroy * @description * Destroy an entity from localStorage. * * ## Signature: * ```js * DSLocalStorageAdapter.destroy(resourceConfig, id[, options]) * ``` * * ## Example: * ```js * DS.destroy('user', 5, { * name: '' * }, { * adapter: 'DSLocalStorageAdapter' * }).then(function (user) { * user; // { id: 5, ... } * }); * ``` * * @param {object} resourceConfig DS resource definition object: * @param {string|number} id Primary key of the entity to destroy. * @param {object=} options Optional configuration. Properties: * * - `{string=}` - `baseUrl` - Base path to use. * * @returns {Promise} Promise. */ DSLocalStorageAdapter.prototype.destroy = function (resourceConfig, id, options) { options = options || {}; return this.DEL(DSUtils.makePath(options.baseUrl || resourceConfig.baseUrl, resourceConfig.getEndpoint(id, options), id)); }; /** * @doc method * @id DSLocalStorageAdapter.methods:destroyAll * @name destroyAll * @description * Not supported. */ DSLocalStorageAdapter.prototype.destroyAll = function () { throw new Error('Not supported!'); }; module.exports = DSLocalStorageAdapter; },{"../errors":99,"../utils":101}],68:[function(require,module,exports){ function errorPrefix(resourceName) { return 'DS.create(' + resourceName + ', attrs[, options]): '; } /** * @doc method * @id DS.async methods:create * @name create * @description * The "C" in "CRUD". Delegate to the `create` method of whichever adapter is being used (http by default) and inject the * result into the data store. * * ## Signature: * ```js * DS.create(resourceName, attrs[, options]) * ``` * * ## Example: * * ```js * DS.create('document', { * author: 'John Anderson' * }).then(function (document) { * document; // { id: 5, author: 'John Anderson' } * * // The new document is already in the data store * DS.get('document', document.id); // { id: 5, author: 'John Anderson' } * }); * ``` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {object} attrs The attributes with which to create the item of the type specified by `resourceName`. * @param {object=} options Configuration options. Also passed along to the adapter's `create` method. Properties: * * - `{boolean=}` - `cacheResponse` - Inject the data returned by the adapter into the data store. Default: `true`. * - `{boolean=}` - `upsert` - If `attrs` already contains a primary key, then attempt to call `DS.update` instead. Default: `true`. * - `{function=}` - `beforeValidate` - Override the resource or global lifecycle hook. * - `{function=}` - `validate` - Override the resource or global lifecycle hook. * - `{function=}` - `afterValidate` - Override the resource or global lifecycle hook. * - `{function=}` - `beforeCreate` - Override the resource or global lifecycle hook. * - `{function=}` - `afterCreate` - Override the resource or global lifecycle hook. * * @returns {Promise} Promise. * * ## Resolves with: * * - `{object}` - `item` - A reference to the newly created item. * * ## Rejects with: * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` */ function create(resourceName, attrs, options) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var definition = DS.definitions[resourceName]; var promise = new DSUtils.Promise(function (resolve, reject) { options = options || {}; if (!definition) { reject(new DSErrors.NER(errorPrefix(resourceName) + resourceName)); } else if (!DSUtils.isObject(attrs)) { reject(new DSErrors.IA(errorPrefix(resourceName) + 'attrs: Must be an object!')); } else { if (!('cacheResponse' in options)) { options.cacheResponse = true; } if (!('upsert' in options)) { options.upsert = true; } resolve(attrs); } }); if (options.upsert && attrs[definition.idAttribute]) { return DS.update(resourceName, attrs[definition.idAttribute], attrs, options); } else { return promise .then(function (attrs) { var func = options.beforeValidate ? DSUtils.promisify(options.beforeValidate) : definition.beforeValidate; return func.call(attrs, resourceName, attrs); }) .then(function (attrs) { var func = options.validate ? DSUtils.promisify(options.validate) : definition.validate; return func.call(attrs, resourceName, attrs); }) .then(function (attrs) { var func = options.afterValidate ? DSUtils.promisify(options.afterValidate) : definition.afterValidate; return func.call(attrs, resourceName, attrs); }) .then(function (attrs) { var func = options.beforeCreate ? DSUtils.promisify(options.beforeCreate) : definition.beforeCreate; return func.call(attrs, resourceName, attrs); }) .then(function (attrs) { return DS.adapters[options.adapter || definition.defaultAdapter].create(definition, definition.serialize(resourceName, attrs), options); }) .then(function (res) { var func = options.afterCreate ? DSUtils.promisify(options.afterCreate) : definition.afterCreate; var attrs = definition.deserialize(resourceName, res); return func.call(attrs, resourceName, attrs); }) .then(function (data) { if (options.cacheResponse) { var resource = DS.store[resourceName]; var created = DS.inject(definition.name, data, options); var id = created[definition.idAttribute]; resource.completedQueries[id] = new Date().getTime(); resource.previousAttributes[id] = DSUtils.deepMixIn({}, created); resource.saved[id] = DSUtils.updateTimestamp(resource.saved[id]); return DS.get(definition.name, id); } else { return data; } }); } } module.exports = create; },{}],69:[function(require,module,exports){ function errorPrefix(resourceName, id) { return 'DS.destroy(' + resourceName + ', ' + id + '[, options]): '; } /** * @doc method * @id DS.async methods:destroy * @name destroy * @description * The "D" in "CRUD". Delegate to the `destroy` method of whichever adapter is being used (http by default) and eject the * appropriate item from the data store. * * ## Signature: * ```js * DS.destroy(resourceName, id[, options]); * ``` * * ## Example: * * ```js * DS.get('document', 5); { id: 5, ... } * * DS.destroy('document', 5).then(function (id) { * id; // 5 * * // The document is gone * DS.get('document', 5); // undefined * }); * ``` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {string|number} id The primary key of the item to remove. * @param {object=} options Configuration options. Also passed along to the adapter's `destroy` method. Properties: * * - `{function=}` - `beforeDestroy` - Override the resource or global lifecycle hook. * - `{function=}` - `afterDestroy` - Override the resource or global lifecycle hook. * * @returns {Promise} Promise. * * ## Resolves with: * * - `{string|number}` - `id` - The primary key of the destroyed item. * * ## Rejects with: * * - `{IllegalArgumentError}` * - `{RuntimeError}` * - `{NonexistentResourceError}` */ function destroy(resourceName, id, options) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var definition = DS.definitions[resourceName]; var item; return new DSUtils.Promise(function (resolve, reject) { options = options || {}; if (!definition) { reject(new DSErrors.NER(errorPrefix(resourceName, id) + resourceName)); } else if (!DSUtils.isString(id) && !DSUtils.isNumber(id)) { reject(new DSErrors.IA(errorPrefix(resourceName, id) + 'id: Must be a string or a number!')); } else if (!DS.get(resourceName, id)) { reject(new DSErrors.R(errorPrefix(resourceName, id) + 'id: "' + id + '" not found!')); } else { item = DS.get(resourceName, id); resolve(item); } }) .then(function (attrs) { var func = options.beforeDestroy ? DSUtils.promisify(options.beforeDestroy) : definition.beforeDestroy; return func.call(attrs, resourceName, attrs); }) .then(function () { return DS.adapters[options.adapter || definition.defaultAdapter].destroy(definition, id, options); }) .then(function () { var func = options.afterDestroy ? DSUtils.promisify(options.afterDestroy) : definition.afterDestroy; return func.call(item, resourceName, item); }) .then(function () { DS.eject(resourceName, id); return id; }); } module.exports = destroy; },{}],70:[function(require,module,exports){ function errorPrefix(resourceName) { return 'DS.destroyAll(' + resourceName + ', params[, options]): '; } /** * @doc method * @id DS.async methods:destroyAll * @name destroyAll * @description * The "D" in "CRUD". Delegate to the `destroyAll` method of whichever adapter is being used (http by default) and eject * the appropriate items from the data store. * * ## Signature: * ```js * DS.destroyAll(resourceName, params[, options]) * ``` * * ## Example: * * ```js * var params = { * where: { * author: { * '==': 'John Anderson' * } * } * }; * * DS.destroyAll('document', params).then(function (documents) { * // The documents are gone from the data store * DS.filter('document', params); // [] * }); * ``` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {object} params Parameter object that is serialized into the query string. Properties: * * - `{object=}` - `where` - Where clause. * - `{number=}` - `limit` - Limit clause. * - `{number=}` - `skip` - Skip clause. * - `{number=}` - `offset` - Same as skip. * - `{string|array=}` - `orderBy` - OrderBy clause. * * @param {object=} options Optional configuration. Also passed along to the adapter's `destroyAll` method. Properties: * * - `{boolean=}` - `bypassCache` - Bypass the cache. Default: `false`. * * @returns {Promise} Promise. * * ## Rejects with: * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` */ function destroyAll(resourceName, params, options) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var definition = DS.definitions[resourceName]; return new DSUtils.Promise(function (resolve, reject) { options = options || {}; if (!definition) { reject(new DSErrors.NER(errorPrefix(resourceName) + resourceName)); } else if (!DSUtils.isObject(params)) { reject(new DSErrors.IA(errorPrefix(resourceName) + 'params: Must be an object!')); } else if (!DSUtils.isObject(options)) { reject(new DSErrors.IA(errorPrefix(resourceName) + 'options: Must be an object!')); } else { resolve(); } }) .then(function () { return DS.adapters[options.adapter || definition.defaultAdapter].destroyAll(definition, params, options); }) .then(function () { return DS.ejectAll(resourceName, params); }); } module.exports = destroyAll; },{}],71:[function(require,module,exports){ function errorPrefix(resourceName, id) { return 'DS.find(' + resourceName + ', ' + id + '[, options]): '; } /** * @doc method * @id DS.async methods:find * @name find * @description * The "R" in "CRUD". Delegate to the `find` method of whichever adapter is being used (http by default) and inject the * resulting item into the data store. * * ## Signature: * ```js * DS.find(resourceName, id[, options]) * ``` * * ## Example: * * ```js * DS.get('document', 5); // undefined * DS.find('document', 5).then(function (document) { * document; // { id: 5, author: 'John Anderson' } * * // the document is now in the data store * DS.get('document', 5); // { id: 5, author: 'John Anderson' } * }); * ``` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {string|number} id The primary key of the item to retrieve. * @param {object=} options Optional configuration. Also passed along to the adapter's `find` method. Properties: * * - `{boolean=}` - `bypassCache` - Bypass the cache. Default: `false`. * - `{boolean=}` - `cacheResponse` - Inject the data returned by the adapter into the data store. Default: `true`. * * @returns {Promise} Promise. * * ## Resolves with: * * - `{object}` - `item` - The item returned by the adapter. * * ## Rejects with: * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` */ function find(resourceName, id, options) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var definition = DS.definitions[resourceName]; var resource = DS.store[resourceName]; return new DSUtils.Promise(function (resolve, reject) { options = options || {}; if (!definition) { reject(new DSErrors.NER(errorPrefix(resourceName, id) + resourceName)); } else if (!DSUtils.isString(id) && !DSUtils.isNumber(id)) { reject(new DSErrors.IA(errorPrefix(resourceName, id) + 'id: Must be a string or a number!')); } else if (!DSUtils.isObject(options)) { reject(new DSErrors.IA(errorPrefix(resourceName, id) + 'options: Must be an object!')); } else { if (!('cacheResponse' in options)) { options.cacheResponse = true; } if (options.bypassCache || !options.cacheResponse) { delete resource.completedQueries[id]; } if (id in resource.completedQueries) { resolve(DS.get(resourceName, id)); } else { resolve(); } } }).then(function (item) { if (!(id in resource.completedQueries)) { if (!(id in resource.pendingQueries)) { resource.pendingQueries[id] = DS.adapters[options.adapter || definition.defaultAdapter].find(definition, id, options) .then(function (res) { var data = definition.deserialize(resourceName, res); if (options.cacheResponse) { // Query is no longer pending delete resource.pendingQueries[id]; resource.completedQueries[id] = new Date().getTime(); return DS.inject(resourceName, data, options); } else { return data; } }).catch(function (err) { delete resource.pendingQueries[id]; throw err; }); } return resource.pendingQueries[id]; } else { return item; } }); } module.exports = find; },{}],72:[function(require,module,exports){ function errorPrefix(resourceName) { return 'DS.findAll(' + resourceName + ', params[, options]): '; } function processResults(data, resourceName, queryHash, options) { var DS = this; var resource = DS.store[resourceName]; var idAttribute = DS.definitions[resourceName].idAttribute; var date = new Date().getTime(); data = data || []; // Query is no longer pending delete resource.pendingQueries[queryHash]; resource.completedQueries[queryHash] = date; // Update modified timestamp of collection resource.collectionModified = DS.utils.updateTimestamp(resource.collectionModified); // Merge the new values into the cache var injected = DS.inject(resourceName, data, options); // Make sure each object is added to completedQueries if (DS.utils.isArray(injected)) { DS.utils.forEach(injected, function (item) { if (item && item[idAttribute]) { resource.completedQueries[item[idAttribute]] = date; } }); } else { console.warn(errorPrefix(resourceName) + 'response is expected to be an array!'); resource.completedQueries[injected[idAttribute]] = date; } return injected; } /** * @doc method * @id DS.async methods:findAll * @name findAll * @description * The "R" in "CRUD". Delegate to the `findAll` method of whichever adapter is being used (http by default) and inject * the resulting collection into the data store. * * ## Signature: * ```js * DS.findAll(resourceName, params[, options]) * ``` * * ## Example: * * ```js * var params = { * where: { * author: { * '==': 'John Anderson' * } * } * }; * * DS.filter('document', params); // [] * DS.findAll('document', params).then(function (documents) { * documents; // [{ id: '1', author: 'John Anderson', title: 'How to cook' }, * // { id: '2', author: 'John Anderson', title: 'How NOT to cook' }] * * // The documents are now in the data store * DS.filter('document', params); // [{ id: '1', author: 'John Anderson', title: 'How to cook' }, * // { id: '2', author: 'John Anderson', title: 'How NOT to cook' }] * }); * ``` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {object=} params Parameter object that is serialized into the query string. Default properties: * * - `{object=}` - `where` - Where clause. * - `{number=}` - `limit` - Limit clause. * - `{number=}` - `skip` - Skip clause. * - `{number=}` - `offset` - Same as skip. * - `{string|array=}` - `orderBy` - OrderBy clause. * * @param {object=} options Optional configuration. Also passed along to the adapter's `findAll` method. Properties: * * - `{boolean=}` - `bypassCache` - Bypass the cache. Default: `false`. * - `{boolean=}` - `cacheResponse` - Inject the data returned by the adapter into the data store. Default: `true`. * * @returns {Promise} Promise. * * ## Resolves with: * * - `{array}` - `items` - The collection of items returned by the adapter. * * ## Rejects with: * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` */ function findAll(resourceName, params, options) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var definition = DS.definitions[resourceName]; var resource = DS.store[resourceName]; var queryHash; return new DSUtils.Promise(function (resolve, reject) { options = options || {}; params = params || {}; if (!DS.definitions[resourceName]) { reject(new DSErrors.NER(errorPrefix(resourceName) + resourceName)); } else if (!DSUtils.isObject(params)) { reject(new DSErrors.IA(errorPrefix(resourceName) + 'params: Must be an object!')); } else if (!DSUtils.isObject(options)) { reject(new DSErrors.IA(errorPrefix(resourceName) + 'options: Must be an object!')); } else { if (!('cacheResponse' in options)) { options.cacheResponse = true; } queryHash = DS.utils.toJson(params); if (options.bypassCache || !options.cacheResponse) { delete resource.completedQueries[queryHash]; } if (queryHash in resource.completedQueries) { resolve(DS.filter(resourceName, params, options)); } else { resolve(); } } }).then(function (items) { if (!(queryHash in resource.completedQueries)) { if (!(queryHash in resource.pendingQueries)) { resource.pendingQueries[queryHash] = DS.adapters[options.adapter || definition.defaultAdapter].findAll(definition, params, options) .then(function (res) { delete resource.pendingQueries[queryHash]; var data = definition.deserialize(resourceName, res); if (options.cacheResponse) { try { return processResults.call(DS, data, resourceName, queryHash, options); } catch (err) { throw err; } } else { return data; } }).catch(function (err) { delete resource.pendingQueries[queryHash]; throw err; }); } return resource.pendingQueries[queryHash]; } else { return items; } }); } module.exports = findAll; },{}],73:[function(require,module,exports){ module.exports = { /** * @doc method * @id DS.async methods:create * @name create * @methodOf DS * @description * See [DS.create](/documentation/api/api/DS.async methods:create). */ create: require('./create'), /** * @doc method * @id DS.async methods:destroy * @name destroy * @methodOf DS * @description * See [DS.destroy](/documentation/api/api/DS.async methods:destroy). */ destroy: require('./destroy'), /** * @doc method * @id DS.async methods:destroyAll * @name destroyAll * @methodOf DS * @description * See [DS.destroyAll](/documentation/api/api/DS.async methods:destroyAll). */ destroyAll: require('./destroyAll'), /** * @doc method * @id DS.async methods:find * @name find * @methodOf DS * @description * See [DS.find](/documentation/api/api/DS.async methods:find). */ find: require('./find'), /** * @doc method * @id DS.async methods:findAll * @name findAll * @methodOf DS * @description * See [DS.findAll](/documentation/api/api/DS.async methods:findAll). */ findAll: require('./findAll'), /** * @doc method * @id DS.async methods:loadRelations * @name loadRelations * @methodOf DS * @description * See [DS.loadRelations](/documentation/api/api/DS.async methods:loadRelations). */ loadRelations: require('./loadRelations'), /** * @doc method * @id DS.async methods:refresh * @name refresh * @methodOf DS * @description * See [DS.refresh](/documentation/api/api/DS.async methods:refresh). */ refresh: require('./refresh'), /** * @doc method * @id DS.async methods:save * @name save * @methodOf DS * @description * See [DS.save](/documentation/api/api/DS.async methods:save). */ save: require('./save'), /** * @doc method * @id DS.async methods:update * @name update * @methodOf DS * @description * See [DS.update](/documentation/api/api/DS.async methods:update). */ update: require('./update'), /** * @doc method * @id DS.async methods:updateAll * @name updateAll * @methodOf DS * @description * See [DS.updateAll](/documentation/api/api/DS.async methods:updateAll). */ updateAll: require('./updateAll') }; },{"./create":68,"./destroy":69,"./destroyAll":70,"./find":71,"./findAll":72,"./loadRelations":74,"./refresh":75,"./save":76,"./update":77,"./updateAll":78}],74:[function(require,module,exports){ function errorPrefix(resourceName) { return 'DS.loadRelations(' + resourceName + ', instance(Id), relations[, options]): '; } /** * @doc method * @id DS.async methods:loadRelations * @name loadRelations * @description * Asynchronously load the indicated relations of the given instance. * * ## Signature: * ```js * DS.loadRelations(resourceName, instance|id, relations[, options]) * ``` * * ## Examples: * * ```js * DS.loadRelations('user', 10, ['profile']).then(function (user) { * user.profile; // object * assert.deepEqual(user.profile, DS.filter('profile', { userId: 10 })[0]); * }); * ``` * * ```js * var user = DS.get('user', 10); * * DS.loadRelations('user', user, ['profile']).then(function (user) { * user.profile; // object * assert.deepEqual(user.profile, DS.filter('profile', { userId: 10 })[0]); * }); * ``` * * ```js * DS.loadRelations('user', 10, ['profile'], { cacheResponse: false }).then(function (user) { * user.profile; // object * assert.equal(DS.filter('profile', { userId: 10 }).length, 0); * }); * ``` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {string|number|object} instance The instance or the id of the instance for which relations are to be loaded. * @param {string|array=} relations The relation(s) to load. * @param {object=} options Optional configuration. Also passed along to the adapter's `find` or `findAll` methods. * * @returns {Promise} Promise. * * ## Resolves with: * * - `{object}` - `item` - The instance with its loaded relations. * * ## Rejects with: * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` */ function loadRelations(resourceName, instance, relations, options) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var definition = DS.definitions[resourceName]; var fields = []; return new DSUtils.Promise(function (resolve, reject) { options = options || {}; if (DSUtils.isString(instance) || DSUtils.isNumber(instance)) { instance = DS.get(resourceName, instance); } if (DSUtils.isString(relations)) { relations = [relations]; } if (!definition) { reject(new DS.errors.NER(errorPrefix(resourceName) + resourceName)); } else if (!DSUtils.isObject(instance)) { reject(new DSErrors.IA(errorPrefix(resourceName) + 'instance(Id): Must be a string, number or object!')); } else if (!DSUtils.isArray(relations)) { reject(new DSErrors.IA(errorPrefix(resourceName) + 'relations: Must be a string or an array!')); } else if (!DSUtils.isObject(options)) { reject(new DSErrors.IA(errorPrefix(resourceName) + 'options: Must be an object!')); } else { if (!('findBelongsTo' in options)) { options.findBelongsTo = true; } if (!('findHasMany' in options)) { options.findHasMany = true; } var tasks = []; DSUtils.forEach(definition.relationList, function (def) { var relationName = def.relation; if (DSUtils.contains(relations, relationName)) { var task; var params = {}; params[def.foreignKey] = instance[definition.idAttribute]; if (def.type === 'hasMany') { task = DS.findAll(relationName, params, options); } else if (def.type === 'hasOne') { if (def.localKey && instance[def.localKey]) { task = DS.find(relationName, instance[def.localKey], options); } else if (def.foreignKey) { task = DS.findAll(relationName, params, options).then(function (hasOnes) { return hasOnes.length ? hasOnes[0] : null; }); } } else { task = DS.find(relationName, instance[def.localKey], options); } if (task) { tasks.push(task); fields.push(def.localField); } } }); resolve(tasks); } }) .then(function (tasks) { return DSUtils.Promise.all(tasks); }) .then(function (loadedRelations) { DSUtils.forEach(fields, function (field, index) { instance[field] = loadedRelations[index]; }); return instance; }); } module.exports = loadRelations; },{}],75:[function(require,module,exports){ function errorPrefix(resourceName, id) { return 'DS.refresh(' + resourceName + ', ' + id + '[, options]): '; } /** * @doc method * @id DS.async methods:refresh * @name refresh * @description * Like `DS.find`, except the resource is only refreshed from the adapter if it already exists in the data store. * * ## Signature: * ```js * DS.refresh(resourceName, id[, options]) * ``` * ## Example: * * ```js * // Exists in the data store, but we want a fresh copy * DS.get('document', 5); * * DS.refresh('document', 5).then(function (document) { * document; // The fresh copy * }); * * // Does not exist in the data store * DS.get('document', 6); // undefined * * DS.refresh('document', 6).then(function (document) { * document; // undefined * }); * ``` * * ## Throws * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {string|number} id The primary key of the item to refresh from the adapter. * @param {object=} options Optional configuration. Also passed along to the adapter's `find` method. * @returns {Promise} Promise. * * ## Resolves with: * * - `{object|undefined}` - `item` - The item returned by the adapter or `undefined` if the item wasn't already in the * data store. * * ## Rejects with: * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` */ function refresh(resourceName, id, options) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; return new DSUtils.Promise(function (resolve, reject) { options = options || {}; if (!DS.definitions[resourceName]) { reject(new DS.errors.NER(errorPrefix(resourceName, id) + resourceName)); } else if (!DSUtils.isString(id) && !DSUtils.isNumber(id)) { reject(new DSErrors.IA(errorPrefix(resourceName, id) + 'id: Must be a string or a number!')); } else if (!DSUtils.isObject(options)) { reject(new DSErrors.IA(errorPrefix(resourceName, id) + 'options: Must be an object!')); } else { options.bypassCache = true; resolve(DS.get(resourceName, id)); } }).then(function (item) { if (item) { return DS.find(resourceName, id, options); } else { return item; } }); } module.exports = refresh; },{}],76:[function(require,module,exports){ function errorPrefix(resourceName, id) { return 'DS.save(' + resourceName + ', ' + id + '[, options]): '; } /** * @doc method * @id DS.async methods:save * @name save * @description * The "U" in "CRUD". Persist a single item already in the store and in it's current form to whichever adapter is being * used (http by default) and inject the resulting item into the data store. * * ## Signature: * ```js * DS.save(resourceName, id[, options]) * ``` * * ## Example: * * ```js * var document = DS.get('document', 5); * * document.title = 'How to cook in style'; * * DS.save('document', 5).then(function (document) { * document; // A reference to the document that's been persisted via an adapter * }); * ``` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {string|number} id The primary key of the item to save. * @param {object=} options Optional configuration. Also passed along to the adapter's `update` method. Properties: * * - `{boolean=}` - `cacheResponse` - Inject the data returned by the adapter into the data store. Default: `true`. * - `{boolean=}` - `changesOnly` - Only send changed and added values to the adapter. Default: `false`. * - `{function=}` - `beforeValidate` - Override the resource or global lifecycle hook. * - `{function=}` - `validate` - Override the resource or global lifecycle hook. * - `{function=}` - `afterValidate` - Override the resource or global lifecycle hook. * - `{function=}` - `beforeUpdate` - Override the resource or global lifecycle hook. * - `{function=}` - `afterUpdate` - Override the resource or global lifecycle hook. * * @returns {Promise} Promise. * * ## Resolves with: * * - `{object}` - `item` - The item returned by the adapter. * * ## Rejects with: * * - `{IllegalArgumentError}` * - `{RuntimeError}` * - `{NonexistentResourceError}` */ function save(resourceName, id, options) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var definition = DS.definitions[resourceName]; var item; return new DSUtils.Promise(function (resolve, reject) { options = options || {}; if (!definition) { reject(new DSErrors.NER(errorPrefix(resourceName, id) + resourceName)); } else if (!DSUtils.isString(id) && !DSUtils.isNumber(id)) { reject(new DSErrors.IA(errorPrefix(resourceName, id) + 'id: Must be a string or a number!')); } else if (!DSUtils.isObject(options)) { reject(new DSErrors.IA(errorPrefix(resourceName, id) + 'options: Must be an object!')); } else if (!DS.get(resourceName, id)) { reject(new DSErrors.R(errorPrefix(resourceName, id) + 'id: "' + id + '" not found!')); } else { item = DS.get(resourceName, id); if (!('cacheResponse' in options)) { options.cacheResponse = true; } resolve(item); } }).then(function (attrs) { var func = options.beforeValidate ? DSUtils.promisify(options.beforeValidate) : definition.beforeValidate; return func.call(attrs, resourceName, attrs); }) .then(function (attrs) { var func = options.validate ? DSUtils.promisify(options.validate) : definition.validate; return func.call(attrs, resourceName, attrs); }) .then(function (attrs) { var func = options.afterValidate ? DSUtils.promisify(options.afterValidate) : definition.afterValidate; return func.call(attrs, resourceName, attrs); }) .then(function (attrs) { var func = options.beforeUpdate ? DSUtils.promisify(options.beforeUpdate) : definition.beforeUpdate; return func.call(attrs, resourceName, attrs); }) .then(function (attrs) { if (options.changesOnly) { var resource = DS.store[resourceName]; resource.observers[id].deliver(); var toKeep = []; var changes = DS.changes(resourceName, id); for (var key in changes.added) { toKeep.push(key); } for (key in changes.changed) { toKeep.push(key); } changes = DSUtils.pick(attrs, toKeep); if (DSUtils.isEmpty(changes)) { // no changes, return return attrs; } else { attrs = changes; } } return DS.adapters[options.adapter || definition.defaultAdapter].update(definition, id, definition.serialize(resourceName, attrs), options); }) .then(function (res) { var func = options.afterUpdate ? DSUtils.promisify(options.afterUpdate) : definition.afterUpdate; var attrs = definition.deserialize(resourceName, res); return func.call(attrs, resourceName, attrs); }) .then(function (data) { if (options.cacheResponse) { var resource = DS.store[resourceName]; var saved = DS.inject(definition.name, data, options); resource.previousAttributes[id] = DSUtils.deepMixIn({}, saved); resource.saved[id] = DSUtils.updateTimestamp(resource.saved[id]); resource.observers[id].discardChanges(); return DS.get(resourceName, id); } else { return data; } }); } module.exports = save; },{}],77:[function(require,module,exports){ function errorPrefix(resourceName, id) { return 'DS.update(' + resourceName + ', ' + id + ', attrs[, options]): '; } /** * @doc method * @id DS.async methods:update * @name update * @description * The "U" in "CRUD". Update the item of type `resourceName` and primary key `id` with `attrs`. This is useful when you * want to update an item that isn't already in the data store, or you don't want to update the item that's in the data * store until the adapter operation succeeds. This differs from `DS.save` which simply saves items in their current * form that already exist in the data store. The resulting item (by default) will be injected into the data store. * * ## Signature: * ```js * DS.update(resourceName, id, attrs[, options]) * ``` * * ## Example: * * ```js * DS.get('document', 5); // undefined * * DS.update('document', 5, { * title: 'How to cook in style' * }).then(function (document) { * document; // A reference to the document that's been saved via an adapter * // and now resides in the data store * }); * ``` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {string|number} id The primary key of the item to update. * @param {object} attrs The attributes with which to update the item. * @param {object=} options Optional configuration. Also passed along to the adapter's `update` method. Properties: * * - `{boolean=}` - `cacheResponse` - Inject the data returned by the adapter into the data store. Default: `true`. * - `{function=}` - `beforeValidate` - Override the resource or global lifecycle hook. * - `{function=}` - `validate` - Override the resource or global lifecycle hook. * - `{function=}` - `afterValidate` - Override the resource or global lifecycle hook. * - `{function=}` - `beforeUpdate` - Override the resource or global lifecycle hook. * - `{function=}` - `afterUpdate` - Override the resource or global lifecycle hook. * * @returns {Promise} Promise. * * ## Resolves with: * * - `{object}` - `item` - The item returned by the adapter. * * ## Rejects with: * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` */ function update(resourceName, id, attrs, options) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var definition = DS.definitions[resourceName]; return new DSUtils.Promise(function (resolve, reject) { options = options || {}; if (!definition) { reject(new DSErrors.NER(errorPrefix(resourceName, id) + resourceName)); } else if (!DSUtils.isString(id) && !DSUtils.isNumber(id)) { reject(new DSErrors.IA(errorPrefix(resourceName, id) + 'id: Must be a string or a number!')); } else if (!DSUtils.isObject(attrs)) { reject(new DSErrors.IA(errorPrefix(resourceName, id) + 'attrs: Must be an object!')); } else if (!DSUtils.isObject(options)) { reject(new DSErrors.IA(errorPrefix(resourceName, id) + 'options: Must be an object!')); } else { if (!('cacheResponse' in options)) { options.cacheResponse = true; } resolve(attrs); } }).then(function (attrs) { var func = options.beforeValidate ? DSUtils.promisify(options.beforeValidate) : definition.beforeValidate; return func.call(attrs, resourceName, attrs); }) .then(function (attrs) { var func = options.validate ? DSUtils.promisify(options.validate) : definition.validate; return func.call(attrs, resourceName, attrs); }) .then(function (attrs) { var func = options.afterValidate ? DSUtils.promisify(options.afterValidate) : definition.afterValidate; return func.call(attrs, resourceName, attrs); }) .then(function (attrs) { var func = options.beforeUpdate ? DSUtils.promisify(options.beforeUpdate) : definition.beforeUpdate; return func.call(attrs, resourceName, attrs); }) .then(function (attrs) { return DS.adapters[options.adapter || definition.defaultAdapter].update(definition, id, definition.serialize(resourceName, attrs), options); }) .then(function (res) { var func = options.afterUpdate ? DSUtils.promisify(options.afterUpdate) : definition.afterUpdate; var attrs = definition.deserialize(resourceName, res); return func.call(attrs, resourceName, attrs); }) .then(function (data) { if (options.cacheResponse) { var resource = DS.store[resourceName]; var updated = DS.inject(definition.name, data, options); var id = updated[definition.idAttribute]; resource.previousAttributes[id] = DSUtils.deepMixIn({}, updated); resource.saved[id] = DSUtils.updateTimestamp(resource.saved[id]); resource.observers[id].discardChanges(); return DS.get(definition.name, id); } else { return data; } }); } module.exports = update; },{}],78:[function(require,module,exports){ function errorPrefix(resourceName) { return 'DS.updateAll(' + resourceName + ', attrs, params[, options]): '; } /** * @doc method * @id DS.async methods:updateAll * @name updateAll * @description * The "U" in "CRUD". Update items of type `resourceName` with `attrs` according to the criteria specified by `params`. * This is useful when you want to update multiple items with the same attributes or you don't want to update the items * in the data store until the adapter operation succeeds. The resulting items (by default) will be injected into the * data store. * * ## Signature: * ```js * DS.updateAll(resourceName, attrs, params[, options]) * ``` * * ## Example: * * ```js * var params = { * where: { * author: { * '==': 'John Anderson' * } * } * }; * * DS.filter('document', params); // [] * * DS.updateAll('document', 5, { * author: 'Sally' * }, params).then(function (documents) { * documents; // The documents that were updated via an adapter * // and now reside in the data store * * documents[0].author; // "Sally" * }); * ``` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {object} attrs The attributes with which to update the items. * @param {object} params Parameter object that is serialized into the query string. Default properties: * * - `{object=}` - `where` - Where clause. * - `{number=}` - `limit` - Limit clause. * - `{number=}` - `skip` - Skip clause. * - `{number=}` - `offset` - Same as skip. * - `{string|array=}` - `orderBy` - OrderBy clause. * * @param {object=} options Optional configuration. Also passed along to the adapter's `updateAll` method. Properties: * * - `{boolean=}` - `cacheResponse` - Inject the items returned by the adapter into the data store. Default: `true`. * * @returns {Promise} Promise. * * ## Resolves with: * * - `{array}` - `items` - The items returned by the adapter. * * ## Rejects with: * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` */ function updateAll(resourceName, attrs, params, options) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var definition = DS.definitions[resourceName]; return new DSUtils.Promise(function (resolve, reject) { options = options || {}; if (!definition) { reject(new DSErrors.NER(errorPrefix(resourceName) + resourceName)); } else if (!DSUtils.isObject(attrs)) { reject(new DSErrors.IA(errorPrefix(resourceName) + 'attrs: Must be an object!')); } else if (!DSUtils.isObject(params)) { reject(new DSErrors.IA(errorPrefix(resourceName) + 'params: Must be an object!')); } else if (!DSUtils.isObject(options)) { reject(new DSErrors.IA(errorPrefix(resourceName) + 'options: Must be an object!')); } else { if (!('cacheResponse' in options)) { options.cacheResponse = true; } resolve(attrs); } }).then(function (attrs) { var func = options.beforeValidate ? DSUtils.promisify(options.beforeValidate) : definition.beforeValidate; return func.call(attrs, resourceName, attrs); }) .then(function (attrs) { var func = options.validate ? DSUtils.promisify(options.validate) : definition.validate; return func.call(attrs, resourceName, attrs); }) .then(function (attrs) { var func = options.afterValidate ? DSUtils.promisify(options.afterValidate) : definition.afterValidate; return func.call(attrs, resourceName, attrs); }) .then(function (attrs) { var func = options.beforeUpdate ? DSUtils.promisify(options.beforeUpdate) : definition.beforeUpdate; return func.call(attrs, resourceName, attrs); }) .then(function (attrs) { return DS.adapters[options.adapter || definition.defaultAdapter].updateAll(definition, definition.serialize(resourceName, attrs), params, options); }) .then(function (res) { var func = options.afterUpdate ? DSUtils.promisify(options.afterUpdate) : definition.afterUpdate; var attrs = definition.deserialize(resourceName, res); return func.call(attrs, resourceName, attrs); }) .then(function (data) { if (options.cacheResponse) { return DS.inject(definition.name, data, options); } else { return data; } }); } module.exports = updateAll; },{}],79:[function(require,module,exports){ var DSUtils = require('../utils'); var DSErrors = require('../errors'); var DSHttpAdapter = require('../adapters/http'); var DSLocalStorageAdapter = require('../adapters/localStorage'); var syncMethods = require('./sync_methods'); var asyncMethods = require('./async_methods'); DSUtils.deepFreeze(syncMethods); DSUtils.deepFreeze(asyncMethods); DSUtils.deepFreeze(DSErrors); DSUtils.deepFreeze(DSUtils); function lifecycleNoop(resourceName, attrs, cb) { cb(null, attrs); } function Defaults() { } Defaults.prototype.idAttribute = 'id'; Defaults.prototype.defaultAdapter = 'DSHttpAdapter'; Defaults.prototype.defaultFilter = function (collection, resourceName, params, options) { var _this = this; var filtered = collection; var where = null; var reserved = { skip: '', offset: '', where: '', limit: '', orderBy: '', sort: '' }; if (DSUtils.isObject(params.where)) { where = params.where; } else { where = {}; } if (options.allowSimpleWhere) { DSUtils.forOwn(params, function (value, key) { if (!(key in reserved) && !(key in where)) { where[key] = { '==': value }; } }); } if (DSUtils.isEmpty(where)) { where = null; } if (where) { filtered = DSUtils.filter(filtered, function (attrs) { var first = true; var keep = true; DSUtils.forOwn(where, function (clause, field) { if (DSUtils.isString(clause)) { clause = { '===': clause }; } else if (DSUtils.isNumber(clause) || DSUtils.isBoolean(clause)) { clause = { '==': clause }; } if (DSUtils.isObject(clause)) { DSUtils.forOwn(clause, function (val, op) { if (op === '==') { keep = first ? (attrs[field] == val) : keep && (attrs[field] == val); } else if (op === '===') { keep = first ? (attrs[field] === val) : keep && (attrs[field] === val); } else if (op === '!=') { keep = first ? (attrs[field] != val) : keep && (attrs[field] != val); } else if (op === '!==') { keep = first ? (attrs[field] !== val) : keep && (attrs[field] !== val); } else if (op === '>') { keep = first ? (attrs[field] > val) : keep && (attrs[field] > val); } else if (op === '>=') { keep = first ? (attrs[field] >= val) : keep && (attrs[field] >= val); } else if (op === '<') { keep = first ? (attrs[field] < val) : keep && (attrs[field] < val); } else if (op === '<=') { keep = first ? (attrs[field] <= val) : keep && (attrs[field] <= val); } else if (op === 'in') { keep = first ? DSUtils.contains(val, attrs[field]) : keep && DSUtils.contains(val, attrs[field]); } else if (op === '|==') { keep = first ? (attrs[field] == val) : keep || (attrs[field] == val); } else if (op === '|===') { keep = first ? (attrs[field] === val) : keep || (attrs[field] === val); } else if (op === '|!=') { keep = first ? (attrs[field] != val) : keep || (attrs[field] != val); } else if (op === '|!==') { keep = first ? (attrs[field] !== val) : keep || (attrs[field] !== val); } else if (op === '|>') { keep = first ? (attrs[field] > val) : keep || (attrs[field] > val); } else if (op === '|>=') { keep = first ? (attrs[field] >= val) : keep || (attrs[field] >= val); } else if (op === '|<') { keep = first ? (attrs[field] < val) : keep || (attrs[field] < val); } else if (op === '|<=') { keep = first ? (attrs[field] <= val) : keep || (attrs[field] <= val); } else if (op === '|in') { keep = first ? DSUtils.contains(val, attrs[field]) : keep || DSUtils.contains(val, attrs[field]); } first = false; }); } }); return keep; }); } var orderBy = null; if (DSUtils.isString(params.orderBy)) { orderBy = [ [params.orderBy, 'ASC'] ]; } else if (DSUtils.isArray(params.orderBy)) { orderBy = params.orderBy; } if (!orderBy && DSUtils.isString(params.sort)) { orderBy = [ [params.sort, 'ASC'] ]; } else if (!orderBy && DSUtils.isArray(params.sort)) { orderBy = params.sort; } // Apply 'orderBy' if (orderBy) { DSUtils.forEach(orderBy, function (def) { if (DSUtils.isString(def)) { def = [def, 'ASC']; } else if (!DSUtils.isArray(def)) { throw new _this.errors.IllegalArgumentError('DS.filter(resourceName[, params][, options]): ' + DSUtils.toJson(def) + ': Must be a string or an array!', { params: { 'orderBy[i]': { actual: typeof def, expected: 'string|array' } } }); } filtered = DSUtils.sort(filtered, function (a, b) { var cA = a[def[0]], cB = b[def[0]]; if (DSUtils.isString(cA)) { cA = DSUtils.upperCase(cA); } if (DSUtils.isString(cB)) { cB = DSUtils.upperCase(cB); } if (def[1] === 'DESC') { if (cB < cA) { return -1; } else if (cB > cA) { return 1; } else { return 0; } } else { if (cA < cB) { return -1; } else if (cA > cB) { return 1; } else { return 0; } } }); }); } var limit = DSUtils.isNumber(params.limit) ? params.limit : null; var skip = null; if (DSUtils.isNumber(params.skip)) { skip = params.skip; } else if (DSUtils.isNumber(params.offset)) { skip = params.offset; } // Apply 'limit' and 'skip' if (limit && skip) { filtered = DSUtils.slice(filtered, skip, Math.min(filtered.length, skip + limit)); } else if (DSUtils.isNumber(limit)) { filtered = DSUtils.slice(filtered, 0, Math.min(filtered.length, limit)); } else if (DSUtils.isNumber(skip)) { if (skip < filtered.length) { filtered = DSUtils.slice(filtered, skip); } else { filtered = []; } } return filtered; }; Defaults.prototype.baseUrl = ''; Defaults.prototype.endpoint = ''; Defaults.prototype.useClass = false; /** * @doc property * @id DSProvider.properties:defaults.beforeValidate * @name defaults.beforeValidate * @description * Called before the `validate` lifecycle step. Can be overridden per resource as well. * * ## Signature: * ```js * beforeValidate(resourceName, attrs, cb) * ``` * * ## Callback signature: * ```js * cb(err, attrs) * ``` * Remember to pass the attributes along to the next step. Passing a first argument to the callback will abort the * lifecycle and reject the promise. * * ## Example: * ```js * DSProvider.defaults.beforeValidate = function (resourceName, attrs, cb) { * // do somthing/inspect attrs * cb(null, attrs); * }; * ``` * * @param {string} resourceName The name of the resource moving through the lifecycle. * @param {object} attrs Attributes of the item moving through the lifecycle. */ Defaults.prototype.beforeValidate = lifecycleNoop; /** * @doc property * @id DSProvider.properties:defaults.validate * @name defaults.validate * @description * Called before the `afterValidate` lifecycle step. Can be overridden per resource as well. * * ## Signature: * ```js * validate(resourceName, attrs, cb) * ``` * * ## Callback signature: * ```js * cb(err, attrs) * ``` * Remember to pass the attributes along to the next step. Passing a first argument to the callback will abort the * lifecycle and reject the promise. * * ## Example: * ```js * DSProvider.defaults.validate = function (resourceName, attrs, cb) { * // do somthing/inspect attrs * cb(null, attrs); * }; * ``` * * @param {string} resourceName The name of the resource moving through the lifecycle. * @param {object} attrs Attributes of the item moving through the lifecycle. */ Defaults.prototype.validate = lifecycleNoop; /** * @doc property * @id DSProvider.properties:defaults.afterValidate * @name defaults.afterValidate * @description * Called before the `beforeCreate` or `beforeUpdate` lifecycle step. Can be overridden per resource as well. * * ## Signature: * ```js * afterValidate(resourceName, attrs, cb) * ``` * * ## Callback signature: * ```js * cb(err, attrs) * ``` * Remember to pass the attributes along to the next step. Passing a first argument to the callback will abort the * lifecycle and reject the promise. * * ## Example: * ```js * DSProvider.defaults.afterValidate = function (resourceName, attrs, cb) { * // do somthing/inspect attrs * cb(null, attrs); * }; * ``` * * @param {string} resourceName The name of the resource moving through the lifecycle. * @param {object} attrs Attributes of the item moving through the lifecycle. */ Defaults.prototype.afterValidate = lifecycleNoop; /** * @doc property * @id DSProvider.properties:defaults.beforeCreate * @name defaults.beforeCreate * @description * Called before the `create` lifecycle step. Can be overridden per resource as well. * * ## Signature: * ```js * beforeCreate(resourceName, attrs, cb) * ``` * * ## Callback signature: * ```js * cb(err, attrs) * ``` * Remember to pass the attributes along to the next step. Passing a first argument to the callback will abort the * lifecycle and reject the promise. * * ## Example: * ```js * DSProvider.defaults.beforeCreate = function (resourceName, attrs, cb) { * // do somthing/inspect attrs * cb(null, attrs); * }; * ``` * * @param {string} resourceName The name of the resource moving through the lifecycle. * @param {object} attrs Attributes of the item moving through the lifecycle. */ Defaults.prototype.beforeCreate = lifecycleNoop; /** * @doc property * @id DSProvider.properties:defaults.afterCreate * @name defaults.afterCreate * @description * Called after the `create` lifecycle step. Can be overridden per resource as well. * * ## Signature: * ```js * afterCreate(resourceName, attrs, cb) * ``` * * ## Callback signature: * ```js * cb(err, attrs) * ``` * Remember to pass the attributes along to the next step. Passing a first argument to the callback will abort the * lifecycle and reject the promise. * * ## Example: * ```js * DSProvider.defaults.afterCreate = function (resourceName, attrs, cb) { * // do somthing/inspect attrs * cb(null, attrs); * }; * ``` * * @param {string} resourceName The name of the resource moving through the lifecycle. * @param {object} attrs Attributes of the item moving through the lifecycle. */ Defaults.prototype.afterCreate = lifecycleNoop; /** * @doc property * @id DSProvider.properties:defaults.beforeUpdate * @name defaults.beforeUpdate * @description * Called before the `update` or `save` lifecycle step. Can be overridden per resource as well. * * ## Signature: * ```js * beforeUpdate(resourceName, attrs, cb) * ``` * * ## Callback signature: * ```js * cb(err, attrs) * ``` * Remember to pass the attributes along to the next step. Passing a first argument to the callback will abort the * lifecycle and reject the promise. * * ## Example: * ```js * DSProvider.defaults.beforeUpdate = function (resourceName, attrs, cb) { * // do somthing/inspect attrs * cb(null, attrs); * }; * ``` * * @param {string} resourceName The name of the resource moving through the lifecycle. * @param {object} attrs Attributes of the item moving through the lifecycle. */ Defaults.prototype.beforeUpdate = lifecycleNoop; /** * @doc property * @id DSProvider.properties:defaults.afterUpdate * @name defaults.afterUpdate * @description * Called after the `update` or `save` lifecycle step. Can be overridden per resource as well. * * ## Signature: * ```js * afterUpdate(resourceName, attrs, cb) * ``` * * ## Callback signature: * ```js * cb(err, attrs) * ``` * Remember to pass the attributes along to the next step. Passing a first argument to the callback will abort the * lifecycle and reject the promise. * * ## Example: * ```js * DSProvider.defaults.afterUpdate = function (resourceName, attrs, cb) { * // do somthing/inspect attrs * cb(null, attrs); * }; * ``` * * @param {string} resourceName The name of the resource moving through the lifecycle. * @param {object} attrs Attributes of the item moving through the lifecycle. */ Defaults.prototype.afterUpdate = lifecycleNoop; /** * @doc property * @id DSProvider.properties:defaults.beforeDestroy * @name defaults.beforeDestroy * @description * Called before the `destroy` lifecycle step. Can be overridden per resource as well. * * ## Signature: * ```js * beforeDestroy(resourceName, attrs, cb) * ``` * * ## Callback signature: * ```js * cb(err, attrs) * ``` * Remember to pass the attributes along to the next step. Passing a first argument to the callback will abort the * lifecycle and reject the promise. * * ## Example: * ```js * DSProvider.defaults.beforeDestroy = function (resourceName, attrs, cb) { * // do somthing/inspect attrs * cb(null, attrs); * }; * ``` * * @param {string} resourceName The name of the resource moving through the lifecycle. * @param {object} attrs Attributes of the item moving through the lifecycle. */ Defaults.prototype.beforeDestroy = lifecycleNoop; /** * @doc property * @id DSProvider.properties:defaults.afterDestroy * @name defaults.afterDestroy * @description * Called after the `destroy` lifecycle step. Can be overridden per resource as well. * * ## Signature: * ```js * afterDestroy(resourceName, attrs, cb) * ``` * * ## Callback signature: * ```js * cb(err, attrs) * ``` * Remember to pass the attributes along to the next step. Passing a first argument to the callback will abort the * lifecycle and reject the promise. * * ## Example: * ```js * DSProvider.defaults.afterDestroy = function (resourceName, attrs, cb) { * // do somthing/inspect attrs * cb(null, attrs); * }; * ``` * * @param {string} resourceName The name of the resource moving through the lifecycle. * @param {object} attrs Attributes of the item moving through the lifecycle. */ Defaults.prototype.afterDestroy = lifecycleNoop; /** * @doc property * @id DSProvider.properties:defaults.beforeInject * @name defaults.beforeInject * @description * Called before the `inject` lifecycle step. Can be overridden per resource as well. * * ## Signature: * ```js * beforeInject(resourceName, attrs) * ``` * * Throwing an error inside this step will cancel the injection. * * ## Example: * ```js * DSProvider.defaults.beforeInject = function (resourceName, attrs) { * // do somthing/inspect/modify attrs * }; * ``` * * @param {string} resourceName The name of the resource moving through the lifecycle. * @param {object} attrs Attributes of the item moving through the lifecycle. */ Defaults.prototype.beforeInject = function (resourceName, attrs) { return attrs; }; /** * @doc property * @id DSProvider.properties:defaults.afterInject * @name defaults.afterInject * @description * Called after the `inject` lifecycle step. Can be overridden per resource as well. * * ## Signature: * ```js * afterInject(resourceName, attrs) * ``` * * Throwing an error inside this step will cancel the injection. * * ## Example: * ```js * DSProvider.defaults.afterInject = function (resourceName, attrs) { * // do somthing/inspect/modify attrs * }; * ``` * * @param {string} resourceName The name of the resource moving through the lifecycle. * @param {object} attrs Attributes of the item moving through the lifecycle. */ Defaults.prototype.afterInject = function (resourceName, attrs) { return attrs; }; /** * @doc property * @id DSProvider.properties:defaults.serialize * @name defaults.serialize * @description * Your server might expect a custom request object rather than the plain POJO payload. Use `serialize` to * create your custom request object. * * ## Example: * ```js * DSProvider.defaults.serialize = function (resourceName, data) { * return { * payload: data * }; * }; * ``` * * @param {string} resourceName The name of the resource to serialize. * @param {object} data Data to be sent to the server. * @returns {*} By default returns `data` as-is. */ Defaults.prototype.serialize = function (resourceName, data) { return data; }; /** * @doc property * @id DSProvider.properties:defaults.deserialize * @name DSProvider.properties:defaults.deserialize * @description * Your server might return a custom response object instead of the plain POJO payload. Use `deserialize` to * pull the payload out of your response object so js-data can use it. * * ## Example: * ```js * DSProvider.defaults.deserialize = function (resourceName, data) { * return data ? data.payload : data; * }; * ``` * * @param {string} resourceName The name of the resource to deserialize. * @param {object} data Response object from `http()`. * @returns {*} By default returns `data.data`. */ Defaults.prototype.deserialize = function (resourceName, data) { return data; }; /** * @doc constructor * @id DS * @name DS * @description * See the [configuration guide](/documentation/guide/configure/global). * * @param {object=} options Configuration options. Properties: * * - `{string}` - `baseUrl` - The url relative to which all AJAX requests will be made. * - `{string}` - `idAttribute` - Default: `"id"` - The attribute that specifies the primary key for resources. * - `{string}` - `defaultAdapter` - Default: `"DSHttpAdapter"` * - `{string}` - `events` - Default: `"broadcast"` [DSProvider.defaults.events](/documentation/api/js-data/DSProvider.properties:defaults.events) * - `{function}` - `filter` - Default: See [js-data query language](/documentation/guide/queries/custom). * - `{function}` - `beforeValidate` - See [DSProvider.defaults.beforeValidate](/documentation/api/js-data/DSProvider.properties:defaults.beforeValidate). Default: No-op * - `{function}` - `validate` - See [DSProvider.defaults.validate](/documentation/api/js-data/DSProvider.properties:defaults.validate). Default: No-op * - `{function}` - `afterValidate` - See [DSProvider.defaults.afterValidate](/documentation/api/js-data/DSProvider.properties:defaults.afterValidate). Default: No-op * - `{function}` - `beforeCreate` - See [DSProvider.defaults.beforeCreate](/documentation/api/js-data/DSProvider.properties:defaults.beforeCreate). Default: No-op * - `{function}` - `afterCreate` - See [DSProvider.defaults.afterCreate](/documentation/api/js-data/DSProvider.properties:defaults.afterCreate). Default: No-op * - `{function}` - `beforeUpdate` - See [DSProvider.defaults.beforeUpdate](/documentation/api/js-data/DSProvider.properties:defaults.beforeUpdate). Default: No-op * - `{function}` - `afterUpdate` - See [DSProvider.defaults.afterUpdate](/documentation/api/js-data/DSProvider.properties:defaults.afterUpdate). Default: No-op * - `{function}` - `beforeDestroy` - See [DSProvider.defaults.beforeDestroy](/documentation/api/js-data/DSProvider.properties:defaults.beforeDestroy). Default: No-op * - `{function}` - `afterDestroy` - See [DSProvider.defaults.afterDestroy](/documentation/api/js-data/DSProvider.properties:defaults.afterDestroy). Default: No-op * - `{function}` - `afterInject` - See [DSProvider.defaults.afterInject](/documentation/api/js-data/DSProvider.properties:defaults.afterInject). Default: No-op * - `{function}` - `beforeInject` - See [DSProvider.defaults.beforeInject](/documentation/api/js-data/DSProvider.properties:defaults.beforeInject). Default: No-op * - `{function}` - `serialize` - See [DSProvider.defaults.serialize](/documentation/api/js-data/DSProvider.properties:defaults.serialize). Default: No-op * - `{function}` - `deserialize` - See [DSProvider.defaults.deserialize](/documentation/api/js-data/DSProvider.properties:defaults.deserialize). Default: No-op */ function DS(options) { /** * @doc property * @id DS.properties:defaults * @name defaults * @description * Reference to [DSProvider.defaults](/documentation/api/api/DSProvider.properties:defaults). */ this.defaults = new Defaults(); DSUtils.deepMixIn(this.defaults, options); /*! * @doc property * @id DS.properties:store * @name store * @description * Meta data for each registered resource. */ this.store = {}; /*! * @doc property * @id DS.properties:definitions * @name definitions * @description * Registered resource definitions available to the data store. */ this.definitions = {}; /** * @doc property * @id DS.properties:adapters * @name adapters * @description * Registered adapters available to the data store. Object consists of key-values pairs where the key is * the name of the adapter and the value is the adapter itself. */ this.adapters = { DSHttpAdapter: new DSHttpAdapter(), DSLocalStorageAdapter: new DSLocalStorageAdapter() }; } /** * @doc property * @id DS.properties:errors * @name errors * @description * References to the various [error types](/documentation/api/api/errors) used by js-data. */ DS.prototype.errors = require('../errors'); /*! * @doc property * @id DS.properties:utils * @name utils * @description * Utility functions used internally by js-data. */ DS.prototype.utils = DSUtils; DSUtils.deepMixIn(DS.prototype, syncMethods); DSUtils.deepMixIn(DS.prototype, asyncMethods); module.exports = DS; },{"../adapters/http":66,"../adapters/localStorage":67,"../errors":99,"../utils":101,"./async_methods":73,"./sync_methods":90}],80:[function(require,module,exports){ function errorPrefix(resourceName) { return 'DS.changes(' + resourceName + ', id): '; } /** * @doc method * @id DS.sync methods:changes * @name changes * @description * Synchronously return the changes object of the item of the type specified by `resourceName` that has the primary key * specified by `id`. This object represents the diff between the item in its current state and the state of the item * the last time it was saved via an adapter. * * ## Signature: * ```js * DS.changes(resourceName, id) * ``` * * ## Example: * * ```js * var d = DS.get('document', 5); // { author: 'John Anderson', id: 5 } * * d.author = 'Sally'; * * // You might have to do DS.digest() first * * DS.changes('document', 5); // {...} Object describing changes * ``` * * ## Throws * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {string|number} id The primary key of the item of the changes to retrieve. * @returns {object} The changes of the item of the type specified by `resourceName` with the primary key specified by `id`. */ function changes(resourceName, id) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; if (!DS.definitions[resourceName]) { throw new DSErrors.NER(errorPrefix(resourceName) + resourceName); } else if (!DSUtils.isString(id) && !DSUtils.isNumber(id)) { throw new DSErrors.IA(errorPrefix(resourceName) + 'id: Must be a string or a number!'); } var item = DS.get(resourceName, id); if (item) { DS.store[resourceName].observers[id].deliver(); var diff = DSUtils.diffObjectFromOldObject(item, DS.store[resourceName].previousAttributes[id]); DSUtils.forOwn(diff, function (changeset, name) { var toKeep = []; DSUtils.forOwn(changeset, function (value, field) { if (!DSUtils.isFunction(value)) { toKeep.push(field); } }); diff[name] = DSUtils.pick(diff[name], toKeep); }); return diff; } } module.exports = changes; },{}],81:[function(require,module,exports){ function errorPrefix(resourceName) { return 'DS.compute(' + resourceName + ', instance): '; } function _compute(fn, field, DSUtils) { var _this = this; var args = []; DSUtils.forEach(fn.deps, function (dep) { args.push(_this[dep]); }); // compute property this[field] = fn[fn.length - 1].apply(this, args); } /** * @doc method * @id DS.sync methods:compute * @name compute * @description * Force the given instance or the item with the given primary key to recompute its computed properties. * * ## Signature: * ```js * DS.compute(resourceName, instance) * ``` * * ## Example: * * ```js * var User = DS.defineResource({ * name: 'user', * computed: { * fullName: ['first', 'last', function (first, last) { * return first + ' ' + last; * }] * } * }); * * var user = User.createInstance({ first: 'John', last: 'Doe' }); * user.fullName; // undefined * * User.compute(user); * * user.fullName; // "John Doe" * * var user2 = User.inject({ id: 2, first: 'Jane', last: 'Doe' }); * user2.fullName; // undefined * * User.compute(1); * * user2.fullName; // "Jane Doe" * * // if you don't pass useClass: false then you can do: * var user3 = User.createInstance({ first: 'Sally', last: 'Doe' }); * user3.fullName; // undefined * user3.DSCompute(); * user3.fullName; // "Sally Doe" * ``` * * ## Throws * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {object|string|number} instance Instance or primary key of the instance (must be in the store) for which to recompute properties. * @returns {Object} The instance. */ function compute(resourceName, instance) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var definition = DS.definitions[resourceName]; if (!definition) { throw new DSErrors.NER(errorPrefix(resourceName) + resourceName); } else if (!DSUtils.isObject(instance) && !DSUtils.isString(instance) && !DSUtils.isNumber(instance)) { throw new DSErrors.IA(errorPrefix(resourceName) + 'instance: Must be an object, string or number!'); } if (DSUtils.isString(instance) || DSUtils.isNumber(instance)) { instance = DS.get(resourceName, instance); } DSUtils.forOwn(definition.computed, function (fn, field) { _compute.call(instance, fn, field, DSUtils); }); return instance; } module.exports = { compute: compute, _compute: _compute }; },{}],82:[function(require,module,exports){ function errorPrefix(resourceName) { return 'DS.createInstance(' + resourceName + '[, attrs][, options]): '; } /** * @doc method * @id DS.sync methods:createInstance * @name createInstance * @description * Return a new instance of the specified resource. * * ## Signature: * ```js * DS.createInstance(resourceName[, attrs][, options]) * ``` * * ## Example: * * ```js * var User = DS.defineResource({ * name: 'user', * methods: { * say: function () { * return 'hi'; * } * } * }); * * var user = User.createInstance(); * var user2 = DS.createInstance('user'); * * user instanceof User[User.class]; // true * user2 instanceof User[User.class]; // true * * user.say(); // hi * user2.say(); // hi * * var user3 = User.createInstance({ name: 'John' }, { useClass: false }); * var user4 = DS.createInstance('user', { name: 'John' }, { useClass: false }); * * user3; // { name: 'John' } * user3 instanceof User[User.class]; // false * * user4; // { name: 'John' } * user4 instanceof User[User.class]; // false * * user3.say(); // TypeError: undefined is not a function * user4.say(); // TypeError: undefined is not a function * ``` * * ## Throws * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {object=} attrs Optional attributes to mix in to the new instance. * @param {object=} options Optional configuration. Properties: * * - `{boolean=}` - `useClass` - Whether to use the resource's wrapper class. Default: `true`. * * @returns {object} The new instance. */ function createInstance(resourceName, attrs, options) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var definition = DS.definitions[resourceName]; attrs = attrs || {}; options = options || {}; if (!definition) { throw new DSErrors.NER(errorPrefix(resourceName) + resourceName); } else if (attrs && !DSUtils.isObject(attrs)) { throw new DSErrors.IA(errorPrefix(resourceName) + 'attrs: Must be an object!'); } else if (!DSUtils.isObject(options)) { throw new DSErrors.IA(errorPrefix(resourceName) + 'options: Must be an object!'); } if (!('useClass' in options)) { options.useClass = true; } var item; if (options.useClass) { var Constructor = definition[definition.class]; item = new Constructor(); } else { item = {}; } return DSUtils.deepMixIn(item, attrs); } module.exports = createInstance; },{}],83:[function(require,module,exports){ /*jshint evil:true*/ var errorPrefix = 'DS.defineResource(definition): '; function Resource(utils, options) { utils.deepMixIn(this, options); if ('endpoint' in options) { this.endpoint = options.endpoint; } else { this.endpoint = this.name; } } var methodsToProxy = [ 'changes', 'create', 'createInstance', 'destroy', 'destroyAll', 'eject', 'ejectAll', 'filter', 'find', 'findAll', 'get', 'hasChanges', 'inject', 'lastModified', 'lastSaved', 'link', 'linkAll', 'linkInverse', 'loadRelations', 'previous', 'refresh', 'save', 'update', 'updateAll' ]; /** * @doc method * @id DS.sync methods:defineResource * @name defineResource * @description * Define a resource and register it with the data store. * * ## Signature: * ```js * DS.defineResource(definition) * ``` * * ## Example: * * ```js * DS.defineResource({ * name: 'document', * idAttribute: '_id', * endpoint: '/documents * baseUrl: 'http://myapp.com/api', * beforeDestroy: function (resourceName attrs, cb) { * console.log('looks good to me'); * cb(null, attrs); * } * }); * ``` * * ## Throws * * - `{IllegalArgumentError}` * - `{RuntimeError}` * * @param {string|object} definition Name of resource or resource definition object: Properties: * * - `{string}` - `name` - The name by which this resource will be identified. * - `{string="id"}` - `idAttribute` - The attribute that specifies the primary key for this resource. * - `{string=}` - `endpoint` - The attribute that specifies the primary key for this resource. Default is the value of `name`. * - `{string=}` - `baseUrl` - The url relative to which all AJAX requests will be made. * - `{boolean=}` - `useClass` - Whether to use a wrapper class created from the ProperCase name of the resource. The wrapper will always be used for resources that have `methods` defined. * - `{function=}` - `defaultFilter` - Override the filtering used internally by `DS.filter` with you own function here. * - `{*=}` - `meta` - A property reserved for developer use. This will never be used by the API. * - `{object=}` - `methods` - If provided, items of this resource will be wrapped in a constructor function that is * empty save for the attributes in this option which will be mixed in to the constructor function prototype. Enabling * this feature for this resource will incur a slight performance penalty, but allows you to give custom behavior to what * are now "instances" of this resource. * - `{function=}` - `beforeValidate` - Lifecycle hook. Overrides global. Signature: `beforeValidate(resourceName, attrs, cb)`. Callback signature: `cb(err, attrs)`. * - `{function=}` - `validate` - Lifecycle hook. Overrides global. Signature: `validate(resourceName, attrs, cb)`. Callback signature: `cb(err, attrs)`. * - `{function=}` - `afterValidate` - Lifecycle hook. Overrides global. Signature: `afterValidate(resourceName, attrs, cb)`. Callback signature: `cb(err, attrs)`. * - `{function=}` - `beforeCreate` - Lifecycle hook. Overrides global. Signature: `beforeCreate(resourceName, attrs, cb)`. Callback signature: `cb(err, attrs)`. * - `{function=}` - `afterCreate` - Lifecycle hook. Overrides global. Signature: `afterCreate(resourceName, attrs, cb)`. Callback signature: `cb(err, attrs)`. * - `{function=}` - `beforeUpdate` - Lifecycle hook. Overrides global. Signature: `beforeUpdate(resourceName, attrs, cb)`. Callback signature: `cb(err, attrs)`. * - `{function=}` - `afterUpdate` - Lifecycle hook. Overrides global. Signature: `afterUpdate(resourceName, attrs, cb)`. Callback signature: `cb(err, attrs)`. * - `{function=}` - `beforeDestroy` - Lifecycle hook. Overrides global. Signature: `beforeDestroy(resourceName, attrs, cb)`. Callback signature: `cb(err, attrs)`. * - `{function=}` - `afterDestroy` - Lifecycle hook. Overrides global. Signature: `afterDestroy(resourceName, attrs, cb)`. Callback signature: `cb(err, attrs)`. * - `{function=}` - `beforeInject` - Lifecycle hook. Overrides global. Signature: `beforeInject(resourceName, attrs)`. * - `{function=}` - `afterInject` - Lifecycle hook. Overrides global. Signature: `afterInject(resourceName, attrs)`. * - `{function=}` - `serialize` - Serialization hook. Overrides global. Signature: `serialize(resourceName, attrs)`. * - `{function=}` - `deserialize` - Deserialization hook. Overrides global. Signature: `deserialize(resourceName, attrs)`. * * See [DSProvider.defaults](/documentation/api/js-data/DSProvider.properties:defaults). */ function defineResource(definition) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var definitions = DS.definitions; if (DSUtils.isString(definition)) { definition = definition.replace(/\s/gi, ''); definition = { name: definition }; } if (!DSUtils.isObject(definition)) { throw new DSErrors.IA(errorPrefix + 'definition: Must be an object!'); } else if (!DSUtils.isString(definition.name)) { throw new DSErrors.IA(errorPrefix + 'definition.name: Must be a string!'); } else if (definition.idAttribute && !DSUtils.isString(definition.idAttribute)) { throw new DSErrors.IA(errorPrefix + 'definition.idAttribute: Must be a string!'); } else if (definition.endpoint && !DSUtils.isString(definition.endpoint)) { throw new DSErrors.IA(errorPrefix + 'definition.endpoint: Must be a string!'); } else if (DS.store[definition.name]) { throw new DSErrors.R(errorPrefix + definition.name + ' is already registered!'); } try { // Inherit from global defaults Resource.prototype = DS.defaults; definitions[definition.name] = new Resource(DSUtils, definition); var def = definitions[definition.name]; // Setup nested parent configuration if (def.relations) { def.relationList = []; def.relationFields = []; DSUtils.forOwn(def.relations, function (relatedModels, type) { DSUtils.forOwn(relatedModels, function (defs, relationName) { if (!DSUtils.isArray(defs)) { relatedModels[relationName] = [defs]; } DSUtils.forEach(relatedModels[relationName], function (d) { d.type = type; d.relation = relationName; d.name = def.name; def.relationList.push(d); def.relationFields.push(d.localField); }); }); }); if (def.relations.belongsTo) { DSUtils.forOwn(def.relations.belongsTo, function (relatedModel, modelName) { DSUtils.forEach(relatedModel, function (relation) { if (relation.parent) { def.parent = modelName; def.parentKey = relation.localKey; } }); }); } DSUtils.deepFreeze(def.relations); DSUtils.deepFreeze(def.relationList); } def.getEndpoint = function (attrs, options) { var parent = this.parent; var parentKey = this.parentKey; var item; var endpoint; var thisEndpoint = options.endpoint || this.endpoint; delete options.endpoint; options = options || {}; options.params = options.params || {}; if (parent && parentKey && definitions[parent] && options.params[parentKey] !== false) { if (DSUtils.isNumber(attrs) || DSUtils.isString(attrs)) { item = DS.get(this.name, attrs); } if (DSUtils.isObject(attrs) && parentKey in attrs) { delete options.params[parentKey]; endpoint = DSUtils.makePath(definitions[parent].getEndpoint(attrs, options), attrs[parentKey], thisEndpoint); } else if (item && parentKey in item) { delete options.params[parentKey]; endpoint = DSUtils.makePath(definitions[parent].getEndpoint(attrs, options), item[parentKey], thisEndpoint); } else if (options && options.params[parentKey]) { endpoint = DSUtils.makePath(definitions[parent].getEndpoint(attrs, options), options.params[parentKey], thisEndpoint); delete options.params[parentKey]; } } if (options.params[parentKey] === false) { delete options.params[parentKey]; } return endpoint || thisEndpoint; }; // Remove this in v0.11.0 and make a breaking change notice // the the `filter` option has been renamed to `defaultFilter` if (def.filter) { def.defaultFilter = def.filter; delete def.filter; } // Create the wrapper class for the new resource def.class = DSUtils.pascalCase(definition.name); eval('function ' + def.class + '() {}'); def[def.class] = eval(def.class); // Apply developer-defined methods if (def.methods) { DSUtils.deepMixIn(def[def.class].prototype, def.methods); } // Prepare for computed properties if (def.computed) { DSUtils.forOwn(def.computed, function (fn, field) { if (DSUtils.isFunction(fn)) { def.computed[field] = [fn]; fn = def.computed[field]; } if (def.methods && field in def.methods) { console.warn(errorPrefix + 'Computed property "' + field + '" conflicts with previously defined prototype method!'); } var deps; if (fn.length === 1) { var match = fn[0].toString().match(/function.*?\(([\s\S]*?)\)/); deps = match[1].split(','); def.computed[field] = deps.concat(fn); fn = def.computed[field]; if (deps.length) { console.warn(errorPrefix + 'Use the computed property array syntax for compatibility with minified code!'); } } deps = fn.slice(0, fn.length - 1); DSUtils.forEach(deps, function (val, index) { deps[index] = val.trim(); }); fn.deps = DSUtils.filter(deps, function (dep) { return !!dep; }); }); def[def.class].prototype.DSCompute = function () { return DS.compute(def.name, this); }; } // Initialize store data for the new resource DS.store[def.name] = { collection: [], completedQueries: {}, pendingQueries: {}, index: {}, modified: {}, saved: {}, previousAttributes: {}, observers: {}, collectionModified: 0 }; // Proxy DS methods with shorthand ones DSUtils.forEach(methodsToProxy, function (name) { def[name] = function () { var args = Array.prototype.slice.call(arguments); args.unshift(def.name); return DS[name].apply(DS, args); }; }); def.beforeValidate = DSUtils.promisify(def.beforeValidate); def.validate = DSUtils.promisify(def.validate); def.afterValidate = DSUtils.promisify(def.afterValidate); def.beforeCreate = DSUtils.promisify(def.beforeCreate); def.afterCreate = DSUtils.promisify(def.afterCreate); def.beforeUpdate = DSUtils.promisify(def.beforeUpdate); def.afterUpdate = DSUtils.promisify(def.afterUpdate); def.beforeDestroy = DSUtils.promisify(def.beforeDestroy); def.afterDestroy = DSUtils.promisify(def.afterDestroy); return def; } catch (err) { console.error(err); delete definitions[definition.name]; delete DS.store[definition.name]; throw err; } } module.exports = defineResource; },{}],84:[function(require,module,exports){ var observe = require('../../../lib/observe-js/observe-js'); /** * @doc method * @id DS.sync methods:digest * @name digest * @description * Trigger a digest loop that checks for changes and updates the `lastModified` timestamp if an object has changed. * If your browser supports `Object.observe` then this function has no effect. * * ## Signature: * ```js * DS.digest() * ``` * */ function digest() { observe.Platform.performMicrotaskCheckpoint(); } module.exports = digest; },{"../../../lib/observe-js/observe-js":1}],85:[function(require,module,exports){ function errorPrefix(resourceName, id) { return 'DS.eject(' + resourceName + ', ' + id + '): '; } function _eject(definition, resource, id) { var item; var found = false; for (var i = 0; i < resource.collection.length; i++) { if (resource.collection[i][definition.idAttribute] == id) { item = resource.collection[i]; found = true; break; } } if (found) { this.unlinkInverse(definition.name, id); resource.collection.splice(i, 1); resource.observers[id].close(); delete resource.observers[id]; delete resource.index[id]; delete resource.previousAttributes[id]; delete resource.completedQueries[id]; delete resource.modified[id]; delete resource.saved[id]; resource.collectionModified = this.utils.updateTimestamp(resource.collectionModified); return item; } } /** * @doc method * @id DS.sync methods:eject * @name eject * @description * Eject the item of the specified type that has the given primary key from the data store. Ejection only removes items * from the data store and does not attempt to destroy items via an adapter. * * ## Signature: * ```js * DS.eject(resourceName[, id]) * ``` * * ## Example: * * ```js * DS.get('document', 45); // { title: 'How to Cook', id: 45 } * * DS.eject('document', 45); * * DS.get('document', 45); // undefined * ``` * * ## Throws * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {string|number} id The primary key of the item to eject. * @returns {object} A reference to the item that was ejected from the data store. */ function eject(resourceName, id) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var definition = DS.definitions[resourceName]; if (!definition) { throw new DSErrors.NER(errorPrefix(resourceName, id) + resourceName); } else if (!DSUtils.isString(id) && !DSUtils.isNumber(id)) { throw new DSErrors.IA(errorPrefix(resourceName, id) + 'id: Must be a string or a number!'); } return _eject.call(DS, definition, DS.store[resourceName], id); } module.exports = eject; },{}],86:[function(require,module,exports){ function errorPrefix(resourceName) { return 'DS.ejectAll(' + resourceName + '[, params]): '; } function _ejectAll(definition, resource, params) { var DS = this; var queryHash = DS.utils.toJson(params); var items = DS.filter(definition.name, params); var ids = DS.utils.toLookup(items, definition.idAttribute); DS.utils.forOwn(ids, function (item, id) { DS.eject(definition.name, id); }); delete resource.completedQueries[queryHash]; resource.collectionModified = DS.utils.updateTimestamp(resource.collectionModified); return items; } /** * @doc method * @id DS.sync methods:ejectAll * @name ejectAll * @description * Eject all matching items of the specified type from the data store. Ejection only removes items from the data store * and does not attempt to destroy items via an adapter. * * ## Signature: * ```javascript * DS.ejectAll(resourceName[, params]) * ``` * * ## Example: * * ```javascript * DS.get('document', 45); // { title: 'How to Cook', id: 45 } * * DS.eject('document', 45); * * DS.get('document', 45); // undefined * ``` * * Eject all items of the specified type that match the criteria from the data store. * * ```javascript * DS.filter('document'); // [ { title: 'How to Cook', id: 45, author: 'John Anderson' }, * // { title: 'How to Eat', id: 46, author: 'Sally Jane' } ] * * DS.ejectAll('document', { where: { author: 'Sally Jane' } }); * * DS.filter('document'); // [ { title: 'How to Cook', id: 45, author: 'John Anderson' } ] * ``` * * Eject all items of the specified type from the data store. * * ```javascript * DS.filter('document'); // [ { title: 'How to Cook', id: 45, author: 'John Anderson' }, * // { title: 'How to Eat', id: 46, author: 'Sally Jane' } ] * * DS.ejectAll('document'); * * DS.filter('document'); // [ ] * ``` * * ## Throws * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {object} params Parameter object that is used to filter items. Properties: * * - `{object=}` - `where` - Where clause. * - `{number=}` - `limit` - Limit clause. * - `{number=}` - `skip` - Skip clause. * - `{number=}` - `offset` - Same as skip. * - `{string|array=}` - `orderBy` - OrderBy clause. * * @returns {array} The items that were ejected from the data store. */ function ejectAll(resourceName, params) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var definition = DS.definitions[resourceName]; params = params || {}; if (!definition) { throw new DSErrors.NER(errorPrefix(resourceName) + resourceName); } else if (!DSUtils.isObject(params)) { throw new DSErrors.IA(errorPrefix(resourceName) + 'params: Must be an object!'); } var resource = DS.store[resourceName]; if (DSUtils.isEmpty(params)) { resource.completedQueries = {}; } return _ejectAll.call(DS, definition, resource, params); } module.exports = ejectAll; },{}],87:[function(require,module,exports){ function errorPrefix(resourceName) { return 'DS.filter(' + resourceName + '[, params][, options]): '; } /** * @doc method * @id DS.sync methods:filter * @name filter * @description * Synchronously filter items in the data store of the type specified by `resourceName`. * * ## Signature: * ```js * DS.filter(resourceName[, params][, options]) * ``` * * ## Example: * * For many examples see the [tests for DS.filter](https://github.com/js-data/js-data/blob/master/test/integration/datastore/sync methods/filter.test.js). * * ## Throws * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {object=} params Parameter object that is used to filter items. Properties: * * - `{object=}` - `where` - Where clause. * - `{number=}` - `limit` - Limit clause. * - `{number=}` - `skip` - Skip clause. * - `{number=}` - `offset` - Same as skip. * - `{string|array=}` - `orderBy` - OrderBy clause. * * @param {object=} options Optional configuration. Properties: * * - `{boolean=}` - `loadFromServer` - Send the query to server if it has not been sent yet. Default: `false`. * - `{boolean=}` - `allowSimpleWhere` - Treat top-level fields on the `params` argument as simple "where" equality clauses. Default: `true`. * * @returns {array} The filtered collection of items of the type specified by `resourceName`. */ function filter(resourceName, params, options) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var definition = DS.definitions[resourceName]; options = options || {}; if (!definition) { throw new DSErrors.NER(errorPrefix(resourceName) + resourceName); } else if (params && !DSUtils.isObject(params)) { throw new DSErrors.IA(errorPrefix(resourceName) + 'params: Must be an object!'); } else if (!DSUtils.isObject(options)) { throw new DSErrors.IA(errorPrefix(resourceName) + 'options: Must be an object!'); } var resource = DS.store[resourceName]; // Protect against null params = params || {}; if ('allowSimpleWhere' in options) { options.allowSimpleWhere = !!options.allowSimpleWhere; } else { options.allowSimpleWhere = true; } var queryHash = DSUtils.toJson(params); if (!(queryHash in resource.completedQueries) && options.loadFromServer) { // This particular query has never been completed if (!resource.pendingQueries[queryHash]) { // This particular query has never even been started DS.findAll(resourceName, params, options); } } return definition.defaultFilter.call(DS, resource.collection, resourceName, params, options); } module.exports = filter; },{}],88:[function(require,module,exports){ function errorPrefix(resourceName, id) { return 'DS.get(' + resourceName + ', ' + id + '): '; } /** * @doc method * @id DS.sync methods:get * @name get * @description * Synchronously return the resource with the given id. The data store will forward the request to an adapter if * `loadFromServer` is `true` in the options hash. * * ## Signature: * ```js * DS.get(resourceName, id[, options]) * ``` * * ## Example: * * ```js * DS.get('document', 5'); // { author: 'John Anderson', id: 5 } * ``` * * ## Throws * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {string|number} id The primary key of the item to retrieve. * @param {object=} options Optional configuration. Also passed along to `DS.find` if `loadFromServer` is `true`. Properties: * * - `{boolean=}` - `loadFromServer` - Send the query to server if it has not been sent yet. Default: `false`. * * @returns {object} The item of the type specified by `resourceName` with the primary key specified by `id`. */ function get(resourceName, id, options) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; options = options || {}; if (!DS.definitions[resourceName]) { throw new DSErrors.NER(errorPrefix(resourceName, id) + resourceName); } else if (!DSUtils.isString(id) && !DSUtils.isNumber(id)) { throw new DSErrors.IA(errorPrefix(resourceName, id) + 'id: Must be a string or a number!'); } else if (!DSUtils.isObject(options)) { throw new DSErrors.IA(errorPrefix(resourceName, id) + 'options: Must be an object!'); } // cache miss, request resource from server var item = DS.store[resourceName].index[id]; if (!item && options.loadFromServer) { DS.find(resourceName, id, options).then(null, function (err) { return err; }); } // return resource from cache return item; } module.exports = get; },{}],89:[function(require,module,exports){ function errorPrefix(resourceName, id) { return 'DS.hasChanges(' + resourceName + ', ' + id + '): '; } function diffIsEmpty(utils, diff) { return !(utils.isEmpty(diff.added) && utils.isEmpty(diff.removed) && utils.isEmpty(diff.changed)); } /** * @doc method * @id DS.sync methods:hasChanges * @name hasChanges * @description * Synchronously return whether object of the item of the type specified by `resourceName` that has the primary key * specified by `id` has changes. * * ## Signature: * ```js * DS.hasChanges(resourceName, id) * ``` * * ## Example: * * ```js * var d = DS.get('document', 5); // { author: 'John Anderson', id: 5 } * * d.author = 'Sally'; * * // You may have to do DS.digest() first * * DS.hasChanges('document', 5); // true * ``` * * ## Throws * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {string|number} id The primary key of the item. * @returns {boolean} Whether the item of the type specified by `resourceName` with the primary key specified by `id` has changes. */ function hasChanges(resourceName, id) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; if (!DS.definitions[resourceName]) { throw new DSErrors.NER(errorPrefix(resourceName, id) + resourceName); } else if (!DSUtils.isString(id) && !DSUtils.isNumber(id)) { throw new DSErrors.IA(errorPrefix(resourceName, id) + 'id: Must be a string or a number!'); } // return resource from cache if (DS.get(resourceName, id)) { return diffIsEmpty(DSUtils, DS.changes(resourceName, id)); } else { return false; } } module.exports = hasChanges; },{}],90:[function(require,module,exports){ module.exports = { /** * @doc method * @id DS.sync methods:changes * @name changes * @methodOf DS * @description * See [DS.changes](/documentation/api/api/DS.sync methods:changes). */ changes: require('./changes'), /** * @doc method * @id DS.sync methods:compute * @name compute * @methodOf DS * @description * See [DS.compute](/documentation/api/api/DS.sync methods:compute). */ compute: require('./compute').compute, /** * @doc method * @id DS.sync methods:createInstance * @name createInstance * @methodOf DS * @description * See [DS.createInstance](/documentation/api/api/DS.sync methods:createInstance). */ createInstance: require('./createInstance'), /** * @doc method * @id DS.sync methods:defineResource * @name defineResource * @methodOf DS * @description * See [DS.defineResource](/documentation/api/api/DS.sync methods:defineResource). */ defineResource: require('./defineResource'), /** * @doc method * @id DS.sync methods:digest * @name digest * @methodOf DS * @description * See [DS.digest](/documentation/api/api/DS.sync methods:digest). */ digest: require('./digest'), /** * @doc method * @id DS.sync methods:eject * @name eject * @methodOf DS * @description * See [DS.eject](/documentation/api/api/DS.sync methods:eject). */ eject: require('./eject'), /** * @doc method * @id DS.sync methods:ejectAll * @name ejectAll * @methodOf DS * @description * See [DS.ejectAll](/documentation/api/api/DS.sync methods:ejectAll). */ ejectAll: require('./ejectAll'), /** * @doc method * @id DS.sync methods:filter * @name filter * @methodOf DS * @description * See [DS.filter](/documentation/api/api/DS.sync methods:filter). */ filter: require('./filter'), /** * @doc method * @id DS.sync methods:get * @name get * @methodOf DS * @description * See [DS.get](/documentation/api/api/DS.sync methods:get). */ get: require('./get'), /** * @doc method * @id DS.sync methods:hasChanges * @name hasChanges * @methodOf DS * @description * See [DS.hasChanges](/documentation/api/api/DS.sync methods:hasChanges). */ hasChanges: require('./hasChanges'), /** * @doc method * @id DS.sync methods:inject * @name inject * @methodOf DS * @description * See [DS.inject](/documentation/api/api/DS.sync methods:inject). */ inject: require('./inject'), /** * @doc method * @id DS.sync methods:lastModified * @name lastModified * @methodOf DS * @description * See [DS.lastModified](/documentation/api/api/DS.sync methods:lastModified). */ lastModified: require('./lastModified'), /** * @doc method * @id DS.sync methods:lastSaved * @name lastSaved * @methodOf DS * @description * See [DS.lastSaved](/documentation/api/api/DS.sync methods:lastSaved). */ lastSaved: require('./lastSaved'), /** * @doc method * @id DS.sync methods:link * @name link * @methodOf DS * @description * See [DS.link](/documentation/api/api/DS.sync methods:link). */ link: require('./link'), /** * @doc method * @id DS.sync methods:linkAll * @name linkAll * @methodOf DS * @description * See [DS.linkAll](/documentation/api/api/DS.sync methods:linkAll). */ linkAll: require('./linkAll'), /** * @doc method * @id DS.sync methods:linkInverse * @name linkInverse * @methodOf DS * @description * See [DS.linkInverse](/documentation/api/api/DS.sync methods:linkInverse). */ linkInverse: require('./linkInverse'), /** * @doc method * @id DS.sync methods:previous * @name previous * @methodOf DS * @description * See [DS.previous](/documentation/api/api/DS.sync methods:previous). */ previous: require('./previous'), /** * @doc method * @id DS.sync methods:unlinkInverse * @name unlinkInverse * @methodOf DS * @description * See [DS.unlinkInverse](/documentation/api/api/DS.sync methods:unlinkInverse). */ unlinkInverse: require('./unlinkInverse') }; },{"./changes":80,"./compute":81,"./createInstance":82,"./defineResource":83,"./digest":84,"./eject":85,"./ejectAll":86,"./filter":87,"./get":88,"./hasChanges":89,"./inject":91,"./lastModified":92,"./lastSaved":93,"./link":94,"./linkAll":95,"./linkInverse":96,"./previous":97,"./unlinkInverse":98}],91:[function(require,module,exports){ var observe = require('../../../lib/observe-js/observe-js'); var _compute = require('./compute')._compute; var stack = 0; var data = { injectedSoFar: {} }; function errorPrefix(resourceName) { return 'DS.inject(' + resourceName + ', attrs[, options]): '; } function _inject(definition, resource, attrs) { var DS = this; function _react(added, removed, changed, oldValueFn, firstTime) { var target = this; var item; var innerId = (oldValueFn && oldValueFn(definition.idAttribute)) ? oldValueFn(definition.idAttribute) : target[definition.idAttribute]; DS.utils.forEach(definition.relationFields, function (field) { delete added[field]; delete removed[field]; delete changed[field]; }); if (!DS.utils.isEmpty(added) || !DS.utils.isEmpty(removed) || !DS.utils.isEmpty(changed) || firstTime) { resource.modified[innerId] = DS.utils.updateTimestamp(resource.modified[innerId]); resource.collectionModified = DS.utils.updateTimestamp(resource.collectionModified); } if (definition.computed) { item = DS.get(definition.name, innerId); DS.utils.forOwn(definition.computed, function (fn, field) { var compute = false; // check if required fields changed DS.utils.forEach(fn.deps, function (dep) { if (dep in added || dep in removed || dep in changed || !(field in item)) { compute = true; } }); compute = compute || !fn.deps.length; if (compute) { _compute.call(item, fn, field); } }); } if (definition.relations) { item = DS.get(definition.name, innerId); DS.utils.forEach(definition.relationList, function (def) { if (item[def.localField] && (def.localKey in added || def.localKey in removed || def.localKey in changed)) { DS.link(definition.name, item[definition.idAttribute], [def.relation]); } }); } if (definition.idAttribute in changed) { console.error('Doh! You just changed the primary key of an object! ' + 'I don\'t know how to handle this yet, so your data for the "' + definition.name + '" resource is now in an undefined (probably broken) state.'); } } var injected; if (DS.utils.isArray(attrs)) { injected = []; for (var i = 0; i < attrs.length; i++) { injected.push(_inject.call(DS, definition, resource, attrs[i])); } } else { // check if "idAttribute" is a computed property var c = definition.computed; var idA = definition.idAttribute; if (c && c[idA]) { var args = []; DS.utils.forEach(c[idA].deps, function (dep) { args.push(attrs[dep]); }); attrs[idA] = c[idA][c[idA].length - 1].apply(attrs, args); } if (!(idA in attrs)) { var error = new DS.errors.R(errorPrefix(definition.name) + 'attrs: Must contain the property specified by `idAttribute`!'); console.error(error); throw error; } else { try { definition.beforeInject(definition.name, attrs); var id = attrs[idA]; var item = DS.get(definition.name, id); if (!item) { if (definition.methods || definition.useClass) { if (attrs instanceof definition[definition.class]) { item = attrs; } else { item = new definition[definition.class](); } } else { item = {}; } resource.previousAttributes[id] = {}; DS.utils.deepMixIn(item, attrs); DS.utils.deepMixIn(resource.previousAttributes[id], attrs); resource.collection.push(item); resource.observers[id] = new observe.ObjectObserver(item); resource.observers[id].open(_react, item); resource.index[id] = item; _react.call(item, {}, {}, {}, null, true); } else { DS.utils.deepMixIn(item, attrs); resource.observers[id].deliver(); } resource.saved[id] = DS.utils.updateTimestamp(resource.saved[id]); definition.afterInject(definition.name, item); injected = item; } catch (err) { console.error(err); console.error('inject failed!', definition.name, attrs); } } } return injected; } function _injectRelations(definition, injected, options) { var DS = this; function _process(def, relationName, injected) { var relationDef = DS.definitions[relationName]; if (relationDef && injected[def.localField] && !data.injectedSoFar[relationName + injected[def.localField][relationDef.idAttribute]]) { try { data.injectedSoFar[relationName + injected[def.localField][relationDef.idAttribute]] = 1; injected[def.localField] = DS.inject(relationName, injected[def.localField], options); } catch (err) { DS.console.error(errorPrefix(definition.name) + 'Failed to inject ' + def.type + ' relation: "' + relationName + '"!', err); } } else if (options.findBelongsTo && def.type === 'belongsTo') { if (DS.utils.isArray(injected)) { DS.utils.forEach(injected, function (injectedItem) { DS.link(definition.name, injectedItem[definition.idAttribute], [relationName]); }); } else { DS.link(definition.name, injected[definition.idAttribute], [relationName]); } } else if ((options.findHasMany && def.type === 'hasMany') || (options.findHasOne && def.type === 'hasOne')) { if (DS.utils.isArray(injected)) { DS.utils.forEach(injected, function (injectedItem) { DS.link(definition.name, injectedItem[definition.idAttribute], [relationName]); }); } else { DS.link(definition.name, injected[definition.idAttribute], [relationName]); } } } DS.utils.forEach(definition.relationList, function (def) { if (DS.utils.isArray(injected)) { DS.utils.forEach(injected, function (injectedI) { _process(def, def.relation, injectedI); }); } else { _process(def, def.relation, injected); } }); } /** * @doc method * @id DS.sync methods:inject * @name inject * @description * Inject the given item into the data store as the specified type. If `attrs` is an array, inject each item into the * data store. Injecting an item into the data store does not save it to the server. Emits a `"DS.inject"` event. * * ## Signature: * ```js * DS.inject(resourceName, attrs[, options]) * ``` * * ## Examples: * * ```js * DS.get('document', 45); // undefined * * DS.inject('document', { title: 'How to Cook', id: 45 }); * * DS.get('document', 45); // { title: 'How to Cook', id: 45 } * ``` * * Inject a collection into the data store: * * ```js * DS.filter('document'); // [ ] * * DS.inject('document', [ { title: 'How to Cook', id: 45 }, { title: 'How to Eat', id: 46 } ]); * * DS.filter('document'); // [ { title: 'How to Cook', id: 45 }, { title: 'How to Eat', id: 46 } ] * ``` * * ## Throws * * - `{IllegalArgumentError}` * - `{RuntimeError}` * - `{NonexistentResourceError}` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {object|array} attrs The item or collection of items to inject into the data store. * @param {object=} options The item or collection of items to inject into the data store. Properties: * * - `{boolean=}` - `findBelongsTo` - Find and attach any existing "belongsTo" relationships to the newly injected item. Potentially expensive if enabled. Default: `false`. * - `{boolean=}` - `findHasMany` - Find and attach any existing "hasMany" relationships to the newly injected item. Potentially expensive if enabled. Default: `false`. * - `{boolean=}` - `findHasOne` - Find and attach any existing "hasOne" relationships to the newly injected item. Potentially expensive if enabled. Default: `false`. * - `{boolean=}` - `linkInverse` - Look in the data store for relations of the injected item(s) and update their links to the injected. Potentially expensive if enabled. Default: `false`. * * @returns {object|array} A reference to the item that was injected into the data store or an array of references to * the items that were injected into the data store. */ function inject(resourceName, attrs, options) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var definition = DS.definitions[resourceName]; options = options || {}; if (!definition) { throw new DSErrors.NER(errorPrefix(resourceName) + resourceName); } else if (!DSUtils.isObject(attrs) && !DSUtils.isArray(attrs)) { throw new DSErrors.IA(errorPrefix(resourceName) + 'attrs: Must be an object or an array!'); } else if (!DSUtils.isObject(options)) { throw new DSErrors.IA(errorPrefix(resourceName) + 'options: Must be an object!'); } var resource = DS.store[resourceName]; var injected; stack++; try { injected = _inject.call(DS, definition, resource, attrs); if (definition.relations) { _injectRelations.call(DS, definition, injected, options); } if (options.linkInverse) { if (DSUtils.isArray(injected) && injected.length) { DS.linkInverse(definition.name, injected[0][definition.idAttribute]); } else { DS.linkInverse(definition.name, injected[definition.idAttribute]); } } stack--; } catch (err) { stack--; throw err; } if (!stack) { data.injectedSoFar = {}; } return injected; } module.exports = inject; },{"../../../lib/observe-js/observe-js":1,"./compute":81}],92:[function(require,module,exports){ function errorPrefix(resourceName, id) { return 'DS.lastModified(' + resourceName + '[, ' + id + ']): '; } /** * @doc method * @id DS.sync methods:lastModified * @name lastModified * @description * Return the timestamp of the last time either the collection for `resourceName` or the item of type `resourceName` * with the given primary key was modified. * * ## Signature: * ```js * DS.lastModified(resourceName[, id]) * ``` * * ## Example: * * ```js * DS.lastModified('document', 5); // undefined * * DS.find('document', 5).then(function (document) { * DS.lastModified('document', 5); // 1234235825494 * }); * ``` * * ## Throws * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {string|number=} id The primary key of the item to remove. * @returns {number} The timestamp of the last time either the collection for `resourceName` or the item of type * `resourceName` with the given primary key was modified. */ function lastModified(resourceName, id) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var resource = DS.store[resourceName]; if (!DS.definitions[resourceName]) { throw new DSErrors.NER(errorPrefix(resourceName, id) + resourceName); } else if (id && !DSUtils.isString(id) && !DSUtils.isNumber(id)) { throw new DSErrors.IA(errorPrefix(resourceName, id) + 'id: Must be a string or a number!'); } if (id) { if (!(id in resource.modified)) { resource.modified[id] = 0; } return resource.modified[id]; } return resource.collectionModified; } module.exports = lastModified; },{}],93:[function(require,module,exports){ function errorPrefix(resourceName, id) { return 'DS.lastSaved(' + resourceName + '[, ' + id + ']): '; } /** * @doc method * @id DS.sync methods:lastSaved * @name lastSaved * @description * Return the timestamp of the last time either the collection for `resourceName` or the item of type `resourceName` * with the given primary key was saved via an async adapter. * * ## Signature: * ```js * DS.lastSaved(resourceName[, id]) * ``` * * ## Example: * * ```js * DS.lastModified('document', 5); // undefined * DS.lastSaved('document', 5); // undefined * * DS.find('document', 5).then(function (document) { * DS.lastModified('document', 5); // 1234235825494 * DS.lastSaved('document', 5); // 1234235825494 * * document.author = 'Sally'; * * // You may have to call DS.digest() first * * DS.lastModified('document', 5); // 1234304985344 - something different * DS.lastSaved('document', 5); // 1234235825494 - still the same * }); * ``` * * ## Throws * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {string|number} id The primary key of the item for which to retrieve the lastSaved timestamp. * @returns {number} The timestamp of the last time the item of type `resourceName` with the given primary key was saved. */ function lastSaved(resourceName, id) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var resource = DS.store[resourceName]; if (!DS.definitions[resourceName]) { throw new DSErrors.NER(errorPrefix(resourceName, id) + resourceName); } else if (!DSUtils.isString(id) && !DSUtils.isNumber(id)) { throw new DSErrors.IA(errorPrefix(resourceName, id) + 'id: Must be a string or a number!'); } if (!(id in resource.saved)) { resource.saved[id] = 0; } return resource.saved[id]; } module.exports = lastSaved; },{}],94:[function(require,module,exports){ function errorPrefix(resourceName) { return 'DS.link(' + resourceName + ', id[, relations]): '; } function _link(definition, linked, relations) { var DS = this; DS.utils.forEach(definition.relationList, function (def) { var relationName = def.relation; if (relations.length && !DS.utils.contains(relations, relationName)) { return; } var params = {}; if (def.type === 'belongsTo') { var parent = linked[def.localKey] ? DS.get(relationName, linked[def.localKey]) : null; if (parent) { linked[def.localField] = parent; } } else if (def.type === 'hasMany') { params[def.foreignKey] = linked[definition.idAttribute]; linked[def.localField] = DS.defaults.constructor.prototype.defaultFilter.call(DS, DS.store[relationName].collection, relationName, params, { allowSimpleWhere: true }); } else if (def.type === 'hasOne') { params[def.foreignKey] = linked[definition.idAttribute]; var children = DS.defaults.constructor.prototype.defaultFilter.call(DS, DS.store[relationName].collection, relationName, params, { allowSimpleWhere: true }); if (children.length) { linked[def.localField] = children[0]; } } }); } /** * @doc method * @id DS.sync methods:link * @name link * @description * Find relations of the item with the given primary key that are already in the data store and link them to the item. * * ## Signature: * ```js * DS.link(resourceName, id[, relations]) * ``` * * ## Examples: * * Assume `user` has `hasMany` relationships to `post` and `comment`. * ```js * DS.get('user', 1); // { name: 'John', id: 1 } * * // link posts * DS.link('user', 1, ['post']); * * DS.get('user', 1); // { name: 'John', id: 1, posts: [...] } * * // link all relations * DS.link('user', 1); * * DS.get('user', 1); // { name: 'John', id: 1, posts: [...], comments: [...] } * ``` * * ## Throws * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {string|number} id The primary key of the item for to link relations. * @param {array=} relations The relations to be linked. If not provided then all relations will be linked. Default: `[]`. * @returns {object|array} A reference to the item with its linked relations. */ function link(resourceName, id, relations) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var definition = DS.definitions[resourceName]; relations = relations || []; if (!definition) { throw new DSErrors.NER(errorPrefix(resourceName) + resourceName); } else if (!DSUtils.isString(id) && !DSUtils.isNumber(id)) { throw new DSErrors.IA(errorPrefix(resourceName) + 'id: Must be a string or a number!'); } else if (!DSUtils.isArray(relations)) { throw new DSErrors.IA(errorPrefix(resourceName) + 'relations: Must be an array!'); } var linked = DS.get(resourceName, id); if (linked) { _link.call(DS, definition, linked, relations); } return linked; } module.exports = link; },{}],95:[function(require,module,exports){ function errorPrefix(resourceName) { return 'DS.linkAll(' + resourceName + '[, params][, relations]): '; } function _linkAll(definition, linked, relations) { var DS = this; DS.utils.forEach(definition.relationList, function (def) { var relationName = def.relation; if (relations.length && !DS.utils.contains(relations, relationName)) { return; } if (def.type === 'belongsTo') { DS.utils.forEach(linked, function (injectedItem) { var parent = injectedItem[def.localKey] ? DS.get(relationName, injectedItem[def.localKey]) : null; if (parent) { injectedItem[def.localField] = parent; } }); } else if (def.type === 'hasMany') { DS.utils.forEach(linked, function (injectedItem) { var params = {}; params[def.foreignKey] = injectedItem[definition.idAttribute]; injectedItem[def.localField] = DS.defaults.constructor.prototype.defaultFilter.call(DS, DS.store[relationName].collection, relationName, params, { allowSimpleWhere: true }); }); } else if (def.type === 'hasOne') { DS.utils.forEach(linked, function (injectedItem) { var params = {}; params[def.foreignKey] = injectedItem[definition.idAttribute]; var children = DS.defaults.constructor.prototype.defaultFilter.call(DS, DS.store[relationName].collection, relationName, params, { allowSimpleWhere: true }); if (children.length) { injectedItem[def.localField] = children[0]; } }); } }); } /** * @doc method * @id DS.sync methods:linkAll * @name linkAll * @description * Find relations of a collection of items that are already in the data store and link them to the items. * * ## Signature: * ```js * DS.linkAll(resourceName[, params][, relations]) * ``` * * ## Examples: * * Assume `user` has `hasMany` relationships to `post` and `comment`. * ```js * DS.filter('user'); // [{ name: 'John', id: 1 }, { name: 'Sally', id: 2 }] * * // link posts * DS.linkAll('user', { * name: : 'John' * }, ['post']); * * DS.filter('user'); // [{ name: 'John', id: 1, posts: [...] }, { name: 'Sally', id: 2 }] * * // link all relations * DS.linkAll('user', { name: : 'John' }); * * DS.filter('user'); // [{ name: 'John', id: 1, posts: [...], comments: [...] }, { name: 'Sally', id: 2 }] * ``` * * ## Throws * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {object=} params Parameter object that is used to filter items. Properties: * * - `{object=}` - `where` - Where clause. * - `{number=}` - `limit` - Limit clause. * - `{number=}` - `skip` - Skip clause. * - `{number=}` - `offset` - Same as skip. * - `{string|array=}` - `orderBy` - OrderBy clause. * * @param {array=} relations The relations to be linked. If not provided then all relations will be linked. Default: `[]`. * @returns {object|array} A reference to the item with its linked relations. */ function linkAll(resourceName, params, relations) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var definition = DS.definitions[resourceName]; relations = relations || []; if (!definition) { throw new DSErrors.NER(errorPrefix(resourceName) + resourceName); } else if (params && !DSUtils.isObject(params)) { throw new DSErrors.IA(errorPrefix(resourceName) + 'params: Must be an object!'); } else if (!DSUtils.isArray(relations)) { throw new DSErrors.IA(errorPrefix(resourceName) + 'relations: Must be an array!'); } var linked = DS.filter(resourceName, params); if (linked) { _linkAll.call(DS, definition, linked, relations); } return linked; } module.exports = linkAll; },{}],96:[function(require,module,exports){ function errorPrefix(resourceName) { return 'DS.linkInverse(' + resourceName + ', id[, relations]): '; } function _linkInverse(definition, relations) { var DS = this; DS.utils.forOwn(DS.definitions, function (d) { DS.utils.forOwn(d.relations, function (relatedModels) { DS.utils.forOwn(relatedModels, function (defs, relationName) { if (relations.length && !DS.utils.contains(relations, d.name)) { return; } if (definition.name === relationName) { DS.linkAll(d.name, {}, [definition.name]); } }); }); }); } /** * @doc method * @id DS.sync methods:linkInverse * @name linkInverse * @description * Find relations of the item with the given primary key that are already in the data store and link this item to those * relations. This creates links in the opposite direction of `DS.link`. * * ## Signature: * ```js * DS.linkInverse(resourceName, id[, relations]) * ``` * * ## Examples: * * Assume `organization` has `hasMany` relationship to `user` and `post` has a `belongsTo` relationship to `user`. * ```js * DS.get('user', 1); // { organizationId: 5, id: 1 } * DS.get('organization', 5); // { id: 5 } * DS.filter('post', { userId: 1 }); // [ { id: 23, userId: 1 }, { id: 44, userId: 1 }] * * // link user to its relations * DS.linkInverse('user', 1, ['organization']); * * DS.get('organization', 5); // { id: 5, users: [{ organizationId: 5, id: 1 }] } * * // link user to all of its all relations * DS.linkInverse('user', 1); * * DS.get('user', 1); // { organizationId: 5, id: 1 } * DS.get('organization', 5); // { id: 5, users: [{ organizationId: 5, id: 1 }] } * DS.filter('post', { userId: 1 }); // [ { id: 23, userId: 1, user: {...} }, { id: 44, userId: 1, user: {...} }] * ``` * * ## Throws * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {string|number} id The primary key of the item for to link relations. * @param {array=} relations The relations to be linked. If not provided then all relations will be linked. Default: `[]`. * @returns {object|array} A reference to the item with its linked relations. */ function linkInverse(resourceName, id, relations) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var definition = DS.definitions[resourceName]; relations = relations || []; if (!definition) { throw new DSErrors.NER(errorPrefix(resourceName) + resourceName); } else if (!DSUtils.isString(id) && !DSUtils.isNumber(id)) { throw new DSErrors.IA(errorPrefix(resourceName) + 'id: Must be a string or a number!'); } else if (!DSUtils.isArray(relations)) { throw new DSErrors.IA(errorPrefix(resourceName) + 'relations: Must be an array!'); } var linked = DS.get(resourceName, id); if (linked) { _linkInverse.call(DS, definition, relations); } return linked; } module.exports = linkInverse; },{}],97:[function(require,module,exports){ function errorPrefix(resourceName, id) { return 'DS.previous(' + resourceName + '[, ' + id + ']): '; } /** * @doc method * @id DS.sync methods:previous * @name previous * @description * Synchronously return the previous attributes of the item of the type specified by `resourceName` that has the primary key * specified by `id`. This object represents the state of the item the last time it was saved via an async adapter. * * ## Signature: * ```js * DS.previous(resourceName, id) * ``` * * ## Example: * * ```js * var d = DS.get('document', 5); // { author: 'John Anderson', id: 5 } * * d.author = 'Sally'; * * d; // { author: 'Sally', id: 5 } * * // You may have to do DS.digest() first * * DS.previous('document', 5); // { author: 'John Anderson', id: 5 } * ``` * * ## Throws * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {string|number} id The primary key of the item whose previous attributes are to be retrieved. * @returns {object} The previous attributes of the item of the type specified by `resourceName` with the primary key specified by `id`. */ function previous(resourceName, id) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var resource = DS.store[resourceName]; if (!DS.definitions[resourceName]) { throw new DSErrors.NER(errorPrefix(resourceName, id) + resourceName); } else if (!DSUtils.isString(id) && !DSUtils.isNumber(id)) { throw new DSErrors.IA(errorPrefix(resourceName, id) + 'id: Must be a string or a number!'); } // return resource from cache return resource.previousAttributes[id] ? DSUtils.merge({}, resource.previousAttributes[id]) : undefined; } module.exports = previous; },{}],98:[function(require,module,exports){ function errorPrefix(resourceName) { return 'DS.unlinkInverse(' + resourceName + ', id[, relations]): '; } function _unlinkInverse(definition, linked) { var DS = this; DS.utils.forOwn(DS.definitions, function (d) { DS.utils.forOwn(d.relations, function (relatedModels) { DS.utils.forOwn(relatedModels, function (defs, relationName) { if (definition.name === relationName) { DS.utils.forEach(defs, function (def) { DS.utils.forEach(DS.store[def.name].collection, function (item) { if (def.type === 'hasMany' && item[def.localField]) { var index; DS.utils.forEach(item[def.localField], function (subItem, i) { if (subItem === linked) { index = i; } }); item[def.localField].splice(index, 1); } else if (item[def.localField] === linked) { delete item[def.localField]; } }); }); } }); }); }); } /** * @doc method * @id DS.sync methods:unlinkInverse * @name unlinkInverse * @description * Find relations of the item with the given primary key that are already in the data store and _unlink_ this item from those * relations. This unlinks links that would be created by `DS.linkInverse`. * * ## Signature: * ```js * DS.unlinkInverse(resourceName, id[, relations]) * ``` * * ## Examples: * * Assume `organization` has `hasMany` relationship to `user` and `post` has a `belongsTo` relationship to `user`. * ```js * DS.get('organization', 5); // { id: 5, users: [{ organizationId: 5, id: 1 }] } * * // unlink user 1 from its relations * DS.unlinkInverse('user', 1, ['organization']); * * DS.get('organization', 5); // { id: 5, users: [] } * ``` * * ## Throws * * - `{IllegalArgumentError}` * - `{NonexistentResourceError}` * * @param {string} resourceName The resource type, e.g. 'user', 'comment', etc. * @param {string|number} id The primary key of the item for which to unlink relations. * @param {array=} relations The relations to be unlinked. If not provided then all relations will be unlinked. Default: `[]`. * @returns {object|array} A reference to the item that has been unlinked. */ function unlinkInverse(resourceName, id, relations) { var DS = this; var DSUtils = DS.utils; var DSErrors = DS.errors; var definition = DS.definitions[resourceName]; relations = relations || []; if (!definition) { throw new DSErrors.NER(errorPrefix(resourceName) + resourceName); } else if (!DSUtils.isString(id) && !DSUtils.isNumber(id)) { throw new DSErrors.IA(errorPrefix(resourceName) + 'id: Must be a string or a number!'); } else if (!DSUtils.isArray(relations)) { throw new DSErrors.IA(errorPrefix(resourceName) + 'relations: Must be an array!'); } var linked = DS.get(resourceName, id); if (linked) { _unlinkInverse.call(DS, definition, linked, relations); } return linked; } module.exports = unlinkInverse; },{}],99:[function(require,module,exports){ /** * @doc function * @id errors.types:IllegalArgumentError * @name IllegalArgumentError * @description Error that is thrown/returned when a caller does not honor the pre-conditions of a method/function. * @param {string=} message Error message. Default: `"Illegal Argument!"`. * @returns {IllegalArgumentError} A new instance of `IllegalArgumentError`. */ function IllegalArgumentError(message) { Error.call(this); if (typeof Error.captureStackTrace === 'function') { Error.captureStackTrace(this, this.constructor); } /** * @doc property * @id errors.types:IllegalArgumentError.type * @name type * @propertyOf errors.types:IllegalArgumentError * @description Name of error type. Default: `"IllegalArgumentError"`. */ this.type = this.constructor.name; /** * @doc property * @id errors.types:IllegalArgumentError.message * @name message * @propertyOf errors.types:IllegalArgumentError * @description Error message. Default: `"Illegal Argument!"`. */ this.message = message || 'Illegal Argument!'; } IllegalArgumentError.prototype = Object.create(Error.prototype); IllegalArgumentError.prototype.constructor = IllegalArgumentError; /** * @doc function * @id errors.types:RuntimeError * @name RuntimeError * @description Error that is thrown/returned for invalid state during runtime. * @param {string=} message Error message. Default: `"Runtime Error!"`. * @returns {RuntimeError} A new instance of `RuntimeError`. */ function RuntimeError(message) { Error.call(this); if (typeof Error.captureStackTrace === 'function') { Error.captureStackTrace(this, this.constructor); } /** * @doc property * @id errors.types:RuntimeError.type * @name type * @propertyOf errors.types:RuntimeError * @description Name of error type. Default: `"RuntimeError"`. */ this.type = this.constructor.name; /** * @doc property * @id errors.types:RuntimeError.message * @name message * @propertyOf errors.types:RuntimeError * @description Error message. Default: `"Runtime Error!"`. */ this.message = message || 'RuntimeError Error!'; } RuntimeError.prototype = Object.create(Error.prototype); RuntimeError.prototype.constructor = RuntimeError; /** * @doc function * @id errors.types:NonexistentResourceError * @name NonexistentResourceError * @description Error that is thrown/returned when trying to access a resource that does not exist. * @param {string=} resourceName Name of non-existent resource. * @returns {NonexistentResourceError} A new instance of `NonexistentResourceError`. */ function NonexistentResourceError(resourceName) { Error.call(this); if (typeof Error.captureStackTrace === 'function') { Error.captureStackTrace(this, this.constructor); } /** * @doc property * @id errors.types:NonexistentResourceError.type * @name type * @propertyOf errors.types:NonexistentResourceError * @description Name of error type. Default: `"NonexistentResourceError"`. */ this.type = this.constructor.name; /** * @doc property * @id errors.types:NonexistentResourceError.message * @name message * @propertyOf errors.types:NonexistentResourceError * @description Error message. Default: `"Runtime Error!"`. */ this.message = (resourceName || '') + ' is not a registered resource!'; } NonexistentResourceError.prototype = Object.create(Error.prototype); NonexistentResourceError.prototype.constructor = NonexistentResourceError; /** * @doc interface * @id errors * @name js-data error types * @description * Various error types that may be thrown by js-data. * * - [IllegalArgumentError](/documentation/api/api/errors.types:IllegalArgumentError) * - [RuntimeError](/documentation/api/api/errors.types:RuntimeError) * - [NonexistentResourceError](/documentation/api/api/errors.types:NonexistentResourceError) * * References to the constructor functions of these errors can be found in `DS.errors`. */ module.exports = { IllegalArgumentError: IllegalArgumentError, IA: IllegalArgumentError, RuntimeError: RuntimeError, R: RuntimeError, NonexistentResourceError: NonexistentResourceError, NER: NonexistentResourceError }; },{}],100:[function(require,module,exports){ /** * @doc overview * @id js-data * @name js-data * @description * __Version:__ 0.0.1 * * ## Install * * `bower install js-data` or `npm install js-data` * * #### Manual download * Download js-data from the [Releases](https://github.com/js-data/js-data/releases) section of the js-data GitHub project. * * - `DS` * - `DSHttpAdapter` * - `DSLocalStorageAdapter` * - `DSUtils` * - `DSErrors` * * [DS](/documentation/api/api/DS) is the Data Store itself, which you will inject often. * [DSHttpAdapter](/documentation/api/api/DSHttpAdapter) is useful as a wrapper for `http` and is configurable. * [DSLocalStorageAdapter](/documentation/api/api/DSLocalStorageAdapter) is useful as a wrapper for `localStorage` and is configurable. * [DSUtils](/documentation/api/api/DSUtils) has some useful utility methods. * [DSErrors](/documentation/api/api/DSErrors) provides references to the various errors thrown by the data store. */ module.exports = { DS: require('./datastore'), DSHttpAdapter: require('./adapters/http'), DSLocalStorageAdapter: require('./adapters/localStorage'), DSUtils: require('./utils'), DSErrors: require('./errors') }; },{"./adapters/http":66,"./adapters/localStorage":67,"./datastore":79,"./errors":99,"./utils":101}],101:[function(require,module,exports){ module.exports = { isBoolean: require('mout/lang/isBoolean'), isString: require('mout/lang/isString'), isArray: require('mout/lang/isArray'), isObject: require('mout/lang/isObject'), isNumber: require('mout/lang/isNumber'), isFunction: require('mout/lang/isFunction'), isEmpty: require('mout/lang/isEmpty'), toJson: JSON.stringify, fromJson: JSON.parse, makePath: require('mout/string/makePath'), upperCase: require('mout/string/upperCase'), pascalCase: require('mout/string/pascalCase'), deepMixIn: require('mout/object/deepMixIn'), merge: require('mout/object/merge'), forOwn: require('mout/object/forOwn'), forEach: require('mout/array/forEach'), pick: require('mout/object/pick'), set: require('mout/object/set'), contains: require('mout/array/contains'), filter: require('mout/array/filter'), toLookup: require('mout/array/toLookup'), slice: require('mout/array/slice'), sort: require('mout/array/sort'), updateTimestamp: function (timestamp) { var newTimestamp = typeof Date.now === 'function' ? Date.now() : new Date().getTime(); if (timestamp && newTimestamp <= timestamp) { return timestamp + 1; } else { return newTimestamp; } }, Promise: require('es6-promises'), http: require('axios'), deepFreeze: function deepFreeze(o) { if (typeof Object.freeze === 'function') { var prop, propKey; Object.freeze(o); // First freeze the object. for (propKey in o) { prop = o[propKey]; if (!o.hasOwnProperty(propKey) || typeof prop !== 'object' || Object.isFrozen(prop)) { // If the object is on the prototype, not an object, or is already frozen, // skip it. Note that this might leave an unfrozen reference somewhere in the // object if there is an already frozen object containing an unfrozen object. continue; } deepFreeze(prop); // Recursively call deepFreeze. } } }, diffObjectFromOldObject: function (object, oldObject) { var added = {}; var removed = {}; var changed = {}; for (var prop in oldObject) { var newValue = object[prop]; if (newValue !== undefined && newValue === oldObject[prop]) continue; if (!(prop in object)) { removed[prop] = undefined; continue; } if (newValue !== oldObject[prop]) changed[prop] = newValue; } for (var prop2 in object) { if (prop2 in oldObject) continue; added[prop2] = object[prop2]; } return { added: added, removed: removed, changed: changed }; }, promisify: function (fn, target) { var Promise = this.Promise; if (!fn) { return; } else if (typeof fn !== 'function') { throw new Error('Can only promisify functions!'); } return function () { var args = Array.prototype.slice.apply(arguments); return new Promise(function (resolve, reject) { args.push(function (err, result) { if (err) { reject(err); } else { resolve(result); } }); try { fn.apply(target || this, args); } catch (err) { reject(err); } }); }; } }; },{"axios":2,"es6-promises":21,"mout/array/contains":25,"mout/array/filter":26,"mout/array/forEach":27,"mout/array/slice":30,"mout/array/sort":31,"mout/array/toLookup":32,"mout/lang/isArray":38,"mout/lang/isBoolean":39,"mout/lang/isEmpty":40,"mout/lang/isFunction":41,"mout/lang/isNumber":43,"mout/lang/isObject":44,"mout/lang/isString":46,"mout/object/deepMixIn":50,"mout/object/forOwn":52,"mout/object/merge":54,"mout/object/pick":57,"mout/object/set":58,"mout/string/makePath":61,"mout/string/pascalCase":62,"mout/string/upperCase":65}]},{},[100])(100) });
src/App.js
lelandlee/FoodFates
import React, { Component } from 'react'; const MapboxMap = require('./MapboxMap'); const SideBar = require('./SideBar') const rStore = require('./reduxStore') //If setting up store + actions fail -> move all code to this file.... export default class App extends Component { render() { const store = rStore.getState() var latitude = store.latitude var longitude = store.longitude const headerStyle = { 'text-align': 'center' } return ( <div> <h1 style={headerStyle}>Fates of Food:</h1> {/*<SideBar latitude={latitude} longitude={longitude}/>*/} {/*<MapboxMap mapId="mapbox.outdoors" zoomControl={false} center={[latitude, longitude]} latitude={latitude} longitude={longitude} zoom={11}/>*/} </div> ); } }
js/jqwidgets/demos/react/app/scheduler/bindingtoicalendar/app.js
luissancheza/sice
import React from 'react'; import ReactDOM from 'react-dom'; import JqxScheduler from '../../../jqwidgets-react/react_jqxscheduler.js'; class App extends React.Component { componentDidMount() { setTimeout(() => { this.refs.myScheduler.scrollTop(200); }) } render() { let source = { dataType: 'ics', url: '../sampledata/icalendar.txt' }; let adapter = new $.jqx.dataAdapter(source); let appointmentDataFields = { from: "DTSTART", to: "DTEND", id: "UID", description: "DESCRIPTION", location: "LOCATION", subject: "SUMMARY", recurrencePattern: "RRULE", recurrenceException: "EXDATE", status: "STATUS" }; let views = [ 'dayView', 'weekView', 'monthView' ]; return ( <JqxScheduler ref='myScheduler' date={new $.jqx.date(2016, 11, 23)} width={850} height={600} source={adapter} showLegend={true} appointmentDataFields={appointmentDataFields} view={'weekView'} views={views} /> ) } } ReactDOM.render(<App />, document.getElementById('app'));
src/components/common/svg-icons/social/location-city.js
abzfarah/Pearson.NAPLAN.GnomeH
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let SocialLocationCity = (props) => ( <SvgIcon {...props}> <path d="M15 11V5l-3-3-3 3v2H3v14h18V11h-6zm-8 8H5v-2h2v2zm0-4H5v-2h2v2zm0-4H5V9h2v2zm6 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V9h2v2zm0-4h-2V5h2v2zm6 12h-2v-2h2v2zm0-4h-2v-2h2v2z"/> </SvgIcon> ); SocialLocationCity = pure(SocialLocationCity); SocialLocationCity.displayName = 'SocialLocationCity'; SocialLocationCity.muiName = 'SvgIcon'; export default SocialLocationCity;
src/containers/docs-page/content/why-contribute.js
chuckharmston/testpilot-contribute
import React from 'react'; import DocsPage from '../index'; export default class WhyContribute extends DocsPage { renderTitle() { return 'Why would I contribute?'; } renderContent() { return ( <div> <blockquote> <p> …helped me earn many of the skills I later used for my studies in university and my actual job. I think working on open source projects helps me as much as it helps the project! </p> <div className="docs-page--quote-attribution"> — Errietta Kostala, {' '} <a className="docs-page--quote-source" href="https://www.errietta.me/blog/open-source/" > Why I love contributing to open source software </a> </div> </blockquote> <p>There are many benefits to contributing to open-source software:</p> <h3>Learn</h3> <ul> <li> <strong>Improve your skills</strong> {' '} – most obviously, open-source can be used to hone your existing skills. What better way to improve your understanding of Ember than to contribute to Ember itself? </li> <li> <strong>Develop new skills</strong> {' '} – you can use open-source as a test bed for new skills that you'd like to develop: new frameworks, languages, paradigms, or even entirely new fields. </li> <li> <strong>Practice working with people</strong> {' '} – programming can be a solitary endeavor, but people skills are important to career development. Effective communication is critical when working on open-source, and there is ample opportunity to flex those muscles in new ways. </li> </ul> <h3>Network</h3> <ul> <li> <strong>Meet others with similar interests</strong> {' '} – strong open-source communities keep people coming back for years. Many form lifelong friendships. </li> <li> <strong>Build references</strong> {' '} – open-source maintainers make excellent references on resumes. </li> <li> <strong>Develop public artifacts</strong> {' '} – your contributions become public record of your skill. </li> <li> <strong>Job opportunities</strong> {' '} – many major open-source projects are backed by companies—Facebook backs React, Google backs Go, and Mozilla backs Firefox, for example—and having a strong record as a contributor to one of their project can be an advantage when applying for positions at those companies. </li> <li> <strong>Find mentors or teach others</strong> {' '} – working with others gets you to explain how you do things and ask others for help. The acts of learning and teaching can be fulfilling for everybody involved. </li> </ul> <h3>Contribute</h3> <ul> <li> <strong>Impact software you use</strong> {' '} – have you ever been frustrated that a piece of open-source software doesn't support a feature that is important to you? As a contributor, you can push that forward. </li> <li> <strong>Affect a cause in which you believe</strong> {' '} – many organizations who work in the open-source space are cause-driven. If an organization whose cause you believe in practices open-source, it's a meaningful way to volunteer your time toward that cause. </li> <li> <strong>Empowerment</strong> {' '} – it's very gratifying to feel agency over yours and others' lives and how you experience the world. </li> </ul> </div> ); } }
imports/client/ui/pages/Page/Edit/index.js
mordka/fl-events
import React, { Component } from 'react' import PropTypes from 'prop-types' import { Button } from 'reactstrap' import './styles.scss' class EditPage extends Component { render () { return ( <div id='edit-page'> <Button color='primary' onClick={this.openEditModal}> Edit Page <i className="far fa-edit" /> </Button> </div> ) } openEditModal = () => { window.__editData = this.props.data this.props.history.push('?edit=1') } } EditPage.propTypes = { data: PropTypes.object.isRequired, history: PropTypes.object.isRequired } export default EditPage
ajax/libs/react-router/2.0.9-rc4/ReactRouter.js
holtkamp/cdnjs
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("react")); else if(typeof define === 'function' && define.amd) define(["react"], factory); else if(typeof exports === 'object') exports["ReactRouter"] = factory(require("react")); else root["ReactRouter"] = factory(root["React"]); })(this, function(__WEBPACK_EXTERNAL_MODULE_3__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ function(module, exports, __webpack_require__) { /* components */ 'use strict'; exports.__esModule = true; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _Router2 = __webpack_require__(35); var _Router3 = _interopRequireDefault(_Router2); exports.Router = _Router3['default']; var _Link2 = __webpack_require__(18); var _Link3 = _interopRequireDefault(_Link2); exports.Link = _Link3['default']; var _IndexLink2 = __webpack_require__(29); var _IndexLink3 = _interopRequireDefault(_IndexLink2); exports.IndexLink = _IndexLink3['default']; /* components (configuration) */ var _IndexRedirect2 = __webpack_require__(30); var _IndexRedirect3 = _interopRequireDefault(_IndexRedirect2); exports.IndexRedirect = _IndexRedirect3['default']; var _IndexRoute2 = __webpack_require__(31); var _IndexRoute3 = _interopRequireDefault(_IndexRoute2); exports.IndexRoute = _IndexRoute3['default']; var _Redirect2 = __webpack_require__(19); var _Redirect3 = _interopRequireDefault(_Redirect2); exports.Redirect = _Redirect3['default']; var _Route2 = __webpack_require__(33); var _Route3 = _interopRequireDefault(_Route2); exports.Route = _Route3['default']; /* mixins */ var _History2 = __webpack_require__(28); var _History3 = _interopRequireDefault(_History2); exports.History = _History3['default']; var _Lifecycle2 = __webpack_require__(32); var _Lifecycle3 = _interopRequireDefault(_Lifecycle2); exports.Lifecycle = _Lifecycle3['default']; var _RouteContext2 = __webpack_require__(34); var _RouteContext3 = _interopRequireDefault(_RouteContext2); exports.RouteContext = _RouteContext3['default']; /* utils */ var _useRoutes2 = __webpack_require__(46); var _useRoutes3 = _interopRequireDefault(_useRoutes2); exports.useRoutes = _useRoutes3['default']; var _RouteUtils = __webpack_require__(4); exports.createRoutes = _RouteUtils.createRoutes; var _RouterContext2 = __webpack_require__(20); var _RouterContext3 = _interopRequireDefault(_RouterContext2); exports.RouterContext = _RouterContext3['default']; var _PropTypes2 = __webpack_require__(5); var _PropTypes3 = _interopRequireDefault(_PropTypes2); exports.PropTypes = _PropTypes3['default']; var _match2 = __webpack_require__(44); var _match3 = _interopRequireDefault(_match2); exports.match = _match3['default']; var _useRouterHistory2 = __webpack_require__(14); var _useRouterHistory3 = _interopRequireDefault(_useRouterHistory2); exports.useRouterHistory = _useRouterHistory3['default']; /* histories */ var _browserHistory2 = __webpack_require__(37); var _browserHistory3 = _interopRequireDefault(_browserHistory2); exports.browserHistory = _browserHistory3['default']; var _hashHistory2 = __webpack_require__(42); var _hashHistory3 = _interopRequireDefault(_hashHistory2); exports.hashHistory = _hashHistory3['default']; var _Router4 = _interopRequireDefault(_Router2); exports['default'] = _Router4['default']; /***/ }, /* 1 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports['default'] = routerWarning; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _warning = __webpack_require__(7); var _warning2 = _interopRequireDefault(_warning); function routerWarning(falseToWarn, message) { message = '[react-router] ' + message; false ? _warning2['default'](falseToWarn, message) : undefined; } module.exports = exports['default']; /***/ }, /* 2 */ /***/ function(module, exports, __webpack_require__) { /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ 'use strict'; /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments * to provide information about what broke and what you were * expecting. * * The invariant message will be stripped in production, but the invariant * will remain to ensure logic does not differ in production. */ var invariant = function(condition, format, a, b, c, d, e, f) { if (false) { if (format === undefined) { throw new Error('invariant requires an error message argument'); } } if (!condition) { var error; if (format === undefined) { error = new Error( 'Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.' ); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error( format.replace(/%s/g, function() { return args[argIndex++]; }) ); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } }; module.exports = invariant; /***/ }, /* 3 */ /***/ function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE_3__; /***/ }, /* 4 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; exports.isReactChildren = isReactChildren; exports.createRouteFromReactElement = createRouteFromReactElement; exports.createRoutesFromReactChildren = createRoutesFromReactChildren; exports.createRoutes = createRoutes; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _react = __webpack_require__(3); var _react2 = _interopRequireDefault(_react); var _warning = __webpack_require__(1); var _warning2 = _interopRequireDefault(_warning); function isValidChild(object) { return object == null || _react2['default'].isValidElement(object); } function isReactChildren(object) { return isValidChild(object) || Array.isArray(object) && object.every(isValidChild); } function checkPropTypes(componentName, propTypes, props) { componentName = componentName || 'UnknownComponent'; for (var propName in propTypes) { if (propTypes.hasOwnProperty(propName)) { var error = propTypes[propName](props, propName, componentName); /* istanbul ignore if: error logging */ if (error instanceof Error) false ? _warning2['default'](false, error.message) : undefined; } } } function createRoute(defaultProps, props) { return _extends({}, defaultProps, props); } function createRouteFromReactElement(element) { var type = element.type; var route = createRoute(type.defaultProps, element.props); if (type.propTypes) checkPropTypes(type.displayName || type.name, type.propTypes, route); if (route.children) { var childRoutes = createRoutesFromReactChildren(route.children, route); if (childRoutes.length) route.childRoutes = childRoutes; delete route.children; } return route; } /** * Creates and returns a routes object from the given ReactChildren. JSX * provides a convenient way to visualize how routes in the hierarchy are * nested. * * import { Route, createRoutesFromReactChildren } from 'react-router' * * const routes = createRoutesFromReactChildren( * <Route component={App}> * <Route path="home" component={Dashboard}/> * <Route path="news" component={NewsFeed}/> * </Route> * ) * * Note: This method is automatically used when you provide <Route> children * to a <Router> component. */ function createRoutesFromReactChildren(children, parentRoute) { var routes = []; _react2['default'].Children.forEach(children, function (element) { if (_react2['default'].isValidElement(element)) { // Component classes may have a static create* method. if (element.type.createRouteFromReactElement) { var route = element.type.createRouteFromReactElement(element, parentRoute); if (route) routes.push(route); } else { routes.push(createRouteFromReactElement(element)); } } }); return routes; } /** * Creates and returns an array of routes from the given object which * may be a JSX route, a plain object route, or an array of either. */ function createRoutes(routes) { if (isReactChildren(routes)) { routes = createRoutesFromReactChildren(routes); } else if (routes && !Array.isArray(routes)) { routes = [routes]; } return routes; } /***/ }, /* 5 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports.falsy = falsy; var _react = __webpack_require__(3); var func = _react.PropTypes.func; var object = _react.PropTypes.object; var arrayOf = _react.PropTypes.arrayOf; var oneOfType = _react.PropTypes.oneOfType; var element = _react.PropTypes.element; var shape = _react.PropTypes.shape; var string = _react.PropTypes.string; function falsy(props, propName, componentName) { if (props[propName]) return new Error('<' + componentName + '> should not have a "' + propName + '" prop'); } var history = shape({ listen: func.isRequired, pushState: func.isRequired, replaceState: func.isRequired, go: func.isRequired }); exports.history = history; var location = shape({ pathname: string.isRequired, search: string.isRequired, state: object, action: string.isRequired, key: string }); exports.location = location; var component = oneOfType([func, string]); exports.component = component; var components = oneOfType([component, object]); exports.components = components; var route = oneOfType([object, element]); exports.route = route; var routes = oneOfType([route, arrayOf(route)]); exports.routes = routes; exports['default'] = { falsy: falsy, history: history, location: location, component: component, components: components, route: route }; /***/ }, /* 6 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _warning = __webpack_require__(7); var _warning2 = _interopRequireDefault(_warning); var _extractPath = __webpack_require__(27); var _extractPath2 = _interopRequireDefault(_extractPath); function parsePath(path) { var pathname = _extractPath2['default'](path); var search = ''; var hash = ''; false ? _warning2['default'](path === pathname, 'A path must be pathname + search + hash only, not a fully qualified URL like "%s"', path) : undefined; var hashIndex = pathname.indexOf('#'); if (hashIndex !== -1) { hash = pathname.substring(hashIndex); pathname = pathname.substring(0, hashIndex); } var searchIndex = pathname.indexOf('?'); if (searchIndex !== -1) { search = pathname.substring(searchIndex); pathname = pathname.substring(0, searchIndex); } if (pathname === '') pathname = '/'; return { pathname: pathname, search: search, hash: hash }; } exports['default'] = parsePath; module.exports = exports['default']; /***/ }, /* 7 */ /***/ function(module, exports, __webpack_require__) { /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ 'use strict'; /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var warning = function() {}; if (false) { warning = function(condition, format, args) { var len = arguments.length; args = new Array(len > 2 ? len - 2 : 0); for (var key = 2; key < len; key++) { args[key - 2] = arguments[key]; } if (format === undefined) { throw new Error( '`warning(condition, format, ...args)` requires a warning ' + 'message argument' ); } if (format.length < 10 || (/^[s\W]*$/).test(format)) { throw new Error( 'The warning format should be able to uniquely identify this ' + 'warning. Please, use a more descriptive format than: ' + format ); } if (!condition) { var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function() { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch(x) {} } }; } module.exports = warning; /***/ }, /* 8 */ /***/ function(module, exports) { /** * Indicates that navigation was caused by a call to history.push. */ 'use strict'; exports.__esModule = true; var PUSH = 'PUSH'; exports.PUSH = PUSH; /** * Indicates that navigation was caused by a call to history.replace. */ var REPLACE = 'REPLACE'; exports.REPLACE = REPLACE; /** * Indicates that navigation was caused by some other action such * as using a browser's back/forward buttons and/or manually manipulating * the URL in a browser's location bar. This is the default. * * See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate * for more information. */ var POP = 'POP'; exports.POP = POP; exports['default'] = { PUSH: PUSH, REPLACE: REPLACE, POP: POP }; /***/ }, /* 9 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports.compilePattern = compilePattern; exports.matchPattern = matchPattern; exports.getParamNames = getParamNames; exports.getParams = getParams; exports.formatPattern = formatPattern; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _invariant = __webpack_require__(2); var _invariant2 = _interopRequireDefault(_invariant); function escapeRegExp(string) { return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); } function escapeSource(string) { return escapeRegExp(string).replace(/\/+/g, '/+'); } function _compilePattern(pattern) { var regexpSource = ''; var paramNames = []; var tokens = []; var match = undefined, lastIndex = 0, matcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)/g; while (match = matcher.exec(pattern)) { if (match.index !== lastIndex) { tokens.push(pattern.slice(lastIndex, match.index)); regexpSource += escapeSource(pattern.slice(lastIndex, match.index)); } if (match[1]) { regexpSource += '([^/?#]+)'; paramNames.push(match[1]); } else if (match[0] === '**') { regexpSource += '([\\s\\S]*)'; paramNames.push('splat'); } else if (match[0] === '*') { regexpSource += '([\\s\\S]*?)'; paramNames.push('splat'); } else if (match[0] === '(') { regexpSource += '(?:'; } else if (match[0] === ')') { regexpSource += ')?'; } tokens.push(match[0]); lastIndex = matcher.lastIndex; } if (lastIndex !== pattern.length) { tokens.push(pattern.slice(lastIndex, pattern.length)); regexpSource += escapeSource(pattern.slice(lastIndex, pattern.length)); } return { pattern: pattern, regexpSource: regexpSource, paramNames: paramNames, tokens: tokens }; } var CompiledPatternsCache = {}; function compilePattern(pattern) { if (!(pattern in CompiledPatternsCache)) CompiledPatternsCache[pattern] = _compilePattern(pattern); return CompiledPatternsCache[pattern]; } /** * Attempts to match a pattern on the given pathname. Patterns may use * the following special characters: * * - :paramName Matches a URL segment up to the next /, ?, or #. The * captured string is considered a "param" * - () Wraps a segment of the URL that is optional * - * Consumes (non-greedy) all characters up to the next * character in the pattern, or to the end of the URL if * there is none * - ** Consumes (greedy) all characters up to the next character * in the pattern, or to the end of the URL if there is none * * The return value is an object with the following properties: * * - remainingPathname * - paramNames * - paramValues */ function matchPattern(pattern, pathname) { // Make leading slashes consistent between pattern and pathname. if (pattern.charAt(0) !== '/') { pattern = '/' + pattern; } if (pathname.charAt(0) !== '/') { pathname = '/' + pathname; } var _compilePattern2 = compilePattern(pattern); var regexpSource = _compilePattern2.regexpSource; var paramNames = _compilePattern2.paramNames; var tokens = _compilePattern2.tokens; regexpSource += '/*'; // Capture path separators // Special-case patterns like '*' for catch-all routes. var captureRemaining = tokens[tokens.length - 1] !== '*'; if (captureRemaining) { // This will match newlines in the remaining path. regexpSource += '([\\s\\S]*?)'; } var match = pathname.match(new RegExp('^' + regexpSource + '$', 'i')); var remainingPathname = undefined, paramValues = undefined; if (match != null) { if (captureRemaining) { remainingPathname = match.pop(); var matchedPath = match[0].substr(0, match[0].length - remainingPathname.length); // If we didn't match the entire pathname, then make sure that the match // we did get ends at a path separator (potentially the one we added // above at the beginning of the path, if the actual match was empty). if (remainingPathname && matchedPath.charAt(matchedPath.length - 1) !== '/') { return { remainingPathname: null, paramNames: paramNames, paramValues: null }; } } else { // If this matched at all, then the match was the entire pathname. remainingPathname = ''; } paramValues = match.slice(1).map(function (v) { return v != null ? decodeURIComponent(v) : v; }); } else { remainingPathname = paramValues = null; } return { remainingPathname: remainingPathname, paramNames: paramNames, paramValues: paramValues }; } function getParamNames(pattern) { return compilePattern(pattern).paramNames; } function getParams(pattern, pathname) { var _matchPattern = matchPattern(pattern, pathname); var paramNames = _matchPattern.paramNames; var paramValues = _matchPattern.paramValues; if (paramValues != null) { return paramNames.reduce(function (memo, paramName, index) { memo[paramName] = paramValues[index]; return memo; }, {}); } return null; } /** * Returns a version of the given pattern with params interpolated. Throws * if there is a dynamic segment of the pattern for which there is no param. */ function formatPattern(pattern, params) { params = params || {}; var _compilePattern3 = compilePattern(pattern); var tokens = _compilePattern3.tokens; var parenCount = 0, pathname = '', splatIndex = 0; var token = undefined, paramName = undefined, paramValue = undefined; for (var i = 0, len = tokens.length; i < len; ++i) { token = tokens[i]; if (token === '*' || token === '**') { paramValue = Array.isArray(params.splat) ? params.splat[splatIndex++] : params.splat; !(paramValue != null || parenCount > 0) ? false ? _invariant2['default'](false, 'Missing splat #%s for path "%s"', splatIndex, pattern) : _invariant2['default'](false) : undefined; if (paramValue != null) pathname += encodeURI(paramValue); } else if (token === '(') { parenCount += 1; } else if (token === ')') { parenCount -= 1; } else if (token.charAt(0) === ':') { paramName = token.substring(1); paramValue = params[paramName]; !(paramValue != null || parenCount > 0) ? false ? _invariant2['default'](false, 'Missing "%s" parameter for path "%s"', paramName, pattern) : _invariant2['default'](false) : undefined; if (paramValue != null) pathname += encodeURIComponent(paramValue); } else { pathname += token; } } return pathname.replace(/\/+/g, '/'); } /***/ }, /* 10 */ /***/ function(module, exports) { 'use strict'; exports.__esModule = true; var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); exports.canUseDOM = canUseDOM; /***/ }, /* 11 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } var _warning = __webpack_require__(7); var _warning2 = _interopRequireDefault(_warning); var _queryString = __webpack_require__(55); var _runTransitionHook = __webpack_require__(17); var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); var _parsePath = __webpack_require__(6); var _parsePath2 = _interopRequireDefault(_parsePath); var _deprecate = __webpack_require__(16); var _deprecate2 = _interopRequireDefault(_deprecate); var SEARCH_BASE_KEY = '$searchBase'; function defaultStringifyQuery(query) { return _queryString.stringify(query).replace(/%20/g, '+'); } var defaultParseQueryString = _queryString.parse; function isNestedObject(object) { for (var p in object) { if (object.hasOwnProperty(p) && typeof object[p] === 'object' && !Array.isArray(object[p]) && object[p] !== null) return true; }return false; } /** * Returns a new createHistory function that may be used to create * history objects that know how to handle URL queries. */ function useQueries(createHistory) { return function () { var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; var stringifyQuery = options.stringifyQuery; var parseQueryString = options.parseQueryString; var historyOptions = _objectWithoutProperties(options, ['stringifyQuery', 'parseQueryString']); var history = createHistory(historyOptions); if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery; if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString; function addQuery(location) { if (location.query == null) { var search = location.search; location.query = parseQueryString(search.substring(1)); location[SEARCH_BASE_KEY] = { search: search, searchBase: '' }; } // TODO: Instead of all the book-keeping here, this should just strip the // stringified query from the search. return location; } function appendQuery(location, query) { var _extends2; var queryString = undefined; if (!query || (queryString = stringifyQuery(query)) === '') return location; false ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined; if (typeof location === 'string') location = _parsePath2['default'](location); var searchBaseSpec = location[SEARCH_BASE_KEY]; var searchBase = undefined; if (searchBaseSpec && location.search === searchBaseSpec.search) { searchBase = searchBaseSpec.searchBase; } else { searchBase = location.search || ''; } var search = searchBase + (searchBase ? '&' : '?') + queryString; return _extends({}, location, (_extends2 = { search: search }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2)); } // Override all read methods with query-aware versions. function listenBefore(hook) { return history.listenBefore(function (location, callback) { _runTransitionHook2['default'](hook, addQuery(location), callback); }); } function listen(listener) { return history.listen(function (location) { listener(addQuery(location)); }); } // Override all write methods with query-aware versions. function push(location) { history.push(appendQuery(location, location.query)); } function replace(location) { history.replace(appendQuery(location, location.query)); } function createPath(location, query) { //warning( // !query, // 'the query argument to createPath is deprecated; use a location descriptor instead' //) return history.createPath(appendQuery(location, query || location.query)); } function createHref(location, query) { //warning( // !query, // 'the query argument to createHref is deprecated; use a location descriptor instead' //) return history.createHref(appendQuery(location, query || location.query)); } function createLocation() { return addQuery(history.createLocation.apply(history, arguments)); } // deprecated function pushState(state, path, query) { if (typeof path === 'string') path = _parsePath2['default'](path); push(_extends({ state: state }, path, { query: query })); } // deprecated function replaceState(state, path, query) { if (typeof path === 'string') path = _parsePath2['default'](path); replace(_extends({ state: state }, path, { query: query })); } return _extends({}, history, { listenBefore: listenBefore, listen: listen, push: push, replace: replace, createPath: createPath, createHref: createHref, createLocation: createLocation, pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'), replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead') }); }; } exports['default'] = useQueries; module.exports = exports['default']; /***/ }, /* 12 */ /***/ function(module, exports) { "use strict"; exports.__esModule = true; exports.loopAsync = loopAsync; exports.mapAsync = mapAsync; function loopAsync(turns, work, callback) { var currentTurn = 0, isDone = false; function done() { isDone = true; callback.apply(this, arguments); } function next() { if (isDone) return; if (currentTurn < turns) { work.call(this, currentTurn++, next, done); } else { done.apply(this, arguments); } } next(); } function mapAsync(array, work, callback) { var length = array.length; var values = []; if (length === 0) return callback(null, values); var isDone = false, doneCount = 0; function done(index, error, value) { if (isDone) return; if (error) { isDone = true; callback(error); } else { values[index] = value; isDone = ++doneCount === length; if (isDone) callback(null, values); } } array.forEach(function (item, index) { work(item, index, function (error, value) { done(index, error, value); }); }); } /***/ }, /* 13 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; exports['default'] = createTransitionManager; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _warning = __webpack_require__(1); var _warning2 = _interopRequireDefault(_warning); var _historyLibActions = __webpack_require__(8); var _computeChangedRoutes2 = __webpack_require__(38); var _computeChangedRoutes3 = _interopRequireDefault(_computeChangedRoutes2); var _TransitionUtils = __webpack_require__(36); var _isActive2 = __webpack_require__(43); var _isActive3 = _interopRequireDefault(_isActive2); var _getComponents = __webpack_require__(40); var _getComponents2 = _interopRequireDefault(_getComponents); var _matchRoutes = __webpack_require__(45); var _matchRoutes2 = _interopRequireDefault(_matchRoutes); function hasAnyProperties(object) { for (var p in object) { if (object.hasOwnProperty(p)) return true; }return false; } function createTransitionManager(history, routes) { var state = {}; // Signature should be (location, indexOnly), but needs to support (path, // query, indexOnly) function isActive(location) { var indexOnlyOrDeprecatedQuery = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; var deprecatedIndexOnly = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2]; var indexOnly = undefined; if (indexOnlyOrDeprecatedQuery && indexOnlyOrDeprecatedQuery !== true || deprecatedIndexOnly !== null) { false ? _warning2['default'](false, '`isActive(pathname, query, indexOnly) is deprecated; use `isActive(location, indexOnly)` with a location descriptor instead: http://bit.ly/1VpTo9H') : undefined; location = { pathname: location, query: indexOnlyOrDeprecatedQuery }; indexOnly = deprecatedIndexOnly || false; } else { if (typeof location === 'string') { location = { pathname: location }; } indexOnly = indexOnlyOrDeprecatedQuery; } return _isActive3['default'](location, indexOnly, state.location, state.routes, state.params); } function createLocationFromRedirectInfo(_ref) { var pathname = _ref.pathname; var query = _ref.query; var state = _ref.state; return history.createLocation(history.createPath(pathname, query), state, _historyLibActions.REPLACE); } var partialNextState = undefined; function match(location, callback) { if (partialNextState && partialNextState.location === location) { // Continue from where we left off. finishMatch(partialNextState, callback); } else { _matchRoutes2['default'](routes, location, function (error, nextState) { if (error) { callback(error); } else if (nextState) { finishMatch(_extends({}, nextState, { location: location }), callback); } else { callback(); } }); } } function finishMatch(nextState, callback) { var _computeChangedRoutes = _computeChangedRoutes3['default'](state, nextState); var leaveRoutes = _computeChangedRoutes.leaveRoutes; var enterRoutes = _computeChangedRoutes.enterRoutes; _TransitionUtils.runLeaveHooks(leaveRoutes); // Tear down confirmation hooks for left routes leaveRoutes.forEach(removeListenBeforeHooksForRoute); _TransitionUtils.runEnterHooks(enterRoutes, nextState, function (error, redirectInfo) { if (error) { callback(error); } else if (redirectInfo) { callback(null, createLocationFromRedirectInfo(redirectInfo)); } else { // TODO: Fetch components after state is updated. _getComponents2['default'](nextState, function (error, components) { if (error) { callback(error); } else { // TODO: Make match a pure function and have some other API // for "match and update state". callback(null, null, state = _extends({}, nextState, { components: components })); } }); } }); } var RouteGuid = 1; function getRouteID(route) { var create = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; return route.__id__ || create && (route.__id__ = RouteGuid++); } var RouteHooks = {}; function getRouteHooksForRoutes(routes) { return routes.reduce(function (hooks, route) { hooks.push.apply(hooks, RouteHooks[getRouteID(route)]); return hooks; }, []); } function transitionHook(location, callback) { _matchRoutes2['default'](routes, location, function (error, nextState) { if (nextState == null) { // TODO: We didn't actually match anything, but hang // onto error/nextState so we don't have to matchRoutes // again in the listen callback. callback(); return; } // Cache some state here so we don't have to // matchRoutes() again in the listen callback. partialNextState = _extends({}, nextState, { location: location }); var hooks = getRouteHooksForRoutes(_computeChangedRoutes3['default'](state, partialNextState).leaveRoutes); var result = undefined; for (var i = 0, len = hooks.length; result == null && i < len; ++i) { // Passing the location arg here indicates to // the user that this is a transition hook. result = hooks[i](location); } callback(result); }); } /* istanbul ignore next: untestable with Karma */ function beforeUnloadHook() { // Synchronously check to see if any route hooks want // to prevent the current window/tab from closing. if (state.routes) { var hooks = getRouteHooksForRoutes(state.routes); var message = undefined; for (var i = 0, len = hooks.length; typeof message !== 'string' && i < len; ++i) { // Passing no args indicates to the user that this is a // beforeunload hook. We don't know the next location. message = hooks[i](); } return message; } } var unlistenBefore = undefined, unlistenBeforeUnload = undefined; function removeListenBeforeHooksForRoute(route) { var routeID = getRouteID(route, false); if (!routeID) { return; } delete RouteHooks[routeID]; if (!hasAnyProperties(RouteHooks)) { // teardown transition & beforeunload hooks if (unlistenBefore) { unlistenBefore(); unlistenBefore = null; } if (unlistenBeforeUnload) { unlistenBeforeUnload(); unlistenBeforeUnload = null; } } } /** * Registers the given hook function to run before leaving the given route. * * During a normal transition, the hook function receives the next location * as its only argument and must return either a) a prompt message to show * the user, to make sure they want to leave the page or b) false, to prevent * the transition. * * During the beforeunload event (in browsers) the hook receives no arguments. * In this case it must return a prompt message to prevent the transition. * * Returns a function that may be used to unbind the listener. */ function listenBeforeLeavingRoute(route, hook) { // TODO: Warn if they register for a route that isn't currently // active. They're probably doing something wrong, like re-creating // route objects on every location change. var routeID = getRouteID(route); var hooks = RouteHooks[routeID]; if (!hooks) { var thereWereNoRouteHooks = !hasAnyProperties(RouteHooks); RouteHooks[routeID] = [hook]; if (thereWereNoRouteHooks) { // setup transition & beforeunload hooks unlistenBefore = history.listenBefore(transitionHook); if (history.listenBeforeUnload) unlistenBeforeUnload = history.listenBeforeUnload(beforeUnloadHook); } } else { false ? _warning2['default'](false, 'adding multiple leave hooks for the same route is deprecated; manage multiple confirmations in your own code instead') : undefined; if (hooks.indexOf(hook) === -1) { hooks.push(hook); } } return function () { var hooks = RouteHooks[routeID]; if (hooks) { var newHooks = hooks.filter(function (item) { return item !== hook; }); if (newHooks.length === 0) { removeListenBeforeHooksForRoute(route); } else { RouteHooks[routeID] = newHooks; } } }; } /** * This is the API for stateful environments. As the location * changes, we update state and call the listener. We can also * gracefully handle errors and redirects. */ function listen(listener) { // TODO: Only use a single history listener. Otherwise we'll // end up with multiple concurrent calls to match. return history.listen(function (location) { if (state.location === location) { listener(null, state); } else { match(location, function (error, redirectLocation, nextState) { if (error) { listener(error); } else if (redirectLocation) { history.transitionTo(redirectLocation); } else if (nextState) { listener(null, nextState); } else { false ? _warning2['default'](false, 'Location "%s" did not match any routes', location.pathname + location.search + location.hash) : undefined; } }); } }); } return { isActive: isActive, match: match, listenBeforeLeavingRoute: listenBeforeLeavingRoute, listen: listen }; } //export default useRoutes module.exports = exports['default']; /***/ }, /* 14 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports['default'] = useRouterHistory; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _historyLibUseQueries = __webpack_require__(11); var _historyLibUseQueries2 = _interopRequireDefault(_historyLibUseQueries); var _historyLibUseBasename = __webpack_require__(54); var _historyLibUseBasename2 = _interopRequireDefault(_historyLibUseBasename); function useRouterHistory(createHistory) { return function (options) { var history = _historyLibUseBasename2['default'](_historyLibUseQueries2['default'](createHistory))(options); history.__v2_compatible__ = true; return history; }; } module.exports = exports['default']; /***/ }, /* 15 */ /***/ function(module, exports) { 'use strict'; exports.__esModule = true; exports.addEventListener = addEventListener; exports.removeEventListener = removeEventListener; exports.getHashPath = getHashPath; exports.replaceHashPath = replaceHashPath; exports.getWindowPath = getWindowPath; exports.go = go; exports.getUserConfirmation = getUserConfirmation; exports.supportsHistory = supportsHistory; exports.supportsGoWithoutReloadUsingHash = supportsGoWithoutReloadUsingHash; function addEventListener(node, event, listener) { if (node.addEventListener) { node.addEventListener(event, listener, false); } else { node.attachEvent('on' + event, listener); } } function removeEventListener(node, event, listener) { if (node.removeEventListener) { node.removeEventListener(event, listener, false); } else { node.detachEvent('on' + event, listener); } } function getHashPath() { // We can't use window.location.hash here because it's not // consistent across browsers - Firefox will pre-decode it! return window.location.href.split('#')[1] || ''; } function replaceHashPath(path) { window.location.replace(window.location.pathname + window.location.search + '#' + path); } function getWindowPath() { return window.location.pathname + window.location.search + window.location.hash; } function go(n) { if (n) window.history.go(n); } function getUserConfirmation(message, callback) { callback(window.confirm(message)); } /** * Returns true if the HTML5 history API is supported. Taken from Modernizr. * * https://github.com/Modernizr/Modernizr/blob/master/LICENSE * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js * changed to avoid false negatives for Windows Phones: https://github.com/rackt/react-router/issues/586 */ function supportsHistory() { var ua = navigator.userAgent; if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) { return false; } // FIXME: Work around our browser history not working correctly on Chrome // iOS: https://github.com/rackt/react-router/issues/2565 if (ua.indexOf('CriOS') !== -1) { return false; } return window.history && 'pushState' in window.history; } /** * Returns false if using go(n) with hash history causes a full page reload. */ function supportsGoWithoutReloadUsingHash() { var ua = navigator.userAgent; return ua.indexOf('Firefox') === -1; } /***/ }, /* 16 */ /***/ function(module, exports) { //import warning from 'warning' "use strict"; exports.__esModule = true; function deprecate(fn) { return fn; //return function () { // warning(false, '[history] ' + message) // return fn.apply(this, arguments) //} } exports["default"] = deprecate; module.exports = exports["default"]; /***/ }, /* 17 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _warning = __webpack_require__(7); var _warning2 = _interopRequireDefault(_warning); function runTransitionHook(hook, location, callback) { var result = hook(location, callback); if (hook.length < 2) { // Assume the hook runs synchronously and automatically // call the callback with the return value. callback(result); } else { false ? _warning2['default'](result === undefined, 'You should not "return" in a transition hook with a callback argument; call the callback instead') : undefined; } } exports['default'] = runTransitionHook; module.exports = exports['default']; /***/ }, /* 18 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } var _react = __webpack_require__(3); var _react2 = _interopRequireDefault(_react); var _warning = __webpack_require__(1); var _warning2 = _interopRequireDefault(_warning); var _React$PropTypes = _react2['default'].PropTypes; var bool = _React$PropTypes.bool; var object = _React$PropTypes.object; var string = _React$PropTypes.string; var func = _React$PropTypes.func; var oneOfType = _React$PropTypes.oneOfType; function isLeftClickEvent(event) { return event.button === 0; } function isModifiedEvent(event) { return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey); } function isEmptyObject(object) { for (var p in object) { if (object.hasOwnProperty(p)) return false; }return true; } function createLocationDescriptor(_ref) { var to = _ref.to; var query = _ref.query; var hash = _ref.hash; var state = _ref.state; if (typeof to !== 'object') { return { pathname: to, query: query, hash: hash, state: state }; } else { return _extends({ query: query, hash: hash, state: state }, to); } } /** * A <Link> is used to create an <a> element that links to a route. * When that route is active, the link gets the value of its * activeClassName prop. * * For example, assuming you have the following route: * * <Route path="/posts/:postID" component={Post} /> * * You could use the following component to link to that route: * * <Link to={`/posts/${post.id}`} /> * * Links may pass along location state and/or query string parameters * in the state/query props, respectively. * * <Link ... query={{ show: true }} state={{ the: 'state' }} /> */ var Link = _react2['default'].createClass({ displayName: 'Link', contextTypes: { router: object }, propTypes: { to: oneOfType([string, object]).isRequired, query: object, hash: string, state: object, activeStyle: object, activeClassName: string, onlyActiveOnIndex: bool.isRequired, onClick: func }, getDefaultProps: function getDefaultProps() { return { onlyActiveOnIndex: false, className: '', style: {} }; }, handleClick: function handleClick(event) { var allowTransition = true; if (this.props.onClick) this.props.onClick(event); if (isModifiedEvent(event) || !isLeftClickEvent(event)) return; if (event.defaultPrevented === true) allowTransition = false; // If target prop is set (e.g. to "_blank") let browser handle link. /* istanbul ignore if: untestable with Karma */ if (this.props.target) { if (!allowTransition) event.preventDefault(); return; } event.preventDefault(); if (allowTransition) { var _props = this.props; var state = _props.state; var to = _props.to; var query = _props.query; var hash = _props.hash; var _location = createLocationDescriptor({ to: to, query: query, hash: hash, state: state }); this.context.router.push(_location); } }, render: function render() { var _props2 = this.props; var to = _props2.to; var query = _props2.query; var hash = _props2.hash; var state = _props2.state; var activeClassName = _props2.activeClassName; var activeStyle = _props2.activeStyle; var onlyActiveOnIndex = _props2.onlyActiveOnIndex; var props = _objectWithoutProperties(_props2, ['to', 'query', 'hash', 'state', 'activeClassName', 'activeStyle', 'onlyActiveOnIndex']); false ? _warning2['default'](!(query || hash || state), 'the `query`, `hash`, and `state` props on `<Link>` are deprecated, use `<Link to={{ pathname, query, hash, state }}/>, see http://bit.ly/1VpTo9H.') : undefined; // Ignore if rendered outside the context of router, simplifies unit testing. var router = this.context.router; if (router) { var loc = createLocationDescriptor({ to: to, query: query, hash: hash, state: state }); props.href = router.createHref(loc); if (activeClassName || activeStyle != null && !isEmptyObject(activeStyle)) { if (router.isActive(loc, onlyActiveOnIndex)) { if (activeClassName) props.className += props.className === '' ? activeClassName : ' ' + activeClassName; if (activeStyle) props.style = _extends({}, props.style, activeStyle); } } } return _react2['default'].createElement('a', _extends({}, props, { onClick: this.handleClick })); } }); exports['default'] = Link; module.exports = exports['default']; /***/ }, /* 19 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _react = __webpack_require__(3); var _react2 = _interopRequireDefault(_react); var _invariant = __webpack_require__(2); var _invariant2 = _interopRequireDefault(_invariant); var _RouteUtils = __webpack_require__(4); var _PatternUtils = __webpack_require__(9); var _PropTypes = __webpack_require__(5); var _React$PropTypes = _react2['default'].PropTypes; var string = _React$PropTypes.string; var object = _React$PropTypes.object; /** * A <Redirect> is used to declare another URL path a client should * be sent to when they request a given URL. * * Redirects are placed alongside routes in the route configuration * and are traversed in the same manner. */ var Redirect = _react2['default'].createClass({ displayName: 'Redirect', statics: { createRouteFromReactElement: function createRouteFromReactElement(element) { var route = _RouteUtils.createRouteFromReactElement(element); if (route.from) route.path = route.from; route.onEnter = function (nextState, replaceState) { var location = nextState.location; var params = nextState.params; var pathname = undefined; if (route.to.charAt(0) === '/') { pathname = _PatternUtils.formatPattern(route.to, params); } else if (!route.to) { pathname = location.pathname; } else { var routeIndex = nextState.routes.indexOf(route); var parentPattern = Redirect.getRoutePattern(nextState.routes, routeIndex - 1); var pattern = parentPattern.replace(/\/*$/, '/') + route.to; pathname = _PatternUtils.formatPattern(pattern, params); } replaceState(route.state || location.state, pathname, route.query || location.query); }; return route; }, getRoutePattern: function getRoutePattern(routes, routeIndex) { var parentPattern = ''; for (var i = routeIndex; i >= 0; i--) { var route = routes[i]; var pattern = route.path || ''; parentPattern = pattern.replace(/\/*$/, '/') + parentPattern; if (pattern.indexOf('/') === 0) break; } return '/' + parentPattern; } }, propTypes: { path: string, from: string, // Alias for path to: string.isRequired, query: object, state: object, onEnter: _PropTypes.falsy, children: _PropTypes.falsy }, /* istanbul ignore next: sanity check */ render: function render() { true ? false ? _invariant2['default'](false, '<Redirect> elements are for router configuration only and should not be rendered') : _invariant2['default'](false) : undefined; } }); exports['default'] = Redirect; module.exports = exports['default']; /***/ }, /* 20 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _invariant = __webpack_require__(2); var _invariant2 = _interopRequireDefault(_invariant); var _react = __webpack_require__(3); var _react2 = _interopRequireDefault(_react); var _deprecateObjectProperties = __webpack_require__(22); var _deprecateObjectProperties2 = _interopRequireDefault(_deprecateObjectProperties); var _getRouteParams = __webpack_require__(41); var _getRouteParams2 = _interopRequireDefault(_getRouteParams); var _RouteUtils = __webpack_require__(4); var _warning = __webpack_require__(1); var _warning2 = _interopRequireDefault(_warning); var _React$PropTypes = _react2['default'].PropTypes; var array = _React$PropTypes.array; var func = _React$PropTypes.func; var object = _React$PropTypes.object; /** * A <RouterContext> renders the component tree for a given router state * and sets the history object and the current location in context. */ var RouterContext = _react2['default'].createClass({ displayName: 'RouterContext', propTypes: { history: object, router: object.isRequired, location: object.isRequired, routes: array.isRequired, params: object.isRequired, components: array.isRequired, createElement: func.isRequired }, getDefaultProps: function getDefaultProps() { return { createElement: _react2['default'].createElement }; }, childContextTypes: { history: object, location: object.isRequired, router: object.isRequired }, getChildContext: function getChildContext() { var _props = this.props; var router = _props.router; var history = _props.history; var location = _props.location; if (!router) { false ? _warning2['default'](false, '`<RouterContext>` expects a `router` rather than a `history`') : undefined; router = _extends({}, history, { setRouteLeaveHook: history.listenBeforeLeavingRoute }); delete router.listenBeforeLeavingRoute; } if (false) { location = _deprecateObjectProperties2['default'](location, '`context.location` is deprecated, please use a route component\'s `props.location` instead. http://bit.ly/1mq2pTU'); } return { history: history, location: location, router: router }; }, createElement: function createElement(component, props) { return component == null ? null : this.props.createElement(component, props); }, render: function render() { var _this = this; var _props2 = this.props; var history = _props2.history; var location = _props2.location; var routes = _props2.routes; var params = _props2.params; var components = _props2.components; var element = null; if (components) { element = components.reduceRight(function (element, components, index) { if (components == null) return element; // Don't create new children; use the grandchildren. var route = routes[index]; var routeParams = _getRouteParams2['default'](route, params); var props = { history: history, location: location, params: params, route: route, routeParams: routeParams, routes: routes }; if (_RouteUtils.isReactChildren(element)) { props.children = element; } else if (element) { for (var prop in element) { if (element.hasOwnProperty(prop)) props[prop] = element[prop]; } } if (typeof components === 'object') { var elements = {}; for (var key in components) { if (components.hasOwnProperty(key)) { // Pass through the key as a prop to createElement to allow // custom createElement functions to know which named component // they're rendering, for e.g. matching up to fetched data. elements[key] = _this.createElement(components[key], _extends({ key: key }, props)); } } return elements; } return _this.createElement(components, props); }, element); } !(element === null || element === false || _react2['default'].isValidElement(element)) ? false ? _invariant2['default'](false, 'The root route must render a single element') : _invariant2['default'](false) : undefined; return element; } }); exports['default'] = RouterContext; module.exports = exports['default']; /***/ }, /* 21 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; exports.createRouterObject = createRouterObject; exports.createRoutingHistory = createRoutingHistory; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _deprecateObjectProperties = __webpack_require__(22); var _deprecateObjectProperties2 = _interopRequireDefault(_deprecateObjectProperties); function createRouterObject(history, transitionManager) { return _extends({}, history, { setRouteLeaveHook: transitionManager.listenBeforeLeavingRoute, isActive: transitionManager.isActive }); } // deprecated function createRoutingHistory(history, transitionManager) { history = _extends({}, history, transitionManager); if (false) { history = _deprecateObjectProperties2['default'](history, '`props.history` and `context.history` are deprecated. Please use `context.router`. http://bit.ly/1mj4IZr'); } return history; } /***/ }, /* 22 */ /***/ function(module, exports, __webpack_require__) { /*eslint no-empty: 0*/ 'use strict'; exports.__esModule = true; exports['default'] = deprecateObjectProperties; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _warning = __webpack_require__(1); var _warning2 = _interopRequireDefault(_warning); var useMembrane = false; if (false) { try { Object.defineProperty({}, 'x', { get: function get() { return true; } }).x; useMembrane = true; } catch (e) {} } // wraps an object in a membrane to warn about deprecated property access function deprecateObjectProperties(object, message) { if (!useMembrane) return object; var membrane = {}; var _loop = function (prop) { if (typeof object[prop] === 'function') { membrane[prop] = function () { false ? _warning2['default'](false, message) : undefined; return object[prop].apply(object, arguments); }; } else { Object.defineProperty(membrane, prop, { configurable: false, enumerable: true, get: function get() { false ? _warning2['default'](false, message) : undefined; return object[prop]; } }); } }; for (var prop in object) { _loop(prop); } return membrane; } module.exports = exports['default']; /***/ }, /* 23 */ /***/ function(module, exports, __webpack_require__) { /*eslint-disable no-empty */ 'use strict'; exports.__esModule = true; exports.saveState = saveState; exports.readState = readState; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _warning = __webpack_require__(7); var _warning2 = _interopRequireDefault(_warning); var KeyPrefix = '@@History/'; var QuotaExceededError = 'QuotaExceededError'; var SecurityError = 'SecurityError'; function createKey(key) { return KeyPrefix + key; } function saveState(key, state) { try { window.sessionStorage.setItem(createKey(key), JSON.stringify(state)); } catch (error) { if (error.name === SecurityError) { // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any // attempt to access window.sessionStorage. false ? _warning2['default'](false, '[history] Unable to save state; sessionStorage is not available due to security settings') : undefined; return; } if (error.name === QuotaExceededError && window.sessionStorage.length === 0) { // Safari "private mode" throws QuotaExceededError. false ? _warning2['default'](false, '[history] Unable to save state; sessionStorage is not available in Safari private mode') : undefined; return; } throw error; } } function readState(key) { var json = undefined; try { json = window.sessionStorage.getItem(createKey(key)); } catch (error) { if (error.name === SecurityError) { // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any // attempt to access window.sessionStorage. false ? _warning2['default'](false, '[history] Unable to read state; sessionStorage is not available due to security settings') : undefined; return null; } } if (json) { try { return JSON.parse(json); } catch (error) { // Ignore invalid JSON. } } return null; } /***/ }, /* 24 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _invariant = __webpack_require__(2); var _invariant2 = _interopRequireDefault(_invariant); var _ExecutionEnvironment = __webpack_require__(10); var _DOMUtils = __webpack_require__(15); var _createHistory = __webpack_require__(26); var _createHistory2 = _interopRequireDefault(_createHistory); function createDOMHistory(options) { var history = _createHistory2['default'](_extends({ getUserConfirmation: _DOMUtils.getUserConfirmation }, options, { go: _DOMUtils.go })); function listen(listener) { !_ExecutionEnvironment.canUseDOM ? false ? _invariant2['default'](false, 'DOM history needs a DOM') : _invariant2['default'](false) : undefined; return history.listen(listener); } return _extends({}, history, { listen: listen }); } exports['default'] = createDOMHistory; module.exports = exports['default']; /***/ }, /* 25 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _warning = __webpack_require__(7); var _warning2 = _interopRequireDefault(_warning); var _invariant = __webpack_require__(2); var _invariant2 = _interopRequireDefault(_invariant); var _Actions = __webpack_require__(8); var _ExecutionEnvironment = __webpack_require__(10); var _DOMUtils = __webpack_require__(15); var _DOMStateStorage = __webpack_require__(23); var _createDOMHistory = __webpack_require__(24); var _createDOMHistory2 = _interopRequireDefault(_createDOMHistory); var _parsePath = __webpack_require__(6); var _parsePath2 = _interopRequireDefault(_parsePath); function isAbsolutePath(path) { return typeof path === 'string' && path.charAt(0) === '/'; } function ensureSlash() { var path = _DOMUtils.getHashPath(); if (isAbsolutePath(path)) return true; _DOMUtils.replaceHashPath('/' + path); return false; } function addQueryStringValueToPath(path, key, value) { return path + (path.indexOf('?') === -1 ? '?' : '&') + (key + '=' + value); } function stripQueryStringValueFromPath(path, key) { return path.replace(new RegExp('[?&]?' + key + '=[a-zA-Z0-9]+'), ''); } function getQueryStringValueFromPath(path, key) { var match = path.match(new RegExp('\\?.*?\\b' + key + '=(.+?)\\b')); return match && match[1]; } var DefaultQueryKey = '_k'; function createHashHistory() { var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; !_ExecutionEnvironment.canUseDOM ? false ? _invariant2['default'](false, 'Hash history needs a DOM') : _invariant2['default'](false) : undefined; var queryKey = options.queryKey; if (queryKey === undefined || !!queryKey) queryKey = typeof queryKey === 'string' ? queryKey : DefaultQueryKey; function getCurrentLocation() { var path = _DOMUtils.getHashPath(); var key = undefined, state = undefined; if (queryKey) { key = getQueryStringValueFromPath(path, queryKey); path = stripQueryStringValueFromPath(path, queryKey); if (key) { state = _DOMStateStorage.readState(key); } else { state = null; key = history.createKey(); _DOMUtils.replaceHashPath(addQueryStringValueToPath(path, queryKey, key)); } } else { key = state = null; } var location = _parsePath2['default'](path); return history.createLocation(_extends({}, location, { state: state }), undefined, key); } function startHashChangeListener(_ref) { var transitionTo = _ref.transitionTo; function hashChangeListener() { if (!ensureSlash()) return; // Always make sure hashes are preceeded with a /. transitionTo(getCurrentLocation()); } ensureSlash(); _DOMUtils.addEventListener(window, 'hashchange', hashChangeListener); return function () { _DOMUtils.removeEventListener(window, 'hashchange', hashChangeListener); }; } function finishTransition(location) { var basename = location.basename; var pathname = location.pathname; var search = location.search; var state = location.state; var action = location.action; var key = location.key; if (action === _Actions.POP) return; // Nothing to do. var path = (basename || '') + pathname + search; if (queryKey) { path = addQueryStringValueToPath(path, queryKey, key); _DOMStateStorage.saveState(key, state); } else { // Drop key and state. location.key = location.state = null; } var currentHash = _DOMUtils.getHashPath(); if (action === _Actions.PUSH) { if (currentHash !== path) { window.location.hash = path; } else { false ? _warning2['default'](false, 'You cannot PUSH the same path using hash history') : undefined; } } else if (currentHash !== path) { // REPLACE _DOMUtils.replaceHashPath(path); } } var history = _createDOMHistory2['default'](_extends({}, options, { getCurrentLocation: getCurrentLocation, finishTransition: finishTransition, saveState: _DOMStateStorage.saveState })); var listenerCount = 0, stopHashChangeListener = undefined; function listenBefore(listener) { if (++listenerCount === 1) stopHashChangeListener = startHashChangeListener(history); var unlisten = history.listenBefore(listener); return function () { unlisten(); if (--listenerCount === 0) stopHashChangeListener(); }; } function listen(listener) { if (++listenerCount === 1) stopHashChangeListener = startHashChangeListener(history); var unlisten = history.listen(listener); return function () { unlisten(); if (--listenerCount === 0) stopHashChangeListener(); }; } function push(location) { false ? _warning2['default'](queryKey || location.state == null, 'You cannot use state without a queryKey it will be dropped') : undefined; history.push(location); } function replace(location) { false ? _warning2['default'](queryKey || location.state == null, 'You cannot use state without a queryKey it will be dropped') : undefined; history.replace(location); } var goIsSupportedWithoutReload = _DOMUtils.supportsGoWithoutReloadUsingHash(); function go(n) { false ? _warning2['default'](goIsSupportedWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : undefined; history.go(n); } function createHref(path) { return '#' + history.createHref(path); } // deprecated function registerTransitionHook(hook) { if (++listenerCount === 1) stopHashChangeListener = startHashChangeListener(history); history.registerTransitionHook(hook); } // deprecated function unregisterTransitionHook(hook) { history.unregisterTransitionHook(hook); if (--listenerCount === 0) stopHashChangeListener(); } // deprecated function pushState(state, path) { false ? _warning2['default'](queryKey || state == null, 'You cannot use state without a queryKey it will be dropped') : undefined; history.pushState(state, path); } // deprecated function replaceState(state, path) { false ? _warning2['default'](queryKey || state == null, 'You cannot use state without a queryKey it will be dropped') : undefined; history.replaceState(state, path); } return _extends({}, history, { listenBefore: listenBefore, listen: listen, push: push, replace: replace, go: go, createHref: createHref, registerTransitionHook: registerTransitionHook, // deprecated - warning is in createHistory unregisterTransitionHook: unregisterTransitionHook, // deprecated - warning is in createHistory pushState: pushState, // deprecated - warning is in createHistory replaceState: replaceState // deprecated - warning is in createHistory }); } exports['default'] = createHashHistory; module.exports = exports['default']; /***/ }, /* 26 */ /***/ function(module, exports, __webpack_require__) { //import warning from 'warning' 'use strict'; exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _deepEqual = __webpack_require__(47); var _deepEqual2 = _interopRequireDefault(_deepEqual); var _AsyncUtils = __webpack_require__(50); var _Actions = __webpack_require__(8); var _createLocation2 = __webpack_require__(52); var _createLocation3 = _interopRequireDefault(_createLocation2); var _runTransitionHook = __webpack_require__(17); var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); var _parsePath = __webpack_require__(6); var _parsePath2 = _interopRequireDefault(_parsePath); var _deprecate = __webpack_require__(16); var _deprecate2 = _interopRequireDefault(_deprecate); function createRandomKey(length) { return Math.random().toString(36).substr(2, length); } function locationsAreEqual(a, b) { return a.pathname === b.pathname && a.search === b.search && //a.action === b.action && // Different action !== location change. a.key === b.key && _deepEqual2['default'](a.state, b.state); } var DefaultKeyLength = 6; function createHistory() { var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; var getCurrentLocation = options.getCurrentLocation; var finishTransition = options.finishTransition; var saveState = options.saveState; var go = options.go; var keyLength = options.keyLength; var getUserConfirmation = options.getUserConfirmation; if (typeof keyLength !== 'number') keyLength = DefaultKeyLength; var transitionHooks = []; function listenBefore(hook) { transitionHooks.push(hook); return function () { transitionHooks = transitionHooks.filter(function (item) { return item !== hook; }); }; } var allKeys = []; var changeListeners = []; var location = undefined; function getCurrent() { if (pendingLocation && pendingLocation.action === _Actions.POP) { return allKeys.indexOf(pendingLocation.key); } else if (location) { return allKeys.indexOf(location.key); } else { return -1; } } function updateLocation(newLocation) { var current = getCurrent(); location = newLocation; if (location.action === _Actions.PUSH) { allKeys = [].concat(allKeys.slice(0, current + 1), [location.key]); } else if (location.action === _Actions.REPLACE) { allKeys[current] = location.key; } changeListeners.forEach(function (listener) { listener(location); }); } function listen(listener) { changeListeners.push(listener); if (location) { listener(location); } else { var _location = getCurrentLocation(); allKeys = [_location.key]; updateLocation(_location); } return function () { changeListeners = changeListeners.filter(function (item) { return item !== listener; }); }; } function confirmTransitionTo(location, callback) { _AsyncUtils.loopAsync(transitionHooks.length, function (index, next, done) { _runTransitionHook2['default'](transitionHooks[index], location, function (result) { if (result != null) { done(result); } else { next(); } }); }, function (message) { if (getUserConfirmation && typeof message === 'string') { getUserConfirmation(message, function (ok) { callback(ok !== false); }); } else { callback(message !== false); } }); } var pendingLocation = undefined; function transitionTo(nextLocation) { if (location && locationsAreEqual(location, nextLocation)) return; // Nothing to do. pendingLocation = nextLocation; confirmTransitionTo(nextLocation, function (ok) { if (pendingLocation !== nextLocation) return; // Transition was interrupted. if (ok) { // treat PUSH to current path like REPLACE to be consistent with browsers if (nextLocation.action === _Actions.PUSH) { var prevPath = createPath(location); var nextPath = createPath(nextLocation); if (nextPath === prevPath) nextLocation.action = _Actions.REPLACE; } if (finishTransition(nextLocation) !== false) updateLocation(nextLocation); } else if (location && nextLocation.action === _Actions.POP) { var prevIndex = allKeys.indexOf(location.key); var nextIndex = allKeys.indexOf(nextLocation.key); if (prevIndex !== -1 && nextIndex !== -1) go(prevIndex - nextIndex); // Restore the URL. } }); } function push(location) { transitionTo(createLocation(location, _Actions.PUSH, createKey())); } function replace(location) { transitionTo(createLocation(location, _Actions.REPLACE, createKey())); } function goBack() { go(-1); } function goForward() { go(1); } function createKey() { return createRandomKey(keyLength); } function createPath(location) { if (location == null || typeof location === 'string') return location; var pathname = location.pathname; var search = location.search; var hash = location.hash; var result = pathname; if (search) result += search; if (hash) result += hash; return result; } function createHref(location) { return createPath(location); } function createLocation(location, action) { var key = arguments.length <= 2 || arguments[2] === undefined ? createKey() : arguments[2]; if (typeof action === 'object') { //warning( // false, // 'The state (2nd) argument to history.createLocation is deprecated; use a ' + // 'location descriptor instead' //) if (typeof location === 'string') location = _parsePath2['default'](location); location = _extends({}, location, { state: action }); action = key; key = arguments[3] || createKey(); } return _createLocation3['default'](location, action, key); } // deprecated function setState(state) { if (location) { updateLocationState(location, state); updateLocation(location); } else { updateLocationState(getCurrentLocation(), state); } } function updateLocationState(location, state) { location.state = _extends({}, location.state, state); saveState(location.key, location.state); } // deprecated function registerTransitionHook(hook) { if (transitionHooks.indexOf(hook) === -1) transitionHooks.push(hook); } // deprecated function unregisterTransitionHook(hook) { transitionHooks = transitionHooks.filter(function (item) { return item !== hook; }); } // deprecated function pushState(state, path) { if (typeof path === 'string') path = _parsePath2['default'](path); push(_extends({ state: state }, path)); } // deprecated function replaceState(state, path) { if (typeof path === 'string') path = _parsePath2['default'](path); replace(_extends({ state: state }, path)); } return { listenBefore: listenBefore, listen: listen, transitionTo: transitionTo, push: push, replace: replace, go: go, goBack: goBack, goForward: goForward, createKey: createKey, createPath: createPath, createHref: createHref, createLocation: createLocation, setState: _deprecate2['default'](setState, 'setState is deprecated; use location.key to save state instead'), registerTransitionHook: _deprecate2['default'](registerTransitionHook, 'registerTransitionHook is deprecated; use listenBefore instead'), unregisterTransitionHook: _deprecate2['default'](unregisterTransitionHook, 'unregisterTransitionHook is deprecated; use the callback returned from listenBefore instead'), pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'), replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead') }; } exports['default'] = createHistory; module.exports = exports['default']; /***/ }, /* 27 */ /***/ function(module, exports) { "use strict"; exports.__esModule = true; function extractPath(string) { var match = string.match(/^https?:\/\/[^\/]*/); if (match == null) return string; return string.substring(match[0].length); } exports["default"] = extractPath; module.exports = exports["default"]; /***/ }, /* 28 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _warning = __webpack_require__(1); var _warning2 = _interopRequireDefault(_warning); var _PropTypes = __webpack_require__(5); /** * A mixin that adds the "history" instance variable to components. */ var History = { contextTypes: { history: _PropTypes.history }, componentWillMount: function componentWillMount() { false ? _warning2['default'](false, 'the `History` mixin is deprecated, please access `context.router` with your own `contextTypes`. http://bit.ly/1QZCLCv') : undefined; this.history = this.context.history; } }; exports['default'] = History; module.exports = exports['default']; /***/ }, /* 29 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _react = __webpack_require__(3); var _react2 = _interopRequireDefault(_react); var _Link = __webpack_require__(18); var _Link2 = _interopRequireDefault(_Link); /** * An <IndexLink> is used to link to an <IndexRoute>. */ var IndexLink = _react2['default'].createClass({ displayName: 'IndexLink', render: function render() { return _react2['default'].createElement(_Link2['default'], _extends({}, this.props, { onlyActiveOnIndex: true })); } }); exports['default'] = IndexLink; module.exports = exports['default']; /***/ }, /* 30 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _react = __webpack_require__(3); var _react2 = _interopRequireDefault(_react); var _warning = __webpack_require__(1); var _warning2 = _interopRequireDefault(_warning); var _invariant = __webpack_require__(2); var _invariant2 = _interopRequireDefault(_invariant); var _Redirect = __webpack_require__(19); var _Redirect2 = _interopRequireDefault(_Redirect); var _PropTypes = __webpack_require__(5); var _React$PropTypes = _react2['default'].PropTypes; var string = _React$PropTypes.string; var object = _React$PropTypes.object; /** * An <IndexRedirect> is used to redirect from an indexRoute. */ var IndexRedirect = _react2['default'].createClass({ displayName: 'IndexRedirect', statics: { createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { /* istanbul ignore else: sanity check */ if (parentRoute) { parentRoute.indexRoute = _Redirect2['default'].createRouteFromReactElement(element); } else { false ? _warning2['default'](false, 'An <IndexRedirect> does not make sense at the root of your route config') : undefined; } } }, propTypes: { to: string.isRequired, query: object, state: object, onEnter: _PropTypes.falsy, children: _PropTypes.falsy }, /* istanbul ignore next: sanity check */ render: function render() { true ? false ? _invariant2['default'](false, '<IndexRedirect> elements are for router configuration only and should not be rendered') : _invariant2['default'](false) : undefined; } }); exports['default'] = IndexRedirect; module.exports = exports['default']; /***/ }, /* 31 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _react = __webpack_require__(3); var _react2 = _interopRequireDefault(_react); var _warning = __webpack_require__(1); var _warning2 = _interopRequireDefault(_warning); var _invariant = __webpack_require__(2); var _invariant2 = _interopRequireDefault(_invariant); var _RouteUtils = __webpack_require__(4); var _PropTypes = __webpack_require__(5); var func = _react2['default'].PropTypes.func; /** * An <IndexRoute> is used to specify its parent's <Route indexRoute> in * a JSX route config. */ var IndexRoute = _react2['default'].createClass({ displayName: 'IndexRoute', statics: { createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) { /* istanbul ignore else: sanity check */ if (parentRoute) { parentRoute.indexRoute = _RouteUtils.createRouteFromReactElement(element); } else { false ? _warning2['default'](false, 'An <IndexRoute> does not make sense at the root of your route config') : undefined; } } }, propTypes: { path: _PropTypes.falsy, component: _PropTypes.component, components: _PropTypes.components, getComponent: func, getComponents: func }, /* istanbul ignore next: sanity check */ render: function render() { true ? false ? _invariant2['default'](false, '<IndexRoute> elements are for router configuration only and should not be rendered') : _invariant2['default'](false) : undefined; } }); exports['default'] = IndexRoute; module.exports = exports['default']; /***/ }, /* 32 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _warning = __webpack_require__(1); var _warning2 = _interopRequireDefault(_warning); var _react = __webpack_require__(3); var _react2 = _interopRequireDefault(_react); var _invariant = __webpack_require__(2); var _invariant2 = _interopRequireDefault(_invariant); var object = _react2['default'].PropTypes.object; /** * The Lifecycle mixin adds the routerWillLeave lifecycle method to a * component that may be used to cancel a transition or prompt the user * for confirmation. * * On standard transitions, routerWillLeave receives a single argument: the * location we're transitioning to. To cancel the transition, return false. * To prompt the user for confirmation, return a prompt message (string). * * During the beforeunload event (assuming you're using the useBeforeUnload * history enhancer), routerWillLeave does not receive a location object * because it isn't possible for us to know the location we're transitioning * to. In this case routerWillLeave must return a prompt message to prevent * the user from closing the window/tab. */ var Lifecycle = { contextTypes: { history: object.isRequired, // Nested children receive the route as context, either // set by the route component using the RouteContext mixin // or by some other ancestor. route: object }, propTypes: { // Route components receive the route object as a prop. route: object }, componentDidMount: function componentDidMount() { false ? _warning2['default'](false, 'the `Lifecycle` mixin is deprecated, please use `context.router.setRouteLeaveHook(route, hook)`, see http://bit.ly/1PxKMv7 for more details.') : undefined; !this.routerWillLeave ? false ? _invariant2['default'](false, 'The Lifecycle mixin requires you to define a routerWillLeave method') : _invariant2['default'](false) : undefined; var route = this.props.route || this.context.route; !route ? false ? _invariant2['default'](false, 'The Lifecycle mixin must be used on either a) a <Route component> or ' + 'b) a descendant of a <Route component> that uses the RouteContext mixin') : _invariant2['default'](false) : undefined; this._unlistenBeforeLeavingRoute = this.context.history.listenBeforeLeavingRoute(route, this.routerWillLeave); }, componentWillUnmount: function componentWillUnmount() { if (this._unlistenBeforeLeavingRoute) this._unlistenBeforeLeavingRoute(); } }; exports['default'] = Lifecycle; module.exports = exports['default']; /***/ }, /* 33 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _react = __webpack_require__(3); var _react2 = _interopRequireDefault(_react); var _invariant = __webpack_require__(2); var _invariant2 = _interopRequireDefault(_invariant); var _RouteUtils = __webpack_require__(4); var _PropTypes = __webpack_require__(5); var _React$PropTypes = _react2['default'].PropTypes; var string = _React$PropTypes.string; var func = _React$PropTypes.func; /** * A <Route> is used to declare which components are rendered to the * page when the URL matches a given pattern. * * Routes are arranged in a nested tree structure. When a new URL is * requested, the tree is searched depth-first to find a route whose * path matches the URL. When one is found, all routes in the tree * that lead to it are considered "active" and their components are * rendered into the DOM, nested in the same order as in the tree. */ var Route = _react2['default'].createClass({ displayName: 'Route', statics: { createRouteFromReactElement: _RouteUtils.createRouteFromReactElement }, propTypes: { path: string, component: _PropTypes.component, components: _PropTypes.components, getComponent: func, getComponents: func }, /* istanbul ignore next: sanity check */ render: function render() { true ? false ? _invariant2['default'](false, '<Route> elements are for router configuration only and should not be rendered') : _invariant2['default'](false) : undefined; } }); exports['default'] = Route; module.exports = exports['default']; /***/ }, /* 34 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _warning = __webpack_require__(1); var _warning2 = _interopRequireDefault(_warning); var _react = __webpack_require__(3); var _react2 = _interopRequireDefault(_react); var object = _react2['default'].PropTypes.object; /** * The RouteContext mixin provides a convenient way for route * components to set the route in context. This is needed for * routes that render elements that want to use the Lifecycle * mixin to prevent transitions. */ var RouteContext = { propTypes: { route: object.isRequired }, childContextTypes: { route: object.isRequired }, getChildContext: function getChildContext() { return { route: this.props.route }; }, componentWillMount: function componentWillMount() { false ? _warning2['default'](false, 'The `RouteContext` mixin is deprecated. You can provide `this.props.route` on context with your own `contextTypes`. See http://bit.ly/1MHiOst') : undefined; } }; exports['default'] = RouteContext; module.exports = exports['default']; /***/ }, /* 35 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } var _historyLibCreateHashHistory = __webpack_require__(25); var _historyLibCreateHashHistory2 = _interopRequireDefault(_historyLibCreateHashHistory); var _historyLibUseQueries = __webpack_require__(11); var _historyLibUseQueries2 = _interopRequireDefault(_historyLibUseQueries); var _react = __webpack_require__(3); var _react2 = _interopRequireDefault(_react); var _createTransitionManager = __webpack_require__(13); var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager); var _PropTypes = __webpack_require__(5); var _RouterContext = __webpack_require__(20); var _RouterContext2 = _interopRequireDefault(_RouterContext); var _RouteUtils = __webpack_require__(4); var _RouterUtils = __webpack_require__(21); var _warning = __webpack_require__(1); var _warning2 = _interopRequireDefault(_warning); function isDeprecatedHistory(history) { return !history || !history.__v2_compatible__; } var _React$PropTypes = _react2['default'].PropTypes; var func = _React$PropTypes.func; var object = _React$PropTypes.object; /** * A <Router> is a high-level API for automatically setting up * a router that renders a <RouterContext> with all the props * it needs each time the URL changes. */ var Router = _react2['default'].createClass({ displayName: 'Router', propTypes: { history: object, children: _PropTypes.routes, routes: _PropTypes.routes, // alias for children render: func, createElement: func, onError: func, onUpdate: func }, getDefaultProps: function getDefaultProps() { return { render: function render(props) { return _react2['default'].createElement(_RouterContext2['default'], props); } }; }, getInitialState: function getInitialState() { return { location: null, routes: null, params: null, components: null }; }, handleError: function handleError(error) { if (this.props.onError) { this.props.onError.call(this, error); } else { // Throw errors by default so we don't silently swallow them! throw error; // This error probably occurred in getChildRoutes or getComponents. } }, componentWillMount: function componentWillMount() { var _this = this; var history = this.props.history; var _props = this.props; var routes = _props.routes; var children = _props.children; var _props2 = this.props; var parseQueryString = _props2.parseQueryString; var stringifyQuery = _props2.stringifyQuery; false ? _warning2['default'](!(parseQueryString || stringifyQuery), '`parseQueryString` and `stringifyQuery` are deprecated. Please create a custom history. See http://bit.ly/1NRMoPX for details.') : undefined; if (isDeprecatedHistory(history)) { history = this.wrapDeprecatedHistory(history); } var transitionManager = _createTransitionManager2['default'](history, _RouteUtils.createRoutes(routes || children)); this._unlisten = transitionManager.listen(function (error, state) { if (error) { _this.handleError(error); } else { _this.setState(state, _this.props.onUpdate); } }); this.router = _RouterUtils.createRouterObject(history, transitionManager); this.history = _RouterUtils.createRoutingHistory(history, transitionManager); }, wrapDeprecatedHistory: function wrapDeprecatedHistory(history) { var _props3 = this.props; var parseQueryString = _props3.parseQueryString; var stringifyQuery = _props3.stringifyQuery; var createHistory = undefined; if (history) { false ? _warning2['default'](false, 'It appears you have provided a deprecated history object to `<Router/>`, please use a history provided by React Router with `import { browserHistory } from \'react-router\'` or `import { hashHistory } from \'react-router\'`. If you are using a custom, valid history please set `history.__v2_compatible__ = true`. See http://bit.ly/1Pxrl7E') : undefined; createHistory = function () { return history; }; } else { false ? _warning2['default'](false, '`Router` no longer defaults the history prop to hash history. Please use the `hashHistory` singleton instead. http://bit.ly/1ktRibg') : undefined; createHistory = _historyLibCreateHashHistory2['default']; } return _historyLibUseQueries2['default'](createHistory)({ parseQueryString: parseQueryString, stringifyQuery: stringifyQuery }); }, /* istanbul ignore next: sanity check */ componentWillReceiveProps: function componentWillReceiveProps(nextProps) { false ? _warning2['default'](nextProps.history === this.props.history, 'You cannot change <Router history>; it will be ignored') : undefined; false ? _warning2['default']((nextProps.routes || nextProps.children) === (this.props.routes || this.props.children), 'You cannot change <Router routes>; it will be ignored') : undefined; }, componentWillUnmount: function componentWillUnmount() { if (this._unlisten) this._unlisten(); }, render: function render() { var _state = this.state; var location = _state.location; var routes = _state.routes; var params = _state.params; var components = _state.components; var _props4 = this.props; var createElement = _props4.createElement; var render = _props4.render; var props = _objectWithoutProperties(_props4, ['createElement', 'render']); if (location == null) return null; // Async match // Only forward non-Router-specific props to routing context, as those are // the only ones that might be custom routing context props. Object.keys(Router.propTypes).forEach(function (propType) { return delete props[propType]; }); return render(_extends({}, props, { history: this.history, router: this.router, location: location, routes: routes, params: params, components: components, createElement: createElement })); } }); exports['default'] = Router; module.exports = exports['default']; /***/ }, /* 36 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports.runEnterHooks = runEnterHooks; exports.runLeaveHooks = runLeaveHooks; var _AsyncUtils = __webpack_require__(12); function createEnterHook(hook, route) { return function (a, b, callback) { hook.apply(route, arguments); if (hook.length < 3) { // Assume hook executes synchronously and // automatically call the callback. callback(); } }; } function getEnterHooks(routes) { return routes.reduce(function (hooks, route) { if (route.onEnter) hooks.push(createEnterHook(route.onEnter, route)); return hooks; }, []); } /** * Runs all onEnter hooks in the given array of routes in order * with onEnter(nextState, replaceState, callback) and calls * callback(error, redirectInfo) when finished. The first hook * to use replaceState short-circuits the loop. * * If a hook needs to run asynchronously, it may use the callback * function. However, doing so will cause the transition to pause, * which could lead to a non-responsive UI if the hook is slow. */ function runEnterHooks(routes, nextState, callback) { var hooks = getEnterHooks(routes); if (!hooks.length) { callback(); return; } var redirectInfo = undefined; function replaceState(state, pathname, query) { redirectInfo = { pathname: pathname, query: query, state: state }; } _AsyncUtils.loopAsync(hooks.length, function (index, next, done) { hooks[index](nextState, replaceState, function (error) { if (error || redirectInfo) { done(error, redirectInfo); // No need to continue. } else { next(); } }); }, callback); } /** * Runs all onLeave hooks in the given array of routes in order. */ function runLeaveHooks(routes) { for (var i = 0, len = routes.length; i < len; ++i) { if (routes[i].onLeave) routes[i].onLeave.call(routes[i]); } } /***/ }, /* 37 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _useRouterHistory = __webpack_require__(14); var _useRouterHistory2 = _interopRequireDefault(_useRouterHistory); var _historyLibCreateBrowserHistory = __webpack_require__(51); var _historyLibCreateBrowserHistory2 = _interopRequireDefault(_historyLibCreateBrowserHistory); var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); var history = undefined; if (canUseDOM) { history = _useRouterHistory2['default'](_historyLibCreateBrowserHistory2['default'])(); } exports['default'] = history; module.exports = exports['default']; /***/ }, /* 38 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _PatternUtils = __webpack_require__(9); function routeParamsChanged(route, prevState, nextState) { if (!route.path) return false; var paramNames = _PatternUtils.getParamNames(route.path); return paramNames.some(function (paramName) { return prevState.params[paramName] !== nextState.params[paramName]; }); } /** * Returns an object of { leaveRoutes, enterRoutes } determined by * the change from prevState to nextState. We leave routes if either * 1) they are not in the next state or 2) they are in the next state * but their params have changed (i.e. /users/123 => /users/456). * * leaveRoutes are ordered starting at the leaf route of the tree * we're leaving up to the common parent route. enterRoutes are ordered * from the top of the tree we're entering down to the leaf route. */ function computeChangedRoutes(prevState, nextState) { var prevRoutes = prevState && prevState.routes; var nextRoutes = nextState.routes; var leaveRoutes = undefined, enterRoutes = undefined; if (prevRoutes) { leaveRoutes = prevRoutes.filter(function (route) { return nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState); }); // onLeave hooks start at the leaf route. leaveRoutes.reverse(); enterRoutes = nextRoutes.filter(function (route) { return prevRoutes.indexOf(route) === -1 || leaveRoutes.indexOf(route) !== -1; }); } else { leaveRoutes = []; enterRoutes = nextRoutes; } return { leaveRoutes: leaveRoutes, enterRoutes: enterRoutes }; } exports['default'] = computeChangedRoutes; module.exports = exports['default']; /***/ }, /* 39 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports['default'] = createMemoryHistory; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _historyLibUseQueries = __webpack_require__(11); var _historyLibUseQueries2 = _interopRequireDefault(_historyLibUseQueries); var _historyLibCreateMemoryHistory = __webpack_require__(53); var _historyLibCreateMemoryHistory2 = _interopRequireDefault(_historyLibCreateMemoryHistory); function createMemoryHistory(options) { // signatures and type checking differ between `useRoutes` and // `createMemoryHistory`, have to create `memoryHistory` first because // `useQueries` doesn't understand the signature var memoryHistory = _historyLibCreateMemoryHistory2['default'](options); var createHistory = function createHistory() { return memoryHistory; }; var history = _historyLibUseQueries2['default'](createHistory)(options); history.__v2_compatible__ = true; return history; } module.exports = exports['default']; /***/ }, /* 40 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _AsyncUtils = __webpack_require__(12); function getComponentsForRoute(location, route, callback) { if (route.component || route.components) { callback(null, route.component || route.components); } else if (route.getComponent) { route.getComponent(location, callback); } else if (route.getComponents) { route.getComponents(location, callback); } else { callback(); } } /** * Asynchronously fetches all components needed for the given router * state and calls callback(error, components) when finished. * * Note: This operation may finish synchronously if no routes have an * asynchronous getComponents method. */ function getComponents(nextState, callback) { _AsyncUtils.mapAsync(nextState.routes, function (route, index, callback) { getComponentsForRoute(nextState.location, route, callback); }, callback); } exports['default'] = getComponents; module.exports = exports['default']; /***/ }, /* 41 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _PatternUtils = __webpack_require__(9); /** * Extracts an object of params the given route cares about from * the given params object. */ function getRouteParams(route, params) { var routeParams = {}; if (!route.path) return routeParams; var paramNames = _PatternUtils.getParamNames(route.path); for (var p in params) { if (params.hasOwnProperty(p) && paramNames.indexOf(p) !== -1) routeParams[p] = params[p]; }return routeParams; } exports['default'] = getRouteParams; module.exports = exports['default']; /***/ }, /* 42 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _useRouterHistory = __webpack_require__(14); var _useRouterHistory2 = _interopRequireDefault(_useRouterHistory); var _historyLibCreateHashHistory = __webpack_require__(25); var _historyLibCreateHashHistory2 = _interopRequireDefault(_historyLibCreateHashHistory); var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); var history = undefined; if (canUseDOM) { history = _useRouterHistory2['default'](_historyLibCreateHashHistory2['default'])(); } exports['default'] = history; module.exports = exports['default']; /***/ }, /* 43 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports['default'] = isActive; var _PatternUtils = __webpack_require__(9); function deepEqual(a, b) { if (a == b) return true; if (a == null || b == null) return false; if (Array.isArray(a)) { return Array.isArray(b) && a.length === b.length && a.every(function (item, index) { return deepEqual(item, b[index]); }); } if (typeof a === 'object') { for (var p in a) { if (!a.hasOwnProperty(p)) { continue; } if (a[p] === undefined) { if (b[p] !== undefined) { return false; } } else if (!b.hasOwnProperty(p)) { return false; } else if (!deepEqual(a[p], b[p])) { return false; } } return true; } return String(a) === String(b); } function paramsAreActive(paramNames, paramValues, activeParams) { // FIXME: This doesn't work on repeated params in activeParams. return paramNames.every(function (paramName, index) { return String(paramValues[index]) === String(activeParams[paramName]); }); } function getMatchingRouteIndex(pathname, activeRoutes, activeParams) { var remainingPathname = pathname, paramNames = [], paramValues = []; for (var i = 0, len = activeRoutes.length; i < len; ++i) { var route = activeRoutes[i]; var pattern = route.path || ''; if (pattern.charAt(0) === '/') { remainingPathname = pathname; paramNames = []; paramValues = []; } if (remainingPathname !== null) { var matched = _PatternUtils.matchPattern(pattern, remainingPathname); remainingPathname = matched.remainingPathname; paramNames = [].concat(paramNames, matched.paramNames); paramValues = [].concat(paramValues, matched.paramValues); } if (remainingPathname === '' && route.path && paramsAreActive(paramNames, paramValues, activeParams)) return i; } return null; } /** * Returns true if the given pathname matches the active routes * and params. */ function routeIsActive(pathname, routes, params, indexOnly) { var i = getMatchingRouteIndex(pathname, routes, params); if (i === null) { // No match. return false; } else if (!indexOnly) { // Any match is good enough. return true; } // If any remaining routes past the match index have paths, then we can't // be on the index route. return routes.slice(i + 1).every(function (route) { return !route.path; }); } /** * Returns true if all key/value pairs in the given query are * currently active. */ function queryIsActive(query, activeQuery) { if (activeQuery == null) return query == null; if (query == null) return true; return deepEqual(query, activeQuery); } /** * Returns true if a <Link> to the given pathname/query combination is * currently active. */ function isActive(_ref, indexOnly, currentLocation, routes, params) { var pathname = _ref.pathname; var query = _ref.query; if (currentLocation == null) return false; if (!routeIsActive(pathname, routes, params, indexOnly)) return false; return queryIsActive(query, currentLocation.query); } module.exports = exports['default']; /***/ }, /* 44 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } var _invariant = __webpack_require__(2); var _invariant2 = _interopRequireDefault(_invariant); var _createMemoryHistory = __webpack_require__(39); var _createMemoryHistory2 = _interopRequireDefault(_createMemoryHistory); var _createTransitionManager = __webpack_require__(13); var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager); var _RouteUtils = __webpack_require__(4); var _RouterUtils = __webpack_require__(21); /** * A high-level API to be used for server-side rendering. * * This function matches a location to a set of routes and calls * callback(error, redirectLocation, renderProps) when finished. * * Note: You probably don't want to use this in a browser. Use * the history.listen API instead. */ function match(_ref, callback) { var routes = _ref.routes; var location = _ref.location; var options = _objectWithoutProperties(_ref, ['routes', 'location']); !location ? false ? _invariant2['default'](false, 'match needs a location') : _invariant2['default'](false) : undefined; var history = _createMemoryHistory2['default'](options); var transitionManager = _createTransitionManager2['default'](history, _RouteUtils.createRoutes(routes)); // Allow match({ location: '/the/path', ... }) if (typeof location === 'string') location = history.createLocation(location); var router = _RouterUtils.createRouterObject(history, transitionManager); history = _RouterUtils.createRoutingHistory(history, transitionManager); transitionManager.match(location, function (error, redirectLocation, nextState) { callback(error, redirectLocation, nextState && _extends({}, nextState, { history: history, router: router })); }); } exports['default'] = match; module.exports = exports['default']; /***/ }, /* 45 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _warning = __webpack_require__(1); var _warning2 = _interopRequireDefault(_warning); var _AsyncUtils = __webpack_require__(12); var _PatternUtils = __webpack_require__(9); var _RouteUtils = __webpack_require__(4); function getChildRoutes(route, location, callback) { if (route.childRoutes) { callback(null, route.childRoutes); } else if (route.getChildRoutes) { route.getChildRoutes(location, function (error, childRoutes) { callback(error, !error && _RouteUtils.createRoutes(childRoutes)); }); } else { callback(); } } function getIndexRoute(route, location, callback) { if (route.indexRoute) { callback(null, route.indexRoute); } else if (route.getIndexRoute) { route.getIndexRoute(location, function (error, indexRoute) { callback(error, !error && _RouteUtils.createRoutes(indexRoute)[0]); }); } else if (route.childRoutes) { (function () { var pathless = route.childRoutes.filter(function (obj) { return !obj.hasOwnProperty('path'); }); _AsyncUtils.loopAsync(pathless.length, function (index, next, done) { getIndexRoute(pathless[index], location, function (error, indexRoute) { if (error || indexRoute) { var routes = [pathless[index]].concat(Array.isArray(indexRoute) ? indexRoute : [indexRoute]); done(error, routes); } else { next(); } }); }, function (err, routes) { callback(null, routes); }); })(); } else { callback(); } } function assignParams(params, paramNames, paramValues) { return paramNames.reduce(function (params, paramName, index) { var paramValue = paramValues && paramValues[index]; if (Array.isArray(params[paramName])) { params[paramName].push(paramValue); } else if (paramName in params) { params[paramName] = [params[paramName], paramValue]; } else { params[paramName] = paramValue; } return params; }, params); } function createParams(paramNames, paramValues) { return assignParams({}, paramNames, paramValues); } function matchRouteDeep(route, location, remainingPathname, paramNames, paramValues, callback) { var pattern = route.path || ''; if (pattern.charAt(0) === '/') { remainingPathname = location.pathname; paramNames = []; paramValues = []; } if (remainingPathname !== null) { var matched = _PatternUtils.matchPattern(pattern, remainingPathname); remainingPathname = matched.remainingPathname; paramNames = [].concat(paramNames, matched.paramNames); paramValues = [].concat(paramValues, matched.paramValues); if (remainingPathname === '' && route.path) { var _ret2 = (function () { var match = { routes: [route], params: createParams(paramNames, paramValues) }; getIndexRoute(route, location, function (error, indexRoute) { if (error) { callback(error); } else { if (Array.isArray(indexRoute)) { var _match$routes; false ? _warning2['default'](indexRoute.every(function (route) { return !route.path; }), 'Index routes should not have paths') : undefined; (_match$routes = match.routes).push.apply(_match$routes, indexRoute); } else if (indexRoute) { false ? _warning2['default'](!indexRoute.path, 'Index routes should not have paths') : undefined; match.routes.push(indexRoute); } callback(null, match); } }); return { v: undefined }; })(); if (typeof _ret2 === 'object') return _ret2.v; } } if (remainingPathname != null || route.childRoutes) { // Either a) this route matched at least some of the path or b) // we don't have to load this route's children asynchronously. In // either case continue checking for matches in the subtree. getChildRoutes(route, location, function (error, childRoutes) { if (error) { callback(error); } else if (childRoutes) { // Check the child routes to see if any of them match. matchRoutes(childRoutes, location, function (error, match) { if (error) { callback(error); } else if (match) { // A child route matched! Augment the match and pass it up the stack. match.routes.unshift(route); callback(null, match); } else { callback(); } }, remainingPathname, paramNames, paramValues); } else { callback(); } }); } else { callback(); } } /** * Asynchronously matches the given location to a set of routes and calls * callback(error, state) when finished. The state object will have the * following properties: * * - routes An array of routes that matched, in hierarchical order * - params An object of URL parameters * * Note: This operation may finish synchronously if no routes have an * asynchronous getChildRoutes method. */ function matchRoutes(routes, location, callback) { var remainingPathname = arguments.length <= 3 || arguments[3] === undefined ? location.pathname : arguments[3]; var paramNames = arguments.length <= 4 || arguments[4] === undefined ? [] : arguments[4]; var paramValues = arguments.length <= 5 || arguments[5] === undefined ? [] : arguments[5]; return (function () { _AsyncUtils.loopAsync(routes.length, function (index, next, done) { matchRouteDeep(routes[index], location, remainingPathname, paramNames, paramValues, function (error, match) { if (error || match) { done(error, match); } else { next(); } }); }, callback); })(); } exports['default'] = matchRoutes; module.exports = exports['default']; /***/ }, /* 46 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } var _historyLibUseQueries = __webpack_require__(11); var _historyLibUseQueries2 = _interopRequireDefault(_historyLibUseQueries); var _createTransitionManager = __webpack_require__(13); var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager); var _warning = __webpack_require__(1); var _warning2 = _interopRequireDefault(_warning); /** * Returns a new createHistory function that may be used to create * history objects that know about routing. * * Enhances history objects with the following methods: * * - listen((error, nextState) => {}) * - listenBeforeLeavingRoute(route, (nextLocation) => {}) * - match(location, (error, redirectLocation, nextState) => {}) * - isActive(pathname, query, indexOnly=false) */ function useRoutes(createHistory) { false ? _warning2['default'](false, '`useRoutes` is deprecated. Please use `createTransitionManager` instead.') : undefined; return function () { var _ref = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; var routes = _ref.routes; var options = _objectWithoutProperties(_ref, ['routes']); var history = _historyLibUseQueries2['default'](createHistory)(options); var transitionManager = _createTransitionManager2['default'](history, routes); return _extends({}, history, transitionManager); }; } exports['default'] = useRoutes; module.exports = exports['default']; /***/ }, /* 47 */ /***/ function(module, exports, __webpack_require__) { var pSlice = Array.prototype.slice; var objectKeys = __webpack_require__(49); var isArguments = __webpack_require__(48); var deepEqual = module.exports = function (actual, expected, opts) { if (!opts) opts = {}; // 7.1. All identical values are equivalent, as determined by ===. if (actual === expected) { return true; } else if (actual instanceof Date && expected instanceof Date) { return actual.getTime() === expected.getTime(); // 7.3. Other pairs that do not both pass typeof value == 'object', // equivalence is determined by ==. } else if (!actual || !expected || typeof actual != 'object' && typeof expected != 'object') { return opts.strict ? actual === expected : actual == expected; // 7.4. For all other Object pairs, including Array objects, equivalence is // determined by having the same number of owned properties (as verified // with Object.prototype.hasOwnProperty.call), the same set of keys // (although not necessarily the same order), equivalent values for every // corresponding key, and an identical 'prototype' property. Note: this // accounts for both named and indexed properties on Arrays. } else { return objEquiv(actual, expected, opts); } } function isUndefinedOrNull(value) { return value === null || value === undefined; } function isBuffer (x) { if (!x || typeof x !== 'object' || typeof x.length !== 'number') return false; if (typeof x.copy !== 'function' || typeof x.slice !== 'function') { return false; } if (x.length > 0 && typeof x[0] !== 'number') return false; return true; } function objEquiv(a, b, opts) { var i, key; if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) return false; // an identical 'prototype' property. if (a.prototype !== b.prototype) return false; //~~~I've managed to break Object.keys through screwy arguments passing. // Converting to array solves the problem. if (isArguments(a)) { if (!isArguments(b)) { return false; } a = pSlice.call(a); b = pSlice.call(b); return deepEqual(a, b, opts); } if (isBuffer(a)) { if (!isBuffer(b)) { return false; } if (a.length !== b.length) return false; for (i = 0; i < a.length; i++) { if (a[i] !== b[i]) return false; } return true; } try { var ka = objectKeys(a), kb = objectKeys(b); } catch (e) {//happens when one is a string literal and the other isn't return false; } // having the same number of owned properties (keys incorporates // hasOwnProperty) if (ka.length != kb.length) return false; //the same set of keys (although not necessarily the same order), ka.sort(); kb.sort(); //~~~cheap key test for (i = ka.length - 1; i >= 0; i--) { if (ka[i] != kb[i]) return false; } //equivalent values for every corresponding key, and //~~~possibly expensive deep test for (i = ka.length - 1; i >= 0; i--) { key = ka[i]; if (!deepEqual(a[key], b[key], opts)) return false; } return typeof a === typeof b; } /***/ }, /* 48 */ /***/ function(module, exports) { var supportsArgumentsClass = (function(){ return Object.prototype.toString.call(arguments) })() == '[object Arguments]'; exports = module.exports = supportsArgumentsClass ? supported : unsupported; exports.supported = supported; function supported(object) { return Object.prototype.toString.call(object) == '[object Arguments]'; }; exports.unsupported = unsupported; function unsupported(object){ return object && typeof object == 'object' && typeof object.length == 'number' && Object.prototype.hasOwnProperty.call(object, 'callee') && !Object.prototype.propertyIsEnumerable.call(object, 'callee') || false; }; /***/ }, /* 49 */ /***/ function(module, exports) { exports = module.exports = typeof Object.keys === 'function' ? Object.keys : shim; exports.shim = shim; function shim (obj) { var keys = []; for (var key in obj) keys.push(key); return keys; } /***/ }, /* 50 */ /***/ function(module, exports) { "use strict"; exports.__esModule = true; exports.loopAsync = loopAsync; function loopAsync(turns, work, callback) { var currentTurn = 0; var isDone = false; function done() { isDone = true; callback.apply(this, arguments); } function next() { if (isDone) return; if (currentTurn < turns) { work.call(this, currentTurn++, next, done); } else { done.apply(this, arguments); } } next(); } /***/ }, /* 51 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _invariant = __webpack_require__(2); var _invariant2 = _interopRequireDefault(_invariant); var _Actions = __webpack_require__(8); var _ExecutionEnvironment = __webpack_require__(10); var _DOMUtils = __webpack_require__(15); var _DOMStateStorage = __webpack_require__(23); var _createDOMHistory = __webpack_require__(24); var _createDOMHistory2 = _interopRequireDefault(_createDOMHistory); var _parsePath = __webpack_require__(6); var _parsePath2 = _interopRequireDefault(_parsePath); /** * Creates and returns a history object that uses HTML5's history API * (pushState, replaceState, and the popstate event) to manage history. * This is the recommended method of managing history in browsers because * it provides the cleanest URLs. * * Note: In browsers that do not support the HTML5 history API full * page reloads will be used to preserve URLs. */ function createBrowserHistory() { var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; !_ExecutionEnvironment.canUseDOM ? false ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined; var forceRefresh = options.forceRefresh; var isSupported = _DOMUtils.supportsHistory(); var useRefresh = !isSupported || forceRefresh; function getCurrentLocation(historyState) { historyState = historyState || window.history.state || {}; var path = _DOMUtils.getWindowPath(); var _historyState = historyState; var key = _historyState.key; var state = undefined; if (key) { state = _DOMStateStorage.readState(key); } else { state = null; key = history.createKey(); if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null, path); } var location = _parsePath2['default'](path); return history.createLocation(_extends({}, location, { state: state }), undefined, key); } function startPopStateListener(_ref) { var transitionTo = _ref.transitionTo; function popStateListener(event) { if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit. transitionTo(getCurrentLocation(event.state)); } _DOMUtils.addEventListener(window, 'popstate', popStateListener); return function () { _DOMUtils.removeEventListener(window, 'popstate', popStateListener); }; } function finishTransition(location) { var basename = location.basename; var pathname = location.pathname; var search = location.search; var hash = location.hash; var state = location.state; var action = location.action; var key = location.key; if (action === _Actions.POP) return; // Nothing to do. _DOMStateStorage.saveState(key, state); var path = (basename || '') + pathname + search + hash; var historyState = { key: key }; if (action === _Actions.PUSH) { if (useRefresh) { window.location.href = path; return false; // Prevent location update. } else { window.history.pushState(historyState, null, path); } } else { // REPLACE if (useRefresh) { window.location.replace(path); return false; // Prevent location update. } else { window.history.replaceState(historyState, null, path); } } } var history = _createDOMHistory2['default'](_extends({}, options, { getCurrentLocation: getCurrentLocation, finishTransition: finishTransition, saveState: _DOMStateStorage.saveState })); var listenerCount = 0, stopPopStateListener = undefined; function listenBefore(listener) { if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history); var unlisten = history.listenBefore(listener); return function () { unlisten(); if (--listenerCount === 0) stopPopStateListener(); }; } function listen(listener) { if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history); var unlisten = history.listen(listener); return function () { unlisten(); if (--listenerCount === 0) stopPopStateListener(); }; } // deprecated function registerTransitionHook(hook) { if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history); history.registerTransitionHook(hook); } // deprecated function unregisterTransitionHook(hook) { history.unregisterTransitionHook(hook); if (--listenerCount === 0) stopPopStateListener(); } return _extends({}, history, { listenBefore: listenBefore, listen: listen, registerTransitionHook: registerTransitionHook, unregisterTransitionHook: unregisterTransitionHook }); } exports['default'] = createBrowserHistory; module.exports = exports['default']; /***/ }, /* 52 */ /***/ function(module, exports, __webpack_require__) { //import warning from 'warning' 'use strict'; exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _Actions = __webpack_require__(8); var _parsePath = __webpack_require__(6); var _parsePath2 = _interopRequireDefault(_parsePath); function createLocation() { var location = arguments.length <= 0 || arguments[0] === undefined ? '/' : arguments[0]; var action = arguments.length <= 1 || arguments[1] === undefined ? _Actions.POP : arguments[1]; var key = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2]; var _fourthArg = arguments.length <= 3 || arguments[3] === undefined ? null : arguments[3]; if (typeof location === 'string') location = _parsePath2['default'](location); if (typeof action === 'object') { //warning( // false, // 'The state (2nd) argument to createLocation is deprecated; use a ' + // 'location descriptor instead' //) location = _extends({}, location, { state: action }); action = key || _Actions.POP; key = _fourthArg; } var pathname = location.pathname || '/'; var search = location.search || ''; var hash = location.hash || ''; var state = location.state || null; return { pathname: pathname, search: search, hash: hash, state: state, action: action, key: key }; } exports['default'] = createLocation; module.exports = exports['default']; /***/ }, /* 53 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _warning = __webpack_require__(7); var _warning2 = _interopRequireDefault(_warning); var _invariant = __webpack_require__(2); var _invariant2 = _interopRequireDefault(_invariant); var _Actions = __webpack_require__(8); var _createHistory = __webpack_require__(26); var _createHistory2 = _interopRequireDefault(_createHistory); var _parsePath = __webpack_require__(6); var _parsePath2 = _interopRequireDefault(_parsePath); function createStateStorage(entries) { return entries.filter(function (entry) { return entry.state; }).reduce(function (memo, entry) { memo[entry.key] = entry.state; return memo; }, {}); } function createMemoryHistory() { var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; if (Array.isArray(options)) { options = { entries: options }; } else if (typeof options === 'string') { options = { entries: [options] }; } var history = _createHistory2['default'](_extends({}, options, { getCurrentLocation: getCurrentLocation, finishTransition: finishTransition, saveState: saveState, go: go })); var _options = options; var entries = _options.entries; var current = _options.current; if (typeof entries === 'string') { entries = [entries]; } else if (!Array.isArray(entries)) { entries = ['/']; } entries = entries.map(function (entry) { var key = history.createKey(); if (typeof entry === 'string') return { pathname: entry, key: key }; if (typeof entry === 'object' && entry) return _extends({}, entry, { key: key }); true ? false ? _invariant2['default'](false, 'Unable to create history entry from %s', entry) : _invariant2['default'](false) : undefined; }); if (current == null) { current = entries.length - 1; } else { !(current >= 0 && current < entries.length) ? false ? _invariant2['default'](false, 'Current index must be >= 0 and < %s, was %s', entries.length, current) : _invariant2['default'](false) : undefined; } var storage = createStateStorage(entries); function saveState(key, state) { storage[key] = state; } function readState(key) { return storage[key]; } function getCurrentLocation() { var entry = entries[current]; var key = entry.key; var basename = entry.basename; var pathname = entry.pathname; var search = entry.search; var path = (basename || '') + pathname + (search || ''); var state = undefined; if (key) { state = readState(key); } else { state = null; key = history.createKey(); entry.key = key; } var location = _parsePath2['default'](path); return history.createLocation(_extends({}, location, { state: state }), undefined, key); } function canGo(n) { var index = current + n; return index >= 0 && index < entries.length; } function go(n) { if (n) { if (!canGo(n)) { false ? _warning2['default'](false, 'Cannot go(%s) there is not enough history', n) : undefined; return; } current += n; var currentLocation = getCurrentLocation(); // change action to POP history.transitionTo(_extends({}, currentLocation, { action: _Actions.POP })); } } function finishTransition(location) { switch (location.action) { case _Actions.PUSH: current += 1; // if we are not on the top of stack // remove rest and push new if (current < entries.length) entries.splice(current); entries.push(location); saveState(location.key, location.state); break; case _Actions.REPLACE: entries[current] = location; saveState(location.key, location.state); break; } } return history; } exports['default'] = createMemoryHistory; module.exports = exports['default']; /***/ }, /* 54 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } var _ExecutionEnvironment = __webpack_require__(10); var _runTransitionHook = __webpack_require__(17); var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook); var _extractPath = __webpack_require__(27); var _extractPath2 = _interopRequireDefault(_extractPath); var _parsePath = __webpack_require__(6); var _parsePath2 = _interopRequireDefault(_parsePath); var _deprecate = __webpack_require__(16); var _deprecate2 = _interopRequireDefault(_deprecate); function useBasename(createHistory) { return function () { var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; var basename = options.basename; var historyOptions = _objectWithoutProperties(options, ['basename']); var history = createHistory(historyOptions); // Automatically use the value of <base href> in HTML // documents as basename if it's not explicitly given. if (basename == null && _ExecutionEnvironment.canUseDOM) { var base = document.getElementsByTagName('base')[0]; if (base) basename = _extractPath2['default'](base.href); } function addBasename(location) { if (basename && location.basename == null) { if (location.pathname.indexOf(basename) === 0) { location.pathname = location.pathname.substring(basename.length); location.basename = basename; if (location.pathname === '') location.pathname = '/'; } else { location.basename = ''; } } return location; } function prependBasename(location) { if (!basename) return location; if (typeof location === 'string') location = _parsePath2['default'](location); var pname = location.pathname; var normalizedBasename = basename.slice(-1) === '/' ? basename : basename + '/'; var normalizedPathname = pname.charAt(0) === '/' ? pname.slice(1) : pname; var pathname = normalizedBasename + normalizedPathname; return _extends({}, location, { pathname: pathname }); } // Override all read methods with basename-aware versions. function listenBefore(hook) { return history.listenBefore(function (location, callback) { _runTransitionHook2['default'](hook, addBasename(location), callback); }); } function listen(listener) { return history.listen(function (location) { listener(addBasename(location)); }); } // Override all write methods with basename-aware versions. function push(location) { history.push(prependBasename(location)); } function replace(location) { history.replace(prependBasename(location)); } function createPath(location) { return history.createPath(prependBasename(location)); } function createHref(location) { return history.createHref(prependBasename(location)); } function createLocation() { return addBasename(history.createLocation.apply(history, arguments)); } // deprecated function pushState(state, path) { if (typeof path === 'string') path = _parsePath2['default'](path); push(_extends({ state: state }, path)); } // deprecated function replaceState(state, path) { if (typeof path === 'string') path = _parsePath2['default'](path); replace(_extends({ state: state }, path)); } return _extends({}, history, { listenBefore: listenBefore, listen: listen, push: push, replace: replace, createPath: createPath, createHref: createHref, createLocation: createLocation, pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'), replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead') }); }; } exports['default'] = useBasename; module.exports = exports['default']; /***/ }, /* 55 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var strictUriEncode = __webpack_require__(56); exports.extract = function (str) { return str.split('?')[1] || ''; }; exports.parse = function (str) { if (typeof str !== 'string') { return {}; } str = str.trim().replace(/^(\?|#|&)/, ''); if (!str) { return {}; } return str.split('&').reduce(function (ret, param) { var parts = param.replace(/\+/g, ' ').split('='); // Firefox (pre 40) decodes `%3D` to `=` // https://github.com/sindresorhus/query-string/pull/37 var key = parts.shift(); var val = parts.length > 0 ? parts.join('=') : undefined; key = decodeURIComponent(key); // missing `=` should be `null`: // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters val = val === undefined ? null : decodeURIComponent(val); if (!ret.hasOwnProperty(key)) { ret[key] = val; } else if (Array.isArray(ret[key])) { ret[key].push(val); } else { ret[key] = [ret[key], val]; } return ret; }, {}); }; exports.stringify = function (obj) { return obj ? Object.keys(obj).sort().map(function (key) { var val = obj[key]; if (val === undefined) { return ''; } if (val === null) { return key; } if (Array.isArray(val)) { return val.sort().map(function (val2) { return strictUriEncode(key) + '=' + strictUriEncode(val2); }).join('&'); } return strictUriEncode(key) + '=' + strictUriEncode(val); }).filter(function (x) { return x.length > 0; }).join('&') : ''; }; /***/ }, /* 56 */ /***/ function(module, exports) { 'use strict'; module.exports = function (str) { return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { return '%' + c.charCodeAt(0).toString(16); }); }; /***/ } /******/ ]) }); ;
scratch-blocks/node_modules/google-closure-library/closure/goog/events/actionhandler.js
isabela-angelo/scratch-tangible-blocks
// Copyright 2007 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS-IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. /** * @fileoverview This file contains a class to provide a unified mechanism for * CLICK and enter KEYDOWN events. This provides better accessibility by * providing the given functionality to a keyboard user which is otherwise * would be available only via a mouse click. * * If there is an existing CLICK listener or planning to be added as below - * * <code>this.eventHandler_.listen(el, CLICK, this.onClick_);<code> * * it can be replaced with an ACTION listener as follows: * * <code>this.eventHandler_.listen( * new goog.events.ActionHandler(el), * ACTION, * this.onAction_);<code> * */ goog.provide('goog.events.ActionEvent'); goog.provide('goog.events.ActionHandler'); goog.provide('goog.events.ActionHandler.EventType'); goog.provide('goog.events.BeforeActionEvent'); goog.require('goog.events'); goog.require('goog.events.BrowserEvent'); goog.require('goog.events.EventTarget'); goog.require('goog.events.EventType'); goog.require('goog.events.KeyCodes'); goog.require('goog.userAgent'); /** * A wrapper around an element that you want to listen to ACTION events on. * @param {Element|Document} element The element or document to listen on. * @constructor * @extends {goog.events.EventTarget} * @final */ goog.events.ActionHandler = function(element) { goog.events.EventTarget.call(this); /** * This is the element that we will listen to events on. * @type {Element|Document} * @private */ this.element_ = element; goog.events.listen( element, goog.events.ActionHandler.KEY_EVENT_TYPE_, this.handleKeyDown_, false, this); goog.events.listen( element, goog.events.EventType.CLICK, this.handleClick_, false, this); }; goog.inherits(goog.events.ActionHandler, goog.events.EventTarget); /** * Enum type for the events fired by the action handler * @enum {string} */ goog.events.ActionHandler.EventType = { ACTION: 'action', BEFOREACTION: 'beforeaction' }; /** * Key event type to listen for. * @type {string} * @private */ goog.events.ActionHandler.KEY_EVENT_TYPE_ = goog.userAgent.GECKO ? goog.events.EventType.KEYPRESS : goog.events.EventType.KEYDOWN; /** * Handles key press events. * @param {!goog.events.BrowserEvent} e The key press event. * @private */ goog.events.ActionHandler.prototype.handleKeyDown_ = function(e) { if (e.keyCode == goog.events.KeyCodes.ENTER || goog.userAgent.WEBKIT && e.keyCode == goog.events.KeyCodes.MAC_ENTER) { this.dispatchEvents_(e); } }; /** * Handles mouse events. * @param {!goog.events.BrowserEvent} e The click event. * @private */ goog.events.ActionHandler.prototype.handleClick_ = function(e) { this.dispatchEvents_(e); }; /** * Dispatches BeforeAction and Action events to the element * @param {!goog.events.BrowserEvent} e The event causing dispatches. * @private */ goog.events.ActionHandler.prototype.dispatchEvents_ = function(e) { var beforeActionEvent = new goog.events.BeforeActionEvent(e); // Allow application specific logic here before the ACTION event. // For example, Gmail uses this event to restore keyboard focus if (!this.dispatchEvent(beforeActionEvent)) { // If the listener swallowed the BEFOREACTION event, don't dispatch the // ACTION event. return; } // Wrap up original event and send it off var actionEvent = new goog.events.ActionEvent(e); try { this.dispatchEvent(actionEvent); } finally { // Stop propagating the event e.stopPropagation(); } }; /** @override */ goog.events.ActionHandler.prototype.disposeInternal = function() { goog.events.ActionHandler.superClass_.disposeInternal.call(this); goog.events.unlisten( this.element_, goog.events.ActionHandler.KEY_EVENT_TYPE_, this.handleKeyDown_, false, this); goog.events.unlisten( this.element_, goog.events.EventType.CLICK, this.handleClick_, false, this); delete this.element_; }; /** * This class is used for the goog.events.ActionHandler.EventType.ACTION event. * @param {!goog.events.BrowserEvent} browserEvent Browser event object. * @constructor * @extends {goog.events.BrowserEvent} * @final */ goog.events.ActionEvent = function(browserEvent) { goog.events.BrowserEvent.call(this, browserEvent.getBrowserEvent()); this.type = goog.events.ActionHandler.EventType.ACTION; }; goog.inherits(goog.events.ActionEvent, goog.events.BrowserEvent); /** * This class is used for the goog.events.ActionHandler.EventType.BEFOREACTION * event. BEFOREACTION gives a chance to the application so the keyboard focus * can be restored back, if required. * @param {!goog.events.BrowserEvent} browserEvent Browser event object. * @constructor * @extends {goog.events.BrowserEvent} * @final */ goog.events.BeforeActionEvent = function(browserEvent) { goog.events.BrowserEvent.call(this, browserEvent.getBrowserEvent()); this.type = goog.events.ActionHandler.EventType.BEFOREACTION; }; goog.inherits(goog.events.BeforeActionEvent, goog.events.BrowserEvent);
MARVELous/client/src/js/components/characterScroller/index.js
nicksenger/StackAttack2017
import React, { Component } from 'react'; import { Link } from 'react-router'; export default class CharacterScroller extends Component { constructor(props) { super(props); this.state = { pointer: 0 }; this.backShift = this.backShift.bind(this); this.frontShift = this.frontShift.bind(this); } backShift() { if (this.state.pointer > 8) { this.setState({ pointer: this.state.pointer - 9 }); } } frontShift() { if (this.state.pointer < this.props.characters.length - 9) { this.setState({ pointer: this.state.pointer + 9 }); } } render() { const charItems = this.props.characters.slice(this.state.pointer, this.state.pointer + 9).map(character => ( <Link to={`/character/${character.id}`}> <li key={character.name}> <img alt={character.name} src={character.image} /> {character.name} </li> </Link> )); return ( <ul className="item-list"> <a className="list-scroll-btn" onClick={this.backShift} > ▲ </a> <br /> {charItems} <br /> <a className="list-scroll-btn" onClick={this.frontShift} > ▼ </a> </ul> ); } }
files/babel/5.4.0/browser-polyfill.js
jtblin/jsdelivr
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ (function (global){ "use strict"; require("core-js/shim"); require("regenerator/runtime"); if (global._babelPolyfill) { throw new Error("only one instance of babel/polyfill is allowed"); } global._babelPolyfill = true; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{"core-js/shim":78,"regenerator/runtime":79}],2:[function(require,module,exports){ 'use strict'; // false -> Array#indexOf // true -> Array#includes var $ = require('./$'); module.exports = function(IS_INCLUDES){ return function(el /*, fromIndex = 0 */){ var O = $.toObject(this) , length = $.toLength(O.length) , index = $.toIndex(arguments[1], length) , value; if(IS_INCLUDES && el != el)while(length > index){ value = O[index++]; if(value != value)return true; } else for(;length > index; index++)if(IS_INCLUDES || index in O){ if(O[index] === el)return IS_INCLUDES || index; } return !IS_INCLUDES && -1; }; }; },{"./$":21}],3:[function(require,module,exports){ 'use strict'; // 0 -> Array#forEach // 1 -> Array#map // 2 -> Array#filter // 3 -> Array#some // 4 -> Array#every // 5 -> Array#find // 6 -> Array#findIndex var $ = require('./$') , ctx = require('./$.ctx'); module.exports = function(TYPE){ var IS_MAP = TYPE == 1 , IS_FILTER = TYPE == 2 , IS_SOME = TYPE == 3 , IS_EVERY = TYPE == 4 , IS_FIND_INDEX = TYPE == 6 , NO_HOLES = TYPE == 5 || IS_FIND_INDEX; return function(callbackfn/*, that = undefined */){ var O = Object($.assertDefined(this)) , self = $.ES5Object(O) , f = ctx(callbackfn, arguments[1], 3) , length = $.toLength(self.length) , index = 0 , result = IS_MAP ? Array(length) : IS_FILTER ? [] : undefined , val, res; for(;length > index; index++)if(NO_HOLES || index in self){ val = self[index]; res = f(val, index, O); if(TYPE){ if(IS_MAP)result[index] = res; // map else if(res)switch(TYPE){ case 3: return true; // some case 5: return val; // find case 6: return index; // findIndex case 2: result.push(val); // filter } else if(IS_EVERY)return false; // every } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; }; }; },{"./$":21,"./$.ctx":11}],4:[function(require,module,exports){ var $ = require('./$'); function assert(condition, msg1, msg2){ if(!condition)throw TypeError(msg2 ? msg1 + msg2 : msg1); } assert.def = $.assertDefined; assert.fn = function(it){ if(!$.isFunction(it))throw TypeError(it + ' is not a function!'); return it; }; assert.obj = function(it){ if(!$.isObject(it))throw TypeError(it + ' is not an object!'); return it; }; assert.inst = function(it, Constructor, name){ if(!(it instanceof Constructor))throw TypeError(name + ": use the 'new' operator!"); return it; }; module.exports = assert; },{"./$":21}],5:[function(require,module,exports){ var $ = require('./$') , enumKeys = require('./$.enum-keys'); // 19.1.2.1 Object.assign(target, source, ...) /* eslint-disable no-unused-vars */ module.exports = Object.assign || function assign(target, source){ /* eslint-enable no-unused-vars */ var T = Object($.assertDefined(target)) , l = arguments.length , i = 1; while(l > i){ var S = $.ES5Object(arguments[i++]) , keys = enumKeys(S) , length = keys.length , j = 0 , key; while(length > j)T[key = keys[j++]] = S[key]; } return T; }; },{"./$":21,"./$.enum-keys":13}],6:[function(require,module,exports){ var $ = require('./$') , TAG = require('./$.wks')('toStringTag') , toString = {}.toString; function cof(it){ return toString.call(it).slice(8, -1); } cof.classof = function(it){ var O, T; return it == undefined ? it === undefined ? 'Undefined' : 'Null' : typeof (T = (O = Object(it))[TAG]) == 'string' ? T : cof(O); }; cof.set = function(it, tag, stat){ if(it && !$.has(it = stat ? it : it.prototype, TAG))$.hide(it, TAG, tag); }; module.exports = cof; },{"./$":21,"./$.wks":32}],7:[function(require,module,exports){ 'use strict'; var $ = require('./$') , ctx = require('./$.ctx') , safe = require('./$.uid').safe , assert = require('./$.assert') , forOf = require('./$.for-of') , step = require('./$.iter').step , has = $.has , set = $.set , isObject = $.isObject , hide = $.hide , isFrozen = Object.isFrozen || $.core.Object.isFrozen , ID = safe('id') , O1 = safe('O1') , LAST = safe('last') , FIRST = safe('first') , ITER = safe('iter') , SIZE = $.DESC ? safe('size') : 'size' , id = 0; function fastKey(it, create){ // return primitive with prefix if(!isObject(it))return (typeof it == 'string' ? 'S' : 'P') + it; // can't set id to frozen object if(isFrozen(it))return 'F'; if(!has(it, ID)){ // not necessary to add id if(!create)return 'E'; // add missing object id hide(it, ID, ++id); // return object id with prefix } return 'O' + it[ID]; } function getEntry(that, key){ // fast case var index = fastKey(key), entry; if(index != 'F')return that[O1][index]; // frozen object case for(entry = that[FIRST]; entry; entry = entry.n){ if(entry.k == key)return entry; } } module.exports = { getConstructor: function(NAME, IS_MAP, ADDER){ function C(){ var that = assert.inst(this, C, NAME) , iterable = arguments[0]; set(that, O1, $.create(null)); set(that, SIZE, 0); set(that, LAST, undefined); set(that, FIRST, undefined); if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); } $.mix(C.prototype, { // 23.1.3.1 Map.prototype.clear() // 23.2.3.2 Set.prototype.clear() clear: function clear(){ for(var that = this, data = that[O1], entry = that[FIRST]; entry; entry = entry.n){ entry.r = true; if(entry.p)entry.p = entry.p.n = undefined; delete data[entry.i]; } that[FIRST] = that[LAST] = undefined; that[SIZE] = 0; }, // 23.1.3.3 Map.prototype.delete(key) // 23.2.3.4 Set.prototype.delete(value) 'delete': function(key){ var that = this , entry = getEntry(that, key); if(entry){ var next = entry.n , prev = entry.p; delete that[O1][entry.i]; entry.r = true; if(prev)prev.n = next; if(next)next.p = prev; if(that[FIRST] == entry)that[FIRST] = next; if(that[LAST] == entry)that[LAST] = prev; that[SIZE]--; } return !!entry; }, // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) forEach: function forEach(callbackfn /*, that = undefined */){ var f = ctx(callbackfn, arguments[1], 3) , entry; while(entry = entry ? entry.n : this[FIRST]){ f(entry.v, entry.k, this); // revert to the last existing entry while(entry && entry.r)entry = entry.p; } }, // 23.1.3.7 Map.prototype.has(key) // 23.2.3.7 Set.prototype.has(value) has: function has(key){ return !!getEntry(this, key); } }); if($.DESC)$.setDesc(C.prototype, 'size', { get: function(){ return assert.def(this[SIZE]); } }); return C; }, def: function(that, key, value){ var entry = getEntry(that, key) , prev, index; // change existing entry if(entry){ entry.v = value; // create new entry } else { that[LAST] = entry = { i: index = fastKey(key, true), // <- index k: key, // <- key v: value, // <- value p: prev = that[LAST], // <- previous entry n: undefined, // <- next entry r: false // <- removed }; if(!that[FIRST])that[FIRST] = entry; if(prev)prev.n = entry; that[SIZE]++; // add to index if(index != 'F')that[O1][index] = entry; } return that; }, getEntry: getEntry, // add .keys, .values, .entries, [@@iterator] // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 setIter: function(C, NAME, IS_MAP){ require('./$.iter-define')(C, NAME, function(iterated, kind){ set(this, ITER, {o: iterated, k: kind}); }, function(){ var iter = this[ITER] , kind = iter.k , entry = iter.l; // revert to the last existing entry while(entry && entry.r)entry = entry.p; // get next entry if(!iter.o || !(iter.l = entry = entry ? entry.n : iter.o[FIRST])){ // or finish the iteration iter.o = undefined; return step(1); } // return step by kind if(kind == 'keys' )return step(0, entry.k); if(kind == 'values')return step(0, entry.v); return step(0, [entry.k, entry.v]); }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true); } }; },{"./$":21,"./$.assert":4,"./$.ctx":11,"./$.for-of":14,"./$.iter":20,"./$.iter-define":18,"./$.uid":30}],8:[function(require,module,exports){ // https://github.com/DavidBruant/Map-Set.prototype.toJSON var $def = require('./$.def') , forOf = require('./$.for-of'); module.exports = function(NAME){ $def($def.P, NAME, { toJSON: function toJSON(){ var arr = []; forOf(this, false, arr.push, arr); return arr; } }); }; },{"./$.def":12,"./$.for-of":14}],9:[function(require,module,exports){ 'use strict'; var $ = require('./$') , safe = require('./$.uid').safe , assert = require('./$.assert') , forOf = require('./$.for-of') , _has = $.has , isObject = $.isObject , hide = $.hide , isFrozen = Object.isFrozen || $.core.Object.isFrozen , id = 0 , ID = safe('id') , WEAK = safe('weak') , LEAK = safe('leak') , method = require('./$.array-methods') , find = method(5) , findIndex = method(6); function findFrozen(store, key){ return find.call(store.array, function(it){ return it[0] === key; }); } // fallback for frozen keys function leakStore(that){ return that[LEAK] || hide(that, LEAK, { array: [], get: function(key){ var entry = findFrozen(this, key); if(entry)return entry[1]; }, has: function(key){ return !!findFrozen(this, key); }, set: function(key, value){ var entry = findFrozen(this, key); if(entry)entry[1] = value; else this.array.push([key, value]); }, 'delete': function(key){ var index = findIndex.call(this.array, function(it){ return it[0] === key; }); if(~index)this.array.splice(index, 1); return !!~index; } })[LEAK]; } module.exports = { getConstructor: function(NAME, IS_MAP, ADDER){ function C(){ $.set(assert.inst(this, C, NAME), ID, id++); var iterable = arguments[0]; if(iterable != undefined)forOf(iterable, IS_MAP, this[ADDER], this); } $.mix(C.prototype, { // 23.3.3.2 WeakMap.prototype.delete(key) // 23.4.3.3 WeakSet.prototype.delete(value) 'delete': function(key){ if(!isObject(key))return false; if(isFrozen(key))return leakStore(this)['delete'](key); return _has(key, WEAK) && _has(key[WEAK], this[ID]) && delete key[WEAK][this[ID]]; }, // 23.3.3.4 WeakMap.prototype.has(key) // 23.4.3.4 WeakSet.prototype.has(value) has: function has(key){ if(!isObject(key))return false; if(isFrozen(key))return leakStore(this).has(key); return _has(key, WEAK) && _has(key[WEAK], this[ID]); } }); return C; }, def: function(that, key, value){ if(isFrozen(assert.obj(key))){ leakStore(that).set(key, value); } else { _has(key, WEAK) || hide(key, WEAK, {}); key[WEAK][that[ID]] = value; } return that; }, leakStore: leakStore, WEAK: WEAK, ID: ID }; },{"./$":21,"./$.array-methods":3,"./$.assert":4,"./$.for-of":14,"./$.uid":30}],10:[function(require,module,exports){ 'use strict'; var $ = require('./$') , $def = require('./$.def') , BUGGY = require('./$.iter').BUGGY , forOf = require('./$.for-of') , species = require('./$.species') , assertInstance = require('./$.assert').inst; module.exports = function(NAME, methods, common, IS_MAP, IS_WEAK){ var Base = $.g[NAME] , C = Base , ADDER = IS_MAP ? 'set' : 'add' , proto = C && C.prototype , O = {}; function fixMethod(KEY, CHAIN){ var method = proto[KEY]; if($.FW)proto[KEY] = function(a, b){ var result = method.call(this, a === 0 ? 0 : a, b); return CHAIN ? this : result; }; } if(!$.isFunction(C) || !(IS_WEAK || !BUGGY && proto.forEach && proto.entries)){ // create collection constructor C = common.getConstructor(NAME, IS_MAP, ADDER); $.mix(C.prototype, methods); } else { var inst = new C , chain = inst[ADDER](IS_WEAK ? {} : -0, 1) , buggyZero; // wrap for init collections from iterable if(!require('./$.iter-detect')(function(iter){ new C(iter); })){ // eslint-disable-line no-new C = function(){ assertInstance(this, C, NAME); var that = new Base , iterable = arguments[0]; if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); return that; }; C.prototype = proto; if($.FW)proto.constructor = C; } IS_WEAK || inst.forEach(function(val, key){ buggyZero = 1 / key === -Infinity; }); // fix converting -0 key to +0 if(buggyZero){ fixMethod('delete'); fixMethod('has'); IS_MAP && fixMethod('get'); } // + fix .add & .set for chaining if(buggyZero || chain !== inst)fixMethod(ADDER, true); } require('./$.cof').set(C, NAME); O[NAME] = C; $def($def.G + $def.W + $def.F * (C != Base), O); species(C); species($.core[NAME]); // for wrapper if(!IS_WEAK)common.setIter(C, NAME, IS_MAP); return C; }; },{"./$":21,"./$.assert":4,"./$.cof":6,"./$.def":12,"./$.for-of":14,"./$.iter":20,"./$.iter-detect":19,"./$.species":27}],11:[function(require,module,exports){ // Optional / simple context binding var assertFunction = require('./$.assert').fn; module.exports = function(fn, that, length){ assertFunction(fn); if(~length && that === undefined)return fn; switch(length){ case 1: return function(a){ return fn.call(that, a); }; case 2: return function(a, b){ return fn.call(that, a, b); }; case 3: return function(a, b, c){ return fn.call(that, a, b, c); }; } return function(/* ...args */){ return fn.apply(that, arguments); }; }; },{"./$.assert":4}],12:[function(require,module,exports){ var $ = require('./$') , global = $.g , core = $.core , isFunction = $.isFunction; function ctx(fn, that){ return function(){ return fn.apply(that, arguments); }; } global.core = core; // type bitmap $def.F = 1; // forced $def.G = 2; // global $def.S = 4; // static $def.P = 8; // proto $def.B = 16; // bind $def.W = 32; // wrap function $def(type, name, source){ var key, own, out, exp , isGlobal = type & $def.G , target = isGlobal ? global : type & $def.S ? global[name] : (global[name] || {}).prototype , exports = isGlobal ? core : core[name] || (core[name] = {}); if(isGlobal)source = name; for(key in source){ // contains in native own = !(type & $def.F) && target && key in target; // export native or passed out = (own ? target : source)[key]; // bind timers to global for call from export context if(type & $def.B && own)exp = ctx(out, global); else exp = type & $def.P && isFunction(out) ? ctx(Function.call, out) : out; // extend global if(target && !own){ if(isGlobal)target[key] = out; else delete target[key] && $.hide(target, key, out); } // export if(exports[key] != out)$.hide(exports, key, exp); } } module.exports = $def; },{"./$":21}],13:[function(require,module,exports){ var $ = require('./$'); module.exports = function(it){ var keys = $.getKeys(it) , getDesc = $.getDesc , getSymbols = $.getSymbols; if(getSymbols)$.each.call(getSymbols(it), function(key){ if(getDesc(it, key).enumerable)keys.push(key); }); return keys; }; },{"./$":21}],14:[function(require,module,exports){ var ctx = require('./$.ctx') , get = require('./$.iter').get , call = require('./$.iter-call'); module.exports = function(iterable, entries, fn, that){ var iterator = get(iterable) , f = ctx(fn, that, entries ? 2 : 1) , step; while(!(step = iterator.next()).done){ if(call(iterator, f, step.value, entries) === false){ return call.close(iterator); } } }; },{"./$.ctx":11,"./$.iter":20,"./$.iter-call":17}],15:[function(require,module,exports){ module.exports = function($){ $.FW = true; $.path = $.g; return $; }; },{}],16:[function(require,module,exports){ // Fast apply // http://jsperf.lnkit.com/fast-apply/5 module.exports = function(fn, args, that){ var un = that === undefined; switch(args.length){ case 0: return un ? fn() : fn.call(that); case 1: return un ? fn(args[0]) : fn.call(that, args[0]); case 2: return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); case 3: return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); case 4: return un ? fn(args[0], args[1], args[2], args[3]) : fn.call(that, args[0], args[1], args[2], args[3]); case 5: return un ? fn(args[0], args[1], args[2], args[3], args[4]) : fn.call(that, args[0], args[1], args[2], args[3], args[4]); } return fn.apply(that, args); }; },{}],17:[function(require,module,exports){ var assertObject = require('./$.assert').obj; function close(iterator){ var ret = iterator['return']; if(ret !== undefined)assertObject(ret.call(iterator)); } function call(iterator, fn, value, entries){ try { return entries ? fn(assertObject(value)[0], value[1]) : fn(value); } catch(e){ close(iterator); throw e; } } call.close = close; module.exports = call; },{"./$.assert":4}],18:[function(require,module,exports){ var $def = require('./$.def') , $ = require('./$') , cof = require('./$.cof') , $iter = require('./$.iter') , SYMBOL_ITERATOR = require('./$.wks')('iterator') , FF_ITERATOR = '@@iterator' , VALUES = 'values' , Iterators = $iter.Iterators; module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE){ $iter.create(Constructor, NAME, next); function createMethod(kind){ return function(){ return new Constructor(this, kind); }; } var TAG = NAME + ' Iterator' , proto = Base.prototype , _native = proto[SYMBOL_ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] , _default = _native || createMethod(DEFAULT) , methods, key; // Fix native if(_native){ var IteratorPrototype = $.getProto(_default.call(new Base)); // Set @@toStringTag to native iterators cof.set(IteratorPrototype, TAG, true); // FF fix if($.FW && $.has(proto, FF_ITERATOR))$iter.set(IteratorPrototype, $.that); } // Define iterator if($.FW)$iter.set(proto, _default); // Plug for library Iterators[NAME] = _default; Iterators[TAG] = $.that; if(DEFAULT){ methods = { keys: IS_SET ? _default : createMethod('keys'), values: DEFAULT == VALUES ? _default : createMethod(VALUES), entries: DEFAULT != VALUES ? _default : createMethod('entries') }; if(FORCE)for(key in methods){ if(!(key in proto))$.hide(proto, key, methods[key]); } else $def($def.P + $def.F * $iter.BUGGY, NAME, methods); } }; },{"./$":21,"./$.cof":6,"./$.def":12,"./$.iter":20,"./$.wks":32}],19:[function(require,module,exports){ var SYMBOL_ITERATOR = require('./$.wks')('iterator') , SAFE_CLOSING = false; try { var riter = [7][SYMBOL_ITERATOR](); riter['return'] = function(){ SAFE_CLOSING = true; }; Array.from(riter, function(){ throw 2; }); } catch(e){ /* empty */ } module.exports = function(exec){ if(!SAFE_CLOSING)return false; var safe = false; try { var arr = [7] , iter = arr[SYMBOL_ITERATOR](); iter.next = function(){ safe = true; }; arr[SYMBOL_ITERATOR] = function(){ return iter; }; exec(arr); } catch(e){ /* empty */ } return safe; }; },{"./$.wks":32}],20:[function(require,module,exports){ 'use strict'; var $ = require('./$') , cof = require('./$.cof') , assertObject = require('./$.assert').obj , SYMBOL_ITERATOR = require('./$.wks')('iterator') , FF_ITERATOR = '@@iterator' , Iterators = {} , IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() setIterator(IteratorPrototype, $.that); function setIterator(O, value){ $.hide(O, SYMBOL_ITERATOR, value); // Add iterator for FF iterator protocol if(FF_ITERATOR in [])$.hide(O, FF_ITERATOR, value); } module.exports = { // Safari has buggy iterators w/o `next` BUGGY: 'keys' in [] && !('next' in [].keys()), Iterators: Iterators, step: function(done, value){ return {value: value, done: !!done}; }, is: function(it){ var O = Object(it) , Symbol = $.g.Symbol , SYM = Symbol && Symbol.iterator || FF_ITERATOR; return SYM in O || SYMBOL_ITERATOR in O || $.has(Iterators, cof.classof(O)); }, get: function(it){ var Symbol = $.g.Symbol , ext = it[Symbol && Symbol.iterator || FF_ITERATOR] , getIter = ext || it[SYMBOL_ITERATOR] || Iterators[cof.classof(it)]; return assertObject(getIter.call(it)); }, set: setIterator, create: function(Constructor, NAME, next, proto){ Constructor.prototype = $.create(proto || IteratorPrototype, {next: $.desc(1, next)}); cof.set(Constructor, NAME + ' Iterator'); } }; },{"./$":21,"./$.assert":4,"./$.cof":6,"./$.wks":32}],21:[function(require,module,exports){ 'use strict'; var global = typeof self != 'undefined' ? self : Function('return this')() , core = {} , defineProperty = Object.defineProperty , hasOwnProperty = {}.hasOwnProperty , ceil = Math.ceil , floor = Math.floor , max = Math.max , min = Math.min; // The engine works fine with descriptors? Thank's IE8 for his funny defineProperty. var DESC = !!function(){ try { return defineProperty({}, 'a', {get: function(){ return 2; }}).a == 2; } catch(e){ /* empty */ } }(); var hide = createDefiner(1); // 7.1.4 ToInteger function toInteger(it){ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); } function desc(bitmap, value){ return { enumerable : !(bitmap & 1), configurable: !(bitmap & 2), writable : !(bitmap & 4), value : value }; } function simpleSet(object, key, value){ object[key] = value; return object; } function createDefiner(bitmap){ return DESC ? function(object, key, value){ return $.setDesc(object, key, desc(bitmap, value)); } : simpleSet; } function isObject(it){ return it !== null && (typeof it == 'object' || typeof it == 'function'); } function isFunction(it){ return typeof it == 'function'; } function assertDefined(it){ if(it == undefined)throw TypeError("Can't call method on " + it); return it; } var $ = module.exports = require('./$.fw')({ g: global, core: core, html: global.document && document.documentElement, // http://jsperf.com/core-js-isobject isObject: isObject, isFunction: isFunction, it: function(it){ return it; }, that: function(){ return this; }, // 7.1.4 ToInteger toInteger: toInteger, // 7.1.15 ToLength toLength: function(it){ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }, toIndex: function(index, length){ index = toInteger(index); return index < 0 ? max(index + length, 0) : min(index, length); }, has: function(it, key){ return hasOwnProperty.call(it, key); }, create: Object.create, getProto: Object.getPrototypeOf, DESC: DESC, desc: desc, getDesc: Object.getOwnPropertyDescriptor, setDesc: defineProperty, setDescs: Object.defineProperties, getKeys: Object.keys, getNames: Object.getOwnPropertyNames, getSymbols: Object.getOwnPropertySymbols, assertDefined: assertDefined, // Dummy, fix for not array-like ES3 string in es5 module ES5Object: Object, toObject: function(it){ return $.ES5Object(assertDefined(it)); }, hide: hide, def: createDefiner(0), set: global.Symbol ? simpleSet : hide, mix: function(target, src){ for(var key in src)hide(target, key, src[key]); return target; }, each: [].forEach }); /* eslint-disable no-undef */ if(typeof __e != 'undefined')__e = core; if(typeof __g != 'undefined')__g = global; },{"./$.fw":15}],22:[function(require,module,exports){ var $ = require('./$'); module.exports = function(object, el){ var O = $.toObject(object) , keys = $.getKeys(O) , length = keys.length , index = 0 , key; while(length > index)if(O[key = keys[index++]] === el)return key; }; },{"./$":21}],23:[function(require,module,exports){ var $ = require('./$') , assertObject = require('./$.assert').obj; module.exports = function ownKeys(it){ assertObject(it); var keys = $.getNames(it) , getSymbols = $.getSymbols; return getSymbols ? keys.concat(getSymbols(it)) : keys; }; },{"./$":21,"./$.assert":4}],24:[function(require,module,exports){ 'use strict'; var $ = require('./$') , invoke = require('./$.invoke') , assertFunction = require('./$.assert').fn; module.exports = function(/* ...pargs */){ var fn = assertFunction(this) , length = arguments.length , pargs = Array(length) , i = 0 , _ = $.path._ , holder = false; while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true; return function(/* ...args */){ var that = this , _length = arguments.length , j = 0, k = 0, args; if(!holder && !_length)return invoke(fn, pargs, that); args = pargs.slice(); if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++]; while(_length > k)args.push(arguments[k++]); return invoke(fn, args, that); }; }; },{"./$":21,"./$.assert":4,"./$.invoke":16}],25:[function(require,module,exports){ 'use strict'; module.exports = function(regExp, replace, isStatic){ var replacer = replace === Object(replace) ? function(part){ return replace[part]; } : replace; return function(it){ return String(isStatic ? it : this).replace(regExp, replacer); }; }; },{}],26:[function(require,module,exports){ // Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var $ = require('./$') , assert = require('./$.assert'); function check(O, proto){ assert.obj(O); assert(proto === null || $.isObject(proto), proto, ": can't set as prototype!"); } module.exports = { set: Object.setPrototypeOf || ('__proto__' in {} // eslint-disable-line ? function(buggy, set){ try { set = require('./$.ctx')(Function.call, $.getDesc(Object.prototype, '__proto__').set, 2); set({}, []); } catch(e){ buggy = true; } return function setPrototypeOf(O, proto){ check(O, proto); if(buggy)O.__proto__ = proto; else set(O, proto); return O; }; }() : undefined), check: check }; },{"./$":21,"./$.assert":4,"./$.ctx":11}],27:[function(require,module,exports){ var $ = require('./$') , SPECIES = require('./$.wks')('species'); module.exports = function(C){ if($.DESC && !(SPECIES in C))$.setDesc(C, SPECIES, { configurable: true, get: $.that }); }; },{"./$":21,"./$.wks":32}],28:[function(require,module,exports){ 'use strict'; // true -> String#at // false -> String#codePointAt var $ = require('./$'); module.exports = function(TO_STRING){ return function(pos){ var s = String($.assertDefined(this)) , i = $.toInteger(pos) , l = s.length , a, b; if(i < 0 || i >= l)return TO_STRING ? '' : undefined; a = s.charCodeAt(i); return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; }; },{"./$":21}],29:[function(require,module,exports){ 'use strict'; var $ = require('./$') , ctx = require('./$.ctx') , cof = require('./$.cof') , invoke = require('./$.invoke') , global = $.g , isFunction = $.isFunction , html = $.html , document = global.document , process = global.process , setTask = global.setImmediate , clearTask = global.clearImmediate , postMessage = global.postMessage , addEventListener = global.addEventListener , MessageChannel = global.MessageChannel , counter = 0 , queue = {} , ONREADYSTATECHANGE = 'onreadystatechange' , defer, channel, port; function run(){ var id = +this; if($.has(queue, id)){ var fn = queue[id]; delete queue[id]; fn(); } } function listner(event){ run.call(event.data); } // Node.js 0.9+ & IE10+ has setImmediate, otherwise: if(!isFunction(setTask) || !isFunction(clearTask)){ setTask = function(fn){ var args = [], i = 1; while(arguments.length > i)args.push(arguments[i++]); queue[++counter] = function(){ invoke(isFunction(fn) ? fn : Function(fn), args); }; defer(counter); return counter; }; clearTask = function(id){ delete queue[id]; }; // Node.js 0.8- if(cof(process) == 'process'){ defer = function(id){ process.nextTick(ctx(run, id, 1)); }; // Modern browsers, skip implementation for WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is object } else if(addEventListener && isFunction(postMessage) && !global.importScripts){ defer = function(id){ postMessage(id, '*'); }; addEventListener('message', listner, false); // WebWorkers } else if(isFunction(MessageChannel)){ channel = new MessageChannel; port = channel.port2; channel.port1.onmessage = listner; defer = ctx(port.postMessage, port, 1); // IE8- } else if(document && ONREADYSTATECHANGE in document.createElement('script')){ defer = function(id){ html.appendChild(document.createElement('script'))[ONREADYSTATECHANGE] = function(){ html.removeChild(this); run.call(id); }; }; // Rest old browsers } else { defer = function(id){ setTimeout(ctx(run, id, 1), 0); }; } } module.exports = { set: setTask, clear: clearTask }; },{"./$":21,"./$.cof":6,"./$.ctx":11,"./$.invoke":16}],30:[function(require,module,exports){ var sid = 0; function uid(key){ return 'Symbol(' + key + ')_' + (++sid + Math.random()).toString(36); } uid.safe = require('./$').g.Symbol || uid; module.exports = uid; },{"./$":21}],31:[function(require,module,exports){ // 22.1.3.31 Array.prototype[@@unscopables] var $ = require('./$') , UNSCOPABLES = require('./$.wks')('unscopables'); if($.FW && !(UNSCOPABLES in []))$.hide(Array.prototype, UNSCOPABLES, {}); module.exports = function(key){ if($.FW)[][UNSCOPABLES][key] = true; }; },{"./$":21,"./$.wks":32}],32:[function(require,module,exports){ var global = require('./$').g , store = {}; module.exports = function(name){ return store[name] || (store[name] = global.Symbol && global.Symbol[name] || require('./$.uid').safe('Symbol.' + name)); }; },{"./$":21,"./$.uid":30}],33:[function(require,module,exports){ var $ = require('./$') , cof = require('./$.cof') , $def = require('./$.def') , invoke = require('./$.invoke') , arrayMethod = require('./$.array-methods') , IE_PROTO = require('./$.uid').safe('__proto__') , assert = require('./$.assert') , assertObject = assert.obj , ObjectProto = Object.prototype , A = [] , slice = A.slice , indexOf = A.indexOf , classof = cof.classof , has = $.has , defineProperty = $.setDesc , getOwnDescriptor = $.getDesc , defineProperties = $.setDescs , isFunction = $.isFunction , toObject = $.toObject , toLength = $.toLength , IE8_DOM_DEFINE = false; if(!$.DESC){ try { IE8_DOM_DEFINE = defineProperty(document.createElement('div'), 'x', {get: function(){ return 8; }} ).x == 8; } catch(e){ /* empty */ } $.setDesc = function(O, P, Attributes){ if(IE8_DOM_DEFINE)try { return defineProperty(O, P, Attributes); } catch(e){ /* empty */ } if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); if('value' in Attributes)assertObject(O)[P] = Attributes.value; return O; }; $.getDesc = function(O, P){ if(IE8_DOM_DEFINE)try { return getOwnDescriptor(O, P); } catch(e){ /* empty */ } if(has(O, P))return $.desc(!ObjectProto.propertyIsEnumerable.call(O, P), O[P]); }; $.setDescs = defineProperties = function(O, Properties){ assertObject(O); var keys = $.getKeys(Properties) , length = keys.length , i = 0 , P; while(length > i)$.setDesc(O, P = keys[i++], Properties[P]); return O; }; } $def($def.S + $def.F * !$.DESC, 'Object', { // 19.1.2.6 / 15.2.3.3 Object.getOwnPropertyDescriptor(O, P) getOwnPropertyDescriptor: $.getDesc, // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) defineProperty: $.setDesc, // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) defineProperties: defineProperties }); // IE 8- don't enum bug keys var keys1 = ('constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,' + 'toLocaleString,toString,valueOf').split(',') // Additional keys for getOwnPropertyNames , keys2 = keys1.concat('length', 'prototype') , keysLen1 = keys1.length; // Create object with `null` prototype: use iframe Object with cleared prototype var createDict = function(){ // Thrash, waste and sodomy: IE GC bug var iframe = document.createElement('iframe') , i = keysLen1 , gt = '>' , iframeDocument; iframe.style.display = 'none'; $.html.appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write('<script>document.F=Object</script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while(i--)delete createDict.prototype[keys1[i]]; return createDict(); }; function createGetKeys(names, length){ return function(object){ var O = toObject(object) , i = 0 , result = [] , key; for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); // Don't enum bug & hidden keys while(length > i)if(has(O, key = names[i++])){ ~indexOf.call(result, key) || result.push(key); } return result; }; } function isPrimitive(it){ return !$.isObject(it); } function Empty(){} $def($def.S, 'Object', { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) getPrototypeOf: $.getProto = $.getProto || function(O){ O = Object(assert.def(O)); if(has(O, IE_PROTO))return O[IE_PROTO]; if(isFunction(O.constructor) && O instanceof O.constructor){ return O.constructor.prototype; } return O instanceof Object ? ObjectProto : null; }, // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) getOwnPropertyNames: $.getNames = $.getNames || createGetKeys(keys2, keys2.length, true), // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) create: $.create = $.create || function(O, /*?*/Properties){ var result; if(O !== null){ Empty.prototype = assertObject(O); result = new Empty(); Empty.prototype = null; // add "__proto__" for Object.getPrototypeOf shim result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : defineProperties(result, Properties); }, // 19.1.2.14 / 15.2.3.14 Object.keys(O) keys: $.getKeys = $.getKeys || createGetKeys(keys1, keysLen1, false), // 19.1.2.17 / 15.2.3.8 Object.seal(O) seal: $.it, // <- cap // 19.1.2.5 / 15.2.3.9 Object.freeze(O) freeze: $.it, // <- cap // 19.1.2.15 / 15.2.3.10 Object.preventExtensions(O) preventExtensions: $.it, // <- cap // 19.1.2.13 / 15.2.3.11 Object.isSealed(O) isSealed: isPrimitive, // <- cap // 19.1.2.12 / 15.2.3.12 Object.isFrozen(O) isFrozen: isPrimitive, // <- cap // 19.1.2.11 / 15.2.3.13 Object.isExtensible(O) isExtensible: $.isObject // <- cap }); // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) $def($def.P, 'Function', { bind: function(that /*, args... */){ var fn = assert.fn(this) , partArgs = slice.call(arguments, 1); function bound(/* args... */){ var args = partArgs.concat(slice.call(arguments)); return invoke(fn, args, this instanceof bound ? $.create(fn.prototype) : that); } if(fn.prototype)bound.prototype = fn.prototype; return bound; } }); // Fix for not array-like ES3 string function arrayMethodFix(fn){ return function(){ return fn.apply($.ES5Object(this), arguments); }; } if(!(0 in Object('z') && 'z'[0] == 'z')){ $.ES5Object = function(it){ return cof(it) == 'String' ? it.split('') : Object(it); }; } $def($def.P + $def.F * ($.ES5Object != Object), 'Array', { slice: arrayMethodFix(slice), join: arrayMethodFix(A.join) }); // 22.1.2.2 / 15.4.3.2 Array.isArray(arg) $def($def.S, 'Array', { isArray: function(arg){ return cof(arg) == 'Array'; } }); function createArrayReduce(isRight){ return function(callbackfn, memo){ assert.fn(callbackfn); var O = toObject(this) , length = toLength(O.length) , index = isRight ? length - 1 : 0 , i = isRight ? -1 : 1; if(arguments.length < 2)for(;;){ if(index in O){ memo = O[index]; index += i; break; } index += i; assert(isRight ? index >= 0 : length > index, 'Reduce of empty array with no initial value'); } for(;isRight ? index >= 0 : length > index; index += i)if(index in O){ memo = callbackfn(memo, O[index], index, this); } return memo; }; } $def($def.P, 'Array', { // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) forEach: $.each = $.each || arrayMethod(0), // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) map: arrayMethod(1), // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) filter: arrayMethod(2), // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) some: arrayMethod(3), // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) every: arrayMethod(4), // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) reduce: createArrayReduce(false), // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) reduceRight: createArrayReduce(true), // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) indexOf: indexOf = indexOf || require('./$.array-includes')(false), // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) lastIndexOf: function(el, fromIndex /* = @[*-1] */){ var O = toObject(this) , length = toLength(O.length) , index = length - 1; if(arguments.length > 1)index = Math.min(index, $.toInteger(fromIndex)); if(index < 0)index = toLength(length + index); for(;index >= 0; index--)if(index in O)if(O[index] === el)return index; return -1; } }); // 21.1.3.25 / 15.5.4.20 String.prototype.trim() $def($def.P, 'String', {trim: require('./$.replacer')(/^\s*([\s\S]*\S)?\s*$/, '$1')}); // 20.3.3.1 / 15.9.4.4 Date.now() $def($def.S, 'Date', {now: function(){ return +new Date; }}); function lz(num){ return num > 9 ? num : '0' + num; } // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() // PhantomJS and old webkit had a broken Date implementation. var date = new Date(-5e13 - 1) , brokenDate = !(date.toISOString && date.toISOString() == '0385-07-25T07:06:39.999Z'); $def($def.P + $def.F * brokenDate, 'Date', {toISOString: function(){ if(!isFinite(this))throw RangeError('Invalid time value'); var d = this , y = d.getUTCFullYear() , m = d.getUTCMilliseconds() , s = y < 0 ? '-' : y > 9999 ? '+' : ''; return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; }}); if(classof(function(){ return arguments; }()) == 'Object')cof.classof = function(it){ var tag = classof(it); return tag == 'Object' && isFunction(it.callee) ? 'Arguments' : tag; }; },{"./$":21,"./$.array-includes":2,"./$.array-methods":3,"./$.assert":4,"./$.cof":6,"./$.def":12,"./$.invoke":16,"./$.replacer":25,"./$.uid":30}],34:[function(require,module,exports){ 'use strict'; var $ = require('./$') , $def = require('./$.def') , toIndex = $.toIndex; $def($def.P, 'Array', { // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) copyWithin: function copyWithin(target/* = 0 */, start /* = 0, end = @length */){ var O = Object($.assertDefined(this)) , len = $.toLength(O.length) , to = toIndex(target, len) , from = toIndex(start, len) , end = arguments[2] , fin = end === undefined ? len : toIndex(end, len) , count = Math.min(fin - from, len - to) , inc = 1; if(from < to && to < from + count){ inc = -1; from = from + count - 1; to = to + count - 1; } while(count-- > 0){ if(from in O)O[to] = O[from]; else delete O[to]; to += inc; from += inc; } return O; } }); require('./$.unscope')('copyWithin'); },{"./$":21,"./$.def":12,"./$.unscope":31}],35:[function(require,module,exports){ 'use strict'; var $ = require('./$') , $def = require('./$.def') , toIndex = $.toIndex; $def($def.P, 'Array', { // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) fill: function fill(value /*, start = 0, end = @length */){ var O = Object($.assertDefined(this)) , length = $.toLength(O.length) , index = toIndex(arguments[1], length) , end = arguments[2] , endPos = end === undefined ? length : toIndex(end, length); while(endPos > index)O[index++] = value; return O; } }); require('./$.unscope')('fill'); },{"./$":21,"./$.def":12,"./$.unscope":31}],36:[function(require,module,exports){ var $def = require('./$.def'); $def($def.P, 'Array', { // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) findIndex: require('./$.array-methods')(6) }); require('./$.unscope')('findIndex'); },{"./$.array-methods":3,"./$.def":12,"./$.unscope":31}],37:[function(require,module,exports){ var $def = require('./$.def'); $def($def.P, 'Array', { // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) find: require('./$.array-methods')(5) }); require('./$.unscope')('find'); },{"./$.array-methods":3,"./$.def":12,"./$.unscope":31}],38:[function(require,module,exports){ var $ = require('./$') , ctx = require('./$.ctx') , $def = require('./$.def') , $iter = require('./$.iter') , call = require('./$.iter-call'); $def($def.S + $def.F * !require('./$.iter-detect')(function(iter){ Array.from(iter); }), 'Array', { // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){ var O = Object($.assertDefined(arrayLike)) , mapfn = arguments[1] , mapping = mapfn !== undefined , f = mapping ? ctx(mapfn, arguments[2], 2) : undefined , index = 0 , length, result, step, iterator; if($iter.is(O)){ iterator = $iter.get(O); // strange IE quirks mode bug -> use typeof instead of isFunction result = new (typeof this == 'function' ? this : Array); for(; !(step = iterator.next()).done; index++){ result[index] = mapping ? call(iterator, f, [step.value, index], true) : step.value; } } else { // strange IE quirks mode bug -> use typeof instead of isFunction result = new (typeof this == 'function' ? this : Array)(length = $.toLength(O.length)); for(; length > index; index++){ result[index] = mapping ? f(O[index], index) : O[index]; } } result.length = index; return result; } }); },{"./$":21,"./$.ctx":11,"./$.def":12,"./$.iter":20,"./$.iter-call":17,"./$.iter-detect":19}],39:[function(require,module,exports){ var $ = require('./$') , setUnscope = require('./$.unscope') , ITER = require('./$.uid').safe('iter') , $iter = require('./$.iter') , step = $iter.step , Iterators = $iter.Iterators; // 22.1.3.4 Array.prototype.entries() // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() require('./$.iter-define')(Array, 'Array', function(iterated, kind){ $.set(this, ITER, {o: $.toObject(iterated), i: 0, k: kind}); // 22.1.5.2.1 %ArrayIteratorPrototype%.next() }, function(){ var iter = this[ITER] , O = iter.o , kind = iter.k , index = iter.i++; if(!O || index >= O.length){ iter.o = undefined; return step(1); } if(kind == 'keys' )return step(0, index); if(kind == 'values')return step(0, O[index]); return step(0, [index, O[index]]); }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) Iterators.Arguments = Iterators.Array; setUnscope('keys'); setUnscope('values'); setUnscope('entries'); },{"./$":21,"./$.iter":20,"./$.iter-define":18,"./$.uid":30,"./$.unscope":31}],40:[function(require,module,exports){ var $def = require('./$.def'); $def($def.S, 'Array', { // 22.1.2.3 Array.of( ...items) of: function of(/* ...args */){ var index = 0 , length = arguments.length // strange IE quirks mode bug -> use typeof instead of isFunction , result = new (typeof this == 'function' ? this : Array)(length); while(length > index)result[index] = arguments[index++]; result.length = length; return result; } }); },{"./$.def":12}],41:[function(require,module,exports){ require('./$.species')(Array); },{"./$.species":27}],42:[function(require,module,exports){ 'use strict'; var $ = require('./$') , NAME = 'name' , setDesc = $.setDesc , FunctionProto = Function.prototype; // 19.2.4.2 name NAME in FunctionProto || $.FW && $.DESC && setDesc(FunctionProto, NAME, { configurable: true, get: function(){ var match = String(this).match(/^\s*function ([^ (]*)/) , name = match ? match[1] : ''; $.has(this, NAME) || setDesc(this, NAME, $.desc(5, name)); return name; }, set: function(value){ $.has(this, NAME) || setDesc(this, NAME, $.desc(0, value)); } }); },{"./$":21}],43:[function(require,module,exports){ 'use strict'; var strong = require('./$.collection-strong'); // 23.1 Map Objects require('./$.collection')('Map', { // 23.1.3.6 Map.prototype.get(key) get: function get(key){ var entry = strong.getEntry(this, key); return entry && entry.v; }, // 23.1.3.9 Map.prototype.set(key, value) set: function set(key, value){ return strong.def(this, key === 0 ? 0 : key, value); } }, strong, true); },{"./$.collection":10,"./$.collection-strong":7}],44:[function(require,module,exports){ var Infinity = 1 / 0 , $def = require('./$.def') , E = Math.E , pow = Math.pow , abs = Math.abs , exp = Math.exp , log = Math.log , sqrt = Math.sqrt , ceil = Math.ceil , floor = Math.floor , EPSILON = pow(2, -52) , EPSILON32 = pow(2, -23) , MAX32 = pow(2, 127) * (2 - EPSILON32) , MIN32 = pow(2, -126); function roundTiesToEven(n){ return n + 1 / EPSILON - 1 / EPSILON; } // 20.2.2.28 Math.sign(x) function sign(x){ return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; } // 20.2.2.5 Math.asinh(x) function asinh(x){ return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : log(x + sqrt(x * x + 1)); } // 20.2.2.14 Math.expm1(x) function expm1(x){ return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : exp(x) - 1; } $def($def.S, 'Math', { // 20.2.2.3 Math.acosh(x) acosh: function acosh(x){ return (x = +x) < 1 ? NaN : isFinite(x) ? log(x / E + sqrt(x + 1) * sqrt(x - 1) / E) + 1 : x; }, // 20.2.2.5 Math.asinh(x) asinh: asinh, // 20.2.2.7 Math.atanh(x) atanh: function atanh(x){ return (x = +x) == 0 ? x : log((1 + x) / (1 - x)) / 2; }, // 20.2.2.9 Math.cbrt(x) cbrt: function cbrt(x){ return sign(x = +x) * pow(abs(x), 1 / 3); }, // 20.2.2.11 Math.clz32(x) clz32: function clz32(x){ return (x >>>= 0) ? 31 - floor(log(x + 0.5) * Math.LOG2E) : 32; }, // 20.2.2.12 Math.cosh(x) cosh: function cosh(x){ return (exp(x = +x) + exp(-x)) / 2; }, // 20.2.2.14 Math.expm1(x) expm1: expm1, // 20.2.2.16 Math.fround(x) fround: function fround(x){ var $abs = abs(x) , $sign = sign(x) , a, result; if($abs < MIN32)return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; a = (1 + EPSILON32 / EPSILON) * $abs; result = a - (a - $abs); if(result > MAX32 || result != result)return $sign * Infinity; return $sign * result; }, // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars var sum = 0 , len1 = arguments.length , len2 = len1 , args = Array(len1) , larg = -Infinity , arg; while(len1--){ arg = args[len1] = +arguments[len1]; if(arg == Infinity || arg == -Infinity)return Infinity; if(arg > larg)larg = arg; } larg = arg || 1; while(len2--)sum += pow(args[len2] / larg, 2); return larg * sqrt(sum); }, // 20.2.2.18 Math.imul(x, y) imul: function imul(x, y){ var UInt16 = 0xffff , xn = +x , yn = +y , xl = UInt16 & xn , yl = UInt16 & yn; return 0 | xl * yl + ((UInt16 & xn >>> 16) * yl + xl * (UInt16 & yn >>> 16) << 16 >>> 0); }, // 20.2.2.20 Math.log1p(x) log1p: function log1p(x){ return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : log(1 + x); }, // 20.2.2.21 Math.log10(x) log10: function log10(x){ return log(x) / Math.LN10; }, // 20.2.2.22 Math.log2(x) log2: function log2(x){ return log(x) / Math.LN2; }, // 20.2.2.28 Math.sign(x) sign: sign, // 20.2.2.30 Math.sinh(x) sinh: function sinh(x){ return abs(x = +x) < 1 ? (expm1(x) - expm1(-x)) / 2 : (exp(x - 1) - exp(-x - 1)) * (E / 2); }, // 20.2.2.33 Math.tanh(x) tanh: function tanh(x){ var a = expm1(x = +x) , b = expm1(-x); return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); }, // 20.2.2.34 Math.trunc(x) trunc: function trunc(it){ return (it > 0 ? floor : ceil)(it); } }); },{"./$.def":12}],45:[function(require,module,exports){ 'use strict'; var $ = require('./$') , isObject = $.isObject , isFunction = $.isFunction , NUMBER = 'Number' , Number = $.g[NUMBER] , Base = Number , proto = Number.prototype; function toPrimitive(it){ var fn, val; if(isFunction(fn = it.valueOf) && !isObject(val = fn.call(it)))return val; if(isFunction(fn = it.toString) && !isObject(val = fn.call(it)))return val; throw TypeError("Can't convert object to number"); } function toNumber(it){ if(isObject(it))it = toPrimitive(it); if(typeof it == 'string' && it.length > 2 && it.charCodeAt(0) == 48){ var binary = false; switch(it.charCodeAt(1)){ case 66 : case 98 : binary = true; case 79 : case 111 : return parseInt(it.slice(2), binary ? 2 : 8); } } return +it; } if($.FW && !(Number('0o1') && Number('0b1'))){ Number = function Number(it){ return this instanceof Number ? new Base(toNumber(it)) : toNumber(it); }; $.each.call($.DESC ? $.getNames(Base) : ( // ES3: 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + // ES6 (in case, if modules with ES6 Number statics required before): 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' ).split(','), function(key){ if($.has(Base, key) && !$.has(Number, key)){ $.setDesc(Number, key, $.getDesc(Base, key)); } } ); Number.prototype = proto; proto.constructor = Number; $.hide($.g, NUMBER, Number); } },{"./$":21}],46:[function(require,module,exports){ var $ = require('./$') , $def = require('./$.def') , abs = Math.abs , floor = Math.floor , _isFinite = $.g.isFinite , MAX_SAFE_INTEGER = 0x1fffffffffffff; // pow(2, 53) - 1 == 9007199254740991; function isInteger(it){ return !$.isObject(it) && _isFinite(it) && floor(it) === it; } $def($def.S, 'Number', { // 20.1.2.1 Number.EPSILON EPSILON: Math.pow(2, -52), // 20.1.2.2 Number.isFinite(number) isFinite: function isFinite(it){ return typeof it == 'number' && _isFinite(it); }, // 20.1.2.3 Number.isInteger(number) isInteger: isInteger, // 20.1.2.4 Number.isNaN(number) isNaN: function isNaN(number){ return number != number; }, // 20.1.2.5 Number.isSafeInteger(number) isSafeInteger: function isSafeInteger(number){ return isInteger(number) && abs(number) <= MAX_SAFE_INTEGER; }, // 20.1.2.6 Number.MAX_SAFE_INTEGER MAX_SAFE_INTEGER: MAX_SAFE_INTEGER, // 20.1.2.10 Number.MIN_SAFE_INTEGER MIN_SAFE_INTEGER: -MAX_SAFE_INTEGER, // 20.1.2.12 Number.parseFloat(string) parseFloat: parseFloat, // 20.1.2.13 Number.parseInt(string, radix) parseInt: parseInt }); },{"./$":21,"./$.def":12}],47:[function(require,module,exports){ // 19.1.3.1 Object.assign(target, source) var $def = require('./$.def'); $def($def.S, 'Object', {assign: require('./$.assign')}); },{"./$.assign":5,"./$.def":12}],48:[function(require,module,exports){ // 19.1.3.10 Object.is(value1, value2) var $def = require('./$.def'); $def($def.S, 'Object', { is: function is(x, y){ return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; } }); },{"./$.def":12}],49:[function(require,module,exports){ // 19.1.3.19 Object.setPrototypeOf(O, proto) var $def = require('./$.def'); $def($def.S, 'Object', {setPrototypeOf: require('./$.set-proto').set}); },{"./$.def":12,"./$.set-proto":26}],50:[function(require,module,exports){ var $ = require('./$') , $def = require('./$.def') , isObject = $.isObject , toObject = $.toObject; function wrapObjectMethod(METHOD, MODE){ var fn = ($.core.Object || {})[METHOD] || Object[METHOD] , f = 0 , o = {}; o[METHOD] = MODE == 1 ? function(it){ return isObject(it) ? fn(it) : it; } : MODE == 2 ? function(it){ return isObject(it) ? fn(it) : true; } : MODE == 3 ? function(it){ return isObject(it) ? fn(it) : false; } : MODE == 4 ? function getOwnPropertyDescriptor(it, key){ return fn(toObject(it), key); } : MODE == 5 ? function getPrototypeOf(it){ return fn(Object($.assertDefined(it))); } : function(it){ return fn(toObject(it)); }; try { fn('z'); } catch(e){ f = 1; } $def($def.S + $def.F * f, 'Object', o); } wrapObjectMethod('freeze', 1); wrapObjectMethod('seal', 1); wrapObjectMethod('preventExtensions', 1); wrapObjectMethod('isFrozen', 2); wrapObjectMethod('isSealed', 2); wrapObjectMethod('isExtensible', 3); wrapObjectMethod('getOwnPropertyDescriptor', 4); wrapObjectMethod('getPrototypeOf', 5); wrapObjectMethod('keys'); wrapObjectMethod('getOwnPropertyNames'); },{"./$":21,"./$.def":12}],51:[function(require,module,exports){ 'use strict'; // 19.1.3.6 Object.prototype.toString() var $ = require('./$') , cof = require('./$.cof') , tmp = {}; tmp[require('./$.wks')('toStringTag')] = 'z'; if($.FW && cof(tmp) != 'z')$.hide(Object.prototype, 'toString', function toString(){ return '[object ' + cof.classof(this) + ']'; }); },{"./$":21,"./$.cof":6,"./$.wks":32}],52:[function(require,module,exports){ 'use strict'; var $ = require('./$') , ctx = require('./$.ctx') , cof = require('./$.cof') , $def = require('./$.def') , assert = require('./$.assert') , forOf = require('./$.for-of') , setProto = require('./$.set-proto').set , species = require('./$.species') , SPECIES = require('./$.wks')('species') , RECORD = require('./$.uid').safe('record') , PROMISE = 'Promise' , global = $.g , process = global.process , asap = process && process.nextTick || require('./$.task').set , P = global[PROMISE] , isFunction = $.isFunction , isObject = $.isObject , assertFunction = assert.fn , assertObject = assert.obj , test; var useNative = isFunction(P) && isFunction(P.resolve) && P.resolve(test = new P(function(){})) == test; // actual Firefox has broken subclass support, test that function P2(x){ var self = new P(x); setProto(self, P2.prototype); return self; } if(useNative){ try { // protect against bad/buggy Object.setPrototype setProto(P2, P); P2.prototype = $.create(P.prototype, {constructor: {value: P2}}); if(!(P2.resolve(5).then(function(){}) instanceof P2)){ useNative = false; } } catch(e){ useNative = false; } } // helpers function getConstructor(C){ var S = assertObject(C)[SPECIES]; return S != undefined ? S : C; } function isThenable(it){ var then; if(isObject(it))then = it.then; return isFunction(then) ? then : false; } function notify(record){ var chain = record.c; if(chain.length)asap(function(){ var value = record.v , ok = record.s == 1 , i = 0; while(chain.length > i)!function(react){ var cb = ok ? react.ok : react.fail , ret, then; try { if(cb){ if(!ok)record.h = true; ret = cb === true ? value : cb(value); if(ret === react.P){ react.rej(TypeError('Promise-chain cycle')); } else if(then = isThenable(ret)){ then.call(ret, react.res, react.rej); } else react.res(ret); } else react.rej(value); } catch(err){ react.rej(err); } }(chain[i++]); chain.length = 0; }); } function isUnhandled(promise){ var record = promise[RECORD] , chain = record.a , i = 0 , react; if(record.h)return false; while(chain.length > i){ react = chain[i++]; if(react.fail || !isUnhandled(react.P))return false; } return true; } function $reject(value){ var record = this , promise; if(record.d)return; record.d = true; record = record.r || record; // unwrap record.v = value; record.s = 2; asap(function(){ setTimeout(function(){ if(isUnhandled(promise = record.p)){ if(cof(process) == 'process'){ process.emit('unhandledRejection', value, promise); } else if(global.console && isFunction(console.error)){ console.error('Unhandled promise rejection', value); } } }, 1); }); notify(record); } function $resolve(value){ var record = this , then, wrapper; if(record.d)return; record.d = true; record = record.r || record; // unwrap try { if(then = isThenable(value)){ wrapper = {r: record, d: false}; // wrap then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); } else { record.v = value; record.s = 1; notify(record); } } catch(err){ $reject.call(wrapper || {r: record, d: false}, err); // wrap } } // constructor polyfill if(!useNative){ // 25.4.3.1 Promise(executor) P = function Promise(executor){ assertFunction(executor); var record = { p: assert.inst(this, P, PROMISE), // <- promise c: [], // <- awaiting reactions a: [], // <- all reactions s: 0, // <- state d: false, // <- done v: undefined, // <- value h: false // <- handled rejection }; $.hide(this, RECORD, record); try { executor(ctx($resolve, record, 1), ctx($reject, record, 1)); } catch(err){ $reject.call(record, err); } }; $.mix(P.prototype, { // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) then: function then(onFulfilled, onRejected){ var S = assertObject(assertObject(this).constructor)[SPECIES]; var react = { ok: isFunction(onFulfilled) ? onFulfilled : true, fail: isFunction(onRejected) ? onRejected : false }; var promise = react.P = new (S != undefined ? S : P)(function(res, rej){ react.res = assertFunction(res); react.rej = assertFunction(rej); }); var record = this[RECORD]; record.a.push(react); record.c.push(react); record.s && notify(record); return promise; }, // 25.4.5.1 Promise.prototype.catch(onRejected) 'catch': function(onRejected){ return this.then(undefined, onRejected); } }); } // export $def($def.G + $def.W + $def.F * !useNative, {Promise: P}); cof.set(P, PROMISE); species(P); species($.core[PROMISE]); // for wrapper // statics $def($def.S + $def.F * !useNative, PROMISE, { // 25.4.4.5 Promise.reject(r) reject: function reject(r){ return new (getConstructor(this))(function(res, rej){ rej(r); }); }, // 25.4.4.6 Promise.resolve(x) resolve: function resolve(x){ return isObject(x) && RECORD in x && $.getProto(x) === this.prototype ? x : new (getConstructor(this))(function(res){ res(x); }); } }); $def($def.S + $def.F * !(useNative && require('./$.iter-detect')(function(iter){ P.all(iter)['catch'](function(){}); })), PROMISE, { // 25.4.4.1 Promise.all(iterable) all: function all(iterable){ var C = getConstructor(this) , values = []; return new C(function(res, rej){ forOf(iterable, false, values.push, values); var remaining = values.length , results = Array(remaining); if(remaining)$.each.call(values, function(promise, index){ C.resolve(promise).then(function(value){ results[index] = value; --remaining || res(results); }, rej); }); else res(results); }); }, // 25.4.4.4 Promise.race(iterable) race: function race(iterable){ var C = getConstructor(this); return new C(function(res, rej){ forOf(iterable, false, function(promise){ C.resolve(promise).then(res, rej); }); }); } }); },{"./$":21,"./$.assert":4,"./$.cof":6,"./$.ctx":11,"./$.def":12,"./$.for-of":14,"./$.iter-detect":19,"./$.set-proto":26,"./$.species":27,"./$.task":29,"./$.uid":30,"./$.wks":32}],53:[function(require,module,exports){ var $ = require('./$') , $def = require('./$.def') , setProto = require('./$.set-proto') , $iter = require('./$.iter') , ITER = require('./$.uid').safe('iter') , step = $iter.step , assert = require('./$.assert') , isObject = $.isObject , getDesc = $.getDesc , setDesc = $.setDesc , getProto = $.getProto , apply = Function.apply , assertObject = assert.obj , _isExtensible = Object.isExtensible || $.it; function Enumerate(iterated){ $.set(this, ITER, {o: iterated, k: undefined, i: 0}); } $iter.create(Enumerate, 'Object', function(){ var iter = this[ITER] , keys = iter.k , key; if(keys == undefined){ iter.k = keys = []; for(key in iter.o)keys.push(key); } do { if(iter.i >= keys.length)return step(1); } while(!((key = keys[iter.i++]) in iter.o)); return step(0, key); }); function wrap(fn){ return function(it){ assertObject(it); try { fn.apply(undefined, arguments); return true; } catch(e){ return false; } }; } function get(target, propertyKey/*, receiver*/){ var receiver = arguments.length < 3 ? target : arguments[2] , desc = getDesc(assertObject(target), propertyKey), proto; if(desc)return $.has(desc, 'value') ? desc.value : desc.get === undefined ? undefined : desc.get.call(receiver); return isObject(proto = getProto(target)) ? get(proto, propertyKey, receiver) : undefined; } function set(target, propertyKey, V/*, receiver*/){ var receiver = arguments.length < 4 ? target : arguments[3] , ownDesc = getDesc(assertObject(target), propertyKey) , existingDescriptor, proto; if(!ownDesc){ if(isObject(proto = getProto(target))){ return set(proto, propertyKey, V, receiver); } ownDesc = $.desc(0); } if($.has(ownDesc, 'value')){ if(ownDesc.writable === false || !isObject(receiver))return false; existingDescriptor = getDesc(receiver, propertyKey) || $.desc(0); existingDescriptor.value = V; setDesc(receiver, propertyKey, existingDescriptor); return true; } return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); } var reflect = { // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) apply: require('./$.ctx')(Function.call, apply, 3), // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) construct: function construct(target, argumentsList /*, newTarget*/){ var proto = assert.fn(arguments.length < 3 ? target : arguments[2]).prototype , instance = $.create(isObject(proto) ? proto : Object.prototype) , result = apply.call(target, instance, argumentsList); return isObject(result) ? result : instance; }, // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) defineProperty: wrap(setDesc), // 26.1.4 Reflect.deleteProperty(target, propertyKey) deleteProperty: function deleteProperty(target, propertyKey){ var desc = getDesc(assertObject(target), propertyKey); return desc && !desc.configurable ? false : delete target[propertyKey]; }, // 26.1.5 Reflect.enumerate(target) enumerate: function enumerate(target){ return new Enumerate(assertObject(target)); }, // 26.1.6 Reflect.get(target, propertyKey [, receiver]) get: get, // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){ return getDesc(assertObject(target), propertyKey); }, // 26.1.8 Reflect.getPrototypeOf(target) getPrototypeOf: function getPrototypeOf(target){ return getProto(assertObject(target)); }, // 26.1.9 Reflect.has(target, propertyKey) has: function has(target, propertyKey){ return propertyKey in target; }, // 26.1.10 Reflect.isExtensible(target) isExtensible: function isExtensible(target){ return !!_isExtensible(assertObject(target)); }, // 26.1.11 Reflect.ownKeys(target) ownKeys: require('./$.own-keys'), // 26.1.12 Reflect.preventExtensions(target) preventExtensions: wrap(Object.preventExtensions || $.it), // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) set: set }; // 26.1.14 Reflect.setPrototypeOf(target, proto) if(setProto)reflect.setPrototypeOf = function setPrototypeOf(target, proto){ setProto.check(target, proto); try { setProto.set(target, proto); return true; } catch(e){ return false; } }; $def($def.G, {Reflect: {}}); $def($def.S, 'Reflect', reflect); },{"./$":21,"./$.assert":4,"./$.ctx":11,"./$.def":12,"./$.iter":20,"./$.own-keys":23,"./$.set-proto":26,"./$.uid":30}],54:[function(require,module,exports){ var $ = require('./$') , cof = require('./$.cof') , RegExp = $.g.RegExp , Base = RegExp , proto = RegExp.prototype; function regExpBroken() { try { var a = /a/g; // "new" creates a new object if (a === new RegExp(a)) { return true; } // RegExp allows a regex with flags as the pattern return RegExp(/a/g, 'i') != '/a/i'; } catch(e) { return true; } } if($.FW && $.DESC){ if(regExpBroken()) { RegExp = function RegExp(pattern, flags){ return new Base(cof(pattern) == 'RegExp' ? pattern.source : pattern, flags === undefined ? pattern.flags : flags); }; $.each.call($.getNames(Base), function(key){ key in RegExp || $.setDesc(RegExp, key, { configurable: true, get: function(){ return Base[key]; }, set: function(it){ Base[key] = it; } }); }); proto.constructor = RegExp; RegExp.prototype = proto; $.hide($.g, 'RegExp', RegExp); } // 21.2.5.3 get RegExp.prototype.flags() if(/./g.flags != 'g')$.setDesc(proto, 'flags', { configurable: true, get: require('./$.replacer')(/^.*\/(\w*)$/, '$1') }); } require('./$.species')(RegExp); },{"./$":21,"./$.cof":6,"./$.replacer":25,"./$.species":27}],55:[function(require,module,exports){ 'use strict'; var strong = require('./$.collection-strong'); // 23.2 Set Objects require('./$.collection')('Set', { // 23.2.3.1 Set.prototype.add(value) add: function add(value){ return strong.def(this, value = value === 0 ? 0 : value, value); } }, strong); },{"./$.collection":10,"./$.collection-strong":7}],56:[function(require,module,exports){ var $def = require('./$.def'); $def($def.P, 'String', { // 21.1.3.3 String.prototype.codePointAt(pos) codePointAt: require('./$.string-at')(false) }); },{"./$.def":12,"./$.string-at":28}],57:[function(require,module,exports){ 'use strict'; var $ = require('./$') , cof = require('./$.cof') , $def = require('./$.def') , toLength = $.toLength; $def($def.P, 'String', { // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) endsWith: function endsWith(searchString /*, endPosition = @length */){ if(cof(searchString) == 'RegExp')throw TypeError(); var that = String($.assertDefined(this)) , endPosition = arguments[1] , len = toLength(that.length) , end = endPosition === undefined ? len : Math.min(toLength(endPosition), len); searchString += ''; return that.slice(end - searchString.length, end) === searchString; } }); },{"./$":21,"./$.cof":6,"./$.def":12}],58:[function(require,module,exports){ var $def = require('./$.def') , toIndex = require('./$').toIndex , fromCharCode = String.fromCharCode; $def($def.S, 'String', { // 21.1.2.2 String.fromCodePoint(...codePoints) fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars var res = [] , len = arguments.length , i = 0 , code; while(len > i){ code = +arguments[i++]; if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point'); res.push(code < 0x10000 ? fromCharCode(code) : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) ); } return res.join(''); } }); },{"./$":21,"./$.def":12}],59:[function(require,module,exports){ 'use strict'; var $ = require('./$') , cof = require('./$.cof') , $def = require('./$.def'); $def($def.P, 'String', { // 21.1.3.7 String.prototype.includes(searchString, position = 0) includes: function includes(searchString /*, position = 0 */){ if(cof(searchString) == 'RegExp')throw TypeError(); return !!~String($.assertDefined(this)).indexOf(searchString, arguments[1]); } }); },{"./$":21,"./$.cof":6,"./$.def":12}],60:[function(require,module,exports){ var set = require('./$').set , at = require('./$.string-at')(true) , ITER = require('./$.uid').safe('iter') , $iter = require('./$.iter') , step = $iter.step; // 21.1.3.27 String.prototype[@@iterator]() require('./$.iter-define')(String, 'String', function(iterated){ set(this, ITER, {o: String(iterated), i: 0}); // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function(){ var iter = this[ITER] , O = iter.o , index = iter.i , point; if(index >= O.length)return step(1); point = at.call(O, index); iter.i += point.length; return step(0, point); }); },{"./$":21,"./$.iter":20,"./$.iter-define":18,"./$.string-at":28,"./$.uid":30}],61:[function(require,module,exports){ var $ = require('./$') , $def = require('./$.def'); $def($def.S, 'String', { // 21.1.2.4 String.raw(callSite, ...substitutions) raw: function raw(callSite){ var tpl = $.toObject(callSite.raw) , len = $.toLength(tpl.length) , sln = arguments.length , res = [] , i = 0; while(len > i){ res.push(String(tpl[i++])); if(i < sln)res.push(String(arguments[i])); } return res.join(''); } }); },{"./$":21,"./$.def":12}],62:[function(require,module,exports){ 'use strict'; var $ = require('./$') , $def = require('./$.def'); $def($def.P, 'String', { // 21.1.3.13 String.prototype.repeat(count) repeat: function repeat(count){ var str = String($.assertDefined(this)) , res = '' , n = $.toInteger(count); if(n < 0 || n == Infinity)throw RangeError("Count can't be negative"); for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str; return res; } }); },{"./$":21,"./$.def":12}],63:[function(require,module,exports){ 'use strict'; var $ = require('./$') , cof = require('./$.cof') , $def = require('./$.def'); $def($def.P, 'String', { // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) startsWith: function startsWith(searchString /*, position = 0 */){ if(cof(searchString) == 'RegExp')throw TypeError(); var that = String($.assertDefined(this)) , index = $.toLength(Math.min(arguments[1], that.length)); searchString += ''; return that.slice(index, index + searchString.length) === searchString; } }); },{"./$":21,"./$.cof":6,"./$.def":12}],64:[function(require,module,exports){ 'use strict'; // ECMAScript 6 symbols shim var $ = require('./$') , setTag = require('./$.cof').set , uid = require('./$.uid') , $def = require('./$.def') , keyOf = require('./$.keyof') , enumKeys = require('./$.enum-keys') , assertObject = require('./$.assert').obj , has = $.has , $create = $.create , getDesc = $.getDesc , setDesc = $.setDesc , desc = $.desc , getNames = $.getNames , toObject = $.toObject , Symbol = $.g.Symbol , setter = false , TAG = uid('tag') , HIDDEN = uid('hidden') , SymbolRegistry = {} , AllSymbols = {} , useNative = $.isFunction(Symbol); function wrap(tag){ var sym = AllSymbols[tag] = $.set($create(Symbol.prototype), TAG, tag); $.DESC && setter && setDesc(Object.prototype, tag, { configurable: true, set: function(value){ if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; setDesc(this, tag, desc(1, value)); } }); return sym; } function defineProperty(it, key, D){ if(D && has(AllSymbols, key)){ if(!D.enumerable){ if(!has(it, HIDDEN))setDesc(it, HIDDEN, desc(1, {})); it[HIDDEN][key] = true; } else { if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; D.enumerable = false; } } return setDesc(it, key, D); } function defineProperties(it, P){ assertObject(it); var keys = enumKeys(P = toObject(P)) , i = 0 , l = keys.length , key; while(l > i)defineProperty(it, key = keys[i++], P[key]); return it; } function create(it, P){ return P === undefined ? $create(it) : defineProperties($create(it), P); } function getOwnPropertyDescriptor(it, key){ var D = getDesc(it = toObject(it), key); if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; return D; } function getOwnPropertyNames(it){ var names = getNames(toObject(it)) , result = [] , i = 0 , key; while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key); return result; } function getOwnPropertySymbols(it){ var names = getNames(toObject(it)) , result = [] , i = 0 , key; while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]); return result; } // 19.4.1.1 Symbol([description]) if(!useNative){ Symbol = function Symbol(description){ if(this instanceof Symbol)throw TypeError('Symbol is not a constructor'); return wrap(uid(description)); }; $.hide(Symbol.prototype, 'toString', function(){ return this[TAG]; }); $.create = create; $.setDesc = defineProperty; $.getDesc = getOwnPropertyDescriptor; $.setDescs = defineProperties; $.getNames = getOwnPropertyNames; $.getSymbols = getOwnPropertySymbols; } var symbolStatics = { // 19.4.2.1 Symbol.for(key) 'for': function(key){ return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = Symbol(key); }, // 19.4.2.5 Symbol.keyFor(sym) keyFor: function keyFor(key){ return keyOf(SymbolRegistry, key); }, useSetter: function(){ setter = true; }, useSimple: function(){ setter = false; } }; // 19.4.2.2 Symbol.hasInstance // 19.4.2.3 Symbol.isConcatSpreadable // 19.4.2.4 Symbol.iterator // 19.4.2.6 Symbol.match // 19.4.2.8 Symbol.replace // 19.4.2.9 Symbol.search // 19.4.2.10 Symbol.species // 19.4.2.11 Symbol.split // 19.4.2.12 Symbol.toPrimitive // 19.4.2.13 Symbol.toStringTag // 19.4.2.14 Symbol.unscopables $.each.call(( 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' + 'species,split,toPrimitive,toStringTag,unscopables' ).split(','), function(it){ var sym = require('./$.wks')(it); symbolStatics[it] = useNative ? sym : wrap(sym); } ); setter = true; $def($def.G + $def.W, {Symbol: Symbol}); $def($def.S, 'Symbol', symbolStatics); $def($def.S + $def.F * !useNative, 'Object', { // 19.1.2.2 Object.create(O [, Properties]) create: create, // 19.1.2.4 Object.defineProperty(O, P, Attributes) defineProperty: defineProperty, // 19.1.2.3 Object.defineProperties(O, Properties) defineProperties: defineProperties, // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) getOwnPropertyDescriptor: getOwnPropertyDescriptor, // 19.1.2.7 Object.getOwnPropertyNames(O) getOwnPropertyNames: getOwnPropertyNames, // 19.1.2.8 Object.getOwnPropertySymbols(O) getOwnPropertySymbols: getOwnPropertySymbols }); // 19.4.3.5 Symbol.prototype[@@toStringTag] setTag(Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag] setTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag] setTag($.g.JSON, 'JSON', true); },{"./$":21,"./$.assert":4,"./$.cof":6,"./$.def":12,"./$.enum-keys":13,"./$.keyof":22,"./$.uid":30,"./$.wks":32}],65:[function(require,module,exports){ 'use strict'; var $ = require('./$') , weak = require('./$.collection-weak') , leakStore = weak.leakStore , ID = weak.ID , WEAK = weak.WEAK , has = $.has , isObject = $.isObject , isFrozen = Object.isFrozen || $.core.Object.isFrozen , tmp = {}; // 23.3 WeakMap Objects var WeakMap = require('./$.collection')('WeakMap', { // 23.3.3.3 WeakMap.prototype.get(key) get: function get(key){ if(isObject(key)){ if(isFrozen(key))return leakStore(this).get(key); if(has(key, WEAK))return key[WEAK][this[ID]]; } }, // 23.3.3.5 WeakMap.prototype.set(key, value) set: function set(key, value){ return weak.def(this, key, value); } }, weak, true, true); // IE11 WeakMap frozen keys fix if($.FW && new WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){ $.each.call(['delete', 'has', 'get', 'set'], function(key){ var method = WeakMap.prototype[key]; WeakMap.prototype[key] = function(a, b){ // store frozen objects on leaky map if(isObject(a) && isFrozen(a)){ var result = leakStore(this)[key](a, b); return key == 'set' ? this : result; // store all the rest on native weakmap } return method.call(this, a, b); }; }); } },{"./$":21,"./$.collection":10,"./$.collection-weak":9}],66:[function(require,module,exports){ 'use strict'; var weak = require('./$.collection-weak'); // 23.4 WeakSet Objects require('./$.collection')('WeakSet', { // 23.4.3.1 WeakSet.prototype.add(value) add: function add(value){ return weak.def(this, value, true); } }, weak, false, true); },{"./$.collection":10,"./$.collection-weak":9}],67:[function(require,module,exports){ // https://github.com/domenic/Array.prototype.includes var $def = require('./$.def'); $def($def.P, 'Array', { includes: require('./$.array-includes')(true) }); require('./$.unscope')('includes'); },{"./$.array-includes":2,"./$.def":12,"./$.unscope":31}],68:[function(require,module,exports){ // https://github.com/DavidBruant/Map-Set.prototype.toJSON require('./$.collection-to-json')('Map'); },{"./$.collection-to-json":8}],69:[function(require,module,exports){ // https://gist.github.com/WebReflection/9353781 var $ = require('./$') , $def = require('./$.def') , ownKeys = require('./$.own-keys'); $def($def.S, 'Object', { getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){ var O = $.toObject(object) , result = {}; $.each.call(ownKeys(O), function(key){ $.setDesc(result, key, $.desc(0, $.getDesc(O, key))); }); return result; } }); },{"./$":21,"./$.def":12,"./$.own-keys":23}],70:[function(require,module,exports){ // http://goo.gl/XkBrjD var $ = require('./$') , $def = require('./$.def'); function createObjectToArray(isEntries){ return function(object){ var O = $.toObject(object) , keys = $.getKeys(O) , length = keys.length , i = 0 , result = Array(length) , key; if(isEntries)while(length > i)result[i] = [key = keys[i++], O[key]]; else while(length > i)result[i] = O[keys[i++]]; return result; }; } $def($def.S, 'Object', { values: createObjectToArray(false), entries: createObjectToArray(true) }); },{"./$":21,"./$.def":12}],71:[function(require,module,exports){ // https://gist.github.com/kangax/9698100 var $def = require('./$.def'); $def($def.S, 'RegExp', { escape: require('./$.replacer')(/([\\\-[\]{}()*+?.,^$|])/g, '\\$1', true) }); },{"./$.def":12,"./$.replacer":25}],72:[function(require,module,exports){ // https://github.com/DavidBruant/Map-Set.prototype.toJSON require('./$.collection-to-json')('Set'); },{"./$.collection-to-json":8}],73:[function(require,module,exports){ // https://github.com/mathiasbynens/String.prototype.at var $def = require('./$.def'); $def($def.P, 'String', { at: require('./$.string-at')(true) }); },{"./$.def":12,"./$.string-at":28}],74:[function(require,module,exports){ // JavaScript 1.6 / Strawman array statics shim var $ = require('./$') , $def = require('./$.def') , $Array = $.core.Array || Array , statics = {}; function setStatics(keys, length){ $.each.call(keys.split(','), function(key){ if(length == undefined && key in $Array)statics[key] = $Array[key]; else if(key in [])statics[key] = require('./$.ctx')(Function.call, [][key], length); }); } setStatics('pop,reverse,shift,keys,values,entries', 1); setStatics('indexOf,every,some,forEach,map,filter,find,findIndex,includes', 3); setStatics('join,slice,concat,push,splice,unshift,sort,lastIndexOf,' + 'reduce,reduceRight,copyWithin,fill,turn'); $def($def.S, 'Array', statics); },{"./$":21,"./$.ctx":11,"./$.def":12}],75:[function(require,module,exports){ require('./es6.array.iterator'); var $ = require('./$') , Iterators = require('./$.iter').Iterators , ITERATOR = require('./$.wks')('iterator') , ArrayValues = Iterators.Array , NodeList = $.g.NodeList; if($.FW && NodeList && !(ITERATOR in NodeList.prototype)){ $.hide(NodeList.prototype, ITERATOR, ArrayValues); } Iterators.NodeList = ArrayValues; },{"./$":21,"./$.iter":20,"./$.wks":32,"./es6.array.iterator":39}],76:[function(require,module,exports){ var $def = require('./$.def') , $task = require('./$.task'); $def($def.G + $def.B, { setImmediate: $task.set, clearImmediate: $task.clear }); },{"./$.def":12,"./$.task":29}],77:[function(require,module,exports){ // ie9- setTimeout & setInterval additional parameters fix var $ = require('./$') , $def = require('./$.def') , invoke = require('./$.invoke') , partial = require('./$.partial') , navigator = $.g.navigator , MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check function wrap(set){ return MSIE ? function(fn, time /*, ...args */){ return set(invoke( partial, [].slice.call(arguments, 2), $.isFunction(fn) ? fn : Function(fn) ), time); } : set; } $def($def.G + $def.B + $def.F * MSIE, { setTimeout: wrap($.g.setTimeout), setInterval: wrap($.g.setInterval) }); },{"./$":21,"./$.def":12,"./$.invoke":16,"./$.partial":24}],78:[function(require,module,exports){ require('./modules/es5'); require('./modules/es6.symbol'); require('./modules/es6.object.assign'); require('./modules/es6.object.is'); require('./modules/es6.object.set-prototype-of'); require('./modules/es6.object.to-string'); require('./modules/es6.object.statics-accept-primitives'); require('./modules/es6.function.name'); require('./modules/es6.number.constructor'); require('./modules/es6.number.statics'); require('./modules/es6.math'); require('./modules/es6.string.from-code-point'); require('./modules/es6.string.raw'); require('./modules/es6.string.iterator'); require('./modules/es6.string.code-point-at'); require('./modules/es6.string.ends-with'); require('./modules/es6.string.includes'); require('./modules/es6.string.repeat'); require('./modules/es6.string.starts-with'); require('./modules/es6.array.from'); require('./modules/es6.array.of'); require('./modules/es6.array.iterator'); require('./modules/es6.array.species'); require('./modules/es6.array.copy-within'); require('./modules/es6.array.fill'); require('./modules/es6.array.find'); require('./modules/es6.array.find-index'); require('./modules/es6.regexp'); require('./modules/es6.promise'); require('./modules/es6.map'); require('./modules/es6.set'); require('./modules/es6.weak-map'); require('./modules/es6.weak-set'); require('./modules/es6.reflect'); require('./modules/es7.array.includes'); require('./modules/es7.string.at'); require('./modules/es7.regexp.escape'); require('./modules/es7.object.get-own-property-descriptors'); require('./modules/es7.object.to-array'); require('./modules/es7.map.to-json'); require('./modules/es7.set.to-json'); require('./modules/js.array.statics'); require('./modules/web.timers'); require('./modules/web.immediate'); require('./modules/web.dom.iterable'); module.exports = require('./modules/$').core; },{"./modules/$":21,"./modules/es5":33,"./modules/es6.array.copy-within":34,"./modules/es6.array.fill":35,"./modules/es6.array.find":37,"./modules/es6.array.find-index":36,"./modules/es6.array.from":38,"./modules/es6.array.iterator":39,"./modules/es6.array.of":40,"./modules/es6.array.species":41,"./modules/es6.function.name":42,"./modules/es6.map":43,"./modules/es6.math":44,"./modules/es6.number.constructor":45,"./modules/es6.number.statics":46,"./modules/es6.object.assign":47,"./modules/es6.object.is":48,"./modules/es6.object.set-prototype-of":49,"./modules/es6.object.statics-accept-primitives":50,"./modules/es6.object.to-string":51,"./modules/es6.promise":52,"./modules/es6.reflect":53,"./modules/es6.regexp":54,"./modules/es6.set":55,"./modules/es6.string.code-point-at":56,"./modules/es6.string.ends-with":57,"./modules/es6.string.from-code-point":58,"./modules/es6.string.includes":59,"./modules/es6.string.iterator":60,"./modules/es6.string.raw":61,"./modules/es6.string.repeat":62,"./modules/es6.string.starts-with":63,"./modules/es6.symbol":64,"./modules/es6.weak-map":65,"./modules/es6.weak-set":66,"./modules/es7.array.includes":67,"./modules/es7.map.to-json":68,"./modules/es7.object.get-own-property-descriptors":69,"./modules/es7.object.to-array":70,"./modules/es7.regexp.escape":71,"./modules/es7.set.to-json":72,"./modules/es7.string.at":73,"./modules/js.array.statics":74,"./modules/web.dom.iterable":75,"./modules/web.immediate":76,"./modules/web.timers":77}],79:[function(require,module,exports){ (function (global){ /** * Copyright (c) 2014, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * https://raw.github.com/facebook/regenerator/master/LICENSE file. An * additional grant of patent rights can be found in the PATENTS file in * the same directory. */ !(function(global) { "use strict"; var hasOwn = Object.prototype.hasOwnProperty; var undefined; // More compressible than void 0. var iteratorSymbol = typeof Symbol === "function" && Symbol.iterator || "@@iterator"; var inModule = typeof module === "object"; var runtime = global.regeneratorRuntime; if (runtime) { if (inModule) { // If regeneratorRuntime is defined globally and we're in a module, // make the exports object identical to regeneratorRuntime. module.exports = runtime; } // Don't bother evaluating the rest of this file if the runtime was // already defined globally. return; } // Define the runtime globally (as expected by generated code) as either // module.exports (if we're in a module) or a new, empty object. runtime = global.regeneratorRuntime = inModule ? module.exports : {}; function wrap(innerFn, outerFn, self, tryLocsList) { // If outerFn provided, then outerFn.prototype instanceof Generator. var generator = Object.create((outerFn || Generator).prototype); generator._invoke = makeInvokeMethod( innerFn, self || null, new Context(tryLocsList || []) ); return generator; } runtime.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion // record like context.tryEntries[i].completion. This interface could // have been (and was previously) designed to take a closure to be // invoked without arguments, but in all the cases we care about we // already have an existing method we want to call, so there's no need // to create a new function object. We can even get away with assuming // the method takes exactly one argument, since that happens to be true // in every case, so we don't have to touch the arguments object. The // only additional allocation required is the completion record, which // has a stable shape and so hopefully should be cheap to allocate. function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } var GenStateSuspendedStart = "suspendedStart"; var GenStateSuspendedYield = "suspendedYield"; var GenStateExecuting = "executing"; var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as // breaking out of the dispatch switch statement. var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and // .constructor.prototype properties for functions that return Generator // objects. For full spec compliance, you may wish to configure your // minifier not to mangle the names of these two functions. function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype; GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; GeneratorFunctionPrototype.constructor = GeneratorFunction; GeneratorFunction.displayName = "GeneratorFunction"; runtime.isGeneratorFunction = function(genFun) { var ctor = typeof genFun === "function" && genFun.constructor; return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can // do is to check its .name property. (ctor.displayName || ctor.name) === "GeneratorFunction" : false; }; runtime.mark = function(genFun) { genFun.__proto__ = GeneratorFunctionPrototype; genFun.prototype = Object.create(Gp); return genFun; }; runtime.async = function(innerFn, outerFn, self, tryLocsList) { return new Promise(function(resolve, reject) { var generator = wrap(innerFn, outerFn, self, tryLocsList); var callNext = step.bind(generator, "next"); var callThrow = step.bind(generator, "throw"); function step(method, arg) { var record = tryCatch(generator[method], generator, arg); if (record.type === "throw") { reject(record.arg); return; } var info = record.arg; if (info.done) { resolve(info.value); } else { Promise.resolve(info.value).then(callNext, callThrow); } } callNext(); }); }; function makeInvokeMethod(innerFn, self, context) { var state = GenStateSuspendedStart; return function invoke(method, arg) { if (state === GenStateExecuting) { throw new Error("Generator is already running"); } if (state === GenStateCompleted) { // Be forgiving, per 25.3.3.3.3 of the spec: // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume return doneResult(); } while (true) { var delegate = context.delegate; if (delegate) { if (method === "return" || (method === "throw" && delegate.iterator[method] === undefined)) { // A return or throw (when the delegate iterator has no throw // method) always terminates the yield* loop. context.delegate = null; // If the delegate iterator has a return method, give it a // chance to clean up. var returnMethod = delegate.iterator["return"]; if (returnMethod) { var record = tryCatch(returnMethod, delegate.iterator, arg); if (record.type === "throw") { // If the return method threw an exception, let that // exception prevail over the original return or throw. method = "throw"; arg = record.arg; continue; } } if (method === "return") { // Continue with the outer return, now that the delegate // iterator has been terminated. continue; } } var record = tryCatch( delegate.iterator[method], delegate.iterator, arg ); if (record.type === "throw") { context.delegate = null; // Like returning generator.throw(uncaught), but without the // overhead of an extra function call. method = "throw"; arg = record.arg; continue; } // Delegate generator ran and handled its own exceptions so // regardless of what the method was, we continue as if it is // "next" with an undefined arg. method = "next"; arg = undefined; var info = record.arg; if (info.done) { context[delegate.resultName] = info.value; context.next = delegate.nextLoc; } else { state = GenStateSuspendedYield; return info; } context.delegate = null; } if (method === "next") { if (state === GenStateSuspendedYield) { context.sent = arg; } else { delete context.sent; } } else if (method === "throw") { if (state === GenStateSuspendedStart) { state = GenStateCompleted; throw arg; } if (context.dispatchException(arg)) { // If the dispatched exception was caught by a catch block, // then let that catch block handle the exception normally. method = "next"; arg = undefined; } } else if (method === "return") { context.abrupt("return", arg); } state = GenStateExecuting; var record = tryCatch(innerFn, self, context); if (record.type === "normal") { // If an exception is thrown from innerFn, we leave state === // GenStateExecuting and loop back for another invocation. state = context.done ? GenStateCompleted : GenStateSuspendedYield; var info = { value: record.arg, done: context.done }; if (record.arg === ContinueSentinel) { if (context.delegate && method === "next") { // Deliberately forget the last sent value so that we don't // accidentally pass it on to the delegate. arg = undefined; } } else { return info; } } else if (record.type === "throw") { state = GenStateCompleted; // Dispatch the exception by looping back around to the // context.dispatchException(arg) call above. method = "throw"; arg = record.arg; } } }; } function defineGeneratorMethod(method) { Gp[method] = function(arg) { return this._invoke(method, arg); }; } defineGeneratorMethod("next"); defineGeneratorMethod("throw"); defineGeneratorMethod("return"); Gp[iteratorSymbol] = function() { return this; }; Gp.toString = function() { return "[object Generator]"; }; function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; if (1 in locs) { entry.catchLoc = locs[1]; } if (2 in locs) { entry.finallyLoc = locs[2]; entry.afterLoc = locs[3]; } this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal"; delete record.arg; entry.completion = record; } function Context(tryLocsList) { // The root entry object (effectively a try statement without a catch // or a finally block) gives us a place to store values thrown from // locations where there is no enclosing try statement. this.tryEntries = [{ tryLoc: "root" }]; tryLocsList.forEach(pushTryEntry, this); this.reset(); } runtime.keys = function(object) { var keys = []; for (var key in object) { keys.push(key); } keys.reverse(); // Rather than returning an object with a next method, we keep // things simple and return the next function itself. return function next() { while (keys.length) { var key = keys.pop(); if (key in object) { next.value = key; next.done = false; return next; } } // To avoid creating an additional object, we just hang the .value // and .done properties off the next function object itself. This // also ensures that the minifier will not anonymize the function. next.done = true; return next; }; }; function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) { return iteratorMethod.call(iterable); } if (typeof iterable.next === "function") { return iterable; } if (!isNaN(iterable.length)) { var i = -1, next = function next() { while (++i < iterable.length) { if (hasOwn.call(iterable, i)) { next.value = iterable[i]; next.done = false; return next; } } next.value = undefined; next.done = true; return next; }; return next.next = next; } } // Return an iterator with no values. return { next: doneResult }; } runtime.values = values; function doneResult() { return { value: undefined, done: true }; } Context.prototype = { constructor: Context, reset: function() { this.prev = 0; this.next = 0; this.sent = undefined; this.done = false; this.delegate = null; this.tryEntries.forEach(resetTryEntry); // Pre-initialize at least 20 temporary variables to enable hidden // class optimizations for simple generators. for (var tempIndex = 0, tempName; hasOwn.call(this, tempName = "t" + tempIndex) || tempIndex < 20; ++tempIndex) { this[tempName] = null; } }, stop: function() { this.done = true; var rootEntry = this.tryEntries[0]; var rootRecord = rootEntry.completion; if (rootRecord.type === "throw") { throw rootRecord.arg; } return this.rval; }, dispatchException: function(exception) { if (this.done) { throw exception; } var context = this; function handle(loc, caught) { record.type = "throw"; record.arg = exception; context.next = loc; return !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; var record = entry.completion; if (entry.tryLoc === "root") { // Exception thrown outside of any try block that could handle // it, so set the completion value of the entire function to // throw the exception. return handle("end"); } if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"); var hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) { return handle(entry.catchLoc, true); } else if (this.prev < entry.finallyLoc) { return handle(entry.finallyLoc); } } else if (hasCatch) { if (this.prev < entry.catchLoc) { return handle(entry.catchLoc, true); } } else if (hasFinally) { if (this.prev < entry.finallyLoc) { return handle(entry.finallyLoc); } } else { throw new Error("try statement without catch or finally"); } } } }, abrupt: function(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { // Ignore the finally entry if control is not jumping to a // location outside the try/catch block. finallyEntry = null; } var record = finallyEntry ? finallyEntry.completion : {}; record.type = type; record.arg = arg; if (finallyEntry) { this.next = finallyEntry.finallyLoc; } else { this.complete(record); } return ContinueSentinel; }, complete: function(record, afterLoc) { if (record.type === "throw") { throw record.arg; } if (record.type === "break" || record.type === "continue") { this.next = record.arg; } else if (record.type === "return") { this.rval = record.arg; this.next = "end"; } else if (record.type === "normal" && afterLoc) { this.next = afterLoc; } return ContinueSentinel; }, finish: function(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) { return this.complete(entry.completion, entry.afterLoc); } } }, "catch": function(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if (record.type === "throw") { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } // The context.catch method must only be called with a location // argument that corresponds to a known catch block. throw new Error("illegal catch attempt"); }, delegateYield: function(iterable, resultName, nextLoc) { this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }; return ContinueSentinel; } }; })( // Among the various tricks for obtaining a reference to the global // object, this seems to be the most reliable technique that does not // use indirect eval (which violates Content Security Policy). typeof global === "object" ? global : typeof window === "object" ? window : typeof self === "object" ? self : this ); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{}]},{},[1]);
src/components/custom-components/System/Spinner/SpinnerGlobal.js
ArtyomVolkov/music-search
import React, { Component } from 'react'; import { connect } from 'react-redux'; // Components import { CircularProgress } from 'material-ui'; // Styles import './SpinnerGlobal.scss'; @connect( state => ({ spinner: state.system.spinner }), dispatch => ({}) ) class SpinnerGlobal extends Component { render () { const { spinner } = this.props; return ( <div className={`global-spinner ${spinner ? 'active' : ''}`}> {spinner && <div className="spinner"> <CircularProgress size={70} thickness={3}/> </div> } </div> ); } } export default SpinnerGlobal;
static/assets/js/react.min.js
ghophp/buildbot-dashboard
/** * React v0.14.2 * * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.React=e()}}(function(){return function e(t,n,r){function o(i,u){if(!n[i]){if(!t[i]){var s="function"==typeof require&&require;if(!u&&s)return s(i,!0);if(a)return a(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[i]={exports:{}};t[i][0].call(c.exports,function(e){var n=t[i][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[i].exports}for(var a="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}({1:[function(e,t,n){"use strict";var r=e(35),o=e(45),a=e(61),i=e(23),u=e(104),s={};i(s,a),i(s,{findDOMNode:u("findDOMNode","ReactDOM","react-dom",r,r.findDOMNode),render:u("render","ReactDOM","react-dom",r,r.render),unmountComponentAtNode:u("unmountComponentAtNode","ReactDOM","react-dom",r,r.unmountComponentAtNode),renderToString:u("renderToString","ReactDOMServer","react-dom/server",o,o.renderToString),renderToStaticMarkup:u("renderToStaticMarkup","ReactDOMServer","react-dom/server",o,o.renderToStaticMarkup)}),s.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=r,t.exports=s},{104:104,23:23,35:35,45:45,61:61}],2:[function(e,t,n){"use strict";var r=e(63),o=e(106),a=e(136),i={componentDidMount:function(){this.props.autoFocus&&a(o(this))}},u={Mixin:i,focusDOMComponent:function(){a(r.getNode(this._rootNodeID))}};t.exports=u},{106:106,136:136,63:63}],3:[function(e,t,n){"use strict";function r(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function o(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function a(e){switch(e){case w.topCompositionStart:return R.compositionStart;case w.topCompositionEnd:return R.compositionEnd;case w.topCompositionUpdate:return R.compositionUpdate}}function i(e,t){return e===w.topKeyDown&&t.keyCode===_}function u(e,t){switch(e){case w.topKeyUp:return-1!==b.indexOf(t.keyCode);case w.topKeyDown:return t.keyCode!==_;case w.topKeyPress:case w.topMouseDown:case w.topBlur:return!0;default:return!1}}function s(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function l(e,t,n,r,o){var l,c;if(E?l=a(e):S?u(e,r)&&(l=R.compositionEnd):i(e,r)&&(l=R.compositionStart),!l)return null;M&&(S||l!==R.compositionStart?l===R.compositionEnd&&S&&(c=S.getData()):S=m.getPooled(t));var p=g.getPooled(l,n,r,o);if(c)p.data=c;else{var d=s(r);null!==d&&(p.data=d)}return h.accumulateTwoPhaseDispatches(p),p}function c(e,t){switch(e){case w.topCompositionEnd:return s(t);case w.topKeyPress:var n=t.which;return n!==N?null:(I=!0,P);case w.topTextInput:var r=t.data;return r===P&&I?null:r;default:return null}}function p(e,t){if(S){if(e===w.topCompositionEnd||u(e,t)){var n=S.getData();return m.release(S),S=null,n}return null}switch(e){case w.topPaste:return null;case w.topKeyPress:return t.which&&!o(t)?String.fromCharCode(t.which):null;case w.topCompositionEnd:return M?null:t.data;default:return null}}function d(e,t,n,r,o){var a;if(a=D?c(e,r):p(e,r),!a)return null;var i=y.getPooled(R.beforeInput,n,r,o);return i.data=a,h.accumulateTwoPhaseDispatches(i),i}var f=e(15),h=e(19),v=e(128),m=e(20),g=e(88),y=e(92),C=e(146),b=[9,13,27,32],_=229,E=v.canUseDOM&&"CompositionEvent"in window,x=null;v.canUseDOM&&"documentMode"in document&&(x=document.documentMode);var D=v.canUseDOM&&"TextEvent"in window&&!x&&!r(),M=v.canUseDOM&&(!E||x&&x>8&&11>=x),N=32,P=String.fromCharCode(N),w=f.topLevelTypes,R={beforeInput:{phasedRegistrationNames:{bubbled:C({onBeforeInput:null}),captured:C({onBeforeInputCapture:null})},dependencies:[w.topCompositionEnd,w.topKeyPress,w.topTextInput,w.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:C({onCompositionEnd:null}),captured:C({onCompositionEndCapture:null})},dependencies:[w.topBlur,w.topCompositionEnd,w.topKeyDown,w.topKeyPress,w.topKeyUp,w.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:C({onCompositionStart:null}),captured:C({onCompositionStartCapture:null})},dependencies:[w.topBlur,w.topCompositionStart,w.topKeyDown,w.topKeyPress,w.topKeyUp,w.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:C({onCompositionUpdate:null}),captured:C({onCompositionUpdateCapture:null})},dependencies:[w.topBlur,w.topCompositionUpdate,w.topKeyDown,w.topKeyPress,w.topKeyUp,w.topMouseDown]}},I=!1,S=null,T={eventTypes:R,extractEvents:function(e,t,n,r,o){return[l(e,t,n,r,o),d(e,t,n,r,o)]}};t.exports=T},{128:128,146:146,15:15,19:19,20:20,88:88,92:92}],4:[function(e,t,n){"use strict";function r(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var o={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0},a=["Webkit","ms","Moz","O"];Object.keys(o).forEach(function(e){a.forEach(function(t){o[r(t,e)]=o[e]})});var i={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},u={isUnitlessNumber:o,shorthandPropertyExpansions:i};t.exports=u},{}],5:[function(e,t,n){"use strict";var r=e(4),o=e(128),a=e(69),i=(e(130),e(103)),u=e(141),s=e(148),l=(e(151),s(function(e){return u(e)})),c=!1,p="cssFloat";if(o.canUseDOM){var d=document.createElement("div").style;try{d.font=""}catch(f){c=!0}void 0===document.documentElement.style.cssFloat&&(p="styleFloat")}var h={createMarkupForStyles:function(e){var t="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];null!=r&&(t+=l(n)+":",t+=i(n,r)+";")}return t||null},setValueForStyles:function(e,t){var n=e.style;for(var o in t)if(t.hasOwnProperty(o)){var a=i(o,t[o]);if("float"===o&&(o=p),a)n[o]=a;else{var u=c&&r.shorthandPropertyExpansions[o];if(u)for(var s in u)n[s]="";else n[o]=""}}}};a.measureMethods(h,"CSSPropertyOperations",{setValueForStyles:"setValueForStyles"}),t.exports=h},{103:103,128:128,130:130,141:141,148:148,151:151,4:4,69:69}],6:[function(e,t,n){"use strict";function r(){this._callbacks=null,this._contexts=null}var o=e(24),a=e(23),i=e(142);a(r.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){e.length!==t.length?i(!1):void 0,this._callbacks=null,this._contexts=null;for(var n=0;n<e.length;n++)e[n].call(t[n]);e.length=0,t.length=0}},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),o.addPoolingTo(r),t.exports=r},{142:142,23:23,24:24}],7:[function(e,t,n){"use strict";function r(e){var t=e.nodeName&&e.nodeName.toLowerCase();return"select"===t||"input"===t&&"file"===e.type}function o(e){var t=x.getPooled(R.change,S,e,D(e));b.accumulateTwoPhaseDispatches(t),E.batchedUpdates(a,t)}function a(e){C.enqueueEvents(e),C.processEventQueue(!1)}function i(e,t){I=e,S=t,I.attachEvent("onchange",o)}function u(){I&&(I.detachEvent("onchange",o),I=null,S=null)}function s(e,t,n){return e===w.topChange?n:void 0}function l(e,t,n){e===w.topFocus?(u(),i(t,n)):e===w.topBlur&&u()}function c(e,t){I=e,S=t,T=e.value,k=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(I,"value",L),I.attachEvent("onpropertychange",d)}function p(){I&&(delete I.value,I.detachEvent("onpropertychange",d),I=null,S=null,T=null,k=null)}function d(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==T&&(T=t,o(e))}}function f(e,t,n){return e===w.topInput?n:void 0}function h(e,t,n){e===w.topFocus?(p(),c(t,n)):e===w.topBlur&&p()}function v(e,t,n){return e!==w.topSelectionChange&&e!==w.topKeyUp&&e!==w.topKeyDown||!I||I.value===T?void 0:(T=I.value,S)}function m(e){return e.nodeName&&"input"===e.nodeName.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function g(e,t,n){return e===w.topClick?n:void 0}var y=e(15),C=e(16),b=e(19),_=e(128),E=e(81),x=e(90),D=e(112),M=e(117),N=e(118),P=e(146),w=y.topLevelTypes,R={change:{phasedRegistrationNames:{bubbled:P({onChange:null}),captured:P({onChangeCapture:null})},dependencies:[w.topBlur,w.topChange,w.topClick,w.topFocus,w.topInput,w.topKeyDown,w.topKeyUp,w.topSelectionChange]}},I=null,S=null,T=null,k=null,O=!1;_.canUseDOM&&(O=M("change")&&(!("documentMode"in document)||document.documentMode>8));var A=!1;_.canUseDOM&&(A=M("input")&&(!("documentMode"in document)||document.documentMode>9));var L={get:function(){return k.get.call(this)},set:function(e){T=""+e,k.set.call(this,e)}},U={eventTypes:R,extractEvents:function(e,t,n,o,a){var i,u;if(r(t)?O?i=s:u=l:N(t)?A?i=f:(i=v,u=h):m(t)&&(i=g),i){var c=i(e,t,n);if(c){var p=x.getPooled(R.change,c,o,a);return p.type="change",b.accumulateTwoPhaseDispatches(p),p}}u&&u(e,t,n)}};t.exports=U},{112:112,117:117,118:118,128:128,146:146,15:15,16:16,19:19,81:81,90:90}],8:[function(e,t,n){"use strict";var r=0,o={createReactRootIndex:function(){return r++}};t.exports=o},{}],9:[function(e,t,n){"use strict";function r(e,t,n){var r=n>=e.childNodes.length?null:e.childNodes.item(n);e.insertBefore(t,r)}var o=e(12),a=e(65),i=e(69),u=e(122),s=e(123),l=e(142),c={dangerouslyReplaceNodeWithMarkup:o.dangerouslyReplaceNodeWithMarkup,updateTextContent:s,processUpdates:function(e,t){for(var n,i=null,c=null,p=0;p<e.length;p++)if(n=e[p],n.type===a.MOVE_EXISTING||n.type===a.REMOVE_NODE){var d=n.fromIndex,f=n.parentNode.childNodes[d],h=n.parentID;f?void 0:l(!1),i=i||{},i[h]=i[h]||[],i[h][d]=f,c=c||[],c.push(f)}var v;if(v=t.length&&"string"==typeof t[0]?o.dangerouslyRenderMarkup(t):t,c)for(var m=0;m<c.length;m++)c[m].parentNode.removeChild(c[m]);for(var g=0;g<e.length;g++)switch(n=e[g],n.type){case a.INSERT_MARKUP:r(n.parentNode,v[n.markupIndex],n.toIndex);break;case a.MOVE_EXISTING:r(n.parentNode,i[n.parentID][n.fromIndex],n.toIndex);break;case a.SET_MARKUP:u(n.parentNode,n.content);break;case a.TEXT_CONTENT:s(n.parentNode,n.content);break;case a.REMOVE_NODE:}}};i.measureMethods(c,"DOMChildrenOperations",{updateTextContent:"updateTextContent"}),t.exports=c},{12:12,122:122,123:123,142:142,65:65,69:69}],10:[function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var o=e(142),a={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=a,n=e.Properties||{},i=e.DOMAttributeNamespaces||{},s=e.DOMAttributeNames||{},l=e.DOMPropertyNames||{},c=e.DOMMutationMethods||{};e.isCustomAttribute&&u._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var p in n){u.properties.hasOwnProperty(p)?o(!1):void 0;var d=p.toLowerCase(),f=n[p],h={attributeName:d,attributeNamespace:null,propertyName:p,mutationMethod:null,mustUseAttribute:r(f,t.MUST_USE_ATTRIBUTE),mustUseProperty:r(f,t.MUST_USE_PROPERTY),hasSideEffects:r(f,t.HAS_SIDE_EFFECTS),hasBooleanValue:r(f,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(f,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(f,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(f,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(h.mustUseAttribute&&h.mustUseProperty?o(!1):void 0,!h.mustUseProperty&&h.hasSideEffects?o(!1):void 0,h.hasBooleanValue+h.hasNumericValue+h.hasOverloadedBooleanValue<=1?void 0:o(!1),s.hasOwnProperty(p)){var v=s[p];h.attributeName=v}i.hasOwnProperty(p)&&(h.attributeNamespace=i[p]),l.hasOwnProperty(p)&&(h.propertyName=l[p]),c.hasOwnProperty(p)&&(h.mutationMethod=c[p]),u.properties[p]=h}}},i={},u={ID_ATTRIBUTE_NAME:"data-reactid",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<u._isCustomAttributeFunctions.length;t++){var n=u._isCustomAttributeFunctions[t];if(n(e))return!0}return!1},getDefaultValueForProperty:function(e,t){var n,r=i[e];return r||(i[e]=r={}),t in r||(n=document.createElement(e),r[t]=n[t]),r[t]},injection:a};t.exports=u},{142:142}],11:[function(e,t,n){"use strict";function r(e){return c.hasOwnProperty(e)?!0:l.hasOwnProperty(e)?!1:s.test(e)?(c[e]=!0,!0):(l[e]=!0,!1)}function o(e,t){return null==t||e.hasBooleanValue&&!t||e.hasNumericValue&&isNaN(t)||e.hasPositiveNumericValue&&1>t||e.hasOverloadedBooleanValue&&t===!1}var a=e(10),i=e(69),u=e(120),s=(e(151),/^[a-zA-Z_][\w\.\-]*$/),l={},c={},p={createMarkupForID:function(e){return a.ID_ATTRIBUTE_NAME+"="+u(e)},setAttributeForID:function(e,t){e.setAttribute(a.ID_ATTRIBUTE_NAME,t)},createMarkupForProperty:function(e,t){var n=a.properties.hasOwnProperty(e)?a.properties[e]:null;if(n){if(o(n,t))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&t===!0?r+'=""':r+"="+u(t)}return a.isCustomAttribute(e)?null==t?"":e+"="+u(t):null},createMarkupForCustomAttribute:function(e,t){return r(e)&&null!=t?e+"="+u(t):""},setValueForProperty:function(e,t,n){var r=a.properties.hasOwnProperty(t)?a.properties[t]:null;if(r){var i=r.mutationMethod;if(i)i(e,n);else if(o(r,n))this.deleteValueForProperty(e,t);else if(r.mustUseAttribute){var u=r.attributeName,s=r.attributeNamespace;s?e.setAttributeNS(s,u,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&n===!0?e.setAttribute(u,""):e.setAttribute(u,""+n)}else{var l=r.propertyName;r.hasSideEffects&&""+e[l]==""+n||(e[l]=n)}}else a.isCustomAttribute(t)&&p.setValueForAttribute(e,t,n)},setValueForAttribute:function(e,t,n){r(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))},deleteValueForProperty:function(e,t){var n=a.properties.hasOwnProperty(t)?a.properties[t]:null;if(n){var r=n.mutationMethod;if(r)r(e,void 0);else if(n.mustUseAttribute)e.removeAttribute(n.attributeName);else{var o=n.propertyName,i=a.getDefaultValueForProperty(e.nodeName,o);n.hasSideEffects&&""+e[o]===i||(e[o]=i)}}else a.isCustomAttribute(t)&&e.removeAttribute(t)}};i.measureMethods(p,"DOMPropertyOperations",{setValueForProperty:"setValueForProperty",setValueForAttribute:"setValueForAttribute",deleteValueForProperty:"deleteValueForProperty"}),t.exports=p},{10:10,120:120,151:151,69:69}],12:[function(e,t,n){"use strict";function r(e){return e.substring(1,e.indexOf(" "))}var o=e(128),a=e(133),i=e(134),u=e(138),s=e(142),l=/^(<[^ \/>]+)/,c="data-danger-index",p={dangerouslyRenderMarkup:function(e){o.canUseDOM?void 0:s(!1);for(var t,n={},p=0;p<e.length;p++)e[p]?void 0:s(!1),t=r(e[p]),t=u(t)?t:"*",n[t]=n[t]||[],n[t][p]=e[p];var d=[],f=0;for(t in n)if(n.hasOwnProperty(t)){var h,v=n[t];for(h in v)if(v.hasOwnProperty(h)){var m=v[h];v[h]=m.replace(l,"$1 "+c+'="'+h+'" ')}for(var g=a(v.join(""),i),y=0;y<g.length;++y){var C=g[y];C.hasAttribute&&C.hasAttribute(c)&&(h=+C.getAttribute(c),C.removeAttribute(c),d.hasOwnProperty(h)?s(!1):void 0,d[h]=C,f+=1)}}return f!==d.length?s(!1):void 0,d.length!==e.length?s(!1):void 0,d},dangerouslyReplaceNodeWithMarkup:function(e,t){o.canUseDOM?void 0:s(!1),t?void 0:s(!1),"html"===e.tagName.toLowerCase()?s(!1):void 0;var n;n="string"==typeof t?a(t,i)[0]:t,e.parentNode.replaceChild(n,e)}};t.exports=p},{128:128,133:133,134:134,138:138,142:142}],13:[function(e,t,n){"use strict";var r=e(146),o=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({BeforeInputEventPlugin:null})];t.exports=o},{146:146}],14:[function(e,t,n){"use strict";var r=e(15),o=e(19),a=e(94),i=e(63),u=e(146),s=r.topLevelTypes,l=i.getFirstReactDOM,c={mouseEnter:{registrationName:u({onMouseEnter:null}),dependencies:[s.topMouseOut,s.topMouseOver]},mouseLeave:{registrationName:u({onMouseLeave:null}),dependencies:[s.topMouseOut,s.topMouseOver]}},p=[null,null],d={eventTypes:c,extractEvents:function(e,t,n,r,u){if(e===s.topMouseOver&&(r.relatedTarget||r.fromElement))return null;if(e!==s.topMouseOut&&e!==s.topMouseOver)return null;var d;if(t.window===t)d=t;else{var f=t.ownerDocument;d=f?f.defaultView||f.parentWindow:window}var h,v,m="",g="";if(e===s.topMouseOut?(h=t,m=n,v=l(r.relatedTarget||r.toElement),v?g=i.getID(v):v=d,v=v||d):(h=d,v=t,g=n),h===v)return null;var y=a.getPooled(c.mouseLeave,m,r,u);y.type="mouseleave",y.target=h,y.relatedTarget=v;var C=a.getPooled(c.mouseEnter,g,r,u);return C.type="mouseenter",C.target=v,C.relatedTarget=h,o.accumulateEnterLeaveDispatches(y,C,m,g),p[0]=y,p[1]=C,p}};t.exports=d},{146:146,15:15,19:19,63:63,94:94}],15:[function(e,t,n){"use strict";var r=e(145),o=r({bubbled:null,captured:null}),a=r({topAbort:null,topBlur:null,topCanPlay:null,topCanPlayThrough:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topDurationChange:null,topEmptied:null,topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,topStalled:null,topSubmit:null,topSuspend:null,topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topVolumeChange:null,topWaiting:null,topWheel:null}),i={topLevelTypes:a,PropagationPhases:o};t.exports=i},{145:145}],16:[function(e,t,n){"use strict";var r=e(17),o=e(18),a=e(54),i=e(100),u=e(108),s=e(142),l=(e(151),{}),c=null,p=function(e,t){e&&(o.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},d=function(e){return p(e,!0)},f=function(e){return p(e,!1)},h=null,v={injection:{injectMount:o.injection.injectMount,injectInstanceHandle:function(e){h=e},getInstanceHandle:function(){return h},injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},eventNameDispatchConfigs:r.eventNameDispatchConfigs,registrationNameModules:r.registrationNameModules,putListener:function(e,t,n){"function"!=typeof n?s(!1):void 0;var o=l[t]||(l[t]={});o[e]=n;var a=r.registrationNameModules[t];a&&a.didPutListener&&a.didPutListener(e,t,n)},getListener:function(e,t){var n=l[t];return n&&n[e]},deleteListener:function(e,t){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var o=l[t];o&&delete o[e]},deleteAllListeners:function(e){for(var t in l)if(l[t][e]){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t),delete l[t][e]}},extractEvents:function(e,t,n,o,a){for(var u,s=r.plugins,l=0;l<s.length;l++){var c=s[l];if(c){var p=c.extractEvents(e,t,n,o,a);p&&(u=i(u,p))}}return u},enqueueEvents:function(e){e&&(c=i(c,e))},processEventQueue:function(e){var t=c;c=null,e?u(t,d):u(t,f),c?s(!1):void 0,a.rethrowCaughtError()},__purge:function(){l={}},__getListenerBank:function(){return l}};t.exports=v},{100:100,108:108,142:142,151:151,17:17,18:18,54:54}],17:[function(e,t,n){"use strict";function r(){if(u)for(var e in s){var t=s[e],n=u.indexOf(e);if(n>-1?void 0:i(!1),!l.plugins[n]){t.extractEvents?void 0:i(!1),l.plugins[n]=t;var r=t.eventTypes;for(var a in r)o(r[a],t,a)?void 0:i(!1)}}}function o(e,t,n){l.eventNameDispatchConfigs.hasOwnProperty(n)?i(!1):void 0,l.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var u=r[o];a(u,t,n)}return!0}return e.registrationName?(a(e.registrationName,t,n),!0):!1}function a(e,t,n){l.registrationNameModules[e]?i(!1):void 0,l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var i=e(142),u=null,s={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){u?i(!1):void 0,u=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];s.hasOwnProperty(n)&&s[n]===o||(s[n]?i(!1):void 0,s[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=l.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){u=null;for(var e in s)s.hasOwnProperty(e)&&delete s[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=l.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=l},{142:142}],18:[function(e,t,n){"use strict";function r(e){return e===m.topMouseUp||e===m.topTouchEnd||e===m.topTouchCancel}function o(e){return e===m.topMouseMove||e===m.topTouchMove}function a(e){return e===m.topMouseDown||e===m.topTouchStart}function i(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=v.Mount.getNode(r),t?f.invokeGuardedCallbackWithCatch(o,n,e,r):f.invokeGuardedCallback(o,n,e,r),e.currentTarget=null}function u(e,t){var n=e._dispatchListeners,r=e._dispatchIDs;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)i(e,t,n[o],r[o]);else n&&i(e,t,n,r);e._dispatchListeners=null,e._dispatchIDs=null}function s(e){var t=e._dispatchListeners,n=e._dispatchIDs;if(Array.isArray(t)){for(var r=0;r<t.length&&!e.isPropagationStopped();r++)if(t[r](e,n[r]))return n[r]}else if(t&&t(e,n))return n;return null}function l(e){var t=s(e);return e._dispatchIDs=null,e._dispatchListeners=null,t}function c(e){var t=e._dispatchListeners,n=e._dispatchIDs;Array.isArray(t)?h(!1):void 0;var r=t?t(e,n):null;return e._dispatchListeners=null,e._dispatchIDs=null,r}function p(e){return!!e._dispatchListeners}var d=e(15),f=e(54),h=e(142),v=(e(151),{Mount:null,injectMount:function(e){v.Mount=e}}),m=d.topLevelTypes,g={isEndish:r,isMoveish:o,isStartish:a,executeDirectDispatch:c,executeDispatchesInOrder:u,executeDispatchesInOrderStopAtTrue:l,hasDispatches:p,getNode:function(e){return v.Mount.getNode(e)},getID:function(e){return v.Mount.getID(e)},injection:v};t.exports=g},{142:142,15:15,151:151,54:54}],19:[function(e,t,n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return y(e,r)}function o(e,t,n){var o=t?g.bubbled:g.captured,a=r(e,n,o);a&&(n._dispatchListeners=v(n._dispatchListeners,a),n._dispatchIDs=v(n._dispatchIDs,e))}function a(e){e&&e.dispatchConfig.phasedRegistrationNames&&h.injection.getInstanceHandle().traverseTwoPhase(e.dispatchMarker,o,e)}function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&h.injection.getInstanceHandle().traverseTwoPhaseSkipTarget(e.dispatchMarker,o,e)}function u(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=y(e,r);o&&(n._dispatchListeners=v(n._dispatchListeners,o),n._dispatchIDs=v(n._dispatchIDs,e))}}function s(e){e&&e.dispatchConfig.registrationName&&u(e.dispatchMarker,null,e)}function l(e){m(e,a)}function c(e){m(e,i)}function p(e,t,n,r){h.injection.getInstanceHandle().traverseEnterLeave(n,r,u,e,t)}function d(e){m(e,s)}var f=e(15),h=e(16),v=(e(151),e(100)),m=e(108),g=f.PropagationPhases,y=h.getListener,C={accumulateTwoPhaseDispatches:l,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:d,accumulateEnterLeaveDispatches:p};t.exports=C},{100:100,108:108,15:15,151:151,16:16}],20:[function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var o=e(24),a=e(23),i=e(115);a(r.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[i()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),a=o.length;for(e=0;r>e&&n[e]===o[e];e++);var i=r-e;for(t=1;i>=t&&n[r-t]===o[a-t];t++);var u=t>1?1-t:void 0;return this._fallbackText=o.slice(e,u),this._fallbackText}}),o.addPoolingTo(r),t.exports=r},{115:115,23:23,24:24}],21:[function(e,t,n){"use strict";var r,o=e(10),a=e(128),i=o.injection.MUST_USE_ATTRIBUTE,u=o.injection.MUST_USE_PROPERTY,s=o.injection.HAS_BOOLEAN_VALUE,l=o.injection.HAS_SIDE_EFFECTS,c=o.injection.HAS_NUMERIC_VALUE,p=o.injection.HAS_POSITIVE_NUMERIC_VALUE,d=o.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(a.canUseDOM){var f=document.implementation;r=f&&f.hasFeature&&f.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var h={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:i|s,allowTransparency:i,alt:null,async:s,autoComplete:null,autoPlay:s,capture:i|s,cellPadding:null,cellSpacing:null,charSet:i,challenge:i,checked:u|s,classID:i,className:r?i:u,cols:i|p,colSpan:null,content:null,contentEditable:null,contextMenu:i,controls:u|s,coords:null,crossOrigin:null,data:null,dateTime:i,"default":s,defer:s,dir:null,disabled:i|s,download:d,draggable:null,encType:null,form:i,formAction:i,formEncType:i,formMethod:i,formNoValidate:s,formTarget:i,frameBorder:i,headers:null,height:i,hidden:i|s,high:null,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:u,inputMode:i,integrity:null,is:i,keyParams:i,keyType:i,kind:null,label:null,lang:null,list:i,loop:u|s,low:null,manifest:i,marginHeight:null,marginWidth:null,max:null,maxLength:i,media:i,mediaGroup:null,method:null,min:null,minLength:i,multiple:u|s,muted:u|s,name:null,noValidate:s,open:s,optimum:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:u|s,rel:null,required:s,role:i,rows:i|p,rowSpan:null,sandbox:null,scope:null,scoped:s,scrolling:null,seamless:i|s,selected:u|s,shape:null,size:i|p,sizes:i,span:p,spellCheck:null,src:null,srcDoc:u,srcLang:null,srcSet:i,start:c,step:null,style:null,summary:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:u|l,width:i,wmode:i,wrap:null,about:i,datatype:i,inlist:i,prefix:i,property:i,resource:i,"typeof":i,vocab:i,autoCapitalize:null,autoCorrect:null,autoSave:null,color:null,itemProp:i,itemScope:i|s,itemType:i,itemID:i,itemRef:i,results:null,security:i,unselectable:i},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",autoSave:"autosave",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};t.exports=h},{10:10,128:128}],22:[function(e,t,n){"use strict";function r(e){null!=e.checkedLink&&null!=e.valueLink?l(!1):void 0}function o(e){r(e),null!=e.value||null!=e.onChange?l(!1):void 0}function a(e){r(e),null!=e.checked||null!=e.onChange?l(!1):void 0}function i(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var u=e(72),s=e(71),l=e(142),c=(e(151),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),p={value:function(e,t,n){return!e[t]||c[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:u.func},d={},f={checkPropTypes:function(e,t,n){for(var r in p){if(p.hasOwnProperty(r))var o=p[r](t,r,e,s.prop);o instanceof Error&&!(o.message in d)&&(d[o.message]=!0,i(n))}},getValue:function(e){return e.valueLink?(o(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(a(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(o(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(a(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};t.exports=f},{142:142,151:151,71:71,72:72}],23:[function(e,t,n){"use strict";function r(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var n=Object(e),r=Object.prototype.hasOwnProperty,o=1;o<arguments.length;o++){var a=arguments[o];if(null!=a){var i=Object(a);for(var u in i)r.call(i,u)&&(n[u]=i[u])}}return n}t.exports=r},{}],24:[function(e,t,n){"use strict";var r=e(142),o=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},a=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},i=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},u=function(e,t,n,r){var o=this;if(o.instancePool.length){var a=o.instancePool.pop();return o.call(a,e,t,n,r),a}return new o(e,t,n,r)},s=function(e,t,n,r,o){var a=this;if(a.instancePool.length){var i=a.instancePool.pop();return a.call(i,e,t,n,r,o),i}return new a(e,t,n,r,o)},l=function(e){var t=this;e instanceof t?void 0:r(!1),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},c=10,p=o,d=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||p,n.poolSize||(n.poolSize=c),n.release=l,n},f={addPoolingTo:d,oneArgumentPooler:o,twoArgumentPooler:a,threeArgumentPooler:i,fourArgumentPooler:u,fiveArgumentPooler:s};t.exports=f},{142:142}],25:[function(e,t,n){"use strict";var r=(e(60),e(106)),o=(e(151),"_getDOMNodeDidWarn"),a={getDOMNode:function(){return this.constructor[o]=!0,r(this)}};t.exports=a},{106:106,151:151,60:60}],26:[function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,m)||(e[m]=h++,d[e[m]]={}),d[e[m]]}var o=e(15),a=e(16),i=e(17),u=e(55),s=e(69),l=e(99),c=e(23),p=e(117),d={},f=!1,h=0,v={topAbort:"abort",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress", topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},m="_reactListenersID"+String(Math.random()).slice(2),g=c({},u,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(g.handleTopLevel),g.ReactEventListener=e}},setEnabled:function(e){g.ReactEventListener&&g.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!g.ReactEventListener||!g.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,a=r(n),u=i.registrationNameDependencies[e],s=o.topLevelTypes,l=0;l<u.length;l++){var c=u[l];a.hasOwnProperty(c)&&a[c]||(c===s.topWheel?p("wheel")?g.ReactEventListener.trapBubbledEvent(s.topWheel,"wheel",n):p("mousewheel")?g.ReactEventListener.trapBubbledEvent(s.topWheel,"mousewheel",n):g.ReactEventListener.trapBubbledEvent(s.topWheel,"DOMMouseScroll",n):c===s.topScroll?p("scroll",!0)?g.ReactEventListener.trapCapturedEvent(s.topScroll,"scroll",n):g.ReactEventListener.trapBubbledEvent(s.topScroll,"scroll",g.ReactEventListener.WINDOW_HANDLE):c===s.topFocus||c===s.topBlur?(p("focus",!0)?(g.ReactEventListener.trapCapturedEvent(s.topFocus,"focus",n),g.ReactEventListener.trapCapturedEvent(s.topBlur,"blur",n)):p("focusin")&&(g.ReactEventListener.trapBubbledEvent(s.topFocus,"focusin",n),g.ReactEventListener.trapBubbledEvent(s.topBlur,"focusout",n)),a[s.topBlur]=!0,a[s.topFocus]=!0):v.hasOwnProperty(c)&&g.ReactEventListener.trapBubbledEvent(c,v[c],n),a[c]=!0)}},trapBubbledEvent:function(e,t,n){return g.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return g.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(!f){var e=l.refreshScrollValues;g.ReactEventListener.monitorScrollValue(e),f=!0}},eventNameDispatchConfigs:a.eventNameDispatchConfigs,registrationNameModules:a.registrationNameModules,putListener:a.putListener,getListener:a.getListener,deleteListener:a.deleteListener,deleteAllListeners:a.deleteAllListeners});s.measureMethods(g,"ReactBrowserEventEmitter",{putListener:"putListener",deleteListener:"deleteListener"}),t.exports=g},{117:117,15:15,16:16,17:17,23:23,55:55,69:69,99:99}],27:[function(e,t,n){"use strict";function r(e,t,n){var r=void 0===e[n];null!=t&&r&&(e[n]=a(t,null))}var o=e(74),a=e(116),i=e(124),u=e(125),s=(e(151),{instantiateChildren:function(e,t,n){if(null==e)return null;var o={};return u(e,r,o),o},updateChildren:function(e,t,n,r){if(!t&&!e)return null;var u;for(u in t)if(t.hasOwnProperty(u)){var s=e&&e[u],l=s&&s._currentElement,c=t[u];if(null!=s&&i(l,c))o.receiveComponent(s,c,n,r),t[u]=s;else{s&&o.unmountComponent(s,u);var p=a(c,null);t[u]=p}}for(u in e)!e.hasOwnProperty(u)||t&&t.hasOwnProperty(u)||o.unmountComponent(e[u]);return t},unmountChildren:function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];o.unmountComponent(n)}}});t.exports=s},{116:116,124:124,125:125,151:151,74:74}],28:[function(e,t,n){"use strict";function r(e){return(""+e).replace(b,"//")}function o(e,t){this.func=e,this.context=t,this.count=0}function a(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function i(e,t,n){if(null==e)return e;var r=o.getPooled(t,n);g(e,a,r),o.release(r)}function u(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function s(e,t,n){var o=e.result,a=e.keyPrefix,i=e.func,u=e.context,s=i.call(u,t,e.count++);Array.isArray(s)?l(s,o,n,m.thatReturnsArgument):null!=s&&(v.isValidElement(s)&&(s=v.cloneAndReplaceKey(s,a+(s!==t?r(s.key||"")+"/":"")+n)),o.push(s))}function l(e,t,n,o,a){var i="";null!=n&&(i=r(n)+"/");var l=u.getPooled(t,i,o,a);g(e,s,l),u.release(l)}function c(e,t,n){if(null==e)return e;var r=[];return l(e,r,null,t,n),r}function p(e,t,n){return null}function d(e,t){return g(e,p,null)}function f(e){var t=[];return l(e,t,null,m.thatReturnsArgument),t}var h=e(24),v=e(50),m=e(134),g=e(125),y=h.twoArgumentPooler,C=h.fourArgumentPooler,b=/\/(?!\/)/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,y),u.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(u,C);var _={forEach:i,map:c,mapIntoWithKeyPrefixInternal:l,count:d,toArray:f};t.exports=_},{125:125,134:134,24:24,50:50}],29:[function(e,t,n){"use strict";function r(e,t){var n=E.hasOwnProperty(t)?E[t]:null;D.hasOwnProperty(t)&&(n!==b.OVERRIDE_BASE?m(!1):void 0),e.hasOwnProperty(t)&&(n!==b.DEFINE_MANY&&n!==b.DEFINE_MANY_MERGED?m(!1):void 0)}function o(e,t){if(t){"function"==typeof t?m(!1):void 0,d.isValidElement(t)?m(!1):void 0;var n=e.prototype;t.hasOwnProperty(C)&&x.mixins(e,t.mixins);for(var o in t)if(t.hasOwnProperty(o)&&o!==C){var a=t[o];if(r(n,o),x.hasOwnProperty(o))x[o](e,a);else{var i=E.hasOwnProperty(o),l=n.hasOwnProperty(o),c="function"==typeof a,p=c&&!i&&!l&&t.autobind!==!1;if(p)n.__reactAutoBindMap||(n.__reactAutoBindMap={}),n.__reactAutoBindMap[o]=a,n[o]=a;else if(l){var f=E[o];!i||f!==b.DEFINE_MANY_MERGED&&f!==b.DEFINE_MANY?m(!1):void 0,f===b.DEFINE_MANY_MERGED?n[o]=u(n[o],a):f===b.DEFINE_MANY&&(n[o]=s(n[o],a))}else n[o]=a}}}}function a(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in x;o?m(!1):void 0;var a=n in e;a?m(!1):void 0,e[n]=r}}}function i(e,t){e&&t&&"object"==typeof e&&"object"==typeof t?void 0:m(!1);for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]?m(!1):void 0,e[n]=t[n]);return e}function u(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return i(o,n),i(o,r),o}}function s(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function l(e,t){var n=t.bind(e);return n}function c(e){for(var t in e.__reactAutoBindMap)if(e.__reactAutoBindMap.hasOwnProperty(t)){var n=e.__reactAutoBindMap[t];e[t]=l(e,n)}}var p=e(30),d=e(50),f=(e(71),e(70),e(67)),h=e(23),v=e(135),m=e(142),g=e(145),y=e(146),C=(e(151),y({mixins:null})),b=g({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),_=[],E={mixins:b.DEFINE_MANY,statics:b.DEFINE_MANY,propTypes:b.DEFINE_MANY,contextTypes:b.DEFINE_MANY,childContextTypes:b.DEFINE_MANY,getDefaultProps:b.DEFINE_MANY_MERGED,getInitialState:b.DEFINE_MANY_MERGED,getChildContext:b.DEFINE_MANY_MERGED,render:b.DEFINE_ONCE,componentWillMount:b.DEFINE_MANY,componentDidMount:b.DEFINE_MANY,componentWillReceiveProps:b.DEFINE_MANY,shouldComponentUpdate:b.DEFINE_ONCE,componentWillUpdate:b.DEFINE_MANY,componentDidUpdate:b.DEFINE_MANY,componentWillUnmount:b.DEFINE_MANY,updateComponent:b.OVERRIDE_BASE},x={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)o(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=h({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=h({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=u(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=h({},e.propTypes,t)},statics:function(e,t){a(e,t)},autobind:function(){}},D={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e),t&&this.updater.enqueueCallback(this,t)},isMounted:function(){return this.updater.isMounted(this)},setProps:function(e,t){this.updater.enqueueSetProps(this,e),t&&this.updater.enqueueCallback(this,t)},replaceProps:function(e,t){this.updater.enqueueReplaceProps(this,e),t&&this.updater.enqueueCallback(this,t)}},M=function(){};h(M.prototype,p.prototype,D);var N={createClass:function(e){var t=function(e,t,n){this.__reactAutoBindMap&&c(this),this.props=e,this.context=t,this.refs=v,this.updater=n||f,this.state=null;var r=this.getInitialState?this.getInitialState():null;"object"!=typeof r||Array.isArray(r)?m(!1):void 0,this.state=r};t.prototype=new M,t.prototype.constructor=t,_.forEach(o.bind(null,t)),o(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),t.prototype.render?void 0:m(!1);for(var n in E)t.prototype[n]||(t.prototype[n]=null);return t},injection:{injectMixin:function(e){_.push(e)}}};t.exports=N},{135:135,142:142,145:145,146:146,151:151,23:23,30:30,50:50,67:67,70:70,71:71}],30:[function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=a,this.updater=n||o}var o=e(67),a=(e(102),e(135)),i=e(142);e(151);r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e?i(!1):void 0,this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t)},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e)};t.exports=r},{102:102,135:135,142:142,151:151,67:67}],31:[function(e,t,n){"use strict";var r=e(40),o=e(63),a={processChildrenUpdates:r.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:r.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(e){o.purgeID(e)}};t.exports=a},{40:40,63:63}],32:[function(e,t,n){"use strict";var r=e(142),o=!1,a={unmountIDFromEnvironment:null,replaceNodeWithMarkupByID:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){o?r(!1):void 0,a.unmountIDFromEnvironment=e.unmountIDFromEnvironment,a.replaceNodeWithMarkupByID=e.replaceNodeWithMarkupByID,a.processChildrenUpdates=e.processChildrenUpdates,o=!0}}};t.exports=a},{142:142}],33:[function(e,t,n){"use strict";function r(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" Check the render method of `"+n+"`."}return""}function o(e){}var a=e(32),i=e(34),u=e(50),s=e(60),l=e(69),c=e(71),p=(e(70),e(74)),d=e(80),f=e(23),h=e(135),v=e(142),m=e(124);e(151);o.prototype.render=function(){var e=s.get(this)._currentElement.type;return e(this.props,this.context,this.updater)};var g=1,y={construct:function(e){this._currentElement=e,this._rootNodeID=null,this._instance=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null},mountComponent:function(e,t,n){this._context=n,this._mountOrder=g++,this._rootNodeID=e;var r,a,i=this._processProps(this._currentElement.props),l=this._processContext(n),c=this._currentElement.type,f="prototype"in c;f&&(r=new c(i,l,d)),(!f||null===r||r===!1||u.isValidElement(r))&&(a=r,r=new o(c)),r.props=i,r.context=l,r.refs=h,r.updater=d,this._instance=r,s.set(r,this);var m=r.state;void 0===m&&(r.state=m=null),"object"!=typeof m||Array.isArray(m)?v(!1):void 0,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,r.componentWillMount&&(r.componentWillMount(),this._pendingStateQueue&&(r.state=this._processPendingState(r.props,r.context))),void 0===a&&(a=this._renderValidatedComponent()),this._renderedComponent=this._instantiateReactComponent(a);var y=p.mountComponent(this._renderedComponent,e,t,this._processChildContext(n));return r.componentDidMount&&t.getReactMountReady().enqueue(r.componentDidMount,r),y},unmountComponent:function(){var e=this._instance;e.componentWillUnmount&&e.componentWillUnmount(),p.unmountComponent(this._renderedComponent),this._renderedComponent=null,this._instance=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=null,this._topLevelWrapper=null,s.remove(e)},_maskContext:function(e){var t=null,n=this._currentElement.type,r=n.contextTypes;if(!r)return h;t={};for(var o in r)t[o]=e[o];return t},_processContext:function(e){var t=this._maskContext(e);return t},_processChildContext:function(e){var t=this._currentElement.type,n=this._instance,r=n.getChildContext&&n.getChildContext();if(r){"object"!=typeof t.childContextTypes?v(!1):void 0;for(var o in r)o in t.childContextTypes?void 0:v(!1);return f({},e,r)}return e},_processProps:function(e){return e},_checkPropTypes:function(e,t,n){var o=this.getName();for(var a in e)if(e.hasOwnProperty(a)){var i;try{"function"!=typeof e[a]?v(!1):void 0,i=e[a](t,a,o,n)}catch(u){i=u}i instanceof Error&&(r(this),n===c.prop)}},receiveComponent:function(e,t,n){var r=this._currentElement,o=this._context;this._pendingElement=null,this.updateComponent(t,r,e,o,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement&&p.receiveComponent(this,this._pendingElement||this._currentElement,e,this._context),(null!==this._pendingStateQueue||this._pendingForceUpdate)&&this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context)},updateComponent:function(e,t,n,r,o){var a,i=this._instance,u=this._context===o?i.context:this._processContext(o);t===n?a=n.props:(a=this._processProps(n.props),i.componentWillReceiveProps&&i.componentWillReceiveProps(a,u));var s=this._processPendingState(a,u),l=this._pendingForceUpdate||!i.shouldComponentUpdate||i.shouldComponentUpdate(a,s,u);l?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,a,s,u,e,o)):(this._currentElement=n,this._context=o,i.props=a,i.state=s,i.context=u)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,o=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(o&&1===r.length)return r[0];for(var a=f({},o?r[0]:n.state),i=o?1:0;i<r.length;i++){var u=r[i];f(a,"function"==typeof u?u.call(n,a,e,t):u)}return a},_performComponentUpdate:function(e,t,n,r,o,a){var i,u,s,l=this._instance,c=Boolean(l.componentDidUpdate);c&&(i=l.props,u=l.state,s=l.context),l.componentWillUpdate&&l.componentWillUpdate(t,n,r),this._currentElement=e,this._context=a,l.props=t,l.state=n,l.context=r,this._updateRenderedComponent(o,a),c&&o.getReactMountReady().enqueue(l.componentDidUpdate.bind(l,i,u,s),l)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,r=n._currentElement,o=this._renderValidatedComponent();if(m(r,o))p.receiveComponent(n,o,e,this._processChildContext(t));else{var a=this._rootNodeID,i=n._rootNodeID;p.unmountComponent(n),this._renderedComponent=this._instantiateReactComponent(o);var u=p.mountComponent(this._renderedComponent,a,e,this._processChildContext(t));this._replaceNodeWithMarkupByID(i,u)}},_replaceNodeWithMarkupByID:function(e,t){a.replaceNodeWithMarkupByID(e,t)},_renderValidatedComponentWithoutOwnerOrContext:function(){var e=this._instance,t=e.render();return t},_renderValidatedComponent:function(){var e;i.current=this;try{e=this._renderValidatedComponentWithoutOwnerOrContext()}finally{i.current=null}return null===e||e===!1||u.isValidElement(e)?void 0:v(!1),e},attachRef:function(e,t){var n=this.getPublicInstance();null==n?v(!1):void 0;var r=t.getPublicInstance(),o=n.refs===h?n.refs={}:n.refs;o[e]=r},detachRef:function(e){var t=this.getPublicInstance().refs;delete t[e]},getName:function(){var e=this._currentElement.type,t=this._instance&&this._instance.constructor;return e.displayName||t&&t.displayName||e.name||t&&t.name||null},getPublicInstance:function(){var e=this._instance;return e instanceof o?null:e},_instantiateReactComponent:null};l.measureMethods(y,"ReactCompositeComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent",_renderValidatedComponent:"_renderValidatedComponent"});var C={Mixin:y};t.exports=C},{124:124,135:135,142:142,151:151,23:23,32:32,34:34,50:50,60:60,69:69,70:70,71:71,74:74,80:80}],34:[function(e,t,n){"use strict";var r={current:null};t.exports=r},{}],35:[function(e,t,n){"use strict";var r=e(34),o=e(46),a=e(49),i=e(59),u=e(63),s=e(69),l=e(74),c=e(81),p=e(82),d=e(106),f=e(121);e(151);a.inject();var h=s.measure("React","render",u.render),v={findDOMNode:d,render:h,unmountComponentAtNode:u.unmountComponentAtNode,version:p,unstable_batchedUpdates:c.batchedUpdates,unstable_renderSubtreeIntoContainer:f};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:r,InstanceHandles:i,Mount:u,Reconciler:l,TextComponent:o});t.exports=v},{106:106,121:121,151:151,34:34,46:46,49:49,59:59,63:63,69:69,74:74,81:81,82:82}],36:[function(e,t,n){"use strict";var r={onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0},o={getNativeProps:function(e,t,n){if(!t.disabled)return t;var o={};for(var a in t)t.hasOwnProperty(a)&&!r[a]&&(o[a]=t[a]);return o}};t.exports=o},{}],37:[function(e,t,n){"use strict";function r(){return this}function o(){var e=this._reactInternalComponent;return!!e}function a(){}function i(e,t){var n=this._reactInternalComponent;n&&(T.enqueueSetPropsInternal(n,e),t&&T.enqueueCallbackInternal(n,t))}function u(e,t){var n=this._reactInternalComponent;n&&(T.enqueueReplacePropsInternal(n,e),t&&T.enqueueCallbackInternal(n,t))}function s(e,t){t&&(null!=t.dangerouslySetInnerHTML&&(null!=t.children?L(!1):void 0,"object"==typeof t.dangerouslySetInnerHTML&&Y in t.dangerouslySetInnerHTML?void 0:L(!1)),null!=t.style&&"object"!=typeof t.style?L(!1):void 0)}function l(e,t,n,r){var o=R.findReactContainerForID(e);if(o){var a=o.nodeType===z?o.ownerDocument:o;j(t,a)}r.getReactMountReady().enqueue(c,{id:e,registrationName:t,listener:n})}function c(){var e=this;E.putListener(e.id,e.registrationName,e.listener)}function p(){var e=this;e._rootNodeID?void 0:L(!1);var t=R.getNode(e._rootNodeID);switch(t?void 0:L(!1),e._tag){case"iframe":e._wrapperState.listeners=[E.trapBubbledEvent(_.topLevelTypes.topLoad,"load",t)];break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in G)G.hasOwnProperty(n)&&e._wrapperState.listeners.push(E.trapBubbledEvent(_.topLevelTypes[n],G[n],t));break;case"img":e._wrapperState.listeners=[E.trapBubbledEvent(_.topLevelTypes.topError,"error",t),E.trapBubbledEvent(_.topLevelTypes.topLoad,"load",t)];break;case"form":e._wrapperState.listeners=[E.trapBubbledEvent(_.topLevelTypes.topReset,"reset",t),E.trapBubbledEvent(_.topLevelTypes.topSubmit,"submit",t)]}}function d(){M.mountReadyWrapper(this)}function f(){P.postUpdateWrapper(this)}function h(e){J.call(Z,e)||($.test(e)?void 0:L(!1),Z[e]=!0)}function v(e,t){return e.indexOf("-")>=0||null!=t.is}function m(e){h(e),this._tag=e.toLowerCase(),this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._rootNodeID=null,this._wrapperState=null,this._topLevelWrapper=null,this._nodeWithLegacyProperties=null}var g=e(2),y=e(5),C=e(10),b=e(11),_=e(15),E=e(26),x=e(31),D=e(36),M=e(41),N=e(42),P=e(43),w=e(47),R=e(63),I=e(64),S=e(69),T=e(80),k=e(23),O=e(102),A=e(105),L=e(142),U=(e(117),e(146)),F=e(122),B=e(123),V=(e(149),e(126),e(151),E.deleteListener),j=E.listenTo,W=E.registrationNameModules,K={string:!0,number:!0},H=U({children:null}),q=U({style:null}),Y=U({__html:null}),z=1,G={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},X={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Q={listing:!0,pre:!0,textarea:!0},$=(k({menuitem:!0},X),/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/),Z={},J={}.hasOwnProperty;m.displayName="ReactDOMComponent",m.Mixin={construct:function(e){this._currentElement=e},mountComponent:function(e,t,n){this._rootNodeID=e;var r=this._currentElement.props;switch(this._tag){case"iframe":case"img":case"form":case"video":case"audio":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(p,this);break;case"button":r=D.getNativeProps(this,r,n);break;case"input":M.mountWrapper(this,r,n),r=M.getNativeProps(this,r,n);break;case"option":N.mountWrapper(this,r,n),r=N.getNativeProps(this,r,n);break;case"select":P.mountWrapper(this,r,n),r=P.getNativeProps(this,r,n),n=P.processChildContext(this,r,n);break;case"textarea":w.mountWrapper(this,r,n),r=w.getNativeProps(this,r,n)}s(this,r);var o;if(t.useCreateElement){var a=n[R.ownerDocumentContextKey],i=a.createElement(this._currentElement.type);b.setAttributeForID(i,this._rootNodeID),R.getID(i),this._updateDOMProperties({},r,t,i),this._createInitialChildren(t,r,n,i),o=i}else{var u=this._createOpenTagMarkupAndPutListeners(t,r),l=this._createContentMarkup(t,r,n);o=!l&&X[this._tag]?u+"/>":u+">"+l+"</"+this._currentElement.type+">"}switch(this._tag){case"input":t.getReactMountReady().enqueue(d,this);case"button":case"select":case"textarea":r.autoFocus&&t.getReactMountReady().enqueue(g.focusDOMComponent,this)}return o},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];if(null!=o)if(W.hasOwnProperty(r))o&&l(this._rootNodeID,r,o,e);else{r===q&&(o&&(o=this._previousStyleCopy=k({},t.style)),o=y.createMarkupForStyles(o));var a=null;null!=this._tag&&v(this._tag,t)?r!==H&&(a=b.createMarkupForCustomAttribute(r,o)):a=b.createMarkupForProperty(r,o),a&&(n+=" "+a)}}if(e.renderToStaticMarkup)return n;var i=b.createMarkupForID(this._rootNodeID);return n+" "+i},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var a=K[typeof t.children]?t.children:null,i=null!=a?null:t.children;if(null!=a)r=A(a);else if(null!=i){var u=this.mountChildren(i,e,n);r=u.join("")}}return Q[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&F(r,o.__html);else{var a=K[typeof t.children]?t.children:null,i=null!=a?null:t.children;if(null!=a)B(r,a);else if(null!=i)for(var u=this.mountChildren(i,e,n),s=0;s<u.length;s++)r.appendChild(u[s])}},receiveComponent:function(e,t,n){var r=this._currentElement;this._currentElement=e,this.updateComponent(t,r,e,n)},updateComponent:function(e,t,n,r){var o=t.props,a=this._currentElement.props;switch(this._tag){case"button":o=D.getNativeProps(this,o),a=D.getNativeProps(this,a);break;case"input":M.updateWrapper(this),o=M.getNativeProps(this,o),a=M.getNativeProps(this,a);break;case"option":o=N.getNativeProps(this,o),a=N.getNativeProps(this,a);break;case"select":o=P.getNativeProps(this,o),a=P.getNativeProps(this,a);break;case"textarea":w.updateWrapper(this),o=w.getNativeProps(this,o),a=w.getNativeProps(this,a)}s(this,a),this._updateDOMProperties(o,a,e,null),this._updateDOMChildren(o,a,e,r),!O&&this._nodeWithLegacyProperties&&(this._nodeWithLegacyProperties.props=a),"select"===this._tag&&e.getReactMountReady().enqueue(f,this)},_updateDOMProperties:function(e,t,n,r){var o,a,i;for(o in e)if(!t.hasOwnProperty(o)&&e.hasOwnProperty(o))if(o===q){var u=this._previousStyleCopy;for(a in u)u.hasOwnProperty(a)&&(i=i||{},i[a]="");this._previousStyleCopy=null}else W.hasOwnProperty(o)?e[o]&&V(this._rootNodeID,o):(C.properties[o]||C.isCustomAttribute(o))&&(r||(r=R.getNode(this._rootNodeID)),b.deleteValueForProperty(r,o));for(o in t){var s=t[o],c=o===q?this._previousStyleCopy:e[o];if(t.hasOwnProperty(o)&&s!==c)if(o===q)if(s?s=this._previousStyleCopy=k({},s):this._previousStyleCopy=null,c){for(a in c)!c.hasOwnProperty(a)||s&&s.hasOwnProperty(a)||(i=i||{},i[a]="");for(a in s)s.hasOwnProperty(a)&&c[a]!==s[a]&&(i=i||{},i[a]=s[a])}else i=s;else W.hasOwnProperty(o)?s?l(this._rootNodeID,o,s,n):c&&V(this._rootNodeID,o):v(this._tag,t)?(r||(r=R.getNode(this._rootNodeID)),o===H&&(s=null),b.setValueForAttribute(r,o,s)):(C.properties[o]||C.isCustomAttribute(o))&&(r||(r=R.getNode(this._rootNodeID)),null!=s?b.setValueForProperty(r,o,s):b.deleteValueForProperty(r,o))}i&&(r||(r=R.getNode(this._rootNodeID)),y.setValueForStyles(r,i))},_updateDOMChildren:function(e,t,n,r){var o=K[typeof e.children]?e.children:null,a=K[typeof t.children]?t.children:null,i=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,u=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,s=null!=o?null:e.children,l=null!=a?null:t.children,c=null!=o||null!=i,p=null!=a||null!=u;null!=s&&null==l?this.updateChildren(null,n,r):c&&!p&&this.updateTextContent(""),null!=a?o!==a&&this.updateTextContent(""+a):null!=u?i!==u&&this.updateMarkup(""+u):null!=l&&this.updateChildren(l,n,r)},unmountComponent:function(){switch(this._tag){case"iframe":case"img":case"form":case"video":case"audio":var e=this._wrapperState.listeners;if(e)for(var t=0;t<e.length;t++)e[t].remove();break;case"input":M.unmountWrapper(this);break;case"html":case"head":case"body":L(!1)}if(this.unmountChildren(),E.deleteAllListeners(this._rootNodeID),x.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null,this._wrapperState=null,this._nodeWithLegacyProperties){var n=this._nodeWithLegacyProperties;n._reactInternalComponent=null,this._nodeWithLegacyProperties=null}},getPublicInstance:function(){if(!this._nodeWithLegacyProperties){var e=R.getNode(this._rootNodeID);e._reactInternalComponent=this,e.getDOMNode=r,e.isMounted=o,e.setState=a,e.replaceState=a,e.forceUpdate=a,e.setProps=i,e.replaceProps=u,e.props=this._currentElement.props,this._nodeWithLegacyProperties=e}return this._nodeWithLegacyProperties}},S.measureMethods(m,"ReactDOMComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent"}),k(m.prototype,m.Mixin,I.Mixin),t.exports=m},{10:10,102:102,105:105,11:11,117:117,122:122,123:123,126:126,142:142,146:146,149:149,15:15,151:151,2:2,23:23,26:26,31:31,36:36,41:41,42:42,43:43,47:47,5:5,63:63,64:64,69:69,80:80}],38:[function(e,t,n){"use strict";function r(e){return o.createFactory(e)}var o=e(50),a=(e(51),e(147)),i=a({a:"a",abbr:"abbr",address:"address",area:"area",article:"article",aside:"aside",audio:"audio",b:"b",base:"base",bdi:"bdi",bdo:"bdo",big:"big",blockquote:"blockquote",body:"body",br:"br",button:"button",canvas:"canvas",caption:"caption",cite:"cite",code:"code",col:"col",colgroup:"colgroup",data:"data",datalist:"datalist",dd:"dd",del:"del",details:"details",dfn:"dfn",dialog:"dialog",div:"div",dl:"dl",dt:"dt",em:"em",embed:"embed",fieldset:"fieldset",figcaption:"figcaption",figure:"figure",footer:"footer",form:"form",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",head:"head",header:"header",hgroup:"hgroup",hr:"hr",html:"html",i:"i",iframe:"iframe",img:"img",input:"input",ins:"ins",kbd:"kbd",keygen:"keygen",label:"label",legend:"legend",li:"li",link:"link",main:"main",map:"map",mark:"mark",menu:"menu",menuitem:"menuitem",meta:"meta",meter:"meter",nav:"nav",noscript:"noscript",object:"object",ol:"ol",optgroup:"optgroup",option:"option",output:"output",p:"p",param:"param",picture:"picture",pre:"pre",progress:"progress",q:"q",rp:"rp",rt:"rt",ruby:"ruby",s:"s",samp:"samp",script:"script",section:"section",select:"select",small:"small",source:"source",span:"span",strong:"strong",style:"style",sub:"sub",summary:"summary",sup:"sup",table:"table",tbody:"tbody",td:"td",textarea:"textarea",tfoot:"tfoot",th:"th",thead:"thead",time:"time",title:"title",tr:"tr",track:"track",u:"u",ul:"ul","var":"var",video:"video",wbr:"wbr",circle:"circle",clipPath:"clipPath",defs:"defs",ellipse:"ellipse",g:"g",image:"image",line:"line",linearGradient:"linearGradient",mask:"mask",path:"path",pattern:"pattern",polygon:"polygon",polyline:"polyline",radialGradient:"radialGradient",rect:"rect",stop:"stop",svg:"svg",text:"text",tspan:"tspan"},r);t.exports=i},{147:147,50:50,51:51}],39:[function(e,t,n){"use strict";var r={useCreateElement:!1};t.exports=r},{}],40:[function(e,t,n){"use strict";var r=e(9),o=e(11),a=e(63),i=e(69),u=e(142),s={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},l={updatePropertyByID:function(e,t,n){var r=a.getNode(e);s.hasOwnProperty(t)?u(!1):void 0,null!=n?o.setValueForProperty(r,t,n):o.deleteValueForProperty(r,t)},dangerouslyReplaceNodeWithMarkupByID:function(e,t){var n=a.getNode(e);r.dangerouslyReplaceNodeWithMarkup(n,t)},dangerouslyProcessChildrenUpdates:function(e,t){for(var n=0;n<e.length;n++)e[n].parentNode=a.getNode(e[n].parentID);r.processUpdates(e,t)}};i.measureMethods(l,"ReactDOMIDOperations",{dangerouslyReplaceNodeWithMarkupByID:"dangerouslyReplaceNodeWithMarkupByID",dangerouslyProcessChildrenUpdates:"dangerouslyProcessChildrenUpdates"}),t.exports=l},{11:11,142:142,63:63,69:69,9:9}],41:[function(e,t,n){"use strict";function r(){this._rootNodeID&&d.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=i.executeOnChange(t,e);s.asap(r,this);var o=t.name;if("radio"===t.type&&null!=o){for(var a=u.getNode(this._rootNodeID),l=a;l.parentNode;)l=l.parentNode;for(var d=l.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),f=0;f<d.length;f++){var h=d[f];if(h!==a&&h.form===a.form){var v=u.getID(h);v?void 0:c(!1);var m=p[v];m?void 0:c(!1),s.asap(r,m)}}}return n}var a=e(40),i=e(22),u=e(63),s=e(81),l=e(23),c=e(142),p={},d={getNativeProps:function(e,t,n){var r=i.getValue(t),o=i.getChecked(t),a=l({},t,{defaultChecked:void 0,defaultValue:void 0,value:null!=r?r:e._wrapperState.initialValue,checked:null!=o?o:e._wrapperState.initialChecked,onChange:e._wrapperState.onChange});return a},mountWrapper:function(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:t.defaultChecked||!1,initialValue:null!=n?n:null,onChange:o.bind(e)}},mountReadyWrapper:function(e){p[e._rootNodeID]=e},unmountWrapper:function(e){delete p[e._rootNodeID]},updateWrapper:function(e){var t=e._currentElement.props,n=t.checked;null!=n&&a.updatePropertyByID(e._rootNodeID,"checked",n||!1);var r=i.getValue(t);null!=r&&a.updatePropertyByID(e._rootNodeID,"value",""+r)}};t.exports=d},{142:142,22:22,23:23,40:40,63:63,81:81}],42:[function(e,t,n){"use strict";var r=e(28),o=e(43),a=e(23),i=(e(151),o.valueContextKey),u={mountWrapper:function(e,t,n){var r=n[i],o=null;if(null!=r)if(o=!1,Array.isArray(r)){for(var a=0;a<r.length;a++)if(""+r[a]==""+t.value){o=!0;break}}else o=""+r==""+t.value;e._wrapperState={selected:o}},getNativeProps:function(e,t,n){var o=a({selected:void 0,children:void 0},t);null!=e._wrapperState.selected&&(o.selected=e._wrapperState.selected);var i="";return r.forEach(t.children,function(e){null!=e&&("string"==typeof e||"number"==typeof e)&&(i+=e)}),o.children=i,o}};t.exports=u},{151:151,23:23,28:28,43:43}],43:[function(e,t,n){"use strict";function r(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var e=this._currentElement.props,t=i.getValue(e);null!=t&&o(this,e,t)}}function o(e,t,n){var r,o,a=u.getNode(e._rootNodeID).options;if(t){for(r={},o=0;o<n.length;o++)r[""+n[o]]=!0;for(o=0;o<a.length;o++){var i=r.hasOwnProperty(a[o].value);a[o].selected!==i&&(a[o].selected=i)}}else{for(r=""+n,o=0;o<a.length;o++)if(a[o].value===r)return void(a[o].selected=!0);a.length&&(a[0].selected=!0)}}function a(e){var t=this._currentElement.props,n=i.executeOnChange(t,e);return this._wrapperState.pendingUpdate=!0,s.asap(r,this),n}var i=e(22),u=e(63),s=e(81),l=e(23),c=(e(151),"__ReactDOMSelect_value$"+Math.random().toString(36).slice(2)),p={valueContextKey:c,getNativeProps:function(e,t,n){return l({},t,{onChange:e._wrapperState.onChange,value:void 0})},mountWrapper:function(e,t){var n=i.getValue(t);e._wrapperState={pendingUpdate:!1,initialValue:null!=n?n:t.defaultValue,onChange:a.bind(e),wasMultiple:Boolean(t.multiple)}},processChildContext:function(e,t,n){var r=l({},n);return r[c]=e._wrapperState.initialValue,r},postUpdateWrapper:function(e){var t=e._currentElement.props; e._wrapperState.initialValue=void 0;var n=e._wrapperState.wasMultiple;e._wrapperState.wasMultiple=Boolean(t.multiple);var r=i.getValue(t);null!=r?(e._wrapperState.pendingUpdate=!1,o(e,Boolean(t.multiple),r)):n!==Boolean(t.multiple)&&(null!=t.defaultValue?o(e,Boolean(t.multiple),t.defaultValue):o(e,Boolean(t.multiple),t.multiple?[]:""))}};t.exports=p},{151:151,22:22,23:23,63:63,81:81}],44:[function(e,t,n){"use strict";function r(e,t,n,r){return e===n&&t===r}function o(e){var t=document.selection,n=t.createRange(),r=n.text.length,o=n.duplicate();o.moveToElementText(e),o.setEndPoint("EndToStart",n);var a=o.text.length,i=a+r;return{start:a,end:i}}function a(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var n=t.anchorNode,o=t.anchorOffset,a=t.focusNode,i=t.focusOffset,u=t.getRangeAt(0);try{u.startContainer.nodeType,u.endContainer.nodeType}catch(s){return null}var l=r(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),c=l?0:u.toString().length,p=u.cloneRange();p.selectNodeContents(e),p.setEnd(u.startContainer,u.startOffset);var d=r(p.startContainer,p.startOffset,p.endContainer,p.endOffset),f=d?0:p.toString().length,h=f+c,v=document.createRange();v.setStart(n,o),v.setEnd(a,i);var m=v.collapsed;return{start:m?h:f,end:m?f:h}}function i(e,t){var n,r,o=document.selection.createRange().duplicate();"undefined"==typeof t.end?(n=t.start,r=n):t.start>t.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function u(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,o=Math.min(t.start,r),a="undefined"==typeof t.end?o:Math.min(t.end,r);if(!n.extend&&o>a){var i=a;a=o,o=i}var u=l(e,o),s=l(e,a);if(u&&s){var p=document.createRange();p.setStart(u.node,u.offset),n.removeAllRanges(),o>a?(n.addRange(p),n.extend(s.node,s.offset)):(p.setEnd(s.node,s.offset),n.addRange(p))}}}var s=e(128),l=e(114),c=e(115),p=s.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:p?o:a,setOffsets:p?i:u};t.exports=d},{114:114,115:115,128:128}],45:[function(e,t,n){"use strict";var r=e(49),o=e(78),a=e(82);r.inject();var i={renderToString:o.renderToString,renderToStaticMarkup:o.renderToStaticMarkup,version:a};t.exports=i},{49:49,78:78,82:82}],46:[function(e,t,n){"use strict";var r=e(9),o=e(11),a=e(31),i=e(63),u=e(23),s=e(105),l=e(123),c=(e(126),function(e){});u(c.prototype,{construct:function(e){this._currentElement=e,this._stringText=""+e,this._rootNodeID=null,this._mountIndex=0},mountComponent:function(e,t,n){if(this._rootNodeID=e,t.useCreateElement){var r=n[i.ownerDocumentContextKey],a=r.createElement("span");return o.setAttributeForID(a,e),i.getID(a),l(a,this._stringText),a}var u=s(this._stringText);return t.renderToStaticMarkup?u:"<span "+o.createMarkupForID(e)+">"+u+"</span>"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var o=i.getNode(this._rootNodeID);r.updateTextContent(o,n)}}},unmountComponent:function(){a.unmountIDFromEnvironment(this._rootNodeID)}}),t.exports=c},{105:105,11:11,123:123,126:126,23:23,31:31,63:63,9:9}],47:[function(e,t,n){"use strict";function r(){this._rootNodeID&&c.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=a.executeOnChange(t,e);return u.asap(r,this),n}var a=e(22),i=e(40),u=e(81),s=e(23),l=e(142),c=(e(151),{getNativeProps:function(e,t,n){null!=t.dangerouslySetInnerHTML?l(!1):void 0;var r=s({},t,{defaultValue:void 0,value:void 0,children:e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return r},mountWrapper:function(e,t){var n=t.defaultValue,r=t.children;null!=r&&(null!=n?l(!1):void 0,Array.isArray(r)&&(r.length<=1?void 0:l(!1),r=r[0]),n=""+r),null==n&&(n="");var i=a.getValue(t);e._wrapperState={initialValue:""+(null!=i?i:n),onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=a.getValue(t);null!=n&&i.updatePropertyByID(e._rootNodeID,"value",""+n)}});t.exports=c},{142:142,151:151,22:22,23:23,40:40,81:81}],48:[function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=e(81),a=e(98),i=e(23),u=e(134),s={initialize:u,close:function(){d.isBatchingUpdates=!1}},l={initialize:u,close:o.flushBatchedUpdates.bind(o)},c=[l,s];i(r.prototype,a.Mixin,{getTransactionWrappers:function(){return c}});var p=new r,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,a){var i=d.isBatchingUpdates;d.isBatchingUpdates=!0,i?e(t,n,r,o,a):p.perform(e,null,t,n,r,o,a)}};t.exports=d},{134:134,23:23,81:81,98:98}],49:[function(e,t,n){"use strict";function r(){M||(M=!0,g.EventEmitter.injectReactEventListener(m),g.EventPluginHub.injectEventPluginOrder(u),g.EventPluginHub.injectInstanceHandle(y),g.EventPluginHub.injectMount(C),g.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:x,EnterLeaveEventPlugin:s,ChangeEventPlugin:a,SelectEventPlugin:_,BeforeInputEventPlugin:o}),g.NativeComponent.injectGenericComponentClass(h),g.NativeComponent.injectTextComponentClass(v),g.Class.injectMixin(p),g.DOMProperty.injectDOMPropertyConfig(c),g.DOMProperty.injectDOMPropertyConfig(D),g.EmptyComponent.injectEmptyComponent("noscript"),g.Updates.injectReconcileTransaction(b),g.Updates.injectBatchingStrategy(f),g.RootIndex.injectCreateReactRootIndex(l.canUseDOM?i.createReactRootIndex:E.createReactRootIndex),g.Component.injectEnvironment(d))}var o=e(3),a=e(7),i=e(8),u=e(13),s=e(14),l=e(128),c=e(21),p=e(25),d=e(31),f=e(48),h=e(37),v=e(46),m=e(56),g=e(57),y=e(59),C=e(63),b=e(73),_=e(84),E=e(85),x=e(86),D=e(83),M=!1;t.exports={inject:r}},{128:128,13:13,14:14,21:21,25:25,3:3,31:31,37:37,46:46,48:48,56:56,57:57,59:59,63:63,7:7,73:73,8:8,83:83,84:84,85:85,86:86}],50:[function(e,t,n){"use strict";var r=e(34),o=e(23),a=(e(102),"function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103),i={key:!0,ref:!0,__self:!0,__source:!0},u=function(e,t,n,r,o,i,u){var s={$$typeof:a,type:e,key:t,ref:n,props:u,_owner:i};return s};u.createElement=function(e,t,n){var o,a={},s=null,l=null,c=null,p=null;if(null!=t){l=void 0===t.ref?null:t.ref,s=void 0===t.key?null:""+t.key,c=void 0===t.__self?null:t.__self,p=void 0===t.__source?null:t.__source;for(o in t)t.hasOwnProperty(o)&&!i.hasOwnProperty(o)&&(a[o]=t[o])}var d=arguments.length-2;if(1===d)a.children=n;else if(d>1){for(var f=Array(d),h=0;d>h;h++)f[h]=arguments[h+2];a.children=f}if(e&&e.defaultProps){var v=e.defaultProps;for(o in v)"undefined"==typeof a[o]&&(a[o]=v[o])}return u(e,s,l,c,p,r.current,a)},u.createFactory=function(e){var t=u.createElement.bind(null,e);return t.type=e,t},u.cloneAndReplaceKey=function(e,t){var n=u(e.type,t,e.ref,e._self,e._source,e._owner,e.props);return n},u.cloneAndReplaceProps=function(e,t){var n=u(e.type,e.key,e.ref,e._self,e._source,e._owner,t);return n},u.cloneElement=function(e,t,n){var a,s=o({},e.props),l=e.key,c=e.ref,p=e._self,d=e._source,f=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,f=r.current),void 0!==t.key&&(l=""+t.key);for(a in t)t.hasOwnProperty(a)&&!i.hasOwnProperty(a)&&(s[a]=t[a])}var h=arguments.length-2;if(1===h)s.children=n;else if(h>1){for(var v=Array(h),m=0;h>m;m++)v[m]=arguments[m+2];s.children=v}return u(e.type,l,c,p,d,f,s)},u.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},t.exports=u},{102:102,23:23,34:34}],51:[function(e,t,n){"use strict";function r(){if(p.current){var e=p.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function o(e,t){e._store&&!e._store.validated&&null==e.key&&(e._store.validated=!0,a("uniqueKey",e,t))}function a(e,t,n){var o=r();if(!o){var a="string"==typeof n?n:n.displayName||n.name;a&&(o=" Check the top-level render call using <"+a+">.")}var i=h[e]||(h[e]={});if(i[o])return null;i[o]=!0;var u={parentOrOwner:o,url:" See https://fb.me/react-warning-keys for more information.",childOwner:null};return t&&t._owner&&t._owner!==p.current&&(u.childOwner=" It was passed a child from "+t._owner.getName()+"."),u}function i(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];l.isValidElement(r)&&o(r,t)}else if(l.isValidElement(e))e._store&&(e._store.validated=!0);else if(e){var a=d(e);if(a&&a!==e.entries)for(var i,u=a.call(e);!(i=u.next()).done;)l.isValidElement(i.value)&&o(i.value,t)}}function u(e,t,n,o){for(var a in t)if(t.hasOwnProperty(a)){var i;try{"function"!=typeof t[a]?f(!1):void 0,i=t[a](n,a,e,o)}catch(u){i=u}i instanceof Error&&!(i.message in v)&&(v[i.message]=!0,r())}}function s(e){var t=e.type;if("function"==typeof t){var n=t.displayName||t.name;t.propTypes&&u(n,t.propTypes,e.props,c.prop),"function"==typeof t.getDefaultProps}}var l=e(50),c=e(71),p=(e(70),e(34)),d=(e(102),e(113)),f=e(142),h=(e(151),{}),v={},m={createElement:function(e,t,n){var r="string"==typeof e||"function"==typeof e,o=l.createElement.apply(this,arguments);if(null==o)return o;if(r)for(var a=2;a<arguments.length;a++)i(arguments[a],e);return s(o),o},createFactory:function(e){var t=m.createElement.bind(null,e);return t.type=e,t},cloneElement:function(e,t,n){for(var r=l.cloneElement.apply(this,arguments),o=2;o<arguments.length;o++)i(arguments[o],r.type);return s(r),r}};t.exports=m},{102:102,113:113,142:142,151:151,34:34,50:50,70:70,71:71}],52:[function(e,t,n){"use strict";var r,o=e(50),a=e(53),i=e(74),u=e(23),s={injectEmptyComponent:function(e){r=o.createElement(e)}},l=function(e){this._currentElement=null,this._rootNodeID=null,this._renderedComponent=e(r)};u(l.prototype,{construct:function(e){},mountComponent:function(e,t,n){return a.registerNullComponentID(e),this._rootNodeID=e,i.mountComponent(this._renderedComponent,e,t,n)},receiveComponent:function(){},unmountComponent:function(e,t,n){i.unmountComponent(this._renderedComponent),a.deregisterNullComponentID(this._rootNodeID),this._rootNodeID=null,this._renderedComponent=null}}),l.injection=s,t.exports=l},{23:23,50:50,53:53,74:74}],53:[function(e,t,n){"use strict";function r(e){return!!i[e]}function o(e){i[e]=!0}function a(e){delete i[e]}var i={},u={isNullComponentID:r,registerNullComponentID:o,deregisterNullComponentID:a};t.exports=u},{}],54:[function(e,t,n){"use strict";function r(e,t,n,r){try{return t(n,r)}catch(a){return void(null===o&&(o=a))}}var o=null,a={invokeGuardedCallback:r,invokeGuardedCallbackWithCatch:r,rethrowCaughtError:function(){if(o){var e=o;throw o=null,e}}};t.exports=a},{}],55:[function(e,t,n){"use strict";function r(e){o.enqueueEvents(e),o.processEventQueue(!1)}var o=e(16),a={handleTopLevel:function(e,t,n,a,i){var u=o.extractEvents(e,t,n,a,i);r(u)}};t.exports=a},{16:16}],56:[function(e,t,n){"use strict";function r(e){var t=d.getID(e),n=p.getReactRootIDFromNodeID(t),r=d.findReactContainerForID(n),o=d.getFirstReactDOM(r);return o}function o(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function a(e){i(e)}function i(e){for(var t=d.getFirstReactDOM(v(e.nativeEvent))||window,n=t;n;)e.ancestors.push(n),n=r(n);for(var o=0;o<e.ancestors.length;o++){t=e.ancestors[o];var a=d.getID(t)||"";g._handleTopLevel(e.topLevelType,t,a,e.nativeEvent,v(e.nativeEvent))}}function u(e){var t=m(window);e(t)}var s=e(127),l=e(128),c=e(24),p=e(59),d=e(63),f=e(81),h=e(23),v=e(112),m=e(139);h(o.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),c.addPoolingTo(o,c.twoArgumentPooler);var g={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:l.canUseDOM?window:null,setHandleTopLevel:function(e){g._handleTopLevel=e},setEnabled:function(e){g._enabled=!!e},isEnabled:function(){return g._enabled},trapBubbledEvent:function(e,t,n){var r=n;return r?s.listen(r,t,g.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var r=n;return r?s.capture(r,t,g.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=u.bind(null,e);s.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(g._enabled){var n=o.getPooled(e,t);try{f.batchedUpdates(a,n)}finally{o.release(n)}}}};t.exports=g},{112:112,127:127,128:128,139:139,23:23,24:24,59:59,63:63,81:81}],57:[function(e,t,n){"use strict";var r=e(10),o=e(16),a=e(32),i=e(29),u=e(52),s=e(26),l=e(66),c=e(69),p=e(76),d=e(81),f={Component:a.injection,Class:i.injection,DOMProperty:r.injection,EmptyComponent:u.injection,EventPluginHub:o.injection,EventEmitter:s.injection,NativeComponent:l.injection,Perf:c.injection,RootIndex:p.injection,Updates:d.injection};t.exports=f},{10:10,16:16,26:26,29:29,32:32,52:52,66:66,69:69,76:76,81:81}],58:[function(e,t,n){"use strict";function r(e){return a(document.documentElement,e)}var o=e(44),a=e(131),i=e(136),u=e(137),s={hasSelectionCapabilities:function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)},getSelectionInformation:function(){var e=u();return{focusedElem:e,selectionRange:s.hasSelectionCapabilities(e)?s.getSelection(e):null}},restoreSelection:function(e){var t=u(),n=e.focusedElem,o=e.selectionRange;t!==n&&r(n)&&(s.hasSelectionCapabilities(n)&&s.setSelection(n,o),i(n))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=o.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;if("undefined"==typeof r&&(r=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length);else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var a=e.createTextRange();a.collapse(!0),a.moveStart("character",n),a.moveEnd("character",r-n),a.select()}else o.setOffsets(e,t)}};t.exports=s},{131:131,136:136,137:137,44:44}],59:[function(e,t,n){"use strict";function r(e){return f+e.toString(36)}function o(e,t){return e.charAt(t)===f||t===e.length}function a(e){return""===e||e.charAt(0)===f&&e.charAt(e.length-1)!==f}function i(e,t){return 0===t.indexOf(e)&&o(t,e.length)}function u(e){return e?e.substr(0,e.lastIndexOf(f)):""}function s(e,t){if(a(e)&&a(t)?void 0:d(!1),i(e,t)?void 0:d(!1),e===t)return e;var n,r=e.length+h;for(n=r;n<t.length&&!o(t,n);n++);return t.substr(0,n)}function l(e,t){var n=Math.min(e.length,t.length);if(0===n)return"";for(var r=0,i=0;n>=i;i++)if(o(e,i)&&o(t,i))r=i;else if(e.charAt(i)!==t.charAt(i))break;var u=e.substr(0,r);return a(u)?void 0:d(!1),u}function c(e,t,n,r,o,a){e=e||"",t=t||"",e===t?d(!1):void 0;var l=i(t,e);l||i(e,t)?void 0:d(!1);for(var c=0,p=l?u:s,f=e;;f=p(f,t)){var h;if(o&&f===e||a&&f===t||(h=n(f,l,r)),h===!1||f===t)break;c++<v?void 0:d(!1)}}var p=e(76),d=e(142),f=".",h=f.length,v=1e4,m={createReactRootID:function(){return r(p.createReactRootIndex())},createReactID:function(e,t){return e+t},getReactRootIDFromNodeID:function(e){if(e&&e.charAt(0)===f&&e.length>1){var t=e.indexOf(f,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,o){var a=l(e,t);a!==e&&c(e,a,n,r,!1,!0),a!==t&&c(a,t,n,o,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(c("",e,t,n,!0,!1),c(e,"",t,n,!1,!0))},traverseTwoPhaseSkipTarget:function(e,t,n){e&&(c("",e,t,n,!0,!0),c(e,"",t,n,!0,!0))},traverseAncestors:function(e,t,n){c("",e,t,n,!0,!1)},getFirstCommonAncestorID:l,_getNextDescendantID:s,isAncestorIDOf:i,SEPARATOR:f};t.exports=m},{142:142,76:76}],60:[function(e,t,n){"use strict";var r={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};t.exports=r},{}],61:[function(e,t,n){"use strict";var r=e(28),o=e(30),a=e(29),i=e(38),u=e(50),s=(e(51),e(72)),l=e(82),c=e(23),p=e(119),d=u.createElement,f=u.createFactory,h=u.cloneElement,v={Children:{map:r.map,forEach:r.forEach,count:r.count,toArray:r.toArray,only:p},Component:o,createElement:d,cloneElement:h,isValidElement:u.isValidElement,PropTypes:s,createClass:a.createClass,createFactory:f,createMixin:function(e){return e},DOM:i,version:l,__spread:c};t.exports=v},{119:119,23:23,28:28,29:29,30:30,38:38,50:50,51:51,72:72,82:82}],62:[function(e,t,n){"use strict";var r=e(101),o=/\/?>/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return e.replace(o," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=r(e);return o===n}};t.exports=a},{101:101}],63:[function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;n>r;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function o(e){return e?e.nodeType===W?e.documentElement:e.firstChild:null}function a(e){var t=o(e);return t&&Q.getID(t)}function i(e){var t=u(e);if(t)if(V.hasOwnProperty(t)){var n=V[t];n!==e&&(p(n,t)?L(!1):void 0,V[t]=e)}else V[t]=e;return t}function u(e){return e&&e.getAttribute&&e.getAttribute(B)||""}function s(e,t){var n=u(e);n!==t&&delete V[n],e.setAttribute(B,t),V[t]=e}function l(e){return V.hasOwnProperty(e)&&p(V[e],e)||(V[e]=Q.findReactNodeByID(e)),V[e]}function c(e){var t=N.get(e)._rootNodeID;return D.isNullComponentID(t)?null:(V.hasOwnProperty(t)&&p(V[t],t)||(V[t]=Q.findReactNodeByID(t)),V[t])}function p(e,t){if(e){u(e)!==t?L(!1):void 0;var n=Q.findReactContainerForID(t);if(n&&O(n,e))return!0}return!1}function d(e){delete V[e]}function f(e){var t=V[e];return t&&p(t,e)?void(G=t):!1}function h(e){G=null,M.traverseAncestors(e,f);var t=G;return G=null,t}function v(e,t,n,r,o,a){E.useCreateElement&&(a=T({},a),n.nodeType===W?a[H]=n:a[H]=n.ownerDocument);var i=R.mountComponent(e,t,r,a);e._renderedComponent._topLevelWrapper=e,Q._mountImageIntoNode(i,n,o,r)}function m(e,t,n,r,o){var a=S.ReactReconcileTransaction.getPooled(r);a.perform(v,null,e,t,n,a,r,o),S.ReactReconcileTransaction.release(a)}function g(e,t){for(R.unmountComponent(e),t.nodeType===W&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function y(e){var t=a(e);return t?t!==M.getReactRootIDFromNodeID(t):!1}function C(e){for(;e&&e.parentNode!==e;e=e.parentNode)if(1===e.nodeType){var t=u(e);if(t){var n,r=M.getReactRootIDFromNodeID(t),o=e;do if(n=u(o),o=o.parentNode,null==o)return null;while(n!==r);if(o===Y[r])return e}}return null}var b=e(10),_=e(26),E=(e(34),e(39)),x=e(50),D=e(53),M=e(59),N=e(60),P=e(62),w=e(69),R=e(74),I=e(80),S=e(81),T=e(23),k=e(135),O=e(131),A=e(116),L=e(142),U=e(122),F=e(124),B=(e(126),e(151),b.ID_ATTRIBUTE_NAME),V={},j=1,W=9,K=11,H="__ReactMount_ownerDocument$"+Math.random().toString(36).slice(2),q={},Y={},z=[],G=null,X=function(){};X.prototype.isReactComponent={},X.prototype.render=function(){return this.props};var Q={TopLevelWrapper:X,_instancesByReactRootID:q,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return Q.scrollMonitor(n,function(){I.enqueueElementInternal(e,t),r&&I.enqueueCallbackInternal(e,r)}),e},_registerComponent:function(e,t){!t||t.nodeType!==j&&t.nodeType!==W&&t.nodeType!==K?L(!1):void 0,_.ensureScrollValueMonitoring();var n=Q.registerContainer(t);return q[n]=e,n},_renderNewRootComponent:function(e,t,n,r){var o=A(e,null),a=Q._registerComponent(o,t);return S.batchedUpdates(m,o,a,t,n,r),o},renderSubtreeIntoContainer:function(e,t,n,r){return null==e||null==e._reactInternalInstance?L(!1):void 0,Q._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){x.isValidElement(t)?void 0:L(!1);var i=new x(X,null,null,null,null,null,t),s=q[a(n)];if(s){var l=s._currentElement,c=l.props;if(F(c,t)){var p=s._renderedComponent.getPublicInstance(),d=r&&function(){r.call(p)};return Q._updateRootComponent(s,i,n,d),p}Q.unmountComponentAtNode(n)}var f=o(n),h=f&&!!u(f),v=y(n),m=h&&!s&&!v,g=Q._renderNewRootComponent(i,n,m,null!=e?e._reactInternalInstance._processChildContext(e._reactInternalInstance._context):k)._renderedComponent.getPublicInstance();return r&&r.call(g),g},render:function(e,t,n){return Q._renderSubtreeIntoContainer(null,e,t,n)},registerContainer:function(e){var t=a(e);return t&&(t=M.getReactRootIDFromNodeID(t)),t||(t=M.createReactRootID()),Y[t]=e,t},unmountComponentAtNode:function(e){!e||e.nodeType!==j&&e.nodeType!==W&&e.nodeType!==K?L(!1):void 0;var t=a(e),n=q[t];if(!n){var r=(y(e),u(e));return r&&r===M.getReactRootIDFromNodeID(r),!1}return S.batchedUpdates(g,n,e),delete q[t],delete Y[t],!0},findReactContainerForID:function(e){var t=M.getReactRootIDFromNodeID(e),n=Y[t];return n},findReactNodeByID:function(e){var t=Q.findReactContainerForID(e);return Q.findComponentRoot(t,e)},getFirstReactDOM:function(e){return C(e)},findComponentRoot:function(e,t){var n=z,r=0,o=h(t)||e;for(n[0]=o.firstChild,n.length=1;r<n.length;){for(var a,i=n[r++];i;){var u=Q.getID(i);u?t===u?a=i:M.isAncestorIDOf(u,t)&&(n.length=r=0,n.push(i.firstChild)):n.push(i.firstChild),i=i.nextSibling}if(a)return n.length=0,a}n.length=0,L(!1)},_mountImageIntoNode:function(e,t,n,a){if(!t||t.nodeType!==j&&t.nodeType!==W&&t.nodeType!==K?L(!1):void 0,n){var i=o(t);if(P.canReuseMarkup(e,i))return;var u=i.getAttribute(P.CHECKSUM_ATTR_NAME);i.removeAttribute(P.CHECKSUM_ATTR_NAME);var s=i.outerHTML;i.setAttribute(P.CHECKSUM_ATTR_NAME,u);var l=e,c=r(l,s);" (client) "+l.substring(c-20,c+20)+"\n (server) "+s.substring(c-20,c+20),t.nodeType===W?L(!1):void 0}if(t.nodeType===W?L(!1):void 0,a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);t.appendChild(e)}else U(t,e)},ownerDocumentContextKey:H,getReactRootID:a,getID:i,setID:s,getNode:l,getNodeFromInstance:c,isValid:p,purgeID:d};w.measureMethods(Q,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"}),t.exports=Q},{10:10,116:116,122:122,124:124,126:126,131:131,135:135,142:142,151:151,23:23,26:26,34:34,39:39,50:50,53:53,59:59,60:60,62:62,69:69,74:74,80:80,81:81}],64:[function(e,t,n){"use strict";function r(e,t,n){m.push({parentID:e,parentNode:null,type:p.INSERT_MARKUP,markupIndex:g.push(t)-1,content:null,fromIndex:null,toIndex:n})}function o(e,t,n){m.push({parentID:e,parentNode:null,type:p.MOVE_EXISTING,markupIndex:null,content:null,fromIndex:t,toIndex:n})}function a(e,t){m.push({parentID:e,parentNode:null,type:p.REMOVE_NODE,markupIndex:null,content:null,fromIndex:t,toIndex:null})}function i(e,t){m.push({parentID:e,parentNode:null,type:p.SET_MARKUP,markupIndex:null,content:t,fromIndex:null,toIndex:null})}function u(e,t){m.push({parentID:e,parentNode:null,type:p.TEXT_CONTENT,markupIndex:null,content:t,fromIndex:null,toIndex:null})}function s(){m.length&&(c.processChildrenUpdates(m,g),l())}function l(){m.length=0,g.length=0}var c=e(32),p=e(65),d=(e(34),e(74)),f=e(27),h=e(107),v=0,m=[],g=[],y={Mixin:{_reconcilerInstantiateChildren:function(e,t,n){return f.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,r){var o;return o=h(t),f.updateChildren(e,o,n,r)},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var o=[],a=0;for(var i in r)if(r.hasOwnProperty(i)){var u=r[i],s=this._rootNodeID+i,l=d.mountComponent(u,s,t,n);u._mountIndex=a++,o.push(l)}return o},updateTextContent:function(e){v++;var t=!0;try{var n=this._renderedChildren;f.unmountChildren(n);for(var r in n)n.hasOwnProperty(r)&&this._unmountChild(n[r]);this.setTextContent(e),t=!1}finally{v--,v||(t?l():s())}},updateMarkup:function(e){v++;var t=!0;try{var n=this._renderedChildren;f.unmountChildren(n);for(var r in n)n.hasOwnProperty(r)&&this._unmountChildByName(n[r],r);this.setMarkup(e),t=!1}finally{v--,v||(t?l():s())}},updateChildren:function(e,t,n){v++;var r=!0;try{this._updateChildren(e,t,n),r=!1}finally{v--,v||(r?l():s())}},_updateChildren:function(e,t,n){var r=this._renderedChildren,o=this._reconcilerUpdateChildren(r,e,t,n);if(this._renderedChildren=o,o||r){var a,i=0,u=0;for(a in o)if(o.hasOwnProperty(a)){var s=r&&r[a],l=o[a];s===l?(this.moveChild(s,u,i),i=Math.max(s._mountIndex,i),s._mountIndex=u):(s&&(i=Math.max(s._mountIndex,i),this._unmountChild(s)),this._mountChildByNameAtIndex(l,a,u,t,n)),u++}for(a in r)!r.hasOwnProperty(a)||o&&o.hasOwnProperty(a)||this._unmountChild(r[a])}},unmountChildren:function(){var e=this._renderedChildren;f.unmountChildren(e),this._renderedChildren=null},moveChild:function(e,t,n){e._mountIndex<n&&o(this._rootNodeID,e._mountIndex,t)},createChild:function(e,t){r(this._rootNodeID,t,e._mountIndex)},removeChild:function(e){a(this._rootNodeID,e._mountIndex)},setTextContent:function(e){u(this._rootNodeID,e)},setMarkup:function(e){i(this._rootNodeID,e)},_mountChildByNameAtIndex:function(e,t,n,r,o){var a=this._rootNodeID+t,i=d.mountComponent(e,a,r,o);e._mountIndex=n,this.createChild(e,i)},_unmountChild:function(e){this.removeChild(e),e._mountIndex=null}}};t.exports=y},{107:107,27:27,32:32,34:34,65:65,74:74}],65:[function(e,t,n){"use strict";var r=e(145),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});t.exports=o},{145:145}],66:[function(e,t,n){"use strict";function r(e){if("function"==typeof e.type)return e.type;var t=e.type,n=p[t];return null==n&&(p[t]=n=l(t)),n}function o(e){return c?void 0:s(!1),new c(e.type,e.props)}function a(e){return new d(e)}function i(e){return e instanceof d}var u=e(23),s=e(142),l=null,c=null,p={},d=null,f={injectGenericComponentClass:function(e){c=e},injectTextComponentClass:function(e){d=e},injectComponentClasses:function(e){u(p,e)}},h={getComponentClassForElement:r,createInternalComponent:o,createInstanceForText:a,isTextComponent:i,injection:f};t.exports=h},{142:142,23:23}],67:[function(e,t,n){"use strict";function r(e,t){}var o=(e(151),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){r(e,"forceUpdate")},enqueueReplaceState:function(e,t){r(e,"replaceState")},enqueueSetState:function(e,t){r(e,"setState")},enqueueSetProps:function(e,t){r(e,"setProps")},enqueueReplaceProps:function(e,t){r(e,"replaceProps")}});t.exports=o},{151:151}],68:[function(e,t,n){"use strict";var r=e(142),o={isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,t,n){o.isValidOwner(n)?void 0:r(!1),n.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,n){o.isValidOwner(n)?void 0:r(!1),n.getPublicInstance().refs[t]===e.getPublicInstance()&&n.detachRef(t)}};t.exports=o},{142:142}],69:[function(e,t,n){"use strict";function r(e,t,n){return n}var o={enableMeasure:!1,storedMeasure:r,measureMethods:function(e,t,n){},measure:function(e,t,n){return n},injection:{injectMeasure:function(e){o.storedMeasure=e}}};t.exports=o},{}],70:[function(e,t,n){"use strict";var r={};t.exports=r},{}],71:[function(e,t,n){"use strict";var r=e(145),o=r({prop:null,context:null,childContext:null});t.exports=o},{145:145}],72:[function(e,t,n){"use strict";function r(e){function t(t,n,r,o,a,i){if(o=o||E,i=i||r,null==n[r]){var u=C[a];return t?new Error("Required "+u+" `"+i+"` was not specified in "+("`"+o+"`.")):null}return e(n,r,o,a,i)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function o(e){function t(t,n,r,o,a){var i=t[n],u=v(i);if(u!==e){var s=C[o],l=m(i);return new Error("Invalid "+s+" `"+a+"` of type "+("`"+l+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return r(t)}function a(){return r(b.thatReturns(null))}function i(e){function t(t,n,r,o,a){var i=t[n];if(!Array.isArray(i)){var u=C[o],s=v(i);return new Error("Invalid "+u+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l<i.length;l++){var c=e(i,l,r,o,a+"["+l+"]");if(c instanceof Error)return c}return null}return r(t)}function u(){function e(e,t,n,r,o){if(!y.isValidElement(e[t])){var a=C[r];return new Error("Invalid "+a+" `"+o+"` supplied to "+("`"+n+"`, expected a single ReactElement."))}return null}return r(e)}function s(e){function t(t,n,r,o,a){if(!(t[n]instanceof e)){var i=C[o],u=e.name||E,s=g(t[n]);return new Error("Invalid "+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("instance of `"+u+"`."))}return null}return r(t)}function l(e){function t(t,n,r,o,a){for(var i=t[n],u=0;u<e.length;u++)if(i===e[u])return null;var s=C[o],l=JSON.stringify(e);return new Error("Invalid "+s+" `"+a+"` of value `"+i+"` "+("supplied to `"+r+"`, expected one of "+l+"."))}return r(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOf, expected an instance of array.")})}function c(e){function t(t,n,r,o,a){var i=t[n],u=v(i);if("object"!==u){var s=C[o];return new Error("Invalid "+s+" `"+a+"` of type "+("`"+u+"` supplied to `"+r+"`, expected an object."))}for(var l in i)if(i.hasOwnProperty(l)){var c=e(i,l,r,o,a+"."+l);if(c instanceof Error)return c}return null}return r(t)}function p(e){function t(t,n,r,o,a){for(var i=0;i<e.length;i++){var u=e[i];if(null==u(t,n,r,o,a))return null}var s=C[o];return new Error("Invalid "+s+" `"+a+"` supplied to "+("`"+r+"`."))}return r(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOfType, expected an instance of array.")})}function d(){function e(e,t,n,r,o){if(!h(e[t])){var a=C[r];return new Error("Invalid "+a+" `"+o+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return r(e)}function f(e){function t(t,n,r,o,a){var i=t[n],u=v(i);if("object"!==u){var s=C[o];return new Error("Invalid "+s+" `"+a+"` of type `"+u+"` "+("supplied to `"+r+"`, expected `object`."))}for(var l in e){var c=e[l];if(c){var p=c(i,l,r,o,a+"."+l);if(p)return p}}return null}return r(t)}function h(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(h);if(null===e||y.isValidElement(e))return!0;var t=_(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!h(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!h(o[1]))return!1}return!0;default:return!1}}function v(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":t}function m(e){var t=v(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function g(e){return e.constructor&&e.constructor.name?e.constructor.name:"<<anonymous>>"}var y=e(50),C=e(70),b=e(134),_=e(113),E="<<anonymous>>",x={array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),any:a(),arrayOf:i,element:u(),instanceOf:s,node:d(),objectOf:c,oneOf:l,oneOfType:p,shape:f};t.exports=x},{113:113,134:134,50:50,70:70}],73:[function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=o.getPooled(null),this.useCreateElement=!e&&u.useCreateElement}var o=e(6),a=e(24),i=e(26),u=e(39),s=e(58),l=e(98),c=e(23),p={initialize:s.getSelectionInformation,close:s.restoreSelection},d={initialize:function(){var e=i.isEnabled();return i.setEnabled(!1),e},close:function(e){i.setEnabled(e)}},f={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},h=[p,d,f],v={getTransactionWrappers:function(){return h},getReactMountReady:function(){return this.reactMountReady},destructor:function(){o.release(this.reactMountReady),this.reactMountReady=null}};c(r.prototype,l.Mixin,v),a.addPoolingTo(r),t.exports=r},{23:23,24:24,26:26,39:39,58:58,6:6,98:98}],74:[function(e,t,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=e(75),a={mountComponent:function(e,t,n,o){var a=e.mountComponent(t,n,o);return e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e),a},unmountComponent:function(e){o.detachRefs(e,e._currentElement),e.unmountComponent()},receiveComponent:function(e,t,n,a){var i=e._currentElement;if(t!==i||a!==e._context){var u=o.shouldUpdateRefs(i,t);u&&o.detachRefs(e,i),e.receiveComponent(t,n,a),u&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e); }},performUpdateIfNecessary:function(e,t){e.performUpdateIfNecessary(t)}};t.exports=a},{75:75}],75:[function(e,t,n){"use strict";function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):a.addComponentAsRefTo(t,e,n)}function o(e,t,n){"function"==typeof e?e(null):a.removeComponentAsRefFrom(t,e,n)}var a=e(68),i={};i.attachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&r(n,e,t._owner)}},i.shouldUpdateRefs=function(e,t){var n=null===e||e===!1,r=null===t||t===!1;return n||r||t._owner!==e._owner||t.ref!==e.ref},i.detachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&o(n,e,t._owner)}},t.exports=i},{68:68}],76:[function(e,t,n){"use strict";var r={injectCreateReactRootIndex:function(e){o.createReactRootIndex=e}},o={createReactRootIndex:null,injection:r};t.exports=o},{}],77:[function(e,t,n){"use strict";var r={isBatchingUpdates:!1,batchedUpdates:function(e){}};t.exports=r},{}],78:[function(e,t,n){"use strict";function r(e){i.isValidElement(e)?void 0:h(!1);var t;try{p.injection.injectBatchingStrategy(l);var n=u.createReactRootID();return t=c.getPooled(!1),t.perform(function(){var r=f(e,null),o=r.mountComponent(n,t,d);return s.addChecksumToMarkup(o)},null)}finally{c.release(t),p.injection.injectBatchingStrategy(a)}}function o(e){i.isValidElement(e)?void 0:h(!1);var t;try{p.injection.injectBatchingStrategy(l);var n=u.createReactRootID();return t=c.getPooled(!0),t.perform(function(){var r=f(e,null);return r.mountComponent(n,t,d)},null)}finally{c.release(t),p.injection.injectBatchingStrategy(a)}}var a=e(48),i=e(50),u=e(59),s=e(62),l=e(77),c=e(79),p=e(81),d=e(135),f=e(116),h=e(142);t.exports={renderToString:r,renderToStaticMarkup:o}},{116:116,135:135,142:142,48:48,50:50,59:59,62:62,77:77,79:79,81:81}],79:[function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.reactMountReady=a.getPooled(null),this.useCreateElement=!1}var o=e(24),a=e(6),i=e(98),u=e(23),s=e(134),l={initialize:function(){this.reactMountReady.reset()},close:s},c=[l],p={getTransactionWrappers:function(){return c},getReactMountReady:function(){return this.reactMountReady},destructor:function(){a.release(this.reactMountReady),this.reactMountReady=null}};u(r.prototype,i.Mixin,p),o.addPoolingTo(r),t.exports=r},{134:134,23:23,24:24,6:6,98:98}],80:[function(e,t,n){"use strict";function r(e){u.enqueueUpdate(e)}function o(e,t){var n=i.get(e);return n?n:null}var a=(e(34),e(50)),i=e(60),u=e(81),s=e(23),l=e(142),c=(e(151),{isMounted:function(e){var t=i.get(e);return t?!!t._renderedComponent:!1},enqueueCallback:function(e,t){"function"!=typeof t?l(!1):void 0;var n=o(e);return n?(n._pendingCallbacks?n._pendingCallbacks.push(t):n._pendingCallbacks=[t],void r(n)):null},enqueueCallbackInternal:function(e,t){"function"!=typeof t?l(!1):void 0,e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=o(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=o(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=o(e,"setState");if(n){var a=n._pendingStateQueue||(n._pendingStateQueue=[]);a.push(t),r(n)}},enqueueSetProps:function(e,t){var n=o(e,"setProps");n&&c.enqueueSetPropsInternal(n,t)},enqueueSetPropsInternal:function(e,t){var n=e._topLevelWrapper;n?void 0:l(!1);var o=n._pendingElement||n._currentElement,i=o.props,u=s({},i.props,t);n._pendingElement=a.cloneAndReplaceProps(o,a.cloneAndReplaceProps(i,u)),r(n)},enqueueReplaceProps:function(e,t){var n=o(e,"replaceProps");n&&c.enqueueReplacePropsInternal(n,t)},enqueueReplacePropsInternal:function(e,t){var n=e._topLevelWrapper;n?void 0:l(!1);var o=n._pendingElement||n._currentElement,i=o.props;n._pendingElement=a.cloneAndReplaceProps(o,a.cloneAndReplaceProps(i,t)),r(n)},enqueueElementInternal:function(e,t){e._pendingElement=t,r(e)}});t.exports=c},{142:142,151:151,23:23,34:34,50:50,60:60,81:81}],81:[function(e,t,n){"use strict";function r(){N.ReactReconcileTransaction&&b?void 0:m(!1)}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=c.getPooled(),this.reconcileTransaction=N.ReactReconcileTransaction.getPooled(!1)}function a(e,t,n,o,a,i){r(),b.batchedUpdates(e,t,n,o,a,i)}function i(e,t){return e._mountOrder-t._mountOrder}function u(e){var t=e.dirtyComponentsLength;t!==g.length?m(!1):void 0,g.sort(i);for(var n=0;t>n;n++){var r=g[n],o=r._pendingCallbacks;if(r._pendingCallbacks=null,f.performUpdateIfNecessary(r,e.reconcileTransaction),o)for(var a=0;a<o.length;a++)e.callbackQueue.enqueue(o[a],r.getPublicInstance())}}function s(e){return r(),b.isBatchingUpdates?void g.push(e):void b.batchedUpdates(s,e)}function l(e,t){b.isBatchingUpdates?void 0:m(!1),y.enqueue(e,t),C=!0}var c=e(6),p=e(24),d=e(69),f=e(74),h=e(98),v=e(23),m=e(142),g=[],y=c.getPooled(),C=!1,b=null,_={initialize:function(){this.dirtyComponentsLength=g.length},close:function(){this.dirtyComponentsLength!==g.length?(g.splice(0,this.dirtyComponentsLength),D()):g.length=0}},E={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},x=[_,E];v(o.prototype,h.Mixin,{getTransactionWrappers:function(){return x},destructor:function(){this.dirtyComponentsLength=null,c.release(this.callbackQueue),this.callbackQueue=null,N.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return h.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),p.addPoolingTo(o);var D=function(){for(;g.length||C;){if(g.length){var e=o.getPooled();e.perform(u,null,e),o.release(e)}if(C){C=!1;var t=y;y=c.getPooled(),t.notifyAll(),c.release(t)}}};D=d.measure("ReactUpdates","flushBatchedUpdates",D);var M={injectReconcileTransaction:function(e){e?void 0:m(!1),N.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){e?void 0:m(!1),"function"!=typeof e.batchedUpdates?m(!1):void 0,"boolean"!=typeof e.isBatchingUpdates?m(!1):void 0,b=e}},N={ReactReconcileTransaction:null,batchedUpdates:a,enqueueUpdate:s,flushBatchedUpdates:D,injection:M,asap:l};t.exports=N},{142:142,23:23,24:24,6:6,69:69,74:74,98:98}],82:[function(e,t,n){"use strict";t.exports="0.14.2"},{}],83:[function(e,t,n){"use strict";var r=e(10),o=r.injection.MUST_USE_ATTRIBUTE,a={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},i={Properties:{clipPath:o,cx:o,cy:o,d:o,dx:o,dy:o,fill:o,fillOpacity:o,fontFamily:o,fontSize:o,fx:o,fy:o,gradientTransform:o,gradientUnits:o,markerEnd:o,markerMid:o,markerStart:o,offset:o,opacity:o,patternContentUnits:o,patternUnits:o,points:o,preserveAspectRatio:o,r:o,rx:o,ry:o,spreadMethod:o,stopColor:o,stopOpacity:o,stroke:o,strokeDasharray:o,strokeLinecap:o,strokeOpacity:o,strokeWidth:o,textAnchor:o,transform:o,version:o,viewBox:o,x1:o,x2:o,x:o,xlinkActuate:o,xlinkArcrole:o,xlinkHref:o,xlinkRole:o,xlinkShow:o,xlinkTitle:o,xlinkType:o,xmlBase:o,xmlLang:o,xmlSpace:o,y1:o,y2:o,y:o},DOMAttributeNamespaces:{xlinkActuate:a.xlink,xlinkArcrole:a.xlink,xlinkHref:a.xlink,xlinkRole:a.xlink,xlinkShow:a.xlink,xlinkTitle:a.xlink,xlinkType:a.xlink,xmlBase:a.xml,xmlLang:a.xml,xmlSpace:a.xml},DOMAttributeNames:{clipPath:"clip-path",fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeLinecap:"stroke-linecap",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlLang:"xml:lang",xmlSpace:"xml:space"}};t.exports=i},{10:10}],84:[function(e,t,n){"use strict";function r(e){if("selectionStart"in e&&s.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function o(e,t){if(b||null==g||g!==c())return null;var n=r(g);if(!C||!f(C,n)){C=n;var o=l.getPooled(m.select,y,e,t);return o.type="select",o.target=g,i.accumulateTwoPhaseDispatches(o),o}return null}var a=e(15),i=e(19),u=e(128),s=e(58),l=e(90),c=e(137),p=e(118),d=e(146),f=e(149),h=a.topLevelTypes,v=u.canUseDOM&&"documentMode"in document&&document.documentMode<=11,m={select:{phasedRegistrationNames:{bubbled:d({onSelect:null}),captured:d({onSelectCapture:null})},dependencies:[h.topBlur,h.topContextMenu,h.topFocus,h.topKeyDown,h.topMouseDown,h.topMouseUp,h.topSelectionChange]}},g=null,y=null,C=null,b=!1,_=!1,E=d({onSelect:null}),x={eventTypes:m,extractEvents:function(e,t,n,r,a){if(!_)return null;switch(e){case h.topFocus:(p(t)||"true"===t.contentEditable)&&(g=t,y=n,C=null);break;case h.topBlur:g=null,y=null,C=null;break;case h.topMouseDown:b=!0;break;case h.topContextMenu:case h.topMouseUp:return b=!1,o(r,a);case h.topSelectionChange:if(v)break;case h.topKeyDown:case h.topKeyUp:return o(r,a)}return null},didPutListener:function(e,t,n){t===E&&(_=!0)}};t.exports=x},{118:118,128:128,137:137,146:146,149:149,15:15,19:19,58:58,90:90}],85:[function(e,t,n){"use strict";var r=Math.pow(2,53),o={createReactRootIndex:function(){return Math.ceil(Math.random()*r)}};t.exports=o},{}],86:[function(e,t,n){"use strict";var r=e(15),o=e(127),a=e(19),i=e(63),u=e(87),s=e(90),l=e(91),c=e(93),p=e(94),d=e(89),f=e(95),h=e(96),v=e(97),m=e(134),g=e(109),y=e(142),C=e(146),b=r.topLevelTypes,_={abort:{phasedRegistrationNames:{bubbled:C({onAbort:!0}),captured:C({onAbortCapture:!0})}},blur:{phasedRegistrationNames:{bubbled:C({onBlur:!0}),captured:C({onBlurCapture:!0})}},canPlay:{phasedRegistrationNames:{bubbled:C({onCanPlay:!0}),captured:C({onCanPlayCapture:!0})}},canPlayThrough:{phasedRegistrationNames:{bubbled:C({onCanPlayThrough:!0}),captured:C({onCanPlayThroughCapture:!0})}},click:{phasedRegistrationNames:{bubbled:C({onClick:!0}),captured:C({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:C({onContextMenu:!0}),captured:C({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:C({onCopy:!0}),captured:C({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:C({onCut:!0}),captured:C({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:C({onDoubleClick:!0}),captured:C({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:C({onDrag:!0}),captured:C({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:C({onDragEnd:!0}),captured:C({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:C({onDragEnter:!0}),captured:C({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:C({onDragExit:!0}),captured:C({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:C({onDragLeave:!0}),captured:C({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:C({onDragOver:!0}),captured:C({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:C({onDragStart:!0}),captured:C({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:C({onDrop:!0}),captured:C({onDropCapture:!0})}},durationChange:{phasedRegistrationNames:{bubbled:C({onDurationChange:!0}),captured:C({onDurationChangeCapture:!0})}},emptied:{phasedRegistrationNames:{bubbled:C({onEmptied:!0}),captured:C({onEmptiedCapture:!0})}},encrypted:{phasedRegistrationNames:{bubbled:C({onEncrypted:!0}),captured:C({onEncryptedCapture:!0})}},ended:{phasedRegistrationNames:{bubbled:C({onEnded:!0}),captured:C({onEndedCapture:!0})}},error:{phasedRegistrationNames:{bubbled:C({onError:!0}),captured:C({onErrorCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:C({onFocus:!0}),captured:C({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:C({onInput:!0}),captured:C({onInputCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:C({onKeyDown:!0}),captured:C({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:C({onKeyPress:!0}),captured:C({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:C({onKeyUp:!0}),captured:C({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:C({onLoad:!0}),captured:C({onLoadCapture:!0})}},loadedData:{phasedRegistrationNames:{bubbled:C({onLoadedData:!0}),captured:C({onLoadedDataCapture:!0})}},loadedMetadata:{phasedRegistrationNames:{bubbled:C({onLoadedMetadata:!0}),captured:C({onLoadedMetadataCapture:!0})}},loadStart:{phasedRegistrationNames:{bubbled:C({onLoadStart:!0}),captured:C({onLoadStartCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:C({onMouseDown:!0}),captured:C({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:C({onMouseMove:!0}),captured:C({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:C({onMouseOut:!0}),captured:C({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:C({onMouseOver:!0}),captured:C({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:C({onMouseUp:!0}),captured:C({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:C({onPaste:!0}),captured:C({onPasteCapture:!0})}},pause:{phasedRegistrationNames:{bubbled:C({onPause:!0}),captured:C({onPauseCapture:!0})}},play:{phasedRegistrationNames:{bubbled:C({onPlay:!0}),captured:C({onPlayCapture:!0})}},playing:{phasedRegistrationNames:{bubbled:C({onPlaying:!0}),captured:C({onPlayingCapture:!0})}},progress:{phasedRegistrationNames:{bubbled:C({onProgress:!0}),captured:C({onProgressCapture:!0})}},rateChange:{phasedRegistrationNames:{bubbled:C({onRateChange:!0}),captured:C({onRateChangeCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:C({onReset:!0}),captured:C({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:C({onScroll:!0}),captured:C({onScrollCapture:!0})}},seeked:{phasedRegistrationNames:{bubbled:C({onSeeked:!0}),captured:C({onSeekedCapture:!0})}},seeking:{phasedRegistrationNames:{bubbled:C({onSeeking:!0}),captured:C({onSeekingCapture:!0})}},stalled:{phasedRegistrationNames:{bubbled:C({onStalled:!0}),captured:C({onStalledCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:C({onSubmit:!0}),captured:C({onSubmitCapture:!0})}},suspend:{phasedRegistrationNames:{bubbled:C({onSuspend:!0}),captured:C({onSuspendCapture:!0})}},timeUpdate:{phasedRegistrationNames:{bubbled:C({onTimeUpdate:!0}),captured:C({onTimeUpdateCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:C({onTouchCancel:!0}),captured:C({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:C({onTouchEnd:!0}),captured:C({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:C({onTouchMove:!0}),captured:C({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:C({onTouchStart:!0}),captured:C({onTouchStartCapture:!0})}},volumeChange:{phasedRegistrationNames:{bubbled:C({onVolumeChange:!0}),captured:C({onVolumeChangeCapture:!0})}},waiting:{phasedRegistrationNames:{bubbled:C({onWaiting:!0}),captured:C({onWaitingCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:C({onWheel:!0}),captured:C({onWheelCapture:!0})}}},E={topAbort:_.abort,topBlur:_.blur,topCanPlay:_.canPlay,topCanPlayThrough:_.canPlayThrough,topClick:_.click,topContextMenu:_.contextMenu,topCopy:_.copy,topCut:_.cut,topDoubleClick:_.doubleClick,topDrag:_.drag,topDragEnd:_.dragEnd,topDragEnter:_.dragEnter,topDragExit:_.dragExit,topDragLeave:_.dragLeave,topDragOver:_.dragOver,topDragStart:_.dragStart,topDrop:_.drop,topDurationChange:_.durationChange,topEmptied:_.emptied,topEncrypted:_.encrypted,topEnded:_.ended,topError:_.error,topFocus:_.focus,topInput:_.input,topKeyDown:_.keyDown,topKeyPress:_.keyPress,topKeyUp:_.keyUp,topLoad:_.load,topLoadedData:_.loadedData,topLoadedMetadata:_.loadedMetadata,topLoadStart:_.loadStart,topMouseDown:_.mouseDown,topMouseMove:_.mouseMove,topMouseOut:_.mouseOut,topMouseOver:_.mouseOver,topMouseUp:_.mouseUp,topPaste:_.paste,topPause:_.pause,topPlay:_.play,topPlaying:_.playing,topProgress:_.progress,topRateChange:_.rateChange,topReset:_.reset,topScroll:_.scroll,topSeeked:_.seeked,topSeeking:_.seeking,topStalled:_.stalled,topSubmit:_.submit,topSuspend:_.suspend,topTimeUpdate:_.timeUpdate,topTouchCancel:_.touchCancel,topTouchEnd:_.touchEnd,topTouchMove:_.touchMove,topTouchStart:_.touchStart,topVolumeChange:_.volumeChange,topWaiting:_.waiting,topWheel:_.wheel};for(var x in E)E[x].dependencies=[x];var D=C({onClick:null}),M={},N={eventTypes:_,extractEvents:function(e,t,n,r,o){var i=E[e];if(!i)return null;var m;switch(e){case b.topAbort:case b.topCanPlay:case b.topCanPlayThrough:case b.topDurationChange:case b.topEmptied:case b.topEncrypted:case b.topEnded:case b.topError:case b.topInput:case b.topLoad:case b.topLoadedData:case b.topLoadedMetadata:case b.topLoadStart:case b.topPause:case b.topPlay:case b.topPlaying:case b.topProgress:case b.topRateChange:case b.topReset:case b.topSeeked:case b.topSeeking:case b.topStalled:case b.topSubmit:case b.topSuspend:case b.topTimeUpdate:case b.topVolumeChange:case b.topWaiting:m=s;break;case b.topKeyPress:if(0===g(r))return null;case b.topKeyDown:case b.topKeyUp:m=c;break;case b.topBlur:case b.topFocus:m=l;break;case b.topClick:if(2===r.button)return null;case b.topContextMenu:case b.topDoubleClick:case b.topMouseDown:case b.topMouseMove:case b.topMouseOut:case b.topMouseOver:case b.topMouseUp:m=p;break;case b.topDrag:case b.topDragEnd:case b.topDragEnter:case b.topDragExit:case b.topDragLeave:case b.topDragOver:case b.topDragStart:case b.topDrop:m=d;break;case b.topTouchCancel:case b.topTouchEnd:case b.topTouchMove:case b.topTouchStart:m=f;break;case b.topScroll:m=h;break;case b.topWheel:m=v;break;case b.topCopy:case b.topCut:case b.topPaste:m=u}m?void 0:y(!1);var C=m.getPooled(i,n,r,o);return a.accumulateTwoPhaseDispatches(C),C},didPutListener:function(e,t,n){if(t===D){var r=i.getNode(e);M[e]||(M[e]=o.listen(r,"click",m))}},willDeleteListener:function(e,t){t===D&&(M[e].remove(),delete M[e])}};t.exports=N},{109:109,127:127,134:134,142:142,146:146,15:15,19:19,63:63,87:87,89:89,90:90,91:91,93:93,94:94,95:95,96:96,97:97}],87:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(90),a={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};o.augmentClass(r,a),t.exports=r},{90:90}],88:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(90),a={data:null};o.augmentClass(r,a),t.exports=r},{90:90}],89:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(94),a={dataTransfer:null};o.augmentClass(r,a),t.exports=r},{94:94}],90:[function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this.dispatchMarker=t,this.nativeEvent=n,this.target=r,this.currentTarget=r;var o=this.constructor.Interface;for(var a in o)if(o.hasOwnProperty(a)){var u=o[a];u?this[a]=u(n):this[a]=n[a]}var s=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;s?this.isDefaultPrevented=i.thatReturnsTrue:this.isDefaultPrevented=i.thatReturnsFalse,this.isPropagationStopped=i.thatReturnsFalse}var o=e(24),a=e(23),i=e(134),u=(e(151),{type:null,currentTarget:i.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null});a(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=i.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=i.thatReturnsTrue)},persist:function(){this.isPersistent=i.thatReturnsTrue},isPersistent:i.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),r.Interface=u,r.augmentClass=function(e,t){var n=this,r=Object.create(n.prototype);a(r,e.prototype),e.prototype=r,e.prototype.constructor=e,e.Interface=a({},n.Interface,t),e.augmentClass=n.augmentClass,o.addPoolingTo(e,o.fourArgumentPooler)},o.addPoolingTo(r,o.fourArgumentPooler),t.exports=r},{134:134,151:151,23:23,24:24}],91:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(96),a={relatedTarget:null};o.augmentClass(r,a),t.exports=r},{96:96}],92:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(90),a={data:null};o.augmentClass(r,a),t.exports=r},{90:90}],93:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(96),a=e(109),i=e(110),u=e(111),s={key:i,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:u,charCode:function(e){return"keypress"===e.type?a(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?a(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};o.augmentClass(r,s),t.exports=r},{109:109,110:110,111:111,96:96}],94:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(96),a=e(99),i=e(111),u={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:i,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+a.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+a.currentScrollTop}};o.augmentClass(r,u),t.exports=r},{111:111,96:96,99:99}],95:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(96),a=e(111),i={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:a};o.augmentClass(r,i),t.exports=r},{111:111,96:96}],96:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(90),a=e(112),i={view:function(e){if(e.view)return e.view;var t=a(e);if(null!=t&&t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};o.augmentClass(r,i),t.exports=r},{112:112,90:90}],97:[function(e,t,n){"use strict";function r(e,t,n,r){o.call(this,e,t,n,r)}var o=e(94),a={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(r,a),t.exports=r},{94:94}],98:[function(e,t,n){"use strict";var r=e(142),o={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,t,n,o,a,i,u,s){this.isInTransaction()?r(!1):void 0;var l,c;try{this._isInTransaction=!0,l=!0,this.initializeAll(0),c=e.call(t,n,o,a,i,u,s),l=!1}finally{try{if(l)try{this.closeAll(0)}catch(p){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return c},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var r=t[n];try{this.wrapperInitData[n]=a.OBSERVED_ERROR,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===a.OBSERVED_ERROR)try{this.initializeAll(n+1)}catch(o){}}}},closeAll:function(e){this.isInTransaction()?void 0:r(!1);for(var t=this.transactionWrappers,n=e;n<t.length;n++){var o,i=t[n],u=this.wrapperInitData[n];try{o=!0,u!==a.OBSERVED_ERROR&&i.close&&i.close.call(this,u),o=!1}finally{if(o)try{this.closeAll(n+1)}catch(s){}}}this.wrapperInitData.length=0}},a={Mixin:o,OBSERVED_ERROR:{}};t.exports=a},{142:142}],99:[function(e,t,n){"use strict";var r={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){r.currentScrollLeft=e.x,r.currentScrollTop=e.y}};t.exports=r},{}],100:[function(e,t,n){"use strict";function r(e,t){if(null==t?o(!1):void 0,null==e)return t;var n=Array.isArray(e),r=Array.isArray(t);return n&&r?(e.push.apply(e,t),e):n?(e.push(t),e):r?[e].concat(t):[e,t]}var o=e(142);t.exports=r},{142:142}],101:[function(e,t,n){"use strict";function r(e){for(var t=1,n=0,r=0,a=e.length,i=-4&a;i>r;){for(;r<Math.min(r+4096,i);r+=4)n+=(t+=e.charCodeAt(r))+(t+=e.charCodeAt(r+1))+(t+=e.charCodeAt(r+2))+(t+=e.charCodeAt(r+3));t%=o,n%=o}for(;a>r;r++)n+=t+=e.charCodeAt(r);return t%=o,n%=o,t|n<<16}var o=65521;t.exports=r},{}],102:[function(e,t,n){"use strict";var r=!1;t.exports=r},{}],103:[function(e,t,n){"use strict";function r(e,t){var n=null==t||"boolean"==typeof t||""===t;if(n)return"";var r=isNaN(t);return r||0===t||a.hasOwnProperty(e)&&a[e]?""+t:("string"==typeof t&&(t=t.trim()),t+"px")}var o=e(4),a=o.isUnitlessNumber;t.exports=r},{4:4}],104:[function(e,t,n){"use strict";function r(e,t,n,r,o){return o}e(23),e(151);t.exports=r},{151:151,23:23}],105:[function(e,t,n){"use strict";function r(e){return a[e]}function o(e){return(""+e).replace(i,r)}var a={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},i=/[&><"']/g;t.exports=o},{}],106:[function(e,t,n){"use strict";function r(e){return null==e?null:1===e.nodeType?e:o.has(e)?a.getNodeFromInstance(e):(null!=e.render&&"function"==typeof e.render?i(!1):void 0,void i(!1))}var o=(e(34),e(60)),a=e(63),i=e(142);e(151);t.exports=r},{142:142,151:151,34:34,60:60,63:63}],107:[function(e,t,n){"use strict";function r(e,t,n){var r=e,o=void 0===r[n];o&&null!=t&&(r[n]=t)}function o(e){if(null==e)return e;var t={};return a(e,r,t),t}var a=e(125);e(151);t.exports=o},{125:125,151:151}],108:[function(e,t,n){"use strict";var r=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};t.exports=r},{}],109:[function(e,t,n){"use strict";function r(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}t.exports=r},{}],110:[function(e,t,n){"use strict";function r(e){if(e.key){var t=a[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=o(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?i[e.keyCode]||"Unidentified":""}var o=e(109),a={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=r},{109:109}],111:[function(e,t,n){"use strict";function r(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=a[e];return r?!!n[r]:!1}function o(e){return r}var a={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=o},{}],112:[function(e,t,n){"use strict";function r(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}t.exports=r},{}],113:[function(e,t,n){"use strict";function r(e){var t=e&&(o&&e[o]||e[a]);return"function"==typeof t?t:void 0}var o="function"==typeof Symbol&&Symbol.iterator,a="@@iterator";t.exports=r},{}],114:[function(e,t,n){"use strict";function r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function o(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function a(e,t){for(var n=r(e),a=0,i=0;n;){if(3===n.nodeType){if(i=a+n.textContent.length,t>=a&&i>=t)return{node:n,offset:t-a};a=i}n=r(o(n))}}t.exports=a},{}],115:[function(e,t,n){"use strict";function r(){return!a&&o.canUseDOM&&(a="textContent"in document.documentElement?"textContent":"innerText"),a}var o=e(128),a=null;t.exports=r},{128:128}],116:[function(e,t,n){"use strict";function r(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function o(e){var t;if(null===e||e===!1)t=new i(o);else if("object"==typeof e){var n=e;!n||"function"!=typeof n.type&&"string"!=typeof n.type?l(!1):void 0,t="string"==typeof n.type?u.createInternalComponent(n):r(n.type)?new n.type(n):new c}else"string"==typeof e||"number"==typeof e?t=u.createInstanceForText(e):l(!1);return t.construct(e),t._mountIndex=0,t._mountImage=null,t}var a=e(33),i=e(52),u=e(66),s=e(23),l=e(142),c=(e(151),function(){});s(c.prototype,a.Mixin,{_instantiateReactComponent:o}),t.exports=o},{142:142,151:151,23:23,33:33,52:52,66:66}],117:[function(e,t,n){"use strict";function r(e,t){if(!a.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r="function"==typeof i[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,a=e(128);a.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=r},{128:128}],118:[function(e,t,n){"use strict";function r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&o[e.type]||"textarea"===t)}var o={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};t.exports=r},{}],119:[function(e,t,n){"use strict";function r(e){return o.isValidElement(e)?void 0:a(!1),e}var o=e(50),a=e(142);t.exports=r},{142:142,50:50}],120:[function(e,t,n){"use strict";function r(e){return'"'+o(e)+'"'}var o=e(105);t.exports=r},{105:105}],121:[function(e,t,n){"use strict";var r=e(63);t.exports=r.renderSubtreeIntoContainer},{63:63}],122:[function(e,t,n){"use strict";var r=e(128),o=/^[ \r\n\t\f]/,a=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,i=function(e,t){e.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(i=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),r.canUseDOM){var u=document.createElement("div");u.innerHTML=" ",""===u.innerHTML&&(i=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),o.test(t)||"<"===t[0]&&a.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}t.exports=i},{128:128}],123:[function(e,t,n){"use strict";var r=e(128),o=e(105),a=e(122),i=function(e,t){e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(i=function(e,t){a(e,o(t))})),t.exports=i},{105:105,122:122,128:128}],124:[function(e,t,n){"use strict";function r(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var o=typeof e,a=typeof t;return"string"===o||"number"===o?"string"===a||"number"===a:"object"===a&&e.type===t.type&&e.key===t.key}t.exports=r},{}],125:[function(e,t,n){"use strict";function r(e){return v[e]}function o(e,t){return e&&null!=e.key?i(e.key):t.toString(36)}function a(e){return(""+e).replace(m,r)}function i(e){return"$"+a(e)}function u(e,t,n,r){var a=typeof e;if(("undefined"===a||"boolean"===a)&&(e=null),null===e||"string"===a||"number"===a||l.isValidElement(e))return n(r,e,""===t?f+o(e,0):t),1;var s,c,v=0,m=""===t?f:t+h;if(Array.isArray(e))for(var g=0;g<e.length;g++)s=e[g], c=m+o(s,g),v+=u(s,c,n,r);else{var y=p(e);if(y){var C,b=y.call(e);if(y!==e.entries)for(var _=0;!(C=b.next()).done;)s=C.value,c=m+o(s,_++),v+=u(s,c,n,r);else for(;!(C=b.next()).done;){var E=C.value;E&&(s=E[1],c=m+i(E[0])+h+o(s,0),v+=u(s,c,n,r))}}else"object"===a&&(String(e),d(!1))}return v}function s(e,t,n){return null==e?0:u(e,"",t,n)}var l=(e(34),e(50)),c=e(59),p=e(113),d=e(142),f=(e(151),c.SEPARATOR),h=":",v={"=":"=0",".":"=1",":":"=2"},m=/[=.:]/g;t.exports=s},{113:113,142:142,151:151,34:34,50:50,59:59}],126:[function(e,t,n){"use strict";var r=(e(23),e(134)),o=(e(151),r);t.exports=o},{134:134,151:151,23:23}],127:[function(e,t,n){"use strict";var r=e(134),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};t.exports=o},{134:134}],128:[function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};t.exports=o},{}],129:[function(e,t,n){"use strict";function r(e){return e.replace(o,function(e,t){return t.toUpperCase()})}var o=/-(.)/g;t.exports=r},{}],130:[function(e,t,n){"use strict";function r(e){return o(e.replace(a,"ms-"))}var o=e(129),a=/^-ms-/;t.exports=r},{129:129}],131:[function(e,t,n){"use strict";function r(e,t){var n=!0;e:for(;n;){var r=e,a=t;if(n=!1,r&&a){if(r===a)return!0;if(o(r))return!1;if(o(a)){e=r,t=a.parentNode,n=!0;continue e}return r.contains?r.contains(a):r.compareDocumentPosition?!!(16&r.compareDocumentPosition(a)):!1}return!1}}var o=e(144);t.exports=r},{144:144}],132:[function(e,t,n){"use strict";function r(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function o(e){return r(e)?Array.isArray(e)?e.slice():a(e):[e]}var a=e(150);t.exports=o},{150:150}],133:[function(e,t,n){"use strict";function r(e){var t=e.match(c);return t&&t[1].toLowerCase()}function o(e,t){var n=l;l?void 0:s(!1);var o=r(e),a=o&&u(o);if(a){n.innerHTML=a[1]+e+a[2];for(var c=a[0];c--;)n=n.lastChild}else n.innerHTML=e;var p=n.getElementsByTagName("script");p.length&&(t?void 0:s(!1),i(p).forEach(t));for(var d=i(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return d}var a=e(128),i=e(132),u=e(138),s=e(142),l=a.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;t.exports=o},{128:128,132:132,138:138,142:142}],134:[function(e,t,n){"use strict";function r(e){return function(){return e}}function o(){}o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},t.exports=o},{}],135:[function(e,t,n){"use strict";var r={};t.exports=r},{}],136:[function(e,t,n){"use strict";function r(e){try{e.focus()}catch(t){}}t.exports=r},{}],137:[function(e,t,n){"use strict";function r(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}t.exports=r},{}],138:[function(e,t,n){"use strict";function r(e){return i?void 0:a(!1),d.hasOwnProperty(e)||(e="*"),u.hasOwnProperty(e)||("*"===e?i.innerHTML="<link />":i.innerHTML="<"+e+"></"+e+">",u[e]=!i.firstChild),u[e]?d[e]:null}var o=e(128),a=e(142),i=o.canUseDOM?document.createElement("div"):null,u={},s=[1,'<select multiple="true">',"</select>"],l=[1,"<table>","</table>"],c=[3,"<table><tbody><tr>","</tr></tbody></table>"],p=[1,'<svg xmlns="http://www.w3.org/2000/svg">',"</svg>"],d={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:s,option:s,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c},f=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];f.forEach(function(e){d[e]=p,u[e]=!0}),t.exports=r},{128:128,142:142}],139:[function(e,t,n){"use strict";function r(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}t.exports=r},{}],140:[function(e,t,n){"use strict";function r(e){return e.replace(o,"-$1").toLowerCase()}var o=/([A-Z])/g;t.exports=r},{}],141:[function(e,t,n){"use strict";function r(e){return o(e).replace(a,"-ms-")}var o=e(140),a=/^ms-/;t.exports=r},{140:140}],142:[function(e,t,n){"use strict";var r=function(e,t,n,r,o,a,i,u){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,i,u],c=0;s=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return l[c++]}))}throw s.framesToPop=1,s}};t.exports=r},{}],143:[function(e,t,n){"use strict";function r(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}t.exports=r},{}],144:[function(e,t,n){"use strict";function r(e){return o(e)&&3==e.nodeType}var o=e(143);t.exports=r},{143:143}],145:[function(e,t,n){"use strict";var r=e(142),o=function(e){var t,n={};e instanceof Object&&!Array.isArray(e)?void 0:r(!1);for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};t.exports=o},{142:142}],146:[function(e,t,n){"use strict";var r=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};t.exports=r},{}],147:[function(e,t,n){"use strict";function r(e,t,n){if(!e)return null;var r={};for(var a in e)o.call(e,a)&&(r[a]=t.call(n,e[a],a,e));return r}var o=Object.prototype.hasOwnProperty;t.exports=r},{}],148:[function(e,t,n){"use strict";function r(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}t.exports=r},{}],149:[function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=o.bind(t),i=0;i<n.length;i++)if(!a(n[i])||e[n[i]]!==t[n[i]])return!1;return!0}var o=Object.prototype.hasOwnProperty;t.exports=r},{}],150:[function(e,t,n){"use strict";function r(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?o(!1):void 0,"number"!=typeof t?o(!1):void 0,0===t||t-1 in e?void 0:o(!1),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var r=Array(t),a=0;t>a;a++)r[a]=e[a];return r}var o=e(142);t.exports=r},{142:142}],151:[function(e,t,n){"use strict";var r=e(134),o=r;t.exports=o},{134:134}]},{},[1])(1)});
src/List/ListItem.js
pradel/material-ui
import React from 'react'; import ReactDOM from 'react-dom'; import shallowEqual from 'recompose/shallowEqual'; import {fade} from '../utils/colorManipulator'; import transitions from '../styles/transitions'; import EnhancedButton from '../internal/EnhancedButton'; import IconButton from '../IconButton'; import OpenIcon from '../svg-icons/navigation/expand-less'; import CloseIcon from '../svg-icons/navigation/expand-more'; import NestedList from './NestedList'; function getStyles(props, context, state) { const { insetChildren, leftAvatar, leftCheckbox, leftIcon, nestedLevel, rightAvatar, rightIcon, rightIconButton, rightToggle, secondaryText, secondaryTextLines, } = props; const {muiTheme} = context; const {listItem} = muiTheme; const textColor = muiTheme.baseTheme.palette.textColor; const hoverColor = fade(textColor, 0.1); const singleAvatar = !secondaryText && (leftAvatar || rightAvatar); const singleNoAvatar = !secondaryText && !(leftAvatar || rightAvatar); const twoLine = secondaryText && secondaryTextLines === 1; const threeLine = secondaryText && secondaryTextLines > 1; const styles = { root: { backgroundColor: (state.isKeyboardFocused || state.hovered) && !state.rightIconButtonHovered && !state.rightIconButtonKeyboardFocused ? hoverColor : null, color: textColor, display: 'block', fontSize: 16, lineHeight: '16px', position: 'relative', transition: transitions.easeOut(), }, // This inner div is needed so that ripples will span the entire container innerDiv: { marginLeft: nestedLevel * muiTheme.listItem.nestedLevelDepth, paddingLeft: leftIcon || leftAvatar || leftCheckbox || insetChildren ? 72 : 16, paddingRight: rightIcon || rightAvatar || rightIconButton ? 56 : rightToggle ? 72 : 16, paddingBottom: singleAvatar ? 20 : 16, paddingTop: singleNoAvatar || threeLine ? 16 : 20, position: 'relative', }, icons: { height: 24, width: 24, display: 'block', position: 'absolute', top: twoLine ? 12 : singleAvatar ? 4 : 0, margin: 12, }, leftIcon: { color: listItem.leftIconColor, fill: listItem.leftIconColor, left: 4, }, rightIcon: { color: listItem.rightIconColor, fill: listItem.rightIconColor, right: 4, }, avatars: { position: 'absolute', top: singleAvatar ? 8 : 16, }, label: { cursor: 'pointer', }, leftAvatar: { left: 16, }, rightAvatar: { right: 16, }, leftCheckbox: { position: 'absolute', display: 'block', width: 24, top: twoLine ? 24 : singleAvatar ? 16 : 12, left: 16, }, primaryText: { }, rightIconButton: { position: 'absolute', display: 'block', top: twoLine ? 12 : singleAvatar ? 4 : 0, right: 4, }, rightToggle: { position: 'absolute', display: 'block', width: 54, top: twoLine ? 25 : singleAvatar ? 17 : 13, right: 8, }, secondaryText: { fontSize: 14, lineHeight: threeLine ? '18px' : '16px', height: threeLine ? 36 : 16, margin: 0, marginTop: 4, color: listItem.secondaryTextColor, // needed for 2 and 3 line ellipsis overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: threeLine ? null : 'nowrap', display: threeLine ? '-webkit-box' : null, WebkitLineClamp: threeLine ? 2 : null, WebkitBoxOrient: threeLine ? 'vertical' : null, }, }; return styles; } class ListItem extends React.Component { static muiName = 'ListItem'; static propTypes = { /** * If true, generate a nested-list-indicator icon when nested list * items are detected. Note that an indicator will not be created * if a `rightIcon` or `rightIconButton` has been provided to * the element. */ autoGenerateNestedIndicator: React.PropTypes.bool, /** * Children passed into the `ListItem`. */ children: React.PropTypes.node, /** * If true, the element will not be able to be focused by the keyboard. */ disableKeyboardFocus: React.PropTypes.bool, /** * If true, the element will not be clickable * and will not display hover effects. * This is automatically disabled if either `leftCheckbox` * or `rightToggle` is set. */ disabled: React.PropTypes.bool, /** * If true, the nested `ListItem`s are initially displayed. */ initiallyOpen: React.PropTypes.bool, /** * Override the inline-styles of the inner div element. */ innerDivStyle: React.PropTypes.object, /** * If true, the children will be indented by 72px. * This is useful if there is no left avatar or left icon. */ insetChildren: React.PropTypes.bool, /** * This is the `Avatar` element to be displayed on the left side. */ leftAvatar: React.PropTypes.element, /** * This is the `Checkbox` element to be displayed on the left side. */ leftCheckbox: React.PropTypes.element, /** * This is the `SvgIcon` or `FontIcon` to be displayed on the left side. */ leftIcon: React.PropTypes.element, /** * An array of `ListItem`s to nest underneath the current `ListItem`. */ nestedItems: React.PropTypes.arrayOf(React.PropTypes.element), /** * Controls how deep a `ListItem` appears. * This property is automatically managed, so modify at your own risk. */ nestedLevel: React.PropTypes.number, /** * Override the inline-styles of the nested items' `NestedList`. */ nestedListStyle: React.PropTypes.object, /** * Callback function fired when the `ListItem` is focused or blurred by the keyboard. * * @param {object} event `focus` or `blur` event targeting the `ListItem`. * @param {boolean} isKeyboardFocused If true, the `ListItem` is focused. */ onKeyboardFocus: React.PropTypes.func, /** * Callback function fired when the mouse enters the `ListItem`. * * @param {object} event `mouseenter` event targeting the `ListItem`. */ onMouseEnter: React.PropTypes.func, /** * Callback function fired when the mouse leaves the `ListItem`. * * @param {object} event `mouseleave` event targeting the `ListItem`. */ onMouseLeave: React.PropTypes.func, /** * Callbak function fired when the `ListItem` toggles its nested list. * * @param {object} listItem The `ListItem`. */ onNestedListToggle: React.PropTypes.func, /** * Callback function fired when the `ListItem` is touched. * * @param {object} event `touchstart` event targeting the `ListItem`. */ onTouchStart: React.PropTypes.func, /** * Callback function fired when the `ListItem` is touch-tapped. * * @param {object} event TouchTap event targeting the `ListItem`. */ onTouchTap: React.PropTypes.func, /** * This is the block element that contains the primary text. * If a string is passed in, a div tag will be rendered. */ primaryText: React.PropTypes.node, /** * If true, clicking or tapping the primary text of the `ListItem` * toggles the nested list. */ primaryTogglesNestedList: React.PropTypes.bool, /** * This is the `Avatar` element to be displayed on the right side. */ rightAvatar: React.PropTypes.element, /** * This is the `SvgIcon` or `FontIcon` to be displayed on the right side. */ rightIcon: React.PropTypes.element, /** * This is the `IconButton` to be displayed on the right side. * Hovering over this button will remove the `ListItem` hover. * Also, clicking on this button will not trigger a * ripple on the `ListItem`; the event will be stopped and prevented * from bubbling up to cause a `ListItem` click. */ rightIconButton: React.PropTypes.element, /** * This is the `Toggle` element to display on the right side. */ rightToggle: React.PropTypes.element, /** * This is the block element that contains the secondary text. * If a string is passed in, a div tag will be rendered. */ secondaryText: React.PropTypes.node, /** * Can be 1 or 2. This is the number of secondary * text lines before ellipsis will show. */ secondaryTextLines: React.PropTypes.oneOf([1, 2]), /** * Override the inline-styles of the root element. */ style: React.PropTypes.object, }; static defaultProps = { autoGenerateNestedIndicator: true, disableKeyboardFocus: false, disabled: false, initiallyOpen: false, insetChildren: false, nestedItems: [], nestedLevel: 0, onKeyboardFocus: () => {}, onMouseEnter: () => {}, onMouseLeave: () => {}, onNestedListToggle: () => {}, onTouchStart: () => {}, primaryTogglesNestedList: false, secondaryTextLines: 1, }; static contextTypes = { muiTheme: React.PropTypes.object.isRequired, }; state = { hovered: false, isKeyboardFocused: false, open: this.props.initiallyOpen, rightIconButtonHovered: false, rightIconButtonKeyboardFocused: false, touch: false, }; shouldComponentUpdate(nextProps, nextState) { return ( !shallowEqual(this.props, nextProps) || !shallowEqual(this.state, nextState) ); } // This method is needed by the `MenuItem` component. applyFocusState(focusState) { const button = this.refs.enhancedButton; if (button) { const buttonEl = ReactDOM.findDOMNode(button); switch (focusState) { case 'none': buttonEl.blur(); break; case 'focused': buttonEl.focus(); break; case 'keyboard-focused': button.setKeyboardFocus(); buttonEl.focus(); break; } } } createDisabledElement(styles, contentChildren, additionalProps) { const { innerDivStyle, style, } = this.props; const mergedDivStyles = Object.assign({}, styles.root, styles.innerDiv, innerDivStyle, style ); return ( <div {...additionalProps} style={this.context.muiTheme.prepareStyles(mergedDivStyles)} > {contentChildren} </div> ); } createLabelElement(styles, contentChildren, additionalProps) { const { innerDivStyle, style, } = this.props; const mergedLabelStyles = Object.assign({}, styles.root, styles.innerDiv, innerDivStyle, styles.label, style ); return ( <label {...additionalProps} style={this.context.muiTheme.prepareStyles(mergedLabelStyles)} > {contentChildren} </label> ); } createTextElement(styles, data, key) { const {prepareStyles} = this.context.muiTheme; if (React.isValidElement(data)) { let style = Object.assign({}, styles, data.props.style); if (typeof data.type === 'string') { // if element is a native dom node style = prepareStyles(style); } return React.cloneElement(data, { key: key, style: style, }); } return ( <div key={key} style={prepareStyles(styles)}> {data} </div> ); } handleKeyboardFocus = (event, isKeyboardFocused) => { this.setState({isKeyboardFocused: isKeyboardFocused}); this.props.onKeyboardFocus(event, isKeyboardFocused); }; handleMouseEnter = (event) => { if (!this.state.touch) this.setState({hovered: true}); this.props.onMouseEnter(event); }; handleMouseLeave = (event) => { this.setState({hovered: false}); this.props.onMouseLeave(event); }; handleNestedListToggle = (event) => { event.stopPropagation(); this.setState({open: !this.state.open}); this.props.onNestedListToggle(this); }; handleRightIconButtonKeyboardFocus = (event, isKeyboardFocused) => { if (isKeyboardFocused) { this.setState({ isKeyboardFocused: false, rightIconButtonKeyboardFocused: isKeyboardFocused, }); } const iconButton = this.props.rightIconButton; if (iconButton && iconButton.props.onKeyboardFocus) iconButton.props.onKeyboardFocus(event, isKeyboardFocused); }; handleRightIconButtonMouseLeave = (event) => { const iconButton = this.props.rightIconButton; this.setState({rightIconButtonHovered: false}); if (iconButton && iconButton.props.onMouseLeave) iconButton.props.onMouseLeave(event); }; handleRightIconButtonMouseEnter = (event) => { const iconButton = this.props.rightIconButton; this.setState({rightIconButtonHovered: true}); if (iconButton && iconButton.props.onMouseEnter) iconButton.props.onMouseEnter(event); }; handleRightIconButtonMouseUp = (event) => { const iconButton = this.props.rightIconButton; event.stopPropagation(); if (iconButton && iconButton.props.onMouseUp) iconButton.props.onMouseUp(event); }; handleRightIconButtonTouchTap = (event) => { const iconButton = this.props.rightIconButton; // Stop the event from bubbling up to the list-item event.stopPropagation(); if (iconButton && iconButton.props.onTouchTap) iconButton.props.onTouchTap(event); }; handleTouchStart = (event) => { this.setState({touch: true}); this.props.onTouchStart(event); }; pushElement(children, element, baseStyles, additionalProps) { if (element) { const styles = Object.assign({}, baseStyles, element.props.style); children.push( React.cloneElement(element, { key: children.length, style: styles, ...additionalProps, }) ); } } render() { const { autoGenerateNestedIndicator, children, disabled, disableKeyboardFocus, innerDivStyle, insetChildren, // eslint-disable-line no-unused-vars leftAvatar, leftCheckbox, leftIcon, nestedItems, nestedLevel, nestedListStyle, onKeyboardFocus, // eslint-disable-line no-unused-vars onMouseLeave, // eslint-disable-line no-unused-vars onMouseEnter, // eslint-disable-line no-unused-vars onTouchStart, // eslint-disable-line no-unused-vars onTouchTap, rightAvatar, rightIcon, rightIconButton, rightToggle, primaryText, primaryTogglesNestedList, secondaryText, secondaryTextLines, // eslint-disable-line no-unused-vars style, ...other, } = this.props; const {prepareStyles} = this.context.muiTheme; const styles = getStyles(this.props, this.context, this.state); const contentChildren = [children]; if (leftIcon) { this.pushElement( contentChildren, leftIcon, Object.assign({}, styles.icons, styles.leftIcon) ); } if (rightIcon) { this.pushElement( contentChildren, rightIcon, Object.assign({}, styles.icons, styles.rightIcon) ); } if (leftAvatar) { this.pushElement( contentChildren, leftAvatar, Object.assign({}, styles.avatars, styles.leftAvatar) ); } if (rightAvatar) { this.pushElement( contentChildren, rightAvatar, Object.assign({}, styles.avatars, styles.rightAvatar) ); } if (leftCheckbox) { this.pushElement( contentChildren, leftCheckbox, Object.assign({}, styles.leftCheckbox) ); } // RightIconButtonElement const hasNestListItems = nestedItems.length; const hasRightElement = rightAvatar || rightIcon || rightIconButton || rightToggle; const needsNestedIndicator = hasNestListItems && autoGenerateNestedIndicator && !hasRightElement; if (rightIconButton || needsNestedIndicator) { let rightIconButtonElement = rightIconButton; const rightIconButtonHandlers = { onKeyboardFocus: this.handleRightIconButtonKeyboardFocus, onMouseEnter: this.handleRightIconButtonMouseEnter, onMouseLeave: this.handleRightIconButtonMouseLeave, onTouchTap: this.handleRightIconButtonTouchTap, onMouseDown: this.handleRightIconButtonMouseUp, onMouseUp: this.handleRightIconButtonMouseUp, }; // Create a nested list indicator icon if we don't have an icon on the right if (needsNestedIndicator) { rightIconButtonElement = this.state.open ? <IconButton><OpenIcon /></IconButton> : <IconButton><CloseIcon /></IconButton>; rightIconButtonHandlers.onTouchTap = this.handleNestedListToggle; } this.pushElement( contentChildren, rightIconButtonElement, Object.assign({}, styles.rightIconButton), rightIconButtonHandlers ); } if (rightToggle) { this.pushElement( contentChildren, rightToggle, Object.assign({}, styles.rightToggle) ); } if (primaryText) { const primaryTextElement = this.createTextElement( styles.primaryText, primaryText, 'primaryText' ); contentChildren.push(primaryTextElement); } if (secondaryText) { const secondaryTextElement = this.createTextElement( styles.secondaryText, secondaryText, 'secondaryText' ); contentChildren.push(secondaryTextElement); } const nestedList = nestedItems.length ? ( <NestedList nestedLevel={nestedLevel + 1} open={this.state.open} style={nestedListStyle}> {nestedItems} </NestedList> ) : undefined; const hasCheckbox = leftCheckbox || rightToggle; return ( <div> { hasCheckbox ? this.createLabelElement(styles, contentChildren, other) : disabled ? this.createDisabledElement(styles, contentChildren, other) : ( <EnhancedButton {...other} disabled={disabled} disableKeyboardFocus={disableKeyboardFocus || this.state.rightIconButtonKeyboardFocused} linkButton={true} onKeyboardFocus={this.handleKeyboardFocus} onMouseLeave={this.handleMouseLeave} onMouseEnter={this.handleMouseEnter} onTouchStart={this.handleTouchStart} onTouchTap={primaryTogglesNestedList ? this.handleNestedListToggle : onTouchTap} ref="enhancedButton" style={Object.assign({}, styles.root, style)} > <div style={prepareStyles(Object.assign(styles.innerDiv, innerDivStyle))}> {contentChildren} </div> </EnhancedButton> ) } {nestedList} </div> ); } } export default ListItem;