You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
4 lines
17 KiB
4 lines
17 KiB
/*! JsRender v0.9.71 (Beta): http://jsviews.com/#jsrender */
|
|
/*! **VERSION FOR WEB** (For NODE.JS see http://jsviews.com/download/jsrender-node.js) */
|
|
!function(e){var t=(0,eval)("this"),n=t.jQuery;"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=n?e(n):function(t){if(t&&!t.fn)throw"Provide jQuery or null";return e(t)}:e(!1)}(function(e){"use strict";function t(e,t){return function(){var n,r=this,i=r.base;return r.base=e,n=t.apply(r,arguments),r.base=i,n}}function n(e,n){return G(n)&&(n=t(e?e._d?e:t(a,e):a,n),n._d=1),n}function r(e,t){for(var r in t.props)_e.test(r)&&(e[r]=n(e[r],t.props[r]))}function i(e){return e}function a(){return""}function s(e){try{throw"dbg breakpoint"}catch(t){}return this.base?this.baseApply(arguments):e}function o(e){re._dbgMode=e!==!1}function d(t){this.name=(e.link?"JsViews":"JsRender")+" Error",this.message=t||this.name}function p(e,t){var n;for(n in t)e[n]=t[n];return e}function l(e,t,n){return(0!==this||e)&&(se=e?e.charAt(0):se,oe=e?e.charAt(1):oe,de=t?t.charAt(0):de,pe=t?t.charAt(1):pe,le=n||le,e="\\"+se+"(\\"+le+")?\\"+oe,t="\\"+de+"\\"+pe,D="(?:(\\w+(?=[\\/\\s\\"+de+"]))|(\\w+)?(:)|(>)|(\\*))\\s*((?:[^\\"+de+"]|\\"+de+"(?!\\"+pe+"))*?)(:\\w*)?",ne.rTag="(?:"+D+")",D=new RegExp("(?:"+e+D+"(\\/)?|\\"+se+"\\"+oe+"(?:(?:\\/(\\w+))|!--[\\s\\S]*?--))"+t,"g"),P=new RegExp("<.*>|([^\\\\]|^)[{}]|"+e+".*"+t)),[se,oe,de,pe,le]}function u(e,t){t||e===!0||(t=e,e=void 0);var n,r,i,a,s=this,o=!t||"root"===t;if(e){if(a=t&&s.type===t&&s,!a)if(n=s.views,s._.useKey){for(r in n)if(a=t?n[r].get(e,t):n[r])break}else for(r=0,i=n.length;!a&&i>r;r++)a=t?n[r].get(e,t):n[r]}else if(o)for(;s.parent;)a=s,s=s.parent;else for(;s&&!a;)a=s.type===t?s:void 0,s=s.parent;return a}function c(){var e=this.get("item");return e?e.index:void 0}function f(){return this.index}function g(e){var t,n=this,r=n.linkCtx,i=(n.ctx||{})[e];return void 0===i&&r&&r.ctx&&(i=r.ctx[e]),void 0===i&&(i=ee[e]),i&&G(i)&&!i._wrp&&(t=function(){return i.apply(this&&this!==L?this:n,arguments)},t._wrp=n,p(t,i)),t||i}function v(e){return e&&(e.fn?e:this.getRsc("templates",e)||X(e))}function m(e,t,n,i){var a,s,o="number"==typeof n&&t.tmpl.bnds[n-1],d=t.linkCtx;return void 0!==i?n=i={props:{},args:[i]}:o&&(n=o(t.data,t,z)),s=n.args[0],(e||o)&&(a=d&&d.tag,a||(a=p(new ne._tg,{_:{inline:!d,bnd:o,unlinked:!0},tagName:":",cvt:e,flow:!0,tagCtx:n}),d&&(d.tag=a,a.linkCtx=d),n.ctx=K(n.ctx,(d?d.view:t).ctx)),a._er=i&&s,r(a,n),n.view=t,a.ctx=n.ctx||{},n.ctx=void 0,s=a.cvtArgs(a.convert||"true"!==e&&e)[0],s=o&&t._.onRender?t._.onRender(s,t,a):s),void 0!=s?s:""}function h(e){var t=this,n=t.tagCtx,r=n.view,i=n.args;return e=t.convert||e,e=e&&(""+e===e?r.getRsc("converters",e)||M("Unknown converter: '"+e+"'"):e),i=i.length||n.index?e?i.slice():i:[r.data],e&&(e.depends&&(t.depends=ne.getDeps(t.depends,t,e.depends,e)),i[0]=e.apply(t,i)),i}function w(e,t){for(var n,r,i=this;void 0===n&&i;)r=i.tmpl&&i.tmpl[e],n=r&&r[t],i=i.parent;return n||z[e][t]}function x(e,t,n,i,a,s){t=t||Z;var o,d,p,l,u,c,f,g,v,m,h,w,x,b,_,y,k,j,C,T="",A=t.linkCtx||0,V=t.ctx,$=n||t.tmpl,N="number"==typeof i&&t.tmpl.bnds[i-1];for("tag"===e._is?(o=e,e=o.tagName,i=o.tagCtxs,p=o.template):(d=t.getRsc("tags",e)||M("Unknown tag: {{"+e+"}} "),p=d.template),void 0!==s?(T+=s,i=s=[{props:{},args:[]}]):N&&(i=N(t.data,t,z)),g=i.length,f=0;g>f;f++)m=i[f],(!A||!A.tag||f&&!A.tag._.inline||o._er)&&((w=$.tmpls&&m.tmpl)&&(w=m.content=$.tmpls[w-1]),m.index=f,m.tmpl=w,m.render=R,m.view=t,m.ctx=K(m.ctx,V)),(n=m.props.tmpl)&&(m.tmpl=t.getTmpl(n)),o||(o=new d._ctr,x=!!o.init,o.parent=c=V&&V.tag,o.tagCtxs=i,C=o.dataMap,A&&(o._.inline=!1,A.tag=o,o.linkCtx=A),(o._.bnd=N||A.fn)?o._.arrVws={}:o.dataBoundOnly&&M("{^{"+e+"}} tag must be data-bound")),i=o.tagCtxs,C=o.dataMap,m.tag=o,C&&i&&(m.map=i[f].map),o.flow||(h=m.ctx=m.ctx||{},l=o.parents=h.parentTags=V&&K(h.parentTags,V.parentTags)||{},c&&(l[c.tagName]=c),l[o.tagName]=h.tag=o);if(!(o._er=s)){for(r(o,i[0]),o.rendering={},f=0;g>f;f++)m=o.tagCtx=i[f],k=m.props,y=o.cvtArgs(),(b=k.dataMap||C)&&(y.length||k.dataMap)&&(_=m.map,(!_||_.src!==y[0]||a)&&(_&&_.src&&_.unmap(),_=m.map=b.map(y[0],k,void 0,!o._.bnd)),y=[_.tgt]),o.ctx=m.ctx,f||(x&&(j=o.template,o.init(m,A,o.ctx),x=void 0),A&&(A.attr=o.attr=A.attr||o.attr),u=o.attr,o._.noVws=u&&u!==Ce),v=void 0,o.render&&(v=o.render.apply(o,y)),y.length||(y=[t]),void 0===v&&(v=m.render(y[0],!0)||(a?void 0:"")),T=T?T+(v||""):v;o.rendering=void 0}return o.tagCtx=i[0],o.ctx=o.tagCtx.ctx,o._.noVws&&o._.inline&&(T="text"===u?Y.html(T):""),N&&t._.onRender?t._.onRender(T,t,o):T}function b(e,t,n,r,i,a,s,o){var d,p,l,u=this,f="array"===t;u.content=o,u.views=f?[]:{},u.parent=n,u.type=t||"top",u.data=r,u.tmpl=i,l=u._={key:0,useKey:f?0:1,id:""+ke++,onRender:s,bnds:{}},u.linked=!!s,n?(d=n.views,p=n._,p.useKey?(d[l.key="_"+p.useKey++]=u,u.index=Ve,u.getIndex=c):d.length===(l.key=u.index=a)?d.push(u):d.splice(a,0,u),u.ctx=e||n.ctx):u.ctx=e}function _(e){var t,n,r,i,a,s,o;for(t in Ee)if(a=Ee[t],(s=a.compile)&&(n=e[t+"s"]))for(r in n)i=n[r]=s(r,n[r],e,0),i._is=t,i&&(o=ne.onStore[t])&&o(r,i,s)}function y(e,t,r){function i(){var t=this;t._={inline:!0,unlinked:!0},t.tagName=e}var a,s,o,d=new ne._tg;if(G(t)?t={depends:t.depends,render:t}:""+t===t&&(t={template:t}),s=t.baseTag){t.flow=!!t.flow,t.baseTag=s=""+s===s?r&&r.tags[s]||te[s]:s,d=p(d,s);for(o in t)d[o]=n(s[o],t[o])}else d=p(d,t);return void 0!==(a=d.template)&&(d.template=""+a===a?X[a]||X(a):a),d.init!==!1&&((i.prototype=d).constructor=d._ctr=i),r&&(d._parentTmpl=r),d}function k(e){return this.base.apply(this,e)}function j(t,n,r,i){function a(n){var a,o;if(""+n===n||n.nodeType>0&&(s=n)){if(!s)if(/^\.\/[^\\:*?"<>]*$/.test(n))(o=X[t=t||n])?n=o:s=document.getElementById(n);else if(e.fn&&!P.test(n))try{s=e(document).find(n)[0]}catch(d){}s&&(i?n=s.innerHTML:(a=s.getAttribute(Ae),a?a!==Re?(n=X[a],delete X[a]):e.fn&&(n=e.data(s)[Re]):(t=t||(e.fn?Re:n),n=j(t,s.innerHTML,r,i)),n.tmplName=t=t||a,t!==Re&&(X[t]=n),s.setAttribute(Ae,t),e.fn&&e.data(s,Re,n))),s=void 0}else n.fn||(n=void 0);return n}var s,o,d=n=n||"";return 0===i&&(i=void 0,d=a(d)),i=i||(n.markup?n:{}),i.tmplName=t,r&&(i._parentTmpl=r),!d&&n.markup&&(d=a(n.markup))&&d.fn&&(d=d.markup),void 0!==d?(d.fn||n.fn?d.fn&&(o=d):(n=T(d,i),N(d.replace(ve,"\\$&"),n)),o||(_(i),o=p(function(){return n.render.apply(n,arguments)},n)),t&&!r&&t!==Re&&(Me[t]=o),o):void 0}function C(e){function t(t,n){this.tgt=e.getTgt(t,n)}return G(e)&&(e={getTgt:e}),e.baseMap&&(e=p(p({},e.baseMap),e)),e.map=function(e,n){return new t(e,n)},e}function T(t,n){var r,i=re.wrapMap||{},a=p({tmpls:[],links:{},bnds:[],_is:"template",render:R},n);return a.markup=t,n.htmlTag||(r=we.exec(t),a.htmlTag=r?r[1].toLowerCase():""),r=i[a.htmlTag],r&&r!==i.div&&(a.markup=e.trim(a.markup)),a}function A(e,t){function n(i,a,s){var o,d,p,l;if(i&&typeof i===Te&&!i.nodeType&&!i.markup&&!i.getTgt){for(p in i)n(p,i[p],a);return z}return void 0===a&&(a=i,i=void 0),i&&""+i!==i&&(s=a,a=i,i=void 0),l=s?s[r]=s[r]||{}:n,d=t.compile,null===a?i&&delete l[i]:(a=d?d(i,a,s,0):a,i&&(l[i]=a)),d&&a&&(a._is=e),a&&(o=ne.onStore[e])&&o(i,a,d),a}var r=e+"s";z[r]=n}function R(e,t,n,r,i,a){var s,o,d,p,l,u,c,f,g=r,v="";if(t===!0?(n=t,t=void 0):typeof t!==Te&&(t=void 0),(d=this.tag)?(l=this,g=g||l.view,p=g.getTmpl(d.template||l.tmpl),arguments.length||(e=g)):p=this,p){if(!g&&e&&"view"===e._is&&(g=e),g&&e===g&&(e=g.data),u=!g,ie=ie||u,g||((t=t||{}).root=e),!ie||re.useViews||p.useViews||g&&g!==Z)v=V(p,e,t,n,g,i,a,d);else{if(g?(c=g.data,f=g.index,g.index=Ve):(g=Z,g.data=e,g.ctx=t),W(e)&&!n)for(s=0,o=e.length;o>s;s++)g.index=s,g.data=e[s],v+=p.fn(e[s],g,z);else g.data=e,v+=p.fn(e,g,z);g.data=c,g.index=f}u&&(ie=void 0)}return v}function V(e,t,n,r,i,a,s,o){function d(e){_=p({},n),_[x]=e}var l,u,c,f,g,v,m,h,w,x,_,y,k="";if(o&&(w=o.tagName,y=o.tagCtx,n=n?K(n,o.ctx):o.ctx,e===i.content?m=e!==i.ctx._wrp?i.ctx._wrp:void 0:e!==y.content?e===o.template?(m=y.tmpl,n._wrp=y.content):m=y.content||i.content:m=i.content,y.props.link===!1&&(n=n||{},n.link=!1),(x=y.props.itemVar)&&("~"!==x.charAt(0)&&$("Use itemVar='~myItem'"),x=x.slice(1))),i&&(s=s||i._.onRender,n=K(n,i.ctx)),a===!0&&(v=!0,a=0),s&&(n&&n.link===!1||o&&o._.noVws)&&(s=void 0),h=s,s===!0&&(h=void 0,s=i._.onRender),n=e.helpers?K(e.helpers,n):n,_=n,W(t)&&!r)for(c=v?i:void 0!==a&&i||new b(n,"array",i,t,e,a,s),i&&i._.useKey&&(c._.bnd=!o||o._.bnd&&o),x&&(c.it=x),x=c.it,l=0,u=t.length;u>l;l++)x&&d(t[l]),f=new b(_,"item",c,t[l],e,(a||0)+l,s,m),g=e.fn(t[l],f,z),k+=c._.onRender?c._.onRender(g,f):g;else x&&d(t),c=v?i:new b(_,w||"data",i,t,e,a,s,m),o&&!o.flow&&(c.tag=o),k+=e.fn(t,c,z);return h?h(k,c):k}function M(e,t,n){var r=re.onError(e,t,n);if(""+e===e)throw new ne.Err(r);return!t.linkCtx&&t.linked?Y.html(r):r}function $(e){M("Syntax error\n"+e)}function N(e,t,n,r,i){function a(t){t-=f,t&&v.push(e.substr(f,t).replace(fe,"\\n"))}function s(t,n){t&&(t+="}}",$((n?"{{"+n+"}} block has {{/"+t+" without {{"+t:"Unmatched or missing {{/"+t)+", in template:\n"+e))}function o(r,o,d,c,h,w,x,b,_,y,k,j){x&&_&&(b=_,_=void 0),(x&&o||_&&!h||y&&!d)&&$(r),_&&(_=_.slice(1)),w&&(h=":",c=Ce),y=y||n&&!i;var C=(o||n)&&[[]],T="",A="",R="",V="",M="",N="",E="",S="",U=!y&&!h;d=d||(b=b||"#data",h),a(j),f=j+r.length,x?u&&v.push(["*","\n"+b.replace(/^:/,"ret+= ").replace(ge,"$1")+";\n"]):d?("else"===d&&(he.test(b)&&$('for "{{else if expr}}" use "{{else expr}}"'),C=m[7]&&[[]],m[8]=e.substring(m[8],j),m=g.pop(),v=m[2],U=!0),b&&I(b.replace(fe," "),C,t).replace(me,function(e,t,n,r,i,a,s,o){return r="'"+i+"':",s?(A+=a+",",V+="'"+o+"',"):n?(R+=r+a+",",N+=r+"'"+o+"',"):t?E+=a:("trigger"===i&&(S+=a),T+=r+a+",",M+=r+"'"+o+"',",l=l||_e.test(i)),""}).slice(0,-1),C&&C[0]&&C.pop(),p=[d,c||!!_||l||"",U&&[],F(V,M,N),F(A,T,R),E,S,C||0],v.push(p),U&&(g.push(m),m=p,m[8]=f)):k&&(s(k!==m[0]&&"else"!==m[0]&&k,m[0]),m[8]=e.substring(m[8],j),m=g.pop()),s(!m&&k),v=m[2]}var d,p,l,u=re.allowCode||t&&t.allowCode,c=[],f=0,g=[],v=c,m=[,,c];return u&&(t.allowCode=u),n&&(e=se+e+pe),s(g[0]&&g[0][2].pop()[0]),e.replace(D,o),a(e.length),(f=c[c.length-1])&&s(""+f!==f&&+f[8]===f[8]&&f[0]),n?(d=U(c,e,n),E(d,[c[0][7]])):d=U(c,t),d}function E(e,t){var n,r,i=0,a=t.length;for(e.deps=[];a>i;i++){r=t[i];for(n in r)"_jsvto"!==n&&r[n].length&&(e.deps=e.deps.concat(r[n]))}e.paths=r}function F(e,t,n){return[e.slice(0,-1),t.slice(0,-1),n.slice(0,-1)]}function S(e,t){return"\n "+(t?t+":{":"")+"args:["+e[0]+"]"+(e[1]||!t?",\n props:{"+e[1]+"}":"")+(e[2]?",\n ctx:{"+e[2]+"}":"")}function I(e,t,n){function r(r,h,w,x,b,_,y,k,j,C,T,A,R,V,M,E,F,S,I,U){function K(e,n,r,s,o,d,u,c){var f="."===r;if(r&&(b=b.slice(n.length),f||(e=(s?'view.hlp("'+s+'")':o?"view":"data")+(c?(d?"."+d:s?"":o?"":"."+r)+(u||""):(c=s?"":o?d||"":r,"")),e+=c?"."+c:"",e=n+("view.data"===e.slice(0,9)?e.slice(5):e)),p)){if(q="linkTo"===i?a=t._jsvto=t._jsvto||[]:l.bd,B=f&&q[q.length-1]){if(B._jsv){for(;B.sb;)B=B.sb;B.bnd&&(b="^"+b.slice(1)),B.sb=b,B.bnd=B.bnd||"^"===b.charAt(0)}}else q.push(b);m[g]=I+(f?1:0)}return e}x=p&&x,x&&!k&&(b=x+b),_=_||"",w=w||h||A,b=b||j,C=C||F||"";var J,O,q,B,L;if(!y||d||o){if(p&&E&&!d&&!o&&(!i||s||a)&&(J=m[g-1],U.length-1>I-(J||0))){if(J=U.slice(J,I+r.length),O!==!0)if(q=a||u[g-1].bd,B=q[q.length-1],B&&B.prm){for(;B.sb&&B.sb.prm;)B=B.sb;L=B.sb={path:B.sb,bnd:B.bnd}}else q.push(L={path:q.pop()});E=oe+":"+J+" onerror=''"+de,O=f[E],O||(f[E]=!0,f[E]=O=N(E,n,!0)),O!==!0&&L&&(L._jsv=O,L.prm=l.bd,L.bnd=L.bnd||L.path&&L.path.indexOf("^")>=0)}return d?(d=!R,d?r:A+'"'):o?(o=!V,o?r:A+'"'):(w?(m[g]=I++,l=u[++g]={bd:[]},w):"")+(S?g?"":(c=U.slice(c,I),(i?(i=s=a=!1,"\b"):"\b,")+c+(c=I+r.length,p&&t.push(l.bd=[]),"\b")):k?(g&&$(e),p&&t.pop(),i=b,s=x,c=I+r.length,x&&(p=l.bd=t[i]=[]),b+":"):b?b.split("^").join(".").replace(ue,K)+(C?(l=u[++g]={bd:[]},v[g]=!0,C):_):_?_:M?(v[g]=!1,l=u[--g],M+(C?(l=u[++g],v[g]=!0,C):"")):T?(v[g]||$(e),","):h?"":(d=R,o=V,'"'))}$(e)}var i,a,s,o,d,p=t&&t[0],l={bd:p},u={0:l},c=0,f=n?n.links:p&&(p.links=p.links||{}),g=0,v={},m={},h=(e+(n?" ":"")).replace(ce,r);return!g&&h||$(e)}function U(e,t,n){var r,i,a,s,o,d,p,l,u,c,f,g,v,m,h,w,x,b,_,y,k,j,C,A,R,V,M,N,F,I,K=0,J=re.useViews||t.useViews||t.tags||t.templates||t.helpers||t.converters,O="",q={},B=e.length;for(""+t===t?(b=n?'data-link="'+t.replace(fe," ").slice(1,-1)+'"':t,t=0):(b=t.tmplName||"unnamed",t.allowCode&&(q.allowCode=!0),t.debug&&(q.debug=!0),f=t.bnds,x=t.tmpls),r=0;B>r;r++)if(i=e[r],""+i===i)O+='\n+"'+i+'"';else if(a=i[0],"*"===a)O+=";\n"+i[1]+"\nret=ret";else{if(s=i[1],k=!n&&i[2],o=S(i[3],"params")+"},"+S(v=i[4]),N=i[5],I=i[6],j=i[8]&&i[8].replace(ge,"$1"),(R="else"===a)?g&&g.push(i[7]):(K=0,f&&(g=i[7])&&(g=[g],K=f.push(1))),J=J||v[1]||v[2]||g||/view.(?!index)/.test(v[0]),(V=":"===a)?s&&(a=s===Ce?">":s+a):(k&&(_=T(j,q),_.tmplName=b+"/"+a,_.useViews=_.useViews||J,U(k,_),J=_.useViews,x.push(_)),R||(y=a,J=J||a&&(!te[a]||!te[a].flow),A=O,O=""),C=e[r+1],C=C&&"else"===C[0]),F=N?";\ntry{\nret+=":"\n+",m="",h="",V&&(g||I||s&&s!==Ce)){if(M="return {"+o+"};",w='c("'+s+'",view,',M=new Function("data,view,j,u"," // "+b+" "+K+" "+a+"\n"+M),M._er=N,m=w+K+",",h=")",M._tag=a,n)return M;E(M,g),c=!0}if(O+=V?(n?(N?"\ntry{\n":"")+"return ":F)+(c?(c=void 0,J=u=!0,w+(g?(f[K-1]=M,K):"{"+o+"}")+")"):">"===a?(p=!0,"h("+v[0]+")"):(l=!0,"((v="+(v[0]||"data")+')!=null?v:"")')):(d=!0,"\n{view:view,tmpl:"+(k?x.length:"0")+","+o+"},"),y&&!C){if(O="["+O.slice(0,-1)+"]",w='t("'+y+'",view,this,',n||g){if(O=new Function("data,view,j,u"," // "+b+" "+K+" "+y+"\nreturn "+O+";"),O._er=N,O._tag=y,g&&E(f[K-1]=O,g),n)return O;m=w+K+",undefined,",h=")"}O=A+F+w+(K||O)+")",g=0,y=0}N&&(J=!0,O+=";\n}catch(e){ret"+(n?"urn ":"+=")+m+"j._err(e,view,"+N+")"+h+";}\n"+(n?"":"ret=ret"))}O="// "+b+"\nvar v"+(d?",t=j._tag":"")+(u?",c=j._cnvt":"")+(p?",h=j.converters.html":"")+(n?";\n":',ret=""\n')+(q.debug?"debugger;":"")+O+(n?"\n":";\nreturn ret;"),re._dbgMode&&(O="try {\n"+O+"\n}catch(e){\nreturn j._err(e, view);\n}");try{O=new Function("data,view,j,u",O)}catch(L){$("Compiled template code:\n\n"+O+'\n: "'+L.message+'"')}return t&&(t.fn=O,t.useViews=!!J),O}function K(e,t){return e&&e!==t?t?p(p({},t),e):e:t&&p({},t)}function J(e){return je[e]||(je[e]="&#"+e.charCodeAt(0)+";")}function O(e){var t,n,r=[];if(typeof e===Te)for(t in e)n=e[t],n&&n.toJSON&&!n.toJSON()||G(n)||r.push({key:t,prop:n});return r}function q(t,n,r){var i=this.jquery&&(this[0]||M('Unknown template: "'+this.selector+'"')),a=i.getAttribute(Ae);return R.call(a?e.data(i)[Re]:X(i),t,n,r)}function B(e){return void 0!=e?be.test(e)&&(""+e).replace(ye,J)||e:""}var L=(0,eval)("this"),Q=e===!1;e=e&&e.fn?e:L.jQuery;var H,D,P,Z,z,G,W,X,Y,ee,te,ne,re,ie,ae="v1.0.0-beta",se="{",oe="{",de="}",pe="}",le="^",ue=/^(!*?)(?:null|true|false|\d[\d.]*|([\w$]+|\.|~([\w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g,ce=/(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(!*?[#~]?[\w$.^]+)?\s*((\+\+|--)|\+|-|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?[#~]?[\w$.^]+)([([])?)|(,\s*)|(\(?)\\?(?:(')|("))|(?:\s*(([)\]])(?=\s*[.^]|\s*$|[^\(\[])|[)\]])([([]?))|(\s+)/g,fe=/[ \t]*(\r\n|\n|\r)/g,ge=/\\(['"])/g,ve=/['"\\]/g,me=/(?:\x08|^)(onerror:)?(?:(~?)(([\w$_\.]+):)?([^\x08]+))\x08(,)?([^\x08]+)/gi,he=/^if\s/,we=/<(\w+)[>\s]/,xe=/[\x00`><"'&]/g,be=/[\x00`><\"'&]/,_e=/^on[A-Z]|^convert(Back)?$/,ye=xe,ke=0,je={"&":"&","<":"<",">":">","\x00":"�","'":"'",'"':""","`":"`"},Ce="html",Te="object",Ae="data-jsv-tmpl",Re="jsvTmpl",Ve="For #index in nested block use #getIndex().",Me={},$e=L.jsrender,Ne=$e&&e&&!e.render,Ee={template:{compile:j},tag:{compile:y},helper:{},converter:{}};if(z={jsviews:ae,settings:function(e){p(re,e),o(re._dbgMode),re.jsv&&re.jsv()},sub:{View:b,Err:d,tmplFn:N,parse:I,extend:p,extendCtx:K,syntaxErr:$,onStore:{},_ths:r,_tg:function(){}},map:C,_cnvt:m,_tag:x,_err:M},(d.prototype=new Error).constructor=d,c.depends=function(){return[this.get("item"),"index"]},f.depends="index",b.prototype={get:u,getIndex:f,getRsc:w,getTmpl:v,hlp:g,_is:"view"},!($e||e&&e.render)){for(H in Ee)A(H,Ee[H]);X=z.templates,Y=z.converters,ee=z.helpers,te=z.tags,ne=z.sub,re=z.settings,ne._tg.prototype={baseApply:k,cvtArgs:h},Z=ne.topView=new b,e?(e.fn.render=q,e.observable&&(p(ne,e.views.sub),z.map=e.views.map)):(e={},Q&&(L.jsrender=e),e.renderFile=e.__express=e.compile=function(){throw"Node.js: use npm jsrender, or jsrender-node.js"},e.isFunction=function(e){return"function"==typeof e},e.isArray=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},ne._jq=function(t){t!==e&&(p(t,e),e=t,e.fn.render=q,delete e.jsrender)},e.jsrender=ae),G=e.isFunction,W=e.isArray,e.render=Me,e.views=z,e.templates=X=z.templates,re({debugMode:o,delimiters:l,onError:function(e,t,n){return t&&(e=void 0===n?"{Error: "+(e.message||e)+"}":G(n)?n(e,t):n),void 0==e?"":e},_dbgMode:!1}),te({"if":{render:function(e){var t=this,n=t.tagCtx,r=t.rendering.done||!e&&(arguments.length||!n.index)?"":(t.rendering.done=!0,t.selected=n.index,n.render(n.view,!0));return r},flow:!0},"for":{render:function(e){var t,n=!arguments.length,r=this,i=r.tagCtx,a="",s=0;return r.rendering.done||(t=n?i.view.data:e,void 0!==t&&(a+=i.render(t,n),s+=W(t)?t.length:1),(r.rendering.done=s)&&(r.selected=i.index)),a},flow:!0},props:{baseTag:"for",dataMap:C(O),flow:!0},include:{flow:!0},"*":{render:i,flow:!0},":*":{render:i,flow:!0},dbg:ee.dbg=Y.dbg=s}),Y({html:B,attr:B,url:function(e){return void 0!=e?encodeURI(""+e):null===e?e:""}}),l()}return Ne&&$e.views.sub._jq(e),e||$e});
|
|
//# sourceMappingURL=jsrender.min.js.map
|