2018-03-21 00:05:13 +00:00
|
|
|
!function(t,e){"use strict";var n=window.angulartics||(window.angulartics={});function r(t){return["a:","button:","button:button","button:submit","input:button","input:submit"].indexOf(t.tagName.toLowerCase()+":"+(t.type||""))>=0}function i(t){var e=t.slice(9);return null!=e&&e.length>0?e.substring(0,1).toLowerCase()+e.substring(1):e}n.waitForVendorCount=0,n.waitForVendorApi=function(t,e,r,i,o){o||n.waitForVendorCount++,i||(i=r,r=void 0),!Object.prototype.hasOwnProperty.call(window,t)||void 0!==r&&void 0===window[t][r]?setTimeout(function(){n.waitForVendorApi(t,e,r,i,!0)},e):(n.waitForVendorCount--,i(window[t]))},t.module("angulartics",[]).provider("$analytics",function(){var e=this,r={pageTracking:{autoTrackFirstPage:!0,autoTrackVirtualPages:!0,trackRelativePath:!1,trackRoutes:!0,trackStates:!0,autoBasePath:!1,basePath:"",excludedRoutes:[],queryKeysWhitelisted:[],queryKeysBlacklisted:[]},eventTracking:{},bufferFlushDelay:1e3,trackExceptions:!1,optOut:!1,developerMode:!1},i=["pageTrack","eventTrack","exceptionTrack","transactionTrack","setAlias","setUsername","setUserProperties","setUserPropertiesOnce","setSuperProperties","setSuperPropertiesOnce","incrementProperty","userTimings","clearCookies"],o={},a={},s={};function u(e,n,r){return a[e]||(a[e]=[]),a[e].push(n),s[n]=r,function(){if(!this.settings.optOut){var n=Array.prototype.slice.apply(arguments);return this.$inject(["$q",t.bind(this,function(r){return r.all(a[e].map(function(e){var i=s[e]||{};if(i.async){var o=r.defer(),a=t.copy(n);return a.unshift(o.resolve),e.apply(this,a),o.promise}return r.when(e.apply(this,n))},this))})])}}}var l={settings:r};l.setOptOut=function(t){this.settings.optOut=t,g()},l.getOptOut=function(){return this.settings.optOut};var c={$get:["$injector",function(t){return d(t)}],api:l,settings:r,virtualPageviews:function(t){this.settings.pageTracking.autoTrackVirtualPages=t},trackStates:function(t){this.settings.pageTracking.trackStates=t},trackRoutes:function(t){this.settings.pageTracking.trackRoutes=t},excludeRoutes:function(t){this.settings.pageTracking.excludedRoutes=t},queryKeysWhitelist:function(t){this.settings.pageTracking.queryKeysWhitelisted=t},queryKeysBlacklist:function(t){this.settings.pageTracking.queryKeysBlacklisted=t},firstPageview:function(t){this.settings.pageTracking.autoTrackFirstPage=t},withBase:function(e){this.settings.pageTracking.basePath=e?t.element(document).find("base").attr("href"):""},withAutoBase:function(t){this.settings.pageTracking.autoBasePath=t},trackExceptions:function(t){this.settings.trackExceptions=t},developerMode:function(t){this.settings.developerMode=t}};function p(e,n,i){if(!r.developerMode){l[e]=u(e,n,i);var a=r[e],s=a?a.bufferFlushDelay:null,c=null!==s?s:r.bufferFlushDelay;t.forEach(o[e],function(t,e){var r,i;r=function(){n.apply(this,t)},(i=e*c)?setTimeout(r,i):r()})}}var d=function(e){return t.extend(l,{$inject:e.invoke})};function f(t){var e,r="register"+t.replace(/^./,function(t){return t.toUpperCase()});c[r]=function(e,n){p(t,e,n)},l[t]=u(t,(e=t,function(){n.waitForVendorCount&&(o[e]||(o[e]=[]),o[e].push(arguments))}))}function h(n,r,i){for(var o in t.forEach(r,i),n)e[o]=n[o]}var g=function(){h(c,i,f)};h(c,i,f)}).run(["$rootScope","$window","$analytics","$injector",function(e,n,r,i){function o(t,e,n){if(/\?/.test(t)&&e.length>0){for(var r=t.split("?"),i=r[0],o=r[1].split("&"),a=[],s=0;s<e.length;s++)for(var u=e[s],l=0;l<o.length;l++)(u instanceof RegExp&&u.test(o[l])||o[l].indexOf(u)>-1)&&a.push(o[l]);var c="white"==n?a:function(t,e){for(var n=[],r=0;r<t.length;r++)-1===e.indexOf(t[r])&&n.push(t[r]);return n}(o,a);return c.length>0?i+"?"+c.join("&"):i}return t}function a(t,e){(function(t){for(var e=0;e<r.settings.pageTracking.excludedRoutes.length;e++){var n=r.settings.pageTracking.excludedRoutes[e];if(n instanceof RegExp&&n.test(t)||t.indexOf(n)>-1)return!0}return!1})(t)||(t=o(t,r.settings.pageTracking.queryKeysWhitelisted,"white"),t=o(t,r.settings.pageTracking.queryKeysBlacklisted,"black"),r.pageTrack(t,e))}r.settings.pageTracking.autoTrackFirstPage&&i.invoke(["$location",function(t){var e
|