{"size": 1954, "ext": "js", "max_stars_repo_path": "src/Sulu/Bundle/MediaBundle/Resources/public/dist/services/media-router.js", "max_stars_repo_name": "Tactics/sulu-old", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/Sulu/Bundle/MediaBundle/Resources/public/dist/services/media-router.js", "max_issues_repo_name": "Tactics/sulu-old", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/Sulu/Bundle/MediaBundle/Resources/public/dist/services/media-router.js", "max_forks_repo_name": "Tactics/sulu-old", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 1954.0, "max_line_length": 1954, "alphanum_fraction": 0.7533265097}
define(["services/husky/mediator","services/sulumedia/user-settings-manager"],function(a,b){"use strict";var c={rootCollection:"media/collections/:locale",rootCollectionWithoutLocale:"media/collections",editCollection:"media/collections/:locale/edit::id/:content",editCollectionWithoutLocale:"media/collections/edit::id/:content",editMedia:"media/collections/:locale/edit::id/:content/edit::mediaId",editMediaWithoutLocale:"media/collections/edit::id/:content/edit::mediaId"},d=function(a,b){var c=a;for(var d in b)b.hasOwnProperty(d)&&(c=c.replace(":"+d,b[d]));return c};return{toCollection:function(e,f,g){if(f=f||b.getMediaLocale(),e){var h=g?"/edit:"+g:"";a.emit("sulu.router.navigate",d(c.editCollection,{locale:f,id:e,content:"files"})+h,!0,!0)}else this.toRootCollection(f)},toRootCollection:function(e){e=e||b.getMediaLocale(),a.emit("sulu.router.navigate",d(c.rootCollection,{locale:e}),!0,!0)},initialize:function(e){e.push({route:c.rootCollection,callback:function(a){return'<div data-aura-component="collections/edit@sulumedia" data-aura-locale="'+a+'"/>'}}),e.push({route:c.rootCollectionWithoutLocale,callback:function(){b.getLastVisitedCollection()?this.toCollection(b.getLastVisitedCollection(),b.getMediaLocale()):this.toRootCollection(b.getMediaLocale())}.bind(this)}),e.push({route:c.editCollection,callback:function(a,b){return'<div data-aura-component="collections/edit@sulumedia" data-aura-id="'+b+'" data-aura-locale="'+a+'"/>'}}),e.push({route:c.editCollectionWithoutLocale,callback:function(a){this.toCollection(a)}.bind(this)}),e.push({route:c.editMedia,callback:function(b,e,f,g){return a.emit("sulu.router.navigate",d(c.editCollection,{locale:b,id:e,content:f}),!1,!1),'<div data-aura-component="collections/edit@sulumedia" data-aura-id="'+e+'" data-aura-locale="'+b+'" data-aura-edit-id="'+g+'"/>'}}),e.push({route:c.editMediaWithoutLocale,callback:function(a,c,d){this.toCollection(a,b.getMediaLocale(),d)}.bind(this)})}}});