var Analytics=function(){function e(t,n){return localStorage[t]=n}function i(t,n){return void 0===localStorage[t]?e(t,n):localStorage[t]}function t(t){this.v=1,this.tid=t,this.cid=this.getUserId()}function n(t){i("ga.userid")||e("ga.userid",function(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}()),this.tid=t,this.init()}return t.prototype={getUserId:function(){return i("ga.userid")},send:function(t,n){var e=["v="+this.v,"tid="+this.tid,"cid="+this.cid,"t="+t];for(var i in n)null!==n[i]&&void 0!==n[i]&&e.push(i+"="+encodeURIComponent(n[i]));e.push("z="+1*new Date);var o=new XMLHttpRequest;o.onreadystatechange=function(){},o.onerror=function(){},o.open("POST","http://www.google-analytics.com/collect",!0),o.send(e.join("&"))},exception:function(t,n){this.send("exception",{exd:t,exf:n?"1":"0"})},pageview:function(t,n){this.send("pageview",{dh:"aescripts.com/flow",dp:t,dt:n})},event:function(t,n,e,i){this.send("event",{ec:t,ea:n,el:e,ev:i})}},n.prototype={getUserId:function(){return i("userid",null)},init:function(){this.ga=new t(this.tid)},expired:function(){this.enabled()&&this.track("app","expiration")},exception:function(t,n){this.enabled()&&this.ga.exception(t.message,!1)},install:function(t){this.enabled()&&this.ga.pageview(t)},visit:function(t){this.enabled()&&this.ga.pageview(t)},pageview:function(t){this.enabled()&&this.ga.pageview(t)},button:function(t,n,e){this.enabled()&&this.track(t,n,"button",e)},track:function(t,n,e,i){this.enabled()&&this.ga.event(t,n,e,i)},enabled:function(t){if(null==t)return function(t,n){return"true"==i(t,n)}("ga.enabled",!0);e("ga.enabled",t)}},n}();