',link:function(a,c,d,f){a.enableBackButton=!0,a.backButtonClass=d.backButtonType,d.backButtonIcon&&(a.backButtonClass+=" icon "+d.backButtonIcon),a.navController=f;var g=new ionic.views.HeaderBar({el:c[0],alignTitle:a.alignTitle||"center"});a.headerBarView=g,c.addClass(a.type);var h=function(b){var f=a.currentTitle;a.oldTitle=f,"undefined"!=typeof b.title&&(a.currentTitle=b.title),a.leftButtons=b.leftButtons,a.rightButtons=b.rightButtons,"undefined"!=typeof b.hideBackButton&&(a.enableBackButton=b.hideBackButton!==!0),b.animate!==!1&&d.animation&&b.title&&b.navDirection?(c[0].classList.add(d.animation),"back"===b.navDirection?c[0].classList.add("reverse"):c[0].classList.remove("reverse"),e(a,c,f,b,function(){g.align()})):g.align()};b.$on("viewState.viewEnter",function(a,b){h(b)}),a.$parent.$on("viewState.leftButtonsChanged",function(b,c){a.leftButtons=c}),a.$parent.$on("viewState.rightButtonsChanged",function(b,c){a.rightButtons=c})}}}]).directive("view",["ViewService","$rootScope","$animate",function(){return{restrict:"EA",priority:1e3,scope:{leftButtons:"=",rightButtons:"=",title:"=",icon:"@",iconOn:"@",iconOff:"@",type:"@",alignTitle:"@",hideBackButton:"@",hideNavBar:"@",animation:"@"},compile:function(a){return a.addClass("pane"),a[0].removeAttribute("title"),function(a){a.hideBackButton=a.$eval(a.hideBackButton),a.hideNavBar=a.$eval(a.hideNavBar),a.hideBackButton===!0?a.$emit("viewState.hideBackButton"):a.$emit("viewState.showBackButton"),a.$watch("leftButtons",function(){a.$emit("viewState.leftButtonsChanged",a.leftButtons)}),a.$watch("rightButtons",function(){a.$emit("viewState.rightButtonsChanged",a.rightButtons)})}}}}]).directive("viewBack",["ViewService","$rootScope",function(a,b){var c=function(b){var c=a.getBackView();return c&&c.go(),b.alreadyHandled=!0,!1};return{restrict:"AC",compile:function(a){return a.addClass("hide"),function(a,d){d.bind("click",c),b.$on("$viewHistory.historyChange",function(a,b){b.showBack?d[0].classList.remove("hide"):d[0].classList.add("hide")})}}}}]).directive("navView",["ViewService","$state","$anchorScroll","$compile","$controller","$animate",function(a,b,c,d,e){var f,g=!1,h={restrict:"E",terminal:!0,priority:2e3,transclude:!0,link:function(c,i,j){function k(g){var h=b.$current&&b.$current.locals[p],j=h&&h.$template?h.$template:null;if(h!==m){var k={parentElement:i,doAnimation:g,leavingScope:n,leavingElement:l,navDirection:null};if(j){l=angular.element(j.trim());var q={};"TABS"!==l[0].tagName&&(q=a.register(c),k.navDirection=q.navDirection),m=h,r.state=h.$$state;var s=d(l),t=b.current;if(n=t.scope=c.$new(),h.$$controller){h.$scope=n;var u=e(h.$$controller,h);t.controllerAs&&(n[t.controllerAs]=u),l.data("$ngControllerController",u),l.children().data("$ngControllerController",u)}s(n),n.$emit("$viewContentLoaded"),n.$eval(o),n.animation=f,k.enteringScope=n.$$childHead,k.enteringElement=l}a.transition(k)}}var l,m,n,o=(j.autoscroll,j.onload||""),p=j[h.name]||j.name||"",q=i.parent().inheritedData("$uiView");p.indexOf("@")<0&&(p=p+"@"+(q?q.state.name:""));var r={name:p,state:null,animation:null};i.data("$uiView",r);for(var s=i[0];!f&&s;)f=s.getAttribute("animation"),s=s.parentElement;var t=function(){if(!g){g=!0;try{k(!0)}catch(a){throw g=!1,a}g=!1}};c.$on("$stateChangeSuccess",t),c.$on("$viewContentLoading",t),k(!1)}};return h}])}(),function(){"use strict";angular.module("ionic.ui.virtRepeat",[]).directive("virtRepeat",function(){return{require:["?ngModel","^virtualList"],transclude:"element",priority:1e3,terminal:!0,compile:function(){return function(a,b,c,d){var e=d[1];e.listView.renderViewport=function(){}}}}})}(ionic),function(){"use strict";function a(a){var b=a.match(/^\s*([\$\w]+)\s+in\s+(\S*)\s*$/);if(!b)throw new Error("Expected sfVirtualRepeat in form of '_item_ in _collection_' but got '"+a+"'.");return{value:b[1],collection:b[2]}}function b(a){var b={overflow:"auto"},c=window.getComputedStyle?window.getComputedStyle(a[0]):a[0].currentStyle,d=c&&c.getPropertyValue("max-height"),e=c&&c.getPropertyValue("height");d&&"0px"!==d?b.maxHeight=d:b.height=e&&"0px"!==e?e:window.innerHeight,a.css(b)}function c(a){var b={margin:0,padding:0,border:0,"box-sizing":"border-box"};a.css(b)}function d(a){var b=window.getComputedStyle?window.getComputedStyle(a):a.currentStyle,c=b&&b.getPropertyValue("max-height"),d=b&&b.getPropertyValue("height");if(d&&"0px"!==d&&"auto"!==d)$log.info('Row height is "%s" from css height',d);else if(c&&"0px"!==c&&"none"!==c)d=c,$log.info('Row height is "%s" from css max-height',d);else{if(!a.clientHeight)throw new Error("Unable to compute height of row");d=a.clientHeight+"px",$log.info('Row height is "%s" from client height',d)}return angular.element(a).css("height",d),parseInt(d,10)}angular.module("ionic.ui.virtualRepeat",[]).directive("virtualRepeat",["$log",function(e){return{require:["?ngModel, ^virtualList"],transclude:"element",priority:1e3,terminal:!0,compile:function(f,g){var h=a(g.sfVirtualRepeat);return function(a,f,g,i){function j(a,b,c){var d=c.$new();return d[h.value]=b[a],d.$index=a,d.$first=0===a,d.$last=a===b.length-1,d.$middle=!(d.$first||d.$last),d.$watch(function(){d[h.value]=b[a]}),d}function k(a,b,c,d,e){var f,g,h,i=document.createDocumentFragment(),k=[];for(g=a;g!==b;g++)h=j(g,c,d),f=linker(h,angular.noop),k.push(f),i.appendChild(f[0]);return e.after(i),k}function l(){var a=clip(v.firstActive,v.firstVisible-v.lowWater,v.firstVisible-v.highWater),b=clip(v.firstActive+v.active,v.firstVisible+v.visible+v.lowWater,v.firstVisible+v.visible+v.highWater);v.firstActive=Math.max(0,a),v.active=Math.min(b,v.total)-v.firstActive}function m(b){s&&a.$apply(function(){v.firstVisible=Math.floor(b.target.scrollTop/s),v.visible=Math.ceil(u.viewport[0].clientHeight/s),e.log("scroll to row %o",v.firstVisible),t=b.target.scrollTop+b.target.clientHeight>=b.target.scrollHeight,l(),e.log(" state is now %o",v),e.log(" sticky = %o",t)})}function n(a){var b=a.$eval(h.collection);return b.length!==v.total&&(v.total=b.length,l()),{start:v.firstActive,active:v.active,len:b.length}}function o(a,b){var c,d,e=Array.prototype[a];for(d=0;b>d;d++)c=e.call(r),c.scope().$destroy(),c.remove()}function p(a,b,c){var g,i=b.start+b.active,j=c.$eval(h.collection);if(a===b)e.info("initial listen"),g=k(a.start,i,j,c,f),r=g,r.length&&(s=d(g[0][0]));else{var l=a.start+a.active,m=a.start>=b.start,n=m?a.start-b.start:b.start-a.start,p=l>=i?l-i:i-l,q=n<(m?b.active:a.active);if(e.info("change by %o,%o rows %s",n,p,m?"forward":"backward"),q){if(m?(e.info("need to remove from the top"),o("shift",n)):n&&(e.info("need to add at the top"),g=k(a.start,b.start,j,c,f),r=g.concat(r)),i>l)e.info("need to remove from the bottom"),o("pop",i-l);else if(p){var v=r[r.length-1];e.info("need to add to the bottom"),g=k(i,l,j,c,v),r=r.concat(g)}}else e.info("non-contiguous change"),o("pop",r.length),r=k(a.start,l,j,c,f);!s&&r.length&&(s=d(r[0][0])),u.content.css({"padding-top":a.start*s+"px"})}u.content.css({height:a.len*s+"px"}),t&&(u.viewport[0].scrollTop=u.viewport[0].clientHeight+u.viewport[0].scrollHeight)}var q=i[1],r=[],s=0,t=!1,u=q.element,v="ngModel"in g?a.$eval(g.ngModel):{};v.firstActive=0,v.firstVisible=0,v.visible=0,v.active=0,v.total=0,v.lowWater=v.lowWater||100,v.highWater=v.highWater||300,c(u.content),b(u.viewport),u.bind("momentumScrolled",m),a.$on("$destroy",function(){u.unbind("momentumScrolled",m)}),a.$watch(n,p,!0)}}}}])}(ionic);
\ No newline at end of file
+}),i.add(e),e.$watch("isVisible",function(a){k&&(c.leave(k),e.$broadcast("tab.hidden"),k=void 0),j&&(j.$destroy(),j=void 0),a&&(j=e.$new(),g(j,function(a){k=a,a.addClass("pane"),c.enter(a,f.parent(),f),e.$broadcast("tab.shown")}))}),g(e.$new(),function(b){var c=b[0].getElementsByTagName("nav-view");e.hasNavView=c.length>0,e.hasNavView&&(e.navViewName=c[0].getAttribute("name"),a.isCurrentStateNavView(e.navViewName)&&i.select(e.tabIndex))}),b.$on("$stateChangeSuccess",function(){a.isCurrentStateNavView(e.navViewName)&&e.tabIndex!==i.selectedIndex&&i.select(e.tabIndex)})}}}}]).directive("tabControllerBar",function(){return{restrict:"E",require:"^tabs",transclude:!0,replace:!0,scope:!0,template:'
',link:function(a,c,d){a.enableBackButton=!0,a.backButtonClass=d.backButtonType,d.backButtonIcon&&(a.backButtonClass+=" icon "+d.backButtonIcon),a.showNavBar=!0,b.$on("viewState.showNavBar",function(b,c){a.showNavBar=c});var f=new ionic.views.HeaderBar({el:c[0],alignTitle:a.alignTitle||"center"});a.headerBarView=f,c.addClass(a.type);var g=function(b){var g=a.currentTitle;a.oldTitle=g,"undefined"!=typeof b.title&&(a.currentTitle=b.title),a.leftButtons=b.leftButtons,a.rightButtons=b.rightButtons,"undefined"!=typeof b.hideBackButton&&(a.enableBackButton=b.hideBackButton!==!0),b.animate!==!1&&d.animation&&b.title&&b.navDirection?(c[0].classList.add(d.animation),"back"===b.navDirection?c[0].classList.add("reverse"):c[0].classList.remove("reverse"),e(a,c,g,b,function(){f.align()})):f.align()};b.$on("viewState.viewEnter",function(a,b){g(b)}),a.$parent.$on("viewState.leftButtonsChanged",function(b,c){a.leftButtons=c}),a.$parent.$on("viewState.rightButtonsChanged",function(b,c){a.rightButtons=c})}}}]).directive("view",["ViewService","$rootScope","$animate",function(a,b){return{restrict:"EA",priority:1e3,scope:{leftButtons:"=",rightButtons:"=",title:"=",icon:"@",iconOn:"@",iconOff:"@",type:"@",alignTitle:"@",hideBackButton:"@",hideNavBar:"@",animation:"@"},compile:function(a){return a.addClass("pane"),a[0].removeAttribute("title"),function(a){a.hideBackButton=a.$eval(a.hideBackButton),a.hideBackButton&&b.$broadcast("viewState.showBackButton",!1),a.hideNavBar=a.$eval(a.hideNavBar),b.$broadcast("viewState.showNavBar",!a.hideNavBar);var c=a.$watch("leftButtons",function(){a.$emit("viewState.leftButtonsChanged",a.leftButtons)}),d=a.$watch("rightButtons",function(){a.$emit("viewState.rightButtonsChanged",a.rightButtons)});a.$on("$destroy",function(){c(),d()})}}}}]).directive("viewBack",["ViewService","$rootScope",function(a,b){var c=function(b){var c=a.getBackView();return c&&c.go(),b.alreadyHandled=!0,!1};return{restrict:"AC",compile:function(a){return a.addClass("hide"),function(a,d){d.bind("tap",c),a.showButton=function(a){a?d[0].classList.remove("hide"):d[0].classList.add("hide")},b.$on("$viewHistory.historyChange",function(b,c){a.showButton(c.showBack)}),b.$on("viewState.showBackButton",function(b,c){a.showButton(c)})}}}}]).directive("navView",["ViewService","$state","$anchorScroll","$compile","$controller","$animate",function(a,b,c,d,e){var f,g=!1,h={restrict:"E",terminal:!0,priority:2e3,transclude:!0,link:function(c,i,j){function k(g){var h=b.$current&&b.$current.locals[p],j=h&&h.$template?h.$template:null;if(h!==m){var k={parentElement:i,doAnimation:g,leavingScope:n,leavingElement:l,navDirection:null};if(j){l=angular.element(j.trim());var q={};"TABS"!==l[0].tagName&&(q=a.register(c),k.navDirection=q.navDirection),m=h,r.state=h.$$state;var s=d(l),t=b.current;if(n=t.scope=c.$new(),h.$$controller){h.$scope=n;var u=e(h.$$controller,h);t.controllerAs&&(n[t.controllerAs]=u),l.data("$ngControllerController",u),l.children().data("$ngControllerController",u)}s(n),n.$emit("$viewContentLoaded"),n.$eval(o),n.animation=f,k.enteringScope=n.$$childHead,k.enteringElement=l}a.transition(k)}}var l,m,n,o=(j.autoscroll,j.onload||""),p=j[h.name]||j.name||"",q=i.parent().inheritedData("$uiView");p.indexOf("@")<0&&(p=p+"@"+(q?q.state.name:""));var r={name:p,state:null,animation:null};i.data("$uiView",r);for(var s=i[0];!f&&s;)f=s.getAttribute("animation"),s=s.parentElement;var t=function(){if(!g){g=!0;try{k(!0)}catch(a){throw g=!1,a}g=!1}};c.$on("$stateChangeSuccess",t),c.$on("$viewContentLoading",t),k(!1)}};return h}])}(),function(){"use strict";angular.module("ionic.ui.virtRepeat",[]).directive("virtRepeat",function(){return{require:["?ngModel","^virtualList"],transclude:"element",priority:1e3,terminal:!0,compile:function(){return function(a,b,c,d){var e=d[1];e.listView.renderViewport=function(){}}}}})}(ionic),function(){"use strict";function a(a){var b=a.match(/^\s*([\$\w]+)\s+in\s+(\S*)\s*$/);if(!b)throw new Error("Expected sfVirtualRepeat in form of '_item_ in _collection_' but got '"+a+"'.");return{value:b[1],collection:b[2]}}function b(a){var b={overflow:"auto"},c=window.getComputedStyle?window.getComputedStyle(a[0]):a[0].currentStyle,d=c&&c.getPropertyValue("max-height"),e=c&&c.getPropertyValue("height");d&&"0px"!==d?b.maxHeight=d:b.height=e&&"0px"!==e?e:window.innerHeight,a.css(b)}function c(a){var b={margin:0,padding:0,border:0,"box-sizing":"border-box"};a.css(b)}function d(a){var b=window.getComputedStyle?window.getComputedStyle(a):a.currentStyle,c=b&&b.getPropertyValue("max-height"),d=b&&b.getPropertyValue("height");if(d&&"0px"!==d&&"auto"!==d)$log.info('Row height is "%s" from css height',d);else if(c&&"0px"!==c&&"none"!==c)d=c,$log.info('Row height is "%s" from css max-height',d);else{if(!a.clientHeight)throw new Error("Unable to compute height of row");d=a.clientHeight+"px",$log.info('Row height is "%s" from client height',d)}return angular.element(a).css("height",d),parseInt(d,10)}angular.module("ionic.ui.virtualRepeat",[]).directive("virtualRepeat",["$log",function(e){return{require:["?ngModel, ^virtualList"],transclude:"element",priority:1e3,terminal:!0,compile:function(f,g){var h=a(g.sfVirtualRepeat);return function(a,f,g,i){function j(a,b,c){var d=c.$new();return d[h.value]=b[a],d.$index=a,d.$first=0===a,d.$last=a===b.length-1,d.$middle=!(d.$first||d.$last),d.$watch(function(){d[h.value]=b[a]}),d}function k(a,b,c,d,e){var f,g,h,i=document.createDocumentFragment(),k=[];for(g=a;g!==b;g++)h=j(g,c,d),f=linker(h,angular.noop),k.push(f),i.appendChild(f[0]);return e.after(i),k}function l(){var a=clip(v.firstActive,v.firstVisible-v.lowWater,v.firstVisible-v.highWater),b=clip(v.firstActive+v.active,v.firstVisible+v.visible+v.lowWater,v.firstVisible+v.visible+v.highWater);v.firstActive=Math.max(0,a),v.active=Math.min(b,v.total)-v.firstActive}function m(b){s&&a.$apply(function(){v.firstVisible=Math.floor(b.target.scrollTop/s),v.visible=Math.ceil(u.viewport[0].clientHeight/s),e.log("scroll to row %o",v.firstVisible),t=b.target.scrollTop+b.target.clientHeight>=b.target.scrollHeight,l(),e.log(" state is now %o",v),e.log(" sticky = %o",t)})}function n(a){var b=a.$eval(h.collection);return b.length!==v.total&&(v.total=b.length,l()),{start:v.firstActive,active:v.active,len:b.length}}function o(a,b){var c,d,e=Array.prototype[a];for(d=0;b>d;d++)c=e.call(r),c.scope().$destroy(),c.remove()}function p(a,b,c){var g,i=b.start+b.active,j=c.$eval(h.collection);if(a===b)e.info("initial listen"),g=k(a.start,i,j,c,f),r=g,r.length&&(s=d(g[0][0]));else{var l=a.start+a.active,m=a.start>=b.start,n=m?a.start-b.start:b.start-a.start,p=l>=i?l-i:i-l,q=n<(m?b.active:a.active);if(e.info("change by %o,%o rows %s",n,p,m?"forward":"backward"),q){if(m?(e.info("need to remove from the top"),o("shift",n)):n&&(e.info("need to add at the top"),g=k(a.start,b.start,j,c,f),r=g.concat(r)),i>l)e.info("need to remove from the bottom"),o("pop",i-l);else if(p){var v=r[r.length-1];e.info("need to add to the bottom"),g=k(i,l,j,c,v),r=r.concat(g)}}else e.info("non-contiguous change"),o("pop",r.length),r=k(a.start,l,j,c,f);!s&&r.length&&(s=d(r[0][0])),u.content.css({"padding-top":a.start*s+"px"})}u.content.css({height:a.len*s+"px"}),t&&(u.viewport[0].scrollTop=u.viewport[0].clientHeight+u.viewport[0].scrollHeight)}var q=i[1],r=[],s=0,t=!1,u=q.element,v="ngModel"in g?a.$eval(g.ngModel):{};v.firstActive=0,v.firstVisible=0,v.visible=0,v.active=0,v.total=0,v.lowWater=v.lowWater||100,v.highWater=v.highWater||300,c(u.content),b(u.viewport),u.bind("momentumScrolled",m),a.$on("$destroy",function(){u.unbind("momentumScrolled",m)}),a.$watch(n,p,!0)}}}}])}(ionic);
\ No newline at end of file