Bundled output for commit 24b96817a3 [skip ci]

This commit is contained in:
Gandalf-the-Bot 2017-03-07 14:52:18 +00:00
parent 24b96817a3
commit 3e5597e4d0
2 changed files with 4 additions and 4 deletions

4
mithril.min.js vendored
View file

@ -1,4 +1,4 @@
new function(){function x(b,d,l,e,g,k){return{tag:b,key:d,attrs:l,children:e,text:g,dom:k,domSize:void 0,state:{},events:void 0,instance:void 0,skip:!1}}function B(b){if(null==b||"string"!==typeof b&&"function"!==typeof b&&"function"!==typeof b.view)throw Error("The selector must be either a string or a component.");if("string"===typeof b&&void 0===I[b]){for(var d,l,e=[],g={};d=O.exec(b);){var k=d[1],h=d[2];""===k&&""!==h?l=h:"#"===k?g.id=h:"."===k?e.push(h):"["===d[3][0]&&((k=d[6])&&(k=k.replace(/\\(["'])/g,
(function(){function x(b,d,l,e,g,k){return{tag:b,key:d,attrs:l,children:e,text:g,dom:k,domSize:void 0,state:{},events:void 0,instance:void 0,skip:!1}}function B(b){if(null==b||"string"!==typeof b&&"function"!==typeof b&&"function"!==typeof b.view)throw Error("The selector must be either a string or a component.");if("string"===typeof b&&void 0===I[b]){for(var d,l,e=[],g={};d=O.exec(b);){var k=d[1],h=d[2];""===k&&""!==h?l=h:"#"===k?g.id=h:"."===k?e.push(h):"["===d[3][0]&&((k=d[6])&&(k=k.replace(/\\(["'])/g,
"$1").replace(/\\\\/g,"\\")),"class"===d[4]?e.push(k):g[d[4]]=k||!0)}0<e.length&&(g.className=e.join(" "));I[b]=function(b,d){var e=!1,a,k,n=b.className||b["class"],y;for(y in g)b[y]=g[y];void 0!==n&&(void 0!==b["class"]&&(b["class"]=void 0,b.className=n),void 0!==g.className&&(b.className=g.className+" "+n));for(y in b)if("key"!==y){e=!0;break}Array.isArray(d)&&1==d.length&&null!=d[0]&&"#"===d[0].tag?k=d[0].children:a=d;return x(l||"div",b.key,e?b:void 0,a,k,void 0)}}var r;null==arguments[1]||"object"===
typeof arguments[1]&&void 0===arguments[1].tag&&!Array.isArray(arguments[1])?(r=arguments[1],e=2):e=1;if(arguments.length===e+1)d=Array.isArray(arguments[e])?arguments[e]:[arguments[e]];else for(d=[];e<arguments.length;e++)d.push(arguments[e]);return"string"===typeof b?I[b](r||{},x.normalizeChildren(d)):x(b,r&&r.key,r||{},x.normalizeChildren(d),void 0,void 0)}function P(b){var d=0,l=null,e="function"===typeof requestAnimationFrame?requestAnimationFrame:setTimeout;return function(){var g=Date.now();
0===d||16<=g-d?(d=g,b()):null===l&&(l=e(function(){l=null;b();d=Date.now()},16-(g-d)))}}x.normalize=function(b){return Array.isArray(b)?x("[",void 0,void 0,x.normalizeChildren(b),void 0,void 0):null!=b&&"object"!==typeof b?x("#",void 0,void 0,!1===b?"":b,void 0,void 0):b};x.normalizeChildren=function(b){for(var d=0;d<b.length;d++)b[d]=x.normalize(b[d]);return b};var O=/(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g,I={};B.trust=function(b){null==b&&(b="");return x("<",
@ -40,4 +40,4 @@ d=e(d,a,l);if(null!=h){for(var m in h)a[m]=h[m];d=d.replace(/:([^\/]+)/g,functio
"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$"),m.test(l)){l.replace(m,function(){for(var b=v.match(/:[^\/]+/g)||[],e=[].slice.call(arguments,1,-2),h=0;h<b.length;h++)g[b[h].replace(/:|\./g,"")]=decodeURIComponent(e[h]);k(d[v],g,a,v)});return}h(a,g)}g?b.onpopstate=l(a):"#"===r.prefix.charAt(0)&&(b.onhashchange=a);a()}};return r};B.route=function(b,d){var l=T(b),e=function(b){return b},g,k,h,r,n,m=function(b,a,m){if(null==b)throw Error("Ensure the DOM element that was passed to `m.route` is not undefined");
var v=function(){null!=g&&d.render(b,g(x(k,h.key,h)))},w=function(b){if(b!==a)l.setPath(a,null,{replace:!0});else throw Error("Could not resolve default route "+a);};l.defineRoutes(m,function(a,b,d){var l=n=function(a,m){l===n&&(k=null==m||"function"!==typeof m.view&&"function"!==typeof m?"div":m,h=b,r=d,n=null,g=(a.render||e).bind(a),v())};a.view||"function"===typeof a?l({},a):a.onmatch?S.resolve(a.onmatch(b,d)).then(function(b){l(a,b)},w):l(a,"div")},w);d.subscribe(b,v)};m.set=function(b,a,d){null!=
n&&(d={replace:!0});n=null;l.setPath(b,a,d)};m.get=function(){return r};m.prefix=function(b){l.prefix=b};m.link=function(b){b.dom.setAttribute("href",l.prefix+b.attrs.href);b.dom.onclick=function(a){a.ctrlKey||a.metaKey||a.shiftKey||2===a.which||(a.preventDefault(),a.redraw=!1,a=this.getAttribute("href"),0===a.indexOf(l.prefix)&&(a=a.slice(l.prefix.length)),m.set(a,void 0,void 0))}};m.param=function(b){return"undefined"!==typeof h&&"undefined"!==typeof b?h[b]:h};return m}(window,H);B.withAttr=function(b,
d,l){return function(e){d.call(l||this,b in e.currentTarget?e.currentTarget[b]:e.currentTarget.getAttribute(b))}};var U=N(window);B.render=U.render;B.redraw=H.redraw;B.request=L.request;B.jsonp=L.jsonp;B.parseQueryString=M;B.buildQueryString=F;B.version="1.0.1";B.vnode=x;"undefined"!==typeof module?module.exports=B:window.m=B};
d,l){return function(e){d.call(l||this,b in e.currentTarget?e.currentTarget[b]:e.currentTarget.getAttribute(b))}};var U=N(window);B.render=U.render;B.redraw=H.redraw;B.request=L.request;B.jsonp=L.jsonp;B.parseQueryString=M;B.buildQueryString=F;B.version="1.0.1";B.vnode=x;"undefined"!==typeof module?module.exports=B:window.m=B})();