/*! * mustache.js - Logic-less {{mustache}} templates with JavaScript * http://github.com/janl/mustache.js */ (function(l){var w=function(j){function l(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function r(a){this.tail=this.string=a;this.pos=0}function m(a,b){this.view=a||{};this.parent=b;this._cache={}}function k(){this.clearCache()}function t(a,b,c,f){for(var d="",g,e,k=0,l=a.length;k":e=b.getPartial(e);"function"===typeof e&&(d+=e(c));break;case "&":e=c.lookup(e);null!=e&&(d+=e);break;case "name":e=c.lookup(e);null!=e&&(d+=j.escape(e));break;case "text":d+=e}return d}function s(a){return[RegExp(l(a[0])+"\\s*"),RegExp("\\s*"+l(a[1]))]}var w=/\s*/,y=/\s+/,A=/\S/,z=/\s*=/, B=/\s*\}/,C=/#|\^|\/|>|\{|&|=|!/,D=RegExp.prototype.test,E=Object.prototype.toString,x=Array.isArray||function(a){return"[object Array]"===E.call(a)},F={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};r.prototype.eos=function(){return""===this.tail};r.prototype.scan=function(a){return(a=this.tail.match(a))&&0===a.index?(this.tail=this.tail.substring(a[0].length),this.pos+=a[0].length,a[0]):""};r.prototype.scanUntil=function(a){var b=this.tail.search(a);switch(b){case -1:a= this.tail;this.pos+=this.tail.length;this.tail="";break;case 0:a="";break;default:a=this.tail.substring(0,b),this.tail=this.tail.substring(b),this.pos+=b}return a};m.make=function(a){return a instanceof m?a:new m(a)};m.prototype.push=function(a){return new m(a,this)};m.prototype.lookup=function(a){var b=this._cache[a];if(!b){if("."==a)b=this.view;else for(var c=this;c;){if(0"'\/]/g,function(a){return F[a]})};var v=new k;j.clearCache=function(){return v.clearCache()};j.compile=function(a,b){return v.compile(a,b)};j.compilePartial=function(a,b,c){return v.compilePartial(a, b,c)};j.compileTokens=function(a,b){return v.compileTokens(a,b)};j.render=function(a,b,c){return v.render(a,b,c)};j.to_html=function(a,b,c,f){a=j.render(a,b,c);if("function"===typeof f)f(a);else return a}};if("object"===typeof exports&&exports)w(exports);else{var s={};w(s);"function"===typeof define&&define.amd?define(s):this.Mustache=s}l.mustache=function(j,l,r){return Mustache.render(j,l,r)};l.fn.mustache=function(j,s){return l(this).map(function(r,m){var k=l.trim(l(m).html()),k=l.mustache(k,j, s);return l(k).get()})}})(jQuery);