1!function(n,t){"function"==typeof define&&define.amd?define([],t):n.ngGitNav=t()}(this,function(){var n,t,e;return function(i){function o(n,t){return _.call(n,t)}function r(n,t){var e,i,o,r,a,c,s,l,u,f,m,p=t&&t.split("/"),g=v.map,d=g&&g["*"]||{};if(n&&"."===n.charAt(0))if(t){for(p=p.slice(0,p.length-1),n=n.split("/"),a=n.length-1,v.nodeIdCompat&&y.test(n[a])&&(n[a]=n[a].replace(y,"")),n=p.concat(n),u=0;u<n.length;u+=1)if(m=n[u],"."===m)n.splice(u,1),u-=1;else if(".."===m){if(1===u&&(".."===n[2]||".."===n[0]))break;u>0&&(n.splice(u-1,2),u-=2)}n=n.join("/")}else 0===n.indexOf("./")&&(n=n.substring(2));if((p||d)&&g){for(e=n.split("/"),u=e.length;u>0;u-=1){if(i=e.slice(0,u).join("/"),p)for(f=p.length;f>0;f-=1)if(o=g[p.slice(0,f).join("/")],o&&(o=o[i])){r=o,c=u;break}if(r)break;!s&&d&&d[i]&&(s=d[i],l=u)}!r&&s&&(r=s,c=l),r&&(e.splice(0,c,r),n=e.join("/"))}return n}function a(n,t){return function(){return p.apply(i,x.call(arguments,0).concat([n,t]))}}function c(n){return function(t){return r(t,n)}}function s(n){return function(t){h[n]=t}}function l(n){if(o(b,n)){var t=b[n];delete b[n],w[n]=!0,m.apply(i,t)}if(!o(h,n)&&!o(w,n))throw new Error("No "+n);return h[n]}function u(n){var t,e=n?n.indexOf("!"):-1;return e>-1&&(t=n.substring(0,e),n=n.substring(e+1,n.length)),[t,n]}function f(n){return function(){return v&&v.config&&v.config[n]||{}}}var m,p,g,d,h={},b={},v={},w={},_=Object.prototype.hasOwnProperty,x=[].slice,y=/\.js$/;g=function(n,t){var e,i=u(n),o=i[0];return n=i[1],o&&(o=r(o,t),e=l(o)),o?n=e&&e.normalize?e.normalize(n,c(t)):r(n,t):(n=r(n,t),i=u(n),o=i[0],n=i[1],o&&(e=l(o))),{f:o?o+"!"+n:n,n:n,pr:o,p:e}},d={require:function(n){return a(n)},exports:function(n){var t=h[n];return"undefined"!=typeof t?t:h[n]={}},module:function(n){return{id:n,uri:"",exports:h[n],config:f(n)}}},m=function(n,t,e,r){var c,u,f,m,p,v,_=[],x=typeof e;if(r=r||n,"undefined"===x||"function"===x){for(t=!t.length&&e.length?["require","exports","module"]:t,p=0;p<t.length;p+=1)if(m=g(t[p],r),u=m.f,"require"===u)_[p]=d.require(n);else if("exports"===u)_[p]=d.exports(n),v=!0;else if("module"===u)c=_[p]=d.module(n);else if(o(h,u)||o(b,u)||o(w,u))_[p]=l(u);else{if(!m.p)throw new Error(n+" missing "+u);m.p.load(m.n,a(r,!0),s(u),{}),_[p]=h[u]}f=e?e.apply(h[n],_):void 0,n&&(c&&c.exports!==i&&c.exports!==h[n]?h[n]=c.exports:f===i&&v||(h[n]=f))}else n&&(h[n]=e)},n=t=p=function(n,t,e,o,r){if("string"==typeof n)return d[n]?d[n](t):l(g(n,t).f);if(!n.splice){if(v=n,v.deps&&p(v.deps,v.callback),!t)return;t.splice?(n=t,t=e,e=null):n=i}return t=t||function(){},"function"==typeof e&&(e=o,o=r),o?m(i,n,t,e):setTimeout(function(){m(i,n,t,e)},4),p},p.config=function(n){return p(n)},n._defined=h,e=function(n,t,e){t.splice||(e=t,t=[]),o(h,n)||o(b,n)||(b[n]=[n,t,e])},e.amd={jQuery:!0}}(),e("../../bower_components/almond/almond",function(){}),e("../../bower_components/require-css/./normalize",{}),e("../../bower_components/require-css/css",{load:function(n){throw new Error("Dynamic load not allowed: "+n)}}),e("../../bower_components/require-css/css!../styles/animations",[],function(){}),e("../../bower_components/require-css/css!../styles/main",[],function(){}),e("../../bower_components/require-css/css!../styles/octicons",[],function(){}),e("../../bower_components/requirejs-plugins/src/image",[],function(){function n(){}function t(n){return n=n.replace(i,""),n+=n.indexOf("?")<0?"?":"&",n+e+"="+Math.round(2147483647*Math.random())}var e="bust",i="!bust",o="!rel";return{load:function(t,e,i,r){var a;r.isBuild?i(null):(a=new Image,a.onerror=function(n){i.error(n)},a.onload=function(){i(a);try{delete a.onload}catch(t){a.onload=n}},a.src=-1!==t.indexOf(o)?e.toUrl(t.replace(o,"")):t)},normalize:function(n){return-1===n.indexOf(i)?n:t(n)}}}),e("ngGitNav",["../../bower_components/require-css/css!../styles/animations","../../bower_components/require-css/css!../styles/main","../../bower_components/require-css/css!../styles/octicons","../../bower_components/requirejs-plugins/src/image!//assets-cdn.github.com/images/spinners/octocat-spinner-32-EAF2F5.gif"],function(){var n={epsilonName:"ngGitNav"};return angular.module(n.epsilonName,["ngAnimate","ui.router"]).directive("githubNav",function(){return{restrict:"E",scope:{user:"@",repo:"@"},controller:["$scope","$state","$rootScope","github",function(n,t,e,i){i.setUser(n.user),i.setRepo(n.repo),n.getGitUrl=i.getGitUrl,n.prev=function(n,i){e.dir=!0,n.clicked=!0,e.breadcrumbs.splice(i+1),t.transitionTo("main",{path:n.path},{reload:!0})},t.go("main")}],template:"<div class='view-container' ng-style='$root.containerStyle'><ul class='breadcrumbs'><li><a target='_blank' ng-href='{{getGitUrl()}}'>{{user}}</a></li><li ng-switch='$root.breadcrumbs.length > 0' ng-class='{ last: $root.breadcrumbs.length == 0 }'><a href='' ng-click='prev({path: \"/\"}, -1)' ng-switch-when='true'>{{repo}}</a><span ng-switch-when='false'>{{repo}}</span></li><li ng-repeat='breadcrumb in $root.breadcrumbs' ng-switch='$last' ng-class='{ last: $last }'><span ng-switch-when='true'>{{breadcrumb.name}}</span><a ng-switch-when='false' href='' ng-click='prev(breadcrumb, $index)'>{{breadcrumb.name}}</a></li></ul><div class='view-animation' ng-class='{ to_left: $root.dir === false, to_right: $root.dir === true }' ui-view></div></div>"}}).directive("githubrepoContent",function(){return{template:"<ul class= 'files'><li ng-repeat='item in items | orderBy:[\"type\", \"name\"]' ng-switch='item.type' ng-class='{ last: $last }'><span class='icon' ng-class='{ \"octicon octicon-file-text\": item.type == \"file\" && !item.clicked, \"octicon octicon-file-directory\": item.type == \"dir\" && !item.clicked, loading: item.clicked}'></span><a href='' ng-switch-when='dir' ng-click='next(item)'>{{item.name}}</a><span ng-switch-when='file'>{{item.name}}</span></li></ul>",restrict:"E",controller:["$scope","$state","$rootScope",function(n,t,e){n.next=function(n){e.dir=!1,n.clicked=!0,e.breadcrumbs.push(n),t.transitionTo("main",{path:n.path},{reload:!0})}}]}}).service("github",["$http","$rootScope","$interpolate",function(n,t,e){var i,o,r,a="https://api.github.com/repos/{{u}}/{{r}}/contents/{{p}}",c="https://github.com/{{u}}/{{r}}";return{setRepo:function(n){o=n},setUser:function(n){i=n},setPath:function(n){r=n},getUser:function(){return i},getRepo:function(){return o},getApiUrl:function(){return e(a)({u:i,r:o,p:r})},getGitUrl:function(n){var t={u:i};return t=n?angular.extend(t,{r:o}):t,e(c)(t)},fetchData:function(){return n.get(this.getApiUrl()).then(function(n){return n.data})}}}]).config(["$stateProvider",function(n){n.state("main",{template:"<githubrepo-content></githubrepo-content>",params:["path"],controller:["$scope","$rootScope","data",function(n,t,e){n.items=e,t.containerStyle={height:33*e.length+33+"px"}}],resolve:{data:["github","$stateParams",function(n,t){return n.setPath(t.path),n.fetchData()}]}})}]).run(["$rootScope",function(n){n.dir=void 0,n.breadcrumbs=[],n.containerStyle={}}]),n}),t(["ngGitNav"],function(n){angular.module("ngGitNavApp",[n.epsilonName]),angular.bootstrap(document,["ngGitNavApp"])}),e("config",function(){}),function(n){var t=document,e="appendChild",i="styleSheet",o=t.createElement("style");o.type="text/css",t.getElementsByTagName("head")[0][e](o),o[i]?o[i].cssText=n:o[e](t.createTextNode(n))}("github-nav .view-animation.ng-enter.to_right {\n -moz-animation: enter_animation_right 1s;\n -webkit-animation: enter_animation_right 1s;\n animation: enter_animation_right 1s;\n top: 30px;\n left: -100%;\n}\ngithub-nav .view-animation.ng-enter.to_left {\n -moz-animation: enter_animation_left 1s;\n -webkit-animation: enter_animation_left 1s;\n animation: enter_animation_left 1s;\n top: 30px;\n left: 100%;\n}\ngithub-nav .view-animation.ng-leave.to_right {\n -moz-animation: enter_animation_right 1s;\n -webkit-animation: leave_animation_right 1s;\n animation: leave_animation_right 1s;\n top: 30px;\n left: 0;\n}\ngithub-nav .view-animation.ng-leave.to_left {\n -moz-animation: leave_animation_left 1s;\n -webkit-animation: leave_animation_left 1s;\n animation: leave_animation_left 1s;\n top: 30px;\n left: 0;\n}\n@keyframes enter_animation_right {\n from {\n left: -100%;\n }\n to {\n left: 0;\n }\n}\n@-webkit-keyframes enter_animation_right {\n from {\n left: -100%;\n }\n to {\n left: 0;\n }\n}\n@keyframes leave_animation_right {\n from {\n left: 0;\n }\n to {\n left: 100%;\n }\n}\n@-webkit-keyframes leave_animation_right {\n from {\n left: 0;\n }\n to {\n left: 100%;\n }\n}\n@keyframes enter_animation_left {\n from {\n left: 100%;\n }\n to {\n left: 0;\n }\n}\n@-webkit-keyframes enter_animation_left {\n from {\n left: 100%;\n }\n to {\n left: 0;\n }\n}\n@keyframes leave_animation_left {\n from {\n left: 0;\n }\n to {\n left: -100%;\n }\n}\n@-webkit-keyframes leave_animation_left {\n from {\n left: 0;\n }\n to {\n left: -100%;\n }\n}\ngithub-nav {\n font: 13px Helvetica, arial, freesans, clean, sans-serif, \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n line-height: 1.4;\n}\ngithub-nav .view-animation {\n position: absolute;\n width: 100%;\n background-color: #f8f8f8;\n top: 30px;\n}\ngithub-nav .view-container {\n position: relative;\n overflow: hidden;\n}\ngithub-nav * {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\ngithub-nav a {\n color: #4183c4;\n text-decoration: none;\n}\ngithub-nav a:hover,\ngithub-nav a:focus,\ngithub-nav a:active {\n text-decoration: underline;\n}\ngithub-nav ul {\n margin: 0 !important;\n padding: 0 !important;\n list-style: none !important;\n}\ngithub-nav ul li {\n margin: 0 !important;\n}\ngithub-nav ul.files {\n border: 1px solid #ddd;\n border-radius: 3px;\n}\ngithub-nav ul.files li {\n padding-left: 10px;\n border-bottom: 1px solid #eee;\n height: 33px;\n line-height: 33px;\n}\ngithub-nav ul.files li span.icon.octicon {\n margin-right: 5px;\n}\ngithub-nav ul.files li span.icon.octicon.octicon-file-text {\n color: #777;\n}\ngithub-nav ul.files li span.icon.octicon.octicon-file-directory {\n color: #80a6cd;\n}\ngithub-nav ul.files li span.icon.loading {\n background-image: url(\"//assets-cdn.github.com/images/spinners/octocat-spinner-32-EAF2F5.gif\");\n background-repeat: no-repeat;\n background-size: 16px;\n width: 16px;\n height: 16px;\n display: inline-block;\n margin-right: 3px;\n position: relative;\n top: 3px;\n left: -2px;\n}\ngithub-nav ul.files li.last {\n border-bottom: none;\n}\ngithub-nav ul.breadcrumbs li {\n float: left;\n color: #4183c4;\n font-weight: bold;\n font-size: 18px;\n}\ngithub-nav ul.breadcrumbs li:after {\n color: #999;\n font-weight: normal;\n content: '\\00a0\\002F\\00a0';\n}\ngithub-nav ul.breadcrumbs li.last {\n color: #000;\n}\ngithub-nav ul.breadcrumbs li.last:after {\n content: '';\n}\n@font-face {\r\n font-family: 'octicons';\r\n src: url('http://cdnjs.cloudflare.com/ajax/libs/octicons/2.0.2/octicons.eot?#iefix') format('embedded-opentype'),\r\n url('http://cdnjs.cloudflare.com/ajax/libs/octicons/2.0.2/octicons.woff') format('woff'),\r\n url('http://cdnjs.cloudflare.com/ajax/libs/octicons/2.0.2/octicons.ttf') format('truetype'),\r\n url('http://cdnjs.cloudflare.com/ajax/libs/octicons/2.0.2/octicons.svg#octicons') format('svg');\r\n font-weight: normal;\r\n font-style: normal;\r\n}\r\n.octicon {\r\n font: normal normal 16px octicons;\r\n line-height: 1;\r\n display: inline-block;\r\n text-decoration: none;\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n}\r\n.octicon-file-directory:before { content: '\\f016'} /* ๏ */\r\n.octicon-file-text:before { content: '\\f011'} /* ๏ */\r\n"),t("ngGitNav")});