work.suroh.tk/node_modules/nunjucks/browser/nunjucks.js.map

1 line
394 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"sources":["../webpack/universalModuleDefinition","../webpack/bootstrap 781a94d7d482b86b92ee","../nunjucks/src/lib.js","../nunjucks/src/object.js","../nunjucks/src/runtime.js","../nunjucks/src/nodes.js","../nunjucks/src/compiler.js","../nunjucks/src/loader.js","../nunjucks/src/environment.js","../nunjucks/src/parser.js","../nunjucks/src/lexer.js","../nunjucks/src/web-loaders.js","../nunjucks/index.js","../node_modules/asap/browser-asap.js","../node_modules/asap/browser-raw.js","../node_modules/webpack/buildin/global.js","../node_modules/a-sync-waterfall/index.js","../node_modules/webpack/node_modules/events/events.js","../nunjucks/src/transformer.js","../nunjucks/src/filters.js","../nunjucks/src/precompiled-loader.js","../nunjucks/src/tests.js","../nunjucks/src/globals.js","../nunjucks/src/express-app.js","../nunjucks/src/precompile.js","../nunjucks/src/precompile-global.js","../nunjucks/src/jinja-compat.js"],"names":["ArrayProto","Array","prototype","ObjProto","Object","escapeMap","escapeRegex","exports","module","hasOwnProp","obj","k","hasOwnProperty","call","lookupEscape","ch","_prettifyError","path","withInternals","err","Update","TemplateError","old","Error","message","name","lineno","colno","cause","setPrototypeOf","defineProperty","enumerable","writable","value","captureStackTrace","constructor","getStack","stackDescriptor","getOwnPropertyDescriptor","get","stack","firstUpdate","msg","create","escape","val","replace","isFunction","toString","isArray","isString","isObject","groupBy","result","iterator","o","i","length","key","push","toArray","slice","without","array","contains","arguments","index","indexOf","repeat","char_","n","str","each","func","context","forEach","l","map","results","asyncIter","arr","iter","cb","next","asyncFor","keys","keys_","len","searchElement","fromIndex","_entries","_values","extend","obj1","obj2","_assign","inOperator","EventEmitter","require","lib","parentWrap","parent","prop","wrap","tmp","res","apply","extendClass","cls","props","subclass","Obj","init","EmitterObj","arrayFrom","from","supportsIterators","Symbol","Frame","isolateWrites","variables","topLevel","set","resolveUp","parts","split","frame","resolve","id","undefined","lookup","p","forWrite","pop","makeMacro","argNames","kwargNames","macroArgs","argCount","numArgs","args","kwargs","getKeywordArgs","arg","makeKeywordArgs","__keywords","isKeywordArgs","lastArg","SafeString","String","configurable","valueOf","copySafeness","dest","target","markSafe","type","wrapSafe","ret","suppressValue","autoescape","ensureDefined","memberLookup","callWrap","contextOrFrameLookup","handleError","error","asyncEach","dimen","iterCallback","item","asyncAll","finished","outputArr","done","output","join","fromIterator","traverseAndCheck","Node","findAll","fields","field","NodeList","children","child","iterFields","Value","nodes","addChild","node","Root","Literal","Group","ArrayNode","Pair","Dict","LookupVal","If","IfAsync","InlineIf","For","AsyncEach","AsyncAll","Macro","Caller","Import","FromImport","template","names","withContext","FunCall","Filter","FilterAsync","KeywordArgs","Block","Super","TemplateRef","Extends","Include","Set","Switch","Case","Output","Capture","TemplateData","UnaryOp","BinOp","In","Is","Or","And","Not","Add","Concat","Sub","Mul","Div","FloorDiv","Mod","Pow","Neg","Pos","Compare","CompareOperand","CallExtension","ext","contentArgs","extName","__name","CallExtensionAsync","print","indent","inline","lines","line","process","stdout","write","nl","printNodes","typename","fieldName","JSON","stringify","parser","transformer","compareOps","Compiler","templateName","throwOnUndefined","codebuf","lastId","buffer","bufferStack","_scopeClosers","inBlock","fail","_pushBuffer","_tmpid","_emit","_popBuffer","code","_emitLine","_emitLines","_emitFuncBegin","_emitFuncEnd","noReturn","_closeScopeLevels","_addScopeLevel","_withScopedSyntax","_makeCallback","_templateName","_compileChildren","compile","_compileAggregate","startChar","endChar","_compileExpression","assertType","types","some","t","compileCallExtension","async","compileCallExtensionAsync","compileNodeList","compileLiteral","compileSymbol","v","compileGroup","compileArray","compileDict","compilePair","compileInlineIf","cond","body","else_","compileIn","left","right","compileIs","_binOpEmitter","compileOr","compileAnd","compileAdd","compileConcat","compileSub","compileMul","compileDiv","compileMod","compileNot","compileFloorDiv","compilePow","compileNeg","compilePos","compileCompare","expr","ops","op","compileLookupVal","_getNodeName","compileFunCall","compileFilter","compileFilterAsync","symbol","compileKeywordArgs","compileSet","ids","targets","charAt","compileSwitch","cases","c","default","compileIf","compileIfAsync","_emitLoopBindings","bindings","b","compileFor","u","tid","_compileAsyncLoop","parallel","asyncMethod","arrayLen","buf","compileAsyncEach","compileAsyncAll","_compileMacro","funcId","keepFrame","realNames","currFrame","pair","bufferId","compileMacro","compileCaller","_compileGetTemplate","eagerCompile","ignoreMissing","parentTemplateId","parentName","eagerCompileArg","ignoreMissingArg","compileImport","compileFromImport","importedId","nameNode","alias","compileBlock","compileSuper","blockName","compileExtends","compileInclude","id2","compileTemplateData","compileCapture","compileOutput","compileRoot","blockNames","blocks","block","tmpFrame","_compile","getCode","src","asyncFilters","extensions","opts","preprocessors","preprocess","filter","f","processedSrc","reduce","s","processor","transform","parse","to","dirname","isRelative","filename","asap","waterfall","compiler","filters","FileSystemLoader","WebLoader","PrecompiledLoader","tests","globals","globalRuntime","expressApp","callbackAsap","noopTmplSrc","root","env","runtime","e","Environment","loaders","dev","trimBlocks","lstripBlocks","window","nunjucksPrecompiled","unshift","_initLoaders","extensionsList","addFilter","test","addTest","loader","cache","on","fullname","emit","source","invalidateCache","addExtension","extension","removeExtension","getExtension","hasExtension","addGlobal","getGlobal","wrapped","getFilter","getTest","resolveTemplate","getTemplate","that","tmpl","raw","Template","syncResult","createTemplate","info","newTmpl","noCache","handle","getSource","express","app","render","ctx","renderString","tasks","callback","forceAsync","Context","exported","addBlock","setVariable","getVariables","getBlock","getSuper","idx","blk","addExport","getExported","tmplProps","tmplStr","compiled","parentFrame","didError","rootRenderFunc","Function","_getBlocks","lexer","Parser","tokens","peeked","breakOnBlocks","dropLeadingWhitespace","nextToken","withWhitespace","tok","TOKEN_WHITESPACE","peekToken","pushToken","skip","expect","skipValue","skipSymbol","TOKEN_SYMBOL","advanceAfterBlockEnd","TOKEN_BLOCK_END","advanceAfterVariableEnd","TOKEN_VARIABLE_END","tags","VARIABLE_END","parseFor","forTok","endBlock","parsePrimary","TOKEN_COMMA","prim","parseExpression","parseUntilBlocks","parseMacro","macroTok","parseSignature","parseCall","callTok","callerArgs","macroCall","callerName","callerNode","parseWithContext","parseImport","importTok","parseFrom","fromTok","nextTok","parseBlock","tag","parseExtends","tagName","parseInclude","parseIf","parseSet","TOKEN_OPERATOR","parseSwitch","switchStart","switchEnd","caseStart","caseDefault","defaultCase","col","parseStatement","parseRaw","parseFilterStatement","endTagName","rawBlockRegex","RegExp","rawLevel","matches","begun","_extractRegex","all","pre","backN","parsePostfix","TOKEN_LEFT_PAREN","TOKEN_LEFT_BRACKET","parseAggregate","parseInlineIf","parseOr","condNode","bodyNode","parseAnd","node2","parseNot","parseIn","parseIs","invert","parseCompare","not","parseConcat","parseAdd","TOKEN_TILDE","parseSub","parseMul","parseDiv","parseFloorDiv","parseMod","parsePow","parseUnary","noFilters","parseFilter","noPostfix","TOKEN_STRING","TOKEN_INT","parseInt","TOKEN_FLOAT","parseFloat","TOKEN_BOOLEAN","TOKEN_NONE","TOKEN_REGEX","flags","parseFilterName","parseFilterArgs","TOKEN_PIPE","concat","filterTok","TOKEN_LEFT_CURLY","TOKEN_RIGHT_PAREN","TOKEN_RIGHT_BRACKET","TOKEN_RIGHT_CURLY","TOKEN_COLON","tolerant","noParens","checkComma","prev","parseNodes","TOKEN_DATA","data","nextVal","TOKEN_BLOCK_START","TOKEN_VARIABLE_START","VARIABLE_START","TOKEN_COMMENT","COMMENT_START","COMMENT_END","parseAsRoot","lex","whitespaceChars","delimChars","intChars","BLOCK_START","BLOCK_END","TOKEN_SPECIAL","token","Tokenizer","in_code","blockStart","blockEnd","variableStart","variableEnd","commentStart","commentEnd","cur","current","isFinished","_parseString","_extract","_extractString","forward","back","forwardN","regexBody","previous","POSSIBLE_FLAGS","regexFlags","isCurrentAFlag","complexOps","curComplex","_extractUntil","match","dec","beginChars","inComment","_matches","lastLine","delimiter","m","charString","_extractMatching","breakOnMatch","first","regex","currentStr","lastIndexOf","substr","Loader","baseURL","useCache","fetch","content","status","url","ajax","XMLHttpRequest","loading","onreadystatechange","readyState","responseText","Date","getTime","open","send","precompile","installJinjaCompat","configure","templatesPath","TemplateLoader","watch","web","NodeResolveLoader","reset","precompileString","sym","gensym","mapCOW","walk","ast","depthFirst","astT","propsT","depthWalk","_liftFilters","walked","descNode","liftFilters","liftSuper","blockNode","hasSuper","convertStatements","cps","r","normalize","defaultValue","abs","Math","isNaN","num","batch","linecount","fillWith","capitalize","toLowerCase","toUpperCase","center","width","spaces","post","default_","def","bool","dictsort","caseSensitive","by","si","sort","t1","t2","a","dump","safe","forceescape","groupby","attr","indentfirst","sp","del","last","lengthFilter","Map","size","list","lower","nl2br","random","floor","rejectattr","selectattr","new_","maxCount","originalStr","nextIndex","pos","count","substring","reverse","round","precision","method","factor","pow","rounder","ceil","slices","sliceLength","extra","offset","start","end","currSlice","sum","reversed","caseSens","x","y","string","striptags","input","preserveLinebreaks","trimmedInput","trim","title","words","word","truncate","killwords","orig","upper","urlencode","enc","encodeURIComponent","keyvals","puncRe","emailRe","httpHttpsRe","wwwRe","tldRe","urlize","nofollow","Infinity","noFollowAttr","possibleUrl","shortUrl","wordcount","float","int","d","compiledTemplates","precompiled","callable","defined","divisibleby","one","two","escaped","equalto","eq","sameas","even","falsy","ge","greaterthan","gt","le","lessthan","lt","ne","nullTest","null","number","odd","truthy","undefinedTest","iterable","mapping","cycler","items","joiner","sep","range","stop","step","NunjucksView","defaultEngine","extname","fs","precompileGlobal","patterns","pattern","wrapper","_precompile","pathStats","existsSync","statSync","templates","addTemplates","dir","readdirSync","file","filepath","subpath","stat","isDirectory","exclude","include","isFile","readFileSync","force","console","out","asFunction","installCompat","orig_contextOrFrameLookup","orig_memberLookup","orig_Compiler_assertType","orig_Parser_parseAggregate","uninstall","getTokensState","Slice","compileSlice","origState","errState","rethrow","isSlice","sliceLookup","ARRAY_MEMBERS","splice","append","element","remove","find","insert","elem","OBJECT_MEMBERS","values","has_key","popitem","setdefault","update","iteritems","itervalues","iterkeys","bind"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;AC7Da;;AAEb,IAAIA,UAAU,GAAGC,KAAK,CAACC,SAAvB;AACA,IAAIC,QAAQ,GAAGC,MAAM,CAACF,SAAtB;AAEA,IAAIG,SAAS,GAAG;AACd,OAAK,OADS;AAEd,OAAK,QAFS;AAGd,QAAM,OAHQ;AAId,OAAK,MAJS;AAKd,OAAK;AALS,CAAhB;AAQA,IAAIC,WAAW,GAAG,UAAlB;AAEA,IAAIC,OAAO,GAAGC,MAAM,CAACD,OAAP,GAAiB,EAA/B;;AAEA,SAASE,UAAT,CAAoBC,GAApB,EAAyBC,CAAzB,EAA4B;AAC1B,SAAOR,QAAQ,CAACS,cAAT,CAAwBC,IAAxB,CAA6BH,GAA7B,EAAkCC,CAAlC,CAAP;AACD;;AAEDJ,OAAO,CAACE,UAAR,GAAqBA,UAArB;;AAEA,SAASK,YAAT,CAAsBC,EAAtB,EAA0B;AACxB,SAAOV,SAAS,CAACU,EAAD,CAAhB;AACD;;AAED,SAASC,cAAT,CAAwBC,IAAxB,EAA8BC,aAA9B,EAA6CC,GAA7C,EAAkD;AAChD,MAAI,CAACA,GAAG,CAACC,MAAT,EAAiB;AACf;AACAD,OAAG,GAAG,IAAIZ,OAAO,CAACc,aAAZ,CAA0BF,GAA1B,CAAN;AACD;;AACDA,KAAG,C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;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;ACjEA,8CAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,kBAAkB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9NA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;ACpBA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA,MAAM,IAA2C;AACjD,IAAI,iCAAO,EAAE,mCAAE;AACf;AACA,KAAK;AAAA,oGAAC,CAAC;AACP,GAAG;AACH,+BAA+B;AAC/B,GAAG;AACH,kCAAkC;AAClC;AACA,CAAC;;;;;;;;AClFD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,sBAAsB;AACvC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;A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ACO,UAAf,GAA4BP,cAAc,CAACC,MAA3C;AACAD,gBAAc,CAACQ,QAAf,GAA0BR,cAAc,CAACl1B,IAAzC;;AAEAmW,SAAO,CAACtR,YAAR,GAAuB,SAASA,YAAT,CAAsBxJ,GAAtB,EAA2BmC,GAA3B,EAAgCmH,UAAhC,EAA4C;AACjE,QAAI/F,SAAS,CAACR,MAAV,KAAqB,CAAzB,EAA4B;AAC1B,aAAOq2B,WAAW,CAACpzB,KAAZ,CAAkB,IAAlB,EAAwBzC,SAAxB,CAAP;AACD;;AACDvD,OAAG,GAAGA,GAAG,IAAI,EAAb,CAJiE,CAMjE;AACA;;AACA,QAAIyF,GAAG,CAAClD,OAAJ,CAAYvC,GAAZ,KAAoBD,UAAU,CAACs5B,aAAD,EAAgBl3B,GAAhB,CAAlC,EAAwD;AACtD,aAAOk3B,aAAa,CAACl3B,GAAD,CAAb,CAAmBm4B,IAAnB,CAAwBt6B,GAAxB,CAAP;AACD;;AACD,QAAIyF,GAAG,CAAChD,QAAJ,CAAazC,GAAb,KAAqBD,UAAU,CAAC85B,cAAD,EAAiB13B,GAAjB,CAAnC,EAA0D;AACxD,aAAO03B,cAAc,CAAC13B,GAAD,CAAd,CAAoBm4B,IAApB,CAAyBt6B,GAAzB,CAAP;AACD;;AAED,WAAOy4B,iBAAiB,CAACzyB,KAAlB,CAAwB,IAAxB,EAA8BzC,SAA9B,CAAP;AACD,GAhBD;;AAkBA,SAAOq1B,SAAP;AACD;;AAED94B,MAAM,CAACD,OAAP,GAAiB04B,aAAjB,C","file":"nunjucks.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"nunjucks\"] = factory();\n\telse\n\t\troot[\"nunjucks\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 11);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 781a94d7d482b86b92ee","'use strict';\n\nvar ArrayProto = Array.prototype;\nvar ObjProto = Object.prototype;\n\nvar escapeMap = {\n '&': '&amp;',\n '\"': '&quot;',\n '\\'': '&#39;',\n '<': '&lt;',\n '>': '&gt;'\n};\n\nvar escapeRegex = /[&\"'<>]/g;\n\nvar exports = module.exports = {};\n\nfunction hasOwnProp(obj, k) {\n return ObjProto.hasOwnProperty.call(obj, k);\n}\n\nexports.hasOwnProp = hasOwnProp;\n\nfunction lookupEscape(ch) {\n return escapeMap[ch];\n}\n\nfunction _prettifyError(path, withInternals, err) {\n if (!err.Update) {\n // not one of ours, cast it\n err = new exports.TemplateError(err);\n }\n err.Update(path);\n\n // Unless they marked the dev flag, show them a trace from here\n if (!withInternals) {\n const old = err;\n err = new Error(old.message);\n err.name = old.name;\n }\n\n return err;\n}\n\nexports._prettifyError = _prettifyError;\n\nfunction TemplateError(message, lineno, colno) {\n var err;\n var cause;\n\n if (message instanceof Error) {\n cause = message;\n message = `${cause.name}: ${cause.message}`;\n }\n\n if (Object.setPrototypeOf) {\n err = new Error(message);\n Object.setPrototypeOf(err, TemplateError.prototype);\n } else {\n err = this;\n Object.defineProperty(err, 'message', {\n enumerable: false,\n writable: true,\n value: message,\n });\n }\n\n Object.defineProperty(err, 'name', {\n value: 'Template render error',\n });\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(err, this.constructor);\n }\n\n let getStack;\n\n if (cause) {\n const stackDescriptor = Object.getOwnPropertyDescriptor(cause, 'stack');\n getStack = stackDescriptor && (stackDescriptor.get || (() => stackDescriptor.value));\n if (!getStack) {\n getStack = () => cause.stack;\n }\n } else {\n const stack = (new Error(message)).stack;\n getStack = (() => stack);\n }\n\n Object.defineProperty(err, 'stack', {\n get: () => getStack.call(err),\n });\n\n Object.defineProperty(err, 'cause', {\n value: cause\n });\n\n err.lineno = lineno;\n err.colno = colno;\n err.firstUpdate = true;\n\n err.Update = function Update(path) {\n let msg = '(' + (path || 'unknown path') + ')';\n\n // only show lineno + colno next to path of template\n // where error occurred\n if (this.firstUpdate) {\n if (this.lineno && this.colno) {\n msg += ` [Line ${this.lineno}, Column ${this.colno}]`;\n } else if (this.lineno) {\n msg += ` [Line ${this.lineno}]`;\n }\n }\n\n msg += '\\n ';\n if (this.firstUpdate) {\n msg += ' ';\n }\n\n this.message = msg + (this.message || '');\n this.firstUpdate = false;\n return this;\n };\n\n return err;\n}\n\n\nif (Object.setPrototypeOf) {\n Object.setPrototypeOf(TemplateError.prototype, Error.prototype);\n} else {\n TemplateError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: TemplateError,\n },\n });\n}\n\nexports.TemplateError = TemplateError;\n\nfunction escape(val) {\n return val.replace(escapeRegex, lookupEscape);\n}\n\nexports.escape = escape;\n\nfunction isFunction(obj) {\n return ObjProto.toString.call(obj) === '[object Function]';\n}\n\nexports.isFunction = isFunction;\n\nfunction isArray(obj) {\n return ObjProto.toString.call(obj) === '[object Array]';\n}\n\nexports.isArray = isArray;\n\nfunction isString(obj) {\n return ObjProto.toString.call(obj) === '[object String]';\n}\n\nexports.isString = isString;\n\nfunction isObject(obj) {\n return ObjProto.toString.call(obj) === '[object Object]';\n}\n\nexports.isObject = isObject;\n\nfunction groupBy(obj, val) {\n const result = {};\n const iterator = isFunction(val) ? val : (o) => o[val];\n for (let i = 0; i < obj.length; i++) {\n const value = obj[i];\n const key = iterator(value, i);\n (result[key] || (result[key] = [])).push(value);\n }\n return result;\n}\n\nexports.groupBy = groupBy;\n\nfunction toArray(obj) {\n return Array.prototype.slice.call(obj);\n}\n\nexports.toArray = toArray;\n\nfunction without(array) {\n const result = [];\n if (!array) {\n return result;\n }\n const length = array.length;\n const contains = toArray(arguments).slice(1);\n let index = -1;\n\n while (++index < length) {\n if (indexOf(contains, array[index]) === -1) {\n result.push(array[index]);\n }\n }\n return result;\n}\n\nexports.without = without;\n\nfunction repeat(char_, n) {\n var str = '';\n for (let i = 0; i < n; i++) {\n str += char_;\n }\n return str;\n}\n\nexports.repeat = repeat;\n\nfunction each(obj, func, context) {\n if (obj == null) {\n return;\n }\n\n if (ArrayProto.forEach && obj.forEach === ArrayProto.forEach) {\n obj.forEach(func, context);\n } else if (obj.length === +obj.length) {\n for (let i = 0, l = obj.length; i < l; i++) {\n func.call(context, obj[i], i, obj);\n }\n }\n}\n\nexports.each = each;\n\nfunction map(obj, func) {\n var results = [];\n if (obj == null) {\n return results;\n }\n\n if (ArrayProto.map && obj.map === ArrayProto.map) {\n return obj.map(func);\n }\n\n for (let i = 0; i < obj.length; i++) {\n results[results.length] = func(obj[i], i);\n }\n\n if (obj.length === +obj.length) {\n results.length = obj.length;\n }\n\n return results;\n}\n\nexports.map = map;\n\nfunction asyncIter(arr, iter, cb) {\n let i = -1;\n\n function next() {\n i++;\n\n if (i < arr.length) {\n iter(arr[i], i, next, cb);\n } else {\n cb();\n }\n }\n\n next();\n}\n\nexports.asyncIter = asyncIter;\n\nfunction asyncFor(obj, iter, cb) {\n const keys = keys_(obj || {});\n const len = keys.length;\n let i = -1;\n\n function next() {\n i++;\n const k = keys[i];\n\n if (i < len) {\n iter(k, obj[k], i, len, next);\n } else {\n cb();\n }\n }\n\n next();\n}\n\nexports.asyncFor = asyncFor;\n\nfunction indexOf(arr, searchElement, fromIndex) {\n return Array.prototype.indexOf.call(arr || [], searchElement, fromIndex);\n}\n\nexports.indexOf = indexOf;\n\nfunction keys_(obj) {\n /* eslint-disable no-restricted-syntax */\n const arr = [];\n for (let k in obj) {\n if (hasOwnProp(obj, k)) {\n arr.push(k);\n }\n }\n return arr;\n}\n\nexports.keys = keys_;\n\nfunction _entries(obj) {\n return keys_(obj).map((k) => [k, obj[k]]);\n}\n\nexports._entries = _entries;\n\nfunction _values(obj) {\n return keys_(obj).map((k) => obj[k]);\n}\n\nexports._values = _values;\n\nfunction extend(obj1, obj2) {\n obj1 = obj1 || {};\n keys_(obj2).forEach(k => {\n obj1[k] = obj2[k];\n });\n return obj1;\n}\n\nexports._assign = exports.extend = extend;\n\nfunction inOperator(key, val) {\n if (isArray(val) || isString(val)) {\n return val.indexOf(key) !== -1;\n } else if (isObject(val)) {\n return key in val;\n }\n throw new Error('Cannot use \"in\" operator to search for \"'\n + key + '\" in unexpected types.');\n}\n\nexports.inOperator = inOperator;\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/lib.js","'use strict';\n\n// A simple class system, more documentation to come\nconst EventEmitter = require('events');\nconst lib = require('./lib');\n\nfunction parentWrap(parent, prop) {\n if (typeof parent !== 'function' || typeof prop !== 'function') {\n return prop;\n }\n return function wrap() {\n // Save the current parent method\n const tmp = this.parent;\n\n // Set parent to the previous method, call, and restore\n this.parent = parent;\n const res = prop.apply(this, arguments);\n this.parent = tmp;\n\n return res;\n };\n}\n\nfunction extendClass(cls, name, props) {\n props = props || {};\n\n lib.keys(props).forEach(k => {\n props[k] = parentWrap(cls.prototype[k], props[k]);\n });\n\n class subclass extends cls {\n get typename() {\n return name;\n }\n }\n\n lib._assign(subclass.prototype, props);\n\n return subclass;\n}\n\nclass Obj {\n constructor(...args) {\n // Unfortunately necessary for backwards compatibility\n this.init(...args);\n }\n\n init() {}\n\n get typename() {\n return this.constructor.name;\n }\n\n static extend(name, props) {\n if (typeof name === 'object') {\n props = name;\n name = 'anonymous';\n }\n return extendClass(this, name, props);\n }\n}\n\nclass EmitterObj extends EventEmitter {\n constructor(...args) {\n super();\n // Unfortunately necessary for backwards compatibility\n this.init(...args);\n }\n\n init() {}\n\n get typename() {\n return this.constructor.name;\n }\n\n static extend(name, props) {\n if (typeof name === 'object') {\n props = name;\n name = 'anonymous';\n }\n return extendClass(this, name, props);\n }\n}\n\nmodule.exports = { Obj, EmitterObj };\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/object.js","'use strict';\n\nvar lib = require('./lib');\nvar arrayFrom = Array.from;\nvar supportsIterators = (\n typeof Symbol === 'function' && Symbol.iterator && typeof arrayFrom === 'function'\n);\n\n\n// Frames keep track of scoping both at compile-time and run-time so\n// we know how to access variables. Block tags can introduce special\n// variables, for example.\nclass Frame {\n constructor(parent, isolateWrites) {\n this.variables = {};\n this.parent = parent;\n this.topLevel = false;\n // if this is true, writes (set) should never propagate upwards past\n // this frame to its parent (though reads may).\n this.isolateWrites = isolateWrites;\n }\n\n set(name, val, resolveUp) {\n // Allow variables with dots by automatically creating the\n // nested structure\n var parts = name.split('.');\n var obj = this.variables;\n var frame = this;\n\n if (resolveUp) {\n if ((frame = this.resolve(parts[0], true))) {\n frame.set(name, val);\n return;\n }\n }\n\n for (let i = 0; i < parts.length - 1; i++) {\n const id = parts[i];\n\n if (!obj[id]) {\n obj[id] = {};\n }\n obj = obj[id];\n }\n\n obj[parts[parts.length - 1]] = val;\n }\n\n get(name) {\n var val = this.variables[name];\n if (val !== undefined) {\n return val;\n }\n return null;\n }\n\n lookup(name) {\n var p = this.parent;\n var val = this.variables[name];\n if (val !== undefined) {\n return val;\n }\n return p && p.lookup(name);\n }\n\n resolve(name, forWrite) {\n var p = (forWrite && this.isolateWrites) ? undefined : this.parent;\n var val = this.variables[name];\n if (val !== undefined) {\n return this;\n }\n return p && p.resolve(name);\n }\n\n push(isolateWrites) {\n return new Frame(this, isolateWrites);\n }\n\n pop() {\n return this.parent;\n }\n}\n\nfunction makeMacro(argNames, kwargNames, func) {\n return (...macroArgs) => {\n var argCount = numArgs(macroArgs);\n var args;\n var kwargs = getKeywordArgs(macroArgs);\n\n if (argCount > argNames.length) {\n args = macroArgs.slice(0, argNames.length);\n\n // Positional arguments that should be passed in as\n // keyword arguments (essentially default values)\n macroArgs.slice(args.length, argCount).forEach((val, i) => {\n if (i < kwargNames.length) {\n kwargs[kwargNames[i]] = val;\n }\n });\n args.push(kwargs);\n } else if (argCount < argNames.length) {\n args = macroArgs.slice(0, argCount);\n\n for (let i = argCount; i < argNames.length; i++) {\n const arg = argNames[i];\n\n // Keyword arguments that should be passed as\n // positional arguments, i.e. the caller explicitly\n // used the name of a positional arg\n args.push(kwargs[arg]);\n delete kwargs[arg];\n }\n args.push(kwargs);\n } else {\n args = macroArgs;\n }\n\n return func.apply(this, args);\n };\n}\n\nfunction makeKeywordArgs(obj) {\n obj.__keywords = true;\n return obj;\n}\n\nfunction isKeywordArgs(obj) {\n return obj && Object.prototype.hasOwnProperty.call(obj, '__keywords');\n}\n\nfunction getKeywordArgs(args) {\n var len = args.length;\n if (len) {\n const lastArg = args[len - 1];\n if (isKeywordArgs(lastArg)) {\n return lastArg;\n }\n }\n return {};\n}\n\nfunction numArgs(args) {\n var len = args.length;\n if (len === 0) {\n return 0;\n }\n\n const lastArg = args[len - 1];\n if (isKeywordArgs(lastArg)) {\n return len - 1;\n } else {\n return len;\n }\n}\n\n// A SafeString object indicates that the string should not be\n// autoescaped. This happens magically because autoescaping only\n// occurs on primitive string objects.\nfunction SafeString(val) {\n if (typeof val !== 'string') {\n return val;\n }\n\n this.val = val;\n this.length = val.length;\n}\n\nSafeString.prototype = Object.create(String.prototype, {\n length: {\n writable: true,\n configurable: true,\n value: 0\n }\n});\nSafeString.prototype.valueOf = function valueOf() {\n return this.val;\n};\nSafeString.prototype.toString = function toString() {\n return this.val;\n};\n\nfunction copySafeness(dest, target) {\n if (dest instanceof SafeString) {\n return new SafeString(target);\n }\n return target.toString();\n}\n\nfunction markSafe(val) {\n var type = typeof val;\n\n if (type === 'string') {\n return new SafeString(val);\n } else if (type !== 'function') {\n return val;\n } else {\n return function wrapSafe(args) {\n var ret = val.apply(this, arguments);\n\n if (typeof ret === 'string') {\n return new SafeString(ret);\n }\n\n return ret;\n };\n }\n}\n\nfunction suppressValue(val, autoescape) {\n val = (val !== undefined && val !== null) ? val : '';\n\n if (autoescape && !(val instanceof SafeString)) {\n val = lib.escape(val.toString());\n }\n\n return val;\n}\n\nfunction ensureDefined(val, lineno, colno) {\n if (val === null || val === undefined) {\n throw new lib.TemplateError(\n 'attempted to output null or undefined value',\n lineno + 1,\n colno + 1\n );\n }\n return val;\n}\n\nfunction memberLookup(obj, val) {\n if (obj === undefined || obj === null) {\n return undefined;\n }\n\n if (typeof obj[val] === 'function') {\n return (...args) => obj[val].apply(obj, args);\n }\n\n return obj[val];\n}\n\nfunction callWrap(obj, name, context, args) {\n if (!obj) {\n throw new Error('Unable to call `' + name + '`, which is undefined or falsey');\n } else if (typeof obj !== 'function') {\n throw new Error('Unable to call `' + name + '`, which is not a function');\n }\n\n return obj.apply(context, args);\n}\n\nfunction contextOrFrameLookup(context, frame, name) {\n var val = frame.lookup(name);\n return (val !== undefined) ?\n val :\n context.lookup(name);\n}\n\nfunction handleError(error, lineno, colno) {\n if (error.lineno) {\n return error;\n } else {\n return new lib.TemplateError(error, lineno, colno);\n }\n}\n\nfunction asyncEach(arr, dimen, iter, cb) {\n if (lib.isArray(arr)) {\n const len = arr.length;\n\n lib.asyncIter(arr, function iterCallback(item, i, next) {\n switch (dimen) {\n case 1:\n iter(item, i, len, next);\n break;\n case 2:\n iter(item[0], item[1], i, len, next);\n break;\n case 3:\n iter(item[0], item[1], item[2], i, len, next);\n break;\n default:\n item.push(i, len, next);\n iter.apply(this, item);\n }\n }, cb);\n } else {\n lib.asyncFor(arr, function iterCallback(key, val, i, len, next) {\n iter(key, val, i, len, next);\n }, cb);\n }\n}\n\nfunction asyncAll(arr, dimen, func, cb) {\n var finished = 0;\n var len;\n var outputArr;\n\n function done(i, output) {\n finished++;\n outputArr[i] = output;\n\n if (finished === len) {\n cb(null, outputArr.join(''));\n }\n }\n\n if (lib.isArray(arr)) {\n len = arr.length;\n outputArr = new Array(len);\n\n if (len === 0) {\n cb(null, '');\n } else {\n for (let i = 0; i < arr.length; i++) {\n const item = arr[i];\n\n switch (dimen) {\n case 1:\n func(item, i, len, done);\n break;\n case 2:\n func(item[0], item[1], i, len, done);\n break;\n case 3:\n func(item[0], item[1], item[2], i, len, done);\n break;\n default:\n item.push(i, len, done);\n func.apply(this, item);\n }\n }\n }\n } else {\n const keys = lib.keys(arr || {});\n len = keys.length;\n outputArr = new Array(len);\n\n if (len === 0) {\n cb(null, '');\n } else {\n for (let i = 0; i < keys.length; i++) {\n const k = keys[i];\n func(k, arr[k], i, len, done);\n }\n }\n }\n}\n\nfunction fromIterator(arr) {\n if (typeof arr !== 'object' || arr === null || lib.isArray(arr)) {\n return arr;\n } else if (supportsIterators && Symbol.iterator in arr) {\n return arrayFrom(arr);\n } else {\n return arr;\n }\n}\n\nmodule.exports = {\n Frame: Frame,\n makeMacro: makeMacro,\n makeKeywordArgs: makeKeywordArgs,\n numArgs: numArgs,\n suppressValue: suppressValue,\n ensureDefined: ensureDefined,\n memberLookup: memberLookup,\n contextOrFrameLookup: contextOrFrameLookup,\n callWrap: callWrap,\n handleError: handleError,\n isArray: lib.isArray,\n keys: lib.keys,\n SafeString: SafeString,\n copySafeness: copySafeness,\n markSafe: markSafe,\n asyncEach: asyncEach,\n asyncAll: asyncAll,\n inOperator: lib.inOperator,\n fromIterator: fromIterator\n};\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/runtime.js","'use strict';\n\nconst {Obj} = require('./object');\n\nfunction traverseAndCheck(obj, type, results) {\n if (obj instanceof type) {\n results.push(obj);\n }\n\n if (obj instanceof Node) {\n obj.findAll(type, results);\n }\n}\n\nclass Node extends Obj {\n init(lineno, colno, ...args) {\n this.lineno = lineno;\n this.colno = colno;\n\n this.fields.forEach((field, i) => {\n // The first two args are line/col numbers, so offset by 2\n var val = arguments[i + 2];\n\n // Fields should never be undefined, but null. It makes\n // testing easier to normalize values.\n if (val === undefined) {\n val = null;\n }\n\n this[field] = val;\n });\n }\n\n findAll(type, results) {\n results = results || [];\n\n if (this instanceof NodeList) {\n this.children.forEach(child => traverseAndCheck(child, type, results));\n } else {\n this.fields.forEach(field => traverseAndCheck(this[field], type, results));\n }\n\n return results;\n }\n\n iterFields(func) {\n this.fields.forEach((field) => {\n func(this[field], field);\n });\n }\n}\n\n// Abstract nodes\nclass Value extends Node {\n get typename() { return 'Value'; }\n get fields() {\n return ['value'];\n }\n}\n\n// Concrete nodes\nclass NodeList extends Node {\n get typename() { return 'NodeList'; }\n get fields() { return ['children']; }\n\n init(lineno, colno, nodes) {\n super.init(lineno, colno, nodes || []);\n }\n\n addChild(node) {\n this.children.push(node);\n }\n}\n\nconst Root = NodeList.extend('Root');\nconst Literal = Value.extend('Literal');\nconst Symbol = Value.extend('Symbol');\nconst Group = NodeList.extend('Group');\nconst ArrayNode = NodeList.extend('Array');\nconst Pair = Node.extend('Pair', { fields: ['key', 'value'] });\nconst Dict = NodeList.extend('Dict');\nconst LookupVal = Node.extend('LookupVal', { fields: ['target', 'val'] });\nconst If = Node.extend('If', { fields: ['cond', 'body', 'else_'] });\nconst IfAsync = If.extend('IfAsync');\nconst InlineIf = Node.extend('InlineIf', { fields: ['cond', 'body', 'else_'] });\nconst For = Node.extend('For', { fields: ['arr', 'name', 'body', 'else_'] });\nconst AsyncEach = For.extend('AsyncEach');\nconst AsyncAll = For.extend('AsyncAll');\nconst Macro = Node.extend('Macro', { fields: ['name', 'args', 'body'] });\nconst Caller = Macro.extend('Caller');\nconst Import = Node.extend('Import', { fields: ['template', 'target', 'withContext'] });\n\nclass FromImport extends Node {\n get typename() { return 'FromImport'; }\n get fields() { return ['template', 'names', 'withContext']; }\n\n init(lineno, colno, template, names, withContext) {\n super.init(lineno, colno, template, names || new NodeList(), withContext);\n }\n}\n\nconst FunCall = Node.extend('FunCall', { fields: ['name', 'args'] });\nconst Filter = FunCall.extend('Filter');\nconst FilterAsync = Filter.extend('FilterAsync', { fields: ['name', 'args', 'symbol'] });\nconst KeywordArgs = Dict.extend('KeywordArgs');\nconst Block = Node.extend('Block', { fields: ['name', 'body'] });\nconst Super = Node.extend('Super', { fields: ['blockName', 'symbol'] });\nconst TemplateRef = Node.extend('TemplateRef', { fields: ['template'] });\nconst Extends = TemplateRef.extend('Extends');\nconst Include = Node.extend('Include', { fields: ['template', 'ignoreMissing'] });\nconst Set = Node.extend('Set', { fields: ['targets', 'value'] });\nconst Switch = Node.extend('Switch', { fields: ['expr', 'cases', 'default'] });\nconst Case = Node.extend('Case', { fields: ['cond', 'body'] });\nconst Output = NodeList.extend('Output');\nconst Capture = Node.extend('Capture', { fields: ['body'] });\nconst TemplateData = Literal.extend('TemplateData');\nconst UnaryOp = Node.extend('UnaryOp', { fields: ['target'] });\nconst BinOp = Node.extend('BinOp', { fields: ['left', 'right'] });\nconst In = BinOp.extend('In');\nconst Is = BinOp.extend('Is');\nconst Or = BinOp.extend('Or');\nconst And = BinOp.extend('And');\nconst Not = UnaryOp.extend('Not');\nconst Add = BinOp.extend('Add');\nconst Concat = BinOp.extend('Concat');\nconst Sub = BinOp.extend('Sub');\nconst Mul = BinOp.extend('Mul');\nconst Div = BinOp.extend('Div');\nconst FloorDiv = BinOp.extend('FloorDiv');\nconst Mod = BinOp.extend('Mod');\nconst Pow = BinOp.extend('Pow');\nconst Neg = UnaryOp.extend('Neg');\nconst Pos = UnaryOp.extend('Pos');\nconst Compare = Node.extend('Compare', { fields: ['expr', 'ops'] });\nconst CompareOperand = Node.extend('CompareOperand', { fields: ['expr', 'type'] });\nconst CallExtension = Node.extend('CallExtension', {\n init(ext, prop, args, contentArgs) {\n this.parent();\n this.extName = ext.__name || ext;\n this.prop = prop;\n this.args = args || new NodeList();\n this.contentArgs = contentArgs || [];\n this.autoescape = ext.autoescape;\n },\n fields: ['extName', 'prop', 'args', 'contentArgs']\n});\nconst CallExtensionAsync = CallExtension.extend('CallExtensionAsync');\n\n// This is hacky, but this is just a debugging function anyway\nfunction print(str, indent, inline) {\n var lines = str.split('\\n');\n\n lines.forEach((line, i) => {\n if (line && ((inline && i > 0) || !inline)) {\n process.stdout.write((' ').repeat(indent));\n }\n const nl = (i === lines.length - 1) ? '' : '\\n';\n process.stdout.write(`${line}${nl}`);\n });\n}\n\n// Print the AST in a nicely formatted tree format for debuggin\nfunction printNodes(node, indent) {\n indent = indent || 0;\n\n print(node.typename + ': ', indent);\n\n if (node instanceof NodeList) {\n print('\\n');\n node.children.forEach((n) => {\n printNodes(n, indent + 2);\n });\n } else if (node instanceof CallExtension) {\n print(`${node.extName}.${node.prop}\\n`);\n\n if (node.args) {\n printNodes(node.args, indent + 2);\n }\n\n if (node.contentArgs) {\n node.contentArgs.forEach((n) => {\n printNodes(n, indent + 2);\n });\n }\n } else {\n let nodes = [];\n let props = null;\n\n node.iterFields((val, fieldName) => {\n if (val instanceof Node) {\n nodes.push([fieldName, val]);\n } else {\n props = props || {};\n props[fieldName] = val;\n }\n });\n\n if (props) {\n print(JSON.stringify(props, null, 2) + '\\n', null, true);\n } else {\n print('\\n');\n }\n\n nodes.forEach(([fieldName, n]) => {\n print(`[${fieldName}] =>`, indent + 2);\n printNodes(n, indent + 4);\n });\n }\n}\n\nmodule.exports = {\n Node: Node,\n Root: Root,\n NodeList: NodeList,\n Value: Value,\n Literal: Literal,\n Symbol: Symbol,\n Group: Group,\n Array: ArrayNode,\n Pair: Pair,\n Dict: Dict,\n Output: Output,\n Capture: Capture,\n TemplateData: TemplateData,\n If: If,\n IfAsync: IfAsync,\n InlineIf: InlineIf,\n For: For,\n AsyncEach: AsyncEach,\n AsyncAll: AsyncAll,\n Macro: Macro,\n Caller: Caller,\n Import: Import,\n FromImport: FromImport,\n FunCall: FunCall,\n Filter: Filter,\n FilterAsync: FilterAsync,\n KeywordArgs: KeywordArgs,\n Block: Block,\n Super: Super,\n Extends: Extends,\n Include: Include,\n Set: Set,\n Switch: Switch,\n Case: Case,\n LookupVal: LookupVal,\n BinOp: BinOp,\n In: In,\n Is: Is,\n Or: Or,\n And: And,\n Not: Not,\n Add: Add,\n Concat: Concat,\n Sub: Sub,\n Mul: Mul,\n Div: Div,\n FloorDiv: FloorDiv,\n Mod: Mod,\n Pow: Pow,\n Neg: Neg,\n Pos: Pos,\n Compare: Compare,\n CompareOperand: CompareOperand,\n\n CallExtension: CallExtension,\n CallExtensionAsync: CallExtensionAsync,\n\n printNodes: printNodes\n};\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/nodes.js","'use strict';\n\nconst parser = require('./parser');\nconst transformer = require('./transformer');\nconst nodes = require('./nodes');\nconst {TemplateError} = require('./lib');\nconst {Frame} = require('./runtime');\nconst {Obj} = require('./object');\n\n// These are all the same for now, but shouldn't be passed straight\n// through\nconst compareOps = {\n '==': '==',\n '===': '===',\n '!=': '!=',\n '!==': '!==',\n '<': '<',\n '>': '>',\n '<=': '<=',\n '>=': '>='\n};\n\nclass Compiler extends Obj {\n init(templateName, throwOnUndefined) {\n this.templateName = templateName;\n this.codebuf = [];\n this.lastId = 0;\n this.buffer = null;\n this.bufferStack = [];\n this._scopeClosers = '';\n this.inBlock = false;\n this.throwOnUndefined = throwOnUndefined;\n }\n\n fail(msg, lineno, colno) {\n if (lineno !== undefined) {\n lineno += 1;\n }\n if (colno !== undefined) {\n colno += 1;\n }\n\n throw new TemplateError(msg, lineno, colno);\n }\n\n _pushBuffer() {\n const id = this._tmpid();\n this.bufferStack.push(this.buffer);\n this.buffer = id;\n this._emit(`var ${this.buffer} = \"\";`);\n return id;\n }\n\n _popBuffer() {\n this.buffer = this.bufferStack.pop();\n }\n\n _emit(code) {\n this.codebuf.push(code);\n }\n\n _emitLine(code) {\n this._emit(code + '\\n');\n }\n\n _emitLines(...lines) {\n lines.forEach((line) => this._emitLine(line));\n }\n\n _emitFuncBegin(node, name) {\n this.buffer = 'output';\n this._scopeClosers = '';\n this._emitLine(`function ${name}(env, context, frame, runtime, cb) {`);\n this._emitLine(`var lineno = ${node.lineno};`);\n this._emitLine(`var colno = ${node.colno};`);\n this._emitLine(`var ${this.buffer} = \"\";`);\n this._emitLine('try {');\n }\n\n _emitFuncEnd(noReturn) {\n if (!noReturn) {\n this._emitLine('cb(null, ' + this.buffer + ');');\n }\n\n this._closeScopeLevels();\n this._emitLine('} catch (e) {');\n this._emitLine(' cb(runtime.handleError(e, lineno, colno));');\n this._emitLine('}');\n this._emitLine('}');\n this.buffer = null;\n }\n\n _addScopeLevel() {\n this._scopeClosers += '})';\n }\n\n _closeScopeLevels() {\n this._emitLine(this._scopeClosers + ';');\n this._scopeClosers = '';\n }\n\n _withScopedSyntax(func) {\n var _scopeClosers = this._scopeClosers;\n this._scopeClosers = '';\n\n func.call(this);\n\n this._closeScopeLevels();\n this._scopeClosers = _scopeClosers;\n }\n\n _makeCallback(res) {\n var err = this._tmpid();\n\n return 'function(' + err + (res ? ',' + res : '') + ') {\\n' +\n 'if(' + err + ') { cb(' + err + '); return; }';\n }\n\n _tmpid() {\n this.lastId++;\n return 't_' + this.lastId;\n }\n\n _templateName() {\n return this.templateName == null ? 'undefined' : JSON.stringify(this.templateName);\n }\n\n _compileChildren(node, frame) {\n node.children.forEach((child) => {\n this.compile(child, frame);\n });\n }\n\n _compileAggregate(node, frame, startChar, endChar) {\n if (startChar) {\n this._emit(startChar);\n }\n\n node.children.forEach((child, i) => {\n if (i > 0) {\n this._emit(',');\n }\n\n this.compile(child, frame);\n });\n\n if (endChar) {\n this._emit(endChar);\n }\n }\n\n _compileExpression(node, frame) {\n // TODO: I'm not really sure if this type check is worth it or\n // not.\n this.assertType(\n node,\n nodes.Literal,\n nodes.Symbol,\n nodes.Group,\n nodes.Array,\n nodes.Dict,\n nodes.FunCall,\n nodes.Caller,\n nodes.Filter,\n nodes.LookupVal,\n nodes.Compare,\n nodes.InlineIf,\n nodes.In,\n nodes.Is,\n nodes.And,\n nodes.Or,\n nodes.Not,\n nodes.Add,\n nodes.Concat,\n nodes.Sub,\n nodes.Mul,\n nodes.Div,\n nodes.FloorDiv,\n nodes.Mod,\n nodes.Pow,\n nodes.Neg,\n nodes.Pos,\n nodes.Compare,\n nodes.NodeList\n );\n this.compile(node, frame);\n }\n\n assertType(node, ...types) {\n if (!types.some(t => node instanceof t)) {\n this.fail(`assertType: invalid type: ${node.typename}`, node.lineno, node.colno);\n }\n }\n\n compileCallExtension(node, frame, async) {\n var args = node.args;\n var contentArgs = node.contentArgs;\n var autoescape = typeof node.autoescape === 'boolean' ? node.autoescape : true;\n\n if (!async) {\n this._emit(`${this.buffer} += runtime.suppressValue(`);\n }\n\n this._emit(`env.getExtension(\"${node.extName}\")[\"${node.prop}\"](`);\n this._emit('context');\n\n if (args || contentArgs) {\n this._emit(',');\n }\n\n if (args) {\n if (!(args instanceof nodes.NodeList)) {\n this.fail('compileCallExtension: arguments must be a NodeList, ' +\n 'use `parser.parseSignature`');\n }\n\n args.children.forEach((arg, i) => {\n // Tag arguments are passed normally to the call. Note\n // that keyword arguments are turned into a single js\n // object as the last argument, if they exist.\n this._compileExpression(arg, frame);\n\n if (i !== args.children.length - 1 || contentArgs.length) {\n this._emit(',');\n }\n });\n }\n\n if (contentArgs.length) {\n contentArgs.forEach((arg, i) => {\n if (i > 0) {\n this._emit(',');\n }\n\n if (arg) {\n this._emitLine('function(cb) {');\n this._emitLine('if(!cb) { cb = function(err) { if(err) { throw err; }}}');\n const id = this._pushBuffer();\n\n this._withScopedSyntax(() => {\n this.compile(arg, frame);\n this._emitLine(`cb(null, ${id});`);\n });\n\n this._popBuffer();\n this._emitLine(`return ${id};`);\n this._emitLine('}');\n } else {\n this._emit('null');\n }\n });\n }\n\n if (async) {\n const res = this._tmpid();\n this._emitLine(', ' + this._makeCallback(res));\n this._emitLine(\n `${this.buffer} += runtime.suppressValue(${res}, ${autoescape} && env.opts.autoescape);`);\n this._addScopeLevel();\n } else {\n this._emit(')');\n this._emit(`, ${autoescape} && env.opts.autoescape);\\n`);\n }\n }\n\n compileCallExtensionAsync(node, frame) {\n this.compileCallExtension(node, frame, true);\n }\n\n compileNodeList(node, frame) {\n this._compileChildren(node, frame);\n }\n\n compileLiteral(node) {\n if (typeof node.value === 'string') {\n let val = node.value.replace(/\\\\/g, '\\\\\\\\');\n val = val.replace(/\"/g, '\\\\\"');\n val = val.replace(/\\n/g, '\\\\n');\n val = val.replace(/\\r/g, '\\\\r');\n val = val.replace(/\\t/g, '\\\\t');\n val = val.replace(/\\u2028/g, '\\\\u2028');\n this._emit(`\"${val}\"`);\n } else if (node.value === null) {\n this._emit('null');\n } else {\n this._emit(node.value.toString());\n }\n }\n\n compileSymbol(node, frame) {\n var name = node.value;\n var v = frame.lookup(name);\n\n if (v) {\n this._emit(v);\n } else {\n this._emit('runtime.contextOrFrameLookup(' +\n 'context, frame, \"' + name + '\")');\n }\n }\n\n compileGroup(node, frame) {\n this._compileAggregate(node, frame, '(', ')');\n }\n\n compileArray(node, frame) {\n this._compileAggregate(node, frame, '[', ']');\n }\n\n compileDict(node, frame) {\n this._compileAggregate(node, frame, '{', '}');\n }\n\n compilePair(node, frame) {\n var key = node.key;\n var val = node.value;\n\n if (key instanceof nodes.Symbol) {\n key = new nodes.Literal(key.lineno, key.colno, key.value);\n } else if (!(key instanceof nodes.Literal &&\n typeof key.value === 'string')) {\n this.fail('compilePair: Dict keys must be strings or names',\n key.lineno,\n key.colno);\n }\n\n this.compile(key, frame);\n this._emit(': ');\n this._compileExpression(val, frame);\n }\n\n compileInlineIf(node, frame) {\n this._emit('(');\n this.compile(node.cond, frame);\n this._emit('?');\n this.compile(node.body, frame);\n this._emit(':');\n if (node.else_ !== null) {\n this.compile(node.else_, frame);\n } else {\n this._emit('\"\"');\n }\n this._emit(')');\n }\n\n compileIn(node, frame) {\n this._emit('runtime.inOperator(');\n this.compile(node.left, frame);\n this._emit(',');\n this.compile(node.right, frame);\n this._emit(')');\n }\n\n compileIs(node, frame) {\n // first, we need to try to get the name of the test function, if it's a\n // callable (i.e., has args) and not a symbol.\n var right = node.right.name\n ? node.right.name.value\n // otherwise go with the symbol value\n : node.right.value;\n this._emit('env.getTest(\"' + right + '\").call(context, ');\n this.compile(node.left, frame);\n // compile the arguments for the callable if they exist\n if (node.right.args) {\n this._emit(',');\n this.compile(node.right.args, frame);\n }\n this._emit(') === true');\n }\n\n _binOpEmitter(node, frame, str) {\n this.compile(node.left, frame);\n this._emit(str);\n this.compile(node.right, frame);\n }\n\n // ensure concatenation instead of addition\n // by adding empty string in between\n compileOr(node, frame) {\n return this._binOpEmitter(node, frame, ' || ');\n }\n\n compileAnd(node, frame) {\n return this._binOpEmitter(node, frame, ' && ');\n }\n\n compileAdd(node, frame) {\n return this._binOpEmitter(node, frame, ' + ');\n }\n\n compileConcat(node, frame) {\n return this._binOpEmitter(node, frame, ' + \"\" + ');\n }\n\n compileSub(node, frame) {\n return this._binOpEmitter(node, frame, ' - ');\n }\n\n compileMul(node, frame) {\n return this._binOpEmitter(node, frame, ' * ');\n }\n\n compileDiv(node, frame) {\n return this._binOpEmitter(node, frame, ' / ');\n }\n\n compileMod(node, frame) {\n return this._binOpEmitter(node, frame, ' % ');\n }\n\n compileNot(node, frame) {\n this._emit('!');\n this.compile(node.target, frame);\n }\n\n compileFloorDiv(node, frame) {\n this._emit('Math.floor(');\n this.compile(node.left, frame);\n this._emit(' / ');\n this.compile(node.right, frame);\n this._emit(')');\n }\n\n compilePow(node, frame) {\n this._emit('Math.pow(');\n this.compile(node.left, frame);\n this._emit(', ');\n this.compile(node.right, frame);\n this._emit(')');\n }\n\n compileNeg(node, frame) {\n this._emit('-');\n this.compile(node.target, frame);\n }\n\n compilePos(node, frame) {\n this._emit('+');\n this.compile(node.target, frame);\n }\n\n compileCompare(node, frame) {\n this.compile(node.expr, frame);\n\n node.ops.forEach((op) => {\n this._emit(` ${compareOps[op.type]} `);\n this.compile(op.expr, frame);\n });\n }\n\n compileLookupVal(node, frame) {\n this._emit('runtime.memberLookup((');\n this._compileExpression(node.target, frame);\n this._emit('),');\n this._compileExpression(node.val, frame);\n this._emit(')');\n }\n\n _getNodeName(node) {\n switch (node.typename) {\n case 'Symbol':\n return node.value;\n case 'FunCall':\n return 'the return value of (' + this._getNodeName(node.name) + ')';\n case 'LookupVal':\n return this._getNodeName(node.target) + '[\"' +\n this._getNodeName(node.val) + '\"]';\n case 'Literal':\n return node.value.toString();\n default:\n return '--expression--';\n }\n }\n\n compileFunCall(node, frame) {\n // Keep track of line/col info at runtime by settings\n // variables within an expression. An expression in javascript\n // like (x, y, z) returns the last value, and x and y can be\n // anything\n this._emit('(lineno = ' + node.lineno +\n ', colno = ' + node.colno + ', ');\n\n this._emit('runtime.callWrap(');\n // Compile it as normal.\n this._compileExpression(node.name, frame);\n\n // Output the name of what we're calling so we can get friendly errors\n // if the lookup fails.\n this._emit(', \"' + this._getNodeName(node.name).replace(/\"/g, '\\\\\"') + '\", context, ');\n\n this._compileAggregate(node.args, frame, '[', '])');\n\n this._emit(')');\n }\n\n compileFilter(node, frame) {\n var name = node.name;\n this.assertType(name, nodes.Symbol);\n this._emit('env.getFilter(\"' + name.value + '\").call(context, ');\n this._compileAggregate(node.args, frame);\n this._emit(')');\n }\n\n compileFilterAsync(node, frame) {\n var name = node.name;\n var symbol = node.symbol.value;\n\n this.assertType(name, nodes.Symbol);\n\n frame.set(symbol, symbol);\n\n this._emit('env.getFilter(\"' + name.value + '\").call(context, ');\n this._compileAggregate(node.args, frame);\n this._emitLine(', ' + this._makeCallback(symbol));\n\n this._addScopeLevel();\n }\n\n compileKeywordArgs(node, frame) {\n this._emit('runtime.makeKeywordArgs(');\n this.compileDict(node, frame);\n this._emit(')');\n }\n\n compileSet(node, frame) {\n var ids = [];\n\n // Lookup the variable names for each identifier and create\n // new ones if necessary\n node.targets.forEach((target) => {\n var name = target.value;\n var id = frame.lookup(name);\n\n if (id === null || id === undefined) {\n id = this._tmpid();\n\n // Note: This relies on js allowing scope across\n // blocks, in case this is created inside an `if`\n this._emitLine('var ' + id + ';');\n }\n\n ids.push(id);\n });\n\n if (node.value) {\n this._emit(ids.join(' = ') + ' = ');\n this._compileExpression(node.value, frame);\n this._emitLine(';');\n } else {\n this._emit(ids.join(' = ') + ' = ');\n this.compile(node.body, frame);\n this._emitLine(';');\n }\n\n node.targets.forEach((target, i) => {\n var id = ids[i];\n var name = target.value;\n\n // We are running this for every var, but it's very\n // uncommon to assign to multiple vars anyway\n this._emitLine(`frame.set(\"${name}\", ${id}, true);`);\n\n this._emitLine('if(frame.topLevel) {');\n this._emitLine(`context.setVariable(\"${name}\", ${id});`);\n this._emitLine('}');\n\n if (name.charAt(0) !== '_') {\n this._emitLine('if(frame.topLevel) {');\n this._emitLine(`context.addExport(\"${name}\", ${id});`);\n this._emitLine('}');\n }\n });\n }\n\n compileSwitch(node, frame) {\n this._emit('switch (');\n this.compile(node.expr, frame);\n this._emit(') {');\n node.cases.forEach((c, i) => {\n this._emit('case ');\n this.compile(c.cond, frame);\n this._emit(': ');\n this.compile(c.body, frame);\n // preserve fall-throughs\n if (c.body.children.length) {\n this._emitLine('break;');\n }\n });\n if (node.default) {\n this._emit('default:');\n this.compile(node.default, frame);\n }\n this._emit('}');\n }\n\n compileIf(node, frame, async) {\n this._emit('if(');\n this._compileExpression(node.cond, frame);\n this._emitLine(') {');\n\n this._withScopedSyntax(() => {\n this.compile(node.body, frame);\n\n if (async) {\n this._emit('cb()');\n }\n });\n\n if (node.else_) {\n this._emitLine('}\\nelse {');\n\n this._withScopedSyntax(() => {\n this.compile(node.else_, frame);\n\n if (async) {\n this._emit('cb()');\n }\n });\n } else if (async) {\n this._emitLine('}\\nelse {');\n this._emit('cb()');\n }\n\n this._emitLine('}');\n }\n\n compileIfAsync(node, frame) {\n this._emit('(function(cb) {');\n this.compileIf(node, frame, true);\n this._emit('})(' + this._makeCallback());\n this._addScopeLevel();\n }\n\n _emitLoopBindings(node, arr, i, len) {\n const bindings = [\n {name: 'index', val: `${i} + 1`},\n {name: 'index0', val: i},\n {name: 'revindex', val: `${len} - ${i}`},\n {name: 'revindex0', val: `${len} - ${i} - 1`},\n {name: 'first', val: `${i} === 0`},\n {name: 'last', val: `${i} === ${len} - 1`},\n {name: 'length', val: len},\n ];\n\n bindings.forEach((b) => {\n this._emitLine(`frame.set(\"loop.${b.name}\", ${b.val});`);\n });\n }\n\n compileFor(node, frame) {\n // Some of this code is ugly, but it keeps the generated code\n // as fast as possible. ForAsync also shares some of this, but\n // not much.\n\n const i = this._tmpid();\n const len = this._tmpid();\n const arr = this._tmpid();\n frame = frame.push();\n\n this._emitLine('frame = frame.push();');\n\n this._emit(`var ${arr} = `);\n this._compileExpression(node.arr, frame);\n this._emitLine(';');\n\n this._emit(`if(${arr}) {`);\n this._emitLine(arr + ' = runtime.fromIterator(' + arr + ');');\n\n // If multiple names are passed, we need to bind them\n // appropriately\n if (node.name instanceof nodes.Array) {\n this._emitLine(`var ${i};`);\n\n // The object could be an arroy or object. Note that the\n // body of the loop is duplicated for each condition, but\n // we are optimizing for speed over size.\n this._emitLine(`if(runtime.isArray(${arr})) {`);\n this._emitLine(`var ${len} = ${arr}.length;`);\n this._emitLine(`for(${i}=0; ${i} < ${arr}.length; ${i}++) {`);\n\n // Bind each declared var\n node.name.children.forEach((child, u) => {\n var tid = this._tmpid();\n this._emitLine(`var ${tid} = ${arr}[${i}][${u}];`);\n this._emitLine(`frame.set(\"${child}\", ${arr}[${i}][${u}]);`);\n frame.set(node.name.children[u].value, tid);\n });\n\n this._emitLoopBindings(node, arr, i, len);\n this._withScopedSyntax(() => {\n this.compile(node.body, frame);\n });\n this._emitLine('}');\n\n this._emitLine('} else {');\n // Iterate over the key/values of an object\n const [key, val] = node.name.children;\n const k = this._tmpid();\n const v = this._tmpid();\n frame.set(key.value, k);\n frame.set(val.value, v);\n\n this._emitLine(`${i} = -1;`);\n this._emitLine(`var ${len} = runtime.keys(${arr}).length;`);\n this._emitLine(`for(var ${k} in ${arr}) {`);\n this._emitLine(`${i}++;`);\n this._emitLine(`var ${v} = ${arr}[${k}];`);\n this._emitLine(`frame.set(\"${key.value}\", ${k});`);\n this._emitLine(`frame.set(\"${val.value}\", ${v});`);\n\n this._emitLoopBindings(node, arr, i, len);\n this._withScopedSyntax(() => {\n this.compile(node.body, frame);\n });\n this._emitLine('}');\n\n this._emitLine('}');\n } else {\n // Generate a typical array iteration\n const v = this._tmpid();\n frame.set(node.name.value, v);\n\n this._emitLine(`var ${len} = ${arr}.length;`);\n this._emitLine(`for(var ${i}=0; ${i} < ${arr}.length; ${i}++) {`);\n this._emitLine(`var ${v} = ${arr}[${i}];`);\n this._emitLine(`frame.set(\"${node.name.value}\", ${v});`);\n\n this._emitLoopBindings(node, arr, i, len);\n\n this._withScopedSyntax(() => {\n this.compile(node.body, frame);\n });\n\n this._emitLine('}');\n }\n\n this._emitLine('}');\n if (node.else_) {\n this._emitLine('if (!' + len + ') {');\n this.compile(node.else_, frame);\n this._emitLine('}');\n }\n\n this._emitLine('frame = frame.pop();');\n }\n\n _compileAsyncLoop(node, frame, parallel) {\n // This shares some code with the For tag, but not enough to\n // worry about. This iterates across an object asynchronously,\n // but not in parallel.\n\n var i = this._tmpid();\n var len = this._tmpid();\n var arr = this._tmpid();\n var asyncMethod = parallel ? 'asyncAll' : 'asyncEach';\n frame = frame.push();\n\n this._emitLine('frame = frame.push();');\n\n this._emit('var ' + arr + ' = runtime.fromIterator(');\n this._compileExpression(node.arr, frame);\n this._emitLine(');');\n\n if (node.name instanceof nodes.Array) {\n const arrayLen = node.name.children.length;\n this._emit(`runtime.${asyncMethod}(${arr}, ${arrayLen}, function(`);\n\n node.name.children.forEach((name) => {\n this._emit(`${name.value},`);\n });\n\n this._emit(i + ',' + len + ',next) {');\n\n node.name.children.forEach((name) => {\n const id = name.value;\n frame.set(id, id);\n this._emitLine(`frame.set(\"${id}\", ${id});`);\n });\n } else {\n const id = node.name.value;\n this._emitLine(`runtime.${asyncMethod}(${arr}, 1, function(${id}, ${i}, ${len},next) {`);\n this._emitLine('frame.set(\"' + id + '\", ' + id + ');');\n frame.set(id, id);\n }\n\n this._emitLoopBindings(node, arr, i, len);\n\n this._withScopedSyntax(() => {\n let buf;\n if (parallel) {\n buf = this._pushBuffer();\n }\n\n this.compile(node.body, frame);\n this._emitLine('next(' + i + (buf ? ',' + buf : '') + ');');\n\n if (parallel) {\n this._popBuffer();\n }\n });\n\n const output = this._tmpid();\n this._emitLine('}, ' + this._makeCallback(output));\n this._addScopeLevel();\n\n if (parallel) {\n this._emitLine(this.buffer + ' += ' + output + ';');\n }\n\n if (node.else_) {\n this._emitLine('if (!' + arr + '.length) {');\n this.compile(node.else_, frame);\n this._emitLine('}');\n }\n\n this._emitLine('frame = frame.pop();');\n }\n\n compileAsyncEach(node, frame) {\n this._compileAsyncLoop(node, frame);\n }\n\n compileAsyncAll(node, frame) {\n this._compileAsyncLoop(node, frame, true);\n }\n\n _compileMacro(node, frame) {\n var args = [];\n var kwargs = null;\n var funcId = 'macro_' + this._tmpid();\n var keepFrame = (frame !== undefined);\n\n // Type check the definition of the args\n node.args.children.forEach((arg, i) => {\n if (i === node.args.children.length - 1 && arg instanceof nodes.Dict) {\n kwargs = arg;\n } else {\n this.assertType(arg, nodes.Symbol);\n args.push(arg);\n }\n });\n\n const realNames = [...args.map((n) => `l_${n.value}`), 'kwargs'];\n\n // Quoted argument names\n const argNames = args.map((n) => `\"${n.value}\"`);\n const kwargNames = ((kwargs && kwargs.children) || []).map((n) => `\"${n.key.value}\"`);\n\n // We pass a function to makeMacro which destructures the\n // arguments so support setting positional args with keywords\n // args and passing keyword args as positional args\n // (essentially default values). See runtime.js.\n let currFrame;\n if (keepFrame) {\n currFrame = frame.push(true);\n } else {\n currFrame = new Frame();\n }\n this._emitLines(\n `var ${funcId} = runtime.makeMacro(`,\n `[${argNames.join(', ')}], `,\n `[${kwargNames.join(', ')}], `,\n `function (${realNames.join(', ')}) {`,\n 'var callerFrame = frame;',\n 'frame = ' + ((keepFrame) ? 'frame.push(true);' : 'new runtime.Frame();'),\n 'kwargs = kwargs || {};',\n 'if (Object.prototype.hasOwnProperty.call(kwargs, \"caller\")) {',\n 'frame.set(\"caller\", kwargs.caller); }');\n\n // Expose the arguments to the template. Don't need to use\n // random names because the function\n // will create a new run-time scope for us\n args.forEach((arg) => {\n this._emitLine(`frame.set(\"${arg.value}\", l_${arg.value});`);\n currFrame.set(arg.value, `l_${arg.value}`);\n });\n\n // Expose the keyword arguments\n if (kwargs) {\n kwargs.children.forEach((pair) => {\n const name = pair.key.value;\n this._emit(`frame.set(\"${name}\", `);\n this._emit(`Object.prototype.hasOwnProperty.call(kwargs, \"${name}\")`);\n this._emit(` ? kwargs[\"${name}\"] : `);\n this._compileExpression(pair.value, currFrame);\n this._emit(');');\n });\n }\n\n const bufferId = this._pushBuffer();\n\n this._withScopedSyntax(() => {\n this.compile(node.body, currFrame);\n });\n\n this._emitLine('frame = ' + ((keepFrame) ? 'frame.pop();' : 'callerFrame;'));\n this._emitLine(`return new runtime.SafeString(${bufferId});`);\n this._emitLine('});');\n this._popBuffer();\n\n return funcId;\n }\n\n compileMacro(node, frame) {\n var funcId = this._compileMacro(node);\n\n // Expose the macro to the templates\n var name = node.name.value;\n frame.set(name, funcId);\n\n if (frame.parent) {\n this._emitLine(`frame.set(\"${name}\", ${funcId});`);\n } else {\n if (node.name.value.charAt(0) !== '_') {\n this._emitLine(`context.addExport(\"${name}\");`);\n }\n this._emitLine(`context.setVariable(\"${name}\", ${funcId});`);\n }\n }\n\n compileCaller(node, frame) {\n // basically an anonymous \"macro expression\"\n this._emit('(function (){');\n const funcId = this._compileMacro(node, frame);\n this._emit(`return ${funcId};})()`);\n }\n\n _compileGetTemplate(node, frame, eagerCompile, ignoreMissing) {\n const parentTemplateId = this._tmpid();\n const parentName = this._templateName();\n const cb = this._makeCallback(parentTemplateId);\n const eagerCompileArg = (eagerCompile) ? 'true' : 'false';\n const ignoreMissingArg = (ignoreMissing) ? 'true' : 'false';\n this._emit('env.getTemplate(');\n this._compileExpression(node.template, frame);\n this._emitLine(`, ${eagerCompileArg}, ${parentName}, ${ignoreMissingArg}, ${cb}`);\n return parentTemplateId;\n }\n\n compileImport(node, frame) {\n const target = node.target.value;\n const id = this._compileGetTemplate(node, frame, false, false);\n this._addScopeLevel();\n\n this._emitLine(id + '.getExported(' +\n (node.withContext ? 'context.getVariables(), frame, ' : '') +\n this._makeCallback(id));\n this._addScopeLevel();\n\n frame.set(target, id);\n\n if (frame.parent) {\n this._emitLine(`frame.set(\"${target}\", ${id});`);\n } else {\n this._emitLine(`context.setVariable(\"${target}\", ${id});`);\n }\n }\n\n compileFromImport(node, frame) {\n const importedId = this._compileGetTemplate(node, frame, false, false);\n this._addScopeLevel();\n\n this._emitLine(importedId + '.getExported(' +\n (node.withContext ? 'context.getVariables(), frame, ' : '') +\n this._makeCallback(importedId));\n this._addScopeLevel();\n\n node.names.children.forEach((nameNode) => {\n var name;\n var alias;\n var id = this._tmpid();\n\n if (nameNode instanceof nodes.Pair) {\n name = nameNode.key.value;\n alias = nameNode.value.value;\n } else {\n name = nameNode.value;\n alias = name;\n }\n\n this._emitLine(`if(Object.prototype.hasOwnProperty.call(${importedId}, \"${name}\")) {`);\n this._emitLine(`var ${id} = ${importedId}.${name};`);\n this._emitLine('} else {');\n this._emitLine(`cb(new Error(\"cannot import '${name}'\")); return;`);\n this._emitLine('}');\n\n frame.set(alias, id);\n\n if (frame.parent) {\n this._emitLine(`frame.set(\"${alias}\", ${id});`);\n } else {\n this._emitLine(`context.setVariable(\"${alias}\", ${id});`);\n }\n });\n }\n\n compileBlock(node) {\n var id = this._tmpid();\n\n // If we are executing outside a block (creating a top-level\n // block), we really don't want to execute its code because it\n // will execute twice: once when the child template runs and\n // again when the parent template runs. Note that blocks\n // within blocks will *always* execute immediately *and*\n // wherever else they are invoked (like used in a parent\n // template). This may have behavioral differences from jinja\n // because blocks can have side effects, but it seems like a\n // waste of performance to always execute huge top-level\n // blocks twice\n if (!this.inBlock) {\n this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(\"\"); } : ');\n }\n this._emit(`context.getBlock(\"${node.name.value}\")`);\n if (!this.inBlock) {\n this._emit(')');\n }\n this._emitLine('(env, context, frame, runtime, ' + this._makeCallback(id));\n this._emitLine(`${this.buffer} += ${id};`);\n this._addScopeLevel();\n }\n\n compileSuper(node, frame) {\n var name = node.blockName.value;\n var id = node.symbol.value;\n\n const cb = this._makeCallback(id);\n this._emitLine(`context.getSuper(env, \"${name}\", b_${name}, frame, runtime, ${cb}`);\n this._emitLine(`${id} = runtime.markSafe(${id});`);\n this._addScopeLevel();\n frame.set(id, id);\n }\n\n compileExtends(node, frame) {\n var k = this._tmpid();\n\n const parentTemplateId = this._compileGetTemplate(node, frame, true, false);\n\n // extends is a dynamic tag and can occur within a block like\n // `if`, so if this happens we need to capture the parent\n // template in the top-level scope\n this._emitLine(`parentTemplate = ${parentTemplateId}`);\n\n this._emitLine(`for(var ${k} in parentTemplate.blocks) {`);\n this._emitLine(`context.addBlock(${k}, parentTemplate.blocks[${k}]);`);\n this._emitLine('}');\n\n this._addScopeLevel();\n }\n\n compileInclude(node, frame) {\n this._emitLine('var tasks = [];');\n this._emitLine('tasks.push(');\n this._emitLine('function(callback) {');\n const id = this._compileGetTemplate(node, frame, false, node.ignoreMissing);\n this._emitLine(`callback(null,${id});});`);\n this._emitLine('});');\n\n const id2 = this._tmpid();\n this._emitLine('tasks.push(');\n this._emitLine('function(template, callback){');\n this._emitLine('template.render(context.getVariables(), frame, ' + this._makeCallback(id2));\n this._emitLine('callback(null,' + id2 + ');});');\n this._emitLine('});');\n\n this._emitLine('tasks.push(');\n this._emitLine('function(result, callback){');\n this._emitLine(`${this.buffer} += result;`);\n this._emitLine('callback(null);');\n this._emitLine('});');\n this._emitLine('env.waterfall(tasks, function(){');\n this._addScopeLevel();\n }\n\n compileTemplateData(node, frame) {\n this.compileLiteral(node, frame);\n }\n\n compileCapture(node, frame) {\n // we need to temporarily override the current buffer id as 'output'\n // so the set block writes to the capture output instead of the buffer\n var buffer = this.buffer;\n this.buffer = 'output';\n this._emitLine('(function() {');\n this._emitLine('var output = \"\";');\n this._withScopedSyntax(() => {\n this.compile(node.body, frame);\n });\n this._emitLine('return output;');\n this._emitLine('})()');\n // and of course, revert back to the old buffer id\n this.buffer = buffer;\n }\n\n compileOutput(node, frame) {\n const children = node.children;\n children.forEach(child => {\n // TemplateData is a special case because it is never\n // autoescaped, so simply output it for optimization\n if (child instanceof nodes.TemplateData) {\n if (child.value) {\n this._emit(`${this.buffer} += `);\n this.compileLiteral(child, frame);\n this._emitLine(';');\n }\n } else {\n this._emit(`${this.buffer} += runtime.suppressValue(`);\n if (this.throwOnUndefined) {\n this._emit('runtime.ensureDefined(');\n }\n this.compile(child, frame);\n if (this.throwOnUndefined) {\n this._emit(`,${node.lineno},${node.colno})`);\n }\n this._emit(', env.opts.autoescape);\\n');\n }\n });\n }\n\n compileRoot(node, frame) {\n if (frame) {\n this.fail('compileRoot: root node can\\'t have frame');\n }\n\n frame = new Frame();\n\n this._emitFuncBegin(node, 'root');\n this._emitLine('var parentTemplate = null;');\n this._compileChildren(node, frame);\n this._emitLine('if(parentTemplate) {');\n this._emitLine('parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);');\n this._emitLine('} else {');\n this._emitLine(`cb(null, ${this.buffer});`);\n this._emitLine('}');\n this._emitFuncEnd(true);\n\n this.inBlock = true;\n\n const blockNames = [];\n\n const blocks = node.findAll(nodes.Block);\n\n blocks.forEach((block, i) => {\n const name = block.name.value;\n\n if (blockNames.indexOf(name) !== -1) {\n throw new Error(`Block \"${name}\" defined more than once.`);\n }\n blockNames.push(name);\n\n this._emitFuncBegin(block, `b_${name}`);\n\n const tmpFrame = new Frame();\n this._emitLine('var frame = frame.push(true);');\n this.compile(block.body, tmpFrame);\n this._emitFuncEnd();\n });\n\n this._emitLine('return {');\n\n blocks.forEach((block, i) => {\n const blockName = `b_${block.name.value}`;\n this._emitLine(`${blockName}: ${blockName},`);\n });\n\n this._emitLine('root: root\\n};');\n }\n\n compile(node, frame) {\n var _compile = this['compile' + node.typename];\n if (_compile) {\n _compile.call(this, node, frame);\n } else {\n this.fail(`compile: Cannot compile node: ${node.typename}`, node.lineno, node.colno);\n }\n }\n\n getCode() {\n return this.codebuf.join('');\n }\n}\n\nmodule.exports = {\n compile: function compile(src, asyncFilters, extensions, name, opts = {}) {\n const c = new Compiler(name, opts.throwOnUndefined);\n\n // Run the extension preprocessors against the source.\n const preprocessors = (extensions || []).map(ext => ext.preprocess).filter(f => !!f);\n\n const processedSrc = preprocessors.reduce((s, processor) => processor(s), src);\n\n c.compile(transformer.transform(\n parser.parse(processedSrc, extensions, opts),\n asyncFilters,\n name\n ));\n return c.getCode();\n },\n\n Compiler: Compiler\n};\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/compiler.js","'use strict';\n\nconst path = require('path');\nconst {EmitterObj} = require('./object');\n\nmodule.exports = class Loader extends EmitterObj {\n resolve(from, to) {\n return path.resolve(path.dirname(from), to);\n }\n\n isRelative(filename) {\n return (filename.indexOf('./') === 0 || filename.indexOf('../') === 0);\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/loader.js","'use strict';\n\nconst asap = require('asap');\nconst waterfall = require('a-sync-waterfall');\nconst lib = require('./lib');\nconst compiler = require('./compiler');\nconst filters = require('./filters');\nconst {FileSystemLoader, WebLoader, PrecompiledLoader} = require('./loaders');\nconst tests = require('./tests');\nconst globals = require('./globals');\nconst {Obj, EmitterObj} = require('./object');\nconst globalRuntime = require('./runtime');\nconst {handleError, Frame} = globalRuntime;\nconst expressApp = require('./express-app');\n\n// If the user is using the async API, *always* call it\n// asynchronously even if the template was synchronous.\nfunction callbackAsap(cb, err, res) {\n asap(() => {\n cb(err, res);\n });\n}\n\n/**\n * A no-op template, for use with {% include ignore missing %}\n */\nconst noopTmplSrc = {\n type: 'code',\n obj: {\n root(env, context, frame, runtime, cb) {\n try {\n cb(null, '');\n } catch (e) {\n cb(handleError(e, null, null));\n }\n }\n }\n};\n\nclass Environment extends EmitterObj {\n init(loaders, opts) {\n // The dev flag determines the trace that'll be shown on errors.\n // If set to true, returns the full trace from the error point,\n // otherwise will return trace starting from Template.render\n // (the full trace from within nunjucks may confuse developers using\n // the library)\n // defaults to false\n opts = this.opts = opts || {};\n this.opts.dev = !!opts.dev;\n\n // The autoescape flag sets global autoescaping. If true,\n // every string variable will be escaped by default.\n // If false, strings can be manually escaped using the `escape` filter.\n // defaults to true\n this.opts.autoescape = opts.autoescape != null ? opts.autoescape : true;\n\n // If true, this will make the system throw errors if trying\n // to output a null or undefined value\n this.opts.throwOnUndefined = !!opts.throwOnUndefined;\n this.opts.trimBlocks = !!opts.trimBlocks;\n this.opts.lstripBlocks = !!opts.lstripBlocks;\n\n this.loaders = [];\n\n if (!loaders) {\n // The filesystem loader is only available server-side\n if (FileSystemLoader) {\n this.loaders = [new FileSystemLoader('views')];\n } else if (WebLoader) {\n this.loaders = [new WebLoader('/views')];\n }\n } else {\n this.loaders = lib.isArray(loaders) ? loaders : [loaders];\n }\n\n // It's easy to use precompiled templates: just include them\n // before you configure nunjucks and this will automatically\n // pick it up and use it\n if (typeof window !== 'undefined' && window.nunjucksPrecompiled) {\n this.loaders.unshift(\n new PrecompiledLoader(window.nunjucksPrecompiled)\n );\n }\n\n this._initLoaders();\n\n this.globals = globals();\n this.filters = {};\n this.tests = {};\n this.asyncFilters = [];\n this.extensions = {};\n this.extensionsList = [];\n\n lib._entries(filters).forEach(([name, filter]) => this.addFilter(name, filter));\n lib._entries(tests).forEach(([name, test]) => this.addTest(name, test));\n }\n\n _initLoaders() {\n this.loaders.forEach((loader) => {\n // Caching and cache busting\n loader.cache = {};\n if (typeof loader.on === 'function') {\n loader.on('update', (name, fullname) => {\n loader.cache[name] = null;\n this.emit('update', name, fullname, loader);\n });\n loader.on('load', (name, source) => {\n this.emit('load', name, source, loader);\n });\n }\n });\n }\n\n invalidateCache() {\n this.loaders.forEach((loader) => {\n loader.cache = {};\n });\n }\n\n addExtension(name, extension) {\n extension.__name = name;\n this.extensions[name] = extension;\n this.extensionsList.push(extension);\n return this;\n }\n\n removeExtension(name) {\n var extension = this.getExtension(name);\n if (!extension) {\n return;\n }\n\n this.extensionsList = lib.without(this.extensionsList, extension);\n delete this.extensions[name];\n }\n\n getExtension(name) {\n return this.extensions[name];\n }\n\n hasExtension(name) {\n return !!this.extensions[name];\n }\n\n addGlobal(name, value) {\n this.globals[name] = value;\n return this;\n }\n\n getGlobal(name) {\n if (typeof this.globals[name] === 'undefined') {\n throw new Error('global not found: ' + name);\n }\n return this.globals[name];\n }\n\n addFilter(name, func, async) {\n var wrapped = func;\n\n if (async) {\n this.asyncFilters.push(name);\n }\n this.filters[name] = wrapped;\n return this;\n }\n\n getFilter(name) {\n if (!this.filters[name]) {\n throw new Error('filter not found: ' + name);\n }\n return this.filters[name];\n }\n\n addTest(name, func) {\n this.tests[name] = func;\n return this;\n }\n\n getTest(name) {\n if (!this.tests[name]) {\n throw new Error('test not found: ' + name);\n }\n return this.tests[name];\n }\n\n resolveTemplate(loader, parentName, filename) {\n var isRelative = (loader.isRelative && parentName) ? loader.isRelative(filename) : false;\n return (isRelative && loader.resolve) ? loader.resolve(parentName, filename) : filename;\n }\n\n getTemplate(name, eagerCompile, parentName, ignoreMissing, cb) {\n var that = this;\n var tmpl = null;\n if (name && name.raw) {\n // this fixes autoescape for templates referenced in symbols\n name = name.raw;\n }\n\n if (lib.isFunction(parentName)) {\n cb = parentName;\n parentName = null;\n eagerCompile = eagerCompile || false;\n }\n\n if (lib.isFunction(eagerCompile)) {\n cb = eagerCompile;\n eagerCompile = false;\n }\n\n if (name instanceof Template) {\n tmpl = name;\n } else if (typeof name !== 'string') {\n throw new Error('template names must be a string: ' + name);\n } else {\n for (let i = 0; i < this.loaders.length; i++) {\n const loader = this.loaders[i];\n tmpl = loader.cache[this.resolveTemplate(loader, parentName, name)];\n if (tmpl) {\n break;\n }\n }\n }\n\n if (tmpl) {\n if (eagerCompile) {\n tmpl.compile();\n }\n\n if (cb) {\n cb(null, tmpl);\n return undefined;\n } else {\n return tmpl;\n }\n }\n let syncResult;\n\n const createTemplate = (err, info) => {\n if (!info && !err && !ignoreMissing) {\n err = new Error('template not found: ' + name);\n }\n\n if (err) {\n if (cb) {\n cb(err);\n return;\n } else {\n throw err;\n }\n }\n let newTmpl;\n if (!info) {\n newTmpl = new Template(noopTmplSrc, this, '', eagerCompile);\n } else {\n newTmpl = new Template(info.src, this, info.path, eagerCompile);\n if (!info.noCache) {\n info.loader.cache[name] = newTmpl;\n }\n }\n if (cb) {\n cb(null, newTmpl);\n } else {\n syncResult = newTmpl;\n }\n };\n\n lib.asyncIter(this.loaders, (loader, i, next, done) => {\n function handle(err, src) {\n if (err) {\n done(err);\n } else if (src) {\n src.loader = loader;\n done(null, src);\n } else {\n next();\n }\n }\n\n // Resolve name relative to parentName\n name = that.resolveTemplate(loader, parentName, name);\n\n if (loader.async) {\n loader.getSource(name, handle);\n } else {\n handle(null, loader.getSource(name));\n }\n }, createTemplate);\n\n return syncResult;\n }\n\n express(app) {\n return expressApp(this, app);\n }\n\n render(name, ctx, cb) {\n if (lib.isFunction(ctx)) {\n cb = ctx;\n ctx = null;\n }\n\n // We support a synchronous API to make it easier to migrate\n // existing code to async. This works because if you don't do\n // anything async work, the whole thing is actually run\n // synchronously.\n let syncResult = null;\n\n this.getTemplate(name, (err, tmpl) => {\n if (err && cb) {\n callbackAsap(cb, err);\n } else if (err) {\n throw err;\n } else {\n syncResult = tmpl.render(ctx, cb);\n }\n });\n\n return syncResult;\n }\n\n renderString(src, ctx, opts, cb) {\n if (lib.isFunction(opts)) {\n cb = opts;\n opts = {};\n }\n opts = opts || {};\n\n const tmpl = new Template(src, this, opts.path);\n return tmpl.render(ctx, cb);\n }\n\n waterfall(tasks, callback, forceAsync) {\n return waterfall(tasks, callback, forceAsync);\n }\n}\n\nclass Context extends Obj {\n init(ctx, blocks, env) {\n // Has to be tied to an environment so we can tap into its globals.\n this.env = env || new Environment();\n\n // Make a duplicate of ctx\n this.ctx = lib.extend({}, ctx);\n\n this.blocks = {};\n this.exported = [];\n\n lib.keys(blocks).forEach(name => {\n this.addBlock(name, blocks[name]);\n });\n }\n\n lookup(name) {\n // This is one of the most called functions, so optimize for\n // the typical case where the name isn't in the globals\n if (name in this.env.globals && !(name in this.ctx)) {\n return this.env.globals[name];\n } else {\n return this.ctx[name];\n }\n }\n\n setVariable(name, val) {\n this.ctx[name] = val;\n }\n\n getVariables() {\n return this.ctx;\n }\n\n addBlock(name, block) {\n this.blocks[name] = this.blocks[name] || [];\n this.blocks[name].push(block);\n return this;\n }\n\n getBlock(name) {\n if (!this.blocks[name]) {\n throw new Error('unknown block \"' + name + '\"');\n }\n\n return this.blocks[name][0];\n }\n\n getSuper(env, name, block, frame, runtime, cb) {\n var idx = lib.indexOf(this.blocks[name] || [], block);\n var blk = this.blocks[name][idx + 1];\n var context = this;\n\n if (idx === -1 || !blk) {\n throw new Error('no super block available for \"' + name + '\"');\n }\n\n blk(env, context, frame, runtime, cb);\n }\n\n addExport(name) {\n this.exported.push(name);\n }\n\n getExported() {\n var exported = {};\n this.exported.forEach((name) => {\n exported[name] = this.ctx[name];\n });\n return exported;\n }\n}\n\nclass Template extends Obj {\n init(src, env, path, eagerCompile) {\n this.env = env || new Environment();\n\n if (lib.isObject(src)) {\n switch (src.type) {\n case 'code':\n this.tmplProps = src.obj;\n break;\n case 'string':\n this.tmplStr = src.obj;\n break;\n default:\n throw new Error(\n `Unexpected template object type ${src.type}; expected 'code', or 'string'`);\n }\n } else if (lib.isString(src)) {\n this.tmplStr = src;\n } else {\n throw new Error('src must be a string or an object describing the source');\n }\n\n this.path = path;\n\n if (eagerCompile) {\n try {\n this._compile();\n } catch (err) {\n throw lib._prettifyError(this.path, this.env.opts.dev, err);\n }\n } else {\n this.compiled = false;\n }\n }\n\n render(ctx, parentFrame, cb) {\n if (typeof ctx === 'function') {\n cb = ctx;\n ctx = {};\n } else if (typeof parentFrame === 'function') {\n cb = parentFrame;\n parentFrame = null;\n }\n\n // If there is a parent frame, we are being called from internal\n // code of another template, and the internal system\n // depends on the sync/async nature of the parent template\n // to be inherited, so force an async callback\n const forceAsync = !parentFrame;\n\n // Catch compile errors for async rendering\n try {\n this.compile();\n } catch (e) {\n const err = lib._prettifyError(this.path, this.env.opts.dev, e);\n if (cb) {\n return callbackAsap(cb, err);\n } else {\n throw err;\n }\n }\n\n const context = new Context(ctx || {}, this.blocks, this.env);\n const frame = parentFrame ? parentFrame.push(true) : new Frame();\n frame.topLevel = true;\n let syncResult = null;\n let didError = false;\n\n this.rootRenderFunc(this.env, context, frame, globalRuntime, (err, res) => {\n if (didError) {\n // prevent multiple calls to cb\n if (cb) {\n return;\n } else {\n throw err;\n }\n }\n if (err) {\n err = lib._prettifyError(this.path, this.env.opts.dev, err);\n didError = true;\n }\n\n if (cb) {\n if (forceAsync) {\n callbackAsap(cb, err, res);\n } else {\n cb(err, res);\n }\n } else {\n if (err) {\n throw err;\n }\n syncResult = res;\n }\n });\n\n return syncResult;\n }\n\n\n getExported(ctx, parentFrame, cb) { // eslint-disable-line consistent-return\n if (typeof ctx === 'function') {\n cb = ctx;\n ctx = {};\n }\n\n if (typeof parentFrame === 'function') {\n cb = parentFrame;\n parentFrame = null;\n }\n\n // Catch compile errors for async rendering\n try {\n this.compile();\n } catch (e) {\n if (cb) {\n return cb(e);\n } else {\n throw e;\n }\n }\n\n const frame = parentFrame ? parentFrame.push() : new Frame();\n frame.topLevel = true;\n\n // Run the rootRenderFunc to populate the context with exported vars\n const context = new Context(ctx || {}, this.blocks, this.env);\n this.rootRenderFunc(this.env, context, frame, globalRuntime, (err) => {\n if (err) {\n cb(err, null);\n } else {\n cb(null, context.getExported());\n }\n });\n }\n\n compile() {\n if (!this.compiled) {\n this._compile();\n }\n }\n\n _compile() {\n var props;\n\n if (this.tmplProps) {\n props = this.tmplProps;\n } else {\n const source = compiler.compile(this.tmplStr,\n this.env.asyncFilters,\n this.env.extensionsList,\n this.path,\n this.env.opts);\n\n const func = new Function(source); // eslint-disable-line no-new-func\n props = func();\n }\n\n this.blocks = this._getBlocks(props);\n this.rootRenderFunc = props.root;\n this.compiled = true;\n }\n\n _getBlocks(props) {\n var blocks = {};\n\n lib.keys(props).forEach((k) => {\n if (k.slice(0, 2) === 'b_') {\n blocks[k.slice(2)] = props[k];\n }\n });\n\n return blocks;\n }\n}\n\nmodule.exports = {\n Environment: Environment,\n Template: Template\n};\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/environment.js","'use strict';\n\nvar lexer = require('./lexer');\nvar nodes = require('./nodes');\nvar Obj = require('./object').Obj;\nvar lib = require('./lib');\n\nclass Parser extends Obj {\n init(tokens) {\n this.tokens = tokens;\n this.peeked = null;\n this.breakOnBlocks = null;\n this.dropLeadingWhitespace = false;\n\n this.extensions = [];\n }\n\n nextToken(withWhitespace) {\n var tok;\n\n if (this.peeked) {\n if (!withWhitespace && this.peeked.type === lexer.TOKEN_WHITESPACE) {\n this.peeked = null;\n } else {\n tok = this.peeked;\n this.peeked = null;\n return tok;\n }\n }\n\n tok = this.tokens.nextToken();\n\n if (!withWhitespace) {\n while (tok && tok.type === lexer.TOKEN_WHITESPACE) {\n tok = this.tokens.nextToken();\n }\n }\n\n return tok;\n }\n\n peekToken() {\n this.peeked = this.peeked || this.nextToken();\n return this.peeked;\n }\n\n pushToken(tok) {\n if (this.peeked) {\n throw new Error('pushToken: can only push one token on between reads');\n }\n this.peeked = tok;\n }\n\n error(msg, lineno, colno) {\n if (lineno === undefined || colno === undefined) {\n const tok = this.peekToken() || {};\n lineno = tok.lineno;\n colno = tok.colno;\n }\n if (lineno !== undefined) {\n lineno += 1;\n }\n if (colno !== undefined) {\n colno += 1;\n }\n return new lib.TemplateError(msg, lineno, colno);\n }\n\n fail(msg, lineno, colno) {\n throw this.error(msg, lineno, colno);\n }\n\n skip(type) {\n var tok = this.nextToken();\n if (!tok || tok.type !== type) {\n this.pushToken(tok);\n return false;\n }\n return true;\n }\n\n expect(type) {\n var tok = this.nextToken();\n if (tok.type !== type) {\n this.fail('expected ' + type + ', got ' + tok.type,\n tok.lineno,\n tok.colno);\n }\n return tok;\n }\n\n skipValue(type, val) {\n var tok = this.nextToken();\n if (!tok || tok.type !== type || tok.value !== val) {\n this.pushToken(tok);\n return false;\n }\n return true;\n }\n\n skipSymbol(val) {\n return this.skipValue(lexer.TOKEN_SYMBOL, val);\n }\n\n advanceAfterBlockEnd(name) {\n var tok;\n if (!name) {\n tok = this.peekToken();\n\n if (!tok) {\n this.fail('unexpected end of file');\n }\n\n if (tok.type !== lexer.TOKEN_SYMBOL) {\n this.fail('advanceAfterBlockEnd: expected symbol token or ' +\n 'explicit name to be passed');\n }\n\n name = this.nextToken().value;\n }\n\n tok = this.nextToken();\n\n if (tok && tok.type === lexer.TOKEN_BLOCK_END) {\n if (tok.value.charAt(0) === '-') {\n this.dropLeadingWhitespace = true;\n }\n } else {\n this.fail('expected block end in ' + name + ' statement');\n }\n\n return tok;\n }\n\n advanceAfterVariableEnd() {\n var tok = this.nextToken();\n\n if (tok && tok.type === lexer.TOKEN_VARIABLE_END) {\n this.dropLeadingWhitespace = tok.value.charAt(\n tok.value.length - this.tokens.tags.VARIABLE_END.length - 1\n ) === '-';\n } else {\n this.pushToken(tok);\n this.fail('expected variable end');\n }\n }\n\n parseFor() {\n var forTok = this.peekToken();\n var node;\n var endBlock;\n\n if (this.skipSymbol('for')) {\n node = new nodes.For(forTok.lineno, forTok.colno);\n endBlock = 'endfor';\n } else if (this.skipSymbol('asyncEach')) {\n node = new nodes.AsyncEach(forTok.lineno, forTok.colno);\n endBlock = 'endeach';\n } else if (this.skipSymbol('asyncAll')) {\n node = new nodes.AsyncAll(forTok.lineno, forTok.colno);\n endBlock = 'endall';\n } else {\n this.fail('parseFor: expected for{Async}', forTok.lineno, forTok.colno);\n }\n\n node.name = this.parsePrimary();\n\n if (!(node.name instanceof nodes.Symbol)) {\n this.fail('parseFor: variable name expected for loop');\n }\n\n const type = this.peekToken().type;\n if (type === lexer.TOKEN_COMMA) {\n // key/value iteration\n const key = node.name;\n node.name = new nodes.Array(key.lineno, key.colno);\n node.name.addChild(key);\n\n while (this.skip(lexer.TOKEN_COMMA)) {\n const prim = this.parsePrimary();\n node.name.addChild(prim);\n }\n }\n\n if (!this.skipSymbol('in')) {\n this.fail('parseFor: expected \"in\" keyword for loop',\n forTok.lineno,\n forTok.colno);\n }\n\n node.arr = this.parseExpression();\n this.advanceAfterBlockEnd(forTok.value);\n\n node.body = this.parseUntilBlocks(endBlock, 'else');\n\n if (this.skipSymbol('else')) {\n this.advanceAfterBlockEnd('else');\n node.else_ = this.parseUntilBlocks(endBlock);\n }\n\n this.advanceAfterBlockEnd();\n\n return node;\n }\n\n parseMacro() {\n const macroTok = this.peekToken();\n if (!this.skipSymbol('macro')) {\n this.fail('expected macro');\n }\n\n const name = this.parsePrimary(true);\n const args = this.parseSignature();\n const node = new nodes.Macro(macroTok.lineno, macroTok.colno, name, args);\n\n this.advanceAfterBlockEnd(macroTok.value);\n node.body = this.parseUntilBlocks('endmacro');\n this.advanceAfterBlockEnd();\n\n return node;\n }\n\n parseCall() {\n // a call block is parsed as a normal FunCall, but with an added\n // 'caller' kwarg which is a Caller node.\n var callTok = this.peekToken();\n if (!this.skipSymbol('call')) {\n this.fail('expected call');\n }\n\n const callerArgs = this.parseSignature(true) || new nodes.NodeList();\n const macroCall = this.parsePrimary();\n\n this.advanceAfterBlockEnd(callTok.value);\n const body = this.parseUntilBlocks('endcall');\n this.advanceAfterBlockEnd();\n\n const callerName = new nodes.Symbol(callTok.lineno,\n callTok.colno,\n 'caller');\n const callerNode = new nodes.Caller(callTok.lineno,\n callTok.colno,\n callerName,\n callerArgs,\n body);\n\n // add the additional caller kwarg, adding kwargs if necessary\n const args = macroCall.args.children;\n if (!(args[args.length - 1] instanceof nodes.KeywordArgs)) {\n args.push(new nodes.KeywordArgs());\n }\n const kwargs = args[args.length - 1];\n kwargs.addChild(new nodes.Pair(callTok.lineno,\n callTok.colno,\n callerName,\n callerNode));\n\n return new nodes.Output(callTok.lineno,\n callTok.colno,\n [macroCall]);\n }\n\n parseWithContext() {\n var tok = this.peekToken();\n\n var withContext = null;\n\n if (this.skipSymbol('with')) {\n withContext = true;\n } else if (this.skipSymbol('without')) {\n withContext = false;\n }\n\n if (withContext !== null) {\n if (!this.skipSymbol('context')) {\n this.fail('parseFrom: expected context after with/without',\n tok.lineno,\n tok.colno);\n }\n }\n\n return withContext;\n }\n\n parseImport() {\n var importTok = this.peekToken();\n if (!this.skipSymbol('import')) {\n this.fail('parseImport: expected import',\n importTok.lineno,\n importTok.colno);\n }\n\n const template = this.parseExpression();\n\n if (!this.skipSymbol('as')) {\n this.fail('parseImport: expected \"as\" keyword',\n importTok.lineno,\n importTok.colno);\n }\n\n const target = this.parseExpression();\n const withContext = this.parseWithContext();\n const node = new nodes.Import(importTok.lineno,\n importTok.colno,\n template,\n target,\n withContext);\n\n this.advanceAfterBlockEnd(importTok.value);\n\n return node;\n }\n\n parseFrom() {\n const fromTok = this.peekToken();\n if (!this.skipSymbol('from')) {\n this.fail('parseFrom: expected from');\n }\n\n const template = this.parseExpression();\n\n if (!this.skipSymbol('import')) {\n this.fail('parseFrom: expected import',\n fromTok.lineno,\n fromTok.colno);\n }\n\n const names = new nodes.NodeList();\n let withContext;\n\n while (1) { // eslint-disable-line no-constant-condition\n const nextTok = this.peekToken();\n if (nextTok.type === lexer.TOKEN_BLOCK_END) {\n if (!names.children.length) {\n this.fail('parseFrom: Expected at least one import name',\n fromTok.lineno,\n fromTok.colno);\n }\n\n // Since we are manually advancing past the block end,\n // need to keep track of whitespace control (normally\n // this is done in `advanceAfterBlockEnd`\n if (nextTok.value.charAt(0) === '-') {\n this.dropLeadingWhitespace = true;\n }\n\n this.nextToken();\n break;\n }\n\n if (names.children.length > 0 && !this.skip(lexer.TOKEN_COMMA)) {\n this.fail('parseFrom: expected comma',\n fromTok.lineno,\n fromTok.colno);\n }\n\n const name = this.parsePrimary();\n if (name.value.charAt(0) === '_') {\n this.fail('parseFrom: names starting with an underscore cannot be imported',\n name.lineno,\n name.colno);\n }\n\n if (this.skipSymbol('as')) {\n const alias = this.parsePrimary();\n names.addChild(new nodes.Pair(name.lineno,\n name.colno,\n name,\n alias));\n } else {\n names.addChild(name);\n }\n\n withContext = this.parseWithContext();\n }\n\n return new nodes.FromImport(fromTok.lineno,\n fromTok.colno,\n template,\n names,\n withContext);\n }\n\n parseBlock() {\n const tag = this.peekToken();\n if (!this.skipSymbol('block')) {\n this.fail('parseBlock: expected block', tag.lineno, tag.colno);\n }\n\n const node = new nodes.Block(tag.lineno, tag.colno);\n\n node.name = this.parsePrimary();\n if (!(node.name instanceof nodes.Symbol)) {\n this.fail('parseBlock: variable name expected',\n tag.lineno,\n tag.colno);\n }\n\n this.advanceAfterBlockEnd(tag.value);\n\n node.body = this.parseUntilBlocks('endblock');\n this.skipSymbol('endblock');\n this.skipSymbol(node.name.value);\n\n const tok = this.peekToken();\n if (!tok) {\n this.fail('parseBlock: expected endblock, got end of file');\n }\n\n this.advanceAfterBlockEnd(tok.value);\n\n return node;\n }\n\n parseExtends() {\n const tagName = 'extends';\n const tag = this.peekToken();\n if (!this.skipSymbol(tagName)) {\n this.fail('parseTemplateRef: expected ' + tagName);\n }\n\n const node = new nodes.Extends(tag.lineno, tag.colno);\n node.template = this.parseExpression();\n\n this.advanceAfterBlockEnd(tag.value);\n return node;\n }\n\n parseInclude() {\n const tagName = 'include';\n const tag = this.peekToken();\n if (!this.skipSymbol(tagName)) {\n this.fail('parseInclude: expected ' + tagName);\n }\n\n const node = new nodes.Include(tag.lineno, tag.colno);\n node.template = this.parseExpression();\n\n if (this.skipSymbol('ignore') && this.skipSymbol('missing')) {\n node.ignoreMissing = true;\n }\n\n this.advanceAfterBlockEnd(tag.value);\n return node;\n }\n\n parseIf() {\n const tag = this.peekToken();\n let node;\n\n if (this.skipSymbol('if') || this.skipSymbol('elif') || this.skipSymbol('elseif')) {\n node = new nodes.If(tag.lineno, tag.colno);\n } else if (this.skipSymbol('ifAsync')) {\n node = new nodes.IfAsync(tag.lineno, tag.colno);\n } else {\n this.fail('parseIf: expected if, elif, or elseif',\n tag.lineno,\n tag.colno);\n }\n\n node.cond = this.parseExpression();\n this.advanceAfterBlockEnd(tag.value);\n\n node.body = this.parseUntilBlocks('elif', 'elseif', 'else', 'endif');\n const tok = this.peekToken();\n\n switch (tok && tok.value) {\n case 'elseif':\n case 'elif':\n node.else_ = this.parseIf();\n break;\n case 'else':\n this.advanceAfterBlockEnd();\n node.else_ = this.parseUntilBlocks('endif');\n this.advanceAfterBlockEnd();\n break;\n case 'endif':\n node.else_ = null;\n this.advanceAfterBlockEnd();\n break;\n default:\n this.fail('parseIf: expected elif, else, or endif, got end of file');\n }\n\n return node;\n }\n\n parseSet() {\n const tag = this.peekToken();\n if (!this.skipSymbol('set')) {\n this.fail('parseSet: expected set', tag.lineno, tag.colno);\n }\n\n const node = new nodes.Set(tag.lineno, tag.colno, []);\n\n let target;\n while ((target = this.parsePrimary())) {\n node.targets.push(target);\n\n if (!this.skip(lexer.TOKEN_COMMA)) {\n break;\n }\n }\n\n if (!this.skipValue(lexer.TOKEN_OPERATOR, '=')) {\n if (!this.skip(lexer.TOKEN_BLOCK_END)) {\n this.fail('parseSet: expected = or block end in set tag',\n tag.lineno,\n tag.colno);\n } else {\n node.body = new nodes.Capture(\n tag.lineno,\n tag.colno,\n this.parseUntilBlocks('endset')\n );\n node.value = null;\n this.advanceAfterBlockEnd();\n }\n } else {\n node.value = this.parseExpression();\n this.advanceAfterBlockEnd(tag.value);\n }\n\n return node;\n }\n\n parseSwitch() {\n /*\n * Store the tag names in variables in case someone ever wants to\n * customize this.\n */\n const switchStart = 'switch';\n const switchEnd = 'endswitch';\n const caseStart = 'case';\n const caseDefault = 'default';\n\n // Get the switch tag.\n const tag = this.peekToken();\n\n // fail early if we get some unexpected tag.\n if (\n !this.skipSymbol(switchStart)\n && !this.skipSymbol(caseStart)\n && !this.skipSymbol(caseDefault)\n ) {\n this.fail('parseSwitch: expected \"switch,\" \"case\" or \"default\"', tag.lineno, tag.colno);\n }\n\n // parse the switch expression\n const expr = this.parseExpression();\n\n // advance until a start of a case, a default case or an endswitch.\n this.advanceAfterBlockEnd(switchStart);\n this.parseUntilBlocks(caseStart, caseDefault, switchEnd);\n\n // this is the first case. it could also be an endswitch, we'll check.\n let tok = this.peekToken();\n\n // create new variables for our cases and default case.\n const cases = [];\n let defaultCase;\n\n // while we're dealing with new cases nodes...\n do {\n // skip the start symbol and get the case expression\n this.skipSymbol(caseStart);\n const cond = this.parseExpression();\n this.advanceAfterBlockEnd(switchStart);\n // get the body of the case node and add it to the array of cases.\n const body = this.parseUntilBlocks(caseStart, caseDefault, switchEnd);\n cases.push(new nodes.Case(tok.line, tok.col, cond, body));\n // get our next case\n tok = this.peekToken();\n } while (tok && tok.value === caseStart);\n\n // we either have a default case or a switch end.\n switch (tok.value) {\n case caseDefault:\n this.advanceAfterBlockEnd();\n defaultCase = this.parseUntilBlocks(switchEnd);\n this.advanceAfterBlockEnd();\n break;\n case switchEnd:\n this.advanceAfterBlockEnd();\n break;\n default:\n // otherwise bail because EOF\n this.fail('parseSwitch: expected \"case,\" \"default\" or \"endswitch,\" got EOF.');\n }\n\n // and return the switch node.\n return new nodes.Switch(tag.lineno, tag.colno, expr, cases, defaultCase);\n }\n\n parseStatement() {\n var tok = this.peekToken();\n var node;\n\n if (tok.type !== lexer.TOKEN_SYMBOL) {\n this.fail('tag name expected', tok.lineno, tok.colno);\n }\n\n if (this.breakOnBlocks &&\n lib.indexOf(this.breakOnBlocks, tok.value) !== -1) {\n return null;\n }\n\n switch (tok.value) {\n case 'raw':\n return this.parseRaw();\n case 'verbatim':\n return this.parseRaw('verbatim');\n case 'if':\n case 'ifAsync':\n return this.parseIf();\n case 'for':\n case 'asyncEach':\n case 'asyncAll':\n return this.parseFor();\n case 'block':\n return this.parseBlock();\n case 'extends':\n return this.parseExtends();\n case 'include':\n return this.parseInclude();\n case 'set':\n return this.parseSet();\n case 'macro':\n return this.parseMacro();\n case 'call':\n return this.parseCall();\n case 'import':\n return this.parseImport();\n case 'from':\n return this.parseFrom();\n case 'filter':\n return this.parseFilterStatement();\n case 'switch':\n return this.parseSwitch();\n default:\n if (this.extensions.length) {\n for (let i = 0; i < this.extensions.length; i++) {\n const ext = this.extensions[i];\n if (lib.indexOf(ext.tags || [], tok.value) !== -1) {\n return ext.parse(this, nodes, lexer);\n }\n }\n }\n this.fail('unknown block tag: ' + tok.value, tok.lineno, tok.colno);\n }\n\n return node;\n }\n\n parseRaw(tagName) {\n tagName = tagName || 'raw';\n const endTagName = 'end' + tagName;\n // Look for upcoming raw blocks (ignore all other kinds of blocks)\n const rawBlockRegex = new RegExp('([\\\\s\\\\S]*?){%\\\\s*(' + tagName + '|' + endTagName + ')\\\\s*(?=%})%}');\n let rawLevel = 1;\n let str = '';\n let matches = null;\n\n // Skip opening raw token\n // Keep this token to track line and column numbers\n const begun = this.advanceAfterBlockEnd();\n\n // Exit when there's nothing to match\n // or when we've found the matching \"endraw\" block\n while ((matches = this.tokens._extractRegex(rawBlockRegex)) && rawLevel > 0) {\n const all = matches[0];\n const pre = matches[1];\n const blockName = matches[2];\n\n // Adjust rawlevel\n if (blockName === tagName) {\n rawLevel += 1;\n } else if (blockName === endTagName) {\n rawLevel -= 1;\n }\n\n // Add to str\n if (rawLevel === 0) {\n // We want to exclude the last \"endraw\"\n str += pre;\n // Move tokenizer to beginning of endraw block\n this.tokens.backN(all.length - pre.length);\n } else {\n str += all;\n }\n }\n\n return new nodes.Output(\n begun.lineno,\n begun.colno,\n [new nodes.TemplateData(begun.lineno, begun.colno, str)]\n );\n }\n\n parsePostfix(node) {\n let lookup;\n let tok = this.peekToken();\n\n while (tok) {\n if (tok.type === lexer.TOKEN_LEFT_PAREN) {\n // Function call\n node = new nodes.FunCall(tok.lineno,\n tok.colno,\n node,\n this.parseSignature());\n } else if (tok.type === lexer.TOKEN_LEFT_BRACKET) {\n // Reference\n lookup = this.parseAggregate();\n if (lookup.children.length > 1) {\n this.fail('invalid index');\n }\n\n node = new nodes.LookupVal(tok.lineno,\n tok.colno,\n node,\n lookup.children[0]);\n } else if (tok.type === lexer.TOKEN_OPERATOR && tok.value === '.') {\n // Reference\n this.nextToken();\n const val = this.nextToken();\n\n if (val.type !== lexer.TOKEN_SYMBOL) {\n this.fail('expected name as lookup value, got ' + val.value,\n val.lineno,\n val.colno);\n }\n\n // Make a literal string because it's not a variable\n // reference\n lookup = new nodes.Literal(val.lineno,\n val.colno,\n val.value);\n\n node = new nodes.LookupVal(tok.lineno,\n tok.colno,\n node,\n lookup);\n } else {\n break;\n }\n\n tok = this.peekToken();\n }\n\n return node;\n }\n\n parseExpression() {\n var node = this.parseInlineIf();\n return node;\n }\n\n parseInlineIf() {\n let node = this.parseOr();\n if (this.skipSymbol('if')) {\n const condNode = this.parseOr();\n const bodyNode = node;\n node = new nodes.InlineIf(node.lineno, node.colno);\n node.body = bodyNode;\n node.cond = condNode;\n if (this.skipSymbol('else')) {\n node.else_ = this.parseOr();\n } else {\n node.else_ = null;\n }\n }\n\n return node;\n }\n\n parseOr() {\n let node = this.parseAnd();\n while (this.skipSymbol('or')) {\n const node2 = this.parseAnd();\n node = new nodes.Or(node.lineno,\n node.colno,\n node,\n node2);\n }\n return node;\n }\n\n parseAnd() {\n let node = this.parseNot();\n while (this.skipSymbol('and')) {\n const node2 = this.parseNot();\n node = new nodes.And(node.lineno,\n node.colno,\n node,\n node2);\n }\n return node;\n }\n\n parseNot() {\n const tok = this.peekToken();\n if (this.skipSymbol('not')) {\n return new nodes.Not(tok.lineno,\n tok.colno,\n this.parseNot());\n }\n return this.parseIn();\n }\n\n parseIn() {\n let node = this.parseIs();\n while (1) { // eslint-disable-line no-constant-condition\n // check if the next token is 'not'\n const tok = this.nextToken();\n if (!tok) {\n break;\n }\n const invert = tok.type === lexer.TOKEN_SYMBOL && tok.value === 'not';\n // if it wasn't 'not', put it back\n if (!invert) {\n this.pushToken(tok);\n }\n if (this.skipSymbol('in')) {\n const node2 = this.parseIs();\n node = new nodes.In(node.lineno,\n node.colno,\n node,\n node2);\n if (invert) {\n node = new nodes.Not(node.lineno,\n node.colno,\n node);\n }\n } else {\n // if we'd found a 'not' but this wasn't an 'in', put back the 'not'\n if (invert) {\n this.pushToken(tok);\n }\n break;\n }\n }\n return node;\n }\n\n // I put this right after \"in\" in the operator precedence stack. That can\n // obviously be changed to be closer to Jinja.\n parseIs() {\n let node = this.parseCompare();\n // look for an is\n if (this.skipSymbol('is')) {\n // look for a not\n const not = this.skipSymbol('not');\n // get the next node\n const node2 = this.parseCompare();\n // create an Is node using the next node and the info from our Is node.\n node = new nodes.Is(node.lineno, node.colno, node, node2);\n // if we have a Not, create a Not node from our Is node.\n if (not) {\n node = new nodes.Not(node.lineno, node.colno, node);\n }\n }\n // return the node.\n return node;\n }\n\n parseCompare() {\n const compareOps = ['==', '===', '!=', '!==', '<', '>', '<=', '>='];\n const expr = this.parseConcat();\n const ops = [];\n\n while (1) { // eslint-disable-line no-constant-condition\n const tok = this.nextToken();\n\n if (!tok) {\n break;\n } else if (compareOps.indexOf(tok.value) !== -1) {\n ops.push(new nodes.CompareOperand(tok.lineno,\n tok.colno,\n this.parseConcat(),\n tok.value));\n } else {\n this.pushToken(tok);\n break;\n }\n }\n\n if (ops.length) {\n return new nodes.Compare(ops[0].lineno,\n ops[0].colno,\n expr,\n ops);\n } else {\n return expr;\n }\n }\n\n // finds the '~' for string concatenation\n parseConcat() {\n let node = this.parseAdd();\n while (this.skipValue(lexer.TOKEN_TILDE, '~')) {\n const node2 = this.parseAdd();\n node = new nodes.Concat(node.lineno,\n node.colno,\n node,\n node2);\n }\n return node;\n }\n\n parseAdd() {\n let node = this.parseSub();\n while (this.skipValue(lexer.TOKEN_OPERATOR, '+')) {\n const node2 = this.parseSub();\n node = new nodes.Add(node.lineno,\n node.colno,\n node,\n node2);\n }\n return node;\n }\n\n parseSub() {\n let node = this.parseMul();\n while (this.skipValue(lexer.TOKEN_OPERATOR, '-')) {\n const node2 = this.parseMul();\n node = new nodes.Sub(node.lineno,\n node.colno,\n node,\n node2);\n }\n return node;\n }\n\n parseMul() {\n let node = this.parseDiv();\n while (this.skipValue(lexer.TOKEN_OPERATOR, '*')) {\n const node2 = this.parseDiv();\n node = new nodes.Mul(node.lineno,\n node.colno,\n node,\n node2);\n }\n return node;\n }\n\n parseDiv() {\n let node = this.parseFloorDiv();\n while (this.skipValue(lexer.TOKEN_OPERATOR, '/')) {\n const node2 = this.parseFloorDiv();\n node = new nodes.Div(node.lineno,\n node.colno,\n node,\n node2);\n }\n return node;\n }\n\n parseFloorDiv() {\n let node = this.parseMod();\n while (this.skipValue(lexer.TOKEN_OPERATOR, '//')) {\n const node2 = this.parseMod();\n node = new nodes.FloorDiv(node.lineno,\n node.colno,\n node,\n node2);\n }\n return node;\n }\n\n parseMod() {\n let node = this.parsePow();\n while (this.skipValue(lexer.TOKEN_OPERATOR, '%')) {\n const node2 = this.parsePow();\n node = new nodes.Mod(node.lineno,\n node.colno,\n node,\n node2);\n }\n return node;\n }\n\n parsePow() {\n let node = this.parseUnary();\n while (this.skipValue(lexer.TOKEN_OPERATOR, '**')) {\n const node2 = this.parseUnary();\n node = new nodes.Pow(node.lineno,\n node.colno,\n node,\n node2);\n }\n return node;\n }\n\n parseUnary(noFilters) {\n const tok = this.peekToken();\n let node;\n\n if (this.skipValue(lexer.TOKEN_OPERATOR, '-')) {\n node = new nodes.Neg(tok.lineno,\n tok.colno,\n this.parseUnary(true));\n } else if (this.skipValue(lexer.TOKEN_OPERATOR, '+')) {\n node = new nodes.Pos(tok.lineno,\n tok.colno,\n this.parseUnary(true));\n } else {\n node = this.parsePrimary();\n }\n\n if (!noFilters) {\n node = this.parseFilter(node);\n }\n\n return node;\n }\n\n parsePrimary(noPostfix) {\n const tok = this.nextToken();\n let val;\n let node = null;\n\n if (!tok) {\n this.fail('expected expression, got end of file');\n } else if (tok.type === lexer.TOKEN_STRING) {\n val = tok.value;\n } else if (tok.type === lexer.TOKEN_INT) {\n val = parseInt(tok.value, 10);\n } else if (tok.type === lexer.TOKEN_FLOAT) {\n val = parseFloat(tok.value);\n } else if (tok.type === lexer.TOKEN_BOOLEAN) {\n if (tok.value === 'true') {\n val = true;\n } else if (tok.value === 'false') {\n val = false;\n } else {\n this.fail('invalid boolean: ' + tok.value,\n tok.lineno,\n tok.colno);\n }\n } else if (tok.type === lexer.TOKEN_NONE) {\n val = null;\n } else if (tok.type === lexer.TOKEN_REGEX) {\n val = new RegExp(tok.value.body, tok.value.flags);\n }\n\n if (val !== undefined) {\n node = new nodes.Literal(tok.lineno, tok.colno, val);\n } else if (tok.type === lexer.TOKEN_SYMBOL) {\n node = new nodes.Symbol(tok.lineno, tok.colno, tok.value);\n } else {\n // See if it's an aggregate type, we need to push the\n // current delimiter token back on\n this.pushToken(tok);\n node = this.parseAggregate();\n }\n\n if (!noPostfix) {\n node = this.parsePostfix(node);\n }\n\n if (node) {\n return node;\n } else {\n throw this.error(`unexpected token: ${tok.value}`, tok.lineno, tok.colno);\n }\n }\n\n parseFilterName() {\n const tok = this.expect(lexer.TOKEN_SYMBOL);\n let name = tok.value;\n\n while (this.skipValue(lexer.TOKEN_OPERATOR, '.')) {\n name += '.' + this.expect(lexer.TOKEN_SYMBOL).value;\n }\n\n return new nodes.Symbol(tok.lineno, tok.colno, name);\n }\n\n parseFilterArgs(node) {\n if (this.peekToken().type === lexer.TOKEN_LEFT_PAREN) {\n // Get a FunCall node and add the parameters to the\n // filter\n const call = this.parsePostfix(node);\n return call.args.children;\n }\n return [];\n }\n\n parseFilter(node) {\n while (this.skip(lexer.TOKEN_PIPE)) {\n const name = this.parseFilterName();\n\n node = new nodes.Filter(\n name.lineno,\n name.colno,\n name,\n new nodes.NodeList(\n name.lineno,\n name.colno,\n [node].concat(this.parseFilterArgs(node))\n )\n );\n }\n\n return node;\n }\n\n parseFilterStatement() {\n var filterTok = this.peekToken();\n if (!this.skipSymbol('filter')) {\n this.fail('parseFilterStatement: expected filter');\n }\n\n const name = this.parseFilterName();\n const args = this.parseFilterArgs(name);\n\n this.advanceAfterBlockEnd(filterTok.value);\n const body = new nodes.Capture(\n name.lineno,\n name.colno,\n this.parseUntilBlocks('endfilter')\n );\n this.advanceAfterBlockEnd();\n\n const node = new nodes.Filter(\n name.lineno,\n name.colno,\n name,\n new nodes.NodeList(\n name.lineno,\n name.colno,\n [body].concat(args)\n )\n );\n\n return new nodes.Output(\n name.lineno,\n name.colno,\n [node]\n );\n }\n\n parseAggregate() {\n var tok = this.nextToken();\n var node;\n\n switch (tok.type) {\n case lexer.TOKEN_LEFT_PAREN:\n node = new nodes.Group(tok.lineno, tok.colno);\n break;\n case lexer.TOKEN_LEFT_BRACKET:\n node = new nodes.Array(tok.lineno, tok.colno);\n break;\n case lexer.TOKEN_LEFT_CURLY:\n node = new nodes.Dict(tok.lineno, tok.colno);\n break;\n default:\n return null;\n }\n\n while (1) { // eslint-disable-line no-constant-condition\n const type = this.peekToken().type;\n if (type === lexer.TOKEN_RIGHT_PAREN ||\n type === lexer.TOKEN_RIGHT_BRACKET ||\n type === lexer.TOKEN_RIGHT_CURLY) {\n this.nextToken();\n break;\n }\n\n if (node.children.length > 0) {\n if (!this.skip(lexer.TOKEN_COMMA)) {\n this.fail('parseAggregate: expected comma after expression',\n tok.lineno,\n tok.colno);\n }\n }\n\n if (node instanceof nodes.Dict) {\n // TODO: check for errors\n const key = this.parsePrimary();\n\n // We expect a key/value pair for dicts, separated by a\n // colon\n if (!this.skip(lexer.TOKEN_COLON)) {\n this.fail('parseAggregate: expected colon after dict key',\n tok.lineno,\n tok.colno);\n }\n\n // TODO: check for errors\n const value = this.parseExpression();\n node.addChild(new nodes.Pair(key.lineno,\n key.colno,\n key,\n value));\n } else {\n // TODO: check for errors\n const expr = this.parseExpression();\n node.addChild(expr);\n }\n }\n\n return node;\n }\n\n parseSignature(tolerant, noParens) {\n let tok = this.peekToken();\n if (!noParens && tok.type !== lexer.TOKEN_LEFT_PAREN) {\n if (tolerant) {\n return null;\n } else {\n this.fail('expected arguments', tok.lineno, tok.colno);\n }\n }\n\n if (tok.type === lexer.TOKEN_LEFT_PAREN) {\n tok = this.nextToken();\n }\n\n const args = new nodes.NodeList(tok.lineno, tok.colno);\n const kwargs = new nodes.KeywordArgs(tok.lineno, tok.colno);\n let checkComma = false;\n\n while (1) { // eslint-disable-line no-constant-condition\n tok = this.peekToken();\n if (!noParens && tok.type === lexer.TOKEN_RIGHT_PAREN) {\n this.nextToken();\n break;\n } else if (noParens && tok.type === lexer.TOKEN_BLOCK_END) {\n break;\n }\n\n if (checkComma && !this.skip(lexer.TOKEN_COMMA)) {\n this.fail('parseSignature: expected comma after expression',\n tok.lineno,\n tok.colno);\n } else {\n const arg = this.parseExpression();\n\n if (this.skipValue(lexer.TOKEN_OPERATOR, '=')) {\n kwargs.addChild(\n new nodes.Pair(arg.lineno,\n arg.colno,\n arg,\n this.parseExpression())\n );\n } else {\n args.addChild(arg);\n }\n }\n\n checkComma = true;\n }\n\n if (kwargs.children.length) {\n args.addChild(kwargs);\n }\n\n return args;\n }\n\n parseUntilBlocks(...blockNames) {\n const prev = this.breakOnBlocks;\n this.breakOnBlocks = blockNames;\n\n const ret = this.parse();\n\n this.breakOnBlocks = prev;\n return ret;\n }\n\n parseNodes() {\n let tok;\n const buf = [];\n\n while ((tok = this.nextToken())) {\n if (tok.type === lexer.TOKEN_DATA) {\n let data = tok.value;\n const nextToken = this.peekToken();\n const nextVal = nextToken && nextToken.value;\n\n // If the last token has \"-\" we need to trim the\n // leading whitespace of the data. This is marked with\n // the `dropLeadingWhitespace` variable.\n if (this.dropLeadingWhitespace) {\n // TODO: this could be optimized (don't use regex)\n data = data.replace(/^\\s*/, '');\n this.dropLeadingWhitespace = false;\n }\n\n // Same for the succeeding block start token\n if (nextToken &&\n ((nextToken.type === lexer.TOKEN_BLOCK_START &&\n nextVal.charAt(nextVal.length - 1) === '-') ||\n (nextToken.type === lexer.TOKEN_VARIABLE_START &&\n nextVal.charAt(this.tokens.tags.VARIABLE_START.length)\n === '-') ||\n (nextToken.type === lexer.TOKEN_COMMENT &&\n nextVal.charAt(this.tokens.tags.COMMENT_START.length)\n === '-'))) {\n // TODO: this could be optimized (don't use regex)\n data = data.replace(/\\s*$/, '');\n }\n\n buf.push(new nodes.Output(tok.lineno,\n tok.colno,\n [new nodes.TemplateData(tok.lineno,\n tok.colno,\n data)]));\n } else if (tok.type === lexer.TOKEN_BLOCK_START) {\n this.dropLeadingWhitespace = false;\n const n = this.parseStatement();\n if (!n) {\n break;\n }\n buf.push(n);\n } else if (tok.type === lexer.TOKEN_VARIABLE_START) {\n const e = this.parseExpression();\n this.dropLeadingWhitespace = false;\n this.advanceAfterVariableEnd();\n buf.push(new nodes.Output(tok.lineno, tok.colno, [e]));\n } else if (tok.type === lexer.TOKEN_COMMENT) {\n this.dropLeadingWhitespace = tok.value.charAt(\n tok.value.length - this.tokens.tags.COMMENT_END.length - 1\n ) === '-';\n } else {\n // Ignore comments, otherwise this should be an error\n this.fail('Unexpected token at top-level: ' +\n tok.type, tok.lineno, tok.colno);\n }\n }\n\n return buf;\n }\n\n parse() {\n return new nodes.NodeList(0, 0, this.parseNodes());\n }\n\n parseAsRoot() {\n return new nodes.Root(0, 0, this.parseNodes());\n }\n}\n\n// var util = require('util');\n\n// var l = lexer.lex('{%- if x -%}\\n hello {% endif %}');\n// var t;\n// while((t = l.nextToken())) {\n// console.log(util.inspect(t));\n// }\n\n// var p = new Parser(lexer.lex('hello {% filter title %}' +\n// 'Hello madam how are you' +\n// '{% endfilter %}'));\n// var n = p.parseAsRoot();\n// nodes.printNodes(n);\n\nmodule.exports = {\n parse(src, extensions, opts) {\n var p = new Parser(lexer.lex(src, opts));\n if (extensions !== undefined) {\n p.extensions = extensions;\n }\n return p.parseAsRoot();\n },\n Parser: Parser\n};\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/parser.js","'use strict';\n\nconst lib = require('./lib');\n\nlet whitespaceChars = ' \\n\\t\\r\\u00A0';\nlet delimChars = '()[]{}%*-+~/#,:|.<>=!';\nlet intChars = '0123456789';\n\nlet BLOCK_START = '{%';\nlet BLOCK_END = '%}';\nlet VARIABLE_START = '{{';\nlet VARIABLE_END = '}}';\nlet COMMENT_START = '{#';\nlet COMMENT_END = '#}';\n\nlet TOKEN_STRING = 'string';\nlet TOKEN_WHITESPACE = 'whitespace';\nlet TOKEN_DATA = 'data';\nlet TOKEN_BLOCK_START = 'block-start';\nlet TOKEN_BLOCK_END = 'block-end';\nlet TOKEN_VARIABLE_START = 'variable-start';\nlet TOKEN_VARIABLE_END = 'variable-end';\nlet TOKEN_COMMENT = 'comment';\nlet TOKEN_LEFT_PAREN = 'left-paren';\nlet TOKEN_RIGHT_PAREN = 'right-paren';\nlet TOKEN_LEFT_BRACKET = 'left-bracket';\nlet TOKEN_RIGHT_BRACKET = 'right-bracket';\nlet TOKEN_LEFT_CURLY = 'left-curly';\nlet TOKEN_RIGHT_CURLY = 'right-curly';\nlet TOKEN_OPERATOR = 'operator';\nlet TOKEN_COMMA = 'comma';\nlet TOKEN_COLON = 'colon';\nlet TOKEN_TILDE = 'tilde';\nlet TOKEN_PIPE = 'pipe';\nlet TOKEN_INT = 'int';\nlet TOKEN_FLOAT = 'float';\nlet TOKEN_BOOLEAN = 'boolean';\nlet TOKEN_NONE = 'none';\nlet TOKEN_SYMBOL = 'symbol';\nlet TOKEN_SPECIAL = 'special';\nlet TOKEN_REGEX = 'regex';\n\nfunction token(type, value, lineno, colno) {\n return {\n type: type,\n value: value,\n lineno: lineno,\n colno: colno\n };\n}\n\nclass Tokenizer {\n constructor(str, opts) {\n this.str = str;\n this.index = 0;\n this.len = str.length;\n this.lineno = 0;\n this.colno = 0;\n\n this.in_code = false;\n\n opts = opts || {};\n\n let tags = opts.tags || {};\n this.tags = {\n BLOCK_START: tags.blockStart || BLOCK_START,\n BLOCK_END: tags.blockEnd || BLOCK_END,\n VARIABLE_START: tags.variableStart || VARIABLE_START,\n VARIABLE_END: tags.variableEnd || VARIABLE_END,\n COMMENT_START: tags.commentStart || COMMENT_START,\n COMMENT_END: tags.commentEnd || COMMENT_END\n };\n\n this.trimBlocks = !!opts.trimBlocks;\n this.lstripBlocks = !!opts.lstripBlocks;\n }\n\n nextToken() {\n let lineno = this.lineno;\n let colno = this.colno;\n let tok;\n\n if (this.in_code) {\n // Otherwise, if we are in a block parse it as code\n let cur = this.current();\n\n if (this.isFinished()) {\n // We have nothing else to parse\n return null;\n } else if (cur === '\"' || cur === '\\'') {\n // We've hit a string\n return token(TOKEN_STRING, this._parseString(cur), lineno, colno);\n } else if ((tok = this._extract(whitespaceChars))) {\n // We hit some whitespace\n return token(TOKEN_WHITESPACE, tok, lineno, colno);\n } else if ((tok = this._extractString(this.tags.BLOCK_END)) ||\n (tok = this._extractString('-' + this.tags.BLOCK_END))) {\n // Special check for the block end tag\n //\n // It is a requirement that start and end tags are composed of\n // delimiter characters (%{}[] etc), and our code always\n // breaks on delimiters so we can assume the token parsing\n // doesn't consume these elsewhere\n this.in_code = false;\n if (this.trimBlocks) {\n cur = this.current();\n if (cur === '\\n') {\n // Skip newline\n this.forward();\n } else if (cur === '\\r') {\n // Skip CRLF newline\n this.forward();\n cur = this.current();\n if (cur === '\\n') {\n this.forward();\n } else {\n // Was not a CRLF, so go back\n this.back();\n }\n }\n }\n return token(TOKEN_BLOCK_END, tok, lineno, colno);\n } else if ((tok = this._extractString(this.tags.VARIABLE_END)) ||\n (tok = this._extractString('-' + this.tags.VARIABLE_END))) {\n // Special check for variable end tag (see above)\n this.in_code = false;\n return token(TOKEN_VARIABLE_END, tok, lineno, colno);\n } else if (cur === 'r' && this.str.charAt(this.index + 1) === '/') {\n // Skip past 'r/'.\n this.forwardN(2);\n\n // Extract until the end of the regex -- / ends it, \\/ does not.\n let regexBody = '';\n while (!this.isFinished()) {\n if (this.current() === '/' && this.previous() !== '\\\\') {\n this.forward();\n break;\n } else {\n regexBody += this.current();\n this.forward();\n }\n }\n\n // Check for flags.\n // The possible flags are according to https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/RegExp)\n let POSSIBLE_FLAGS = ['g', 'i', 'm', 'y'];\n let regexFlags = '';\n while (!this.isFinished()) {\n let isCurrentAFlag = POSSIBLE_FLAGS.indexOf(this.current()) !== -1;\n if (isCurrentAFlag) {\n regexFlags += this.current();\n this.forward();\n } else {\n break;\n }\n }\n\n return token(TOKEN_REGEX, {\n body: regexBody,\n flags: regexFlags\n }, lineno, colno);\n } else if (delimChars.indexOf(cur) !== -1) {\n // We've hit a delimiter (a special char like a bracket)\n this.forward();\n let complexOps = ['==', '===', '!=', '!==', '<=', '>=', '//', '**'];\n let curComplex = cur + this.current();\n let type;\n\n if (lib.indexOf(complexOps, curComplex) !== -1) {\n this.forward();\n cur = curComplex;\n\n // See if this is a strict equality/inequality comparator\n if (lib.indexOf(complexOps, curComplex + this.current()) !== -1) {\n cur = curComplex + this.current();\n this.forward();\n }\n }\n\n switch (cur) {\n case '(':\n type = TOKEN_LEFT_PAREN;\n break;\n case ')':\n type = TOKEN_RIGHT_PAREN;\n break;\n case '[':\n type = TOKEN_LEFT_BRACKET;\n break;\n case ']':\n type = TOKEN_RIGHT_BRACKET;\n break;\n case '{':\n type = TOKEN_LEFT_CURLY;\n break;\n case '}':\n type = TOKEN_RIGHT_CURLY;\n break;\n case ',':\n type = TOKEN_COMMA;\n break;\n case ':':\n type = TOKEN_COLON;\n break;\n case '~':\n type = TOKEN_TILDE;\n break;\n case '|':\n type = TOKEN_PIPE;\n break;\n default:\n type = TOKEN_OPERATOR;\n }\n\n return token(type, cur, lineno, colno);\n } else {\n // We are not at whitespace or a delimiter, so extract the\n // text and parse it\n tok = this._extractUntil(whitespaceChars + delimChars);\n\n if (tok.match(/^[-+]?[0-9]+$/)) {\n if (this.current() === '.') {\n this.forward();\n let dec = this._extract(intChars);\n return token(TOKEN_FLOAT, tok + '.' + dec, lineno, colno);\n } else {\n return token(TOKEN_INT, tok, lineno, colno);\n }\n } else if (tok.match(/^(true|false)$/)) {\n return token(TOKEN_BOOLEAN, tok, lineno, colno);\n } else if (tok === 'none') {\n return token(TOKEN_NONE, tok, lineno, colno);\n /*\n * Added to make the test `null is null` evaluate truthily.\n * Otherwise, Nunjucks will look up null in the context and\n * return `undefined`, which is not what we want. This *may* have\n * consequences is someone is using null in their templates as a\n * variable.\n */\n } else if (tok === 'null') {\n return token(TOKEN_NONE, tok, lineno, colno);\n } else if (tok) {\n return token(TOKEN_SYMBOL, tok, lineno, colno);\n } else {\n throw new Error('Unexpected value while parsing: ' + tok);\n }\n }\n } else {\n // Parse out the template text, breaking on tag\n // delimiters because we need to look for block/variable start\n // tags (don't use the full delimChars for optimization)\n let beginChars = (this.tags.BLOCK_START.charAt(0) +\n this.tags.VARIABLE_START.charAt(0) +\n this.tags.COMMENT_START.charAt(0) +\n this.tags.COMMENT_END.charAt(0));\n\n if (this.isFinished()) {\n return null;\n } else if ((tok = this._extractString(this.tags.BLOCK_START + '-')) ||\n (tok = this._extractString(this.tags.BLOCK_START))) {\n this.in_code = true;\n return token(TOKEN_BLOCK_START, tok, lineno, colno);\n } else if ((tok = this._extractString(this.tags.VARIABLE_START + '-')) ||\n (tok = this._extractString(this.tags.VARIABLE_START))) {\n this.in_code = true;\n return token(TOKEN_VARIABLE_START, tok, lineno, colno);\n } else {\n tok = '';\n let data;\n let inComment = false;\n\n if (this._matches(this.tags.COMMENT_START)) {\n inComment = true;\n tok = this._extractString(this.tags.COMMENT_START);\n }\n\n // Continually consume text, breaking on the tag delimiter\n // characters and checking to see if it's a start tag.\n //\n // We could hit the end of the template in the middle of\n // our looping, so check for the null return value from\n // _extractUntil\n while ((data = this._extractUntil(beginChars)) !== null) {\n tok += data;\n\n if ((this._matches(this.tags.BLOCK_START) ||\n this._matches(this.tags.VARIABLE_START) ||\n this._matches(this.tags.COMMENT_START)) &&\n !inComment) {\n if (this.lstripBlocks &&\n this._matches(this.tags.BLOCK_START) &&\n this.colno > 0 &&\n this.colno <= tok.length) {\n let lastLine = tok.slice(-this.colno);\n if (/^\\s+$/.test(lastLine)) {\n // Remove block leading whitespace from beginning of the string\n tok = tok.slice(0, -this.colno);\n if (!tok.length) {\n // All data removed, collapse to avoid unnecessary nodes\n // by returning next token (block start)\n return this.nextToken();\n }\n }\n }\n // If it is a start tag, stop looping\n break;\n } else if (this._matches(this.tags.COMMENT_END)) {\n if (!inComment) {\n throw new Error('unexpected end of comment');\n }\n tok += this._extractString(this.tags.COMMENT_END);\n break;\n } else {\n // It does not match any tag, so add the character and\n // carry on\n tok += this.current();\n this.forward();\n }\n }\n\n if (data === null && inComment) {\n throw new Error('expected end of comment, got end of file');\n }\n\n return token(inComment ? TOKEN_COMMENT : TOKEN_DATA,\n tok,\n lineno,\n colno);\n }\n }\n }\n\n _parseString(delimiter) {\n this.forward();\n\n let str = '';\n\n while (!this.isFinished() && this.current() !== delimiter) {\n let cur = this.current();\n\n if (cur === '\\\\') {\n this.forward();\n switch (this.current()) {\n case 'n':\n str += '\\n';\n break;\n case 't':\n str += '\\t';\n break;\n case 'r':\n str += '\\r';\n break;\n default:\n str += this.current();\n }\n this.forward();\n } else {\n str += cur;\n this.forward();\n }\n }\n\n this.forward();\n return str;\n }\n\n _matches(str) {\n if (this.index + str.length > this.len) {\n return null;\n }\n\n let m = this.str.slice(this.index, this.index + str.length);\n return m === str;\n }\n\n _extractString(str) {\n if (this._matches(str)) {\n this.forwardN(str.length);\n return str;\n }\n return null;\n }\n\n _extractUntil(charString) {\n // Extract all non-matching chars, with the default matching set\n // to everything\n return this._extractMatching(true, charString || '');\n }\n\n _extract(charString) {\n // Extract all matching chars (no default, so charString must be\n // explicit)\n return this._extractMatching(false, charString);\n }\n\n _extractMatching(breakOnMatch, charString) {\n // Pull out characters until a breaking char is hit.\n // If breakOnMatch is false, a non-matching char stops it.\n // If breakOnMatch is true, a matching char stops it.\n\n if (this.isFinished()) {\n return null;\n }\n\n let first = charString.indexOf(this.current());\n\n // Only proceed if the first character doesn't meet our condition\n if ((breakOnMatch && first === -1) ||\n (!breakOnMatch && first !== -1)) {\n let t = this.current();\n this.forward();\n\n // And pull out all the chars one at a time until we hit a\n // breaking char\n let idx = charString.indexOf(this.current());\n\n while (((breakOnMatch && idx === -1) ||\n (!breakOnMatch && idx !== -1)) && !this.isFinished()) {\n t += this.current();\n this.forward();\n\n idx = charString.indexOf(this.current());\n }\n\n return t;\n }\n\n return '';\n }\n\n _extractRegex(regex) {\n let matches = this.currentStr().match(regex);\n if (!matches) {\n return null;\n }\n\n // Move forward whatever was matched\n this.forwardN(matches[0].length);\n\n return matches;\n }\n\n isFinished() {\n return this.index >= this.len;\n }\n\n forwardN(n) {\n for (let i = 0; i < n; i++) {\n this.forward();\n }\n }\n\n forward() {\n this.index++;\n\n if (this.previous() === '\\n') {\n this.lineno++;\n this.colno = 0;\n } else {\n this.colno++;\n }\n }\n\n backN(n) {\n for (let i = 0; i < n; i++) {\n this.back();\n }\n }\n\n back() {\n this.index--;\n\n if (this.current() === '\\n') {\n this.lineno--;\n\n let idx = this.src.lastIndexOf('\\n', this.index - 1);\n if (idx === -1) {\n this.colno = this.index;\n } else {\n this.colno = this.index - idx;\n }\n } else {\n this.colno--;\n }\n }\n\n // current returns current character\n current() {\n if (!this.isFinished()) {\n return this.str.charAt(this.index);\n }\n return '';\n }\n\n // currentStr returns what's left of the unparsed string\n currentStr() {\n if (!this.isFinished()) {\n return this.str.substr(this.index);\n }\n return '';\n }\n\n previous() {\n return this.str.charAt(this.index - 1);\n }\n}\n\nmodule.exports = {\n lex(src, opts) {\n return new Tokenizer(src, opts);\n },\n\n TOKEN_STRING: TOKEN_STRING,\n TOKEN_WHITESPACE: TOKEN_WHITESPACE,\n TOKEN_DATA: TOKEN_DATA,\n TOKEN_BLOCK_START: TOKEN_BLOCK_START,\n TOKEN_BLOCK_END: TOKEN_BLOCK_END,\n TOKEN_VARIABLE_START: TOKEN_VARIABLE_START,\n TOKEN_VARIABLE_END: TOKEN_VARIABLE_END,\n TOKEN_COMMENT: TOKEN_COMMENT,\n TOKEN_LEFT_PAREN: TOKEN_LEFT_PAREN,\n TOKEN_RIGHT_PAREN: TOKEN_RIGHT_PAREN,\n TOKEN_LEFT_BRACKET: TOKEN_LEFT_BRACKET,\n TOKEN_RIGHT_BRACKET: TOKEN_RIGHT_BRACKET,\n TOKEN_LEFT_CURLY: TOKEN_LEFT_CURLY,\n TOKEN_RIGHT_CURLY: TOKEN_RIGHT_CURLY,\n TOKEN_OPERATOR: TOKEN_OPERATOR,\n TOKEN_COMMA: TOKEN_COMMA,\n TOKEN_COLON: TOKEN_COLON,\n TOKEN_TILDE: TOKEN_TILDE,\n TOKEN_PIPE: TOKEN_PIPE,\n TOKEN_INT: TOKEN_INT,\n TOKEN_FLOAT: TOKEN_FLOAT,\n TOKEN_BOOLEAN: TOKEN_BOOLEAN,\n TOKEN_NONE: TOKEN_NONE,\n TOKEN_SYMBOL: TOKEN_SYMBOL,\n TOKEN_SPECIAL: TOKEN_SPECIAL,\n TOKEN_REGEX: TOKEN_REGEX\n};\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/lexer.js","'use strict';\n\nconst Loader = require('./loader');\nconst {PrecompiledLoader} = require('./precompiled-loader.js');\n\nclass WebLoader extends Loader {\n constructor(baseURL, opts) {\n super();\n this.baseURL = baseURL || '.';\n opts = opts || {};\n\n // By default, the cache is turned off because there's no way\n // to \"watch\" templates over HTTP, so they are re-downloaded\n // and compiled each time. (Remember, PRECOMPILE YOUR\n // TEMPLATES in production!)\n this.useCache = !!opts.useCache;\n\n // We default `async` to false so that the simple synchronous\n // API can be used when you aren't doing anything async in\n // your templates (which is most of the time). This performs a\n // sync ajax request, but that's ok because it should *only*\n // happen in development. PRECOMPILE YOUR TEMPLATES.\n this.async = !!opts.async;\n }\n\n resolve(from, to) {\n throw new Error('relative templates not support in the browser yet');\n }\n\n getSource(name, cb) {\n var useCache = this.useCache;\n var result;\n this.fetch(this.baseURL + '/' + name, (err, src) => {\n if (err) {\n if (cb) {\n cb(err.content);\n } else if (err.status === 404) {\n result = null;\n } else {\n throw err.content;\n }\n } else {\n result = {\n src: src,\n path: name,\n noCache: !useCache\n };\n this.emit('load', name, result);\n if (cb) {\n cb(null, result);\n }\n }\n });\n\n // if this WebLoader isn't running asynchronously, the\n // fetch above would actually run sync and we'll have a\n // result here\n return result;\n }\n\n fetch(url, cb) {\n // Only in the browser please\n if (typeof window === 'undefined') {\n throw new Error('WebLoader can only by used in a browser');\n }\n\n const ajax = new XMLHttpRequest();\n let loading = true;\n\n ajax.onreadystatechange = () => {\n if (ajax.readyState === 4 && loading) {\n loading = false;\n if (ajax.status === 0 || ajax.status === 200) {\n cb(null, ajax.responseText);\n } else {\n cb({\n status: ajax.status,\n content: ajax.responseText\n });\n }\n }\n };\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + 's=' +\n (new Date().getTime());\n\n ajax.open('GET', url, this.async);\n ajax.send();\n }\n}\n\nmodule.exports = {\n WebLoader: WebLoader,\n PrecompiledLoader: PrecompiledLoader\n};\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/web-loaders.js","'use strict';\n\nconst lib = require('./src/lib');\nconst {Environment, Template} = require('./src/environment');\nconst Loader = require('./src/loader');\nconst loaders = require('./src/loaders');\nconst precompile = require('./src/precompile');\nconst compiler = require('./src/compiler');\nconst parser = require('./src/parser');\nconst lexer = require('./src/lexer');\nconst runtime = require('./src/runtime');\nconst nodes = require('./src/nodes');\nconst installJinjaCompat = require('./src/jinja-compat');\n\n// A single instance of an environment, since this is so commonly used\nlet e;\n\nfunction configure(templatesPath, opts) {\n opts = opts || {};\n if (lib.isObject(templatesPath)) {\n opts = templatesPath;\n templatesPath = null;\n }\n\n let TemplateLoader;\n if (loaders.FileSystemLoader) {\n TemplateLoader = new loaders.FileSystemLoader(templatesPath, {\n watch: opts.watch,\n noCache: opts.noCache\n });\n } else if (loaders.WebLoader) {\n TemplateLoader = new loaders.WebLoader(templatesPath, {\n useCache: opts.web && opts.web.useCache,\n async: opts.web && opts.web.async\n });\n }\n\n e = new Environment(TemplateLoader, opts);\n\n if (opts && opts.express) {\n e.express(opts.express);\n }\n\n return e;\n}\n\nmodule.exports = {\n Environment: Environment,\n Template: Template,\n Loader: Loader,\n FileSystemLoader: loaders.FileSystemLoader,\n NodeResolveLoader: loaders.NodeResolveLoader,\n PrecompiledLoader: loaders.PrecompiledLoader,\n WebLoader: loaders.WebLoader,\n compiler: compiler,\n parser: parser,\n lexer: lexer,\n runtime: runtime,\n lib: lib,\n nodes: nodes,\n installJinjaCompat: installJinjaCompat,\n configure: configure,\n reset() {\n e = undefined;\n },\n compile(src, env, path, eagerCompile) {\n if (!e) {\n configure();\n }\n return new Template(src, env, path, eagerCompile);\n },\n render(name, ctx, cb) {\n if (!e) {\n configure();\n }\n\n return e.render(name, ctx, cb);\n },\n renderString(src, ctx, cb) {\n if (!e) {\n configure();\n }\n\n return e.renderString(src, ctx, cb);\n },\n precompile: (precompile) ? precompile.precompile : undefined,\n precompileString: (precompile) ? precompile.precompileString : undefined,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/index.js","\"use strict\";\n\n// rawAsap provides everything we need except exception management.\nvar rawAsap = require(\"./raw\");\n// RawTasks are recycled to reduce GC churn.\nvar freeTasks = [];\n// We queue errors to ensure they are thrown in right order (FIFO).\n// Array-as-queue is good enough here, since we are just dealing with exceptions.\nvar pendingErrors = [];\nvar requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError);\n\nfunction throwFirstError() {\n if (pendingErrors.length) {\n throw pendingErrors.shift();\n }\n}\n\n/**\n * Calls a task as soon as possible after returning, in its own event, with priority\n * over other events like animation, reflow, and repaint. An error thrown from an\n * event will not interrupt, nor even substantially slow down the processing of\n * other events, but will be rather postponed to a lower priority event.\n * @param {{call}} task A callable object, typically a function that takes no\n * arguments.\n */\nmodule.exports = asap;\nfunction asap(task) {\n var rawTask;\n if (freeTasks.length) {\n rawTask = freeTasks.pop();\n } else {\n rawTask = new RawTask();\n }\n rawTask.task = task;\n rawAsap(rawTask);\n}\n\n// We wrap tasks with recyclable task objects. A task object implements\n// `call`, just like a function.\nfunction RawTask() {\n this.task = null;\n}\n\n// The sole purpose of wrapping the task is to catch the exception and recycle\n// the task object after its single use.\nRawTask.prototype.call = function () {\n try {\n this.task.call();\n } catch (error) {\n if (asap.onerror) {\n // This hook exists purely for testing purposes.\n // Its name will be periodically randomized to break any code that\n // depends on its existence.\n asap.onerror(error);\n } else {\n // In a web browser, exceptions are not fatal. However, to avoid\n // slowing down the queue of pending tasks, we rethrow the error in a\n // lower priority turn.\n pendingErrors.push(error);\n requestErrorThrow();\n }\n } finally {\n this.task = null;\n freeTasks[freeTasks.length] = this;\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/asap/browser-asap.js\n// module id = 12\n// module chunks = 0","\"use strict\";\n\n// Use the fastest means possible to execute a task in its own turn, with\n// priority over other events including IO, animation, reflow, and redraw\n// events in browsers.\n//\n// An exception thrown by a task will permanently interrupt the processing of\n// subsequent tasks. The higher level `asap` function ensures that if an\n// exception is thrown by a task, that the task queue will continue flushing as\n// soon as possible, but if you use `rawAsap` directly, you are responsible to\n// either ensure that no exceptions are thrown from your task, or to manually\n// call `rawAsap.requestFlush` if an exception is thrown.\nmodule.exports = rawAsap;\nfunction rawAsap(task) {\n if (!queue.length) {\n requestFlush();\n flushing = true;\n }\n // Equivalent to push, but avoids a function call.\n queue[queue.length] = task;\n}\n\nvar queue = [];\n// Once a flush has been requested, no further calls to `requestFlush` are\n// necessary until the next `flush` completes.\nvar flushing = false;\n// `requestFlush` is an implementation-specific method that attempts to kick\n// off a `flush` event as quickly as possible. `flush` will attempt to exhaust\n// the event queue before yielding to the browser's own event loop.\nvar requestFlush;\n// The position of the next task to execute in the task queue. This is\n// preserved between calls to `flush` so that it can be resumed if\n// a task throws an exception.\nvar index = 0;\n// If a task schedules additional tasks recursively, the task queue can grow\n// unbounded. To prevent memory exhaustion, the task queue will periodically\n// truncate already-completed tasks.\nvar capacity = 1024;\n\n// The flush function processes all tasks that have been scheduled with\n// `rawAsap` unless and until one of those tasks throws an exception.\n// If a task throws an exception, `flush` ensures that its state will remain\n// consistent and will resume where it left off when called again.\n// However, `flush` does not make any arrangements to be called again if an\n// exception is thrown.\nfunction flush() {\n while (index < queue.length) {\n var currentIndex = index;\n // Advance the index before calling the task. This ensures that we will\n // begin flushing on the next task the task throws an error.\n index = index + 1;\n queue[currentIndex].call();\n // Prevent leaking memory for long chains of recursive calls to `asap`.\n // If we call `asap` within tasks scheduled by `asap`, the queue will\n // grow, but to avoid an O(n) walk for every task we execute, we don't\n // shift tasks off the queue after they have been executed.\n // Instead, we periodically shift 1024 tasks off the queue.\n if (index > capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.jss\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/asap/browser-raw.js\n// module id = 13\n// module chunks = 0","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 14\n// module chunks = 0","// MIT license (by Elan Shanker).\n(function(globals) {\n 'use strict';\n\n var executeSync = function(){\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'function'){\n args[0].apply(null, args.splice(1));\n }\n };\n\n var executeAsync = function(fn){\n if (typeof setImmediate === 'function') {\n setImmediate(fn);\n } else if (typeof process !== 'undefined' && process.nextTick) {\n process.nextTick(fn);\n } else {\n setTimeout(fn, 0);\n }\n };\n\n var makeIterator = function (tasks) {\n var makeCallback = function (index) {\n var fn = function () {\n if (tasks.length) {\n tasks[index].apply(null, arguments);\n }\n return fn.next();\n };\n fn.next = function () {\n return (index < tasks.length - 1) ? makeCallback(index + 1): null;\n };\n return fn;\n };\n return makeCallback(0);\n };\n \n var _isArray = Array.isArray || function(maybeArray){\n return Object.prototype.toString.call(maybeArray) === '[object Array]';\n };\n\n var waterfall = function (tasks, callback, forceAsync) {\n var nextTick = forceAsync ? executeAsync : executeSync;\n callback = callback || function () {};\n if (!_isArray(tasks)) {\n var err = new Error('First argument to waterfall must be an array of functions');\n return callback(err);\n }\n if (!tasks.length) {\n return callback();\n }\n var wrapIterator = function (iterator) {\n return function (err) {\n if (err) {\n callback.apply(null, arguments);\n callback = function () {};\n } else {\n var args = Array.prototype.slice.call(arguments, 1);\n var next = iterator.next();\n if (next) {\n args.push(wrapIterator(next));\n } else {\n args.push(callback);\n }\n nextTick(function () {\n iterator.apply(null, args);\n });\n }\n };\n };\n wrapIterator(makeIterator(tasks))();\n };\n\n if (typeof define !== 'undefined' && define.amd) {\n define([], function () {\n return waterfall;\n }); // RequireJS\n } else if (typeof module !== 'undefined' && module.exports) {\n module.exports = waterfall; // CommonJS\n } else {\n globals.waterfall = waterfall; // <script>\n }\n})(this);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/a-sync-waterfall/index.js\n// module id = 15\n// module chunks = 0","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction $getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return $getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = $getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) args.push(arguments[i]);\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n ReflectApply(this.listener, this.target, args);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/node_modules/events/events.js\n// module id = 16\n// module chunks = 0","'use strict';\n\nvar nodes = require('./nodes');\nvar lib = require('./lib');\n\nvar sym = 0;\nfunction gensym() {\n return 'hole_' + sym++;\n}\n\n// copy-on-write version of map\nfunction mapCOW(arr, func) {\n var res = null;\n for (let i = 0; i < arr.length; i++) {\n const item = func(arr[i]);\n\n if (item !== arr[i]) {\n if (!res) {\n res = arr.slice();\n }\n\n res[i] = item;\n }\n }\n\n return res || arr;\n}\n\nfunction walk(ast, func, depthFirst) {\n if (!(ast instanceof nodes.Node)) {\n return ast;\n }\n\n if (!depthFirst) {\n const astT = func(ast);\n\n if (astT && astT !== ast) {\n return astT;\n }\n }\n\n if (ast instanceof nodes.NodeList) {\n const children = mapCOW(ast.children, (node) => walk(node, func, depthFirst));\n\n if (children !== ast.children) {\n ast = new nodes[ast.typename](ast.lineno, ast.colno, children);\n }\n } else if (ast instanceof nodes.CallExtension) {\n const args = walk(ast.args, func, depthFirst);\n const contentArgs = mapCOW(ast.contentArgs, (node) => walk(node, func, depthFirst));\n\n if (args !== ast.args || contentArgs !== ast.contentArgs) {\n ast = new nodes[ast.typename](ast.extName, ast.prop, args, contentArgs);\n }\n } else {\n const props = ast.fields.map((field) => ast[field]);\n const propsT = mapCOW(props, (prop) => walk(prop, func, depthFirst));\n\n if (propsT !== props) {\n ast = new nodes[ast.typename](ast.lineno, ast.colno);\n propsT.forEach((prop, i) => {\n ast[ast.fields[i]] = prop;\n });\n }\n }\n\n return depthFirst ? (func(ast) || ast) : ast;\n}\n\nfunction depthWalk(ast, func) {\n return walk(ast, func, true);\n}\n\nfunction _liftFilters(node, asyncFilters, prop) {\n var children = [];\n\n var walked = depthWalk(prop ? node[prop] : node, (descNode) => {\n let symbol;\n if (descNode instanceof nodes.Block) {\n return descNode;\n } else if ((descNode instanceof nodes.Filter &&\n lib.indexOf(asyncFilters, descNode.name.value) !== -1) ||\n descNode instanceof nodes.CallExtensionAsync) {\n symbol = new nodes.Symbol(descNode.lineno,\n descNode.colno,\n gensym());\n\n children.push(new nodes.FilterAsync(descNode.lineno,\n descNode.colno,\n descNode.name,\n descNode.args,\n symbol));\n }\n return symbol;\n });\n\n if (prop) {\n node[prop] = walked;\n } else {\n node = walked;\n }\n\n if (children.length) {\n children.push(node);\n\n return new nodes.NodeList(\n node.lineno,\n node.colno,\n children\n );\n } else {\n return node;\n }\n}\n\nfunction liftFilters(ast, asyncFilters) {\n return depthWalk(ast, (node) => {\n if (node instanceof nodes.Output) {\n return _liftFilters(node, asyncFilters);\n } else if (node instanceof nodes.Set) {\n return _liftFilters(node, asyncFilters, 'value');\n } else if (node instanceof nodes.For) {\n return _liftFilters(node, asyncFilters, 'arr');\n } else if (node instanceof nodes.If) {\n return _liftFilters(node, asyncFilters, 'cond');\n } else if (node instanceof nodes.CallExtension) {\n return _liftFilters(node, asyncFilters, 'args');\n } else {\n return undefined;\n }\n });\n}\n\nfunction liftSuper(ast) {\n return walk(ast, (blockNode) => {\n if (!(blockNode instanceof nodes.Block)) {\n return;\n }\n\n let hasSuper = false;\n const symbol = gensym();\n\n blockNode.body = walk(blockNode.body, (node) => { // eslint-disable-line consistent-return\n if (node instanceof nodes.FunCall && node.name.value === 'super') {\n hasSuper = true;\n return new nodes.Symbol(node.lineno, node.colno, symbol);\n }\n });\n\n if (hasSuper) {\n blockNode.body.children.unshift(new nodes.Super(\n 0, 0, blockNode.name, new nodes.Symbol(0, 0, symbol)\n ));\n }\n });\n}\n\nfunction convertStatements(ast) {\n return depthWalk(ast, (node) => {\n if (!(node instanceof nodes.If) && !(node instanceof nodes.For)) {\n return undefined;\n }\n\n let async = false;\n walk(node, (child) => {\n if (child instanceof nodes.FilterAsync ||\n child instanceof nodes.IfAsync ||\n child instanceof nodes.AsyncEach ||\n child instanceof nodes.AsyncAll ||\n child instanceof nodes.CallExtensionAsync) {\n async = true;\n // Stop iterating by returning the node\n return child;\n }\n return undefined;\n });\n\n if (async) {\n if (node instanceof nodes.If) {\n return new nodes.IfAsync(\n node.lineno,\n node.colno,\n node.cond,\n node.body,\n node.else_\n );\n } else if (node instanceof nodes.For && !(node instanceof nodes.AsyncAll)) {\n return new nodes.AsyncEach(\n node.lineno,\n node.colno,\n node.arr,\n node.name,\n node.body,\n node.else_\n );\n }\n }\n return undefined;\n });\n}\n\nfunction cps(ast, asyncFilters) {\n return convertStatements(liftSuper(liftFilters(ast, asyncFilters)));\n}\n\nfunction transform(ast, asyncFilters) {\n return cps(ast, asyncFilters || []);\n}\n\n// var parser = require('./parser');\n// var src = 'hello {% foo %}{% endfoo %} end';\n// var ast = transform(parser.parse(src, [new FooExtension()]), ['bar']);\n// nodes.printNodes(ast);\n\nmodule.exports = {\n transform: transform\n};\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/transformer.js","'use strict';\n\nvar lib = require('./lib');\nvar r = require('./runtime');\n\nvar exports = module.exports = {};\n\nfunction normalize(value, defaultValue) {\n if (value === null || value === undefined || value === false) {\n return defaultValue;\n }\n return value;\n}\n\nexports.abs = Math.abs;\n\nfunction isNaN(num) {\n return num !== num; // eslint-disable-line no-self-compare\n}\n\nfunction batch(arr, linecount, fillWith) {\n var i;\n var res = [];\n var tmp = [];\n\n for (i = 0; i < arr.length; i++) {\n if (i % linecount === 0 && tmp.length) {\n res.push(tmp);\n tmp = [];\n }\n\n tmp.push(arr[i]);\n }\n\n if (tmp.length) {\n if (fillWith) {\n for (i = tmp.length; i < linecount; i++) {\n tmp.push(fillWith);\n }\n }\n\n res.push(tmp);\n }\n\n return res;\n}\n\nexports.batch = batch;\n\nfunction capitalize(str) {\n str = normalize(str, '');\n const ret = str.toLowerCase();\n return r.copySafeness(str, ret.charAt(0).toUpperCase() + ret.slice(1));\n}\n\nexports.capitalize = capitalize;\n\nfunction center(str, width) {\n str = normalize(str, '');\n width = width || 80;\n\n if (str.length >= width) {\n return str;\n }\n\n const spaces = width - str.length;\n const pre = lib.repeat(' ', (spaces / 2) - (spaces % 2));\n const post = lib.repeat(' ', spaces / 2);\n return r.copySafeness(str, pre + str + post);\n}\n\nexports.center = center;\n\nfunction default_(val, def, bool) {\n if (bool) {\n return val || def;\n } else {\n return (val !== undefined) ? val : def;\n }\n}\n\n// TODO: it is confusing to export something called 'default'\nexports['default'] = default_; // eslint-disable-line dot-notation\n\nfunction dictsort(val, caseSensitive, by) {\n if (!lib.isObject(val)) {\n throw new lib.TemplateError('dictsort filter: val must be an object');\n }\n\n let array = [];\n // deliberately include properties from the object's prototype\n for (let k in val) { // eslint-disable-line guard-for-in, no-restricted-syntax\n array.push([k, val[k]]);\n }\n\n let si;\n if (by === undefined || by === 'key') {\n si = 0;\n } else if (by === 'value') {\n si = 1;\n } else {\n throw new lib.TemplateError(\n 'dictsort filter: You can only sort by either key or value');\n }\n\n array.sort((t1, t2) => {\n var a = t1[si];\n var b = t2[si];\n\n if (!caseSensitive) {\n if (lib.isString(a)) {\n a = a.toUpperCase();\n }\n if (lib.isString(b)) {\n b = b.toUpperCase();\n }\n }\n\n return a > b ? 1 : (a === b ? 0 : -1); // eslint-disable-line no-nested-ternary\n });\n\n return array;\n}\n\nexports.dictsort = dictsort;\n\nfunction dump(obj, spaces) {\n return JSON.stringify(obj, null, spaces);\n}\n\nexports.dump = dump;\n\nfunction escape(str) {\n if (str instanceof r.SafeString) {\n return str;\n }\n str = (str === null || str === undefined) ? '' : str;\n return r.markSafe(lib.escape(str.toString()));\n}\n\nexports.escape = escape;\n\nfunction safe(str) {\n if (str instanceof r.SafeString) {\n return str;\n }\n str = (str === null || str === undefined) ? '' : str;\n return r.markSafe(str.toString());\n}\n\nexports.safe = safe;\n\nfunction first(arr) {\n return arr[0];\n}\n\nexports.first = first;\n\nfunction forceescape(str) {\n str = (str === null || str === undefined) ? '' : str;\n return r.markSafe(lib.escape(str.toString()));\n}\n\nexports.forceescape = forceescape;\n\nfunction groupby(arr, attr) {\n return lib.groupBy(arr, attr);\n}\n\nexports.groupby = groupby;\n\nfunction indent(str, width, indentfirst) {\n str = normalize(str, '');\n\n if (str === '') {\n return '';\n }\n\n width = width || 4;\n // let res = '';\n const lines = str.split('\\n');\n const sp = lib.repeat(' ', width);\n\n const res = lines.map((l, i) => {\n return (i === 0 && !indentfirst) ? `${l}\\n` : `${sp}${l}\\n`;\n }).join('');\n\n return r.copySafeness(str, res);\n}\n\nexports.indent = indent;\n\nfunction join(arr, del, attr) {\n del = del || '';\n\n if (attr) {\n arr = lib.map(arr, (v) => v[attr]);\n }\n\n return arr.join(del);\n}\n\nexports.join = join;\n\nfunction last(arr) {\n return arr[arr.length - 1];\n}\n\nexports.last = last;\n\nfunction lengthFilter(val) {\n var value = normalize(val, '');\n\n if (value !== undefined) {\n if (\n (typeof Map === 'function' && value instanceof Map) ||\n (typeof Set === 'function' && value instanceof Set)\n ) {\n // ECMAScript 2015 Maps and Sets\n return value.size;\n }\n if (lib.isObject(value) && !(value instanceof r.SafeString)) {\n // Objects (besides SafeStrings), non-primative Arrays\n return lib.keys(value).length;\n }\n return value.length;\n }\n return 0;\n}\n\nexports.length = lengthFilter;\n\nfunction list(val) {\n if (lib.isString(val)) {\n return val.split('');\n } else if (lib.isObject(val)) {\n return lib._entries(val || {}).map(([key, value]) => ({key, value}));\n } else if (lib.isArray(val)) {\n return val;\n } else {\n throw new lib.TemplateError('list filter: type not iterable');\n }\n}\n\nexports.list = list;\n\nfunction lower(str) {\n str = normalize(str, '');\n return str.toLowerCase();\n}\n\nexports.lower = lower;\n\nfunction nl2br(str) {\n if (str === null || str === undefined) {\n return '';\n }\n return r.copySafeness(str, str.replace(/\\r\\n|\\n/g, '<br />\\n'));\n}\n\nexports.nl2br = nl2br;\n\nfunction random(arr) {\n return arr[Math.floor(Math.random() * arr.length)];\n}\n\nexports.random = random;\n\nfunction rejectattr(arr, attr) {\n return arr.filter((item) => !item[attr]);\n}\n\nexports.rejectattr = rejectattr;\n\nfunction selectattr(arr, attr) {\n return arr.filter((item) => !!item[attr]);\n}\n\nexports.selectattr = selectattr;\n\nfunction replace(str, old, new_, maxCount) {\n var originalStr = str;\n\n if (old instanceof RegExp) {\n return str.replace(old, new_);\n }\n\n if (typeof maxCount === 'undefined') {\n maxCount = -1;\n }\n\n let res = ''; // Output\n\n // Cast Numbers in the search term to string\n if (typeof old === 'number') {\n old = '' + old;\n } else if (typeof old !== 'string') {\n // If it is something other than number or string,\n // return the original string\n return str;\n }\n\n // Cast numbers in the replacement to string\n if (typeof str === 'number') {\n str = '' + str;\n }\n\n // If by now, we don't have a string, throw it back\n if (typeof str !== 'string' && !(str instanceof r.SafeString)) {\n return str;\n }\n\n // ShortCircuits\n if (old === '') {\n // Mimic the python behaviour: empty string is replaced\n // by replacement e.g. \"abc\"|replace(\"\", \".\") -> .a.b.c.\n res = new_ + str.split('').join(new_) + new_;\n return r.copySafeness(str, res);\n }\n\n let nextIndex = str.indexOf(old);\n // if # of replacements to perform is 0, or the string to does\n // not contain the old value, return the string\n if (maxCount === 0 || nextIndex === -1) {\n return str;\n }\n\n let pos = 0;\n let count = 0; // # of replacements made\n\n while (nextIndex > -1 && (maxCount === -1 || count < maxCount)) {\n // Grab the next chunk of src string and add it with the\n // replacement, to the result\n res += str.substring(pos, nextIndex) + new_;\n // Increment our pointer in the src string\n pos = nextIndex + old.length;\n count++;\n // See if there are any more replacements to be made\n nextIndex = str.indexOf(old, pos);\n }\n\n // We've either reached the end, or done the max # of\n // replacements, tack on any remaining string\n if (pos < str.length) {\n res += str.substring(pos);\n }\n\n return r.copySafeness(originalStr, res);\n}\n\nexports.replace = replace;\n\nfunction reverse(val) {\n var arr;\n if (lib.isString(val)) {\n arr = list(val);\n } else {\n // Copy it\n arr = lib.map(val, v => v);\n }\n\n arr.reverse();\n\n if (lib.isString(val)) {\n return r.copySafeness(val, arr.join(''));\n }\n return arr;\n}\n\nexports.reverse = reverse;\n\nfunction round(val, precision, method) {\n precision = precision || 0;\n const factor = Math.pow(10, precision);\n let rounder;\n\n if (method === 'ceil') {\n rounder = Math.ceil;\n } else if (method === 'floor') {\n rounder = Math.floor;\n } else {\n rounder = Math.round;\n }\n\n return rounder(val * factor) / factor;\n}\n\nexports.round = round;\n\nfunction slice(arr, slices, fillWith) {\n const sliceLength = Math.floor(arr.length / slices);\n const extra = arr.length % slices;\n const res = [];\n let offset = 0;\n\n for (let i = 0; i < slices; i++) {\n const start = offset + (i * sliceLength);\n if (i < extra) {\n offset++;\n }\n const end = offset + ((i + 1) * sliceLength);\n\n const currSlice = arr.slice(start, end);\n if (fillWith && i >= extra) {\n currSlice.push(fillWith);\n }\n res.push(currSlice);\n }\n\n return res;\n}\n\nexports.slice = slice;\n\nfunction sum(arr, attr, start = 0) {\n if (attr) {\n arr = lib.map(arr, (v) => v[attr]);\n }\n\n return start + arr.reduce((a, b) => a + b, 0);\n}\n\nexports.sum = sum;\n\nexports.sort = r.makeMacro(\n ['value', 'reverse', 'case_sensitive', 'attribute'], [],\n (arr, reversed, caseSens, attr) => {\n // Copy it\n let array = lib.map(arr, v => v);\n\n array.sort((a, b) => {\n let x = (attr) ? a[attr] : a;\n let y = (attr) ? b[attr] : b;\n\n if (!caseSens && lib.isString(x) && lib.isString(y)) {\n x = x.toLowerCase();\n y = y.toLowerCase();\n }\n\n if (x < y) {\n return reversed ? 1 : -1;\n } else if (x > y) {\n return reversed ? -1 : 1;\n } else {\n return 0;\n }\n });\n\n return array;\n });\n\nfunction string(obj) {\n return r.copySafeness(obj, obj);\n}\n\nexports.string = string;\n\nfunction striptags(input, preserveLinebreaks) {\n input = normalize(input, '');\n let tags = /<\\/?([a-z][a-z0-9]*)\\b[^>]*>|<!--[\\s\\S]*?-->/gi;\n let trimmedInput = trim(input.replace(tags, ''));\n let res = '';\n if (preserveLinebreaks) {\n res = trimmedInput\n .replace(/^ +| +$/gm, '') // remove leading and trailing spaces\n .replace(/ +/g, ' ') // squash adjacent spaces\n .replace(/(\\r\\n)/g, '\\n') // normalize linebreaks (CRLF -> LF)\n .replace(/\\n\\n\\n+/g, '\\n\\n'); // squash abnormal adjacent linebreaks\n } else {\n res = trimmedInput.replace(/\\s+/gi, ' ');\n }\n return r.copySafeness(input, res);\n}\n\nexports.striptags = striptags;\n\nfunction title(str) {\n str = normalize(str, '');\n let words = str.split(' ').map(word => capitalize(word));\n return r.copySafeness(str, words.join(' '));\n}\n\nexports.title = title;\n\nfunction trim(str) {\n return r.copySafeness(str, str.replace(/^\\s*|\\s*$/g, ''));\n}\n\nexports.trim = trim;\n\nfunction truncate(input, length, killwords, end) {\n var orig = input;\n input = normalize(input, '');\n length = length || 255;\n\n if (input.length <= length) {\n return input;\n }\n\n if (killwords) {\n input = input.substring(0, length);\n } else {\n let idx = input.lastIndexOf(' ', length);\n if (idx === -1) {\n idx = length;\n }\n\n input = input.substring(0, idx);\n }\n\n input += (end !== undefined && end !== null) ? end : '...';\n return r.copySafeness(orig, input);\n}\n\nexports.truncate = truncate;\n\nfunction upper(str) {\n str = normalize(str, '');\n return str.toUpperCase();\n}\n\nexports.upper = upper;\n\nfunction urlencode(obj) {\n var enc = encodeURIComponent;\n if (lib.isString(obj)) {\n return enc(obj);\n } else {\n let keyvals = (lib.isArray(obj)) ? obj : lib._entries(obj);\n return keyvals.map(([k, v]) => `${enc(k)}=${enc(v)}`).join('&');\n }\n}\n\nexports.urlencode = urlencode;\n\n// For the jinja regexp, see\n// https://github.com/mitsuhiko/jinja2/blob/f15b814dcba6aa12bc74d1f7d0c881d55f7126be/jinja2/utils.py#L20-L23\nconst puncRe = /^(?:\\(|<|&lt;)?(.*?)(?:\\.|,|\\)|\\n|&gt;)?$/;\n// from http://blog.gerv.net/2011/05/html5_email_address_regexp/\nconst emailRe = /^[\\w.!#$%&'*+\\-\\/=?\\^`{|}~]+@[a-z\\d\\-]+(\\.[a-z\\d\\-]+)+$/i;\nconst httpHttpsRe = /^https?:\\/\\/.*$/;\nconst wwwRe = /^www\\./;\nconst tldRe = /\\.(?:org|net|com)(?:\\:|\\/|$)/;\n\nfunction urlize(str, length, nofollow) {\n if (isNaN(length)) {\n length = Infinity;\n }\n\n const noFollowAttr = (nofollow === true ? ' rel=\"nofollow\"' : '');\n\n const words = str.split(/(\\s+)/).filter((word) => {\n // If the word has no length, bail. This can happen for str with\n // trailing whitespace.\n return word && word.length;\n }).map((word) => {\n var matches = word.match(puncRe);\n var possibleUrl = (matches) ? matches[1] : word;\n var shortUrl = possibleUrl.substr(0, length);\n\n // url that starts with http or https\n if (httpHttpsRe.test(possibleUrl)) {\n return `<a href=\"${possibleUrl}\"${noFollowAttr}>${shortUrl}</a>`;\n }\n\n // url that starts with www.\n if (wwwRe.test(possibleUrl)) {\n return `<a href=\"http://${possibleUrl}\"${noFollowAttr}>${shortUrl}</a>`;\n }\n\n // an email address of the form username@domain.tld\n if (emailRe.test(possibleUrl)) {\n return `<a href=\"mailto:${possibleUrl}\">${possibleUrl}</a>`;\n }\n\n // url that ends in .com, .org or .net that is not an email address\n if (tldRe.test(possibleUrl)) {\n return `<a href=\"http://${possibleUrl}\"${noFollowAttr}>${shortUrl}</a>`;\n }\n\n return word;\n });\n\n return words.join('');\n}\n\nexports.urlize = urlize;\n\nfunction wordcount(str) {\n str = normalize(str, '');\n const words = (str) ? str.match(/\\w+/g) : null;\n return (words) ? words.length : null;\n}\n\nexports.wordcount = wordcount;\n\nfunction float(val, def) {\n var res = parseFloat(val);\n return (isNaN(res)) ? def : res;\n}\n\nexports.float = float;\n\nfunction int(val, def) {\n var res = parseInt(val, 10);\n return (isNaN(res)) ? def : res;\n}\n\nexports.int = int;\n\n// Aliases\nexports.d = exports.default;\nexports.e = exports.escape;\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/filters.js","'use strict';\n\nconst Loader = require('./loader');\n\nclass PrecompiledLoader extends Loader {\n constructor(compiledTemplates) {\n super();\n this.precompiled = compiledTemplates || {};\n }\n\n getSource(name) {\n if (this.precompiled[name]) {\n return {\n src: {\n type: 'code',\n obj: this.precompiled[name]\n },\n path: name\n };\n }\n return null;\n }\n}\n\nmodule.exports = {\n PrecompiledLoader: PrecompiledLoader,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/precompiled-loader.js","'use strict';\n\nvar SafeString = require('./runtime').SafeString;\n\n/**\n * Returns `true` if the object is a function, otherwise `false`.\n * @param { any } value\n * @returns { boolean }\n */\nfunction callable(value) {\n return typeof value === 'function';\n}\n\nexports.callable = callable;\n\n/**\n * Returns `true` if the object is strictly not `undefined`.\n * @param { any } value\n * @returns { boolean }\n */\nfunction defined(value) {\n return value !== undefined;\n}\n\nexports.defined = defined;\n\n/**\n * Returns `true` if the operand (one) is divisble by the test's argument\n * (two).\n * @param { number } one\n * @param { number } two\n * @returns { boolean }\n */\nfunction divisibleby(one, two) {\n return (one % two) === 0;\n}\n\nexports.divisibleby = divisibleby;\n\n/**\n * Returns true if the string has been escaped (i.e., is a SafeString).\n * @param { any } value\n * @returns { boolean }\n */\nfunction escaped(value) {\n return value instanceof SafeString;\n}\n\nexports.escaped = escaped;\n\n/**\n * Returns `true` if the arguments are strictly equal.\n * @param { any } one\n * @param { any } two\n */\nfunction equalto(one, two) {\n return one === two;\n}\n\nexports.equalto = equalto;\n\n// Aliases\nexports.eq = exports.equalto;\nexports.sameas = exports.equalto;\n\n/**\n * Returns `true` if the value is evenly divisible by 2.\n * @param { number } value\n * @returns { boolean }\n */\nfunction even(value) {\n return value % 2 === 0;\n}\n\nexports.even = even;\n\n/**\n * Returns `true` if the value is falsy - if I recall correctly, '', 0, false,\n * undefined, NaN or null. I don't know if we should stick to the default JS\n * behavior or attempt to replicate what Python believes should be falsy (i.e.,\n * empty arrays, empty dicts, not 0...).\n * @param { any } value\n * @returns { boolean }\n */\nfunction falsy(value) {\n return !value;\n}\n\nexports.falsy = falsy;\n\n/**\n * Returns `true` if the operand (one) is greater or equal to the test's\n * argument (two).\n * @param { number } one\n * @param { number } two\n * @returns { boolean }\n */\nfunction ge(one, two) {\n return one >= two;\n}\n\nexports.ge = ge;\n\n/**\n * Returns `true` if the operand (one) is greater than the test's argument\n * (two).\n * @param { number } one\n * @param { number } two\n * @returns { boolean }\n */\nfunction greaterthan(one, two) {\n return one > two;\n}\n\nexports.greaterthan = greaterthan;\n\n// alias\nexports.gt = exports.greaterthan;\n\n/**\n * Returns `true` if the operand (one) is less than or equal to the test's\n * argument (two).\n * @param { number } one\n * @param { number } two\n * @returns { boolean }\n */\nfunction le(one, two) {\n return one <= two;\n}\n\nexports.le = le;\n\n/**\n * Returns `true` if the operand (one) is less than the test's passed argument\n * (two).\n * @param { number } one\n * @param { number } two\n * @returns { boolean }\n */\nfunction lessthan(one, two) {\n return one < two;\n}\n\nexports.lessthan = lessthan;\n\n// alias\nexports.lt = exports.lessthan;\n\n/**\n * Returns `true` if the string is lowercased.\n * @param { string } value\n * @returns { boolean }\n */\nfunction lower(value) {\n return value.toLowerCase() === value;\n}\n\nexports.lower = lower;\n\n/**\n * Returns `true` if the operand (one) is less than or equal to the test's\n * argument (two).\n * @param { number } one\n * @param { number } two\n * @returns { boolean }\n */\nfunction ne(one, two) {\n return one !== two;\n}\n\nexports.ne = ne;\n\n/**\n * Returns true if the value is strictly equal to `null`.\n * @param { any }\n * @returns { boolean }\n */\nfunction nullTest(value) {\n return value === null;\n}\n\nexports.null = nullTest;\n\n/**\n * Returns true if value is a number.\n * @param { any }\n * @returns { boolean }\n */\nfunction number(value) {\n return typeof value === 'number';\n}\n\nexports.number = number;\n\n/**\n * Returns `true` if the value is *not* evenly divisible by 2.\n * @param { number } value\n * @returns { boolean }\n */\nfunction odd(value) {\n return value % 2 === 1;\n}\n\nexports.odd = odd;\n\n/**\n * Returns `true` if the value is a string, `false` if not.\n * @param { any } value\n * @returns { boolean }\n */\nfunction string(value) {\n return typeof value === 'string';\n}\n\nexports.string = string;\n\n/**\n * Returns `true` if the value is not in the list of things considered falsy:\n * '', null, undefined, 0, NaN and false.\n * @param { any } value\n * @returns { boolean }\n */\nfunction truthy(value) {\n return !!value;\n}\n\nexports.truthy = truthy;\n\n/**\n * Returns `true` if the value is undefined.\n * @param { any } value\n * @returns { boolean }\n */\nfunction undefinedTest(value) {\n return value === undefined;\n}\n\nexports.undefined = undefinedTest;\n\n/**\n * Returns `true` if the string is uppercased.\n * @param { string } value\n * @returns { boolean }\n */\nfunction upper(value) {\n return value.toUpperCase() === value;\n}\n\nexports.upper = upper;\n\n/**\n * If ES6 features are available, returns `true` if the value implements the\n * `Symbol.iterator` method. If not, it's a string or Array.\n *\n * Could potentially cause issues if a browser exists that has Set and Map but\n * not Symbol.\n *\n * @param { any } value\n * @returns { boolean }\n */\nfunction iterable(value) {\n if (typeof Symbol !== 'undefined') {\n return !!value[Symbol.iterator];\n } else {\n return Array.isArray(value) || typeof value === 'string';\n }\n}\n\nexports.iterable = iterable;\n\n/**\n * If ES6 features are available, returns `true` if the value is an object hash\n * or an ES6 Map. Otherwise just return if it's an object hash.\n * @param { any } value\n * @returns { boolean }\n */\nfunction mapping(value) {\n // only maps and object hashes\n var bool = value !== null\n && value !== undefined\n && typeof value === 'object'\n && !Array.isArray(value);\n if (Set) {\n return bool && !(value instanceof Set);\n } else {\n return bool;\n }\n}\n\nexports.mapping = mapping;\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/tests.js","'use strict';\n\nfunction cycler(items) {\n var index = -1;\n\n return {\n current: null,\n reset() {\n index = -1;\n this.current = null;\n },\n\n next() {\n index++;\n if (index >= items.length) {\n index = 0;\n }\n\n this.current = items[index];\n return this.current;\n },\n };\n}\n\nfunction joiner(sep) {\n sep = sep || ',';\n let first = true;\n\n return () => {\n const val = first ? '' : sep;\n first = false;\n return val;\n };\n}\n\n// Making this a function instead so it returns a new object\n// each time it's called. That way, if something like an environment\n// uses it, they will each have their own copy.\nfunction globals() {\n return {\n range(start, stop, step) {\n if (typeof stop === 'undefined') {\n stop = start;\n start = 0;\n step = 1;\n } else if (!step) {\n step = 1;\n }\n\n const arr = [];\n if (step > 0) {\n for (let i = start; i < stop; i += step) {\n arr.push(i);\n }\n } else {\n for (let i = start; i > stop; i += step) { // eslint-disable-line for-direction\n arr.push(i);\n }\n }\n return arr;\n },\n\n cycler() {\n return cycler(Array.prototype.slice.call(arguments));\n },\n\n joiner(sep) {\n return joiner(sep);\n }\n };\n}\n\nmodule.exports = globals;\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/globals.js","const path = require('path');\n\nmodule.exports = function express(env, app) {\n function NunjucksView(name, opts) {\n this.name = name;\n this.path = name;\n this.defaultEngine = opts.defaultEngine;\n this.ext = path.extname(name);\n if (!this.ext && !this.defaultEngine) {\n throw new Error('No default engine was specified and no extension was provided.');\n }\n if (!this.ext) {\n this.name += (this.ext = (this.defaultEngine[0] !== '.' ? '.' : '') + this.defaultEngine);\n }\n }\n\n NunjucksView.prototype.render = function render(opts, cb) {\n env.render(this.name, opts, cb);\n };\n\n app.set('view', NunjucksView);\n app.set('nunjucksEnv', env);\n return env;\n};\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/express-app.js","'use strict';\n\nconst fs = require('fs');\nconst path = require('path');\nconst {_prettifyError} = require('./lib');\nconst compiler = require('./compiler');\nconst {Environment} = require('./environment');\nconst precompileGlobal = require('./precompile-global');\n\nfunction match(filename, patterns) {\n if (!Array.isArray(patterns)) {\n return false;\n }\n return patterns.some((pattern) => filename.match(pattern));\n}\n\nfunction precompileString(str, opts) {\n opts = opts || {};\n opts.isString = true;\n const env = opts.env || new Environment([]);\n const wrapper = opts.wrapper || precompileGlobal;\n\n if (!opts.name) {\n throw new Error('the \"name\" option is required when compiling a string');\n }\n return wrapper([_precompile(str, opts.name, env)], opts);\n}\n\nfunction precompile(input, opts) {\n // The following options are available:\n //\n // * name: name of the template (auto-generated when compiling a directory)\n // * isString: input is a string, not a file path\n // * asFunction: generate a callable function\n // * force: keep compiling on error\n // * env: the Environment to use (gets extensions and async filters from it)\n // * include: which file/folders to include (folders are auto-included, files are auto-excluded)\n // * exclude: which file/folders to exclude (folders are auto-included, files are auto-excluded)\n // * wrapper: function(templates, opts) {...}\n // Customize the output format to store the compiled template.\n // By default, templates are stored in a global variable used by the runtime.\n // A custom loader will be necessary to load your custom wrapper.\n\n opts = opts || {};\n const env = opts.env || new Environment([]);\n const wrapper = opts.wrapper || precompileGlobal;\n\n if (opts.isString) {\n return precompileString(input, opts);\n }\n\n const pathStats = fs.existsSync(input) && fs.statSync(input);\n const precompiled = [];\n const templates = [];\n\n function addTemplates(dir) {\n fs.readdirSync(dir).forEach((file) => {\n const filepath = path.join(dir, file);\n let subpath = filepath.substr(path.join(input, '/').length);\n const stat = fs.statSync(filepath);\n\n if (stat && stat.isDirectory()) {\n subpath += '/';\n if (!match(subpath, opts.exclude)) {\n addTemplates(filepath);\n }\n } else if (match(subpath, opts.include)) {\n templates.push(filepath);\n }\n });\n }\n\n if (pathStats.isFile()) {\n precompiled.push(_precompile(\n fs.readFileSync(input, 'utf-8'),\n opts.name || input,\n env\n ));\n } else if (pathStats.isDirectory()) {\n addTemplates(input);\n\n for (let i = 0; i < templates.length; i++) {\n const name = templates[i].replace(path.join(input, '/'), '');\n\n try {\n precompiled.push(_precompile(\n fs.readFileSync(templates[i], 'utf-8'),\n name,\n env\n ));\n } catch (e) {\n if (opts.force) {\n // Don't stop generating the output if we're\n // forcing compilation.\n console.error(e); // eslint-disable-line no-console\n } else {\n throw e;\n }\n }\n }\n }\n\n return wrapper(precompiled, opts);\n}\n\nfunction _precompile(str, name, env) {\n env = env || new Environment([]);\n\n const asyncFilters = env.asyncFilters;\n const extensions = env.extensionsList;\n let template;\n\n name = name.replace(/\\\\/g, '/');\n\n try {\n template = compiler.compile(str,\n asyncFilters,\n extensions,\n name,\n env.opts);\n } catch (err) {\n throw _prettifyError(name, false, err);\n }\n\n return {\n name: name,\n template: template\n };\n}\n\nmodule.exports = {\n precompile: precompile,\n precompileString: precompileString\n};\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/precompile.js","'use strict';\n\nfunction precompileGlobal(templates, opts) {\n var out = '';\n opts = opts || {};\n\n for (let i = 0; i < templates.length; i++) {\n const name = JSON.stringify(templates[i].name);\n const template = templates[i].template;\n\n out += '(function() {' +\n '(window.nunjucksPrecompiled = window.nunjucksPrecompiled || {})' +\n '[' + name + '] = (function() {\\n' + template + '\\n})();\\n';\n\n if (opts.asFunction) {\n out += 'return function(ctx, cb) { return nunjucks.render(' + name + ', ctx, cb); }\\n';\n }\n\n out += '})();\\n';\n }\n return out;\n}\n\nmodule.exports = precompileGlobal;\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/precompile-global.js","function installCompat() {\n 'use strict';\n\n /* eslint-disable camelcase */\n\n // This must be called like `nunjucks.installCompat` so that `this`\n // references the nunjucks instance\n var runtime = this.runtime;\n var lib = this.lib;\n // Handle slim case where these 'modules' are excluded from the built source\n var Compiler = this.compiler.Compiler;\n var Parser = this.parser.Parser;\n var nodes = this.nodes;\n var lexer = this.lexer;\n\n var orig_contextOrFrameLookup = runtime.contextOrFrameLookup;\n var orig_memberLookup = runtime.memberLookup;\n var orig_Compiler_assertType;\n var orig_Parser_parseAggregate;\n if (Compiler) {\n orig_Compiler_assertType = Compiler.prototype.assertType;\n }\n if (Parser) {\n orig_Parser_parseAggregate = Parser.prototype.parseAggregate;\n }\n\n function uninstall() {\n runtime.contextOrFrameLookup = orig_contextOrFrameLookup;\n runtime.memberLookup = orig_memberLookup;\n if (Compiler) {\n Compiler.prototype.assertType = orig_Compiler_assertType;\n }\n if (Parser) {\n Parser.prototype.parseAggregate = orig_Parser_parseAggregate;\n }\n }\n\n runtime.contextOrFrameLookup = function contextOrFrameLookup(context, frame, key) {\n var val = orig_contextOrFrameLookup.apply(this, arguments);\n if (val !== undefined) {\n return val;\n }\n switch (key) {\n case 'True':\n return true;\n case 'False':\n return false;\n case 'None':\n return null;\n default:\n return undefined;\n }\n };\n\n function getTokensState(tokens) {\n return {\n index: tokens.index,\n lineno: tokens.lineno,\n colno: tokens.colno\n };\n }\n\n if (process.env.BUILD_TYPE !== 'SLIM' && nodes && Compiler && Parser) { // i.e., not slim mode\n const Slice = nodes.Node.extend('Slice', {\n fields: ['start', 'stop', 'step'],\n init(lineno, colno, start, stop, step) {\n start = start || new nodes.Literal(lineno, colno, null);\n stop = stop || new nodes.Literal(lineno, colno, null);\n step = step || new nodes.Literal(lineno, colno, 1);\n this.parent(lineno, colno, start, stop, step);\n }\n });\n\n Compiler.prototype.assertType = function assertType(node) {\n if (node instanceof Slice) {\n return;\n }\n orig_Compiler_assertType.apply(this, arguments);\n };\n Compiler.prototype.compileSlice = function compileSlice(node, frame) {\n this._emit('(');\n this._compileExpression(node.start, frame);\n this._emit('),(');\n this._compileExpression(node.stop, frame);\n this._emit('),(');\n this._compileExpression(node.step, frame);\n this._emit(')');\n };\n\n Parser.prototype.parseAggregate = function parseAggregate() {\n var origState = getTokensState(this.tokens);\n // Set back one accounting for opening bracket/parens\n origState.colno--;\n origState.index--;\n try {\n return orig_Parser_parseAggregate.apply(this);\n } catch (e) {\n const errState = getTokensState(this.tokens);\n const rethrow = () => {\n lib._assign(this.tokens, errState);\n return e;\n };\n\n // Reset to state before original parseAggregate called\n lib._assign(this.tokens, origState);\n this.peeked = false;\n\n const tok = this.peekToken();\n if (tok.type !== lexer.TOKEN_LEFT_BRACKET) {\n throw rethrow();\n } else {\n this.nextToken();\n }\n\n const node = new Slice(tok.lineno, tok.colno);\n\n // If we don't encounter a colon while parsing, this is not a slice,\n // so re-raise the original exception.\n let isSlice = false;\n\n for (let i = 0; i <= node.fields.length; i++) {\n if (this.skip(lexer.TOKEN_RIGHT_BRACKET)) {\n break;\n }\n if (i === node.fields.length) {\n if (isSlice) {\n this.fail('parseSlice: too many slice components', tok.lineno, tok.colno);\n } else {\n break;\n }\n }\n if (this.skip(lexer.TOKEN_COLON)) {\n isSlice = true;\n } else {\n const field = node.fields[i];\n node[field] = this.parseExpression();\n isSlice = this.skip(lexer.TOKEN_COLON) || isSlice;\n }\n }\n if (!isSlice) {\n throw rethrow();\n }\n return new nodes.Array(tok.lineno, tok.colno, [node]);\n }\n };\n }\n\n function sliceLookup(obj, start, stop, step) {\n obj = obj || [];\n if (start === null) {\n start = (step < 0) ? (obj.length - 1) : 0;\n }\n if (stop === null) {\n stop = (step < 0) ? -1 : obj.length;\n } else if (stop < 0) {\n stop += obj.length;\n }\n\n if (start < 0) {\n start += obj.length;\n }\n\n const results = [];\n\n for (let i = start; ; i += step) {\n if (i < 0 || i > obj.length) {\n break;\n }\n if (step > 0 && i >= stop) {\n break;\n }\n if (step < 0 && i <= stop) {\n break;\n }\n results.push(runtime.memberLookup(obj, i));\n }\n return results;\n }\n\n function hasOwnProp(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n }\n\n const ARRAY_MEMBERS = {\n pop(index) {\n if (index === undefined) {\n return this.pop();\n }\n if (index >= this.length || index < 0) {\n throw new Error('KeyError');\n }\n return this.splice(index, 1);\n },\n append(element) {\n return this.push(element);\n },\n remove(element) {\n for (let i = 0; i < this.length; i++) {\n if (this[i] === element) {\n return this.splice(i, 1);\n }\n }\n throw new Error('ValueError');\n },\n count(element) {\n var count = 0;\n for (let i = 0; i < this.length; i++) {\n if (this[i] === element) {\n count++;\n }\n }\n return count;\n },\n index(element) {\n var i;\n if ((i = this.indexOf(element)) === -1) {\n throw new Error('ValueError');\n }\n return i;\n },\n find(element) {\n return this.indexOf(element);\n },\n insert(index, elem) {\n return this.splice(index, 0, elem);\n }\n };\n const OBJECT_MEMBERS = {\n items() {\n return lib._entries(this);\n },\n values() {\n return lib._values(this);\n },\n keys() {\n return lib.keys(this);\n },\n get(key, def) {\n var output = this[key];\n if (output === undefined) {\n output = def;\n }\n return output;\n },\n has_key(key) {\n return hasOwnProp(this, key);\n },\n pop(key, def) {\n var output = this[key];\n if (output === undefined && def !== undefined) {\n output = def;\n } else if (output === undefined) {\n throw new Error('KeyError');\n } else {\n delete this[key];\n }\n return output;\n },\n popitem() {\n const keys = lib.keys(this);\n if (!keys.length) {\n throw new Error('KeyError');\n }\n const k = keys[0];\n const val = this[k];\n delete this[k];\n return [k, val];\n },\n setdefault(key, def = null) {\n if (!(key in this)) {\n this[key] = def;\n }\n return this[key];\n },\n update(kwargs) {\n lib._assign(this, kwargs);\n return null; // Always returns None\n }\n };\n OBJECT_MEMBERS.iteritems = OBJECT_MEMBERS.items;\n OBJECT_MEMBERS.itervalues = OBJECT_MEMBERS.values;\n OBJECT_MEMBERS.iterkeys = OBJECT_MEMBERS.keys;\n\n runtime.memberLookup = function memberLookup(obj, val, autoescape) {\n if (arguments.length === 4) {\n return sliceLookup.apply(this, arguments);\n }\n obj = obj || {};\n\n // If the object is an object, return any of the methods that Python would\n // otherwise provide.\n if (lib.isArray(obj) && hasOwnProp(ARRAY_MEMBERS, val)) {\n return ARRAY_MEMBERS[val].bind(obj);\n }\n if (lib.isObject(obj) && hasOwnProp(OBJECT_MEMBERS, val)) {\n return OBJECT_MEMBERS[val].bind(obj);\n }\n\n return orig_memberLookup.apply(this, arguments);\n };\n\n return uninstall;\n}\n\nmodule.exports = installCompat;\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/jinja-compat.js"],"sourceRoot":""}