jce-mobile-app/www/lib/ionic/js/ionic-angular.min.js

18 lines
98 KiB
JavaScript

/*!
* Copyright 2014 Drifty Co.
* http://drifty.com/
*
* Ionic, v1.0.0-beta.14
* 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,t){return[function(){return{priority:"99",link:function(n,i,o){o.$observe(e,function(e){e||i[0].removeAttribute(t)})}}}]}function t(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 n(){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 i(e){return["$document","$timeout",function(t,n){return{restrict:"E",controller:"$ionicHeaderBar",compile:function(i){function o(t,n,i,o){e?(t.$watch(function(){return n[0].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}),o.align(),t.$on("$ionicHeader.align",function(){ionic.requestAnimationFrame(o.align)})):(t.$watch(function(){return n[0].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)}))}return i.addClass(e?"bar bar-header":"bar bar-footer"),n(function(){e&&t[0].getElementsByClassName("tabs-top").length&&i.addClass("has-tabs-top")}),{pre:o}}}}]}function o(e){return e.clientHeight}function r(e){e.stopPropagation()}var a={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})}},s=angular.module("ionic",["ngAnimate","ngSanitize","ui.router"]),c=angular.extend,l=angular.forEach,u=angular.isDefined,d=(angular.isNumber,angular.isString),f=angular.element;s.factory("$ionicActionSheet",["$rootScope","$compile","$animate","$timeout","$ionicTemplateLoader","$ionicPlatform","$ionicBody",function(e,t,n,i,o,r,a){function s(o){var s=e.$new(!0);angular.extend(s,{cancel:angular.noop,destructiveButtonClicked:angular.noop,buttonClicked:angular.noop,$deregisterBackButton:angular.noop,buttons:[],cancelOnStateChange:!0},o||{});var c=s.element=t('<ion-action-sheet ng-class="cssClass" buttons="buttons"></ion-action-sheet>')(s),l=f(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"),i(function(){a.removeClass("action-sheet-open")},400),s.$deregisterBackButton(),u(),n.removeClass(c,"active").then(function(){s.$destroy(),c.remove(),s.cancel.$scope=l=null,(e||angular.noop)()}))},s.showSheet=function(e){s.removed||(a.append(c).addClass("action-sheet-open"),n.addClass(c,"active").then(function(){s.removed||(e||angular.noop)()}),i(function(){s.removed||l.addClass("action-sheet-up")},20,!1))},s.$deregisterBackButton=r.registerBackButtonAction(function(){i(s.cancel)},b),s.cancel=function(){s.removeSheet(o.cancel)},s.buttonClicked=function(e){o.buttonClicked(e,o.buttons[e])===!0&&s.removeSheet()},s.destructiveButtonClicked=function(){o.destructiveButtonClicked()===!0&&s.removeSheet()},s.showSheet(),s.cancel.$scope=s,s.cancel}return{show:s}}]),f.prototype.addClass=function(e){var t,n,i,o,r,a;if(e&&"ng-scope"!=e&&"ng-isolate-scope"!=e)for(t=0;t<this.length;t++)if(o=this[t],o.setAttribute)if(e.indexOf(" ")<0&&o.classList.add)o.classList.add(e);else{for(a=(" "+(o.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),r=e.split(" "),n=0;n<r.length;n++)i=r[n].trim(),-1===a.indexOf(" "+i+" ")&&(a+=i+" ");o.setAttribute("class",a.trim())}return this},f.prototype.removeClass=function(e){var t,n,i,o,r;if(e)for(t=0;t<this.length;t++)if(r=this[t],r.getAttribute)if(e.indexOf(" ")<0&&r.classList.remove)r.classList.remove(e);else for(i=e.split(" "),n=0;n<i.length;n++)o=i[n],r.setAttribute("class",(" "+(r.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+o.trim()+" "," ").trim());return this},s.factory("$$ionicAttachDrag",[function(){function e(e,t,n){function i(e){h||s.onDragStart()!==!1&&(h={startX:e.gesture.center.pageX,startY:e.gesture.center.pageY,distance:s.getDistance()})}function o(e){if(h){var t=h.startX-e.gesture.center.pageX,n=h.startY-e.gesture.center.pageY,i="up"===e.gesture.direction||"down"===e.gesture.direction;if(i&&Math.abs(n)>2*Math.abs(t))return void r(e);Math.abs(t)>2*Math.abs(n)&&(f=!0);var o=a(e.gesture.center.pageX);s.onDrag(o)}}function r(e){if(h){var t=a(e.gesture.center.pageX);n.onDragEnd(t,e.gesture.velocityX),h=null}}function a(e){var t=h.startX-e,n=t/h.distance;return n}var s=c({},{getDistance:function(){return s.element.prop("offsetWidth")},onDragStart:angular.noop,onDrag:angular.noop,onDragEnd:angular.noop},n),l=ionic.onGesture("dragstart",i,t[0]),u=ionic.onGesture("drag",o,t[0]),d=ionic.onGesture("dragend",r,t[0]);e.$on("$destroy",function(){ionic.offGesture(l,"dragstart",i),ionic.offGesture(u,"drag",o),ionic.offGesture(d,"dragend",r)});var f=!1;t.on("touchmove pointermove mousemove",function(e){f&&e.preventDefault()}),t.on("touchend mouseup mouseleave",function(){f=!1});var h}return e}]),s.factory("$ionicBackdrop",["$document","$timeout",function(e,t){function n(){1===++a&&(r.addClass("visible"),ionic.requestAnimationFrame(function(){a&&r.addClass("active")}))}function i(){0===--a&&(r.removeClass("active"),t(function(){!a&&r.removeClass("visible")},400,!1))}function o(){return r}var r=f('<div class="backdrop">'),a=0;return e[0].body.appendChild(r[0]),{retain:n,release:i,getElement:o,_element:r}}]),s.factory("$ionicBind",["$parse","$interpolate",function(e,t){var n=/^\s*([@=&])(\??)\s*(\w*)\s*$/;return function(i,o,r){l(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)}}})}}]),s.factory("$ionicBody",["$document",function(e){return{addClass:function(){for(var t=0;t<arguments.length;t++)e[0].body.classList.add(arguments[t]);return this},removeClass:function(){for(var t=0;t<arguments.length;t++)e[0].body.classList.remove(arguments[t]);return this},enableClass:function(e){var t=Array.prototype.slice.call(arguments).slice(1);return e?this.addClass.apply(this,t):this.removeClass.apply(this,t),this},append:function(t){return e[0].body.appendChild(t.length?t[0]:t),this},get:function(){return e[0].body}}}]),s.factory("$ionicClickBlock",["$document","$ionicBody","$timeout",function(e,t,n){function i(){s&&(r?r.classList.remove(c):(r=e[0].createElement("div"),r.className="click-block",t.append(r)),s=!1)}function o(){r&&r.classList.add(c)}var r,a,s,c="click-block-hide";return{show:function(e){s=!0,n.cancel(a),a=n(this.hide,e||310),ionic.requestAnimationFrame(i)},hide:function(){s=!1,n.cancel(a),ionic.requestAnimationFrame(o)}}}]),s.factory("$collectionDataSource",["$cacheFactory","$parse","$rootScope",function(e,t,n){function i(e){e.css(ionic.CSS.TRANSFORM,"translate3d(-2000px,-2000px,0)")}function o(e){this.scope=e.scope,this.transcludeFn=e.transcludeFn,this.transcludeParent=e.transcludeParent,this.element=e.element,this.keyExpr=e.keyExpr,this.listExpr=e.listExpr,this.trackByExpr=e.trackByExpr,this.heightGetter=e.heightGetter,this.widthGetter=e.widthGetter,this.dimensions=[],this.data=[],this.attachedItems={},this.BACKUP_ITEMS_LENGTH=20,this.backupItemsArray=[]}return o.prototype={setup:function(){if(!this.isSetup){this.isSetup=!0;for(var e=0;e<this.BACKUP_ITEMS_LENGTH;e++)this.detachItem(this.createItem())}},destroy:function(){this.dimensions.length=0,this.data=null,this.backupItemsArray.length=0,this.attachedItems={}},calculateDataDimensions:function(){var e={};this.dimensions=this.data.map(function(t,n){return e[this.keyExpr]=t,e.$index=n,{width:this.widthGetter(this.scope,e),height:this.heightGetter(this.scope,e)}},this),this.dimensions=this.beforeSiblings.concat(this.dimensions).concat(this.afterSiblings),this.dataStartIndex=this.beforeSiblings.length},createItem:function(){var e={};return e.scope=this.scope.$new(),this.transcludeFn(e.scope,function(t){t.css("position","absolute"),e.element=t}),this.transcludeParent.append(e.element),e},getItem:function(e){var t;return(t=this.attachedItems[e])||((t=this.backupItemsArray.pop())?ionic.Utils.reconnectScope(t.scope):t=this.createItem()),t},attachItemAtIndex:function(e){if(e<this.dataStartIndex)return this.beforeSiblings[e];if(e-=this.dataStartIndex,e>this.data.length-1)return this.afterSiblings[e-this.dataStartIndex];var t=this.getItem(e),i=this.data[e];return(t.index!==e||t.scope[this.keyExpr]!==i)&&(t.index=t.scope.$index=e,t.scope[this.keyExpr]=i,t.scope.$first=0===e,t.scope.$last=e===this.getLength()-1,t.scope.$middle=!(t.scope.$first||t.scope.$last),t.scope.$odd=!(t.scope.$even=0===(1&e)),n.$$phase||t.scope.$digest()),this.attachedItems[e]=t,t},destroyItem:function(e){e.element.remove(),e.scope.$destroy(),e.scope=null,e.element=null},detachItem:function(e){delete this.attachedItems[e.index],e.isOutside?i(e.element):this.backupItemsArray.length>=this.BACKUP_ITEMS_LENGTH?this.destroyItem(e):(this.backupItemsArray.push(e),i(e.element),ionic.Utils.disconnectScope(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"}),i(e.element)})}},o}]),s.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})}return 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.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.dataSource.getLength(),this.hasNextIndex&&(this.nextPos=Math.min(t+this.dimensions[e+1].primarySize,this.dimensions[e+1].primaryPos))},renderScroll:ionic.animationFrameThrottle(function(e,t,n,i){return this.renderIfNeeded(this.isVertical?t:e),this.scrollView.__$callback(e,t,n,i)}),renderIfNeeded:function(e){(this.hasNextIndex&&e>=this.nextPos||this.hasPrevIndex&&e<this.previousPos)&&this.render()},getIndexForScrollValue:function(e,t){var n;if(t<=this.dimensions[e].primaryPos)for(;(n=this.dimensions[e-1])&&n.primaryPos>t;)e--;else for(;(n=this.dimensions[e+1])&&n.primaryPos<t;)e++;return e},render:function(e){function t(e,t){e<i.dataSource.dataStartIndex||i.renderItem(e,t.primaryPos-i.beforeSize,t.secondaryPos)}var n,i=this,o=this.currentIndex>=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.primarySize<c;)t(n,r),n++;i.dimensions[n]&&(t(n,i.dimensions[n]),n++),i.dimensions[n]&&t(n,i.dimensions[n]);var d=n;for(var f in this.renderedItems)(u>f||f>d)&&this.removeItem(f);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])}},e}]),s.factory("$ionicGesture",[function(){return{on:function(e,t,n,i){return window.ionic.onGesture(e,t,n[0],i)},off:function(e,t,n){return window.ionic.offGesture(e,t,n)}}}]),s.factory("$ionicHistory",["$rootScope","$state","$location","$window","$timeout","$ionicViewSwitcher","$ionicNavViewDelegate",function(e,t,n,i,o,r,a){function s(e){return e?L.views[e]:null}function l(e){return e?s(e.backViewId):null}function u(e){return e?s(e.forwardViewId):null}function d(e){return e?L.histories[e]:null}function f(e){var t=h(e);return L.histories[t.historyId]||(L.histories[t.historyId]={historyId:t.historyId,parentHistoryId:h(t.scope.$parent).historyId,stack:[],cursor:-1}),d(t.historyId)}function h(t){for(var n=t;n;){if(n.hasOwnProperty("$historyId"))return{historyId:n.$historyId,scope:n};n=n.$parent}return{historyId:"root",scope:e}}function p(e){L.currentView=s(e),L.backView=l(L.currentView),L.forwardView=u(L.currentView)}function v(){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()}function g(){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}function m(e){return e&&e.length&&/ion-side-menus|ion-tabs/i.test(e[0].tagName)}var $,w,b,y,S="initialView",k="newView",T="moveBack",C="moveForward",I="back",B="forward",x="enter",V="exit",E="swap",A="none",D=0,L={histories:{root:{historyId:"root",parentHistoryId:null,stack:[],cursor:-1}},views:{},backView:null,forwardView:null,currentView:null},P=function(){};return P.prototype.initialize=function(e){if(e){for(var t in e)this[t]=e[t];return this}return null},P.prototype.go=function(){return this.stateName?t.go(this.stateName,this.stateParams):this.url&&this.url!==n.url()?L.backView===this?i.history.go(-1):L.forwardView===this?i.history.go(1):void n.url(this.url):null},P.prototype.destroy=function(){this.scope&&(this.scope.$destroy&&this.scope.$destroy(),this.scope=null)},{register:function(e,t){var i,a,c,u=v(),m=f(e),P=L.currentView,H=L.backView,N=L.forwardView,_=null,O=null,M=A,R=m.historyId,U=n.url();if($!==u&&($=u,D++),y)_=y.viewId,O=y.action,M=y.direction,y=null;else if(H&&H.stateId===u)_=H.viewId,R=H.historyId,O=T,H.historyId===P.historyId?M=I:P&&(M=V,i=d(H.historyId),i&&i.parentHistoryId===P.historyId?M=x:(i=d(P.historyId),i&&i.parentHistoryId===m.parentHistoryId&&(M=E)));else if(N&&N.stateId===u)_=N.viewId,R=N.historyId,O=C,N.historyId===P.historyId?M=B:P&&(M=V,P.historyId===m.parentHistoryId?M=x:(i=d(P.historyId),i&&i.parentHistoryId===m.parentHistoryId&&(M=E))),i=h(e),N.historyId&&i.scope&&(i.scope.$historyId=N.historyId,R=N.historyId);else if(P&&P.historyId!==R&&m.cursor>-1&&m.stack.length>0&&m.cursor<m.stack.length&&m.stack[m.cursor].stateId===u){var z=m.stack[m.cursor];_=z.viewId,R=z.historyId,O=T,M=E,i=d(P.historyId),i&&i.parentHistoryId===R?M=V:(i=d(R),i&&i.parentHistoryId===P.historyId&&(M=x)),i=s(z.backViewId),i&&z.historyId!==i.historyId&&(m.stack[m.cursor].backViewId=P.viewId)}else{if(c=r.createViewEle(t),this.isAbstractEle(c,t))return{action:"abstractView",direction:A,ele:c};if(_=ionic.Utils.nextUid(),P){if(P.forwardViewId=_,O=k,N&&P.stateId!==N.stateId&&P.historyId===N.historyId&&(i=d(N.historyId))){for(a=i.stack.length-1;a>=N.index;a--)i.stack[a].destroy(),i.stack.splice(a);R=N.historyId}m.historyId===P.historyId?M=B:P.historyId!==m.historyId&&(M=x,i=d(P.historyId),i&&i.parentHistoryId===m.parentHistoryId?M=E:(i=d(i.parentHistoryId),i&&i.historyId===m.historyId&&(M=V)))}else O=S;2>D&&(M=A),L.views[_]=this.createView({viewId:_,index:m.stack.length,historyId:m.historyId,backViewId:P&&P.viewId?P.viewId:null,forwardViewId:null,stateId:u,stateName:this.currentStateName(),stateParams:g(),url:U}),m.stack.push(L.views[_])}if(o.cancel(b),w){if(w.disableAnimate&&(M=A),w.disableBack&&(L.views[_].backViewId=null),w.historyRoot){for(a=0;a<m.stack.length;a++)m.stack[a].viewId===_?(m.stack[a].index=0,m.stack[a].backViewId=m.stack[a].forwardViewId=null):delete L.views[m.stack[a].viewId];m.stack=[L.views[_]]}w=null}if(p(_),L.backView&&R==L.backView.historyId&&u==L.backView.stateId&&U==L.backView.url)for(a=0;a<m.stack.length;a++)if(m.stack[a].viewId==_){O="dupNav",M=A,m.stack[a-1].forwardViewId=L.forwardView=null,L.currentView.index=L.backView.index,L.currentView.backViewId=L.backView.backViewId,L.backView=l(L.backView),m.stack.splice(a,1);break}return m.cursor=L.currentView.index,{viewId:_,action:O,direction:M,historyId:R,enableBack:!(!L.backView||L.backView.historyId!==L.currentView.historyId),isHistoryRoot:0===L.currentView.index,ele:c}},registerHistory:function(e){e.$historyId=ionic.Utils.nextUid()},createView:function(e){var t=new P;return t.initialize(e)},getViewById:s,viewHistory:function(){return L},currentView:function(e){return arguments.length&&(L.currentView=e),L.currentView},currentHistoryId:function(){return L.currentView?L.currentView.historyId:null},currentTitle:function(e){return L.currentView?(arguments.length&&(L.currentView.title=e),L.currentView.title):void 0},backView:function(e){return arguments.length&&(L.backView=e),L.backView},backTitle:function(){return L.backView?L.backView.title:void 0},forwardView:function(e){return arguments.length&&(L.forwardView=e),L.forwardView},currentStateName:function(){return t&&t.current?t.current.name:null},isCurrentStateNavView:function(e){return!!(t&&t.current&&t.current.views&&t.current.views[e])},goToHistoryRoot:function(e){if(e){var t=d(e);if(t&&t.stack.length){if(L.currentView&&L.currentView.viewId===t.stack[0].viewId)return;y={viewId:t.stack[0].viewId,action:T,direction:I},t.stack[0].go()}}},goBack:function(){L.backView&&L.backView.go()},clearHistory:function(){var e=L.histories,t=L.currentView;if(e)for(var n in e)e[n].stack&&(e[n].stack=[],e[n].cursor=-1),t&&t.historyId===n?(t.backViewId=t.forwardViewId=null,e[n].stack.push(t)):e[n].destroy&&e[n].destroy();for(var i in L.views)i!==t.viewId&&delete L.views[i];t&&p(t.viewId)},clearCache:function(){a._instances.forEach(function(e){e.clearCache()})},nextViewOptions:function(e){return arguments.length&&(o.cancel(b),null===e?w=e:(w=w||{},c(w,e),w.expire&&(b=o(function(){w=null},w.expire)))),w},isAbstractEle:function(e,t){return t&&t.$$state&&t.$$state.self.abstract?!0:!(!e||!m(e)&&!m(e.children()))},isActiveScope:function(e){if(!e)return!1;for(var t,n=e,i=this.currentHistoryId();n;){if(n.$$disconnected)return!1;if(!t&&n.hasOwnProperty("$historyId")&&(t=!0),i){if(n.hasOwnProperty("$historyId")&&i==n.$historyId)return!0;if(n.hasOwnProperty("$activeHistoryId")&&i==n.$activeHistoryId){if(n.hasOwnProperty("$historyId"))return!0;if(!t)return!0}}t&&n.hasOwnProperty("$activeHistoryId")&&(t=!1),n=n.$parent}return i?"root"==i:!0}}}]).run(["$rootScope","$state","$location","$document","$ionicPlatform","$ionicHistory",function(e,t,n,i,o,r){function a(e){var t=r.backView();return t?t.go():ionic.Platform.exitApp(),e.preventDefault(),!1}e.$on("$ionicView.beforeEnter",function(){ionic.keyboard&&ionic.keyboard.hide&&ionic.keyboard.hide()}),e.$on("$ionicHistory.change",function(e,i){if(i){var o=r.viewHistory(),a=i.historyId?o.histories[i.historyId]:null;if(a&&a.cursor>-1&&a.cursor<a.stack.length){var s=a.stack[a.cursor];return s.go(i)}!i.url&&i.uiSref&&(i.url=t.href(i.uiSref)),i.url&&(0===i.url.indexOf("#")&&(i.url=i.url.replace("#","")),i.url!==n.url()&&n.url(i.url))}}),e.$ionicGoBack=function(){r.goBack()},e.$on("$ionicView.afterEnter",function(e,t){t&&t.title&&(i[0].title=t.title)}),o.registerBackButtonAction(a,m)}]),s.provider("$ionicConfig",function(){function e(e,i){a.platform[e]=i,o.platform[e]={},t(a,a.platform[e]),n(a.platform[e],o.platform[e],"")}function t(e,n){for(var i in e)i!=r&&e.hasOwnProperty(i)&&(angular.isObject(e[i])?(u(n[i])||(n[i]={}),t(e[i],n[i])):u(n[i])||(n[i]=null))}function n(e,t,o){l(e,function(s,c){angular.isObject(e[c])?(t[c]={},n(e[c],t[c],o+"."+c)):t[c]=function(n){if(arguments.length)return e[c]=n,t;if(e[c]==r){var s=i(a.platform,ionic.Platform.platform()+o+"."+c);return s||s===!1?s:i(a.platform,"default"+o+"."+c)}return e[c]}})}function i(e,t){t=t.split(".");for(var n=0;n<t.length;n++){if(!e||!u(e[t[n]]))return null;e=e[t[n]]}return e}var o=this;o.platform={};var r="platform",a={views:{maxCache:r,forwardCache:r,transition:r},navBar:{alignTitle:r,positionPrimaryButtons:r,positionSecondaryButtons:r,transition:r},backButton:{icon:r,text:r,previousTitleText:r},form:{checkbox:r},tabs:{style:r,position:r},templates:{maxPrefetch:r},platform:{}};n(a,o,""),e("default",{views:{maxCache:10,forwardCache:!1,transition:"ios"},navBar:{alignTitle:"center",positionPrimaryButtons:"left",positionSecondaryButtons:"right",transition:"view"},backButton:{icon:"ion-ios7-arrow-back",text:"Back",previousTitleText:!0},form:{checkbox:"circle"},tabs:{style:"standard",position:"bottom"},templates:{maxPrefetch:30}}),e("ios",{}),e("android",{views:{transition:"android"},navBar:{alignTitle:"left",positionPrimaryButtons:"right",positionSecondaryButtons:"right"},backButton:{icon:"ion-arrow-left-c",text:!1,previousTitleText:!1},form:{checkbox:"square"},tabs:{style:"striped",position:"top"}}),o.transitions={views:{},navBar:{}},o.transitions.views.ios=function(e,t,n,i){function o(e,t,n){var o={};o[ionic.CSS.TRANSITION_DURATION]=i?"":0,o.opacity=t,o[ionic.CSS.TRANSFORM]="translate3d("+n+"%,0,0)",ionic.DomUtil.cachedStyles(e,o)}return i=i&&("forward"==n||"back"==n),{run:function(i){"forward"==n?(o(e,1,99*(1-i)),o(t,1-.1*i,-33*i)):"back"==n?(o(e,1-.1*(1-i),-33*(1-i)),o(t,1,100*i)):(o(e,1,0),o(t,0,0))},shouldAnimate:i}},o.transitions.navBar.ios=function(e,t,n,i){function o(e,t,n,o){var r={};r[ionic.CSS.TRANSITION_DURATION]=i?"":0,r.opacity=1===t?"":t,e.setCss("buttons-left",r),e.setCss("buttons-right",r),e.setCss("back-button",r),r[ionic.CSS.TRANSFORM]="translate3d("+o+"px,0,0)",e.setCss("back-text",r),r[ionic.CSS.TRANSFORM]="translate3d("+n+"px,0,0)",e.setCss("title",r)}function r(e,t,n){if(e){var i=(e.titleTextX()+e.titleWidth())*(1-n),r=t&&(t.titleTextX()-e.backButtonTextLeft())*(1-n)||0;o(e,n,i,r)}}function a(e,t,n){if(e){var i=(-(e.titleTextX()-t.backButtonTextLeft())-e.titleLeftRight())*n;o(e,1-n,i,0)}}return i=i&&("forward"==n||"back"==n),{run:function(i){var o=e.controller(),s=t&&t.controller();"back"==n?(a(o,s,1-i),r(s,o,1-i)):(r(o,s,i),a(s,o,i))},shouldAnimate:i}},o.transitions.views.android=function(e,t,n,i){function o(e,t){var n={};n[ionic.CSS.TRANSITION_DURATION]=i?"":0,n[ionic.CSS.TRANSFORM]="translate3d("+t+"%,0,0)",ionic.DomUtil.cachedStyles(e,n)}return i=i&&("forward"==n||"back"==n),{run:function(i){"forward"==n?(o(e,99*(1-i)),o(t,-100*i)):"back"==n?(o(e,-100*(1-i)),o(t,100*i)):(o(e,0),o(t,0))},shouldAnimate:i}},o.transitions.navBar.android=function(e,t,n,i){function o(e,t){if(e){var n={};n.opacity=1===t?"":t,e.setCss("buttons-left",n),e.setCss("buttons-right",n),e.setCss("back-button",n),e.setCss("back-text",n),e.setCss("title",n)}}return i=i&&("forward"==n||"back"==n),{run:function(n){o(e.controller(),n),o(t&&t.controller(),1-n)},shouldAnimate:!0}},o.transitions.views.none=function(e,t){return{run:function(n){o.transitions.views.android(e,t,!1,!1).run(n)}}},o.transitions.navBar.none=function(e,t){return{run:function(n){o.transitions.navBar.ios(e,t,!1,!1).run(n),o.transitions.navBar.android(e,t,!1,!1).run(n)}}},o.setPlatformConfig=e,o.$get=function(){return o}});var h='<div class="loading-container"><div class="loading"></div></div>',p="$ionicLoading instance.hide() has been deprecated. Use $ionicLoading.hide().",v="$ionicLoading instance.show() has been deprecated. Use $ionicLoading.show().",g="$ionicLoading instance.setContent() has been deprecated. Use $ionicLoading.show({ template: 'my content' }).";s.constant("$ionicLoadingConfig",{template:'<i class="icon ion-loading-d"></i>'}).factory("$ionicLoading",["$ionicLoadingConfig","$ionicBody","$ionicTemplateLoader","$ionicBackdrop","$timeout","$q","$log","$compile","$ionicPlatform","$rootScope",function(e,t,n,i,o,r,s,l,u,d){function f(){return w||(w=n.compile({template:h,appendTo:t.get()}).then(function(e){var a=e;return e.show=function(e){var s=e.templateUrl?n.load(e.templateUrl):r.when(e.template||e.content||"");a.scope=e.scope||a.scope,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)),b(),b=u.registerBackButtonAction(angular.noop,S),s.then(function(e){if(e){var n=a.element.children();n.html(e),l(n.contents())(a.scope)}a.isShown&&(a.element.addClass("visible"),ionic.requestAnimationFrame(function(){a.isShown&&(a.element.addClass("active"),t.addClass("loading-active"))}))}),this.isShown=!0},e.hide=function(){b(),this.isShown&&(this.hasBackdrop&&(i.release(),i.getElement().removeClass("backdrop-loading")),a.element.removeClass("active"),t.removeClass("loading-active"),setTimeout(function(){!a.isShown&&a.element.removeClass("visible")},200)),o.cancel(this.durationTimeout),this.isShown=!1},e})),w}function m(t){t=c({},e||{},t||{});var n=t.delay||t.showDelay||0;return k&&o.cancel(k),k=o(angular.noop,n),k.then(f).then(function(e){return t.hideOnStateChange&&(y=d.$on("$stateChangeSuccess",$)),e.show(t)}),{hide:a.method(p,s.error,$),show:a.method(v,s.error,function(){m(t)}),setContent:a.method(g,s.error,function(e){f().then(function(t){t.show({template:e})})})}}function $(){y(),o.cancel(k),f().then(function(e){e.hide()})}var w,b=angular.noop,y=angular.noop,k=r.when();return{show:m,hide:$,_getLoader:f}}]),s.factory("$ionicModal",["$rootScope","$ionicBody","$compile","$timeout","$ionicPlatform","$ionicTemplateLoader","$q","$log",function(e,t,n,i,o,r,a,s){var l=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=f(n.modalEl);return n.el.classList.remove("hide"),i(function(){t.addClass(n.viewType+"-open")},400),n.el.parentElement||(r.addClass(n.animation),t.append(n.el)),e&&n.positionView&&(n.positionView(e,r),ionic.on("resize",function(){ionic.off("resize",null,window),n.positionView(e,r)},window)),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,w),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"),n.scope.$broadcast("$ionicHeader.align")},20),i(function(){n.$el.on("click",function(e){n.backdropClickToClose&&e.target===n.el&&n.hide()})},400)},hide:function(){var e=this,n=f(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),e.positionView&&ionic.off("resize",null,window),i(function(){t.removeClass(e.viewType+"-open"),e.el.classList.add("hide")},e.hideDelay||320)},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}}),u=function(t,i){var o=i.scope&&i.scope.$new()||e.$new(!0);i.viewType=i.viewType||"modal",c(o,{$hasHeader:!1,$hasSubheader:!1,$hasFooter:!1,$hasSubfooter:!1,$hasTabs:!1,$hasTabsTop:!1});var r=n("<ion-"+i.viewType+">"+t+"</ion-"+i.viewType+">")(o);i.$el=r,i.el=r[0],i.modalEl=i.el.querySelector("."+i.viewType);var a=new l(i);return a.scope=o,i.scope||(o[i.viewType]=a),a};return{fromTemplate:function(e,t){var n=u(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=u(e,t||{});return i&&i(n),n})}}}]),s.service("$ionicNavBarDelegate",ionic.DelegateService(["align","showBackButton","showBar","title","changeTitle","setTitle","getTitle","back","getPreviousTitle"])),s.service("$ionicNavViewDelegate",ionic.DelegateService(["clearCache"]));var m=100,$=150,w=200,b=300,y=400,S=500;s.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)},on:function(e,t){return ionic.Platform.ready(function(){document.addEventListener(e,t,!1)}),function(){ionic.Platform.ready(function(){document.removeEventListener(e,t)})}},ready:function(t){var n=e.defer();return ionic.Platform.ready(function(){n.resolve(),t&&t()}),n.promise}};return t}]}}),s.factory("$ionicPopover",["$ionicModal","$ionicPosition","$document","$window",function(e,t,n,i){function o(e,o){var a=angular.element(e.target||e),s=t.offset(a),c=o.prop("offsetWidth"),l=o.prop("offsetHeight"),u=n[0].body.clientWidth,d=i.innerHeight,h={left:s.left+s.width/2-c/2},p=f(o[0].querySelector(".popover-arrow"));h.left<r?h.left=r:h.left+c+r>u&&(h.left=u-c-r),s.top+s.height+l>d?(h.top=s.top-l,o.addClass("popover-bottom")):(h.top=s.top+s.height,o.removeClass("popover-bottom")),p.css({left:s.left+s.width/2-p.prop("offsetWidth")/2-h.left+"px"}),o.css({top:h.top+"px",left:h.left+"px",marginLeft:"0",opacity:"1"})}var r=6,a={viewType:"popover",hideDelay:1,animation:"none",positionView:o};return{fromTemplate:function(t,n){return e.fromTemplate(t,ionic.Utils.extend(a,n||{}))},fromTemplateUrl:function(t,n){return e.fromTemplateUrl(t,ionic.Utils.extend(a,n||{}))}}}]);var k='<div class="popup-container" ng-class="cssClass"><div class="popup"><div class="popup-head"><h3 class="popup-title" ng-bind-html="title"></h3><h5 class="popup-sub-title" ng-bind-html="subTitle" ng-if="subTitle"></h5></div><div class="popup-body"></div><div class="popup-buttons" ng-show="buttons.length"><button ng-repeat="button in buttons" ng-click="$buttonTapped(button, $event)" class="button" ng-class="button.type || \'button-default\'" ng-bind-html="button.text"></button></div></div></div>';s.factory("$ionicPopup",["$ionicTemplateLoader","$ionicBackdrop","$q","$timeout","$rootScope","$ionicBody","$compile","$ionicPlatform",function(e,t,n,i,o,r,a,s){function l(t){t=c({scope:null,title:"",buttons:[]},t||{});var o=e.compile({template:k,scope:t.scope&&t.scope.$new(),appendTo:r.get()}),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 l=f(o.element[0].querySelector(".popup-body"));return r?(l.html(r),a(l.contents())(o.scope)):l.remove(),c(o.scope,{title:t.title,buttons:t.buttons,subTitle:t.subTitle,cssClass:t.cssClass,$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.removeClass("popup-hidden"),o.element.addClass("popup-showing active"),h(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 u(){$[0]&&$[0].responseDeferred.resolve()}function d(e){function n(e){o.then(function(t){t.removed||t.responseDeferred.resolve(e)})}var o=w._createPopup(e),a=$[0];a&&a.hide();var c=i(angular.noop,a?m.stackPushDelay:0).then(function(){return o}).then(function(e){return a||(r.addClass("popup-open"),t.retain(),w._backButtonActionDone=s.registerBackButtonAction(u,y)),$.unshift(e),e.show(),e.responseDeferred.notify({close:c.close}),e.responseDeferred.promise.then(function(n){var o=$.indexOf(e);-1!==o&&$.splice(o,1),e.remove();var a=$[0];return a?a.show():(i(function(){r.removeClass("popup-open")},400),i(function(){t.release()},m.stackPushDelay||0),(w._backButtonActionDone||angular.noop)()),n})});return c.close=n,c}function h(e){var t=e[0].querySelector("[autofocus]");t&&t.focus()}function p(e){return d(c({buttons:[{text:e.okText||"OK",type:e.okType||"button-positive",onTap:function(){return!0}}]},e||{}))}function v(e){return d(c({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 g(e){var t=o.$new(!0);t.data={};var n="";return e.template&&/<[a-z][\s\S]*>/i.test(e.template)===!1&&(n="<span>"+e.template+"</span>",delete e.template),d(c({template:n+'<input ng-model="data.response" type="'+(e.inputType||"text")+'" placeholder="'+(e.inputPlaceholder||"")+'">',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:75},$=[],w={show:d,alert:p,confirm:v,prompt:g,_createPopup:l,_popupStack:$};return w}]),s.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)}}}}]),s.service("$ionicScrollDelegate",ionic.DelegateService(["resize","scrollTop","scrollBottom","scrollTo","scrollBy","zoomTo","zoomBy","getScrollPosition","anchorScroll","getScrollView"])),s.service("$ionicSideMenuDelegate",ionic.DelegateService(["toggleLeft","toggleRight","getOpenRatio","isOpen","isOpenLeft","isOpenRight","canDragContent","edgeDragThreshold"])),s.service("$ionicSlideBoxDelegate",ionic.DelegateService(["update","slide","select","enableSlide","previous","next","stop","autoPlay","start","currentIndex","selected","slidesCount","count","loop"])),s.service("$ionicTabsDelegate",ionic.DelegateService(["select","selectedIndex"])),function(){var e=[];s.factory("$ionicTemplateCache",["$http","$templateCache","$timeout",function(t,n,i){function o(e){return"undefined"==typeof e?r():(d(e)&&(e=[e]),l(e,function(e){s.push(e)}),void(a&&r()))}function r(){if(o._runCount++,a=!0,0!==s.length){for(var e=0;4>e&&(template=s.pop());)d(template)&&t.get(template,{cache:n}),e++;s.length&&i(r,1e3)}}var a,s=e;return o._runCount=0,o}]).config(["$stateProvider","$ionicConfigProvider",function(t,n){var i=t.state;t.state=function(o,r){if("object"==typeof r){var a=r.prefetchTemplate!==!1&&e.length<n.templates.maxPrefetch();if(a&&d(r.templateUrl)&&e.push(r.templateUrl),angular.isObject(r.views))for(var s in r.views)a=r.views[s].prefetchTemplate!==!1&&e.length<n.templates.maxPrefetch(),a&&d(r.views[s].templateUrl)&&e.push(r.views[s].templateUrl)}return i.call(t,o,r)}}]).run(["$ionicTemplateCache",function(e){e()}])}(),s.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=c({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=f("<div>").html(i).contents();return n.controller&&(r=t(n.controller,c(n.locals,{$scope:a})),s.children().data("$ngControllerController",r)),n.appendTo&&f(n.appendTo).append(s),e(s)(a),{element:s,scope:a}})}return{load:a,compile:s}}]),s.factory("$ionicViewService",["$ionicHistory","$log",function(e,t){function n(e,n){t.warn("$ionicViewService"+e+" is deprecated, please use $ionicHistory"+n+" instead: http://ionicframework.com/docs/nightly/api/service/$ionicHistory/")}n("","");var i={getCurrentView:"currentView",getBackView:"backView",getForwardView:"forwardView",getCurrentStateName:"currentStateName",nextViewOptions:"nextViewOptions",clearHistory:"clearHistory"};return l(i,function(t,o){i[o]=function(){return n("."+o,"."+t),e[t].apply(this,arguments)}}),i}]),s.factory("$ionicViewSwitcher",["$timeout","$document","$q","$ionicClickBlock","$ionicConfig","$ionicNavBarDelegate",function(e,t,n,i,o,r){function a(e,t){return s(e).abstract?s(e).name:t?t.stateId||t.viewId:ionic.Utils.nextUid()}function s(e){return e&&e.$$state&&e.$$state.self||{}}function u(e,t,n,i){var r=s(e),a=v||E(t,"view-transition")||r.viewTransition||o.views.transition()||"ios",l=o.navBar.transition();return n=g||E(t,"view-direction")||r.viewDirection||n||"none",c(d(i),{transition:a,navBarTransition:"view"===l?a:l,direction:n,shouldAnimate:"none"!==a&&"none"!==n})}function d(e){return e=e||{},{viewId:e.viewId,historyId:e.historyId,stateId:e.stateId,stateName:e.stateName,stateParams:e.stateParams}}function h(e,t){return arguments.length>1?void E(e,T,t):E(e,T)}function p(e){if(e&&e.length){var t=e.scope();t&&(t.$emit("$ionicView.unloaded",e.data(k)),t.$destroy()),e.remove()}}var v,g,m="webkitTransitionEnd transitionend",$="$noCache",w="$destroyEle",b="$eleId",y="$accessed",S="$fallbackTimer",k="$viewData",T="nav-view",C="active",I="cached",B="stage",x=0;ionic.transition=ionic.transition||{},ionic.transition.isActive=!1;var V,E=ionic.DomUtil.cachedAttr,A=[],D={create:function(t,l,f,T){var V,L,P,H=++x,N={init:function(e,t){D.isTransitioning(!0),N.loadViewElements(e),N.render(e,function(){t&&t()})},loadViewElements:function(e){for(var n,i=t.getViewElements(),o=a(l,f),r=t.activeEleId(),s=0,c=i.length;c>s&&(n=i.eq(s),n.data(b)===o?n.data($)?(n.data(b,o+ionic.Utils.nextUid()),n.data(w,!0)):V=n:n.data(b)===r&&(L=n),!V||!L);s++);P=!!V,P||(V=e.ele||D.createViewEle(l),V.data(b,o)),t.activeEleId(o),e.ele=null},render:function(e,n){if(L&&ionic.Utils.disconnectScope(L.scope()),P)ionic.Utils.reconnectScope(V.scope());else{h(V,B);var i=u(l,V,e.direction,f),r=o.transitions.views[i.transition]||o.transitions.views.none;r(V,null,i.direction,!0).run(0),V.data(k,{viewId:i.viewId,historyId:i.historyId,stateName:i.stateName,stateParams:i.stateParams}),(s(l).cache===!1||"false"===s(l).cache||"false"==V.attr("cache-view")||0===o.views.maxCache())&&V.data($,!0);var a=t.appendViewElement(V,l);delete i.direction,delete i.transition,a.$emit("$ionicView.loaded",i)}V.data(y,Date.now()),n&&n()},transition:function(a,s){function p(){h(V,_.shouldAnimate?"entering":C),h(L,_.shouldAnimate?"leaving":I),_.run(1),r._instances.forEach(function(e){e.triggerTransitionStart(H)}),_.shouldAnimate||$()}function $(){$.x||($.x=!0,V.off(m,$),e.cancel(V.data(S)),L&&e.cancel(L.data(S)),N.emit("after",b,y),w.resolve(t),H===x&&(n.all(A).then(D.transitionEnd),N.cleanup(b)),r._instances.forEach(function(e){e.triggerTransitionEnd()}),v=g=f=T=V=L=null)}var w=n.defer();A.push(w.promise);var b=u(l,V,a,f),y=c(c({},b),d(T));b.transitionId=y.transitionId=H,b.fromCache=!!P,b.enableBack=!!s,E(V.parent(),"nav-view-transition",b.transition),E(V.parent(),"nav-view-direction",b.direction),e.cancel(V.data(S)),N.emit("before",b,y);var k=o.transitions.views[b.transition]||o.transitions.views.none,_=k(V,L,b.direction,b.shouldAnimate);_.shouldAnimate&&(V.on(m,$),V.data(S,e($,1e3)),i.show()),h(V,B),_.run(0),e(p,16)},emit:function(e,t,n){var i=V.scope();i&&(i.$emit("$ionicView."+e+"Enter",t),"after"==e&&i.$emit("$ionicView.enter",t)),L&&(i=L.scope(),i&&(i.$emit("$ionicView."+e+"Leave",n),"after"==e&&i.$emit("$ionicView.leave",n)))},cleanup:function(e){L&&"back"==e.direction&&!o.views.forwardCache()&&p(L);var n,i,r,a=t.getViewElements(),s=a.length,c=s-1>o.views.maxCache(),l=Date.now();for(n=0;s>n;n++)i=a.eq(n),c&&i.data(y)<l?(l=i.data(y),r=a.eq(n)):i.data(w)&&h(i)!=C&&p(i);p(r),V.data($)&&V.data(w,!0)},enteringEle:function(){return V},leavingEle:function(){return L}};return N},transitionEnd:function(e){l(e,function(e){e.transitionEnd()}),D.isTransitioning(!1),i.hide(),A=[]},nextTransition:function(e){v=e},nextDirection:function(e){g=e},isTransitioning:function(t){return arguments.length&&(ionic.transition.isActive=!!t,e.cancel(V),t&&(V=e(function(){D.isTransitioning(!1)},999))),ionic.transition.isActive},createViewEle:function(e){var n=t[0].createElement("div");return e&&e.$template&&(n.innerHTML=e.$template,1===n.children.length)?(n.children[0].classList.add("pane"),f(n.children[0])):(n.className="pane",f(n))},viewEleIsActive:function(e,t){h(e,t?C:I)},getTransitionData:u,navViewAttr:h,destroyViewEle:p};return D}]),s.config(["$provide",function(e){e.decorator("$compile",["$delegate",function(e){return e.$$addScopeInfo=function(e,t,n,i){var o=n?i?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(o,t)},e}])}]),s.config(["$provide",function(e){function t(e,t){return e.__hash=e.hash,e.hash=function(n){return angular.isDefined(n)&&t(function(){var e=document.querySelector(".scroll-content");e&&(e.scrollTop=0)},0,!1),e.__hash(n)},e}e.decorator("$location",["$delegate","$timeout",t])}]),s.controller("$ionicHeaderBar",["$scope","$element","$attrs","$q","$ionicConfig","$ionicHistory",function(e,t,n,i,o,r){function a(e){return T[e]||(T[e]=t[0].querySelector("."+e)),T[e]}var s="title",c="back-text",l="back-button",u="default-title",d="previous-title",f="hide",h=this,p="",v="",g=0,m=0,$="",w=!1,b=!0,y=!0,S=!1,k=0;h.beforeEnter=function(t){e.$broadcast("$ionicView.beforeEnter",t)},h.title=function(e){return arguments.length&&e!==p&&(a(s).innerHTML=e,p=e,k=0),p},h.enableBack=function(e,t){return arguments.length&&(w=e,t||h.updateBackButton()),w},h.showBack=function(e,t){return arguments.length&&(b=e,t||h.updateBackButton()),b},h.showNavBack=function(e){y=e,h.updateBackButton()},h.updateBackButton=function(){if((b&&y&&w)!==S){S=b&&y&&w;var e=a(l);e&&e.classList[S?"remove":"add"](f)}},h.titleTextWidth=function(){if(!k){var e=ionic.DomUtil.getTextBounds(a(s));k=Math.min(e&&e.width||30)}return k},h.titleWidth=function(){var e=h.titleTextWidth(),t=a(s).offsetWidth;return e>t&&(e=t+(g-m-5)),e},h.titleTextX=function(){return t[0].offsetWidth/2-h.titleWidth()/2},h.titleLeftRight=function(){return g-m},h.backButtonTextLeft=function(){for(var e=0,t=a(c);t;)e+=t.offsetLeft,t=t.parentElement;return e},h.resetBackButton=function(){if(o.backButton.previousTitleText()){var e=a(d);if(e){e.classList.remove(f);var t=r.backTitle();t!==v&&(v=e.innerHTML=t)}var n=a(u);n&&n.classList.remove(f)}},h.align=function(e){var i=a(s);e=e||n.alignTitle||o.navBar.alignTitle();var r=h.calcWidths(e,!1);if(b&&v&&o.backButton.previousTitleText()){var c=h.calcWidths(e,!0),l=t[0].offsetWidth-c.titleLeft-c.titleRight;h.titleTextWidth()<=l&&(r=c)}return h.updatePositions(i,r.titleLeft,r.titleRight,r.buttonsLeft,r.buttonsRight,r.css,r.showPrevTitle)},h.calcWidths=function(e,n){var i,o,r,h,p,v,g,m,$,w=a(s),y=a(l),S=t[0].childNodes,k=0,T=0,C=0,I=0,B="",x=0;for(i=0;i<S.length;i++){if(p=S[i],g=0,1==p.nodeType){if(p===w){$=!0;continue}if(p.classList.contains(f))continue;if(b&&p===y){for(o=0;o<p.childNodes.length;o++)if(h=p.childNodes[o],1==h.nodeType)if(h.classList.contains(c))for(r=0;r<h.children.length;r++)if(v=h.children[r],n){if(v.classList.contains(u))continue;x+=v.offsetWidth}else{if(v.classList.contains(d))continue;x+=v.offsetWidth}else x+=h.offsetWidth;else 3==h.nodeType&&h.nodeValue.trim()&&(m=ionic.DomUtil.getTextBounds(h),x+=m&&m.width||0);g=x||p.offsetWidth}else g=p.offsetWidth}else 3==p.nodeType&&p.nodeValue.trim()&&(m=ionic.DomUtil.getTextBounds(p),g=m&&m.width||0);$?T+=g:k+=g}if("left"==e)B="title-left",k&&(C=k+15),T&&(I=T+15);else if("right"==e)B="title-right",k&&(C=k+15),T&&(I=T+15);else{var V=Math.max(k,T)+10;V>10&&(C=I=V)}return{backButtonWidth:x,buttonsLeft:k,buttonsRight:T,titleLeft:C,titleRight:I,showPrevTitle:n,css:B}},h.updatePositions=function(e,n,r,s,c,l,p){var v=i.defer();if(e&&(n!==g&&(e.style.left=n?n+"px":"",g=n),r!==m&&(e.style.right=r?r+"px":"",m=r),l!==$&&(l&&e.classList.add(l),$&&e.classList.remove($),$=l)),o.backButton.previousTitleText()){var w=a(d),b=a(u);w&&w.classList[p?"remove":"add"](f),b&&b.classList[p?"add":"remove"](f)}return ionic.requestAnimationFrame(function(){if(e&&e.offsetWidth+10<e.scrollWidth){var n=c+5,i=t[0].offsetWidth-g-h.titleTextWidth()-20;r=n>i?n:i,r!==m&&(e.style.right=r+"px",m=r)}v.resolve()}),v.promise},h.setCss=function(e,t){ionic.DomUtil.cachedStyles(a(e),t)};var T={};e.$on("$destroy",function(){for(var e in T)T[e]=null})}]),s.service("$ionicListDelegate",ionic.DelegateService(["showReorder","showDelete","canSwipeItems","closeOptionButtons"])).controller("$ionicList",["$scope","$attrs","$ionicListDelegate","$ionicHistory",function(e,t,n,i){var o=this,r=!0,a=!1,s=!1,c=n._registerInstance(o,t.delegateHandle,function(){return i.isActiveScope(e)});e.$on("$destroy",c),o.showReorder=function(e){return arguments.length&&(a=!!e),a},o.showDelete=function(e){return arguments.length&&(s=!!e),s},o.canSwipeItems=function(e){return arguments.length&&(r=!!e),r},o.closeOptionButtons=function(){o.listView&&o.listView.clearDragEffects()}}]),s.controller("$ionicNavBar",["$scope","$element","$attrs","$compile","$timeout","$ionicNavBarDelegate","$ionicConfig","$ionicHistory",function(e,t,n,i,o,r,a,s){function c(e,t){var n=console.warn||console.log;n&&n("navBarController."+e+" is deprecated, please use "+t+" instead")}function d(e){return B[e]?f(B[e]):void 0}function h(){for(var e=0;e<I.length;e++)if(I[e].isActive)return I[e]}function p(){for(var e=0;e<I.length;e++)if(!I[e].isActive)return I[e]}function v(e,t){e&&ionic.DomUtil.cachedAttr(e.containerEle(),"nav-bar",t)}var g,m,$,w="hide",b="$ionNavBarController",y="primaryButtons",S="secondaryButtons",k="backButton",T="primaryButtons secondaryButtons leftButtons rightButtons title".split(" "),C=this,I=[],B={},x=!0;t.parent().data(b,C);var V=n.delegateHandle||"navBar"+ionic.Utils.nextUid(),E=r._registerInstance(C,V);C.init=function(){t.addClass("nav-bar-container"),ionic.DomUtil.cachedAttr(t,"nav-bar-transition",a.views.transition()),C.createHeaderBar(!1),C.createHeaderBar(!0),e.$emit("ionNavBar.init",V)},C.createHeaderBar=function(o){function r(e,t){e&&("title"===t?g.append(e):"rightButtons"==t||t==S&&"left"!=a.navBar.positionSecondaryButtons()||t==y&&"right"==a.navBar.positionPrimaryButtons()?(v||(v=f('<div class="buttons buttons-right">'),h.append(v)),t==S?v.append(e):v.prepend(e)):(p||(p=f('<div class="buttons buttons-left">'),m[k]?m[k].after(p):h.prepend(p)),t==S?p.append(e):p.prepend(e)))}var s=f('<div class="nav-bar-block">');ionic.DomUtil.cachedAttr(s,"nav-bar",o?"active":"cached");var c=n.alignTitle||a.navBar.alignTitle(),h=f("<ion-header-bar>").addClass(n.class).attr("align-title",c);u(n.noTapScroll)&&h.attr("no-tap-scroll",n.noTapScroll);var p,v,g=f('<div class="title title-'+c+'">'),m={},$={};m[k]=d(k),m[k]&&h.append(m[k]),h.append(g),l(T,function(e){m[e]=d(e),r(m[e],e)});for(var b=0;b<h[0].children.length;b++)h[0].children[b].classList.add("header-item");s.append(h),t.append(i(s)(e.$new()));var C=h.data("$ionHeaderBarController"),B={isActive:o,title:function(e){C.title(e)},setItem:function(e,t){B.removeItem(t),e?("title"===t&&B.title(""),r(e,t),m[t]&&m[t].addClass(w),$[t]=e):m[t]&&m[t].removeClass(w)},removeItem:function(e){$[e]&&($[e].scope().$destroy(),$[e].remove(),$[e]=null)},containerEle:function(){return s},headerBarEle:function(){return h},afterLeave:function(){l(T,function(e){B.removeItem(e)}),C.resetBackButton()},controller:function(){return C},destroy:function(){l(T,function(e){B.removeItem(e)}),s.scope().$destroy();for(var e in m)m[e]&&(m[e].removeData(),m[e]=null);p&&p.removeData(),v&&v.removeData(),g.removeData(),h.removeData(),s.remove(),s=h=g=p=v=null}};return I.push(B),B},C.navElement=function(e,t){return u(t)&&(B[e]=t),B[e]},C.update=function(e){var t=!e.hasHeaderBar&&e.showNavBar;e.transition=a.views.transition(),t||(e.direction="none"),C.enable(t);var n=C.isInitialized?p():h(),i=C.isInitialized?h():null,o=n.controller();o.enableBack(e.enableBack,!0),o.showBack(e.showBack,!0),o.updateBackButton(),C.title(e.title,n),C.showBar(t),e.navBarItems&&l(T,function(t){n.setItem(e.navBarItems[t],t)}),C.transition(n,i,e),C.isInitialized=!0},C.transition=function(e,n,i){var r=e.controller(),s=a.transitions.navBar[i.navBarTransition]||a.transitions.navBar.none,c=i.transitionId;r.beforeEnter(i);var l=s(e,n,i.direction,i.shouldAnimate&&C.isInitialized);ionic.DomUtil.cachedAttr(t,"nav-bar-transition",i.navBarTransition),ionic.DomUtil.cachedAttr(t,"nav-bar-direction",i.direction),l.shouldAnimate?v(e,"stage"):(v(e,"entering"),v(n,"leaving")),r.resetBackButton(),l.run(0),o(r.align,16),(g=function(){$===c&&(v(e,"entering"),v(n,"leaving"),l.run(1),m=function(){if($==c||!l.shouldAnimate){for(var t=0;t<I.length;t++)I[t].isActive=!1;e.isActive=!0,v(e,"active"),v(n,"cached"),m=null}},g=null)})()},C.triggerTransitionStart=function(e){$=e,g&&g()},C.triggerTransitionEnd=function(){m&&m()},C.showBar=function(t){return arguments.length&&(C.visibleBar(t),e.$parent.$hasHeader=!!t),!!e.$parent.$hasHeader},C.visibleBar=function(e){e&&!x?t.removeClass(w):!e&&x&&t.addClass(w),x=e},C.enable=function(e){C.visibleBar(e);for(var t=0;t<r._instances.length;t++)r._instances[t]!==C&&r._instances[t].visibleBar(!1)},C.showBackButton=function(t){for(var n=0;n<I.length;n++)I[n].controller().showNavBack(!!t);return e.$isBackButtonShown=!!t,e.$isBackButtonShown},C.showActiveBackButton=function(e){var t=h();t&&t.controller().showBack(e)},C.title=function(t,n){return u(t)&&(t=t||"",n=n||h(),n&&n.title(t),e.$title=t,s.currentTitle(t)),e.$title},C.align=function(e,t){t=t||h(),t&&t.controller().align(e)},C.changeTitle=function(e){c("changeTitle(val)","title(val)"),C.title(e)},C.setTitle=function(e){c("setTitle(val)","title(val)"),C.title(e)},C.getTitle=function(){return c("getTitle()","title()"),C.title()},C.back=function(){c("back()","$ionicHistory.goBack()"),s.goBack()},C.getPreviousTitle=function(){c("getPreviousTitle()","$ionicHistory.backTitle()"),s.goBack()},e.$on("$destroy",function(){e.$parent.$hasHeader=!1,t.parent().removeData(b);for(var n=0;n<I.length;n++)I[n].destroy();t.remove(),t=I=null,E()})}]),s.controller("$ionicNavView",["$scope","$element","$attrs","$compile","$controller","$ionicNavBarDelegate","$ionicNavViewDelegate","$ionicHistory","$ionicViewSwitcher",function(e,t,n,i,o,r,a,s,l){function u(){if(f)for(var e=0;e<r._instances.length;e++)if(r._instances[e].$$delegateHandle==f)return r._instances[e];return t.inheritedData("$ionNavBarController")}var d,f,h,p="$eleId",v="$destroyEle",g="$noCache",m="active",$="cached",w=this,b=!1,y=l.navViewAttr;w.scope=e,w.init=function(){var i=n.name||"",o=t.parent().inheritedData("$uiView"),r=o&&o.state?o.state.name:"";i.indexOf("@")<0&&(i=i+"@"+r);var s={name:i,state:null};t.data("$uiView",s);var c=a._registerInstance(w,n.delegateHandle);return e.$on("$destroy",c),e.$on("$ionicHistory.deselect",w.cacheCleanup),s},w.register=function(t){var n=c({},s.currentView()),i=s.register(e,t);w.update(i),w.render(i,t,n)},w.update=function(e){b=!0,d=e.direction;var n=t.parent().inheritedData("$ionNavViewController");n&&(n.isPrimary(!1),("enter"===d||"exit"===d)&&(n.direction(d),"enter"===d&&(d="none")))},w.render=function(e,t,n){var i=s.getViewById(e.viewId)||{},o=l.create(w,t,i,n);o.init(e,function(){o.transition(w.direction(),e.enableBack)})},w.beforeEnter=function(e){if(b){f=e.navBarDelegate;var t=u();t&&t.update(e)}},w.activeEleId=function(e){return arguments.length&&(h=e),h},w.transitionEnd=function(){var e,n,i,o=t.children();for(e=0,n=o.length;n>e;e++)i=o.eq(e),i.data(p)===h?y(i,m):("leaving"===y(i)||y(i)===m||y(i)===$)&&(i.data(v)||i.data(g)?l.destroyViewEle(i):y(i,$))},w.cacheCleanup=function(){for(var e=t.children(),n=0,i=e.length;i>n;n++)e.eq(n).data(v)&&l.destroyViewEle(e.eq(n))},w.clearCache=function(){for(var e,n,i=t.children(),o=0,r=i.length;r>o;o++)e=i.eq(o),y(e)==$?l.destroyViewEle(e):y(e)==m&&(n=e.scope(),n&&n.$broadcast("$ionicView.clearCache"))},w.getViewElements=function(){return t.children()},w.appendViewElement=function(n,r){var a=i(n);t.append(n);var s=e.$new();if(r&&r.$$controller){r.$scope=s;var c=o(r.$$controller,r);t.children().data("$ngControllerController",c)}return a(s),s},w.title=function(e){var t=u();t&&t.title(e)},w.enableBackButton=function(e){var t=u();t&&t.enableBackButton(e)},w.showBackButton=function(e){var t=u();t&&t.showActiveBackButton(e)},w.showBar=function(e){var t=u();t&&t.showBar(e)},w.isPrimary=function(e){return arguments.length&&(b=e),b},w.direction=function(e){return arguments.length&&(d=e),d}}]),s.controller("$ionicScroll",["$scope","scrollViewOptions","$timeout","$window","$location","$document","$ionicScrollDelegate","$ionicHistory",function(e,t,n,i,o,r,a,s){var c=this;c.__timeout=n,c._scrollViewOptions=t;var l=c.element=t.el,u=c.$element=f(l),d=c.scrollView=new ionic.views.Scroll(t);(u.parent().length?u.parent():u).data("$$ionicScrollController",c);var h=a._registerInstance(c,t.delegateHandle,function(){return s.isActiveScope(e)});angular.isDefined(t.bouncing)||ionic.Platform.ready(function(){d.options&&(d.options.bouncing=!0,ionic.Platform.isAndroid()&&(d.options.bouncing=!1,d.options.deceleration=.95))});var p=angular.bind(d,d.resize);ionic.on("resize",p,i);var v=function(t){var n=(t.originalEvent||t).detail||{};e.$onScroll&&e.$onScroll({event:t,scrollTop:n.scrollTop||0,scrollLeft:n.scrollLeft||0})};u.on("scroll",v),e.$on("$destroy",function(){h(),d.__cleanup(),ionic.off("resize",p,i),i.removeEventListener("resize",p),t=null,c._scrollViewOptions.el=null,c._scrollViewOptions=null,u.off("scroll",v),u=null,c.$element=null,l=null,c.element=null,c.scrollView=null,d=null}),n(function(){d&&d.run&&d.run()}),c.getScrollView=function(){return c.scrollView},c.getScrollPosition=function(){return c.scrollView.getValues()},c.resize=function(){return n(p).then(function(){u&&u.triggerHandler("scroll.resize")})},c.scrollTop=function(e){ionic.DomUtil.blurAll(),c.resize().then(function(){d.scrollTo(0,0,!!e)})},c.scrollBottom=function(e){ionic.DomUtil.blurAll(),c.resize().then(function(){var t=d.getScrollMax();d.scrollTo(t.left,t.top,!!e)})},c.scrollTo=function(e,t,n){ionic.DomUtil.blurAll(),c.resize().then(function(){d.scrollTo(e,t,!!n)})},c.zoomTo=function(e,t,n,i){ionic.DomUtil.blurAll(),c.resize().then(function(){d.zoomTo(e,!!t,n,i)})},c.zoomBy=function(e,t,n,i){ionic.DomUtil.blurAll(),c.resize().then(function(){d.zoomBy(e,!!t,n,i)})},c.scrollBy=function(e,t,n){ionic.DomUtil.blurAll(),c.resize().then(function(){d.scrollBy(e,t,!!n)})},c.anchorScroll=function(e){ionic.DomUtil.blurAll(),c.resize().then(function(){var t=o.hash(),n=t&&r[0].getElementById(t);if(!t||!n)return void d.scrollTo(0,0,!!e);var i=n,a=0,s=0,l=0;do null!==i&&(a+=i.offsetLeft),null!==i&&(s+=i.offsetTop),i=i.offsetParent,l++;while(i.attributes!=c.element.attributes&&i.offsetParent);d.scrollTo(a,s,!!e)})},c._setRefresher=function(e,t){var n=c.refresher=t,i=c.refresher.clientHeight||60;d.activatePullToRefresh(i,function(){n.classList.add("active"),e.$onPulling()},function(){n.classList.remove("active"),n.classList.remove("refreshing"),n.classList.remove("refreshing-tail")},function(){n.classList.add("refreshing"),e.$onRefresh()},function(){n.classList.remove("invisible")},function(){n.classList.add("invisible")},function(){n.classList.add("refreshing-tail")})}}]),s.controller("$ionicSideMenus",["$scope","$attrs","$ionicSideMenuDelegate","$ionicPlatform","$ionicBody","$ionicHistory",function(e,t,n,i,o,r){var a,s,c,l,u,d,f,h=this,p=!0;h.$scope=e,h.initialize=function(e){h.left=e.left,h.right=e.right,h.setContent(e.content),h.dragThresholdX=e.dragThresholdX||10,r.registerHistory(h.$scope)},h.setContent=function(e){e&&(h.content=e,h.content.onDrag=function(e){h._handleDrag(e)},h.content.endDrag=function(e){h._endDrag(e)})},h.isOpenLeft=function(){return h.getOpenAmount()>0},h.isOpenRight=function(){return h.getOpenAmount()<0},h.toggleLeft=function(e){if(!f&&h.left.isEnabled){var t=h.getOpenAmount();0===arguments.length&&(e=0>=t),h.content.enableAnimation(),h.openPercentage(e?100:0)}},h.toggleRight=function(e){if(!f&&h.right.isEnabled){var t=h.getOpenAmount();0===arguments.length&&(e=t>=0),h.content.enableAnimation(),h.openPercentage(e?-100:0)}},h.toggle=function(e){"right"==e?h.toggleRight():h.toggleLeft()},h.close=function(){h.openPercentage(0)},h.getOpenAmount=function(){return h.content&&h.content.getTranslateX()||0},h.getOpenRatio=function(){var e=h.getOpenAmount();return e>=0?e/h.left.width:e/h.right.width},h.isOpen=function(){return 0!==h.getOpenAmount()},h.getOpenPercentage=function(){return 100*h.getOpenRatio()},h.openPercentage=function(e){var t=e/100;if(h.left&&e>=0)h.openAmount(h.left.width*t);else if(h.right&&0>e){{h.right.width}h.openAmount(h.right.width*t)}o.enableClass(0!==e,"menu-open")},h.openAmount=function(e){var t=h.left&&h.left.width||0,n=h.right&&h.right.width||0;return(h.left&&h.left.isEnabled||!(e>0))&&(h.right&&h.right.isEnabled||!(0>e))?s&&e>t?void h.content.setTranslateX(t):a&&-n>e?void h.content.setTranslateX(-n):(h.content.setTranslateX(e),void(e>=0?(s=!0,a=!1,e>0&&(h.right&&h.right.pushDown&&h.right.pushDown(),h.left&&h.left.bringUp&&h.left.bringUp())):(a=!0,s=!1,h.right&&h.right.bringUp&&h.right.bringUp(),h.left&&h.left.pushDown&&h.left.pushDown()))):void h.content.setTranslateX(0)},h.snapToRest=function(e){h.content.enableAnimation(),c=!1;var t=h.getOpenRatio();if(0===t)return void h.openPercentage(0);var n=.3,i=e.gesture.velocityX,o=e.gesture.direction;h.openPercentage(t>0&&.5>t&&"right"==o&&n>i?0:t>.5&&"left"==o&&n>i?100:0>t&&t>-.5&&"left"==o&&n>i?0:.5>t&&"right"==o&&n>i?-100:"right"==o&&t>=0&&(t>=.5||i>n)?100:"left"==o&&0>=t&&(-.5>=t||i>n)?-100:0)},h.enableMenuWithBackViews=function(e){return arguments.length&&(p=!!e),p},h.isAsideExposed=function(){return!!f},h.exposeAside=function(e){(h.left&&h.left.isEnabled||h.right&&h.right.isEnabled)&&(h.close(),f=e,h.left&&h.left.isEnabled?h.content.setMarginLeft(f?h.left.width:0):h.right&&h.right.isEnabled&&h.content.setMarginRight(f?h.right.width:0),h.$scope.$emit("$ionicExposeAside",f))},h.activeAsideResizing=function(e){o.enableClass(e,"aside-resizing")},h._endDrag=function(e){f||(c&&h.snapToRest(e),l=null,u=null,d=null)},h._handleDrag=function(e){f||(l?u=e.gesture.touches[0].pageX:(l=e.gesture.touches[0].pageX,u=l),!c&&Math.abs(u-l)>h.dragThresholdX&&(l=u,c=!0,h.content.disableAnimation(),d=h.getOpenAmount()),c&&h.openAmount(d+(u-l)))},h.canDragContent=function(t){return arguments.length&&(e.dragContent=!!t),e.dragContent},h.edgeThreshold=25,h.edgeThresholdEnabled=!1,h.edgeDragThreshold=function(e){return arguments.length&&(angular.isNumber(e)&&e>0?(h.edgeThreshold=e,h.edgeThresholdEnabled=!0):h.edgeThresholdEnabled=!!e),h.edgeThresholdEnabled},h.isDraggableTarget=function(t){var n=h.edgeThresholdEnabled&&!h.isOpen(),i=t.gesture.startEvent&&t.gesture.startEvent.center&&t.gesture.startEvent.center.pageX,o=!n||i<=h.edgeThreshold||i>=h.content.element.offsetWidth-h.edgeThreshold,a=r.backView(),s=p?!0:!a;if(!s){var c=r.currentView()||{};return a.historyId!==c.historyId}return(e.dragContent||h.isOpen())&&o&&!t.gesture.srcEvent.defaultPrevented&&s&&!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-scroll"))},e.sideMenuContentTranslateX=0;var v=angular.noop,g=angular.bind(h,h.close);e.$watch(function(){return 0!==h.getOpenAmount()},function(e){v(),e&&(v=i.registerBackButtonAction(g,$))});var m=n._registerInstance(h,t.delegateHandle,function(){return r.isActiveScope(e)});e.$on("$destroy",function(){m(),v(),h.$scope=null,h.content&&(h.content.element=null,h.content=null)
}),h.initialize({left:{width:275},right:{width:275}})}]),s.controller("$ionicTab",["$scope","$ionicHistory","$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()}}]),s.controller("$ionicTabs",["$scope","$element","$ionicHistory",function(e,t,n){var i,o=this,r=null;o.tabs=[],o.selectedIndex=function(){return o.tabs.indexOf(r)},o.selectedTab=function(){return r},o.add=function(e){n.registerHistory(e),o.tabs.push(e)},o.remove=function(e){var t=o.tabs.indexOf(e);if(-1!==t){if(e.$tabSelected)if(o.deselect(e),1===o.tabs.length);else{var n=t===o.tabs.length-1?t-1:t+1;o.select(o.tabs[n])}o.tabs.splice(t,1)}},o.deselect=function(e){e.$tabSelected&&(r=i=null,e.$tabSelected=!1,(e.onDeselect||angular.noop)(),e.$broadcast&&e.$broadcast("$ionicHistory.deselect"))},o.select=function(t,a){var s;if(angular.isNumber(t)){if(s=t,s>=o.tabs.length)return;t=o.tabs[s]}else s=o.tabs.indexOf(t);1===arguments.length&&(a=!(!t.navViewName&&!t.uiSref)),r&&r.$historyId==t.$historyId?a&&n.goToHistoryRoot(t.$historyId):i!==s&&(l(o.tabs,function(e){o.deselect(e)}),r=t,i=s,o.$scope&&o.$scope.$parent&&(o.$scope.$parent.$activeHistoryId=t.$historyId),t.$tabSelected=!0,(t.onSelect||angular.noop)(),a&&e.$emit("$ionicHistory.change",{type:"tab",tabIndex:s,historyId:t.$historyId,navViewName:t.navViewName,hasNavView:!!t.navViewName,title:t.title,url:t.href,uiSref:t.uiSref}))},o.hasActiveScope=function(){for(var e=0;e<o.tabs.length;e++)if(n.isActiveScope(o.tabs[e]))return!0;return!1}}]),s.controller("$ionicView",["$scope","$element","$attrs","$compile","$rootScope","$ionicViewSwitcher",function(e,t,n,i,o){function r(){var t=u(n.viewTitle)&&"viewTitle"||u(n.title)&&"title";t&&(a(n[t]),m.push(n.$observe(t,a))),u(n.hideBackButton)&&m.push(e.$watch(n.hideBackButton,function(e){d.showBackButton(!e)})),u(n.hideNavBar)&&m.push(e.$watch(n.hideNavBar,function(e){d.showBar(!e)}))}function a(e){u(e)&&e!==p&&(p=e,d.title(p))}function s(){for(var e=0;e<m.length;e++)m[e]();m=[]}function c(t){return t?i(t)(e.$new()):void 0}function l(t){return!!e.$eval(n[t])}var d,f,h,p,v=this,g={},m=[],$=e.$on("ionNavBar.init",function(e,t){e.stopPropagation(),f=t});v.init=function(){$();var n=t.inheritedData("$ionModalController");d=t.inheritedData("$ionNavViewController"),d&&!n&&(e.$on("$ionicView.beforeEnter",v.beforeEnter),e.$on("$ionicView.afterEnter",r),e.$on("$ionicView.beforeLeave",s))},v.beforeEnter=function(t,i){if(i&&!i.viewNotified){i.viewNotified=!0,o.$$phase||e.$digest(),p=u(n.viewTitle)?n.viewTitle:n.title;var r={};for(var a in g)r[a]=c(g[a]);d.beforeEnter({title:p,direction:i.direction,transition:i.transition,navBarTransition:i.navBarTransition,transitionId:i.transitionId,shouldAnimate:i.shouldAnimate,enableBack:i.enableBack,showBack:!l("hideBackButton"),navBarItems:r,navBarDelegate:f||null,showNavBar:!l("hideNavBar"),hasHeaderBar:!!h}),s()}},v.navElement=function(e,t){g[e]=t}}]),s.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:'<div class="action-sheet-backdrop"><div class="action-sheet-wrapper"><div class="action-sheet"><div class="action-sheet-group"><div class="action-sheet-title" ng-if="titleText" ng-bind-html="titleText"></div><button class="button" ng-click="buttonClicked($index)" ng-repeat="button in buttons" ng-bind-html="button.text"></button></div><div class="action-sheet-group" ng-if="destructiveText"><button class="button destructive" ng-click="destructiveButtonClicked()" ng-bind-html="destructiveText"></button></div><div class="action-sheet-group" ng-if="cancelText"><button class="button" ng-click="cancel()" ng-bind-html="cancelText"></button></div></div></div></div>'}}]),s.directive("ionCheckbox",["$ionicConfig",function(e){return{restrict:"E",replace:!0,require:"?ngModel",transclude:!0,template:'<label class="item item-checkbox"><div class="checkbox checkbox-input-hidden disable-pointer-events"><input type="checkbox"><i class="checkbox-icon"></i></div><div class="item-content disable-pointer-events" ng-transclude></div></label>',compile:function(t,n){var i=t.find("input");l({name:n.name,"ng-value":n.ngValue,"ng-model":n.ngModel,"ng-checked":n.ngChecked,"ng-disabled":n.ngDisabled,"ng-true-value":n.ngTrueValue,"ng-false-value":n.ngFalseValue,"ng-change":n.ngChange},function(e,t){u(e)&&i.attr(t,e)});var o=t[0].querySelector(".checkbox");o.classList.add("checkbox-"+e.form.checkbox())}}}]);var T="Cannot create a collection-repeat within a scrollView that is scrollable on both x and y axis. Choose either x direction or y direction.",C="collection-repeat expected attribute collection-item-height to be a an expression that returns a number (in pixels) or percentage.",I="collection-repeat expected attribute collection-item-width to be a an expression that returns a number (in pixels) or percentage.",B="collection-repeat expected expression in form of '_item_ in _collection_[ track by _id_]' but got '%'";s.directive("collectionRepeat",["$collectionRepeatManager","$collectionDataSource","$parse",function(e,t,n){return{priority:1e3,transclude:"element",terminal:!0,$$tlb:!0,require:["^$ionicScroll","^?ionNavView"],controller:[function(){}],link:function(i,o,r,a,s){function c(e){var t=[],n=[],i=!0;l(H.children,function(e){if(ionic.DomUtil.elementIsDescendant(o[0],e,H))i=!1;else{if(e.hasAttribute("collection-repeat-ignore"))return;var r=e.offsetWidth,a=e.offsetHeight;if(r&&a){var s=f(e);(i?t:n).push({width:e.offsetWidth,height:e.offsetHeight,element:s,scope:s.isolateScope()||s.scope(),isOutside:!0})}}}),m.resize(),A.setData(e,t,n),D.resize()}function u(){c(L(i)),P=!H.clientWidth&&!H.clientHeight}function h(){P&&u()}var p=a[0],v=a[1],g=f('<div style="position:relative;">');o.parent()[0].insertBefore(g[0],o[0]),g.append(o);var m=p.scrollView;if(m.options.scrollingX&&m.options.scrollingY)throw new Error(T);var $=!!m.options.scrollingY;if($&&!r.collectionItemHeight)throw new Error(C);if(!$&&!r.collectionItemWidth)throw new Error(I);var w=n(r.collectionItemHeight||'"100%"'),b=n(r.collectionItemWidth||'"100%"'),y=function(e,t){var n=w(e,t);return d(n)&&n.indexOf("%")>-1?Math.floor(parseInt(n)/100*m.__clientHeight):parseInt(n)},S=function(e,t){var n=b(e,t);return d(n)&&n.indexOf("%")>-1?Math.floor(parseInt(n)/100*m.__clientWidth):parseInt(n)},k=r.collectionRepeat.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!k)throw new Error(B.replace("%",r.collectionRepeat));var x=k[1],V=k[2],E=k[3],A=new t({scope:i,transcludeFn:s,transcludeParent:o.parent(),keyExpr:x,listExpr:V,trackByExpr:E,heightGetter:y,widthGetter:S}),D=new e({dataSource:A,element:p.$element,scrollView:p.scrollView}),L=n(V);i.$watchCollection(L,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 P,H=p.scrollView.__content;p.$element.on("scroll.resize",u),ionic.on("resize",u,window);var N;v&&(N=v.scope.$on("$ionicView.afterEnter",h)),i.$on("$destroy",function(){D.destroy(),A.destroy(),ionic.off("resize",u,window),(N||angular.noop)()})}}}]).directive({ngSrc:e("ngSrc","src"),ngSrcset:e("ngSrcset","srcset"),ngHref:e("ngHref","href")}),s.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;if(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);else if("true"===i.overflowScroll)o.addClass("overflow-scroll");else{var c={el:o[0],delegateHandle:i.delegateHandle,locking:"true"===(i.locking||"true"),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})}};t("$ionicScroll",{$scope:e,scrollViewOptions:c}),e.$on("$destroy",function(){c.scrollingComplete=angular.noop,delete c.el,r=null,o=null,i.$$element=null})}}var r;return e.addClass("scroll-content ionic-scroll"),"false"!=i.scroll?(r=f('<div class="scroll"></div>'),r.append(e.contents()),e.append(r)):e.addClass("scroll-content-false"),{pre:o}}}}]),s.directive("exposeAsideWhen",["$window",function(e){return{restrict:"A",require:"^ionSideMenus",link:function(t,n,i,o){function r(){var t="large"==i.exposeAsideWhen?"(min-width:768px)":i.exposeAsideWhen;o.exposeAside(e.matchMedia(t).matches),o.activeAsideResizing(!1)}function a(){o.activeAsideResizing(!0),s()}var s=ionic.debounce(function(){t.$apply(function(){r()})},300,!1);r(),ionic.on("resize",a,e),t.$on("$destroy",function(){ionic.off("resize",a,e)})}}}]);var x="onHold onTap onTouch onRelease onDrag onDragUp onDragRight onDragDown onDragLeft onSwipe onSwipeUp onSwipeRight onSwipeDown onSwipeLeft".split(" ");x.forEach(function(e){s.directive(e,t(e))}),s.directive("ionHeaderBar",n()).directive("ionHeaderBar",i(!0)).directive("ionFooterBar",i(!1)),s.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:'<i class="icon {{icon()}} icon-refreshing"></i>',scope:{load:"&onInfinite"},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.load()},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&&a.$element&&a.$element.off("scroll",d)});var d=ionic.animationFrameThrottle(r);e(d,0,!1),a.$element.on("scroll",d)}}}]);var V='<a class="item-content" ng-href="{{$href()}}" target="{{$target()}}"></a>',E='<div class="item-content"></div>';s.directive("ionItem",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=f(n?V:E);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='<div class="item-left-edit item-delete enable-pointer-events"></div>';s.directive("ionDeleteButton",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=f(A);a.append(t),o.$element.append(a).addClass("item-left-editable"),r&&r.showDelete()&&a.addClass("visible active")}}}}),s.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 D='<div class="item-options invisible"></div>';s.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=f(D),o.$element.append(o.optionsContainer)),o.optionsContainer.append(n),o.$element.addClass("item-right-editable"),n.on("click",e)}}}}]);var L='<div data-prevent-scroll="true" class="item-right-edit item-reorder enable-pointer-events"></div>';s.directive("ionReorderButton",["$parse",function(e){return{restrict:"E",require:["^ionItem","^?ionList"],priority:Number.MAX_VALUE,compile:function(t,n){return n.$set("class",(n["class"]||"")+" button icon button-icon",!0),t[0].setAttribute("data-prevent-scroll",!0),function(t,n,i,o){var r=o[0],a=o[1],s=e(i.onReorder);t.$onReorder=function(e,n){s(t,{$fromIndex:e,$toIndex:n})},i.ngClick||i.onClick||i.onclick||(n[0].onclick=function(e){return e.stopPropagation(),!1});var c=f(L);c.append(n),r.$element.append(c).addClass("item-right-editable"),a&&a.showReorder()&&c.addClass("visible active")}}}}]),s.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"),r=t.controller("$ionicScroll"),r&&(r.scrollView.__container.style.bottom=n+o(t[0])+"px")}}function i(){(!ionic.Platform.isAndroid()||ionic.Platform.isFullScreen)&&(t.css("bottom",""),r&&(r.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 r;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)})}}),s.directive("ionList",["$timeout",function(e){return{restrict:"E",require:["ionList","^?$ionicScroll"],controller:"$ionicList",compile:function(t,n){var i=f('<div class="list">').append(t.contents()).addClass(n.type);return t.append(i),function(t,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("visible")})}var r=s.listView=new ionic.views.ListView({el:i[0],listEl:i.children()[0],scrollEl:c&&c.element,scrollView:c&&c.scrollView,onReorder:function(t,n,i){var o=f(t).scope();o&&o.$onReorder&&e(function(){o.$onReorder(n,i)})},canSwipe:function(){return s.canSwipeItems()}});t.$on("$destroy",function(){r&&(r.deregister&&r.deregister(),r=null)}),u(n.canSwipe)&&t.$watch("!!("+n.canSwipe+")",function(e){s.canSwipeItems(e)}),u(n.showDelete)&&t.$watch("!!("+n.showDelete+")",function(e){s.showDelete(e)}),u(n.showReorder)&&t.$watch("!!("+n.showReorder+")",function(e){s.showReorder(e)}),t.$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=f(i[0].getElementsByClassName("item-delete"));o(n,s.showDelete)}}),t.$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=f(i[0].getElementsByClassName("item-reorder"));o(n,s.showReorder)}})}var s=r[0],c=r[1];e(a)}}}}]),s.directive("menuClose",["$ionicHistory",function(e){return{restrict:"AC",link:function(t,n){n.bind("click",function(){var t=n.inheritedData("$ionSideMenusController");t&&(e.nextViewOptions({historyRoot:!0,disableAnimate:!0,expire:300}),t.close())})}}}]),s.directive("menuToggle",function(){return{restrict:"AC",link:function(e,t,n){e.$on("$ionicView.beforeEnter",function(e,n){if(n.enableBack){var i=t.inheritedData("$ionSideMenusController");i.enableMenuWithBackViews()||t.addClass("hide")}else t.removeClass("hide")}),t.bind("click",function(){var e=t.inheritedData("$ionSideMenusController");e&&e.toggle(n.menuToggle)})}}}),s.directive("ionModal",[function(){return{restrict:"E",transclude:!0,replace:!0,controller:[function(){}],template:'<div class="modal-backdrop"><div class="modal-wrapper" ng-transclude></div></div>'}}]),s.directive("ionModalView",function(){return{restrict:"E",compile:function(e){e.addClass("modal")}}}),s.directive("ionNavBackButton",["$ionicConfig","$document",function(e,t){return{restrict:"E",require:"^ionNavBar",compile:function(n,i){function o(e){return/ion-|icon/.test(e.className)}var r=t[0].createElement("button");for(var a in i.$attr)r.setAttribute(i.$attr[a],i[a]);i.ngClick||r.setAttribute("ng-click","$ionicGoBack($event)"),r.className="button back-button hide buttons "+(n.attr("class")||""),r.innerHTML=n.html()||"";for(var s,c,l,u,d=o(n[0]),f=0;f<n[0].childNodes.length;f++)s=n[0].childNodes[f],1===s.nodeType?o(s)?d=!0:s.classList.contains("default-title")?l=!0:s.classList.contains("previous-title")&&(u=!0):c||3!==s.nodeType||(c=!!s.nodeValue.trim());var h=e.backButton.icon();if(!d&&h&&"none"!==h&&(r.innerHTML='<i class="icon '+h+'"></i> '+r.innerHTML,r.className+=" button-clear"),!c){var p=t[0].createElement("span");p.className="back-text",!l&&e.backButton.text()&&(p.innerHTML+='<span class="default-title">'+e.backButton.text()+"</span>"),!u&&e.backButton.previousTitleText()&&(p.innerHTML+='<span class="previous-title"></span>'),r.appendChild(p)}return n.attr("class","hide"),n.empty(),{pre:function(e,t,n,i){i.navElement("backButton",r.outerHTML),r=null}}}}}]),s.directive("ionNavBar",function(){return{restrict:"E",controller:"$ionicNavBar",scope:!0,link:function(e,t,n,i){i.init()}}}),s.directive("ionNavButtons",["$document",function(e){return{require:"^ionNavBar",restrict:"E",compile:function(t,n){var i="left";/^primary|secondary|right$/i.test(n.side||"")&&(i=n.side.toLowerCase());var o=e[0].createElement("span");o.className=i+"-buttons",o.innerHTML=t.html();var r=i+"Buttons";return t.attr("class","hide"),t.empty(),{pre:function(e,t,n,i){var a=t.parent().data("$ionViewController");a?a.navElement(r,o.outerHTML):i.navElement(r,o.outerHTML),o=null}}}}}]),s.directive("navDirection",["$ionicViewSwitcher",function(e){return{restrict:"A",priority:1e3,link:function(t,n,i){n.bind("click",function(){e.nextDirection(i.navDirection)})}}}]),s.directive("ionNavTitle",["$document",function(e){return{require:"^ionNavBar",restrict:"E",compile:function(t,n){var i="title",o=e[0].createElement("span");for(var r in n.$attr)o.setAttribute(n.$attr[r],n[r]);return o.classList.add("nav-bar-title"),o.innerHTML=t.html(),t.attr("class","hide"),t.empty(),{pre:function(e,t,n,r){var a=t.parent().data("$ionViewController");a?a.navElement(i,o.outerHTML):r.navElement(i,o.outerHTML),o=null}}}}}]),s.directive("navTransition",["$ionicViewSwitcher",function(e){return{restrict:"A",priority:1e3,link:function(t,n,i){n.bind("click",function(){e.nextTransition(i.navTransition)})}}}]),s.directive("ionNavView",["$state","$ionicConfig",function(e,t){return{restrict:"E",terminal:!0,priority:2e3,transclude:!0,controller:"$ionicNavView",compile:function(n,i,o){return n.addClass("view-container"),ionic.DomUtil.cachedAttr(n,"nav-view-transition",t.views.transition()),function(t,n,i,r){function a(t){var n=e.$current&&e.$current.locals[c.name];n&&(t||n!==s)&&(s=n,c.state=n.$$state,r.register(n))}var s;o(t,function(e){n.append(e)});var c=r.init();t.$on("$stateChangeSuccess",function(){a(!1)}),t.$on("$viewContentLoading",function(){a(!1)}),a(!0)}}}}]),s.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,r)}}}),s.directive("ionPane",function(){return{restrict:"E",link:function(e,t){t.addClass("pane")}}}),s.directive("ionPopover",[function(){return{restrict:"E",transclude:!0,replace:!0,controller:[function(){}],template:'<div class="popover-backdrop"><div class="popover-wrapper" ng-transclude></div></div>'}}]),s.directive("ionPopoverView",function(){return{restrict:"E",compile:function(e){e.append(angular.element('<div class="popover-arrow"></div>')),e.addClass("popover")}}}),s.directive("ionRadio",function(){return{restrict:"E",replace:!0,require:"?ngModel",transclude:!0,template:'<label class="item item-radio"><input type="radio" name="radio-group"><div class="item-content disable-pointer-events" ng-transclude></div><i class="radio-icon disable-pointer-events icon ion-checkmark"></i></label>',compile:function(e,t){t.icon&&e.children().eq(2).removeClass("ion-checkmark").addClass(t.icon);var n=e.find("input");return l({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){u(e)&&n.attr(t,e)}),function(e,t,n){e.getValue=function(){return e.ngValue||n.value}}}}}),s.directive("ionRefresher",["$ionicBind",function(e){return{restrict:"E",replace:!0,require:"^$ionicScroll",template:'<div class="scroll-refresher" collection-repeat-ignore><div class="ionic-refresher-content" ng-class="{\'ionic-refresher-with-text\': pullingText || refreshingText}"><div class="icon-pulling" ng-class="{\'pulling-rotation-disabled\':disablePullingRotation}"><i class="icon {{pullingIcon}}"></i></div><div class="text-pulling" ng-bind-html="pullingText"></div><div class="icon-refreshing"><i class="icon {{refreshingIcon}}"></i></div><div class="text-refreshing" ng-bind-html="refreshingText"></div></div></div>',compile:function(t,n){return angular.isUndefined(n.pullingIcon)&&n.$set("pullingIcon","ion-ios7-arrow-down"),angular.isUndefined(n.refreshingIcon)&&n.$set("refreshingIcon","ion-loading-d"),function(t,n,i,o){e(t,i,{pullingIcon:"@",pullingText:"@",refreshingIcon:"@",refreshingText:"@",disablePullingRotation:"@",$onRefresh:"&onRefresh",$onPulling:"&onPulling"}),o._setRefresher(t,n[0]),t.$on("scroll.refreshComplete",function(){t.$evalAsync(function(){o.scrollView.finishPullToRefresh()})})}}}}]),s.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,locking:"true"===(r.locking||"true"),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,preventDefault:!0};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=f('<div class="scroll"></div>');return o.append(e.contents()),e.append(o),{pre:i}}}}]),s.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,n,i,o){e.side=i.side||"left";var r=o[e.side]=new ionic.views.SideMenu({width:t.width,el:n[0],isEnabled:!0});e.$watch(i.width,function(e){var t=+e;t&&t==e&&r.setWidth(+e)}),e.$watch(i.isEnabled,function(e){r.setIsEnabled(!!e)})}}}}),s.directive("ionSideMenuContent",["$timeout","$ionicGesture","$window",function(e,t,n){return{restrict:"EA",require:"^ionSideMenus",scope:!0,compile:function(i,o){function r(r,a,s,c){function l(e){0!==c.getOpenAmount()?(c.close(),e.gesture.srcEvent.preventDefault(),v=null,g=null):v||(v=ionic.tap.pointerCoord(e.gesture.srcEvent))}function d(e){c.isDraggableTarget(e)&&"x"==p(e)&&(c._handleDrag(e),e.gesture.srcEvent.preventDefault())}function f(e){"x"==p(e)&&e.gesture.srcEvent.preventDefault()}function h(e){c._endDrag(e),v=null,g=null}function p(e){if(g)return g;if(e&&e.gesture){if(v){var t=ionic.tap.pointerCoord(e.gesture.srcEvent),n=Math.abs(t.x-v.x),i=Math.abs(t.y-v.y),o=i>n?"y":"x";return Math.max(n,i)>30&&(g=o),o}v=ionic.tap.pointerCoord(e.gesture.srcEvent)}return"y"}var v=null,g=null;u(o.dragContent)?r.$watch(o.dragContent,function(e){c.canDragContent(e)}):c.canDragContent(!0),u(o.edgeDragThreshold)&&r.$watch(o.edgeDragThreshold,function(e){c.edgeDragThreshold(e)});var m={element:i[0],onDrag:function(){},endDrag:function(){},getTranslateX:function(){return r.sideMenuContentTranslateX||0},setTranslateX:ionic.animationFrameThrottle(function(t){var n=m.offsetX+t;a[0].style[ionic.CSS.TRANSFORM]="translate3d("+n+"px,0,0)",e(function(){r.sideMenuContentTranslateX=t})}),setMarginLeft:ionic.animationFrameThrottle(function(e){e?(e=parseInt(e,10),a[0].style[ionic.CSS.TRANSFORM]="translate3d("+e+"px,0,0)",a[0].style.width=n.innerWidth-e+"px",m.offsetX=e):(a[0].style[ionic.CSS.TRANSFORM]="translate3d(0,0,0)",a[0].style.width="",m.offsetX=0)}),setMarginRight:ionic.animationFrameThrottle(function(e){e?(e=parseInt(e,10),a[0].style.width=n.innerWidth-e+"px",m.offsetX=e):(a[0].style.width="",m.offsetX=0),a[0].style[ionic.CSS.TRANSFORM]="translate3d(0,0,0)"}),enableAnimation:function(){r.animationEnabled=!0,a[0].classList.add("menu-animated")},disableAnimation:function(){r.animationEnabled=!1,a[0].classList.remove("menu-animated")},offsetX:0};c.setContent(m);var $={stop_browser_behavior:!1},w=t.on("tap",l,a,$),b=t.on("dragright",d,a,$),y=t.on("dragleft",d,a,$),S=t.on("dragup",f,a,$),k=t.on("dragdown",f,a,$),T=t.on("release",h,a,$);r.$on("$destroy",function(){m&&(m.element=null,m=null),t.off(y,"dragleft",d),t.off(b,"dragright",d),t.off(S,"dragup",f),t.off(k,"dragdown",f),t.off(T,"release",h),t.off(w,"tap",l)})}return i.addClass("menu-content pane"),{pre:r}}}}]),s.directive("ionSideMenus",["$ionicBody",function(e){return{restrict:"ECA",controller:"$ionicSideMenus",compile:function(t,n){function i(t,n,i,o){o.enableMenuWithBackViews(t.$eval(i.enableMenuWithBackViews)),t.$on("$ionicExposeAside",function(n,i){t.$exposeAside||(t.$exposeAside={}),t.$exposeAside.active=i,e.enableClass(i,"aside-open")}),t.$on("$ionicView.beforeEnter",function(e,n){n.historyId&&(t.$activeHistoryId=n.historyId)}),t.$on("$destroy",function(){e.removeClass("menu-open","aside-open")})}return n.$set("class",(n["class"]||"")+" view"),{pre:i}}}}]),s.directive("ionSlideBox",["$timeout","$compile","$ionicSlideBoxDelegate","$ionicHistory",function(e,t,n,i){return{restrict:"E",replace:!0,transclude:!0,scope:{autoPlay:"=",doesContinue:"@",slideInterval:"@",showPager:"@",pagerClick:"&",disableScroll:"@",onSlideChanged:"&",activeSlide:"=?"},controller:["$scope","$element","$attrs",function(t,o,r){var a=t.$eval(t.doesContinue)===!0,s=u(r.autoPlay)?!!t.autoPlay:!1,c=s?t.$eval(t.slideInterval)||4e3:0,l=new ionic.views.Slider({el:o[0],auto:c,continuous:a,startSlide:t.activeSlide,slidesChanged:function(){t.currentSlide=l.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(){})}});l.enableSlide(t.$eval(r.disableScroll)!==!0),t.$watch("activeSlide",function(e){angular.isDefined(e)&&l.slide(e)}),t.$on("slideBox.nextSlide",function(){l.next()}),t.$on("slideBox.prevSlide",function(){l.prev()}),t.$on("slideBox.setSlide",function(e,t){l.slide(t)}),this.__slider=l;var d=n._registerInstance(l,r.delegateHandle,function(){return i.isActiveScope(t)});t.$on("$destroy",d),this.slidesCount=function(){return l.slidesCount()},this.onPagerClick=function(e){t.pagerClick({index:e})},e(function(){l.load()})}],template:'<div class="slider"><div class="slider-slides" ng-transclude></div></div>',link:function(e,n){if(e.$eval(e.showPager)!==!1){var i=e.$new(),o=f("<ion-pager></ion-pager>");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:'<div class="slider-pager"><span class="slider-pager-page" ng-repeat="slide in numSlides() track by $index" ng-class="{active: $index == currentSlide}" ng-click="pagerClick($index)"><i class="icon ion-record"></i></span></div>',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)})}}}),s.directive("ionTab",["$compile","$ionicConfig","$ionicBind","$ionicViewSwitcher",function(e,t,n,i){function o(e,t){return angular.isDefined(t)?" "+e+'="'+t+'"':""}return{restrict:"E",require:["^ionTabs","ionTab"],controller:"$ionicTab",scope:!0,compile:function(r,a){for(var s="<ion-tab-nav"+o("ng-click",a.ngClick)+o("title",a.title)+o("icon",a.icon)+o("icon-on",a.iconOn)+o("icon-off",a.iconOff)+o("badge",a.badge)+o("badge-style",a.badgeStyle)+o("hidden",a.hidden)+o("class",a["class"])+"></ion-tab-nav>",c=document.createElement("div"),l=0;l<r[0].children.length;l++)c.appendChild(r[0].children[l].cloneNode(!0));var u=c.childElementCount;r.empty();var d,h;return u&&("ION-NAV-VIEW"===c.children[0].tagName&&(d=c.children[0].getAttribute("name"),c.children[0].classList.add("view-container"),h=!0),1===u&&(c=c.children[0]),h||c.classList.add("pane"),c.classList.add("tab-content")),function(o,r,a,l){function h(){w.tabMatchesState()&&$.select(o,!1)}function p(n){n&&u?(b||(g=o.$new(),m=f(c),i.viewEleIsActive(m,!0),$.$element.append(m),e(m)(g),b=!0),i.viewEleIsActive(m,!0)):b&&m&&(t.views.maxCache()>0?i.viewEleIsActive(m,!1):v())}function v(){g&&g.$destroy(),b&&m&&m.remove(),b=g=m=null}var g,m,$=l[0],w=l[1],b=!1;n(o,a,{onSelect:"&",onDeselect:"&",title:"@",uiSref:"@",href:"@"}),$.add(o),o.$on("$destroy",function(){o.$tabsDestroy||$.remove(o),y.isolateScope().$destroy(),y.remove(),y=c=m=null
}),r[0].removeAttribute("title"),d&&(w.navViewName=o.navViewName=d),o.$on("$stateChangeSuccess",h),h();var y=f(s);y.data("$ionTabsController",$),y.data("$ionTabController",w),$.$tabsElement.append(e(y)(o)),o.$watch("$tabSelected",p),o.$on("$ionicView.afterEnter",function(){i.viewEleIsActive(m,o.$tabSelected)}),o.$on("$ionicView.clearCache",function(){o.$tabSelected||v()})}}}}]),s.directive("ionTabNav",[function(){return{restrict:"E",replace:!0,require:["^ionTabs","^ionTab"],template:'<a ng-class="{\'tab-item-active\': isTabActive(), \'has-badge\':badge, \'tab-hidden\':isHidden()}" class="tab-item"><span class="badge {{badgeStyle}}" ng-if="badge">{{badge}}</span><i class="icon {{getIconOn()}}" ng-if="getIconOn() && isTabActive()"></i><i class="icon {{getIconOff()}}" ng-if="getIconOff() && !isTabActive()"></i><span class="tab-title" ng-bind-html="title"></span></a>',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}}}}}]),s.directive("ionTabs",["$ionicTabsDelegate","$ionicConfig","$ionicHistory",function(e,t){return{restrict:"E",scope:!0,controller:"$ionicTabs",compile:function(n){function i(t,n,i,o){var a=e._registerInstance(o,i.delegateHandle,o.hasActiveScope);o.$scope=t,o.$element=n,o.$tabsElement=f(n[0].querySelector(".tabs")),t.$watch(function(){return n[0].className},function(e){var n=-1!==e.indexOf("tabs-top"),i=-1!==e.indexOf("tabs-item-hide");t.$hasTabs=!n&&!i,t.$hasTabsTop=n&&!i}),t.$on("$destroy",function(){t.$tabsDestroy=!0,a(),o.$tabsElement=o.$element=o.$scope=r=null,delete t.$hasTabs,delete t.$hasTabsTop})}function o(e,t,n,i){i.selectedTab()||i.select(0)}var r=f('<div class="tab-nav tabs">');return r.append(n.contents()),n.append(r).addClass("tabs-"+t.tabs.position()+" tabs-"+t.tabs.style()),{pre:i,post:o}}}}]),s.directive("ionToggle",["$ionicGesture","$timeout",function(){return{restrict:"E",replace:!0,require:"?ngModel",transclude:!0,template:'<div class="item item-toggle"><div ng-transclude></div><label class="toggle"><input type="checkbox"><div class="track"><div class="handle"></div></div></label></div>',compile:function(e,t){var n=e.find("input");return l({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){u(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=f(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()})}}}}]),s.directive("ionView",function(){return{restrict:"EA",priority:1e3,controller:"$ionicView",compile:function(e){return e.addClass("pane"),e[0].removeAttribute("title"),function(e,t,n,i){i.init()}}}})}();