1 line
178 KiB
Plaintext
1 line
178 KiB
Plaintext
{"version":3,"sources":["../webpack/universalModuleDefinition","../webpack/bootstrap a256c53eab8244eb3516","../nunjucks/src/lib.js","../nunjucks/src/runtime.js","../nunjucks/src/precompiled-loader.js","../nunjucks/src/loader.js","../nunjucks/src/object.js","../nunjucks/index.js","../nunjucks/src/environment.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","../nunjucks/src/filters.js","../node_modules/webpack/node_modules/events/events.js","../nunjucks/src/tests.js","../nunjucks/src/globals.js","../nunjucks/src/express-app.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","lib","require","arrayFrom","from","supportsIterators","Symbol","Frame","parent","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","apply","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","Loader","PrecompiledLoader","compiledTemplates","precompiled","getSource","src","EmitterObj","to","dirname","isRelative","filename","EventEmitter","parentWrap","prop","wrap","tmp","res","extendClass","cls","props","subclass","Obj","init","Environment","Template","loaders","precompile","compiler","parser","lexer","runtime","nodes","installJinjaCompat","e","configure","templatesPath","opts","TemplateLoader","FileSystemLoader","watch","noCache","WebLoader","useCache","web","async","express","NodeResolveLoader","reset","compile","env","eagerCompile","render","ctx","renderString","precompileString","asap","waterfall","filters","tests","globals","globalRuntime","expressApp","callbackAsap","noopTmplSrc","root","dev","throwOnUndefined","trimBlocks","lstripBlocks","window","nunjucksPrecompiled","unshift","_initLoaders","asyncFilters","extensions","extensionsList","filter","addFilter","test","addTest","loader","cache","on","fullname","emit","source","invalidateCache","addExtension","extension","__name","removeExtension","getExtension","hasExtension","addGlobal","getGlobal","wrapped","getFilter","getTest","resolveTemplate","parentName","getTemplate","ignoreMissing","that","tmpl","raw","syncResult","createTemplate","info","newTmpl","handle","app","tasks","callback","forceAsync","Context","blocks","exported","addBlock","setVariable","getVariables","block","getBlock","getSuper","idx","blk","addExport","getExported","tmplProps","tmplStr","_compile","compiled","parentFrame","didError","rootRenderFunc","Function","_getBlocks","r","normalize","defaultValue","abs","Math","isNaN","num","batch","linecount","fillWith","capitalize","toLowerCase","charAt","toUpperCase","center","width","spaces","pre","post","default_","def","bool","dictsort","caseSensitive","by","si","sort","t1","t2","a","b","dump","JSON","stringify","safe","first","forceescape","groupby","attr","indent","indentfirst","lines","sp","del","v","last","lengthFilter","Map","Set","size","list","lower","nl2br","random","floor","rejectattr","selectattr","new_","maxCount","originalStr","RegExp","nextIndex","pos","count","substring","reverse","round","precision","method","factor","pow","rounder","ceil","slices","sliceLength","extra","offset","start","end","currSlice","sum","reduce","reversed","caseSens","x","y","string","striptags","input","preserveLinebreaks","tags","trimmedInput","trim","title","words","word","truncate","killwords","orig","lastIndexOf","upper","urlencode","enc","encodeURIComponent","keyvals","puncRe","emailRe","httpHttpsRe","wwwRe","tldRe","urlize","nofollow","Infinity","noFollowAttr","matches","match","possibleUrl","shortUrl","substr","wordcount","float","parseFloat","int","parseInt","d","default","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","current","joiner","sep","range","stop","step","NunjucksView","defaultEngine","ext","extname","installCompat","Compiler","Parser","orig_contextOrFrameLookup","orig_memberLookup","orig_Compiler_assertType","orig_Parser_parseAggregate","assertType","parseAggregate","uninstall","getTokensState","tokens","process","Slice","Node","fields","Literal","node","compileSlice","_emit","_compileExpression","origState","errState","rethrow","peeked","tok","peekToken","TOKEN_LEFT_BRACKET","nextToken","isSlice","skip","TOKEN_RIGHT_BRACKET","fail","TOKEN_COLON","field","parseExpression","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;AAK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AAO6Q,MAAP;AACD,G;;;EA7KoB9F,G;;AAgLvBlL,MAAM,CAACD,OAAP,GAAiB;AACfqL,aAAW,EAAEA,WADE;AAEfC,UAAQ,EAAEA;AAFK,CAAjB,C;;;;;;;ACzkBa;;AAEb;AACA,cAAc,mBAAO,CAAC,CAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;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;;;;;;;;AClFY;;AAEb,IAAI5F,GAAG,GAAGC,mBAAO,CAAC,CAAD,CAAjB;;AACA,IAAI2M,CAAC,GAAG3M,mBAAO,CAAC,CAAD,CAAf;;AAEA,IAAI3F,OAAO,GAAGC,MAAM,CAACD,OAAP,GAAiB,EAA/B;;AAEA,SAASuS,SAAT,CAAmB7Q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ACD;;AAEDlD,OAAO,CAAC6Z,SAAR,GAAoBA,SAApB;;AAEA,SAASC,KAAT,CAAexX,GAAf,EAAoBoR,GAApB,EAAyB;AACvB,MAAI5I,GAAG,GAAGiP,UAAU,CAACzX,GAAD,CAApB;AACA,SAAQqQ,KAAK,CAAC7H,GAAD,CAAN,GAAe4I,GAAf,GAAqB5I,GAA5B;AACD;;AAED9K,OAAO,CAAC8Z,KAAR,GAAgBA,KAAhB;;AAEA,SAASE,GAAT,CAAa1X,GAAb,EAAkBoR,GAAlB,EAAuB;AACrB,MAAI5I,GAAG,GAAGmP,QAAQ,CAAC3X,GAAD,EAAM,EAAN,CAAlB;AACA,SAAQqQ,KAAK,CAAC7H,GAAD,CAAN,GAAe4I,GAAf,GAAqB5I,GAA5B;AACD;;AAED9K,OAAO,CAACga,GAAR,GAAcA,GAAd,C,CAEA;;AACAha,OAAO,CAACka,CAAR,GAAYla,OAAO,CAACma,OAApB;AACAna,OAAO,CAAC+L,CAAR,GAAY/L,OAAO,CAACqC,MAApB,C;;;;;;;ACpmBA;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;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,OAAO;AACP;AACA,s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,GAAhB,CAAlC,EAAwD;AACtD,aAAOyc,aAAa,CAACzc,GAAD,CAAb,CAAmB0d,IAAnB,CAAwB7f,GAAxB,CAAP;AACD;;AACD,QAAIuF,GAAG,CAAC9C,QAAJ,CAAazC,GAAb,KAAqBD,UAAU,CAACqf,cAAD,EAAiBjd,GAAjB,CAAnC,EAA0D;AACxD,aAAOid,cAAc,CAACjd,GAAD,CAAd,CAAoB0d,IAApB,CAAyB7f,GAAzB,CAAP;AACD;;AAED,WAAO2c,iBAAiB,CAACnV,KAAlB,CAAwB,IAAxB,EAA8BjE,SAA9B,CAAP;AACD,GAhBD;;AAkBA,SAAOyZ,SAAP;AACD;;AAEDld,MAAM,CAACD,OAAP,GAAiB0c,aAAjB,C","file":"nunjucks-slim.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 = 6);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap a256c53eab8244eb3516","'use strict';\n\nvar ArrayProto = Array.prototype;\nvar ObjProto = Object.prototype;\n\nvar escapeMap = {\n '&': '&',\n '\"': '"',\n '\\'': ''',\n '<': '<',\n '>': '>'\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\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 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\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\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\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\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\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 = 8\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.js’s\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 = 9\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 = 10\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 = 11\n// module chunks = 0","'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 = /^(?:\\(|<|<)?(.*?)(?:\\.|,|\\)|\\n|>)?$/;\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","// 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 = 13\n// module chunks = 0","'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","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":""} |