text: !function(o,t,i){"use strict";t.module("cordovaData",["cordovaData.appAvailability","cordovaData.appVersion","cordovaData.battery","cordovaData.device","cordovaData.deviceMotion","cordovaData.deviceOrientation","cordovaData.geolocation","cordovaData.network"]),t.module("cordovaData.appAvailability",[]).directive("cordovaAppAvailability",["$document","$window","$timeout",function(o,n,e){function a(o,t,a){n.appAvailability.check(o,function(){e(function(){a!==i?t.appAvailability[a]=!0:t.appAvailability=!0})},function(){e(function(){a!==i?t.appAvailability[a]=!1:t.appAvailability=!1})})}return{restrict:"A",link:function(e,c,r){o[0].addEventListener("deviceready",function(){n.appAvailability.check!==i&&e.$watchCollection(r.cordovaAppAvailability,function(o){t.isString(o)?a(o,e):(t.isObject(o)||t.isArray(o))&&(e.appAvailability=t.isObject(o)?{}:[],t.forEach(o,function(o,t){a(o,e,t)}))})},!1)}}}]),t.module("cordovaData.appVersion",[]).directive("cordovaAppVersion",["$document","$window","$timeout",function(o,t,n){return{restrict:"A",link:function(e){o[0].addEventListener("deviceready",function(){n(function(){e.appVersion={},t.cordova.getAppVersion.getVersionNumber!==i&&t.cordova.getAppVersion.getVersionNumber(function(o){e.appVersion.number=o}),t.cordova.getAppVersion.getVersionCode!==i&&t.cordova.getAppVersion.getVersionCode(function(o){e.appVersion.code=o})})},!1)}}}]),t.module("cordovaData.battery",[]).directive("cordovaBattery",["$window","$timeout",function(o,t){return{restrict:"A",link:function(i){o.addEventListener("batterystatus",function(o){t(function(){i.battery={isPlugged:o.isPlugged,level:o.level}})},!1)}}}]),t.module("cordovaData.device",[]).directive("cordovaDevice",["$window","$document","$timeout",function(o,t,i){return{restrict:"A",link:function(n){t[0].addEventListener("deviceready",function(){i(function(){n.device=o.device})},!1)}}}]),t.module("cordovaData.deviceMotion",[]).directive("cordovaDeviceMotion",["$document","$window","$timeout",function(o,t,n){function e(o,e){return t.navigator.accelerometer.watchAcceleration(function(t){n(function(){o.deviceMotion=t})},function(){n(function(){o.deviceMotion=i})},e!==i?{frequency:e}:i)}return{restrict:"A",link:function(n,a,c){o[0].addEventListener("deviceready",function(){if(t.navigator.accelerometer.watchAcceleration!==i){var o;""===c.cordovaDeviceMotion?o=e(n):n.$watchCollection(c.cordovaDeviceMotion,function(a){o!==i&&t.navigator.accelerometer.clearWatch(o),o=e(n,a)}),n.$on("$destroy",function(){o!==i&&t.navigator.accelerometer.clearWatch(o)})}},!1)}}}]),t.module("cordovaData.deviceOrientation",[]).directive("cordovaDeviceOrientation",["$document","$window","$timeout",function(o,t,n){function e(o,e){return t.navigator.compass.watchHeading(function(t){n(function(){o.deviceOrientation=t})},function(){n(function(){o.deviceOrientation=i})},e)}return{restrict:"A",link:function(n,a,c){o[0].addEventListener("deviceready",function(){if(t.navigator.compass.watchHeading!==i){var o;""===c.cordovaDeviceOrientation?o=e(n):n.$watchCollection(c.cordovaDeviceOrientation,function(a){o!==i&&t.navigator.compass.clearWatch(o),o=e(n,a)}),n.$on("$destroy",function(){o!==i&&t.navigator.compass.clearWatch(o)})}},!1)}}}]),t.module("cordovaData.geolocation",[]).directive("cordovaGeolocation",["$document","$window","$timeout",function(o,t,n){function e(o,e){return t.navigator.geolocation.watchPosition(function(t){n(function(){o.geolocation=t})},function(){n(function(){o.geolocation=i})},e)}return{restrict:"A",link:function(n,a,c){o[0].addEventListener("deviceready",function(){if(t.navigator.geolocation.watchPosition!==i){var o;""===c.cordovaGeolocation?o=e(n):n.$watchCollection(c.cordovaGeolocation,function(a){o!==i&&t.navigator.geolocation.clearWatch(o),o=e(n,a)}),n.$on("$destroy",function(){o!==i&&t.navigator.geolocation.clearWatch(o)})}},!1)}}}]),t.module("cordovaData.network",[]).directive("cordovaNetwork",["$window","$document","$timeout",function(o,t,i){function n(t){i(function(){t.network=o.navigator.connection.type})}return{restrict:"A",link:function(o){t[0].addEventListener("deviceready",function(){n(o)},!1),t[0].addEventListener("online",function(){n(o)},!1),t[0].addEventListener("offline",function(){n(o)},!1)}}}])}(window,window.angular);