work.suroh.tk/node_modules/nunjucks/browser/nunjucks-slim.min.js

3 lines
34 KiB
JavaScript
Raw Normal View History

2019-12-02 12:22:45 +00:00
/*! Browser bundle of nunjucks 3.2.0 (slim, only works with precompiled templates) */
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.nunjucks=n():t.nunjucks=n()}("undefined"!=typeof self?self:this,function(){return function(t){var n={};function r(i){if(n[i])return n[i].exports;var e=n[i]={i:i,l:!1,exports:{}};return t[i].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=t,r.c=n,r.d=function(t,n,i){r.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="",r(r.s=6)}([function(t,n){},function(t,n,r){"use strict";var i=Array.prototype,e=Object.prototype,u={"&":"&amp;",'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;"},o=/[&"'<>]/g;function f(t,n){return e.hasOwnProperty.call(t,n)}function c(t){return u[t]}function s(t,n,r){var i,e,u;if(t instanceof Error&&(t=(e=t).name+": "+e.message),Object.setPrototypeOf?Object.setPrototypeOf(i=Error(t),s.prototype):Object.defineProperty(i=this,"message",{enumerable:!1,writable:!0,value:t}),Object.defineProperty(i,"name",{value:"Template render error"}),Error.captureStackTrace&&Error.captureStackTrace(i,this.constructor),e){var o=Object.getOwnPropertyDescriptor(e,"stack");(u=o&&(o.get||function(){return o.value}))||(u=function(){return e.stack})}else{var f=Error(t).stack;u=function(){return f}}return Object.defineProperty(i,"stack",{get:function(){return u.call(i)}}),Object.defineProperty(i,"cause",{value:e}),i.lineno=n,i.colno=r,i.firstUpdate=!0,i.Update=function(t){var n="("+(t||"unknown path")+")";return this.firstUpdate&&(this.lineno&&this.colno?n+=" [Line "+this.lineno+", Column "+this.colno+"]":this.lineno&&(n+=" [Line "+this.lineno+"]")),n+="\n ",this.firstUpdate&&(n+=" "),this.message=n+(this.message||""),this.firstUpdate=!1,this},i}function a(t){return"[object Function]"===e.toString.call(t)}function h(t){return"[object Array]"===e.toString.call(t)}function v(t){return"[object String]"===e.toString.call(t)}function l(t){return"[object Object]"===e.toString.call(t)}function d(t){return Array.prototype.slice.call(t)}function p(t,n,r){return Array.prototype.indexOf.call(t||[],n,r)}function y(t){var n=[];for(var r in t)f(t,r)&&n.push(r);return n}(n=t.exports={}).hasOwnProp=f,n.t=function(t,r,i){if(i.Update||(i=new n.TemplateError(i)),i.Update(t),!r){var e=i;(i=Error(e.message)).name=e.name}return i},Object.setPrototypeOf?Object.setPrototypeOf(s.prototype,Error.prototype):s.prototype=Object.create(Error.prototype,{constructor:{value:s}}),n.TemplateError=s,n.escape=function(t){return t.replace(o,c)},n.isFunction=a,n.isArray=h,n.isString=v,n.isObject=l,n.groupBy=function(t,n){for(var r={},i=a(n)?n:function(t){return t[n]},e=0;e<t.length;e++){var u=t[e],o=i(u,e);(r[o]||(r[o]=[])).push(u)}return r},n.toArray=d,n.without=function(t){var n=[];if(!t)return n;for(var r=t.length,i=d(arguments).slice(1),e=-1;++e<r;)-1===p(i,t[e])&&n.push(t[e]);return n},n.repeat=function(t,n){for(var r="",i=0;i<n;i++)r+=t;return r},n.each=function(t,n,r){if(null!=t)if(i.forEach&&t.forEach===i.forEach)t.forEach(n,r);else if(t.length===+t.length)for(var e=0,u=t.length;e<u;e++)n.call(r,t[e],e,t)},n.map=function(t,n){var r=[];if(null==t)return r;if(i.map&&t.map===i.map)return t.map(n);for(var e=0;e<t.length;e++)r[r.length]=n(t[e],e);return t.length===+t.length&&(r.length=t.length),r},n.asyncIter=function(t,n,r){var i=-1;!function e(){++i<t.length?n(t[i],i,e,r):r()}()},n.asyncFor=function(t,n,r){var i=y(t||{}),e=i.length,u=-1;!function o(){var f=i[++u];u<e?n(f,t[f],u,e,o):r()}()},n.indexOf=p,n.keys=y,n.r=function(t){return y(t).map(function(n){return[n,t[n]]})},n.u=function(t){return y(t).map(function(n){return t[n]})},n.f=n.extend=function(t,n){return t=t||{},y(n).forEach(function(r){t[r]=n[r]}),t},n.inOperator=function(t,n){if(h(n)||v(n))return-1!==n.indexOf(t);if(l(n))return t in n;throw Error('Cannot use "in" operator to search for "'+t+'" in unexpected types.')}},function
//# sourceMappingURL=nunjucks-slim.min.js.map