(function e(t,r){if(typeof exports==="object"&&exports&&typeof exports.nodeName!=="string"){r(exports)}else if(typeof define==="function"&&define.amd){define(["exports"],r)}else{t.Mustache={};r(t.Mustache)}})(this,function e(t){var r=Object.prototype.toString;var n=Array.isArray||function e(t){return r.call(t)==="[object Array]"};function i(e){return typeof e==="function"}function s(e){return n(e)?"array":typeof e}function a(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function o(e,t){return e!=null&&typeof e==="object"&&t in e}var u=RegExp.prototype.test;function l(e,t){return u.call(e,t)}var f=/\S/;function c(e){return!l(f,e)}var p={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function h(e){return String(e).replace(/[&<>"'`=\/]/g,function e(t){return p[t]})}var v=/\s*/;var d=/\s+/;var g=/\s*=/;var w=/\s*\}/;var y=/#|\^|\/|>|\{|&|=|!/;function x(e,r){if(!e)return[];var i=[];var s=[];var o=[];var u=false;var l=false;function f(){if(u&&!l){while(o.length)delete s[o.pop()]}else{o=[]}u=false;l=false}var p,h,x;function E(e){if(typeof e==="string")e=e.split(d,2);if(!n(e)||e.length!==2)throw new Error("Invalid tags: "+e);p=new RegExp(a(e[0])+"\\s*");h=new RegExp("\\s*"+a(e[1]));x=new RegExp("\\s*"+a("}"+e[1]))}E(r||t.tags);var U=new m(e);var T,j,S,V,C,A;while(!U.eos()){T=U.pos;S=U.scanUntil(p);if(S){for(var I=0,R=S.length;I0?n[n.length-1][4]:t;break;default:r.push(i)}}return t}function m(e){this.string=e;this.tail=e;this.pos=0}m.prototype.eos=function e(){return this.tail===""};m.prototype.scan=function e(t){var r=this.tail.match(t);if(!r||r.index!==0)return"";var n=r[0];this.tail=this.tail.substring(n.length);this.pos+=n.length;return n};m.prototype.scanUntil=function e(t){var r=this.tail.search(t),n;switch(r){case-1:n=this.tail;this.tail="";break;case 0:n="";break;default:n=this.tail.substring(0,r);this.tail=this.tail.substring(r)}this.pos+=n.length;return n};function E(e,t){this.view=e;this.cache={".":this.view};this.parent=t}E.prototype.push=function e(t){return new E(t,this)};E.prototype.lookup=function e(t){var r=this.cache;var n;if(r.hasOwnProperty(t)){n=r[t]}else{var s=this,a,u,l=false;while(s){if(t.indexOf(".")>0){n=s.view;a=t.split(".");u=0;while(n!=null&&u")u=this.renderPartial(a,r,n,i);else if(o==="&")u=this.unescapedValue(a,r);else if(o==="name")u=this.escapedValue(a,r);else if(o==="text")u=this.rawValue(a);if(u!==undefined)s+=u}return s};U.prototype.renderSection=function e(t,r,s,a){var o=this;var u="";var l=r.lookup(t[1]);function f(e){return o.render(e,r,s)}if(!l)return;if(n(l)){for(var c=0,p=l.length;c