/*! * Copyright 2014 Drifty Co. * http://drifty.com/ * * Ionic, v1.0.0-beta.11 * A powerful HTML5 mobile app framework. * http://ionicframework.com/ * * By @maxlynch, @benjsperry, @adamdbradley <3 * * Licensed under the MIT license. Please see LICENSE for more information. * */ !function(){function e(e){var t,n=typeof e;return"object"==n&&null!==e?"function"==typeof(t=e.$$hashKey)?t=e.$$hashKey():void 0===t&&(t=e.$$hashKey=ionic.Utils.nextUid()):t=e,n+":"+t}function t(e){if(e.$root!==e){var t=e.$parent;e.$$disconnected=!0,t.$$childHead===e&&(t.$$childHead=e.$$nextSibling),t.$$childTail===e&&(t.$$childTail=e.$$prevSibling),e.$$prevSibling&&(e.$$prevSibling.$$nextSibling=e.$$nextSibling),e.$$nextSibling&&(e.$$nextSibling.$$prevSibling=e.$$prevSibling),e.$$nextSibling=e.$$prevSibling=null}}function n(e){if(e.$root!==e&&e.$$disconnected){var t=e.$parent;e.$$disconnected=!1,e.$$prevSibling=t.$$childTail,t.$$childHead?(t.$$childTail.$$nextSibling=e,t.$$childTail=e):t.$$childHead=t.$$childTail=e}}function i(e){return["$log",function(t){function n(e){this.handle=e}var i=this,o=this._instances=[];this._registerInstance=function(e,t){return e.$$delegateHandle=t,o.push(e),function(){var t=o.indexOf(e);-1!==t&&o.splice(t,1)}},this.$getByHandle=function(e){return e?new n(e):i},e.forEach(function(e){n.prototype[e]=function(){var n,i,r=this.handle,a=arguments,s=0;return o.forEach(function(t){t.$$delegateHandle===r&&(s++,i=t[e].apply(t,a),1===s&&(n=i))}),s?n:t.warn('Delegate for handle "'+this.handle+'" could not find a corresponding element with delegate-handle="'+this.handle+'"! '+e+"() was not called!\nPossible cause: If you are calling "+e+'() immediately, and your element with delegate-handle="'+this.handle+'" is a child of your controller, then your element may not be compiled yet. Put a $timeout around your call to '+e+"() and try again.")},i[e]=function(){var t,n,i=arguments;return o.forEach(function(o,r){n=o[e].apply(o,i),0===r&&(t=n)}),t}})}]}function o(e){return[function(){return{priority:"99",link:function(t,n,i,o){o&&i.$observe(e,function(e){n[0][i]="",setTimeout(function(){n[0][i]=e})})}}}]}function r(e){return["$ionicGesture","$parse",function(t,n){var i=e.substr(2).toLowerCase();return function(o,r,a){var s=n(a[e]),c=function(e){o.$apply(function(){s(o,{$event:e})})},l=t.on(i,c,r);o.$on("$destroy",function(){t.off(l,i,c)})}}]}function a(){return["$ionicScrollDelegate",function(e){return{restrict:"E",link:function(t,n,i){function o(t){for(var i=3,o=t.target;i--&&o;){if(o.classList.contains("button")||o.tagName.match(/input|textarea|select/i)||o.isContentEditable)return;o=o.parentNode}var r=t.gesture&&t.gesture.touches[0]||t.detail.touches[0],a=n[0].getBoundingClientRect();ionic.DomUtil.rectContains(r.pageX,r.pageY,a.left,a.top-20,a.left+a.width,a.top+a.height)&&e.scrollTop(!0)}"true"!=i.noTapScroll&&(ionic.on("tap",o,n[0]),t.$on("$destroy",function(){ionic.off("tap",o,n[0])}))}}}]}function s(e){return[function(){return{restrict:"E",compile:function(t){function n(t,n,i){var o=(new ionic.views.HeaderBar({el:n[0],alignTitle:i.alignTitle||"center"}),n[0]);e?(t.$watch(function(){return o.className},function(e){var n=-1===e.indexOf("ng-hide"),i=-1!==e.indexOf("bar-subheader");t.$hasHeader=n&&!i,t.$hasSubheader=n&&i}),t.$on("$destroy",function(){delete t.$hasHeader,delete t.$hasSubheader})):(t.$watch(function(){return o.className},function(e){var n=-1===e.indexOf("ng-hide"),i=-1!==e.indexOf("bar-subfooter");t.$hasFooter=n&&!i,t.$hasSubfooter=n&&i}),t.$on("$destroy",function(){delete t.$hasFooter,delete t.$hasSubfooter}),t.$watch("$hasTabs",function(e){n.toggleClass("has-tabs",!!e)}))}t.addClass(e?"bar bar-header":"bar bar-footer");var i=t[0].parentNode;return i.querySelector(".tabs-top")&&t.addClass("has-tabs-top"),{pre:n}}}}]}function c(e){return e.clientHeight}function l(e){e.stopPropagation()}var u={method:function(e,t,n){var i=!1;return function(){return i||(i=!0,t(e)),n.apply(this,arguments)}},field:function(e,t,n,i,o){var r=!1,a=function(){return r||(r=!0,t(e)),o},s=function(n){return r||(r=!0,t(e)),o=n,n};Object.defineProperty(n,i,{get:a,set:s,enumerable:!0})}},d=angular.module("ionic",["ngAnimate","ngSanitize","ui.router"]),h=angular.extend,f=angular.forEach,p=angular.isDefined,v=angular.isString,g=angular.element;d.factory("$ionicActionSheet",["$rootScope","$document","$compile","$animate","$timeout","$ionicTemplateLoader","$ionicPlatform",function(e,t,n,i,o,r,a){function s(r){var s=e.$new(!0);angular.extend(s,{cancel:angular.noop,destructiveButtonClicked:angular.noop,buttonClicked:angular.noop,$deregisterBackButton:angular.noop,buttons:[],cancelOnStateChange:!0},r||{});var c=s.element=n('')(s),l=g(c[0].querySelector(".action-sheet-wrapper")),u=s.cancelOnStateChange?e.$on("$stateChangeSuccess",function(){s.cancel()}):angular.noop;return s.removeSheet=function(e){s.removed||(s.removed=!0,l.removeClass("action-sheet-up"),t[0].body.classList.remove("action-sheet-open"),s.$deregisterBackButton(),u(),i.removeClass(c,"active",function(){s.$destroy(),c.remove(),s.cancel.$scope=null,(e||angular.noop)()}))},s.showSheet=function(e){s.removed||(t[0].body.appendChild(c[0]),t[0].body.classList.add("action-sheet-open"),i.addClass(c,"active",function(){s.removed||(e||angular.noop)()}),o(function(){s.removed||l.addClass("action-sheet-up")},20,!1))},s.$deregisterBackButton=a.registerBackButtonAction(function(){o(s.cancel)},C),s.cancel=function(){s.removeSheet(r.cancel)},s.buttonClicked=function(e){r.buttonClicked(e,r.buttons[e])===!0&&s.removeSheet()},s.destructiveButtonClicked=function(){r.destructiveButtonClicked()===!0&&s.removeSheet()},s.showSheet(),s.cancel.$scope=s,s.cancel}return{show:s}}]),g.prototype.addClass=function(e){var t,n,i,o,r,a;if(e&&"ng-scope"!=e&&"ng-isolate-scope"!=e)for(t=0;t'),a=0;return e[0].body.appendChild(r[0]),{retain:n,release:i,getElement:o,_element:r}}]),d.factory("$ionicBind",["$parse","$interpolate",function(e,t){var n=/^\s*([@=&])(\??)\s*(\w*)\s*$/;return function(i,o,r){f(r||{},function(r,a){var s,c,l=r.match(n)||[],u=l[3]||a,d=l[1];switch(d){case"@":if(!o[u])return;o.$observe(u,function(e){i[a]=e}),o[u]&&(i[a]=t(o[u])(i));break;case"=":if(!o[u])return;c=i.$watch(o[u],function(e){i[a]=e}),i.$on("$destroy",c);break;case"&":if(o[u]&&o[u].match(RegExp(a+"(.*?)")))throw new Error('& expression binding "'+a+'" looks like it will recursively call "'+o[u]+'" and cause a stack overflow! Please choose a different scopeName.');s=e(o[u]),i[a]=function(e){return s(i,e)}}})}}]),d.factory("$collectionDataSource",["$cacheFactory","$parse","$rootScope",function(i,o,r){function a(e){e.css(ionic.CSS.TRANSFORM,"translate3d(-2000px,-2000px,0)")}function s(t){var n=this;if(this.scope=t.scope,this.transcludeFn=t.transcludeFn,this.transcludeParent=t.transcludeParent,this.element=t.element,this.keyExpr=t.keyExpr,this.listExpr=t.listExpr,this.trackByExpr=t.trackByExpr,this.heightGetter=t.heightGetter,this.widthGetter=t.widthGetter,this.dimensions=[],this.data=[],this.trackByExpr){var i=o(this.trackByExpr),r={$id:e};this.itemHashGetter=function(e,t){return r[n.keyExpr]=t,r.$index=e,i(n.scope,r)}}else this.itemHashGetter=function(t,n){return e(n)};this.attachedItems={},this.BACKUP_ITEMS_LENGTH=10,this.backupItemsArray=[]}return s.prototype={setup:function(){for(var e=0;ethis.data.length)return this.afterSiblings[e-this.data.length-this.dataStartIndex];var n=this.itemHashGetter(e,t),i=this.getItem(n);return(i.scope.$index!==e||i.scope[this.keyExpr]!==t)&&(i.scope[this.keyExpr]=t,i.scope.$index=e,i.scope.$first=0===e,i.scope.$last=e===this.getLength()-1,i.scope.$middle=!(i.scope.$first||i.scope.$last),i.scope.$odd=!(i.scope.$even=0===(1&e)),r.$$phase||i.scope.$digest()),i.hash=n,this.attachedItems[n]=i,i},destroyItem:function(e){e.element.remove(),e.scope.$destroy(),e.scope=null,e.element=null},detachItem:function(e){delete this.attachedItems[e.hash],e.isOutside?a(e.element):this.backupItemsArray.length>=this.BACKUP_ITEMS_LENGTH?this.destroyItem(e):(this.backupItemsArray.push(e),a(e.element),t(e.scope))},getLength:function(){return this.dimensions&&this.dimensions.length||0},setData:function(e,t,n){this.data=e||[],this.beforeSiblings=t||[],this.afterSiblings=n||[],this.calculateDataDimensions(),this.afterSiblings.forEach(function(e){e.element.css({position:"absolute",top:"0",left:"0"}),a(e.element)})}},s}]),d.factory("$collectionRepeatManager",["$rootScope","$timeout",function(){function e(e){function t(){return n.viewportSize}var n=this;this.dataSource=e.dataSource,this.element=e.element,this.scrollView=e.scrollView,this.isVertical=!!this.scrollView.options.scrollingY,this.renderedItems={},this.dimensions=[],this.setCurrentIndex(0),this.scrollView.__$callback=this.scrollView.__callback,this.scrollView.__callback=angular.bind(this,this.renderScroll),this.isVertical?(this.scrollView.options.getContentHeight=t,this.scrollValue=function(){return this.scrollView.__scrollTop},this.scrollMaxValue=function(){return this.scrollView.__maxScrollTop},this.scrollSize=function(){return this.scrollView.__clientHeight},this.secondaryScrollSize=function(){return this.scrollView.__clientWidth},this.transformString=function(e,t){return"translate3d("+t+"px,"+e+"px,0)"},this.primaryDimension=function(e){return e.height},this.secondaryDimension=function(e){return e.width}):(this.scrollView.options.getContentWidth=t,this.scrollValue=function(){return this.scrollView.__scrollLeft},this.scrollMaxValue=function(){return this.scrollView.__maxScrollLeft},this.scrollSize=function(){return this.scrollView.__clientWidth},this.secondaryScrollSize=function(){return this.scrollView.__clientHeight},this.transformString=function(e,t){return"translate3d("+e+"px,"+t+"px,0)"},this.primaryDimension=function(e){return e.width},this.secondaryDimension=function(e){return e.height})}e.prototype={destroy:function(){this.renderedItems={},this.render=angular.noop,this.calculateDimensions=angular.noop,this.dimensions=[]},calculateDimensions:function(){function e(e){var r={primarySize:this.primaryDimension(e),secondarySize:Math.min(this.secondaryDimension(e),o)};return t&&(i+=t.secondarySize,t.primaryPos===n&&i+r.secondarySize>o&&(i=0,n+=t.primarySize)),r.primaryPos=n,r.secondaryPos=i,t=r,r}var t,n=0,i=0,o=this.secondaryScrollSize();this.dataSource.beforeSiblings&&this.dataSource.beforeSiblings.forEach(e,this);var r=n+(t?t.primarySize:0);n=i=0,t=null;var a=this.dataSource.dimensions.map(e,this),s=n+(t?t.primarySize:0);return{beforeSize:r,totalSize:s,dimensions:a}},resize:function(){var e=this.calculateDimensions();this.dimensions=e.dimensions,this.viewportSize=e.totalSize,this.beforeSize=e.beforeSize,this.setCurrentIndex(0),this.render(!0),this.dataSource.backupItemsArray.length||this.dataSource.setup()},setCurrentIndex:function(e){var t=(this.dimensions[e]||{}).primaryPos||0;this.currentIndex=e,this.hasPrevIndex=e>0,this.hasPrevIndex&&(this.previousPos=Math.max(t-this.dimensions[e-1].primarySize,this.dimensions[e-1].primaryPos)),this.hasNextIndex=e+1=this.nextPos||this.hasPrevIndex&&et;)e--;else for(;(n=this.dimensions[e+1])&&n.primaryPos=this.dataSource.getLength();if(o||e){for(n in this.renderedItems)this.removeItem(n);if(o)return}for(var r,a=this.scrollValue(),s=this.scrollSize(),c=s+a,l=this.getIndexForScrollValue(this.currentIndex,a),u=Math.max(l-1,0);u>0&&(r=this.dimensions[u])&&r.primaryPos===this.dimensions[l-1].primaryPos;)u--;for(n=u;(r=this.dimensions[n])&&r.primaryPos-r.primarySizen||n>d)&&this.removeItem(n);this.setCurrentIndex(l)},renderItem:function(e,t,n){var i=this.dataSource.attachItemAtIndex(e);i&&i.element?((i.primaryPos!==t||i.secondaryPos!==n)&&(i.element.css(ionic.CSS.TRANSFORM,this.transformString(t,n)),i.primaryPos=t,i.secondaryPos=n),this.renderedItems[e]=i):delete this.renderedItems[e]},removeItem:function(e){var t=this.renderedItems[e];t&&(t.primaryPos=t.secondaryPos=null,this.dataSource.detachItem(t),delete this.renderedItems[e])}};var t={renderScroll:1,renderIfNeeded:1};return f(e.prototype,function(n,i){t[i]||(e.prototype[i]=function(){return n.apply(this,arguments)})}),e}]),d.factory("$ionicGesture",[function(){return{on:function(e,t,n){return window.ionic.onGesture(e,t,n[0])},off:function(e,t,n){return window.ionic.offGesture(e,t,n)}}}]);var m='
',$="$ionicLoading instance.hide() has been deprecated. Use $ionicLoading.hide().",w="$ionicLoading instance.show() has been deprecated. Use $ionicLoading.show().",b="$ionicLoading instance.setContent() has been deprecated. Use $ionicLoading.show({ template: 'my content' }).";d.constant("$ionicLoadingConfig",{template:''}).factory("$ionicLoading",["$ionicLoadingConfig","$document","$ionicTemplateLoader","$ionicBackdrop","$timeout","$q","$log","$compile","$ionicPlatform",function(e,t,n,i,o,r,a,s,c){function l(){return p||(p=n.compile({template:m,appendTo:t[0].body}).then(function(e){var a=e;return e.show=function(e){var c=e.templateUrl?n.load(e.templateUrl):r.when(e.template||e.content||"");this.isShown||(this.hasBackdrop=!e.noBackdrop&&e.showBackdrop!==!1,this.hasBackdrop&&(i.retain(),i.getElement().addClass("backdrop-loading"))),e.duration&&(o.cancel(this.durationTimeout),this.durationTimeout=o(angular.bind(this,this.hide),+e.duration)),c.then(function(e){if(e){var n=a.element.children();n.html(e),s(n.contents())(a.scope)}a.isShown&&(a.element.addClass("visible"),ionic.requestAnimationFrame(function(){a.isShown&&a.element.addClass("active"),t[0].body.classList.add("loading-active")}))}),this.isShown=!0},e.hide=function(){this.isShown&&(this.hasBackdrop&&(i.release(),i.getElement().removeClass("backdrop-loading")),a.element.removeClass("active"),t[0].body.classList.remove("loading-active"),setTimeout(function(){!a.isShown&&a.element.removeClass("visible")},200)),o.cancel(this.durationTimeout),this.isShown=!1},e})),p}function d(t){t=h(e||{},t||{});var n=t.delay||t.showDelay||0;return g&&o.cancel(g),g=o(angular.noop,n),g.then(l).then(function(e){return v(),v=c.registerBackButtonAction(angular.noop,I),e.show(t)}),{hide:u.method($,a.error,f),show:u.method(w,a.error,function(){d(t)}),setContent:u.method(b,a.error,function(e){l().then(function(t){t.show({template:e})})})}}function f(){v(),o.cancel(g),l().then(function(e){e.hide()})}var p,v=angular.noop,g=r.when();return{show:d,hide:f,_getLoader:l}}]),d.factory("$ionicModal",["$rootScope","$document","$compile","$timeout","$ionicPlatform","$ionicTemplateLoader","$q","$log",function(e,t,n,i,o,r,a,s){var c=ionic.views.Modal.inherit({initialize:function(e){ionic.views.Modal.prototype.initialize.call(this,e),this.animation=e.animation||"slide-in-up"},show:function(e){var n=this;if(n.scope.$$destroyed)return void s.error("Cannot call "+n.viewType+".show() after remove(). Please create a new "+n.viewType+" instance.");var r=g(n.modalEl);return n.el.classList.remove("hide"),i(function(){t[0].body.classList.add(n.viewType+"-open")},400),n.el.parentElement||(r.addClass(n.animation),t[0].body.appendChild(n.el)),e&&n.positionView&&n.positionView(e,r),r.addClass("ng-enter active").removeClass("ng-leave ng-leave-active"),n._isShown=!0,n._deregisterBackButton=o.registerBackButtonAction(n.hardwareBackButtonClose?angular.bind(n,n.hide):angular.noop,k),n._isOpenPromise=a.defer(),ionic.views.Modal.prototype.show.call(n),i(function(){r.addClass("ng-enter-active"),ionic.trigger("resize"),n.scope.$parent&&n.scope.$parent.$broadcast(n.viewType+".shown",n),n.el.classList.add("active")},20),i(function(){n.$el.on("click",function(e){n.backdropClickToClose&&e.target===n.el&&n.hide()})},400)},hide:function(){var e=this,n=g(e.modalEl);return e.el.classList.remove("active"),n.addClass("ng-leave"),i(function(){n.addClass("ng-leave-active").removeClass("ng-enter ng-enter-active active")},20),e.$el.off("click"),e._isShown=!1,e.scope.$parent&&e.scope.$parent.$broadcast(e.viewType+".hidden",e),e._deregisterBackButton&&e._deregisterBackButton(),ionic.views.Modal.prototype.hide.call(e),i(function(){t[0].body.classList.remove(e.viewType+"-open"),e.el.classList.add("hide")},e.hideDelay||500)},remove:function(){var e=this;return e.scope.$parent&&e.scope.$parent.$broadcast(e.viewType+".removed",e),e.hide().then(function(){e.scope.$destroy(),e.$el.remove()})},isShown:function(){return!!this._isShown}}),l=function(t,i){var o=i.scope&&i.scope.$new()||e.$new(!0);i.viewType=i.viewType||"modal",h(o,{$hasHeader:!1,$hasSubheader:!1,$hasFooter:!1,$hasSubfooter:!1,$hasTabs:!1,$hasTabsTop:!1});var r=n(""+t+"")(o);i.$el=r,i.el=r[0],i.modalEl=i.el.querySelector("."+i.viewType);var a=new c(i);return a.scope=o,i.scope||(o[i.viewType]=a),a};return{fromTemplate:function(e,t){var n=l(e,t||{});return n},fromTemplateUrl:function(e,t,n){var i;return angular.isFunction(t)&&(i=t,t=n),r.load(e).then(function(e){var n=l(e,t||{});return i&&i(n),n})}}}]),d.service("$ionicNavBarDelegate",i(["back","align","showBackButton","showBar","setTitle","changeTitle","getTitle","getPreviousTitle"]));var y=100,S=150,k=200,C=300,T=400,I=500;d.constant("$ionicPlatformDefaults",{ios:{$ionicNavBarConfig:{transition:"nav-title-slide-ios7",alignTitle:"center",backButtonIcon:"ion-ios7-arrow-back"},$ionicNavViewConfig:{transition:"slide-left-right-ios7"},$ionicTabsConfig:{type:"",position:""}},android:{$ionicNavBarConfig:{transition:"nav-title-slide-ios7",alignTitle:"center",backButtonIcon:"ion-ios7-arrow-back"},$ionicNavViewConfig:{transition:"slide-left-right-ios7"},$ionicTabsConfig:{type:"tabs-striped",position:""}}}),d.config(["$ionicPlatformDefaults","$injector",function(e,t){var n=ionic.Platform.platform(),i=function(e){f(e,function(e,n){h(t.get(n),e)})};switch(n){case"ios":i(e.ios);break;case"android":i(e.android)}}]),d.provider("$ionicPlatform",function(){return{$get:["$q","$rootScope",function(e){var t={onHardwareBackButton:function(e){ionic.Platform.ready(function(){document.addEventListener("backbutton",e,!1)})},offHardwareBackButton:function(e){ionic.Platform.ready(function(){document.removeEventListener("backbutton",e)})},$backButtonActions:{},registerBackButtonAction:function(e,n,i){t._hasBackButtonHandler||(t.$backButtonActions={},t.onHardwareBackButton(t.hardwareBackButtonClick),t._hasBackButtonHandler=!0);var o={id:i?i:ionic.Utils.nextUid(),priority:n?n:0,fn:e};return t.$backButtonActions[o.id]=o,function(){delete t.$backButtonActions[o.id]}},hardwareBackButtonClick:function(e){var n,i;for(i in t.$backButtonActions)(!n||t.$backButtonActions[i].priority>=n.priority)&&(n=t.$backButtonActions[i]);return n?(n.fn(e),n):void 0},is:function(e){return ionic.Platform.is(e)},ready:function(t){var n=e.defer();return ionic.Platform.ready(function(){n.resolve(),t&&t()}),n.promise}};return t}]}}),d.factory("$ionicPopover",["$ionicModal","$ionicPosition","$document",function(e,t,n){function i(e,i){var r=angular.element(e.target||e),a=t.offset(r),s=i.prop("offsetWidth"),c=n[0].body.clientWidth,l=(n[0].body.clientHeight,{top:a.top+a.height,left:a.left+a.width/2-s/2});l.leftc&&(l.left=c-s-o);var u=i[0].querySelector(".popover-arrow");angular.element(u).css({left:a.left-l.left+a.width/2-u.offsetWidth/2+"px"}),i.css({top:l.top+"px",left:l.left+"px",marginLeft:"0",opacity:"1"})}var o=6,r={viewType:"popover",hideDelay:1,animation:"none",positionView:i};return{fromTemplate:function(t,n){return e.fromTemplate(t,ionic.Utils.extend(n||{},r))},fromTemplateUrl:function(t,n){return e.fromTemplateUrl(t,n,ionic.Utils.extend(n||{},r))}}}]);var x='';d.factory("$ionicPopup",["$ionicTemplateLoader","$ionicBackdrop","$q","$timeout","$rootScope","$document","$compile","$ionicPlatform",function(e,t,n,i,o,r,a,s){function c(t){t=h({scope:null,title:"",buttons:[]},t||{});var o=e.compile({template:x,scope:t.scope&&t.scope.$new(),appendTo:r[0].body}),s=t.templateUrl?e.load(t.templateUrl):n.when(t.template||t.content||"");return n.all([o,s]).then(function(e){var o=e[0],r=e[1],s=n.defer();o.responseDeferred=s;var c=g(o.element[0].querySelector(".popup-body"));return r?(c.html(r),a(c.contents())(o.scope)):c.remove(),h(o.scope,{title:t.title,buttons:t.buttons,subTitle:t.subTitle,$buttonTapped:function(e,t){var n=(e.onTap||angular.noop)(t);t=t.originalEvent||t,t.defaultPrevented||s.resolve(n)}}),o.show=function(){o.isShown||(o.isShown=!0,ionic.requestAnimationFrame(function(){o.isShown&&(o.element[0].offsetHeight>window.innerHeight-20&&(o.element[0].style.height=window.innerHeight-20+"px",popupBody=o.element[0].querySelectorAll(".popup-body"),popupHead=o.element[0].querySelectorAll(".popup-head"),popupButtons=o.element[0].querySelectorAll(".popup-buttons"),o.element.addClass("popup-tall"),newHeight=window.innerHeight-popupHead[0].offsetHeight-popupButtons[0].offsetHeight-20,popupBody[0].style.height=newHeight+"px"),o.element.removeClass("popup-hidden"),o.element.addClass("popup-showing active"),ionic.DomUtil.centerElementByMarginTwice(o.element[0]),d(o.element))}))},o.hide=function(e){return e=e||angular.noop,o.isShown?(o.isShown=!1,o.element.removeClass("active"),o.element.addClass("popup-hidden"),void i(e,250)):e()},o.remove=function(){o.removed||(o.hide(function(){o.element.remove(),o.scope.$destroy()}),o.removed=!0)},o})}function l(){$[0]&&$[0].responseDeferred.resolve()}function u(e){function n(e){o.then(function(t){t.removed||t.responseDeferred.resolve(e)})}var o=w._createPopup(e),r=$[0];r&&r.hide();var a=i(angular.noop,r?m.stackPushDelay:0).then(function(){return o}).then(function(e){return r||(document.body.classList.add("popup-open"),t.retain(),w._backButtonActionDone=s.registerBackButtonAction(l,T)),$.unshift(e),e.show(),e.responseDeferred.notify({close:a.close}),e.responseDeferred.promise.then(function(n){var i=$.indexOf(e);-1!==i&&$.splice(i,1),e.remove();var o=$[0];return o?o.show():(document.body.classList.remove("popup-open"),(w._backButtonActionDone||angular.noop)()),t.release(),n})});return a.close=n,a}function d(e){var t=e[0].querySelector("[autofocus]");t&&t.focus()}function f(e){return u(h({buttons:[{text:e.okText||"OK",type:e.okType||"button-positive",onTap:function(){return!0}}]},e||{}))}function p(e){return u(h({buttons:[{text:e.cancelText||"Cancel",type:e.cancelType||"button-default",onTap:function(){return!1}},{text:e.okText||"OK",type:e.okType||"button-positive",onTap:function(){return!0}}]},e||{}))}function v(e){var t=o.$new(!0);return t.data={},u(h({template:'',scope:t,buttons:[{text:e.cancelText||"Cancel",type:e.cancelType||"button-default",onTap:function(){}},{text:e.okText||"OK",type:e.okType||"button-positive",onTap:function(){return t.data.response||""}}]},e||{}))}var m={stackPushDelay:50},$=[],w={show:u,alert:f,confirm:p,prompt:v,_createPopup:c,_popupStack:$};return w}]),d.factory("$ionicPosition",["$document","$window",function(e,t){function n(e,n){return e.currentStyle?e.currentStyle[n]:t.getComputedStyle?t.getComputedStyle(e)[n]:e.style[n]}function i(e){return"static"===(n(e,"position")||"static")}var o=function(t){for(var n=e[0],o=t.offsetParent||n;o&&o!==n&&i(o);)o=o.offsetParent;return o||n};return{position:function(t){var n=this.offset(t),i={top:0,left:0},r=o(t[0]);r!=e[0]&&(i=this.offset(angular.element(r)),i.top+=r.clientTop-r.scrollTop,i.left+=r.clientLeft-r.scrollLeft);var a=t[0].getBoundingClientRect();return{width:a.width||t.prop("offsetWidth"),height:a.height||t.prop("offsetHeight"),top:n.top-i.top,left:n.left-i.left}},offset:function(n){var i=n[0].getBoundingClientRect();return{width:i.width||n.prop("offsetWidth"),height:i.height||n.prop("offsetHeight"),top:i.top+(t.pageYOffset||e[0].documentElement.scrollTop),left:i.left+(t.pageXOffset||e[0].documentElement.scrollLeft)}}}}]),d.service("$ionicScrollDelegate",i(["resize","scrollTop","scrollBottom","scrollTo","scrollBy","getScrollPosition","anchorScroll","getScrollView","rememberScrollPosition","forgetScrollPosition","scrollToRememberedPosition"])),d.service("$ionicSideMenuDelegate",i(["toggleLeft","toggleRight","getOpenRatio","isOpen","isOpenLeft","isOpenRight","canDragContent","edgeDragThreshold"])),d.service("$ionicSlideBoxDelegate",i(["update","slide","enableSlide","previous","next","stop","start","currentIndex","slidesCount"])),d.service("$ionicTabsDelegate",i(["select","selectedIndex"])),d.factory("$ionicTemplateLoader",["$compile","$controller","$http","$q","$rootScope","$templateCache",function(e,t,n,i,o,r){function a(e){return n.get(e,{cache:r}).then(function(e){return e.data&&e.data.trim()})}function s(n){n=h({template:"",templateUrl:"",scope:null,controller:null,locals:{},appendTo:null},n||{});var r=n.templateUrl?this.load(n.templateUrl):i.when(n.template);return r.then(function(i){var r,a=n.scope||o.$new(),s=g("
").html(i).contents();return n.controller&&(r=t(n.controller,h(n.locals,{$scope:a})),s.children().data("$ngControllerController",r)),n.appendTo&&g(n.appendTo).append(s),e(s)(a),{element:s,scope:a}})}return{load:a,compile:s}}]),d.run(["$rootScope","$state","$location","$document","$animate","$ionicPlatform","$ionicViewService",function(e,t,n,i,o,r,a){function s(t){return e.$viewHistory.backView?e.$viewHistory.backView.go():ionic.Platform.exitApp(),t.preventDefault(),!1}e.$viewHistory={histories:{root:{historyId:"root",parentHistoryId:null,stack:[],cursor:-1}},views:{},backView:null,forwardView:null,currentView:null,disabledRegistrableTagNames:[]},a.disableRegisterByTagName&&(a.disableRegisterByTagName("ion-tabs"),a.disableRegisterByTagName("ion-side-menus")),e.$on("viewState.changeHistory",function(i,o){if(o){var r=o.historyId?e.$viewHistory.histories[o.historyId]:null;if(r&&r.cursor>-1&&r.cursor-1&&a.stack.length>0&&a.cursor=u.index;v--)p.stack[v].destroy(),p.stack.splice(v)}}else h.navAction="initialView";o.views[h.viewId]=this.createView({viewId:h.viewId,index:a.stack.length,historyId:a.historyId,backViewId:c&&c.viewId?c.viewId:null,forwardViewId:null,stateId:r,stateName:this.getCurrentStateName(),stateParams:this.getCurrentStateParams(),url:n.url()}),"moveBack"==h.navAction&&e.$emit("$viewHistory.viewBack",c.viewId,h.viewId),a.stack.push(o.views[h.viewId])}return d&&(d.disableAnimate&&(h.navDirection=null),d.disableBack&&(o.views[h.viewId].backViewId=null),this.nextViewOptions(null)),this.setNavViews(h.viewId),a.cursor=o.currentView.index,h},setNavViews:function(t){var n=e.$viewHistory;n.currentView=this._getViewById(t),n.backView=this._getBackView(n.currentView),n.forwardView=this._getForwardView(n.currentView),e.$broadcast("$viewHistory.historyChange",{showBack:n.backView&&n.backView.historyId===n.currentView.historyId})},registerHistory:function(e){e.$historyId=ionic.Utils.nextUid()},createView:function(e){var t=new c;return t.initialize(e)},getCurrentView:function(){return e.$viewHistory.currentView},getBackView:function(){return e.$viewHistory.backView},getForwardView:function(){return e.$viewHistory.forwardView },getNavDirection:function(){return e.$viewHistory.navDirection},getCurrentStateName:function(){return t&&t.current?t.current.name:null},isCurrentStateNavView:function(e){return t&&t.current&&t.current.views&&t.current.views[e]?!0:!1},getCurrentStateParams:function(){var e;if(t&&t.params)for(var n in t.params)t.params.hasOwnProperty(n)&&(e=e||{},e[n]=t.params[n]);return e},getCurrentStateId:function(){var e;if(t&&t.current&&t.current.name){if(e=t.current.name,t.params)for(var n in t.params)t.params.hasOwnProperty(n)&&t.params[n]&&(e+="_"+n+"="+t.params[n]);return e}return ionic.Utils.nextUid()},goToHistoryRoot:function(t){if(t){var n=e.$viewHistory.histories[t];if(n&&n.stack.length){if(e.$viewHistory.currentView&&e.$viewHistory.currentView.viewId===n.stack[0].viewId)return;e.$viewHistory.forcedNav={viewId:n.stack[0].viewId,navAction:"moveBack",navDirection:"back"},n.stack[0].go()}}},_getViewById:function(t){return t?e.$viewHistory.views[t]:null},_getBackView:function(e){return e?this._getViewById(e.backViewId):null},_getForwardView:function(e){return e?this._getViewById(e.forwardViewId):null},_getHistoryById:function(t){return t?e.$viewHistory.histories[t]:null},_getHistory:function(t){var n=this._getParentHistoryObj(t);return e.$viewHistory.histories[n.historyId]||(e.$viewHistory.histories[n.historyId]={historyId:n.historyId,parentHistoryId:this._getParentHistoryObj(n.scope.$parent).historyId,stack:[],cursor:-1}),e.$viewHistory.histories[n.historyId]},_getParentHistoryObj:function(t){for(var n=t;n;){if(n.hasOwnProperty("$historyId"))return{historyId:n.$historyId,scope:n};n=n.$parent}return{historyId:"root",scope:e}},nextViewOptions:function(e){return arguments.length?void(this._nextOpts=e):this._nextOpts},getRenderer:function(e,t,n){function i(e){for(var t="";!t&&e;)t=e.getAttribute("animation"),e=e.parentElement;return t?t:a.transition}function o(){u&&e[0].classList.add(u),"back"===s.navDirection?e[0].classList.add("reverse"):e[0].classList.remove("reverse")}var s,c,l=this,u=i(e[0]);return function(t){return{enter:function(n){return c&&t?(o(),n.addClass("ng-enter"),document.body.classList.add("disable-pointer-events"),void r.enter(n,e,null,function(){document.body.classList.remove("disable-pointer-events"),u&&e[0].classList.remove(u)})):(c||document.body.classList.remove("disable-pointer-events"),void e.append(n))},leave:function(){var n=e.contents();return c&&t?(o(),void r.leave(n,function(){n.remove()})):void n.remove()},register:function(e){return s=l.register(n,e),c=null!==u&&null!==s.navDirection,s}}}},disableRegisterByTagName:function(t){e.$viewHistory.disabledRegistrableTagNames.push(t.toUpperCase())},isTagNameRegistrable:function(t){var n,i,o=e.$viewHistory.disabledRegistrableTagNames;for(n=0;n')(e),g(a[0]).replaceWith(n)),i=r('

')(e),ionic.requestAnimationFrame(function(){n&&o.leave(g(n));var r=n&&g(n)||null;o.enter(i,t,r,function(){c._headerBarView.align()}),f(a,function(e){e&&e.parentNode&&g(e).remove()}),e.$digest(),ionic.requestAnimationFrame(function(){i[0].classList.remove("invisible")})})}}]),d.factory("$$scrollValueCache",function(){return{}}).controller("$ionicScroll",["$scope","scrollViewOptions","$timeout","$window","$$scrollValueCache","$location","$rootScope","$document","$ionicScrollDelegate",function(e,t,n,i,o,r,a,s,c){var l=this;this._scrollViewOptions=t;var u=this.element=t.el,d=this.$element=g(u),h=this.scrollView=new ionic.views.Scroll(t);(d.parent().length?d.parent():d).data("$$ionicScrollController",this);var f=c._registerInstance(this,t.delegateHandle);angular.isDefined(t.bouncing)||ionic.Platform.ready(function(){h.options.bouncing=!0,ionic.Platform.isAndroid()&&(h.options.bouncing=!1,h.options.deceleration=.95)});var p=angular.bind(h,h.resize);ionic.on("resize",p,i);var v=angular.noop;e.$on("$destroy",function(){f(),h.__removeEventHandlers(),ionic.off("resize",p,i),i.removeEventListener("resize",p),v(),l._rememberScrollId&&(o[l._rememberScrollId]=h.getValues())}),d.on("scroll",function(t){var n=(t.originalEvent||t).detail||{};e.$onScroll&&e.$onScroll({event:t,scrollTop:n.scrollTop||0,scrollLeft:n.scrollLeft||0})}),e.$on("$viewContentLoaded",function(t,i){if(!t.defaultPrevented){t.preventDefault();var o=i&&i.viewId||e.$historyId;o&&n(function(){l.rememberScrollPosition(o),l.scrollToRememberedPosition(),v=a.$on("$viewHistory.viewBack",function(e,t){o===t&&l.forgetScrollPosition()})},0,!1)}}),n(function(){h.run()}),this._rememberScrollId=null,this.getScrollView=function(){return this.scrollView},this.getScrollPosition=function(){return this.scrollView.getValues()},this.resize=function(){return n(p)},this.scrollTop=function(e){this.resize().then(function(){h.scrollTo(0,0,!!e)})},this.scrollBottom=function(e){this.resize().then(function(){var t=h.getScrollMax();h.scrollTo(t.left,t.top,!!e)})},this.scrollTo=function(e,t,n){this.resize().then(function(){h.scrollTo(e,t,!!n)})},this.scrollBy=function(e,t,n){this.resize().then(function(){h.scrollBy(e,t,!!n)})},this.anchorScroll=function(e){this.resize().then(function(){var t=r.hash(),n=t&&s[0].getElementById(t);if(!t||!n)return void h.scrollTo(0,0,!!e);var i=n,o=0,a=0,c=0;do null!==i&&(o+=i.offsetLeft),null!==i&&(a+=i.offsetTop),i=i.offsetParent,c++;while(i.attributes!=l.element.attributes&&i.offsetParent);h.scrollTo(o,a,!!e)})},this.rememberScrollPosition=function(e){if(!e)throw new Error("Must supply an id to remember the scroll by!");this._rememberScrollId=e},this.forgetScrollPosition=function(){delete o[this._rememberScrollId],this._rememberScrollId=null},this.scrollToRememberedPosition=function(e){var t=o[this._rememberScrollId];t&&this.resize().then(function(){h.scrollTo(+t.left,+t.top,e)})},this._setRefresher=function(e,t){var n=this.refresher=t,i=l.refresher.clientHeight||0;h.activatePullToRefresh(i,function(){n.classList.add("active"),e.$onPulling()},function(){n.classList.remove("refreshing"),n.classList.remove("active")},function(){n.classList.add("refreshing"),e.$onRefresh()})}}]),d.controller("$ionicSideMenus",["$scope","$attrs","$ionicSideMenuDelegate","$ionicPlatform",function(e,t,n,i){var o=this;h(this,ionic.controllers.SideMenuController.prototype),this.$scope=e,ionic.controllers.SideMenuController.call(this,{left:{width:275},right:{width:275}}),this.canDragContent=function(t){return arguments.length&&(e.dragContent=!!t),e.dragContent},this.edgeThreshold=25,this.edgeThresholdEnabled=!1,this.edgeDragThreshold=function(e){return arguments.length&&(angular.isNumber(e)&&e>0?(this.edgeThreshold=e,this.edgeThresholdEnabled=!0):this.edgeThresholdEnabled=!!e),this.edgeThresholdEnabled},this.isDraggableTarget=function(t){var n=o.edgeThresholdEnabled&&!o.isOpen(),i=t.gesture.startEvent&&t.gesture.startEvent.center&&t.gesture.startEvent.center.pageX,r=!n||i<=o.edgeThreshold||i>=o.content.offsetWidth-o.edgeThreshold;return(e.dragContent||o.isOpen())&&r&&!t.gesture.srcEvent.defaultPrevented&&!t.target.tagName.match(/input|textarea|select|object|embed/i)&&!t.target.isContentEditable&&!(t.target.dataset?t.target.dataset.preventScroll:"true"==t.target.getAttribute("data-prevent-default"))},e.sideMenuContentTranslateX=0;var r=angular.noop,a=angular.bind(this,this.close);e.$watch(function(){return 0!==o.getOpenAmount()},function(e){r(),e&&(r=i.registerBackButtonAction(a,S))});var s=n._registerInstance(this,t.delegateHandle);e.$on("$destroy",function(){s(),r()})}]),d.controller("$ionicTab",["$scope","$ionicViewService","$attrs","$location","$state",function(e,t,n,i,o){this.$scope=e,this.hrefMatchesState=function(){return n.href&&0===i.path().indexOf(n.href.replace(/^#/,"").replace(/\/$/,""))},this.srefMatchesState=function(){return n.uiSref&&o.includes(n.uiSref.split("(")[0])},this.navNameMatchesState=function(){return this.navViewName&&t.isCurrentStateNavView(this.navViewName)},this.tabMatchesState=function(){return this.hrefMatchesState()||this.srefMatchesState()||this.navNameMatchesState()}}]),d.controller("$ionicTabs",["$scope","$ionicViewService","$element",function(e,t){var n=null,i=this;i.tabs=[],i.selectedIndex=function(){return i.tabs.indexOf(n)},i.selectedTab=function(){return n},i.add=function(e){t.registerHistory(e),i.tabs.push(e),1===i.tabs.length&&i.select(e)},i.remove=function(e){var t=i.tabs.indexOf(e);if(-1!==t){if(e.$tabSelected)if(i.deselect(e),1===i.tabs.length);else{var n=t===i.tabs.length-1?t-1:t+1;i.select(i.tabs[n])}i.tabs.splice(t,1)}},i.deselect=function(e){e.$tabSelected&&(n=null,e.$tabSelected=!1,(e.onDeselect||angular.noop)())},i.select=function(o,r){var a;if(angular.isNumber(o)?(a=o,o=i.tabs[a]):a=i.tabs.indexOf(o),!o||-1==a)throw new Error('Cannot select tab "'+a+'"!');if(n&&n.$historyId==o.$historyId)r&&t.goToHistoryRoot(o.$historyId);else if(f(i.tabs,function(e){i.deselect(e)}),n=o,o.$tabSelected=!0,(o.onSelect||angular.noop)(),r){var s={type:"tab",tabIndex:a,historyId:o.$historyId,navViewName:o.navViewName,hasNavView:!!o.navViewName,title:o.title,url:o.href,uiSref:o.uiSref};e.$emit("viewState.changeHistory",s)}}}]),d.directive("ionActionSheet",["$document",function(e){return{restrict:"E",scope:!0,replace:!0,link:function(t,n){var i=function(e){27==e.which&&(t.cancel(),t.$apply())},o=function(e){e.target==n[0]&&(t.cancel(),t.$apply())};t.$on("$destroy",function(){n.remove(),e.unbind("keyup",i)}),e.bind("keyup",i),n.bind("click",o)},template:'
'}}]),d.directive("ionCheckbox",function(){return{restrict:"E",replace:!0,require:"?ngModel",transclude:!0,template:'',compile:function(e,t){var n=e.find("input");f({name:t.name,"ng-value":t.ngValue,"ng-model":t.ngModel,"ng-checked":t.ngChecked,"ng-disabled":t.ngDisabled,"ng-true-value":t.ngTrueValue,"ng-false-value":t.ngFalseValue,"ng-change":t.ngChange},function(e,t){p(e)&&n.attr(t,e)})}}});var B="Cannot create a collection-repeat within a scrollView that is scrollable on both x and y axis. Choose either x direction or y direction.",V="collection-repeat expected attribute collection-item-height to be a an expression that returns a number (in pixels) or percentage.",E="collection-repeat expected attribute collection-item-width to be a an expression that returns a number (in pixels) or percentage.",_="collection-repeat expected expression in form of '_item_ in _collection_[ track by _id_]' but got '%'";d.directive({ngSrc:o("ngSrc","src"),ngSrcset:o("ngSrcset","srcset"),ngHref:o("ngHref","href")}).directive("collectionRepeat",["$collectionRepeatManager","$collectionDataSource","$parse",function(e,t,n){return{priority:1e3,transclude:"element",terminal:!0,$$tlb:!0,require:"^$ionicScroll",controller:[function(){}],link:function(i,o,r,a,s){function c(e){var t=[],n=[],i=!0;f(I.children,function(e){if(ionic.DomUtil.elementIsDescendant(o[0],e,I))i=!1;else{var r=e.offsetWidth,a=e.offsetHeight;if(r&&a){var s=g(e);(i?t:n).push({width:e.offsetWidth,height:e.offsetHeight,element:s,scope:s.isolateScope()||s.scope(),isOutside:!0})}}}),d.resize(),C.setData(e,t,n),T.resize()}function l(){c(i.$eval(S))}var u=g('
');o.parent()[0].insertBefore(u[0],o[0]),u.append(o);var d=a.scrollView;if(d.options.scrollingX&&d.options.scrollingY)throw new Error(B);var h=!!d.options.scrollingY;if(h&&!r.collectionItemHeight)throw new Error(V);if(!h&&!r.collectionItemWidth)throw new Error(E);var p=n(r.collectionItemHeight||'"100%"'),m=n(r.collectionItemWidth||'"100%"'),$=function(e,t){var n=p(e,t);return v(n)&&n.indexOf("%")>-1?Math.floor(parseInt(n,10)/100*d.__clientHeight):n},w=function(e,t){var n=m(e,t);return v(n)&&n.indexOf("%")>-1?Math.floor(parseInt(n,10)/100*d.__clientWidth):n},b=r.collectionRepeat.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!b)throw new Error(_.replace("%",r.collectionRepeat));var y=b[1],S=b[2],k=b[3],C=new t({scope:i,transcludeFn:s,transcludeParent:o.parent(),keyExpr:y,listExpr:S,trackByExpr:k,heightGetter:$,widthGetter:w}),T=new e({dataSource:C,element:a.$element,scrollView:a.scrollView});i.$watchCollection(S,function(e){if(e&&!angular.isArray(e))throw new Error("collection-repeat expects an array to repeat over, but instead got '"+typeof e+"'.");c(e)});var I=a.scrollView.__content;ionic.on("resize",l,window),i.$on("$destroy",function(){T.destroy(),C.destroy(),ionic.off("resize",l,window)})}}}]),d.directive("ionContent",["$timeout","$controller","$ionicBind",function(e,t,n){return{restrict:"E",require:"^?ionNavView",scope:!0,priority:800,compile:function(e,i){function o(e,o,a){var s=e.$parent;e.$watch(function(){return(s.$hasHeader?" has-header":"")+(s.$hasSubheader?" has-subheader":"")+(s.$hasFooter?" has-footer":"")+(s.$hasSubfooter?" has-subfooter":"")+(s.$hasTabs?" has-tabs":"")+(s.$hasTabsTop?" has-tabs-top":"")},function(e,t){o.removeClass(t),o.addClass(e)}),e.$hasHeader=e.$hasSubheader=e.$hasFooter=e.$hasSubfooter=e.$hasTabs=e.$hasTabsTop=!1,n(e,a,{$onScroll:"&onScroll",$onScrollComplete:"&onScrollComplete",hasBouncing:"@",padding:"@",direction:"@",scrollbarX:"@",scrollbarY:"@",startX:"@",startY:"@",scrollEventInterval:"@"}),e.direction=e.direction||"y",angular.isDefined(a.padding)&&e.$watch(a.padding,function(e){(r||o).toggleClass("padding",!!e)}),"false"===a.scroll||("true"===i.overflowScroll?o.addClass("overflow-scroll"):t("$ionicScroll",{$scope:e,scrollViewOptions:{el:o[0],delegateHandle:i.delegateHandle,bouncing:e.$eval(e.hasBouncing),startX:e.$eval(e.startX)||0,startY:e.$eval(e.startY)||0,scrollbarX:e.$eval(e.scrollbarX)!==!1,scrollbarY:e.$eval(e.scrollbarY)!==!1,scrollingX:e.direction.indexOf("x")>=0,scrollingY:e.direction.indexOf("y")>=0,scrollEventInterval:parseInt(e.scrollEventInterval,10)||10,scrollingComplete:function(){e.$onScrollComplete({scrollTop:this.__scrollTop,scrollLeft:this.__scrollLeft})}}}))}var r;return e.addClass("scroll-content ionic-scroll"),"false"!=i.scroll?(r=g('
'),r.append(e.contents()),e.append(r)):e.addClass("scroll-content-false"),{pre:o}}}}]);var H="onHold onTap onTouch onRelease onDrag onDragUp onDragRight onDragDown onDragLeft onSwipe onSwipeUp onSwipeRight onSwipeDown onSwipeLeft".split(" ");H.forEach(function(e){d.directive(e,r(e))}),d.directive("ionNavBar",a()).directive("ionHeaderBar",a()).directive("ionHeaderBar",s(!0)).directive("ionFooterBar",s(!1)),d.directive("ionInfiniteScroll",["$timeout",function(e){function t(e,t,n){return n?t*(1-parseFloat(e,10)/100):t-parseFloat(e,10)}return{restrict:"E",require:["^$ionicScroll","ionInfiniteScroll"],template:'',scope:!0,controller:["$scope","$attrs",function(e,n){this.isLoading=!1,this.scrollView=null,this.getMaxScroll=function(){var e=(n.distance||"2.5%").trim(),i=-1!==e.indexOf("%"),o=this.scrollView.getScrollMax();return{left:this.scrollView.options.scrollingX?t(e,o.left,i):-1,top:this.scrollView.options.scrollingY?t(e,o.top,i):-1}}}],link:function(t,n,i,o){function r(){if(!s.isLoading){var e=c.getValues(),t=s.getMaxScroll();(-1!==t.left&&e.left>=t.left||-1!==t.top&&e.top>=t.top)&&l()}}var a=o[0],s=o[1],c=s.scrollView=a.scrollView;t.icon=function(){return angular.isDefined(i.icon)?i.icon:"ion-loading-d"};var l=function(){n[0].classList.add("active"),s.isLoading=!0,t.$parent&&t.$parent.$apply(i.onInfinite||"")},u=function(){n[0].classList.remove("active"),e(function(){c.resize(),d()},0,!1),s.isLoading=!1};t.$on("scroll.infiniteScrollComplete",function(){u()}),t.$on("$destroy",function(){a.$element.off("scroll",d)});var d=ionic.animationFrameThrottle(r);setTimeout(d),a.$element.on("scroll",d)}}}]);var D='',P='
';d.directive("ionItem",["$animate","$compile",function(){return{restrict:"E",controller:["$scope","$element",function(e,t){this.$scope=e,this.$element=t}],scope:!0,compile:function(e,t){var n=angular.isDefined(t.href)||angular.isDefined(t.ngHref)||angular.isDefined(t.uiSref),i=n||/ion-(delete|option|reorder)-button/i.test(e.html());if(i){var o=g(n?D:P);o.append(e.contents()),e.append(o),e.addClass("item item-complex")}else e.addClass("item");return function(e,t,n){e.$href=function(){return n.href||n.ngHref},e.$target=function(){return n.target||"_self"}}}}}]);var A='
';d.directive("ionDeleteButton",["$animate",function(){return{restrict:"E",require:["^ionItem","^?ionList"],priority:Number.MAX_VALUE,compile:function(e,t){return t.$set("class",(t["class"]||"")+" button icon button-icon",!0),function(e,t,n,i){var o=i[0],r=i[1],a=g(A);a.append(t),o.$element.append(a).addClass("item-left-editable"),r&&r.showDelete()&&a.addClass("visible active")}}}}]),d.directive("itemFloatingLabel",function(){return{restrict:"C",link:function(e,t){var n=t[0],i=n.querySelector("input, textarea"),o=n.querySelector(".input-label");if(i&&o){var r=function(){i.value?o.classList.add("has-input"):o.classList.remove("has-input")};i.addEventListener("input",r);var a=angular.element(i).controller("ngModel");a&&(a.$render=function(){i.value=a.$viewValue||"",r()}),e.$on("$destroy",function(){i.removeEventListener("input",r)})}}}});var L='';d.directive("ionOptionButton",["$compile",function(){function e(e){e.stopPropagation()}return{restrict:"E",require:"^ionItem",priority:Number.MAX_VALUE,compile:function(t,n){return n.$set("class",(n["class"]||"")+" button",!0),function(t,n,i,o){o.optionsContainer||(o.optionsContainer=g(L),o.$element.append(o.optionsContainer)),o.optionsContainer.append(n),n.on("click",e)}}}}]);var N='
';d.directive("ionReorderButton",["$animate","$parse",function(e,t){return{restrict:"E",require:["^ionItem","^?ionList"],priority:Number.MAX_VALUE,compile:function(e,n){return n.$set("class",(n["class"]||"")+" button icon button-icon",!0),e[0].setAttribute("data-prevent-scroll",!0),function(e,n,i,o){var r=o[0],a=o[1],s=t(i.onReorder);e.$onReorder=function(t,n){s(e,{$fromIndex:t,$toIndex:n})};var c=g(N);c.append(n),r.$element.append(c).addClass("item-right-editable"),a&&a.showReorder()&&c.addClass("visible active")}}}}]),d.directive("keyboardAttach",function(){return function(e,t){function n(e){if(!ionic.Platform.isAndroid()||ionic.Platform.isFullScreen){var n=e.keyboardHeight||e.detail.keyboardHeight;t.css("bottom",n+"px"),o=t.controller("$ionicScroll"),o&&(o.scrollView.__container.style.bottom=n+c(t[0])+"px")}}function i(){(!ionic.Platform.isAndroid()||ionic.Platform.isFullScreen)&&(t.css("bottom",""),o&&(o.scrollView.__container.style.bottom=""))}ionic.on("native.keyboardshow",n,window),ionic.on("native.keyboardhide",i,window),ionic.on("native.showkeyboard",n,window),ionic.on("native.hidekeyboard",i,window);var o;e.$on("$destroy",function(){ionic.off("native.keyboardshow",n,window),ionic.off("native.keyboardhide",i,window),ionic.off("native.showkeyboard",n,window),ionic.off("native.hidekeyboard",i,window)})}}),d.directive("ionList",["$animate","$timeout",function(e,t){return{restrict:"E",require:["ionList","^?$ionicScroll"],controller:"$ionicList",compile:function(e,n){var i=g('
').append(e.contents()).addClass(n.type);return e.append(i),function(e,i,o,r){function a(){function o(e,t){t()&&e.addClass("visible")||e.removeClass("active"),ionic.requestAnimationFrame(function(){t()&&e.addClass("active")||e.removeClass("invisible")})}s.listView=new ionic.views.ListView({el:i[0],listEl:i.children()[0],scrollEl:c&&c.element,scrollView:c&&c.scrollView,onReorder:function(e,n,i){var o=g(e).scope();o&&o.$onReorder&&t(function(){o.$onReorder(n,i)})},canSwipe:function(){return s.canSwipeItems()}});p(n.canSwipe)&&e.$watch("!!("+n.canSwipe+")",function(e){s.canSwipeItems(e)}),p(n.showDelete)&&e.$watch("!!("+n.showDelete+")",function(e){s.showDelete(e)}),p(n.showReorder)&&e.$watch("!!("+n.showReorder+")",function(e){s.showReorder(e)}),e.$watch(function(){return s.showDelete()},function(e,t){if(e||t){e&&s.closeOptionButtons(),s.canSwipeItems(!e),i.children().toggleClass("list-left-editing",e),i.toggleClass("disable-pointer-events",e);var n=g(i[0].getElementsByClassName("item-delete"));o(n,s.showDelete)}}),e.$watch(function(){return s.showReorder()},function(e,t){if(e||t){e&&s.closeOptionButtons(),s.canSwipeItems(!e),i.children().toggleClass("list-right-editing",e),i.toggleClass("disable-pointer-events",e);var n=g(i[0].getElementsByClassName("item-reorder"));o(n,s.showReorder)}})}var s=r[0],c=r[1];t(a)}}}}]),d.directive("menuClose",["$ionicViewService",function(){return{restrict:"AC",require:"^ionSideMenus",link:function(e,t,n,i){t.bind("click",function(){i.close()})}}}]),d.directive("menuToggle",["$ionicViewService",function(){return{restrict:"AC",require:"^ionSideMenus",link:function(e,t,n,i){var o=n.menuToggle||"left";t.bind("click",function(){"left"===o?i.toggleLeft():"right"===o&&i.toggleRight()})}}}]),d.directive("ionModal",[function(){return{restrict:"E",transclude:!0,replace:!0,controller:[function(){}],template:''}}]),d.directive("ionModalView",function(){return{restrict:"E",compile:function(e){e.addClass("modal")}}}),d.directive("ionNavBackButton",["$animate","$rootScope","$sanitize","$ionicNavBarConfig","$ionicNgClick",function(e,t,n,i,o){var r=!1;return t.$on("$viewHistory.historyChange",function(e,t){r=!!t.showBack}),{restrict:"E",require:"^ionNavBar",compile:function(t){t.addClass("button back-button ng-hide");var a=!!(t.html()||"").match(/class=.*?ion-/);return function(t,s,c,l){a||-1!==s[0].className.indexOf("ion-")||s.addClass(i.backButtonIcon),p(c.ngClick)||o(t,s,l.back),t.$watch(function(){return p(c.fromTitle)&&(s[0].innerHTML=''+n(t.oldTitle)+""),!(!r||!t.backButtonShown)},ionic.animationFrameThrottle(function(t){t?e.removeClass(s,"ng-hide"):e.addClass(s,"ng-hide")}))}}}}]),d.constant("$ionicNavBarConfig",{transition:"nav-title-slide-ios7",alignTitle:"center",backButtonIcon:"ion-ios7-arrow-back"}),d.directive("ionNavBar",["$ionicViewService","$rootScope","$animate","$compile","$ionicNavBarConfig",function(e,t,n,i,o){return{restrict:"E",controller:"$ionicNavBar",scope:!0,compile:function(e,t){function n(e,t,n,i){i._headerBarView=new ionic.views.HeaderBar({el:t[0],alignTitle:n.alignTitle||o.alignTitle||"center"}),e.backButtonShown=!1,e.shouldAnimate=!0,e.isReverse=!1,e.isInvisible=!0,e.$on("$destroy",function(){e.$parent.$hasHeader=!1}),e.$watch(function(){return(e.isReverse?" reverse":"")+(e.isInvisible?" invisible":"")+(e.shouldAnimate?"":" no-animation")},function(e,n){t.removeClass(n),t.addClass(e)})}return e.addClass("bar bar-header nav-bar").append('

'),e.addClass(p(t.animation)?t.animation:o.transition),{pre:n}}}}]),d.directive("ionNavButtons",["$compile","$animate",function(e,t){return{require:"^ionNavBar",restrict:"E",compile:function(n){var i=n.contents().remove();return function(n,o,r,a){var s="right"===r.side?a.rightButtonsElement:a.leftButtonsElement,c=g("").append(i);o.append(c),e(c)(n),ionic.requestAnimationFrame(function(){n.$$destroyed||t.enter(c,s)}),n.$on("$destroy",function(){t.leave(c)}),o.css("display","none")}}}}]),d.directive("navClear",["$ionicViewService","$state","$location","$window","$rootScope",function(e,t,n,i,o){return o.$on("$stateChangeError",function(){e.nextViewOptions(null)}),{priority:100,restrict:"AC",compile:function(){function t(t,n){function o(){r=t.$on("$stateChangeStart",function(){e.nextViewOptions({disableAnimate:!0,disableBack:!0}),r()}),i.setTimeout(r,300)}var r;n.on("click",o)}return{pre:t}}}}]),d.constant("$ionicNavViewConfig",{transition:"slide-left-right-ios7"}),d.directive("ionNavView",["$ionicViewService","$state","$compile","$controller","$animate",function(e,t,n,i,o){var r=!1,a={restrict:"E",terminal:!0,priority:2e3,transclude:!0,controller:function(){},compile:function(s,c,l){return function(s,c,u){function d(r){o.enabled()===!1&&(r=!1);var a=t.$current&&t.$current.locals[p];if(a!==f){var l=e.getRenderer(c,u,s);if(h&&(h.$destroy(),h=null),!a)return f=null,w.state=null,c.append(m);var d=g("
").html(a.$template).contents(),$=l().register(d);l(r).leave(),f=a,w.state=a.$$state,l(r).enter(d);var b=n(d);if(h=s.$new(),h.$navDirection=$.navDirection,a.$$controller){a.$scope=h;var y=i(a.$$controller,a);c.children().data("$ngControllerController",y)}b(h);var S=e._getViewById($.viewId)||{};h.$broadcast("$viewContentLoaded",S),v&&h.$eval(v),d=null}}var h,f,p=u[a.name]||u.name||"",v=u.onload||"",m=l(s);c.append(m);var $=c.parent().inheritedData("$uiView");p.indexOf("@")<0&&(p=p+"@"+($&&$.state?$.state.name:""));var w={name:p,state:null};c.data("$uiView",w);var b=function(){if(!r){r=!0;try{d(!0)}catch(e){throw r=!1,e}r=!1}};s.$on("$stateChangeSuccess",b),d(!1)}}};return a}]),d.config(["$provide",function(e){e.decorator("ngClickDirective",["$delegate",function(e){return e.shift(),e}])}]).factory("$ionicNgClick",["$parse",function(e){return function(t,n,i){var o=angular.isFunction(i)?i:e(i);n.on("click",function(e){t.$apply(function(){o(t,{$event:e})})}),n.onclick=function(){}}}]).directive("ngClick",["$ionicNgClick",function(e){return function(t,n,i){e(t,n,i.ngClick)}}]).directive("ionStopEvent",function(){return{restrict:"A",link:function(e,t,n){t.bind(n.ionStopEvent,l)}}}),d.directive("ionPane",function(){return{restrict:"E",link:function(e,t){t.addClass("pane")}}}),d.directive("ionPopover",[function(){return{restrict:"E",transclude:!0,replace:!0,controller:[function(){}],template:'
'}}]),d.directive("ionPopoverView",function(){return{restrict:"E",compile:function(e){e.append(angular.element('
')),e.addClass("popover")}}}),d.directive("ionRadio",function(){return{restrict:"E",replace:!0,require:"?ngModel",transclude:!0,template:'',compile:function(e,t){t.icon&&e.children().eq(2).removeClass("ion-checkmark").addClass(t.icon);var n=e.find("input");return f({name:t.name,value:t.value,disabled:t.disabled,"ng-value":t.ngValue,"ng-model":t.ngModel,"ng-disabled":t.ngDisabled,"ng-change":t.ngChange},function(e,t){p(e)&&n.attr(t,e)}),function(e,t,n){e.getValue=function(){return e.ngValue||n.value}}}}}),d.directive("ionRefresher",["$ionicBind",function(e){return{restrict:"E",replace:!0,require:"^$ionicScroll",template:'
',compile:function(t,n){return angular.isUndefined(n.pullingIcon)&&n.$set("pullingIcon","ion-arrow-down-c"),angular.isUndefined(n.refreshingIcon)&&n.$set("refreshingIcon","ion-loading-d"),function(t,n,i,o){e(t,i,{pullingIcon:"@",pullingText:"@",refreshingIcon:"@",refreshingText:"@",$onRefresh:"&onRefresh",$onPulling:"&onPulling"}),o._setRefresher(t,n[0]),t.$on("scroll.refreshComplete",function(){t.$evalAsync(function(){n[0].classList.remove("active"),o.scrollView.finishPullToRefresh()})})}}}}]),d.directive("ionScroll",["$timeout","$controller","$ionicBind",function(e,t,n){return{restrict:"E",scope:!0,controller:function(){},compile:function(e){function i(e,i,r){var a,s;n(e,r,{direction:"@",paging:"@",$onScroll:"&onScroll",scroll:"@",scrollbarX:"@",scrollbarY:"@",zooming:"@",minZoom:"@",maxZoom:"@"}),e.direction=e.direction||"y",angular.isDefined(r.padding)&&e.$watch(r.padding,function(e){o.toggleClass("padding",!!e)}),e.$eval(e.paging)===!0&&o.addClass("scroll-paging"),e.direction||(e.direction="y");var c=e.$eval(e.paging)===!0,l={el:i[0],delegateHandle:r.delegateHandle,bouncing:e.$eval(r.hasBouncing),paging:c,scrollbarX:e.$eval(e.scrollbarX)!==!1,scrollbarY:e.$eval(e.scrollbarY)!==!1,scrollingX:e.direction.indexOf("x")>=0,scrollingY:e.direction.indexOf("y")>=0,zooming:e.$eval(e.zooming)===!0,maxZoom:e.$eval(e.maxZoom)||3,minZoom:e.$eval(e.minZoom)||.5}; c&&(l.speedMultiplier=.8,l.bouncing=!1),s=t("$ionicScroll",{$scope:e,scrollViewOptions:l}),a=e.$parent.scrollView=s.scrollView}e.addClass("scroll-view ionic-scroll");var o=g('
');return o.append(e.contents()),e.append(o),{pre:i}}}}]),d.directive("ionSideMenu",function(){return{restrict:"E",require:"^ionSideMenus",scope:!0,compile:function(e,t){return angular.isUndefined(t.isEnabled)&&t.$set("isEnabled","true"),angular.isUndefined(t.width)&&t.$set("width","275"),e.addClass("menu menu-"+t.side),function(e,t,n,i){e.side=n.side||"left";var o=i[e.side]=new ionic.views.SideMenu({width:275,el:t[0],isEnabled:!0});e.$watch(n.width,function(e){var t=+e;t&&t==e&&o.setWidth(+e)}),e.$watch(n.isEnabled,function(e){o.setIsEnabled(!!e)})}}}}),d.directive("ionSideMenuContent",["$timeout","$ionicGesture",function(e,t){return{restrict:"EA",require:"^ionSideMenus",scope:!0,compile:function(n,i){function o(o,r,a,s){function c(e){0!==s.getOpenAmount()&&(s.close(),e.gesture.srcEvent.preventDefault())}r.addClass("menu-content pane"),p(i.dragContent)?o.$watch(i.dragContent,function(e){s.canDragContent(e)}):s.canDragContent(!0),p(i.edgeDragThreshold)&&o.$watch(i.edgeDragThreshold,function(e){s.edgeDragThreshold(e)});var l=!1,u=!1;ionic.on("tap",c,r[0]);var d=function(e){!l&&s.isDraggableTarget(e)&&(u=!0,s._handleDrag(e),e.gesture.srcEvent.preventDefault())},h=function(e){u&&e.gesture.srcEvent.preventDefault()},f=t.on("dragright",d,r),v=t.on("dragleft",d,r),g=t.on("dragup",h,r),m=t.on("dragdown",h,r),$=function(e){u=!1,l||s._endDrag(e),l=!1},w=t.on("release",$,r);s.setContent({element:n[0],onDrag:function(){},endDrag:function(){},getTranslateX:function(){return o.sideMenuContentTranslateX||0},setTranslateX:ionic.animationFrameThrottle(function(t){r[0].style[ionic.CSS.TRANSFORM]="translate3d("+t+"px, 0, 0)",e(function(){o.sideMenuContentTranslateX=t})}),enableAnimation:function(){o.animationEnabled=!0,r[0].classList.add("menu-animated")},disableAnimation:function(){o.animationEnabled=!1,r[0].classList.remove("menu-animated")}}),o.$on("$destroy",function(){t.off(v,"dragleft",d),t.off(f,"dragright",d),t.off(g,"dragup",d),t.off(m,"dragdown",d),t.off(w,"release",$),ionic.off("tap",c,r[0])})}return{pre:o}}}}]),d.directive("ionSideMenus",["$document",function(e){return{restrict:"ECA",controller:"$ionicSideMenus",compile:function(t,n){return n.$set("class",(n["class"]||"")+" view"),function(t){t.$on("$destroy",function(){e[0].body.classList.remove("menu-open")})}}}}]),d.directive("ionSlideBox",["$timeout","$compile","$ionicSlideBoxDelegate",function(e,t,n){return{restrict:"E",replace:!0,transclude:!0,scope:{autoPlay:"=",doesContinue:"@",slideInterval:"@",showPager:"@",pagerClick:"&",disableScroll:"@",onSlideChanged:"&",activeSlide:"=?"},controller:["$scope","$element","$attrs",function(t,i,o){var r=t.$eval(t.doesContinue)===!0,a=p(o.autoPlay)?!!t.autoPlay:!1,s=a?t.$eval(t.slideInterval)||4e3:0,c=new ionic.views.Slider({el:i[0],auto:s,continuous:r,startSlide:t.activeSlide,slidesChanged:function(){t.currentSlide=c.currentIndex(),e(function(){})},callback:function(n){t.currentSlide=n,t.onSlideChanged({index:t.currentSlide,$index:t.currentSlide}),t.$parent.$broadcast("slideBox.slideChanged",n),t.activeSlide=n,e(function(){})}});c.enableSlide(t.$eval(o.disableScroll)!==!0),t.$watch("activeSlide",function(e){angular.isDefined(e)&&c.slide(e)}),t.$on("slideBox.nextSlide",function(){c.next()}),t.$on("slideBox.prevSlide",function(){c.prev()}),t.$on("slideBox.setSlide",function(e,t){c.slide(t)}),this.__slider=c;var l=n._registerInstance(c,o.delegateHandle);t.$on("$destroy",l),this.slidesCount=function(){return c.slidesCount()},this.onPagerClick=function(e){t.pagerClick({index:e})},e(function(){c.load()})}],template:'
',link:function(e,n){if(e.$eval(e.showPager)!==!1){var i=e.$new(),o=g("");n.append(o),t(o)(i)}}}}]).directive("ionSlide",function(){return{restrict:"E",require:"^ionSlideBox",compile:function(e){return e.addClass("slider-slide"),function(){}}}}).directive("ionPager",function(){return{restrict:"E",replace:!0,require:"^ionSlideBox",template:'
',link:function(e,t,n,i){var o=function(e){for(var n=t[0].children,i=n.length,o=0;i>o;o++)o==e?n[o].classList.add("active"):n[o].classList.remove("active")};e.pagerClick=function(e){i.onPagerClick(e)},e.numSlides=function(){return new Array(i.slidesCount())},e.$watch("currentSlide",function(e){o(e)})}}}),d.constant("$ionicTabConfig",{type:""}),d.directive("ionTab",["$rootScope","$animate","$ionicBind","$compile",function(e,t,n,i){function o(e,t){return angular.isDefined(t)?" "+e+'="'+t+'"':""}return{restrict:"E",require:["^ionTabs","ionTab"],replace:!0,controller:"$ionicTab",scope:!0,compile:function(e,r){var a="",s=g('
').append(e.contents().remove());return function(e,o,r,c){function l(){f.tabMatchesState()&&h.select(e)}var u,d,h=c[0],f=c[1],p=s[0].querySelector("ion-nav-view")||s[0].querySelector("data-ion-nav-view"),v=p&&p.getAttribute("name");n(e,r,{animate:"=",onSelect:"&",onDeselect:"&",title:"@",uiSref:"@",href:"@"}),h.add(e),e.$on("$destroy",function(){h.remove(e),m.isolateScope().$destroy(),m.remove()}),o[0].removeAttribute("title"),v&&(f.navViewName=v),e.$on("$stateChangeSuccess",l),l();var m=g(a);m.data("$ionTabsController",h),m.data("$ionTabController",f),h.$tabsElement.append(i(m)(e)),e.$watch("$tabSelected",function(n){u&&u.$destroy(),u=null,d&&t.leave(d),d=null,n&&(u=e.$new(),d=s.clone(),t.enter(d,h.$element),i(d)(u))})}}}}]),d.directive("ionTabNav",[function(){return{restrict:"E",replace:!0,require:["^ionTabs","^ionTab"],template:'{{badge}}',scope:{title:"@",icon:"@",iconOn:"@",iconOff:"@",badge:"=",hidden:"@",badgeStyle:"@","class":"@"},compile:function(){return function(e,t,n,i){var o=i[0],r=i[1];t[0].removeAttribute("title"),e.selectTab=function(e){e.preventDefault(),o.select(r.$scope,!0)},n.ngClick||t.on("click",function(t){e.$apply(function(){e.selectTab(t)})}),e.isHidden=function(){return"true"===n.hidden||n.hidden===!0?!0:!1},e.getIconOn=function(){return e.iconOn||e.icon},e.getIconOff=function(){return e.iconOff||e.icon},e.isTabActive=function(){return o.selectedTab()===r.$scope}}}}}]),d.constant("$ionicTabsConfig",{position:"",type:""}),d.directive("ionTabs",["$ionicViewService","$ionicTabsDelegate","$ionicTabsConfig",function(e,t,n){return{restrict:"E",scope:!0,controller:"$ionicTabs",compile:function(e){function i(e,n,i,o){var r=t._registerInstance(o,i.delegateHandle);e.$on("$destroy",r),o.$scope=e,o.$element=n,o.$tabsElement=g(n[0].querySelector(".tabs"));var a=n[0];e.$watch(function(){return a.className},function(t){var n=-1!==t.indexOf("tabs-top"),i=-1!==t.indexOf("tabs-item-hide");e.$hasTabs=!n&&!i,e.$hasTabsTop=n&&!i}),e.$on("$destroy",function(){delete e.$hasTabs,delete e.$hasTabsTop})}e.addClass("view");var o=g('
');return o.append(e.contents()),e.append(o),e.addClass(n.position),e.addClass(n.type),{pre:i}}}}]),d.directive("ionToggle",["$ionicGesture","$timeout",function(){return{restrict:"E",replace:!0,require:"?ngModel",transclude:!0,template:'
',compile:function(e,t){var n=e.find("input");return f({name:t.name,"ng-value":t.ngValue,"ng-model":t.ngModel,"ng-checked":t.ngChecked,"ng-disabled":t.ngDisabled,"ng-true-value":t.ngTrueValue,"ng-false-value":t.ngFalseValue,"ng-change":t.ngChange},function(e,t){p(e)&&n.attr(t,e)}),t.toggleClass&&e[0].getElementsByTagName("label")[0].classList.add(t.toggleClass),function(e,t){var n,i,o,r;n=t[0].getElementsByTagName("label")[0],i=n.children[0],o=n.children[1],r=o.children[0];var a=g(i).controller("ngModel");e.toggle=new ionic.views.Toggle({el:n,track:o,checkbox:i,handle:r,onChange:function(){a.$setViewValue(i.checked?!0:!1),e.$apply()}}),e.$on("$destroy",function(){e.toggle.destroy()})}}}}]),d.directive("ionView",["$ionicViewService","$rootScope","$animate",function(){return{restrict:"EA",priority:1e3,require:["^?ionNavBar","^?ionModal"],compile:function(e){return e.addClass("pane"),e[0].removeAttribute("title"),function(e,t,n,i){var o=i[0],r=i[1];if(o&&!r){if(angular.isDefined(n.title)){var a=n.title;o.changeTitle(a,e.$navDirection),n.$observe("title",function(e){o.setTitle(e)})}var s=angular.isDefined(n.hideBackButton)?n.hideBackButton:"false";e.$watch(s,function(e){o.showBackButton(!e)});var c=angular.isDefined(n.hideNavBar)?n.hideNavBar:"false";e.$watch(c,function(e){o.showBar(!e)})}}}}}])}();