Comparing version 18.9.0 to 18.10.0
@@ -17,4 +17,4 @@ #!/usr/bin/env node | ||
var fs = require("fs") | ||
, path = require("path") | ||
, child = require("child_process") | ||
, path = require("../path") | ||
, opts = {} | ||
@@ -21,0 +21,0 @@ |
@@ -14,5 +14,6 @@ | ||
, hasOwn = fns.hasOwnProperty | ||
, fnRe = /(['\/"])(?:\\?.)*?\1|\b(?:false|in|new|null|this|true|typeof|void)\b|\.\w+|\w+:/g | ||
, formatRe = /{(?!\\)((?:(["'/])(?:\\?.)*?\2|[^}])*)}/g | ||
, fnRe = /('|")(?:\\?.)*?\1|\/(?:\\?.)+?\/[gim]*|\b(?:false|in|new|null|this|true|typeof|void)\b|\.\w+|\w+:/g | ||
, formatRe = /{(?!\\)((?:("|')(?:\\?.)*?\2|[^}])*?)}/g | ||
, numbersRe = /-?\d+\.?\d*/g | ||
, wordRe = /\b[a-z_$][\w$]*/ig | ||
, unescapeRe = /{\\/g | ||
@@ -109,3 +110,3 @@ | ||
if (!fn) { | ||
fn = expr.replace(fnRe, "").match(/\b[a-z_$][\w$]*/ig) || [] | ||
fn = expr.replace(fnRe, "").match(wordRe) || [] | ||
for (; arr.length > 1; ) { | ||
@@ -138,2 +139,16 @@ expr = arr.pop() | ||
Fn.keys = function(str) { | ||
var i, tmp | ||
, arr = [] | ||
, match = str.match(formatRe) | ||
if (match) { | ||
for (i = match.length; i--; ) { | ||
if (tmp = match[i].replace(fnRe, "").match(wordRe)) { | ||
arr.push.apply(arr, tmp) | ||
} | ||
} | ||
} | ||
return arr.uniq() | ||
} | ||
S.format = function() { | ||
@@ -140,0 +155,0 @@ var args = A.slice.call(arguments) |
@@ -9,2 +9,3 @@ | ||
exports.urlRe = /^([-.\da-z]+:)?\/\/(([\da-z.]*)(?::(\d+))?)(\/.*?)(\?.*?)?(#.*)?$/ | ||
exports.domainRe = /^(?:(?:xn-|[a-z\d]+)(?:-[a-z\d]+)*(?:\.(?=.)|$)){2,}/i | ||
@@ -11,0 +12,0 @@ exports.ipv4Re = /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?=.)|$)){4}$/ |
{ | ||
"name": "litejs", | ||
"version": "18.9.0", | ||
"version": "18.10.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "author": "Lauri Rooden <lauri@rooden.ee>", |
@@ -11,4 +11,4 @@ | ||
, nativeDate = Date | ||
, empty = {} | ||
, hasOwn = empty.hasOwnProperty | ||
, updateSnaps = exports.testUpdateSnaps = {} | ||
, hasOwn = updateSnaps.hasOwnProperty | ||
/*** mockTime */ | ||
@@ -26,4 +26,4 @@ , fakeNow | ||
/* mock time end */ | ||
, color = (process.stdout || empty).isTTY && process.argv.indexOf("--no-color") == -1 | ||
, only = process.argv.slice(2) | ||
, color = (process.stdout || updateSnaps).isTTY && process.argv.indexOf("--no-color") == -1 | ||
, only = [] | ||
, totalCases = 0 | ||
@@ -44,2 +44,9 @@ , failedCases = 0 | ||
for (var arg, argi = 2; arg = process.argv[argi++]; ) { | ||
if (arg === "-u") { | ||
updateSnaps[process.argv[argi++]] = true | ||
} else { | ||
only.push(arg) | ||
} | ||
} | ||
@@ -46,0 +53,0 @@ exports.defineAssert = defineAssert |
/*! litejs.com/MIT-LICENSE.txt */ | ||
!function(exports){var a,b,c,O,P="prototype",F=Function,esc=escape,patched=(exports.xhr||exports)._patched=[] | ||
function add(t,r){O[t]||(O[t]=F("a,b,c","var P='"+P+"',o=Object[P].hasOwnProperty;"+r),patched.push(t))}F.nop=function(){},O=F[P],add("bind","var t=this;b=[].slice.call(arguments,1);c=function(){return t.apply(this instanceof c?this:a,b.concat(b.slice.call(arguments)))};if(t[P])c[P]=t[P];return c"),O=Object,add("create","b=Function.nop;b[P]=a;a=new b;b[P]=null;return a"),add("keys","c=[];for(b in a)o.call(a,b)&&c.push(b);return c"),add("assign","var t,k,i=1,A=arguments,l=A.length;for(;i<l;)if(t=A[i++])for(k in t)if(o.call(t,k))a[k]=t[k];return a"),O=Array,add("isArray","return a instanceof Array"),O=O[P],a="var t=this,l=t.length,o=[],i=-1;",c="if(t[i]===a)return i;return -1",add("indexOf",a+"i+=b|0;while(++i<l)"+c),add("lastIndexOf",a+"i=(b|0)||l;i>--l&&(i=l)||i<0&&(i+=l);++i;while(--i>-1)"+c),b=a+"if(arguments.length<2)b=t",c="b=a.call(null,b,t[i],i,t);return b",add("reduce",b+"[++i];while(++i<l)"+c),add("reduceRight",b+"[--l];i=l;while(i--)"+c),b=a+"while(++i<l)if(i in t)",add("forEach",b+"a.call(b,t[i],i,t)"),add("every",b+"if(!a.call(b,t[i],i,t))return!1;return!0"),c=";return o",add("map",b+"o[i]=a.call(b,t[i],i,t)"+c),b+="if(a.call(b,t[i],i,t))",add("filter",b+"o.push(t[i])"+c),add("some",b+"return!0;return!1"),O=String[P],add("trim","return this.replace(/^\\s+|\\s+$/g,'')"),O=exports.performance||(exports.performance={}),add("now",a="return+new Date"),O=Date,add("now",a),O=O[P],add("toJSON","return this.date('iso')"),exports.Event||(exports.Event={}),exports.JSON||(patched.push("JSON"),exports.JSON={map:{"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t",'"':'\\"',"\\":"\\\\"},parse:F("t","return Function('return('+t+')')()"),stringify:F("o","var i,s=[],c=typeof o;"+"if(c=='string'){"+"for(i=o.length;c=o.charAt(--i);s[i]=JSON.map[c]||(c<' '?'\\\\u00'+((c=c.charCodeAt(0))|4)+(c%16).toString(16):c));"+"o='\"'+s.join('')+'\"'"+"}"+"if(o&&c=='object'){"+"if(typeof o.toJSON=='function')return'\"'+o.toJSON()+'\"';"+"if(Array.isArray(o)){"+"for(i=o.length;i--;s[i]=JSON.stringify(o[i]));"+"return'['+s.join()+']'"+"}"+"for(i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(JSON.stringify(i)+':'+JSON.stringify(o[i]));"+"o='{'+s.join()+'}'"+"}"+"return o==null?'null':''+o")}),"a"!=esc("a",0)&&(patched.push("escape"),exports.escape=function(t){return esc(t)}),eval("/*@cc_on try{document.execCommand('BackgroundImageCache',false,true)}catch(e){}@*/")}(this) | ||
function add(t,r){O[t]||(O[t]=F("a,b,c","var P='"+P+"',o=Object[P].hasOwnProperty;"+r),patched.push(t))}F.nop=function(){},O=F[P],add("bind","var t=this;b=[].slice.call(arguments,1);c=function(){return t.apply(this instanceof c?this:a,b.concat(b.slice.call(arguments)))};if(t[P])c[P]=t[P];return c"),O=Object,add("create","b=Function.nop;b[P]=a;a=new b;b[P]=null;return a"),add("keys","c=[];for(b in a)o.call(a,b)&&c.push(b);return c"),add("assign","var t,k,i=1,A=arguments,l=A.length;for(;i<l;)if(t=A[i++])for(k in t)if(o.call(t,k))a[k]=t[k];return a"),O=Array,add("isArray","return Object[P].toString.call(a)==='[object Array]'"),O=O[P],a="var t=this,l=t.length,o=[],i=-1;",c="if(t[i]===a)return i;return -1",add("indexOf",a+"i+=b|0;while(++i<l)"+c),add("lastIndexOf",a+"i=(b|0)||l;i>--l&&(i=l)||i<0&&(i+=l);++i;while(--i>-1)"+c),b=a+"if(arguments.length<2)b=t",c="b=a.call(null,b,t[i],i,t);return b",add("reduce",b+"[++i];while(++i<l)"+c),add("reduceRight",b+"[--l];i=l;while(i--)"+c),b=a+"while(++i<l)if(i in t)",add("forEach",b+"a.call(b,t[i],i,t)"),add("every",b+"if(!a.call(b,t[i],i,t))return!1;return!0"),c=";return o",add("map",b+"o[i]=a.call(b,t[i],i,t)"+c),b+="if(a.call(b,t[i],i,t))",add("filter",b+"o.push(t[i])"+c),add("some",b+"return!0;return!1"),O=String[P],add("trim","return this.replace(/^\\s+|\\s+$/g,'')"),O=exports.performance||(exports.performance={}),add("now",a="return+new Date"),O=Date,add("now",a),O=O[P],add("toJSON","return this.date('iso')"),exports.Event||(exports.Event={}),exports.JSON||(patched.push("JSON"),exports.JSON={map:{"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t",'"':'\\"',"\\":"\\\\"},parse:F("t","return Function('return('+t+')')()"),stringify:F("o","var i,s=[],c=typeof o;"+"if(c=='string'){"+"for(i=o.length;c=o.charAt(--i);s[i]=JSON.map[c]||(c<' '?'\\\\u00'+((c=c.charCodeAt(0))|4)+(c%16).toString(16):c));"+"o='\"'+s.join('')+'\"'"+"}"+"if(o&&c=='object'){"+"if(typeof o.toJSON=='function')return'\"'+o.toJSON()+'\"';"+"if(Array.isArray(o)){"+"for(i=o.length;i--;s[i]=JSON.stringify(o[i]));"+"return'['+s.join()+']'"+"}"+"for(i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(JSON.stringify(i)+':'+JSON.stringify(o[i]));"+"o='{'+s.join()+'}'"+"}"+"return o==null?'null':''+o")}),"a"!=esc("a",0)&&(patched.push("escape"),exports.escape=function(t){return esc(t)}),eval("/*@cc_on try{document.execCommand('BackgroundImageCache',false,true)}catch(e){}@*/")}(this) |
84
ui/1.js
@@ -22,20 +22,22 @@ /*! litejs.com/MIT-LICENSE.txt */ | ||
return function(){var e=+new Date | ||
clearTimeout(r),l<e?(l=e+t,a.apply(null,arguments)):n&&(o=arguments,r=setTimeout(function(){a.apply(i,o)},l-e))}}}(Function.prototype),function(e,a){var o,r="prototype",t=Array[r],n=Function[r],i=String[r],l=Number[r],c=n.call.bind(t.slice),s={},u=s.hasOwnProperty,f=/(['\/"])(?:\\?.)*?\1|\b(?:false|in|new|null|this|true|typeof|void)\b|\.\w+|\w+:/g,h=/{(?!\\)((?:(["'/])(?:\\?.)*?\2|[^}])*)}/g,p=/-?\d+\.?\d*/g,d=/{\\/g | ||
function m(){for(var e=this.length,t=c(arguments),n=-1;e--;)~t.indexOf(this[e])&&this.splice(n=e,1) | ||
return n}function v(e){var t=[],n=e.match(/[^"']+?->|.+$/g),i=c(arguments,1),r=i.length+":"+e,o=s[r] | ||
if(!o){for(o=e.replace(f,"").match(/\b[a-z_$][\w$]*/gi)||[];1<n.length;)e=n.pop(),t=n.pop().match(/\w+/g)||[],m.apply(o,t),n.length&&n.push("function("+t+"){return("+e+")}"+(i[0]?".bind(this)":"")) | ||
e="return("+e+")",i[1]&&(n=a.keys(i.slice(1)).map(v("a->'__'+a")),t.unshift.apply(t,n),e="with("+n.join(")with(")+"){"+e+"}"),i[0]&&(e="with(this){"+e+"}",o[0]&&(e="var "+o.uniq().join("='',")+"='';"+e)),o=s[r]=Function(t,e)}return i.length?o.bind.apply(o,i):o}function g(r,o,a,l){return function(e){for(var t=+(arguments.length?e:this),n=0,i=a||{"default":"{n} {u}{s}"};t>=r[n];)t/=r[n++] | ||
return n==r.length&&l?l(this):(n=o[n],(i[t<2?n:n+"s"]||i["default"]).format({n:t,u:n,s:t<2?"":"s"}))}}function y(e){var t=1 | ||
function n(){!--t&&e&&e.call(this)}return n.wait=function(){return t++,n},n}function _(){return!0}function w(){return!1}(e.Fn=v).hold=function(e){var t,i=this,r=[],o=[],n=y(function(){for(var e,t=i,n=o.length;n--;n--)o[n]?i[o[n-1]]=o[n]:delete i[o[n-1]] | ||
clearTimeout(r),l<e?(l=e+t,a.apply(null,arguments)):n&&(o=arguments,r=setTimeout(function(){a.apply(i,o)},l-e))}}}(Function.prototype),function(e,a){var o,r="prototype",t=Array[r],n=Function[r],i=String[r],l=Number[r],c=n.call.bind(t.slice),s={},u=s.hasOwnProperty,f=/('|")(?:\\?.)*?\1|\/(?:\\?.)+?\/[gim]*|\b(?:false|in|new|null|this|true|typeof|void)\b|\.\w+|\w+:/g,h=/{(?!\\)((?:("|')(?:\\?.)*?\2|[^}])*?)}/g,p=/-?\d+\.?\d*/g,d=/\b[a-z_$][\w$]*/gi,m=/{\\/g | ||
function v(){for(var e=this.length,t=c(arguments),n=-1;e--;)~t.indexOf(this[e])&&this.splice(n=e,1) | ||
return n}function g(e){var t=[],n=e.match(/[^"']+?->|.+$/g),i=c(arguments,1),r=i.length+":"+e,o=s[r] | ||
if(!o){for(o=e.replace(f,"").match(d)||[];1<n.length;)e=n.pop(),t=n.pop().match(/\w+/g)||[],v.apply(o,t),n.length&&n.push("function("+t+"){return("+e+")}"+(i[0]?".bind(this)":"")) | ||
e="return("+e+")",i[1]&&(n=a.keys(i.slice(1)).map(g("a->'__'+a")),t.unshift.apply(t,n),e="with("+n.join(")with(")+"){"+e+"}"),i[0]&&(e="with(this){"+e+"}",o[0]&&(e="var "+o.uniq().join("='',")+"='';"+e)),o=s[r]=Function(t,e)}return i.length?o.bind.apply(o,i):o}function y(r,o,a,l){return function(e){for(var t=+(arguments.length?e:this),n=0,i=a||{"default":"{n} {u}{s}"};t>=r[n];)t/=r[n++] | ||
return n==r.length&&l?l(this):(n=o[n],(i[t<2?n:n+"s"]||i["default"]).format({n:t,u:n,s:t<2?"":"s"}))}}function _(e){var t=1 | ||
function n(){!--t&&e&&e.call(this)}return n.wait=function(){return t++,n},n}function w(){return!0}function b(){return!1}(e.Fn=g).hold=function(e){var t,i=this,r=[],o=[],n=_(function(){for(var e,t=i,n=o.length;n--;n--)o[n]?i[o[n-1]]=o[n]:delete i[o[n-1]] | ||
for(;e=r[++n];)t=t[e].apply(t,r[++n])||t | ||
r=o=null}) | ||
for(t in e=e||i.syncMethods||[],i)"function"==typeof i[t]&&-1==e.indexOf(t)&&function(e){o.push(e,u.call(i,e)&&i[e]),i[e]=function(){return r.push(e,arguments),i}}(t) | ||
return i.wait=n.wait,n},v.wait=y,n.extend=function(){var e,t=this,n=0 | ||
return i.wait=n.wait,n},g.wait=_,n.extend=function(){var e,t=this,n=0 | ||
function i(){return t.apply(this,arguments)}for(i[r]=a.create(t[r]);e=arguments[n++];)JSON.merge(i[r],e) | ||
return i[r].constructor=i},a.each=function(e,t,n,i){if(e)for(i in e)u.call(e,i)&&t.call(n,e[i],i,e)},a.values=function(t){return a.keys(t||{}).map(function(e){return t[e]})},t.remove=m,t.each=t.forEach,t.uniq=function(){for(var e=this,t=e.length;t--;)e.indexOf(e[t])!==t&&e.splice(t,1) | ||
return e},t.pushUniq=function(e){return this.indexOf(e)<0&&this.push(e)},n.fn=function(){return this},i.fn=function(e){return v(this,e)},Boolean.prototype.fn=function(){return this.valueOf()?_:w},i.format=function(){var n=t.slice.call(arguments) | ||
return n.unshift(0),this.replace(h,function(e,t){return n[0]=t,v.apply(null,n)()}).replace(d,"{")},l.format=function(e){return""+this},i.safe=function(){return this.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\"/g,""")},i.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)},i.camelCase=function(){return this.replace(/[ _-]+([a-z])/g,function(e,t){return t.toUpperCase()})},i.lower=i.toLowerCase,i.upper=i.toUpperCase,l.step=function(e,t){var n=(""+e).split("."),i=this/e,r=~~(i+(i<0?-1:1)*(t==o?.5:1===t&&i==(0|i)?0:+t))*e | ||
return""+(1 in n?r.toFixed(n[1].length):r)},i.step=function(t,n){return this.replace(p,function(e){return(+e).step(t,n)})},l.scale=g([1e3,1e3,1e3],["","k","M","G"],{"default":"{n}{u}"}),i.scale=function(){return this.replace(p,function(e){return(+e).scale()})},i.pick=l.pick=function(){for(var e,t=this+"=",n=arguments,i=0,r=n.length;i<r;)0==(e=n[i++]).indexOf(t)&&(e=e.slice(t.length),i=r) | ||
return e.replace("#",this)},i.plural=l.plural=function(){return arguments[+v("n->"+(String.plural||"n!=1"))(parseFloat(this))].replace("#",this)},t.pluck=function(e){for(var t=this.length,n=[];t--;)n[t]=this[t][e] | ||
return n},v.words=g}(this,Object),function(l){var c=[] | ||
return i[r].constructor=i},a.each=function(e,t,n,i){if(e)for(i in e)u.call(e,i)&&t.call(n,e[i],i,e)},a.values=function(t){return a.keys(t||{}).map(function(e){return t[e]})},t.remove=v,t.each=t.forEach,t.uniq=function(){for(var e=this,t=e.length;t--;)e.indexOf(e[t])!==t&&e.splice(t,1) | ||
return e},t.pushUniq=function(e){return this.indexOf(e)<0&&this.push(e)},n.fn=function(){return this},i.fn=function(e){return g(this,e)},Boolean.prototype.fn=function(){return this.valueOf()?w:b},g.keys=function(e){var t,n,i=[],r=e.match(h) | ||
if(r)for(t=r.length;t--;)(n=r[t].replace(f,"").match(d))&&i.push.apply(i,n) | ||
return i.uniq()},i.format=function(){var n=t.slice.call(arguments) | ||
return n.unshift(0),this.replace(h,function(e,t){return n[0]=t,g.apply(null,n)()}).replace(m,"{")},l.format=function(e){return""+this},i.safe=function(){return this.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\"/g,""")},i.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)},i.camelCase=function(){return this.replace(/[ _-]+([a-z])/g,function(e,t){return t.toUpperCase()})},i.lower=i.toLowerCase,i.upper=i.toUpperCase,l.step=function(e,t){var n=(""+e).split("."),i=this/e,r=~~(i+(i<0?-1:1)*(t==o?.5:1===t&&i==(0|i)?0:+t))*e | ||
return""+(1 in n?r.toFixed(n[1].length):r)},i.step=function(t,n){return this.replace(p,function(e){return(+e).step(t,n)})},l.scale=y([1e3,1e3,1e3],["","k","M","G"],{"default":"{n}{u}"}),i.scale=function(){return this.replace(p,function(e){return(+e).scale()})},i.pick=l.pick=function(){for(var e,t=this+"=",n=arguments,i=0,r=n.length;i<r;)0==(e=n[i++]).indexOf(t)&&(e=e.slice(t.length),i=r) | ||
return e.replace("#",this)},i.plural=l.plural=function(){return arguments[+g("n->"+(String.plural||"n!=1"))(parseFloat(this))].replace("#",this)},t.pluck=function(e){for(var t=this.length,n=[];t--;)n[t]=this[t][e] | ||
return n},g.words=y}(this,Object),function(l){var c=[] | ||
function e(){}function t(e){e.on=n,e.off=i,e.one=r,e.emit=s,e.listen=o,e.unlisten=a}function n(e,t,n,i){var r=this===l?c:this,o=r._e||(r._e=Object.create(null)) | ||
@@ -64,6 +66,6 @@ return e&&t&&(s.call(r,"newListener",e,t,n,i),(o[e]||(o[e]=[])).unshift(n,i,t)),r}function i(e,t,n){var i,r,o=this===l?c:this,a=o._e&&o._e[e] | ||
var n=t||{},i=r(e,n) | ||
i.isOpen&&s==e||(n._u=s=e,i.show(El.data.route=n))},g.param=w,g.def=function(e){for(var t,n=/(\S+) (\S+)/g;t=n.exec(e);)t[1].split(",").map(function(e){(e=g(i(e,o))).file=(e.file?e.file+",":"")+t[2].split(",").map(function(e){return p[e]?p[e].file:i(e,o)})})},g.blur=b,g.url=i}(this),function(l,a,r,o,e){var n,t,i=0,s=U.cache={},c=[],u=c.slice,f=s.hasOwnProperty,h=a.body,p=a.documentElement,d="textContent"in h?"textContent":"innerText",m=/^([ \t]*)(@?)((?:("|')(?:\\?.)*?\4|[-\w:.#[\]=])*)[ \t]*(.*?)$/gm,v=/[;\s]*(\w+)(?:\s*(:?):((?:(["'\/])(?:\\?.)*?\3|[^;])*))?/g,g=/[,\s]+/,y=U.bindings={attr:P,css:U.css=function(e,t,n){e.style[t.camelCase()]=""+n||""},"class":function(e,t,n){(arguments.length<3||n?b:E)(e,t)},data:function(e,t,n){P(e,"data-"+t,n)},html:function(e,t){e.innerHTML=t},ref:function(e,t){this[t]=e},txt:function(e,t){e[d]=t},val:function(e,t){$(e,t)},"with":function(e,t){var n=ie(e,this) | ||
if(r.assign(n,t),n!==this)return re(e),!0}},_=[],w=U.data={_:_e,_b:y,El:U,history:history,View:View},b=U.addClass=V(K),E=U.rmClass=V(z),T=!+"\v1",O=T&&(0|a.documentMode)<8,C=U.matches=h.matches?function(e,t){return e.matches(t)}:function(e,t){return!!A(t)(e)},N=U.closest=h.closest?function(e,t){return(e.closest?e:e.parentNode).closest(t)}:function(e,t){return Y("parentNode",1,e,t)},x=/([.#:[])([-\w]+)(?:\((.+?)\)|([~^$*|]?)=(("|')(?:\\?.)*?\6|[-\w]+))?]?/g,M=/([~\s>+]*)(?:("|')(?:\\?.)*?\2|\(.+?\)|[^\s+>])+$/,S=/\s*,\s*(?=(?:[^'"()]|"(?:\\?.)*?"|'(?:\\?.)*?'|\(.+?\))+$)/,k={},D={"first-child":"(a=_.parentNode)&&a.firstChild==_","last-child":"(a=_.parentNode)&&a.lastChild==_",".":"~_.className.split(/\\s+/).indexOf(a)","#":"_.id==a","^":"!a.indexOf(v)","|":"a.split('-')[0]==v","$":"a.slice(-v.length)==v","~":"~a.split(/\\s+/).indexOf(v)","*":"~a.indexOf(v)"} | ||
function A(e){return k[e]||(k[e]=Function("m,c","return function(_,v,a,b){return "+e.split(S).map(function(e){var r,o,l=["_&&_.nodeType==1"],t=e.replace(M,function(e,t,n,i){return o=i+t.length,r=t.trim(),""}),n=e.slice(o).replace(x,function(e,t,n,i,r,o,a){return l.push("((v='"+(i||(a?o.slice(1,-1):o)||"").replace(/'/g,"\\'")+"'),(a='"+n+"'),1)",D[":"==t?n:t]||"(a=_.getAttribute(a))"+(r?"&&"+D[r]:o?"==v":"")),""}) | ||
return n&&"*"!=n&&(l[0]+="&&_.tagName=='"+n.toUpperCase()+"'"),t&&l.push("(v='"+t+"')",D[r+r]),l.join("&&")}).join("||")+"}")(C,N))}function Y(e,t,n,i,r){var o=[] | ||
i.isOpen&&s==e||(n._u=s=e,i.show(El.data.route=n))},g.param=w,g.def=function(e){for(var t,n=/(\S+) (\S+)/g;t=n.exec(e);)t[1].split(",").map(function(e){(e=g(i(e,o))).file=(e.file?e.file+",":"")+t[2].split(",").map(function(e){return p[e]?p[e].file:i(e,o)})})},g.blur=b,g.url=i}(this),function(l,a,r,o,e){var n,t,i=0,s=U.cache={},c=[],u=c.slice,f=s.hasOwnProperty,h=a.body,p=a.documentElement,d="textContent"in h?"textContent":"innerText",m=/^([ \t]*)(@?)((?:("|')(?:\\?.)*?\4|[-\w:.#[\]=])*)[ \t]*(([\])}]?).*?([[({]?))$/gm,v=/[;\s]*(\w+)(?:\s*(:?):((?:(["'\/])(?:\\?.)*?\3|[^;])*))?/g,g=/[,\s]+/,y=U.bindings={attr:P,css:U.css=V(function(e,t,n){e.style[t.camelCase()]=""+n||""}),"class":function(e,t,n){(arguments.length<3||n?b:E)(e,t)},data:function(e,t,n){P(e,"data-"+t,n)},html:function(e,t){e.innerHTML=t},ref:function(e,t){this[t]=e},txt:function(e,t){e[d]=t},val:function(e,t){$(e,t)},"with":function(e,t){var n=ie(e,this) | ||
if(r.assign(n,t),n!==this)return re(e),!0}},_=[],w=U.data={_:we,_b:y,El:U,history:history,View:View},b=U.addClass=V(K),E=U.rmClass=V(z),T=!+"\v1",O=T&&(0|a.documentMode)<8,C=U.matches=h.matches?function(e,t){return e.matches(t)}:function(e,t){return!!A(t)(e)},x=U.closest=h.closest?function(e,t){return(e.closest?e:e.parentNode).closest(t)}:function(e,t){return Y("parentNode",1,e,t)},N=/([.#:[])([-\w]+)(?:\((.+?)\)|([~^$*|]?)=(("|')(?:\\?.)*?\6|[-\w]+))?]?/g,M=/([~\s>+]*)(?:("|')(?:\\?.)*?\2|\(.+?\)|[^\s+>])+$/,S=/\s*,\s*(?=(?:[^'"()]|"(?:\\?.)*?"|'(?:\\?.)*?'|\(.+?\))+$)/,k={},D={"first-child":"(a=_.parentNode)&&a.firstChild==_","last-child":"(a=_.parentNode)&&a.lastChild==_",".":"~_.className.split(/\\s+/).indexOf(a)","#":"_.id==a","^":"!a.indexOf(v)","|":"a.split('-')[0]==v","$":"a.slice(-v.length)==v","~":"~a.split(/\\s+/).indexOf(v)","*":"~a.indexOf(v)"} | ||
function A(e){return k[e]||(k[e]=Function("m,c","return function(_,v,a,b){return "+e.split(S).map(function(e){var r,o,l=["_&&_.nodeType==1"],t=e.replace(M,function(e,t,n,i){return o=i+t.length,r=t.trim(),""}),n=e.slice(o).replace(N,function(e,t,n,i,r,o,a){return l.push("((v='"+(i||(a?o.slice(1,-1):o)||"").replace(/'/g,"\\'")+"'),(a='"+n+"'),1)",D[":"==t?n:t]||"(a=_.getAttribute(a))"+(r?"&&"+D[r]:o?"==v":"")),""}) | ||
return n&&"*"!=n&&(l[0]+="&&_.tagName=='"+n.toUpperCase()+"'"),t&&l.push("(v='"+t+"')",D[r+r]),l.join("&&")}).join("||")+"}")(C,x))}function Y(e,t,n,i,r){var o=[] | ||
for("function"!=typeof i&&(i=A(i));n;n=n[e]||r&&r(n))if(i(n)){if(t)return n | ||
@@ -73,3 +75,3 @@ o.push(n)}return t?null:o}function F(n,e,t){return Y("firstChild",t,n.firstChild,e,function(e){for(var t=e.nextSibling;!t&&(e=e.parentNode)!==n;)t=e.nextSibling | ||
var t,l,c={} | ||
return e=e.replace(x,function(e,t,n,i,r,o,a){return l=1,o=a?o.slice(1,-1):o||n,c[t="."==t?(r="~","class"):"#"==t?"id":n]=r&&c[t]?"^"==r?o+c[t]:c[t]+("~"==r?" ":"")+o:o,""})||"div",t=(s[e]||(s[e]=a.createElement(e))).cloneNode(!0),l&&P(t,c),t}function L(e){var t=e.length | ||
return e=e.replace(N,function(e,t,n,i,r,o,a){return l=1,o=a?o.slice(1,-1):o||n,c[t="."==t?(r="~","class"):"#"==t?"id":n]=r&&c[t]?"^"==r?o+c[t]:c[t]+("~"==r?" ":"")+o:o,""})||"div",t=(s[e]||(s[e]=a.createElement(e))).cloneNode(!0),l&&P(t,c),t}function L(e){var t=e.length | ||
if(t)for(this.length=t;t--;)this[t]=e[t] | ||
@@ -87,3 +89,3 @@ else null==t&&(this.length=1,this[0]=e)}function j(e,t){return e&&e.getAttribute&&e.getAttribute(t)}function P(e,t,n){var i | ||
t=i}t.nodeType&&((r=j(o=e.insertBefore?e:e[e.length-1],"data-child"))&&(o=(n=F(o,Fn("v->n->n.nodeType===8&&n.nodeValue==v")(r),1)||o).parentNode),o.insertBefore(t,(!0===n?o.firstChild:"number"==typeof n?o.childNodes[n<0?o.childNodes.length-n-2:n]:n)||null))}return e}function V(a){return function(e,t,n){if("string"==typeof t&&""!==t){var i=t.split(g),r=0,o=i.length | ||
if(1<o)for(;r<o;)a(e,i[r++],n) | ||
if(1<o)for(;r<o;)a(e,i[r++],Array.isArray(n)?n[r-1]:n) | ||
else a(e,t,n)}}}function K(e,t){var n=e.className||"",i="string"!=typeof n | ||
@@ -96,8 +98,8 @@ i&&(n=e.getAttribute("class")||""),n&&(t=-1<n.split(g).indexOf(t)?n:n+" "+t),n!=t&&(i?e.setAttribute("class",t):e.className=t)}function z(e,t){var n=e.className||"",i="string"!=typeof n | ||
return!!n&&-1<n.split(g).indexOf(t)} | ||
var J=120,B="addEventListener",W="removeEventListener",q=l[B]?"":(B="attachEvent",W="detachEvent","on"),H=o.fixEv={wheel:"onwheel"in a?"wheel":"onmousewheel"in a?"mousewheel":"DOMMouseScroll"},Z=o.fixFn={wheel:function(i,r){return function(e){var t=(e.wheelDelta||-e.detail||-e.deltaY)/J | ||
var J=120,q="addEventListener",B="removeEventListener",W=l[q]?"":(q="attachEvent",B="detachEvent","on"),H=o.fixEv={wheel:"onwheel"in a?"wheel":"onmousewheel"in a?"mousewheel":"DOMMouseScroll"},Z=o.fixFn={wheel:function(i,r){return function(e){var t=(e.wheelDelta||-e.detail||-e.deltaY)/J | ||
if(t){if(t<1&&-1<t){var n=(t<0?-1:1)/t | ||
t*=n,J/=n}r.call(i,e,t)}}}},R=new o.Emitter | ||
function X(t,e,n){var i=Z[e]&&Z[e](t,n)||n,r=q?function(){var e=l.event | ||
function X(t,e,n){var i=Z[e]&&Z[e](t,n)||n,r=W?function(){var e=l.event | ||
e&&(e.target=e.srcElement,e.preventDefault=Q,e.stopPropagation=ee),i.call(t,e)}:i | ||
t[B](q+(H[e]||e),r,!1),R.on.call(t,e,r,t,n)}function G(e,t,n){var i=e._e&&e._e[t],r=i&&i.indexOf(n);-1<r&&(e[W](q+(H[t]||t),i[r+1]),i.splice(r-1,3))}function Q(){this.returnValue=!1}function ee(){this.cancelBubble=this.cancel=!0}function te(e){for(var t;t=e.firstChild;)ne(t) | ||
t[q](W+(H[e]||e),r,!1),R.on.call(t,e,r,t,n)}function G(e,t,n){var i=e._e&&e._e[t],r=i&&i.indexOf(n);-1<r&&(e[B](W+(H[t]||t),i[r+1]),i.splice(r-1,3))}function Q(){this.returnValue=!1}function ee(){this.cancelBubble=this.cancel=!0}function te(e){for(var t;t=e.firstChild;)ne(t) | ||
return e}function ne(e){var t | ||
@@ -111,22 +113,24 @@ if(e){if(e._e)for(t in R.emit.call(e,"kill"),e._e)G(e,t) | ||
try{if(Fn(e,t,o)(o,y,P))return}catch(e){e.message+="\nBINDING: "+n,console.error(e,t),l.onerror&&l.onerror(e.message,e.fileName,e.lineNumber)}}for(n=t.firstChild;n;n=e)e=n.nextSibling,re(n,o) | ||
T&&"SELECT"==t.nodeName&&t.parentNode.insertBefore(t,t)}else t.render&&t.render(o)}function oe(e){var l=U("div"),c=[-1],s=[] | ||
function u(e,t,n,i,r,o,a){if(!a||e!==t){for(r=t.length;r<=c[0];)l.plugin&&l.plugin.done(),l=s.pop(),c.shift() | ||
l.txtMode?l.txt+=e+"\n":n?U.plugins[i]?(s.push(l),c.unshift(r),l=new U.plugins[i](l,o).el):I(l,e):(i&&(s.push(l),c.unshift(r),r=U(i),I(l,r),l=r),o&&(r=o.charAt(0),i=o.slice(1),">"==r?(t+" "+i).replace(m,u):"|"==r||"\\"==r?I(l,i):"/"!=r&&("&"!=r&&(i=("INPUT"==l.tagName?"val":"txt")+":_('"+o.replace(/'/g,"\\'")+"').format(data)"),r=j(l,"data-bind"),P(l,"data-bind",r?r+";"+i:i))))}}e.replace(m,u),u("","")}function ae(e,t){var n=this | ||
n.name=t,n.parent=e,n.el=U("div"),n.el.plugin=n}function le(e,t){var n=this | ||
n.txtMode=n.parent=e,n.txt="",n.plugin=n.el=n,n.params=t}function ce(){return l.pageXOffset||p.scrollLeft||h.scrollLeft||0}function se(){return l.pageYOffset||p.scrollTop||h.scrollTop||0}o.stop=function(e){return e.preventDefault&&(e.stopPropagation(),e.preventDefault()),!1},U.on=V(X),U.off=V(G),U.one=function(t,n,i){return X(t,n,i),X(t,n,function e(){G(t,n,i),G(t,n,e)}),t},U.emit=function(e,t){R.emit.apply(e,u.call(arguments,1))},U.empty=te,U.kill=ne,U.render=re,r.each(U,function(i,e){c[e]||(c[e]=function(){var e=0,t=this.length,n=u.call(arguments) | ||
T&&"SELECT"==t.nodeName&&t.parentNode.insertBefore(t,t)}else t.render&&t.render(o)}function oe(e){var s=U("div"),u=[-1],f=[] | ||
function h(e,t,n,i,r,o,a,l,c){if(!c||e!==t){for(r=t.length;r<=u[0];)s.plugin&&s.plugin.done(),s=f.pop(),u.shift() | ||
s.txtMode?s.txt+=e+"\n":n||l&&(i="map")?U.plugins[i]?(f.push(s),u.unshift(r),s=new U.plugins[i](s,o,a?"":";").el):I(s,e):a?ae(s,o,""):(i&&(f.push(s),u.unshift(r),r=U(i),I(s,r),s=r),o&&(r=o.charAt(0),i=o.slice(1),">"==r?(t+" "+i).replace(m,h):"|"==r||"\\"==r?I(s,i):"/"!=r&&("&"!=r&&(i=("INPUT"==s.tagName?"val":"txt")+":_('"+o.replace(/'/g,"\\'")+"').format(data)"),ae(s,i,";"))))}}e.replace(m,h),h("","")}function ae(e,t,n){var i=j(e,"data-bind") | ||
P(e,"data-bind",i?i+n+t:t)}function le(e,t){var n=this | ||
n.name=t,n.parent=e,n.el=U("div"),n.el.plugin=n}function ce(e,t,n){var i=this | ||
i.txtMode=i.parent=e,i.txt="",i.plugin=i.el=i,i.params=t,i.a=n}function se(){return l.pageXOffset||p.scrollLeft||h.scrollLeft||0}function ue(){return l.pageYOffset||p.scrollTop||h.scrollTop||0}o.stop=function(e){return e.preventDefault&&(e.stopPropagation(),e.preventDefault()),!1},U.on=V(X),U.off=V(G),U.one=function(t,n,i){return X(t,n,i),X(t,n,function e(){G(t,n,i),G(t,n,e)}),t},U.emit=function(e,t){R.emit.apply(e,u.call(arguments,1))},U.empty=te,U.kill=ne,U.render=re,r.each(U,function(i,e){c[e]||(c[e]=function(){var e=0,t=this.length,n=u.call(arguments) | ||
for(n.unshift(1);e<t;)n[0]=this[e++],i.apply(null,n) | ||
return this})}),U.append=I,U.scope=ie,ae[e]={_done:function(){for(var e,t,n=this.el.childNodes,i=n.length;i--;)if((e=n[i])._childKey){t=i,P(e,"data-child",e._childKey) | ||
return this})}),U.append=I,U.scope=ie,le[e]={_done:function(){for(var e,t,n=this.el.childNodes,i=n.length;i--;)if((e=n[i])._childKey){t=i,P(e,"data-child",e._childKey) | ||
break}return n[1]?(e=new L(n))._childId=t:e=n[0],this.el.plugin=this.el=this.parent=null,e},done:function(){var e=this.parent | ||
return s[this.name]=this._done(),e}},le[e].done=Fn("Function(this.txt)()"),U.plugins={binding:le.extend({done:function(){JSON.merge(y,Function("return({"+this.txt+"})")())}}),child:ae.extend({done:function(){for(var e="@child-"+ ++i,t=this.parent;1==(t.parentNode.parentNode||e).nodeType;)t=t.parentNode | ||
t._childKey=e,I(this.parent,a.createComment(e))}}),css:le.extend({done:Fn("xhr.css(this.txt)")}),def:le.extend({done:Fn("View.def(this.params||this.txt)")}),each:le.extend({done:function(){var t=this.txt | ||
JSON.parse(this.params).each(function(e){e&&e.constructor==r||(e={item:e}),oe(t.format(e))})}}),el:ae,js:le,template:ae,view:ae.extend({done:function(){var e,t=this.name.split(g),n=j(this.el,"data-bind"),r=View(t[0],this._done(),t[1],t[2]) | ||
n&&(e=n.replace(v,function(e,t,n,i){return"(this['"+t+"']"+("function"==typeof r[t]?"("+(i||"")+")),":"="+i+"),")})+"1",Fn(e,r,w)())}}),"view-link":ae.extend({done:function(){var t=this.name.split(g) | ||
View(t[0],null,t[2]).on("ping",function(e){View.show(t[1].format(e))})}})},xhr.view=xhr.tpl=U.tpl=oe,xhr.css=function(e){t||I(a.getElementsByTagName("head")[0],t=U("style")),t.styleSheet?t.styleSheet.cssText+=e:I(t,e)},U.scrollLeft=ce,U.scrollTop=se,U.mouse=function(e){return e.changedTouches&&(e=e.changedTouches[0]),{left:e.pageX||e.clientX+ce(),top:e.pageY||e.clientY+se()}} | ||
var ue=[],fe={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"caps",27:"esc",33:"pgup",34:"pgdown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"cmd",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12"},he=/Mac|iPod|iPhone|iPad|Pike/.test(navigator.platform)?"metaKey":"ctrlKey" | ||
function pe(e,t,n){for(var i,r,o=0,a=e.target||e.srcElement,l=/INPUT|TEXTAREA|SELECT/i.test((3==a.nodeType?a.parentNode:a).tagName);(r=ue[o++])&&(l&&!r.input||(i=r[t]||r[n]||r.num&&47<t&&t<58&&(n|=0,r.num)||r.all),!i&&r.bubble););i&&("string"==typeof i?View.emit(i,e,n,a):i(e,n,a))}U.addKb=ue.unshift.bind(ue),U.rmKb=function(e){var t=ue.indexOf(e||ue[0]);-1<t&&ue.splice(t,1)},X(a,"keydown",function(e){if(ue[0]){var t=e.keyCode||e.which,n=95<t&&t<106?t-48:t,i=fe[n]||String.fromCharCode(n).toLowerCase()||n | ||
8==n&&ue[0].backspace&&o.stop(e),pe(e,n,i),e.shiftKey&&16!=n&&pe(e,n,"shift+"+i),e.ctrlKey&&17!=n&&pe(e,n,"ctrl+"+i),e.altKey&&18!=n&&pe(e,n,"alt+"+i),e[he]&&17!=n&&91!=n&&pe(e,n,"mod+"+i)}}) | ||
var de,me,ve={sm:0,md:601,lg:1025},ge=function(){ye()}.rate(100,!0) | ||
function ye(e){var t,n,i=p.offsetWidth,r=ve=e||ve | ||
return s[this.name]=this._done(),e}},ce[e].done=Fn("Function(this.txt)()"),U.plugins={binding:ce.extend({done:function(){JSON.merge(y,Function("return({"+this.txt+"})")())}}),child:le.extend({done:function(){for(var e="@child-"+ ++i,t=this.parent;1==(t.parentNode.parentNode||e).nodeType;)t=t.parentNode | ||
t._childKey=e,I(this.parent,a.createComment(e))}}),css:ce.extend({done:Fn("xhr.css(this.txt)")}),def:ce.extend({done:Fn("View.def(this.params||this.txt)")}),each:ce.extend({done:function(){var t=this.txt | ||
JSON.parse(this.params).each(function(e){e&&e.constructor==r||(e={item:e}),oe(t.format(e))})}}),el:le,js:ce,map:ce.extend({done:function(){var e=this,t=(e.params+e.txt).replace(/\n+/g,"") | ||
ae(e.parent,e.a?t.slice(1):t,e.a)}}),template:le,view:le.extend({done:function(){var e,t=this.name.split(g),n=j(this.el,"data-bind"),r=View(t[0],this._done(),t[1],t[2]) | ||
n&&(e=n.replace(v,function(e,t,n,i){return"(this['"+t+"']"+("function"==typeof r[t]?"("+(i||"")+")),":"="+i+"),")})+"1",Fn(e,r,w)())}}),"view-link":le.extend({done:function(){var t=this.name.split(g) | ||
View(t[0],null,t[2]).on("ping",function(e){View.show(t[1].format(e))})}})},xhr.view=xhr.tpl=U.tpl=oe,xhr.css=function(e){t||I(a.getElementsByTagName("head")[0],t=U("style")),t.styleSheet?t.styleSheet.cssText+=e:I(t,e)},U.scrollLeft=se,U.scrollTop=ue,U.mouse=function(e){return e.changedTouches&&(e=e.changedTouches[0]),{left:e.pageX||e.clientX+se(),top:e.pageY||e.clientY+ue()}} | ||
var fe=[],he={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"caps",27:"esc",33:"pgup",34:"pgdown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"cmd",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12"},pe=/Mac|iPod|iPhone|iPad|Pike/.test(navigator.platform)?"metaKey":"ctrlKey" | ||
function de(e,t,n){for(var i,r,o=0,a=e.target||e.srcElement,l=/INPUT|TEXTAREA|SELECT/i.test((3==a.nodeType?a.parentNode:a).tagName);(r=fe[o++])&&(l&&!r.input||(i=r[t]||r[n]||r.num&&47<t&&t<58&&(n|=0,r.num)||r.all),!i&&r.bubble););i&&("string"==typeof i?View.emit(i,e,n,a):i(e,n,a))}U.addKb=fe.unshift.bind(fe),U.rmKb=function(e){var t=fe.indexOf(e||fe[0]);-1<t&&fe.splice(t,1)},X(a,"keydown",function(e){if(fe[0]){var t=e.keyCode||e.which,n=95<t&&t<106?t-48:t,i=he[n]||String.fromCharCode(n).toLowerCase()||n | ||
8==n&&fe[0].backspace&&o.stop(e),de(e,n,i),e.shiftKey&&16!=n&&de(e,n,"shift+"+i),e.ctrlKey&&17!=n&&de(e,n,"ctrl+"+i),e.altKey&&18!=n&&de(e,n,"alt+"+i),e[pe]&&17!=n&&91!=n&&de(e,n,"mod+"+i)}}) | ||
var me,ve,ge={sm:0,md:601,lg:1025},ye=function(){_e()}.rate(100,!0) | ||
function _e(e){var t,n,i=p.offsetWidth,r=ge=e||ge | ||
for(t in r){if(r[t]>i)break | ||
n=t}n!=de&&(z(p,de),K(p,de=n)),(n=i>p.offsetHeight?"landscape":"portrait")!=me&&(z(p,me),K(p,me=n)),(n=l.View)&&n.emit("resize")}function _e(e,t){return(t=_e[we(t)||n])[e]||"string"==typeof e&&t[e=e.slice(e.indexOf(":")+1)||e]||e||""}function we(e){return e&&(_e[e=(""+e).toLowerCase()]||_e[e=e.split("-")[0]])&&e}function be(e){return(e=we(e))&&n!=e&&(_e[n=_e.current=e]=_e[n]||{}),n}function Ee(e,t){-1==_e.list.indexOf(e)&&_e.list.push(e),JSON.merge(_e[e]||(_e[e]={}),t),n||be(e)}U.setBreakpoints=ye,ge(),X(l,"resize",ge),X(l,"orientationchange",ge),X(l,"load",ge),(U.i18n=_e).list=[],_e.get=we,_e.use=be,_e.add=Ee,_e.def=function(e,t){for(t in e)Ee(t,e)}}(window,document,Object,Event,"prototype"),function(e){var l=Object.prototype.hasOwnProperty,n=Array.prototype.slice | ||
n=t}n!=me&&(z(p,me),K(p,me=n)),(n=i>p.offsetHeight?"landscape":"portrait")!=ve&&(z(p,ve),K(p,ve=n)),(n=l.View)&&n.emit("resize")}function we(e,t){return(t=we[be(t)||n])[e]||"string"==typeof e&&t[e=e.slice(e.indexOf(":")+1)||e]||e||""}function be(e){return e&&(we[e=(""+e).toLowerCase()]||we[e=e.split("-")[0]])&&e}function Ee(e){return(e=be(e))&&n!=e&&(we[n=we.current=e]=we[n]||{}),n}function Te(e,t){-1==we.list.indexOf(e)&&we.list.push(e),JSON.merge(we[e]||(we[e]={}),t),n||Ee(e)}U.setBreakpoints=_e,ye(),X(l,"resize",ye),X(l,"orientationchange",ye),X(l,"load",ye),(U.i18n=we).list=[],we.get=be,we.use=Ee,we.add=Te,we.def=function(e,t){for(t in e)Te(t,e)}}(window,document,Object,Event,"prototype"),function(e){var l=Object.prototype.hasOwnProperty,n=Array.prototype.slice | ||
function t(o,e,a){var l=0,c=this,s=o.parentNode,u=document.createComment("every "+(e.name||e.length)) | ||
@@ -133,0 +137,0 @@ return s.replaceChild(u,o),e&&("string"==typeof e?(c.model.on("change:"+e,t),t()):e.eachLive?e.eachLive(n,function(e){for(var t=u,n=e+1;n--;)t=t.previousSibling |
/* | ||
* @version 18.9.0 | ||
* @version 18.10.0 | ||
* @author Lauri Rooden <lauri@rooden.ee> | ||
@@ -405,5 +405,6 @@ * @license MIT License | ||
, hasOwn = fns.hasOwnProperty | ||
, fnRe = /(['\/"])(?:\\?.)*?\1|\b(?:false|in|new|null|this|true|typeof|void)\b|\.\w+|\w+:/g | ||
, formatRe = /{(?!\\)((?:(["'/])(?:\\?.)*?\2|[^}])*)}/g | ||
, fnRe = /('|")(?:\\?.)*?\1|\/(?:\\?.)+?\/[gim]*|\b(?:false|in|new|null|this|true|typeof|void)\b|\.\w+|\w+:/g | ||
, formatRe = /{(?!\\)((?:("|')(?:\\?.)*?\2|[^}])*?)}/g | ||
, numbersRe = /-?\d+\.?\d*/g | ||
, wordRe = /\b[a-z_$][\w$]*/ig | ||
, unescapeRe = /{\\/g | ||
@@ -500,3 +501,3 @@ | ||
if (!fn) { | ||
fn = expr.replace(fnRe, "").match(/\b[a-z_$][\w$]*/ig) || [] | ||
fn = expr.replace(fnRe, "").match(wordRe) || [] | ||
for (; arr.length > 1; ) { | ||
@@ -529,2 +530,16 @@ expr = arr.pop() | ||
Fn.keys = function(str) { | ||
var i, tmp | ||
, arr = [] | ||
, match = str.match(formatRe) | ||
if (match) { | ||
for (i = match.length; i--; ) { | ||
if (tmp = match[i].replace(fnRe, "").match(wordRe)) { | ||
arr.push.apply(arr, tmp) | ||
} | ||
} | ||
} | ||
return arr.uniq() | ||
} | ||
S.format = function() { | ||
@@ -1125,3 +1140,3 @@ var args = A.slice.call(arguments) | ||
, txtAttr = "textContent" in body ? "textContent" : "innerText" | ||
, templateRe = /^([ \t]*)(@?)((?:("|')(?:\\?.)*?\4|[-\w:.#[\]=])*)[ \t]*(.*?)$/gm | ||
, templateRe = /^([ \t]*)(@?)((?:("|')(?:\\?.)*?\4|[-\w:.#[\]=])*)[ \t]*(([\])}]?).*?([[({]?))$/gm | ||
, renderRe = /[;\s]*(\w+)(?:\s*(:?):((?:(["'\/])(?:\\?.)*?\3|[^;])*))?/g | ||
@@ -1131,5 +1146,5 @@ , splitRe = /[,\s]+/ | ||
attr: setAttr, | ||
css: El.css = function(el, key, val) { | ||
css: El.css = acceptMany(function(el, key, val) { | ||
el.style[key.camelCase()] = "" + val || "" | ||
}, | ||
}), | ||
"class": function(el, name, fn) { | ||
@@ -1561,3 +1576,13 @@ ;(arguments.length < 3 || fn ? addClass : rmClass)(el, name) | ||
if (len > 1) { | ||
for (; i < len; ) fn(el, names[i++], val) | ||
/* | ||
if (Array.isArray(val)) { | ||
for (; i < len; ) fn(el, names[i], val[i++]) | ||
} else { | ||
for (; i < len; ) fn(el, names[i++], val) | ||
} | ||
/*/ | ||
for (; i < len; ) { | ||
fn(el, names[i++], Array.isArray(val) ? val[i - 1] : val) | ||
} | ||
//*/ | ||
} else { | ||
@@ -1856,3 +1881,3 @@ fn(el, name, val) | ||
function work(all, indent, plugin, name, q, text, offset) { | ||
function work(all, indent, plugin, name, q, text, mapEnd, mapStart, offset) { | ||
if (offset && all === indent) return | ||
@@ -1870,10 +1895,12 @@ | ||
parent.txt += all + "\n" | ||
} else if (plugin) { | ||
} else if (plugin || mapStart && (name = "map")) { | ||
if (El.plugins[name]) { | ||
parentStack.push(parent) | ||
stack.unshift(q) | ||
parent = (new El.plugins[name](parent, text)).el | ||
parent = (new El.plugins[name](parent, text, mapEnd ? "" : ";")).el | ||
} else { | ||
append(parent, all) | ||
} | ||
} else if (mapEnd) { | ||
appendBind(parent, text, "") | ||
} else { | ||
@@ -1899,4 +1926,3 @@ if (name) { | ||
} | ||
q = getAttr(parent, "data-bind") | ||
setAttr(parent, "data-bind", (q ? q + ";" + name : name)) | ||
appendBind(parent, name, ";") | ||
} | ||
@@ -1910,2 +1936,7 @@ } | ||
function appendBind(el, val, sep) { | ||
var current = getAttr(el, "data-bind") | ||
setAttr(el, "data-bind", (current ? current + sep + val : val)) | ||
} | ||
function plugin(parent, name) { | ||
@@ -1953,3 +1984,3 @@ var t = this | ||
function js(parent, params) { | ||
function js(parent, params, attr1) { | ||
var t = this | ||
@@ -1960,2 +1991,3 @@ t.txtMode = t.parent = parent | ||
t.params = params | ||
t.a = attr1 | ||
} | ||
@@ -2003,2 +2035,13 @@ | ||
js: js, | ||
map: js.extend({ | ||
done: function() { | ||
var self = this | ||
, txt = (self.params + self.txt).replace(/\n+/g, "") | ||
appendBind( | ||
self.parent, | ||
self.a ? txt.slice(1) : txt, | ||
self.a | ||
) | ||
} | ||
}), | ||
template: plugin, | ||
@@ -2005,0 +2048,0 @@ view: plugin.extend({ |
@@ -49,3 +49,3 @@ !function(exports) { | ||
O = Array | ||
add("isArray", "return a instanceof Array") | ||
add("isArray", "return Object[P].toString.call(a)==='[object Array]'") | ||
@@ -52,0 +52,0 @@ O = O[P] |
@@ -52,3 +52,3 @@ | ||
O = Array | ||
add("isArray", "return a instanceof Array") | ||
add("isArray", "return Object[P].toString.call(a)==='[object Array]'") | ||
@@ -55,0 +55,0 @@ O = O[P] |
@@ -14,3 +14,3 @@ | ||
, txtAttr = "textContent" in body ? "textContent" : "innerText" | ||
, templateRe = /^([ \t]*)(@?)((?:("|')(?:\\?.)*?\4|[-\w:.#[\]=])*)[ \t]*(.*?)$/gm | ||
, templateRe = /^([ \t]*)(@?)((?:("|')(?:\\?.)*?\4|[-\w:.#[\]=])*)[ \t]*(([\])}]?).*?([[({]?))$/gm | ||
, renderRe = /[;\s]*(\w+)(?:\s*(:?):((?:(["'\/])(?:\\?.)*?\3|[^;])*))?/g | ||
@@ -20,5 +20,5 @@ , splitRe = /[,\s]+/ | ||
attr: setAttr, | ||
css: El.css = function(el, key, val) { | ||
css: El.css = acceptMany(function(el, key, val) { | ||
el.style[key.camelCase()] = "" + val || "" | ||
}, | ||
}), | ||
"class": function(el, name, fn) { | ||
@@ -450,3 +450,13 @@ ;(arguments.length < 3 || fn ? addClass : rmClass)(el, name) | ||
if (len > 1) { | ||
for (; i < len; ) fn(el, names[i++], val) | ||
/* | ||
if (Array.isArray(val)) { | ||
for (; i < len; ) fn(el, names[i], val[i++]) | ||
} else { | ||
for (; i < len; ) fn(el, names[i++], val) | ||
} | ||
/*/ | ||
for (; i < len; ) { | ||
fn(el, names[i++], Array.isArray(val) ? val[i - 1] : val) | ||
} | ||
//*/ | ||
} else { | ||
@@ -745,3 +755,3 @@ fn(el, name, val) | ||
function work(all, indent, plugin, name, q, text, offset) { | ||
function work(all, indent, plugin, name, q, text, mapEnd, mapStart, offset) { | ||
if (offset && all === indent) return | ||
@@ -759,10 +769,12 @@ | ||
parent.txt += all + "\n" | ||
} else if (plugin) { | ||
} else if (plugin || mapStart && (name = "map")) { | ||
if (El.plugins[name]) { | ||
parentStack.push(parent) | ||
stack.unshift(q) | ||
parent = (new El.plugins[name](parent, text)).el | ||
parent = (new El.plugins[name](parent, text, mapEnd ? "" : ";")).el | ||
} else { | ||
append(parent, all) | ||
} | ||
} else if (mapEnd) { | ||
appendBind(parent, text, "") | ||
} else { | ||
@@ -788,4 +800,3 @@ if (name) { | ||
} | ||
q = getAttr(parent, "data-bind") | ||
setAttr(parent, "data-bind", (q ? q + ";" + name : name)) | ||
appendBind(parent, name, ";") | ||
} | ||
@@ -799,2 +810,7 @@ } | ||
function appendBind(el, val, sep) { | ||
var current = getAttr(el, "data-bind") | ||
setAttr(el, "data-bind", (current ? current + sep + val : val)) | ||
} | ||
function plugin(parent, name) { | ||
@@ -842,3 +858,3 @@ var t = this | ||
function js(parent, params) { | ||
function js(parent, params, attr1) { | ||
var t = this | ||
@@ -849,2 +865,3 @@ t.txtMode = t.parent = parent | ||
t.params = params | ||
t.a = attr1 | ||
} | ||
@@ -892,2 +909,13 @@ | ||
js: js, | ||
map: js.extend({ | ||
done: function() { | ||
var self = this | ||
, txt = (self.params + self.txt).replace(/\n+/g, "") | ||
appendBind( | ||
self.parent, | ||
self.a ? txt.slice(1) : txt, | ||
self.a | ||
) | ||
} | ||
}), | ||
template: plugin, | ||
@@ -894,0 +922,0 @@ view: plugin.extend({ |
497441
149
13098
22