text: !function(window,document){function _isUndefined(e){return"undefined"==typeof e}function computeStackTraceWrapper(e){function t(e){if(!b)return"";try{var t=function(){try{return new window.XMLHttpRequest}catch(e){return new window.ActiveXObject("Microsoft.XMLHTTP")}},n=t();return n.open("GET",e,!1),n.send(""),n.responseText}catch(i){return""}}function n(e){if(!y.hasOwnProperty(e)){var n="";-1!==e.indexOf(document.domain)&&(n=t(e)),y[e]=n?n.split("\n"):[]}return y[e]}function i(e,t){var i,r=/function ([^(]*)\(([^)]*)\)/,o=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,a="",s=10,l=n(e);if(!l.length)return UNKNOWN_FUNCTION;for(var c=0;s>c;++c)if(a=l[t-c]+a,!_isUndefined(a)){if(i=o.exec(a))return i[1];if(i=r.exec(a))return i[1]}return UNKNOWN_FUNCTION}function r(e,t){var i=n(e);if(!i.length)return null;var r=[],o=Math.floor(_/2),a=o+_%2,s=Math.max(0,t-o-1),l=Math.min(i.length,t+a-1);t-=1;for(var c=s;l>c;++c)_isUndefined(i[c])||r.push(i[c]);return r.length>0?r:null}function o(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}function a(e){return o(e).replace("<","(?:<|&lt;)").replace(">","(?:>|&gt;)").replace("&","(?:&|&amp;)").replace('"','(?:"|&quot;)').replace(/\s+/g,"\\s+")}function s(e,t){for(var i,r,o=0,a=t.length;a>o;++o)if((i=n(t[o])).length&&(i=i.join("\n"),r=e.exec(i)))return{url:t[o],line:i.substring(0,r.index).split("\n").length,column:r.index-i.lastIndexOf("\n",r.index)-1};return null}function l(e,t,i){var r,a=n(t),s=new RegExp("\\b"+o(e)+"\\b");return i-=1,a&&a.length>i&&(r=s.exec(a[i]))?r.index:null}function c(e){for(var t,n,i,r,l=[window.location.href],c=document.getElementsByTagName("script"),u=""+e,d=/^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,h=/^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,p=0;p<c.length;++p){var f=c[p];f.src&&l.push(f.src)}if(i=d.exec(u)){var g=i[1]?"\\s+"+i[1]:"",m=i[2].split(",").join("\\s*,\\s*");t=o(i[3]).replace(/;$/,";?"),n=new RegExp("function"+g+"\\s*\\(\\s*"+m+"\\s*\\)\\s*{\\s*"+t+"\\s*}")}else n=new RegExp(o(u).replace(/\s+/g,"\\s+"));if(r=s(n,l))return r;if(i=h.exec(u)){var v=i[1];if(t=a(i[2]),n=new RegExp("on"+v+"=[\\'\"]\\s*"+t+"\\s*[\\'\"]","i"),r=s(n,l[0]))return r;if(n=new RegExp(t),r=s(n,l))return r}return null}function u(e){if(!e.stack)return null;for(var t,n,o=/^\s*at (?:((?:\[object object\])?\S+(?: \[as \S+\])?) )?\(?((?:file|http|https):.*?):(\d+)(?::(\d+))?\)?\s*$/i,a=/^\s*(\S*)(?:\((.*?)\))?@((?:file|http|https).*?):(\d+)(?::(\d+))?\s*$/i,s=e.stack.split("\n"),c=[],u=/^(.*) is undefined$/.exec(e.message),d=0,h=s.length;h>d;++d){if(t=a.exec(s[d]))n={url:t[3],func:t[1]||UNKNOWN_FUNCTION,args:t[2]?t[2].split(","):"",line:+t[4],column:t[5]?+t[5]:null};else{if(!(t=o.exec(s[d])))continue;n={url:t[2],func:t[1]||UNKNOWN_FUNCTION,line:+t[3],column:t[4]?+t[4]:null}}!n.func&&n.line&&(n.func=i(n.url,n.line)),n.line&&(n.context=r(n.url,n.line)),c.push(n)}return c[0]&&c[0].line&&!c[0].column&&u&&(c[0].column=l(u[1],c[0].url,c[0].line)),c.length?{mode:"stack",name:e.name,message:e.message,url:document.location.href,stack:c,useragent:navigator.userAgent}:null}function d(e){for(var t,n=e.stacktrace,o=/ line (\d+), column (\d+) in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\) in (.*):\s*$/i,a=n.split("\n"),s=[],l=0,c=a.length;c>l;l+=2)if(t=o.exec(a[l])){var u={line:+t[1],column:+t[2],func:t[3]||t[4],args:t[5]?t[5].split(","):[],url:t[6]};if(!u.func&&u.line&&(u.func=i(u.url,u.line)),u.line)try{u.context=r(u.url,u.line)}catch(d){}u.context||(u.context=[a[l+1]]),s.push(u)}return s.length?{mode:"stacktrace",name:e.name,message:e.message,url:document.location.href,stack:s,useragent:navigator.userAgent}:null}function h(e){var t=e.message.split("\n");if(t.length<4)return null;var o,l,c,u,d=/^\s*Line (\d+) of linked script ((?:file|http|https)\S+)(?:: in function (\S+))?\s*$/i,h=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|http|https)\S+)(?:: in function (\S+))?\s*$/i,p=/^\s*Line (\d+) of function script\s*$/i,f=[],g=document.getElementsByTagName("script"),m=[];for(l in g)g.hasOwnProperty(l)&&!g[l].src&&m.push(g[l]);for(l=2,c=t.length;c>l;l+=2){var v=null;if(o=d.exec(t[l]))v={url:o[2],func:o[3],line:+o[1]};else if(o=h.exec(t[l])){v={url:o[3],func:o[4]};var y=+o[1],b=m[o[2]-1];if(b&&(u=n(v.url))){u=u.join("\n");var _=u.indexOf(b.innerText);_>=0&&(v.line=y+u.substring(0,_).split("\n").length)}}else if(o=p.exec(t[l])){var x=window.location.href.replace(/#.*$/,""),w=o[1],C=new RegExp(a(t[l+1]));u=s(C,[x]),v={url:x,line:u?u.line:w,func:""}}if(v){v.func||(v.func=i(v.url,v.line));var S=r(v.url,v.line),T=S?S[Math.floor(S.length/2)]:null;v.context=S&&T.replace(/^\s*/,"")===t[l+1].replace(/^\s*/,"")?S:[t[l+1]],f.push(v)}}return f.length?{mode:"multiline",name:e.name,message:t[0],url:document.location.href,stack:f,useragent:navigator.userAgent}:null}function p(e,t,n,o){var a={url:t,line:n};if(a.url&&a.line){e.incomplete=!1,a.func||(a.func=i(a.url,a.line)),a.context||(a.context=r(a.url,a.line));var s=/ '([^']+)' /.exec(o);if(s&&(a.column=l(s[1],a.url,a.line)),e.stack.length>0&&e.stack[0].url===a.url){if(e.stack[0].line===a.line)return!1;if(!e.stack[0].line&&e.stack[0].func===a.func)return e.stack[0].line=a.line,e.stack[0].context=a.context,!1}return e.stack.unshift(a),e.partial=!0,!0}return e.incomplete=!0,!1}function f(e,t){for(var n,r,o,a=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,s=[],u={},d=!1,h=f.caller;h&&!d;h=h.caller)if(h!==g&&h!==x){if(r={url:null,func:UNKNOWN_FUNCTION,line:null,column:null},h.name?r.func=h.name:(n=a.exec(h.toString()))&&(r.func=n[1]),o=c(h)){r.url=o.url,r.line=o.line,r.func===UNKNOWN_FUNCTION&&(r.func=i(r.url,r.line));var m=/ '([^']+)' /.exec(e.message||e.description);m&&(r.column=l(m[1],o.url,o.line))}u[""+h]?d=!0:u[""+h]=!0,s.push(r)}t&&s.splice(0,t);var v={mode:"callers",name:e.name,message:e.message,url:document.location.href,stack:s,useragent:navigator.userAgent};return p(v,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),v}function g(e,t){var n=null;t=null==t?0:+t;try{if(n=d(e))return n}catch(i){if(v)throw i}try{if(n=u(e))return n}catch(i){if(v)throw i}try{if(n=h(e))return n}catch(i){if(v)throw i}try{if(n=f(e,t+1))return n}catch(i){if(v)throw i}return{mode:"failed"}}function m(e){e=(null==e?0:+e)+1;try{throw new Error}catch(t){return g(t,e+1)}}var v=!1,y={},b=e.remoteFetching,_=e.linesOfContext,x=e.tracekitReport;return g.augmentStackTraceWithInitialElement=p,g.guessFunctionName=i,g.gatherContext=r,g.ofCaller=m,g}function Notifier(e){_topLevelNotifier=_topLevelNotifier||this;var t=window.location.protocol;0!==t.indexOf("http")&&(t="https:");var n=t+"//"+Notifier.DEFAULT_ENDPOINT;this.options={enabled:!0,endpoint:n,environment:"production",scrubFields:Util.copy(Notifier.DEFAULT_SCRUB_FIELDS),checkIgnore:null,logLevel:Notifier.DEFAULT_LOG_LEVEL,reportLevel:Notifier.DEFAULT_REPORT_LEVEL,uncaughtErrorLevel:Notifier.DEFAULT_UNCAUGHT_ERROR_LEVEL,payload:{}},this.lastError=null,this.plugins={},this.parentNotifier=e,this.logger=function(){if(window.console&&"function"==typeof window.console.log){var e=["Rollbar:"].concat(Array.prototype.slice.call(arguments,0));window.console.log(e)}},e&&(e.hasOwnProperty("shimId")?e.notifier=this:(this.logger=e.logger,this.configure(e.options)))}function _wrapNotifierFn(e,t){return function(){var n=t||this;try{return e.apply(n,arguments)}catch(i){n&&n.logger(i)}}}function _guessErrorClass(e){if(!e)return["Unknown error. There was no error message to display.",""];var t=e.match(ERR_CLASS_REGEXP),n="(unknown)";return t&&(n=t[t.length-1],e=e.replace((t[t.length-2]||"")+n+":",""),e=e.replace(/(^[\s]+|[\s]+$)/g,"")),[n,e]}function _payloadProcessorTimer(e){for(var t;t=window._rollbarPayloadQueue.shift();)_processPayload(t.endpointUrl,t.accessToken,t.payload,t.callback);e||(payloadProcessorTimeout=setTimeout(_payloadProcessorTimer,1e3))}function _processPayload(e,t,n,i){i=i||function(){};var r=(new Date).getTime();r-rateLimitStartTime>=6e4&&(rateLimitStartTime=r,rateLimitPerMinCounter=0);var o=window._globalRollbarOptions.maxItems,a=window._globalRollbarOptions.itemsPerMinute,s=function(){return!n.ignoreRateLimit&&o>=1&&rateLimitCounter>=o},l=function(){return!n.ignoreRateLimit&&a>=1&&rateLimitPerMinCounter>=a};return s()?void i(new Error(o+" max items reached")):l()?void i(new Error(a+" items per minute reached")):(rateLimitCounter++,rateLimitPerMinCounter++,s()&&_topLevelNotifier._log(_topLevelNotifier.options.uncaughtErrorLevel,"maxItems has been hit. Ignoring errors for the remainder of the current page load.",null,{maxItems:o},null,!1,!0),n.ignoreRateLimit&&delete n.ignoreRateLimit,void XHR.post(e,t,n,function(e,t){return e?i(e):i(null,t)}))}var setupCustomJSON=function(JSON){function f(e){return 10>e?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,i,r,o,a,s=gap,l=t[e];switch("function"==typeof rep&&(l=rep.call(t,e,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,a=[],"[object Array]"===Object.prototype.toString.apply(l)){for(o=l.length,n=0;o>n;n+=1)a[n]=str(n,l)||"null";return r=0===a.length?"[]":gap?"[\n"+gap+a.join(",\n"+gap)+"\n"+s+"]":"["+a.join(",")+"]",gap=s,r}if(rep&&"object"==typeof rep)for(o=rep.length,n=0;o>n;n+=1)"string"==typeof rep[n]&&(i=rep[n],r=str(i,l),r&&a.push(quote(i)+(gap?": ":":")+r));else for(i in l)Object.prototype.hasOwnProperty.call(l,i)&&(r=str(i,l),r&&a.push(quote(i)+(gap?": ":":")+r));return r=0===a.length?"{}":gap?"{\n"+gap+a.join(",\n"+gap)+"\n"+s+"}":"{"+a.join(",")+"}",gap=s,r}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","	":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(e,t,n){var i;if(gap="",indent="","number"==typeof n)for(i=0;n>i;i+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(e,t){var n,i,r=e[t];if(r&&"object"==typeof r)for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(i=walk(r,n),void 0!==i?r[n]=i:delete r[n]);return reviver.call(e,t,r)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})},UNKNOWN_FUNCTION="?",Util={merge:function(){var e,t,n,i,r,o,a=arguments[0]||{},s=1,l=arguments.length,c=!0;for("object"!=typeof a&&"function"!=typeof a&&(a={});l>s;s++)if(null!==(e=arguments[s]))for(t in e)e.hasOwnProperty(t)&&(n=a[t],i=e[t],a!==i&&(c&&i&&(i.constructor==Object||(r=i.constructor==Array))?(r?(r=!1,o=[]):o=n&&n.constructor==Object?n:{},a[t]=Util.merge(o,i)):void 0!==i&&(a[t]=i)));return a},copy:function(e){var t;return"object"==typeof e&&(e.constructor==Object?t={}:e.constructor==Array&&(t=[])),Util.merge(t,e),t},parseUriOptions:{strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},parseUri:function(e){if(!e||"string"!=typeof e&&!(e instanceof String))throw new Error("Util.parseUri() received invalid input");for(var t=Util.parseUriOptions,n=t.parser[t.strictMode?"strict":"loose"].exec(e),i={},r=14;r--;)i[t.key[r]]=n[r]||"";return i[t.q.name]={},i[t.key[12]].replace(t.q.parser,function(e,n,r){n&&(i[t.q.name][n]=r)}),i},sanitizeUrl:function(e){if(!e||"string"!=typeof e&&!(e instanceof String))throw new Error("Util.sanitizeUrl() received invalid input");var t=Util.parseUri(e);return""===t.anchor&&(t.source=t.source.replace("#","")),e=t.source.replace("?"+t.query,"")},traverse:function(e,t){var n,i,r,o="object"==typeof e,a=[];if(o)if(e.constructor===Object)for(n in e)e.hasOwnProperty(n)&&a.push(n);else if(e.constructor===Array)for(r=0;r<e.length;++r)a.push(r);for(r=0;r<a.length;++r)n=a[r],i=e[n],o="object"==typeof i,e[n]=o?null===i?t(n,i):i.constructor===Object?Util.traverse(i,t):i.constructor===Array?Util.traverse(i,t):t(n,i):t(n,i);return e},redact:function(e){return e=String(e),new Array(e.length+1).join("*")},uuid4:function(){var e=(new Date).getTime(),t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:7&n|8).toString(16)});return t}},RollbarJSON={};setupCustomJSON(RollbarJSON);var XHR={XMLHttpFactories:[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],createXMLHTTPObject:function(){var e,t=!1,n=XHR.XMLHttpFactories,i=n.length;for(e=0;i>e;e++)try{t=n[e]();break}catch(r){}return t},post:function(e,t,n,i){if("object"!=typeof n)throw new Error("Expected an object to POST");n=RollbarJSON.stringify(n),i=i||function(){};var r=XHR.createXMLHTTPObject();if(r)try{try{var o=function(){try{o&&4===r.readyState&&(o=void 0,200===r.status?i(null,RollbarJSON.parse(r.responseText)):i("number"==typeof r.status&&r.status>=400&&r.status<600?new Error(r.status.toString()):new Error))}catch(e){var t;t="object"==typeof e&&e.stack?e:new Error(e),i(t)}};r.open("POST",e,!0),r.setRequestHeader&&(r.setRequestHeader("Content-Type","application/json"),r.setRequestHeader("X-Rollbar-Access-Token",t)),r.onreadystatechange=o,r.send(n)}catch(a){if("undefined"!=typeof XDomainRequest){var s=function(){i(new Error)},l=function(){i(new Error)},c=function(){i(null,RollbarJSON.parse(r.responseText))};r=new XDomainRequest,r.onprogress=function(){},r.ontimeout=s,r.onerror=l,r.onload=c,r.open("POST",e,!0),r.send(n)}}}catch(u){i(u)}}};Notifier.NOTIFIER_VERSION="1.2.2",Notifier.DEFAULT_ENDPOINT="api.rollbar.com/api/1/",Notifier.DEFAULT_SCRUB_FIELDS=["pw","pass","passwd","password","secret","confirm_password","confirmPassword","password_confirmation","passwordConfirmation","access_token","accessToken","secret_key","secretKey","secretToken"],Notifier.DEFAULT_LOG_LEVEL="debug",Notifier.DEFAULT_REPORT_LEVEL="debug",Notifier.DEFAULT_UNCAUGHT_ERROR_LEVEL="warning",Notifier.DEFAULT_ITEMS_PER_MIN=60,Notifier.DEFAULT_MAX_ITEMS=0,Notifier.LEVELS={debug:0,info:1,warning:2,error:3,critical:4},window._rollbarPayloadQueue=[],window._globalRollbarOptions={startTime:(new Date).getTime(),maxItems:Notifier.DEFAULT_MAX_ITEMS,itemsPerMinute:Notifier.DEFAULT_ITEMS_PER_MIN};var TK=computeStackTraceWrapper({remoteFetching:!1,linesOfContext:3}),_topLevelNotifier;Notifier._generateLogFn=function(e){return _wrapNotifierFn(function(){var t=this._getLogArgs(arguments);return this._log(e||t.level||this.options.logLevel||Notifier.DEFAULT_LOG_LEVEL,t.message,t.err,t.custom,t.callback)})},Notifier.prototype._getLogArgs=function(e){for(var t,n,i,r,o,a,s,l=this.options.logLevel||Notifier.DEFAULT_LOG_LEVEL,c=0;c<e.length;++c)s=e[c],a=typeof s,"string"===a?n=s:"function"===a?o=_wrapNotifierFn(s,this):s&&"object"===a&&("Date"===s.constructor.name?t=s:s instanceof Error||s.prototype===Error.prototype||s.hasOwnProperty("stack")||"undefined"!=typeof DOMException&&s instanceof DOMException?i=s:r=s);return{level:l,message:n,err:i,custom:r,callback:o}},Notifier.prototype._route=function(e){var t=this.options.endpoint,n=/\/$/.test(t),i=/^\//.test(e);return n&&i?e=e.substring(1):n||i||(e="/"+e),t+e},Notifier.prototype._processShimQueue=function(e){for(var t,n,i,r,o,a,s,l={};n=e.shift();)t=n.shim,i=n.method,r=n.args,o=t.parentShim,s=l[t.shimId],s||(o?(a=l[o.shimId],s=new Notifier(a)):s=this,l[t.shimId]=s),s[i]&&"function"==typeof s[i]&&s[i].apply(s,r)},Notifier.prototype._buildPayload=function(e,t,n,i,r){var o=this.options.accessToken,a=this.options.environment,s=Util.copy(this.options.payload),l=Util.uuid4();if(void 0===Notifier.LEVELS[t])throw new Error("Invalid level");if(!n&&!i&&!r)throw new Error("No message, stack info or custom data");var c={environment:a,endpoint:this.options.endpoint,uuid:l,level:t,platform:"browser",framework:"browser-js",language:"javascript",body:this._buildBody(n,i,r),request:{url:window.location.href,query_string:window.location.search,user_ip:"$remote_ip"},client:{runtime_ms:e.getTime()-window._globalRollbarOptions.startTime,timestamp:Math.round(e.getTime()/1e3),javascript:{browser:window.navigator.userAgent,language:window.navigator.language,cookie_enabled:window.navigator.cookieEnabled,screen:{width:window.screen.width,height:window.screen.height},plugins:this._getBrowserPlugins()}},server:{},notifier:{name:"rollbar-browser-js",version:Notifier.NOTIFIER_VERSION}};s.body&&delete s.body;var u={access_token:o,data:Util.merge(c,s)};return this._scrub(u.data),u},Notifier.prototype._buildBody=function(e,t,n){var i;return i=t&&"failed"!==t.mode?this._buildPayloadBodyTrace(e,t,n):this._buildPayloadBodyMessage(e,n)},Notifier.prototype._buildPayloadBodyMessage=function(e,t){e||(e=t?RollbarJSON.stringify(t):"");var n={body:e};return t&&(n.extra=Util.copy(t)),{message:n}},Notifier.prototype._buildPayloadBodyTrace=function(e,t,n){var i=_guessErrorClass(t.message),r=t.name||i[0],o=i[1],a={exception:{"class":r,message:o}};if(e&&(a.exception.description=e||"uncaught exception"),t.stack){var s,l,c,u,d,h,p,f;for(a.frames=[],p=0;p<t.stack.length;++p)s=t.stack[p],l={filename:s.url?Util.sanitizeUrl(s.url):"(unknown)",lineno:s.line||null,method:s.func&&"?"!==s.func?s.func:"[anonymous]",colno:s.column},c=u=d=null,h=s.context?s.context.length:0,h&&(f=Math.floor(h/2),u=s.context.slice(0,f),c=s.context[f],d=s.context.slice(f)),c&&(l.code=c),(u||d)&&(l.context={},u&&u.length&&(l.context.pre=u),d&&d.length&&(l.context.post=d)),s.args&&(l.args=s.args),a.frames.push(l);return n&&(a.extra=Util.copy(n)),{trace:a}}return this._buildPayloadBodyMessage(r+": "+o,n)},Notifier.prototype._getBrowserPlugins=function(){if(!this._browserPlugins){var e,t,n=window.navigator.plugins||[],i=n.length,r=[];for(t=0;i>t;++t)e=n[t],r.push({name:e.name,description:e.description});this._browserPlugins=r}return this._browserPlugins},Notifier.prototype._scrub=function(e){function t(e,t,n,i,r,o){return t+Util.redact(o)}function n(e){var n;if("string"==typeof e)for(n=0;n<s.length;++n)e=e.replace(s[n],t);return e}function i(e,t){var n;for(n=0;n<a.length;++n)if(a[n].test(e)){t=Util.redact(t);break}return t}function r(e,t){var r=i(e,t);return r===t?n(r):r}var o=this.options.scrubFields,a=this._getScrubFieldRegexs(o),s=this._getScrubQueryParamRegexs(o);return Util.traverse(e,r),e},Notifier.prototype._getScrubFieldRegexs=function(e){for(var t,n=[],i=0;i<e.length;++i)t="\\[?(%5[bB])?"+e[i]+"\\[?(%5[bB])?\\]?(%5[dD])?",n.push(new RegExp(t,"i"));return n},Notifier.prototype._getScrubQueryParamRegexs=function(e){for(var t,n=[],i=0;i<e.length;++i)t="\\[?(%5[bB])?"+e[i]+"\\[?(%5[bB])?\\]?(%5[dD])?",n.push(new RegExp("("+t+"=)([^&\\n]+)","igm"));return n},Notifier.prototype._urlIsWhitelisted=function(e){var t,n,i,r,o,a,s,l,c,u;try{if(t=this.options.hostWhiteList,n=e.data.body.trace,!t||0===t.length)return!0;if(!n)return!0;for(s=t.length,o=n.frames.length,c=0;o>c;c++){if(i=n.frames[c],r=i.filename,"string"!=typeof r)return!0;for(u=0;s>u;u++)if(a=t[u],l=new RegExp(a),l.test(r))return!0}}catch(d){return this.configure({hostWhiteList:null}),this.error("Error while reading your configuration's hostWhiteList option. Removing custom hostWhiteList.",d),!0}return!1},Notifier.prototype._messageIsIgnored=function(e){var t,n,i,r,o,a,s;try{if(o=!1,i=this.options.ignoredMessages,s=e.data.body.trace,!i||0===i.length)return!1;if(!s)return!1;for(t=s.exception.message,r=i.length,n=0;r>n&&(a=new RegExp(i[n],"gi"),!(o=a.test(t)));n++);}catch(l){this.configure({ignoredMessages:null}),this.error("Error while reading your configuration's ignoredMessages option. Removing custom ignoredMessages.")}return o},Notifier.prototype._enqueuePayload=function(e,t,n,i){var r={callback:i,accessToken:this.options.accessToken,endpointUrl:this._route("item/"),payload:e},o=function(){if(i){var e="This item was not sent to Rollbar because it was ignored. This can happen if a custom checkIgnore() function was used or if the item's level was less than the notifier' reportLevel. See https://rollbar.com/docs/notifier/rollbar.js/configuration for more details.";i(null,{err:0,result:{id:null,uuid:null,message:e}})}};if(this._internalCheckIgnore(t,n,e))return void o();try{if(this.options.checkIgnore&&"function"==typeof this.options.checkIgnore&&this.options.checkIgnore(t,n,e))return void o()}catch(a){this.configure({checkIgnore:null}),this.error("Error while calling custom checkIgnore() function. Removing custom checkIgnore().",a)}if(this._urlIsWhitelisted(e)&&!this._messageIsIgnored(e)){if(this.options.verbose){if(e.data&&e.data.body&&e.data.body.trace){var s=e.data.body.trace,l=s.exception.message;this.logger(l)}this.logger("Sending payload -",r)}"function"==typeof this.options.logFunction&&this.options.logFunction(r);try{"function"==typeof this.options.transform&&this.options.transform(e)}catch(a){this.configure({transform:null}),this.error("Error while calling custom transform() function. Removing custom transform().",a)}this.options.enabled&&window._rollbarPayloadQueue.push(r)}},Notifier.prototype._internalCheckIgnore=function(e,t,n){var i=t[0],r=Notifier.LEVELS[i]||0,o=Notifier.LEVELS[this.options.reportLevel]||0;if(o>r)return!0;var a=this.options?this.options.plugins:{};return a&&a.jquery&&a.jquery.ignoreAjaxErrors&&n.body.message?n.body.messagejquery_ajax_error:!1},Notifier.prototype._log=function(e,t,n,i,r,o,a){var s=null;if(n){if(s=n._tkStackTrace?n._tkStackTrace:TK(n),n===this.lastError)return;this.lastError=n}var l=this._buildPayload(new Date,e,t,s,i);a&&(l.ignoreRateLimit=!0),this._enqueuePayload(l,o?!0:!1,[e,t,n,i],r)},Notifier.prototype.log=Notifier._generateLogFn(),Notifier.prototype.debug=Notifier._generateLogFn("debug"),Notifier.prototype.info=Notifier._generateLogFn("info"),Notifier.prototype.warn=Notifier._generateLogFn("warning"),Notifier.prototype.warning=Notifier._generateLogFn("warning"),Notifier.prototype.error=Notifier._generateLogFn("error"),Notifier.prototype.critical=Notifier._generateLogFn("critical"),Notifier.prototype.uncaughtError=_wrapNotifierFn(function(e,t,n,i,r,o){if(o=o||null,r&&r.stack)return void this._log(this.options.uncaughtErrorLevel,e,r,o,null,!0);if(t&&t.stack)return void this._log(this.options.uncaughtErrorLevel,e,t,o,null,!0);var a={url:t||"",line:n};a.func=TK.guessFunctionName(a.url,a.line),a.context=TK.gatherContext(a.url,a.line);var s={mode:"onerror",message:e||"uncaught exception",url:document.location.href,stack:[a],useragent:navigator.userAgent};r&&(s=r._tkStackTrace||TK(r));var l=this._buildPayload(new Date,this.options.uncaughtErrorLevel,e,s);this._enqueuePayload(l,!0,[this.options.uncaughtErrorLevel,e,t,n,i,r])}),Notifier.prototype.global=_wrapNotifierFn(function(e){e=e||{},Util.merge(window._globalRollbarOptions,e),void 0!==e.maxItems&&(rateLimitCounter=0),void 0!==e.itemsPerMinute&&(rateLimitPerMinCounter=0)}),Notifier.prototype.configure=_wrapNotifierFn(function(e){Util.merge(this.options,e)}),Notifier.prototype.scope=_wrapNotifierFn(function(e){var t=new Notifier(this);return Util.merge(t.options.payload,e),t}),Notifier.prototype.wrap=function(e,t){var n;if(n="function"==typeof t?t:function(){return t||{}},"function"!=typeof e)return e;if(e._isWrap)return e;if(!e._wrapped){e._wrapped=function(){try{return e.apply(this,arguments)}catch(t){throw t.stack||(t._tkStackTrace=TK(t)),t._rollbarContext=n()||{},t._rollbarContext._wrappedSource=e.toString(),window._rollbarWrappedError=t,t}},e._wrapped._isWrap=!0;for(var i in e)e.hasOwnProperty(i)&&(e._wrapped[i]=e[i])}return e._wrapped};var ERR_CLASS_REGEXP=new RegExp("^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): "),payloadProcessorTimeout;Notifier.processPayloads=function(e){(!payloadProcessorTimeout||e)&&_payloadProcessorTimer(e)};var rateLimitStartTime=(new Date).getTime(),rateLimitCounter=0,rateLimitPerMinCounter=0;if(!window._rollbarInitialized){var config=window._rollbarConfig||{},alias=config.globalAlias||"Rollbar",shim=window[alias],fullRollbar=new Notifier(shim);fullRollbar._processShimQueue(window._rollbarShimQueue||[]),window[alias]=fullRollbar,window._rollbarInitialized=!0,Notifier.processPayloads()}}(window,document);