Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@datadog/browser-logs

Package Overview
Dependencies
Maintainers
1
Versions
259
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datadog/browser-logs - npm Package Compare versions

Comparing version 1.12.2 to 1.12.3

2

bundle/datadog-logs-us.js

@@ -1,1 +0,1 @@

!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t),n.d(t,"datadogLogs",(function(){return Ke}));var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function o(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function i(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function s(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r}var a,u,c=6e4,f=60*c;!function(e){e.BEFORE_UNLOAD="beforeunload",e.CLICK="click",e.KEY_DOWN="keydown",e.LOAD="load",e.POP_STATE="popstate",e.SCROLL="scroll",e.TOUCH_START="touchstart",e.VISIBILITY_CHANGE="visibilitychange"}(a||(a={})),function(e){e.DOCUMENT="document",e.XHR="xhr",e.BEACON="beacon",e.FETCH="fetch",e.CSS="css",e.JS="js",e.IMAGE="image",e.FONT="font",e.MEDIA="media",e.OTHER="other"}(u||(u={}));var l,d=function(e){return Array.isArray(e)},p=function(e){return!Array.isArray(e)&&"object"==typeof e};function h(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(e,t){return d(e)&&d(t)?s(Array(Math.max(e.length,t.length))).map((function(n,r){return h(e[r],t[r])})):p(e)&&p(t)?Object.keys(t).reduce((function(n,o){var i;return r(r({},n),((i={})[o]=h(e[o],t[o]),i))}),e):void 0===t?e:t}),e)}function g(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];t.forEach((function(t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}))}function v(e){return e?(parseInt(e,10)^16*Math.random()>>parseInt(e,10)/4).toString(16):(1e7+"-1000-4000-8000-100000000000").replace(/[018]/g,v)}function m(){}function y(e,t,n){if(null==e)return JSON.stringify(e);var r=[!1,void 0];b(e)&&(r=[!0,e.toJSON],delete e.toJSON);var o,i,s=[!1,void 0];"object"==typeof e&&b(o=Object.getPrototypeOf(e))&&(s=[!0,o.toJSON],delete o.toJSON);try{i=JSON.stringify(e,void 0,n)}catch(e){i="<error: unable to serialize object>"}finally{r[0]&&(e.toJSON=r[1]),s[0]&&(o.toJSON=s[1])}return i}function b(e){return"object"==typeof e&&null!==e&&e.hasOwnProperty("toJSON")}function w(){return void 0===l&&(l=performance.timing.navigationStart),l}function E(e){if(e.origin)return e.origin;var t=e.host.replace(/(:80|:443)$/,"");return e.protocol+"//"+t}var x={isCollectingError:!0,maxErrorsByMinute:3e3,maxInternalMonitoringMessagesPerPage:15,resourceSampleRate:100,sampleRate:100,silentMultipleInit:!1,trackInteractions:!1,requestErrorResponseLengthLimit:32768,flushTimeout:3e4,maxBatchSize:50,maxMessageSize:262144,batchBytesLimit:16384};function T(e,t,n){var r="us"===t.datacenter?"com":"eu",o="production"===t.sdkEnv?"datadoghq."+r:"datad0g."+r,i="sdk_version:"+t.sdkVersion+(t.env?",env:"+t.env:"")+(t.service?",service:"+t.service:"")+(t.version?",version:"+t.version:""),s=e+"-http-intake.logs."+o,a=t.proxyHost?t.proxyHost:s,u=t.proxyHost?"ddhost="+s+"&":"",c=""+(t.applicationId?"_dd.application_id="+t.applicationId+"&":"")+u+"ddsource="+(n||"browser")+"&ddtags="+i;return"https://"+a+"/v1/input/"+t.clientToken+"?"+c}var O="?",S=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function C(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var L=function(){var e,t,n,r,o,i,s=[];function a(e,t,n){var r;for(var o in s)if(C(s,o))try{s[o](e,t,n)}catch(e){r=e}if(r)throw r}function u(e,r,o,i,s){if(t)k.augmentStackTraceWithInitialElement(t,r,o,""+e),f();else if(s)a(k(s),!0,s);else{var u,c={url:r,column:i,line:o},l=e;if("[object String]"==={}.toString.call(e)){var d=l.match(S);d&&(u=d[1],l=d[2])}a({name:u,message:l,stack:[c]},!0)}return!!n&&n.apply(this,arguments)}function c(e){var t=e.reason||"Empty reason";a(k(t),!0,t)}function f(){var n=t,r=e;t=void 0,e=void 0,a(n,!1,r)}function l(n){if(t){if(e===n)return;f()}var r=k(n);throw t=r,e=n,setTimeout((function(){e===n&&f()}),r.incomplete?2e3:0),n}return l.subscribe=function(e){!function(){if(r)return;n=window.onerror,window.onerror=j(u),r=!0}(),function(){if(i)return;o=null!==window.onunhandledrejection?window.onunhandledrejection:void 0,window.onunhandledrejection=j(c),i=!0}(),s.push(e)},l.unsubscribe=function(e){for(var t=s.length-1;t>=0;t-=1)s[t]===e&&s.splice(t,1);0===s.length&&(r&&(window.onerror=n,r=!1),i&&(window.onunhandledrejection=o,i=!1))},l.traceKitWindowOnError=u,l}(),k=function(){var e=!1;function t(e){if(e.stack){for(var t,n,r,o,i=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,s=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,a=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,u=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,c=/\((\S*)(?::(\d+))(?::(\d+))\)/,f=e.stack.split("\n"),l=[],d=0,p=f.length;d<p;d+=1){if(i.exec(f[d])){var h=(r=i.exec(f[d]))[2]&&0===r[2].indexOf("native");t=r[2]&&0===r[2].indexOf("eval"),n=c.exec(r[2]),t&&n&&(r[2]=n[1],r[3]=n[2],r[4]=n[3]),o={args:h?[r[2]]:[],column:r[4]?+r[4]:void 0,func:r[1]||O,line:r[3]?+r[3]:void 0,url:h?void 0:r[2]}}else if(a.exec(f[d]))o={args:[],column:(r=a.exec(f[d]))[4]?+r[4]:void 0,func:r[1]||O,line:+r[3],url:r[2]};else{if(!s.exec(f[d]))continue;t=(r=s.exec(f[d]))[3]&&r[3].indexOf(" > eval")>-1,n=u.exec(r[3]),t&&n?(r[3]=n[1],r[4]=n[2],r[5]=void 0):0!==d||r[5]||void 0===e.columnNumber||(l[0].column=e.columnNumber+1),o={args:r[2]?r[2].split(","):[],column:r[5]?+r[5]:void 0,func:r[1]||O,line:r[4]?+r[4]:void 0,url:r[3]}}!o.func&&o.line&&(o.func=O),l.push(o)}if(l.length)return{stack:l,message:e.message,name:e.name}}}function n(e,t,n,r){var o={url:t,line:n?+n:void 0};if(o.url&&o.line){e.incomplete=!1;var i=e.stack;if(i.length>0&&i[0].url===o.url){if(i[0].line===o.line)return!1;if(!i[0].line&&i[0].func===o.func)return i[0].line=o.line,i[0].context=o.context,!1}return i.unshift(o),e.partial=!0,!0}return e.incomplete=!0,!1}function r(e,t){for(var o,i,s=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,a=[],u={},c=!1,f=r.caller;f&&!c;f=f.caller)f!==k&&f!==L&&(i={args:[],column:void 0,func:O,line:void 0,url:void 0},o=s.exec(f.toString()),f.name?i.func=f.name:o&&(i.func=o[1]),void 0===i.func&&(i.func=o?o.input.substring(0,o.input.indexOf("{")):void 0),u[""+f]?c=!0:u[""+f]=!0,a.push(i));t&&a.splice(0,t);var l={stack:a,message:e.message,name:e.name};return n(l,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),l}function o(n,o){var i,s=void 0===o?0:+o;try{if(i=function(e){var t=e.stacktrace;if(t){for(var n,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,o=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,i=t.split("\n"),s=[],a=0;a<i.length;a+=2){var u=void 0;r.exec(i[a])?u={args:[],column:void 0,func:(n=r.exec(i[a]))[3],line:+n[1],url:n[2]}:o.exec(i[a])&&(u={args:(n=o.exec(i[a]))[5]?n[5].split(","):[],column:+n[2],func:n[3]||n[4],line:+n[1],url:n[6]}),u&&(!u.func&&u.line&&(u.func=O),u.context=[i[a+1]],s.push(u))}if(s.length)return{stack:s,message:e.message,name:e.name}}}(n))return i}catch(t){if(e)throw t}try{if(i=t(n))return i}catch(t){if(e)throw t}try{if(i=function(e){var t=e.message.split("\n");if(!(t.length<4)){var n,r=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,o=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,i=/^\s*Line (\d+) of function script\s*$/i,s=[],a=window&&window.document&&window.document.getElementsByTagName("script"),u=[];for(var c in a)C(a,c)&&!a[c].src&&u.push(a[c]);for(var f=2;f<t.length;f+=2){var l=void 0;if(r.exec(t[f]))l={args:[],column:void 0,func:(n=r.exec(t[f]))[3],line:+n[1],url:n[2]};else if(o.exec(t[f]))l={args:[],column:void 0,func:(n=o.exec(t[f]))[4],line:+n[1],url:n[3]};else if(i.exec(t[f])){n=i.exec(t[f]),l={url:window.location.href.replace(/#.*$/,""),args:[],column:void 0,func:"",line:+n[1]}}l&&(l.func||(l.func=O),l.context=[t[f+1]],s.push(l))}if(s.length)return{stack:s,message:t[0],name:e.name}}}(n))return i}catch(t){if(e)throw t}try{if(i=r(n,s+1))return i}catch(t){if(e)throw t}return{message:n.message,name:n.name,stack:[]}}return o.augmentStackTraceWithInitialElement=n,o.computeStackTraceFromStackProp=t,o.ofCaller=function(e){var t=1+(void 0===e?0:+e);try{throw new Error}catch(e){return k(e,t+1)}},o}();var R=function(){function e(e,t,n){void 0===n&&(n=!1),this.endpointUrl=e,this.bytesLimit=t,this.withBatchTime=n}return e.prototype.send=function(e,t){var n=this.withBatchTime?function(e){return e+(-1===e.indexOf("?")?"?":"&")+"batch_time="+(new Date).getTime()}(this.endpointUrl):this.endpointUrl;if(navigator.sendBeacon&&t<this.bytesLimit&&navigator.sendBeacon(n,e))return;var r=new XMLHttpRequest;r.open("POST",n,!0),r.send(e)},e}();var M,I=function(){function e(e,t,n,r,o,i,s){void 0===s&&(s=m),this.request=e,this.maxSize=t,this.bytesLimit=n,this.maxMessageSize=r,this.flushTimeout=o,this.contextProvider=i,this.beforeUnloadCallback=s,this.pushOnlyBuffer=[],this.upsertBuffer={},this.bufferBytesSize=0,this.bufferMessageCount=0,this.flushOnVisibilityHidden(),this.flushPeriodically()}return e.prototype.add=function(e){this.addOrUpdate(e)},e.prototype.upsert=function(e,t){this.addOrUpdate(e,t)},e.prototype.flush=function(){if(0!==this.bufferMessageCount){var e=s(this.pushOnlyBuffer,(t=this.upsertBuffer,n=[],Object.keys(t).forEach((function(e){n.push(t[e])})),n));this.request.send(e.join("\n"),this.bufferBytesSize),this.pushOnlyBuffer=[],this.upsertBuffer={},this.bufferBytesSize=0,this.bufferMessageCount=0}var t,n},e.prototype.addOrUpdate=function(e,t){var n=this.process(e),r=n.processedMessage,o=n.messageBytesSize;o>=this.maxMessageSize?console.warn("Discarded a message whose size was bigger than the maximum allowed size "+this.maxMessageSize+"KB."):(this.hasMessageFor(t)&&this.remove(t),this.willReachedBytesLimitWith(o)&&this.flush(),this.push(r,o,t),this.isFull()&&this.flush())},e.prototype.process=function(e){var t=y(h({},this.contextProvider(),e));return{processedMessage:t,messageBytesSize:this.sizeInBytes(t)}},e.prototype.push=function(e,t,n){this.bufferMessageCount>0&&(this.bufferBytesSize+=1),void 0!==n?this.upsertBuffer[n]=e:this.pushOnlyBuffer.push(e),this.bufferBytesSize+=t,this.bufferMessageCount+=1},e.prototype.remove=function(e){var t=this.upsertBuffer[e];delete this.upsertBuffer[e];var n=this.sizeInBytes(t);this.bufferBytesSize-=n,this.bufferMessageCount-=1,this.bufferMessageCount>0&&(this.bufferBytesSize-=1)},e.prototype.hasMessageFor=function(e){return void 0!==e&&void 0!==this.upsertBuffer[e]},e.prototype.willReachedBytesLimitWith=function(e){return this.bufferBytesSize+e+1>=this.bytesLimit},e.prototype.isFull=function(){return this.bufferMessageCount===this.maxSize||this.bufferBytesSize>=this.bytesLimit},e.prototype.sizeInBytes=function(e){return~-encodeURI(e).split(/%..|./).length},e.prototype.flushPeriodically=function(){var e=this;setTimeout((function(){e.flush(),e.flushPeriodically()}),this.flushTimeout)},e.prototype.flushOnVisibilityHidden=function(){var e=this;navigator.sendBeacon&&(window.addEventListener(a.BEFORE_UNLOAD,j(this.beforeUnloadCallback)),document.addEventListener(a.VISIBILITY_CHANGE,j((function(){"hidden"===document.visibilityState&&e.flush()}))),window.addEventListener(a.BEFORE_UNLOAD,j((function(){return e.flush()}))))},e}();!function(e){e.info="info",e.error="error"}(M||(M={}));var _,B={maxMessagesPerPage:0,sentMessageCount:0};function A(e,t,n){var r=n.value;n.value=function(){var e=B.batch?j(r):r;return e.apply(this,arguments)}}function j(e){return function(){try{return e.apply(this,arguments)}catch(e){z(e);try{N(e)}catch(e){z(e)}}}}function N(e){D(r(r({},function(e){if(e instanceof Error){var t=k(e);return{error:{kind:t.name,stack:ne(t)},message:t.message}}return{error:{stack:"Not an instance of error"},message:"Uncaught "+y(e)}}(e)),{status:M.error}))}function D(e){B.batch&&B.sentMessageCount<B.maxMessagesPerPage&&(B.sentMessageCount+=1,B.batch.add(e))}function P(e){B.debugMode=e}function z(e){B.debugMode&&console.warn("[INTERNAL ERROR]",e)}var H,U,F=function(){function e(){this.observers=[]}return e.prototype.subscribe=function(e){this.observers.push(e)},e.prototype.notify=function(e){this.observers.forEach((function(t){return t(e)}))},e}();function G(e){return K(e,E(window.location)).href}function K(e,t){if(function(){if(void 0!==H)return H;try{var e=new URL("http://test/path");return H="http://test/path"===e.href}catch(e){H=!1}return H}())return void 0!==t?new URL(e,t):new URL(e);if(void 0===t&&!/:/.test(e))throw new Error("Invalid URL: '"+e+"'");var n=document,r=n.createElement("a");if(void 0!==t){var o=(n=document.implementation.createHTMLDocument("")).createElement("base");o.href=t,n.head.appendChild(o),n.body.appendChild(r)}return r.href=e,r}!function(e){e.FETCH="fetch",e.XHR="xhr"}(U||(U={}));var q,$,V,W,X,J=1;function Y(){var e=J;return J+=1,e}function Z(){return q||(function(e){var t=e[0],n=e[1],r=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=j((function(e,t){return this._datadog_xhr={method:e,url:t},r.apply(this,arguments)}));var o=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(e){var r=this,i=performance.now(),s=Y();t.notify({requestId:s});var a=!1,u=function(){a||(a=!0,n.notify({requestId:s,startTime:i,duration:performance.now()-i,method:r._datadog_xhr.method,response:r.response,status:r.status,traceId:Q(),type:U.XHR,url:G(r._datadog_xhr.url)}))},c=this.onreadystatechange;return this.onreadystatechange=function(){this.readyState===XMLHttpRequest.DONE&&j(u)(),c&&c.apply(this,arguments)},this.addEventListener("loadend",j(u)),o.apply(this,arguments)}}(q=[new F,new F]),function(e){var t=e[0],n=e[1];if(!window.fetch)return;var r=window.fetch;window.fetch=j((function(e,s){var a=this,u=s&&s.method||"object"==typeof e&&e.method||"GET",c=performance.now(),f=Y();t.notify({requestId:f});var l=function(t){return o(a,void 0,void 0,(function(){var r,o,s,a,l;return i(this,(function(i){switch(i.label){case 0:return r=performance.now()-c,o=G("object"==typeof e&&e.url||e),"stack"in t||t instanceof Error?(s=k(t),n.notify({duration:r,method:u,requestId:f,startTime:c,url:o,response:ne(s),status:0,traceId:Q(),type:U.FETCH}),[3,6]):[3,1];case 1:if(!("status"in t))return[3,6];a=void 0,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,t.clone().text()];case 3:return a=i.sent(),[3,5];case 4:return l=i.sent(),a="Unable to retrieve response: "+l,[3,5];case 5:n.notify({duration:r,method:u,requestId:f,startTime:c,url:o,response:a,responseType:t.type,status:t.status,traceId:Q(),type:U.FETCH}),i.label=6;case 6:return[2]}}))}))},d=r.call(this,e,s);return d.then(j(l),j(l)),d}))}(q)),q}function Q(){return"ddtrace"in window&&window.ddtrace.tracer.scope().active()?window.ddtrace.tracer.scope().active().context().toTraceId():void 0}function ee(e){if(!V){var t=new F;if(e.isCollectingError)!function(e,t,n){n.subscribe((function(n){(function(e){return 0===e.status&&"opaque"!==e.responseType}(n)||function(e){return e.status>=500}(n))&&t.notify({context:{error:{origin:$.NETWORK,stack:re(n.response,e)||"Failed to load"},http:{method:n.method,status_code:n.status,url:n.url}},message:oe(n.type)+" error "+n.method+" "+n.url,startTime:n.startTime})}))}(e,t,Z()[1]),function(e){W=console.error,console.error=j((function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];W.apply(console,s([t],n)),e.notify({context:{error:{origin:$.CONSOLE}},message:s(["console error:",t],n).map(te).join(" "),startTime:performance.now()})}))}(t),function(e){X=function(t,n,r){e.notify(function(e,t){var n,r;void 0!==e.message||t instanceof Error?(n=e.message||"Empty message",r=ne(e)):(n="Uncaught "+y(t),r="No stack, consider using an instance of Error");return{message:n,context:{error:{stack:r,kind:e.name,origin:$.SOURCE}},startTime:performance.now()}}(t,r))},L.subscribe(X)}(t);V=function(e,t){var n=0,r=new F;return t.subscribe((function(t){n<e.maxErrorsByMinute?(n+=1,r.notify(t)):n===e.maxErrorsByMinute&&(n+=1,r.notify({context:{error:{origin:$.AGENT}},message:"Reached max number of errors by minute: "+e.maxErrorsByMinute,startTime:performance.now()}))})),setInterval((function(){return n=0}),c),r}(e,t)}return V}function te(e){return"string"==typeof e?e:e instanceof Error?ne(k(e)):y(e,0,2)}function ne(e){var t=(e.name||"Error")+": "+e.message;return e.stack.forEach((function(e){var n="?"===e.func?"<anonymous>":e.func,r=e.args&&e.args.length>0?"("+e.args.join(", ")+")":"",o=e.line?":"+e.line:"",i=e.line&&e.column?":"+e.column:"";t+="\n at "+n+r+" @ "+e.url+o+i})),t}function re(e,t){return e&&e.length>t.requestErrorResponseLengthLimit?e.substring(0,t.requestErrorResponseLengthLimit)+"...":e}function oe(e){return U.XHR===e?"XHR":"Fetch"}!function(e){e.AGENT="agent",e.CONSOLE="console",e.NETWORK="network",e.SOURCE="source",e.LOGGER="logger"}($||($={}));var ie=1e3;function se(e,t,n){var r=new Date;r.setTime(r.getTime()+n);var o="expires="+r.toUTCString();document.cookie=e+"="+t+";"+o+";path=/"}function ae(e){var t=document.cookie.match("(^|;)\\s*"+e+"\\s*=\\s*([^;]+)");return t?t.pop():void 0}function ue(){if(void 0===document.cookie||null===document.cookie)return!1;try{return se("dd_rum_test","test",1e3),"test"===ae("dd_rum_test")}catch(e){return console.error(e),!1}}function ce(e){console.warn("'"+e+"' not yet available, please call '.init()' first.")}function fe(e,t){var n=function(e,t){var n={applicationId:e.applicationId,buildMode:t.buildMode,clientToken:e.clientToken,datacenter:e.datacenter||t.datacenter,env:e.env,proxyHost:e.proxyHost,sdkEnv:t.sdkEnv,sdkVersion:t.sdkVersion,service:e.service,version:e.version},o=Array.isArray(e.enableExperimentalFeatures)?e.enableExperimentalFeatures:[],i=r({isEnabled:function(e){return t=e,-1!==o.indexOf(t);var t},logsEndpoint:T("browser",n),rumEndpoint:T("rum",n),traceEndpoint:T("public-trace",n)},x);return e.internalMonitoringApiKey&&(i.internalMonitoringEndpoint=T("browser",n,"browser-agent-internal-monitoring")),"isCollectingError"in e&&(i.isCollectingError=!!e.isCollectingError),"sampleRate"in e&&(i.sampleRate=e.sampleRate),"resourceSampleRate"in e&&(i.resourceSampleRate=e.resourceSampleRate),"trackInteractions"in e&&(i.trackInteractions=!!e.trackInteractions),"e2e-test"===n.buildMode&&(void 0!==e.internalMonitoringEndpoint&&(i.internalMonitoringEndpoint=e.internalMonitoringEndpoint),void 0!==e.logsEndpoint&&(i.logsEndpoint=e.logsEndpoint),void 0!==e.rumEndpoint&&(i.rumEndpoint=e.rumEndpoint)),i}(e,t),o=function(e){if(e.internalMonitoringEndpoint){var t=new I(new R(e.internalMonitoringEndpoint,e.batchBytesLimit),e.maxBatchSize,e.batchBytesLimit,e.maxMessageSize,e.flushTimeout,(function(){return h({date:(new Date).getTime(),view:{referrer:document.referrer,url:window.location.href}},void 0!==_?_():{})}));g(B,{batch:t,maxMessagesPerPage:e.maxInternalMonitoringMessagesPerPage,sentMessageCount:0})}return{setExternalContextProvider:function(e){_=e}}}(n);return{configuration:n,errorObservable:ee(n),internalMonitoring:o}}function le(){return"file:"!==window.location.protocol||(console.error("Execution is not allowed in the current context."),!1)}var de="_dd",pe="_dd_r",he="_dd_l",ge="rum",ve="logs";var me="_dd_s",ye=15*c,be=4*f,we=c;function Ee(e,t){var n,r,o,i,s,u=(n=me,i=!1,s=function(){i=!0,window.clearTimeout(r),r=window.setTimeout((function(){i=!1}),ie)},{get:function(){return i?o:(o=ae(n),s(),o)},set:function(e,t){se(n,e,t),o=e,s()}});!function(e){var t=e.get(),n=ae(de),r=ae(pe),o=ae(he);if(!t){var i={};n&&(i.id=n),o&&/^[01]$/.test(o)&&(i[ve]=o),r&&/^[012]$/.test(r)&&(i[ge]=r),Se(i,e)}}(u);var c,f,l,d,p,h,g,m,y,b=new F,w=Oe(u).id,E=(c=function(){var n=Oe(u),r=t(n[e]),o=r.trackingType,i=r.isTracked;n[e]=o,i&&!n.id&&(n.id=v(),n.created=String(Date.now())),Se(n,u),i&&w!==n.id&&(w=n.id,b.notify())},f=ie,p=!l||void 0===l.leading||l.leading,h=!l||void 0===l.trailing||l.trailing,g=!1,m=!1,y=!1,{throttled:function(){var e=this;y||(g?m=!0:(p?c.apply(this):m=!0,g=!0,d=window.setTimeout((function(){h&&m&&c.apply(e),g=!1,m=!1}),f)))},stop:function(){window.clearTimeout(d),y=!0}}).throttled;return E(),function(e){var t=j(e),n={capture:!0,passive:!0};[a.CLICK,a.TOUCH_START,a.KEY_DOWN,a.SCROLL].forEach((function(e){document.addEventListener(e,t,n),Le.push((function(){return document.removeEventListener(e,t,n)}))}))}(E),function(e){var t=j((function(){"visible"===document.visibilityState&&e()})),n=window.setInterval(t,we);document.addEventListener(a.VISIBILITY_CHANGE,t),Le.push((function(){clearInterval(n),document.removeEventListener(a.VISIBILITY_CHANGE,t)}))}((function(){Se(Oe(u),u)})),{getId:function(){return Oe(u).id},getTrackingType:function(){return Oe(u)[e]},renewObservable:b}}var xe=/^([a-z]+)=([a-z0-9-]+)$/,Te="&";function Oe(e){var t=function(e){var t=e.get(),n={};(function(e){return void 0!==e&&(-1!==e.indexOf(Te)||xe.test(e))})(t)&&t.split(Te).forEach((function(e){var t=xe.exec(e);if(null!==t){var r=t[1],o=t[2];n[r]=o}}));return n}(e);return function(e){return(void 0===e.created||Date.now()-Number(e.created)<be)&&(void 0===e.expire||Date.now()<Number(e.expire))}(t)?t:(Ce(e),{})}function Se(e,t){if(n=e,0!==Object.keys(n).length){var n;e.expire=String(Date.now()+ye);var r=function(e){return Object.keys(e).map((function(t){return[t,e[t]]}))}(e).map((function(e){return e[0]+"="+e[1]})).join(Te);t.set(r,ye)}else Ce(t)}function Ce(e){e.set("",0)}var Le=[];(function(){function e(e){var t=this,n=e[0],r=e[1];this.requests=[],this.whenAllCompleteFn=m;var o=0;n.subscribe((function(){o+=1})),r.subscribe((function(e){t.requests.push(e),0===(o-=1)&&setTimeout((function(){t.whenAllCompleteFn(t.requests)}))}))}e.prototype.whenAllComplete=function(e){this.whenAllCompleteFn=e},e.prototype.getStub=function(){var e=this;return function(){var t,n,s=new Promise((function(e,r){t=e,n=r}));return s.resolveWith=function(n){return o(e,void 0,void 0,(function(){var e=this;return i(this,(function(s){return[2,t(r(r({},n),{clone:function(){return{text:function(){return o(e,void 0,void 0,(function(){return i(this,(function(e){if(n.responseTextError)throw n.responseTextError;return[2,n.responseText]}))}))}}}}))]}))}))},s.rejectWith=function(t){return o(e,void 0,void 0,(function(){return i(this,(function(e){return[2,n(t)]}))}))},s}}})(),function(){function e(){}e.prototype.getEntryTypes=function(){return this.instance.entryTypes},e.prototype.fakeEntry=function(e,t){var n=function(){return[e]};this.instance.callback({getEntries:n,getEntriesByName:n,getEntriesByType:function(e){return e===t?n():[]}})},e.prototype.getStub=function(){var e,t=this;return(e=function(){function e(e){this.callback=e,t.instance=this}return e.prototype.observe=function(e){e&&(t.instance.entryTypes=e.entryTypes)},e}()).supportedEntryTypes=["navigation"],e}}();var ke,Re,Me={buildMode:"release",datacenter:"us",sdkEnv:"production",sdkVersion:"1.12.2"};!function(e){e.debug="debug",e.info="info",e.warn="warn",e.error="error"}(Re||(Re={}));var Ie,_e,Be=((ke={})[Re.debug]=0,ke[Re.info]=1,ke[Re.warn]=2,ke[Re.error]=3,ke);Object.keys(Re);function Ae(e,t,n,o){var i,s={};o.setExternalContextProvider((function(){return h({session_id:n.getId()},s,De())}));var a=new I(new R(t.logsEndpoint,t.batchBytesLimit),t.maxBatchSize,t.batchBytesLimit,t.maxMessageSize,t.flushTimeout,(function(){return h({date:(new Date).getTime(),session_id:n.getId(),view:{referrer:document.referrer,url:window.location.href}},s,De())})),u=((i={})[Ie.console]=function(e){return console.log(e.status+": "+e.message)},i[Ie.http]=function(e){return a.add(e)},i[Ie.silent]=m,i),c=new Ne(n,u);_e={},e.subscribe((function(e){return c.error(e.message,r({date:(t=e.startTime,Math.floor(w()+t))},e.context));var t}));var f={setLoggerGlobalContext:function(e){s=e},addLoggerGlobalContext:function(e,t){s[e]=t}};return f.createLogger=function(e,t){return function(n,o){return void 0===o&&(o={}),_e[n]=new Ne(e,t,o.handler,o.level,r(r({},o.context),{logger:{name:n}})),_e[n]}}(n,u),f.getLogger=je,f.logger=c,f}function je(e){return _e[e]}!function(e){e.http="http",e.console="console",e.silent="silent"}(Ie||(Ie={}));var Ne=function(){function e(e,t,n,r,o){void 0===n&&(n=Ie.http),void 0===r&&(r=Re.debug),void 0===o&&(o={}),this.session=e,this.handlers=t,this.level=r,this.loggerContext=o,this.handler=this.handlers[n]}return e.prototype.log=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n=Re.info),this.session.isTracked()&&Be[n]>=Be[this.level]&&this.handler(r({message:e,status:n},h({},this.loggerContext,t)))},e.prototype.debug=function(e,t){void 0===t&&(t={}),this.log(e,t,Re.debug)},e.prototype.info=function(e,t){void 0===t&&(t={}),this.log(e,t,Re.info)},e.prototype.warn=function(e,t){void 0===t&&(t={}),this.log(e,t,Re.warn)},e.prototype.error=function(e,t){void 0===t&&(t={});var n={error:{origin:$.LOGGER}};this.log(e,h({},n,t),Re.error)},e.prototype.setContext=function(e){this.loggerContext=e},e.prototype.addContext=function(e,t){this.loggerContext[e]=t},e.prototype.setHandler=function(e){this.handler=this.handlers[e]},e.prototype.setLevel=function(e){this.level=e},function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);i>3&&s&&Object.defineProperty(t,n,s)}([A],e.prototype,"log",null),e}();function De(){var e=window.DD_RUM;return e&&e.getInternalContext?e.getInternalContext():void 0}var Pe,ze="logs";function He(e,t){if(!t){var n=Ue(e)===Pe.TRACKED;return{getId:function(){},isTracked:function(){return n}}}var r=Ee(ze,(function(t){return function(e,t){var n=function(e){return e===Pe.NOT_TRACKED||e===Pe.TRACKED}(t)?t:Ue(e);return{trackingType:n,isTracked:n===Pe.TRACKED}}(e,t)}));return{getId:r.getId,isTracked:function(){return r.getTrackingType()===Pe.TRACKED}}}function Ue(e){return 0!==(t=e.sampleRate)&&100*Math.random()<=t?Pe.TRACKED:Pe.NOT_TRACKED;var t}!function(e){e.NOT_TRACKED="0",e.TRACKED="1"}(Pe||(Pe={}));var Fe,Ge={debug:function(e,t){ce("logs.logger.debug")},error:function(e,t){ce("logs.logger.error")},info:function(e,t){ce("logs.logger.info")},log:function(e,t,n){ce("logs.logger.log")},warn:function(e,t){ce("logs.logger.warn")},setContext:function(e){ce("logs.logger.setContext")},addContext:function(e,t){ce("logs.logger.addContext")},setHandler:function(e){ce("logs.logger.setHandler")},setLevel:function(e){ce("logs.logger.setLevel")}},Ke=(Fe=r({},{logger:Ge,init:function(e){ce("core.init")},addLoggerGlobalContext:function(e,t){ce("addLoggerGlobalContext")},setLoggerGlobalContext:function(e){ce("setLoggerGlobalContext")},createLogger:function(e,t){return ce("createLogger"),Ge},getLogger:function(e){ce("getLogger")}}),Object.defineProperty(Fe,"_setDebug",{get:function(){return P},enumerable:!1}),Fe),qe=!1;Ke.init=j((function(e){if(le()&&function(e){if(qe)return e.silentMultipleInit||console.error("DD_LOGS is already initialized."),!1;if(!e||!e.publicApiKey&&!e.clientToken)return console.error("Client Token is not configured, we will not send any data."),!1;if(void 0!==e.sampleRate&&(t=e.sampleRate,!(function(e){return"number"==typeof e}(t)&&t>=0&&t<=100)))return console.error("Sample Rate should be a number between 0 and 100"),!1;var t;return!0}(e)){e.publicApiKey&&(e.clientToken=e.publicApiKey,console.warn("Public API Key is deprecated. Please use Client Token instead."));var t=!1!==e.forwardErrorsToLogs,n=fe(r(r({},e),{isCollectingError:t}),Me),o=n.errorObservable,i=n.configuration,s=n.internalMonitoring,a=Ae(o,i,He(i,ue()),s);g(Ke,a),qe=!0}})),(function(){if("object"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get:function(){return this},configurable:!0});var e=_dd_temp_;return delete Object.prototype._dd_temp_,"object"!=typeof e&&(e="object"==typeof self?self:"object"==typeof window?window:{}),e}()).DD_LOGS=Ke}]);
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([,function(e,t,n){"use strict";n.r(t),n.d(t,"datadogLogs",(function(){return Ke}));var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function o(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function i(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)r[o]=i[s];return r}var s,a,u=6e4,c=60*u;!function(e){e.BEFORE_UNLOAD="beforeunload",e.CLICK="click",e.KEY_DOWN="keydown",e.LOAD="load",e.POP_STATE="popstate",e.SCROLL="scroll",e.TOUCH_START="touchstart",e.VISIBILITY_CHANGE="visibilitychange"}(s||(s={})),function(e){e.DOCUMENT="document",e.XHR="xhr",e.BEACON="beacon",e.FETCH="fetch",e.CSS="css",e.JS="js",e.IMAGE="image",e.FONT="font",e.MEDIA="media",e.OTHER="other"}(a||(a={}));var f,l=function(e){return Array.isArray(e)},d=function(e){return!Array.isArray(e)&&"object"==typeof e};function p(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(e,t){return l(e)&&l(t)?i(Array(Math.max(e.length,t.length))).map((function(n,r){return p(e[r],t[r])})):d(e)&&d(t)?Object.keys(t).reduce((function(n,o){var i;return r(r({},n),((i={})[o]=p(e[o],t[o]),i))}),e):void 0===t?e:t}),e)}function h(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];t.forEach((function(t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}))}function g(e){return e?(parseInt(e,10)^16*Math.random()>>parseInt(e,10)/4).toString(16):(1e7+"-1000-4000-8000-100000000000").replace(/[018]/g,g)}function v(){}function m(e,t,n){if(null==e)return JSON.stringify(e);var r=[!1,void 0];y(e)&&(r=[!0,e.toJSON],delete e.toJSON);var o,i,s=[!1,void 0];"object"==typeof e&&y(o=Object.getPrototypeOf(e))&&(s=[!0,o.toJSON],delete o.toJSON);try{i=JSON.stringify(e,void 0,n)}catch(e){i="<error: unable to serialize object>"}finally{r[0]&&(e.toJSON=r[1]),s[0]&&(o.toJSON=s[1])}return i}function y(e){return"object"==typeof e&&null!==e&&e.hasOwnProperty("toJSON")}function b(){return void 0===f&&(f=performance.timing.navigationStart),f}function w(e){if(e.origin)return e.origin;var t=e.host.replace(/(:80|:443)$/,"");return e.protocol+"//"+t}var E={isCollectingError:!0,maxErrorsByMinute:3e3,maxInternalMonitoringMessagesPerPage:15,resourceSampleRate:100,sampleRate:100,silentMultipleInit:!1,trackInteractions:!1,requestErrorResponseLengthLimit:32768,flushTimeout:3e4,maxBatchSize:50,maxMessageSize:262144,batchBytesLimit:16384};function x(e,t,n){var r="us"===t.datacenter?"com":"eu",o="production"===t.sdkEnv?"datadoghq."+r:"datad0g."+r,i="sdk_version:"+t.sdkVersion+(t.env?",env:"+t.env:"")+(t.service?",service:"+t.service:"")+(t.version?",version:"+t.version:""),s=e+"-http-intake.logs."+o,a=t.proxyHost?t.proxyHost:s,u=t.proxyHost?"ddhost="+s+"&":"",c=""+(t.applicationId?"_dd.application_id="+t.applicationId+"&":"")+u+"ddsource="+(n||"browser")+"&ddtags="+i;return"https://"+a+"/v1/input/"+t.clientToken+"?"+c}var T=1e3;function O(e,t,n){var r=new Date;r.setTime(r.getTime()+n);var o="expires="+r.toUTCString();document.cookie=e+"="+t+";"+o+";path=/"}function S(e){var t=document.cookie.match("(^|;)\\s*"+e+"\\s*=\\s*([^;]+)");return t?t.pop():void 0}function L(){if(void 0===document.cookie||null===document.cookie)return!1;try{return O("dd_rum_test","test",1e3),"test"===S("dd_rum_test")}catch(e){return console.error(e),!1}}var C="?",k=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var M=function(){var e,t,n,r,o,i,s=[];function a(e,t,n){var r;for(var o in s)if(R(s,o))try{s[o](e,t,n)}catch(e){r=e}if(r)throw r}function u(e,r,o,i,s){if(t)I.augmentStackTraceWithInitialElement(t,r,o,""+e),f();else if(s)a(I(s),!0,s);else{var u,c={url:r,column:i,line:o},l=e;if("[object String]"==={}.toString.call(e)){var d=l.match(k);d&&(u=d[1],l=d[2])}a({name:u,message:l,stack:[c]},!0)}return!!n&&n.apply(this,arguments)}function c(e){var t=e.reason||"Empty reason";a(I(t),!0,t)}function f(){var n=t,r=e;t=void 0,e=void 0,a(n,!1,r)}function l(n){if(t){if(e===n)return;f()}var r=I(n);throw t=r,e=n,setTimeout((function(){e===n&&f()}),r.incomplete?2e3:0),n}return l.subscribe=function(e){!function(){if(r)return;n=window.onerror,window.onerror=z(u),r=!0}(),function(){if(i)return;o=null!==window.onunhandledrejection?window.onunhandledrejection:void 0,window.onunhandledrejection=z(c),i=!0}(),s.push(e)},l.unsubscribe=function(e){for(var t=s.length-1;t>=0;t-=1)s[t]===e&&s.splice(t,1);0===s.length&&(r&&(window.onerror=n,r=!1),i&&(window.onunhandledrejection=o,i=!1))},l.traceKitWindowOnError=u,l}(),I=function(){var e=!1;function t(e){if(e.stack){for(var t,n,r,o,i=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,s=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,a=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,u=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,c=/\((\S*)(?::(\d+))(?::(\d+))\)/,f=e.stack.split("\n"),l=[],d=0,p=f.length;d<p;d+=1){if(i.exec(f[d])){var h=(r=i.exec(f[d]))[2]&&0===r[2].indexOf("native");t=r[2]&&0===r[2].indexOf("eval"),n=c.exec(r[2]),t&&n&&(r[2]=n[1],r[3]=n[2],r[4]=n[3]),o={args:h?[r[2]]:[],column:r[4]?+r[4]:void 0,func:r[1]||C,line:r[3]?+r[3]:void 0,url:h?void 0:r[2]}}else if(a.exec(f[d]))o={args:[],column:(r=a.exec(f[d]))[4]?+r[4]:void 0,func:r[1]||C,line:+r[3],url:r[2]};else{if(!s.exec(f[d]))continue;t=(r=s.exec(f[d]))[3]&&r[3].indexOf(" > eval")>-1,n=u.exec(r[3]),t&&n?(r[3]=n[1],r[4]=n[2],r[5]=void 0):0!==d||r[5]||void 0===e.columnNumber||(l[0].column=e.columnNumber+1),o={args:r[2]?r[2].split(","):[],column:r[5]?+r[5]:void 0,func:r[1]||C,line:r[4]?+r[4]:void 0,url:r[3]}}!o.func&&o.line&&(o.func=C),l.push(o)}if(l.length)return{stack:l,message:e.message,name:e.name}}}function n(e,t,n,r){var o={url:t,line:n?+n:void 0};if(o.url&&o.line){e.incomplete=!1;var i=e.stack;if(i.length>0&&i[0].url===o.url){if(i[0].line===o.line)return!1;if(!i[0].line&&i[0].func===o.func)return i[0].line=o.line,i[0].context=o.context,!1}return i.unshift(o),e.partial=!0,!0}return e.incomplete=!0,!1}function r(e,t){for(var o,i,s=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,a=[],u={},c=!1,f=r.caller;f&&!c;f=f.caller)f!==I&&f!==M&&(i={args:[],column:void 0,func:C,line:void 0,url:void 0},o=s.exec(f.toString()),f.name?i.func=f.name:o&&(i.func=o[1]),void 0===i.func&&(i.func=o?o.input.substring(0,o.input.indexOf("{")):void 0),u[""+f]?c=!0:u[""+f]=!0,a.push(i));t&&a.splice(0,t);var l={stack:a,message:e.message,name:e.name};return n(l,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),l}function o(n,o){var i,s=void 0===o?0:+o;try{if(i=function(e){var t=e.stacktrace;if(t){for(var n,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,o=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,i=t.split("\n"),s=[],a=0;a<i.length;a+=2){var u=void 0;r.exec(i[a])?u={args:[],column:void 0,func:(n=r.exec(i[a]))[3],line:+n[1],url:n[2]}:o.exec(i[a])&&(u={args:(n=o.exec(i[a]))[5]?n[5].split(","):[],column:+n[2],func:n[3]||n[4],line:+n[1],url:n[6]}),u&&(!u.func&&u.line&&(u.func=C),u.context=[i[a+1]],s.push(u))}if(s.length)return{stack:s,message:e.message,name:e.name}}}(n))return i}catch(t){if(e)throw t}try{if(i=t(n))return i}catch(t){if(e)throw t}try{if(i=function(e){var t=e.message.split("\n");if(!(t.length<4)){var n,r=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,o=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,i=/^\s*Line (\d+) of function script\s*$/i,s=[],a=window&&window.document&&window.document.getElementsByTagName("script"),u=[];for(var c in a)R(a,c)&&!a[c].src&&u.push(a[c]);for(var f=2;f<t.length;f+=2){var l=void 0;if(r.exec(t[f]))l={args:[],column:void 0,func:(n=r.exec(t[f]))[3],line:+n[1],url:n[2]};else if(o.exec(t[f]))l={args:[],column:void 0,func:(n=o.exec(t[f]))[4],line:+n[1],url:n[3]};else if(i.exec(t[f])){n=i.exec(t[f]),l={url:window.location.href.replace(/#.*$/,""),args:[],column:void 0,func:"",line:+n[1]}}l&&(l.func||(l.func=C),l.context=[t[f+1]],s.push(l))}if(s.length)return{stack:s,message:t[0],name:e.name}}}(n))return i}catch(t){if(e)throw t}try{if(i=r(n,s+1))return i}catch(t){if(e)throw t}return{message:n.message,name:n.name,stack:[]}}return o.augmentStackTraceWithInitialElement=n,o.computeStackTraceFromStackProp=t,o.ofCaller=function(e){var t=1+(void 0===e?0:+e);try{throw new Error}catch(e){return I(e,t+1)}},o}();var _=/[^\u0000-\u007F]/,B=function(){function e(e,t,n){void 0===n&&(n=!1),this.endpointUrl=e,this.bytesLimit=t,this.withBatchTime=n}return e.prototype.send=function(e,t){var n=this.withBatchTime?function(e){return e+(-1===e.indexOf("?")?"?":"&")+"batch_time="+(new Date).getTime()}(this.endpointUrl):this.endpointUrl;if(navigator.sendBeacon&&t<this.bytesLimit&&navigator.sendBeacon(n,e))return;var r=new XMLHttpRequest;r.open("POST",n,!0),r.send(e)},e}();var A,j=function(){function e(e,t,n,r,o,i,s){void 0===s&&(s=v),this.request=e,this.maxSize=t,this.bytesLimit=n,this.maxMessageSize=r,this.flushTimeout=o,this.contextProvider=i,this.beforeUnloadCallback=s,this.pushOnlyBuffer=[],this.upsertBuffer={},this.bufferBytesSize=0,this.bufferMessageCount=0,this.flushOnVisibilityHidden(),this.flushPeriodically()}return e.prototype.add=function(e){this.addOrUpdate(e)},e.prototype.upsert=function(e,t){this.addOrUpdate(e,t)},e.prototype.flush=function(){if(0!==this.bufferMessageCount){var e=i(this.pushOnlyBuffer,(t=this.upsertBuffer,n=[],Object.keys(t).forEach((function(e){n.push(t[e])})),n));this.request.send(e.join("\n"),this.bufferBytesSize),this.pushOnlyBuffer=[],this.upsertBuffer={},this.bufferBytesSize=0,this.bufferMessageCount=0}var t,n},e.prototype.sizeInBytes=function(e){return _.test(e)?void 0!==window.TextEncoder?(new TextEncoder).encode(e).length:new Blob([e]).size:e.length},e.prototype.addOrUpdate=function(e,t){var n=this.process(e),r=n.processedMessage,o=n.messageBytesSize;o>=this.maxMessageSize?console.warn("Discarded a message whose size was bigger than the maximum allowed size "+this.maxMessageSize+"KB."):(this.hasMessageFor(t)&&this.remove(t),this.willReachedBytesLimitWith(o)&&this.flush(),this.push(r,o,t),this.isFull()&&this.flush())},e.prototype.process=function(e){var t=m(p({},this.contextProvider(),e));return{processedMessage:t,messageBytesSize:this.sizeInBytes(t)}},e.prototype.push=function(e,t,n){this.bufferMessageCount>0&&(this.bufferBytesSize+=1),void 0!==n?this.upsertBuffer[n]=e:this.pushOnlyBuffer.push(e),this.bufferBytesSize+=t,this.bufferMessageCount+=1},e.prototype.remove=function(e){var t=this.upsertBuffer[e];delete this.upsertBuffer[e];var n=this.sizeInBytes(t);this.bufferBytesSize-=n,this.bufferMessageCount-=1,this.bufferMessageCount>0&&(this.bufferBytesSize-=1)},e.prototype.hasMessageFor=function(e){return void 0!==e&&void 0!==this.upsertBuffer[e]},e.prototype.willReachedBytesLimitWith=function(e){return this.bufferBytesSize+e+1>=this.bytesLimit},e.prototype.isFull=function(){return this.bufferMessageCount===this.maxSize||this.bufferBytesSize>=this.bytesLimit},e.prototype.flushPeriodically=function(){var e=this;setTimeout((function(){e.flush(),e.flushPeriodically()}),this.flushTimeout)},e.prototype.flushOnVisibilityHidden=function(){var e=this;navigator.sendBeacon&&(window.addEventListener(s.BEFORE_UNLOAD,z(this.beforeUnloadCallback)),document.addEventListener(s.VISIBILITY_CHANGE,z((function(){"hidden"===document.visibilityState&&e.flush()}))),window.addEventListener(s.BEFORE_UNLOAD,z((function(){return e.flush()}))))},e}();!function(e){e.info="info",e.error="error"}(A||(A={}));var N,D={maxMessagesPerPage:0,sentMessageCount:0};function P(e,t,n){var r=n.value;n.value=function(){var e=D.batch?z(r):r;return e.apply(this,arguments)}}function z(e){return function(){try{return e.apply(this,arguments)}catch(e){G(e);try{H(e)}catch(e){G(e)}}}}function H(e){U(r(r({},function(e){if(e instanceof Error){var t=I(e);return{error:{kind:t.name,stack:se(t)},message:t.message}}return{error:{stack:"Not an instance of error"},message:"Uncaught "+m(e)}}(e)),{status:A.error}))}function U(e){D.batch&&D.sentMessageCount<D.maxMessagesPerPage&&(D.sentMessageCount+=1,D.batch.add(e))}function F(e){D.debugMode=e}function G(e){D.debugMode&&console.warn("[INTERNAL ERROR]",e)}var K,q,$=function(){function e(){this.observers=[]}return e.prototype.subscribe=function(e){this.observers.push(e)},e.prototype.notify=function(e){this.observers.forEach((function(t){return t(e)}))},e}();function V(e){return X(e,w(window.location)).href}function X(e,t){if(function(){if(void 0!==K)return K;try{var e=new URL("http://test/path");return K="http://test/path"===e.href}catch(e){K=!1}return K}())return void 0!==t?new URL(e,t):new URL(e);if(void 0===t&&!/:/.test(e))throw new Error("Invalid URL: '"+e+"'");var n=document,r=n.createElement("a");if(void 0!==t){var o=(n=document.implementation.createHTMLDocument("")).createElement("base");o.href=t,n.head.appendChild(o),n.body.appendChild(r)}return r.href=e,r}!function(e){e.FETCH="fetch",e.XHR="xhr"}(q||(q={}));var J,W,Y,Z,Q,ee=1;function te(){var e=ee;return ee+=1,e}function ne(){return J||(function(e){var t=e[0],n=e[1],r=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=z((function(e,t){return this._datadog_xhr={method:e,url:t},r.apply(this,arguments)}));var o=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(e){var r=this,i=performance.now(),s=te();t.notify({requestId:s});var a=!1,u=function(){a||(a=!0,n.notify({requestId:s,startTime:i,duration:performance.now()-i,method:r._datadog_xhr.method,response:r.response,status:r.status,traceId:re(),type:q.XHR,url:V(r._datadog_xhr.url)}))},c=this.onreadystatechange;return this.onreadystatechange=function(){this.readyState===XMLHttpRequest.DONE&&z(u)(),c&&c.apply(this,arguments)},this.addEventListener("loadend",z(u)),o.apply(this,arguments)}}(J=[new $,new $]),function(e){var t=e[0],n=e[1];if(!window.fetch)return;var r=window.fetch;window.fetch=z((function(e,i){var s=this,a=i&&i.method||"object"==typeof e&&e.method||"GET",u=performance.now(),c=te();t.notify({requestId:c});var f=function(t){return r=s,i=void 0,l=function(){var r,i,s,f,l;return o(this,(function(o){switch(o.label){case 0:return r=performance.now()-u,i=V("object"==typeof e&&e.url||e),"stack"in t||t instanceof Error?(s=I(t),n.notify({duration:r,method:a,requestId:c,startTime:u,url:i,response:se(s),status:0,traceId:re(),type:q.FETCH}),[3,6]):[3,1];case 1:if(!("status"in t))return[3,6];f=void 0,o.label=2;case 2:return o.trys.push([2,4,,5]),[4,t.clone().text()];case 3:return f=o.sent(),[3,5];case 4:return l=o.sent(),f="Unable to retrieve response: "+l,[3,5];case 5:n.notify({duration:r,method:a,requestId:c,startTime:u,url:i,response:f,responseType:t.type,status:t.status,traceId:re(),type:q.FETCH}),o.label=6;case 6:return[2]}}))},new((f=void 0)||(f=Promise))((function(e,t){function n(e){try{s(l.next(e))}catch(e){t(e)}}function o(e){try{s(l.throw(e))}catch(e){t(e)}}function s(t){t.done?e(t.value):new f((function(e){e(t.value)})).then(n,o)}s((l=l.apply(r,i||[])).next())}));var r,i,f,l},l=r.call(this,e,i);return l.then(z(f),z(f)),l}))}(J)),J}function re(){return"ddtrace"in window&&window.ddtrace.tracer.scope().active()?window.ddtrace.tracer.scope().active().context().toTraceId():void 0}function oe(e){if(!Y){var t=new $;if(e.isCollectingError)!function(e,t,n){n.subscribe((function(n){(function(e){return 0===e.status&&"opaque"!==e.responseType}(n)||function(e){return e.status>=500}(n))&&t.notify({context:{error:{origin:W.NETWORK,stack:ae(n.response,e)||"Failed to load"},http:{method:n.method,status_code:n.status,url:n.url}},message:ue(n.type)+" error "+n.method+" "+n.url,startTime:n.startTime})}))}(e,t,ne()[1]),function(e){Z=console.error,console.error=z((function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];Z.apply(console,i([t],n)),e.notify({context:{error:{origin:W.CONSOLE}},message:i(["console error:",t],n).map(ie).join(" "),startTime:performance.now()})}))}(t),function(e){Q=function(t,n,r){e.notify(function(e,t){var n,r;void 0!==e.message||t instanceof Error?(n=e.message||"Empty message",r=se(e)):(n="Uncaught "+m(t),r="No stack, consider using an instance of Error");return{message:n,context:{error:{stack:r,kind:e.name,origin:W.SOURCE}},startTime:performance.now()}}(t,r))},M.subscribe(Q)}(t);Y=function(e,t){var n=0,r=new $;return t.subscribe((function(t){n<e.maxErrorsByMinute?(n+=1,r.notify(t)):n===e.maxErrorsByMinute&&(n+=1,r.notify({context:{error:{origin:W.AGENT}},message:"Reached max number of errors by minute: "+e.maxErrorsByMinute,startTime:performance.now()}))})),setInterval((function(){return n=0}),u),r}(e,t)}return Y}function ie(e){return"string"==typeof e?e:e instanceof Error?se(I(e)):m(e,0,2)}function se(e){var t=(e.name||"Error")+": "+e.message;return e.stack.forEach((function(e){var n="?"===e.func?"<anonymous>":e.func,r=e.args&&e.args.length>0?"("+e.args.join(", ")+")":"",o=e.line?":"+e.line:"",i=e.line&&e.column?":"+e.column:"";t+="\n at "+n+r+" @ "+e.url+o+i})),t}function ae(e,t){return e&&e.length>t.requestErrorResponseLengthLimit?e.substring(0,t.requestErrorResponseLengthLimit)+"...":e}function ue(e){return q.XHR===e?"XHR":"Fetch"}function ce(e){console.warn("'"+e+"' not yet available, please call '.init()' first.")}function fe(e,t){var n=function(e,t){var n={applicationId:e.applicationId,buildMode:t.buildMode,clientToken:e.clientToken,datacenter:e.datacenter||t.datacenter,env:e.env,proxyHost:e.proxyHost,sdkEnv:t.sdkEnv,sdkVersion:t.sdkVersion,service:e.service,version:e.version},o=Array.isArray(e.enableExperimentalFeatures)?e.enableExperimentalFeatures:[],i=r({isEnabled:function(e){return t=e,-1!==o.indexOf(t);var t},logsEndpoint:x("browser",n),rumEndpoint:x("rum",n),traceEndpoint:x("public-trace",n)},E);return e.internalMonitoringApiKey&&(i.internalMonitoringEndpoint=x("browser",n,"browser-agent-internal-monitoring")),"isCollectingError"in e&&(i.isCollectingError=!!e.isCollectingError),"sampleRate"in e&&(i.sampleRate=e.sampleRate),"resourceSampleRate"in e&&(i.resourceSampleRate=e.resourceSampleRate),"trackInteractions"in e&&(i.trackInteractions=!!e.trackInteractions),"e2e-test"===n.buildMode&&(void 0!==e.internalMonitoringEndpoint&&(i.internalMonitoringEndpoint=e.internalMonitoringEndpoint),void 0!==e.logsEndpoint&&(i.logsEndpoint=e.logsEndpoint),void 0!==e.rumEndpoint&&(i.rumEndpoint=e.rumEndpoint)),i}(e,t),o=function(e){if(e.internalMonitoringEndpoint){var t=new j(new B(e.internalMonitoringEndpoint,e.batchBytesLimit),e.maxBatchSize,e.batchBytesLimit,e.maxMessageSize,e.flushTimeout,(function(){return p({date:(new Date).getTime(),view:{referrer:document.referrer,url:window.location.href}},void 0!==N?N():{})}));h(D,{batch:t,maxMessagesPerPage:e.maxInternalMonitoringMessagesPerPage,sentMessageCount:0})}return{setExternalContextProvider:function(e){N=e}}}(n);return{configuration:n,errorObservable:oe(n),internalMonitoring:o}}function le(){return"file:"!==window.location.protocol||(console.error("Execution is not allowed in the current context."),!1)}!function(e){e.AGENT="agent",e.CONSOLE="console",e.NETWORK="network",e.SOURCE="source",e.LOGGER="logger"}(W||(W={}));var de,pe,he={buildMode:"release",datacenter:"us",sdkEnv:"production",sdkVersion:"1.12.3"};!function(e){e.debug="debug",e.info="info",e.warn="warn",e.error="error"}(pe||(pe={}));var ge,ve,me=((de={})[pe.debug]=0,de[pe.info]=1,de[pe.warn]=2,de[pe.error]=3,de);Object.keys(pe);function ye(e,t,n,o){var i,s={};o.setExternalContextProvider((function(){return p({session_id:n.getId()},s,Ee())}));var a=new j(new B(t.logsEndpoint,t.batchBytesLimit),t.maxBatchSize,t.batchBytesLimit,t.maxMessageSize,t.flushTimeout,(function(){return p({date:(new Date).getTime(),session_id:n.getId(),view:{referrer:document.referrer,url:window.location.href}},s,Ee())})),u=((i={})[ge.console]=function(e){return console.log(e.status+": "+e.message)},i[ge.http]=function(e){return a.add(e)},i[ge.silent]=v,i),c=new we(n,u);ve={},e.subscribe((function(e){return c.error(e.message,r({date:(t=e.startTime,Math.floor(b()+t))},e.context));var t}));var f={setLoggerGlobalContext:function(e){s=e},addLoggerGlobalContext:function(e,t){s[e]=t}};return f.createLogger=function(e,t){return function(n,o){return void 0===o&&(o={}),ve[n]=new we(e,t,o.handler,o.level,r(r({},o.context),{logger:{name:n}})),ve[n]}}(n,u),f.getLogger=be,f.logger=c,f}function be(e){return ve[e]}!function(e){e.http="http",e.console="console",e.silent="silent"}(ge||(ge={}));var we=function(){function e(e,t,n,r,o){void 0===n&&(n=ge.http),void 0===r&&(r=pe.debug),void 0===o&&(o={}),this.session=e,this.handlers=t,this.level=r,this.loggerContext=o,this.handler=this.handlers[n]}return e.prototype.log=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n=pe.info),this.session.isTracked()&&me[n]>=me[this.level]&&this.handler(r({message:e,status:n},p({},this.loggerContext,t)))},e.prototype.debug=function(e,t){void 0===t&&(t={}),this.log(e,t,pe.debug)},e.prototype.info=function(e,t){void 0===t&&(t={}),this.log(e,t,pe.info)},e.prototype.warn=function(e,t){void 0===t&&(t={}),this.log(e,t,pe.warn)},e.prototype.error=function(e,t){void 0===t&&(t={});var n={error:{origin:W.LOGGER}};this.log(e,p({},n,t),pe.error)},e.prototype.setContext=function(e){this.loggerContext=e},e.prototype.addContext=function(e,t){this.loggerContext[e]=t},e.prototype.setHandler=function(e){this.handler=this.handlers[e]},e.prototype.setLevel=function(e){this.level=e},function(e,t,n,r){var o,i=arguments.length,s=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);i>3&&s&&Object.defineProperty(t,n,s)}([P],e.prototype,"log",null),e}();function Ee(){var e=window.DD_RUM;return e&&e.getInternalContext?e.getInternalContext():void 0}var xe="_dd",Te="_dd_r",Oe="_dd_l",Se="rum",Le="logs";var Ce="_dd_s",ke=15*u,Re=4*c,Me=u;function Ie(e,t){var n,r,o,i,a,u=(n=Ce,i=!1,a=function(){i=!0,window.clearTimeout(r),r=window.setTimeout((function(){i=!1}),T)},{get:function(){return i?o:(o=S(n),a(),o)},set:function(e,t){O(n,e,t),o=e,a()}});!function(e){var t=e.get(),n=S(xe),r=S(Te),o=S(Oe);if(!t){var i={};n&&(i.id=n),o&&/^[01]$/.test(o)&&(i[Le]=o),r&&/^[012]$/.test(r)&&(i[Se]=r),je(i,e)}}(u);var c,f,l,d,p,h,v,m,y,b=new $,w=Ae(u).id,E=(c=function(){var n=Ae(u),r=t(n[e]),o=r.trackingType,i=r.isTracked;n[e]=o,i&&!n.id&&(n.id=g(),n.created=String(Date.now())),je(n,u),i&&w!==n.id&&(w=n.id,b.notify())},f=T,p=!l||void 0===l.leading||l.leading,h=!l||void 0===l.trailing||l.trailing,v=!1,m=!1,y=!1,{throttled:function(){var e=this;y||(v?m=!0:(p?c.apply(this):m=!0,v=!0,d=window.setTimeout((function(){h&&m&&c.apply(e),v=!1,m=!1}),f)))},stop:function(){window.clearTimeout(d),y=!0}}).throttled;return E(),function(e){var t=z(e),n={capture:!0,passive:!0};[s.CLICK,s.TOUCH_START,s.KEY_DOWN,s.SCROLL].forEach((function(e){document.addEventListener(e,t,n),De.push((function(){return document.removeEventListener(e,t,n)}))}))}(E),function(e){var t=z((function(){"visible"===document.visibilityState&&e()})),n=window.setInterval(t,Me);document.addEventListener(s.VISIBILITY_CHANGE,t),De.push((function(){clearInterval(n),document.removeEventListener(s.VISIBILITY_CHANGE,t)}))}((function(){je(Ae(u),u)})),{getId:function(){return Ae(u).id},getTrackingType:function(){return Ae(u)[e]},renewObservable:b}}var _e=/^([a-z]+)=([a-z0-9-]+)$/,Be="&";function Ae(e){var t=function(e){var t=e.get(),n={};(function(e){return void 0!==e&&(-1!==e.indexOf(Be)||_e.test(e))})(t)&&t.split(Be).forEach((function(e){var t=_e.exec(e);if(null!==t){var r=t[1],o=t[2];n[r]=o}}));return n}(e);return function(e){return(void 0===e.created||Date.now()-Number(e.created)<Re)&&(void 0===e.expire||Date.now()<Number(e.expire))}(t)?t:(Ne(e),{})}function je(e,t){if(n=e,0!==Object.keys(n).length){var n;e.expire=String(Date.now()+ke);var r=function(e){return Object.keys(e).map((function(t){return[t,e[t]]}))}(e).map((function(e){return e[0]+"="+e[1]})).join(Be);t.set(r,ke)}else Ne(t)}function Ne(e){e.set("",0)}var De=[];var Pe,ze="logs";function He(e,t){if(!t){var n=Ue(e)===Pe.TRACKED;return{getId:function(){},isTracked:function(){return n}}}var r=Ie(ze,(function(t){return function(e,t){var n=function(e){return e===Pe.NOT_TRACKED||e===Pe.TRACKED}(t)?t:Ue(e);return{trackingType:n,isTracked:n===Pe.TRACKED}}(e,t)}));return{getId:r.getId,isTracked:function(){return r.getTrackingType()===Pe.TRACKED}}}function Ue(e){return 0!==(t=e.sampleRate)&&100*Math.random()<=t?Pe.TRACKED:Pe.NOT_TRACKED;var t}!function(e){e.NOT_TRACKED="0",e.TRACKED="1"}(Pe||(Pe={}));var Fe,Ge={debug:function(e,t){ce("logs.logger.debug")},error:function(e,t){ce("logs.logger.error")},info:function(e,t){ce("logs.logger.info")},log:function(e,t,n){ce("logs.logger.log")},warn:function(e,t){ce("logs.logger.warn")},setContext:function(e){ce("logs.logger.setContext")},addContext:function(e,t){ce("logs.logger.addContext")},setHandler:function(e){ce("logs.logger.setHandler")},setLevel:function(e){ce("logs.logger.setLevel")}},Ke=(Fe=r({},{logger:Ge,init:function(e){ce("core.init")},addLoggerGlobalContext:function(e,t){ce("addLoggerGlobalContext")},setLoggerGlobalContext:function(e){ce("setLoggerGlobalContext")},createLogger:function(e,t){return ce("createLogger"),Ge},getLogger:function(e){ce("getLogger")}}),Object.defineProperty(Fe,"_setDebug",{get:function(){return F},enumerable:!1}),Fe),qe=!1;Ke.init=z((function(e){if(le()&&function(e){if(qe)return e.silentMultipleInit||console.error("DD_LOGS is already initialized."),!1;if(!e||!e.publicApiKey&&!e.clientToken)return console.error("Client Token is not configured, we will not send any data."),!1;if(void 0!==e.sampleRate&&(t=e.sampleRate,!(function(e){return"number"==typeof e}(t)&&t>=0&&t<=100)))return console.error("Sample Rate should be a number between 0 and 100"),!1;var t;return!0}(e)){e.publicApiKey&&(e.clientToken=e.publicApiKey,console.warn("Public API Key is deprecated. Please use Client Token instead."));var t=!1!==e.forwardErrorsToLogs,n=fe(r(r({},e),{isCollectingError:t}),he),o=n.errorObservable,i=n.configuration,s=n.internalMonitoring,a=ye(o,i,He(i,L()),s);h(Ke,a),qe=!0}})),(function(){if("object"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get:function(){return this},configurable:!0});var e=_dd_temp_;return delete Object.prototype._dd_temp_,"object"!=typeof e&&(e="object"==typeof self?self:"object"==typeof window?window:{}),e}()).DD_LOGS=Ke}]);

@@ -7,4 +7,4 @@ "use strict";

sdkEnv: 'production',
sdkVersion: '1.12.2',
sdkVersion: '1.12.3',
};
//# sourceMappingURL=buildEnv.js.map

@@ -5,4 +5,4 @@ export var buildEnv = {

sdkEnv: 'production',
sdkVersion: '1.12.2',
sdkVersion: '1.12.3',
};
//# sourceMappingURL=buildEnv.js.map
{
"name": "@datadog/browser-logs",
"version": "1.12.2",
"version": "1.12.3",
"license": "Apache-2.0",

@@ -16,3 +16,3 @@ "main": "cjs/index.js",

"dependencies": {
"@datadog/browser-core": "1.12.2",
"@datadog/browser-core": "1.12.3",
"tslib": "1.10.0"

@@ -29,3 +29,3 @@ },

},
"gitHead": "847f6c595516af2065c2ab1a70b95d765ee3e6a8"
"gitHead": "8034232e961f5842c741768955a1fdd1ff3cf831"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc