Bundled output for commit 610604e00d [skip ci]

This commit is contained in:
Gandalf-the-Bot 2016-08-17 17:39:59 +00:00
parent 610604e00d
commit e609e6ec7e
2 changed files with 2 additions and 2 deletions

View file

@ -1113,9 +1113,9 @@ m.route = function($window, renderer, pubsub) {
}(window, renderService, redrawService)
m.mount = function(renderer, pubsub) {
return function(root, component) {
pubsub.unsubscribe(root.redraw)
if (component === null) {
renderer.render(root, [])
pubsub.unsubscribe(root.redraw)
delete root.redraw
return
}

2
mithril.min.js vendored
View file

@ -37,5 +37,5 @@ case "?":return d("search").slice(t.length)+d("hash");default:return d("pathname
setImmediate:setTimeout,t="#!";return{setPrefix:function(b){t=b},getPath:g,setPath:k,defineRoutes:function(d,k,f){function y(){var b=g(),l={},n=p(b,l,l);m(function(){for(var g in d){var m=new RegExp("^"+g.replace(/:[^\/]+?\.{3}/g,"(.*?)").replace(/:[^\/]+/g,"([^\\/]+)")+"/?$");if(m.test(n)){n.replace(m,function(){for(var f=g.match(/:[^\/]+/g)||[],m=[].slice.call(arguments,1,-2),n=0;n<f.length;n++)l[f[n].replace(/:|\./g,"")]=decodeURIComponent(m[n]);k(d[g],l,b,g)});return}}f(b,l)})}n?b.onpopstate=
y:"#"===t.charAt(0)&&(b.onhashchange=y);y();return y},link:function(b){b.dom.setAttribute("href",t+b.attrs.href);b.dom.onclick=function(d){d.preventDefault();d.redraw=!1;k(b.attrs.href,void 0,void 0)}}}},R=function(b){var d=0,p=null,g="function"===typeof requestAnimationFrame?requestAnimationFrame:setTimeout;return function(k){var n=Date.now();!0===k||0===d||16<=n-d?(d=n,b()):null===p&&(p=g(function(){p=null;b();d=Date.now()},16-(n-d)))}},O=function(b,d,p,g){g=R(g);null!=d&&d.setEventCallback(function(b){!1!==
b.redraw&&p.publish()});null!=p&&(b.redraw&&p.unsubscribe(b.redraw),p.subscribe(g));return b.redraw=g};A.route=function(b,d,p){var g=Q(b);b=function(b,n,m){var t=null,x="div";m=g.defineRoutes(m,function(g,f,m,h){f.path=m;f.route=h;if("function"===typeof g.onmatch)if("function"!==typeof g.view&&(g.view=function(b){return b}),h=function(h){t=m;x=h;d.render(b,g.view(w(h,null,f,void 0,void 0,void 0)))},m!==t)g.onmatch(w(g,null,f,void 0,void 0,void 0),h);else h(x);else d.render(b,w(g,null,f,void 0,void 0,
void 0))},function(){g.setPath(n,null,{replace:!0})});O(b,d,p,m)};b.link=g.link;b.prefix=g.setPrefix;b.set=g.setPath;b.get=g.getPath;return b}(window,I,D);A.mount=function(b,d){return function(p,g){d.unsubscribe(p.redraw);null===g?(b.render(p,[]),delete p.redraw):O(p,b,d,function(){b.render(p,w(g,void 0,void 0,void 0,void 0,void 0))})()}}(I,D);A.trust=function(b){return w("<",void 0,void 0,b,void 0,void 0)};A.withAttr=function(b,d,p){return function(g){return d.call(p||this,b in g.currentTarget?g.currentTarget[b]:
void 0))},function(){g.setPath(n,null,{replace:!0})});O(b,d,p,m)};b.link=g.link;b.prefix=g.setPrefix;b.set=g.setPath;b.get=g.getPath;return b}(window,I,D);A.mount=function(b,d){return function(p,g){null===g?(b.render(p,[]),d.unsubscribe(p.redraw),delete p.redraw):O(p,b,d,function(){b.render(p,w(g,void 0,void 0,void 0,void 0,void 0))})()}}(I,D);A.trust=function(b){return w("<",void 0,void 0,b,void 0,void 0)};A.withAttr=function(b,d,p){return function(g){return d.call(p||this,b in g.currentTarget?g.currentTarget[b]:
g.currentTarget.getAttribute(b))}};A.prop=M(console.log.bind(console));A.render=I.render;A.redraw=D.publish;A.request=L.request;A.jsonp=L.jsonp;A.version="1.0.0";"undefined"!==typeof module?module.exports=A:window.m=A};