diff --git a/bower.json b/bower.json index 5c83ec57..01990848 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "availity-angular", "description": "Availity Angular SDK", - "version": "1.12.7", + "version": "1.13.0", "keywords": [ "availity", "angular", diff --git a/dist/availity-angular-ui-templates.js b/dist/availity-angular-ui-templates.js index b87bc334..b1724bf9 100644 --- a/dist/availity-angular-ui-templates.js +++ b/dist/availity-angular-ui-templates.js @@ -1,5 +1,5 @@ /** - * availity-angular v1.12.7 -- October-10 + * availity-angular v1.13.0 -- October-26 * Copyright 2016 Availity, LLC */ diff --git a/dist/availity-angular-ui-templates.min.js b/dist/availity-angular-ui-templates.min.js index 1dba2b1b..401c8338 100644 --- a/dist/availity-angular-ui-templates.min.js +++ b/dist/availity-angular-ui-templates.min.js @@ -1,5 +1,5 @@ /** - * availity-angular v1.12.7 -- October-10 + * availity-angular v1.13.0 -- October-26 * Copyright 2016 Availity, LLC */ diff --git a/dist/availity-angular-ui.js b/dist/availity-angular-ui.js index 00043dde..d803f0b5 100644 --- a/dist/availity-angular-ui.js +++ b/dist/availity-angular-ui.js @@ -1,9 +1,9 @@ /** - * availity-angular v1.12.7 -- October-10 + * availity-angular v1.13.0 -- October-26 * Copyright 2016 Availity, LLC */ -// Source: -v1/lib/ui/index.js +// Source: /lib/ui/index.js (function(root) { @@ -28,7 +28,7 @@ })(window); -// Source: -v1/lib/ui/templates/template.js +// Source: /lib/ui/templates/template.js (function(root) { 'use strict'; @@ -58,7 +58,7 @@ })(window); -// Source: -v1/lib/ui/modal/modal.js +// Source: /lib/ui/modal/modal.js (function(root) { 'use strict'; @@ -397,7 +397,7 @@ })(window); -// Source: -v1/lib/ui/validation/form.js +// Source: /lib/ui/validation/form.js /** * 1. All fields should be pristine on first load * 2. If field is modified an invalid the field should be marked with an error @@ -593,7 +593,7 @@ })(window); -// Source: -v1/lib/ui/validation/field.js +// Source: /lib/ui/validation/field.js (function(root) { 'use strict'; @@ -861,7 +861,7 @@ })(window); -// Source: -v1/lib/ui/popover/popover.js +// Source: /lib/ui/popover/popover.js (function(root) { 'use strict'; @@ -970,7 +970,7 @@ })(window); -// Source: -v1/lib/ui/tooltip/tooltip.js +// Source: /lib/ui/tooltip/tooltip.js (function(root) { 'use strict'; @@ -1079,7 +1079,7 @@ })(window); -// Source: -v1/lib/ui/validation/container.js +// Source: /lib/ui/validation/container.js (function(root) { 'use strict'; @@ -1124,7 +1124,7 @@ })(window); -// Source: -v1/lib/ui/validation/adapter-bootstrap.js +// Source: /lib/ui/validation/adapter-bootstrap.js (function(root) { 'use strict'; @@ -1224,7 +1224,7 @@ })(window); -// Source: -v1/lib/ui/validation/adapter.js +// Source: /lib/ui/validation/adapter.js (function(root) { 'use strict'; @@ -1274,7 +1274,7 @@ })(window); -// Source: -v1/lib/ui/dropdown/dropdown.js +// Source: /lib/ui/dropdown/dropdown.js (function(root) { 'use strict'; @@ -1764,7 +1764,7 @@ })(window); -// Source: -v1/lib/ui/datepicker/datepicker.js +// Source: /lib/ui/datepicker/datepicker.js /** * Inspiration https://github.com/mgcrea/angular-strap/blob/v0.7.8/src/directives/datepicker.js */ @@ -2013,7 +2013,7 @@ }); })(window); -// Source: -v1/lib/ui/idle/idle-notifier.js +// Source: /lib/ui/idle/idle-notifier.js (function(root) { 'use strict'; @@ -2159,7 +2159,7 @@ })(window); -// Source: -v1/lib/ui/mask/mask.js +// Source: /lib/ui/mask/mask.js (function(root) { 'use strict'; @@ -2199,7 +2199,7 @@ })(window); -// Source: -v1/lib/ui/permissions/has-permission.js +// Source: /lib/ui/permissions/has-permission.js (function(root) { 'use strict'; @@ -2248,7 +2248,7 @@ })(window); -// Source: -v1/lib/ui/analytics/analytics.js +// Source: /lib/ui/analytics/analytics.js (function(root) { 'use strict'; @@ -2334,7 +2334,7 @@ }); })(window); -// Source: -v1/lib/ui/placeholder/placeholder.js +// Source: /lib/ui/placeholder/placeholder.js (function(root) { 'use strict'; @@ -2371,7 +2371,7 @@ }); })(window); -// Source: -v1/lib/ui/breadcrumbs/breadcrumbs.js +// Source: /lib/ui/breadcrumbs/breadcrumbs.js (function(root) { 'use strict'; @@ -2486,7 +2486,7 @@ })(window); -// Source: -v1/lib/ui/breadcrumbs/breadcrumbs-spaces.js +// Source: /lib/ui/breadcrumbs/breadcrumbs-spaces.js (function(root) { 'use strict'; @@ -2542,7 +2542,7 @@ })(window); -// Source: -v1/lib/ui/filters/approximate.js +// Source: /lib/ui/filters/approximate.js (function(root) { 'use strict'; @@ -2569,7 +2569,7 @@ })(window); -// Source: -v1/lib/ui/accordion/accordion.js +// Source: /lib/ui/accordion/accordion.js (function(root) { 'use strict'; @@ -2825,7 +2825,7 @@ })(window); -// Source: -v1/lib/ui/badge/badge.js +// Source: /lib/ui/badge/badge.js (function(root) { 'use strict'; @@ -2867,7 +2867,7 @@ })(window); -// Source: -v1/lib/ui/labels/removable-label.js +// Source: /lib/ui/labels/removable-label.js (function(root) { 'use strict'; @@ -2898,7 +2898,7 @@ })(window); -// Source: -v1/lib/ui/animation/loader.js +// Source: /lib/ui/animation/loader.js (function(root) { 'use strict'; @@ -2976,7 +2976,7 @@ })(window); -// Source: -v1/lib/ui/block/block.js +// Source: /lib/ui/block/block.js (function(root) { 'use strict'; @@ -3060,7 +3060,7 @@ })(window); -// Source: -v1/lib/ui/block/block-directive.js +// Source: /lib/ui/block/block-directive.js (function(root) { 'use strict'; @@ -3087,7 +3087,7 @@ })(window); -// Source: -v1/lib/ui/tabs/tabs.js +// Source: /lib/ui/tabs/tabs.js /* * Inspired by https://github.com/angular-ui/bootstrap/blob/master/src/tabs/tabs.js */ @@ -3262,7 +3262,7 @@ })(window); -// Source: -v1/lib/ui/scroll-pagination/scroll-pagination.js +// Source: /lib/ui/scroll-pagination/scroll-pagination.js (function(root) { 'use strict'; @@ -3482,7 +3482,7 @@ })(window); -// Source: -v1/lib/ui/dimmer/dimmer.js +// Source: /lib/ui/dimmer/dimmer.js // Original => http://bootsnipp.com/snippets/78VV (function(root) { diff --git a/dist/availity-angular-ui.min.js b/dist/availity-angular-ui.min.js index d784e0a7..4a6ff500 100644 --- a/dist/availity-angular-ui.min.js +++ b/dist/availity-angular-ui.min.js @@ -1,5 +1,5 @@ /** - * availity-angular v1.12.7 -- October-10 + * availity-angular v1.13.0 -- October-26 * Copyright 2016 Availity, LLC */ diff --git a/dist/availity-angular.js b/dist/availity-angular.js index 35bf88e6..9e1e97b3 100644 --- a/dist/availity-angular.js +++ b/dist/availity-angular.js @@ -1,9 +1,9 @@ /** - * availity-angular v1.12.7 -- October-10 + * availity-angular v1.13.0 -- October-26 * Copyright 2016 Availity, LLC */ -// Source: -v1/lib/core/index.js +// Source: /lib/core/index.js (function(root) { @@ -11,7 +11,7 @@ 'use strict'; var availity = root.availity || {}; - availity.VERSION = 'v1.12.7'; + availity.VERSION = 'v1.13.0'; availity.MODULE = 'availity'; availity.core = angular.module(availity.MODULE, ['ng']); @@ -38,7 +38,7 @@ })(window); -// Source: -v1/lib/core/utils/strings.js +// Source: /lib/core/utils/strings.js (function(root) { 'use strict'; @@ -60,7 +60,7 @@ })(window); -// Source: -v1/lib/core/utils/uuid.js +// Source: /lib/core/utils/uuid.js (function(root) { 'use strict'; @@ -93,7 +93,7 @@ })(window); -// Source: -v1/lib/core/utils/urls.js +// Source: /lib/core/utils/urls.js (function(root) { 'use strict'; @@ -113,7 +113,7 @@ })(window); -// Source: -v1/lib/core/utils/print.js +// Source: /lib/core/utils/print.js (function(root) { 'use strict'; @@ -133,7 +133,7 @@ })(window); -// Source: -v1/lib/core/utils/throttle.js +// Source: /lib/core/utils/throttle.js // Original => https://github.com/mgcrea/angular-strap/blob/master/src/helpers/debounce.js (function(root) { @@ -188,7 +188,7 @@ })(window); -// Source: -v1/lib/core/logger/logger.js +// Source: /lib/core/logger/logger.js // Orginal => https://github.com/ericzon/angular-ny-logger/blob/0c594e864c93e7f33d36141200096bc6139ddde1/angular-ny-logger.js (function(root) { @@ -361,7 +361,7 @@ })(window); -// Source: -v1/lib/core/logger/logger-config.js +// Source: /lib/core/logger/logger-config.js (function(root) { 'use strict'; @@ -378,7 +378,7 @@ })(window); -// Source: -v1/lib/core/polling/polling.js +// Source: /lib/core/polling/polling.js (function(root) { 'use strict'; @@ -636,7 +636,7 @@ })(window); -// Source: -v1/lib/core/api/api-factory.js +// Source: /lib/core/api/api-factory.js (function(root) { 'use strict'; @@ -984,7 +984,7 @@ })(window); -// Source: -v1/lib/core/api/api-users.js +// Source: /lib/core/api/api-users.js (function(root) { 'use strict'; @@ -1017,7 +1017,7 @@ })(window); -// Source: -v1/lib/core/api/api-coverages.js +// Source: /lib/core/api/api-coverages.js (function(root) { 'use strict'; @@ -1030,7 +1030,7 @@ })(window); -// Source: -v1/lib/core/api/api-configurations.js +// Source: /lib/core/api/api-configurations.js (function(root) { 'use strict'; @@ -1043,7 +1043,7 @@ })(window); -// Source: -v1/lib/core/api/api-log-messages.js +// Source: /lib/core/api/api-log-messages.js (function(root) { 'use strict'; @@ -1102,7 +1102,7 @@ })(window); -// Source: -v1/lib/core/api/api-spaces.js +// Source: /lib/core/api/api-spaces.js (function(root) { 'use strict'; @@ -1125,7 +1125,7 @@ })(window); -// Source: -v1/lib/core/api/api-documents.js +// Source: /lib/core/api/api-documents.js (function(root) { 'use strict'; @@ -1160,7 +1160,7 @@ })(window); -// Source: -v1/lib/core/api/api-organizations.js +// Source: /lib/core/api/api-organizations.js (function(root) { 'use strict'; @@ -1190,7 +1190,7 @@ })(window); -// Source: -v1/lib/core/api/api-codes.js +// Source: /lib/core/api/api-codes.js (function(root) { 'use strict'; @@ -1258,7 +1258,7 @@ })(window); -// Source: -v1/lib/core/api/api-user-permissions.js +// Source: /lib/core/api/api-user-permissions.js (function(root) { 'use strict'; @@ -1303,7 +1303,7 @@ })(window); -// Source: -v1/lib/core/authorizations/user-authorizations.js +// Source: /lib/core/authorizations/user-authorizations.js (function(root) { 'use strict'; @@ -1445,7 +1445,7 @@ })(window); -// Source: -v1/lib/core/session/session.js +// Source: /lib/core/session/session.js (function(root) { 'use strict'; @@ -1489,7 +1489,7 @@ })(window); -// Source: -v1/lib/core/idle/idle.js +// Source: /lib/core/idle/idle.js // Inspiration => https://github.com/HackedByChinese/ng-idle // // Rules: @@ -1791,7 +1791,7 @@ })(window); -// Source: -v1/lib/core/idle/idle-interceptor.js +// Source: /lib/core/idle/idle-interceptor.js (function(root) { 'use strict'; @@ -1816,7 +1816,7 @@ })(window); -// Source: -v1/lib/core/validation/validator.js +// Source: /lib/core/validation/validator.js (function(root) { 'use strict'; @@ -1977,7 +1977,7 @@ }); })(window); -// Source: -v1/lib/core/validation/validators/validator-utils.js +// Source: /lib/core/validation/validators/validator-utils.js (function(root) { 'use strict'; @@ -2001,7 +2001,7 @@ })(window); -// Source: -v1/lib/core/validation/validators/validator-size.js +// Source: /lib/core/validation/validators/validator-size.js (function(root) { 'use strict'; @@ -2044,7 +2044,7 @@ }); })(window); -// Source: -v1/lib/core/validation/validators/validator-pattern.js +// Source: /lib/core/validation/validators/validator-pattern.js (function(root) { 'use strict'; @@ -2090,7 +2090,7 @@ }); })(window); -// Source: -v1/lib/core/validation/validators/validator-required.js +// Source: /lib/core/validation/validators/validator-required.js (function(root) { 'use strict'; @@ -2130,7 +2130,7 @@ }); })(window); -// Source: -v1/lib/core/validation/validators/validator-date-range.js +// Source: /lib/core/validation/validators/validator-date-range.js (function(root) { 'use strict'; @@ -2202,7 +2202,7 @@ }); })(window); -// Source: -v1/lib/core/validation/validators/validator-date-format.js +// Source: /lib/core/validation/validators/validator-date-format.js (function(root) { 'use strict'; @@ -2223,7 +2223,7 @@ }); })(window); -// Source: -v1/lib/core/validation/validators/validator-npi.js +// Source: /lib/core/validation/validators/validator-npi.js (function(root) { 'use strict'; @@ -2293,7 +2293,7 @@ })(window); -// Source: -v1/lib/core/validation/validators/validator-phone.js +// Source: /lib/core/validation/validators/validator-phone.js (function(root) { 'use strict'; @@ -2315,7 +2315,7 @@ }); })(window); -// Source: -v1/lib/core/validation/validators/validator-email.js +// Source: /lib/core/validation/validators/validator-email.js (function(root) { 'use strict'; @@ -2337,7 +2337,7 @@ }); })(window); -// Source: -v1/lib/core/utils/globals.js +// Source: /lib/core/utils/globals.js (function(root) { 'use strict'; @@ -2555,7 +2555,7 @@ })(window); -// Source: -v1/lib/core/analytics/analytics.js +// Source: /lib/core/analytics/analytics.js (function(root) { 'use strict'; @@ -2725,7 +2725,7 @@ })(window); -// Source: -v1/lib/core/analytics/analytics-util.js +// Source: /lib/core/analytics/analytics-util.js (function(root) { 'use strict'; @@ -2815,7 +2815,7 @@ }); })(window); -// Source: -v1/lib/core/analytics/analytics-splunk.js +// Source: /lib/core/analytics/analytics-splunk.js (function(root) { 'use strict'; @@ -2854,7 +2854,7 @@ })(window); -// Source: -v1/lib/core/analytics/analytics-piwik.js +// Source: /lib/core/analytics/analytics-piwik.js (function(root) { 'use strict'; @@ -2997,7 +2997,7 @@ })(window); -// Source: -v1/lib/core/analytics/analytics-exceptions.js +// Source: /lib/core/analytics/analytics-exceptions.js (function(root) { @@ -3012,7 +3012,8 @@ }, TYPES: { EXCEPTION: 'exception' - } + }, + REPEAT_LIMIT_TIME: 5000 }); availity.core.provider('avExceptionAnalytics', function() { @@ -3052,6 +3053,7 @@ self.onError(stacktrace); }); + this.messageTimestampMap = {}; }; proto.prettyPrint = function(stacktrace) { @@ -3113,12 +3115,32 @@ return; } + // If we've already logged this error recently, don't log it again (no need to spam the API) + if (this._isRepeatError(exception)) { + return; + } + var stacktrace = TraceKit.computeStackTrace(exception); return this.onError(stacktrace); }; + // Check to see if this error was reported within the last 5 seconds + proto._isRepeatError = function(exception) { + var timestamp = moment(); + var message = exception.message; + var lastTimestamp = this.messageTimestampMap[message]; + var isRepeat = false; + + if (lastTimestamp && timestamp.diff(lastTimestamp) < AV_EXCEPTIONS.REPEAT_LIMIT_TIME) { + isRepeat = true; + } + + this.messageTimestampMap[message] = timestamp; + return isRepeat; + }; + return new AvExceptionAnalytics(); }; @@ -3142,7 +3164,7 @@ })(window); -// Source: -v1/lib/core/analytics/analytics-config.js +// Source: /lib/core/analytics/analytics-config.js (function(root) { 'use strict'; @@ -3160,7 +3182,7 @@ })(window); -// Source: -v1/lib/core/utils/date-polyfill.js +// Source: /lib/core/utils/date-polyfill.js // Issue: https://github.com/angular/angular.js/issues/11165 // Polyfill: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString // @@ -3196,7 +3218,7 @@ })(window); -// Source: -v1/lib/core/messages/messages-constants.js +// Source: /lib/core/messages/messages-constants.js (function(root) { 'use strict'; @@ -3232,7 +3254,7 @@ })(window); -// Source: -v1/lib/core/messages/messages.js +// Source: /lib/core/messages/messages.js // https://github.com/kylewelsby/angular-post-message/blob/master/src/angular-post-message.js diff --git a/dist/availity-angular.min.js b/dist/availity-angular.min.js index 782a845d..4bab4d9a 100644 --- a/dist/availity-angular.min.js +++ b/dist/availity-angular.min.js @@ -1,8 +1,8 @@ /** - * availity-angular v1.12.7 -- October-10 + * availity-angular v1.13.0 -- October-26 * Copyright 2016 Availity, LLC */ -(function(root){"use strict";var availity=root.availity||{};availity.VERSION="v1.12.7";availity.MODULE="availity";availity.core=angular.module(availity.MODULE,["ng"]);var originalModule=angular.module;var modules=[];angular.module=function(name,deps){if(deps&&_.indexOf(modules,name)!==-1&&!window.__karma__){throw new Error("redefining module: "+name)}modules.push(name);return originalModule(name,deps)};root.availity=availity;if(typeof module!=="undefined"&&module.exports){module.exports=availity}})(window);(function(root){"use strict";var availity=root.availity;availity._stringify=function(object){if(object===null){return""}return""+object};availity.isBlank=function(str){return/^\s*$/.test(availity._stringify(str))}})(window);(function(root){"use strict";var availity=root.availity;var uid=["0","0","0"];availity.uuid=function(prefix){var index=uid.length;var digit;while(index){index--;digit=uid[index].charCodeAt(0);if(digit===57){uid[index]="A";return prefix?prefix+uid.join(""):uid.join("")}if(digit===90){uid[index]="0"}else{uid[index]=String.fromCharCode(digit+1);return prefix?prefix+uid.join(""):uid.join("")}}uid.unshift("0");return prefix?prefix+uid.join(""):uid.join("")}})(window);(function(root){"use strict";var availity=root.availity;availity.REGEX_API_URL=/^.*?api.availity.com(.*)$/;availity.getRelativeUrl=function(url){var result=url.match(availity.REGEX_API_URL);if(result&&result[1]){return"/api"+result[1]}return url}})(window);(function(root){"use strict";var availity=root.availity;availity.print=function(){if(document.queryCommandSupported("print")){document.execCommand("print",false,null)}else{window.focus();window.print()}}})(window);(function(root){"use strict";var availity=root.availity;availity.core.constant("AV_THROTTLE",{OPTIONS:{wait:1e3,update:false,trailing:true,leading:false}});availity.core.factory("avThrottle",function(AV_THROTTLE,$timeout){return function(fn,wait,options){options=_.merge({},AV_THROTTLE.OPTIONS,options);wait=wait?wait:AV_THROTTLE.THRESHOLD;var update=angular.isDefined(options.update)?options.update:AV_THROTTLE.UPDATE;var timer=null;return function(){var context=options.context||this;var args=arguments;if(!timer){if(options.leading!==false){fn.apply(context,args)}var later=function(){timer=null;if(options.trailing!==false){fn.apply(context,args)}};timer=$timeout(later,wait,update)}return timer}}})})(window);(function(root){"use strict";var availity=root.availity;availity.core.provider("AvLogger",function(){var _enabled=false;this.enabled=function(enabled){_enabled=!!enabled};this.$get=function($injector){var AvLogger=function(context,$delegate){this.context=context||"";this.$log=$delegate};var proto=AvLogger.prototype;AvLogger.supplant=function(str,supplantData){if(!supplantData){return str}var _supplant=function(match,key){var result=supplantData[key];return result};return str.replace(/\{([^{}]*)\}/g,_supplant)};AvLogger.isObject=function(element){var elemStr=!angular.isUndefined(element)&&!angular.isUndefined(element.constructor)?element.constructor.toString():"";return elemStr.indexOf("Object")>-1};AvLogger.getFormattedTimestamp=function(date){return AvLogger.supplant("{0}:{1}:{2}:{3}",[date.getHours(),date.getMinutes(),date.getSeconds(),date.getMilliseconds()])};proto._log=function(originalFn,args){var hash=window.location.hash;hash=hash||"";if(!_enabled&&hash.indexOf("avLogger")<0&&originalFn!=="error"){return}var now=AvLogger.getFormattedTimestamp(new Date);var message="";var supplantData=[];var context=this.context?" ["+this.context+"] ":"";switch(args.length){case 1:supplantData=args[0];message=AvLogger.supplant("{0}{1} - {2}",[now,context,args[0]]);break;case 3:supplantData=args[2];message=AvLogger.supplant("{0}{1} - {2}('{3}')",[now,context,args[0],args[1]]);break;case 2:if(typeof args[1]==="string"){message=AvLogger.supplant("{0}{1} - {2}('{3}')",[now,context,args[0],args[1]])}else{if(args[0].stack){var errorMessage=this.formatError(args[0]);message=AvLogger.supplant("{0}{1} - {2}",[now,context,errorMessage]);supplantData=args[1]}else{supplantData=args[1]}}break}var $log=this.$log||$injector.get("$log");var params=AvLogger.isObject(supplantData)?[message,supplantData]:[AvLogger.supplant(message,supplantData)];$log[originalFn].apply(null,params)};proto.log=function(){this._log("log",arguments)};proto.info=function(){this._log("info",arguments)};proto.warn=function(){this._log("warn",arguments)};proto.debug=function(){this._log("debug",arguments)};proto.formatError=function(arg){if(arg instanceof Error){if(arg.stack){arg=arg.message&&arg.stack.indexOf(arg.message)===-1?"Error: "+arg.message+"\n"+arg.stack:arg.stack}else if(arg.sourceURL){arg=arg.message+"\n"+arg.sourceURL+":"+arg.line}}return arg};proto.error=function(){this._log("error",arguments)};return AvLogger}})})(window);(function(root){"use strict";var availity=root.availity;availity.core.config(function($provide){$provide.decorator("$log",function($delegate,AvLogger){return new AvLogger(null,$delegate)})})})(window);(function(root){"use strict";var availity=root.availity;availity.core.constant("AV_POLLING",{INTERVAL:1e3,MAX_ELAPSED_TIME:5e3,MAX_RETRY:30,DECAY:1.2,EVENTS:{MAX_RETRY:"av:polling:max:retry"},REGEX_URL:/^.*?api.availity.com(.*)$/});var PollingServiceFactory=function($rootScope,$q,$injector,$timeout,$log,AV_POLLING,AV_API){var AvPollingService=function(){this.pendingRequests=[]};var proto=AvPollingService.prototype;proto.response=function(response){if(this.isAsyncResponse(response)){return this.onAsyncReponse(response)}return response||$q.when(response)};proto.setDefaults=function(config){var defaultOptions={pollingInterval:AV_POLLING.INTERVAL,pollingDecay:AV_POLLING.DECAY,pollingMaxInterval:AV_POLLING.MAX_ELAPSED_TIME,pollingRetryCount:0,pollingStartTime:(new Date).getTime()};return _.extend(defaultOptions,config)};proto.responseError=function(response){return $q.reject(response)};proto.isAsyncResponse=function(response){return response&&response.config&&response.config.api&&response.status&&response.status===202&&angular.isFunction(response.headers)&&!availity.isBlank(response.headers(AV_API.HEADERS.SERVER.LOCATION))};proto.onAsyncReponse=function(response){response.config=this.setDefaults(response.config);var deferred=$q.defer();this.queueRequest(deferred,response);$timeout(function(){deferred.notify(response)},0,false);return deferred.promise};proto.getUrl=function(url){var result=url.match(AV_POLLING.REGEX_URL);if(result&&result[1]){return"/api"+result[1]}return url};proto.queueRequest=function(deferred,response){var self=this;var _url=availity.getRelativeUrl(response.headers(AV_API.HEADERS.SERVER.LOCATION));var _config=response.config;var config={method:"GET",api:true,headers:_config.headers,pollingInterval:_config.pollingInterval,pollingMaxRetry:_config.pollingMaxRetry,pollingMaxInterval:_config.pollingMaxInterval,pollingStartTime:_config.pollingStartTime,_pollingDecay:_config._pollingDecay,pollingRetryCount:_config.pollingRetryCount,pollingDecay:_config.pollingDecay,url:_url,cache:false};var request={id:availity.uuid("request-"),config:config,deferred:deferred};var timeout=this.getPollingTimeout(config);var timer=$timeout(function(){self.retryRequest(request.id)},timeout,false);request.timer=timer;this.pushRequest(request)};proto.popRequest=function(id){var index=null;var request=null;for(var i=0;iconfig.pollingMaxInterval;return isElapsed},proto.isMaxRetried=function(config){return config.pollingRetryCount>=AV_POLLING.MAX_RETRY};proto.isPollable=function(config){var _isTimeout=this.isPollingMaxTimeout(config);var _isMax=this.isMaxRetried(config);return _isTimeout||_isMax?false:true};proto.retryRequest=function(id){var self=this;var request=this.popRequest(id);$timeout.cancel(request.timer);var config=request.config;var deferred=request.deferred;if(!this.isPollable(config)){$log.info("Rejecting pollable response due to timeout");return deferred.reject(request)}this.increment(config);function successCallback(response){if(self.isAsyncResponse(response)){deferred.notify(response);self.queueRequest(request.deferred,response)}else{deferred.resolve(response)}}function errorCallback(response){deferred.reject(response)}var $http=$injector.get("$http");$http(config).then(successCallback,errorCallback)};proto.increment=function(config){this.incrementCounter(config);this.incrementDecay(config)};proto.incrementDecay=function(config){if(!config._pollingDecay){config._pollingDecay=config.pollingDecay}config.pollingDecay*=config._pollingDecay};proto.incrementCounter=function(config){config.pollingRetryCount++};proto.clearRequests=function(){angular.forEach(this.pendingRequests,function(request){$timeout.cancel(request.timer)});this.pendingRequests=[]};return new AvPollingService};availity.core.factory("avPollingService",PollingServiceFactory)})(window);(function(root){"use strict";var availity=root.availity;availity.core.constant("AV_API",{HEADERS:{SERVER:{ID:"X-API-ID",LOCATION:"Location",STATUS:"X-Status-Message",GLOBAL_ID:"X-Global-Transaction-ID"},CLIENT:{SESSION_ID:"X-Session-ID",AUTH:"Authorization",OVERRIDE:"X-HTTP-Method-Override",CALLBACK_URL:"X-Callback-URL",CUSTOMER_ID:"X-Availity-Customer-ID",RESPONSE_ENCODING:"X-Response-Encoding-Context"}},OPTIONS:{prefix:"",path:"/api",resourceGroup:"",url:null,version:"/v1",level:"",suffix:"",cache:true,api:true,pollingRetryCount:0,pollingInterval:1e3,pollingDecay:1.2,pollingMaxInterval:3e4,headers:{"X-Response-Encoding-Context":"NONE"}}});var ApiResourcesProvider=function(AV_API){var defaultOptions=_.merge({},AV_API.OPTIONS);this.setOptions=function(options){_.merge(defaultOptions,options)};this.getOptions=function(){return angular.copy(defaultOptions)};this.setHttpCommonHeaders=function($httpProvider){_.merge($httpProvider.defaults.headers.common,defaultOptions.headers)};this.$get=function($http,$q,avPollingService){var AvApiResource=function(options){if(!options){throw new Error("[options] cannot be null or undefined")}if(angular.isString(options)){options=options.charAt(0)==="/"?options:"/"+options;options=angular.extend({},{url:options})}if(!options.url){throw new Error("[url] cannot be null")}this.options=angular.extend({},defaultOptions,options||{})};var proto=AvApiResource.prototype;proto._config=function(config){return _.merge({},this.options,config||{})};proto._cacheBust=function(config){config.cacheBust=null;config.params=config.params||{};config.params.cacheBust=(new Date).getTime();return config};proto._getUrl=function(id){if(this.options.api){return this._getApiUrl(id)}return this.options.url};proto._createResponse=function(data,status,headers,config){return{data:data,status:status,headers:headers,config:config}};proto._request=function(config,afterCallback){var self=this;var defer=$q.defer();$http(config).success(function(data,status,headers,_config){var _response={data:data,status:status,headers:headers,config:_config};var _promise=$q.when(avPollingService.response(_response));defer.notify(_response);_promise.then(function(successResponse){if(afterCallback){successResponse=afterCallback.call(self,successResponse,config.data)}defer.resolve(successResponse)},function(errorResponse){defer.reject(errorResponse)},function(notifyResponse){defer.notify(notifyResponse)})}).error(function(data,status,headers,_config){var response=self._createResponse(data,status,headers,_config);defer.reject(response)});var promise=defer.promise;promise.success=function(fn){promise.then(function(response){fn(response.data,response.status,response.headers,response.config)});return promise};promise.error=function(fn){promise.then(null,function(response){fn(response.data,response.status,response.headers,config)});return promise};promise.always=promise["finally"];return promise};proto.normalize=function(url){return url.replace(/[\/]+/g,"/").replace(/\/$/,"")};proto.join=function(){var joined=[].slice.call(arguments,0).join("/");return this.normalize(joined)};proto._getApiUrl=function(id){id=id?"/"+id:"";var url=this.join(this.options.prefix,this.options.path,this.options.level,this.options.resourceGroup,this.options.version,this.options.url,id);return url+this.options.suffix};proto.create=function(data,config){if(!data){throw new Error("called method without [data]")}if(this.beforeCreate){data=this.beforeCreate(data)}config=this._config(config);config.method="POST";config.url=this._getUrl();config.data=data;return this._request(config,this.afterCreate)};proto.get=function(id,config){if(!id){throw new Error("called method without [id]")}config=this._config(config);if(config.cacheBust){config=this._cacheBust(config)}config.method="GET";config.url=this._getUrl(id);return this._request(config,this.afterGet)};proto.query=function(config){config=this._config(config);if(config.cacheBust){config=this._cacheBust(config)}config.method="GET";config.url=this._getUrl();return this._request(config,this.afterQuery)};proto.update=function(id,data,config){var url;if(_.isString(id)||_.isNumber(id)){url=this._getUrl(id)}else{url=this._getUrl();config=data;data=id}if(this.beforeUpdate){data=this.beforeUpdate(data)}config=this._config(config);config.method="PUT";config.url=url;config.data=data;return this._request(config,this.afterUpdate)};proto.remove=function(id,config){var url;var data;if(_.isString(id)||_.isNumber(id)){url=this._getUrl(id)}else{url=this._getUrl();data=id}config=this._config(config);config.method="DELETE";config.url=url;config.data=data;return this._request(config,this.afterRemove)};proto.beforeCreate=null;proto.afterCreate=null;proto.afterQuery=null;proto.afterGet=null;proto.beforeUpdate=null;proto.afterUpdate=null;proto.afterRemove=null;return AvApiResource}};availity.core.provider("AvApiResource",ApiResourcesProvider)})(window);(function(root){"use strict";var availity=root.availity;var UserServiceFactory=function(AvApiResource){var AvUsersResource=function(){AvApiResource.call(this,"users")};angular.extend(AvUsersResource.prototype,AvApiResource.prototype,{afterGet:function(response){var user=response.data.user?response.data.user:response.data;return user},me:function(config){return this.get("me",config)}});return new AvUsersResource};availity.core.factory("avUsersResource",UserServiceFactory)})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avCoveragesResource",function(AvApiResource){return new AvApiResource({version:"/v1",url:"/configurations",cache:false})})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avConfigurationsResource",function(AvApiResource){return new AvApiResource({version:"/v1",url:"/configurations"})})})(window);(function(root){"use strict";var availity=root.availity;var LogMessagesFactory=function(AvApiResource){var AvLogMessagesResource=function(){AvApiResource.call(this,{version:"/v1",url:"/log-messages"})};angular.extend(AvLogMessagesResource.prototype,AvApiResource.prototype,{buildRequest:function(level,entries){var requestPayload={};if(entries.level){delete entries.level}requestPayload.level=level;requestPayload.entries=entries;return requestPayload},debug:function(entries){return this.create(this.buildRequest("debug",entries))},info:function(entries){return this.create(this.buildRequest("info",entries))},warn:function(entries){return this.create(this.buildRequest("warn",entries))},error:function(entries){return this.create(this.buildRequest("error",entries))}});return new AvLogMessagesResource};availity.core.factory("avLogMessagesResource",LogMessagesFactory)})(window);(function(root){"use strict";var availity=root.availity;var SpacesFactory=function(AvApiResource){return new AvApiResource({path:"/api/sdk",level:"/platform",version:"/v1",url:"/spaces"})};availity.core.factory("avSpacesResource",SpacesFactory)})(window);(function(root){"use strict";var availity=root.availity;var AvDocumentsResourceFactory=function(AvApiResource){var AvDocumentsResource=function(){AvApiResource.call(this,"documents")};angular.extend(AvDocumentsResource.prototype,AvApiResource.prototype,{getContents:function(id){var config=this._config();config.url=this.getContentsUrl(id);return this._request(config)},getContentsUrl:function(id){return this._getUrl(id)+"/contents"}});return new AvDocumentsResource};availity.core.factory("avDocumentsResource",AvDocumentsResourceFactory)})(window);(function(root){"use strict";var availity=root.availity;var OrganizationResourceFactory=function(AvApiResource){var OrganizationResource=function(){AvApiResource.call(this,"organizations")};angular.extend(OrganizationResource.prototype,AvApiResource.prototype,{getOrganizations:function(config){return this.query(config).then(function(response){return response.data.organizations?response.data.organizations:response.data})}});return new OrganizationResource};availity.core.factory("avOrganizationsResource",OrganizationResourceFactory)})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avCodesResource",function(AvApiResource){return new AvApiResource({version:"/v1",url:"/codes"})});var AvCodesResourceFactory=function(AvApiResource){var AvCodesResource=function(){AvApiResource.call(this,"codes")};angular.extend(AvCodesResource.prototype,AvApiResource.prototype,{getCodes:function(data){var config={};config.params={};if(data.page){config.params.offset=50*(data.page-1)}if(data.offset){config.params.offset=data.offset}if(data.list){config.params.list=data.list}if(data.q){config.params.q=data.q}return this.query(config).then(function(response){var results=response.data.codes;if(results&&!_.has(results[0],"id")){_.each(results,function(code){code.id=code.code})}var moreVal=response.data.offset0:false}};return new AvUserAuthorizations};availity.core.factory("avUserAuthorizations",AvUserAuthorizationsFactory)})(window);(function(root){"use strict";var availity=root.availity;availity.core.constant("AV_SESSION",{SESSION_TIMEOUT:"av:auth:session:timeout",NOT_AUTHORIZED:"av:auth:not:authorized"});availity.core.factory("avSession",function($q,avUsersResource){var AvSession=function(){this.user=null;this.permissions=null};var proto=AvSession.prototype;proto.getUser=function(){var self=this;if(this.user){return $q.when(this.user)}return avUsersResource.me().then(function(user){self.user=user;return self.user})};proto.destroy=function(){this.user=null;this.permisions=null};return new AvSession})})(window);(function(root){"use strict";var availity=root.availity;availity.core.constant("AV_IDLE",{EVENTS:{IDLE_INACTIVE:"av:idle:inactive",IDLE_ACTIVE:"av:idle:active",SESSION_TIMEOUT_ACTIVE:"av:idle:session:active",SESSION_TIMEOUT_REDIRECT:"av:idle:session:redirect",HUMAN:"keydown.av.idle mousedown.av.idle keydown.av.idle",MACHINE:"$locationChangeSuccess"},INTERVALS:{PING:3*60*1e3,IDLE:25*60*1e3,SESSION:30*60*1e3},URLS:{HOME:"/availity/web/public.elegant.login",PING:"/api/v1/users/me"}});availity.core.provider("avIdle",function(AV_IDLE){var enabled=false;var pingUrl;var redirectUrl;var sessionTimeout;var idleTimeout;var pingTimeout;this.enable=function(value){if(arguments.length){enabled=!!value}return enabled};this.setSessionTimeout=function(timeout){sessionTimeout=timeout||AV_IDLE.INTERVALS.SESSION};this.setIdleTimeout=function(timeout){idleTimeout=timeout||AV_IDLE.INTERVALS.IDLE};this.setPingTimeout=function(timeout){pingTimeout=timeout||AV_IDLE.INTERVALS.PING};this.setPingUrl=function(url){pingUrl=url||AV_IDLE.URLS.PING};this.$get=function(AV_IDLE,$log,$document,$rootScope,$timeout,avThrottle,$q,$injector){var AvIdle=function(){this._idleTimer=null;this._sessionTimer=null;this._pingTimer=null;this._keepAlive=null;this.idleActive=false;this.sessionActive=false;this.listeners=[];this.init()};var proto=AvIdle.prototype;proto.init=function(){if(!enabled){this.stop();return}this.start()};proto.start=function(){$log.info("avIdle start");var self=this;var listener;!sessionTimeout&&this.setSessionTimeout();!idleTimeout&&this.setIdleTimeout();!pingTimeout&&this.setPingTimeout();!pingUrl&&this.setPingUrl();!redirectUrl&&this.setRedirectUrl();$rootScope.$on("$destroy",function(){self.stop()});$document.find("body").on(AV_IDLE.EVENTS.HUMAN,function(event){self.onEvent(event)});listener=$rootScope.$on(AV_IDLE.EVENTS.MACHINE,function(event,oldUrl,newUrl){if(oldUrl!==newUrl){self.onEvent(event)}});this.listeners.push(listener);$rootScope.$on(AV_IDLE.EVENTS.SESSION_TIMEOUT_REDIRECT,function(){document.location.href=redirectUrl});this.startIdleTimer();this.startSessionTimer()};proto.stop=function(){$document.find("body").off(AV_IDLE.EVENTS.HUMAN);_.each(this.listeners,function(listener){listener()});this.stopPing();this.stopSessionTimer();this.stopIdleTimer()};proto.isEnabled=function(){return enabled};proto.enable=function(value){if(arguments.length){enabled=!!value}return this};proto.setSessionTimeout=function(timeout){sessionTimeout=timeout||AV_IDLE.INTERVALS.SESSION;return this};proto.setIdleTimeout=function(timeout){idleTimeout=timeout||AV_IDLE.INTERVALS.IDLE;return this};proto.setPingTimeout=function(timeout){pingTimeout=timeout||AV_IDLE.INTERVALS.PING;return this};proto.setPingUrl=function(url){pingUrl=url||AV_IDLE.URLS.PING;return this};proto.setRedirectUrl=function(url){redirectUrl=url||AV_IDLE.URLS.HOME;return this};proto.response=function(response){if(this.isApiRequest(response)){this.startSessionTimer()}return response};proto.isApiRequest=function(response){return response&&response.config&&response.config.api};proto.responseError=function(response){if(this.isApiRequest(response)&&response.status!==401){this.startSessionTimer()}if(this.isApiRequest()&&response.status===401){this.stopPing()}return $q.reject(response)};proto.startSessionTimer=function(){var self=this;this.stopSessionTimer();var later=function(){$log.info("avIdle session has TIMED OUT");self.stop();$rootScope.$broadcast(AV_IDLE.EVENTS.SESSION_TIMEOUT_ACTIVE)};$log.info("avIdle session timer has STARTED");this._sessionTimer=$timeout(later,sessionTimeout,false)};proto.stopSessionTimer=function(){$log.info("avIdle session timer has STOPPED");$timeout.cancel(this._sessionTimer)};proto.startIdleTimer=function(){var self=this;this.stopIdleTimer();var later=function(){self.stopIdleTimer();$log.info("avIdle is IDLING");$rootScope.$broadcast(AV_IDLE.EVENTS.IDLE_ACTIVE)};$log.info("avIdle idle timer has STARTED");this._idleTimer=$timeout(later,idleTimeout,false)};proto.stopIdleTimer=function(){$log.info("avIdle idle timer has STOPPED");$timeout.cancel(this._idleTimer)};proto.startPing=function(){if(!this._keepAlive){$log.info("avIdle ping timer has STARTED");this._keepAlive=avThrottle(this.keepAlive,pingTimeout,{context:this})}this._pingTimer=this._keepAlive()};proto.stopPing=function(){$log.info("avIdle ping timer has STOPPED");if(this._pingTimer){$timeout.cancel(this._pingTimer)}};proto.keepAlive=function(){this._keepAlive=null;var $http=$injector.get("$http");$http.get(pingUrl,{cache:false,api:true}).success(function(){$log.info("avIdle keep-alive SUCCESS")}).error(function(){$log.error("avIdle keep-alive FAILURE")})};proto.onEvent=function(){this.startIdleTimer();this.startPing()};return new AvIdle}})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avIdleInterceptor",function(avIdle){return{response:function(response){return avIdle.response(response)},responseError:function(response){return avIdle.responseError(response)}}});availity.core.config(function($httpProvider){$httpProvider.interceptors.push("avIdleInterceptor")})})(window);(function(root){"use strict";var availity=root.availity;availity.core.value("avValConfig",{classes:{valid:"ng-valid",invalid:"ng-invalid",dirty:"ng-dirty",pristine:"ng-pristine",touched:"ng-touched",untouched:"ng-untouched",submitted:"ng-submitted"},validators:["avValPattern","avValSize","avValRequired","avValDateRange","avValDate","avValPhone","avValEmail","avValNpi"]});availity.core.constant("AV_VAL",{EVENTS:{REVALIDATE:"av:val:revalidate",SUBMITTED:"av:val:submitted",FAILED:"av:val:failed",RESET:"av:val:reset"},DEBOUNCE:800,DATE_FORMAT:{SIMPLE:"MM/DD/YYYY"},PATTERNS:{ALPHA_ONLY:/[^A-Za-z]+/g,NUMERIC_ONLY:/[^0-9]+/g}});availity.core.provider("avVal",function(){var validators=[];var rules={};var services={};this.addRules=function(_rules){rules=angular.extend({},rules,_rules);return rules};this.addValidators=function(_validators){validators=validators.concat(_validators);return validators};this.$get=function($injector,$rootScope,$http,$log,avValConfig,AV_VAL){var AvValidation=function(){this.initValidators()};var proto=AvValidation.prototype;proto.initValidators=function(){var self=this;validators=avValConfig.validators.concat(validators);angular.forEach(validators,function(name){self.addValidator(name)})};proto.addValidator=function(name){var validator=$injector.get(name);services[validator.name]=validator};proto.addRules=function(_rules){rules=angular.extend({},rules,_rules);$rootScope.$broadcast(AV_VAL.EVENTS.REVALIDATE)};proto.validate=function(key,element,value,ruleName){var ruleConfig=rules[key];if(!ruleConfig){$log.warn("Could not resolve the form rules key ["+key+"]. This can happen when the rules key is inside a promise and the key value has not resolved on page load.");return}var contraints=ruleConfig[ruleName];if(!contraints){$log.info("Rule named ["+ruleName+"] could not be found in the current schema.");contraints=[]}var el=element[0];var results=[];var violations=[];var _valid=true;angular.forEach(contraints,function(rule,contraintName){if(!rule){return}var validator=services[contraintName];if(angular.isUndefined(validator)){$log.warn("No validator defined for `"+name+"`");return}var valid=validator.validate(value,rule,element);var validationResult={valid:valid,ruleName:ruleName,contraintName:contraintName,value:value,message:rule.message,field:el.name||el.id};var result=angular.extend({},rule,validationResult);results.push(result);if(!valid){violations.push(validationResult)}_valid=_valid&&valid});return{isValid:_valid,all:results,violations:violations}};return new AvValidation}})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avValUtils",function(){return{isDefined:function(value){return angular.isDefined(value)&&value!==""&&value!==null},isEmpty:function(value){return!this.isDefined(value)||$.trim(value)===""}}})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avValSize",function(avValUtils){var validator={name:"size",validate:function(value,rule){var min=rule.min||0;var max=rule.max;var type=rule.type?rule.type.toLowerCase():"text";if(_.isNull(value)||_.isUndefined(value)){value=""}if(type==="text"){value=value+"";return avValUtils.isEmpty(value)||value.length>=min&&(max===undefined||value.length<=max)}if(!_.isNumber(value)&&/^\d+$/.test(value)){value=parseInt(value,10)}return avValUtils.isEmpty(value)||value>=min&&(max===undefined||value<=max)}};return validator})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avValPattern",function(avValUtils){var validator={name:"pattern",REGEX:/^\/(.*)\/([gim]*)$/,asRegExp:function(pattern){var match;if(pattern.test){return pattern}else{match=pattern.match(validator.REGEX);if(match){return new RegExp(match[1],match[2])}else{throw"Expected "+pattern+" to be a RegExp"}}},validate:function(value,rule){var values=_.isArray(rule.value)?rule.value:[rule.value];var valid=false;_.each(values,function(expresion){var pattern=validator.asRegExp(expresion);if(avValUtils.isEmpty(value)||pattern.test(value)){valid=true}});return valid}};return validator})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avValRequired",function(avValUtils){var validator={name:"required",validate:function(value,rule,element){var ctrl=element&&element.data("$ngModelController");if(ctrl){return!ctrl.$isEmpty(value); -}return!avValUtils.isEmpty(value)}};return validator})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avValDateRange",function(AV_VAL,avValUtils){var validator={name:"dateRange",getStartDate:function(start){return validator.setMin(moment().add(start.value,start.units))},getEndDate:function(end){return validator.setMax(moment().add(end.value,end.units))},setMin:function(value){value.set("hours",0);value.set("minutes",0);value.set("seconds",0);return value},setMax:function(value){value.set("hours",23);value.set("minutes",59);value.set("seconds",59);return value},validation:function(value,rules){var date;var startDate;var endDate;date=moment(value,rules.format||AV_VAL.DATE_FORMAT.SIMPLE);date.set("hours",0);date.set("minutes",0);date.set("seconds",0);if(!avValUtils.isEmpty(rules.start.units)&&!avValUtils.isEmpty(rules.end.units)){startDate=validator.getStartDate(rules.start);endDate=validator.getEndDate(rules.end)}else{startDate=moment(rules.start.value,rules.format);endDate=validator.setMax(moment(rules.end.value,rules.format))}return date.isValid()&&date.isBetween(startDate,endDate,"day")||date.isSame(startDate,"day")||date.isSame(endDate,"day")},validate:function(value,rule){return avValUtils.isEmpty(value)||validator.validation(value,rule)}};return validator})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avValDate",function(AV_VAL,avValUtils){var validator={name:"dateFormat",validate:function(value,rules){var format=rules&&rules.format?rules.format:AV_VAL.DATE_FORMAT.SIMPLE;return avValUtils.isEmpty(value)||moment(value,format,true).isValid()}};return validator})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avValNpi",function(avValUtils){var validator={name:"npi",INTEGER_REGEX:/^\d*$/,validate:function(value){var npi=value||"";if(avValUtils.isEmpty(npi)){return true}if(!validator.INTEGER_REGEX.test(npi)||npi.length!==10){return false}var firstDigit=npi.charAt(0);if(!("1"===firstDigit||"2"===firstDigit||"3"===firstDigit||"4"===firstDigit)){return false}var digit=parseInt(npi.charAt(9),10);npi=npi.substring(0,9);npi="80840"+npi;var alternate=true;var total=0;for(var i=npi.length;i>0;i--){var next=parseInt(npi.charAt(i-1),10);if(alternate){next=next*2;if(next>9){next=next%10+1}}total+=next;alternate=!alternate}var roundUp=Math.ceil(total/10)*10;var calculatedCheck=roundUp-total;if(calculatedCheck!==digit){return false}return true}};return validator})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avValPhone",function(avValPattern){var PHONE_PATTERN=/^([0-9][\.\-]?)?[(]{0,1}[0-9]{3}[)\.\- ]{0,1}[0-9]{3}[\.\- ]{0,1}[0-9]{4}$/;var validator={name:"phone",validate:function(value,rule){return avValPattern.validate(value,angular.extend({},rule,{value:PHONE_PATTERN}))}};return validator})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avValEmail",function(avValPattern){var EMAIL_PATTERN=/[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/;var validator={name:"email",validate:function(value,rule){return avValPattern.validate(value,angular.extend({},rule,{value:EMAIL_PATTERN}))}};return validator})})(window);(function(root){"use strict";var availity=root.availity;availity.core.constant("AV_GLOBALS",{REGIONS:[{name:"Alabama",code:"AL"},{name:"Alaska",code:"AK"},{name:"Arizona",code:"AZ"},{name:"Arkansas",code:"AR"},{name:"California",code:"CA"},{name:"Colorado",code:"CO"},{name:"Connecticut",code:"CT"},{name:"Delaware",code:"DE"},{name:"District Of Columbia",code:"DC"},{name:"Florida",code:"FL"},{name:"Georgia",code:"GA"},{name:"Hawaii",code:"HI"},{name:"Idaho",code:"ID"},{name:"Illinois",code:"IL"},{name:"Indiana",code:"IN"},{name:"Iowa",code:"IA"},{name:"Kansas",code:"KS"},{name:"Kentucky",code:"KY"},{name:"Louisiana",code:"LA"},{name:"Maine",code:"ME"},{name:"Maryland",code:"MD"},{name:"Massachusetts",code:"MA"},{name:"Michigan",code:"MI"},{name:"Minnesota",code:"MN"},{name:"Mississippi",code:"MS"},{name:"Missouri",code:"MO"},{name:"Montana",code:"MT"},{name:"Nebraska",code:"NE"},{name:"Nevada",code:"NV"},{name:"New Hampshire",code:"NH"},{name:"New Jersey",code:"NJ"},{name:"New Mexico",code:"NM"},{name:"New York",code:"NY"},{name:"North Carolina",code:"NC"},{name:"North Dakota",code:"ND"},{name:"Ohio",code:"OH"},{name:"Oklahoma",code:"OK"},{name:"Oregon",code:"OR"},{name:"Pennsylvania",code:"PA"},{name:"Rhode Island",code:"RI"},{name:"South Carolina",code:"SC"},{name:"South Dakota",code:"SD"},{name:"Tennessee",code:"TN"},{name:"Texas",code:"TX"},{name:"Utah",code:"UT"},{name:"Vermont",code:"VT"},{name:"Virginia",code:"VA"},{name:"Washington",code:"WA"},{name:"West Virginia",code:"WV"},{name:"Wisconsin",code:"WI"},{name:"Wyoming",code:"WY"}]})})(window);(function(root){"use strict";var availity=root.availity;availity.core.provider("avAnalyticsConfig",function(AV_ANALYTICS){var config={VIRTUAL_PAGE_TRACKING:true,SERVICES:{PIWIK:"avPiwikAnalytics",SPLUNK:"avSplunkAnalytics"},EVENTS:{PAGE:"$locationChangeSuccess",DEFAULT:"click"},PRE_FIX:/^avAnalytics(.*)$/,IGNORE:["avAnalyticsOn","avAnalyticsIf"],ENV:{PROD:{DOMAIN:"apps.availity.com",URL:"https://piwik.availity.com/piwik/"},QA:{URL:"https://qa-piwik.availity.com/piwik/"}}};this.set=function(options){_.merge(config,options);_.merge(AV_ANALYTICS,config)};this.$get=function(AV_ANALYTICS){return angular.copy(_.merge(config,AV_ANALYTICS))};this.set(AV_ANALYTICS)});availity.core.constant("AV_ANALYTICS",{});availity.core.provider("avAnalytics",function(avAnalyticsConfigProvider){var avAnalyticsConfig=avAnalyticsConfigProvider.$get();var plugins=[];var virtualPageTracking=avAnalyticsConfig.VIRTUAL_PAGE_TRACKING;var appId;this.registerPlugins=function(_plugins){if(angular.isString(_plugins)){_plugins=[_plugins]}if(_.isArray(_plugins)){plugins=_plugins}else{throw new Error("AvAnalytics.registerPlugins() expects a string or an array.")}return plugins};this.setVirtualPageTracking=function(value){if(arguments.length){virtualPageTracking=!!value}};this.isVirtualPageTracking=function(){return virtualPageTracking};this.setAppID=function(id){appId=id;return appId};this.$get=function($injector,$q,$log,$rootScope,$location){var AvAnalytics=function(){var self=this;this.services={};if(!plugins||plugins.length===0){plugins=[avAnalyticsConfig.SERVICES.PIWIK,avAnalyticsConfig.SERVICES.SPLUNK]}angular.forEach(plugins,function(plugin){try{self.services[plugin]=$injector.get(plugin)}catch(err){$log.error("Could not load `{0}` plugin",[plugin])}})};var proto=AvAnalytics.prototype;proto.init=function(){var self=this;if(this.isVirtualPageTracking()){$rootScope.$on(avAnalyticsConfig.EVENTS.PAGE,function(){self.trackPageView($location.absUrl())})}angular.forEach(this.services,function(handler){if(handler.isEnabled()&&handler.init){handler.init()}})};proto.trackEvent=function(properties){var promises=[];angular.forEach(this.services,function(handler){var promise=handler.trackEvent(properties);promises.push(promise)});return $q.all(promises)};proto.getAppId=function(){return appId};proto.isVirtualPageTracking=function(){return virtualPageTracking};proto.trackPageView=function(url){var promises=[];angular.forEach(this.services,function(handler){var promise=handler.trackPageView(url);promises.push(promise)});return $q.all(promises)};return new AvAnalytics}})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avAnalyticsUtils",function(avAnalyticsConfig,$log){var AnalyticsUtils=function(){};var proto=AnalyticsUtils.prototype;proto.getProperties=function(attributes){var self=this;var props={};_.forEach(attributes,function(value,key){if(self.isValidAttribute(key)&&self.isNotIgnored(key)){var result=self.getAttribute(key,value);props[result.key]=result.value}});return props};proto.isExternalLink=function(attrs){return attrs.href&&!attrs.ngClick};proto.isNotIgnored=function(key){var ignored=_.includes(avAnalyticsConfig.IGNORE,key);return!ignored};proto.isValidAttribute=function(key){return avAnalyticsConfig.PRE_FIX.test(key)};proto.lowercase=function(str){return str.substr(0,1).toLowerCase()+str.substr(1)};proto.getAttribute=function(key,value){var simpleKey=key.match(avAnalyticsConfig.PRE_FIX);if(simpleKey&&simpleKey[1]){return{key:this.lowercase(simpleKey[1]),value:value}}};proto.toNum=function(value){var parsed=parseInt(value,10);value=isNaN(parsed)?0:parsed;return value};proto.isValid=function(trackingValues){var valid=true;if(trackingValues.value||trackingValues.value===0){delete trackingValues.value}_.forEach(trackingValues,function(key,value){if(availity.isBlank(value)||_.isUndefined(value)){$log.warn("The analytic tracking value for "+key.toUpperCase()+" is not defined.");valid=false}});return valid};return new AnalyticsUtils})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avSplunkAnalytics",function($log,avLogMessagesResource,$location){var SplunkAnalyticsService=function(){};var proto=SplunkAnalyticsService.prototype;proto.trackEvent=function(properties){properties.url=$location.$$absUrl||"N/A";properties.level=properties.level||"info";return avLogMessagesResource[properties.level](properties)};proto.trackPageView=function(url){var properties={event:"page",level:"info",url:url||$location.$$absUrl()};return avLogMessagesResource[properties.level](properties)};proto.isEnabled=function(){return true};return new SplunkAnalyticsService})})(window);(function(root){"use strict";var availity=root.availity;availity.core.provider("avPiwikAnalytics",function(){var self;var siteId;var enabled=false;var customVariables=[];this.enabled=function(_enabled){enabled=!!_enabled};this._setCustomVariable=function(index,valueName,value,scope){if(!index||isNaN(index)){throw new Error("index must be a number")}else if(!valueName){throw new Error("valueName must be declared")}else{customVariables.push(["setCustomVariable",index,valueName,value,scope])}};this.setSiteID=function(_siteID){this.enabled(true);siteId=_siteID};this.setVisitVariables=function(items){_.forEach(items,function(item){self._setCustomVariable(item[0],item[1],item[2],"visit")})};this.setPageVariables=function(index,name,value){this._setCustomVariable(index,name,value,"page")};this.$get=function(avAnalyticsUtils,avUsersResource,avAnalyticsConfig,$injector,$log,$q,$document,$location){var AvPiwikAnalytics=function(){window._paq=window._paq||[]};var proto=AvPiwikAnalytics.prototype;proto.trackEvent=function(properties){if(!window._paq){$log.warn("Piwik object `_paq` not found in global scope");return $q.when(false)}if(properties.value){properties.value=avAnalyticsUtils.toNum(properties.event)}if(!avAnalyticsUtils.isValid(properties)){$log.warn("Invalid properties being passed. Tracking info will not be sent.");return $q.when(false)}return $q.when(window._paq.push(["trackEvent",properties.category,properties.action||properties.event,properties.label,properties.value]))};proto.trackPageView=function(url){if(!window._paq){$log.warn("Piwik object `_paq` not found in global scope");return $q.when(false)}return $q.when([window._paq.push(["setCustomUrl",url]),window._paq.push(["trackPageView",url])])};proto.init=function(){avUsersResource.me().then(function(user){window._paq.push(["setUserId",user.id])});if(!_.isFinite(siteId)){$log.warn("Invalid Piwik Site Id. Piwik analytics has been disabled.");return}var url;if($location.$$host===avAnalyticsConfig.ENV.PROD.DOMAIN){url=avAnalyticsConfig.ENV.PROD.URL}else{url=avAnalyticsConfig.ENV.QA.URL}window._paq.push(["enableLinkTracking"]);window._paq.push(["setTrackerUrl",url+"piwik.php"]);window._paq.push(["setSiteId",siteId]);_.forEach(customVariables,function(variable){window._paq.push(variable)});$.getScript(url+"piwik.js",function(){})};proto.isEnabled=function(){return enabled&&siteId};return new AvPiwikAnalytics}})})(window);(function(root){"use strict";var availity=root.availity;availity.core.constant("AV_EXCEPTIONS",{MESSAGES:{NOT_APPLICABLE:"N/A"},TYPES:{EXCEPTION:"exception"}});availity.core.provider("avExceptionAnalytics",function(){var _enabled=true;var appId;this.enabled=function(enabled){_enabled=!!enabled};this.setAppId=function(_id){appId=_id};this.$get=function(avLogMessagesResource,$location,AV_EXCEPTIONS){var AvExceptionAnalytics=function(){};var proto=AvExceptionAnalytics.prototype;proto.init=function(){var self=this;if(!_enabled){return}TraceKit.remoteFetching=false;TraceKit.surroundingLinesToCollect=11;TraceKit.report.subscribe(function(stacktrace){self.onError(stacktrace)})};proto.prettyPrint=function(stacktrace){var message="";var length=stacktrace.stack.length;for(var i=0;i-1};AvLogger.getFormattedTimestamp=function(date){return AvLogger.supplant("{0}:{1}:{2}:{3}",[date.getHours(),date.getMinutes(),date.getSeconds(),date.getMilliseconds()])};proto._log=function(originalFn,args){var hash=window.location.hash;hash=hash||"";if(!_enabled&&hash.indexOf("avLogger")<0&&originalFn!=="error"){return}var now=AvLogger.getFormattedTimestamp(new Date);var message="";var supplantData=[];var context=this.context?" ["+this.context+"] ":"";switch(args.length){case 1:supplantData=args[0];message=AvLogger.supplant("{0}{1} - {2}",[now,context,args[0]]);break;case 3:supplantData=args[2];message=AvLogger.supplant("{0}{1} - {2}('{3}')",[now,context,args[0],args[1]]);break;case 2:if(typeof args[1]==="string"){message=AvLogger.supplant("{0}{1} - {2}('{3}')",[now,context,args[0],args[1]])}else{if(args[0].stack){var errorMessage=this.formatError(args[0]);message=AvLogger.supplant("{0}{1} - {2}",[now,context,errorMessage]);supplantData=args[1]}else{supplantData=args[1]}}break}var $log=this.$log||$injector.get("$log");var params=AvLogger.isObject(supplantData)?[message,supplantData]:[AvLogger.supplant(message,supplantData)];$log[originalFn].apply(null,params)};proto.log=function(){this._log("log",arguments)};proto.info=function(){this._log("info",arguments)};proto.warn=function(){this._log("warn",arguments)};proto.debug=function(){this._log("debug",arguments)};proto.formatError=function(arg){if(arg instanceof Error){if(arg.stack){arg=arg.message&&arg.stack.indexOf(arg.message)===-1?"Error: "+arg.message+"\n"+arg.stack:arg.stack}else if(arg.sourceURL){arg=arg.message+"\n"+arg.sourceURL+":"+arg.line}}return arg};proto.error=function(){this._log("error",arguments)};return AvLogger}})})(window);(function(root){"use strict";var availity=root.availity;availity.core.config(function($provide){$provide.decorator("$log",function($delegate,AvLogger){return new AvLogger(null,$delegate)})})})(window);(function(root){"use strict";var availity=root.availity;availity.core.constant("AV_POLLING",{INTERVAL:1e3,MAX_ELAPSED_TIME:5e3,MAX_RETRY:30,DECAY:1.2,EVENTS:{MAX_RETRY:"av:polling:max:retry"},REGEX_URL:/^.*?api.availity.com(.*)$/});var PollingServiceFactory=function($rootScope,$q,$injector,$timeout,$log,AV_POLLING,AV_API){var AvPollingService=function(){this.pendingRequests=[]};var proto=AvPollingService.prototype;proto.response=function(response){if(this.isAsyncResponse(response)){return this.onAsyncReponse(response)}return response||$q.when(response)};proto.setDefaults=function(config){var defaultOptions={pollingInterval:AV_POLLING.INTERVAL,pollingDecay:AV_POLLING.DECAY,pollingMaxInterval:AV_POLLING.MAX_ELAPSED_TIME,pollingRetryCount:0,pollingStartTime:(new Date).getTime()};return _.extend(defaultOptions,config)};proto.responseError=function(response){return $q.reject(response)};proto.isAsyncResponse=function(response){return response&&response.config&&response.config.api&&response.status&&response.status===202&&angular.isFunction(response.headers)&&!availity.isBlank(response.headers(AV_API.HEADERS.SERVER.LOCATION))};proto.onAsyncReponse=function(response){response.config=this.setDefaults(response.config);var deferred=$q.defer();this.queueRequest(deferred,response);$timeout(function(){deferred.notify(response)},0,false);return deferred.promise};proto.getUrl=function(url){var result=url.match(AV_POLLING.REGEX_URL);if(result&&result[1]){return"/api"+result[1]}return url};proto.queueRequest=function(deferred,response){var self=this;var _url=availity.getRelativeUrl(response.headers(AV_API.HEADERS.SERVER.LOCATION));var _config=response.config;var config={method:"GET",api:true,headers:_config.headers,pollingInterval:_config.pollingInterval,pollingMaxRetry:_config.pollingMaxRetry,pollingMaxInterval:_config.pollingMaxInterval,pollingStartTime:_config.pollingStartTime,_pollingDecay:_config._pollingDecay,pollingRetryCount:_config.pollingRetryCount,pollingDecay:_config.pollingDecay,url:_url,cache:false};var request={id:availity.uuid("request-"),config:config,deferred:deferred};var timeout=this.getPollingTimeout(config);var timer=$timeout(function(){self.retryRequest(request.id)},timeout,false);request.timer=timer;this.pushRequest(request)};proto.popRequest=function(id){var index=null;var request=null;for(var i=0;iconfig.pollingMaxInterval;return isElapsed},proto.isMaxRetried=function(config){return config.pollingRetryCount>=AV_POLLING.MAX_RETRY};proto.isPollable=function(config){var _isTimeout=this.isPollingMaxTimeout(config);var _isMax=this.isMaxRetried(config);return _isTimeout||_isMax?false:true};proto.retryRequest=function(id){var self=this;var request=this.popRequest(id);$timeout.cancel(request.timer);var config=request.config;var deferred=request.deferred;if(!this.isPollable(config)){$log.info("Rejecting pollable response due to timeout");return deferred.reject(request)}this.increment(config);function successCallback(response){if(self.isAsyncResponse(response)){deferred.notify(response);self.queueRequest(request.deferred,response)}else{deferred.resolve(response)}}function errorCallback(response){deferred.reject(response)}var $http=$injector.get("$http");$http(config).then(successCallback,errorCallback)};proto.increment=function(config){this.incrementCounter(config);this.incrementDecay(config)};proto.incrementDecay=function(config){if(!config._pollingDecay){config._pollingDecay=config.pollingDecay}config.pollingDecay*=config._pollingDecay};proto.incrementCounter=function(config){config.pollingRetryCount++};proto.clearRequests=function(){angular.forEach(this.pendingRequests,function(request){$timeout.cancel(request.timer)});this.pendingRequests=[]};return new AvPollingService};availity.core.factory("avPollingService",PollingServiceFactory)})(window);(function(root){"use strict";var availity=root.availity;availity.core.constant("AV_API",{HEADERS:{SERVER:{ID:"X-API-ID",LOCATION:"Location",STATUS:"X-Status-Message",GLOBAL_ID:"X-Global-Transaction-ID"},CLIENT:{SESSION_ID:"X-Session-ID",AUTH:"Authorization",OVERRIDE:"X-HTTP-Method-Override",CALLBACK_URL:"X-Callback-URL",CUSTOMER_ID:"X-Availity-Customer-ID",RESPONSE_ENCODING:"X-Response-Encoding-Context"}},OPTIONS:{prefix:"",path:"/api",resourceGroup:"",url:null,version:"/v1",level:"",suffix:"",cache:true,api:true,pollingRetryCount:0,pollingInterval:1e3,pollingDecay:1.2,pollingMaxInterval:3e4,headers:{"X-Response-Encoding-Context":"NONE"}}});var ApiResourcesProvider=function(AV_API){var defaultOptions=_.merge({},AV_API.OPTIONS);this.setOptions=function(options){_.merge(defaultOptions,options)};this.getOptions=function(){return angular.copy(defaultOptions)};this.setHttpCommonHeaders=function($httpProvider){_.merge($httpProvider.defaults.headers.common,defaultOptions.headers)};this.$get=function($http,$q,avPollingService){var AvApiResource=function(options){if(!options){throw new Error("[options] cannot be null or undefined")}if(angular.isString(options)){options=options.charAt(0)==="/"?options:"/"+options;options=angular.extend({},{url:options})}if(!options.url){throw new Error("[url] cannot be null")}this.options=angular.extend({},defaultOptions,options||{})};var proto=AvApiResource.prototype;proto._config=function(config){return _.merge({},this.options,config||{})};proto._cacheBust=function(config){config.cacheBust=null;config.params=config.params||{};config.params.cacheBust=(new Date).getTime();return config};proto._getUrl=function(id){if(this.options.api){return this._getApiUrl(id)}return this.options.url};proto._createResponse=function(data,status,headers,config){return{data:data,status:status,headers:headers,config:config}};proto._request=function(config,afterCallback){var self=this;var defer=$q.defer();$http(config).success(function(data,status,headers,_config){var _response={data:data,status:status,headers:headers,config:_config};var _promise=$q.when(avPollingService.response(_response));defer.notify(_response);_promise.then(function(successResponse){if(afterCallback){successResponse=afterCallback.call(self,successResponse,config.data)}defer.resolve(successResponse)},function(errorResponse){defer.reject(errorResponse)},function(notifyResponse){defer.notify(notifyResponse)})}).error(function(data,status,headers,_config){var response=self._createResponse(data,status,headers,_config);defer.reject(response)});var promise=defer.promise;promise.success=function(fn){promise.then(function(response){fn(response.data,response.status,response.headers,response.config)});return promise};promise.error=function(fn){promise.then(null,function(response){fn(response.data,response.status,response.headers,config)});return promise};promise.always=promise["finally"];return promise};proto.normalize=function(url){return url.replace(/[\/]+/g,"/").replace(/\/$/,"")};proto.join=function(){var joined=[].slice.call(arguments,0).join("/");return this.normalize(joined)};proto._getApiUrl=function(id){id=id?"/"+id:"";var url=this.join(this.options.prefix,this.options.path,this.options.level,this.options.resourceGroup,this.options.version,this.options.url,id);return url+this.options.suffix};proto.create=function(data,config){if(!data){throw new Error("called method without [data]")}if(this.beforeCreate){data=this.beforeCreate(data)}config=this._config(config);config.method="POST";config.url=this._getUrl();config.data=data;return this._request(config,this.afterCreate)};proto.get=function(id,config){if(!id){throw new Error("called method without [id]")}config=this._config(config);if(config.cacheBust){config=this._cacheBust(config)}config.method="GET";config.url=this._getUrl(id);return this._request(config,this.afterGet)};proto.query=function(config){config=this._config(config);if(config.cacheBust){config=this._cacheBust(config)}config.method="GET";config.url=this._getUrl();return this._request(config,this.afterQuery)};proto.update=function(id,data,config){var url;if(_.isString(id)||_.isNumber(id)){url=this._getUrl(id)}else{url=this._getUrl();config=data;data=id}if(this.beforeUpdate){data=this.beforeUpdate(data)}config=this._config(config);config.method="PUT";config.url=url;config.data=data;return this._request(config,this.afterUpdate)};proto.remove=function(id,config){var url;var data;if(_.isString(id)||_.isNumber(id)){url=this._getUrl(id)}else{url=this._getUrl();data=id}config=this._config(config);config.method="DELETE";config.url=url;config.data=data;return this._request(config,this.afterRemove)};proto.beforeCreate=null;proto.afterCreate=null;proto.afterQuery=null;proto.afterGet=null;proto.beforeUpdate=null;proto.afterUpdate=null;proto.afterRemove=null;return AvApiResource}};availity.core.provider("AvApiResource",ApiResourcesProvider)})(window);(function(root){"use strict";var availity=root.availity;var UserServiceFactory=function(AvApiResource){var AvUsersResource=function(){AvApiResource.call(this,"users")};angular.extend(AvUsersResource.prototype,AvApiResource.prototype,{afterGet:function(response){var user=response.data.user?response.data.user:response.data;return user},me:function(config){return this.get("me",config)}});return new AvUsersResource};availity.core.factory("avUsersResource",UserServiceFactory)})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avCoveragesResource",function(AvApiResource){return new AvApiResource({version:"/v1",url:"/configurations",cache:false})})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avConfigurationsResource",function(AvApiResource){return new AvApiResource({version:"/v1",url:"/configurations"})})})(window);(function(root){"use strict";var availity=root.availity;var LogMessagesFactory=function(AvApiResource){var AvLogMessagesResource=function(){AvApiResource.call(this,{version:"/v1",url:"/log-messages"})};angular.extend(AvLogMessagesResource.prototype,AvApiResource.prototype,{buildRequest:function(level,entries){var requestPayload={};if(entries.level){delete entries.level}requestPayload.level=level;requestPayload.entries=entries;return requestPayload},debug:function(entries){return this.create(this.buildRequest("debug",entries))},info:function(entries){return this.create(this.buildRequest("info",entries))},warn:function(entries){return this.create(this.buildRequest("warn",entries))},error:function(entries){return this.create(this.buildRequest("error",entries))}});return new AvLogMessagesResource};availity.core.factory("avLogMessagesResource",LogMessagesFactory)})(window);(function(root){"use strict";var availity=root.availity;var SpacesFactory=function(AvApiResource){return new AvApiResource({path:"/api/sdk",level:"/platform",version:"/v1",url:"/spaces"})};availity.core.factory("avSpacesResource",SpacesFactory)})(window);(function(root){"use strict";var availity=root.availity;var AvDocumentsResourceFactory=function(AvApiResource){var AvDocumentsResource=function(){AvApiResource.call(this,"documents")};angular.extend(AvDocumentsResource.prototype,AvApiResource.prototype,{getContents:function(id){var config=this._config();config.url=this.getContentsUrl(id);return this._request(config)},getContentsUrl:function(id){return this._getUrl(id)+"/contents"}});return new AvDocumentsResource};availity.core.factory("avDocumentsResource",AvDocumentsResourceFactory)})(window);(function(root){"use strict";var availity=root.availity;var OrganizationResourceFactory=function(AvApiResource){var OrganizationResource=function(){AvApiResource.call(this,"organizations")};angular.extend(OrganizationResource.prototype,AvApiResource.prototype,{getOrganizations:function(config){return this.query(config).then(function(response){return response.data.organizations?response.data.organizations:response.data})}});return new OrganizationResource};availity.core.factory("avOrganizationsResource",OrganizationResourceFactory)})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avCodesResource",function(AvApiResource){return new AvApiResource({version:"/v1",url:"/codes"})});var AvCodesResourceFactory=function(AvApiResource){var AvCodesResource=function(){AvApiResource.call(this,"codes")};angular.extend(AvCodesResource.prototype,AvApiResource.prototype,{getCodes:function(data){var config={};config.params={};if(data.page){config.params.offset=50*(data.page-1)}if(data.offset){config.params.offset=data.offset}if(data.list){config.params.list=data.list}if(data.q){config.params.q=data.q}return this.query(config).then(function(response){var results=response.data.codes;if(results&&!_.has(results[0],"id")){_.each(results,function(code){code.id=code.code})}var moreVal=response.data.offset0:false}};return new AvUserAuthorizations};availity.core.factory("avUserAuthorizations",AvUserAuthorizationsFactory)})(window);(function(root){"use strict";var availity=root.availity;availity.core.constant("AV_SESSION",{SESSION_TIMEOUT:"av:auth:session:timeout",NOT_AUTHORIZED:"av:auth:not:authorized"});availity.core.factory("avSession",function($q,avUsersResource){var AvSession=function(){this.user=null;this.permissions=null};var proto=AvSession.prototype;proto.getUser=function(){var self=this;if(this.user){return $q.when(this.user)}return avUsersResource.me().then(function(user){self.user=user;return self.user})};proto.destroy=function(){this.user=null;this.permisions=null};return new AvSession})})(window);(function(root){"use strict";var availity=root.availity;availity.core.constant("AV_IDLE",{EVENTS:{IDLE_INACTIVE:"av:idle:inactive",IDLE_ACTIVE:"av:idle:active",SESSION_TIMEOUT_ACTIVE:"av:idle:session:active",SESSION_TIMEOUT_REDIRECT:"av:idle:session:redirect",HUMAN:"keydown.av.idle mousedown.av.idle keydown.av.idle",MACHINE:"$locationChangeSuccess"},INTERVALS:{PING:3*60*1e3,IDLE:25*60*1e3,SESSION:30*60*1e3},URLS:{HOME:"/availity/web/public.elegant.login",PING:"/api/v1/users/me"}});availity.core.provider("avIdle",function(AV_IDLE){var enabled=false;var pingUrl;var redirectUrl;var sessionTimeout;var idleTimeout;var pingTimeout;this.enable=function(value){if(arguments.length){enabled=!!value}return enabled};this.setSessionTimeout=function(timeout){sessionTimeout=timeout||AV_IDLE.INTERVALS.SESSION};this.setIdleTimeout=function(timeout){idleTimeout=timeout||AV_IDLE.INTERVALS.IDLE};this.setPingTimeout=function(timeout){pingTimeout=timeout||AV_IDLE.INTERVALS.PING};this.setPingUrl=function(url){pingUrl=url||AV_IDLE.URLS.PING};this.$get=function(AV_IDLE,$log,$document,$rootScope,$timeout,avThrottle,$q,$injector){var AvIdle=function(){this._idleTimer=null;this._sessionTimer=null;this._pingTimer=null;this._keepAlive=null;this.idleActive=false;this.sessionActive=false;this.listeners=[];this.init()};var proto=AvIdle.prototype;proto.init=function(){if(!enabled){this.stop();return}this.start()};proto.start=function(){$log.info("avIdle start");var self=this;var listener;!sessionTimeout&&this.setSessionTimeout();!idleTimeout&&this.setIdleTimeout();!pingTimeout&&this.setPingTimeout();!pingUrl&&this.setPingUrl();!redirectUrl&&this.setRedirectUrl();$rootScope.$on("$destroy",function(){self.stop()});$document.find("body").on(AV_IDLE.EVENTS.HUMAN,function(event){self.onEvent(event)});listener=$rootScope.$on(AV_IDLE.EVENTS.MACHINE,function(event,oldUrl,newUrl){if(oldUrl!==newUrl){self.onEvent(event)}});this.listeners.push(listener);$rootScope.$on(AV_IDLE.EVENTS.SESSION_TIMEOUT_REDIRECT,function(){document.location.href=redirectUrl});this.startIdleTimer();this.startSessionTimer()};proto.stop=function(){$document.find("body").off(AV_IDLE.EVENTS.HUMAN);_.each(this.listeners,function(listener){listener()});this.stopPing();this.stopSessionTimer();this.stopIdleTimer()};proto.isEnabled=function(){return enabled};proto.enable=function(value){if(arguments.length){enabled=!!value}return this};proto.setSessionTimeout=function(timeout){sessionTimeout=timeout||AV_IDLE.INTERVALS.SESSION;return this};proto.setIdleTimeout=function(timeout){idleTimeout=timeout||AV_IDLE.INTERVALS.IDLE;return this};proto.setPingTimeout=function(timeout){pingTimeout=timeout||AV_IDLE.INTERVALS.PING;return this};proto.setPingUrl=function(url){pingUrl=url||AV_IDLE.URLS.PING;return this};proto.setRedirectUrl=function(url){redirectUrl=url||AV_IDLE.URLS.HOME;return this};proto.response=function(response){if(this.isApiRequest(response)){this.startSessionTimer()}return response};proto.isApiRequest=function(response){return response&&response.config&&response.config.api};proto.responseError=function(response){if(this.isApiRequest(response)&&response.status!==401){this.startSessionTimer()}if(this.isApiRequest()&&response.status===401){this.stopPing()}return $q.reject(response)};proto.startSessionTimer=function(){var self=this;this.stopSessionTimer();var later=function(){$log.info("avIdle session has TIMED OUT");self.stop();$rootScope.$broadcast(AV_IDLE.EVENTS.SESSION_TIMEOUT_ACTIVE)};$log.info("avIdle session timer has STARTED");this._sessionTimer=$timeout(later,sessionTimeout,false)};proto.stopSessionTimer=function(){$log.info("avIdle session timer has STOPPED");$timeout.cancel(this._sessionTimer)};proto.startIdleTimer=function(){var self=this;this.stopIdleTimer();var later=function(){self.stopIdleTimer();$log.info("avIdle is IDLING");$rootScope.$broadcast(AV_IDLE.EVENTS.IDLE_ACTIVE)};$log.info("avIdle idle timer has STARTED");this._idleTimer=$timeout(later,idleTimeout,false)};proto.stopIdleTimer=function(){$log.info("avIdle idle timer has STOPPED");$timeout.cancel(this._idleTimer)};proto.startPing=function(){if(!this._keepAlive){$log.info("avIdle ping timer has STARTED");this._keepAlive=avThrottle(this.keepAlive,pingTimeout,{context:this})}this._pingTimer=this._keepAlive()};proto.stopPing=function(){$log.info("avIdle ping timer has STOPPED");if(this._pingTimer){$timeout.cancel(this._pingTimer)}};proto.keepAlive=function(){this._keepAlive=null;var $http=$injector.get("$http");$http.get(pingUrl,{cache:false,api:true}).success(function(){$log.info("avIdle keep-alive SUCCESS")}).error(function(){$log.error("avIdle keep-alive FAILURE")})};proto.onEvent=function(){this.startIdleTimer();this.startPing()};return new AvIdle}})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avIdleInterceptor",function(avIdle){return{response:function(response){return avIdle.response(response)},responseError:function(response){return avIdle.responseError(response)}}});availity.core.config(function($httpProvider){$httpProvider.interceptors.push("avIdleInterceptor")})})(window);(function(root){"use strict";var availity=root.availity;availity.core.value("avValConfig",{classes:{valid:"ng-valid",invalid:"ng-invalid",dirty:"ng-dirty",pristine:"ng-pristine",touched:"ng-touched",untouched:"ng-untouched",submitted:"ng-submitted"},validators:["avValPattern","avValSize","avValRequired","avValDateRange","avValDate","avValPhone","avValEmail","avValNpi"]});availity.core.constant("AV_VAL",{EVENTS:{REVALIDATE:"av:val:revalidate",SUBMITTED:"av:val:submitted",FAILED:"av:val:failed",RESET:"av:val:reset"},DEBOUNCE:800,DATE_FORMAT:{SIMPLE:"MM/DD/YYYY"},PATTERNS:{ALPHA_ONLY:/[^A-Za-z]+/g,NUMERIC_ONLY:/[^0-9]+/g}});availity.core.provider("avVal",function(){var validators=[];var rules={};var services={};this.addRules=function(_rules){rules=angular.extend({},rules,_rules);return rules};this.addValidators=function(_validators){validators=validators.concat(_validators);return validators};this.$get=function($injector,$rootScope,$http,$log,avValConfig,AV_VAL){var AvValidation=function(){this.initValidators()};var proto=AvValidation.prototype;proto.initValidators=function(){var self=this;validators=avValConfig.validators.concat(validators);angular.forEach(validators,function(name){self.addValidator(name)})};proto.addValidator=function(name){var validator=$injector.get(name);services[validator.name]=validator};proto.addRules=function(_rules){rules=angular.extend({},rules,_rules);$rootScope.$broadcast(AV_VAL.EVENTS.REVALIDATE)};proto.validate=function(key,element,value,ruleName){var ruleConfig=rules[key];if(!ruleConfig){$log.warn("Could not resolve the form rules key ["+key+"]. This can happen when the rules key is inside a promise and the key value has not resolved on page load.");return}var contraints=ruleConfig[ruleName];if(!contraints){$log.info("Rule named ["+ruleName+"] could not be found in the current schema.");contraints=[]}var el=element[0];var results=[];var violations=[];var _valid=true;angular.forEach(contraints,function(rule,contraintName){if(!rule){return}var validator=services[contraintName];if(angular.isUndefined(validator)){$log.warn("No validator defined for `"+name+"`");return}var valid=validator.validate(value,rule,element);var validationResult={valid:valid,ruleName:ruleName,contraintName:contraintName,value:value,message:rule.message,field:el.name||el.id};var result=angular.extend({},rule,validationResult);results.push(result);if(!valid){violations.push(validationResult)}_valid=_valid&&valid});return{isValid:_valid,all:results,violations:violations}};return new AvValidation}})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avValUtils",function(){return{isDefined:function(value){return angular.isDefined(value)&&value!==""&&value!==null},isEmpty:function(value){return!this.isDefined(value)||$.trim(value)===""}}})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avValSize",function(avValUtils){var validator={name:"size",validate:function(value,rule){var min=rule.min||0;var max=rule.max;var type=rule.type?rule.type.toLowerCase():"text";if(_.isNull(value)||_.isUndefined(value)){value=""}if(type==="text"){value=value+"";return avValUtils.isEmpty(value)||value.length>=min&&(max===undefined||value.length<=max)}if(!_.isNumber(value)&&/^\d+$/.test(value)){value=parseInt(value,10)}return avValUtils.isEmpty(value)||value>=min&&(max===undefined||value<=max)}};return validator})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avValPattern",function(avValUtils){var validator={name:"pattern",REGEX:/^\/(.*)\/([gim]*)$/,asRegExp:function(pattern){var match;if(pattern.test){return pattern}else{match=pattern.match(validator.REGEX);if(match){return new RegExp(match[1],match[2])}else{throw"Expected "+pattern+" to be a RegExp"}}},validate:function(value,rule){var values=_.isArray(rule.value)?rule.value:[rule.value];var valid=false;_.each(values,function(expresion){var pattern=validator.asRegExp(expresion);if(avValUtils.isEmpty(value)||pattern.test(value)){valid=true}});return valid}};return validator})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avValRequired",function(avValUtils){var validator={name:"required",validate:function(value,rule,element){var ctrl=element&&element.data("$ngModelController");if(ctrl){return!ctrl.$isEmpty(value); +}return!avValUtils.isEmpty(value)}};return validator})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avValDateRange",function(AV_VAL,avValUtils){var validator={name:"dateRange",getStartDate:function(start){return validator.setMin(moment().add(start.value,start.units))},getEndDate:function(end){return validator.setMax(moment().add(end.value,end.units))},setMin:function(value){value.set("hours",0);value.set("minutes",0);value.set("seconds",0);return value},setMax:function(value){value.set("hours",23);value.set("minutes",59);value.set("seconds",59);return value},validation:function(value,rules){var date;var startDate;var endDate;date=moment(value,rules.format||AV_VAL.DATE_FORMAT.SIMPLE);date.set("hours",0);date.set("minutes",0);date.set("seconds",0);if(!avValUtils.isEmpty(rules.start.units)&&!avValUtils.isEmpty(rules.end.units)){startDate=validator.getStartDate(rules.start);endDate=validator.getEndDate(rules.end)}else{startDate=moment(rules.start.value,rules.format);endDate=validator.setMax(moment(rules.end.value,rules.format))}return date.isValid()&&date.isBetween(startDate,endDate,"day")||date.isSame(startDate,"day")||date.isSame(endDate,"day")},validate:function(value,rule){return avValUtils.isEmpty(value)||validator.validation(value,rule)}};return validator})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avValDate",function(AV_VAL,avValUtils){var validator={name:"dateFormat",validate:function(value,rules){var format=rules&&rules.format?rules.format:AV_VAL.DATE_FORMAT.SIMPLE;return avValUtils.isEmpty(value)||moment(value,format,true).isValid()}};return validator})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avValNpi",function(avValUtils){var validator={name:"npi",INTEGER_REGEX:/^\d*$/,validate:function(value){var npi=value||"";if(avValUtils.isEmpty(npi)){return true}if(!validator.INTEGER_REGEX.test(npi)||npi.length!==10){return false}var firstDigit=npi.charAt(0);if(!("1"===firstDigit||"2"===firstDigit||"3"===firstDigit||"4"===firstDigit)){return false}var digit=parseInt(npi.charAt(9),10);npi=npi.substring(0,9);npi="80840"+npi;var alternate=true;var total=0;for(var i=npi.length;i>0;i--){var next=parseInt(npi.charAt(i-1),10);if(alternate){next=next*2;if(next>9){next=next%10+1}}total+=next;alternate=!alternate}var roundUp=Math.ceil(total/10)*10;var calculatedCheck=roundUp-total;if(calculatedCheck!==digit){return false}return true}};return validator})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avValPhone",function(avValPattern){var PHONE_PATTERN=/^([0-9][\.\-]?)?[(]{0,1}[0-9]{3}[)\.\- ]{0,1}[0-9]{3}[\.\- ]{0,1}[0-9]{4}$/;var validator={name:"phone",validate:function(value,rule){return avValPattern.validate(value,angular.extend({},rule,{value:PHONE_PATTERN}))}};return validator})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avValEmail",function(avValPattern){var EMAIL_PATTERN=/[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/;var validator={name:"email",validate:function(value,rule){return avValPattern.validate(value,angular.extend({},rule,{value:EMAIL_PATTERN}))}};return validator})})(window);(function(root){"use strict";var availity=root.availity;availity.core.constant("AV_GLOBALS",{REGIONS:[{name:"Alabama",code:"AL"},{name:"Alaska",code:"AK"},{name:"Arizona",code:"AZ"},{name:"Arkansas",code:"AR"},{name:"California",code:"CA"},{name:"Colorado",code:"CO"},{name:"Connecticut",code:"CT"},{name:"Delaware",code:"DE"},{name:"District Of Columbia",code:"DC"},{name:"Florida",code:"FL"},{name:"Georgia",code:"GA"},{name:"Hawaii",code:"HI"},{name:"Idaho",code:"ID"},{name:"Illinois",code:"IL"},{name:"Indiana",code:"IN"},{name:"Iowa",code:"IA"},{name:"Kansas",code:"KS"},{name:"Kentucky",code:"KY"},{name:"Louisiana",code:"LA"},{name:"Maine",code:"ME"},{name:"Maryland",code:"MD"},{name:"Massachusetts",code:"MA"},{name:"Michigan",code:"MI"},{name:"Minnesota",code:"MN"},{name:"Mississippi",code:"MS"},{name:"Missouri",code:"MO"},{name:"Montana",code:"MT"},{name:"Nebraska",code:"NE"},{name:"Nevada",code:"NV"},{name:"New Hampshire",code:"NH"},{name:"New Jersey",code:"NJ"},{name:"New Mexico",code:"NM"},{name:"New York",code:"NY"},{name:"North Carolina",code:"NC"},{name:"North Dakota",code:"ND"},{name:"Ohio",code:"OH"},{name:"Oklahoma",code:"OK"},{name:"Oregon",code:"OR"},{name:"Pennsylvania",code:"PA"},{name:"Rhode Island",code:"RI"},{name:"South Carolina",code:"SC"},{name:"South Dakota",code:"SD"},{name:"Tennessee",code:"TN"},{name:"Texas",code:"TX"},{name:"Utah",code:"UT"},{name:"Vermont",code:"VT"},{name:"Virginia",code:"VA"},{name:"Washington",code:"WA"},{name:"West Virginia",code:"WV"},{name:"Wisconsin",code:"WI"},{name:"Wyoming",code:"WY"}]})})(window);(function(root){"use strict";var availity=root.availity;availity.core.provider("avAnalyticsConfig",function(AV_ANALYTICS){var config={VIRTUAL_PAGE_TRACKING:true,SERVICES:{PIWIK:"avPiwikAnalytics",SPLUNK:"avSplunkAnalytics"},EVENTS:{PAGE:"$locationChangeSuccess",DEFAULT:"click"},PRE_FIX:/^avAnalytics(.*)$/,IGNORE:["avAnalyticsOn","avAnalyticsIf"],ENV:{PROD:{DOMAIN:"apps.availity.com",URL:"https://piwik.availity.com/piwik/"},QA:{URL:"https://qa-piwik.availity.com/piwik/"}}};this.set=function(options){_.merge(config,options);_.merge(AV_ANALYTICS,config)};this.$get=function(AV_ANALYTICS){return angular.copy(_.merge(config,AV_ANALYTICS))};this.set(AV_ANALYTICS)});availity.core.constant("AV_ANALYTICS",{});availity.core.provider("avAnalytics",function(avAnalyticsConfigProvider){var avAnalyticsConfig=avAnalyticsConfigProvider.$get();var plugins=[];var virtualPageTracking=avAnalyticsConfig.VIRTUAL_PAGE_TRACKING;var appId;this.registerPlugins=function(_plugins){if(angular.isString(_plugins)){_plugins=[_plugins]}if(_.isArray(_plugins)){plugins=_plugins}else{throw new Error("AvAnalytics.registerPlugins() expects a string or an array.")}return plugins};this.setVirtualPageTracking=function(value){if(arguments.length){virtualPageTracking=!!value}};this.isVirtualPageTracking=function(){return virtualPageTracking};this.setAppID=function(id){appId=id;return appId};this.$get=function($injector,$q,$log,$rootScope,$location){var AvAnalytics=function(){var self=this;this.services={};if(!plugins||plugins.length===0){plugins=[avAnalyticsConfig.SERVICES.PIWIK,avAnalyticsConfig.SERVICES.SPLUNK]}angular.forEach(plugins,function(plugin){try{self.services[plugin]=$injector.get(plugin)}catch(err){$log.error("Could not load `{0}` plugin",[plugin])}})};var proto=AvAnalytics.prototype;proto.init=function(){var self=this;if(this.isVirtualPageTracking()){$rootScope.$on(avAnalyticsConfig.EVENTS.PAGE,function(){self.trackPageView($location.absUrl())})}angular.forEach(this.services,function(handler){if(handler.isEnabled()&&handler.init){handler.init()}})};proto.trackEvent=function(properties){var promises=[];angular.forEach(this.services,function(handler){var promise=handler.trackEvent(properties);promises.push(promise)});return $q.all(promises)};proto.getAppId=function(){return appId};proto.isVirtualPageTracking=function(){return virtualPageTracking};proto.trackPageView=function(url){var promises=[];angular.forEach(this.services,function(handler){var promise=handler.trackPageView(url);promises.push(promise)});return $q.all(promises)};return new AvAnalytics}})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avAnalyticsUtils",function(avAnalyticsConfig,$log){var AnalyticsUtils=function(){};var proto=AnalyticsUtils.prototype;proto.getProperties=function(attributes){var self=this;var props={};_.forEach(attributes,function(value,key){if(self.isValidAttribute(key)&&self.isNotIgnored(key)){var result=self.getAttribute(key,value);props[result.key]=result.value}});return props};proto.isExternalLink=function(attrs){return attrs.href&&!attrs.ngClick};proto.isNotIgnored=function(key){var ignored=_.includes(avAnalyticsConfig.IGNORE,key);return!ignored};proto.isValidAttribute=function(key){return avAnalyticsConfig.PRE_FIX.test(key)};proto.lowercase=function(str){return str.substr(0,1).toLowerCase()+str.substr(1)};proto.getAttribute=function(key,value){var simpleKey=key.match(avAnalyticsConfig.PRE_FIX);if(simpleKey&&simpleKey[1]){return{key:this.lowercase(simpleKey[1]),value:value}}};proto.toNum=function(value){var parsed=parseInt(value,10);value=isNaN(parsed)?0:parsed;return value};proto.isValid=function(trackingValues){var valid=true;if(trackingValues.value||trackingValues.value===0){delete trackingValues.value}_.forEach(trackingValues,function(key,value){if(availity.isBlank(value)||_.isUndefined(value)){$log.warn("The analytic tracking value for "+key.toUpperCase()+" is not defined.");valid=false}});return valid};return new AnalyticsUtils})})(window);(function(root){"use strict";var availity=root.availity;availity.core.factory("avSplunkAnalytics",function($log,avLogMessagesResource,$location){var SplunkAnalyticsService=function(){};var proto=SplunkAnalyticsService.prototype;proto.trackEvent=function(properties){properties.url=$location.$$absUrl||"N/A";properties.level=properties.level||"info";return avLogMessagesResource[properties.level](properties)};proto.trackPageView=function(url){var properties={event:"page",level:"info",url:url||$location.$$absUrl()};return avLogMessagesResource[properties.level](properties)};proto.isEnabled=function(){return true};return new SplunkAnalyticsService})})(window);(function(root){"use strict";var availity=root.availity;availity.core.provider("avPiwikAnalytics",function(){var self;var siteId;var enabled=false;var customVariables=[];this.enabled=function(_enabled){enabled=!!_enabled};this._setCustomVariable=function(index,valueName,value,scope){if(!index||isNaN(index)){throw new Error("index must be a number")}else if(!valueName){throw new Error("valueName must be declared")}else{customVariables.push(["setCustomVariable",index,valueName,value,scope])}};this.setSiteID=function(_siteID){this.enabled(true);siteId=_siteID};this.setVisitVariables=function(items){_.forEach(items,function(item){self._setCustomVariable(item[0],item[1],item[2],"visit")})};this.setPageVariables=function(index,name,value){this._setCustomVariable(index,name,value,"page")};this.$get=function(avAnalyticsUtils,avUsersResource,avAnalyticsConfig,$injector,$log,$q,$document,$location){var AvPiwikAnalytics=function(){window._paq=window._paq||[]};var proto=AvPiwikAnalytics.prototype;proto.trackEvent=function(properties){if(!window._paq){$log.warn("Piwik object `_paq` not found in global scope");return $q.when(false)}if(properties.value){properties.value=avAnalyticsUtils.toNum(properties.event)}if(!avAnalyticsUtils.isValid(properties)){$log.warn("Invalid properties being passed. Tracking info will not be sent.");return $q.when(false)}return $q.when(window._paq.push(["trackEvent",properties.category,properties.action||properties.event,properties.label,properties.value]))};proto.trackPageView=function(url){if(!window._paq){$log.warn("Piwik object `_paq` not found in global scope");return $q.when(false)}return $q.when([window._paq.push(["setCustomUrl",url]),window._paq.push(["trackPageView",url])])};proto.init=function(){avUsersResource.me().then(function(user){window._paq.push(["setUserId",user.id])});if(!_.isFinite(siteId)){$log.warn("Invalid Piwik Site Id. Piwik analytics has been disabled.");return}var url;if($location.$$host===avAnalyticsConfig.ENV.PROD.DOMAIN){url=avAnalyticsConfig.ENV.PROD.URL}else{url=avAnalyticsConfig.ENV.QA.URL}window._paq.push(["enableLinkTracking"]);window._paq.push(["setTrackerUrl",url+"piwik.php"]);window._paq.push(["setSiteId",siteId]);_.forEach(customVariables,function(variable){window._paq.push(variable)});$.getScript(url+"piwik.js",function(){})};proto.isEnabled=function(){return enabled&&siteId};return new AvPiwikAnalytics}})})(window);(function(root){"use strict";var availity=root.availity;availity.core.constant("AV_EXCEPTIONS",{MESSAGES:{NOT_APPLICABLE:"N/A"},TYPES:{EXCEPTION:"exception"},REPEAT_LIMIT_TIME:5e3});availity.core.provider("avExceptionAnalytics",function(){var _enabled=true;var appId;this.enabled=function(enabled){_enabled=!!enabled};this.setAppId=function(_id){appId=_id};this.$get=function(avLogMessagesResource,$location,AV_EXCEPTIONS){var AvExceptionAnalytics=function(){};var proto=AvExceptionAnalytics.prototype;proto.init=function(){var self=this;if(!_enabled){return}TraceKit.remoteFetching=false;TraceKit.surroundingLinesToCollect=11;TraceKit.report.subscribe(function(stacktrace){self.onError(stacktrace)});this.messageTimestampMap={}};proto.prettyPrint=function(stacktrace){var message="";var length=stacktrace.stack.length;for(var i=0;i li + li:before {\n margin-left: .5em;\n}\n\n/*# sourceMappingURL=maps/availity-angular.css.map */\n","[ng-click],\n[data-ng-click],\n[x-ng-click] {\n cursor: pointer;\n}\n[ng-click][disabled],\n[data-ng-click][disabled],\n[x-ng-click][disabled],\n[ng-click].disabled,\n[data-ng-click].disabled,\n[x-ng-click].disabled {\n cursor: auto;\n pointer-events: none;\n}\n.block-ui-container {\n z-index: 1010;\n}\n.av-block-ui-message {\n color: #333;\n background: none;\n z-index: 1011;\n}\n.dimmer-content {\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n padding: 1.25rem;\n display: none;\n z-index: 2;\n}\n.dimmer-content.dimmer-content-dark {\n background: rgba(77, 79, 83, 0.9);\n color: #FFFFFF !important;\n}\n.breadcrumb-space > li + li:before {\n margin-left: .5em;\n}\n"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["availity-angular.css","/source/availity-angular.css"],"names":[],"mappings":"AAMA,gBCDA,WDEA,aACE,OAAQ,QCMV,yBDHA,0BAEA,oBAHA,qBAKA,sBAHA,uBCIC,OAAA,KACD,eAAA,KDEA,oBCCE,QAAA,KAEF,qBACE,MAAA,KACA,eACA,QAAA,KDEF,gBCCE,SAAA,SACA,IAAA,EACA,OAAA,EACD,MAAA,EACD,KAAA,EACE,QAAA,QACA,QAAA,KACD,QAAA,EDED,oCCCC,WAAA,kBDCC,MAAO,eAET,+BACE,YAAa","file":"availity-angular.min.css","sourcesContent":["/**\n * availity-angular v1.13.0 -- October-26\n * Copyright 2016 Availity, LLC \n */\n\n[ng-click],\n[data-ng-click],\n[x-ng-click] {\n cursor: pointer;\n}\n[ng-click][disabled],\n[data-ng-click][disabled],\n[x-ng-click][disabled],\n[ng-click].disabled,\n[data-ng-click].disabled,\n[x-ng-click].disabled {\n cursor: auto;\n pointer-events: none;\n}\n.block-ui-container {\n z-index: 1010;\n}\n.av-block-ui-message {\n color: #333;\n background: none;\n z-index: 1011;\n}\n.dimmer-content {\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n padding: 1.25rem;\n display: none;\n z-index: 2;\n}\n.dimmer-content.dimmer-content-dark {\n background: rgba(77, 79, 83, 0.9);\n color: #FFFFFF !important;\n}\n.breadcrumb-space > li + li:before {\n margin-left: .5em;\n}\n\n/*# sourceMappingURL=maps/availity-angular.css.map */\n","[ng-click],\n[data-ng-click],\n[x-ng-click] {\n cursor: pointer;\n}\n[ng-click][disabled],\n[data-ng-click][disabled],\n[x-ng-click][disabled],\n[ng-click].disabled,\n[data-ng-click].disabled,\n[x-ng-click].disabled {\n cursor: auto;\n pointer-events: none;\n}\n.block-ui-container {\n z-index: 1010;\n}\n.av-block-ui-message {\n color: #333;\n background: none;\n z-index: 1011;\n}\n.dimmer-content {\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n padding: 1.25rem;\n display: none;\n z-index: 2;\n}\n.dimmer-content.dimmer-content-dark {\n background: rgba(77, 79, 83, 0.9);\n color: #FFFFFF !important;\n}\n.breadcrumb-space > li + li:before {\n margin-left: .5em;\n}\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/dist/maps/availity-angular-ui-templates.min.js.map b/dist/maps/availity-angular-ui-templates.min.js.map index eb8cb7bf..3da6981d 100644 --- a/dist/maps/availity-angular-ui-templates.min.js.map +++ b/dist/maps/availity-angular-ui-templates.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["availity-angular-ui-templates.js","/source/ui/accordion/accordion-group-tpl.html","/source/ui/accordion/accordion-tpl.html","/source/ui/animation/loader-tpl.html","/source/ui/badge/badge-tpl.html","/source/ui/breadcrumbs/breadcrumbs-spaces-tpl.html","/source/ui/breadcrumbs/breadcrumbs-tpl.html","/source/ui/block/block-tpl.html","/source/ui/idle/idle-session-tpl.html","/source/ui/idle/idle-tpl.html","/source/ui/idle/idle-warning-tpl.html","/source/ui/labels/removable-label-tpl.html","/source/ui/modal/modal-tpl.html","/source/ui/scroll-pagination/scroll-pagination-tpl.html","/source/ui/tabs/tab-tpl.html","/source/ui/tabs/tabs-tpl.html"],"names":["angular","module","run","$templateCache","put","availity","window","exports"],"mappings":";;;;;CAKA,WACA,YACAA,SAAQC,OAAO,4BAA6BC,KAAK,iBAAkB,SAASC,gBCP5EA,eAAAC,IAAA,wCAAA,giCCAAD,gBAAAC,IAAA,kCAAA,mDCAAD,gBAAAC,IAAA,+BAAA,wKCAAD,gBAAAC,IAAA,0BAAA,4FCAAD,gBAAAC,IAAA,6CAAA,+gBCAAD,gBAAAC,IAAA,sCAAA,4RCAAD,gBAAAC,IAAA,0BAAA,wYCAAD,gBAAAC,IAAA,gCAAA,6gBCAAD,gBAAAC,IAAA,wBAAA,uECAAD,gBAAAC,IAAA,gCAAA,ycCAAD,gBAAAC,IAAA,qCAAA,wGCAAD,gBAAAC,IAAA,0BAAA,mOCAAD,gBAAAC,IAAA,kDAAA,mWCAAD,gBAAAC,IAAA,uBAAA,6ICAAD,gBAAAC,IAAA,wBAAA,qXfsBA,IAAIC,UAAWC,OAAOD,YAAgB,UAAUJ,UAAW,aAAeA,OAAOM,QAAS,CAACN,OAAOM,QAAUF","file":"availity-angular-ui-templates.min.js","sourcesContent":["/**\n * availity-angular v1.12.7 -- October-10\n * Copyright 2016 Availity, LLC \n */\n\n(function() {\n'use strict';\nangular.module('availity.ui.templates', []).run(['$templateCache', function($templateCache) {$templateCache.put('ui/accordion/accordion-group-tpl.html','');\n$templateCache.put('ui/accordion/accordion-tpl.html','
');\n$templateCache.put('ui/animation/loader-tpl.html','
');\n$templateCache.put('ui/badge/badge-tpl.html',' 0\" data-ng-bind=\"count | avApproximate\">');\n$templateCache.put('ui/breadcrumbs/breadcrumbs-spaces-tpl.html','');\n$templateCache.put('ui/breadcrumbs/breadcrumbs-tpl.html','
');\n$templateCache.put('ui/block/block-tpl.html','
0\">
');\n$templateCache.put('ui/idle/idle-session-tpl.html','

Session Expired

Your session has expired. If you want to continue, click Log into Availity and enter your login credentials.

');\n$templateCache.put('ui/idle/idle-tpl.html','
');\n$templateCache.put('ui/idle/idle-warning-tpl.html','

Are you still working?

Your session is about to expire. Click anywhere on the screen to let us know you are still here.

');\n$templateCache.put('ui/labels/removable-label-tpl.html','');\n$templateCache.put('ui/modal/modal-tpl.html','
');\n$templateCache.put('ui/scroll-pagination/scroll-pagination-tpl.html','
');\n$templateCache.put('ui/tabs/tab-tpl.html','
  • {{heading}}
  • ');\n$templateCache.put('ui/tabs/tabs-tpl.html','
      ');}]);\nvar availity = window.availity || {}; if(typeof module !== 'undefined' && module.exports) {module.exports = availity; } })();\n\n//# sourceMappingURL=maps/availity-angular-ui-templates.js.map\n","
      \n
      \n

      \n \n {{heading}} \n \n \n \n

      \n
      \n
      \n
      \n
      \n
      \n","
      \n","
      \n \n \n \n
      \n"," 0\" data-ng-bind=\"count | avApproximate\">\n","\n","
        \n
      • \n \n \n
      • \n
      \n","
      0\"\n class=\"block-ui-overlay\"\n data-ng-class=\"{ 'block-ui-visible': state.blocking }\">\n
      \n
      \n
      \n \n
      \n
      \n\n","
      \n

      Session Expired

      \n
      \n
      \n
      \n
      \n \n
      \n
      \n

      Your session has expired. If you want to continue, click Log into Availity and enter your login credentials.

      \n
      \n
      \n
      \n
      \n \n
      \n\n\n","
      \n
      \n
      \n
      \n","
      \n

      Are you still working?

      \n
      \n
      \n
      \n
      \n \n
      \n
      \n

      Your session is about to expire. Click anywhere on the screen to let us know you are still here.

      \n
      \n
      \n
      \n
      \n \n
      \n\n","\n","
      \n
      \n
      \n \n
      \n
      \n
      \n\n","
      \n \n
      \n \n
      ","
    • \n {{heading}}\n
    • \n","
      \n
        \n
        \n
        \n
        \n
        \n"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["availity-angular-ui-templates.js","/source/ui/accordion/accordion-group-tpl.html","/source/ui/accordion/accordion-tpl.html","/source/ui/animation/loader-tpl.html","/source/ui/badge/badge-tpl.html","/source/ui/breadcrumbs/breadcrumbs-spaces-tpl.html","/source/ui/breadcrumbs/breadcrumbs-tpl.html","/source/ui/block/block-tpl.html","/source/ui/idle/idle-session-tpl.html","/source/ui/idle/idle-tpl.html","/source/ui/idle/idle-warning-tpl.html","/source/ui/labels/removable-label-tpl.html","/source/ui/modal/modal-tpl.html","/source/ui/scroll-pagination/scroll-pagination-tpl.html","/source/ui/tabs/tab-tpl.html","/source/ui/tabs/tabs-tpl.html"],"names":["angular","module","run","$templateCache","put","availity","window","exports"],"mappings":";;;;;CAKA,WACA,YACAA,SAAQC,OAAO,4BAA6BC,KAAK,iBAAkB,SAASC,gBCP5EA,eAAAC,IAAA,wCAAA,giCCAAD,gBAAAC,IAAA,kCAAA,mDCAAD,gBAAAC,IAAA,+BAAA,wKCAAD,gBAAAC,IAAA,0BAAA,4FCAAD,gBAAAC,IAAA,6CAAA,+gBCAAD,gBAAAC,IAAA,sCAAA,4RCAAD,gBAAAC,IAAA,0BAAA,wYCAAD,gBAAAC,IAAA,gCAAA,6gBCAAD,gBAAAC,IAAA,wBAAA,uECAAD,gBAAAC,IAAA,gCAAA,ycCAAD,gBAAAC,IAAA,qCAAA,wGCAAD,gBAAAC,IAAA,0BAAA,mOCAAD,gBAAAC,IAAA,kDAAA,mWCAAD,gBAAAC,IAAA,uBAAA,6ICAAD,gBAAAC,IAAA,wBAAA,qXfsBA,IAAIC,UAAWC,OAAOD,YAAgB,UAAUJ,UAAW,aAAeA,OAAOM,QAAS,CAACN,OAAOM,QAAUF","file":"availity-angular-ui-templates.min.js","sourcesContent":["/**\n * availity-angular v1.13.0 -- October-26\n * Copyright 2016 Availity, LLC \n */\n\n(function() {\n'use strict';\nangular.module('availity.ui.templates', []).run(['$templateCache', function($templateCache) {$templateCache.put('ui/accordion/accordion-group-tpl.html','');\n$templateCache.put('ui/accordion/accordion-tpl.html','
        ');\n$templateCache.put('ui/animation/loader-tpl.html','
        ');\n$templateCache.put('ui/badge/badge-tpl.html',' 0\" data-ng-bind=\"count | avApproximate\">');\n$templateCache.put('ui/breadcrumbs/breadcrumbs-spaces-tpl.html','');\n$templateCache.put('ui/breadcrumbs/breadcrumbs-tpl.html','
        ');\n$templateCache.put('ui/block/block-tpl.html','
        0\">
        ');\n$templateCache.put('ui/idle/idle-session-tpl.html','

        Session Expired

        Your session has expired. If you want to continue, click Log into Availity and enter your login credentials.

        ');\n$templateCache.put('ui/idle/idle-tpl.html','
        ');\n$templateCache.put('ui/idle/idle-warning-tpl.html','

        Are you still working?

        Your session is about to expire. Click anywhere on the screen to let us know you are still here.

        ');\n$templateCache.put('ui/labels/removable-label-tpl.html','');\n$templateCache.put('ui/modal/modal-tpl.html','
        ');\n$templateCache.put('ui/scroll-pagination/scroll-pagination-tpl.html','
        ');\n$templateCache.put('ui/tabs/tab-tpl.html','
      • {{heading}}
      • ');\n$templateCache.put('ui/tabs/tabs-tpl.html','
          ');}]);\nvar availity = window.availity || {}; if(typeof module !== 'undefined' && module.exports) {module.exports = availity; } })();\n\n//# sourceMappingURL=maps/availity-angular-ui-templates.js.map\n","
          \n
          \n

          \n \n {{heading}} \n \n \n \n

          \n
          \n
          \n
          \n
          \n
          \n","
          \n","
          \n \n \n \n
          \n"," 0\" data-ng-bind=\"count | avApproximate\">\n","\n","
            \n
          • \n \n \n
          • \n
          \n","
          0\"\n class=\"block-ui-overlay\"\n data-ng-class=\"{ 'block-ui-visible': state.blocking }\">\n
          \n
          \n
          \n \n
          \n
          \n\n","
          \n

          Session Expired

          \n
          \n
          \n
          \n
          \n \n
          \n
          \n

          Your session has expired. If you want to continue, click Log into Availity and enter your login credentials.

          \n
          \n
          \n
          \n
          \n \n
          \n\n\n","
          \n
          \n
          \n
          \n","
          \n

          Are you still working?

          \n
          \n
          \n
          \n
          \n \n
          \n
          \n

          Your session is about to expire. Click anywhere on the screen to let us know you are still here.

          \n
          \n
          \n
          \n
          \n \n
          \n\n","\n","
          \n
          \n
          \n \n
          \n
          \n
          \n\n","
          \n \n
          \n \n
          ","
        • \n {{heading}}\n
        • \n","
          \n
            \n
            \n
            \n
            \n
            \n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/dist/maps/availity-angular.js.map b/dist/maps/availity-angular.js.map index a46f13b2..ead36427 100644 --- a/dist/maps/availity-angular.js.map +++ b/dist/maps/availity-angular.js.map @@ -1 +1 @@ -{"version":3,"sources":["index.js","strings.js","uuid.js","urls.js","print.js","throttle.js","logger.js","logger-config.js","polling.js","api-factory.js","api-users.js","api-coverages.js","api-configurations.js","api-log-messages.js","api-spaces.js","api-documents.js","api-organizations.js","api-codes.js","api-user-permissions.js","user-authorizations.js","session.js","idle.js","idle-interceptor.js","validator.js","validator-utils.js","validator-size.js","validator-pattern.js","validator-required.js","validator-date-range.js","validator-date-format.js","validator-npi.js","validator-phone.js","validator-email.js","globals.js","analytics.js","analytics-util.js","analytics-splunk.js","analytics-piwik.js","analytics-exceptions.js","analytics-config.js","date-polyfill.js","messages-constants.js","messages.js"],"names":[],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"availity-angular.js","sourcesContent":["/*global module*/\n\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity || {};\n availity.VERSION = 'v0.0.0';\n availity.MODULE = 'availity';\n availity.core = angular.module(availity.MODULE, ['ng']);\n\n var originalModule = angular.module;\n var modules = [];\n\n angular.module = function(name, deps) {\n\n if(deps && _.indexOf(modules, name) !== -1 && !window.__karma__) {\n throw new Error('redefining module: ' + name);\n }\n\n modules.push(name);\n\n return originalModule(name, deps);\n };\n\n root.availity = availity;\n\n if(typeof module !== 'undefined' && module.exports) {\n module.exports = availity;\n }\n\n})(window);\n\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n // https://github.com/epeli/underscore.string/blob/cebddf40cf2e10f0e9b596d9654edd0a1cfefc15/helper/makeString.js\n availity._stringify = function(object) {\n if(object === null) {\n return '';\n }\n return '' + object;\n };\n\n // https://github.com/epeli/underscore.string/blob/cebddf40cf2e10f0e9b596d9654edd0a1cfefc15/isBlank.js\n availity.isBlank = function(str) {\n return (/^\\s*$/).test(availity._stringify(str));\n };\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var uid = ['0', '0', '0'];\n\n availity.uuid = function(prefix) {\n var index = uid.length;\n var digit;\n\n while(index) {\n index--;\n digit = uid[index].charCodeAt(0);\n if(digit === 57 /*'9'*/) {\n uid[index] = 'A';\n return prefix ? prefix + uid.join('') : uid.join('');\n }\n if(digit === 90 /*'Z'*/) {\n uid[index] = '0';\n } else {\n uid[index] = String.fromCharCode(digit + 1);\n return prefix ? prefix + uid.join('') : uid.join('');\n }\n }\n uid.unshift('0');\n return prefix ? prefix + uid.join('') : uid.join('');\n };\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.REGEX_API_URL = /^.*?api.availity.com(.*)$/;\n\n availity.getRelativeUrl = function(url) {\n var result = url.match(availity.REGEX_API_URL);\n if(result && result[1]) {\n return '/api' + result[1];\n }\n\n return url;\n };\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n // https://github.com/jasonday/printThis/commit/66f9cbd0e3760767342eed4ef32cf8294417b227\n availity.print = function() {\n\n if(document.queryCommandSupported('print')) {\n document.execCommand('print', false, null);\n } else {\n window.focus();\n window.print();\n }\n };\n\n})(window);\n","// Original => https://github.com/mgcrea/angular-strap/blob/master/src/helpers/debounce.js\n\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_THROTTLE', {\n OPTIONS: {\n wait: 1000,\n update: false,\n trailing: true,\n leading: false\n }\n });\n\n availity.core.factory('avThrottle', function(AV_THROTTLE, $timeout) {\n\n return function(fn, wait, options) {\n\n options = _.merge({}, AV_THROTTLE.OPTIONS, options);\n\n wait = wait ? wait : AV_THROTTLE.THRESHOLD;\n var update = angular.isDefined(options.update) ? options.update : AV_THROTTLE.UPDATE;\n var timer = null;\n\n return function() {\n var context = options.context || this;\n var args = arguments;\n\n if(!timer) {\n if(options.leading !== false) {\n fn.apply(context, args);\n }\n\n var later = function() {\n timer = null;\n if(options.trailing !== false) {\n fn.apply(context, args);\n }\n };\n\n timer = $timeout(later, wait, update);\n }\n\n return timer;\n\n };\n };\n });\n\n})(window);\n","// Orginal => https://github.com/ericzon/angular-ny-logger/blob/0c594e864c93e7f33d36141200096bc6139ddde1/angular-ny-logger.js\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.provider('AvLogger', function() {\n\n var _enabled = false;\n\n this.enabled = function(enabled) {\n _enabled = !!enabled;\n };\n\n this.$get = function($injector) {\n\n var AvLogger = function(context, $delegate) {\n\n this.context = context || '';\n this.$log = $delegate;\n\n };\n\n var proto = AvLogger.prototype;\n\n AvLogger.supplant = function(str, supplantData) {\n if (!supplantData) {\n return str;\n }\n\n var _supplant = function (match, key) {\n var result = supplantData[key];\n return result;\n };\n\n return str.replace(/\\{([^{}]*)\\}/g, _supplant);\n };\n\n AvLogger.isObject = function(element) {\n var elemStr = ( !angular.isUndefined(element) && !angular.isUndefined(element.constructor) ) ? element.constructor.toString() : '';\n return (elemStr.indexOf('Object') > -1);\n };\n\n AvLogger.getFormattedTimestamp = function(date) {\n\n return AvLogger.supplant('{0}:{1}:{2}:{3}', [\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds()\n ]);\n\n };\n\n proto._log = function(originalFn, args) {\n\n // Allow enabling logger through query params\n // Ex:\n //\n // http://localhost:3000/ui.html#avLogger\n\n var hash = window.location.hash;\n hash = hash || '';\n\n if(!_enabled && hash.indexOf('avLogger') < 0 && originalFn !== 'error') {\n return;\n }\n\n var now = AvLogger.getFormattedTimestamp(new Date());\n var message = '';\n var supplantData = [];\n\n var context = this.context ? ' [' + this.context + '] ' : '';\n\n switch(args.length) {\n case 1:\n // (1) If the user supplied one argument, then the argument must be\n // the message itself and _log()\n // will print: - : \n supplantData = args[0];\n message = AvLogger.supplant('{0}{1} - {2}', [now, context, args[0]]);\n break;\n case 3:\n // (3) If the user supplied three arguments, then the first argument\n // is a method name, the second is the message and the third is an\n // object of variables to interpolate with the message. For this, _log()\n // will print: - - ('')\n supplantData = args[2];\n message = AvLogger.supplant(\"{0}{1} - {2}(\\'{3}\\')\", [now, context, args[0], args[1]]);\n break;\n case 2:\n // (2) If the user provided two arguments, we need to find out whether\n // they supplied a method name or an interpolation object.\n // In order to figure that out, we’ll check the type of the last argument.\n // If it is a string, then it has to be the message itself while the\n // first argument is the method name. Otherwise consider the first argument\n // as the message and the second as array of interpolation variables.\n // The output print will be according to this check.\n if(typeof args[1] === 'string') {\n\n message = AvLogger.supplant(\"{0}{1} - {2}(\\'{3}\\')\", [now, context, args[0], args[1]]);\n\n } else {\n\n // If the message is an error, there may be a stack included. If so, we\n // should include the stack in the message to make it more meaningful.\n if(args[0].stack) {\n var errorMessage = this.formatError(args[0]);\n message = AvLogger.supplant('{0}{1} - {2}', [now, context, errorMessage]);\n supplantData = args[1];\n\n }else {\n supplantData = args[1];\n\n }\n\n }\n break;\n }\n\n var $log = this.$log || $injector.get('$log');\n\n var params = (AvLogger.isObject(supplantData)) ? [message, supplantData] : [AvLogger.supplant(message, supplantData)];\n $log[originalFn].apply(null, params);\n\n };\n\n proto.log = function() {\n this._log('log', arguments);\n };\n\n proto.info = function() {\n this._log('info', arguments);\n };\n\n proto.warn = function() {\n this._log('warn', arguments);\n };\n\n proto.debug = function() {\n this._log('debug', arguments);\n };\n\n // https://github.com/angular/angular.js/blob/v1.2.27/src/ng/log.js#L122\n proto.formatError = function(arg) {\n if(arg instanceof Error) {\n if(arg.stack) {\n\n arg = (arg.message && arg.stack.indexOf(arg.message) === -1) ?\n 'Error: ' + arg.message + '\\n' + arg.stack : arg.stack;\n\n } else if(arg.sourceURL) {\n arg = arg.message + '\\n' + arg.sourceURL + ':' + arg.line;\n }\n }\n return arg;\n };\n\n proto.error = function() {\n this._log('error', arguments);\n };\n\n return AvLogger;\n\n };\n\n });\n\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.config(function($provide) {\n\n $provide.decorator('$log', function($delegate, AvLogger) {\n return new AvLogger(null, $delegate);\n });\n\n });\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_POLLING', {\n INTERVAL: 1000, // delay in ms before retrying an async request\n MAX_ELAPSED_TIME: 5000, // max time in ms before polling stops and rejects original request\n MAX_RETRY: 30, // # of times the request will be tried\n DECAY: 1.2, // % the polling interval decays after every retry\n // maximum time polling is allowed before rejecting the request\n EVENTS: {\n MAX_RETRY: 'av:polling:max:retry'\n },\n REGEX_URL: /^.*?api.availity.com(.*)$/ // capture the relative url from API\n });\n\n var PollingServiceFactory = function($rootScope, $q, $injector, $timeout, $log, AV_POLLING, AV_API) {\n\n var AvPollingService = function() {\n this.pendingRequests = []; // stores all request for polling\n };\n\n var proto = AvPollingService.prototype;\n\n proto.response = function(response) {\n\n if(this.isAsyncResponse(response)) {\n return this.onAsyncReponse(response);\n }\n\n return response || $q.when(response);\n };\n\n proto.setDefaults = function(config) {\n\n var defaultOptions = {\n pollingInterval: AV_POLLING.INTERVAL,\n pollingDecay: AV_POLLING.DECAY,\n pollingMaxInterval: AV_POLLING.MAX_ELAPSED_TIME,\n pollingRetryCount: 0,\n pollingStartTime: new Date().getTime()\n };\n\n return _.extend(defaultOptions, config);\n };\n\n proto.responseError = function(response) {\n // Return the promise rejection\n return $q.reject(response);\n };\n\n /**\n * API layer return a link with a polling url for\n * async responses.\n *\n * @param {Object} response ajax response\n * @return {Boolean} true if response has status of 202 (accepted) and location param in header with uri+session link\n */\n proto.isAsyncResponse = function(response) {\n\n return response &&\n response.config &&\n response.config.api &&\n response.status &&\n response.status === 202 &&\n angular.isFunction(response.headers) && !availity.isBlank(response.headers(AV_API.HEADERS.SERVER.LOCATION));\n };\n\n proto.onAsyncReponse = function(response) {\n\n response.config = this.setDefaults(response.config);\n\n var deferred = $q.defer();\n\n this.queueRequest(deferred, response);\n\n // [rm3]: Can't call notify before you return promise object?\n $timeout(function() {\n // Notify deferred listeners with the original server response\n deferred.notify(response);\n }, 0, false);\n\n return deferred.promise;\n };\n\n proto.getUrl = function(url) {\n\n var result = url.match(AV_POLLING.REGEX_URL);\n if(result && result[1]) {\n return '/api' + result[1];\n }\n\n return url;\n };\n\n proto.queueRequest = function(deferred, response) {\n\n var self = this;\n // server replies with location header so set the url into config\n var _url = availity.getRelativeUrl(response.headers(AV_API.HEADERS.SERVER.LOCATION));\n var _config = response.config;\n\n\n // headers – {Object} – Map of strings or functions which return strings representing HTTP headers\n // to send to the server. If the return value of a function is null, the header\n // will not be sent. Functions accept a config object as an argument.\n var config = {\n method: 'GET',\n api: true,\n headers: _config.headers,\n pollingInterval: _config.pollingInterval,\n pollingMaxRetry: _config.pollingMaxRetry,\n pollingMaxInterval: _config.pollingMaxInterval,\n pollingStartTime: _config.pollingStartTime,\n _pollingDecay: _config._pollingDecay,\n pollingRetryCount: _config.pollingRetryCount,\n pollingDecay: _config.pollingDecay,\n url: _url, /* set the url from the server response */\n cache: false\n };\n\n var request = {\n id: availity.uuid('request-'),\n config: config,\n deferred: deferred\n };\n\n var timeout = this.getPollingTimeout(config);\n\n // each async request should run on its own timer\n var timer = $timeout(function() {\n self.retryRequest(request.id);\n }, timeout, false);\n\n request.timer = timer;\n\n // add the async request to the queue\n this.pushRequest(request);\n\n };\n\n proto.popRequest = function(id) {\n\n var index = null;\n var request = null;\n\n for(var i = 0; i < this.pendingRequests.length; i++) {\n if(this.pendingRequests[i].id === id) {\n index = i;\n break;\n }\n }\n\n request = this.pendingRequests[index];\n this.pendingRequests.splice(index, 1);\n\n return request;\n };\n\n proto.pushRequest = function(request) {\n this.pendingRequests.push(request);\n };\n\n proto.getPollingTimeout = function(config) {\n return config.pollingDecay * config.pollingInterval;\n };\n\n proto.isPollingMaxTimeout = function(config) {\n var now = new Date().getTime();\n var elaspedTime = now - config.pollingStartTime;\n var isElapsed = elaspedTime > config.pollingMaxInterval;\n return isElapsed;\n },\n\n proto.isMaxRetried = function(config) {\n return config.pollingRetryCount >= AV_POLLING.MAX_RETRY;\n };\n\n proto.isPollable = function(config) {\n var _isTimeout = this.isPollingMaxTimeout(config);\n var _isMax = this.isMaxRetried(config);\n\n return _isTimeout || _isMax ? false : true;\n\n };\n\n proto.retryRequest = function(id) {\n\n var self = this;\n var request = this.popRequest(id);\n $timeout.cancel(request.timer);\n\n var config = request.config;\n\n var deferred = request.deferred;\n\n if(!this.isPollable(config)) {\n $log.info('Rejecting pollable response due to timeout');\n return deferred.reject(request);\n }\n\n // increment counters and polling timeouts\n this.increment(config);\n\n function successCallback(response) {\n if(self.isAsyncResponse(response)) {\n deferred.notify(response);\n self.queueRequest(request.deferred, response);\n } else {\n deferred.resolve(response);\n }\n }\n\n function errorCallback(response) {\n deferred.reject(response);\n }\n\n // Silly circular dependency trick\n var $http = $injector.get('$http');\n\n $http(config).then(successCallback, errorCallback);\n\n };\n\n proto.increment = function(config) {\n this.incrementCounter(config);\n this.incrementDecay(config);\n };\n\n proto.incrementDecay = function(config) {\n if(!config._pollingDecay) {\n // store the original decay param\n config._pollingDecay = config.pollingDecay;\n }\n config.pollingDecay *= config._pollingDecay;\n };\n\n proto.incrementCounter = function(config) {\n config.pollingRetryCount++;\n };\n\n proto.clearRequests = function() {\n angular.forEach(this.pendingRequests, function(request) {\n $timeout.cancel(request.timer);\n });\n this.pendingRequests = [];\n };\n\n return new AvPollingService();\n\n };\n\n availity.core.factory('avPollingService', PollingServiceFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_API', {\n HEADERS: {\n SERVER: {\n ID: 'X-API-ID',\n LOCATION: 'Location',\n STATUS: 'X-Status-Message',\n GLOBAL_ID: 'X-Global-Transaction-ID'\n },\n CLIENT: {\n SESSION_ID: 'X-Session-ID',\n AUTH: 'Authorization',\n OVERRIDE: 'X-HTTP-Method-Override',\n CALLBACK_URL: 'X-Callback-URL',\n CUSTOMER_ID: 'X-Availity-Customer-ID',\n RESPONSE_ENCODING: 'X-Response-Encoding-Context'\n }\n },\n OPTIONS: {\n // pre-prend the url with a value like `/public` so we can build urls like `public/api/v1/*`\n prefix: '',\n // default base url for endpoints\n path: '/api',\n // url resource group, such as `/foo`, for urls like `public/api/foo/v1/*`\n resourceGroup: '',\n // url to resource endpoint like `coverages` or `payers`\n url: null,\n // defaults to version 1\n version: '/v1',\n // governance level `/internal`\n level: '',\n // post-pend the url with `.json`, `.txt` or `.xml`\n suffix: '',\n // cache all request by default\n cache: true,\n // flag used to enable behaviors around the Availity Rest API\n api: true,\n // # of times the polling service has tried to get a response\n pollingRetryCount: 0,\n // in ms\n pollingInterval: 1000,\n // % the polling interval decays after every retry\n pollingDecay: 1.2,\n // maximum time polling is allowed before rejecting the request\n pollingMaxInterval: 30000,\n // default headers\n headers: {\n // Turn off content encoding for angular apis\n 'X-Response-Encoding-Context': 'NONE'\n }\n }\n });\n\n // Factory that creates ApiResourcess\n var ApiResourcesProvider = function(AV_API) {\n\n // Provider default options that can be overridden at config time\n var defaultOptions = _.merge({}, AV_API.OPTIONS);\n\n // Allow overrides in config phase\n this.setOptions = function(options) {\n _.merge(defaultOptions, options);\n };\n\n this.getOptions = function() {\n return angular.copy(defaultOptions);\n };\n\n // helper method to global set http common headers\n this.setHttpCommonHeaders = function($httpProvider) {\n _.merge($httpProvider.defaults.headers.common, defaultOptions.headers);\n };\n\n /**\n * Main get method for creating new resource\n * @param $http\n * @param $q\n * @param avPollingService\n * @returns {AvApiResource}\n */\n this.$get = function($http, $q, avPollingService) {\n\n var AvApiResource = function(options) {\n\n if (!options) {\n throw new Error('[options] cannot be null or undefined');\n }\n\n // if string the assume url is being passed in\n if (angular.isString(options)) {\n options = options.charAt(0) === '/' ? options : '/' + options;\n options = angular.extend({}, {url: options});\n }\n\n if (!options.url) {\n throw new Error('[url] cannot be null');\n }\n\n // get the default options and merge into this instance\n this.options = angular.extend({}, defaultOptions, (options || {}));\n };\n\n // Alias the prototype\n var proto = AvApiResource.prototype;\n\n proto._config = function(config) {\n return _.merge({}, this.options, (config || {}));\n };\n\n proto._cacheBust = function(config) {\n config.cacheBust = null;\n config.params = config.params || {};\n config.params.cacheBust = new Date().getTime();\n return config;\n };\n\n proto._getUrl = function(id) {\n if (this.options.api) {\n return this._getApiUrl(id);\n }\n\n return this.options.url;\n };\n\n proto._createResponse = function(data, status, headers, config) {\n return {\n data: data,\n status: status,\n headers: headers,\n config: config\n };\n };\n\n proto._request = function(config, afterCallback) {\n\n var self = this;\n var defer = $q.defer();\n\n $http(config)\n .success(function(data, status, headers, _config) {\n\n var _response = {\n data: data,\n status: status,\n headers: headers,\n config: _config\n };\n\n // handle the async response if applicable\n var _promise = $q.when(avPollingService.response(_response));\n // notify the promise listener of the original response\n defer.notify(_response);\n\n // handle the polling service promise\n _promise.then(function(successResponse) {\n\n // if service has a callback then call it\n // var response = self._createResponse(data, status, headers, _config);\n if (afterCallback) {\n successResponse = afterCallback.call(self, successResponse, config.data);\n }\n defer.resolve(successResponse);\n }, function(errorResponse) {\n defer.reject(errorResponse);\n }, function(notifyResponse) {\n defer.notify(notifyResponse);\n });\n\n }).error(function(data, status, headers, _config) {\n var response = self._createResponse(data, status, headers, _config);\n defer.reject(response);\n });\n\n var promise = defer.promise;\n\n // recreate the success callback ala $http\n promise.success = function(fn) {\n promise.then(function(response) {\n fn(response.data, response.status, response.headers, response.config);\n });\n return promise;\n };\n\n // recreate the error callback ala $http\n promise.error = function(fn) {\n promise.then(null, function(response) {\n fn(response.data, response.status, response.headers, config);\n });\n return promise;\n };\n\n promise.always = promise['finally'];\n\n return promise;\n };\n\n proto.normalize = function(url) {\n return url\n .replace(/[\\/]+/g, '/')\n .replace(/\\/$/, '');\n };\n\n proto.join = function() {\n var joined = [].slice.call(arguments, 0).join('/');\n return this.normalize(joined);\n };\n\n proto._getApiUrl = function(id) {\n\n id = id ? '/' + id : '';\n\n var url = this.join(\n this.options.prefix,\n this.options.path,\n this.options.level,\n this.options.resourceGroup,\n this.options.version,\n this.options.url,\n id);\n\n return url + this.options.suffix;\n };\n\n proto.create = function(data, config) {\n\n if (!data) {\n throw new Error('called method without [data]');\n }\n\n if (this.beforeCreate) {\n data = this.beforeCreate(data);\n }\n\n config = this._config(config);\n config.method = 'POST';\n config.url = this._getUrl();\n config.data = data;\n\n return this._request(config, this.afterCreate);\n\n };\n\n proto.get = function(id, config) {\n\n if (!id) {\n throw new Error('called method without [id]');\n }\n\n config = this._config(config);\n if (config.cacheBust) {\n config = this._cacheBust(config);\n }\n config.method = 'GET';\n config.url = this._getUrl(id);\n\n return this._request(config, this.afterGet);\n\n };\n\n proto.query = function(config) {\n\n config = this._config(config);\n if (config.cacheBust) {\n config = this._cacheBust(config);\n }\n config.method = 'GET';\n config.url = this._getUrl();\n\n return this._request(config, this.afterQuery);\n\n };\n\n proto.update = function(id, data, config) {\n\n var url;\n\n if (_.isString(id) || _.isNumber(id)) {\n url = this._getUrl(id);\n } else {\n url = this._getUrl();\n // At this point the function signature becomes:\n //\n // proto.update = function(data, config) {} a.k.a function(id, data)\n //\n config = data; // config is really the 2nd param\n data = id; // data is really the first param\n }\n\n if (this.beforeUpdate) {\n data = this.beforeUpdate(data);\n }\n\n config = this._config(config);\n config.method = 'PUT';\n config.url = url;\n config.data = data;\n\n return this._request(config, this.afterUpdate);\n\n };\n\n proto.remove = function(id, config) {\n\n var url;\n var data;\n\n if (_.isString(id) || _.isNumber(id)) {\n url = this._getUrl(id);\n } else {\n // At this point the function signature becomes:\n //\n // proto.remove = function(data, config)\n //\n url = this._getUrl();\n data = id;\n }\n\n config = this._config(config);\n config.method = 'DELETE';\n config.url = url;\n config.data = data;\n\n return this._request(config, this.afterRemove);\n };\n\n proto.beforeCreate = null;\n proto.afterCreate = null;\n proto.afterQuery = null;\n proto.afterGet = null;\n proto.beforeUpdate = null;\n proto.afterUpdate = null;\n proto.afterRemove = null;\n\n return AvApiResource;\n };\n\n };\n\n availity.core.provider('AvApiResource', ApiResourcesProvider);\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n var UserServiceFactory = function(AvApiResource) {\n\n var AvUsersResource = function() {\n AvApiResource.call(this, 'users');\n };\n\n angular.extend(AvUsersResource.prototype, AvApiResource.prototype, {\n\n afterGet: function(response) {\n var user = response.data.user ? response.data.user : response.data;\n return user;\n },\n\n me: function(config) {\n return this.get('me', config);\n }\n\n });\n\n return new AvUsersResource();\n\n };\n\n availity.core.factory('avUsersResource', UserServiceFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avCoveragesResource', function(AvApiResource) {\n return new AvApiResource({version: '/v1', url: '/configurations', cache: false});\n });\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avConfigurationsResource', function(AvApiResource) {\n return new AvApiResource({version: '/v1', url: '/configurations'});\n });\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var LogMessagesFactory = function(AvApiResource) {\n\n var AvLogMessagesResource = function() {\n\n AvApiResource.call(this, {\n version: '/v1',\n url: '/log-messages'\n });\n };\n\n angular.extend(AvLogMessagesResource.prototype, AvApiResource.prototype, {\n\n buildRequest: function(level, entries) {\n\n var requestPayload = {};\n\n if(entries.level) {\n delete entries.level;\n }\n\n requestPayload.level = level;\n requestPayload.entries = entries;\n\n return requestPayload;\n },\n\n debug: function(entries) {\n return this.create(this.buildRequest('debug', entries));\n },\n\n info: function(entries) {\n return this.create(this.buildRequest('info', entries));\n },\n\n warn: function(entries) {\n return this.create(this.buildRequest('warn', entries));\n },\n\n error: function(entries) {\n return this.create(this.buildRequest('error', entries));\n }\n\n });\n\n return new AvLogMessagesResource();\n\n };\n\n availity.core.factory('avLogMessagesResource', LogMessagesFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var SpacesFactory = function(AvApiResource) {\n\n // sdk/platform/v1/spaces/10939061011461209623076300008435\n return new AvApiResource({\n path: '/api/sdk',\n level: '/platform',\n version: '/v1',\n url: '/spaces'\n });\n\n };\n\n availity.core.factory('avSpacesResource', SpacesFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var AvDocumentsResourceFactory = function(AvApiResource) {\n\n var AvDocumentsResource = function() {\n AvApiResource.call(this, 'documents');\n };\n\n angular.extend(AvDocumentsResource.prototype, AvApiResource.prototype, {\n\n getContents: function(id) {\n var config = this._config();\n config.url = this.getContentsUrl(id);\n return this._request(config);\n },\n\n getContentsUrl: function(id) {\n return this._getUrl(id) + '/contents';\n }\n\n });\n\n return new AvDocumentsResource();\n\n };\n\n availity.core.factory('avDocumentsResource', AvDocumentsResourceFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var OrganizationResourceFactory = function(AvApiResource) {\n\n var OrganizationResource = function() {\n AvApiResource.call(this, 'organizations');\n };\n\n angular.extend(OrganizationResource.prototype, AvApiResource.prototype, {\n\n getOrganizations: function(config) {\n return this.query(config).then(function(response) {\n return response.data.organizations ? response.data.organizations : response.data;\n });\n }\n\n });\n\n return new OrganizationResource();\n };\n\n availity.core.factory('avOrganizationsResource', OrganizationResourceFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n\n var availity = root.availity;\n\n availity.core.factory('avCodesResource', function(AvApiResource) {\n return new AvApiResource({version: '/v1', url: '/codes'});\n });\n\n var AvCodesResourceFactory = function(AvApiResource) {\n\n var AvCodesResource = function () {\n AvApiResource.call(this, 'codes');\n };\n\n angular.extend(AvCodesResource.prototype, AvApiResource.prototype, {\n\n getCodes: function (data) {\n\n // config for the api resource query\n var config = {};\n config.params = {};\n\n if(data.page) {\n config.params.offset = 50 * (data.page - 1);\n }\n if(data.offset) {\n config.params.offset = data.offset;\n }\n if(data.list) {\n config.params.list = data.list;\n }\n if(data.q) {\n config.params.q = data.q;\n }\n\n return this.query(config).then(function (response) {\n // Format the response into something select2 can read\n var results = response.data.codes;\n if(results && !_.has(results[0], 'id')) {\n _.each(results, function (code) {\n code.id = code.code;\n });\n }\n\n // calculate if we want to continue searching\n var moreVal = response.data.offset < response.data.totalCount - response.data.limit;\n return {\n more: moreVal,\n results: results\n };\n\n });\n }\n\n });\n\n return new AvCodesResource();\n\n };\n\n availity.core.factory('avCodesResource', AvCodesResourceFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var AvUserPermissionsResourceFactory = function(AvApiResource) {\n\n var AvUserPermissionsResource = function() {\n AvApiResource.call(this, {\n level: '/internal',\n version: '/v1',\n url: '/axi-user-permissions'\n });\n this.sessionDate = moment().toISOString();\n };\n\n angular.extend(AvUserPermissionsResource.prototype, AvApiResource.prototype, {\n\n afterQuery: function(response) {\n return response.data.axiUserPermissions ? response.data.axiUserPermissions : [];\n },\n\n getPermissions: function(permissionIds, region) {\n var self = this;\n return this.query({\n params: {\n permissionId: permissionIds,\n region: region,\n sessionDate: self.sessionDate\n }\n });\n }\n\n });\n\n return new AvUserPermissionsResource();\n\n };\n\n availity.core.factory('avUserPermissionsResource', AvUserPermissionsResourceFactory);\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n var AvUserAuthorizationsFactory = function($q, $log, avUserPermissionsResource) {\n\n /**\n *\n * @constructor\n */\n var AvUserAuthorizations = function() {\n /**\n * Region is used to return permission/resources relative to region. If null service will\n * return all permission relative to current. If value 'ALL' used it will return value relative\n * to all regions the user has access to.\n * @type {string}\n */\n this.region = null;\n /**\n * PermissionIds contains the set of permissionIds to request from service. If user of service calls\n * setPermissionIds() or call getPermissions() with complete set of permissionIds needed by application,\n * then service should only make that one hit to retrieve permission information.\n * @type {Array}\n */\n this.permissionIds = [];\n };\n\n var proto = AvUserAuthorizations.prototype;\n\n proto.setRegion = function(region) {\n this.region = region;\n return this;\n };\n\n proto.setPermissionIds = function(permissionIds) {\n if(!angular.isArray(permissionIds)) {\n throw new Error('permissionsIds must be an array of string IDs for avUserAuthorizations#addPermissionIds');\n }\n this.permissionIds = permissionIds;\n return this;\n };\n\n proto.isAuthorized = function(permissionId) {\n return this.getPermission(permissionId).then(function(permission) {\n return permission.isAuthorized;\n });\n };\n\n proto.isAnyAuthorized = function(permissionIds) {\n return this.getPermissions(permissionIds).then(function(permissions) {\n var permission = _.findWhere(permissions, {isAuthorized: true});\n return permission !== undefined;\n });\n };\n\n proto.getPermission = function(permissionId) {\n if(!angular.isString(permissionId)) {\n throw new Error('permissionsId must be a string ID for avUserAuthorizations#getPermission');\n }\n\n return this.getPermissions([permissionId])\n .then(function(_permissions) {\n return _permissions[permissionId];\n });\n };\n\n proto.getPermissions = function(permissionIds) {\n var self = this;\n\n if(!angular.isArray(permissionIds)) {\n throw new Error('permissionsIds must be an array of string IDs for avUserAuthorizations#getPermissions');\n }\n // merge permission ids to reduce calls to backend\n self.permissionIds = _.union(self.permissionIds, permissionIds);\n\n return avUserPermissionsResource\n .getPermissions(self.permissionIds, self.region)\n .then(function(_permissions) {\n return self.toPermissionMap(permissionIds, _permissions);\n });\n };\n\n proto.getOrganizations = function(permissionId) {\n return this.getPermission(permissionId).then(function(permission) {\n return permission.organizations;\n });\n };\n\n proto.getPayers = function(permissionId, organizationId) {\n return this.getPermission(permissionId).then(function(permission) {\n var organization = _.findWhere(permission.organizations, {id: organizationId});\n\n if(organization && organization.resources) {\n return organization.resources;\n }\n return [];\n });\n\n };\n\n /**\n * Converts array permissions to map with value for each permissionId, creating empty permission\n * if can't find permission in array\n * @private\n */\n proto.toPermissionMap = function(permissionIds, permissions) {\n var self = this;\n var map = {};\n permissions = _.slice(permissions);\n _.forEach(permissionIds, function(permissionId) {\n var key = {id: permissionId};\n var permission = _.findWhere(permissions, key);\n permission = permission ? self.toPermission(permission) : self.toPermission(key);\n map[permission.id] = permission;\n });\n return map;\n };\n\n /**\n * Convert a permission resource into a structure that is easier to work with.\n * @private\n */\n proto.toPermission = function(permission) {\n return {\n id: permission.id,\n description: permission.description ? permission.description : '',\n geographies: permission.geographies ? permission.geographies : [],\n organizations: permission.organizations ? permission.organizations : [],\n isAuthorized: permission.organizations ? permission.organizations.length > 0 : false\n };\n };\n\n return new AvUserAuthorizations();\n\n };\n\n availity.core.factory('avUserAuthorizations', AvUserAuthorizationsFactory);\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_SESSION', {\n SESSION_TIMEOUT: 'av:auth:session:timeout',\n NOT_AUTHORIZED: 'av:auth:not:authorized'\n });\n\n availity.core.factory('avSession', function($q, avUsersResource) {\n\n var AvSession = function() {\n this.user = null;\n this.permissions = null;\n };\n\n var proto = AvSession.prototype;\n\n proto.getUser = function() {\n var self = this;\n\n if(this.user) {\n return $q.when(this.user);\n }\n\n return avUsersResource.me().then(function(user) {\n self.user = user;\n return self.user;\n });\n };\n\n\n proto.destroy = function() {\n this.user = null;\n this.permisions = null;\n };\n\n return new AvSession();\n });\n\n})(window);\n","// Inspiration => https://github.com/HackedByChinese/ng-idle\n//\n// Rules:\n//\n// * ping after 3 minutes from last human activity\n// * reset session after api success except 401\n// * idle show after 25 of inactivity\n//\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_IDLE', {\n EVENTS: {\n IDLE_INACTIVE: 'av:idle:inactive',\n IDLE_ACTIVE: 'av:idle:active',\n SESSION_TIMEOUT_ACTIVE: 'av:idle:session:active',\n SESSION_TIMEOUT_REDIRECT: 'av:idle:session:redirect',\n HUMAN: 'keydown.av.idle mousedown.av.idle keydown.av.idle',\n MACHINE: '$locationChangeSuccess'\n },\n INTERVALS: {\n PING: 3 * 60 * 1000, // 3 minutes\n IDLE: 25 * 60 * 1000, // 25 minutes\n SESSION: 30 * 60 * 1000 // 30 minutes\n },\n URLS: {\n HOME: '/availity/web/public.elegant.login',\n PING: '/api/v1/users/me'\n }\n });\n\n availity.core.provider('avIdle', function(AV_IDLE) {\n\n var enabled = false;\n var pingUrl;\n var redirectUrl;\n var sessionTimeout;\n var idleTimeout;\n var pingTimeout;\n\n this.enable = function(value) {\n if(arguments.length) {\n enabled = !!value;\n }\n return enabled;\n };\n\n this.setSessionTimeout = function(timeout) {\n sessionTimeout = timeout || AV_IDLE.INTERVALS.SESSION;\n };\n\n this.setIdleTimeout = function(timeout) {\n idleTimeout = timeout || AV_IDLE.INTERVALS.IDLE;\n };\n\n this.setPingTimeout = function(timeout) {\n pingTimeout = timeout || AV_IDLE.INTERVALS.PING;\n };\n\n this.setPingUrl = function(url) {\n pingUrl = url || AV_IDLE.URLS.PING;\n };\n\n this.$get = function(AV_IDLE, $log, $document, $rootScope, $timeout, avThrottle, $q, $injector) {\n\n var AvIdle = function() {\n\n // $timeout references\n this._idleTimer = null;\n this._sessionTimer = null;\n this._pingTimer = null;\n this._keepAlive = null;\n\n // flag used to track if the if user is idle or session expired\n this.idleActive = false;\n this.sessionActive = false;\n\n this.listeners = [];\n\n this.init();\n\n };\n\n var proto = AvIdle.prototype;\n\n proto.init = function() {\n\n if(!enabled) {\n this.stop();\n return;\n }\n\n this.start();\n };\n\n proto.start = function() {\n\n $log.info('avIdle start');\n\n var self = this;\n var listener;\n\n !sessionTimeout && this.setSessionTimeout();\n !idleTimeout && this.setIdleTimeout();\n !pingTimeout && this.setPingTimeout();\n !pingUrl && this.setPingUrl();\n !redirectUrl && this.setRedirectUrl();\n\n $rootScope.$on('$destroy', function() {\n self.stop();\n });\n\n $document.find('body').on(AV_IDLE.EVENTS.HUMAN, function(event) {\n self.onEvent(event);\n });\n\n listener = $rootScope.$on(AV_IDLE.EVENTS.MACHINE, function(event, oldUrl, newUrl) {\n if(oldUrl !== newUrl) {\n self.onEvent(event);\n }\n });\n this.listeners.push(listener);\n\n $rootScope.$on(AV_IDLE.EVENTS.SESSION_TIMEOUT_REDIRECT, function() {\n document.location.href = redirectUrl;\n });\n\n this.startIdleTimer();\n this.startSessionTimer();\n };\n\n proto.stop = function() {\n\n $document.find('body').off(AV_IDLE.EVENTS.HUMAN);\n\n // turns off Angular event listeners @see http://stackoverflow.com/a/14898795\n _.each(this.listeners, function(listener) {\n listener();\n });\n\n this.stopPing();\n this.stopSessionTimer();\n this.stopIdleTimer();\n };\n\n proto.isEnabled = function() {\n return enabled;\n };\n\n proto.enable = function(value) {\n if(arguments.length) {\n enabled = !!value;\n }\n\n return this;\n };\n\n proto.setSessionTimeout = function(timeout) {\n sessionTimeout = timeout || AV_IDLE.INTERVALS.SESSION;\n return this;\n };\n\n proto.setIdleTimeout = function(timeout) {\n idleTimeout = timeout || AV_IDLE.INTERVALS.IDLE;\n return this;\n };\n\n proto.setPingTimeout = function(timeout) {\n pingTimeout = timeout || AV_IDLE.INTERVALS.PING;\n return this;\n };\n\n proto.setPingUrl = function(url) {\n pingUrl = url || AV_IDLE.URLS.PING;\n return this;\n };\n\n proto.setRedirectUrl = function(url) {\n redirectUrl = url || AV_IDLE.URLS.HOME;\n return this;\n };\n\n proto.response = function(response) {\n\n if(this.isApiRequest(response)) {\n this.startSessionTimer();\n }\n\n return response;\n };\n\n proto.isApiRequest = function(response) {\n return response && response.config && response.config.api;\n };\n\n proto.responseError = function(response) {\n\n if(this.isApiRequest(response) && response.status !== 401) {\n this.startSessionTimer();\n }\n\n if(this.isApiRequest() && response.status === 401) {\n this.stopPing();\n }\n\n return $q.reject(response);\n };\n\n proto.startSessionTimer = function() {\n\n var self = this;\n\n this.stopSessionTimer();\n\n var later = function() {\n $log.info('avIdle session has TIMED OUT');\n self.stop();\n $rootScope.$broadcast(AV_IDLE.EVENTS.SESSION_TIMEOUT_ACTIVE);\n };\n\n $log.info('avIdle session timer has STARTED');\n this._sessionTimer = $timeout(later, sessionTimeout, false);\n\n };\n\n proto.stopSessionTimer = function() {\n $log.info('avIdle session timer has STOPPED');\n $timeout.cancel(this._sessionTimer);\n };\n\n proto.startIdleTimer = function() {\n\n var self = this;\n\n this.stopIdleTimer();\n\n var later = function() {\n self.stopIdleTimer();\n $log.info('avIdle is IDLING');\n $rootScope.$broadcast(AV_IDLE.EVENTS.IDLE_ACTIVE);\n };\n\n $log.info('avIdle idle timer has STARTED');\n this._idleTimer = $timeout(later, idleTimeout, false);\n };\n\n proto.stopIdleTimer = function() {\n $log.info('avIdle idle timer has STOPPED');\n $timeout.cancel(this._idleTimer);\n };\n\n proto.startPing = function() {\n\n if(!this._keepAlive) {\n $log.info('avIdle ping timer has STARTED');\n this._keepAlive = avThrottle(this.keepAlive, pingTimeout, {context: this});\n }\n\n this._pingTimer = this._keepAlive();\n };\n\n proto.stopPing = function() {\n $log.info('avIdle ping timer has STOPPED');\n if(this._pingTimer) {\n $timeout.cancel(this._pingTimer);\n }\n };\n\n proto.keepAlive = function() {\n\n // destroy the reference to that a new throttle gets created upon\n // next user or system event\n this._keepAlive = null;\n var $http = $injector.get('$http');\n\n $http.get(pingUrl, {\n cache: false,\n api: true\n }).success(function() {\n $log.info('avIdle keep-alive SUCCESS');\n }).error(function() {\n $log.error('avIdle keep-alive FAILURE');\n });\n };\n\n proto.onEvent = function() {\n this.startIdleTimer();\n this.startPing();\n };\n\n return new AvIdle();\n\n };\n\n });\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avIdleInterceptor', function(avIdle) {\n return {\n response: function(response) {\n return avIdle.response(response);\n },\n responseError: function(response) {\n return avIdle.responseError(response);\n }\n };\n\n });\n\n availity.core.config(function($httpProvider) {\n $httpProvider.interceptors.push('avIdleInterceptor');\n });\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.value('avValConfig', {\n classes: {\n valid: 'ng-valid',\n invalid: 'ng-invalid',\n dirty: 'ng-dirty',\n pristine: 'ng-pristine',\n touched: 'ng-touched',\n untouched: 'ng-untouched',\n submitted: 'ng-submitted'\n },\n validators: [\n 'avValPattern',\n 'avValSize',\n 'avValRequired',\n 'avValDateRange',\n 'avValDate',\n 'avValPhone',\n 'avValEmail',\n 'avValNpi'\n ]\n });\n\n availity.core.constant('AV_VAL', {\n EVENTS: {\n REVALIDATE: 'av:val:revalidate',\n SUBMITTED: 'av:val:submitted',\n FAILED: 'av:val:failed',\n RESET: 'av:val:reset'\n },\n DEBOUNCE: 800,\n DATE_FORMAT: {\n SIMPLE: 'MM/DD/YYYY'\n },\n PATTERNS: {\n ALPHA_ONLY: /[^A-Za-z]+/g,\n NUMERIC_ONLY: /[^0-9]+/g\n }\n });\n\n availity.core.provider('avVal', function() {\n\n var validators = [];\n var rules = {};\n var services = {};\n\n this.addRules = function(_rules) {\n rules = angular.extend({}, rules, _rules);\n return rules;\n };\n\n this.addValidators = function(_validators) {\n validators = validators.concat(_validators);\n return validators;\n };\n\n this.$get = function($injector, $rootScope, $http, $log, avValConfig, AV_VAL) {\n\n var AvValidation = function() {\n this.initValidators();\n };\n\n var proto = AvValidation.prototype;\n\n proto.initValidators = function() {\n var self = this;\n\n validators = avValConfig.validators.concat(validators);\n\n angular.forEach(validators, function(name) {\n self.addValidator(name);\n });\n\n };\n\n proto.addValidator = function(name) {\n var validator = $injector.get(name);\n services[validator.name] = validator;\n };\n\n proto.addRules = function(_rules) {\n rules = angular.extend({}, rules, _rules);\n $rootScope.$broadcast(AV_VAL.EVENTS.REVALIDATE);\n };\n\n proto.validate = function(key, element, value, ruleName) {\n\n var ruleConfig = rules[key];\n if(!ruleConfig) {\n $log.warn('Could not resolve the form rules key [' + key + ']. This can happen when the rules key is inside a promise and the key value has not resolved on page load.');\n return;\n }\n\n var contraints = ruleConfig[ruleName];\n if(!contraints) {\n $log.info('Rule named [' + ruleName + '] could not be found in the current schema.');\n contraints = [];\n }\n\n var el = element[0];\n var results = [];\n var violations = [];\n var _valid = true;\n\n angular.forEach(contraints, function(rule, contraintName) {\n\n if(!rule) {\n // when extended rule sets, a user can pass nulls to cancel out a rule so if\n // one doesn't exist just continue\n return;\n }\n\n var validator = services[contraintName];\n\n if(angular.isUndefined(validator)) {\n $log.warn('No validator defined for `' + name + '`');\n return;\n }\n\n var valid = validator.validate(value, rule, element);\n\n var validationResult = {\n valid: valid,\n ruleName: ruleName,\n contraintName: contraintName,\n value: value,\n message: rule.message,\n field: el.name || el.id\n };\n\n var result = angular.extend({}, rule, validationResult);\n\n results.push(result);\n if(!valid) {\n violations.push(validationResult);\n }\n _valid = _valid && valid;\n\n });\n\n return {\n isValid: _valid,\n all: results, // all the constraint results\n violations: violations\n };\n\n };\n\n return new AvValidation();\n\n };\n\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValUtils', function() {\n\n return {\n\n isDefined: function(value) {\n return angular.isDefined(value) && value !== '' && value !== null;\n },\n\n isEmpty: function(value) {\n return !this.isDefined(value) || $.trim(value) === '';\n }\n };\n\n });\n})(window);\n\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValSize', function(avValUtils) {\n\n var validator = {\n\n name: 'size',\n\n validate: function(value, rule) {\n\n var min = rule.min || 0;\n var max = rule.max;\n var type = rule.type ? rule.type.toLowerCase() : 'text';\n\n if(_.isNull(value) || _.isUndefined(value)) {\n value = '';\n }\n\n if(type === 'text') {\n value = value + '';\n return avValUtils.isEmpty(value) || value.length >= min && (max === undefined || value.length <= max);\n }\n\n // ... must be a Number\n if(!_.isNumber(value) && /^\\d+$/.test(value)) {\n value = parseInt(value, 10);\n }\n\n return avValUtils.isEmpty(value) || value >= min && (max === undefined || value <= max);\n\n }\n };\n\n return validator;\n\n });\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValPattern', function(avValUtils) {\n\n var validator = {\n name: 'pattern',\n REGEX: /^\\/(.*)\\/([gim]*)$/, //regular expression to test a regular expression\n asRegExp: function(pattern) {\n var match;\n\n if(pattern.test) {\n return pattern;\n } else {\n match = pattern.match(validator.REGEX);\n if(match) {\n return new RegExp(match[1], match[2]);\n } else {\n throw ('Expected ' + pattern + ' to be a RegExp');\n }\n }\n },\n validate: function(value, rule) {\n var values = _.isArray(rule.value) ? rule.value : [rule.value];\n\n var valid = false;\n\n _.each(values, function(expresion) {\n var pattern = validator.asRegExp(expresion);\n if(avValUtils.isEmpty(value) || pattern.test(value)) {\n valid = true;\n }\n });\n\n return valid;\n }\n };\n\n return validator;\n\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValRequired', function(avValUtils) {\n\n var validator = {\n name: 'required',\n validate: function(value, rule, element) {\n\n // Using ngModelController.$isEmpty for required checks. A form component being empty is dependent on the\n // type of field:\n //\n // - radio\n // - checkbox\n // - text\n // - lists\n //\n // You can override $isEmpty for input directives whose concept of being empty is different to the\n // default. Radio and checkboxes directive do this because in its case a value of `false`\n // implies empty.\n //\n var ctrl = element && element.data('$ngModelController');\n if(ctrl) {\n return !ctrl.$isEmpty(value);\n }\n\n return !avValUtils.isEmpty(value);\n\n }\n };\n\n return validator;\n\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValDateRange', function(AV_VAL, avValUtils) {\n\n var validator = {\n\n name: 'dateRange',\n\n getStartDate: function(start) {\n return validator.setMin(moment().add(start.value, start.units));\n },\n\n getEndDate: function(end) {\n return validator.setMax(moment().add(end.value, end.units) );\n },\n\n setMin: function(value) {\n\n // [fix]: if time is provided this may cause issues.\n value.set('hours', 0);\n value.set('minutes', 0);\n value.set('seconds', 0);\n\n return value;\n },\n\n setMax: function(value) {\n\n // [fix]: if time is provided this may cause issues.\n value.set('hours', 23);\n value.set('minutes', 59);\n value.set('seconds', 59);\n\n return value;\n },\n\n validation: function(value, rules) {\n\n var date;\n var startDate;\n var endDate;\n\n date = moment(value, rules.format || AV_VAL.DATE_FORMAT.SIMPLE);\n date.set('hours', 0);\n date.set('minutes', 0);\n date.set('seconds', 0);\n\n if(!avValUtils.isEmpty(rules.start.units) && !avValUtils.isEmpty(rules.end.units)) {\n startDate = validator.getStartDate(rules.start);\n endDate = validator.getEndDate(rules.end);\n } else {\n startDate = moment(rules.start.value, rules.format);\n endDate = validator.setMax(moment(rules.end.value, rules.format));\n }\n return date.isValid() && date.isBetween(startDate, endDate, 'day') || date.isSame(startDate, 'day') || date.isSame(endDate, 'day');\n },\n\n validate: function(value, rule) {\n return avValUtils.isEmpty(value) || validator.validation(value, rule);\n }\n\n };\n\n return validator;\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValDate', function(AV_VAL, avValUtils) {\n\n var validator = {\n name: 'dateFormat',\n validate: function(value, rules) {\n var format = rules && rules.format ? rules.format : AV_VAL.DATE_FORMAT.SIMPLE;\n return avValUtils.isEmpty(value) || moment(value, format, true).isValid();\n }\n };\n\n return validator;\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValNpi', function(avValUtils) {\n\n\n var validator = {\n\n name: 'npi',\n\n INTEGER_REGEX: /^\\d*$/,\n\n validate: function(value) {\n\n var npi = value || '';\n\n if(avValUtils.isEmpty(npi)) {\n return true;\n }\n\n if (!validator.INTEGER_REGEX.test(npi) || npi.length !== 10) {\n return false;\n }\n\n var firstDigit = npi.charAt(0);\n if(!('1' === firstDigit || '2' === firstDigit || '3' === firstDigit || '4' === firstDigit)) {\n return false;\n }\n\n var digit = parseInt(npi.charAt(9), 10);\n npi = npi.substring(0, 9);\n npi = \"80840\" + npi;\n\n var alternate = true;\n var total = 0;\n\n for (var i = npi.length; i > 0; i--) {\n var next = parseInt(npi.charAt(i-1), 10);\n if (alternate) {\n next = next*2;\n if (next > 9) {\n next = (next % 10) + 1;\n }\n }\n total += next;\n alternate = !alternate;\n }\n\n var roundUp = Math.ceil(total / 10) * 10;\n var calculatedCheck = roundUp - total;\n\n if (calculatedCheck !== digit) {\n return false;\n }\n\n return true;\n }\n\n };\n\n return validator;\n\n });\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValPhone', function(avValPattern) {\n\n var PHONE_PATTERN = /^([0-9][\\.\\-]?)?[(]{0,1}[0-9]{3}[)\\.\\- ]{0,1}[0-9]{3}[\\.\\- ]{0,1}[0-9]{4}$/;\n\n var validator = {\n name: 'phone',\n validate: function(value, rule) {\n return avValPattern.validate(value, angular.extend({}, rule, { value: PHONE_PATTERN }));\n }\n };\n\n return validator;\n\n });\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValEmail', function(avValPattern) {\n\n var EMAIL_PATTERN = /[a-zA-Z0-9!#$%&'*+\\/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+\\/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/;\n\n var validator = {\n name: 'email',\n validate: function(value, rule) {\n return avValPattern.validate(value, angular.extend({}, rule, { value: EMAIL_PATTERN }));\n }\n };\n\n return validator;\n\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_GLOBALS', {\n REGIONS: [\n {\n 'name': 'Alabama',\n 'code': 'AL'\n },\n {\n 'name': 'Alaska',\n 'code': 'AK'\n },\n {\n 'name': 'Arizona',\n 'code': 'AZ'\n },\n {\n 'name': 'Arkansas',\n 'code': 'AR'\n },\n {\n 'name': 'California',\n 'code': 'CA'\n },\n {\n 'name': 'Colorado',\n 'code': 'CO'\n },\n {\n 'name': 'Connecticut',\n 'code': 'CT'\n },\n {\n 'name': 'Delaware',\n 'code': 'DE'\n },\n {\n 'name': 'District Of Columbia',\n 'code': 'DC'\n },\n {\n 'name': 'Florida',\n 'code': 'FL'\n },\n {\n 'name': 'Georgia',\n 'code': 'GA'\n },\n {\n 'name': 'Hawaii',\n 'code': 'HI'\n },\n {\n 'name': 'Idaho',\n 'code': 'ID'\n },\n {\n 'name': 'Illinois',\n 'code': 'IL'\n },\n {\n 'name': 'Indiana',\n 'code': 'IN'\n },\n {\n 'name': 'Iowa',\n 'code': 'IA'\n },\n {\n 'name': 'Kansas',\n 'code': 'KS'\n },\n {\n 'name': 'Kentucky',\n 'code': 'KY'\n },\n {\n 'name': 'Louisiana',\n 'code': 'LA'\n },\n {\n 'name': 'Maine',\n 'code': 'ME'\n },\n {\n 'name': 'Maryland',\n 'code': 'MD'\n },\n {\n 'name': 'Massachusetts',\n 'code': 'MA'\n },\n {\n 'name': 'Michigan',\n 'code': 'MI'\n },\n {\n 'name': 'Minnesota',\n 'code': 'MN'\n },\n {\n 'name': 'Mississippi',\n 'code': 'MS'\n },\n {\n 'name': 'Missouri',\n 'code': 'MO'\n },\n {\n 'name': 'Montana',\n 'code': 'MT'\n },\n {\n 'name': 'Nebraska',\n 'code': 'NE'\n },\n {\n 'name': 'Nevada',\n 'code': 'NV'\n },\n {\n 'name': 'New Hampshire',\n 'code': 'NH'\n },\n {\n 'name': 'New Jersey',\n 'code': 'NJ'\n },\n {\n 'name': 'New Mexico',\n 'code': 'NM'\n },\n {\n 'name': 'New York',\n 'code': 'NY'\n },\n {\n 'name': 'North Carolina',\n 'code': 'NC'\n },\n {\n 'name': 'North Dakota',\n 'code': 'ND'\n },\n {\n 'name': 'Ohio',\n 'code': 'OH'\n },\n {\n 'name': 'Oklahoma',\n 'code': 'OK'\n },\n {\n 'name': 'Oregon',\n 'code': 'OR'\n },\n {\n 'name': 'Pennsylvania',\n 'code': 'PA'\n },\n {\n 'name': 'Rhode Island',\n 'code': 'RI'\n },\n {\n 'name': 'South Carolina',\n 'code': 'SC'\n },\n {\n 'name': 'South Dakota',\n 'code': 'SD'\n },\n {\n 'name': 'Tennessee',\n 'code': 'TN'\n },\n {\n 'name': 'Texas',\n 'code': 'TX'\n },\n {\n 'name': 'Utah',\n 'code': 'UT'\n },\n {\n 'name': 'Vermont',\n 'code': 'VT'\n },\n {\n 'name': 'Virginia',\n 'code': 'VA'\n },\n {\n 'name': 'Washington',\n 'code': 'WA'\n },\n {\n 'name': 'West Virginia',\n 'code': 'WV'\n },\n {\n 'name': 'Wisconsin',\n 'code': 'WI'\n },\n {\n 'name': 'Wyoming',\n 'code': 'WY'\n }\n ]\n });\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.provider('avAnalyticsConfig', function(AV_ANALYTICS) {\n\n var config = {\n VIRTUAL_PAGE_TRACKING: true,\n SERVICES: {\n PIWIK: 'avPiwikAnalytics',\n SPLUNK: 'avSplunkAnalytics'\n },\n EVENTS: {\n PAGE: '$locationChangeSuccess',\n DEFAULT: 'click'\n },\n PRE_FIX: /^avAnalytics(.*)$/,\n // should ignore these since they are part of the directives API\n IGNORE: ['avAnalyticsOn', 'avAnalyticsIf'],\n ENV: { // not sure if this should live here\n PROD: {\n DOMAIN: 'apps.availity.com',\n URL: 'https://piwik.availity.com/piwik/'\n },\n QA: {\n URL: 'https://qa-piwik.availity.com/piwik/'\n }\n }\n };\n\n this.set = function(options) {\n _.merge(config, options);\n // TODO: remove when AV_ANALYTICS is no longer supported\n // ensures avAnalyticsConfig and AV_ANALYTICS constant stay in sync\n _.merge(AV_ANALYTICS, config);\n };\n\n this.$get = function(AV_ANALYTICS) {\n /*\n * TODO: remove merge when AV_ANALYTICS is no longer supported.\n * Applies AV_ANALYTICS overrides to avAnalyticsConfig provider.\n */\n return angular.copy(_.merge(config, AV_ANALYTICS));\n };\n\n this.set(AV_ANALYTICS);\n });\n\n // DEPRECATED: use avAnalyticsConfig\n availity.core.constant('AV_ANALYTICS', {});\n\n availity.core.provider('avAnalytics', function(avAnalyticsConfigProvider) {\n\n var avAnalyticsConfig = avAnalyticsConfigProvider.$get();\n var plugins = [];\n var virtualPageTracking = avAnalyticsConfig.VIRTUAL_PAGE_TRACKING;\n var appId;\n\n this.registerPlugins = function(_plugins) {\n\n if(angular.isString(_plugins)) {\n _plugins = [_plugins];\n }\n\n if(_.isArray(_plugins)) {\n plugins = _plugins;\n } else {\n throw new Error('AvAnalytics.registerPlugins() expects a string or an array.');\n }\n\n return plugins;\n };\n\n this.setVirtualPageTracking = function(value) {\n if(arguments.length) {\n virtualPageTracking = !!value;\n }\n };\n\n this.isVirtualPageTracking = function() {\n return virtualPageTracking;\n };\n\n this.setAppID = function(id) {\n appId = id;\n return appId;\n };\n\n this.$get = function($injector, $q, $log, $rootScope, $location) {\n\n var AvAnalytics = function() {\n\n var self = this;\n this.services = {};\n\n if(!plugins || plugins.length === 0) {\n plugins = [avAnalyticsConfig.SERVICES.PIWIK, avAnalyticsConfig.SERVICES.SPLUNK];\n }\n\n angular.forEach(plugins, function(plugin) {\n\n try {\n self.services[plugin] = $injector.get(plugin);\n } catch(err) {\n $log.error('Could not load `{0}` plugin', [plugin]);\n }\n });\n\n };\n\n var proto = AvAnalytics.prototype;\n\n proto.init = function() {\n\n var self = this;\n\n if(this.isVirtualPageTracking()) {\n $rootScope.$on(avAnalyticsConfig.EVENTS.PAGE, function() {\n self.trackPageView($location.absUrl());\n });\n }\n\n angular.forEach(this.services, function(handler) {\n if(handler.isEnabled() && handler.init) {\n handler.init();\n }\n });\n\n };\n\n proto.trackEvent = function(properties) {\n var promises = [];\n\n angular.forEach(this.services, function(handler) {\n var promise = handler.trackEvent(properties);\n promises.push(promise);\n });\n\n return $q.all(promises);\n };\n\n proto.getAppId = function() {\n return appId;\n };\n\n proto.isVirtualPageTracking = function() {\n return virtualPageTracking;\n };\n\n proto.trackPageView = function(url) {\n\n var promises = [];\n\n angular.forEach(this.services, function(handler) {\n var promise = handler.trackPageView(url);\n promises.push(promise);\n });\n\n return $q.all(promises);\n };\n\n return new AvAnalytics();\n };\n\n });\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avAnalyticsUtils', function(avAnalyticsConfig, $log) {\n\n var AnalyticsUtils = function() {};\n\n var proto = AnalyticsUtils.prototype;\n\n proto.getProperties = function(attributes) {\n\n var self = this;\n var props = {};\n\n _.forEach(attributes, function(value, key) {\n if(self.isValidAttribute(key) && self.isNotIgnored(key)) {\n var result = self.getAttribute(key, value);\n props[result.key] = result.value;\n }\n });\n\n return props;\n };\n\n // Function detects external links in order to allow the analytics framework to run\n // before the browser follows a link.\n //\n // - target=\"_self\" - This opens an anchor in the same frame\n // - target=\"_parent\" - Opens the in the next level up of a frame if they were nested to inside one another\n // - target=\"_top\" - Opens the link as top document in the browser window\n // - target=\"_blank\" - Opens link in new tab new tab\n //\n proto.isExternalLink = function(attrs) {\n return attrs.href && !attrs.ngClick;\n };\n\n proto.isNotIgnored = function(key) {\n var ignored = _.includes(avAnalyticsConfig.IGNORE, key);\n return !ignored;\n };\n\n proto.isValidAttribute = function(key) {\n return avAnalyticsConfig.PRE_FIX.test(key);\n };\n\n proto.lowercase = function(str) {\n return str.substr(0, 1).toLowerCase() + str.substr(1);\n };\n\n proto.getAttribute = function(key, value) {\n var simpleKey = key.match(avAnalyticsConfig.PRE_FIX);\n\n if(simpleKey && simpleKey[1]) {\n return {\n key: this.lowercase(simpleKey[1]),\n value: value\n };\n }\n };\n\n proto.toNum = function(value) {\n var parsed = parseInt(value, 10);\n value = isNaN(parsed) ? 0 : parsed;\n return value;\n };\n\n proto.isValid = function(trackingValues) {\n var valid = true;\n\n if(trackingValues.value || trackingValues.value === 0) {\n delete trackingValues.value;\n }\n\n _.forEach(trackingValues, function(key, value) {\n if(availity.isBlank(value) || _.isUndefined(value)) {\n $log.warn('The analytic tracking value for ' + key.toUpperCase() +' is not defined.');\n valid = false;\n }\n });\n\n return valid;\n };\n\n return new AnalyticsUtils();\n });\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avSplunkAnalytics', function($log, avLogMessagesResource, $location) {\n\n var SplunkAnalyticsService = function() {};\n\n var proto = SplunkAnalyticsService.prototype;\n\n proto.trackEvent = function(properties) {\n properties.url = $location.$$absUrl || 'N/A';\n properties.level = properties.level || 'info';\n\n return avLogMessagesResource[properties.level](properties);\n };\n\n proto.trackPageView = function(url) {\n\n var properties = {\n event: 'page',\n level: 'info',\n url: url || $location.$$absUrl()\n };\n\n return avLogMessagesResource[properties.level](properties);\n };\n\n proto.isEnabled = function() {\n return true;\n };\n\n return new SplunkAnalyticsService();\n });\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.provider('avPiwikAnalytics', function() {\n\n var self;\n var siteId;\n var enabled = false;\n var customVariables = [];\n\n this.enabled = function(_enabled) {\n enabled = !!_enabled;\n };\n\n // can not push these items to `_paq` because it is defined\n // after page has loaded\n this._setCustomVariable = function(index, valueName, value, scope) {\n\n if(!index || isNaN(index)) {\n throw new Error('index must be a number');\n } else if(!valueName) {\n throw new Error('valueName must be declared');\n } else {\n customVariables.push(['setCustomVariable', index, valueName, value, scope]);\n }\n };\n\n this.setSiteID = function(_siteID) {\n this.enabled(true);\n siteId = _siteID;\n };\n\n // allow the user to pass a array of visit variables\n this.setVisitVariables = function(items) {\n _.forEach(items, function(item) {\n self._setCustomVariable(item[0], item[1], item[2], 'visit');\n });\n };\n\n this.setPageVariables = function(index, name, value) {\n this._setCustomVariable(index, name, value, 'page');\n };\n\n this.$get = function(avAnalyticsUtils, avUsersResource, avAnalyticsConfig, $injector, $log, $q, $document, $location) {\n\n var AvPiwikAnalytics = function() {\n window._paq = window._paq || [];\n };\n\n var proto = AvPiwikAnalytics.prototype;\n\n proto.trackEvent = function(properties) {\n\n if(!window._paq) {\n $log.warn('Piwik object `_paq` not found in global scope');\n return $q.when(false);\n }\n\n // http://piwik.org/docs/event-tracking/\n //\n // PAQ requires that eventValue be an integer.\n // Check to make sure value is a number if not convert it to 0.\n //\n if(properties.value) {\n properties.value = avAnalyticsUtils.toNum(properties.event);\n }\n\n // check to make sure that data being sent to piwik is a string and not null, empty or undefined\n if(!avAnalyticsUtils.isValid(properties)) {\n $log.warn('Invalid properties being passed. Tracking info will not be sent.');\n return $q.when(false);\n }\n\n return $q.when(window._paq.push(['trackEvent', properties.category, properties.action || properties.event, properties.label, properties.value]));\n };\n\n proto.trackPageView = function(url) {\n\n if(!window._paq) {\n $log.warn('Piwik object `_paq` not found in global scope');\n return $q.when(false);\n }\n\n return $q.when([\n window._paq.push(['setCustomUrl', url]),\n window._paq.push(['trackPageView', url])]\n );\n\n };\n\n proto.init = function() {\n\n avUsersResource.me().then(function(user) {\n window._paq.push(['setUserId', user.id]);\n // self.trackPageView(); //send another page track when the user data loads\n });\n\n if(!_.isFinite(siteId)) {\n $log.warn('Invalid Piwik Site Id. Piwik analytics has been disabled.');\n return;\n }\n\n var url;\n\n\n // Not sure if this is the correct way to call in avAnalyticsConfig\n // only object in provider: var config = { DOMAIN: 'app.availity.com' }\n // I believe I have to get the DOMAIN value, because avAnalyticsConfig should return an object.\n if($location.$$host === avAnalyticsConfig.ENV.PROD.DOMAIN) {\n url = avAnalyticsConfig.ENV.PROD.URL;\n } else {\n url = avAnalyticsConfig.ENV.QA.URL;\n }\n\n window._paq.push(['enableLinkTracking']);\n window._paq.push(['setTrackerUrl', url + 'piwik.php']);\n window._paq.push(['setSiteId', siteId]);\n\n _.forEach(customVariables, function(variable) {\n window._paq.push(variable);\n });\n\n $.getScript(url + 'piwik.js', function() {\n\n });\n\n };\n\n\n proto.isEnabled = function() {\n return enabled && siteId;\n };\n\n return new AvPiwikAnalytics();\n };\n\n });\n\n})(window);\n","/* global TraceKit */\n\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_EXCEPTIONS', {\n MESSAGES: {\n NOT_APPLICABLE: 'N/A'\n },\n TYPES: {\n EXCEPTION: 'exception'\n }\n });\n\n availity.core.provider('avExceptionAnalytics', function() {\n\n var _enabled = true;\n var appId;\n\n this.enabled = function(enabled) {\n _enabled = !!enabled;\n };\n\n this.setAppId = function(_id) {\n appId = _id;\n };\n\n this.$get = function(avLogMessagesResource, $location, AV_EXCEPTIONS) {\n\n var AvExceptionAnalytics = function() {\n\n };\n\n var proto = AvExceptionAnalytics.prototype;\n\n proto.init = function() {\n\n var self = this;\n\n if(!_enabled) {\n return;\n }\n\n TraceKit.remoteFetching = false;\n TraceKit.surroundingLinesToCollect = 11;\n\n // subscribe() hooks into window.error\n TraceKit.report.subscribe(function(stacktrace) {\n self.onError(stacktrace);\n });\n\n };\n\n proto.prettyPrint = function(stacktrace) {\n\n var message = '';\n\n var length = stacktrace.stack.length;\n\n for(var i = 0; i < length; i++) {\n message += [\n '[' + _.padLeft(i + '', 2, '0') + '] ',\n stacktrace.stack[i].func,\n ' ',\n stacktrace.stack[i].url,\n ':',\n stacktrace.stack[i].line,\n ':',\n stacktrace.stack[i].column,\n i + 1 < length ? '\\n' : ''\n ].join('');\n\n }\n\n return message;\n };\n\n proto.onError = function(stacktrace) {\n\n var userAgent = root.navigator && root.navigator.userAgent ? root.navigator.userAgent : AV_EXCEPTIONS.MESSAGES.NOT_APPLICABLE;\n\n var message = {\n errorDate: moment(new Date()).format('YYYY-MM-DDTHH:mm:ssZZ'),\n errorName: stacktrace.name,\n errorMessage: stacktrace.message,\n errorStack: this.prettyPrint(stacktrace),\n url: $location.$$absUrl,\n appId: appId || AV_EXCEPTIONS.MESSAGES.NOT_APPLICABLE,\n // appVersion: AV_EXCEPTIONS.MESSAGES.NOT_APPLICABLE,\n userAgent: userAgent,\n userLanguage: navigator.userLanguage,\n referrer: document.referrer,\n host: document.domain,\n screenWidth: $(window).width(),\n screenHeight: $(window).height(),\n sdkVersion: availity.VERSION\n };\n\n return this.log(message);\n\n };\n\n proto.log = function(message) {\n return avLogMessagesResource['error'](message);\n };\n\n proto.trackEvent = function(exception) {\n\n if(!_enabled) {\n return;\n }\n\n var stacktrace = TraceKit.computeStackTrace(exception);\n\n return this.onError(stacktrace);\n\n };\n\n return new AvExceptionAnalytics();\n\n };\n });\n\n availity.core.config(function($provide) {\n\n $provide.decorator('$exceptionHandler', function($delegate, $injector) {\n return function(exception, cause) {\n $delegate(exception, cause);\n var errorTacking = $injector.get('avExceptionAnalytics');\n errorTacking.trackEvent(exception);\n };\n });\n\n });\n\n availity.core.run(function(avExceptionAnalytics) {\n avExceptionAnalytics.init();\n });\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity || {};\n\n availity.analytics = angular.module('availity.config', ['ng', 'availity']);\n\n availity.analytics.run(function(avAnalytics) {\n\n avAnalytics.init();\n\n });\n\n})(window);\n\n","// Issue: https://github.com/angular/angular.js/issues/11165\n// Polyfill: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString\n//\n// This polyfill is needed because Angular calls toISOString()\n// when an request parameter is of type Date. If this polyfill isn't present\n// the ajax call fails.\n//\n(function() {\n\n 'use strict';\n\n var pad = function(number) {\n if(number < 10) {\n return '0' + number;\n }\n return number;\n };\n\n if(!Date.prototype.toISOString) {\n\n Date.prototype.toISOString = function() {\n\n return this.getUTCFullYear() +\n '-' + pad(this.getUTCMonth() + 1) +\n '-' + pad(this.getUTCDate()) +\n 'T' + pad(this.getUTCHours()) +\n ':' + pad(this.getUTCMinutes()) +\n ':' + pad(this.getUTCSeconds()) +\n '.' + (this.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) +\n 'Z';\n };\n }\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_MESSAGES', {\n\n EVENTS: {\n\n MESSAGE: 'message', // post message window event\n RESIZE: 'resize', // window resize event\n UNLOAD: 'beforeunload',\n\n AV_RESIZE: 'av:window:resize',\n AV_RECEIVED: 'av:message:received',\n AV_MAXIMIZE: 'nav:left:hide', // @deprecated,\n AV_MINIMIZE: 'nav:left:hide', // @deprecated\n // MAXIMIZE: 'av:window:maximize',\n // MINIMIZE: 'av:window:minimize',\n AV_LOGIN: 'av:login',\n AV_LOGOUT: 'av:logout',\n AV_SESSION_TIMEOUT: 'av:session:timeout'\n\n },\n\n RESIZE_DEBOUNCE: 400,\n\n DOMAIN: /https?:\\/\\/([\\w\\d\\-]+\\.)?availity\\.(com|net)/,\n LOCAL: /http:\\/\\/(localhost|127\\.0\\.0\\.1|0\\.0\\.0\\.0):(\\d+)/\n\n });\n\n})(window);\n","/* global JSON:false */\n\n// https://github.com/kylewelsby/angular-post-message/blob/master/src/angular-post-message.js\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.provider('avMessages', function() {\n\n var enabled = true;\n\n this.enable = function(value) {\n\n if(arguments.length) {\n enabled = !!value;\n }\n\n return enabled;\n\n };\n\n this.$get = function($rootScope, $log, AV_MESSAGES) {\n\n var AvMessages = function() {\n\n };\n\n var proto = AvMessages.prototype;\n\n proto.init = function() {\n\n var self = this;\n var $window = $(window);\n\n $window.on(AV_MESSAGES.EVENTS.MESSAGE, function(event) {\n self.onMessage(event);\n });\n\n $window.on(AV_MESSAGES.EVENTS.RESIZE, function() {\n self.onResize();\n });\n\n this.send(AV_MESSAGES.EVENTS.AV_MAXIMIZE);\n\n $rootScope.$on('$destroy', function() {\n self.destroy();\n });\n\n $window.on(AV_MESSAGES.EVENTS.UNLOAD, function() {\n self.send(AV_MESSAGES.EVENTS.AV_MINIMIZE);\n });\n\n };\n\n proto.destroy = function() {\n\n $(window).off(AV_MESSAGES.EVENTS.MESSAGE);\n $(window).off(AV_MESSAGES.EVENTS.RESIZE);\n $(window).off(AV_MESSAGES.EVENTS.UNLOAD);\n\n };\n\n proto.onResize = function() {\n\n var self = this;\n\n var resize = _.debounce(function() {\n\n var height = $('html').height();\n self.send({\n event: AV_MESSAGES.EVENTS.AV_RESIZE,\n height: height\n });\n\n }, AV_MESSAGES.RESIZE_DEBOUNCE);\n\n resize();\n\n };\n\n proto.isDomain = function(url) {\n\n if(AV_MESSAGES.DOMAIN.test(this.domain())) {\n return AV_MESSAGES.DOMAIN.test(url);\n }\n\n return AV_MESSAGES.LOCAL.test(url);\n };\n\n proto.isEnabled = function() {\n return enabled;\n };\n\n proto.onMessage = function(_event) {\n\n var event = _event;\n\n event = event.originalEvent || event; // jQuery wraps in `originalEvent`\n\n if(!event && !event.data) {\n // no op\n return;\n }\n\n // don't process messages emitted from same window\n if(event.source === window) {\n return;\n }\n\n if(!this.isDomain(event.origin)) {\n $log.warn('avMessages rejected a cross domain message since it does not match an *.availity.com or localhost');\n return;\n }\n\n\n var data = event.data;\n\n try {\n data = angular.fromJson(data);\n } catch(err) {\n $log.warn('avMessages.onMessage() failed to convert event to json payload');\n }\n\n if(_.isString(data)) {\n event = data;\n data = null;\n }else {\n event = data.event ? data.event : AV_MESSAGES.AV_RECEIVED;\n }\n\n $rootScope.$root.$broadcast(event, data);\n\n };\n\n proto.isIframe = function() {\n return window.self !== window.parent;\n };\n\n proto.domain = function() {\n\n var window = root;\n\n if(window.location.origin) {\n return window.location.origin;\n }\n\n if(window.location.hostname) {\n return window.location.protocol + '//' + window.location.hostname + (window.location.port ? ':' + window.location.port : '');\n }\n\n return '*';\n\n };\n\n proto.send = function(payload) {\n\n try {\n\n var message = _.isString(payload) ? payload : JSON.stringify(payload);\n this.postMessage(message, this.domain());\n\n } catch(err) {\n $log.error('avMessages.send() ', err);\n }\n };\n\n proto.postMessage = function(message, domain) {\n window.parent.postMessage(message, domain);\n };\n\n return new AvMessages();\n\n };\n\n });\n\n availity.core.run(function(avMessages) {\n\n if(avMessages.isEnabled()) {\n avMessages.init();\n }\n\n });\n\n})(window);\n\n"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["index.js","strings.js","uuid.js","urls.js","print.js","throttle.js","logger.js","logger-config.js","polling.js","api-factory.js","api-users.js","api-coverages.js","api-configurations.js","api-log-messages.js","api-spaces.js","api-documents.js","api-organizations.js","api-codes.js","api-user-permissions.js","user-authorizations.js","session.js","idle.js","idle-interceptor.js","validator.js","validator-utils.js","validator-size.js","validator-pattern.js","validator-required.js","validator-date-range.js","validator-date-format.js","validator-npi.js","validator-phone.js","validator-email.js","globals.js","analytics.js","analytics-util.js","analytics-splunk.js","analytics-piwik.js","analytics-exceptions.js","analytics-config.js","date-polyfill.js","messages-constants.js","messages.js"],"names":[],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"availity-angular.js","sourcesContent":["/*global module*/\n\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity || {};\n availity.VERSION = 'v0.0.0';\n availity.MODULE = 'availity';\n availity.core = angular.module(availity.MODULE, ['ng']);\n\n var originalModule = angular.module;\n var modules = [];\n\n angular.module = function(name, deps) {\n\n if(deps && _.indexOf(modules, name) !== -1 && !window.__karma__) {\n throw new Error('redefining module: ' + name);\n }\n\n modules.push(name);\n\n return originalModule(name, deps);\n };\n\n root.availity = availity;\n\n if(typeof module !== 'undefined' && module.exports) {\n module.exports = availity;\n }\n\n})(window);\n\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n // https://github.com/epeli/underscore.string/blob/cebddf40cf2e10f0e9b596d9654edd0a1cfefc15/helper/makeString.js\n availity._stringify = function(object) {\n if(object === null) {\n return '';\n }\n return '' + object;\n };\n\n // https://github.com/epeli/underscore.string/blob/cebddf40cf2e10f0e9b596d9654edd0a1cfefc15/isBlank.js\n availity.isBlank = function(str) {\n return (/^\\s*$/).test(availity._stringify(str));\n };\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var uid = ['0', '0', '0'];\n\n availity.uuid = function(prefix) {\n var index = uid.length;\n var digit;\n\n while(index) {\n index--;\n digit = uid[index].charCodeAt(0);\n if(digit === 57 /*'9'*/) {\n uid[index] = 'A';\n return prefix ? prefix + uid.join('') : uid.join('');\n }\n if(digit === 90 /*'Z'*/) {\n uid[index] = '0';\n } else {\n uid[index] = String.fromCharCode(digit + 1);\n return prefix ? prefix + uid.join('') : uid.join('');\n }\n }\n uid.unshift('0');\n return prefix ? prefix + uid.join('') : uid.join('');\n };\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.REGEX_API_URL = /^.*?api.availity.com(.*)$/;\n\n availity.getRelativeUrl = function(url) {\n var result = url.match(availity.REGEX_API_URL);\n if(result && result[1]) {\n return '/api' + result[1];\n }\n\n return url;\n };\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n // https://github.com/jasonday/printThis/commit/66f9cbd0e3760767342eed4ef32cf8294417b227\n availity.print = function() {\n\n if(document.queryCommandSupported('print')) {\n document.execCommand('print', false, null);\n } else {\n window.focus();\n window.print();\n }\n };\n\n})(window);\n","// Original => https://github.com/mgcrea/angular-strap/blob/master/src/helpers/debounce.js\n\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_THROTTLE', {\n OPTIONS: {\n wait: 1000,\n update: false,\n trailing: true,\n leading: false\n }\n });\n\n availity.core.factory('avThrottle', function(AV_THROTTLE, $timeout) {\n\n return function(fn, wait, options) {\n\n options = _.merge({}, AV_THROTTLE.OPTIONS, options);\n\n wait = wait ? wait : AV_THROTTLE.THRESHOLD;\n var update = angular.isDefined(options.update) ? options.update : AV_THROTTLE.UPDATE;\n var timer = null;\n\n return function() {\n var context = options.context || this;\n var args = arguments;\n\n if(!timer) {\n if(options.leading !== false) {\n fn.apply(context, args);\n }\n\n var later = function() {\n timer = null;\n if(options.trailing !== false) {\n fn.apply(context, args);\n }\n };\n\n timer = $timeout(later, wait, update);\n }\n\n return timer;\n\n };\n };\n });\n\n})(window);\n","// Orginal => https://github.com/ericzon/angular-ny-logger/blob/0c594e864c93e7f33d36141200096bc6139ddde1/angular-ny-logger.js\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.provider('AvLogger', function() {\n\n var _enabled = false;\n\n this.enabled = function(enabled) {\n _enabled = !!enabled;\n };\n\n this.$get = function($injector) {\n\n var AvLogger = function(context, $delegate) {\n\n this.context = context || '';\n this.$log = $delegate;\n\n };\n\n var proto = AvLogger.prototype;\n\n AvLogger.supplant = function(str, supplantData) {\n if (!supplantData) {\n return str;\n }\n\n var _supplant = function (match, key) {\n var result = supplantData[key];\n return result;\n };\n\n return str.replace(/\\{([^{}]*)\\}/g, _supplant);\n };\n\n AvLogger.isObject = function(element) {\n var elemStr = ( !angular.isUndefined(element) && !angular.isUndefined(element.constructor) ) ? element.constructor.toString() : '';\n return (elemStr.indexOf('Object') > -1);\n };\n\n AvLogger.getFormattedTimestamp = function(date) {\n\n return AvLogger.supplant('{0}:{1}:{2}:{3}', [\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds()\n ]);\n\n };\n\n proto._log = function(originalFn, args) {\n\n // Allow enabling logger through query params\n // Ex:\n //\n // http://localhost:3000/ui.html#avLogger\n\n var hash = window.location.hash;\n hash = hash || '';\n\n if(!_enabled && hash.indexOf('avLogger') < 0 && originalFn !== 'error') {\n return;\n }\n\n var now = AvLogger.getFormattedTimestamp(new Date());\n var message = '';\n var supplantData = [];\n\n var context = this.context ? ' [' + this.context + '] ' : '';\n\n switch(args.length) {\n case 1:\n // (1) If the user supplied one argument, then the argument must be\n // the message itself and _log()\n // will print: - : \n supplantData = args[0];\n message = AvLogger.supplant('{0}{1} - {2}', [now, context, args[0]]);\n break;\n case 3:\n // (3) If the user supplied three arguments, then the first argument\n // is a method name, the second is the message and the third is an\n // object of variables to interpolate with the message. For this, _log()\n // will print: - - ('')\n supplantData = args[2];\n message = AvLogger.supplant(\"{0}{1} - {2}(\\'{3}\\')\", [now, context, args[0], args[1]]);\n break;\n case 2:\n // (2) If the user provided two arguments, we need to find out whether\n // they supplied a method name or an interpolation object.\n // In order to figure that out, we’ll check the type of the last argument.\n // If it is a string, then it has to be the message itself while the\n // first argument is the method name. Otherwise consider the first argument\n // as the message and the second as array of interpolation variables.\n // The output print will be according to this check.\n if(typeof args[1] === 'string') {\n\n message = AvLogger.supplant(\"{0}{1} - {2}(\\'{3}\\')\", [now, context, args[0], args[1]]);\n\n } else {\n\n // If the message is an error, there may be a stack included. If so, we\n // should include the stack in the message to make it more meaningful.\n if(args[0].stack) {\n var errorMessage = this.formatError(args[0]);\n message = AvLogger.supplant('{0}{1} - {2}', [now, context, errorMessage]);\n supplantData = args[1];\n\n }else {\n supplantData = args[1];\n\n }\n\n }\n break;\n }\n\n var $log = this.$log || $injector.get('$log');\n\n var params = (AvLogger.isObject(supplantData)) ? [message, supplantData] : [AvLogger.supplant(message, supplantData)];\n $log[originalFn].apply(null, params);\n\n };\n\n proto.log = function() {\n this._log('log', arguments);\n };\n\n proto.info = function() {\n this._log('info', arguments);\n };\n\n proto.warn = function() {\n this._log('warn', arguments);\n };\n\n proto.debug = function() {\n this._log('debug', arguments);\n };\n\n // https://github.com/angular/angular.js/blob/v1.2.27/src/ng/log.js#L122\n proto.formatError = function(arg) {\n if(arg instanceof Error) {\n if(arg.stack) {\n\n arg = (arg.message && arg.stack.indexOf(arg.message) === -1) ?\n 'Error: ' + arg.message + '\\n' + arg.stack : arg.stack;\n\n } else if(arg.sourceURL) {\n arg = arg.message + '\\n' + arg.sourceURL + ':' + arg.line;\n }\n }\n return arg;\n };\n\n proto.error = function() {\n this._log('error', arguments);\n };\n\n return AvLogger;\n\n };\n\n });\n\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.config(function($provide) {\n\n $provide.decorator('$log', function($delegate, AvLogger) {\n return new AvLogger(null, $delegate);\n });\n\n });\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_POLLING', {\n INTERVAL: 1000, // delay in ms before retrying an async request\n MAX_ELAPSED_TIME: 5000, // max time in ms before polling stops and rejects original request\n MAX_RETRY: 30, // # of times the request will be tried\n DECAY: 1.2, // % the polling interval decays after every retry\n // maximum time polling is allowed before rejecting the request\n EVENTS: {\n MAX_RETRY: 'av:polling:max:retry'\n },\n REGEX_URL: /^.*?api.availity.com(.*)$/ // capture the relative url from API\n });\n\n var PollingServiceFactory = function($rootScope, $q, $injector, $timeout, $log, AV_POLLING, AV_API) {\n\n var AvPollingService = function() {\n this.pendingRequests = []; // stores all request for polling\n };\n\n var proto = AvPollingService.prototype;\n\n proto.response = function(response) {\n\n if(this.isAsyncResponse(response)) {\n return this.onAsyncReponse(response);\n }\n\n return response || $q.when(response);\n };\n\n proto.setDefaults = function(config) {\n\n var defaultOptions = {\n pollingInterval: AV_POLLING.INTERVAL,\n pollingDecay: AV_POLLING.DECAY,\n pollingMaxInterval: AV_POLLING.MAX_ELAPSED_TIME,\n pollingRetryCount: 0,\n pollingStartTime: new Date().getTime()\n };\n\n return _.extend(defaultOptions, config);\n };\n\n proto.responseError = function(response) {\n // Return the promise rejection\n return $q.reject(response);\n };\n\n /**\n * API layer return a link with a polling url for\n * async responses.\n *\n * @param {Object} response ajax response\n * @return {Boolean} true if response has status of 202 (accepted) and location param in header with uri+session link\n */\n proto.isAsyncResponse = function(response) {\n\n return response &&\n response.config &&\n response.config.api &&\n response.status &&\n response.status === 202 &&\n angular.isFunction(response.headers) && !availity.isBlank(response.headers(AV_API.HEADERS.SERVER.LOCATION));\n };\n\n proto.onAsyncReponse = function(response) {\n\n response.config = this.setDefaults(response.config);\n\n var deferred = $q.defer();\n\n this.queueRequest(deferred, response);\n\n // [rm3]: Can't call notify before you return promise object?\n $timeout(function() {\n // Notify deferred listeners with the original server response\n deferred.notify(response);\n }, 0, false);\n\n return deferred.promise;\n };\n\n proto.getUrl = function(url) {\n\n var result = url.match(AV_POLLING.REGEX_URL);\n if(result && result[1]) {\n return '/api' + result[1];\n }\n\n return url;\n };\n\n proto.queueRequest = function(deferred, response) {\n\n var self = this;\n // server replies with location header so set the url into config\n var _url = availity.getRelativeUrl(response.headers(AV_API.HEADERS.SERVER.LOCATION));\n var _config = response.config;\n\n\n // headers – {Object} – Map of strings or functions which return strings representing HTTP headers\n // to send to the server. If the return value of a function is null, the header\n // will not be sent. Functions accept a config object as an argument.\n var config = {\n method: 'GET',\n api: true,\n headers: _config.headers,\n pollingInterval: _config.pollingInterval,\n pollingMaxRetry: _config.pollingMaxRetry,\n pollingMaxInterval: _config.pollingMaxInterval,\n pollingStartTime: _config.pollingStartTime,\n _pollingDecay: _config._pollingDecay,\n pollingRetryCount: _config.pollingRetryCount,\n pollingDecay: _config.pollingDecay,\n url: _url, /* set the url from the server response */\n cache: false\n };\n\n var request = {\n id: availity.uuid('request-'),\n config: config,\n deferred: deferred\n };\n\n var timeout = this.getPollingTimeout(config);\n\n // each async request should run on its own timer\n var timer = $timeout(function() {\n self.retryRequest(request.id);\n }, timeout, false);\n\n request.timer = timer;\n\n // add the async request to the queue\n this.pushRequest(request);\n\n };\n\n proto.popRequest = function(id) {\n\n var index = null;\n var request = null;\n\n for(var i = 0; i < this.pendingRequests.length; i++) {\n if(this.pendingRequests[i].id === id) {\n index = i;\n break;\n }\n }\n\n request = this.pendingRequests[index];\n this.pendingRequests.splice(index, 1);\n\n return request;\n };\n\n proto.pushRequest = function(request) {\n this.pendingRequests.push(request);\n };\n\n proto.getPollingTimeout = function(config) {\n return config.pollingDecay * config.pollingInterval;\n };\n\n proto.isPollingMaxTimeout = function(config) {\n var now = new Date().getTime();\n var elaspedTime = now - config.pollingStartTime;\n var isElapsed = elaspedTime > config.pollingMaxInterval;\n return isElapsed;\n },\n\n proto.isMaxRetried = function(config) {\n return config.pollingRetryCount >= AV_POLLING.MAX_RETRY;\n };\n\n proto.isPollable = function(config) {\n var _isTimeout = this.isPollingMaxTimeout(config);\n var _isMax = this.isMaxRetried(config);\n\n return _isTimeout || _isMax ? false : true;\n\n };\n\n proto.retryRequest = function(id) {\n\n var self = this;\n var request = this.popRequest(id);\n $timeout.cancel(request.timer);\n\n var config = request.config;\n\n var deferred = request.deferred;\n\n if(!this.isPollable(config)) {\n $log.info('Rejecting pollable response due to timeout');\n return deferred.reject(request);\n }\n\n // increment counters and polling timeouts\n this.increment(config);\n\n function successCallback(response) {\n if(self.isAsyncResponse(response)) {\n deferred.notify(response);\n self.queueRequest(request.deferred, response);\n } else {\n deferred.resolve(response);\n }\n }\n\n function errorCallback(response) {\n deferred.reject(response);\n }\n\n // Silly circular dependency trick\n var $http = $injector.get('$http');\n\n $http(config).then(successCallback, errorCallback);\n\n };\n\n proto.increment = function(config) {\n this.incrementCounter(config);\n this.incrementDecay(config);\n };\n\n proto.incrementDecay = function(config) {\n if(!config._pollingDecay) {\n // store the original decay param\n config._pollingDecay = config.pollingDecay;\n }\n config.pollingDecay *= config._pollingDecay;\n };\n\n proto.incrementCounter = function(config) {\n config.pollingRetryCount++;\n };\n\n proto.clearRequests = function() {\n angular.forEach(this.pendingRequests, function(request) {\n $timeout.cancel(request.timer);\n });\n this.pendingRequests = [];\n };\n\n return new AvPollingService();\n\n };\n\n availity.core.factory('avPollingService', PollingServiceFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_API', {\n HEADERS: {\n SERVER: {\n ID: 'X-API-ID',\n LOCATION: 'Location',\n STATUS: 'X-Status-Message',\n GLOBAL_ID: 'X-Global-Transaction-ID'\n },\n CLIENT: {\n SESSION_ID: 'X-Session-ID',\n AUTH: 'Authorization',\n OVERRIDE: 'X-HTTP-Method-Override',\n CALLBACK_URL: 'X-Callback-URL',\n CUSTOMER_ID: 'X-Availity-Customer-ID',\n RESPONSE_ENCODING: 'X-Response-Encoding-Context'\n }\n },\n OPTIONS: {\n // pre-prend the url with a value like `/public` so we can build urls like `public/api/v1/*`\n prefix: '',\n // default base url for endpoints\n path: '/api',\n // url resource group, such as `/foo`, for urls like `public/api/foo/v1/*`\n resourceGroup: '',\n // url to resource endpoint like `coverages` or `payers`\n url: null,\n // defaults to version 1\n version: '/v1',\n // governance level `/internal`\n level: '',\n // post-pend the url with `.json`, `.txt` or `.xml`\n suffix: '',\n // cache all request by default\n cache: true,\n // flag used to enable behaviors around the Availity Rest API\n api: true,\n // # of times the polling service has tried to get a response\n pollingRetryCount: 0,\n // in ms\n pollingInterval: 1000,\n // % the polling interval decays after every retry\n pollingDecay: 1.2,\n // maximum time polling is allowed before rejecting the request\n pollingMaxInterval: 30000,\n // default headers\n headers: {\n // Turn off content encoding for angular apis\n 'X-Response-Encoding-Context': 'NONE'\n }\n }\n });\n\n // Factory that creates ApiResourcess\n var ApiResourcesProvider = function(AV_API) {\n\n // Provider default options that can be overridden at config time\n var defaultOptions = _.merge({}, AV_API.OPTIONS);\n\n // Allow overrides in config phase\n this.setOptions = function(options) {\n _.merge(defaultOptions, options);\n };\n\n this.getOptions = function() {\n return angular.copy(defaultOptions);\n };\n\n // helper method to global set http common headers\n this.setHttpCommonHeaders = function($httpProvider) {\n _.merge($httpProvider.defaults.headers.common, defaultOptions.headers);\n };\n\n /**\n * Main get method for creating new resource\n * @param $http\n * @param $q\n * @param avPollingService\n * @returns {AvApiResource}\n */\n this.$get = function($http, $q, avPollingService) {\n\n var AvApiResource = function(options) {\n\n if (!options) {\n throw new Error('[options] cannot be null or undefined');\n }\n\n // if string the assume url is being passed in\n if (angular.isString(options)) {\n options = options.charAt(0) === '/' ? options : '/' + options;\n options = angular.extend({}, {url: options});\n }\n\n if (!options.url) {\n throw new Error('[url] cannot be null');\n }\n\n // get the default options and merge into this instance\n this.options = angular.extend({}, defaultOptions, (options || {}));\n };\n\n // Alias the prototype\n var proto = AvApiResource.prototype;\n\n proto._config = function(config) {\n return _.merge({}, this.options, (config || {}));\n };\n\n proto._cacheBust = function(config) {\n config.cacheBust = null;\n config.params = config.params || {};\n config.params.cacheBust = new Date().getTime();\n return config;\n };\n\n proto._getUrl = function(id) {\n if (this.options.api) {\n return this._getApiUrl(id);\n }\n\n return this.options.url;\n };\n\n proto._createResponse = function(data, status, headers, config) {\n return {\n data: data,\n status: status,\n headers: headers,\n config: config\n };\n };\n\n proto._request = function(config, afterCallback) {\n\n var self = this;\n var defer = $q.defer();\n\n $http(config)\n .success(function(data, status, headers, _config) {\n\n var _response = {\n data: data,\n status: status,\n headers: headers,\n config: _config\n };\n\n // handle the async response if applicable\n var _promise = $q.when(avPollingService.response(_response));\n // notify the promise listener of the original response\n defer.notify(_response);\n\n // handle the polling service promise\n _promise.then(function(successResponse) {\n\n // if service has a callback then call it\n // var response = self._createResponse(data, status, headers, _config);\n if (afterCallback) {\n successResponse = afterCallback.call(self, successResponse, config.data);\n }\n defer.resolve(successResponse);\n }, function(errorResponse) {\n defer.reject(errorResponse);\n }, function(notifyResponse) {\n defer.notify(notifyResponse);\n });\n\n }).error(function(data, status, headers, _config) {\n var response = self._createResponse(data, status, headers, _config);\n defer.reject(response);\n });\n\n var promise = defer.promise;\n\n // recreate the success callback ala $http\n promise.success = function(fn) {\n promise.then(function(response) {\n fn(response.data, response.status, response.headers, response.config);\n });\n return promise;\n };\n\n // recreate the error callback ala $http\n promise.error = function(fn) {\n promise.then(null, function(response) {\n fn(response.data, response.status, response.headers, config);\n });\n return promise;\n };\n\n promise.always = promise['finally'];\n\n return promise;\n };\n\n proto.normalize = function(url) {\n return url\n .replace(/[\\/]+/g, '/')\n .replace(/\\/$/, '');\n };\n\n proto.join = function() {\n var joined = [].slice.call(arguments, 0).join('/');\n return this.normalize(joined);\n };\n\n proto._getApiUrl = function(id) {\n\n id = id ? '/' + id : '';\n\n var url = this.join(\n this.options.prefix,\n this.options.path,\n this.options.level,\n this.options.resourceGroup,\n this.options.version,\n this.options.url,\n id);\n\n return url + this.options.suffix;\n };\n\n proto.create = function(data, config) {\n\n if (!data) {\n throw new Error('called method without [data]');\n }\n\n if (this.beforeCreate) {\n data = this.beforeCreate(data);\n }\n\n config = this._config(config);\n config.method = 'POST';\n config.url = this._getUrl();\n config.data = data;\n\n return this._request(config, this.afterCreate);\n\n };\n\n proto.get = function(id, config) {\n\n if (!id) {\n throw new Error('called method without [id]');\n }\n\n config = this._config(config);\n if (config.cacheBust) {\n config = this._cacheBust(config);\n }\n config.method = 'GET';\n config.url = this._getUrl(id);\n\n return this._request(config, this.afterGet);\n\n };\n\n proto.query = function(config) {\n\n config = this._config(config);\n if (config.cacheBust) {\n config = this._cacheBust(config);\n }\n config.method = 'GET';\n config.url = this._getUrl();\n\n return this._request(config, this.afterQuery);\n\n };\n\n proto.update = function(id, data, config) {\n\n var url;\n\n if (_.isString(id) || _.isNumber(id)) {\n url = this._getUrl(id);\n } else {\n url = this._getUrl();\n // At this point the function signature becomes:\n //\n // proto.update = function(data, config) {} a.k.a function(id, data)\n //\n config = data; // config is really the 2nd param\n data = id; // data is really the first param\n }\n\n if (this.beforeUpdate) {\n data = this.beforeUpdate(data);\n }\n\n config = this._config(config);\n config.method = 'PUT';\n config.url = url;\n config.data = data;\n\n return this._request(config, this.afterUpdate);\n\n };\n\n proto.remove = function(id, config) {\n\n var url;\n var data;\n\n if (_.isString(id) || _.isNumber(id)) {\n url = this._getUrl(id);\n } else {\n // At this point the function signature becomes:\n //\n // proto.remove = function(data, config)\n //\n url = this._getUrl();\n data = id;\n }\n\n config = this._config(config);\n config.method = 'DELETE';\n config.url = url;\n config.data = data;\n\n return this._request(config, this.afterRemove);\n };\n\n proto.beforeCreate = null;\n proto.afterCreate = null;\n proto.afterQuery = null;\n proto.afterGet = null;\n proto.beforeUpdate = null;\n proto.afterUpdate = null;\n proto.afterRemove = null;\n\n return AvApiResource;\n };\n\n };\n\n availity.core.provider('AvApiResource', ApiResourcesProvider);\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n var UserServiceFactory = function(AvApiResource) {\n\n var AvUsersResource = function() {\n AvApiResource.call(this, 'users');\n };\n\n angular.extend(AvUsersResource.prototype, AvApiResource.prototype, {\n\n afterGet: function(response) {\n var user = response.data.user ? response.data.user : response.data;\n return user;\n },\n\n me: function(config) {\n return this.get('me', config);\n }\n\n });\n\n return new AvUsersResource();\n\n };\n\n availity.core.factory('avUsersResource', UserServiceFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avCoveragesResource', function(AvApiResource) {\n return new AvApiResource({version: '/v1', url: '/configurations', cache: false});\n });\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avConfigurationsResource', function(AvApiResource) {\n return new AvApiResource({version: '/v1', url: '/configurations'});\n });\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var LogMessagesFactory = function(AvApiResource) {\n\n var AvLogMessagesResource = function() {\n\n AvApiResource.call(this, {\n version: '/v1',\n url: '/log-messages'\n });\n };\n\n angular.extend(AvLogMessagesResource.prototype, AvApiResource.prototype, {\n\n buildRequest: function(level, entries) {\n\n var requestPayload = {};\n\n if(entries.level) {\n delete entries.level;\n }\n\n requestPayload.level = level;\n requestPayload.entries = entries;\n\n return requestPayload;\n },\n\n debug: function(entries) {\n return this.create(this.buildRequest('debug', entries));\n },\n\n info: function(entries) {\n return this.create(this.buildRequest('info', entries));\n },\n\n warn: function(entries) {\n return this.create(this.buildRequest('warn', entries));\n },\n\n error: function(entries) {\n return this.create(this.buildRequest('error', entries));\n }\n\n });\n\n return new AvLogMessagesResource();\n\n };\n\n availity.core.factory('avLogMessagesResource', LogMessagesFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var SpacesFactory = function(AvApiResource) {\n\n // sdk/platform/v1/spaces/10939061011461209623076300008435\n return new AvApiResource({\n path: '/api/sdk',\n level: '/platform',\n version: '/v1',\n url: '/spaces'\n });\n\n };\n\n availity.core.factory('avSpacesResource', SpacesFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var AvDocumentsResourceFactory = function(AvApiResource) {\n\n var AvDocumentsResource = function() {\n AvApiResource.call(this, 'documents');\n };\n\n angular.extend(AvDocumentsResource.prototype, AvApiResource.prototype, {\n\n getContents: function(id) {\n var config = this._config();\n config.url = this.getContentsUrl(id);\n return this._request(config);\n },\n\n getContentsUrl: function(id) {\n return this._getUrl(id) + '/contents';\n }\n\n });\n\n return new AvDocumentsResource();\n\n };\n\n availity.core.factory('avDocumentsResource', AvDocumentsResourceFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var OrganizationResourceFactory = function(AvApiResource) {\n\n var OrganizationResource = function() {\n AvApiResource.call(this, 'organizations');\n };\n\n angular.extend(OrganizationResource.prototype, AvApiResource.prototype, {\n\n getOrganizations: function(config) {\n return this.query(config).then(function(response) {\n return response.data.organizations ? response.data.organizations : response.data;\n });\n }\n\n });\n\n return new OrganizationResource();\n };\n\n availity.core.factory('avOrganizationsResource', OrganizationResourceFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n\n var availity = root.availity;\n\n availity.core.factory('avCodesResource', function(AvApiResource) {\n return new AvApiResource({version: '/v1', url: '/codes'});\n });\n\n var AvCodesResourceFactory = function(AvApiResource) {\n\n var AvCodesResource = function () {\n AvApiResource.call(this, 'codes');\n };\n\n angular.extend(AvCodesResource.prototype, AvApiResource.prototype, {\n\n getCodes: function (data) {\n\n // config for the api resource query\n var config = {};\n config.params = {};\n\n if(data.page) {\n config.params.offset = 50 * (data.page - 1);\n }\n if(data.offset) {\n config.params.offset = data.offset;\n }\n if(data.list) {\n config.params.list = data.list;\n }\n if(data.q) {\n config.params.q = data.q;\n }\n\n return this.query(config).then(function (response) {\n // Format the response into something select2 can read\n var results = response.data.codes;\n if(results && !_.has(results[0], 'id')) {\n _.each(results, function (code) {\n code.id = code.code;\n });\n }\n\n // calculate if we want to continue searching\n var moreVal = response.data.offset < response.data.totalCount - response.data.limit;\n return {\n more: moreVal,\n results: results\n };\n\n });\n }\n\n });\n\n return new AvCodesResource();\n\n };\n\n availity.core.factory('avCodesResource', AvCodesResourceFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var AvUserPermissionsResourceFactory = function(AvApiResource) {\n\n var AvUserPermissionsResource = function() {\n AvApiResource.call(this, {\n level: '/internal',\n version: '/v1',\n url: '/axi-user-permissions'\n });\n this.sessionDate = moment().toISOString();\n };\n\n angular.extend(AvUserPermissionsResource.prototype, AvApiResource.prototype, {\n\n afterQuery: function(response) {\n return response.data.axiUserPermissions ? response.data.axiUserPermissions : [];\n },\n\n getPermissions: function(permissionIds, region) {\n var self = this;\n return this.query({\n params: {\n permissionId: permissionIds,\n region: region,\n sessionDate: self.sessionDate\n }\n });\n }\n\n });\n\n return new AvUserPermissionsResource();\n\n };\n\n availity.core.factory('avUserPermissionsResource', AvUserPermissionsResourceFactory);\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n var AvUserAuthorizationsFactory = function($q, $log, avUserPermissionsResource) {\n\n /**\n *\n * @constructor\n */\n var AvUserAuthorizations = function() {\n /**\n * Region is used to return permission/resources relative to region. If null service will\n * return all permission relative to current. If value 'ALL' used it will return value relative\n * to all regions the user has access to.\n * @type {string}\n */\n this.region = null;\n /**\n * PermissionIds contains the set of permissionIds to request from service. If user of service calls\n * setPermissionIds() or call getPermissions() with complete set of permissionIds needed by application,\n * then service should only make that one hit to retrieve permission information.\n * @type {Array}\n */\n this.permissionIds = [];\n };\n\n var proto = AvUserAuthorizations.prototype;\n\n proto.setRegion = function(region) {\n this.region = region;\n return this;\n };\n\n proto.setPermissionIds = function(permissionIds) {\n if(!angular.isArray(permissionIds)) {\n throw new Error('permissionsIds must be an array of string IDs for avUserAuthorizations#addPermissionIds');\n }\n this.permissionIds = permissionIds;\n return this;\n };\n\n proto.isAuthorized = function(permissionId) {\n return this.getPermission(permissionId).then(function(permission) {\n return permission.isAuthorized;\n });\n };\n\n proto.isAnyAuthorized = function(permissionIds) {\n return this.getPermissions(permissionIds).then(function(permissions) {\n var permission = _.findWhere(permissions, {isAuthorized: true});\n return permission !== undefined;\n });\n };\n\n proto.getPermission = function(permissionId) {\n if(!angular.isString(permissionId)) {\n throw new Error('permissionsId must be a string ID for avUserAuthorizations#getPermission');\n }\n\n return this.getPermissions([permissionId])\n .then(function(_permissions) {\n return _permissions[permissionId];\n });\n };\n\n proto.getPermissions = function(permissionIds) {\n var self = this;\n\n if(!angular.isArray(permissionIds)) {\n throw new Error('permissionsIds must be an array of string IDs for avUserAuthorizations#getPermissions');\n }\n // merge permission ids to reduce calls to backend\n self.permissionIds = _.union(self.permissionIds, permissionIds);\n\n return avUserPermissionsResource\n .getPermissions(self.permissionIds, self.region)\n .then(function(_permissions) {\n return self.toPermissionMap(permissionIds, _permissions);\n });\n };\n\n proto.getOrganizations = function(permissionId) {\n return this.getPermission(permissionId).then(function(permission) {\n return permission.organizations;\n });\n };\n\n proto.getPayers = function(permissionId, organizationId) {\n return this.getPermission(permissionId).then(function(permission) {\n var organization = _.findWhere(permission.organizations, {id: organizationId});\n\n if(organization && organization.resources) {\n return organization.resources;\n }\n return [];\n });\n\n };\n\n /**\n * Converts array permissions to map with value for each permissionId, creating empty permission\n * if can't find permission in array\n * @private\n */\n proto.toPermissionMap = function(permissionIds, permissions) {\n var self = this;\n var map = {};\n permissions = _.slice(permissions);\n _.forEach(permissionIds, function(permissionId) {\n var key = {id: permissionId};\n var permission = _.findWhere(permissions, key);\n permission = permission ? self.toPermission(permission) : self.toPermission(key);\n map[permission.id] = permission;\n });\n return map;\n };\n\n /**\n * Convert a permission resource into a structure that is easier to work with.\n * @private\n */\n proto.toPermission = function(permission) {\n return {\n id: permission.id,\n description: permission.description ? permission.description : '',\n geographies: permission.geographies ? permission.geographies : [],\n organizations: permission.organizations ? permission.organizations : [],\n isAuthorized: permission.organizations ? permission.organizations.length > 0 : false\n };\n };\n\n return new AvUserAuthorizations();\n\n };\n\n availity.core.factory('avUserAuthorizations', AvUserAuthorizationsFactory);\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_SESSION', {\n SESSION_TIMEOUT: 'av:auth:session:timeout',\n NOT_AUTHORIZED: 'av:auth:not:authorized'\n });\n\n availity.core.factory('avSession', function($q, avUsersResource) {\n\n var AvSession = function() {\n this.user = null;\n this.permissions = null;\n };\n\n var proto = AvSession.prototype;\n\n proto.getUser = function() {\n var self = this;\n\n if(this.user) {\n return $q.when(this.user);\n }\n\n return avUsersResource.me().then(function(user) {\n self.user = user;\n return self.user;\n });\n };\n\n\n proto.destroy = function() {\n this.user = null;\n this.permisions = null;\n };\n\n return new AvSession();\n });\n\n})(window);\n","// Inspiration => https://github.com/HackedByChinese/ng-idle\n//\n// Rules:\n//\n// * ping after 3 minutes from last human activity\n// * reset session after api success except 401\n// * idle show after 25 of inactivity\n//\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_IDLE', {\n EVENTS: {\n IDLE_INACTIVE: 'av:idle:inactive',\n IDLE_ACTIVE: 'av:idle:active',\n SESSION_TIMEOUT_ACTIVE: 'av:idle:session:active',\n SESSION_TIMEOUT_REDIRECT: 'av:idle:session:redirect',\n HUMAN: 'keydown.av.idle mousedown.av.idle keydown.av.idle',\n MACHINE: '$locationChangeSuccess'\n },\n INTERVALS: {\n PING: 3 * 60 * 1000, // 3 minutes\n IDLE: 25 * 60 * 1000, // 25 minutes\n SESSION: 30 * 60 * 1000 // 30 minutes\n },\n URLS: {\n HOME: '/availity/web/public.elegant.login',\n PING: '/api/v1/users/me'\n }\n });\n\n availity.core.provider('avIdle', function(AV_IDLE) {\n\n var enabled = false;\n var pingUrl;\n var redirectUrl;\n var sessionTimeout;\n var idleTimeout;\n var pingTimeout;\n\n this.enable = function(value) {\n if(arguments.length) {\n enabled = !!value;\n }\n return enabled;\n };\n\n this.setSessionTimeout = function(timeout) {\n sessionTimeout = timeout || AV_IDLE.INTERVALS.SESSION;\n };\n\n this.setIdleTimeout = function(timeout) {\n idleTimeout = timeout || AV_IDLE.INTERVALS.IDLE;\n };\n\n this.setPingTimeout = function(timeout) {\n pingTimeout = timeout || AV_IDLE.INTERVALS.PING;\n };\n\n this.setPingUrl = function(url) {\n pingUrl = url || AV_IDLE.URLS.PING;\n };\n\n this.$get = function(AV_IDLE, $log, $document, $rootScope, $timeout, avThrottle, $q, $injector) {\n\n var AvIdle = function() {\n\n // $timeout references\n this._idleTimer = null;\n this._sessionTimer = null;\n this._pingTimer = null;\n this._keepAlive = null;\n\n // flag used to track if the if user is idle or session expired\n this.idleActive = false;\n this.sessionActive = false;\n\n this.listeners = [];\n\n this.init();\n\n };\n\n var proto = AvIdle.prototype;\n\n proto.init = function() {\n\n if(!enabled) {\n this.stop();\n return;\n }\n\n this.start();\n };\n\n proto.start = function() {\n\n $log.info('avIdle start');\n\n var self = this;\n var listener;\n\n !sessionTimeout && this.setSessionTimeout();\n !idleTimeout && this.setIdleTimeout();\n !pingTimeout && this.setPingTimeout();\n !pingUrl && this.setPingUrl();\n !redirectUrl && this.setRedirectUrl();\n\n $rootScope.$on('$destroy', function() {\n self.stop();\n });\n\n $document.find('body').on(AV_IDLE.EVENTS.HUMAN, function(event) {\n self.onEvent(event);\n });\n\n listener = $rootScope.$on(AV_IDLE.EVENTS.MACHINE, function(event, oldUrl, newUrl) {\n if(oldUrl !== newUrl) {\n self.onEvent(event);\n }\n });\n this.listeners.push(listener);\n\n $rootScope.$on(AV_IDLE.EVENTS.SESSION_TIMEOUT_REDIRECT, function() {\n document.location.href = redirectUrl;\n });\n\n this.startIdleTimer();\n this.startSessionTimer();\n };\n\n proto.stop = function() {\n\n $document.find('body').off(AV_IDLE.EVENTS.HUMAN);\n\n // turns off Angular event listeners @see http://stackoverflow.com/a/14898795\n _.each(this.listeners, function(listener) {\n listener();\n });\n\n this.stopPing();\n this.stopSessionTimer();\n this.stopIdleTimer();\n };\n\n proto.isEnabled = function() {\n return enabled;\n };\n\n proto.enable = function(value) {\n if(arguments.length) {\n enabled = !!value;\n }\n\n return this;\n };\n\n proto.setSessionTimeout = function(timeout) {\n sessionTimeout = timeout || AV_IDLE.INTERVALS.SESSION;\n return this;\n };\n\n proto.setIdleTimeout = function(timeout) {\n idleTimeout = timeout || AV_IDLE.INTERVALS.IDLE;\n return this;\n };\n\n proto.setPingTimeout = function(timeout) {\n pingTimeout = timeout || AV_IDLE.INTERVALS.PING;\n return this;\n };\n\n proto.setPingUrl = function(url) {\n pingUrl = url || AV_IDLE.URLS.PING;\n return this;\n };\n\n proto.setRedirectUrl = function(url) {\n redirectUrl = url || AV_IDLE.URLS.HOME;\n return this;\n };\n\n proto.response = function(response) {\n\n if(this.isApiRequest(response)) {\n this.startSessionTimer();\n }\n\n return response;\n };\n\n proto.isApiRequest = function(response) {\n return response && response.config && response.config.api;\n };\n\n proto.responseError = function(response) {\n\n if(this.isApiRequest(response) && response.status !== 401) {\n this.startSessionTimer();\n }\n\n if(this.isApiRequest() && response.status === 401) {\n this.stopPing();\n }\n\n return $q.reject(response);\n };\n\n proto.startSessionTimer = function() {\n\n var self = this;\n\n this.stopSessionTimer();\n\n var later = function() {\n $log.info('avIdle session has TIMED OUT');\n self.stop();\n $rootScope.$broadcast(AV_IDLE.EVENTS.SESSION_TIMEOUT_ACTIVE);\n };\n\n $log.info('avIdle session timer has STARTED');\n this._sessionTimer = $timeout(later, sessionTimeout, false);\n\n };\n\n proto.stopSessionTimer = function() {\n $log.info('avIdle session timer has STOPPED');\n $timeout.cancel(this._sessionTimer);\n };\n\n proto.startIdleTimer = function() {\n\n var self = this;\n\n this.stopIdleTimer();\n\n var later = function() {\n self.stopIdleTimer();\n $log.info('avIdle is IDLING');\n $rootScope.$broadcast(AV_IDLE.EVENTS.IDLE_ACTIVE);\n };\n\n $log.info('avIdle idle timer has STARTED');\n this._idleTimer = $timeout(later, idleTimeout, false);\n };\n\n proto.stopIdleTimer = function() {\n $log.info('avIdle idle timer has STOPPED');\n $timeout.cancel(this._idleTimer);\n };\n\n proto.startPing = function() {\n\n if(!this._keepAlive) {\n $log.info('avIdle ping timer has STARTED');\n this._keepAlive = avThrottle(this.keepAlive, pingTimeout, {context: this});\n }\n\n this._pingTimer = this._keepAlive();\n };\n\n proto.stopPing = function() {\n $log.info('avIdle ping timer has STOPPED');\n if(this._pingTimer) {\n $timeout.cancel(this._pingTimer);\n }\n };\n\n proto.keepAlive = function() {\n\n // destroy the reference to that a new throttle gets created upon\n // next user or system event\n this._keepAlive = null;\n var $http = $injector.get('$http');\n\n $http.get(pingUrl, {\n cache: false,\n api: true\n }).success(function() {\n $log.info('avIdle keep-alive SUCCESS');\n }).error(function() {\n $log.error('avIdle keep-alive FAILURE');\n });\n };\n\n proto.onEvent = function() {\n this.startIdleTimer();\n this.startPing();\n };\n\n return new AvIdle();\n\n };\n\n });\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avIdleInterceptor', function(avIdle) {\n return {\n response: function(response) {\n return avIdle.response(response);\n },\n responseError: function(response) {\n return avIdle.responseError(response);\n }\n };\n\n });\n\n availity.core.config(function($httpProvider) {\n $httpProvider.interceptors.push('avIdleInterceptor');\n });\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.value('avValConfig', {\n classes: {\n valid: 'ng-valid',\n invalid: 'ng-invalid',\n dirty: 'ng-dirty',\n pristine: 'ng-pristine',\n touched: 'ng-touched',\n untouched: 'ng-untouched',\n submitted: 'ng-submitted'\n },\n validators: [\n 'avValPattern',\n 'avValSize',\n 'avValRequired',\n 'avValDateRange',\n 'avValDate',\n 'avValPhone',\n 'avValEmail',\n 'avValNpi'\n ]\n });\n\n availity.core.constant('AV_VAL', {\n EVENTS: {\n REVALIDATE: 'av:val:revalidate',\n SUBMITTED: 'av:val:submitted',\n FAILED: 'av:val:failed',\n RESET: 'av:val:reset'\n },\n DEBOUNCE: 800,\n DATE_FORMAT: {\n SIMPLE: 'MM/DD/YYYY'\n },\n PATTERNS: {\n ALPHA_ONLY: /[^A-Za-z]+/g,\n NUMERIC_ONLY: /[^0-9]+/g\n }\n });\n\n availity.core.provider('avVal', function() {\n\n var validators = [];\n var rules = {};\n var services = {};\n\n this.addRules = function(_rules) {\n rules = angular.extend({}, rules, _rules);\n return rules;\n };\n\n this.addValidators = function(_validators) {\n validators = validators.concat(_validators);\n return validators;\n };\n\n this.$get = function($injector, $rootScope, $http, $log, avValConfig, AV_VAL) {\n\n var AvValidation = function() {\n this.initValidators();\n };\n\n var proto = AvValidation.prototype;\n\n proto.initValidators = function() {\n var self = this;\n\n validators = avValConfig.validators.concat(validators);\n\n angular.forEach(validators, function(name) {\n self.addValidator(name);\n });\n\n };\n\n proto.addValidator = function(name) {\n var validator = $injector.get(name);\n services[validator.name] = validator;\n };\n\n proto.addRules = function(_rules) {\n rules = angular.extend({}, rules, _rules);\n $rootScope.$broadcast(AV_VAL.EVENTS.REVALIDATE);\n };\n\n proto.validate = function(key, element, value, ruleName) {\n\n var ruleConfig = rules[key];\n if(!ruleConfig) {\n $log.warn('Could not resolve the form rules key [' + key + ']. This can happen when the rules key is inside a promise and the key value has not resolved on page load.');\n return;\n }\n\n var contraints = ruleConfig[ruleName];\n if(!contraints) {\n $log.info('Rule named [' + ruleName + '] could not be found in the current schema.');\n contraints = [];\n }\n\n var el = element[0];\n var results = [];\n var violations = [];\n var _valid = true;\n\n angular.forEach(contraints, function(rule, contraintName) {\n\n if(!rule) {\n // when extended rule sets, a user can pass nulls to cancel out a rule so if\n // one doesn't exist just continue\n return;\n }\n\n var validator = services[contraintName];\n\n if(angular.isUndefined(validator)) {\n $log.warn('No validator defined for `' + name + '`');\n return;\n }\n\n var valid = validator.validate(value, rule, element);\n\n var validationResult = {\n valid: valid,\n ruleName: ruleName,\n contraintName: contraintName,\n value: value,\n message: rule.message,\n field: el.name || el.id\n };\n\n var result = angular.extend({}, rule, validationResult);\n\n results.push(result);\n if(!valid) {\n violations.push(validationResult);\n }\n _valid = _valid && valid;\n\n });\n\n return {\n isValid: _valid,\n all: results, // all the constraint results\n violations: violations\n };\n\n };\n\n return new AvValidation();\n\n };\n\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValUtils', function() {\n\n return {\n\n isDefined: function(value) {\n return angular.isDefined(value) && value !== '' && value !== null;\n },\n\n isEmpty: function(value) {\n return !this.isDefined(value) || $.trim(value) === '';\n }\n };\n\n });\n})(window);\n\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValSize', function(avValUtils) {\n\n var validator = {\n\n name: 'size',\n\n validate: function(value, rule) {\n\n var min = rule.min || 0;\n var max = rule.max;\n var type = rule.type ? rule.type.toLowerCase() : 'text';\n\n if(_.isNull(value) || _.isUndefined(value)) {\n value = '';\n }\n\n if(type === 'text') {\n value = value + '';\n return avValUtils.isEmpty(value) || value.length >= min && (max === undefined || value.length <= max);\n }\n\n // ... must be a Number\n if(!_.isNumber(value) && /^\\d+$/.test(value)) {\n value = parseInt(value, 10);\n }\n\n return avValUtils.isEmpty(value) || value >= min && (max === undefined || value <= max);\n\n }\n };\n\n return validator;\n\n });\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValPattern', function(avValUtils) {\n\n var validator = {\n name: 'pattern',\n REGEX: /^\\/(.*)\\/([gim]*)$/, //regular expression to test a regular expression\n asRegExp: function(pattern) {\n var match;\n\n if(pattern.test) {\n return pattern;\n } else {\n match = pattern.match(validator.REGEX);\n if(match) {\n return new RegExp(match[1], match[2]);\n } else {\n throw ('Expected ' + pattern + ' to be a RegExp');\n }\n }\n },\n validate: function(value, rule) {\n var values = _.isArray(rule.value) ? rule.value : [rule.value];\n\n var valid = false;\n\n _.each(values, function(expresion) {\n var pattern = validator.asRegExp(expresion);\n if(avValUtils.isEmpty(value) || pattern.test(value)) {\n valid = true;\n }\n });\n\n return valid;\n }\n };\n\n return validator;\n\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValRequired', function(avValUtils) {\n\n var validator = {\n name: 'required',\n validate: function(value, rule, element) {\n\n // Using ngModelController.$isEmpty for required checks. A form component being empty is dependent on the\n // type of field:\n //\n // - radio\n // - checkbox\n // - text\n // - lists\n //\n // You can override $isEmpty for input directives whose concept of being empty is different to the\n // default. Radio and checkboxes directive do this because in its case a value of `false`\n // implies empty.\n //\n var ctrl = element && element.data('$ngModelController');\n if(ctrl) {\n return !ctrl.$isEmpty(value);\n }\n\n return !avValUtils.isEmpty(value);\n\n }\n };\n\n return validator;\n\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValDateRange', function(AV_VAL, avValUtils) {\n\n var validator = {\n\n name: 'dateRange',\n\n getStartDate: function(start) {\n return validator.setMin(moment().add(start.value, start.units));\n },\n\n getEndDate: function(end) {\n return validator.setMax(moment().add(end.value, end.units) );\n },\n\n setMin: function(value) {\n\n // [fix]: if time is provided this may cause issues.\n value.set('hours', 0);\n value.set('minutes', 0);\n value.set('seconds', 0);\n\n return value;\n },\n\n setMax: function(value) {\n\n // [fix]: if time is provided this may cause issues.\n value.set('hours', 23);\n value.set('minutes', 59);\n value.set('seconds', 59);\n\n return value;\n },\n\n validation: function(value, rules) {\n\n var date;\n var startDate;\n var endDate;\n\n date = moment(value, rules.format || AV_VAL.DATE_FORMAT.SIMPLE);\n date.set('hours', 0);\n date.set('minutes', 0);\n date.set('seconds', 0);\n\n if(!avValUtils.isEmpty(rules.start.units) && !avValUtils.isEmpty(rules.end.units)) {\n startDate = validator.getStartDate(rules.start);\n endDate = validator.getEndDate(rules.end);\n } else {\n startDate = moment(rules.start.value, rules.format);\n endDate = validator.setMax(moment(rules.end.value, rules.format));\n }\n return date.isValid() && date.isBetween(startDate, endDate, 'day') || date.isSame(startDate, 'day') || date.isSame(endDate, 'day');\n },\n\n validate: function(value, rule) {\n return avValUtils.isEmpty(value) || validator.validation(value, rule);\n }\n\n };\n\n return validator;\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValDate', function(AV_VAL, avValUtils) {\n\n var validator = {\n name: 'dateFormat',\n validate: function(value, rules) {\n var format = rules && rules.format ? rules.format : AV_VAL.DATE_FORMAT.SIMPLE;\n return avValUtils.isEmpty(value) || moment(value, format, true).isValid();\n }\n };\n\n return validator;\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValNpi', function(avValUtils) {\n\n\n var validator = {\n\n name: 'npi',\n\n INTEGER_REGEX: /^\\d*$/,\n\n validate: function(value) {\n\n var npi = value || '';\n\n if(avValUtils.isEmpty(npi)) {\n return true;\n }\n\n if (!validator.INTEGER_REGEX.test(npi) || npi.length !== 10) {\n return false;\n }\n\n var firstDigit = npi.charAt(0);\n if(!('1' === firstDigit || '2' === firstDigit || '3' === firstDigit || '4' === firstDigit)) {\n return false;\n }\n\n var digit = parseInt(npi.charAt(9), 10);\n npi = npi.substring(0, 9);\n npi = \"80840\" + npi;\n\n var alternate = true;\n var total = 0;\n\n for (var i = npi.length; i > 0; i--) {\n var next = parseInt(npi.charAt(i-1), 10);\n if (alternate) {\n next = next*2;\n if (next > 9) {\n next = (next % 10) + 1;\n }\n }\n total += next;\n alternate = !alternate;\n }\n\n var roundUp = Math.ceil(total / 10) * 10;\n var calculatedCheck = roundUp - total;\n\n if (calculatedCheck !== digit) {\n return false;\n }\n\n return true;\n }\n\n };\n\n return validator;\n\n });\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValPhone', function(avValPattern) {\n\n var PHONE_PATTERN = /^([0-9][\\.\\-]?)?[(]{0,1}[0-9]{3}[)\\.\\- ]{0,1}[0-9]{3}[\\.\\- ]{0,1}[0-9]{4}$/;\n\n var validator = {\n name: 'phone',\n validate: function(value, rule) {\n return avValPattern.validate(value, angular.extend({}, rule, { value: PHONE_PATTERN }));\n }\n };\n\n return validator;\n\n });\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValEmail', function(avValPattern) {\n\n var EMAIL_PATTERN = /[a-zA-Z0-9!#$%&'*+\\/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+\\/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/;\n\n var validator = {\n name: 'email',\n validate: function(value, rule) {\n return avValPattern.validate(value, angular.extend({}, rule, { value: EMAIL_PATTERN }));\n }\n };\n\n return validator;\n\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_GLOBALS', {\n REGIONS: [\n {\n 'name': 'Alabama',\n 'code': 'AL'\n },\n {\n 'name': 'Alaska',\n 'code': 'AK'\n },\n {\n 'name': 'Arizona',\n 'code': 'AZ'\n },\n {\n 'name': 'Arkansas',\n 'code': 'AR'\n },\n {\n 'name': 'California',\n 'code': 'CA'\n },\n {\n 'name': 'Colorado',\n 'code': 'CO'\n },\n {\n 'name': 'Connecticut',\n 'code': 'CT'\n },\n {\n 'name': 'Delaware',\n 'code': 'DE'\n },\n {\n 'name': 'District Of Columbia',\n 'code': 'DC'\n },\n {\n 'name': 'Florida',\n 'code': 'FL'\n },\n {\n 'name': 'Georgia',\n 'code': 'GA'\n },\n {\n 'name': 'Hawaii',\n 'code': 'HI'\n },\n {\n 'name': 'Idaho',\n 'code': 'ID'\n },\n {\n 'name': 'Illinois',\n 'code': 'IL'\n },\n {\n 'name': 'Indiana',\n 'code': 'IN'\n },\n {\n 'name': 'Iowa',\n 'code': 'IA'\n },\n {\n 'name': 'Kansas',\n 'code': 'KS'\n },\n {\n 'name': 'Kentucky',\n 'code': 'KY'\n },\n {\n 'name': 'Louisiana',\n 'code': 'LA'\n },\n {\n 'name': 'Maine',\n 'code': 'ME'\n },\n {\n 'name': 'Maryland',\n 'code': 'MD'\n },\n {\n 'name': 'Massachusetts',\n 'code': 'MA'\n },\n {\n 'name': 'Michigan',\n 'code': 'MI'\n },\n {\n 'name': 'Minnesota',\n 'code': 'MN'\n },\n {\n 'name': 'Mississippi',\n 'code': 'MS'\n },\n {\n 'name': 'Missouri',\n 'code': 'MO'\n },\n {\n 'name': 'Montana',\n 'code': 'MT'\n },\n {\n 'name': 'Nebraska',\n 'code': 'NE'\n },\n {\n 'name': 'Nevada',\n 'code': 'NV'\n },\n {\n 'name': 'New Hampshire',\n 'code': 'NH'\n },\n {\n 'name': 'New Jersey',\n 'code': 'NJ'\n },\n {\n 'name': 'New Mexico',\n 'code': 'NM'\n },\n {\n 'name': 'New York',\n 'code': 'NY'\n },\n {\n 'name': 'North Carolina',\n 'code': 'NC'\n },\n {\n 'name': 'North Dakota',\n 'code': 'ND'\n },\n {\n 'name': 'Ohio',\n 'code': 'OH'\n },\n {\n 'name': 'Oklahoma',\n 'code': 'OK'\n },\n {\n 'name': 'Oregon',\n 'code': 'OR'\n },\n {\n 'name': 'Pennsylvania',\n 'code': 'PA'\n },\n {\n 'name': 'Rhode Island',\n 'code': 'RI'\n },\n {\n 'name': 'South Carolina',\n 'code': 'SC'\n },\n {\n 'name': 'South Dakota',\n 'code': 'SD'\n },\n {\n 'name': 'Tennessee',\n 'code': 'TN'\n },\n {\n 'name': 'Texas',\n 'code': 'TX'\n },\n {\n 'name': 'Utah',\n 'code': 'UT'\n },\n {\n 'name': 'Vermont',\n 'code': 'VT'\n },\n {\n 'name': 'Virginia',\n 'code': 'VA'\n },\n {\n 'name': 'Washington',\n 'code': 'WA'\n },\n {\n 'name': 'West Virginia',\n 'code': 'WV'\n },\n {\n 'name': 'Wisconsin',\n 'code': 'WI'\n },\n {\n 'name': 'Wyoming',\n 'code': 'WY'\n }\n ]\n });\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.provider('avAnalyticsConfig', function(AV_ANALYTICS) {\n\n var config = {\n VIRTUAL_PAGE_TRACKING: true,\n SERVICES: {\n PIWIK: 'avPiwikAnalytics',\n SPLUNK: 'avSplunkAnalytics'\n },\n EVENTS: {\n PAGE: '$locationChangeSuccess',\n DEFAULT: 'click'\n },\n PRE_FIX: /^avAnalytics(.*)$/,\n // should ignore these since they are part of the directives API\n IGNORE: ['avAnalyticsOn', 'avAnalyticsIf'],\n ENV: { // not sure if this should live here\n PROD: {\n DOMAIN: 'apps.availity.com',\n URL: 'https://piwik.availity.com/piwik/'\n },\n QA: {\n URL: 'https://qa-piwik.availity.com/piwik/'\n }\n }\n };\n\n this.set = function(options) {\n _.merge(config, options);\n // TODO: remove when AV_ANALYTICS is no longer supported\n // ensures avAnalyticsConfig and AV_ANALYTICS constant stay in sync\n _.merge(AV_ANALYTICS, config);\n };\n\n this.$get = function(AV_ANALYTICS) {\n /*\n * TODO: remove merge when AV_ANALYTICS is no longer supported.\n * Applies AV_ANALYTICS overrides to avAnalyticsConfig provider.\n */\n return angular.copy(_.merge(config, AV_ANALYTICS));\n };\n\n this.set(AV_ANALYTICS);\n });\n\n // DEPRECATED: use avAnalyticsConfig\n availity.core.constant('AV_ANALYTICS', {});\n\n availity.core.provider('avAnalytics', function(avAnalyticsConfigProvider) {\n\n var avAnalyticsConfig = avAnalyticsConfigProvider.$get();\n var plugins = [];\n var virtualPageTracking = avAnalyticsConfig.VIRTUAL_PAGE_TRACKING;\n var appId;\n\n this.registerPlugins = function(_plugins) {\n\n if(angular.isString(_plugins)) {\n _plugins = [_plugins];\n }\n\n if(_.isArray(_plugins)) {\n plugins = _plugins;\n } else {\n throw new Error('AvAnalytics.registerPlugins() expects a string or an array.');\n }\n\n return plugins;\n };\n\n this.setVirtualPageTracking = function(value) {\n if(arguments.length) {\n virtualPageTracking = !!value;\n }\n };\n\n this.isVirtualPageTracking = function() {\n return virtualPageTracking;\n };\n\n this.setAppID = function(id) {\n appId = id;\n return appId;\n };\n\n this.$get = function($injector, $q, $log, $rootScope, $location) {\n\n var AvAnalytics = function() {\n\n var self = this;\n this.services = {};\n\n if(!plugins || plugins.length === 0) {\n plugins = [avAnalyticsConfig.SERVICES.PIWIK, avAnalyticsConfig.SERVICES.SPLUNK];\n }\n\n angular.forEach(plugins, function(plugin) {\n\n try {\n self.services[plugin] = $injector.get(plugin);\n } catch(err) {\n $log.error('Could not load `{0}` plugin', [plugin]);\n }\n });\n\n };\n\n var proto = AvAnalytics.prototype;\n\n proto.init = function() {\n\n var self = this;\n\n if(this.isVirtualPageTracking()) {\n $rootScope.$on(avAnalyticsConfig.EVENTS.PAGE, function() {\n self.trackPageView($location.absUrl());\n });\n }\n\n angular.forEach(this.services, function(handler) {\n if(handler.isEnabled() && handler.init) {\n handler.init();\n }\n });\n\n };\n\n proto.trackEvent = function(properties) {\n var promises = [];\n\n angular.forEach(this.services, function(handler) {\n var promise = handler.trackEvent(properties);\n promises.push(promise);\n });\n\n return $q.all(promises);\n };\n\n proto.getAppId = function() {\n return appId;\n };\n\n proto.isVirtualPageTracking = function() {\n return virtualPageTracking;\n };\n\n proto.trackPageView = function(url) {\n\n var promises = [];\n\n angular.forEach(this.services, function(handler) {\n var promise = handler.trackPageView(url);\n promises.push(promise);\n });\n\n return $q.all(promises);\n };\n\n return new AvAnalytics();\n };\n\n });\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avAnalyticsUtils', function(avAnalyticsConfig, $log) {\n\n var AnalyticsUtils = function() {};\n\n var proto = AnalyticsUtils.prototype;\n\n proto.getProperties = function(attributes) {\n\n var self = this;\n var props = {};\n\n _.forEach(attributes, function(value, key) {\n if(self.isValidAttribute(key) && self.isNotIgnored(key)) {\n var result = self.getAttribute(key, value);\n props[result.key] = result.value;\n }\n });\n\n return props;\n };\n\n // Function detects external links in order to allow the analytics framework to run\n // before the browser follows a link.\n //\n // - target=\"_self\" - This opens an anchor in the same frame\n // - target=\"_parent\" - Opens the in the next level up of a frame if they were nested to inside one another\n // - target=\"_top\" - Opens the link as top document in the browser window\n // - target=\"_blank\" - Opens link in new tab new tab\n //\n proto.isExternalLink = function(attrs) {\n return attrs.href && !attrs.ngClick;\n };\n\n proto.isNotIgnored = function(key) {\n var ignored = _.includes(avAnalyticsConfig.IGNORE, key);\n return !ignored;\n };\n\n proto.isValidAttribute = function(key) {\n return avAnalyticsConfig.PRE_FIX.test(key);\n };\n\n proto.lowercase = function(str) {\n return str.substr(0, 1).toLowerCase() + str.substr(1);\n };\n\n proto.getAttribute = function(key, value) {\n var simpleKey = key.match(avAnalyticsConfig.PRE_FIX);\n\n if(simpleKey && simpleKey[1]) {\n return {\n key: this.lowercase(simpleKey[1]),\n value: value\n };\n }\n };\n\n proto.toNum = function(value) {\n var parsed = parseInt(value, 10);\n value = isNaN(parsed) ? 0 : parsed;\n return value;\n };\n\n proto.isValid = function(trackingValues) {\n var valid = true;\n\n if(trackingValues.value || trackingValues.value === 0) {\n delete trackingValues.value;\n }\n\n _.forEach(trackingValues, function(key, value) {\n if(availity.isBlank(value) || _.isUndefined(value)) {\n $log.warn('The analytic tracking value for ' + key.toUpperCase() +' is not defined.');\n valid = false;\n }\n });\n\n return valid;\n };\n\n return new AnalyticsUtils();\n });\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avSplunkAnalytics', function($log, avLogMessagesResource, $location) {\n\n var SplunkAnalyticsService = function() {};\n\n var proto = SplunkAnalyticsService.prototype;\n\n proto.trackEvent = function(properties) {\n properties.url = $location.$$absUrl || 'N/A';\n properties.level = properties.level || 'info';\n\n return avLogMessagesResource[properties.level](properties);\n };\n\n proto.trackPageView = function(url) {\n\n var properties = {\n event: 'page',\n level: 'info',\n url: url || $location.$$absUrl()\n };\n\n return avLogMessagesResource[properties.level](properties);\n };\n\n proto.isEnabled = function() {\n return true;\n };\n\n return new SplunkAnalyticsService();\n });\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.provider('avPiwikAnalytics', function() {\n\n var self;\n var siteId;\n var enabled = false;\n var customVariables = [];\n\n this.enabled = function(_enabled) {\n enabled = !!_enabled;\n };\n\n // can not push these items to `_paq` because it is defined\n // after page has loaded\n this._setCustomVariable = function(index, valueName, value, scope) {\n\n if(!index || isNaN(index)) {\n throw new Error('index must be a number');\n } else if(!valueName) {\n throw new Error('valueName must be declared');\n } else {\n customVariables.push(['setCustomVariable', index, valueName, value, scope]);\n }\n };\n\n this.setSiteID = function(_siteID) {\n this.enabled(true);\n siteId = _siteID;\n };\n\n // allow the user to pass a array of visit variables\n this.setVisitVariables = function(items) {\n _.forEach(items, function(item) {\n self._setCustomVariable(item[0], item[1], item[2], 'visit');\n });\n };\n\n this.setPageVariables = function(index, name, value) {\n this._setCustomVariable(index, name, value, 'page');\n };\n\n this.$get = function(avAnalyticsUtils, avUsersResource, avAnalyticsConfig, $injector, $log, $q, $document, $location) {\n\n var AvPiwikAnalytics = function() {\n window._paq = window._paq || [];\n };\n\n var proto = AvPiwikAnalytics.prototype;\n\n proto.trackEvent = function(properties) {\n\n if(!window._paq) {\n $log.warn('Piwik object `_paq` not found in global scope');\n return $q.when(false);\n }\n\n // http://piwik.org/docs/event-tracking/\n //\n // PAQ requires that eventValue be an integer.\n // Check to make sure value is a number if not convert it to 0.\n //\n if(properties.value) {\n properties.value = avAnalyticsUtils.toNum(properties.event);\n }\n\n // check to make sure that data being sent to piwik is a string and not null, empty or undefined\n if(!avAnalyticsUtils.isValid(properties)) {\n $log.warn('Invalid properties being passed. Tracking info will not be sent.');\n return $q.when(false);\n }\n\n return $q.when(window._paq.push(['trackEvent', properties.category, properties.action || properties.event, properties.label, properties.value]));\n };\n\n proto.trackPageView = function(url) {\n\n if(!window._paq) {\n $log.warn('Piwik object `_paq` not found in global scope');\n return $q.when(false);\n }\n\n return $q.when([\n window._paq.push(['setCustomUrl', url]),\n window._paq.push(['trackPageView', url])]\n );\n\n };\n\n proto.init = function() {\n\n avUsersResource.me().then(function(user) {\n window._paq.push(['setUserId', user.id]);\n // self.trackPageView(); //send another page track when the user data loads\n });\n\n if(!_.isFinite(siteId)) {\n $log.warn('Invalid Piwik Site Id. Piwik analytics has been disabled.');\n return;\n }\n\n var url;\n\n\n // Not sure if this is the correct way to call in avAnalyticsConfig\n // only object in provider: var config = { DOMAIN: 'app.availity.com' }\n // I believe I have to get the DOMAIN value, because avAnalyticsConfig should return an object.\n if($location.$$host === avAnalyticsConfig.ENV.PROD.DOMAIN) {\n url = avAnalyticsConfig.ENV.PROD.URL;\n } else {\n url = avAnalyticsConfig.ENV.QA.URL;\n }\n\n window._paq.push(['enableLinkTracking']);\n window._paq.push(['setTrackerUrl', url + 'piwik.php']);\n window._paq.push(['setSiteId', siteId]);\n\n _.forEach(customVariables, function(variable) {\n window._paq.push(variable);\n });\n\n $.getScript(url + 'piwik.js', function() {\n\n });\n\n };\n\n\n proto.isEnabled = function() {\n return enabled && siteId;\n };\n\n return new AvPiwikAnalytics();\n };\n\n });\n\n})(window);\n","/* global TraceKit */\n\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_EXCEPTIONS', {\n MESSAGES: {\n NOT_APPLICABLE: 'N/A'\n },\n TYPES: {\n EXCEPTION: 'exception'\n },\n REPEAT_LIMIT_TIME: 5000\n });\n\n availity.core.provider('avExceptionAnalytics', function() {\n\n var _enabled = true;\n var appId;\n\n this.enabled = function(enabled) {\n _enabled = !!enabled;\n };\n\n this.setAppId = function(_id) {\n appId = _id;\n };\n\n this.$get = function(avLogMessagesResource, $location, AV_EXCEPTIONS) {\n\n var AvExceptionAnalytics = function() {\n\n };\n\n var proto = AvExceptionAnalytics.prototype;\n\n proto.init = function() {\n\n var self = this;\n\n if(!_enabled) {\n return;\n }\n\n TraceKit.remoteFetching = false;\n TraceKit.surroundingLinesToCollect = 11;\n\n // subscribe() hooks into window.error\n TraceKit.report.subscribe(function(stacktrace) {\n self.onError(stacktrace);\n });\n\n this.messageTimestampMap = {};\n };\n\n proto.prettyPrint = function(stacktrace) {\n\n var message = '';\n\n var length = stacktrace.stack.length;\n\n for(var i = 0; i < length; i++) {\n message += [\n '[' + _.padLeft(i + '', 2, '0') + '] ',\n stacktrace.stack[i].func,\n ' ',\n stacktrace.stack[i].url,\n ':',\n stacktrace.stack[i].line,\n ':',\n stacktrace.stack[i].column,\n i + 1 < length ? '\\n' : ''\n ].join('');\n\n }\n\n return message;\n };\n\n proto.onError = function(stacktrace) {\n\n var userAgent = root.navigator && root.navigator.userAgent ? root.navigator.userAgent : AV_EXCEPTIONS.MESSAGES.NOT_APPLICABLE;\n\n var message = {\n errorDate: moment(new Date()).format('YYYY-MM-DDTHH:mm:ssZZ'),\n errorName: stacktrace.name,\n errorMessage: stacktrace.message,\n errorStack: this.prettyPrint(stacktrace),\n url: $location.$$absUrl,\n appId: appId || AV_EXCEPTIONS.MESSAGES.NOT_APPLICABLE,\n // appVersion: AV_EXCEPTIONS.MESSAGES.NOT_APPLICABLE,\n userAgent: userAgent,\n userLanguage: navigator.userLanguage,\n referrer: document.referrer,\n host: document.domain,\n screenWidth: $(window).width(),\n screenHeight: $(window).height(),\n sdkVersion: availity.VERSION\n };\n\n return this.log(message);\n\n };\n\n proto.log = function(message) {\n return avLogMessagesResource['error'](message);\n };\n\n proto.trackEvent = function(exception) {\n\n if(!_enabled) {\n return;\n }\n\n // If we've already logged this error recently, don't log it again (no need to spam the API)\n if (this._isRepeatError(exception)) {\n return;\n }\n\n var stacktrace = TraceKit.computeStackTrace(exception);\n\n return this.onError(stacktrace);\n\n };\n\n // Check to see if this error was reported within the last 5 seconds\n proto._isRepeatError = function(exception) {\n var timestamp = moment();\n var message = exception.message;\n var lastTimestamp = this.messageTimestampMap[message];\n var isRepeat = false;\n\n if (lastTimestamp && timestamp.diff(lastTimestamp) < AV_EXCEPTIONS.REPEAT_LIMIT_TIME) {\n isRepeat = true;\n }\n\n this.messageTimestampMap[message] = timestamp;\n return isRepeat;\n };\n\n return new AvExceptionAnalytics();\n\n };\n });\n\n availity.core.config(function($provide) {\n\n $provide.decorator('$exceptionHandler', function($delegate, $injector) {\n return function(exception, cause) {\n $delegate(exception, cause);\n var errorTacking = $injector.get('avExceptionAnalytics');\n errorTacking.trackEvent(exception);\n };\n });\n\n });\n\n availity.core.run(function(avExceptionAnalytics) {\n avExceptionAnalytics.init();\n });\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity || {};\n\n availity.analytics = angular.module('availity.config', ['ng', 'availity']);\n\n availity.analytics.run(function(avAnalytics) {\n\n avAnalytics.init();\n\n });\n\n})(window);\n\n","// Issue: https://github.com/angular/angular.js/issues/11165\n// Polyfill: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString\n//\n// This polyfill is needed because Angular calls toISOString()\n// when an request parameter is of type Date. If this polyfill isn't present\n// the ajax call fails.\n//\n(function() {\n\n 'use strict';\n\n var pad = function(number) {\n if(number < 10) {\n return '0' + number;\n }\n return number;\n };\n\n if(!Date.prototype.toISOString) {\n\n Date.prototype.toISOString = function() {\n\n return this.getUTCFullYear() +\n '-' + pad(this.getUTCMonth() + 1) +\n '-' + pad(this.getUTCDate()) +\n 'T' + pad(this.getUTCHours()) +\n ':' + pad(this.getUTCMinutes()) +\n ':' + pad(this.getUTCSeconds()) +\n '.' + (this.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) +\n 'Z';\n };\n }\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_MESSAGES', {\n\n EVENTS: {\n\n MESSAGE: 'message', // post message window event\n RESIZE: 'resize', // window resize event\n UNLOAD: 'beforeunload',\n\n AV_RESIZE: 'av:window:resize',\n AV_RECEIVED: 'av:message:received',\n AV_MAXIMIZE: 'nav:left:hide', // @deprecated,\n AV_MINIMIZE: 'nav:left:hide', // @deprecated\n // MAXIMIZE: 'av:window:maximize',\n // MINIMIZE: 'av:window:minimize',\n AV_LOGIN: 'av:login',\n AV_LOGOUT: 'av:logout',\n AV_SESSION_TIMEOUT: 'av:session:timeout'\n\n },\n\n RESIZE_DEBOUNCE: 400,\n\n DOMAIN: /https?:\\/\\/([\\w\\d\\-]+\\.)?availity\\.(com|net)/,\n LOCAL: /http:\\/\\/(localhost|127\\.0\\.0\\.1|0\\.0\\.0\\.0):(\\d+)/\n\n });\n\n})(window);\n","/* global JSON:false */\n\n// https://github.com/kylewelsby/angular-post-message/blob/master/src/angular-post-message.js\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.provider('avMessages', function() {\n\n var enabled = true;\n\n this.enable = function(value) {\n\n if(arguments.length) {\n enabled = !!value;\n }\n\n return enabled;\n\n };\n\n this.$get = function($rootScope, $log, AV_MESSAGES) {\n\n var AvMessages = function() {\n\n };\n\n var proto = AvMessages.prototype;\n\n proto.init = function() {\n\n var self = this;\n var $window = $(window);\n\n $window.on(AV_MESSAGES.EVENTS.MESSAGE, function(event) {\n self.onMessage(event);\n });\n\n $window.on(AV_MESSAGES.EVENTS.RESIZE, function() {\n self.onResize();\n });\n\n this.send(AV_MESSAGES.EVENTS.AV_MAXIMIZE);\n\n $rootScope.$on('$destroy', function() {\n self.destroy();\n });\n\n $window.on(AV_MESSAGES.EVENTS.UNLOAD, function() {\n self.send(AV_MESSAGES.EVENTS.AV_MINIMIZE);\n });\n\n };\n\n proto.destroy = function() {\n\n $(window).off(AV_MESSAGES.EVENTS.MESSAGE);\n $(window).off(AV_MESSAGES.EVENTS.RESIZE);\n $(window).off(AV_MESSAGES.EVENTS.UNLOAD);\n\n };\n\n proto.onResize = function() {\n\n var self = this;\n\n var resize = _.debounce(function() {\n\n var height = $('html').height();\n self.send({\n event: AV_MESSAGES.EVENTS.AV_RESIZE,\n height: height\n });\n\n }, AV_MESSAGES.RESIZE_DEBOUNCE);\n\n resize();\n\n };\n\n proto.isDomain = function(url) {\n\n if(AV_MESSAGES.DOMAIN.test(this.domain())) {\n return AV_MESSAGES.DOMAIN.test(url);\n }\n\n return AV_MESSAGES.LOCAL.test(url);\n };\n\n proto.isEnabled = function() {\n return enabled;\n };\n\n proto.onMessage = function(_event) {\n\n var event = _event;\n\n event = event.originalEvent || event; // jQuery wraps in `originalEvent`\n\n if(!event && !event.data) {\n // no op\n return;\n }\n\n // don't process messages emitted from same window\n if(event.source === window) {\n return;\n }\n\n if(!this.isDomain(event.origin)) {\n $log.warn('avMessages rejected a cross domain message since it does not match an *.availity.com or localhost');\n return;\n }\n\n\n var data = event.data;\n\n try {\n data = angular.fromJson(data);\n } catch(err) {\n $log.warn('avMessages.onMessage() failed to convert event to json payload');\n }\n\n if(_.isString(data)) {\n event = data;\n data = null;\n }else {\n event = data.event ? data.event : AV_MESSAGES.AV_RECEIVED;\n }\n\n $rootScope.$root.$broadcast(event, data);\n\n };\n\n proto.isIframe = function() {\n return window.self !== window.parent;\n };\n\n proto.domain = function() {\n\n var window = root;\n\n if(window.location.origin) {\n return window.location.origin;\n }\n\n if(window.location.hostname) {\n return window.location.protocol + '//' + window.location.hostname + (window.location.port ? ':' + window.location.port : '');\n }\n\n return '*';\n\n };\n\n proto.send = function(payload) {\n\n try {\n\n var message = _.isString(payload) ? payload : JSON.stringify(payload);\n this.postMessage(message, this.domain());\n\n } catch(err) {\n $log.error('avMessages.send() ', err);\n }\n };\n\n proto.postMessage = function(message, domain) {\n window.parent.postMessage(message, domain);\n };\n\n return new AvMessages();\n\n };\n\n });\n\n availity.core.run(function(avMessages) {\n\n if(avMessages.isEnabled()) {\n avMessages.init();\n }\n\n });\n\n})(window);\n\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/dist/maps/availity-angular.min.js.map b/dist/maps/availity-angular.min.js.map index 810af076..bae610ea 100644 --- a/dist/maps/availity-angular.min.js.map +++ b/dist/maps/availity-angular.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["/source/index.js","/source/strings.js","/source/uuid.js","/source/urls.js","/source/print.js","/source/throttle.js","/source/logger.js","/source/logger-config.js","/source/polling.js","/source/api-factory.js","/source/api-users.js","/source/api-coverages.js","/source/api-configurations.js","/source/api-log-messages.js","/source/api-spaces.js","/source/api-documents.js","/source/api-organizations.js","/source/api-codes.js","/source/api-user-permissions.js","/source/user-authorizations.js","/source/session.js","/source/idle.js","/source/idle-interceptor.js","/source/validator.js","/source/validator-utils.js","/source/validator-size.js","/source/validator-pattern.js","/source/validator-required.js","/source/validator-date-range.js","/source/validator-date-format.js","/source/validator-npi.js","/source/validator-phone.js","/source/validator-email.js","/source/globals.js","/source/analytics.js","/source/analytics-util.js","/source/analytics-splunk.js","/source/analytics-piwik.js","/source/analytics-exceptions.js","/source/analytics-config.js","/source/date-polyfill.js","/source/messages-constants.js","/source/messages.js"],"names":["root","availity","VERSION","MODULE","core","angular","module","originalModule","modules","name","deps","_","indexOf","window","__karma__","Error","push","exports","_stringify","object","isBlank","str","test","uid","uuid","prefix","index","length","digit","charCodeAt","join","String","fromCharCode","unshift","REGEX_API_URL","getRelativeUrl","url","result","match","print","document","queryCommandSupported","execCommand","focus","constant","OPTIONS","wait","update","trailing","leading","factory","AV_THROTTLE","$timeout","fn","options","merge","THRESHOLD","isDefined","UPDATE","timer","context","this","args","arguments","apply","later","provider","_enabled","enabled","$get","$injector","AvLogger","$delegate","$log","proto","prototype","supplant","supplantData","_supplant","key","replace","isObject","element","elemStr","isUndefined","constructor","toString","getFormattedTimestamp","date","getHours","getMinutes","getSeconds","getMilliseconds","_log","originalFn","hash","location","now","Date","message","stack","errorMessage","formatError","get","params","log","info","warn","debug","arg","sourceURL","line","error","config","$provide","decorator","INTERVAL","MAX_ELAPSED_TIME","MAX_RETRY","DECAY","EVENTS","REGEX_URL","PollingServiceFactory","$rootScope","$q","AV_POLLING","AV_API","AvPollingService","pendingRequests","response","isAsyncResponse","onAsyncReponse","when","setDefaults","defaultOptions","pollingInterval","pollingDecay","pollingMaxInterval","pollingRetryCount","pollingStartTime","getTime","extend","responseError","reject","api","status","isFunction","headers","HEADERS","SERVER","LOCATION","deferred","defer","queueRequest","notify","promise","getUrl","self","_url","_config","method","pollingMaxRetry","_pollingDecay","cache","request","id","timeout","getPollingTimeout","retryRequest","pushRequest","popRequest","i","splice","isPollingMaxTimeout","elaspedTime","isElapsed","isMaxRetried","isPollable","_isTimeout","_isMax","cancel","increment","successCallback","resolve","errorCallback","$http","then","incrementCounter","incrementDecay","clearRequests","forEach","ID","STATUS","GLOBAL_ID","CLIENT","SESSION_ID","AUTH","OVERRIDE","CALLBACK_URL","CUSTOMER_ID","RESPONSE_ENCODING","path","resourceGroup","version","level","suffix","X-Response-Encoding-Context","ApiResourcesProvider","setOptions","getOptions","copy","setHttpCommonHeaders","$httpProvider","defaults","common","avPollingService","AvApiResource","isString","charAt","_cacheBust","cacheBust","_getUrl","_getApiUrl","_createResponse","data","_request","afterCallback","success","_response","_promise","successResponse","call","errorResponse","notifyResponse","always","normalize","joined","slice","create","beforeCreate","afterCreate","afterGet","query","afterQuery","isNumber","beforeUpdate","afterUpdate","remove","afterRemove","UserServiceFactory","AvUsersResource","user","me","LogMessagesFactory","AvLogMessagesResource","buildRequest","entries","requestPayload","SpacesFactory","AvDocumentsResourceFactory","AvDocumentsResource","getContents","getContentsUrl","OrganizationResourceFactory","OrganizationResource","getOrganizations","organizations","AvCodesResourceFactory","AvCodesResource","getCodes","page","offset","list","q","results","codes","has","each","code","moreVal","totalCount","limit","more","AvUserPermissionsResourceFactory","AvUserPermissionsResource","sessionDate","moment","toISOString","axiUserPermissions","getPermissions","permissionIds","region","permissionId","AvUserAuthorizationsFactory","avUserPermissionsResource","AvUserAuthorizations","setRegion","setPermissionIds","isArray","isAuthorized","getPermission","permission","isAnyAuthorized","permissions","findWhere","undefined","_permissions","union","toPermissionMap","getPayers","organizationId","organization","resources","map","toPermission","description","geographies","SESSION_TIMEOUT","NOT_AUTHORIZED","avUsersResource","AvSession","getUser","destroy","permisions","IDLE_INACTIVE","IDLE_ACTIVE","SESSION_TIMEOUT_ACTIVE","SESSION_TIMEOUT_REDIRECT","HUMAN","MACHINE","INTERVALS","PING","IDLE","SESSION","URLS","HOME","AV_IDLE","pingUrl","redirectUrl","sessionTimeout","idleTimeout","pingTimeout","enable","value","setSessionTimeout","setIdleTimeout","setPingTimeout","setPingUrl","$document","avThrottle","AvIdle","_idleTimer","_sessionTimer","_pingTimer","_keepAlive","idleActive","sessionActive","listeners","init","stop","start","listener","setRedirectUrl","$on","find","on","event","onEvent","oldUrl","newUrl","href","startIdleTimer","startSessionTimer","off","stopPing","stopSessionTimer","stopIdleTimer","isEnabled","isApiRequest","$broadcast","startPing","keepAlive","avIdle","interceptors","classes","valid","invalid","dirty","pristine","touched","untouched","submitted","validators","REVALIDATE","SUBMITTED","FAILED","RESET","DEBOUNCE","DATE_FORMAT","SIMPLE","PATTERNS","ALPHA_ONLY","NUMERIC_ONLY","rules","services","addRules","_rules","addValidators","_validators","concat","avValConfig","AV_VAL","AvValidation","initValidators","addValidator","validator","validate","ruleName","ruleConfig","contraints","el","violations","_valid","rule","contraintName","validationResult","field","isValid","all","isEmpty","$","trim","avValUtils","min","max","type","toLowerCase","isNull","parseInt","REGEX","asRegExp","pattern","RegExp","values","expresion","ctrl","$isEmpty","getStartDate","setMin","add","units","getEndDate","end","setMax","set","validation","startDate","endDate","format","isBetween","isSame","INTEGER_REGEX","npi","firstDigit","substring","alternate","total","next","roundUp","Math","ceil","calculatedCheck","avValPattern","PHONE_PATTERN","EMAIL_PATTERN","REGIONS","AV_ANALYTICS","VIRTUAL_PAGE_TRACKING","SERVICES","PIWIK","SPLUNK","PAGE","DEFAULT","PRE_FIX","IGNORE","ENV","PROD","DOMAIN","URL","QA","avAnalyticsConfigProvider","avAnalyticsConfig","plugins","virtualPageTracking","appId","registerPlugins","_plugins","setVirtualPageTracking","isVirtualPageTracking","setAppID","$location","AvAnalytics","plugin","err","trackPageView","absUrl","handler","trackEvent","properties","promises","getAppId","AnalyticsUtils","getProperties","attributes","props","isValidAttribute","isNotIgnored","getAttribute","isExternalLink","attrs","ngClick","ignored","includes","lowercase","substr","simpleKey","toNum","parsed","isNaN","trackingValues","toUpperCase","avLogMessagesResource","SplunkAnalyticsService","$$absUrl","siteId","customVariables","_setCustomVariable","valueName","scope","setSiteID","_siteID","setVisitVariables","items","item","setPageVariables","avAnalyticsUtils","AvPiwikAnalytics","_paq","category","action","label","isFinite","$$host","variable","getScript","MESSAGES","NOT_APPLICABLE","TYPES","EXCEPTION","setAppId","_id","AV_EXCEPTIONS","AvExceptionAnalytics","TraceKit","remoteFetching","surroundingLinesToCollect","report","subscribe","stacktrace","onError","prettyPrint","padLeft","func","column","userAgent","navigator","errorDate","errorName","errorStack","userLanguage","referrer","host","domain","screenWidth","width","screenHeight","height","sdkVersion","exception","computeStackTrace","cause","errorTacking","run","avExceptionAnalytics","analytics","avAnalytics","pad","number","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","toFixed","MESSAGE","RESIZE","UNLOAD","AV_RESIZE","AV_RECEIVED","AV_MAXIMIZE","AV_MINIMIZE","AV_LOGIN","AV_LOGOUT","AV_SESSION_TIMEOUT","RESIZE_DEBOUNCE","LOCAL","AV_MESSAGES","AvMessages","$window","onMessage","onResize","send","resize","debounce","isDomain","_event","originalEvent","source","origin","fromJson","$root","isIframe","parent","hostname","protocol","port","payload","JSON","stringify","postMessage","avMessages"],"mappings":";;;;;CAEA,SAAAA,MAEA,YAEA,IAAAC,UAAAD,KAAAC,YACAA,UAAAC,QAAA,SACAD,UAAAE,OAAA,UACAF,UAAAG,KAAAC,QAAAC,OAAAL,SAAAE,QAAA,MAEA,IAAAI,gBAAAF,QAAAC,MACA,IAAAE,WAEAH,SAAAC,OAAA,SAAAG,KAAAC,MAEA,GAAAA,MAAAC,EAAAC,QAAAJ,QAAAC,SAAA,IAAAI,OAAAC,UAAA,CACA,KAAA,IAAAC,OAAA,sBAAAN,MAGAD,QAAAQ,KAAAP,KAEA,OAAAF,gBAAAE,KAAAC,MAGAV,MAAAC,SAAAA,QAEA,UAAAK,UAAA,aAAAA,OAAAW,QAAA,CACAX,OAAAW,QAAAhB,YAGAY,SC/BA,SAAAb,MAEA,YAEA,IAAAC,UAAAD,KAAAC,QAGAA,UAAAiB,WAAA,SAAAC,QACA,GAAAA,SAAA,KAAA,CACA,MAAA,GAEA,MAAA,GAAAA,OAIAlB,UAAAmB,QAAA,SAAAC,KACA,MAAA,QAAAC,KAAArB,SAAAiB,WAAAG,SAGAR,SCnBA,SAAAb,MAEA,YAEA,IAAAC,UAAAD,KAAAC,QAEA,IAAAsB,MAAA,IAAA,IAAA,IAEAtB,UAAAuB,KAAA,SAAAC,QACA,GAAAC,OAAAH,IAAAI,MACA,IAAAC,MAEA,OAAAF,MAAA,CACAA,OACAE,OAAAL,IAAAG,OAAAG,WAAA,EACA,IAAAD,QAAA,GAAA,CACAL,IAAAG,OAAA,GACA,OAAAD,QAAAA,OAAAF,IAAAO,KAAA,IAAAP,IAAAO,KAAA,IAEA,GAAAF,QAAA,GAAA,CACAL,IAAAG,OAAA,QACA,CACAH,IAAAG,OAAAK,OAAA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AA6hB,KAAA,IAAAhnB,OAAAmF,SAAA6hB,KAAA,IAGA,MAAA,IAIAnjB,OAAAqiB,KAAA,SAAAe,SAEA,IAEA,GAAA3hB,SAAAxF,EAAA8M,SAAAqa,SAAAA,QAAAC,KAAAC,UAAAF,QACAjkB,MAAAokB,YAAA9hB,QAAAtC,KAAAygB,UAEA,MAAA/E,KACA9a,KAAAuC,MAAA,qBAAAuY,MAIA7a,OAAAujB,YAAA,SAAA9hB,QAAAme,QACAzjB,OAAA6mB,OAAAO,YAAA9hB,QAAAme,QAGA,OAAA,IAAAqC,cAMA1mB,UAAAG,KAAA4kB,IAAA,SAAAkD,YAEA,GAAAA,WAAAzQ,YAAA,CACAyQ,WAAA5R,YAKAzV","file":"availity-angular.min.js","sourcesContent":["/*global module*/\n\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity || {};\n availity.VERSION = 'v0.0.0';\n availity.MODULE = 'availity';\n availity.core = angular.module(availity.MODULE, ['ng']);\n\n var originalModule = angular.module;\n var modules = [];\n\n angular.module = function(name, deps) {\n\n if(deps && _.indexOf(modules, name) !== -1 && !window.__karma__) {\n throw new Error('redefining module: ' + name);\n }\n\n modules.push(name);\n\n return originalModule(name, deps);\n };\n\n root.availity = availity;\n\n if(typeof module !== 'undefined' && module.exports) {\n module.exports = availity;\n }\n\n})(window);\n\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n // https://github.com/epeli/underscore.string/blob/cebddf40cf2e10f0e9b596d9654edd0a1cfefc15/helper/makeString.js\n availity._stringify = function(object) {\n if(object === null) {\n return '';\n }\n return '' + object;\n };\n\n // https://github.com/epeli/underscore.string/blob/cebddf40cf2e10f0e9b596d9654edd0a1cfefc15/isBlank.js\n availity.isBlank = function(str) {\n return (/^\\s*$/).test(availity._stringify(str));\n };\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var uid = ['0', '0', '0'];\n\n availity.uuid = function(prefix) {\n var index = uid.length;\n var digit;\n\n while(index) {\n index--;\n digit = uid[index].charCodeAt(0);\n if(digit === 57 /*'9'*/) {\n uid[index] = 'A';\n return prefix ? prefix + uid.join('') : uid.join('');\n }\n if(digit === 90 /*'Z'*/) {\n uid[index] = '0';\n } else {\n uid[index] = String.fromCharCode(digit + 1);\n return prefix ? prefix + uid.join('') : uid.join('');\n }\n }\n uid.unshift('0');\n return prefix ? prefix + uid.join('') : uid.join('');\n };\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.REGEX_API_URL = /^.*?api.availity.com(.*)$/;\n\n availity.getRelativeUrl = function(url) {\n var result = url.match(availity.REGEX_API_URL);\n if(result && result[1]) {\n return '/api' + result[1];\n }\n\n return url;\n };\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n // https://github.com/jasonday/printThis/commit/66f9cbd0e3760767342eed4ef32cf8294417b227\n availity.print = function() {\n\n if(document.queryCommandSupported('print')) {\n document.execCommand('print', false, null);\n } else {\n window.focus();\n window.print();\n }\n };\n\n})(window);\n","// Original => https://github.com/mgcrea/angular-strap/blob/master/src/helpers/debounce.js\n\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_THROTTLE', {\n OPTIONS: {\n wait: 1000,\n update: false,\n trailing: true,\n leading: false\n }\n });\n\n availity.core.factory('avThrottle', function(AV_THROTTLE, $timeout) {\n\n return function(fn, wait, options) {\n\n options = _.merge({}, AV_THROTTLE.OPTIONS, options);\n\n wait = wait ? wait : AV_THROTTLE.THRESHOLD;\n var update = angular.isDefined(options.update) ? options.update : AV_THROTTLE.UPDATE;\n var timer = null;\n\n return function() {\n var context = options.context || this;\n var args = arguments;\n\n if(!timer) {\n if(options.leading !== false) {\n fn.apply(context, args);\n }\n\n var later = function() {\n timer = null;\n if(options.trailing !== false) {\n fn.apply(context, args);\n }\n };\n\n timer = $timeout(later, wait, update);\n }\n\n return timer;\n\n };\n };\n });\n\n})(window);\n","// Orginal => https://github.com/ericzon/angular-ny-logger/blob/0c594e864c93e7f33d36141200096bc6139ddde1/angular-ny-logger.js\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.provider('AvLogger', function() {\n\n var _enabled = false;\n\n this.enabled = function(enabled) {\n _enabled = !!enabled;\n };\n\n this.$get = function($injector) {\n\n var AvLogger = function(context, $delegate) {\n\n this.context = context || '';\n this.$log = $delegate;\n\n };\n\n var proto = AvLogger.prototype;\n\n AvLogger.supplant = function(str, supplantData) {\n if (!supplantData) {\n return str;\n }\n\n var _supplant = function (match, key) {\n var result = supplantData[key];\n return result;\n };\n\n return str.replace(/\\{([^{}]*)\\}/g, _supplant);\n };\n\n AvLogger.isObject = function(element) {\n var elemStr = ( !angular.isUndefined(element) && !angular.isUndefined(element.constructor) ) ? element.constructor.toString() : '';\n return (elemStr.indexOf('Object') > -1);\n };\n\n AvLogger.getFormattedTimestamp = function(date) {\n\n return AvLogger.supplant('{0}:{1}:{2}:{3}', [\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds()\n ]);\n\n };\n\n proto._log = function(originalFn, args) {\n\n // Allow enabling logger through query params\n // Ex:\n //\n // http://localhost:3000/ui.html#avLogger\n\n var hash = window.location.hash;\n hash = hash || '';\n\n if(!_enabled && hash.indexOf('avLogger') < 0 && originalFn !== 'error') {\n return;\n }\n\n var now = AvLogger.getFormattedTimestamp(new Date());\n var message = '';\n var supplantData = [];\n\n var context = this.context ? ' [' + this.context + '] ' : '';\n\n switch(args.length) {\n case 1:\n // (1) If the user supplied one argument, then the argument must be\n // the message itself and _log()\n // will print: - : \n supplantData = args[0];\n message = AvLogger.supplant('{0}{1} - {2}', [now, context, args[0]]);\n break;\n case 3:\n // (3) If the user supplied three arguments, then the first argument\n // is a method name, the second is the message and the third is an\n // object of variables to interpolate with the message. For this, _log()\n // will print: - - ('')\n supplantData = args[2];\n message = AvLogger.supplant(\"{0}{1} - {2}(\\'{3}\\')\", [now, context, args[0], args[1]]);\n break;\n case 2:\n // (2) If the user provided two arguments, we need to find out whether\n // they supplied a method name or an interpolation object.\n // In order to figure that out, we’ll check the type of the last argument.\n // If it is a string, then it has to be the message itself while the\n // first argument is the method name. Otherwise consider the first argument\n // as the message and the second as array of interpolation variables.\n // The output print will be according to this check.\n if(typeof args[1] === 'string') {\n\n message = AvLogger.supplant(\"{0}{1} - {2}(\\'{3}\\')\", [now, context, args[0], args[1]]);\n\n } else {\n\n // If the message is an error, there may be a stack included. If so, we\n // should include the stack in the message to make it more meaningful.\n if(args[0].stack) {\n var errorMessage = this.formatError(args[0]);\n message = AvLogger.supplant('{0}{1} - {2}', [now, context, errorMessage]);\n supplantData = args[1];\n\n }else {\n supplantData = args[1];\n\n }\n\n }\n break;\n }\n\n var $log = this.$log || $injector.get('$log');\n\n var params = (AvLogger.isObject(supplantData)) ? [message, supplantData] : [AvLogger.supplant(message, supplantData)];\n $log[originalFn].apply(null, params);\n\n };\n\n proto.log = function() {\n this._log('log', arguments);\n };\n\n proto.info = function() {\n this._log('info', arguments);\n };\n\n proto.warn = function() {\n this._log('warn', arguments);\n };\n\n proto.debug = function() {\n this._log('debug', arguments);\n };\n\n // https://github.com/angular/angular.js/blob/v1.2.27/src/ng/log.js#L122\n proto.formatError = function(arg) {\n if(arg instanceof Error) {\n if(arg.stack) {\n\n arg = (arg.message && arg.stack.indexOf(arg.message) === -1) ?\n 'Error: ' + arg.message + '\\n' + arg.stack : arg.stack;\n\n } else if(arg.sourceURL) {\n arg = arg.message + '\\n' + arg.sourceURL + ':' + arg.line;\n }\n }\n return arg;\n };\n\n proto.error = function() {\n this._log('error', arguments);\n };\n\n return AvLogger;\n\n };\n\n });\n\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.config(function($provide) {\n\n $provide.decorator('$log', function($delegate, AvLogger) {\n return new AvLogger(null, $delegate);\n });\n\n });\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_POLLING', {\n INTERVAL: 1000, // delay in ms before retrying an async request\n MAX_ELAPSED_TIME: 5000, // max time in ms before polling stops and rejects original request\n MAX_RETRY: 30, // # of times the request will be tried\n DECAY: 1.2, // % the polling interval decays after every retry\n // maximum time polling is allowed before rejecting the request\n EVENTS: {\n MAX_RETRY: 'av:polling:max:retry'\n },\n REGEX_URL: /^.*?api.availity.com(.*)$/ // capture the relative url from API\n });\n\n var PollingServiceFactory = function($rootScope, $q, $injector, $timeout, $log, AV_POLLING, AV_API) {\n\n var AvPollingService = function() {\n this.pendingRequests = []; // stores all request for polling\n };\n\n var proto = AvPollingService.prototype;\n\n proto.response = function(response) {\n\n if(this.isAsyncResponse(response)) {\n return this.onAsyncReponse(response);\n }\n\n return response || $q.when(response);\n };\n\n proto.setDefaults = function(config) {\n\n var defaultOptions = {\n pollingInterval: AV_POLLING.INTERVAL,\n pollingDecay: AV_POLLING.DECAY,\n pollingMaxInterval: AV_POLLING.MAX_ELAPSED_TIME,\n pollingRetryCount: 0,\n pollingStartTime: new Date().getTime()\n };\n\n return _.extend(defaultOptions, config);\n };\n\n proto.responseError = function(response) {\n // Return the promise rejection\n return $q.reject(response);\n };\n\n /**\n * API layer return a link with a polling url for\n * async responses.\n *\n * @param {Object} response ajax response\n * @return {Boolean} true if response has status of 202 (accepted) and location param in header with uri+session link\n */\n proto.isAsyncResponse = function(response) {\n\n return response &&\n response.config &&\n response.config.api &&\n response.status &&\n response.status === 202 &&\n angular.isFunction(response.headers) && !availity.isBlank(response.headers(AV_API.HEADERS.SERVER.LOCATION));\n };\n\n proto.onAsyncReponse = function(response) {\n\n response.config = this.setDefaults(response.config);\n\n var deferred = $q.defer();\n\n this.queueRequest(deferred, response);\n\n // [rm3]: Can't call notify before you return promise object?\n $timeout(function() {\n // Notify deferred listeners with the original server response\n deferred.notify(response);\n }, 0, false);\n\n return deferred.promise;\n };\n\n proto.getUrl = function(url) {\n\n var result = url.match(AV_POLLING.REGEX_URL);\n if(result && result[1]) {\n return '/api' + result[1];\n }\n\n return url;\n };\n\n proto.queueRequest = function(deferred, response) {\n\n var self = this;\n // server replies with location header so set the url into config\n var _url = availity.getRelativeUrl(response.headers(AV_API.HEADERS.SERVER.LOCATION));\n var _config = response.config;\n\n\n // headers – {Object} – Map of strings or functions which return strings representing HTTP headers\n // to send to the server. If the return value of a function is null, the header\n // will not be sent. Functions accept a config object as an argument.\n var config = {\n method: 'GET',\n api: true,\n headers: _config.headers,\n pollingInterval: _config.pollingInterval,\n pollingMaxRetry: _config.pollingMaxRetry,\n pollingMaxInterval: _config.pollingMaxInterval,\n pollingStartTime: _config.pollingStartTime,\n _pollingDecay: _config._pollingDecay,\n pollingRetryCount: _config.pollingRetryCount,\n pollingDecay: _config.pollingDecay,\n url: _url, /* set the url from the server response */\n cache: false\n };\n\n var request = {\n id: availity.uuid('request-'),\n config: config,\n deferred: deferred\n };\n\n var timeout = this.getPollingTimeout(config);\n\n // each async request should run on its own timer\n var timer = $timeout(function() {\n self.retryRequest(request.id);\n }, timeout, false);\n\n request.timer = timer;\n\n // add the async request to the queue\n this.pushRequest(request);\n\n };\n\n proto.popRequest = function(id) {\n\n var index = null;\n var request = null;\n\n for(var i = 0; i < this.pendingRequests.length; i++) {\n if(this.pendingRequests[i].id === id) {\n index = i;\n break;\n }\n }\n\n request = this.pendingRequests[index];\n this.pendingRequests.splice(index, 1);\n\n return request;\n };\n\n proto.pushRequest = function(request) {\n this.pendingRequests.push(request);\n };\n\n proto.getPollingTimeout = function(config) {\n return config.pollingDecay * config.pollingInterval;\n };\n\n proto.isPollingMaxTimeout = function(config) {\n var now = new Date().getTime();\n var elaspedTime = now - config.pollingStartTime;\n var isElapsed = elaspedTime > config.pollingMaxInterval;\n return isElapsed;\n },\n\n proto.isMaxRetried = function(config) {\n return config.pollingRetryCount >= AV_POLLING.MAX_RETRY;\n };\n\n proto.isPollable = function(config) {\n var _isTimeout = this.isPollingMaxTimeout(config);\n var _isMax = this.isMaxRetried(config);\n\n return _isTimeout || _isMax ? false : true;\n\n };\n\n proto.retryRequest = function(id) {\n\n var self = this;\n var request = this.popRequest(id);\n $timeout.cancel(request.timer);\n\n var config = request.config;\n\n var deferred = request.deferred;\n\n if(!this.isPollable(config)) {\n $log.info('Rejecting pollable response due to timeout');\n return deferred.reject(request);\n }\n\n // increment counters and polling timeouts\n this.increment(config);\n\n function successCallback(response) {\n if(self.isAsyncResponse(response)) {\n deferred.notify(response);\n self.queueRequest(request.deferred, response);\n } else {\n deferred.resolve(response);\n }\n }\n\n function errorCallback(response) {\n deferred.reject(response);\n }\n\n // Silly circular dependency trick\n var $http = $injector.get('$http');\n\n $http(config).then(successCallback, errorCallback);\n\n };\n\n proto.increment = function(config) {\n this.incrementCounter(config);\n this.incrementDecay(config);\n };\n\n proto.incrementDecay = function(config) {\n if(!config._pollingDecay) {\n // store the original decay param\n config._pollingDecay = config.pollingDecay;\n }\n config.pollingDecay *= config._pollingDecay;\n };\n\n proto.incrementCounter = function(config) {\n config.pollingRetryCount++;\n };\n\n proto.clearRequests = function() {\n angular.forEach(this.pendingRequests, function(request) {\n $timeout.cancel(request.timer);\n });\n this.pendingRequests = [];\n };\n\n return new AvPollingService();\n\n };\n\n availity.core.factory('avPollingService', PollingServiceFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_API', {\n HEADERS: {\n SERVER: {\n ID: 'X-API-ID',\n LOCATION: 'Location',\n STATUS: 'X-Status-Message',\n GLOBAL_ID: 'X-Global-Transaction-ID'\n },\n CLIENT: {\n SESSION_ID: 'X-Session-ID',\n AUTH: 'Authorization',\n OVERRIDE: 'X-HTTP-Method-Override',\n CALLBACK_URL: 'X-Callback-URL',\n CUSTOMER_ID: 'X-Availity-Customer-ID',\n RESPONSE_ENCODING: 'X-Response-Encoding-Context'\n }\n },\n OPTIONS: {\n // pre-prend the url with a value like `/public` so we can build urls like `public/api/v1/*`\n prefix: '',\n // default base url for endpoints\n path: '/api',\n // url resource group, such as `/foo`, for urls like `public/api/foo/v1/*`\n resourceGroup: '',\n // url to resource endpoint like `coverages` or `payers`\n url: null,\n // defaults to version 1\n version: '/v1',\n // governance level `/internal`\n level: '',\n // post-pend the url with `.json`, `.txt` or `.xml`\n suffix: '',\n // cache all request by default\n cache: true,\n // flag used to enable behaviors around the Availity Rest API\n api: true,\n // # of times the polling service has tried to get a response\n pollingRetryCount: 0,\n // in ms\n pollingInterval: 1000,\n // % the polling interval decays after every retry\n pollingDecay: 1.2,\n // maximum time polling is allowed before rejecting the request\n pollingMaxInterval: 30000,\n // default headers\n headers: {\n // Turn off content encoding for angular apis\n 'X-Response-Encoding-Context': 'NONE'\n }\n }\n });\n\n // Factory that creates ApiResourcess\n var ApiResourcesProvider = function(AV_API) {\n\n // Provider default options that can be overridden at config time\n var defaultOptions = _.merge({}, AV_API.OPTIONS);\n\n // Allow overrides in config phase\n this.setOptions = function(options) {\n _.merge(defaultOptions, options);\n };\n\n this.getOptions = function() {\n return angular.copy(defaultOptions);\n };\n\n // helper method to global set http common headers\n this.setHttpCommonHeaders = function($httpProvider) {\n _.merge($httpProvider.defaults.headers.common, defaultOptions.headers);\n };\n\n /**\n * Main get method for creating new resource\n * @param $http\n * @param $q\n * @param avPollingService\n * @returns {AvApiResource}\n */\n this.$get = function($http, $q, avPollingService) {\n\n var AvApiResource = function(options) {\n\n if (!options) {\n throw new Error('[options] cannot be null or undefined');\n }\n\n // if string the assume url is being passed in\n if (angular.isString(options)) {\n options = options.charAt(0) === '/' ? options : '/' + options;\n options = angular.extend({}, {url: options});\n }\n\n if (!options.url) {\n throw new Error('[url] cannot be null');\n }\n\n // get the default options and merge into this instance\n this.options = angular.extend({}, defaultOptions, (options || {}));\n };\n\n // Alias the prototype\n var proto = AvApiResource.prototype;\n\n proto._config = function(config) {\n return _.merge({}, this.options, (config || {}));\n };\n\n proto._cacheBust = function(config) {\n config.cacheBust = null;\n config.params = config.params || {};\n config.params.cacheBust = new Date().getTime();\n return config;\n };\n\n proto._getUrl = function(id) {\n if (this.options.api) {\n return this._getApiUrl(id);\n }\n\n return this.options.url;\n };\n\n proto._createResponse = function(data, status, headers, config) {\n return {\n data: data,\n status: status,\n headers: headers,\n config: config\n };\n };\n\n proto._request = function(config, afterCallback) {\n\n var self = this;\n var defer = $q.defer();\n\n $http(config)\n .success(function(data, status, headers, _config) {\n\n var _response = {\n data: data,\n status: status,\n headers: headers,\n config: _config\n };\n\n // handle the async response if applicable\n var _promise = $q.when(avPollingService.response(_response));\n // notify the promise listener of the original response\n defer.notify(_response);\n\n // handle the polling service promise\n _promise.then(function(successResponse) {\n\n // if service has a callback then call it\n // var response = self._createResponse(data, status, headers, _config);\n if (afterCallback) {\n successResponse = afterCallback.call(self, successResponse, config.data);\n }\n defer.resolve(successResponse);\n }, function(errorResponse) {\n defer.reject(errorResponse);\n }, function(notifyResponse) {\n defer.notify(notifyResponse);\n });\n\n }).error(function(data, status, headers, _config) {\n var response = self._createResponse(data, status, headers, _config);\n defer.reject(response);\n });\n\n var promise = defer.promise;\n\n // recreate the success callback ala $http\n promise.success = function(fn) {\n promise.then(function(response) {\n fn(response.data, response.status, response.headers, response.config);\n });\n return promise;\n };\n\n // recreate the error callback ala $http\n promise.error = function(fn) {\n promise.then(null, function(response) {\n fn(response.data, response.status, response.headers, config);\n });\n return promise;\n };\n\n promise.always = promise['finally'];\n\n return promise;\n };\n\n proto.normalize = function(url) {\n return url\n .replace(/[\\/]+/g, '/')\n .replace(/\\/$/, '');\n };\n\n proto.join = function() {\n var joined = [].slice.call(arguments, 0).join('/');\n return this.normalize(joined);\n };\n\n proto._getApiUrl = function(id) {\n\n id = id ? '/' + id : '';\n\n var url = this.join(\n this.options.prefix,\n this.options.path,\n this.options.level,\n this.options.resourceGroup,\n this.options.version,\n this.options.url,\n id);\n\n return url + this.options.suffix;\n };\n\n proto.create = function(data, config) {\n\n if (!data) {\n throw new Error('called method without [data]');\n }\n\n if (this.beforeCreate) {\n data = this.beforeCreate(data);\n }\n\n config = this._config(config);\n config.method = 'POST';\n config.url = this._getUrl();\n config.data = data;\n\n return this._request(config, this.afterCreate);\n\n };\n\n proto.get = function(id, config) {\n\n if (!id) {\n throw new Error('called method without [id]');\n }\n\n config = this._config(config);\n if (config.cacheBust) {\n config = this._cacheBust(config);\n }\n config.method = 'GET';\n config.url = this._getUrl(id);\n\n return this._request(config, this.afterGet);\n\n };\n\n proto.query = function(config) {\n\n config = this._config(config);\n if (config.cacheBust) {\n config = this._cacheBust(config);\n }\n config.method = 'GET';\n config.url = this._getUrl();\n\n return this._request(config, this.afterQuery);\n\n };\n\n proto.update = function(id, data, config) {\n\n var url;\n\n if (_.isString(id) || _.isNumber(id)) {\n url = this._getUrl(id);\n } else {\n url = this._getUrl();\n // At this point the function signature becomes:\n //\n // proto.update = function(data, config) {} a.k.a function(id, data)\n //\n config = data; // config is really the 2nd param\n data = id; // data is really the first param\n }\n\n if (this.beforeUpdate) {\n data = this.beforeUpdate(data);\n }\n\n config = this._config(config);\n config.method = 'PUT';\n config.url = url;\n config.data = data;\n\n return this._request(config, this.afterUpdate);\n\n };\n\n proto.remove = function(id, config) {\n\n var url;\n var data;\n\n if (_.isString(id) || _.isNumber(id)) {\n url = this._getUrl(id);\n } else {\n // At this point the function signature becomes:\n //\n // proto.remove = function(data, config)\n //\n url = this._getUrl();\n data = id;\n }\n\n config = this._config(config);\n config.method = 'DELETE';\n config.url = url;\n config.data = data;\n\n return this._request(config, this.afterRemove);\n };\n\n proto.beforeCreate = null;\n proto.afterCreate = null;\n proto.afterQuery = null;\n proto.afterGet = null;\n proto.beforeUpdate = null;\n proto.afterUpdate = null;\n proto.afterRemove = null;\n\n return AvApiResource;\n };\n\n };\n\n availity.core.provider('AvApiResource', ApiResourcesProvider);\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n var UserServiceFactory = function(AvApiResource) {\n\n var AvUsersResource = function() {\n AvApiResource.call(this, 'users');\n };\n\n angular.extend(AvUsersResource.prototype, AvApiResource.prototype, {\n\n afterGet: function(response) {\n var user = response.data.user ? response.data.user : response.data;\n return user;\n },\n\n me: function(config) {\n return this.get('me', config);\n }\n\n });\n\n return new AvUsersResource();\n\n };\n\n availity.core.factory('avUsersResource', UserServiceFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avCoveragesResource', function(AvApiResource) {\n return new AvApiResource({version: '/v1', url: '/configurations', cache: false});\n });\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avConfigurationsResource', function(AvApiResource) {\n return new AvApiResource({version: '/v1', url: '/configurations'});\n });\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var LogMessagesFactory = function(AvApiResource) {\n\n var AvLogMessagesResource = function() {\n\n AvApiResource.call(this, {\n version: '/v1',\n url: '/log-messages'\n });\n };\n\n angular.extend(AvLogMessagesResource.prototype, AvApiResource.prototype, {\n\n buildRequest: function(level, entries) {\n\n var requestPayload = {};\n\n if(entries.level) {\n delete entries.level;\n }\n\n requestPayload.level = level;\n requestPayload.entries = entries;\n\n return requestPayload;\n },\n\n debug: function(entries) {\n return this.create(this.buildRequest('debug', entries));\n },\n\n info: function(entries) {\n return this.create(this.buildRequest('info', entries));\n },\n\n warn: function(entries) {\n return this.create(this.buildRequest('warn', entries));\n },\n\n error: function(entries) {\n return this.create(this.buildRequest('error', entries));\n }\n\n });\n\n return new AvLogMessagesResource();\n\n };\n\n availity.core.factory('avLogMessagesResource', LogMessagesFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var SpacesFactory = function(AvApiResource) {\n\n // sdk/platform/v1/spaces/10939061011461209623076300008435\n return new AvApiResource({\n path: '/api/sdk',\n level: '/platform',\n version: '/v1',\n url: '/spaces'\n });\n\n };\n\n availity.core.factory('avSpacesResource', SpacesFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var AvDocumentsResourceFactory = function(AvApiResource) {\n\n var AvDocumentsResource = function() {\n AvApiResource.call(this, 'documents');\n };\n\n angular.extend(AvDocumentsResource.prototype, AvApiResource.prototype, {\n\n getContents: function(id) {\n var config = this._config();\n config.url = this.getContentsUrl(id);\n return this._request(config);\n },\n\n getContentsUrl: function(id) {\n return this._getUrl(id) + '/contents';\n }\n\n });\n\n return new AvDocumentsResource();\n\n };\n\n availity.core.factory('avDocumentsResource', AvDocumentsResourceFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var OrganizationResourceFactory = function(AvApiResource) {\n\n var OrganizationResource = function() {\n AvApiResource.call(this, 'organizations');\n };\n\n angular.extend(OrganizationResource.prototype, AvApiResource.prototype, {\n\n getOrganizations: function(config) {\n return this.query(config).then(function(response) {\n return response.data.organizations ? response.data.organizations : response.data;\n });\n }\n\n });\n\n return new OrganizationResource();\n };\n\n availity.core.factory('avOrganizationsResource', OrganizationResourceFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n\n var availity = root.availity;\n\n availity.core.factory('avCodesResource', function(AvApiResource) {\n return new AvApiResource({version: '/v1', url: '/codes'});\n });\n\n var AvCodesResourceFactory = function(AvApiResource) {\n\n var AvCodesResource = function () {\n AvApiResource.call(this, 'codes');\n };\n\n angular.extend(AvCodesResource.prototype, AvApiResource.prototype, {\n\n getCodes: function (data) {\n\n // config for the api resource query\n var config = {};\n config.params = {};\n\n if(data.page) {\n config.params.offset = 50 * (data.page - 1);\n }\n if(data.offset) {\n config.params.offset = data.offset;\n }\n if(data.list) {\n config.params.list = data.list;\n }\n if(data.q) {\n config.params.q = data.q;\n }\n\n return this.query(config).then(function (response) {\n // Format the response into something select2 can read\n var results = response.data.codes;\n if(results && !_.has(results[0], 'id')) {\n _.each(results, function (code) {\n code.id = code.code;\n });\n }\n\n // calculate if we want to continue searching\n var moreVal = response.data.offset < response.data.totalCount - response.data.limit;\n return {\n more: moreVal,\n results: results\n };\n\n });\n }\n\n });\n\n return new AvCodesResource();\n\n };\n\n availity.core.factory('avCodesResource', AvCodesResourceFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var AvUserPermissionsResourceFactory = function(AvApiResource) {\n\n var AvUserPermissionsResource = function() {\n AvApiResource.call(this, {\n level: '/internal',\n version: '/v1',\n url: '/axi-user-permissions'\n });\n this.sessionDate = moment().toISOString();\n };\n\n angular.extend(AvUserPermissionsResource.prototype, AvApiResource.prototype, {\n\n afterQuery: function(response) {\n return response.data.axiUserPermissions ? response.data.axiUserPermissions : [];\n },\n\n getPermissions: function(permissionIds, region) {\n var self = this;\n return this.query({\n params: {\n permissionId: permissionIds,\n region: region,\n sessionDate: self.sessionDate\n }\n });\n }\n\n });\n\n return new AvUserPermissionsResource();\n\n };\n\n availity.core.factory('avUserPermissionsResource', AvUserPermissionsResourceFactory);\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n var AvUserAuthorizationsFactory = function($q, $log, avUserPermissionsResource) {\n\n /**\n *\n * @constructor\n */\n var AvUserAuthorizations = function() {\n /**\n * Region is used to return permission/resources relative to region. If null service will\n * return all permission relative to current. If value 'ALL' used it will return value relative\n * to all regions the user has access to.\n * @type {string}\n */\n this.region = null;\n /**\n * PermissionIds contains the set of permissionIds to request from service. If user of service calls\n * setPermissionIds() or call getPermissions() with complete set of permissionIds needed by application,\n * then service should only make that one hit to retrieve permission information.\n * @type {Array}\n */\n this.permissionIds = [];\n };\n\n var proto = AvUserAuthorizations.prototype;\n\n proto.setRegion = function(region) {\n this.region = region;\n return this;\n };\n\n proto.setPermissionIds = function(permissionIds) {\n if(!angular.isArray(permissionIds)) {\n throw new Error('permissionsIds must be an array of string IDs for avUserAuthorizations#addPermissionIds');\n }\n this.permissionIds = permissionIds;\n return this;\n };\n\n proto.isAuthorized = function(permissionId) {\n return this.getPermission(permissionId).then(function(permission) {\n return permission.isAuthorized;\n });\n };\n\n proto.isAnyAuthorized = function(permissionIds) {\n return this.getPermissions(permissionIds).then(function(permissions) {\n var permission = _.findWhere(permissions, {isAuthorized: true});\n return permission !== undefined;\n });\n };\n\n proto.getPermission = function(permissionId) {\n if(!angular.isString(permissionId)) {\n throw new Error('permissionsId must be a string ID for avUserAuthorizations#getPermission');\n }\n\n return this.getPermissions([permissionId])\n .then(function(_permissions) {\n return _permissions[permissionId];\n });\n };\n\n proto.getPermissions = function(permissionIds) {\n var self = this;\n\n if(!angular.isArray(permissionIds)) {\n throw new Error('permissionsIds must be an array of string IDs for avUserAuthorizations#getPermissions');\n }\n // merge permission ids to reduce calls to backend\n self.permissionIds = _.union(self.permissionIds, permissionIds);\n\n return avUserPermissionsResource\n .getPermissions(self.permissionIds, self.region)\n .then(function(_permissions) {\n return self.toPermissionMap(permissionIds, _permissions);\n });\n };\n\n proto.getOrganizations = function(permissionId) {\n return this.getPermission(permissionId).then(function(permission) {\n return permission.organizations;\n });\n };\n\n proto.getPayers = function(permissionId, organizationId) {\n return this.getPermission(permissionId).then(function(permission) {\n var organization = _.findWhere(permission.organizations, {id: organizationId});\n\n if(organization && organization.resources) {\n return organization.resources;\n }\n return [];\n });\n\n };\n\n /**\n * Converts array permissions to map with value for each permissionId, creating empty permission\n * if can't find permission in array\n * @private\n */\n proto.toPermissionMap = function(permissionIds, permissions) {\n var self = this;\n var map = {};\n permissions = _.slice(permissions);\n _.forEach(permissionIds, function(permissionId) {\n var key = {id: permissionId};\n var permission = _.findWhere(permissions, key);\n permission = permission ? self.toPermission(permission) : self.toPermission(key);\n map[permission.id] = permission;\n });\n return map;\n };\n\n /**\n * Convert a permission resource into a structure that is easier to work with.\n * @private\n */\n proto.toPermission = function(permission) {\n return {\n id: permission.id,\n description: permission.description ? permission.description : '',\n geographies: permission.geographies ? permission.geographies : [],\n organizations: permission.organizations ? permission.organizations : [],\n isAuthorized: permission.organizations ? permission.organizations.length > 0 : false\n };\n };\n\n return new AvUserAuthorizations();\n\n };\n\n availity.core.factory('avUserAuthorizations', AvUserAuthorizationsFactory);\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_SESSION', {\n SESSION_TIMEOUT: 'av:auth:session:timeout',\n NOT_AUTHORIZED: 'av:auth:not:authorized'\n });\n\n availity.core.factory('avSession', function($q, avUsersResource) {\n\n var AvSession = function() {\n this.user = null;\n this.permissions = null;\n };\n\n var proto = AvSession.prototype;\n\n proto.getUser = function() {\n var self = this;\n\n if(this.user) {\n return $q.when(this.user);\n }\n\n return avUsersResource.me().then(function(user) {\n self.user = user;\n return self.user;\n });\n };\n\n\n proto.destroy = function() {\n this.user = null;\n this.permisions = null;\n };\n\n return new AvSession();\n });\n\n})(window);\n","// Inspiration => https://github.com/HackedByChinese/ng-idle\n//\n// Rules:\n//\n// * ping after 3 minutes from last human activity\n// * reset session after api success except 401\n// * idle show after 25 of inactivity\n//\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_IDLE', {\n EVENTS: {\n IDLE_INACTIVE: 'av:idle:inactive',\n IDLE_ACTIVE: 'av:idle:active',\n SESSION_TIMEOUT_ACTIVE: 'av:idle:session:active',\n SESSION_TIMEOUT_REDIRECT: 'av:idle:session:redirect',\n HUMAN: 'keydown.av.idle mousedown.av.idle keydown.av.idle',\n MACHINE: '$locationChangeSuccess'\n },\n INTERVALS: {\n PING: 3 * 60 * 1000, // 3 minutes\n IDLE: 25 * 60 * 1000, // 25 minutes\n SESSION: 30 * 60 * 1000 // 30 minutes\n },\n URLS: {\n HOME: '/availity/web/public.elegant.login',\n PING: '/api/v1/users/me'\n }\n });\n\n availity.core.provider('avIdle', function(AV_IDLE) {\n\n var enabled = false;\n var pingUrl;\n var redirectUrl;\n var sessionTimeout;\n var idleTimeout;\n var pingTimeout;\n\n this.enable = function(value) {\n if(arguments.length) {\n enabled = !!value;\n }\n return enabled;\n };\n\n this.setSessionTimeout = function(timeout) {\n sessionTimeout = timeout || AV_IDLE.INTERVALS.SESSION;\n };\n\n this.setIdleTimeout = function(timeout) {\n idleTimeout = timeout || AV_IDLE.INTERVALS.IDLE;\n };\n\n this.setPingTimeout = function(timeout) {\n pingTimeout = timeout || AV_IDLE.INTERVALS.PING;\n };\n\n this.setPingUrl = function(url) {\n pingUrl = url || AV_IDLE.URLS.PING;\n };\n\n this.$get = function(AV_IDLE, $log, $document, $rootScope, $timeout, avThrottle, $q, $injector) {\n\n var AvIdle = function() {\n\n // $timeout references\n this._idleTimer = null;\n this._sessionTimer = null;\n this._pingTimer = null;\n this._keepAlive = null;\n\n // flag used to track if the if user is idle or session expired\n this.idleActive = false;\n this.sessionActive = false;\n\n this.listeners = [];\n\n this.init();\n\n };\n\n var proto = AvIdle.prototype;\n\n proto.init = function() {\n\n if(!enabled) {\n this.stop();\n return;\n }\n\n this.start();\n };\n\n proto.start = function() {\n\n $log.info('avIdle start');\n\n var self = this;\n var listener;\n\n !sessionTimeout && this.setSessionTimeout();\n !idleTimeout && this.setIdleTimeout();\n !pingTimeout && this.setPingTimeout();\n !pingUrl && this.setPingUrl();\n !redirectUrl && this.setRedirectUrl();\n\n $rootScope.$on('$destroy', function() {\n self.stop();\n });\n\n $document.find('body').on(AV_IDLE.EVENTS.HUMAN, function(event) {\n self.onEvent(event);\n });\n\n listener = $rootScope.$on(AV_IDLE.EVENTS.MACHINE, function(event, oldUrl, newUrl) {\n if(oldUrl !== newUrl) {\n self.onEvent(event);\n }\n });\n this.listeners.push(listener);\n\n $rootScope.$on(AV_IDLE.EVENTS.SESSION_TIMEOUT_REDIRECT, function() {\n document.location.href = redirectUrl;\n });\n\n this.startIdleTimer();\n this.startSessionTimer();\n };\n\n proto.stop = function() {\n\n $document.find('body').off(AV_IDLE.EVENTS.HUMAN);\n\n // turns off Angular event listeners @see http://stackoverflow.com/a/14898795\n _.each(this.listeners, function(listener) {\n listener();\n });\n\n this.stopPing();\n this.stopSessionTimer();\n this.stopIdleTimer();\n };\n\n proto.isEnabled = function() {\n return enabled;\n };\n\n proto.enable = function(value) {\n if(arguments.length) {\n enabled = !!value;\n }\n\n return this;\n };\n\n proto.setSessionTimeout = function(timeout) {\n sessionTimeout = timeout || AV_IDLE.INTERVALS.SESSION;\n return this;\n };\n\n proto.setIdleTimeout = function(timeout) {\n idleTimeout = timeout || AV_IDLE.INTERVALS.IDLE;\n return this;\n };\n\n proto.setPingTimeout = function(timeout) {\n pingTimeout = timeout || AV_IDLE.INTERVALS.PING;\n return this;\n };\n\n proto.setPingUrl = function(url) {\n pingUrl = url || AV_IDLE.URLS.PING;\n return this;\n };\n\n proto.setRedirectUrl = function(url) {\n redirectUrl = url || AV_IDLE.URLS.HOME;\n return this;\n };\n\n proto.response = function(response) {\n\n if(this.isApiRequest(response)) {\n this.startSessionTimer();\n }\n\n return response;\n };\n\n proto.isApiRequest = function(response) {\n return response && response.config && response.config.api;\n };\n\n proto.responseError = function(response) {\n\n if(this.isApiRequest(response) && response.status !== 401) {\n this.startSessionTimer();\n }\n\n if(this.isApiRequest() && response.status === 401) {\n this.stopPing();\n }\n\n return $q.reject(response);\n };\n\n proto.startSessionTimer = function() {\n\n var self = this;\n\n this.stopSessionTimer();\n\n var later = function() {\n $log.info('avIdle session has TIMED OUT');\n self.stop();\n $rootScope.$broadcast(AV_IDLE.EVENTS.SESSION_TIMEOUT_ACTIVE);\n };\n\n $log.info('avIdle session timer has STARTED');\n this._sessionTimer = $timeout(later, sessionTimeout, false);\n\n };\n\n proto.stopSessionTimer = function() {\n $log.info('avIdle session timer has STOPPED');\n $timeout.cancel(this._sessionTimer);\n };\n\n proto.startIdleTimer = function() {\n\n var self = this;\n\n this.stopIdleTimer();\n\n var later = function() {\n self.stopIdleTimer();\n $log.info('avIdle is IDLING');\n $rootScope.$broadcast(AV_IDLE.EVENTS.IDLE_ACTIVE);\n };\n\n $log.info('avIdle idle timer has STARTED');\n this._idleTimer = $timeout(later, idleTimeout, false);\n };\n\n proto.stopIdleTimer = function() {\n $log.info('avIdle idle timer has STOPPED');\n $timeout.cancel(this._idleTimer);\n };\n\n proto.startPing = function() {\n\n if(!this._keepAlive) {\n $log.info('avIdle ping timer has STARTED');\n this._keepAlive = avThrottle(this.keepAlive, pingTimeout, {context: this});\n }\n\n this._pingTimer = this._keepAlive();\n };\n\n proto.stopPing = function() {\n $log.info('avIdle ping timer has STOPPED');\n if(this._pingTimer) {\n $timeout.cancel(this._pingTimer);\n }\n };\n\n proto.keepAlive = function() {\n\n // destroy the reference to that a new throttle gets created upon\n // next user or system event\n this._keepAlive = null;\n var $http = $injector.get('$http');\n\n $http.get(pingUrl, {\n cache: false,\n api: true\n }).success(function() {\n $log.info('avIdle keep-alive SUCCESS');\n }).error(function() {\n $log.error('avIdle keep-alive FAILURE');\n });\n };\n\n proto.onEvent = function() {\n this.startIdleTimer();\n this.startPing();\n };\n\n return new AvIdle();\n\n };\n\n });\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avIdleInterceptor', function(avIdle) {\n return {\n response: function(response) {\n return avIdle.response(response);\n },\n responseError: function(response) {\n return avIdle.responseError(response);\n }\n };\n\n });\n\n availity.core.config(function($httpProvider) {\n $httpProvider.interceptors.push('avIdleInterceptor');\n });\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.value('avValConfig', {\n classes: {\n valid: 'ng-valid',\n invalid: 'ng-invalid',\n dirty: 'ng-dirty',\n pristine: 'ng-pristine',\n touched: 'ng-touched',\n untouched: 'ng-untouched',\n submitted: 'ng-submitted'\n },\n validators: [\n 'avValPattern',\n 'avValSize',\n 'avValRequired',\n 'avValDateRange',\n 'avValDate',\n 'avValPhone',\n 'avValEmail',\n 'avValNpi'\n ]\n });\n\n availity.core.constant('AV_VAL', {\n EVENTS: {\n REVALIDATE: 'av:val:revalidate',\n SUBMITTED: 'av:val:submitted',\n FAILED: 'av:val:failed',\n RESET: 'av:val:reset'\n },\n DEBOUNCE: 800,\n DATE_FORMAT: {\n SIMPLE: 'MM/DD/YYYY'\n },\n PATTERNS: {\n ALPHA_ONLY: /[^A-Za-z]+/g,\n NUMERIC_ONLY: /[^0-9]+/g\n }\n });\n\n availity.core.provider('avVal', function() {\n\n var validators = [];\n var rules = {};\n var services = {};\n\n this.addRules = function(_rules) {\n rules = angular.extend({}, rules, _rules);\n return rules;\n };\n\n this.addValidators = function(_validators) {\n validators = validators.concat(_validators);\n return validators;\n };\n\n this.$get = function($injector, $rootScope, $http, $log, avValConfig, AV_VAL) {\n\n var AvValidation = function() {\n this.initValidators();\n };\n\n var proto = AvValidation.prototype;\n\n proto.initValidators = function() {\n var self = this;\n\n validators = avValConfig.validators.concat(validators);\n\n angular.forEach(validators, function(name) {\n self.addValidator(name);\n });\n\n };\n\n proto.addValidator = function(name) {\n var validator = $injector.get(name);\n services[validator.name] = validator;\n };\n\n proto.addRules = function(_rules) {\n rules = angular.extend({}, rules, _rules);\n $rootScope.$broadcast(AV_VAL.EVENTS.REVALIDATE);\n };\n\n proto.validate = function(key, element, value, ruleName) {\n\n var ruleConfig = rules[key];\n if(!ruleConfig) {\n $log.warn('Could not resolve the form rules key [' + key + ']. This can happen when the rules key is inside a promise and the key value has not resolved on page load.');\n return;\n }\n\n var contraints = ruleConfig[ruleName];\n if(!contraints) {\n $log.info('Rule named [' + ruleName + '] could not be found in the current schema.');\n contraints = [];\n }\n\n var el = element[0];\n var results = [];\n var violations = [];\n var _valid = true;\n\n angular.forEach(contraints, function(rule, contraintName) {\n\n if(!rule) {\n // when extended rule sets, a user can pass nulls to cancel out a rule so if\n // one doesn't exist just continue\n return;\n }\n\n var validator = services[contraintName];\n\n if(angular.isUndefined(validator)) {\n $log.warn('No validator defined for `' + name + '`');\n return;\n }\n\n var valid = validator.validate(value, rule, element);\n\n var validationResult = {\n valid: valid,\n ruleName: ruleName,\n contraintName: contraintName,\n value: value,\n message: rule.message,\n field: el.name || el.id\n };\n\n var result = angular.extend({}, rule, validationResult);\n\n results.push(result);\n if(!valid) {\n violations.push(validationResult);\n }\n _valid = _valid && valid;\n\n });\n\n return {\n isValid: _valid,\n all: results, // all the constraint results\n violations: violations\n };\n\n };\n\n return new AvValidation();\n\n };\n\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValUtils', function() {\n\n return {\n\n isDefined: function(value) {\n return angular.isDefined(value) && value !== '' && value !== null;\n },\n\n isEmpty: function(value) {\n return !this.isDefined(value) || $.trim(value) === '';\n }\n };\n\n });\n})(window);\n\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValSize', function(avValUtils) {\n\n var validator = {\n\n name: 'size',\n\n validate: function(value, rule) {\n\n var min = rule.min || 0;\n var max = rule.max;\n var type = rule.type ? rule.type.toLowerCase() : 'text';\n\n if(_.isNull(value) || _.isUndefined(value)) {\n value = '';\n }\n\n if(type === 'text') {\n value = value + '';\n return avValUtils.isEmpty(value) || value.length >= min && (max === undefined || value.length <= max);\n }\n\n // ... must be a Number\n if(!_.isNumber(value) && /^\\d+$/.test(value)) {\n value = parseInt(value, 10);\n }\n\n return avValUtils.isEmpty(value) || value >= min && (max === undefined || value <= max);\n\n }\n };\n\n return validator;\n\n });\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValPattern', function(avValUtils) {\n\n var validator = {\n name: 'pattern',\n REGEX: /^\\/(.*)\\/([gim]*)$/, //regular expression to test a regular expression\n asRegExp: function(pattern) {\n var match;\n\n if(pattern.test) {\n return pattern;\n } else {\n match = pattern.match(validator.REGEX);\n if(match) {\n return new RegExp(match[1], match[2]);\n } else {\n throw ('Expected ' + pattern + ' to be a RegExp');\n }\n }\n },\n validate: function(value, rule) {\n var values = _.isArray(rule.value) ? rule.value : [rule.value];\n\n var valid = false;\n\n _.each(values, function(expresion) {\n var pattern = validator.asRegExp(expresion);\n if(avValUtils.isEmpty(value) || pattern.test(value)) {\n valid = true;\n }\n });\n\n return valid;\n }\n };\n\n return validator;\n\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValRequired', function(avValUtils) {\n\n var validator = {\n name: 'required',\n validate: function(value, rule, element) {\n\n // Using ngModelController.$isEmpty for required checks. A form component being empty is dependent on the\n // type of field:\n //\n // - radio\n // - checkbox\n // - text\n // - lists\n //\n // You can override $isEmpty for input directives whose concept of being empty is different to the\n // default. Radio and checkboxes directive do this because in its case a value of `false`\n // implies empty.\n //\n var ctrl = element && element.data('$ngModelController');\n if(ctrl) {\n return !ctrl.$isEmpty(value);\n }\n\n return !avValUtils.isEmpty(value);\n\n }\n };\n\n return validator;\n\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValDateRange', function(AV_VAL, avValUtils) {\n\n var validator = {\n\n name: 'dateRange',\n\n getStartDate: function(start) {\n return validator.setMin(moment().add(start.value, start.units));\n },\n\n getEndDate: function(end) {\n return validator.setMax(moment().add(end.value, end.units) );\n },\n\n setMin: function(value) {\n\n // [fix]: if time is provided this may cause issues.\n value.set('hours', 0);\n value.set('minutes', 0);\n value.set('seconds', 0);\n\n return value;\n },\n\n setMax: function(value) {\n\n // [fix]: if time is provided this may cause issues.\n value.set('hours', 23);\n value.set('minutes', 59);\n value.set('seconds', 59);\n\n return value;\n },\n\n validation: function(value, rules) {\n\n var date;\n var startDate;\n var endDate;\n\n date = moment(value, rules.format || AV_VAL.DATE_FORMAT.SIMPLE);\n date.set('hours', 0);\n date.set('minutes', 0);\n date.set('seconds', 0);\n\n if(!avValUtils.isEmpty(rules.start.units) && !avValUtils.isEmpty(rules.end.units)) {\n startDate = validator.getStartDate(rules.start);\n endDate = validator.getEndDate(rules.end);\n } else {\n startDate = moment(rules.start.value, rules.format);\n endDate = validator.setMax(moment(rules.end.value, rules.format));\n }\n return date.isValid() && date.isBetween(startDate, endDate, 'day') || date.isSame(startDate, 'day') || date.isSame(endDate, 'day');\n },\n\n validate: function(value, rule) {\n return avValUtils.isEmpty(value) || validator.validation(value, rule);\n }\n\n };\n\n return validator;\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValDate', function(AV_VAL, avValUtils) {\n\n var validator = {\n name: 'dateFormat',\n validate: function(value, rules) {\n var format = rules && rules.format ? rules.format : AV_VAL.DATE_FORMAT.SIMPLE;\n return avValUtils.isEmpty(value) || moment(value, format, true).isValid();\n }\n };\n\n return validator;\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValNpi', function(avValUtils) {\n\n\n var validator = {\n\n name: 'npi',\n\n INTEGER_REGEX: /^\\d*$/,\n\n validate: function(value) {\n\n var npi = value || '';\n\n if(avValUtils.isEmpty(npi)) {\n return true;\n }\n\n if (!validator.INTEGER_REGEX.test(npi) || npi.length !== 10) {\n return false;\n }\n\n var firstDigit = npi.charAt(0);\n if(!('1' === firstDigit || '2' === firstDigit || '3' === firstDigit || '4' === firstDigit)) {\n return false;\n }\n\n var digit = parseInt(npi.charAt(9), 10);\n npi = npi.substring(0, 9);\n npi = \"80840\" + npi;\n\n var alternate = true;\n var total = 0;\n\n for (var i = npi.length; i > 0; i--) {\n var next = parseInt(npi.charAt(i-1), 10);\n if (alternate) {\n next = next*2;\n if (next > 9) {\n next = (next % 10) + 1;\n }\n }\n total += next;\n alternate = !alternate;\n }\n\n var roundUp = Math.ceil(total / 10) * 10;\n var calculatedCheck = roundUp - total;\n\n if (calculatedCheck !== digit) {\n return false;\n }\n\n return true;\n }\n\n };\n\n return validator;\n\n });\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValPhone', function(avValPattern) {\n\n var PHONE_PATTERN = /^([0-9][\\.\\-]?)?[(]{0,1}[0-9]{3}[)\\.\\- ]{0,1}[0-9]{3}[\\.\\- ]{0,1}[0-9]{4}$/;\n\n var validator = {\n name: 'phone',\n validate: function(value, rule) {\n return avValPattern.validate(value, angular.extend({}, rule, { value: PHONE_PATTERN }));\n }\n };\n\n return validator;\n\n });\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValEmail', function(avValPattern) {\n\n var EMAIL_PATTERN = /[a-zA-Z0-9!#$%&'*+\\/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+\\/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/;\n\n var validator = {\n name: 'email',\n validate: function(value, rule) {\n return avValPattern.validate(value, angular.extend({}, rule, { value: EMAIL_PATTERN }));\n }\n };\n\n return validator;\n\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_GLOBALS', {\n REGIONS: [\n {\n 'name': 'Alabama',\n 'code': 'AL'\n },\n {\n 'name': 'Alaska',\n 'code': 'AK'\n },\n {\n 'name': 'Arizona',\n 'code': 'AZ'\n },\n {\n 'name': 'Arkansas',\n 'code': 'AR'\n },\n {\n 'name': 'California',\n 'code': 'CA'\n },\n {\n 'name': 'Colorado',\n 'code': 'CO'\n },\n {\n 'name': 'Connecticut',\n 'code': 'CT'\n },\n {\n 'name': 'Delaware',\n 'code': 'DE'\n },\n {\n 'name': 'District Of Columbia',\n 'code': 'DC'\n },\n {\n 'name': 'Florida',\n 'code': 'FL'\n },\n {\n 'name': 'Georgia',\n 'code': 'GA'\n },\n {\n 'name': 'Hawaii',\n 'code': 'HI'\n },\n {\n 'name': 'Idaho',\n 'code': 'ID'\n },\n {\n 'name': 'Illinois',\n 'code': 'IL'\n },\n {\n 'name': 'Indiana',\n 'code': 'IN'\n },\n {\n 'name': 'Iowa',\n 'code': 'IA'\n },\n {\n 'name': 'Kansas',\n 'code': 'KS'\n },\n {\n 'name': 'Kentucky',\n 'code': 'KY'\n },\n {\n 'name': 'Louisiana',\n 'code': 'LA'\n },\n {\n 'name': 'Maine',\n 'code': 'ME'\n },\n {\n 'name': 'Maryland',\n 'code': 'MD'\n },\n {\n 'name': 'Massachusetts',\n 'code': 'MA'\n },\n {\n 'name': 'Michigan',\n 'code': 'MI'\n },\n {\n 'name': 'Minnesota',\n 'code': 'MN'\n },\n {\n 'name': 'Mississippi',\n 'code': 'MS'\n },\n {\n 'name': 'Missouri',\n 'code': 'MO'\n },\n {\n 'name': 'Montana',\n 'code': 'MT'\n },\n {\n 'name': 'Nebraska',\n 'code': 'NE'\n },\n {\n 'name': 'Nevada',\n 'code': 'NV'\n },\n {\n 'name': 'New Hampshire',\n 'code': 'NH'\n },\n {\n 'name': 'New Jersey',\n 'code': 'NJ'\n },\n {\n 'name': 'New Mexico',\n 'code': 'NM'\n },\n {\n 'name': 'New York',\n 'code': 'NY'\n },\n {\n 'name': 'North Carolina',\n 'code': 'NC'\n },\n {\n 'name': 'North Dakota',\n 'code': 'ND'\n },\n {\n 'name': 'Ohio',\n 'code': 'OH'\n },\n {\n 'name': 'Oklahoma',\n 'code': 'OK'\n },\n {\n 'name': 'Oregon',\n 'code': 'OR'\n },\n {\n 'name': 'Pennsylvania',\n 'code': 'PA'\n },\n {\n 'name': 'Rhode Island',\n 'code': 'RI'\n },\n {\n 'name': 'South Carolina',\n 'code': 'SC'\n },\n {\n 'name': 'South Dakota',\n 'code': 'SD'\n },\n {\n 'name': 'Tennessee',\n 'code': 'TN'\n },\n {\n 'name': 'Texas',\n 'code': 'TX'\n },\n {\n 'name': 'Utah',\n 'code': 'UT'\n },\n {\n 'name': 'Vermont',\n 'code': 'VT'\n },\n {\n 'name': 'Virginia',\n 'code': 'VA'\n },\n {\n 'name': 'Washington',\n 'code': 'WA'\n },\n {\n 'name': 'West Virginia',\n 'code': 'WV'\n },\n {\n 'name': 'Wisconsin',\n 'code': 'WI'\n },\n {\n 'name': 'Wyoming',\n 'code': 'WY'\n }\n ]\n });\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.provider('avAnalyticsConfig', function(AV_ANALYTICS) {\n\n var config = {\n VIRTUAL_PAGE_TRACKING: true,\n SERVICES: {\n PIWIK: 'avPiwikAnalytics',\n SPLUNK: 'avSplunkAnalytics'\n },\n EVENTS: {\n PAGE: '$locationChangeSuccess',\n DEFAULT: 'click'\n },\n PRE_FIX: /^avAnalytics(.*)$/,\n // should ignore these since they are part of the directives API\n IGNORE: ['avAnalyticsOn', 'avAnalyticsIf'],\n ENV: { // not sure if this should live here\n PROD: {\n DOMAIN: 'apps.availity.com',\n URL: 'https://piwik.availity.com/piwik/'\n },\n QA: {\n URL: 'https://qa-piwik.availity.com/piwik/'\n }\n }\n };\n\n this.set = function(options) {\n _.merge(config, options);\n // TODO: remove when AV_ANALYTICS is no longer supported\n // ensures avAnalyticsConfig and AV_ANALYTICS constant stay in sync\n _.merge(AV_ANALYTICS, config);\n };\n\n this.$get = function(AV_ANALYTICS) {\n /*\n * TODO: remove merge when AV_ANALYTICS is no longer supported.\n * Applies AV_ANALYTICS overrides to avAnalyticsConfig provider.\n */\n return angular.copy(_.merge(config, AV_ANALYTICS));\n };\n\n this.set(AV_ANALYTICS);\n });\n\n // DEPRECATED: use avAnalyticsConfig\n availity.core.constant('AV_ANALYTICS', {});\n\n availity.core.provider('avAnalytics', function(avAnalyticsConfigProvider) {\n\n var avAnalyticsConfig = avAnalyticsConfigProvider.$get();\n var plugins = [];\n var virtualPageTracking = avAnalyticsConfig.VIRTUAL_PAGE_TRACKING;\n var appId;\n\n this.registerPlugins = function(_plugins) {\n\n if(angular.isString(_plugins)) {\n _plugins = [_plugins];\n }\n\n if(_.isArray(_plugins)) {\n plugins = _plugins;\n } else {\n throw new Error('AvAnalytics.registerPlugins() expects a string or an array.');\n }\n\n return plugins;\n };\n\n this.setVirtualPageTracking = function(value) {\n if(arguments.length) {\n virtualPageTracking = !!value;\n }\n };\n\n this.isVirtualPageTracking = function() {\n return virtualPageTracking;\n };\n\n this.setAppID = function(id) {\n appId = id;\n return appId;\n };\n\n this.$get = function($injector, $q, $log, $rootScope, $location) {\n\n var AvAnalytics = function() {\n\n var self = this;\n this.services = {};\n\n if(!plugins || plugins.length === 0) {\n plugins = [avAnalyticsConfig.SERVICES.PIWIK, avAnalyticsConfig.SERVICES.SPLUNK];\n }\n\n angular.forEach(plugins, function(plugin) {\n\n try {\n self.services[plugin] = $injector.get(plugin);\n } catch(err) {\n $log.error('Could not load `{0}` plugin', [plugin]);\n }\n });\n\n };\n\n var proto = AvAnalytics.prototype;\n\n proto.init = function() {\n\n var self = this;\n\n if(this.isVirtualPageTracking()) {\n $rootScope.$on(avAnalyticsConfig.EVENTS.PAGE, function() {\n self.trackPageView($location.absUrl());\n });\n }\n\n angular.forEach(this.services, function(handler) {\n if(handler.isEnabled() && handler.init) {\n handler.init();\n }\n });\n\n };\n\n proto.trackEvent = function(properties) {\n var promises = [];\n\n angular.forEach(this.services, function(handler) {\n var promise = handler.trackEvent(properties);\n promises.push(promise);\n });\n\n return $q.all(promises);\n };\n\n proto.getAppId = function() {\n return appId;\n };\n\n proto.isVirtualPageTracking = function() {\n return virtualPageTracking;\n };\n\n proto.trackPageView = function(url) {\n\n var promises = [];\n\n angular.forEach(this.services, function(handler) {\n var promise = handler.trackPageView(url);\n promises.push(promise);\n });\n\n return $q.all(promises);\n };\n\n return new AvAnalytics();\n };\n\n });\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avAnalyticsUtils', function(avAnalyticsConfig, $log) {\n\n var AnalyticsUtils = function() {};\n\n var proto = AnalyticsUtils.prototype;\n\n proto.getProperties = function(attributes) {\n\n var self = this;\n var props = {};\n\n _.forEach(attributes, function(value, key) {\n if(self.isValidAttribute(key) && self.isNotIgnored(key)) {\n var result = self.getAttribute(key, value);\n props[result.key] = result.value;\n }\n });\n\n return props;\n };\n\n // Function detects external links in order to allow the analytics framework to run\n // before the browser follows a link.\n //\n // - target=\"_self\" - This opens an anchor in the same frame\n // - target=\"_parent\" - Opens the in the next level up of a frame if they were nested to inside one another\n // - target=\"_top\" - Opens the link as top document in the browser window\n // - target=\"_blank\" - Opens link in new tab new tab\n //\n proto.isExternalLink = function(attrs) {\n return attrs.href && !attrs.ngClick;\n };\n\n proto.isNotIgnored = function(key) {\n var ignored = _.includes(avAnalyticsConfig.IGNORE, key);\n return !ignored;\n };\n\n proto.isValidAttribute = function(key) {\n return avAnalyticsConfig.PRE_FIX.test(key);\n };\n\n proto.lowercase = function(str) {\n return str.substr(0, 1).toLowerCase() + str.substr(1);\n };\n\n proto.getAttribute = function(key, value) {\n var simpleKey = key.match(avAnalyticsConfig.PRE_FIX);\n\n if(simpleKey && simpleKey[1]) {\n return {\n key: this.lowercase(simpleKey[1]),\n value: value\n };\n }\n };\n\n proto.toNum = function(value) {\n var parsed = parseInt(value, 10);\n value = isNaN(parsed) ? 0 : parsed;\n return value;\n };\n\n proto.isValid = function(trackingValues) {\n var valid = true;\n\n if(trackingValues.value || trackingValues.value === 0) {\n delete trackingValues.value;\n }\n\n _.forEach(trackingValues, function(key, value) {\n if(availity.isBlank(value) || _.isUndefined(value)) {\n $log.warn('The analytic tracking value for ' + key.toUpperCase() +' is not defined.');\n valid = false;\n }\n });\n\n return valid;\n };\n\n return new AnalyticsUtils();\n });\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avSplunkAnalytics', function($log, avLogMessagesResource, $location) {\n\n var SplunkAnalyticsService = function() {};\n\n var proto = SplunkAnalyticsService.prototype;\n\n proto.trackEvent = function(properties) {\n properties.url = $location.$$absUrl || 'N/A';\n properties.level = properties.level || 'info';\n\n return avLogMessagesResource[properties.level](properties);\n };\n\n proto.trackPageView = function(url) {\n\n var properties = {\n event: 'page',\n level: 'info',\n url: url || $location.$$absUrl()\n };\n\n return avLogMessagesResource[properties.level](properties);\n };\n\n proto.isEnabled = function() {\n return true;\n };\n\n return new SplunkAnalyticsService();\n });\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.provider('avPiwikAnalytics', function() {\n\n var self;\n var siteId;\n var enabled = false;\n var customVariables = [];\n\n this.enabled = function(_enabled) {\n enabled = !!_enabled;\n };\n\n // can not push these items to `_paq` because it is defined\n // after page has loaded\n this._setCustomVariable = function(index, valueName, value, scope) {\n\n if(!index || isNaN(index)) {\n throw new Error('index must be a number');\n } else if(!valueName) {\n throw new Error('valueName must be declared');\n } else {\n customVariables.push(['setCustomVariable', index, valueName, value, scope]);\n }\n };\n\n this.setSiteID = function(_siteID) {\n this.enabled(true);\n siteId = _siteID;\n };\n\n // allow the user to pass a array of visit variables\n this.setVisitVariables = function(items) {\n _.forEach(items, function(item) {\n self._setCustomVariable(item[0], item[1], item[2], 'visit');\n });\n };\n\n this.setPageVariables = function(index, name, value) {\n this._setCustomVariable(index, name, value, 'page');\n };\n\n this.$get = function(avAnalyticsUtils, avUsersResource, avAnalyticsConfig, $injector, $log, $q, $document, $location) {\n\n var AvPiwikAnalytics = function() {\n window._paq = window._paq || [];\n };\n\n var proto = AvPiwikAnalytics.prototype;\n\n proto.trackEvent = function(properties) {\n\n if(!window._paq) {\n $log.warn('Piwik object `_paq` not found in global scope');\n return $q.when(false);\n }\n\n // http://piwik.org/docs/event-tracking/\n //\n // PAQ requires that eventValue be an integer.\n // Check to make sure value is a number if not convert it to 0.\n //\n if(properties.value) {\n properties.value = avAnalyticsUtils.toNum(properties.event);\n }\n\n // check to make sure that data being sent to piwik is a string and not null, empty or undefined\n if(!avAnalyticsUtils.isValid(properties)) {\n $log.warn('Invalid properties being passed. Tracking info will not be sent.');\n return $q.when(false);\n }\n\n return $q.when(window._paq.push(['trackEvent', properties.category, properties.action || properties.event, properties.label, properties.value]));\n };\n\n proto.trackPageView = function(url) {\n\n if(!window._paq) {\n $log.warn('Piwik object `_paq` not found in global scope');\n return $q.when(false);\n }\n\n return $q.when([\n window._paq.push(['setCustomUrl', url]),\n window._paq.push(['trackPageView', url])]\n );\n\n };\n\n proto.init = function() {\n\n avUsersResource.me().then(function(user) {\n window._paq.push(['setUserId', user.id]);\n // self.trackPageView(); //send another page track when the user data loads\n });\n\n if(!_.isFinite(siteId)) {\n $log.warn('Invalid Piwik Site Id. Piwik analytics has been disabled.');\n return;\n }\n\n var url;\n\n\n // Not sure if this is the correct way to call in avAnalyticsConfig\n // only object in provider: var config = { DOMAIN: 'app.availity.com' }\n // I believe I have to get the DOMAIN value, because avAnalyticsConfig should return an object.\n if($location.$$host === avAnalyticsConfig.ENV.PROD.DOMAIN) {\n url = avAnalyticsConfig.ENV.PROD.URL;\n } else {\n url = avAnalyticsConfig.ENV.QA.URL;\n }\n\n window._paq.push(['enableLinkTracking']);\n window._paq.push(['setTrackerUrl', url + 'piwik.php']);\n window._paq.push(['setSiteId', siteId]);\n\n _.forEach(customVariables, function(variable) {\n window._paq.push(variable);\n });\n\n $.getScript(url + 'piwik.js', function() {\n\n });\n\n };\n\n\n proto.isEnabled = function() {\n return enabled && siteId;\n };\n\n return new AvPiwikAnalytics();\n };\n\n });\n\n})(window);\n","/* global TraceKit */\n\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_EXCEPTIONS', {\n MESSAGES: {\n NOT_APPLICABLE: 'N/A'\n },\n TYPES: {\n EXCEPTION: 'exception'\n }\n });\n\n availity.core.provider('avExceptionAnalytics', function() {\n\n var _enabled = true;\n var appId;\n\n this.enabled = function(enabled) {\n _enabled = !!enabled;\n };\n\n this.setAppId = function(_id) {\n appId = _id;\n };\n\n this.$get = function(avLogMessagesResource, $location, AV_EXCEPTIONS) {\n\n var AvExceptionAnalytics = function() {\n\n };\n\n var proto = AvExceptionAnalytics.prototype;\n\n proto.init = function() {\n\n var self = this;\n\n if(!_enabled) {\n return;\n }\n\n TraceKit.remoteFetching = false;\n TraceKit.surroundingLinesToCollect = 11;\n\n // subscribe() hooks into window.error\n TraceKit.report.subscribe(function(stacktrace) {\n self.onError(stacktrace);\n });\n\n };\n\n proto.prettyPrint = function(stacktrace) {\n\n var message = '';\n\n var length = stacktrace.stack.length;\n\n for(var i = 0; i < length; i++) {\n message += [\n '[' + _.padLeft(i + '', 2, '0') + '] ',\n stacktrace.stack[i].func,\n ' ',\n stacktrace.stack[i].url,\n ':',\n stacktrace.stack[i].line,\n ':',\n stacktrace.stack[i].column,\n i + 1 < length ? '\\n' : ''\n ].join('');\n\n }\n\n return message;\n };\n\n proto.onError = function(stacktrace) {\n\n var userAgent = root.navigator && root.navigator.userAgent ? root.navigator.userAgent : AV_EXCEPTIONS.MESSAGES.NOT_APPLICABLE;\n\n var message = {\n errorDate: moment(new Date()).format('YYYY-MM-DDTHH:mm:ssZZ'),\n errorName: stacktrace.name,\n errorMessage: stacktrace.message,\n errorStack: this.prettyPrint(stacktrace),\n url: $location.$$absUrl,\n appId: appId || AV_EXCEPTIONS.MESSAGES.NOT_APPLICABLE,\n // appVersion: AV_EXCEPTIONS.MESSAGES.NOT_APPLICABLE,\n userAgent: userAgent,\n userLanguage: navigator.userLanguage,\n referrer: document.referrer,\n host: document.domain,\n screenWidth: $(window).width(),\n screenHeight: $(window).height(),\n sdkVersion: availity.VERSION\n };\n\n return this.log(message);\n\n };\n\n proto.log = function(message) {\n return avLogMessagesResource['error'](message);\n };\n\n proto.trackEvent = function(exception) {\n\n if(!_enabled) {\n return;\n }\n\n var stacktrace = TraceKit.computeStackTrace(exception);\n\n return this.onError(stacktrace);\n\n };\n\n return new AvExceptionAnalytics();\n\n };\n });\n\n availity.core.config(function($provide) {\n\n $provide.decorator('$exceptionHandler', function($delegate, $injector) {\n return function(exception, cause) {\n $delegate(exception, cause);\n var errorTacking = $injector.get('avExceptionAnalytics');\n errorTacking.trackEvent(exception);\n };\n });\n\n });\n\n availity.core.run(function(avExceptionAnalytics) {\n avExceptionAnalytics.init();\n });\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity || {};\n\n availity.analytics = angular.module('availity.config', ['ng', 'availity']);\n\n availity.analytics.run(function(avAnalytics) {\n\n avAnalytics.init();\n\n });\n\n})(window);\n\n","// Issue: https://github.com/angular/angular.js/issues/11165\n// Polyfill: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString\n//\n// This polyfill is needed because Angular calls toISOString()\n// when an request parameter is of type Date. If this polyfill isn't present\n// the ajax call fails.\n//\n(function() {\n\n 'use strict';\n\n var pad = function(number) {\n if(number < 10) {\n return '0' + number;\n }\n return number;\n };\n\n if(!Date.prototype.toISOString) {\n\n Date.prototype.toISOString = function() {\n\n return this.getUTCFullYear() +\n '-' + pad(this.getUTCMonth() + 1) +\n '-' + pad(this.getUTCDate()) +\n 'T' + pad(this.getUTCHours()) +\n ':' + pad(this.getUTCMinutes()) +\n ':' + pad(this.getUTCSeconds()) +\n '.' + (this.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) +\n 'Z';\n };\n }\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_MESSAGES', {\n\n EVENTS: {\n\n MESSAGE: 'message', // post message window event\n RESIZE: 'resize', // window resize event\n UNLOAD: 'beforeunload',\n\n AV_RESIZE: 'av:window:resize',\n AV_RECEIVED: 'av:message:received',\n AV_MAXIMIZE: 'nav:left:hide', // @deprecated,\n AV_MINIMIZE: 'nav:left:hide', // @deprecated\n // MAXIMIZE: 'av:window:maximize',\n // MINIMIZE: 'av:window:minimize',\n AV_LOGIN: 'av:login',\n AV_LOGOUT: 'av:logout',\n AV_SESSION_TIMEOUT: 'av:session:timeout'\n\n },\n\n RESIZE_DEBOUNCE: 400,\n\n DOMAIN: /https?:\\/\\/([\\w\\d\\-]+\\.)?availity\\.(com|net)/,\n LOCAL: /http:\\/\\/(localhost|127\\.0\\.0\\.1|0\\.0\\.0\\.0):(\\d+)/\n\n });\n\n})(window);\n","/* global JSON:false */\n\n// https://github.com/kylewelsby/angular-post-message/blob/master/src/angular-post-message.js\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.provider('avMessages', function() {\n\n var enabled = true;\n\n this.enable = function(value) {\n\n if(arguments.length) {\n enabled = !!value;\n }\n\n return enabled;\n\n };\n\n this.$get = function($rootScope, $log, AV_MESSAGES) {\n\n var AvMessages = function() {\n\n };\n\n var proto = AvMessages.prototype;\n\n proto.init = function() {\n\n var self = this;\n var $window = $(window);\n\n $window.on(AV_MESSAGES.EVENTS.MESSAGE, function(event) {\n self.onMessage(event);\n });\n\n $window.on(AV_MESSAGES.EVENTS.RESIZE, function() {\n self.onResize();\n });\n\n this.send(AV_MESSAGES.EVENTS.AV_MAXIMIZE);\n\n $rootScope.$on('$destroy', function() {\n self.destroy();\n });\n\n $window.on(AV_MESSAGES.EVENTS.UNLOAD, function() {\n self.send(AV_MESSAGES.EVENTS.AV_MINIMIZE);\n });\n\n };\n\n proto.destroy = function() {\n\n $(window).off(AV_MESSAGES.EVENTS.MESSAGE);\n $(window).off(AV_MESSAGES.EVENTS.RESIZE);\n $(window).off(AV_MESSAGES.EVENTS.UNLOAD);\n\n };\n\n proto.onResize = function() {\n\n var self = this;\n\n var resize = _.debounce(function() {\n\n var height = $('html').height();\n self.send({\n event: AV_MESSAGES.EVENTS.AV_RESIZE,\n height: height\n });\n\n }, AV_MESSAGES.RESIZE_DEBOUNCE);\n\n resize();\n\n };\n\n proto.isDomain = function(url) {\n\n if(AV_MESSAGES.DOMAIN.test(this.domain())) {\n return AV_MESSAGES.DOMAIN.test(url);\n }\n\n return AV_MESSAGES.LOCAL.test(url);\n };\n\n proto.isEnabled = function() {\n return enabled;\n };\n\n proto.onMessage = function(_event) {\n\n var event = _event;\n\n event = event.originalEvent || event; // jQuery wraps in `originalEvent`\n\n if(!event && !event.data) {\n // no op\n return;\n }\n\n // don't process messages emitted from same window\n if(event.source === window) {\n return;\n }\n\n if(!this.isDomain(event.origin)) {\n $log.warn('avMessages rejected a cross domain message since it does not match an *.availity.com or localhost');\n return;\n }\n\n\n var data = event.data;\n\n try {\n data = angular.fromJson(data);\n } catch(err) {\n $log.warn('avMessages.onMessage() failed to convert event to json payload');\n }\n\n if(_.isString(data)) {\n event = data;\n data = null;\n }else {\n event = data.event ? data.event : AV_MESSAGES.AV_RECEIVED;\n }\n\n $rootScope.$root.$broadcast(event, data);\n\n };\n\n proto.isIframe = function() {\n return window.self !== window.parent;\n };\n\n proto.domain = function() {\n\n var window = root;\n\n if(window.location.origin) {\n return window.location.origin;\n }\n\n if(window.location.hostname) {\n return window.location.protocol + '//' + window.location.hostname + (window.location.port ? ':' + window.location.port : '');\n }\n\n return '*';\n\n };\n\n proto.send = function(payload) {\n\n try {\n\n var message = _.isString(payload) ? payload : JSON.stringify(payload);\n this.postMessage(message, this.domain());\n\n } catch(err) {\n $log.error('avMessages.send() ', err);\n }\n };\n\n proto.postMessage = function(message, domain) {\n window.parent.postMessage(message, domain);\n };\n\n return new AvMessages();\n\n };\n\n });\n\n availity.core.run(function(avMessages) {\n\n if(avMessages.isEnabled()) {\n avMessages.init();\n }\n\n });\n\n})(window);\n\n"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["/source/index.js","/source/strings.js","/source/uuid.js","/source/urls.js","/source/print.js","/source/throttle.js","/source/logger.js","/source/logger-config.js","/source/polling.js","/source/api-factory.js","/source/api-users.js","/source/api-coverages.js","/source/api-configurations.js","/source/api-log-messages.js","/source/api-spaces.js","/source/api-documents.js","/source/api-organizations.js","/source/api-codes.js","/source/api-user-permissions.js","/source/user-authorizations.js","/source/session.js","/source/idle.js","/source/idle-interceptor.js","/source/validator.js","/source/validator-utils.js","/source/validator-size.js","/source/validator-pattern.js","/source/validator-required.js","/source/validator-date-range.js","/source/validator-date-format.js","/source/validator-npi.js","/source/validator-phone.js","/source/validator-email.js","/source/globals.js","/source/analytics.js","/source/analytics-util.js","/source/analytics-splunk.js","/source/analytics-piwik.js","/source/analytics-exceptions.js","/source/analytics-config.js","/source/date-polyfill.js","/source/messages-constants.js","/source/messages.js"],"names":["root","availity","VERSION","MODULE","core","angular","module","originalModule","modules","name","deps","_","indexOf","window","__karma__","Error","push","exports","_stringify","object","isBlank","str","test","uid","uuid","prefix","index","length","digit","charCodeAt","join","String","fromCharCode","unshift","REGEX_API_URL","getRelativeUrl","url","result","match","print","document","queryCommandSupported","execCommand","focus","constant","OPTIONS","wait","update","trailing","leading","factory","AV_THROTTLE","$timeout","fn","options","merge","THRESHOLD","isDefined","UPDATE","timer","context","this","args","arguments","apply","later","provider","_enabled","enabled","$get","$injector","AvLogger","$delegate","$log","proto","prototype","supplant","supplantData","_supplant","key","replace","isObject","element","elemStr","isUndefined","constructor","toString","getFormattedTimestamp","date","getHours","getMinutes","getSeconds","getMilliseconds","_log","originalFn","hash","location","now","Date","message","stack","errorMessage","formatError","get","params","log","info","warn","debug","arg","sourceURL","line","error","config","$provide","decorator","INTERVAL","MAX_ELAPSED_TIME","MAX_RETRY","DECAY","EVENTS","REGEX_URL","PollingServiceFactory","$rootScope","$q","AV_POLLING","AV_API","AvPollingService","pendingRequests","response","isAsyncResponse","onAsyncReponse","when","setDefaults","defaultOptions","pollingInterval","pollingDecay","pollingMaxInterval","pollingRetryCount","pollingStartTime","getTime","extend","responseError","reject","api","status","isFunction","headers","HEADERS","SERVER","LOCATION","deferred","defer","queueRequest","notify","promise","getUrl","self","_url","_config","method","pollingMaxRetry","_pollingDecay","cache","request","id","timeout","getPollingTimeout","retryRequest","pushRequest","popRequest","i","splice","isPollingMaxTimeout","elaspedTime","isElapsed","isMaxRetried","isPollable","_isTimeout","_isMax","cancel","increment","successCallback","resolve","errorCallback","$http","then","incrementCounter","incrementDecay","clearRequests","forEach","ID","STATUS","GLOBAL_ID","CLIENT","SESSION_ID","AUTH","OVERRIDE","CALLBACK_URL","CUSTOMER_ID","RESPONSE_ENCODING","path","resourceGroup","version","level","suffix","X-Response-Encoding-Context","ApiResourcesProvider","setOptions","getOptions","copy","setHttpCommonHeaders","$httpProvider","defaults","common","avPollingService","AvApiResource","isString","charAt","_cacheBust","cacheBust","_getUrl","_getApiUrl","_createResponse","data","_request","afterCallback","success","_response","_promise","successResponse","call","errorResponse","notifyResponse","always","normalize","joined","slice","create","beforeCreate","afterCreate","afterGet","query","afterQuery","isNumber","beforeUpdate","afterUpdate","remove","afterRemove","UserServiceFactory","AvUsersResource","user","me","LogMessagesFactory","AvLogMessagesResource","buildRequest","entries","requestPayload","SpacesFactory","AvDocumentsResourceFactory","AvDocumentsResource","getContents","getContentsUrl","OrganizationResourceFactory","OrganizationResource","getOrganizations","organizations","AvCodesResourceFactory","AvCodesResource","getCodes","page","offset","list","q","results","codes","has","each","code","moreVal","totalCount","limit","more","AvUserPermissionsResourceFactory","AvUserPermissionsResource","sessionDate","moment","toISOString","axiUserPermissions","getPermissions","permissionIds","region","permissionId","AvUserAuthorizationsFactory","avUserPermissionsResource","AvUserAuthorizations","setRegion","setPermissionIds","isArray","isAuthorized","getPermission","permission","isAnyAuthorized","permissions","findWhere","undefined","_permissions","union","toPermissionMap","getPayers","organizationId","organization","resources","map","toPermission","description","geographies","SESSION_TIMEOUT","NOT_AUTHORIZED","avUsersResource","AvSession","getUser","destroy","permisions","IDLE_INACTIVE","IDLE_ACTIVE","SESSION_TIMEOUT_ACTIVE","SESSION_TIMEOUT_REDIRECT","HUMAN","MACHINE","INTERVALS","PING","IDLE","SESSION","URLS","HOME","AV_IDLE","pingUrl","redirectUrl","sessionTimeout","idleTimeout","pingTimeout","enable","value","setSessionTimeout","setIdleTimeout","setPingTimeout","setPingUrl","$document","avThrottle","AvIdle","_idleTimer","_sessionTimer","_pingTimer","_keepAlive","idleActive","sessionActive","listeners","init","stop","start","listener","setRedirectUrl","$on","find","on","event","onEvent","oldUrl","newUrl","href","startIdleTimer","startSessionTimer","off","stopPing","stopSessionTimer","stopIdleTimer","isEnabled","isApiRequest","$broadcast","startPing","keepAlive","avIdle","interceptors","classes","valid","invalid","dirty","pristine","touched","untouched","submitted","validators","REVALIDATE","SUBMITTED","FAILED","RESET","DEBOUNCE","DATE_FORMAT","SIMPLE","PATTERNS","ALPHA_ONLY","NUMERIC_ONLY","rules","services","addRules","_rules","addValidators","_validators","concat","avValConfig","AV_VAL","AvValidation","initValidators","addValidator","validator","validate","ruleName","ruleConfig","contraints","el","violations","_valid","rule","contraintName","validationResult","field","isValid","all","isEmpty","$","trim","avValUtils","min","max","type","toLowerCase","isNull","parseInt","REGEX","asRegExp","pattern","RegExp","values","expresion","ctrl","$isEmpty","getStartDate","setMin","add","units","getEndDate","end","setMax","set","validation","startDate","endDate","format","isBetween","isSame","INTEGER_REGEX","npi","firstDigit","substring","alternate","total","next","roundUp","Math","ceil","calculatedCheck","avValPattern","PHONE_PATTERN","EMAIL_PATTERN","REGIONS","AV_ANALYTICS","VIRTUAL_PAGE_TRACKING","SERVICES","PIWIK","SPLUNK","PAGE","DEFAULT","PRE_FIX","IGNORE","ENV","PROD","DOMAIN","URL","QA","avAnalyticsConfigProvider","avAnalyticsConfig","plugins","virtualPageTracking","appId","registerPlugins","_plugins","setVirtualPageTracking","isVirtualPageTracking","setAppID","$location","AvAnalytics","plugin","err","trackPageView","absUrl","handler","trackEvent","properties","promises","getAppId","AnalyticsUtils","getProperties","attributes","props","isValidAttribute","isNotIgnored","getAttribute","isExternalLink","attrs","ngClick","ignored","includes","lowercase","substr","simpleKey","toNum","parsed","isNaN","trackingValues","toUpperCase","avLogMessagesResource","SplunkAnalyticsService","$$absUrl","siteId","customVariables","_setCustomVariable","valueName","scope","setSiteID","_siteID","setVisitVariables","items","item","setPageVariables","avAnalyticsUtils","AvPiwikAnalytics","_paq","category","action","label","isFinite","$$host","variable","getScript","MESSAGES","NOT_APPLICABLE","TYPES","EXCEPTION","REPEAT_LIMIT_TIME","setAppId","_id","AV_EXCEPTIONS","AvExceptionAnalytics","TraceKit","remoteFetching","surroundingLinesToCollect","report","subscribe","stacktrace","onError","messageTimestampMap","prettyPrint","padLeft","func","column","userAgent","navigator","errorDate","errorName","errorStack","userLanguage","referrer","host","domain","screenWidth","width","screenHeight","height","sdkVersion","exception","_isRepeatError","computeStackTrace","timestamp","lastTimestamp","isRepeat","diff","cause","errorTacking","run","avExceptionAnalytics","analytics","avAnalytics","pad","number","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","toFixed","MESSAGE","RESIZE","UNLOAD","AV_RESIZE","AV_RECEIVED","AV_MAXIMIZE","AV_MINIMIZE","AV_LOGIN","AV_LOGOUT","AV_SESSION_TIMEOUT","RESIZE_DEBOUNCE","LOCAL","AV_MESSAGES","AvMessages","$window","onMessage","onResize","send","resize","debounce","isDomain","_event","originalEvent","source","origin","fromJson","$root","isIframe","parent","hostname","protocol","port","payload","JSON","stringify","postMessage","avMessages"],"mappings":";;;;;CAEA,SAAAA,MAEA,YAEA,IAAAC,UAAAD,KAAAC,YACAA,UAAAC,QAAA,SACAD,UAAAE,OAAA,UACAF,UAAAG,KAAAC,QAAAC,OAAAL,SAAAE,QAAA,MAEA,IAAAI,gBAAAF,QAAAC,MACA,IAAAE,WAEAH,SAAAC,OAAA,SAAAG,KAAAC,MAEA,GAAAA,MAAAC,EAAAC,QAAAJ,QAAAC,SAAA,IAAAI,OAAAC,UAAA,CACA,KAAA,IAAAC,OAAA,sBAAAN,MAGAD,QAAAQ,KAAAP,KAEA,OAAAF,gBAAAE,KAAAC,MAGAV,MAAAC,SAAAA,QAEA,UAAAK,UAAA,aAAAA,OAAAW,QAAA,CACAX,OAAAW,QAAAhB,YAGAY,SC/BA,SAAAb,MAEA,YAEA,IAAAC,UAAAD,KAAAC,QAGAA,UAAAiB,WAAA,SAAAC,QACA,GAAAA,SAAA,KAAA,CACA,MAAA,GAEA,MAAA,GAAAA,OAIAlB,UAAAmB,QAAA,SAAAC,KACA,MAAA,QAAAC,KAAArB,SAAAiB,WAAAG,SAGAR,SCnBA,SAAAb,MAEA,YAEA,IAAAC,UAAAD,KAAAC,QAEA,IAAAsB,MAAA,IAAA,IAAA,IAEAtB,UAAAuB,KAAA,SAAAC,QACA,GAAAC,OAAAH,IAAAI,MACA,IAAAC,MAEA,OAAAF,MAAA,CACAA,OACAE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A9I,IAEA,KACAA,KAAA3N,QAAAynB,SAAA9Z,MACA,MAAAuR,KACA9a,KAAAkC,KAAA,kEAGA,GAAAhG,EAAA8M,SAAAO,MAAA,CACA8I,MAAA9I,IACAA,MAAA,SACA,CACA8I,MAAA9I,KAAA8I,MAAA9I,KAAA8I,MAAAmQ,YAAAR,YAGA9e,WAAAogB,MAAApQ,WAAAb,MAAA9I,MAIAtJ,OAAAsjB,SAAA,WACA,MAAAnnB,QAAAgJ,OAAAhJ,OAAAonB,OAGAvjB,OAAA8f,OAAA,WAEA,GAAA3jB,QAAAb,IAEA,IAAAa,OAAAmF,SAAA6hB,OAAA,CACA,MAAAhnB,QAAAmF,SAAA6hB,OAGA,GAAAhnB,OAAAmF,SAAAkiB,SAAA,CACA,MAAArnB,QAAAmF,SAAAmiB,SAAA,KAAAtnB,OAAAmF,SAAAkiB,UAAArnB,OAAAmF,SAAAoiB,KAAA,IAAAvnB,OAAAmF,SAAAoiB,KAAA,IAGA,MAAA,IAIA1jB,OAAA4iB,KAAA,SAAAe,SAEA,IAEA,GAAAliB,SAAAxF,EAAA8M,SAAA4a,SAAAA,QAAAC,KAAAC,UAAAF,QACAxkB,MAAA2kB,YAAAriB,QAAAtC,KAAA2gB,UAEA,MAAAjF,KACA9a,KAAAuC,MAAA,qBAAAuY,MAIA7a,OAAA8jB,YAAA,SAAAriB,QAAAqe,QACA3jB,OAAAonB,OAAAO,YAAAriB,QAAAqe,QAGA,OAAA,IAAA0C,cAMAjnB,UAAAG,KAAAmlB,IAAA,SAAAkD,YAEA,GAAAA,WAAAhR,YAAA,CACAgR,WAAAnS,YAKAzV","file":"availity-angular.min.js","sourcesContent":["/*global module*/\n\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity || {};\n availity.VERSION = 'v0.0.0';\n availity.MODULE = 'availity';\n availity.core = angular.module(availity.MODULE, ['ng']);\n\n var originalModule = angular.module;\n var modules = [];\n\n angular.module = function(name, deps) {\n\n if(deps && _.indexOf(modules, name) !== -1 && !window.__karma__) {\n throw new Error('redefining module: ' + name);\n }\n\n modules.push(name);\n\n return originalModule(name, deps);\n };\n\n root.availity = availity;\n\n if(typeof module !== 'undefined' && module.exports) {\n module.exports = availity;\n }\n\n})(window);\n\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n // https://github.com/epeli/underscore.string/blob/cebddf40cf2e10f0e9b596d9654edd0a1cfefc15/helper/makeString.js\n availity._stringify = function(object) {\n if(object === null) {\n return '';\n }\n return '' + object;\n };\n\n // https://github.com/epeli/underscore.string/blob/cebddf40cf2e10f0e9b596d9654edd0a1cfefc15/isBlank.js\n availity.isBlank = function(str) {\n return (/^\\s*$/).test(availity._stringify(str));\n };\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var uid = ['0', '0', '0'];\n\n availity.uuid = function(prefix) {\n var index = uid.length;\n var digit;\n\n while(index) {\n index--;\n digit = uid[index].charCodeAt(0);\n if(digit === 57 /*'9'*/) {\n uid[index] = 'A';\n return prefix ? prefix + uid.join('') : uid.join('');\n }\n if(digit === 90 /*'Z'*/) {\n uid[index] = '0';\n } else {\n uid[index] = String.fromCharCode(digit + 1);\n return prefix ? prefix + uid.join('') : uid.join('');\n }\n }\n uid.unshift('0');\n return prefix ? prefix + uid.join('') : uid.join('');\n };\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.REGEX_API_URL = /^.*?api.availity.com(.*)$/;\n\n availity.getRelativeUrl = function(url) {\n var result = url.match(availity.REGEX_API_URL);\n if(result && result[1]) {\n return '/api' + result[1];\n }\n\n return url;\n };\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n // https://github.com/jasonday/printThis/commit/66f9cbd0e3760767342eed4ef32cf8294417b227\n availity.print = function() {\n\n if(document.queryCommandSupported('print')) {\n document.execCommand('print', false, null);\n } else {\n window.focus();\n window.print();\n }\n };\n\n})(window);\n","// Original => https://github.com/mgcrea/angular-strap/blob/master/src/helpers/debounce.js\n\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_THROTTLE', {\n OPTIONS: {\n wait: 1000,\n update: false,\n trailing: true,\n leading: false\n }\n });\n\n availity.core.factory('avThrottle', function(AV_THROTTLE, $timeout) {\n\n return function(fn, wait, options) {\n\n options = _.merge({}, AV_THROTTLE.OPTIONS, options);\n\n wait = wait ? wait : AV_THROTTLE.THRESHOLD;\n var update = angular.isDefined(options.update) ? options.update : AV_THROTTLE.UPDATE;\n var timer = null;\n\n return function() {\n var context = options.context || this;\n var args = arguments;\n\n if(!timer) {\n if(options.leading !== false) {\n fn.apply(context, args);\n }\n\n var later = function() {\n timer = null;\n if(options.trailing !== false) {\n fn.apply(context, args);\n }\n };\n\n timer = $timeout(later, wait, update);\n }\n\n return timer;\n\n };\n };\n });\n\n})(window);\n","// Orginal => https://github.com/ericzon/angular-ny-logger/blob/0c594e864c93e7f33d36141200096bc6139ddde1/angular-ny-logger.js\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.provider('AvLogger', function() {\n\n var _enabled = false;\n\n this.enabled = function(enabled) {\n _enabled = !!enabled;\n };\n\n this.$get = function($injector) {\n\n var AvLogger = function(context, $delegate) {\n\n this.context = context || '';\n this.$log = $delegate;\n\n };\n\n var proto = AvLogger.prototype;\n\n AvLogger.supplant = function(str, supplantData) {\n if (!supplantData) {\n return str;\n }\n\n var _supplant = function (match, key) {\n var result = supplantData[key];\n return result;\n };\n\n return str.replace(/\\{([^{}]*)\\}/g, _supplant);\n };\n\n AvLogger.isObject = function(element) {\n var elemStr = ( !angular.isUndefined(element) && !angular.isUndefined(element.constructor) ) ? element.constructor.toString() : '';\n return (elemStr.indexOf('Object') > -1);\n };\n\n AvLogger.getFormattedTimestamp = function(date) {\n\n return AvLogger.supplant('{0}:{1}:{2}:{3}', [\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds()\n ]);\n\n };\n\n proto._log = function(originalFn, args) {\n\n // Allow enabling logger through query params\n // Ex:\n //\n // http://localhost:3000/ui.html#avLogger\n\n var hash = window.location.hash;\n hash = hash || '';\n\n if(!_enabled && hash.indexOf('avLogger') < 0 && originalFn !== 'error') {\n return;\n }\n\n var now = AvLogger.getFormattedTimestamp(new Date());\n var message = '';\n var supplantData = [];\n\n var context = this.context ? ' [' + this.context + '] ' : '';\n\n switch(args.length) {\n case 1:\n // (1) If the user supplied one argument, then the argument must be\n // the message itself and _log()\n // will print: - : \n supplantData = args[0];\n message = AvLogger.supplant('{0}{1} - {2}', [now, context, args[0]]);\n break;\n case 3:\n // (3) If the user supplied three arguments, then the first argument\n // is a method name, the second is the message and the third is an\n // object of variables to interpolate with the message. For this, _log()\n // will print: - - ('')\n supplantData = args[2];\n message = AvLogger.supplant(\"{0}{1} - {2}(\\'{3}\\')\", [now, context, args[0], args[1]]);\n break;\n case 2:\n // (2) If the user provided two arguments, we need to find out whether\n // they supplied a method name or an interpolation object.\n // In order to figure that out, we’ll check the type of the last argument.\n // If it is a string, then it has to be the message itself while the\n // first argument is the method name. Otherwise consider the first argument\n // as the message and the second as array of interpolation variables.\n // The output print will be according to this check.\n if(typeof args[1] === 'string') {\n\n message = AvLogger.supplant(\"{0}{1} - {2}(\\'{3}\\')\", [now, context, args[0], args[1]]);\n\n } else {\n\n // If the message is an error, there may be a stack included. If so, we\n // should include the stack in the message to make it more meaningful.\n if(args[0].stack) {\n var errorMessage = this.formatError(args[0]);\n message = AvLogger.supplant('{0}{1} - {2}', [now, context, errorMessage]);\n supplantData = args[1];\n\n }else {\n supplantData = args[1];\n\n }\n\n }\n break;\n }\n\n var $log = this.$log || $injector.get('$log');\n\n var params = (AvLogger.isObject(supplantData)) ? [message, supplantData] : [AvLogger.supplant(message, supplantData)];\n $log[originalFn].apply(null, params);\n\n };\n\n proto.log = function() {\n this._log('log', arguments);\n };\n\n proto.info = function() {\n this._log('info', arguments);\n };\n\n proto.warn = function() {\n this._log('warn', arguments);\n };\n\n proto.debug = function() {\n this._log('debug', arguments);\n };\n\n // https://github.com/angular/angular.js/blob/v1.2.27/src/ng/log.js#L122\n proto.formatError = function(arg) {\n if(arg instanceof Error) {\n if(arg.stack) {\n\n arg = (arg.message && arg.stack.indexOf(arg.message) === -1) ?\n 'Error: ' + arg.message + '\\n' + arg.stack : arg.stack;\n\n } else if(arg.sourceURL) {\n arg = arg.message + '\\n' + arg.sourceURL + ':' + arg.line;\n }\n }\n return arg;\n };\n\n proto.error = function() {\n this._log('error', arguments);\n };\n\n return AvLogger;\n\n };\n\n });\n\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.config(function($provide) {\n\n $provide.decorator('$log', function($delegate, AvLogger) {\n return new AvLogger(null, $delegate);\n });\n\n });\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_POLLING', {\n INTERVAL: 1000, // delay in ms before retrying an async request\n MAX_ELAPSED_TIME: 5000, // max time in ms before polling stops and rejects original request\n MAX_RETRY: 30, // # of times the request will be tried\n DECAY: 1.2, // % the polling interval decays after every retry\n // maximum time polling is allowed before rejecting the request\n EVENTS: {\n MAX_RETRY: 'av:polling:max:retry'\n },\n REGEX_URL: /^.*?api.availity.com(.*)$/ // capture the relative url from API\n });\n\n var PollingServiceFactory = function($rootScope, $q, $injector, $timeout, $log, AV_POLLING, AV_API) {\n\n var AvPollingService = function() {\n this.pendingRequests = []; // stores all request for polling\n };\n\n var proto = AvPollingService.prototype;\n\n proto.response = function(response) {\n\n if(this.isAsyncResponse(response)) {\n return this.onAsyncReponse(response);\n }\n\n return response || $q.when(response);\n };\n\n proto.setDefaults = function(config) {\n\n var defaultOptions = {\n pollingInterval: AV_POLLING.INTERVAL,\n pollingDecay: AV_POLLING.DECAY,\n pollingMaxInterval: AV_POLLING.MAX_ELAPSED_TIME,\n pollingRetryCount: 0,\n pollingStartTime: new Date().getTime()\n };\n\n return _.extend(defaultOptions, config);\n };\n\n proto.responseError = function(response) {\n // Return the promise rejection\n return $q.reject(response);\n };\n\n /**\n * API layer return a link with a polling url for\n * async responses.\n *\n * @param {Object} response ajax response\n * @return {Boolean} true if response has status of 202 (accepted) and location param in header with uri+session link\n */\n proto.isAsyncResponse = function(response) {\n\n return response &&\n response.config &&\n response.config.api &&\n response.status &&\n response.status === 202 &&\n angular.isFunction(response.headers) && !availity.isBlank(response.headers(AV_API.HEADERS.SERVER.LOCATION));\n };\n\n proto.onAsyncReponse = function(response) {\n\n response.config = this.setDefaults(response.config);\n\n var deferred = $q.defer();\n\n this.queueRequest(deferred, response);\n\n // [rm3]: Can't call notify before you return promise object?\n $timeout(function() {\n // Notify deferred listeners with the original server response\n deferred.notify(response);\n }, 0, false);\n\n return deferred.promise;\n };\n\n proto.getUrl = function(url) {\n\n var result = url.match(AV_POLLING.REGEX_URL);\n if(result && result[1]) {\n return '/api' + result[1];\n }\n\n return url;\n };\n\n proto.queueRequest = function(deferred, response) {\n\n var self = this;\n // server replies with location header so set the url into config\n var _url = availity.getRelativeUrl(response.headers(AV_API.HEADERS.SERVER.LOCATION));\n var _config = response.config;\n\n\n // headers – {Object} – Map of strings or functions which return strings representing HTTP headers\n // to send to the server. If the return value of a function is null, the header\n // will not be sent. Functions accept a config object as an argument.\n var config = {\n method: 'GET',\n api: true,\n headers: _config.headers,\n pollingInterval: _config.pollingInterval,\n pollingMaxRetry: _config.pollingMaxRetry,\n pollingMaxInterval: _config.pollingMaxInterval,\n pollingStartTime: _config.pollingStartTime,\n _pollingDecay: _config._pollingDecay,\n pollingRetryCount: _config.pollingRetryCount,\n pollingDecay: _config.pollingDecay,\n url: _url, /* set the url from the server response */\n cache: false\n };\n\n var request = {\n id: availity.uuid('request-'),\n config: config,\n deferred: deferred\n };\n\n var timeout = this.getPollingTimeout(config);\n\n // each async request should run on its own timer\n var timer = $timeout(function() {\n self.retryRequest(request.id);\n }, timeout, false);\n\n request.timer = timer;\n\n // add the async request to the queue\n this.pushRequest(request);\n\n };\n\n proto.popRequest = function(id) {\n\n var index = null;\n var request = null;\n\n for(var i = 0; i < this.pendingRequests.length; i++) {\n if(this.pendingRequests[i].id === id) {\n index = i;\n break;\n }\n }\n\n request = this.pendingRequests[index];\n this.pendingRequests.splice(index, 1);\n\n return request;\n };\n\n proto.pushRequest = function(request) {\n this.pendingRequests.push(request);\n };\n\n proto.getPollingTimeout = function(config) {\n return config.pollingDecay * config.pollingInterval;\n };\n\n proto.isPollingMaxTimeout = function(config) {\n var now = new Date().getTime();\n var elaspedTime = now - config.pollingStartTime;\n var isElapsed = elaspedTime > config.pollingMaxInterval;\n return isElapsed;\n },\n\n proto.isMaxRetried = function(config) {\n return config.pollingRetryCount >= AV_POLLING.MAX_RETRY;\n };\n\n proto.isPollable = function(config) {\n var _isTimeout = this.isPollingMaxTimeout(config);\n var _isMax = this.isMaxRetried(config);\n\n return _isTimeout || _isMax ? false : true;\n\n };\n\n proto.retryRequest = function(id) {\n\n var self = this;\n var request = this.popRequest(id);\n $timeout.cancel(request.timer);\n\n var config = request.config;\n\n var deferred = request.deferred;\n\n if(!this.isPollable(config)) {\n $log.info('Rejecting pollable response due to timeout');\n return deferred.reject(request);\n }\n\n // increment counters and polling timeouts\n this.increment(config);\n\n function successCallback(response) {\n if(self.isAsyncResponse(response)) {\n deferred.notify(response);\n self.queueRequest(request.deferred, response);\n } else {\n deferred.resolve(response);\n }\n }\n\n function errorCallback(response) {\n deferred.reject(response);\n }\n\n // Silly circular dependency trick\n var $http = $injector.get('$http');\n\n $http(config).then(successCallback, errorCallback);\n\n };\n\n proto.increment = function(config) {\n this.incrementCounter(config);\n this.incrementDecay(config);\n };\n\n proto.incrementDecay = function(config) {\n if(!config._pollingDecay) {\n // store the original decay param\n config._pollingDecay = config.pollingDecay;\n }\n config.pollingDecay *= config._pollingDecay;\n };\n\n proto.incrementCounter = function(config) {\n config.pollingRetryCount++;\n };\n\n proto.clearRequests = function() {\n angular.forEach(this.pendingRequests, function(request) {\n $timeout.cancel(request.timer);\n });\n this.pendingRequests = [];\n };\n\n return new AvPollingService();\n\n };\n\n availity.core.factory('avPollingService', PollingServiceFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_API', {\n HEADERS: {\n SERVER: {\n ID: 'X-API-ID',\n LOCATION: 'Location',\n STATUS: 'X-Status-Message',\n GLOBAL_ID: 'X-Global-Transaction-ID'\n },\n CLIENT: {\n SESSION_ID: 'X-Session-ID',\n AUTH: 'Authorization',\n OVERRIDE: 'X-HTTP-Method-Override',\n CALLBACK_URL: 'X-Callback-URL',\n CUSTOMER_ID: 'X-Availity-Customer-ID',\n RESPONSE_ENCODING: 'X-Response-Encoding-Context'\n }\n },\n OPTIONS: {\n // pre-prend the url with a value like `/public` so we can build urls like `public/api/v1/*`\n prefix: '',\n // default base url for endpoints\n path: '/api',\n // url resource group, such as `/foo`, for urls like `public/api/foo/v1/*`\n resourceGroup: '',\n // url to resource endpoint like `coverages` or `payers`\n url: null,\n // defaults to version 1\n version: '/v1',\n // governance level `/internal`\n level: '',\n // post-pend the url with `.json`, `.txt` or `.xml`\n suffix: '',\n // cache all request by default\n cache: true,\n // flag used to enable behaviors around the Availity Rest API\n api: true,\n // # of times the polling service has tried to get a response\n pollingRetryCount: 0,\n // in ms\n pollingInterval: 1000,\n // % the polling interval decays after every retry\n pollingDecay: 1.2,\n // maximum time polling is allowed before rejecting the request\n pollingMaxInterval: 30000,\n // default headers\n headers: {\n // Turn off content encoding for angular apis\n 'X-Response-Encoding-Context': 'NONE'\n }\n }\n });\n\n // Factory that creates ApiResourcess\n var ApiResourcesProvider = function(AV_API) {\n\n // Provider default options that can be overridden at config time\n var defaultOptions = _.merge({}, AV_API.OPTIONS);\n\n // Allow overrides in config phase\n this.setOptions = function(options) {\n _.merge(defaultOptions, options);\n };\n\n this.getOptions = function() {\n return angular.copy(defaultOptions);\n };\n\n // helper method to global set http common headers\n this.setHttpCommonHeaders = function($httpProvider) {\n _.merge($httpProvider.defaults.headers.common, defaultOptions.headers);\n };\n\n /**\n * Main get method for creating new resource\n * @param $http\n * @param $q\n * @param avPollingService\n * @returns {AvApiResource}\n */\n this.$get = function($http, $q, avPollingService) {\n\n var AvApiResource = function(options) {\n\n if (!options) {\n throw new Error('[options] cannot be null or undefined');\n }\n\n // if string the assume url is being passed in\n if (angular.isString(options)) {\n options = options.charAt(0) === '/' ? options : '/' + options;\n options = angular.extend({}, {url: options});\n }\n\n if (!options.url) {\n throw new Error('[url] cannot be null');\n }\n\n // get the default options and merge into this instance\n this.options = angular.extend({}, defaultOptions, (options || {}));\n };\n\n // Alias the prototype\n var proto = AvApiResource.prototype;\n\n proto._config = function(config) {\n return _.merge({}, this.options, (config || {}));\n };\n\n proto._cacheBust = function(config) {\n config.cacheBust = null;\n config.params = config.params || {};\n config.params.cacheBust = new Date().getTime();\n return config;\n };\n\n proto._getUrl = function(id) {\n if (this.options.api) {\n return this._getApiUrl(id);\n }\n\n return this.options.url;\n };\n\n proto._createResponse = function(data, status, headers, config) {\n return {\n data: data,\n status: status,\n headers: headers,\n config: config\n };\n };\n\n proto._request = function(config, afterCallback) {\n\n var self = this;\n var defer = $q.defer();\n\n $http(config)\n .success(function(data, status, headers, _config) {\n\n var _response = {\n data: data,\n status: status,\n headers: headers,\n config: _config\n };\n\n // handle the async response if applicable\n var _promise = $q.when(avPollingService.response(_response));\n // notify the promise listener of the original response\n defer.notify(_response);\n\n // handle the polling service promise\n _promise.then(function(successResponse) {\n\n // if service has a callback then call it\n // var response = self._createResponse(data, status, headers, _config);\n if (afterCallback) {\n successResponse = afterCallback.call(self, successResponse, config.data);\n }\n defer.resolve(successResponse);\n }, function(errorResponse) {\n defer.reject(errorResponse);\n }, function(notifyResponse) {\n defer.notify(notifyResponse);\n });\n\n }).error(function(data, status, headers, _config) {\n var response = self._createResponse(data, status, headers, _config);\n defer.reject(response);\n });\n\n var promise = defer.promise;\n\n // recreate the success callback ala $http\n promise.success = function(fn) {\n promise.then(function(response) {\n fn(response.data, response.status, response.headers, response.config);\n });\n return promise;\n };\n\n // recreate the error callback ala $http\n promise.error = function(fn) {\n promise.then(null, function(response) {\n fn(response.data, response.status, response.headers, config);\n });\n return promise;\n };\n\n promise.always = promise['finally'];\n\n return promise;\n };\n\n proto.normalize = function(url) {\n return url\n .replace(/[\\/]+/g, '/')\n .replace(/\\/$/, '');\n };\n\n proto.join = function() {\n var joined = [].slice.call(arguments, 0).join('/');\n return this.normalize(joined);\n };\n\n proto._getApiUrl = function(id) {\n\n id = id ? '/' + id : '';\n\n var url = this.join(\n this.options.prefix,\n this.options.path,\n this.options.level,\n this.options.resourceGroup,\n this.options.version,\n this.options.url,\n id);\n\n return url + this.options.suffix;\n };\n\n proto.create = function(data, config) {\n\n if (!data) {\n throw new Error('called method without [data]');\n }\n\n if (this.beforeCreate) {\n data = this.beforeCreate(data);\n }\n\n config = this._config(config);\n config.method = 'POST';\n config.url = this._getUrl();\n config.data = data;\n\n return this._request(config, this.afterCreate);\n\n };\n\n proto.get = function(id, config) {\n\n if (!id) {\n throw new Error('called method without [id]');\n }\n\n config = this._config(config);\n if (config.cacheBust) {\n config = this._cacheBust(config);\n }\n config.method = 'GET';\n config.url = this._getUrl(id);\n\n return this._request(config, this.afterGet);\n\n };\n\n proto.query = function(config) {\n\n config = this._config(config);\n if (config.cacheBust) {\n config = this._cacheBust(config);\n }\n config.method = 'GET';\n config.url = this._getUrl();\n\n return this._request(config, this.afterQuery);\n\n };\n\n proto.update = function(id, data, config) {\n\n var url;\n\n if (_.isString(id) || _.isNumber(id)) {\n url = this._getUrl(id);\n } else {\n url = this._getUrl();\n // At this point the function signature becomes:\n //\n // proto.update = function(data, config) {} a.k.a function(id, data)\n //\n config = data; // config is really the 2nd param\n data = id; // data is really the first param\n }\n\n if (this.beforeUpdate) {\n data = this.beforeUpdate(data);\n }\n\n config = this._config(config);\n config.method = 'PUT';\n config.url = url;\n config.data = data;\n\n return this._request(config, this.afterUpdate);\n\n };\n\n proto.remove = function(id, config) {\n\n var url;\n var data;\n\n if (_.isString(id) || _.isNumber(id)) {\n url = this._getUrl(id);\n } else {\n // At this point the function signature becomes:\n //\n // proto.remove = function(data, config)\n //\n url = this._getUrl();\n data = id;\n }\n\n config = this._config(config);\n config.method = 'DELETE';\n config.url = url;\n config.data = data;\n\n return this._request(config, this.afterRemove);\n };\n\n proto.beforeCreate = null;\n proto.afterCreate = null;\n proto.afterQuery = null;\n proto.afterGet = null;\n proto.beforeUpdate = null;\n proto.afterUpdate = null;\n proto.afterRemove = null;\n\n return AvApiResource;\n };\n\n };\n\n availity.core.provider('AvApiResource', ApiResourcesProvider);\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n var UserServiceFactory = function(AvApiResource) {\n\n var AvUsersResource = function() {\n AvApiResource.call(this, 'users');\n };\n\n angular.extend(AvUsersResource.prototype, AvApiResource.prototype, {\n\n afterGet: function(response) {\n var user = response.data.user ? response.data.user : response.data;\n return user;\n },\n\n me: function(config) {\n return this.get('me', config);\n }\n\n });\n\n return new AvUsersResource();\n\n };\n\n availity.core.factory('avUsersResource', UserServiceFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avCoveragesResource', function(AvApiResource) {\n return new AvApiResource({version: '/v1', url: '/configurations', cache: false});\n });\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avConfigurationsResource', function(AvApiResource) {\n return new AvApiResource({version: '/v1', url: '/configurations'});\n });\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var LogMessagesFactory = function(AvApiResource) {\n\n var AvLogMessagesResource = function() {\n\n AvApiResource.call(this, {\n version: '/v1',\n url: '/log-messages'\n });\n };\n\n angular.extend(AvLogMessagesResource.prototype, AvApiResource.prototype, {\n\n buildRequest: function(level, entries) {\n\n var requestPayload = {};\n\n if(entries.level) {\n delete entries.level;\n }\n\n requestPayload.level = level;\n requestPayload.entries = entries;\n\n return requestPayload;\n },\n\n debug: function(entries) {\n return this.create(this.buildRequest('debug', entries));\n },\n\n info: function(entries) {\n return this.create(this.buildRequest('info', entries));\n },\n\n warn: function(entries) {\n return this.create(this.buildRequest('warn', entries));\n },\n\n error: function(entries) {\n return this.create(this.buildRequest('error', entries));\n }\n\n });\n\n return new AvLogMessagesResource();\n\n };\n\n availity.core.factory('avLogMessagesResource', LogMessagesFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var SpacesFactory = function(AvApiResource) {\n\n // sdk/platform/v1/spaces/10939061011461209623076300008435\n return new AvApiResource({\n path: '/api/sdk',\n level: '/platform',\n version: '/v1',\n url: '/spaces'\n });\n\n };\n\n availity.core.factory('avSpacesResource', SpacesFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var AvDocumentsResourceFactory = function(AvApiResource) {\n\n var AvDocumentsResource = function() {\n AvApiResource.call(this, 'documents');\n };\n\n angular.extend(AvDocumentsResource.prototype, AvApiResource.prototype, {\n\n getContents: function(id) {\n var config = this._config();\n config.url = this.getContentsUrl(id);\n return this._request(config);\n },\n\n getContentsUrl: function(id) {\n return this._getUrl(id) + '/contents';\n }\n\n });\n\n return new AvDocumentsResource();\n\n };\n\n availity.core.factory('avDocumentsResource', AvDocumentsResourceFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var OrganizationResourceFactory = function(AvApiResource) {\n\n var OrganizationResource = function() {\n AvApiResource.call(this, 'organizations');\n };\n\n angular.extend(OrganizationResource.prototype, AvApiResource.prototype, {\n\n getOrganizations: function(config) {\n return this.query(config).then(function(response) {\n return response.data.organizations ? response.data.organizations : response.data;\n });\n }\n\n });\n\n return new OrganizationResource();\n };\n\n availity.core.factory('avOrganizationsResource', OrganizationResourceFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n\n var availity = root.availity;\n\n availity.core.factory('avCodesResource', function(AvApiResource) {\n return new AvApiResource({version: '/v1', url: '/codes'});\n });\n\n var AvCodesResourceFactory = function(AvApiResource) {\n\n var AvCodesResource = function () {\n AvApiResource.call(this, 'codes');\n };\n\n angular.extend(AvCodesResource.prototype, AvApiResource.prototype, {\n\n getCodes: function (data) {\n\n // config for the api resource query\n var config = {};\n config.params = {};\n\n if(data.page) {\n config.params.offset = 50 * (data.page - 1);\n }\n if(data.offset) {\n config.params.offset = data.offset;\n }\n if(data.list) {\n config.params.list = data.list;\n }\n if(data.q) {\n config.params.q = data.q;\n }\n\n return this.query(config).then(function (response) {\n // Format the response into something select2 can read\n var results = response.data.codes;\n if(results && !_.has(results[0], 'id')) {\n _.each(results, function (code) {\n code.id = code.code;\n });\n }\n\n // calculate if we want to continue searching\n var moreVal = response.data.offset < response.data.totalCount - response.data.limit;\n return {\n more: moreVal,\n results: results\n };\n\n });\n }\n\n });\n\n return new AvCodesResource();\n\n };\n\n availity.core.factory('avCodesResource', AvCodesResourceFactory);\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n var AvUserPermissionsResourceFactory = function(AvApiResource) {\n\n var AvUserPermissionsResource = function() {\n AvApiResource.call(this, {\n level: '/internal',\n version: '/v1',\n url: '/axi-user-permissions'\n });\n this.sessionDate = moment().toISOString();\n };\n\n angular.extend(AvUserPermissionsResource.prototype, AvApiResource.prototype, {\n\n afterQuery: function(response) {\n return response.data.axiUserPermissions ? response.data.axiUserPermissions : [];\n },\n\n getPermissions: function(permissionIds, region) {\n var self = this;\n return this.query({\n params: {\n permissionId: permissionIds,\n region: region,\n sessionDate: self.sessionDate\n }\n });\n }\n\n });\n\n return new AvUserPermissionsResource();\n\n };\n\n availity.core.factory('avUserPermissionsResource', AvUserPermissionsResourceFactory);\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n var AvUserAuthorizationsFactory = function($q, $log, avUserPermissionsResource) {\n\n /**\n *\n * @constructor\n */\n var AvUserAuthorizations = function() {\n /**\n * Region is used to return permission/resources relative to region. If null service will\n * return all permission relative to current. If value 'ALL' used it will return value relative\n * to all regions the user has access to.\n * @type {string}\n */\n this.region = null;\n /**\n * PermissionIds contains the set of permissionIds to request from service. If user of service calls\n * setPermissionIds() or call getPermissions() with complete set of permissionIds needed by application,\n * then service should only make that one hit to retrieve permission information.\n * @type {Array}\n */\n this.permissionIds = [];\n };\n\n var proto = AvUserAuthorizations.prototype;\n\n proto.setRegion = function(region) {\n this.region = region;\n return this;\n };\n\n proto.setPermissionIds = function(permissionIds) {\n if(!angular.isArray(permissionIds)) {\n throw new Error('permissionsIds must be an array of string IDs for avUserAuthorizations#addPermissionIds');\n }\n this.permissionIds = permissionIds;\n return this;\n };\n\n proto.isAuthorized = function(permissionId) {\n return this.getPermission(permissionId).then(function(permission) {\n return permission.isAuthorized;\n });\n };\n\n proto.isAnyAuthorized = function(permissionIds) {\n return this.getPermissions(permissionIds).then(function(permissions) {\n var permission = _.findWhere(permissions, {isAuthorized: true});\n return permission !== undefined;\n });\n };\n\n proto.getPermission = function(permissionId) {\n if(!angular.isString(permissionId)) {\n throw new Error('permissionsId must be a string ID for avUserAuthorizations#getPermission');\n }\n\n return this.getPermissions([permissionId])\n .then(function(_permissions) {\n return _permissions[permissionId];\n });\n };\n\n proto.getPermissions = function(permissionIds) {\n var self = this;\n\n if(!angular.isArray(permissionIds)) {\n throw new Error('permissionsIds must be an array of string IDs for avUserAuthorizations#getPermissions');\n }\n // merge permission ids to reduce calls to backend\n self.permissionIds = _.union(self.permissionIds, permissionIds);\n\n return avUserPermissionsResource\n .getPermissions(self.permissionIds, self.region)\n .then(function(_permissions) {\n return self.toPermissionMap(permissionIds, _permissions);\n });\n };\n\n proto.getOrganizations = function(permissionId) {\n return this.getPermission(permissionId).then(function(permission) {\n return permission.organizations;\n });\n };\n\n proto.getPayers = function(permissionId, organizationId) {\n return this.getPermission(permissionId).then(function(permission) {\n var organization = _.findWhere(permission.organizations, {id: organizationId});\n\n if(organization && organization.resources) {\n return organization.resources;\n }\n return [];\n });\n\n };\n\n /**\n * Converts array permissions to map with value for each permissionId, creating empty permission\n * if can't find permission in array\n * @private\n */\n proto.toPermissionMap = function(permissionIds, permissions) {\n var self = this;\n var map = {};\n permissions = _.slice(permissions);\n _.forEach(permissionIds, function(permissionId) {\n var key = {id: permissionId};\n var permission = _.findWhere(permissions, key);\n permission = permission ? self.toPermission(permission) : self.toPermission(key);\n map[permission.id] = permission;\n });\n return map;\n };\n\n /**\n * Convert a permission resource into a structure that is easier to work with.\n * @private\n */\n proto.toPermission = function(permission) {\n return {\n id: permission.id,\n description: permission.description ? permission.description : '',\n geographies: permission.geographies ? permission.geographies : [],\n organizations: permission.organizations ? permission.organizations : [],\n isAuthorized: permission.organizations ? permission.organizations.length > 0 : false\n };\n };\n\n return new AvUserAuthorizations();\n\n };\n\n availity.core.factory('avUserAuthorizations', AvUserAuthorizationsFactory);\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_SESSION', {\n SESSION_TIMEOUT: 'av:auth:session:timeout',\n NOT_AUTHORIZED: 'av:auth:not:authorized'\n });\n\n availity.core.factory('avSession', function($q, avUsersResource) {\n\n var AvSession = function() {\n this.user = null;\n this.permissions = null;\n };\n\n var proto = AvSession.prototype;\n\n proto.getUser = function() {\n var self = this;\n\n if(this.user) {\n return $q.when(this.user);\n }\n\n return avUsersResource.me().then(function(user) {\n self.user = user;\n return self.user;\n });\n };\n\n\n proto.destroy = function() {\n this.user = null;\n this.permisions = null;\n };\n\n return new AvSession();\n });\n\n})(window);\n","// Inspiration => https://github.com/HackedByChinese/ng-idle\n//\n// Rules:\n//\n// * ping after 3 minutes from last human activity\n// * reset session after api success except 401\n// * idle show after 25 of inactivity\n//\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_IDLE', {\n EVENTS: {\n IDLE_INACTIVE: 'av:idle:inactive',\n IDLE_ACTIVE: 'av:idle:active',\n SESSION_TIMEOUT_ACTIVE: 'av:idle:session:active',\n SESSION_TIMEOUT_REDIRECT: 'av:idle:session:redirect',\n HUMAN: 'keydown.av.idle mousedown.av.idle keydown.av.idle',\n MACHINE: '$locationChangeSuccess'\n },\n INTERVALS: {\n PING: 3 * 60 * 1000, // 3 minutes\n IDLE: 25 * 60 * 1000, // 25 minutes\n SESSION: 30 * 60 * 1000 // 30 minutes\n },\n URLS: {\n HOME: '/availity/web/public.elegant.login',\n PING: '/api/v1/users/me'\n }\n });\n\n availity.core.provider('avIdle', function(AV_IDLE) {\n\n var enabled = false;\n var pingUrl;\n var redirectUrl;\n var sessionTimeout;\n var idleTimeout;\n var pingTimeout;\n\n this.enable = function(value) {\n if(arguments.length) {\n enabled = !!value;\n }\n return enabled;\n };\n\n this.setSessionTimeout = function(timeout) {\n sessionTimeout = timeout || AV_IDLE.INTERVALS.SESSION;\n };\n\n this.setIdleTimeout = function(timeout) {\n idleTimeout = timeout || AV_IDLE.INTERVALS.IDLE;\n };\n\n this.setPingTimeout = function(timeout) {\n pingTimeout = timeout || AV_IDLE.INTERVALS.PING;\n };\n\n this.setPingUrl = function(url) {\n pingUrl = url || AV_IDLE.URLS.PING;\n };\n\n this.$get = function(AV_IDLE, $log, $document, $rootScope, $timeout, avThrottle, $q, $injector) {\n\n var AvIdle = function() {\n\n // $timeout references\n this._idleTimer = null;\n this._sessionTimer = null;\n this._pingTimer = null;\n this._keepAlive = null;\n\n // flag used to track if the if user is idle or session expired\n this.idleActive = false;\n this.sessionActive = false;\n\n this.listeners = [];\n\n this.init();\n\n };\n\n var proto = AvIdle.prototype;\n\n proto.init = function() {\n\n if(!enabled) {\n this.stop();\n return;\n }\n\n this.start();\n };\n\n proto.start = function() {\n\n $log.info('avIdle start');\n\n var self = this;\n var listener;\n\n !sessionTimeout && this.setSessionTimeout();\n !idleTimeout && this.setIdleTimeout();\n !pingTimeout && this.setPingTimeout();\n !pingUrl && this.setPingUrl();\n !redirectUrl && this.setRedirectUrl();\n\n $rootScope.$on('$destroy', function() {\n self.stop();\n });\n\n $document.find('body').on(AV_IDLE.EVENTS.HUMAN, function(event) {\n self.onEvent(event);\n });\n\n listener = $rootScope.$on(AV_IDLE.EVENTS.MACHINE, function(event, oldUrl, newUrl) {\n if(oldUrl !== newUrl) {\n self.onEvent(event);\n }\n });\n this.listeners.push(listener);\n\n $rootScope.$on(AV_IDLE.EVENTS.SESSION_TIMEOUT_REDIRECT, function() {\n document.location.href = redirectUrl;\n });\n\n this.startIdleTimer();\n this.startSessionTimer();\n };\n\n proto.stop = function() {\n\n $document.find('body').off(AV_IDLE.EVENTS.HUMAN);\n\n // turns off Angular event listeners @see http://stackoverflow.com/a/14898795\n _.each(this.listeners, function(listener) {\n listener();\n });\n\n this.stopPing();\n this.stopSessionTimer();\n this.stopIdleTimer();\n };\n\n proto.isEnabled = function() {\n return enabled;\n };\n\n proto.enable = function(value) {\n if(arguments.length) {\n enabled = !!value;\n }\n\n return this;\n };\n\n proto.setSessionTimeout = function(timeout) {\n sessionTimeout = timeout || AV_IDLE.INTERVALS.SESSION;\n return this;\n };\n\n proto.setIdleTimeout = function(timeout) {\n idleTimeout = timeout || AV_IDLE.INTERVALS.IDLE;\n return this;\n };\n\n proto.setPingTimeout = function(timeout) {\n pingTimeout = timeout || AV_IDLE.INTERVALS.PING;\n return this;\n };\n\n proto.setPingUrl = function(url) {\n pingUrl = url || AV_IDLE.URLS.PING;\n return this;\n };\n\n proto.setRedirectUrl = function(url) {\n redirectUrl = url || AV_IDLE.URLS.HOME;\n return this;\n };\n\n proto.response = function(response) {\n\n if(this.isApiRequest(response)) {\n this.startSessionTimer();\n }\n\n return response;\n };\n\n proto.isApiRequest = function(response) {\n return response && response.config && response.config.api;\n };\n\n proto.responseError = function(response) {\n\n if(this.isApiRequest(response) && response.status !== 401) {\n this.startSessionTimer();\n }\n\n if(this.isApiRequest() && response.status === 401) {\n this.stopPing();\n }\n\n return $q.reject(response);\n };\n\n proto.startSessionTimer = function() {\n\n var self = this;\n\n this.stopSessionTimer();\n\n var later = function() {\n $log.info('avIdle session has TIMED OUT');\n self.stop();\n $rootScope.$broadcast(AV_IDLE.EVENTS.SESSION_TIMEOUT_ACTIVE);\n };\n\n $log.info('avIdle session timer has STARTED');\n this._sessionTimer = $timeout(later, sessionTimeout, false);\n\n };\n\n proto.stopSessionTimer = function() {\n $log.info('avIdle session timer has STOPPED');\n $timeout.cancel(this._sessionTimer);\n };\n\n proto.startIdleTimer = function() {\n\n var self = this;\n\n this.stopIdleTimer();\n\n var later = function() {\n self.stopIdleTimer();\n $log.info('avIdle is IDLING');\n $rootScope.$broadcast(AV_IDLE.EVENTS.IDLE_ACTIVE);\n };\n\n $log.info('avIdle idle timer has STARTED');\n this._idleTimer = $timeout(later, idleTimeout, false);\n };\n\n proto.stopIdleTimer = function() {\n $log.info('avIdle idle timer has STOPPED');\n $timeout.cancel(this._idleTimer);\n };\n\n proto.startPing = function() {\n\n if(!this._keepAlive) {\n $log.info('avIdle ping timer has STARTED');\n this._keepAlive = avThrottle(this.keepAlive, pingTimeout, {context: this});\n }\n\n this._pingTimer = this._keepAlive();\n };\n\n proto.stopPing = function() {\n $log.info('avIdle ping timer has STOPPED');\n if(this._pingTimer) {\n $timeout.cancel(this._pingTimer);\n }\n };\n\n proto.keepAlive = function() {\n\n // destroy the reference to that a new throttle gets created upon\n // next user or system event\n this._keepAlive = null;\n var $http = $injector.get('$http');\n\n $http.get(pingUrl, {\n cache: false,\n api: true\n }).success(function() {\n $log.info('avIdle keep-alive SUCCESS');\n }).error(function() {\n $log.error('avIdle keep-alive FAILURE');\n });\n };\n\n proto.onEvent = function() {\n this.startIdleTimer();\n this.startPing();\n };\n\n return new AvIdle();\n\n };\n\n });\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avIdleInterceptor', function(avIdle) {\n return {\n response: function(response) {\n return avIdle.response(response);\n },\n responseError: function(response) {\n return avIdle.responseError(response);\n }\n };\n\n });\n\n availity.core.config(function($httpProvider) {\n $httpProvider.interceptors.push('avIdleInterceptor');\n });\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.value('avValConfig', {\n classes: {\n valid: 'ng-valid',\n invalid: 'ng-invalid',\n dirty: 'ng-dirty',\n pristine: 'ng-pristine',\n touched: 'ng-touched',\n untouched: 'ng-untouched',\n submitted: 'ng-submitted'\n },\n validators: [\n 'avValPattern',\n 'avValSize',\n 'avValRequired',\n 'avValDateRange',\n 'avValDate',\n 'avValPhone',\n 'avValEmail',\n 'avValNpi'\n ]\n });\n\n availity.core.constant('AV_VAL', {\n EVENTS: {\n REVALIDATE: 'av:val:revalidate',\n SUBMITTED: 'av:val:submitted',\n FAILED: 'av:val:failed',\n RESET: 'av:val:reset'\n },\n DEBOUNCE: 800,\n DATE_FORMAT: {\n SIMPLE: 'MM/DD/YYYY'\n },\n PATTERNS: {\n ALPHA_ONLY: /[^A-Za-z]+/g,\n NUMERIC_ONLY: /[^0-9]+/g\n }\n });\n\n availity.core.provider('avVal', function() {\n\n var validators = [];\n var rules = {};\n var services = {};\n\n this.addRules = function(_rules) {\n rules = angular.extend({}, rules, _rules);\n return rules;\n };\n\n this.addValidators = function(_validators) {\n validators = validators.concat(_validators);\n return validators;\n };\n\n this.$get = function($injector, $rootScope, $http, $log, avValConfig, AV_VAL) {\n\n var AvValidation = function() {\n this.initValidators();\n };\n\n var proto = AvValidation.prototype;\n\n proto.initValidators = function() {\n var self = this;\n\n validators = avValConfig.validators.concat(validators);\n\n angular.forEach(validators, function(name) {\n self.addValidator(name);\n });\n\n };\n\n proto.addValidator = function(name) {\n var validator = $injector.get(name);\n services[validator.name] = validator;\n };\n\n proto.addRules = function(_rules) {\n rules = angular.extend({}, rules, _rules);\n $rootScope.$broadcast(AV_VAL.EVENTS.REVALIDATE);\n };\n\n proto.validate = function(key, element, value, ruleName) {\n\n var ruleConfig = rules[key];\n if(!ruleConfig) {\n $log.warn('Could not resolve the form rules key [' + key + ']. This can happen when the rules key is inside a promise and the key value has not resolved on page load.');\n return;\n }\n\n var contraints = ruleConfig[ruleName];\n if(!contraints) {\n $log.info('Rule named [' + ruleName + '] could not be found in the current schema.');\n contraints = [];\n }\n\n var el = element[0];\n var results = [];\n var violations = [];\n var _valid = true;\n\n angular.forEach(contraints, function(rule, contraintName) {\n\n if(!rule) {\n // when extended rule sets, a user can pass nulls to cancel out a rule so if\n // one doesn't exist just continue\n return;\n }\n\n var validator = services[contraintName];\n\n if(angular.isUndefined(validator)) {\n $log.warn('No validator defined for `' + name + '`');\n return;\n }\n\n var valid = validator.validate(value, rule, element);\n\n var validationResult = {\n valid: valid,\n ruleName: ruleName,\n contraintName: contraintName,\n value: value,\n message: rule.message,\n field: el.name || el.id\n };\n\n var result = angular.extend({}, rule, validationResult);\n\n results.push(result);\n if(!valid) {\n violations.push(validationResult);\n }\n _valid = _valid && valid;\n\n });\n\n return {\n isValid: _valid,\n all: results, // all the constraint results\n violations: violations\n };\n\n };\n\n return new AvValidation();\n\n };\n\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValUtils', function() {\n\n return {\n\n isDefined: function(value) {\n return angular.isDefined(value) && value !== '' && value !== null;\n },\n\n isEmpty: function(value) {\n return !this.isDefined(value) || $.trim(value) === '';\n }\n };\n\n });\n})(window);\n\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValSize', function(avValUtils) {\n\n var validator = {\n\n name: 'size',\n\n validate: function(value, rule) {\n\n var min = rule.min || 0;\n var max = rule.max;\n var type = rule.type ? rule.type.toLowerCase() : 'text';\n\n if(_.isNull(value) || _.isUndefined(value)) {\n value = '';\n }\n\n if(type === 'text') {\n value = value + '';\n return avValUtils.isEmpty(value) || value.length >= min && (max === undefined || value.length <= max);\n }\n\n // ... must be a Number\n if(!_.isNumber(value) && /^\\d+$/.test(value)) {\n value = parseInt(value, 10);\n }\n\n return avValUtils.isEmpty(value) || value >= min && (max === undefined || value <= max);\n\n }\n };\n\n return validator;\n\n });\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValPattern', function(avValUtils) {\n\n var validator = {\n name: 'pattern',\n REGEX: /^\\/(.*)\\/([gim]*)$/, //regular expression to test a regular expression\n asRegExp: function(pattern) {\n var match;\n\n if(pattern.test) {\n return pattern;\n } else {\n match = pattern.match(validator.REGEX);\n if(match) {\n return new RegExp(match[1], match[2]);\n } else {\n throw ('Expected ' + pattern + ' to be a RegExp');\n }\n }\n },\n validate: function(value, rule) {\n var values = _.isArray(rule.value) ? rule.value : [rule.value];\n\n var valid = false;\n\n _.each(values, function(expresion) {\n var pattern = validator.asRegExp(expresion);\n if(avValUtils.isEmpty(value) || pattern.test(value)) {\n valid = true;\n }\n });\n\n return valid;\n }\n };\n\n return validator;\n\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValRequired', function(avValUtils) {\n\n var validator = {\n name: 'required',\n validate: function(value, rule, element) {\n\n // Using ngModelController.$isEmpty for required checks. A form component being empty is dependent on the\n // type of field:\n //\n // - radio\n // - checkbox\n // - text\n // - lists\n //\n // You can override $isEmpty for input directives whose concept of being empty is different to the\n // default. Radio and checkboxes directive do this because in its case a value of `false`\n // implies empty.\n //\n var ctrl = element && element.data('$ngModelController');\n if(ctrl) {\n return !ctrl.$isEmpty(value);\n }\n\n return !avValUtils.isEmpty(value);\n\n }\n };\n\n return validator;\n\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValDateRange', function(AV_VAL, avValUtils) {\n\n var validator = {\n\n name: 'dateRange',\n\n getStartDate: function(start) {\n return validator.setMin(moment().add(start.value, start.units));\n },\n\n getEndDate: function(end) {\n return validator.setMax(moment().add(end.value, end.units) );\n },\n\n setMin: function(value) {\n\n // [fix]: if time is provided this may cause issues.\n value.set('hours', 0);\n value.set('minutes', 0);\n value.set('seconds', 0);\n\n return value;\n },\n\n setMax: function(value) {\n\n // [fix]: if time is provided this may cause issues.\n value.set('hours', 23);\n value.set('minutes', 59);\n value.set('seconds', 59);\n\n return value;\n },\n\n validation: function(value, rules) {\n\n var date;\n var startDate;\n var endDate;\n\n date = moment(value, rules.format || AV_VAL.DATE_FORMAT.SIMPLE);\n date.set('hours', 0);\n date.set('minutes', 0);\n date.set('seconds', 0);\n\n if(!avValUtils.isEmpty(rules.start.units) && !avValUtils.isEmpty(rules.end.units)) {\n startDate = validator.getStartDate(rules.start);\n endDate = validator.getEndDate(rules.end);\n } else {\n startDate = moment(rules.start.value, rules.format);\n endDate = validator.setMax(moment(rules.end.value, rules.format));\n }\n return date.isValid() && date.isBetween(startDate, endDate, 'day') || date.isSame(startDate, 'day') || date.isSame(endDate, 'day');\n },\n\n validate: function(value, rule) {\n return avValUtils.isEmpty(value) || validator.validation(value, rule);\n }\n\n };\n\n return validator;\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValDate', function(AV_VAL, avValUtils) {\n\n var validator = {\n name: 'dateFormat',\n validate: function(value, rules) {\n var format = rules && rules.format ? rules.format : AV_VAL.DATE_FORMAT.SIMPLE;\n return avValUtils.isEmpty(value) || moment(value, format, true).isValid();\n }\n };\n\n return validator;\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValNpi', function(avValUtils) {\n\n\n var validator = {\n\n name: 'npi',\n\n INTEGER_REGEX: /^\\d*$/,\n\n validate: function(value) {\n\n var npi = value || '';\n\n if(avValUtils.isEmpty(npi)) {\n return true;\n }\n\n if (!validator.INTEGER_REGEX.test(npi) || npi.length !== 10) {\n return false;\n }\n\n var firstDigit = npi.charAt(0);\n if(!('1' === firstDigit || '2' === firstDigit || '3' === firstDigit || '4' === firstDigit)) {\n return false;\n }\n\n var digit = parseInt(npi.charAt(9), 10);\n npi = npi.substring(0, 9);\n npi = \"80840\" + npi;\n\n var alternate = true;\n var total = 0;\n\n for (var i = npi.length; i > 0; i--) {\n var next = parseInt(npi.charAt(i-1), 10);\n if (alternate) {\n next = next*2;\n if (next > 9) {\n next = (next % 10) + 1;\n }\n }\n total += next;\n alternate = !alternate;\n }\n\n var roundUp = Math.ceil(total / 10) * 10;\n var calculatedCheck = roundUp - total;\n\n if (calculatedCheck !== digit) {\n return false;\n }\n\n return true;\n }\n\n };\n\n return validator;\n\n });\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValPhone', function(avValPattern) {\n\n var PHONE_PATTERN = /^([0-9][\\.\\-]?)?[(]{0,1}[0-9]{3}[)\\.\\- ]{0,1}[0-9]{3}[\\.\\- ]{0,1}[0-9]{4}$/;\n\n var validator = {\n name: 'phone',\n validate: function(value, rule) {\n return avValPattern.validate(value, angular.extend({}, rule, { value: PHONE_PATTERN }));\n }\n };\n\n return validator;\n\n });\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avValEmail', function(avValPattern) {\n\n var EMAIL_PATTERN = /[a-zA-Z0-9!#$%&'*+\\/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+\\/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?/;\n\n var validator = {\n name: 'email',\n validate: function(value, rule) {\n return avValPattern.validate(value, angular.extend({}, rule, { value: EMAIL_PATTERN }));\n }\n };\n\n return validator;\n\n });\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_GLOBALS', {\n REGIONS: [\n {\n 'name': 'Alabama',\n 'code': 'AL'\n },\n {\n 'name': 'Alaska',\n 'code': 'AK'\n },\n {\n 'name': 'Arizona',\n 'code': 'AZ'\n },\n {\n 'name': 'Arkansas',\n 'code': 'AR'\n },\n {\n 'name': 'California',\n 'code': 'CA'\n },\n {\n 'name': 'Colorado',\n 'code': 'CO'\n },\n {\n 'name': 'Connecticut',\n 'code': 'CT'\n },\n {\n 'name': 'Delaware',\n 'code': 'DE'\n },\n {\n 'name': 'District Of Columbia',\n 'code': 'DC'\n },\n {\n 'name': 'Florida',\n 'code': 'FL'\n },\n {\n 'name': 'Georgia',\n 'code': 'GA'\n },\n {\n 'name': 'Hawaii',\n 'code': 'HI'\n },\n {\n 'name': 'Idaho',\n 'code': 'ID'\n },\n {\n 'name': 'Illinois',\n 'code': 'IL'\n },\n {\n 'name': 'Indiana',\n 'code': 'IN'\n },\n {\n 'name': 'Iowa',\n 'code': 'IA'\n },\n {\n 'name': 'Kansas',\n 'code': 'KS'\n },\n {\n 'name': 'Kentucky',\n 'code': 'KY'\n },\n {\n 'name': 'Louisiana',\n 'code': 'LA'\n },\n {\n 'name': 'Maine',\n 'code': 'ME'\n },\n {\n 'name': 'Maryland',\n 'code': 'MD'\n },\n {\n 'name': 'Massachusetts',\n 'code': 'MA'\n },\n {\n 'name': 'Michigan',\n 'code': 'MI'\n },\n {\n 'name': 'Minnesota',\n 'code': 'MN'\n },\n {\n 'name': 'Mississippi',\n 'code': 'MS'\n },\n {\n 'name': 'Missouri',\n 'code': 'MO'\n },\n {\n 'name': 'Montana',\n 'code': 'MT'\n },\n {\n 'name': 'Nebraska',\n 'code': 'NE'\n },\n {\n 'name': 'Nevada',\n 'code': 'NV'\n },\n {\n 'name': 'New Hampshire',\n 'code': 'NH'\n },\n {\n 'name': 'New Jersey',\n 'code': 'NJ'\n },\n {\n 'name': 'New Mexico',\n 'code': 'NM'\n },\n {\n 'name': 'New York',\n 'code': 'NY'\n },\n {\n 'name': 'North Carolina',\n 'code': 'NC'\n },\n {\n 'name': 'North Dakota',\n 'code': 'ND'\n },\n {\n 'name': 'Ohio',\n 'code': 'OH'\n },\n {\n 'name': 'Oklahoma',\n 'code': 'OK'\n },\n {\n 'name': 'Oregon',\n 'code': 'OR'\n },\n {\n 'name': 'Pennsylvania',\n 'code': 'PA'\n },\n {\n 'name': 'Rhode Island',\n 'code': 'RI'\n },\n {\n 'name': 'South Carolina',\n 'code': 'SC'\n },\n {\n 'name': 'South Dakota',\n 'code': 'SD'\n },\n {\n 'name': 'Tennessee',\n 'code': 'TN'\n },\n {\n 'name': 'Texas',\n 'code': 'TX'\n },\n {\n 'name': 'Utah',\n 'code': 'UT'\n },\n {\n 'name': 'Vermont',\n 'code': 'VT'\n },\n {\n 'name': 'Virginia',\n 'code': 'VA'\n },\n {\n 'name': 'Washington',\n 'code': 'WA'\n },\n {\n 'name': 'West Virginia',\n 'code': 'WV'\n },\n {\n 'name': 'Wisconsin',\n 'code': 'WI'\n },\n {\n 'name': 'Wyoming',\n 'code': 'WY'\n }\n ]\n });\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.provider('avAnalyticsConfig', function(AV_ANALYTICS) {\n\n var config = {\n VIRTUAL_PAGE_TRACKING: true,\n SERVICES: {\n PIWIK: 'avPiwikAnalytics',\n SPLUNK: 'avSplunkAnalytics'\n },\n EVENTS: {\n PAGE: '$locationChangeSuccess',\n DEFAULT: 'click'\n },\n PRE_FIX: /^avAnalytics(.*)$/,\n // should ignore these since they are part of the directives API\n IGNORE: ['avAnalyticsOn', 'avAnalyticsIf'],\n ENV: { // not sure if this should live here\n PROD: {\n DOMAIN: 'apps.availity.com',\n URL: 'https://piwik.availity.com/piwik/'\n },\n QA: {\n URL: 'https://qa-piwik.availity.com/piwik/'\n }\n }\n };\n\n this.set = function(options) {\n _.merge(config, options);\n // TODO: remove when AV_ANALYTICS is no longer supported\n // ensures avAnalyticsConfig and AV_ANALYTICS constant stay in sync\n _.merge(AV_ANALYTICS, config);\n };\n\n this.$get = function(AV_ANALYTICS) {\n /*\n * TODO: remove merge when AV_ANALYTICS is no longer supported.\n * Applies AV_ANALYTICS overrides to avAnalyticsConfig provider.\n */\n return angular.copy(_.merge(config, AV_ANALYTICS));\n };\n\n this.set(AV_ANALYTICS);\n });\n\n // DEPRECATED: use avAnalyticsConfig\n availity.core.constant('AV_ANALYTICS', {});\n\n availity.core.provider('avAnalytics', function(avAnalyticsConfigProvider) {\n\n var avAnalyticsConfig = avAnalyticsConfigProvider.$get();\n var plugins = [];\n var virtualPageTracking = avAnalyticsConfig.VIRTUAL_PAGE_TRACKING;\n var appId;\n\n this.registerPlugins = function(_plugins) {\n\n if(angular.isString(_plugins)) {\n _plugins = [_plugins];\n }\n\n if(_.isArray(_plugins)) {\n plugins = _plugins;\n } else {\n throw new Error('AvAnalytics.registerPlugins() expects a string or an array.');\n }\n\n return plugins;\n };\n\n this.setVirtualPageTracking = function(value) {\n if(arguments.length) {\n virtualPageTracking = !!value;\n }\n };\n\n this.isVirtualPageTracking = function() {\n return virtualPageTracking;\n };\n\n this.setAppID = function(id) {\n appId = id;\n return appId;\n };\n\n this.$get = function($injector, $q, $log, $rootScope, $location) {\n\n var AvAnalytics = function() {\n\n var self = this;\n this.services = {};\n\n if(!plugins || plugins.length === 0) {\n plugins = [avAnalyticsConfig.SERVICES.PIWIK, avAnalyticsConfig.SERVICES.SPLUNK];\n }\n\n angular.forEach(plugins, function(plugin) {\n\n try {\n self.services[plugin] = $injector.get(plugin);\n } catch(err) {\n $log.error('Could not load `{0}` plugin', [plugin]);\n }\n });\n\n };\n\n var proto = AvAnalytics.prototype;\n\n proto.init = function() {\n\n var self = this;\n\n if(this.isVirtualPageTracking()) {\n $rootScope.$on(avAnalyticsConfig.EVENTS.PAGE, function() {\n self.trackPageView($location.absUrl());\n });\n }\n\n angular.forEach(this.services, function(handler) {\n if(handler.isEnabled() && handler.init) {\n handler.init();\n }\n });\n\n };\n\n proto.trackEvent = function(properties) {\n var promises = [];\n\n angular.forEach(this.services, function(handler) {\n var promise = handler.trackEvent(properties);\n promises.push(promise);\n });\n\n return $q.all(promises);\n };\n\n proto.getAppId = function() {\n return appId;\n };\n\n proto.isVirtualPageTracking = function() {\n return virtualPageTracking;\n };\n\n proto.trackPageView = function(url) {\n\n var promises = [];\n\n angular.forEach(this.services, function(handler) {\n var promise = handler.trackPageView(url);\n promises.push(promise);\n });\n\n return $q.all(promises);\n };\n\n return new AvAnalytics();\n };\n\n });\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avAnalyticsUtils', function(avAnalyticsConfig, $log) {\n\n var AnalyticsUtils = function() {};\n\n var proto = AnalyticsUtils.prototype;\n\n proto.getProperties = function(attributes) {\n\n var self = this;\n var props = {};\n\n _.forEach(attributes, function(value, key) {\n if(self.isValidAttribute(key) && self.isNotIgnored(key)) {\n var result = self.getAttribute(key, value);\n props[result.key] = result.value;\n }\n });\n\n return props;\n };\n\n // Function detects external links in order to allow the analytics framework to run\n // before the browser follows a link.\n //\n // - target=\"_self\" - This opens an anchor in the same frame\n // - target=\"_parent\" - Opens the in the next level up of a frame if they were nested to inside one another\n // - target=\"_top\" - Opens the link as top document in the browser window\n // - target=\"_blank\" - Opens link in new tab new tab\n //\n proto.isExternalLink = function(attrs) {\n return attrs.href && !attrs.ngClick;\n };\n\n proto.isNotIgnored = function(key) {\n var ignored = _.includes(avAnalyticsConfig.IGNORE, key);\n return !ignored;\n };\n\n proto.isValidAttribute = function(key) {\n return avAnalyticsConfig.PRE_FIX.test(key);\n };\n\n proto.lowercase = function(str) {\n return str.substr(0, 1).toLowerCase() + str.substr(1);\n };\n\n proto.getAttribute = function(key, value) {\n var simpleKey = key.match(avAnalyticsConfig.PRE_FIX);\n\n if(simpleKey && simpleKey[1]) {\n return {\n key: this.lowercase(simpleKey[1]),\n value: value\n };\n }\n };\n\n proto.toNum = function(value) {\n var parsed = parseInt(value, 10);\n value = isNaN(parsed) ? 0 : parsed;\n return value;\n };\n\n proto.isValid = function(trackingValues) {\n var valid = true;\n\n if(trackingValues.value || trackingValues.value === 0) {\n delete trackingValues.value;\n }\n\n _.forEach(trackingValues, function(key, value) {\n if(availity.isBlank(value) || _.isUndefined(value)) {\n $log.warn('The analytic tracking value for ' + key.toUpperCase() +' is not defined.');\n valid = false;\n }\n });\n\n return valid;\n };\n\n return new AnalyticsUtils();\n });\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.factory('avSplunkAnalytics', function($log, avLogMessagesResource, $location) {\n\n var SplunkAnalyticsService = function() {};\n\n var proto = SplunkAnalyticsService.prototype;\n\n proto.trackEvent = function(properties) {\n properties.url = $location.$$absUrl || 'N/A';\n properties.level = properties.level || 'info';\n\n return avLogMessagesResource[properties.level](properties);\n };\n\n proto.trackPageView = function(url) {\n\n var properties = {\n event: 'page',\n level: 'info',\n url: url || $location.$$absUrl()\n };\n\n return avLogMessagesResource[properties.level](properties);\n };\n\n proto.isEnabled = function() {\n return true;\n };\n\n return new SplunkAnalyticsService();\n });\n\n})(window);\n","(function(root) {\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.provider('avPiwikAnalytics', function() {\n\n var self;\n var siteId;\n var enabled = false;\n var customVariables = [];\n\n this.enabled = function(_enabled) {\n enabled = !!_enabled;\n };\n\n // can not push these items to `_paq` because it is defined\n // after page has loaded\n this._setCustomVariable = function(index, valueName, value, scope) {\n\n if(!index || isNaN(index)) {\n throw new Error('index must be a number');\n } else if(!valueName) {\n throw new Error('valueName must be declared');\n } else {\n customVariables.push(['setCustomVariable', index, valueName, value, scope]);\n }\n };\n\n this.setSiteID = function(_siteID) {\n this.enabled(true);\n siteId = _siteID;\n };\n\n // allow the user to pass a array of visit variables\n this.setVisitVariables = function(items) {\n _.forEach(items, function(item) {\n self._setCustomVariable(item[0], item[1], item[2], 'visit');\n });\n };\n\n this.setPageVariables = function(index, name, value) {\n this._setCustomVariable(index, name, value, 'page');\n };\n\n this.$get = function(avAnalyticsUtils, avUsersResource, avAnalyticsConfig, $injector, $log, $q, $document, $location) {\n\n var AvPiwikAnalytics = function() {\n window._paq = window._paq || [];\n };\n\n var proto = AvPiwikAnalytics.prototype;\n\n proto.trackEvent = function(properties) {\n\n if(!window._paq) {\n $log.warn('Piwik object `_paq` not found in global scope');\n return $q.when(false);\n }\n\n // http://piwik.org/docs/event-tracking/\n //\n // PAQ requires that eventValue be an integer.\n // Check to make sure value is a number if not convert it to 0.\n //\n if(properties.value) {\n properties.value = avAnalyticsUtils.toNum(properties.event);\n }\n\n // check to make sure that data being sent to piwik is a string and not null, empty or undefined\n if(!avAnalyticsUtils.isValid(properties)) {\n $log.warn('Invalid properties being passed. Tracking info will not be sent.');\n return $q.when(false);\n }\n\n return $q.when(window._paq.push(['trackEvent', properties.category, properties.action || properties.event, properties.label, properties.value]));\n };\n\n proto.trackPageView = function(url) {\n\n if(!window._paq) {\n $log.warn('Piwik object `_paq` not found in global scope');\n return $q.when(false);\n }\n\n return $q.when([\n window._paq.push(['setCustomUrl', url]),\n window._paq.push(['trackPageView', url])]\n );\n\n };\n\n proto.init = function() {\n\n avUsersResource.me().then(function(user) {\n window._paq.push(['setUserId', user.id]);\n // self.trackPageView(); //send another page track when the user data loads\n });\n\n if(!_.isFinite(siteId)) {\n $log.warn('Invalid Piwik Site Id. Piwik analytics has been disabled.');\n return;\n }\n\n var url;\n\n\n // Not sure if this is the correct way to call in avAnalyticsConfig\n // only object in provider: var config = { DOMAIN: 'app.availity.com' }\n // I believe I have to get the DOMAIN value, because avAnalyticsConfig should return an object.\n if($location.$$host === avAnalyticsConfig.ENV.PROD.DOMAIN) {\n url = avAnalyticsConfig.ENV.PROD.URL;\n } else {\n url = avAnalyticsConfig.ENV.QA.URL;\n }\n\n window._paq.push(['enableLinkTracking']);\n window._paq.push(['setTrackerUrl', url + 'piwik.php']);\n window._paq.push(['setSiteId', siteId]);\n\n _.forEach(customVariables, function(variable) {\n window._paq.push(variable);\n });\n\n $.getScript(url + 'piwik.js', function() {\n\n });\n\n };\n\n\n proto.isEnabled = function() {\n return enabled && siteId;\n };\n\n return new AvPiwikAnalytics();\n };\n\n });\n\n})(window);\n","/* global TraceKit */\n\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_EXCEPTIONS', {\n MESSAGES: {\n NOT_APPLICABLE: 'N/A'\n },\n TYPES: {\n EXCEPTION: 'exception'\n },\n REPEAT_LIMIT_TIME: 5000\n });\n\n availity.core.provider('avExceptionAnalytics', function() {\n\n var _enabled = true;\n var appId;\n\n this.enabled = function(enabled) {\n _enabled = !!enabled;\n };\n\n this.setAppId = function(_id) {\n appId = _id;\n };\n\n this.$get = function(avLogMessagesResource, $location, AV_EXCEPTIONS) {\n\n var AvExceptionAnalytics = function() {\n\n };\n\n var proto = AvExceptionAnalytics.prototype;\n\n proto.init = function() {\n\n var self = this;\n\n if(!_enabled) {\n return;\n }\n\n TraceKit.remoteFetching = false;\n TraceKit.surroundingLinesToCollect = 11;\n\n // subscribe() hooks into window.error\n TraceKit.report.subscribe(function(stacktrace) {\n self.onError(stacktrace);\n });\n\n this.messageTimestampMap = {};\n };\n\n proto.prettyPrint = function(stacktrace) {\n\n var message = '';\n\n var length = stacktrace.stack.length;\n\n for(var i = 0; i < length; i++) {\n message += [\n '[' + _.padLeft(i + '', 2, '0') + '] ',\n stacktrace.stack[i].func,\n ' ',\n stacktrace.stack[i].url,\n ':',\n stacktrace.stack[i].line,\n ':',\n stacktrace.stack[i].column,\n i + 1 < length ? '\\n' : ''\n ].join('');\n\n }\n\n return message;\n };\n\n proto.onError = function(stacktrace) {\n\n var userAgent = root.navigator && root.navigator.userAgent ? root.navigator.userAgent : AV_EXCEPTIONS.MESSAGES.NOT_APPLICABLE;\n\n var message = {\n errorDate: moment(new Date()).format('YYYY-MM-DDTHH:mm:ssZZ'),\n errorName: stacktrace.name,\n errorMessage: stacktrace.message,\n errorStack: this.prettyPrint(stacktrace),\n url: $location.$$absUrl,\n appId: appId || AV_EXCEPTIONS.MESSAGES.NOT_APPLICABLE,\n // appVersion: AV_EXCEPTIONS.MESSAGES.NOT_APPLICABLE,\n userAgent: userAgent,\n userLanguage: navigator.userLanguage,\n referrer: document.referrer,\n host: document.domain,\n screenWidth: $(window).width(),\n screenHeight: $(window).height(),\n sdkVersion: availity.VERSION\n };\n\n return this.log(message);\n\n };\n\n proto.log = function(message) {\n return avLogMessagesResource['error'](message);\n };\n\n proto.trackEvent = function(exception) {\n\n if(!_enabled) {\n return;\n }\n\n // If we've already logged this error recently, don't log it again (no need to spam the API)\n if (this._isRepeatError(exception)) {\n return;\n }\n\n var stacktrace = TraceKit.computeStackTrace(exception);\n\n return this.onError(stacktrace);\n\n };\n\n // Check to see if this error was reported within the last 5 seconds\n proto._isRepeatError = function(exception) {\n var timestamp = moment();\n var message = exception.message;\n var lastTimestamp = this.messageTimestampMap[message];\n var isRepeat = false;\n\n if (lastTimestamp && timestamp.diff(lastTimestamp) < AV_EXCEPTIONS.REPEAT_LIMIT_TIME) {\n isRepeat = true;\n }\n\n this.messageTimestampMap[message] = timestamp;\n return isRepeat;\n };\n\n return new AvExceptionAnalytics();\n\n };\n });\n\n availity.core.config(function($provide) {\n\n $provide.decorator('$exceptionHandler', function($delegate, $injector) {\n return function(exception, cause) {\n $delegate(exception, cause);\n var errorTacking = $injector.get('avExceptionAnalytics');\n errorTacking.trackEvent(exception);\n };\n });\n\n });\n\n availity.core.run(function(avExceptionAnalytics) {\n avExceptionAnalytics.init();\n });\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity || {};\n\n availity.analytics = angular.module('availity.config', ['ng', 'availity']);\n\n availity.analytics.run(function(avAnalytics) {\n\n avAnalytics.init();\n\n });\n\n})(window);\n\n","// Issue: https://github.com/angular/angular.js/issues/11165\n// Polyfill: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString\n//\n// This polyfill is needed because Angular calls toISOString()\n// when an request parameter is of type Date. If this polyfill isn't present\n// the ajax call fails.\n//\n(function() {\n\n 'use strict';\n\n var pad = function(number) {\n if(number < 10) {\n return '0' + number;\n }\n return number;\n };\n\n if(!Date.prototype.toISOString) {\n\n Date.prototype.toISOString = function() {\n\n return this.getUTCFullYear() +\n '-' + pad(this.getUTCMonth() + 1) +\n '-' + pad(this.getUTCDate()) +\n 'T' + pad(this.getUTCHours()) +\n ':' + pad(this.getUTCMinutes()) +\n ':' + pad(this.getUTCSeconds()) +\n '.' + (this.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) +\n 'Z';\n };\n }\n\n})(window);\n","(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.constant('AV_MESSAGES', {\n\n EVENTS: {\n\n MESSAGE: 'message', // post message window event\n RESIZE: 'resize', // window resize event\n UNLOAD: 'beforeunload',\n\n AV_RESIZE: 'av:window:resize',\n AV_RECEIVED: 'av:message:received',\n AV_MAXIMIZE: 'nav:left:hide', // @deprecated,\n AV_MINIMIZE: 'nav:left:hide', // @deprecated\n // MAXIMIZE: 'av:window:maximize',\n // MINIMIZE: 'av:window:minimize',\n AV_LOGIN: 'av:login',\n AV_LOGOUT: 'av:logout',\n AV_SESSION_TIMEOUT: 'av:session:timeout'\n\n },\n\n RESIZE_DEBOUNCE: 400,\n\n DOMAIN: /https?:\\/\\/([\\w\\d\\-]+\\.)?availity\\.(com|net)/,\n LOCAL: /http:\\/\\/(localhost|127\\.0\\.0\\.1|0\\.0\\.0\\.0):(\\d+)/\n\n });\n\n})(window);\n","/* global JSON:false */\n\n// https://github.com/kylewelsby/angular-post-message/blob/master/src/angular-post-message.js\n(function(root) {\n\n 'use strict';\n\n var availity = root.availity;\n\n availity.core.provider('avMessages', function() {\n\n var enabled = true;\n\n this.enable = function(value) {\n\n if(arguments.length) {\n enabled = !!value;\n }\n\n return enabled;\n\n };\n\n this.$get = function($rootScope, $log, AV_MESSAGES) {\n\n var AvMessages = function() {\n\n };\n\n var proto = AvMessages.prototype;\n\n proto.init = function() {\n\n var self = this;\n var $window = $(window);\n\n $window.on(AV_MESSAGES.EVENTS.MESSAGE, function(event) {\n self.onMessage(event);\n });\n\n $window.on(AV_MESSAGES.EVENTS.RESIZE, function() {\n self.onResize();\n });\n\n this.send(AV_MESSAGES.EVENTS.AV_MAXIMIZE);\n\n $rootScope.$on('$destroy', function() {\n self.destroy();\n });\n\n $window.on(AV_MESSAGES.EVENTS.UNLOAD, function() {\n self.send(AV_MESSAGES.EVENTS.AV_MINIMIZE);\n });\n\n };\n\n proto.destroy = function() {\n\n $(window).off(AV_MESSAGES.EVENTS.MESSAGE);\n $(window).off(AV_MESSAGES.EVENTS.RESIZE);\n $(window).off(AV_MESSAGES.EVENTS.UNLOAD);\n\n };\n\n proto.onResize = function() {\n\n var self = this;\n\n var resize = _.debounce(function() {\n\n var height = $('html').height();\n self.send({\n event: AV_MESSAGES.EVENTS.AV_RESIZE,\n height: height\n });\n\n }, AV_MESSAGES.RESIZE_DEBOUNCE);\n\n resize();\n\n };\n\n proto.isDomain = function(url) {\n\n if(AV_MESSAGES.DOMAIN.test(this.domain())) {\n return AV_MESSAGES.DOMAIN.test(url);\n }\n\n return AV_MESSAGES.LOCAL.test(url);\n };\n\n proto.isEnabled = function() {\n return enabled;\n };\n\n proto.onMessage = function(_event) {\n\n var event = _event;\n\n event = event.originalEvent || event; // jQuery wraps in `originalEvent`\n\n if(!event && !event.data) {\n // no op\n return;\n }\n\n // don't process messages emitted from same window\n if(event.source === window) {\n return;\n }\n\n if(!this.isDomain(event.origin)) {\n $log.warn('avMessages rejected a cross domain message since it does not match an *.availity.com or localhost');\n return;\n }\n\n\n var data = event.data;\n\n try {\n data = angular.fromJson(data);\n } catch(err) {\n $log.warn('avMessages.onMessage() failed to convert event to json payload');\n }\n\n if(_.isString(data)) {\n event = data;\n data = null;\n }else {\n event = data.event ? data.event : AV_MESSAGES.AV_RECEIVED;\n }\n\n $rootScope.$root.$broadcast(event, data);\n\n };\n\n proto.isIframe = function() {\n return window.self !== window.parent;\n };\n\n proto.domain = function() {\n\n var window = root;\n\n if(window.location.origin) {\n return window.location.origin;\n }\n\n if(window.location.hostname) {\n return window.location.protocol + '//' + window.location.hostname + (window.location.port ? ':' + window.location.port : '');\n }\n\n return '*';\n\n };\n\n proto.send = function(payload) {\n\n try {\n\n var message = _.isString(payload) ? payload : JSON.stringify(payload);\n this.postMessage(message, this.domain());\n\n } catch(err) {\n $log.error('avMessages.send() ', err);\n }\n };\n\n proto.postMessage = function(message, domain) {\n window.parent.postMessage(message, domain);\n };\n\n return new AvMessages();\n\n };\n\n });\n\n availity.core.run(function(avMessages) {\n\n if(avMessages.isEnabled()) {\n avMessages.init();\n }\n\n });\n\n})(window);\n\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/package.json b/package.json index cde1306a..e8f4b7f8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "availity-angular", "description": "Availity Angular SDK", - "version": "1.12.7", + "version": "1.13.0", "main": "index.js", "scripts": { "test": "gulp test:ci",