Input: Removes a child node from this node . [CODESPLIT] function ( node , destroy , suppressEvents , suppressNodeUpdate ) { var me = this , index = me . indexOf ( node ) ; if ( index == - 1 || ( suppressEvents !== true && me . fireEvent ( "beforeremove" , me , node ) === false ) ) { return false ; } // remove it from childNodes collection Ext . Array . erase ( me . childNodes , index , 1 ) ; // update child refs if ( me . firstChild == node ) { me . setFirstChild ( node . nextSibling ) ; } if ( me . lastChild == node ) { me . setLastChild ( node . previousSibling ) ; } if ( suppressEvents !== true ) { me . fireEvent ( "remove" , me , node ) ; } // update siblings if ( node . previousSibling ) { node . previousSibling . nextSibling = node . nextSibling ; node . previousSibling . updateInfo ( suppressNodeUpdate ) ; } if ( node . nextSibling ) { node . nextSibling . previousSibling = node . previousSibling ; node . nextSibling . updateInfo ( suppressNodeUpdate ) ; } // If this node suddenly doesn't have childnodes anymore, update myself if ( ! me . childNodes . length ) { me . set ( 'loaded' , me . isLoaded ( ) ) ; } if ( destroy ) { node . destroy ( true ) ; } else { node . clear ( ) ; } return node ; }


Input: Creates a copy ( clone ) of this Node . [CODESPLIT] function ( newId , deep ) { var me = this , result = me . callOverridden ( arguments ) , len = me . childNodes ? me . childNodes . length : 0 , i ; // Move child nodes across to the copy if required if ( deep ) { for ( i = 0 ; i < len ; i ++ ) { result . appendChild ( me . childNodes [ i ] . copy ( true ) ) ; } } return result ; }


Input: Clear the node . [CODESPLIT] function ( destroy ) { var me = this ; // clear any references from the node me . parentNode = me . previousSibling = me . nextSibling = null ; if ( destroy ) { me . firstChild = me . lastChild = null ; } }


Input:
Destroys the node . [CODESPLIT] function ( silent ) { /*
                     * Silent is to be used in a number of cases
                     * 1) When setRoot is called.
                     * 2) When destroy on the tree is called
                     * 3) For destroying child nodes on a node
                     */ var me = this , options = me . destroyOptions ; if ( silent === true ) { me . clear ( true ) ; Ext . each ( me . childNodes , function ( n ) { n . destroy ( true ) ; } ) ; me . childNodes = null ; delete me . destroyOptions ; me . callOverridden ( [ options ] ) ; } else { me . destroyOptions = silent ; // overridden method will be called, since remove will end up calling destroy(true); me . remove ( true ) ; } }


Input: Inserts the first node before the second node in this nodes childNodes collection . [CODESPLIT] function ( node , refNode , suppressEvents ) { var me = this , index = me . indexOf ( refNode ) , oldParent = node . parentNode , refIndex = index , ps ; if ( ! refNode ) { // like standard Dom, refNode can be null for append return me . appendChild ( node ) ; } // nothing to do if ( node == refNode ) { return false ; } // Make sure it is a record with the NodeInterface node = me . createNode ( node ) ; if ( suppressEvents !== true && me . fireEvent ( "beforeinsert" , me , node , refNode ) === false ) { return false ; } // when moving internally, indexes will change after remove if ( oldParent == me && me . indexOf ( node ) < index ) { refIndex -- ; } // it's a move, make sure we move it cleanly if ( oldParent ) { if ( suppressEvents !== true && node . fireEvent ( "beforemove" , node , oldParent , me , index , refNode ) === false ) { return false ; } oldParent . removeChild ( node ) ; } if ( refIndex === 0 ) { me . setFirstChild ( node ) ; } Ext . Array . splice ( me . childNodes , refIndex , 0 , node ) ; node . parentNode = me ; node . nextSibling = refNode ; refNode . previousSibling = node ; ps = me . childNodes [ refIndex - 1 ] ; if ( ps ) { node . previousSibling = ps ; ps . nextSibling = node ; ps . updateInfo ( ) ; } else { node . previousSibling = null ; } node . updateInfo ( ) ; if ( ! me . isLoaded ( ) ) { me . set ( 'loaded' , true ) ; } // If this node didn't have any childnodes before, update myself else if ( me . childNodes . length === 1 ) { me . set ( 'loaded' , me . isLoaded ( ) ) ; } if ( suppressEvents !== true ) { me . fireEvent ( "insert" , me , node , refNode ) ; if ( oldParent ) { node . fireEvent ( "move" , node , oldParent , me , refIndex , refNode ) ; } } return node ; }


Input: Removes this node from its parent . [CODESPLIT] function ( destroy , suppressEvents ) { var parentNode = this . parentNode ; if ( parentNode ) { parentNode . removeChild ( this , destroy , suppressEvents , true ) ; } return this ; }


Input: Removes all child nodes from this node . [CODESPLIT] function ( destroy , suppressEvents ) { var cn = this . childNodes , n ; while ( ( n = cn [ 0 ] ) ) { this . removeChild ( n , destroy , suppressEvents ) ; } return this ; }


Input: Sorts this nodes children using the supplied sort function . [CODESPLIT] function ( sortFn , recursive , suppressEvent ) { var cs = this . childNodes , ln = cs . length , i , n ; if ( ln > 0 ) { Ext . Array . sort ( cs , sortFn ) ; for ( i = 0 ; i < ln ; i ++ ) { n = cs [ i ] ; n . previousSibling = cs [ i - 1 ] ; n . nextSibling = cs [ i + 1 ] ; if ( i === 0 ) { this . setFirstChild ( n ) ; } if ( i == ln - 1 ) { this . setLastChild ( n ) ; } n . updateInfo ( suppressEvent ) ; if ( recursive && ! n . isLeaf ( ) ) { n . sort ( sortFn , true , true ) ; } } this . notifyStores ( 'afterEdit' , [ 'sorted' ] , { sorted : 'sorted' } ) ; if ( suppressEvent !== true ) { this . fireEvent ( 'sort' , this , cs ) ; } } }


Input: Expand this node . [CODESPLIT] function ( recursive , callback , scope ) { var me = this ; if ( ! me . isLeaf ( ) ) { if ( me . isLoading ( ) ) { me . on ( 'expand' , function ( ) { me . expand ( recursive , callback , scope ) ; } , me , { single : true } ) ; } else { if ( ! me . isExpanded ( ) ) { // The TreeStore actually listens for the beforeexpand method and checks // whether we have to asynchronously load the children from the server // first. Thats why we pass a callback function to the event that the // store can call once it has loaded and parsed all the children. me . fireAction ( 'expand' , [ this ] , function ( ) { me . set ( 'expanded' , true ) ; Ext . callback ( callback , scope || me , [ me . childNodes ] ) ; } ) ; } else { Ext . callback ( callback , scope || me , [ me . childNodes ] ) ; } } } else { Ext . callback ( callback , scope || me ) ; } }


Input: Collapse this node . [CODESPLIT] function ( recursive , callback , scope ) { var me = this ; // First we start by checking if this node is a parent if ( ! me . isLeaf ( ) && me . isExpanded ( ) ) { this . fireAction ( 'collapse' , [ me ] , function ( ) { me . set ( 'expanded' , false ) ; Ext . callback ( callback , scope || me , [ me . childNodes ] ) ; } ) ; } else { Ext . callback ( callback , scope || me , [ me . childNodes ] ) ; } }


Input: call the next target function ( s ) if possible when appropriate [CODESPLIT] function ( ) { if ( head . open === 0 && head . next ) { // advance the head, if possible head = head . next ; } head . open = head . open || 0 ; head . callbacks = head . callbacks || [ false ] ; var dispatchInternal = function ( fnIndex ) { head . open += 1 ; setImmediate ( function ( ) { var opts = makeOpts ( head . opts [ fnIndex ] ) ; if ( errorCount > 0 ) { return ; } var handleError = function ( err ) { errorCount += 1 ; opts . onError ( err , errorCount ) ; } ; var callback = function ( err ) { setImmediate ( function ( ) { if ( head . callbacks [ fnIndex ] ) { handleError ( new Error ( 'function called back twice!' ) ) ; } head . callbacks [ fnIndex ] = true ; if ( err ) { handleError ( err ) ; } head . open -= 1 ; setImmediate ( dispatch ) ; } ) ; } ; if ( opts . wrapWithTry ) { try { head . fns [ fnIndex ] ( callback ) ; } catch ( err ) { head . open -= 1 ; handleError ( err ) ; } } else { head . fns [ fnIndex ] ( callback ) ; } } ) ; } ; for ( head . fnIndex = head . fnIndex || 0 ; head . fnIndex < head . fns . length ; head . fnIndex += 1 ) { dispatchInternal ( head . fnIndex ) ; } }


Input: set the next fn allowing the tail to advance [CODESPLIT] function ( nextTargetFn , fnOpt ) { tail . next = { fns : [ nextTargetFn ] , opts : [ fnOpt ] } ; tail = tail . next ; dispatch ( ) ; return controller ; }


Input: @description This is the deployor system [CODESPLIT] function Deployor ( options ) { this . options = _assign ( { } , Deployor . defaults , options ) // TODO move this Object . keys ( this . options ) . forEach ( function ( key ) { process . env [ snakeCase ( key ) . toUpperCase ( ) ] = this . options [ key ] } . bind ( this ) ) }


Input: Repaints the whole page . This fixes frequently encountered painting issues in mobile Safari . [CODESPLIT] function ( ) { var mask = Ext . getBody ( ) . createChild ( { cls : Ext . baseCSSPrefix + 'mask ' + Ext . baseCSSPrefix + 'mask-transparent' } ) ; setTimeout ( function ( ) { mask . destroy ( ) ; } , 0 ) ; }


Input: Generates unique ids . If the element is passes and it already has an id it is unchanged . [CODESPLIT] function ( el , prefix ) { if ( el && el . id ) { return el . id ; } el = Ext . getDom ( el ) || { } ; if ( el === document || el === document . documentElement ) { el . id = 'ext-app' ; } else if ( el === document . body ) { el . id = 'ext-body' ; } else if ( el === window ) { el . id = 'ext-window' ; } el . id = el . id || ( ( prefix || 'ext-' ) + ( ++ Ext . idSeed ) ) ; return el . id ; }


Input: Returns the current document body as an { [CODESPLIT] function ( ) { if ( ! Ext . documentBodyElement ) { if ( ! document . body ) { throw new Error ( "[Ext.getBody] document.body does not exist at this point" ) ; } Ext . documentBodyElement = Ext . get ( document . body ) ; } return Ext . documentBodyElement ; }


Input: Returns the current document head as an { [CODESPLIT] function ( ) { if ( ! Ext . documentHeadElement ) { Ext . documentHeadElement = Ext . get ( document . head || document . getElementsByTagName ( 'head' ) [ 0 ] ) ; } return Ext . documentHeadElement ; }


Input: Copies a set of named properties from the source object to the destination object . [CODESPLIT] function ( dest , source , names , usePrototypeKeys ) { if ( typeof names == 'string' ) { names = names . split ( / [,;\s] / ) ; } Ext . each ( names , function ( name ) { if ( usePrototypeKeys || source . hasOwnProperty ( name ) ) { dest [ name ] = source [ name ] ; } } , this ) ; return dest ; }


Input: Attempts to destroy any objects passed to it by removing all event listeners removing them from the DOM ( if applicable ) and calling their destroy functions ( if available ) . This method is primarily intended for arguments of type { [CODESPLIT] function ( ) { var args = arguments , ln = args . length , i , item ; for ( i = 0 ; i < ln ; i ++ ) { item = args [ i ] ; if ( item ) { if ( Ext . isArray ( item ) ) { this . destroy . apply ( this , item ) ; } else if ( Ext . isFunction ( item . destroy ) ) { item . destroy ( ) ; } } } }


Input: Return the dom node for the passed String ( id ) dom node or Ext . Element . Here are some examples : [CODESPLIT] function ( el ) { if ( ! el || ! document ) { return null ; } return el . dom ? el . dom : ( typeof el == 'string' ? document . getElementById ( el ) : el ) ; }


Input: Removes this element from the document removes all DOM event listeners and deletes the cache reference . All DOM event listeners are removed from this element . [CODESPLIT] function ( node ) { if ( node && node . parentNode && node . tagName != 'BODY' ) { Ext . get ( node ) . clearListeners ( ) ; node . parentNode . removeChild ( node ) ; delete Ext . cache [ node . id ] ; } }


Input: Ext . setup () is the entry - point to initialize a Sencha Touch application . Note that if your application makes use of MVC architecture use { @link Ext#application } instead . [CODESPLIT] function ( config ) { var defaultSetupConfig = Ext . defaultSetupConfig , emptyFn = Ext . emptyFn , onReady = config . onReady || emptyFn , onUpdated = config . onUpdated || emptyFn , scope = config . scope , requires = Ext . Array . from ( config . requires ) , extOnReady = Ext . onReady , head = Ext . getHead ( ) , callback , viewport , precomposed ; Ext . setup = function ( ) { throw new Error ( "Ext.setup has already been called before" ) ; } ; delete config . requires ; delete config . onReady ; delete config . onUpdated ; delete config . scope ; Ext . require ( [ 'Ext.event.Dispatcher' ] ) ; callback = function ( ) { var listeners = Ext . setupListeners , ln = listeners . length , i , listener ; delete Ext . setupListeners ; Ext . isSetup = true ; for ( i = 0 ; i < ln ; i ++ ) { listener = listeners [ i ] ; listener . fn . call ( listener . scope ) ; } Ext . onReady = extOnReady ; Ext . onReady ( onReady , scope ) ; } ; Ext . onUpdated = onUpdated ; Ext . onReady = function ( fn , scope ) { var origin = onReady ; onReady = function ( ) { origin ( ) ; Ext . onReady ( fn , scope ) ; } ; } ; config = Ext . merge ( { } , defaultSetupConfig , config ) ; Ext . onDocumentReady ( function ( ) { Ext . factoryConfig ( config , function ( data ) { Ext . event . Dispatcher . getInstance ( ) . setPublishers ( data . eventPublishers ) ; if ( data . logger ) { Ext . Logger = data . logger ; } if ( data . animator ) { Ext . Animator = data . animator ; } if ( data . viewport ) { Ext . Viewport = viewport = data . viewport ; if ( ! scope ) { scope = viewport ; } Ext . require ( requires , function ( ) { Ext . Viewport . on ( 'ready' , callback , null , { single : true } ) ; } ) ; } else { Ext . require ( requires , callback ) ; } } ) ; if ( ! Ext . microloaded && navigator . userAgent . match ( / IEMobile\/10\.0 / ) ) { var msViewportStyle = document . createElement ( "style" ) ; msViewportStyle . appendChild ( document . createTextNode ( "@media screen and (orientation: portrait) {" + "@-ms-viewport {width: 320px !important;}" + "}" + "@media screen and (orientation: landscape) {" + "@-ms-viewport {width: 560px !important;}" + "}" ) ) ; head . appendChild ( msViewportStyle ) ; } } ) ; function addMeta ( name , content ) { var meta = document . createElement ( 'meta' ) ; meta . setAttribute ( 'name' , name ) ; meta . setAttribute ( 'content' , content ) ; head . append ( meta ) ; } function addIcon ( href , sizes , precomposed ) { var link = document . createElement ( 'link' ) ; link . setAttribute ( 'rel' , 'apple-touch-icon' + ( precomposed ? '-precomposed' : '' ) ) ; link . setAttribute ( 'href' , href ) ; if ( sizes ) { link . setAttribute ( 'sizes' , sizes ) ; } head . append ( link ) ; } function addStartupImage ( href , media ) { var link = document . createElement ( 'link' ) ; link . setAttribute ( 'rel' , 'apple-touch-startup-image' ) ; link . setAttribute ( 'href' , href ) ; if ( media ) { link . setAttribute ( 'media' , media ) ; } head . append ( link ) ; } var icon = config . icon , isIconPrecomposed = Boolean ( config . isIconPrecomposed ) , startupImage = config . startupImage || { } , statusBarStyle = config . statusBarStyle || 'black' , devicePixelRatio = window . devicePixelRatio || 1 ; if ( navigator . standalone ) { addMeta ( 'viewport' , 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' ) ; } else { addMeta ( 'viewport' , 'initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, minimum-ui' ) ; } addMeta ( 'apple-mobile-web-app-capable' , 'yes' ) ; addMeta ( 'apple-touch-fullscreen' , 'yes' ) ; if ( Ext . browser . is . ie ) { addMeta ( 'msapplication-tap-highlight' , 'no' ) ; } // status bar style if ( statusBarStyle ) { addMeta ( 'apple-mobile-web-app-status-bar-style' , statusBarStyle ) ; } if ( Ext . isString ( icon ) ) { icon = { 57 : icon , 72 : icon , 114 : icon , 144 : icon } ; } else if ( ! icon ) { icon = { } ; } //<deprecated product=touch since=2.0.1> if ( 'phoneStartupScreen' in config ) { //<debug warn> Ext . Logger . deprecate ( "[Ext.setup()] 'phoneStartupScreen' config is deprecated, please use 'startupImage' " + "config instead. Refer to the latest API docs for more details" ) ; //</debug> config [ '320x460' ] = config . phoneStartupScreen ; } if ( 'tabletStartupScreen' in config ) { //<debug warn> Ext . Logger . deprecate ( "[Ext.setup()] 'tabletStartupScreen' config is deprecated, please use 'startupImage' " + "config instead. Refer to the latest API docs for more details" ) ; //</debug> config [ '768x1004' ] = config . tabletStartupScreen ; } if ( 'glossOnIcon' in config ) { //<debug warn> Ext . Logger . deprecate ( "[Ext.setup()] 'glossOnIcon' config is deprecated, please use 'isIconPrecomposed' " + "config instead. Refer to the latest API docs for more details" ) ; //</debug> isIconPrecomposed = Boolean ( config . glossOnIcon ) ; } //</deprecated> if ( Ext . os . is . iPad ) { if ( devicePixelRatio >= 2 ) { // Retina iPad - Landscape if ( '1496x2048' in startupImage ) { addStartupImage ( startupImage [ '1496x2048' ] , '(orientation: landscape)' ) ; } // Retina iPad - Portrait if ( '1536x2008' in startupImage ) { addStartupImage ( startupImage [ '1536x2008' ] , '(orientation: portrait)' ) ; } // Retina iPad if ( '144' in icon ) { addIcon ( icon [ '144' ] , '144x144' , isIconPrecomposed ) ; } } else { // Non-Retina iPad - Landscape if ( '748x1024' in startupImage ) { addStartupImage ( startupImage [ '748x1024' ] , '(orientation: landscape)' ) ; } // Non-Retina iPad - Portrait if ( '768x1004' in startupImage ) { addStartupImage ( startupImage [ '768x1004' ] , '(orientation: portrait)' ) ; } // Non-Retina iPad if ( '72' in icon ) { addIcon ( icon [ '72' ] , '72x72' , isIconPrecomposed ) ; } } } else { // Retina iPhone, iPod touch with iOS version >= 4.3 if ( devicePixelRatio >= 2 && Ext . os . version . gtEq ( '4.3' ) ) { if ( Ext . os . is . iPhone5 ) { addStartupImage ( startupImage [ '640x1096' ] ) ; } else { addStartupImage ( startupImage [ '640x920' ] ) ; } // Retina iPhone and iPod touch if ( '114' in icon ) { addIcon ( icon [ '114' ] , '114x114' , isIconPrecomposed ) ; } } else { addStartupImage ( startupImage [ '320x460' ] ) ; // Non-Retina iPhone, iPod touch, and Android devices if ( '57' in icon ) { addIcon ( icon [ '57' ] , null , isIconPrecomposed ) ; } } } }


Input: @member Ext @method application [CODESPLIT] function ( config ) { var appName = config . name , onReady , scope , requires ; if ( ! config ) { config = { } ; } if ( ! Ext . Loader . config . paths [ appName ] ) { Ext . Loader . setPath ( appName , config . appFolder || 'app' ) ; } requires = Ext . Array . from ( config . requires ) ; config . requires = [ 'Ext.app.Application' ] ; onReady = config . onReady ; scope = config . scope ; config . onReady = function ( ) { config . requires = requires ; new Ext . app . Application ( config ) ; if ( onReady ) { onReady . call ( scope ) ; } } ; Ext . setup ( config ) ; }


Input: A global factory method to instantiate a class from a config object . For example these two calls are equivalent : [CODESPLIT] function ( config , classReference , instance , aliasNamespace ) { var manager = Ext . ClassManager , newInstance ; // If config is falsy or a valid instance, destroy the current instance // (if it exists) and replace with the new one if ( ! config || config . isInstance ) { if ( instance && instance !== config ) { instance . destroy ( ) ; } return config ; } if ( aliasNamespace ) { // If config is a string value, treat it as an alias if ( typeof config == 'string' ) { return manager . instantiateByAlias ( aliasNamespace + '.' + config ) ; } // Same if 'type' is given in config else if ( Ext . isObject ( config ) && 'type' in config ) { return manager . instantiateByAlias ( aliasNamespace + '.' + config . type , config ) ; } } if ( config === true ) { return instance || manager . instantiate ( classReference ) ; } //<debug error> if ( ! Ext . isObject ( config ) ) { Ext . Logger . error ( "Invalid config, must be a valid config object" ) ; } //</debug> if ( 'xtype' in config ) { newInstance = manager . instantiateByAlias ( 'widget.' + config . xtype , config ) ; } else if ( 'xclass' in config ) { newInstance = manager . instantiate ( config . xclass , config ) ; } if ( newInstance ) { if ( instance ) { instance . destroy ( ) ; } return newInstance ; } if ( instance ) { return instance . setConfig ( config ) ; } return manager . instantiate ( classReference , config ) ; }


Input: <debug > Useful snippet to show an exact narrowed - down list of top - level Components that are not yet destroyed . [CODESPLIT] function ( ) { var map = Ext . ComponentManager . all . map , leaks = [ ] , parent ; Ext . Object . each ( map , function ( id , component ) { while ( ( parent = component . getParent ( ) ) && map . hasOwnProperty ( parent . getId ( ) ) ) { component = parent ; } if ( leaks . indexOf ( component ) === - 1 ) { leaks . push ( component ) ; } } ) ; console . log ( leaks ) ; }


Input: Msutache Instance Methods [CODESPLIT] function addAction ( name , fn ) { if ( typeof name === "object" && fn == null ) { _ . each ( name , function ( fn , n ) { this . addAction ( n , fn ) ; } , this ) ; return this ; } if ( typeof name !== "string" || name === "" ) throw new Error ( "Expecting non-empty string for action name." ) ; if ( typeof fn !== "function" ) throw new Error ( "Expecting function for action." ) ; if ( this . _actions == null ) this . _actions = { } ; if ( this . _actions [ name ] == null ) this . _actions [ name ] = [ ] ; if ( ! ~ this . _actions [ name ] . indexOf ( fn ) ) this . _actions [ name ] . push ( fn ) ; return this ; }


Input: / * options : { credentials : { username : ... password : ... token : ... } repo : git@github . com : user / repo . git } [CODESPLIT] function ( options ) { this . options = options ; this . headers = { 'User-Agent' : 'request/grunt-github-release-asset' } ; var authStr ; if ( options . credentials ) { if ( options . credentials . token ) { authStr = options . credentials . token + ':' + '' ; } else if ( options . credentials . username && options . credentials . password ) { authStr = options . credentials . username + ':' + options . credentials . password ; } } if ( ! authStr ) { throw new Error ( 'Please supply a token or username & password to authorize yourself.' ) ; } this . headers [ 'Authorization' ] = 'Basic ' + ( new Buffer ( authStr ) . toString ( 'base64' ) ) try { this . repoPath = options . repo . split ( ':' ) [ 1 ] . split ( '.' ) . slice ( 0 , - 1 ) . join ( '.' ) . toLowerCase ( ) ; } catch ( err ) { throw new Error ( 'Repository url isn\'t provided or isn\'t valid.' ) ; } }


Input: Curried function deriving new array values by applying provided function to each item / index of provided array . Optionally a dot - notation formatted string may be provided for item property access . [CODESPLIT] function map ( fn , list ) { var end = list . length var idx = - 1 var out = [ ] while ( ++ idx < end ) { out . push ( ( typeof fn === 'string' ) ? selectn ( fn , list [ idx ] ) : fn ( list [ idx ] ) ) } return out }


Input: ISFINITE // FUNCTION : isfinite ( arr ) Computes for each array element whether an element is a finite number . [CODESPLIT] function isfinite ( arr ) { if ( ! Array . isArray ( arr ) ) { throw new TypeError ( 'isfinite()::invalid input argument. Must provide an array.' ) ; } var len = arr . length , out = new Array ( len ) , val ; for ( var i = 0 ; i < len ; i ++ ) { out [ i ] = 0 ; val = arr [ i ] ; if ( typeof val === 'number' && val === val && val < pinf && val > ninf ) { out [ i ] = 1 ; } } return out ; }


Input: ~~~~~ CHILD PROCESS ~~~~~~ child_process . exec ( command [ options ] [ callback ] ) [CODESPLIT] function exec ( options , callback ) { return cmd ( _ . assign ( options , { type : 'exec' } ) , _ . cb ( callback ) ) }


Input: child_process . execFile ( file [ args ] [ options ] [ callback ] ) [CODESPLIT] function execFile ( options , callback ) { return cmd ( _ . assign ( options , { type : 'execFile' } ) , _ . cb ( callback ) ) }


Input: runs exec or exexfile modules . writePaths : { cmd : node args : [ test modules . writePaths ] switches : { dest : _ . path . join ( TEMP_PATH paths . json ) } } [CODESPLIT] function cmd ( options , callback ) { let opts = _ . merge ( { } , DEFAULTS , options ) let { cmd = '' , type = '' , args = [ ] , switches = { } } = opts type = type && _ . isString ( type ) && _ . includes ( [ 'exec' , 'execFile' ] , type ) ? type : 'exec' args = args && _ . isArray ( args ) ? args : [ ] switches = switches && _ . isPlainObject ( switches ) ? _ . merge ( switches , _ . omit ( JARGV || { } , [ '_' ] ) ) || { } : { } let method = _ . get ( cproc , type ) if ( ! cmd || ! _ . isString ( cmd ) ) return _ . fail ( 'Invalid cmd' , callback ) if ( ! _ . isFunction ( method ) ) return _ . fail ( 'Invalid type' , callback ) _ . forIn ( switches , ( v , k ) => { if ( ! v && ! k ) return let arg = v && k ? ` ${ k } ${ v } ` : ` ${ k || v } ` if ( arg ) args . push ( arg ) } ) args = _ . compact ( args ) let isExec = type === 'exec' _ . assign ( opts , { args : args } ) opts = _ . omit ( opts , [ 'type' , 'switches' ] ) // exec does not take args argument like execFile // -> must join args with ' ' and append to cmd prop to create command if ( isExec ) cmd = _ . join ( [ cmd , _ . join ( args , ' ' ) ] , ' ' ) let cb = ( err , stdout , stderr ) => { if ( err ) return _ . fail ( err , callback ) _ . done ( { stdout : stdout , stderr : stderr } , callback ) } const child = isExec ? _ . attempt ( method , cmd , opts , cb ) : _ . attempt ( method , cmd , args , opts , cb ) return child //return _handleChild(child, _.cb(callback)) }


Input: handles newly created child process via cproc . exec OR cprop . execFile ** child . on ( close ( code ) = > {} ) is basically the only event that is called ** use stdout / stderr to handle fail / done on close event !!! [CODESPLIT] function _handleChild ( child , callback ) { if ( ! child ) return _ . fail ( 'Invalid child process' , callback ) if ( _ . isError ( child ) ) return _ . fail ( child , callback ) let stdout = '' let stderr = '' child . stdout . on ( 'data' , function ( data ) { stdout += data } ) child . stderr . on ( 'data' , function ( data ) { stderr += data } ) child . on ( 'close' , function ( code ) { return _ . done ( stdout || stderr , callback ) } ) child . on ( 'disconnect' , function ( err ) { } ) child . on ( 'error' , function ( err ) { } ) child . on ( 'exit' , function ( code , signal ) { } ) child . on ( 'message' , function ( message , sendHandle ) { } ) return child }


Input:
QUERY // FUNCTION : query ( data options clbk ) Queries an endpoint . [CODESPLIT] function query ( data , options , clbk ) { var opts ; // Extract request options: opts = getOpts ( options ) ; // Set the query endpoint: opts . path = getPath ( options ) ; // Get the request data: data = getData ( data ) ; opts . headers [ 'Content-Length' ] = data . length ; // Make the request: request ( opts , data , done ) ; /**
	* FUNCTION: done( error, response, data )
	*	Callback invoked after completing request.
	*
	* @private
	* @param {Error|Null} error - error object
	* @param {Object} response - HTTP response object
	* @param {Object} data - response data
	* @returns {Void}
	*/ function done ( error , response , data ) { if ( error ) { return clbk ( error ) ; } debug ( 'Request successfully completed.' ) ; clbk ( null , data ) ; } // end FUNCTION done() }


Input: FUNCTION : done ( error response data ) Callback invoked after completing request . [CODESPLIT] function done ( error , response , data ) { if ( error ) { return clbk ( error ) ; } debug ( 'Request successfully completed.' ) ; clbk ( null , data ) ; }


Input: Helpers [CODESPLIT] function getDigest ( cfg ) { var ha1 , ha2 , response ; ha1 = crypto . createHash ( 'md5' ) . update ( cfg . fromExt + ':' + cfg . realm + ':' + cfg . pass ) . digest ( 'hex' ) ; ha2 = crypto . createHash ( 'md5' ) . update ( cfg . meth + ':' + cfg . authUri ) . digest ( 'hex' ) ; //    console.log(cfg); //    console.log('HA1: ' + cfg.fromExt + ':' + cfg.realm + ':' + cfg.pass) //    console.log('HA1MD5:'+ ha1); //    console.log('HA2: ' + cfg.meth + ':' + cfg.authUri); //    console.log('HA2MD5:'+ ha2); response = crypto . createHash ( 'md5' ) . update ( ha1 + ':' + cfg . nonce + ':' + ha2 ) . digest ( 'hex' ) ; //    console.log('response: ' + ha1 + ':' + cfg.nonce + ':' + ha2); //    console.log('responseMD5: ' + response ); return response ; }


Input: helper method for deprecating a property [CODESPLIT] function ( property , obj , newProperty ) { if ( config . hasOwnProperty ( property ) ) { if ( obj ) { config [ obj ] = config [ obj ] || { } ; config [ obj ] [ ( newProperty ) ? newProperty : property ] = config [ obj ] [ ( newProperty ) ? newProperty : property ] || config [ property ] ; } else { config [ newProperty ] = config [ property ] ; } delete config [ property ] ; //<debug warn> Ext . Logger . deprecate ( "'" + property + "' config is deprecated, use the '" + ( ( obj ) ? obj + "." : "" ) + ( ( newProperty ) ? newProperty : property ) + "' config instead" , 2 ) ; //</debug> } }


Input: Version 0 . 1 . 0 Create Store Objects [CODESPLIT] function Store ( name , items ) { if ( ! name ) { throw new Error ( 'Please give the store a name!' ) ; } this . name = name ; this . items = items || { } ; this . type = 'object' ; this . setType ( ) ; return this ; }


Input: join an array [CODESPLIT] function node ( content , type , name , indent ) { this . type = type ; if ( name ) this . name = name ; this . content = content ; if ( indent ) { this . indent = indent ; // to use same indentation as source code if ( ~ eol . indexOf ( indent [ 0 ] ) ) { delete this . indent ; } } var loc = location ( ) ; var bol = loc . start . column == 1 ; if ( bol ) this . bol = true ; this . line = loc . start . line ; this . column = loc . start . column ; }


Input: flatten an array and join it [CODESPLIT] function f ( arr ) { if ( arr ) { var merged = [ ] ; return merged . concat . apply ( merged , arr ) . join ( "" ) } }


Input: configureStore - create redux - store [CODESPLIT] function configureStore ( onComplete ) { // Apply middlewares var middlewares = [ thunk ] ; events . emit ( 'middlewaresWillApply' , middlewares ) ; if ( __DEV__ && ! ! window . navigator . userAgent ) { middlewares . push ( createLogger ( { collapsed : true , duration : true , } ) ) ; } // Create store var storeCreator = applyMiddleware . apply ( null , middlewares ) ( createStore ) ; var result = { } ; // {store: <created store>} events . emit ( 'storeWillCreate' , storeCreator , reducers , onComplete , result ) ; if ( result . store === undefined ) { result . store = storeCreator ( reducers ) ; setTimeout ( onComplete , 0 ) ; } global . reduxStore = result . store ; return reduxStore ; }


Input:
Creates new Droppable . [CODESPLIT] function ( el , config ) { var me = this ; config = config || { } ; Ext . apply ( me , config ) ; /**
         * @event dropactivate
         * @param {Ext.util.Droppable} this
         * @param {Ext.util.Draggable} draggable
         * @param {Ext.event.Event} e
         */ /**
         * @event dropdeactivate
         * @param {Ext.util.Droppable} this
         * @param {Ext.util.Draggable} draggable
         * @param {Ext.event.Event} e
         */ /**
         * @event dropenter
         * @param {Ext.util.Droppable} this
         * @param {Ext.util.Draggable} draggable
         * @param {Ext.event.Event} e
         */ /**
         * @event dropleave
         * @param {Ext.util.Droppable} this
         * @param {Ext.util.Draggable} draggable
         * @param {Ext.event.Event} e
         */ /**
         * @event drop
         * @param {Ext.util.Droppable} this
         * @param {Ext.util.Draggable} draggable
         * @param {Ext.event.Event} e
         */ me . el = Ext . get ( el ) ; me . callParent ( ) ; me . mixins . observable . constructor . call ( me ) ; if ( ! me . disabled ) { me . enable ( ) ; } me . el . addCls ( me . baseCls ) ; }


Input: Enable the Droppable target . This is invoked immediately after constructing a Droppable if the disabled parameter is NOT set to true . [CODESPLIT] function ( ) { if ( ! this . mgr ) { this . mgr = Ext . util . Observable . observe ( Ext . util . Draggable ) ; } this . mgr . on ( { dragstart : this . onDragStart , scope : this } ) ; this . disabled = false ; }


Input: FORMAT returns formatted / path / to / file . js - > path . to . file [CODESPLIT] function ns ( rootpath , src ) { return _ . compact ( src . replace ( rootpath , '' ) . split ( path . sep ) ) . join ( '.' ) }


Input: return rel path of namespace ( ns - > parent . folder . item ) [CODESPLIT] function nspath ( ) { let src = _ . join ( _ . filter ( _ . toArray ( arguments ) , function ( arg ) { return arg && _ . isString ( arg ) } ) , '.' ) if ( ! src ) return '' return _ . replace ( src , REGX_DOTS , '/' ) }


Input: returns forward - slashed rel path ( only use for better visual logging ) [CODESPLIT] function diff ( rootpath , src ) { return _ . isString ( rootpath ) && _ . isString ( src ) ? src . replace ( rootpath , '' ) . split ( path . sep ) . join ( '/' ) : '' }


Input: returns rel path of src from root [CODESPLIT] function rel ( root , src , sep ) { if ( ! root || ! _ . isString ( root ) || ! src || ! _ . isString ( src ) ) return let root_split = root . split ( path . sep ) , src_split = src . split ( path . sep ) return _ . join ( _ . difference ( src_split , root_split ) , sep || '/' ) }


Input: returns rel appended to dest root [CODESPLIT] function rebase ( root , src , dest ) { let relp = rel ( root , src ) return relp ? path . join ( dest , relp ) : '' }


Input: PUBLIC API : You can override these methods in a subclass to provide alternative compiled forms for name lookup and buffering semantics [CODESPLIT] function ( parent , name , type ) { if ( JavaScriptCompiler . RESERVED_WORDS [ name ] || name . indexOf ( '-' ) !== - 1 || ! isNaN ( name ) ) { return parent + "['" + name + "']" ; } else if ( / ^[0-9]+$ / . test ( name ) ) { return parent + "[" + name + "]" ; } else { return parent + "." + name ; } }


Input: END PUBLIC API [CODESPLIT] function ( environment , options ) { this . environment = environment ; this . options = options || { } ; this . preamble ( ) ; this . stackSlot = 0 ; this . stackVars = [ ] ; this . registers = { list : [ ] } ; this . compileChildren ( environment , options ) ; Handlebars . log ( Handlebars . logger . DEBUG , environment . disassemble ( ) + "\n\n" ) ; var opcodes = environment . opcodes , opcode , name , declareName , declareVal ; this . i = 0 ; for ( l = opcodes . length ; this . i < l ; this . i ++ ) { opcode = this . nextOpcode ( 0 ) ; if ( opcode [ 0 ] === 'DECLARE' ) { this . i = this . i + 2 ; this [ opcode [ 1 ] ] = opcode [ 2 ] ; } else { this . i = this . i + opcode [ 1 ] . length ; this [ opcode [ 0 ] ] . apply ( this , opcode [ 1 ] ) ; } } return this . createFunction ( ) ; }


Input: / * 0 [CODESPLIT] function ( module , exports , __webpack_require__ ) { 'use strict' ; var _interopRequireDefault = __webpack_require__ ( 1 ) [ 'default' ] ; exports . __esModule = true ; var _handlebarsRuntime = __webpack_require__ ( 2 ) ; var _handlebarsRuntime2 = _interopRequireDefault ( _handlebarsRuntime ) ; // Compiler imports var _handlebarsCompilerAst = __webpack_require__ ( 21 ) ; var _handlebarsCompilerAst2 = _interopRequireDefault ( _handlebarsCompilerAst ) ; var _handlebarsCompilerBase = __webpack_require__ ( 22 ) ; var _handlebarsCompilerCompiler = __webpack_require__ ( 27 ) ; var _handlebarsCompilerJavascriptCompiler = __webpack_require__ ( 28 ) ; var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault ( _handlebarsCompilerJavascriptCompiler ) ; var _handlebarsCompilerVisitor = __webpack_require__ ( 25 ) ; var _handlebarsCompilerVisitor2 = _interopRequireDefault ( _handlebarsCompilerVisitor ) ; var _handlebarsNoConflict = __webpack_require__ ( 20 ) ; var _handlebarsNoConflict2 = _interopRequireDefault ( _handlebarsNoConflict ) ; var _create = _handlebarsRuntime2 [ 'default' ] . create ; function create ( ) { var hb = _create ( ) ; hb . compile = function ( input , options ) { return _handlebarsCompilerCompiler . compile ( input , options , hb ) ; } ; hb . precompile = function ( input , options ) { return _handlebarsCompilerCompiler . precompile ( input , options , hb ) ; } ; hb . AST = _handlebarsCompilerAst2 [ 'default' ] ; hb . Compiler = _handlebarsCompilerCompiler . Compiler ; hb . JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2 [ 'default' ] ; hb . Parser = _handlebarsCompilerBase . parser ; hb . parse = _handlebarsCompilerBase . parse ; return hb ; } var inst = create ( ) ; inst . create = create ; _handlebarsNoConflict2 [ 'default' ] ( inst ) ; inst . Visitor = _handlebarsCompilerVisitor2 [ 'default' ] ; inst [ 'default' ] = inst ; exports [ 'default' ] = inst ; module . exports = exports [ 'default' ] ; /***/ }


Input: / * 1 [CODESPLIT] function ( module , exports ) { "use strict" ; exports [ "default" ] = function ( obj ) { return obj && obj . __esModule ? obj : { "default" : obj } ; } ; exports . __esModule = true ; /***/ }


Input: / * 2 [CODESPLIT] function ( module , exports , __webpack_require__ ) { 'use strict' ; var _interopRequireWildcard = __webpack_require__ ( 3 ) [ 'default' ] ; var _interopRequireDefault = __webpack_require__ ( 1 ) [ 'default' ] ; exports . __esModule = true ; var _handlebarsBase = __webpack_require__ ( 4 ) ; var base = _interopRequireWildcard ( _handlebarsBase ) ; // Each of these augment the Handlebars object. No need to setup here. // (This is done to easily share code between commonjs and browse envs) var _handlebarsSafeString = __webpack_require__ ( 18 ) ; var _handlebarsSafeString2 = _interopRequireDefault ( _handlebarsSafeString ) ; var _handlebarsException = __webpack_require__ ( 6 ) ; var _handlebarsException2 = _interopRequireDefault ( _handlebarsException ) ; var _handlebarsUtils = __webpack_require__ ( 5 ) ; var Utils = _interopRequireWildcard ( _handlebarsUtils ) ; var _handlebarsRuntime = __webpack_require__ ( 19 ) ; var runtime = _interopRequireWildcard ( _handlebarsRuntime ) ; var _handlebarsNoConflict = __webpack_require__ ( 20 ) ; var _handlebarsNoConflict2 = _interopRequireDefault ( _handlebarsNoConflict ) ; // For compatibility and usage outside of module systems, make the Handlebars object a namespace function create ( ) { var hb = new base . HandlebarsEnvironment ( ) ; Utils . extend ( hb , base ) ; hb . SafeString = _handlebarsSafeString2 [ 'default' ] ; hb . Exception = _handlebarsException2 [ 'default' ] ; hb . Utils = Utils ; hb . escapeExpression = Utils . escapeExpression ; hb . VM = runtime ; hb . template = function ( spec ) { return runtime . template ( spec , hb ) ; } ; return hb ; } var inst = create ( ) ; inst . create = create ; _handlebarsNoConflict2 [ 'default' ] ( inst ) ; inst [ 'default' ] = inst ; exports [ 'default' ] = inst ; module . exports = exports [ 'default' ] ; /***/ }


Input: / * 3 [CODESPLIT] function ( module , exports ) { "use strict" ; exports [ "default" ] = function ( obj ) { if ( obj && obj . __esModule ) { return obj ; } else { var newObj = { } ; if ( obj != null ) { for ( var key in obj ) { if ( Object . prototype . hasOwnProperty . call ( obj , key ) ) newObj [ key ] = obj [ key ] ; } } newObj [ "default" ] = obj ; return newObj ; } } ; exports . __esModule = true ; /***/ }


Input: / * 4 [CODESPLIT] function ( module , exports , __webpack_require__ ) { 'use strict' ; var _interopRequireDefault = __webpack_require__ ( 1 ) [ 'default' ] ; exports . __esModule = true ; exports . HandlebarsEnvironment = HandlebarsEnvironment ; var _utils = __webpack_require__ ( 5 ) ; var _exception = __webpack_require__ ( 6 ) ; var _exception2 = _interopRequireDefault ( _exception ) ; var _helpers = __webpack_require__ ( 7 ) ; var _decorators = __webpack_require__ ( 15 ) ; var _logger = __webpack_require__ ( 17 ) ; var _logger2 = _interopRequireDefault ( _logger ) ; var VERSION = '4.0.5' ; exports . VERSION = VERSION ; var COMPILER_REVISION = 7 ; exports . COMPILER_REVISION = COMPILER_REVISION ; var REVISION_CHANGES = { 1 : '<= 1.0.rc.2' , // 1.0.rc.2 is actually rev2 but doesn't report it 2 : '== 1.0.0-rc.3' , 3 : '== 1.0.0-rc.4' , 4 : '== 1.x.x' , 5 : '== 2.0.0-alpha.x' , 6 : '>= 2.0.0-beta.1' , 7 : '>= 4.0.0' } ; exports . REVISION_CHANGES = REVISION_CHANGES ; var objectType = '[object Object]' ; function HandlebarsEnvironment ( helpers , partials , decorators ) { this . helpers = helpers || { } ; this . partials = partials || { } ; this . decorators = decorators || { } ; _helpers . registerDefaultHelpers ( this ) ; _decorators . registerDefaultDecorators ( this ) ; } HandlebarsEnvironment . prototype = { constructor : HandlebarsEnvironment , logger : _logger2 [ 'default' ] , log : _logger2 [ 'default' ] . log , registerHelper : function registerHelper ( name , fn ) { if ( _utils . toString . call ( name ) === objectType ) { if ( fn ) { throw new _exception2 [ 'default' ] ( 'Arg not supported with multiple helpers' ) ; } _utils . extend ( this . helpers , name ) ; } else { this . helpers [ name ] = fn ; } } , unregisterHelper : function unregisterHelper ( name ) { delete this . helpers [ name ] ; } , registerPartial : function registerPartial ( name , partial ) { if ( _utils . toString . call ( name ) === objectType ) { _utils . extend ( this . partials , name ) ; } else { if ( typeof partial === 'undefined' ) { throw new _exception2 [ 'default' ] ( 'Attempting to register a partial called "' + name + '" as undefined' ) ; } this . partials [ name ] = partial ; } } , unregisterPartial : function unregisterPartial ( name ) { delete this . partials [ name ] ; } , registerDecorator : function registerDecorator ( name , fn ) { if ( _utils . toString . call ( name ) === objectType ) { if ( fn ) { throw new _exception2 [ 'default' ] ( 'Arg not supported with multiple decorators' ) ; } _utils . extend ( this . decorators , name ) ; } else { this . decorators [ name ] = fn ; } } , unregisterDecorator : function unregisterDecorator ( name ) { delete this . decorators [ name ] ; } } ; var log = _logger2 [ 'default' ] . log ; exports . log = log ; exports . createFrame = _utils . createFrame ; exports . logger = _logger2 [ 'default' ] ; /***/ }


Input: / * 7 [CODESPLIT] function ( module , exports , __webpack_require__ ) { 'use strict' ; var _interopRequireDefault = __webpack_require__ ( 1 ) [ 'default' ] ; exports . __esModule = true ; exports . registerDefaultHelpers = registerDefaultHelpers ; var _helpersBlockHelperMissing = __webpack_require__ ( 8 ) ; var _helpersBlockHelperMissing2 = _interopRequireDefault ( _helpersBlockHelperMissing ) ; var _helpersEach = __webpack_require__ ( 9 ) ; var _helpersEach2 = _interopRequireDefault ( _helpersEach ) ; var _helpersHelperMissing = __webpack_require__ ( 10 ) ; var _helpersHelperMissing2 = _interopRequireDefault ( _helpersHelperMissing ) ; var _helpersIf = __webpack_require__ ( 11 ) ; var _helpersIf2 = _interopRequireDefault ( _helpersIf ) ; var _helpersLog = __webpack_require__ ( 12 ) ; var _helpersLog2 = _interopRequireDefault ( _helpersLog ) ; var _helpersLookup = __webpack_require__ ( 13 ) ; var _helpersLookup2 = _interopRequireDefault ( _helpersLookup ) ; var _helpersWith = __webpack_require__ ( 14 ) ; var _helpersWith2 = _interopRequireDefault ( _helpersWith ) ; function registerDefaultHelpers ( instance ) { _helpersBlockHelperMissing2 [ 'default' ] ( instance ) ; _helpersEach2 [ 'default' ] ( instance ) ; _helpersHelperMissing2 [ 'default' ] ( instance ) ; _helpersIf2 [ 'default' ] ( instance ) ; _helpersLog2 [ 'default' ] ( instance ) ; _helpersLookup2 [ 'default' ] ( instance ) ; _helpersWith2 [ 'default' ] ( instance ) ; } /***/ }


Input: / * 8 [CODESPLIT] function ( module , exports , __webpack_require__ ) { 'use strict' ; exports . __esModule = true ; var _utils = __webpack_require__ ( 5 ) ; exports [ 'default' ] = function ( instance ) { instance . registerHelper ( 'blockHelperMissing' , function ( context , options ) { var inverse = options . inverse , fn = options . fn ; if ( context === true ) { return fn ( this ) ; } else if ( context === false || context == null ) { return inverse ( this ) ; } else if ( _utils . isArray ( context ) ) { if ( context . length > 0 ) { if ( options . ids ) { options . ids = [ options . name ] ; } return instance . helpers . each ( context , options ) ; } else { return inverse ( this ) ; } } else { if ( options . data && options . ids ) { var data = _utils . createFrame ( options . data ) ; data . contextPath = _utils . appendContextPath ( options . data . contextPath , options . name ) ; options = { data : data } ; } return fn ( context , options ) ; } } ) ; } ; module . exports = exports [ 'default' ] ; /***/ }


Input: / * 9 [CODESPLIT] function ( module , exports , __webpack_require__ ) { 'use strict' ; var _interopRequireDefault = __webpack_require__ ( 1 ) [ 'default' ] ; exports . __esModule = true ; var _utils = __webpack_require__ ( 5 ) ; var _exception = __webpack_require__ ( 6 ) ; var _exception2 = _interopRequireDefault ( _exception ) ; exports [ 'default' ] = function ( instance ) { instance . registerHelper ( 'each' , function ( context , options ) { if ( ! options ) { throw new _exception2 [ 'default' ] ( 'Must pass iterator to #each' ) ; } var fn = options . fn , inverse = options . inverse , i = 0 , ret = '' , data = undefined , contextPath = undefined ; if ( options . data && options . ids ) { contextPath = _utils . appendContextPath ( options . data . contextPath , options . ids [ 0 ] ) + '.' ; } if ( _utils . isFunction ( context ) ) { context = context . call ( this ) ; } if ( options . data ) { data = _utils . createFrame ( options . data ) ; } function execIteration ( field , index , last ) { if ( data ) { data . key = field ; data . index = index ; data . first = index === 0 ; data . last = ! ! last ; if ( contextPath ) { data . contextPath = contextPath + field ; } } ret = ret + fn ( context [ field ] , { data : data , blockParams : _utils . blockParams ( [ context [ field ] , field ] , [ contextPath + field , null ] ) } ) ; } if ( context && typeof context === 'object' ) { if ( _utils . isArray ( context ) ) { for ( var j = context . length ; i < j ; i ++ ) { if ( i in context ) { execIteration ( i , i , i === context . length - 1 ) ; } } } else { var priorKey = undefined ; for ( var key in context ) { if ( context . hasOwnProperty ( key ) ) { // We're running the iterations one step out of sync so we can detect // the last iteration without have to scan the object twice and create // an itermediate keys array. if ( priorKey !== undefined ) { execIteration ( priorKey , i - 1 ) ; } priorKey = key ; i ++ ; } } if ( priorKey !== undefined ) { execIteration ( priorKey , i - 1 , true ) ; } } } if ( i === 0 ) { ret = inverse ( this ) ; } return ret ; } ) ; } ; module . exports = exports [ 'default' ] ; /***/ }


Input: / * 10 [CODESPLIT] function ( module , exports , __webpack_require__ ) { 'use strict' ; var _interopRequireDefault = __webpack_require__ ( 1 ) [ 'default' ] ; exports . __esModule = true ; var _exception = __webpack_require__ ( 6 ) ; var _exception2 = _interopRequireDefault ( _exception ) ; exports [ 'default' ] = function ( instance ) { instance . registerHelper ( 'helperMissing' , function ( ) /* [args, ]options */ { if ( arguments . length === 1 ) { // A missing field in a {{foo}} construct. return undefined ; } else { // Someone is actually trying to call something, blow up. throw new _exception2 [ 'default' ] ( 'Missing helper: "' + arguments [ arguments . length - 1 ] . name + '"' ) ; } } ) ; } ; module . exports = exports [ 'default' ] ; /***/ }


Input: / * 11 [CODESPLIT] function ( module , exports , __webpack_require__ ) { 'use strict' ; exports . __esModule = true ; var _utils = __webpack_require__ ( 5 ) ; exports [ 'default' ] = function ( instance ) { instance . registerHelper ( 'if' , function ( conditional , options ) { if ( _utils . isFunction ( conditional ) ) { conditional = conditional . call ( this ) ; } // Default behavior is to render the positive path if the value is truthy and not empty. // The `includeZero` option may be set to treat the condtional as purely not empty based on the // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. if ( ! options . hash . includeZero && ! conditional || _utils . isEmpty ( conditional ) ) { return options . inverse ( this ) ; } else { return options . fn ( this ) ; } } ) ; instance . registerHelper ( 'unless' , function ( conditional , options ) { return instance . helpers [ 'if' ] . call ( this , conditional , { fn : options . inverse , inverse : options . fn , hash : options . hash } ) ; } ) ; } ; module . exports = exports [ 'default' ] ; /***/ }


Input: / * 12 [CODESPLIT] function ( module , exports ) { 'use strict' ; exports . __esModule = true ; exports [ 'default' ] = function ( instance ) { instance . registerHelper ( 'log' , function ( ) /* message, options */ { var args = [ undefined ] , options = arguments [ arguments . length - 1 ] ; for ( var i = 0 ; i < arguments . length - 1 ; i ++ ) { args . push ( arguments [ i ] ) ; } var level = 1 ; if ( options . hash . level != null ) { level = options . hash . level ; } else if ( options . data && options . data . level != null ) { level = options . data . level ; } args [ 0 ] = level ; instance . log . apply ( instance , args ) ; } ) ; } ; module . exports = exports [ 'default' ] ; /***/ }


Input: / * 13 [CODESPLIT] function ( module , exports ) { 'use strict' ; exports . __esModule = true ; exports [ 'default' ] = function ( instance ) { instance . registerHelper ( 'lookup' , function ( obj , field ) { return obj && obj [ field ] ; } ) ; } ; module . exports = exports [ 'default' ] ; /***/ }


Input: / * 14 [CODESPLIT] function ( module , exports , __webpack_require__ ) { 'use strict' ; exports . __esModule = true ; var _utils = __webpack_require__ ( 5 ) ; exports [ 'default' ] = function ( instance ) { instance . registerHelper ( 'with' , function ( context , options ) { if ( _utils . isFunction ( context ) ) { context = context . call ( this ) ; } var fn = options . fn ; if ( ! _utils . isEmpty ( context ) ) { var data = options . data ; if ( options . data && options . ids ) { data = _utils . createFrame ( options . data ) ; data . contextPath = _utils . appendContextPath ( options . data . contextPath , options . ids [ 0 ] ) ; } return fn ( context , { data : data , blockParams : _utils . blockParams ( [ context ] , [ data && data . contextPath ] ) } ) ; } else { return options . inverse ( this ) ; } } ) ; } ; module . exports = exports [ 'default' ] ; /***/ }


Input: / * 15 [CODESPLIT] function ( module , exports , __webpack_require__ ) { 'use strict' ; var _interopRequireDefault = __webpack_require__ ( 1 ) [ 'default' ] ; exports . __esModule = true ; exports . registerDefaultDecorators = registerDefaultDecorators ; var _decoratorsInline = __webpack_require__ ( 16 ) ; var _decoratorsInline2 = _interopRequireDefault ( _decoratorsInline ) ; function registerDefaultDecorators ( instance ) { _decoratorsInline2 [ 'default' ] ( instance ) ; } /***/ }


Input: / * 16 [CODESPLIT] function ( module , exports , __webpack_require__ ) { 'use strict' ; exports . __esModule = true ; var _utils = __webpack_require__ ( 5 ) ; exports [ 'default' ] = function ( instance ) { instance . registerDecorator ( 'inline' , function ( fn , props , container , options ) { var ret = fn ; if ( ! props . partials ) { props . partials = { } ; ret = function ( context , options ) { // Create a new partials stack frame prior to exec. var original = container . partials ; container . partials = _utils . extend ( { } , original , props . partials ) ; var ret = fn ( context , options ) ; container . partials = original ; return ret ; } ; } props . partials [ options . args [ 0 ] ] = options . fn ; return ret ; } ) ; } ; module . exports = exports [ 'default' ] ; /***/ }


Input: / * 17 [CODESPLIT] function ( module , exports , __webpack_require__ ) { 'use strict' ; exports . __esModule = true ; var _utils = __webpack_require__ ( 5 ) ; var logger = { methodMap : [ 'debug' , 'info' , 'warn' , 'error' ] , level : 'info' , // Maps a given level value to the `methodMap` indexes above. lookupLevel : function lookupLevel ( level ) { if ( typeof level === 'string' ) { var levelMap = _utils . indexOf ( logger . methodMap , level . toLowerCase ( ) ) ; if ( levelMap >= 0 ) { level = levelMap ; } else { level = parseInt ( level , 10 ) ; } } return level ; } , // Can be overridden in the host environment log : function log ( level ) { level = logger . lookupLevel ( level ) ; if ( typeof console !== 'undefined' && logger . lookupLevel ( logger . level ) <= level ) { var method = logger . methodMap [ level ] ; if ( ! console [ method ] ) { // eslint-disable-line no-console method = 'log' ; } for ( var _len = arguments . length , message = Array ( _len > 1 ? _len - 1 : 0 ) , _key = 1 ; _key < _len ; _key ++ ) { message [ _key - 1 ] = arguments [ _key ] ; } console [ method ] . apply ( console , message ) ; // eslint-disable-line no-console } } } ; exports [ 'default' ] = logger ; module . exports = exports [ 'default' ] ; /***/ }


Input: Maps a given level value to the methodMap indexes above . [CODESPLIT] function lookupLevel ( level ) { if ( typeof level === 'string' ) { var levelMap = _utils . indexOf ( logger . methodMap , level . toLowerCase ( ) ) ; if ( levelMap >= 0 ) { level = levelMap ; } else { level = parseInt ( level , 10 ) ; } } return level ; }


Input: Can be overridden in the host environment [CODESPLIT] function log ( level ) { level = logger . lookupLevel ( level ) ; if ( typeof console !== 'undefined' && logger . lookupLevel ( logger . level ) <= level ) { var method = logger . methodMap [ level ] ; if ( ! console [ method ] ) { // eslint-disable-line no-console method = 'log' ; } for ( var _len = arguments . length , message = Array ( _len > 1 ? _len - 1 : 0 ) , _key = 1 ; _key < _len ; _key ++ ) { message [ _key - 1 ] = arguments [ _key ] ; } console [ method ] . apply ( console , message ) ; // eslint-disable-line no-console } }


Input: / * 18 [CODESPLIT] function ( module , exports ) { // Build out our basic SafeString type 'use strict' ; exports . __esModule = true ; function SafeString ( string ) { this . string = string ; } SafeString . prototype . toString = SafeString . prototype . toHTML = function ( ) { return '' + this . string ; } ; exports [ 'default' ] = SafeString ; module . exports = exports [ 'default' ] ; /***/ }


Input: / * 19 [CODESPLIT] function ( module , exports , __webpack_require__ ) { 'use strict' ; var _interopRequireWildcard = __webpack_require__ ( 3 ) [ 'default' ] ; var _interopRequireDefault = __webpack_require__ ( 1 ) [ 'default' ] ; exports . __esModule = true ; exports . checkRevision = checkRevision ; exports . template = template ; exports . wrapProgram = wrapProgram ; exports . resolvePartial = resolvePartial ; exports . invokePartial = invokePartial ; exports . noop = noop ; var _utils = __webpack_require__ ( 5 ) ; var Utils = _interopRequireWildcard ( _utils ) ; var _exception = __webpack_require__ ( 6 ) ; var _exception2 = _interopRequireDefault ( _exception ) ; var _base = __webpack_require__ ( 4 ) ; function checkRevision ( compilerInfo ) { var compilerRevision = compilerInfo && compilerInfo [ 0 ] || 1 , currentRevision = _base . COMPILER_REVISION ; if ( compilerRevision !== currentRevision ) { if ( compilerRevision < currentRevision ) { var runtimeVersions = _base . REVISION_CHANGES [ currentRevision ] , compilerVersions = _base . REVISION_CHANGES [ compilerRevision ] ; throw new _exception2 [ 'default' ] ( 'Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').' ) ; } else { // Use the embedded version info since the runtime doesn't know about this revision yet throw new _exception2 [ 'default' ] ( 'Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo [ 1 ] + ').' ) ; } } } function template ( templateSpec , env ) { /* istanbul ignore next */ if ( ! env ) { throw new _exception2 [ 'default' ] ( 'No environment passed to template' ) ; } if ( ! templateSpec || ! templateSpec . main ) { throw new _exception2 [ 'default' ] ( 'Unknown template object: ' + typeof templateSpec ) ; } templateSpec . main . decorator = templateSpec . main_d ; // Note: Using env.VM references rather than local var references throughout this section to allow // for external users to override these as psuedo-supported APIs. env . VM . checkRevision ( templateSpec . compiler ) ; function invokePartialWrapper ( partial , context , options ) { if ( options . hash ) { context = Utils . extend ( { } , context , options . hash ) ; if ( options . ids ) { options . ids [ 0 ] = true ; } } partial = env . VM . resolvePartial . call ( this , partial , context , options ) ; var result = env . VM . invokePartial . call ( this , partial , context , options ) ; if ( result == null && env . compile ) { options . partials [ options . name ] = env . compile ( partial , templateSpec . compilerOptions , env ) ; result = options . partials [ options . name ] ( context , options ) ; } if ( result != null ) { if ( options . indent ) { var lines = result . split ( '\n' ) ; for ( var i = 0 , l = lines . length ; i < l ; i ++ ) { if ( ! lines [ i ] && i + 1 === l ) { break ; } lines [ i ] = options . indent + lines [ i ] ; } result = lines . join ( '\n' ) ; } return result ; } else { throw new _exception2 [ 'default' ] ( 'The partial ' + options . name + ' could not be compiled when running in runtime-only mode' ) ; } } // Just add water var container = { strict : function strict ( obj , name ) { if ( ! ( name in obj ) ) { throw new _exception2 [ 'default' ] ( '"' + name + '" not defined in ' + obj ) ; } return obj [ name ] ; } , lookup : function lookup ( depths , name ) { var len = depths . length ; for ( var i = 0 ; i < len ; i ++ ) { if ( depths [ i ] && depths [ i ] [ name ] != null ) { return depths [ i ] [ name ] ; } } } , lambda : function lambda ( current , context ) { return typeof current === 'function' ? current . call ( context ) : current ; } , escapeExpression : Utils . escapeExpression , invokePartial : invokePartialWrapper , fn : function fn ( i ) { var ret = templateSpec [ i ] ; ret . decorator = templateSpec [ i + '_d' ] ; return ret ; } , programs : [ ] , program : function program ( i , data , declaredBlockParams , blockParams , depths ) { var programWrapper = this . programs [ i ] , fn = this . fn ( i ) ; if ( data || depths || blockParams || declaredBlockParams ) { programWrapper = wrapProgram ( this , i , fn , data , declaredBlockParams , blockParams , depths ) ; } else if ( ! programWrapper ) { programWrapper = this . programs [ i ] = wrapProgram ( this , i , fn ) ; } return programWrapper ; } , data : function data ( value , depth ) { while ( value && depth -- ) { value = value . _parent ; } return value ; } , merge : function merge ( param , common ) { var obj = param || common ; if ( param && common && param !== common ) { obj = Utils . extend ( { } , common , param ) ; } return obj ; } , noop : env . VM . noop , compilerInfo : templateSpec . compiler } ; function ret ( context ) { var options = arguments . length <= 1 || arguments [ 1 ] === undefined ? { } : arguments [ 1 ] ; var data = options . data ; ret . _setup ( options ) ; if ( ! options . partial && templateSpec . useData ) { data = initData ( context , data ) ; } var depths = undefined , blockParams = templateSpec . useBlockParams ? [ ] : undefined ; if ( templateSpec . useDepths ) { if ( options . depths ) { depths = context !== options . depths [ 0 ] ? [ context ] . concat ( options . depths ) : options . depths ; } else { depths = [ context ] ; } } function main ( context /*, options*/ ) { return '' + templateSpec . main ( container , context , container . helpers , container . partials , data , blockParams , depths ) ; } main = executeDecorators ( templateSpec . main , main , container , options . depths || [ ] , data , blockParams ) ; return main ( context , options ) ; } ret . isTop = true ; ret . _setup = function ( options ) { if ( ! options . partial ) { container . helpers = container . merge ( options . helpers , env . helpers ) ; if ( templateSpec . usePartial ) { container . partials = container . merge ( options . partials , env . partials ) ; } if ( templateSpec . usePartial || templateSpec . useDecorators ) { container . decorators = container . merge ( options . decorators , env . decorators ) ; } } else { container . helpers = options . helpers ; container . partials = options . partials ; container . decorators = options . decorators ; } } ; ret . _child = function ( i , data , blockParams , depths ) { if ( templateSpec . useBlockParams && ! blockParams ) { throw new _exception2 [ 'default' ] ( 'must pass block params' ) ; } if ( templateSpec . useDepths && ! depths ) { throw new _exception2 [ 'default' ] ( 'must pass parent depths' ) ; } return wrapProgram ( container , i , templateSpec [ i ] , data , 0 , blockParams , depths ) ; } ; return ret ; } function wrapProgram ( container , i , fn , data , declaredBlockParams , blockParams , depths ) { function prog ( context ) { var options = arguments . length <= 1 || arguments [ 1 ] === undefined ? { } : arguments [ 1 ] ; var currentDepths = depths ; if ( depths && context !== depths [ 0 ] ) { currentDepths = [ context ] . concat ( depths ) ; } return fn ( container , context , container . helpers , container . partials , options . data || data , blockParams && [ options . blockParams ] . concat ( blockParams ) , currentDepths ) ; } prog = executeDecorators ( fn , prog , container , depths , data , blockParams ) ; prog . program = i ; prog . depth = depths ? depths . length : 0 ; prog . blockParams = declaredBlockParams || 0 ; return prog ; } function resolvePartial ( partial , context , options ) { if ( ! partial ) { if ( options . name === '@partial-block' ) { partial = options . data [ 'partial-block' ] ; } else { partial = options . partials [ options . name ] ; } } else if ( ! partial . call && ! options . name ) { // This is a dynamic partial that returned a string options . name = partial ; partial = options . partials [ partial ] ; } return partial ; } function invokePartial ( partial , context , options ) { options . partial = true ; if ( options . ids ) { options . data . contextPath = options . ids [ 0 ] || options . data . contextPath ; } var partialBlock = undefined ; if ( options . fn && options . fn !== noop ) { options . data = _base . createFrame ( options . data ) ; partialBlock = options . data [ 'partial-block' ] = options . fn ; if ( partialBlock . partials ) { options . partials = Utils . extend ( { } , options . partials , partialBlock . partials ) ; } } if ( partial === undefined && partialBlock ) { partial = partialBlock ; } if ( partial === undefined ) { throw new _exception2 [ 'default' ] ( 'The partial ' + options . name + ' could not be found' ) ; } else if ( partial instanceof Function ) { return partial ( context , options ) ; } } function noop ( ) { return '' ; } function initData ( context , data ) { if ( ! data || ! ( 'root' in data ) ) { data = data ? _base . createFrame ( data ) : { } ; data . root = context ; } return data ; } function executeDecorators ( fn , prog , container , depths , data , blockParams ) { if ( fn . decorator ) { var props = { } ; prog = fn . decorator ( prog , props , container , depths && depths [ 0 ] , data , blockParams , depths ) ; Utils . extend ( prog , props ) ; } return prog ; } /***/ }


Input: / * 20 [CODESPLIT] function ( module , exports ) { /* WEBPACK VAR INJECTION */ ( function ( global ) { /* global window */ 'use strict' ; exports . __esModule = true ; exports [ 'default' ] = function ( Handlebars ) { /* istanbul ignore next */ var root = typeof global !== 'undefined' ? global : window , $Handlebars = root . Handlebars ; /* istanbul ignore next */ Handlebars . noConflict = function ( ) { if ( root . Handlebars === Handlebars ) { root . Handlebars = $Handlebars ; } return Handlebars ; } ; } ; module . exports = exports [ 'default' ] ; /* WEBPACK VAR INJECTION */ } . call ( exports , ( function ( ) { return this ; } ( ) ) ) ) /***/ }


Input: / * 21 [CODESPLIT] function ( module , exports ) { 'use strict' ; exports . __esModule = true ; var AST = { // Public API used to evaluate derived attributes regarding AST nodes helpers : { // a mustache is definitely a helper if: // * it is an eligible helper, and // * it has at least one parameter or hash segment helperExpression : function helperExpression ( node ) { return node . type === 'SubExpression' || ( node . type === 'MustacheStatement' || node . type === 'BlockStatement' ) && ! ! ( node . params && node . params . length || node . hash ) ; } , scopedId : function scopedId ( path ) { return ( / ^\.|this\b / . test ( path . original ) ) ; } , // an ID is simple if it only has one part, and that part is not // `..` or `this`. simpleId : function simpleId ( path ) { return path . parts . length === 1 && ! AST . helpers . scopedId ( path ) && ! path . depth ; } } } ; // Must be exported as an object rather than the root of the module as the jison lexer // must modify the object to operate properly. exports [ 'default' ] = AST ; module . exports = exports [ 'default' ] ; /***/ }


Input: a mustache is definitely a helper if : * it is an eligible helper and * it has at least one parameter or hash segment [CODESPLIT] function helperExpression ( node ) { return node . type === 'SubExpression' || ( node . type === 'MustacheStatement' || node . type === 'BlockStatement' ) && ! ! ( node . params && node . params . length || node . hash ) ; }


Input: an ID is simple if it only has one part and that part is not .. or this . [CODESPLIT] function simpleId ( path ) { return path . parts . length === 1 && ! AST . helpers . scopedId ( path ) && ! path . depth ; }


Input: / * 22 [CODESPLIT] function ( module , exports , __webpack_require__ ) { 'use strict' ; var _interopRequireDefault = __webpack_require__ ( 1 ) [ 'default' ] ; var _interopRequireWildcard = __webpack_require__ ( 3 ) [ 'default' ] ; exports . __esModule = true ; exports . parse = parse ; var _parser = __webpack_require__ ( 23 ) ; var _parser2 = _interopRequireDefault ( _parser ) ; var _whitespaceControl = __webpack_require__ ( 24 ) ; var _whitespaceControl2 = _interopRequireDefault ( _whitespaceControl ) ; var _helpers = __webpack_require__ ( 26 ) ; var Helpers = _interopRequireWildcard ( _helpers ) ; var _utils = __webpack_require__ ( 5 ) ; exports . parser = _parser2 [ 'default' ] ; var yy = { } ; _utils . extend ( yy , Helpers ) ; function parse ( input , options ) { // Just return if an already-compiled AST was passed in. if ( input . type === 'Program' ) { return input ; } _parser2 [ 'default' ] . yy = yy ; // Altering the shared object here, but this is ok as parser is a sync operation yy . locInfo = function ( locInfo ) { return new yy . SourceLocation ( options && options . srcName , locInfo ) ; } ; var strip = new _whitespaceControl2 [ 'default' ] ( options ) ; return strip . accept ( _parser2 [ 'default' ] . parse ( input ) ) ; } /***/ }


Input: / * 24 [CODESPLIT] function ( module , exports , __webpack_require__ ) { 'use strict' ; var _interopRequireDefault = __webpack_require__ ( 1 ) [ 'default' ] ; exports . __esModule = true ; var _visitor = __webpack_require__ ( 25 ) ; var _visitor2 = _interopRequireDefault ( _visitor ) ; function WhitespaceControl ( ) { var options = arguments . length <= 0 || arguments [ 0 ] === undefined ? { } : arguments [ 0 ] ; this . options = options ; } WhitespaceControl . prototype = new _visitor2 [ 'default' ] ( ) ; WhitespaceControl . prototype . Program = function ( program ) { var doStandalone = ! this . options . ignoreStandalone ; var isRoot = ! this . isRootSeen ; this . isRootSeen = true ; var body = program . body ; for ( var i = 0 , l = body . length ; i < l ; i ++ ) { var current = body [ i ] , strip = this . accept ( current ) ; if ( ! strip ) { continue ; } var _isPrevWhitespace = isPrevWhitespace ( body , i , isRoot ) , _isNextWhitespace = isNextWhitespace ( body , i , isRoot ) , openStandalone = strip . openStandalone && _isPrevWhitespace , closeStandalone = strip . closeStandalone && _isNextWhitespace , inlineStandalone = strip . inlineStandalone && _isPrevWhitespace && _isNextWhitespace ; if ( strip . close ) { omitRight ( body , i , true ) ; } if ( strip . open ) { omitLeft ( body , i , true ) ; } if ( doStandalone && inlineStandalone ) { omitRight ( body , i ) ; if ( omitLeft ( body , i ) ) { // If we are on a standalone node, save the indent info for partials if ( current . type === 'PartialStatement' ) { // Pull out the whitespace from the final line current . indent = / ([ \t]+$) / . exec ( body [ i - 1 ] . original ) [ 1 ] ; } } } if ( doStandalone && openStandalone ) { omitRight ( ( current . program || current . inverse ) . body ) ; // Strip out the previous content node if it's whitespace only omitLeft ( body , i ) ; } if ( doStandalone && closeStandalone ) { // Always strip the next node omitRight ( body , i ) ; omitLeft ( ( current . inverse || current . program ) . body ) ; } } return program ; } ; WhitespaceControl . prototype . BlockStatement = WhitespaceControl . prototype . DecoratorBlock = WhitespaceControl . prototype . PartialBlockStatement = function ( block ) { this . accept ( block . program ) ; this . accept ( block . inverse ) ; // Find the inverse program that is involed with whitespace stripping. var program = block . program || block . inverse , inverse = block . program && block . inverse , firstInverse = inverse , lastInverse = inverse ; if ( inverse && inverse . chained ) { firstInverse = inverse . body [ 0 ] . program ; // Walk the inverse chain to find the last inverse that is actually in the chain. while ( lastInverse . chained ) { lastInverse = lastInverse . body [ lastInverse . body . length - 1 ] . program ; } } var strip = { open : block . openStrip . open , close : block . closeStrip . close , // Determine the standalone candiacy. Basically flag our content as being possibly standalone // so our parent can determine if we actually are standalone openStandalone : isNextWhitespace ( program . body ) , closeStandalone : isPrevWhitespace ( ( firstInverse || program ) . body ) } ; if ( block . openStrip . close ) { omitRight ( program . body , null , true ) ; } if ( inverse ) { var inverseStrip = block . inverseStrip ; if ( inverseStrip . open ) { omitLeft ( program . body , null , true ) ; } if ( inverseStrip . close ) { omitRight ( firstInverse . body , null , true ) ; } if ( block . closeStrip . open ) { omitLeft ( lastInverse . body , null , true ) ; } // Find standalone else statments if ( ! this . options . ignoreStandalone && isPrevWhitespace ( program . body ) && isNextWhitespace ( firstInverse . body ) ) { omitLeft ( program . body ) ; omitRight ( firstInverse . body ) ; } } else if ( block . closeStrip . open ) { omitLeft ( program . body , null , true ) ; } return strip ; } ; WhitespaceControl . prototype . Decorator = WhitespaceControl . prototype . MustacheStatement = function ( mustache ) { return mustache . strip ; } ; WhitespaceControl . prototype . PartialStatement = WhitespaceControl . prototype . CommentStatement = function ( node ) { /* istanbul ignore next */ var strip = node . strip || { } ; return { inlineStandalone : true , open : strip . open , close : strip . close } ; } ; function isPrevWhitespace ( body , i , isRoot ) { if ( i === undefined ) { i = body . length ; } // Nodes that end with newlines are considered whitespace (but are special // cased for strip operations) var prev = body [ i - 1 ] , sibling = body [ i - 2 ] ; if ( ! prev ) { return isRoot ; } if ( prev . type === 'ContentStatement' ) { return ( sibling || ! isRoot ? / \r?\n\s*?$ / : / (^|\r?\n)\s*?$ / ) . test ( prev . original ) ; } } function isNextWhitespace ( body , i , isRoot ) { if ( i === undefined ) { i = - 1 ; } var next = body [ i + 1 ] , sibling = body [ i + 2 ] ; if ( ! next ) { return isRoot ; } if ( next . type === 'ContentStatement' ) { return ( sibling || ! isRoot ? / ^\s*?\r?\n / : / ^\s*?(\r?\n|$) / ) . test ( next . original ) ; } } // Marks the node to the right of the position as omitted. // I.e. {{foo}}' ' will mark the ' ' node as omitted. // // If i is undefined, then the first child will be marked as such. // // If mulitple is truthy then all whitespace will be stripped out until non-whitespace // content is met. function omitRight ( body , i , multiple ) { var current = body [ i == null ? 0 : i + 1 ] ; if ( ! current || current . type !== 'ContentStatement' || ! multiple && current . rightStripped ) { return ; } var original = current . value ; current . value = current . value . replace ( multiple ? / ^\s+ / : / ^[ \t]*\r?\n? / , '' ) ; current . rightStripped = current . value !== original ; } // Marks the node to the left of the position as omitted. // I.e. ' '{{foo}} will mark the ' ' node as omitted. // // If i is undefined then the last child will be marked as such. // // If mulitple is truthy then all whitespace will be stripped out until non-whitespace // content is met. function omitLeft ( body , i , multiple ) { var current = body [ i == null ? body . length - 1 : i - 1 ] ; if ( ! current || current . type !== 'ContentStatement' || ! multiple && current . leftStripped ) { return ; } // We omit the last node if it's whitespace only and not preceeded by a non-content node. var original = current . value ; current . value = current . value . replace ( multiple ? / \s+$ / : / [ \t]+$ / , '' ) ; current . leftStripped = current . value !== original ; return current . leftStripped ; } exports [ 'default' ] = WhitespaceControl ; module . exports = exports [ 'default' ] ; /***/ }


Input: / * 25 [CODESPLIT] function ( module , exports , __webpack_require__ ) { 'use strict' ; var _interopRequireDefault = __webpack_require__ ( 1 ) [ 'default' ] ; exports . __esModule = true ; var _exception = __webpack_require__ ( 6 ) ; var _exception2 = _interopRequireDefault ( _exception ) ; function Visitor ( ) { this . parents = [ ] ; } Visitor . prototype = { constructor : Visitor , mutating : false , // Visits a given value. If mutating, will replace the value if necessary. acceptKey : function acceptKey ( node , name ) { var value = this . accept ( node [ name ] ) ; if ( this . mutating ) { // Hacky sanity check: This may have a few false positives for type for the helper // methods but will generally do the right thing without a lot of overhead. if ( value && ! Visitor . prototype [ value . type ] ) { throw new _exception2 [ 'default' ] ( 'Unexpected node type "' + value . type + '" found when accepting ' + name + ' on ' + node . type ) ; } node [ name ] = value ; } } , // Performs an accept operation with added sanity check to ensure // required keys are not removed. acceptRequired : function acceptRequired ( node , name ) { this . acceptKey ( node , name ) ; if ( ! node [ name ] ) { throw new _exception2 [ 'default' ] ( node . type + ' requires ' + name ) ; } } , // Traverses a given array. If mutating, empty respnses will be removed // for child elements. acceptArray : function acceptArray ( array ) { for ( var i = 0 , l = array . length ; i < l ; i ++ ) { this . acceptKey ( array , i ) ; if ( ! array [ i ] ) { array . splice ( i , 1 ) ; i -- ; l -- ; } } } , accept : function accept ( object ) { if ( ! object ) { return ; } /* istanbul ignore next: Sanity code */ if ( ! this [ object . type ] ) { throw new _exception2 [ 'default' ] ( 'Unknown type: ' + object . type , object ) ; } if ( this . current ) { this . parents . unshift ( this . current ) ; } this . current = object ; var ret = this [ object . type ] ( object ) ; this . current = this . parents . shift ( ) ; if ( ! this . mutating || ret ) { return ret ; } else if ( ret !== false ) { return object ; } } , Program : function Program ( program ) { this . acceptArray ( program . body ) ; } , MustacheStatement : visitSubExpression , Decorator : visitSubExpression , BlockStatement : visitBlock , DecoratorBlock : visitBlock , PartialStatement : visitPartial , PartialBlockStatement : function PartialBlockStatement ( partial ) { visitPartial . call ( this , partial ) ; this . acceptKey ( partial , 'program' ) ; } , ContentStatement : function ContentStatement ( ) /* content */ { } , CommentStatement : function CommentStatement ( ) /* comment */ { } , SubExpression : visitSubExpression , PathExpression : function PathExpression ( ) /* path */ { } , StringLiteral : function StringLiteral ( ) /* string */ { } , NumberLiteral : function NumberLiteral ( ) /* number */ { } , BooleanLiteral : function BooleanLiteral ( ) /* bool */ { } , UndefinedLiteral : function UndefinedLiteral ( ) /* literal */ { } , NullLiteral : function NullLiteral ( ) /* literal */ { } , Hash : function Hash ( hash ) { this . acceptArray ( hash . pairs ) ; } , HashPair : function HashPair ( pair ) { this . acceptRequired ( pair , 'value' ) ; } } ; function visitSubExpression ( mustache ) { this . acceptRequired ( mustache , 'path' ) ; this . acceptArray ( mustache . params ) ; this . acceptKey ( mustache , 'hash' ) ; } function visitBlock ( block ) { visitSubExpression . call ( this , block ) ; this . acceptKey ( block , 'program' ) ; this . acceptKey ( block , 'inverse' ) ; } function visitPartial ( partial ) { this . acceptRequired ( partial , 'name' ) ; this . acceptArray ( partial . params ) ; this . acceptKey ( partial , 'hash' ) ; } exports [ 'default' ] = Visitor ; module . exports = exports [ 'default' ] ; /***/ }


Input: Visits a given value . If mutating will replace the value if necessary . [CODESPLIT] function acceptKey ( node , name ) { var value = this . accept ( node [ name ] ) ; if ( this . mutating ) { // Hacky sanity check: This may have a few false positives for type for the helper // methods but will generally do the right thing without a lot of overhead. if ( value && ! Visitor . prototype [ value . type ] ) { throw new _exception2 [ 'default' ] ( 'Unexpected node type "' + value . type + '" found when accepting ' + name + ' on ' + node . type ) ; } node [ name ] = value ; } }


Input: Performs an accept operation with added sanity check to ensure required keys are not removed . [CODESPLIT] function acceptRequired ( node , name ) { this . acceptKey ( node , name ) ; if ( ! node [ name ] ) { throw new _exception2 [ 'default' ] ( node . type + ' requires ' + name ) ; } }


Input: Traverses a given array . If mutating empty respnses will be removed for child elements . [CODESPLIT] function acceptArray ( array ) { for ( var i = 0 , l = array . length ; i < l ; i ++ ) { this . acceptKey ( array , i ) ; if ( ! array [ i ] ) { array . splice ( i , 1 ) ; i -- ; l -- ; } } }


Input: / * 26 [CODESPLIT] function ( module , exports , __webpack_require__ ) { 'use strict' ; var _interopRequireDefault = __webpack_require__ ( 1 ) [ 'default' ] ; exports . __esModule = true ; exports . SourceLocation = SourceLocation ; exports . id = id ; exports . stripFlags = stripFlags ; exports . stripComment = stripComment ; exports . preparePath = preparePath ; exports . prepareMustache = prepareMustache ; exports . prepareRawBlock = prepareRawBlock ; exports . prepareBlock = prepareBlock ; exports . prepareProgram = prepareProgram ; exports . preparePartialBlock = preparePartialBlock ; var _exception = __webpack_require__ ( 6 ) ; var _exception2 = _interopRequireDefault ( _exception ) ; function validateClose ( open , close ) { close = close . path ? close . path . original : close ; if ( open . path . original !== close ) { var errorNode = { loc : open . path . loc } ; throw new _exception2 [ 'default' ] ( open . path . original + " doesn't match " + close , errorNode ) ; } } function SourceLocation ( source , locInfo ) { this . source = source ; this . start = { line : locInfo . first_line , column : locInfo . first_column } ; this . end = { line : locInfo . last_line , column : locInfo . last_column } ; } function id ( token ) { if ( / ^\[.*\]$ / . test ( token ) ) { return token . substr ( 1 , token . length - 2 ) ; } else { return token ; } } function stripFlags ( open , close ) { return { open : open . charAt ( 2 ) === '~' , close : close . charAt ( close . length - 3 ) === '~' } ; } function stripComment ( comment ) { return comment . replace ( / ^\{\{~?\!-?-? / , '' ) . replace ( / -?-?~?\}\}$ / , '' ) ; } function preparePath ( data , parts , loc ) { loc = this . locInfo ( loc ) ; var original = data ? '@' : '' , dig = [ ] , depth = 0 , depthString = '' ; for ( var i = 0 , l = parts . length ; i < l ; i ++ ) { var part = parts [ i ] . part , // If we have [] syntax then we do not treat path references as operators, // i.e. foo.[this] resolves to approximately context.foo['this'] isLiteral = parts [ i ] . original !== part ; original += ( parts [ i ] . separator || '' ) + part ; if ( ! isLiteral && ( part === '..' || part === '.' || part === 'this' ) ) { if ( dig . length > 0 ) { throw new _exception2 [ 'default' ] ( 'Invalid path: ' + original , { loc : loc } ) ; } else if ( part === '..' ) { depth ++ ; depthString += '../' ; } } else { dig . push ( part ) ; } } return { type : 'PathExpression' , data : data , depth : depth , parts : dig , original : original , loc : loc } ; } function prepareMustache ( path , params , hash , open , strip , locInfo ) { // Must use charAt to support IE pre-10 var escapeFlag = open . charAt ( 3 ) || open . charAt ( 2 ) , escaped = escapeFlag !== '{' && escapeFlag !== '&' ; var decorator = / \* / . test ( open ) ; return { type : decorator ? 'Decorator' : 'MustacheStatement' , path : path , params : params , hash : hash , escaped : escaped , strip : strip , loc : this . locInfo ( locInfo ) } ; } function prepareRawBlock ( openRawBlock , contents , close , locInfo ) { validateClose ( openRawBlock , close ) ; locInfo = this . locInfo ( locInfo ) ; var program = { type : 'Program' , body : contents , strip : { } , loc : locInfo } ; return { type : 'BlockStatement' , path : openRawBlock . path , params : openRawBlock . params , hash : openRawBlock . hash , program : program , openStrip : { } , inverseStrip : { } , closeStrip : { } , loc : locInfo } ; } function prepareBlock ( openBlock , program , inverseAndProgram , close , inverted , locInfo ) { if ( close && close . path ) { validateClose ( openBlock , close ) ; } var decorator = / \* / . test ( openBlock . open ) ; program . blockParams = openBlock . blockParams ; var inverse = undefined , inverseStrip = undefined ; if ( inverseAndProgram ) { if ( decorator ) { throw new _exception2 [ 'default' ] ( 'Unexpected inverse block on decorator' , inverseAndProgram ) ; } if ( inverseAndProgram . chain ) { inverseAndProgram . program . body [ 0 ] . closeStrip = close . strip ; } inverseStrip = inverseAndProgram . strip ; inverse = inverseAndProgram . program ; } if ( inverted ) { inverted = inverse ; inverse = program ; program = inverted ; } return { type : decorator ? 'DecoratorBlock' : 'BlockStatement' , path : openBlock . path , params : openBlock . params , hash : openBlock . hash , program : program , inverse : inverse , openStrip : openBlock . strip , inverseStrip : inverseStrip , closeStrip : close && close . strip , loc : this . locInfo ( locInfo ) } ; } function prepareProgram ( statements , loc ) { if ( ! loc && statements . length ) { var firstLoc = statements [ 0 ] . loc , lastLoc = statements [ statements . length - 1 ] . loc ; /* istanbul ignore else */ if ( firstLoc && lastLoc ) { loc = { source : firstLoc . source , start : { line : firstLoc . start . line , column : firstLoc . start . column } , end : { line : lastLoc . end . line , column : lastLoc . end . column } } ; } } return { type : 'Program' , body : statements , strip : { } , loc : loc } ; } function preparePartialBlock ( open , program , close , locInfo ) { validateClose ( open , close ) ; return { type : 'PartialBlockStatement' , name : open . path , params : open . params , hash : open . hash , program : program , openStrip : open . strip , closeStrip : close && close . strip , loc : this . locInfo ( locInfo ) } ; } /***/ }