/*! * Copyright 2014 Drifty Co. * http://drifty.com/ * * Ionic, v0.9.26 * 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. * */ window.ionic={controllers:{},views:{},version:"0.9.26"},function(a){function b(a){return a*a*a}function c(a){return 3*a*a*(1-a)}function d(a){return 3*a*(1-a)*(1-a)}function e(a){return(1-a)*(1-a)*(1-a)}var f=function(a,b){return a||(a=0),b||(b=0),{x:a,y:b}};a.Animator={getQuadraticBezier:function(a,g,h,i,j){var k=new f;return k.x=g.x*b(a)+h.x*c(a)+i.x*d(a)+j.x*e(a),k.y=g.y*b(a)+h.y*c(a)+i.y*d(a)+j.y*e(a),k},getCubicBezier:function(a,b,c,d,e){epsilon=1e3/60/e/4;var f=function(b){var d=1-b;return 3*d*d*b*a+3*d*b*b*c+b*b*b},g=function(a){var c=1-a;return 3*c*c*a*b+3*c*a*a*d+a*a*a},h=function(b){var d=1-b;return 3*(2*(b-1)*b+d*d)*a+3*(-b*b*b+2*d*b)*c};return function(a){var b,c,d,e,i,j,k=a;for(d=k,j=0;8>j;j++){if(e=f(d)-k,Math.abs(e)d)return g(b);if(d>c)return g(c);for(;c>b;){if(e=f(d),Math.abs(e-k)e?b=d:c=d,d=.5*(c-b)+b}return g(d)}},animate:function(a){return{leave:function(){var b=function(){a.classList.remove("leave"),a.classList.remove("leave-active"),a.removeEventListener("webkitTransitionEnd",b),a.removeEventListener("transitionEnd",b)};return a.addEventListener("webkitTransitionEnd",b),a.addEventListener("transitionEnd",b),a.classList.add("leave"),a.classList.add("leave-active"),this},enter:function(){var b=function(){a.classList.remove("enter"),a.classList.remove("enter-active"),a.removeEventListener("webkitTransitionEnd",b),a.removeEventListener("transitionEnd",b)};return a.addEventListener("webkitTransitionEnd",b),a.addEventListener("transitionEnd",b),a.classList.add("enter"),a.classList.add("enter-active"),this}}}}}(ionic),function(a){var b=[],c=function(){for(var d=0;de;e++)if(c=d[e],c.nodeName&&c.nodeName.toLowerCase()==b){if(c==a)return f;f++}return Array.prototype.slice.call(a.parentNode.children).indexOf(a)},swapNodes:function(a,b){b.parentNode.insertBefore(a,b)},getParentWithClass:function(a,b){for(;a.parentNode;){if(a.parentNode.classList&&a.parentNode.classList.contains(b))return a.parentNode;a=a.parentNode}return null},getParentOrSelfWithClass:function(a,b){for(;a;){if(a.classList&&a.classList.contains(b))return a;a=a.parentNode}return null},rectContains:function(a,b,c,d,e,f){return c>a||a>e?!1:d>b||b>f?!1:!0}},a.requestAnimationFrame=a.DomUtil.requestAnimationFrame,a.animationFrameThrottle=a.DomUtil.animationFrameThrottle}(window.ionic),function(a){window.CustomEvent||!function(){var a;a=function(a,b){var c;b=b||{bubbles:!1,cancelable:!1,detail:void 0};try{c=document.createEvent("CustomEvent"),c.initCustomEvent(a,b.bubbles,b.cancelable,b.detail)}catch(d){c=document.createEvent("Event");for(var e in b)c[e]=b[e];c.initEvent(a,b.bubbles,b.cancelable)}return c},a.prototype=window.Event.prototype,window.CustomEvent=a}(),a.EventController={VIRTUALIZED_EVENTS:["tap","swipe","swiperight","swipeleft","drag","hold","release"],trigger:function(a,b,c,d){var e=new CustomEvent(a,{detail:b,bubbles:!!c,cancelable:!!d});b&&b.target&&b.target.dispatchEvent(e)||window.dispatchEvent(e)},on:function(b,c,d){for(var e=d||window,f=0,g=this.VIRTUALIZED_EVENTS.length;g>f;f++)if(b==this.VIRTUALIZED_EVENTS[f]){var h=new a.Gesture(d);return h.on(b,c),h}e.addEventListener(b,c)},off:function(a,b,c){c.removeEventListener(a,b)},onGesture:function(b,c,d){var e=new a.Gesture(d);return e.on(b,c),e},offGesture:function(a,b,c){a.off(b,c)},handlePopState:function(){}},a.on=function(){a.EventController.on.apply(a.EventController,arguments)},a.off=function(){a.EventController.off.apply(a.EventController,arguments)},a.trigger=a.EventController.trigger,a.onGesture=function(){return a.EventController.onGesture.apply(a.EventController.onGesture,arguments)},a.offGesture=function(){return a.EventController.offGesture.apply(a.EventController.offGesture,arguments)}}(window.ionic),function(a){function b(){if(!a.Gestures.READY){a.Gestures.event.determineEventTypes();for(var b in a.Gestures.gestures)a.Gestures.gestures.hasOwnProperty(b)&&a.Gestures.detection.register(a.Gestures.gestures[b]);a.Gestures.event.onTouch(a.Gestures.DOCUMENT,a.Gestures.EVENT_MOVE,a.Gestures.detection.detect),a.Gestures.event.onTouch(a.Gestures.DOCUMENT,a.Gestures.EVENT_END,a.Gestures.detection.detect),a.Gestures.READY=!0}}a.Gesture=function(b,c){return new a.Gestures.Instance(b,c||{})},a.Gestures={},a.Gestures.defaults={stop_browser_behavior:"disable-user-behavior"},a.Gestures.HAS_POINTEREVENTS=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,a.Gestures.HAS_TOUCHEVENTS="ontouchstart"in window,a.Gestures.MOBILE_REGEX=/mobile|tablet|ip(ad|hone|od)|android|silk/i,a.Gestures.NO_MOUSEEVENTS=a.Gestures.HAS_TOUCHEVENTS&&window.navigator.userAgent.match(a.Gestures.MOBILE_REGEX),a.Gestures.EVENT_TYPES={},a.Gestures.DIRECTION_DOWN="down",a.Gestures.DIRECTION_LEFT="left",a.Gestures.DIRECTION_UP="up",a.Gestures.DIRECTION_RIGHT="right",a.Gestures.POINTER_MOUSE="mouse",a.Gestures.POINTER_TOUCH="touch",a.Gestures.POINTER_PEN="pen",a.Gestures.EVENT_START="start",a.Gestures.EVENT_MOVE="move",a.Gestures.EVENT_END="end",a.Gestures.DOCUMENT=window.document,a.Gestures.plugins={},a.Gestures.READY=!1,a.Gestures.Instance=function(c,d){var e=this;return null===c?void console.error("Null element passed to gesture (element does not exist). Not listening for gesture"):(b(),this.element=c,this.enabled=!0,this.options=a.Gestures.utils.extend(a.Gestures.utils.extend({},a.Gestures.defaults),d||{}),this.options.stop_browser_behavior&&a.Gestures.utils.stopDefaultBrowserBehavior(this.element,this.options.stop_browser_behavior),a.Gestures.event.onTouch(c,a.Gestures.EVENT_START,function(b){e.enabled&&a.Gestures.detection.startDetect(e,b)}),this)},a.Gestures.Instance.prototype={on:function(a,b){for(var c=a.split(" "),d=0;d0&&f==a.Gestures.EVENT_END?f=a.Gestures.EVENT_MOVE:k||(f=a.Gestures.EVENT_END),(k||null===c)&&(c=i),g.call(a.Gestures.detection,h.collectEventData(b,f,h.getTouchList(c,f),i)),a.Gestures.HAS_POINTEREVENTS&&f==a.Gestures.EVENT_END&&(k=a.Gestures.PointerEvent.updatePointer(f,i))),k||(c=null,d=!1,e=!1,a.Gestures.PointerEvent.reset())}})},determineEventTypes:function(){var b;b=a.Gestures.HAS_POINTEREVENTS?a.Gestures.PointerEvent.getEvents():a.Gestures.NO_MOUSEEVENTS?["touchstart","touchmove","touchend touchcancel"]:["touchstart mousedown","touchmove mousemove","touchend touchcancel mouseup"],a.Gestures.EVENT_TYPES[a.Gestures.EVENT_START]=b[0],a.Gestures.EVENT_TYPES[a.Gestures.EVENT_MOVE]=b[1],a.Gestures.EVENT_TYPES[a.Gestures.EVENT_END]=b[2]},getTouchList:function(b){return a.Gestures.HAS_POINTEREVENTS?a.Gestures.PointerEvent.getTouchList():b.touches?b.touches:(b.indentifier=1,[b])},collectEventData:function(b,c,d,e){var f=a.Gestures.POINTER_TOUCH;return(e.type.match(/mouse/)||a.Gestures.PointerEvent.matchType(a.Gestures.POINTER_MOUSE,e))&&(f=a.Gestures.POINTER_MOUSE),{center:a.Gestures.utils.getCenter(d),timeStamp:(new Date).getTime(),target:e.target,touches:d,eventType:c,pointerType:f,srcEvent:e,preventDefault:function(){this.srcEvent.preventManipulation&&this.srcEvent.preventManipulation(),this.srcEvent.preventDefault},stopPropagation:function(){this.srcEvent.stopPropagation()},stopDetect:function(){return a.Gestures.detection.stopDetect()}}}},a.Gestures.PointerEvent={pointers:{},getTouchList:function(){var a=this,b=[];return Object.keys(a.pointers).sort().forEach(function(c){b.push(a.pointers[c])}),b},updatePointer:function(b,c){return b==a.Gestures.EVENT_END?this.pointers={}:(c.identifier=c.pointerId,this.pointers[c.pointerId]=c),Object.keys(this.pointers).length},matchType:function(b,c){if(!c.pointerType)return!1;var d={};return d[a.Gestures.POINTER_MOUSE]=c.pointerType==c.MSPOINTER_TYPE_MOUSE||c.pointerType==a.Gestures.POINTER_MOUSE,d[a.Gestures.POINTER_TOUCH]=c.pointerType==c.MSPOINTER_TYPE_TOUCH||c.pointerType==a.Gestures.POINTER_TOUCH,d[a.Gestures.POINTER_PEN]=c.pointerType==c.MSPOINTER_TYPE_PEN||c.pointerType==a.Gestures.POINTER_PEN,d[b]},getEvents:function(){return["pointerdown MSPointerDown","pointermove MSPointerMove","pointerup pointercancel MSPointerUp MSPointerCancel"]},reset:function(){this.pointers={}}},a.Gestures.utils={extend:function(a,b,c){for(var d in b)void 0!==a[d]&&c||(a[d]=b[d]);return a},hasParent:function(a,b){for(;a;){if(a==b)return!0;a=a.parentNode}return!1},getCenter:function(a){for(var b=[],c=[],d=0,e=a.length;e>d;d++)b.push(a[d].pageX),c.push(a[d].pageY);return{pageX:(Math.min.apply(Math,b)+Math.max.apply(Math,b))/2,pageY:(Math.min.apply(Math,c)+Math.max.apply(Math,c))/2}},getVelocity:function(a,b,c){return{x:Math.abs(b/a)||0,y:Math.abs(c/a)||0}},getAngle:function(a,b){var c=b.pageY-a.pageY,d=b.pageX-a.pageX;return 180*Math.atan2(c,d)/Math.PI},getDirection:function(b,c){var d=Math.abs(b.pageX-c.pageX),e=Math.abs(b.pageY-c.pageY);return d>=e?b.pageX-c.pageX>0?a.Gestures.DIRECTION_LEFT:a.Gestures.DIRECTION_RIGHT:b.pageY-c.pageY>0?a.Gestures.DIRECTION_UP:a.Gestures.DIRECTION_DOWN},getDistance:function(a,b){var c=b.pageX-a.pageX,d=b.pageY-a.pageY;return Math.sqrt(c*c+d*d)},getScale:function(a,b){return a.length>=2&&b.length>=2?this.getDistance(b[0],b[1])/this.getDistance(a[0],a[1]):1},getRotation:function(a,b){return a.length>=2&&b.length>=2?this.getAngle(b[1],b[0])-this.getAngle(a[1],a[0]):0},isVertical:function(b){return b==a.Gestures.DIRECTION_UP||b==a.Gestures.DIRECTION_DOWN},stopDefaultBrowserBehavior:function(a,b){a&&a.classList&&(a.classList.add(b),a.onselectstart=function(){return!1})}},a.Gestures.detection={gestures:[],current:null,previous:null,stopped:!1,startDetect:function(b,c){this.current||(this.stopped=!1,this.current={inst:b,startEvent:a.Gestures.utils.extend({},c),lastEvent:!1,name:""},this.detect(c))},detect:function(b){if(this.current&&!this.stopped){b=this.extendEventData(b);for(var c=this.current.inst.options,d=0,e=this.gestures.length;e>d;d++){var f=this.gestures[d];if(!this.stopped&&c[f.name]!==!1&&f.handler.call(f,b,this.current.inst)===!1){this.stopDetect();break}}return this.current&&(this.current.lastEvent=b),b.eventType==a.Gestures.EVENT_END&&!b.touches.length-1&&this.stopDetect(),b}},stopDetect:function(){this.previous=a.Gestures.utils.extend({},this.current),this.current=null,this.stopped=!0},extendEventData:function(b){var c=this.current.startEvent;if(c&&(b.touches.length!=c.touches.length||b.touches===c.touches)){c.touches=[];for(var d=0,e=b.touches.length;e>d;d++)c.touches.push(a.Gestures.utils.extend({},b.touches[d]))}var f=b.timeStamp-c.timeStamp,g=b.center.pageX-c.center.pageX,h=b.center.pageY-c.center.pageY,i=a.Gestures.utils.getVelocity(f,g,h);return a.Gestures.utils.extend(b,{deltaTime:f,deltaX:g,deltaY:h,velocityX:i.x,velocityY:i.y,distance:a.Gestures.utils.getDistance(c.center,b.center),angle:a.Gestures.utils.getAngle(c.center,b.center),direction:a.Gestures.utils.getDirection(c.center,b.center),scale:a.Gestures.utils.getScale(c.touches,b.touches),rotation:a.Gestures.utils.getRotation(c.touches,b.touches),startEvent:c}),b},register:function(b){var c=b.defaults||{};return void 0===c[b.name]&&(c[b.name]=!0),a.Gestures.utils.extend(a.Gestures.defaults,c,!0),b.index=b.index||1e3,this.gestures.push(b),this.gestures.sort(function(a,b){return a.indexb.index?1:0}),this.gestures}},a.Gestures.gestures=a.Gestures.gestures||{},a.Gestures.gestures.Hold={name:"hold",index:10,defaults:{hold_timeout:500,hold_threshold:1},timer:null,handler:function(b,c){switch(b.eventType){case a.Gestures.EVENT_START:clearTimeout(this.timer),a.Gestures.detection.current.name=this.name,this.timer=setTimeout(function(){"hold"==a.Gestures.detection.current.name&&c.trigger("hold",b)},c.options.hold_timeout);break;case a.Gestures.EVENT_MOVE:b.distance>c.options.hold_threshold&&clearTimeout(this.timer);break;case a.Gestures.EVENT_END:clearTimeout(this.timer)}}},a.Gestures.gestures.Tap={name:"tap",index:100,defaults:{tap_max_touchtime:250,tap_max_distance:10,tap_always:!0,doubletap_distance:20,doubletap_interval:300},handler:function(b,c){if(b.eventType==a.Gestures.EVENT_END){var d=a.Gestures.detection.previous,e=!1;if(b.deltaTime>c.options.tap_max_touchtime||b.distance>c.options.tap_max_distance)return;d&&"tap"==d.name&&b.timeStamp-d.lastEvent.timeStamp0&&b.touches.length>c.options.swipe_max_touches)return;(b.velocityX>c.options.swipe_velocity||b.velocityY>c.options.swipe_velocity)&&(c.trigger(this.name,b),c.trigger(this.name+b.direction,b))}}},a.Gestures.gestures.Drag={name:"drag",index:50,defaults:{drag_min_distance:10,correct_for_drag_min_distance:!0,drag_max_touches:1,drag_block_horizontal:!0,drag_block_vertical:!0,drag_lock_to_axis:!1,drag_lock_min_distance:25},triggered:!1,handler:function(b,c){if(a.Gestures.detection.current.name!=this.name&&this.triggered)return c.trigger(this.name+"end",b),void(this.triggered=!1);if(!(c.options.drag_max_touches>0&&b.touches.length>c.options.drag_max_touches))switch(b.eventType){case a.Gestures.EVENT_START:this.triggered=!1;break;case a.Gestures.EVENT_MOVE:if(b.distancec.options.transform_min_rotation&&c.trigger("rotate",b),d>c.options.transform_min_scale&&(c.trigger("pinch",b),c.trigger("pinch"+(b.scale<1?"in":"out"),b));break;case a.Gestures.EVENT_END:this.triggered&&c.trigger(this.name+"end",b),this.triggered=!1}}},a.Gestures.gestures.Touch={name:"touch",index:-1/0,defaults:{prevent_default:!1,prevent_mouseevents:!1},handler:function(b,c){return c.options.prevent_mouseevents&&b.pointerType==a.Gestures.POINTER_MOUSE?void b.stopDetect():(c.options.prevent_default&&b.preventDefault(),void(b.eventType==a.Gestures.EVENT_START&&c.trigger(this.name,b)))}},a.Gestures.gestures.Release={name:"release",index:1/0,handler:function(b,c){b.eventType==a.Gestures.EVENT_END&&c.trigger(this.name,b)}}}(window.ionic),function(a){function b(){a.Platform.isCordova()?document.addEventListener("deviceready",c,!1):c(),window.removeEventListener("load",b,!1)}function c(){a.Platform.isReady=!0,a.Platform.detect();for(var b=0;b0?c=c.replace(".","_"):c+="_0",this.platforms.push(a+c.split("_")[0]),this.platforms.push(a+c),this.isAndroid()&&4.4>b&&(this.grade=4>b?"c":"b")}}},isCordova:function(){return!(!window.cordova&&!window.PhoneGap&&!window.phonegap)},isIPad:function(){return this.ua.toLowerCase().indexOf("ipad")>=0},isIOS:function(){return this.is("ios")},isAndroid:function(){return this.is("android")},platform:function(){return null===d&&this.setPlatform(this.device().platform),d},setPlatform:function(a){d="undefined"!=typeof a&&null!==a&&a.length?a.toLowerCase():this.ua.indexOf("Android")>0?"android":this.ua.indexOf("iPhone")>-1||this.ua.indexOf("iPad")>-1||this.ua.indexOf("iPod")>-1?"ios":"unknown"},version:function(){return null===e&&this.setVersion(this.device().version),e},setVersion:function(a){if("undefined"!=typeof a&&null!==a&&(a=a.split("."),a=parseFloat(a[0]+"."+(a.length>1?a[1]:0)),!isNaN(a)))return void(e=a);e=0;var b=this.platform(),c={android:/Android (\d+).(\d+)?/,ios:/OS (\d+)_(\d+)?/};c[b]&&(a=this.ua.match(c[b]),a.length>2&&(e=parseFloat(a[1]+"."+a[2])))},is:function(a){if(a=a.toLowerCase(),this.platforms)for(var b=0;b=0},exitApp:function(){this.ready(function(){navigator.app&&navigator.app.exitApp&&navigator.app.exitApp()})},showStatusBar:function(b){this.showStatusBar=b,this.ready(function(){a.Platform.showStatusBar?(StatusBar.show(),document.body.classList.remove("status-bar-hide")):(StatusBar.hide(),document.body.classList.add("status-bar-hide"))})},fullScreen:function(b,c){this.isFullScreen=b!==!1,a.DomUtil.ready(function(){a.Platform.isFullScreen?document.body.classList.add("fullscreen"):document.body.classList.remove("fullscreen")}),this.showStatusBar(c===!0)}};var d=null,e=null,f=[];window.addEventListener("load",b,!1)}(window.ionic),function(a,b,c){"use strict";function d(a){if(a.gesture&&a.gesture.srcEvent){var b=a.gesture.srcEvent,d=b.target;if(f(b))return j(b);for(;d;){if("INPUT"===d.tagName||"A"===d.tagName||"BUTTON"===d.tagName||"LABEL"===d.tagName||"TEXTAREA"===d.tagName||"SELECT"===d.tagName)return c.tapElement(d,b);d=d.parentElement}k()}}function e(a){return a.target.control?j(a):f(a)?j(a):void g(a)}function f(a){var b,c,d;for(b in l)if(c=l[b],d||(d=h(a)),d.x>c.x-o&&d.xc.y-o&&d.y=a.length)for(var d=c-a.length;d--+1;)a.push(void 0);return a.splice(c,0,a.splice(b,1)[0]),a},proxy:function(a,b){var c=Array.prototype.slice.call(arguments,2);return function(){return a.apply(b,c.concat(Array.prototype.slice.call(arguments)))}},debounce:function(a,b,c){var d,e,f,g,h;return function(){f=this,e=arguments,g=new Date;var i=function(){var j=new Date-g;b>j?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e)))},j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e)),h}},throttle:function(a,b,c){var d,e,f,g=null,h=0;c||(c={});var i=function(){h=c.leading===!1?0:Date.now(),g=null,f=a.apply(d,e)};return function(){var j=Date.now();h||c.leading!==!1||(h=j);var k=b-(j-h);return d=this,e=arguments,0>=k?(clearTimeout(g),g=null,h=j,f=a.apply(d,e)):g||c.trailing===!1||(g=setTimeout(i,k)),f}},inherit:function(b,c){var d,e=this;d=b&&b.hasOwnProperty("constructor")?b.constructor:function(){return e.apply(this,arguments)},a.extend(d,e,c);var f=function(){this.constructor=d};return f.prototype=e.prototype,d.prototype=new f,b&&a.extend(d.prototype,b),d.__super__=e.prototype,d},extend:function(a){for(var b=Array.prototype.slice.call(arguments,1),c=0;c2500&&(clearInterval(h),h=null)},1e3/d)),b}}(),stop:function(a){var b=null!=e[a];return b&&(e[a]=null),b},isRunning:function(a){return null!=e[a]},start:function(a,g,h,i,j,k){var l=b(),m=l,n=0,o=0,p=f++;if(k||(k=document.body),p%20===0){var q={};for(var r in e)q[r]=!0;e=q}var s=function(f){var q=f!==!0,r=b();if(!e[p]||g&&!g(p))return e[p]=null,void(h&&h(c-o/((r-l)/d),p,!1));if(q)for(var t=Math.round((r-m)/(d/c))-1,u=0;u1&&(n=1));var v=j?j(n):n;a(v,r,q)!==!1&&1!==n||!q?q&&(m=r,core.effect.Animate.requestAnimationFrame(s,k)):(e[p]=null,h&&h(c-o/((r-l)/d),p,1===n||null==i))};return e[p]=!0,core.effect.Animate.requestAnimationFrame(s,k),p}}}(this);var Scroller;!function(a){var b=function(){},c=function(a){return Math.pow(a-1,3)+1},d=function(a){return(a/=.5)<1?.5*Math.pow(a,3):.5*(Math.pow(a-2,3)+2)};a.views.Scroll=a.views.View.inherit({initialize:function(c){var d=this;this.__container=c.el,this.__content=c.el.firstElementChild,setTimeout(function(){d.__container&&d.__content&&(d.__container.scrollTop=0,d.__content.scrollTop=0)}),this.options={scrollingX:!1,scrollbarX:!0,scrollingY:!0,scrollbarY:!0,startX:0,startY:0,wheelDampen:6,minScrollbarSizeX:5,minScrollbarSizeY:5,scrollbarsFade:!0,scrollbarFadeDelay:300,scrollbarResizeFadeDelay:1e3,animating:!0,animationDuration:250,bouncing:!0,locking:!0,paging:!1,snapping:!1,zooming:!1,minZoom:.5,maxZoom:3,speedMultiplier:1,scrollingComplete:b,penetrationDeceleration:.03,penetrationAcceleration:.08,scrollEventInterval:50};for(var e in c)this.options[e]=c[e];this.hintResize=a.debounce(function(){d.resize()},1e3,!0),this.triggerScrollEvent=a.throttle(function(){a.trigger("scroll",{scrollTop:d.__scrollTop,scrollLeft:d.__scrollLeft,target:d.__container})},this.options.scrollEventInterval),this.triggerScrollEndEvent=function(){a.trigger("scrollend",{scrollTop:d.__scrollTop,scrollLeft:d.__scrollLeft,target:d.__container})},this.__scrollLeft=this.options.startX,this.__scrollTop=this.options.startY,this.__callback=this.getRenderFn(),this.__initEventHandlers(),this.__createScrollbars()},run:function(){this.resize(),this.__fadeScrollbars("out",this.options.scrollbarResizeFadeDelay)},__isSingleTouch:!1,__isTracking:!1,__didDecelerationComplete:!1,__isGesturing:!1,__isDragging:!1,__isDecelerating:!1,__isAnimating:!1,__clientLeft:0,__clientTop:0,__clientWidth:0,__clientHeight:0,__contentWidth:0,__contentHeight:0,__snapWidth:100,__snapHeight:100,__refreshHeight:null,__refreshActive:!1,__refreshActivate:null,__refreshDeactivate:null,__refreshStart:null,__zoomLevel:1,__scrollLeft:0,__scrollTop:0,__maxScrollLeft:0,__maxScrollTop:0,__scheduledLeft:0,__scheduledTop:0,__scheduledZoom:0,__lastTouchLeft:null,__lastTouchTop:null,__lastTouchMove:null,__positions:null,__minDecelerationScrollLeft:null,__minDecelerationScrollTop:null,__maxDecelerationScrollLeft:null,__maxDecelerationScrollTop:null,__decelerationVelocityX:null,__decelerationVelocityY:null,__transformProperty:null,__perspectiveProperty:null,__indicatorX:null,__indicatorY:null,__scrollbarFadeTimeout:null,__didWaitForSize:null,__sizerTimeout:null,__initEventHandlers:function(){function b(a){return a.target.tagName.match(IS_INPUT_LIKE_REGEX)||a.target.isContentEditable}var c=this,d=this.__container;if(d.addEventListener("scrollChildIntoView",function(b){var e=window.innerHeight,f=b.target,g=b.target.offsetHeight,h=f.getBoundingClientRect().top,i=a.DomUtil.getPositionInParent(f,d).top;h+g>e&&c.scrollTo(0,i+g-.5*e,!0),b.stopPropagation()}),"ontouchstart"in window)d.addEventListener("touchstart",function(a){a.defaultPrevented||b(a)||(c.doTouchStart(a.touches,a.timeStamp),a.preventDefault())},!1),document.addEventListener("touchmove",function(a){a.defaultPrevented||c.doTouchMove(a.touches,a.timeStamp)},!1),document.addEventListener("touchend",function(a){c.doTouchEnd(a.timeStamp)},!1);else{var e=!1;d.addEventListener("mousedown",function(a){a.defaultPrevented||b(a)||(c.doTouchStart([{pageX:a.pageX,pageY:a.pageY}],a.timeStamp),a.preventDefault(),e=!0)},!1),document.addEventListener("mousemove",function(a){e&&!a.defaultPrevented&&(c.doTouchMove([{pageX:a.pageX,pageY:a.pageY}],a.timeStamp),e=!0)},!1),document.addEventListener("mouseup",function(a){e&&(c.doTouchEnd(a.timeStamp),e=!1)},!1),document.addEventListener("mousewheel",function(a){c.scrollBy(a.wheelDeltaX/c.options.wheelDampen,-a.wheelDeltaY/c.options.wheelDampen)})}},__createScrollbar:function(a){var b=document.createElement("div"),c=document.createElement("div");return c.className="scroll-bar-indicator",b.className="h"==a?"scroll-bar scroll-bar-h":"scroll-bar scroll-bar-v",b.appendChild(c),b},__createScrollbars:function(){var a,b;this.options.scrollingX&&(a={el:this.__createScrollbar("h"),sizeRatio:1},a.indicator=a.el.children[0],this.options.scrollbarX&&this.__container.appendChild(a.el),this.__indicatorX=a),this.options.scrollingY&&(b={el:this.__createScrollbar("v"),sizeRatio:1},b.indicator=b.el.children[0],this.options.scrollbarY&&this.__container.appendChild(b.el),this.__indicatorY=b)},__resizeScrollbars:function(){var a=this;if(a.__fadeScrollbars("in"),a.__indicatorX){var b=Math.max(Math.round(a.__clientWidth*a.__clientWidth/a.__contentWidth),20); b>a.__contentWidth&&(b=0),a.__indicatorX.size=b,a.__indicatorX.minScale=this.options.minScrollbarSizeX/b,a.__indicatorX.indicator.style.width=b+"px",a.__indicatorX.maxPos=a.__clientWidth-b,a.__indicatorX.sizeRatio=a.__maxScrollLeft?a.__indicatorX.maxPos/a.__maxScrollLeft:1}if(a.__indicatorY){var c=Math.max(Math.round(a.__clientHeight*a.__clientHeight/a.__contentHeight),20);c>a.__contentHeight&&(c=0),a.__indicatorY.size=c,a.__indicatorY.minScale=this.options.minScrollbarSizeY/c,a.__indicatorY.maxPos=a.__clientHeight-c,a.__indicatorY.indicator.style.height=c+"px",a.__indicatorY.sizeRatio=a.__maxScrollTop?a.__indicatorY.maxPos/a.__maxScrollTop:1}},__repositionScrollbars:function(){var a,b,c,d,e,f=this,g=0,h=0;f.__indicatorX&&(f.__indicatorY&&(g=10),d=Math.round(f.__indicatorX.sizeRatio*f.__scrollLeft)||0,b=f.__scrollLeft-(f.__maxScrollLeft-g),f.__scrollLeft<0?(widthScale=Math.max(f.__indicatorX.minScale,(f.__indicatorX.size-Math.abs(f.__scrollLeft))/f.__indicatorX.size),d=0,f.__indicatorX.indicator.style[f.__transformOriginProperty]="left center"):b>0?(widthScale=Math.max(f.__indicatorX.minScale,(f.__indicatorX.size-b)/f.__indicatorX.size),d=f.__indicatorX.maxPos-g,f.__indicatorX.indicator.style[f.__transformOriginProperty]="right center"):(d=Math.min(f.__maxScrollLeft,Math.max(0,d)),widthScale=1),f.__indicatorX.indicator.style[f.__transformProperty]="translate3d("+d+"px, 0, 0) scaleX("+widthScale+")"),f.__indicatorY&&(e=Math.round(f.__indicatorY.sizeRatio*f.__scrollTop)||0,f.__indicatorX&&(h=10),c=f.__scrollTop-(f.__maxScrollTop-h),f.__scrollTop<0?(a=Math.max(f.__indicatorY.minScale,(f.__indicatorY.size-Math.abs(f.__scrollTop))/f.__indicatorY.size),e=0,f.__indicatorY.indicator.style[f.__transformOriginProperty]="center top"):c>0?(a=Math.max(f.__indicatorY.minScale,(f.__indicatorY.size-c)/f.__indicatorY.size),e=f.__indicatorY.maxPos-h,f.__indicatorY.indicator.style[f.__transformOriginProperty]="center bottom"):(e=Math.min(f.__maxScrollTop,Math.max(0,e)),a=1),f.__indicatorY.indicator.style[f.__transformProperty]="translate3d(0,"+e+"px, 0) scaleY("+a+")")},__fadeScrollbars:function(a,b){var c=this;if(this.options.scrollbarsFade){var d="scroll-bar-fade-out";c.options.scrollbarsFade===!0&&(clearTimeout(c.__scrollbarFadeTimeout),"in"==a?(c.__indicatorX&&c.__indicatorX.indicator.classList.remove(d),c.__indicatorY&&c.__indicatorY.indicator.classList.remove(d)):c.__scrollbarFadeTimeout=setTimeout(function(){c.__indicatorX&&c.__indicatorX.indicator.classList.add(d),c.__indicatorY&&c.__indicatorY.indicator.classList.add(d)},b||c.options.scrollbarFadeDelay))}},__scrollingComplete:function(){var a=this;a.options.scrollingComplete(),a.__fadeScrollbars("out")},resize:function(){this.setDimensions(this.__container.clientWidth,this.__container.clientHeight,Math.max(this.__content.scrollWidth,this.__content.offsetWidth),Math.max(this.__content.scrollHeight,this.__content.offsetHeight))},getRenderFn:function(){var a,b=this,c=this.__content,d=document.documentElement.style;"MozAppearance"in d?a="gecko":"WebkitAppearance"in d?a="webkit":"string"==typeof navigator.cpuClass&&(a="trident");var e,f={trident:"ms",gecko:"Moz",webkit:"Webkit",presto:"O"}[a],g=document.createElement("div"),h=f+"Perspective",i=f+"Transform",j=f+"TransformOrigin";return b.__perspectiveProperty=i,b.__transformProperty=i,b.__transformOriginProperty=j,g.style[h]!==e?function(a,d){c.style[i]="translate3d("+-a+"px,"+-d+"px,0)",b.__repositionScrollbars(),b.triggerScrollEvent()}:g.style[i]!==e?function(a,d){c.style[i]="translate("+-a+"px,"+-d+"px)",b.__repositionScrollbars(),b.triggerScrollEvent()}:function(a,d,e){c.style.marginLeft=a?-a/e+"px":"",c.style.marginTop=d?-d/e+"px":"",c.style.zoom=e||"",b.__repositionScrollbars(),b.triggerScrollEvent()}},setDimensions:function(a,b,c,d){var e=this;a===+a&&(e.__clientWidth=a),b===+b&&(e.__clientHeight=b),c===+c&&(e.__contentWidth=c),d===+d&&(e.__contentHeight=d),e.__computeScrollMax(),e.__resizeScrollbars(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)},setPosition:function(a,b){var c=this;c.__clientLeft=a||0,c.__clientTop=b||0},setSnapSize:function(a,b){var c=this;c.__snapWidth=a,c.__snapHeight=b},activatePullToRefresh:function(a,b,c,d){var e=this;e.__refreshHeight=a,e.__refreshActivate=b,e.__refreshDeactivate=c,e.__refreshStart=d},triggerPullToRefresh:function(){this.__publish(this.__scrollLeft,-this.__refreshHeight,this.__zoomLevel,!0),this.__refreshStart&&this.__refreshStart()},finishPullToRefresh:function(){var a=this;a.__refreshActive=!1,a.__refreshDeactivate&&a.__refreshDeactivate(),a.scrollTo(a.__scrollLeft,a.__scrollTop,!0)},getValues:function(){var a=this;return{left:a.__scrollLeft,top:a.__scrollTop,zoom:a.__zoomLevel}},getScrollMax:function(){var a=this;return{left:a.__maxScrollLeft,top:a.__maxScrollTop}},zoomTo:function(a,b,c,d){var e=this;if(!e.options.zooming)throw new Error("Zooming is not enabled!");e.__isDecelerating&&(core.effect.Animate.stop(e.__isDecelerating),e.__isDecelerating=!1);var f=e.__zoomLevel;null==c&&(c=e.__clientWidth/2),null==d&&(d=e.__clientHeight/2),a=Math.max(Math.min(a,e.options.maxZoom),e.options.minZoom),e.__computeScrollMax(a);var g=(c+e.__scrollLeft)*a/f-c,h=(d+e.__scrollTop)*a/f-d;g>e.__maxScrollLeft?g=e.__maxScrollLeft:0>g&&(g=0),h>e.__maxScrollTop?h=e.__maxScrollTop:0>h&&(h=0),e.__publish(g,h,a,b)},zoomBy:function(a,b,c,d){var e=this;e.zoomTo(e.__zoomLevel*a,b,c,d)},scrollTo:function(a,b,c,d){var e=this;if(e.__isDecelerating&&(core.effect.Animate.stop(e.__isDecelerating),e.__isDecelerating=!1),null!=d&&d!==e.__zoomLevel){if(!e.options.zooming)throw new Error("Zooming is not enabled!");a*=d,b*=d,e.__computeScrollMax(d)}else d=e.__zoomLevel;e.options.scrollingX?e.options.paging?a=Math.round(a/e.__clientWidth)*e.__clientWidth:e.options.snapping&&(a=Math.round(a/e.__snapWidth)*e.__snapWidth):a=e.__scrollLeft,e.options.scrollingY?e.options.paging?b=Math.round(b/e.__clientHeight)*e.__clientHeight:e.options.snapping&&(b=Math.round(b/e.__snapHeight)*e.__snapHeight):b=e.__scrollTop,a=Math.max(Math.min(e.__maxScrollLeft,a),0),b=Math.max(Math.min(e.__maxScrollTop,b),0),a===e.__scrollLeft&&b===e.__scrollTop&&(c=!1),e.__publish(a,b,d,c)},scrollBy:function(a,b,c){var d=this,e=d.__isAnimating?d.__scheduledLeft:d.__scrollLeft,f=d.__isAnimating?d.__scheduledTop:d.__scrollTop;d.scrollTo(e+(a||0),f+(b||0),c)},doMouseZoom:function(a,b,c,d){var e=this,f=a>0?.97:1.03;return e.zoomTo(e.__zoomLevel*f,!1,c-e.__clientLeft,d-e.__clientTop)},doTouchStart:function(a,b){if(this.hintResize(),null==a.length)throw new Error("Invalid touch list: "+a);if(b instanceof Date&&(b=b.valueOf()),"number"!=typeof b)throw new Error("Invalid timestamp value: "+b);var c=this;c.__fadeScrollbars("in"),c.__interruptedAnimation=!0,c.__isDecelerating&&(core.effect.Animate.stop(c.__isDecelerating),c.__isDecelerating=!1,c.__interruptedAnimation=!0),c.__isAnimating&&(core.effect.Animate.stop(c.__isAnimating),c.__isAnimating=!1,c.__interruptedAnimation=!0);var d,e,f=1===a.length;f?(d=a[0].pageX,e=a[0].pageY):(d=Math.abs(a[0].pageX+a[1].pageX)/2,e=Math.abs(a[0].pageY+a[1].pageY)/2),c.__initialTouchLeft=d,c.__initialTouchTop=e,c.__zoomLevelStart=c.__zoomLevel,c.__lastTouchLeft=d,c.__lastTouchTop=e,c.__lastTouchMove=b,c.__lastScale=1,c.__enableScrollX=!f&&c.options.scrollingX,c.__enableScrollY=!f&&c.options.scrollingY,c.__isTracking=!0,c.__didDecelerationComplete=!1,c.__isDragging=!f,c.__isSingleTouch=f,c.__positions=[]},doTouchMove:function(a,b,c){if(null==a.length)throw new Error("Invalid touch list: "+a);if(b instanceof Date&&(b=b.valueOf()),"number"!=typeof b)throw new Error("Invalid timestamp value: "+b);var d=this;if(d.__isTracking){var e,f;2===a.length?(e=Math.abs(a[0].pageX+a[1].pageX)/2,f=Math.abs(a[0].pageY+a[1].pageY)/2):(e=a[0].pageX,f=a[0].pageY);var g=d.__positions;if(d.__isDragging){var h=e-d.__lastTouchLeft,i=f-d.__lastTouchTop,j=d.__scrollLeft,k=d.__scrollTop,l=d.__zoomLevel;if(null!=c&&d.options.zooming){var m=l;if(l=l/d.__lastScale*c,l=Math.max(Math.min(l,d.options.maxZoom),d.options.minZoom),m!==l){var n=e-d.__clientLeft,o=f-d.__clientTop;j=(n+j)*l/m-n,k=(o+k)*l/m-o,d.__computeScrollMax(l)}}if(d.__enableScrollX){j-=h*this.options.speedMultiplier;var p=d.__maxScrollLeft;(j>p||0>j)&&(d.options.bouncing?j+=h/2*this.options.speedMultiplier:j=j>p?p:0)}if(d.__enableScrollY){k-=i*this.options.speedMultiplier;var q=d.__maxScrollTop;(k>q||0>k)&&(d.options.bouncing||d.__refreshHeight&&0>k?(k+=i/2*this.options.speedMultiplier,d.__enableScrollX||null==d.__refreshHeight||(!d.__refreshActive&&k<=-d.__refreshHeight?(d.__refreshActive=!0,d.__refreshActivate&&d.__refreshActivate()):d.__refreshActive&&k>-d.__refreshHeight&&(d.__refreshActive=!1,d.__refreshDeactivate&&d.__refreshDeactivate()))):k=k>q?q:0)}g.length>60&&g.splice(0,30),g.push(j,k,b),d.__publish(j,k,l)}else{var r=d.options.locking?3:0,s=5,t=Math.abs(e-d.__initialTouchLeft),u=Math.abs(f-d.__initialTouchTop);d.__enableScrollX=d.options.scrollingX&&t>=r,d.__enableScrollY=d.options.scrollingY&&u>=r,g.push(d.__scrollLeft,d.__scrollTop,b),d.__isDragging=(d.__enableScrollX||d.__enableScrollY)&&(t>=s||u>=s),d.__isDragging&&(d.__interruptedAnimation=!1)}d.__lastTouchLeft=e,d.__lastTouchTop=f,d.__lastTouchMove=b,d.__lastScale=c}},doTouchEnd:function(a){if(a instanceof Date&&(a=a.valueOf()),"number"!=typeof a)throw new Error("Invalid timestamp value: "+a);var b=this;if(b.__isTracking){if(b.__isTracking=!1,b.__isDragging)if(b.__isDragging=!1,b.__isSingleTouch&&b.options.animating&&a-b.__lastTouchMove<=100){for(var c=b.__positions,d=c.length-1,e=d,f=d;f>0&&c[f]>b.__lastTouchMove-100;f-=3)e=f;if(e!==d){var g=c[d]-c[e],h=b.__scrollLeft-c[e-2],i=b.__scrollTop-c[e-1];b.__decelerationVelocityX=h/g*(1e3/60),b.__decelerationVelocityY=i/g*(1e3/60);var j=b.options.paging||b.options.snapping?4:1;(Math.abs(b.__decelerationVelocityX)>j||Math.abs(b.__decelerationVelocityY)>j)&&(b.__refreshActive||b.__startDeceleration(a))}else b.__scrollingComplete()}else a-b.__lastTouchMove>100&&b.__scrollingComplete();b.__isDecelerating||(b.__refreshActive&&b.__refreshStart?(b.__publish(b.__scrollLeft,-b.__refreshHeight,b.__zoomLevel,!0),b.__refreshStart&&b.__refreshStart()):((b.__interruptedAnimation||b.__isDragging)&&b.__scrollingComplete(),b.scrollTo(b.__scrollLeft,b.__scrollTop,!0,b.__zoomLevel),b.__refreshActive&&(b.__refreshActive=!1,b.__refreshDeactivate&&b.__refreshDeactivate()))),b.__positions.length=0}},__publish:function(a,b,e,f){var g=this,h=g.__isAnimating;if(h&&(core.effect.Animate.stop(h),g.__isAnimating=!1),f&&g.options.animating){g.__scheduledLeft=a,g.__scheduledTop=b,g.__scheduledZoom=e;var i=g.__scrollLeft,j=g.__scrollTop,k=g.__zoomLevel,l=a-i,m=b-j,n=e-k,o=function(a,b,c){c&&(g.__scrollLeft=i+l*a,g.__scrollTop=j+m*a,g.__zoomLevel=k+n*a,g.__callback&&g.__callback(g.__scrollLeft,g.__scrollTop,g.__zoomLevel))},p=function(a){return g.__isAnimating===a},q=function(a,b,c){b===g.__isAnimating&&(g.__isAnimating=!1),(g.__didDecelerationComplete||c)&&g.__scrollingComplete(),g.options.zooming&&g.__computeScrollMax()};g.__isAnimating=core.effect.Animate.start(o,p,q,g.options.animationDuration,h?c:d)}else g.__scheduledLeft=g.__scrollLeft=a,g.__scheduledTop=g.__scrollTop=b,g.__scheduledZoom=g.__zoomLevel=e,g.__callback&&g.__callback(a,b,e),g.options.zooming&&g.__computeScrollMax()},__computeScrollMax:function(a){var b=this;null==a&&(a=b.__zoomLevel),b.__maxScrollLeft=Math.max(b.__contentWidth*a-b.__clientWidth,0),b.__maxScrollTop=Math.max(b.__contentHeight*a-b.__clientHeight,0),b.__didWaitForSize||0!=b.__maxScrollLeft||0!=b.__maxScrollTop||(b.__didWaitForSize=!0,b.__waitForSize())},__waitForSize:function(){var a=this;clearTimeout(a.__sizerTimeout);var b=function(){a.resize(),a.options.scrollingX&&0==a.__maxScrollLeft||a.options.scrollingY&&0==a.__maxScrollTop};b(),a.__sizerTimeout=setTimeout(b,1e3)},__startDeceleration:function(){var a=this;if(a.options.paging){var b=Math.max(Math.min(a.__scrollLeft,a.__maxScrollLeft),0),c=Math.max(Math.min(a.__scrollTop,a.__maxScrollTop),0),d=a.__clientWidth,e=a.__clientHeight;a.__minDecelerationScrollLeft=Math.floor(b/d)*d,a.__minDecelerationScrollTop=Math.floor(c/e)*e,a.__maxDecelerationScrollLeft=Math.ceil(b/d)*d,a.__maxDecelerationScrollTop=Math.ceil(c/e)*e}else a.__minDecelerationScrollLeft=0,a.__minDecelerationScrollTop=0,a.__maxDecelerationScrollLeft=a.__maxScrollLeft,a.__maxDecelerationScrollTop=a.__maxScrollTop;var f=function(b,c,d){a.__stepThroughDeceleration(d)};a.__minVelocityToKeepDecelerating=a.options.snapping?4:.1;var g=function(){var b=Math.abs(a.__decelerationVelocityX)>=a.__minVelocityToKeepDecelerating||Math.abs(a.__decelerationVelocityY)>=a.__minVelocityToKeepDecelerating;return b||(a.__didDecelerationComplete=!0),b},h=function(){a.__isDecelerating=!1,a.__didDecelerationComplete&&a.__scrollingComplete(),a.options.paging&&a.scrollTo(a.__scrollLeft,a.__scrollTop,a.options.snapping)};a.__isDecelerating=core.effect.Animate.start(f,g,h)},__stepThroughDeceleration:function(a){var b=this,c=b.__scrollLeft+b.__decelerationVelocityX,d=b.__scrollTop+b.__decelerationVelocityY;if(!b.options.bouncing){var e=Math.max(Math.min(b.__maxDecelerationScrollLeft,c),b.__minDecelerationScrollLeft);e!==c&&(c=e,b.__decelerationVelocityX=0);var f=Math.max(Math.min(b.__maxDecelerationScrollTop,d),b.__minDecelerationScrollTop);f!==d&&(d=f,b.__decelerationVelocityY=0)}if(a?b.__publish(c,d,b.__zoomLevel):(b.__scrollLeft=c,b.__scrollTop=d),!b.options.paging){var g=.95;b.__decelerationVelocityX*=g,b.__decelerationVelocityY*=g}if(b.options.bouncing){var h=0,i=0,j=b.options.penetrationDeceleration,k=b.options.penetrationAcceleration;if(cb.__maxDecelerationScrollLeft&&(h=b.__maxDecelerationScrollLeft-c),db.__maxDecelerationScrollTop&&(i=b.__maxDecelerationScrollTop-d),0!==h){var l=h*b.__decelerationVelocityX<=b.__minDecelerationScrollLeft;l&&(b.__decelerationVelocityX+=h*j);var m=Math.abs(b.__decelerationVelocityX)<=b.__minVelocityToKeepDecelerating;(!l||m)&&(b.__decelerationVelocityX=h*k)}if(0!==i){var n=i*b.__decelerationVelocityY<=b.__minDecelerationScrollTop;n&&(b.__decelerationVelocityY+=i*j);var o=Math.abs(b.__decelerationVelocityY)<=b.__minVelocityToKeepDecelerating;(!n||o)&&(b.__decelerationVelocityY=i*k)}}}})}(ionic),function(a){"use strict";a.views.ActionSheet=a.views.View.inherit({initialize:function(a){this.el=a.el},show:function(){this.el.offsetWidth,this.el.classList.add("active")},hide:function(){this.el.offsetWidth,this.el.classList.remove("active")}})}(ionic),function(a){"use strict";a.views.HeaderBar=a.views.View.inherit({initialize:function(b){this.el=b.el,a.extend(this,{alignTitle:"center"},b),this.align()},align:a.animationFrameThrottle(function(b){var c=this.el.querySelector(b||".title");if(c){var d,e,f,g=this.el.childNodes,h=0,i=0,j=!0;for(d=0;d10&&(c.style.left=k+"px",c.style.right=k+"px"),c.offsetWidth0&&(c.style.right=i+5+"px")):"left"==this.alignTitle?(c.classList.add("titleEl-left"),h>0&&(c.style.left=h+15+"px")):"right"==this.alignTitle&&(c.classList.add("titleEl-right"),i>0&&(c.style.right=i+15+"px"))}})})}(ionic),function(a){"use strict";var b="item",c="item-content",d="item-sliding",e="item-options",f="item-placeholder",g="item-reordering",h="item-drag",i=function(){};i.prototype={start:function(){},drag:function(){},end:function(){}};var j=function(a){this.dragThresholdX=a.dragThresholdX||10,this.el=a.el};j.prototype=new i,j.prototype.start=function(f){var g,h,i,j;f.target.classList.contains(c)?g=f.target:f.target.classList.contains(b)&&(g=f.target.querySelector("."+c)),g&&(g.classList.remove(d),i=parseFloat(g.style[a.CSS.TRANSFORM].replace("translate3d(","").split(",")[0])||0,h=g.parentNode.querySelector("."+e),h&&(j=h.offsetWidth,this._currentDrag={buttonsWidth:j,content:g,startOffsetX:i}))},j.prototype.drag=a.animationFrameThrottle(function(b){var c;if(this._currentDrag&&(!this._isDragging&&(Math.abs(b.gesture.deltaX)>this.dragThresholdX||Math.abs(this._currentDrag.startOffsetX)>0)&&(this._isDragging=!0),this._isDragging)){c=this._currentDrag.buttonsWidth;var d=Math.min(0,this._currentDrag.startOffsetX+b.gesture.deltaX);-c>d&&(d=Math.min(-c,-c+.4*(b.gesture.deltaX+c))),this._currentDrag.content.style[a.CSS.TRANSFORM]="translate3d("+d+"px, 0, 0)",this._currentDrag.content.style.webkitTransition="none"}}),j.prototype.end=function(b,c){var d=this;if(!this._currentDrag)return void(c&&c());var e=-this._currentDrag.buttonsWidth;b.gesture.deltaX>-(this._currentDrag.buttonsWidth/2)&&("left"==b.gesture.direction&&Math.abs(b.gesture.velocityX)<.3?e=0:"right"==b.gesture.direction&&(e=0)),a.requestAnimationFrame(function(){d._currentDrag.content.style[a.CSS.TRANSFORM]=0===e?"":"translate3d("+e+"px, 0, 0)",d._currentDrag.content.style[a.CSS.TRANSFORM]="",d._currentDrag=null,c&&c()})};var k=function(a){this.dragThresholdY=a.dragThresholdY||0,this.onReorder=a.onReorder,this.el=a.el,this.scrollEl=a.scrollEl,this.scrollView=a.scrollView};k.prototype=new i,k.prototype._moveElement=function(b){var c=b.gesture.center.pageY-this._currentDrag.elementHeight/2;this.el.style[a.CSS.TRANSFORM]="translate3d(0, "+c+"px, 0)"},k.prototype.start=function(b){var c=(this.el.offsetTop,a.DomUtil.getChildIndex(this.el,this.el.nodeName.toLowerCase())),d=this.el.offsetHeight,e=this.el.cloneNode(!0),h=(this.scrollEl||this.el).parentNode;e.classList.add(f),this.el.parentNode.insertBefore(e,this.el),this.el.classList.add(g),h.parentNode.appendChild(this.el),this._currentDrag={elementHeight:d,startIndex:c,placeholder:e,scrollHeight:scroll,list:e.parentNode},this._moveElement(b)},k.prototype.drag=a.animationFrameThrottle(function(a){if(this._currentDrag){var b=0,c=a.gesture.center.pageY;if(this.scrollView){var d=this.scrollEl;b=this.scrollView.getValues().top;var e=d.offsetTop,f=e-c+this._currentDrag.elementHeight/2,g=c+this._currentDrag.elementHeight/2-e-d.offsetHeight;a.gesture.deltaY<0&&f>0&&b>0&&this.scrollView.scrollBy(null,-f),a.gesture.deltaY>0&&g>0&&bthis.dragThresholdY&&(this._isDragging=!0),this._isDragging&&(this._moveElement(a),this._currentDrag.currentY=b+c-this._currentDrag.placeholder.parentNode.offsetTop,this._reorderItems())}}),k.prototype._reorderItems=function(){var b=(this._currentDrag.placeholder,Array.prototype.slice.call(this._currentDrag.placeholder.parentNode.children)),c=b.indexOf(this._currentDrag.placeholder),d=b[Math.max(0,c-1)],e=b[Math.min(b.length,c+1)],f=this._currentDrag.currentY;return d&&fe.offsetTop+e.offsetHeight/2?(a.DomUtil.swapNodes(e,this._currentDrag.placeholder),c+1):void 0},k.prototype.end=function(b,c){if(!this._currentDrag)return void(c&&c());var d=this._currentDrag.placeholder,e=a.DomUtil.getChildIndex(d,d.nodeName.toLowerCase());this.el.classList.remove(g),this.el.style[a.CSS.TRANSFORM]="",d.parentNode.insertBefore(this.el,d),d.parentNode.removeChild(d),this.onReorder&&this.onReorder(this.el,this._currentDrag.startIndex,e),this._currentDrag=null,c&&c()},a.views.ListView=a.views.View.inherit({initialize:function(b){var c=this;b=a.extend({onReorder:function(){},virtualRemoveThreshold:-200,virtualAddThreshold:200},b),a.extend(this,b),!this.itemHeight&&this.listEl&&(this.itemHeight=this.listEl.children[0]&&parseInt(this.listEl.children[0].style.height,10)),this.onRefresh=b.onRefresh||function(){},this.onRefreshOpening=b.onRefreshOpening||function(){},this.onRefreshHolding=b.onRefreshHolding||function(){},window.ionic.onGesture("touch",function(a){c._handleTouch(a)},this.el),window.ionic.onGesture("release",function(a){c._handleEndDrag(a)},this.el),window.ionic.onGesture("drag",function(a){c._handleDrag(a)},this.el),this._initDrag()},stopRefreshing:function(){var a=this.el.querySelector(".list-refresher");a.style.height="0px"},didScroll:function(a){if(this.isVirtual){var b=this.itemHeight,c=(this.listEl.children.length,a.target.scrollHeight),d=this.el.parentNode.offsetHeight,e=(a.scrollTop,Math.max(0,a.scrollTop+this.virtualRemoveThreshold)),f=Math.min(c,Math.abs(a.scrollTop)+d+this.virtualAddThreshold),g=Math.floor((f-e)/b),h=parseInt(Math.abs(e/b),10),i=parseInt(Math.abs(f/b),10);this._virtualItemsToRemove=Array.prototype.slice.call(this.listEl.children,0,h);{Array.prototype.slice.call(this.listEl.children,h,h+g)}this.renderViewport&&this.renderViewport(e,f,h,i)}},didStopScrolling:function(){if(this.isVirtual)for(var a=0;a5)return this._dragOp=new j({el:this.el}),this._dragOp.start(b),void b.preventDefault()}else{var d=this._getItem(b.target);if(d)return this._dragOp=new k({el:d,scrollEl:this.scrollEl,scrollView:this.scrollView,onReorder:function(a,b,d){c.onReorder&&c.onReorder(a,b,d)}}),this._dragOp.start(b),void b.preventDefault()}},_handleEndDrag:function(a){var b=this;if(this._dragOp){clearTimeout(this._touchTimeout);for(var c=b.el.querySelectorAll(".item"),d=0,e=c.length;e>d;d++)c[d].classList.remove("active");this._dragOp.end(a,function(){b._initDrag()})}},_handleDrag:function(a){(Math.abs(a.gesture.deltaX)>10||Math.abs(a.gesture.deltaY)>10)&&clearTimeout(this._touchTimeout),clearTimeout(this._touchTimeout),this.isDragging||this._dragOp||this._startDrag(a),this._dragOp&&(a.gesture.srcEvent.preventDefault(),this._dragOp.drag(a))},_handleTouch:function(c){var d=this,e=a.DomUtil.getParentOrSelfWithClass(c.target,b);e&&(this._touchTimeout=setTimeout(function(){for(var a=d.el.querySelectorAll(".item"),b=0,c=a.length;c>b;b++)a[b].classList.remove("active");e.classList.add("active")},250))}})}(ionic),function(a){"use strict";a.views.Loading=a.views.View.inherit({initialize:function(a){this.el=a.el,this.maxWidth=a.maxWidth||200,this.showDelay=a.showDelay||0,this._loadingBox=this.el.querySelector(".loading")},show:function(){var a=this;if(this._loadingBox){var b=a._loadingBox,c=Math.min(a.maxWidth,Math.max(window.outerWidth-40,b.offsetWidth));b.style.width=c+"px",b.style.marginLeft=-b.offsetWidth/2+"px",b.style.marginTop=-b.offsetHeight/2+"px",this._showDelayTimeout=window.setTimeout(function(){a.el.classList.add("active")},a.showDelay)}},hide:function(){this.el.offsetWidth,window.clearTimeout(this._showDelayTimeout),this.el.classList.remove("active")}})}(ionic),function(a){"use strict";a.views.Modal=a.views.View.inherit({initialize:function(b){b=a.extend({focusFirstInput:!1,unfocusOnHide:!0,focusFirstDelay:600},b),a.extend(this,b),this.el=b.el},show:function(){var a=this;this.el.classList.add("active"),this.focusFirstInput&&window.setTimeout(function(){var b=a.el.querySelector("input, textarea");b&&b.focus&&b.focus()},this.focusFirstDelay)},hide:function(){if(this.el.classList.remove("active"),this.unfocusOnHide){var a=this.el.querySelectorAll("input, textarea");window.setTimeout(function(){for(var b=0;bb?-r:b>u?r:0,0))}a.continuous&&n.transitions&&(g(e(u-1),-r,0),g(e(u+1),r,0)),n.transitions||(t.style.left=u*-r+"px"),o.style.visibility="visible",a.slidesChanged&&a.slidesChanged()}function c(){a.continuous?f(u-1):u&&f(u-1)}function d(){a.continuous?f(u+1):uu?b:u)-h-1),r*d,0);b=e(b),g(u,r*d,c||v),g(b,0,c||v),a.continuous&&g(e(b-d),-(r*d),0)}else b=e(b),i(u*-r,b*-r,c||v);u=b,m(a.callback&&a.callback(u,p[u]))}}function g(a,b,c){h(a,b,c),q[a]=b}function h(a,b,c){var d=p[a],e=d&&d.style;e&&(e.webkitTransitionDuration=e.MozTransitionDuration=e.msTransitionDuration=e.OTransitionDuration=e.transitionDuration=c+"ms",e.webkitTransform="translate("+b+"px,0)translateZ(0)",e.msTransform=e.MozTransform=e.OTransform="translateX("+b+"px)")}function i(b,c,d){if(!d)return void(t.style.left=c+"px");var e=+new Date,f=setInterval(function(){var g=+new Date-e;return g>d?(t.style.left=c+"px",y&&j(),a.transitionEnd&&a.transitionEnd.call(event,u,p[u]),void clearInterval(f)):void(t.style.left=(c-b)*(Math.floor(g/d*100)/100)+b+"px")},4)}function j(){w=setTimeout(d,y)}function k(){y=a.auto||0,clearTimeout(w)}var l=function(){},m=function(a){setTimeout(a||l,0)},n={addEventListener:!!window.addEventListener,touch:"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch,transitions:function(a){var b=["transitionProperty","WebkitTransition","MozTransition","OTransition","msTransition"];for(var c in b)if(void 0!==a.style[b[c]])return!0;return!1}(document.createElement("swipe"))},o=a.el;if(o){var p,q,r,s,t=o.children[0];a=a||{};var u=parseInt(a.startSlide,10)||0,v=a.speed||300;a.continuous=void 0!==a.continuous?a.continuous:!0;var w,x,y=a.auto||0,z={},A={},B={handleEvent:function(c){switch(("mousedown"==c.type||"mouseup"==c.type||"mousemove"==c.type)&&(c.touches=[{pageX:c.pageX,pageY:c.pageY}]),c.type){case"mousedown":this.start(c);break;case"touchstart":this.start(c);break;case"touchmove":this.move(c);break;case"mousemove":this.move(c);break;case"touchend":m(this.end(c));break;case"mouseup":m(this.end(c));break;case"webkitTransitionEnd":case"msTransitionEnd":case"oTransitionEnd":case"otransitionend":case"transitionend":m(this.transitionEnd(c));break;case"resize":m(b)}a.stopPropagation&&c.stopPropagation()},start:function(a){var b=a.touches[0];z={x:b.pageX,y:b.pageY,time:+new Date},x=void 0,A={},n.touch?(t.addEventListener("touchmove",this,!1),t.addEventListener("touchend",this,!1)):(t.addEventListener("mousemove",this,!1),t.addEventListener("mouseup",this,!1),document.addEventListener("mouseup",this,!1))},move:function(b){if(!(b.touches.length>1||b.scale&&1!==b.scale)){a.disableScroll&&b.preventDefault();var c=b.touches[0];A={x:c.pageX-z.x,y:c.pageY-z.y},"undefined"==typeof x&&(x=!!(x||Math.abs(A.x)0||u==p.length-1&&A.x<0?Math.abs(A.x)/r+1:1),h(u-1,A.x+q[u-1],0),h(u,A.x+q[u],0),h(u+1,A.x+q[u+1],0)))}},end:function(){var b=+new Date-z.time,c=Number(b)<250&&Math.abs(A.x)>20||Math.abs(A.x)>r/2,d=!u&&A.x>0||u==p.length-1&&A.x<0;a.continuous&&(d=!1);var f=A.x<0;x||(c&&!d?(f?(a.continuous?(g(e(u-1),-r,0),g(e(u+2),r,0)):g(u-1,-r,0),g(u,q[u]-r,v),g(e(u+1),q[e(u+1)]-r,v),u=e(u+1)):(a.continuous?(g(e(u+1),r,0),g(e(u-2),-r,0)):g(u+1,r,0),g(u,q[u]+r,v),g(e(u-1),q[e(u-1)]+r,v),u=e(u-1)),a.callback&&a.callback(u,p[u])):a.continuous?(g(e(u-1),-r,v),g(u,0,v),g(e(u+1),r,v)):(g(u-1,-r,v),g(u,0,v),g(u+1,r,v))),n.touch?(t.removeEventListener("touchmove",B,!1),t.removeEventListener("touchend",B,!1)):(t.removeEventListener("mousemove",B,!1),t.removeEventListener("mouseup",B,!1),document.removeEventListener("mouseup",B,!1))},transitionEnd:function(b){parseInt(b.target.getAttribute("data-index"),10)==u&&(y&&j(),a.transitionEnd&&a.transitionEnd.call(b,u,p[u]))}};this.setup=function(){b()},this.slide=function(a,b){k(),f(a,b)},this.prev=function(){k(),c()},this.next=function(){k(),d()},this.stop=function(){k()},this.getPos=function(){return u},this.getNumSlides=function(){return s},this.kill=function(){k(),t.style.width="",t.style.left="";for(var a=p.length;a--;){var b=p[a];b.style.width="",b.style.left="",n.transitions&&h(a,0,0)}n.addEventListener?(t.removeEventListener("touchstart",B,!1),t.removeEventListener("webkitTransitionEnd",B,!1),t.removeEventListener("msTransitionEnd",B,!1),t.removeEventListener("oTransitionEnd",B,!1),t.removeEventListener("otransitionend",B,!1),t.removeEventListener("transitionend",B,!1),window.removeEventListener("resize",B,!1)):window.onresize=null},this.load=function(){b(),y&&j(),n.addEventListener?(n.touch?t.addEventListener("touchstart",B,!1):t.addEventListener("mousedown",B,!1),n.transitions&&(t.addEventListener("webkitTransitionEnd",B,!1),t.addEventListener("msTransitionEnd",B,!1),t.addEventListener("oTransitionEnd",B,!1),t.addEventListener("otransitionend",B,!1),t.addEventListener("transitionend",B,!1)),window.addEventListener("resize",B,!1)):window.onresize=function(){b()}}}}})}(ionic),function(a){"use strict";a.views.TabBarItem=a.views.View.inherit({initialize:function(a){this.el=a,this._buildItem() },create:function(b){var c=document.createElement("a");if(c.className="tab-item",b.icon){var d=document.createElement("i");d.className=b.icon,c.appendChild(d)}if(b.badge){var e=document.createElement("i");e.className="badge",e.innerHTML=b.badge,c.appendChild(e),c.className="tab-item has-badge"}return c.appendChild(document.createTextNode(b.title)),new a.views.TabBarItem(c)},_buildItem:function(){for(var b,c=this,d=Array.prototype.slice.call(this.el.children),e=0,f=d.length;f>e;e++)b=d[e],"i"==b.tagName.toLowerCase()&&/icon/.test(b.className)&&(this.icon=b.className),"i"==b.tagName.toLowerCase()&&/badge/.test(b.className)&&(this.badge=b.textContent.trim());for(this.title="",e=0,f=this.el.childNodes.length;f>e;e++)b=this.el.childNodes[e],"#text"===b.nodeName&&(this.title+=b.nodeValue.trim());this._tapHandler=function(a){c.onTap&&c.onTap(a)},a.on("tap",this._tapHandler,this.el)},onTap:function(){},destroy:function(){a.off("tap",this._tapHandler,this.el)},getIcon:function(){return this.icon},getTitle:function(){return this.title},getBadge:function(){return this.badge},setSelected:function(a){this.isSelected=a,a?this.el.classList.add("active"):this.el.classList.remove("active")}}),a.views.TabBar=a.views.View.inherit({initialize:function(a){this.el=a.el,this.items=[],this._buildItems()},getItems:function(){return this.items},addItem:function(b){var c=a.views.TabBarItem.prototype.create(b);this.appendItemElement(c),this.items.push(c),this._bindEventsOnItem(c)},appendItemElement:function(a){this.el&&this.el.appendChild(a.el)},removeItem:function(a){var b=this.items[a];b&&(b.onTap=void 0,b.destroy())},_bindEventsOnItem:function(a){var b=this;this._itemTapHandler||(this._itemTapHandler=function(){b.trySelectItem(this)}),a.onTap=this._itemTapHandler},getSelectedItem:function(){return this.selectedItem},setSelectedItem:function(a){this.selectedItem=this.items[a];for(var b=0,c=this.items.length;c>b;b+=1)this.items[b].setSelected(!1);this.selectedItem&&this.selectedItem.setSelected(!0)},selectItem:function(a){for(var b=0,c=this.items.length;c>b;b+=1)if(this.items[b]==a)return void this.setSelectedItem(b)},trySelectItem:function(a){for(var b=0,c=this.items.length;c>b;b+=1)if(this.items[b]==a)return void(this.tryTabSelect&&this.tryTabSelect(b))},_buildItems:function(){for(var b,c=Array.prototype.slice.call(this.el.children),d=0,e=c.length;e>d;d+=1)b=new a.views.TabBarItem(c[d]),this.items[d]=b,this._bindEventsOnItem(b);this.items.length>0&&(this.selectedItem=this.items[0])},destroy:function(){for(var a=0,b=this.items.length;b>a;a+=1)this.items[a].destroy();this.items.length=0}})}(window.ionic),function(a){"use strict";a.views.Toggle=a.views.View.inherit({initialize:function(a){this.el=a.el,this.checkbox=a.checkbox,this.track=a.track,this.handle=a.handle,this.openPercent=-1},tap:function(){"disabled"!==this.el.getAttribute("disabled")&&this.val(!this.checkbox.checked)},drag:function(a){var b=this.track.offsetLeft+this.handle.offsetWidth/2,c=this.track.offsetLeft+this.track.offsetWidth-this.handle.offsetWidth/2;a.pageX>=c-4?this.val(!0):a.pageX<=b?this.val(!1):this.setOpenPercent(Math.round(100*(1-(c-a.pageX)/(c-b))))},setOpenPercent:function(b){if(this.openPercent<0||bthis.openPercent+3)if(this.openPercent=b,0===b)this.val(!1);else if(100===b)this.val(!0);else{var c=Math.round(b/100*this.track.offsetWidth-this.handle.offsetWidth);c=1>c?0:c,this.handle.style[a.CSS.TRANSFORM]="translate3d("+c+"px,0,0)"}},release:function(){this.val(this.openPercent>=50)},val:function(b){return(b===!0||b===!1)&&(""!==this.handle.style[a.CSS.TRANSFORM]&&(this.handle.style[a.CSS.TRANSFORM]=""),this.checkbox.checked=b,this.openPercent=b?100:0),this.checkbox.checked}})}(ionic),function(a){"use strict";a.controllers.ViewController=function(){this.initialize.apply(this,arguments)},a.controllers.ViewController.inherit=a.inherit,a.extend(a.controllers.ViewController.prototype,{initialize:function(){},destroy:function(){}})}(window.ionic),function(a){"use strict";a.controllers.NavController=a.controllers.ViewController.inherit({initialize:function(a){var b=this;this.navBar=a.navBar,this.content=a.content,this.controllers=a.controllers||[],this._updateNavBar(),this.navBar.shouldGoBack=function(){b.pop()}},getControllers:function(){return this.controllers},getTopController:function(){return this.controllers[this.controllers.length-1]},push:function(a){var b=this.controllers[this.controllers.length-1];this.controllers.push(a);var c=this.switchingController&&this.switchingController(a)||!0;if(c!==!1){b&&(b.isVisible=!1,b.visibilityChanged&&b.visibilityChanged("push"));var d=this.controllers[this.controllers.length-1];return d.isVisible=!0,d.visibilityChanged&&d.visibilityChanged(b?"push":"first"),this._updateNavBar(),a}},pop:function(){var a,b;if(!(this.controllers.length<2))return b=this.controllers.pop(),b&&(b.isVisible=!1,b.visibilityChanged&&b.visibilityChanged("pop")),a=this.controllers[this.controllers.length-1],a.isVisible=!0,a.visibilityChanged&&a.visibilityChanged("pop"),this._updateNavBar(),b},showNavBar:function(){this.navBar&&this.navBar.show()},hideNavBar:function(){this.navBar&&this.navBar.hide()},_updateNavBar:function(){this.getTopController()&&this.navBar&&(this.navBar.setTitle(this.getTopController().title),this.navBar.showBackButton(this.controllers.length>1?!0:!1))}})}(window.ionic),function(a){"use strict";a.controllers.SideMenuController=a.controllers.ViewController.inherit({initialize:function(a){var b=this;this.left=a.left,this.right=a.right,this.content=a.content,this.dragThresholdX=a.dragThresholdX||10,this._rightShowing=!1,this._leftShowing=!1,this._isDragging=!1,this.content&&(this.content.onDrag=function(a){b._handleDrag(a)},this.content.onEndDrag=function(a){b._endDrag(a)})},setContent:function(a){var b=this;this.content=a,this.content.onDrag=function(a){b._handleDrag(a)},this.content.endDrag=function(a){b._endDrag(a)}},toggleLeft:function(){this.content.enableAnimation();var a=this.getOpenAmount();this.openPercentage(a>0?0:100)},toggleRight:function(){this.content.enableAnimation();var a=this.getOpenAmount();this.openPercentage(0>a?0:-100)},close:function(){this.openPercentage(0)},getOpenAmount:function(){return this.content&&this.content.getTranslateX()||0},getOpenRatio:function(){var a=this.getOpenAmount();return a>=0?a/this.left.width:a/this.right.width},isOpen:function(){return 1==this.getOpenRatio()},getOpenPercentage:function(){return 100*this.getOpenRatio()},openPercentage:function(a){var b=a/100;if(this.left&&a>=0)this.openAmount(this.left.width*b);else if(this.right&&0>a){{this.right.width}this.openAmount(this.right.width*b)}},openAmount:function(a){var b=this.left&&this.left.width||0,c=this.right&&this.right.width||0;(!this.left||!this.left.isEnabled)&&a>0||(!this.right||!this.right.isEnabled)&&0>a||this._leftShowing&&a>b||this._rightShowing&&-c>a||(this.content.setTranslateX(a),a>=0?(this._leftShowing=!0,this._rightShowing=!1,this.right&&this.right.pushDown&&this.right.pushDown(),this.left&&this.left.bringUp&&this.left.bringUp()):(this._rightShowing=!0,this._leftShowing=!1,this.right&&this.right.bringUp&&this.right.bringUp(),this.left&&this.left.pushDown&&this.left.pushDown()))},snapToRest:function(a){this.content.enableAnimation(),this._isDragging=!1;var b=this.getOpenRatio();if(0!==b){var c=.3,d=a.gesture.velocityX,e=a.gesture.direction;this.openPercentage(b>0&&.5>b&&"right"==e&&c>d?0:b>.5&&"left"==e&&c>d?100:0>b&&b>-.5&&"left"==e&&c>d?0:.5>b&&"right"==e&&c>d?-100:"right"==e&&b>=0&&(b>=.5||d>c)?100:"left"==e&&0>=b&&(-.5>=b||d>c)?-100:0)}},_endDrag:function(a){this._isDragging&&this.snapToRest(a),this._startX=null,this._lastX=null,this._offsetX=null},_handleDrag:function(a){this._startX?this._lastX=a.gesture.touches[0].pageX:(this._startX=a.gesture.touches[0].pageX,this._lastX=this._startX),!this._isDragging&&Math.abs(this._lastX-this._startX)>this.dragThresholdX&&(this._startX=this._lastX,this._isDragging=!0,this.content.disableAnimation(),this._offsetX=this.getOpenAmount()),this._isDragging&&this.openAmount(this._offsetX+(this._lastX-this._startX))}})}(ionic),function(a){"use strict";a.controllers.TabBarController=a.controllers.ViewController.inherit({initialize:function(a){this.tabBar=a.tabBar,this._bindEvents(),this.controllers=[];for(var b=a.controllers||[],c=0;c=this.controllers.length)){var b=this.selectedController,c=this.selectedIndex;this.selectedController=this.controllers[a],this.selectedIndex=a,this._showController(a),this.tabBar.setSelectedItem(a),this.controllerChanged&&this.controllerChanged(b,c,this.selectedController,this.selectedIndex)}},_showController:function(a){for(var b,c=0,d=this.controllers.length;d>c;c++)b=this.controllers[c],b.isVisible=!1,b.visibilityChanged&&b.visibilityChanged();b=this.controllers[a],b.isVisible=!0,b.visibilityChanged&&b.visibilityChanged()},_clearSelected:function(){this.selectedController=null,this.selectedIndex=-1},getController:function(a){return this.controllers[a]},getControllers:function(){return this.controllers},getSelectedController:function(){return this.selectedController},getSelectedControllerIndex:function(){return this.selectedIndex},addController:function(a){this.controllers.push(a),this.tabBar.addItem({title:a.title,icon:a.icon,badge:a.badge}),this.selectedController||this.setSelectedController(0)},setControllers:function(a){this.controllers=a,this._clearSelected(),this.selectController(0)}})}(window.ionic);