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.
5 lines
25 KiB
5 lines
25 KiB
6 years ago
|
/*! JsRender v1.0.2: http://jsviews.com/#jsrender */
|
||
|
/*! **VERSION FOR WEB** (For NODE.JS see http://jsviews.com/download/jsrender-node.js) */
|
||
|
!function(e,t){var n=t.jQuery;"object"==typeof exports?module.exports=n?e(t,n):function(n){if(n&&!n.fn)throw"Provide jQuery or null";return e(t,n)}:"function"==typeof define&&define.amd?define(function(){return e(t)}):e(t,!1)}(function(e,t){"use strict";function n(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 r(e,t){return ae(t)&&(t=n(e?e._d?e:n(s,e):s,t),t._d=(e&&e._d||0)+1),t}function i(e,t){var n,i=t.props;for(n in i)!Me.test(n)||e[n]&&e[n].fix||(e[n]="convert"!==n?r(e.constructor.prototype[n],i[n]):i[n])}function o(e){return e}function s(){return""}function a(e){try{throw console.log("JsRender dbg breakpoint: "+e),"dbg breakpoint"}catch(t){}return this.base?this.baseApply(arguments):e}function d(e){this.name=(t.link?"JsViews":"JsRender")+" Error",this.message=e||this.name}function l(e,t){if(e){for(var n in t)e[n]=t[n];return e}}function p(e,t,n){return e?de(e)?p.apply(oe,e):(we=n?n[0]:we,/^(\W|_){5}$/.test(e+t+we)||S("Invalid delimiters"),he=e[0],_e=e[1],be=t[0],xe=t[1],ge.delimiters=[he+_e,be+xe,we],e="\\"+he+"(\\"+we+")?\\"+_e,t="\\"+be+"\\"+xe,re="(?:(\\w+(?=[\\/\\s\\"+be+"]))|(\\w+)?(:)|(>)|(\\*))\\s*((?:[^\\"+be+"]|\\"+be+"(?!\\"+xe+"))*?)",fe.rTag="(?:"+re+")",re=new RegExp("(?:"+e+re+"(\\/)?|\\"+he+"(\\"+we+")?\\"+_e+"(?:(?:\\/(\\w+))\\s*|!--[\\s\\S]*?--))"+t,"g"),fe.rTmpl=new RegExp("^\\s|\\s$|<.*>|([^\\\\]|^)[{}]|"+e+".*"+t),me):ge.delimiters}function u(e,t){t||e===!0||(t=e,e=void 0);var n,r,i,o,s=this,a="root"===t;if(e){if(o=t&&s.type===t&&s,!o)if(n=s.views,s._.useKey){for(r in n)if(o=t?n[r].get(e,t):n[r])break}else for(r=0,i=n.length;!o&&r<i;r++)o=t?n[r].get(e,t):n[r]}else if(a)o=s.root;else if(t)for(;s&&!o;)o=s.type===t?s:void 0,s=s.parent;else o=s.parent;return o||void 0}function c(){var e=this.get("item");return e?e.index:void 0}function f(){return this.index}function g(e,t,n,r){var i,o,a,d=0;if(1===n&&(r=1,n=void 0),t)for(o=t.split("."),a=o.length;e&&d<a;d++)i=e,e=o[d]?e[o[d]]:e;return n&&(n.lt=n.lt||d<a),void 0===e?r?s:"":r?function(){return e.apply(i,arguments)}:e}function v(n,r,i){var o,s,a,d,p,u,c,f=this,g=!ke&&arguments.length>1,v=f.ctx;if(n){if(f._||(p=f.index,f=f.tag),u=f,v&&v.hasOwnProperty(n)||(v=ue).hasOwnProperty(n)){if(a=v[n],"tag"===n||"tagCtx"===n||"root"===n||"parentTags"===n||f._.it===n)return a}else v=void 0;if((!ke&&f.tagCtx||f.linked)&&(a&&a._cxp||(f=f.tagCtx||ae(a)?f:(f=f.scope||f,!f.isTop&&f.ctx.tag||f),void 0!==a&&f.tagCtx&&(f=f.tagCtx.view.scope),v=f._ocps,a=v&&v.hasOwnProperty(n)&&v[n]||a,a&&a._cxp||!i&&!g||((v||(f._ocps=f._ocps||{}))[n]=a=[{_ocp:a,_vw:u,_key:n}],a._cxp={path:Te,ind:0,updateValue:function(e,n){return t.observable(a[0]).setProperty(Te,e),this}})),d=a&&a._cxp)){if(arguments.length>2)return s=a[1]?fe._ceo(a[1].deps):[Te],s.unshift(a[0]),s._cxp=d,s;if(p=d.tagElse,c=a[1]?d.tag&&d.tag.cvtArgs?d.tag.cvtArgs(p,1)[d.ind]:a[1](a[0].data,a[0],fe):a[0]._ocp,g)return a&&c!==r&&fe._ucp(n,r,f,d),f;a=c}return a&&ae(a)&&(o=function(){return a.apply(this&&this!==e?this:u,arguments)},l(o,a)),o||a}}function m(e){return e&&(e.fn?e:this.getRsc("templates",e)||le(e))}function h(e,t,n,r){var o,s,a,d,p,u="number"==typeof n&&t.tmpl.bnds[n-1];if(void 0===r&&u&&u._lr&&(r=""),void 0!==r?n=r={props:{},args:[r]}:u&&(n=u(t.data,t,fe)),u=u._bd&&u,e||u){if(s=t._lc,o=s&&s.tag,n.view=t,!o){if(o=l(new fe._tg,{_:{bnd:u,unlinked:!0,lt:n.lt},inline:!s,tagName:":",convert:e,flow:!0,tagCtx:n,tagCtxs:[n],_is:"tag"}),d=n.args.length,d>1)for(p=o.bindTo=[];d--;)p.unshift(d);s&&(s.tag=o,o.linkCtx=s),n.ctx=Q(n.ctx,(s?s.view:t).ctx),i(o,n)}o._er=r&&a,o.ctx=n.ctx||o.ctx||{},n.ctx=void 0,a=o.cvtArgs()[0],o._er=r&&a}else a=n.args[0];return a=u&&t._.onRender?t._.onRender(a,t,o):a,void 0!=a?a:""}function _(e,t){var n,r,i,o,s,a,d,l=this;if(l.tagName){if(a=l,l=(a.tagCtxs||[l])[e||0],!l)return}else a=l.tag;if(s=a.bindFrom,o=l.args,(d=a.convert)&&""+d===d&&(d="true"===d?void 0:l.view.getRsc("converters",d)||S("Unknown converter: '"+d+"'")),d&&!t&&(o=o.slice()),s){for(i=[],n=s.length;n--;)r=s[n],i.unshift(b(l,r));t&&(o=i)}if(d){if(d=d.apply(a,i||o),void 0===d)r
|
||
|
//# sourceMappingURL=jsrender.min.js.map
|