UNPKG

dd-trace

Version:

Datadog APM tracing client for JavaScript

1 lines 29.7 kB
(()=>{var e={"./@datadog/source-map/lib/array-set.js"(e,r,n){var t=n("./@datadog/source-map/lib/util.js"),o=Object.prototype.hasOwnProperty,i="u">typeof Map;function ArraySet(){this._array=[],this._set=i?new Map:Object.create(null)}ArraySet.fromArray=function(e,r){for(var n=new ArraySet,t=0,o=e.length;t<o;t++)n.add(e[t],r);return n},ArraySet.prototype.size=function(){return i?this._set.size:Object.getOwnPropertyNames(this._set).length},ArraySet.prototype.add=function(e,r){var n=i?e:t.toSetString(e),a=i?this.has(e):o.call(this._set,n),s=this._array.length;(!a||r)&&this._array.push(e),a||(i?this._set.set(e,s):this._set[n]=s)},ArraySet.prototype.has=function(e){if(i)return this._set.has(e);var r=t.toSetString(e);return o.call(this._set,r)},ArraySet.prototype.indexOf=function(e){if(i){var r=this._set.get(e);if(r>=0)return r}else{var n=t.toSetString(e);if(o.call(this._set,n))return this._set[n]}throw Error('"'+e+'" is not in the set.')},ArraySet.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw Error("No element indexed by "+e)},ArraySet.prototype.toArray=function(){return this._array.slice()},r.ArraySet=ArraySet},"./@datadog/source-map/lib/base64-vlq.js"(e,r,n){var t=n("./@datadog/source-map/lib/base64.js");function toVLQSigned(e){return e<0?(-e<<1)+1:(e<<1)+0}function fromVLQSigned(e){var r=e>>1;return(1&e)==1?-r:r}r.encode=function(e){var r,n="",o=toVLQSigned(e);do r=31&o,(o>>>=5)>0&&(r|=32),n+=t.encode(r);while(o>0);return n},r.decode=function(e,r,n){var o,i,a=e.length,s=0,u=0;do{if(r>=a)throw Error("Expected more digits in base 64 VLQ value.");if(-1===(i=t.decode(e.charCodeAt(r++))))throw Error("Invalid base64 digit: "+e.charAt(r-1));o=!!(32&i),i&=31,s+=i<<u,u+=5}while(o);n.value=fromVLQSigned(s),n.rest=r}},"./@datadog/source-map/lib/base64.js"(e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(e){if(0<=e&&e<n.length)return n[e];throw TypeError("Must be between 0 and 63: "+e)},r.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},"./@datadog/source-map/lib/binary-search.js"(e,r){function recursiveSearch(e,n,t,o,i,a){var s=Math.floor((n-e)/2)+e,u=i(t,o[s],!0);return 0===u?s:u>0?n-s>1?recursiveSearch(s,n,t,o,i,a):a==r.LEAST_UPPER_BOUND?n<o.length?n:-1:s:s-e>1?recursiveSearch(e,s,t,o,i,a):a==r.LEAST_UPPER_BOUND?s:e<0?-1:e}r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2,r.search=function(e,n,t,o){if(0===n.length)return -1;var i=recursiveSearch(-1,n.length,e,n,t,o||r.GREATEST_LOWER_BOUND);if(i<0)return -1;for(;i-1>=0&&0===t(n[i],n[i-1],!0);)--i;return i}},"./@datadog/source-map/lib/mapping-list.js"(e,r,n){var t=n("./@datadog/source-map/lib/util.js");function generatedPositionAfter(e,r){var n=e.generatedLine,o=r.generatedLine,i=e.generatedColumn,a=r.generatedColumn;return o>n||o==n&&a>=i||0>=t.compareByGeneratedPositionsInflated(e,r)}function MappingList(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)},MappingList.prototype.add=function(e){generatedPositionAfter(this._last,e)?this._last=e:this._sorted=!1,this._array.push(e)},MappingList.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},r.MappingList=MappingList},"./@datadog/source-map/lib/quick-sort.js"(e,r){function swap(e,r,n){var t=e[r];e[r]=e[n],e[n]=t}function randomIntInRange(e,r){return Math.round(e+Math.random()*(r-e))}function doQuickSort(e,r,n,t){if(n<t){var o=randomIntInRange(n,t),i=n-1;swap(e,o,t);for(var a=e[t],s=n;s<t;s++)0>=r(e[s],a)&&swap(e,i+=1,s);swap(e,i+1,s);var u=i+1;doQuickSort(e,r,n,u-1),doQuickSort(e,r,u+1,t)}}r.quickSort=function(e,r){doQuickSort(e,r,0,e.length-1)}},"./@datadog/source-map/lib/source-map-consumer.js"(e,r,n){var t=n("./@datadog/source-map/lib/util.js"),o=n("./@datadog/source-map/lib/binary-search.js"),i=n("./@datadog/source-map/lib/array-set.js").ArraySet,a=n("./@datadog/source-map/lib/base64-vlq.js"),s=n("./@datadog/source-map/lib/quick-sort.js").quickSort;function SourceMapConsumer(e,r){var n=e;return"string"==typeof e&&(n=t.parseSourceMapInput(e)),null!=n.sections?new IndexedSourceMapConsumer(n,r):new BasicSourceMapConsumer(n,r)}function BasicSourceMapConsumer(e,r){var n=e;"string"==typeof e&&(n=t.parseSourceMapInput(e));var o=t.getArg(n,"version"),a=t.getArg(n,"sources"),s=t.getArg(n,"names",[]),u=t.getArg(n,"sourceRoot",null),l=t.getArg(n,"sourcesContent",null),c=t.getArg(n,"mappings"),p=t.getArg(n,"file",null);if(o!=this._version)throw Error("Unsupported version: "+o);u&&(u=t.normalize(u)),a=a.map(String).map(t.normalize).map(function(e){return u&&t.isAbsolute(u)&&t.isAbsolute(e)?t.relative(u,e):e}),this._names=i.fromArray(s.map(String),!0),this._sources=i.fromArray(a,!0),this._absoluteSources=this._sources.toArray().map(function(e){return t.computeSourceURL(u,e,r)}),this.sourceRoot=u,this.sourcesContent=l,this._mappings=c,this._sourceMapURL=r,this.file=p}function Mapping(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function IndexedSourceMapConsumer(e,r){var n=e;"string"==typeof e&&(n=t.parseSourceMapInput(e));var o=t.getArg(n,"version"),a=t.getArg(n,"sections");if(o!=this._version)throw Error("Unsupported version: "+o);this._sources=new i,this._names=new i;var s={line:-1,column:0};this._sections=a.map(function(e){if(e.url)throw Error("Support for url field in sections not implemented.");var n=t.getArg(e,"offset"),o=t.getArg(n,"line"),i=t.getArg(n,"column");if(o<s.line||o===s.line&&i<s.column)throw Error("Section offsets must be ordered and non-overlapping.");return s=n,{generatedOffset:{generatedLine:o+1,generatedColumn:i+1},consumer:new SourceMapConsumer(t.getArg(e,"map"),r)}})}SourceMapConsumer.fromSourceMap=function(e,r){return BasicSourceMapConsumer.fromSourceMap(e,r)},SourceMapConsumer.prototype._version=3,SourceMapConsumer.prototype.__generatedMappings=null,Object.defineProperty(SourceMapConsumer.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),SourceMapConsumer.prototype.__originalMappings=null,Object.defineProperty(SourceMapConsumer.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),SourceMapConsumer.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return";"===n||","===n},SourceMapConsumer.prototype._parseMappings=function(e,r){throw Error("Subclasses must implement _parseMappings")},SourceMapConsumer.GENERATED_ORDER=1,SourceMapConsumer.ORIGINAL_ORDER=2,SourceMapConsumer.GREATEST_LOWER_BOUND=1,SourceMapConsumer.LEAST_UPPER_BOUND=2,SourceMapConsumer.prototype.eachMapping=function(e,r,n){switch(n||SourceMapConsumer.GENERATED_ORDER){case SourceMapConsumer.GENERATED_ORDER:o=this._generatedMappings;break;case SourceMapConsumer.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw Error("Unknown order of iteration.")}var o,i=this.sourceRoot;o.map(function(e){var r=null===e.source?null:this._sources.at(e.source);return{source:r=t.computeSourceURL(i,r,this._sourceMapURL),generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}},this).forEach(e,r||null)},SourceMapConsumer.prototype.allGeneratedPositionsFor=function(e){var r=t.getArg(e,"line"),n={source:t.getArg(e,"source"),originalLine:r,originalColumn:t.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],a=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",t.compareByOriginalPositions,o.LEAST_UPPER_BOUND);if(a>=0){var s=this._originalMappings[a];if(void 0===e.column)for(var u=s.originalLine;s&&s.originalLine===u;)i.push({line:t.getArg(s,"generatedLine",null),column:t.getArg(s,"generatedColumn",null),lastColumn:t.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a];else for(var l=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==l;)i.push({line:t.getArg(s,"generatedLine",null),column:t.getArg(s,"generatedColumn",null),lastColumn:t.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a]}return i},r.SourceMapConsumer=SourceMapConsumer,BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype),BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer,BasicSourceMapConsumer.prototype._findSourceIndex=function(e){var r,n=e;if(null!=this.sourceRoot&&(n=t.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return -1},BasicSourceMapConsumer.fromSourceMap=function(e,r){var n=Object.create(BasicSourceMapConsumer.prototype),o=n._names=i.fromArray(e._names.toArray(),!0),a=n._sources=i.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(e){return t.computeSourceURL(n.sourceRoot,e,r)});for(var u=e._mappings.toArray().slice(),l=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,g=u.length;p<g;p++){var d=u[p],h=new Mapping;h.generatedLine=d.generatedLine,h.generatedColumn=d.generatedColumn,d.source&&(h.source=a.indexOf(d.source),h.originalLine=d.originalLine,h.originalColumn=d.originalColumn,d.name&&(h.name=o.indexOf(d.name)),c.push(h)),l.push(h)}return s(n.__originalMappings,t.compareByOriginalPositions),n},BasicSourceMapConsumer.prototype._version=3,Object.defineProperty(BasicSourceMapConsumer.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),BasicSourceMapConsumer.prototype._parseMappings=function(e,r){for(var n,o,i,u,l,c=1,p=0,g=0,d=0,h=0,m=0,f=e.length,_=0,S={},C={},M=[],y=[];_<f;)if(";"===e.charAt(_))c++,_++,p=0;else if(","===e.charAt(_))_++;else{for((n=new Mapping).generatedLine=c,u=_;u<f&&!this._charIsMappingSeparator(e,u);u++);if(i=S[o=e.slice(_,u)])_+=o.length;else{for(i=[];_<u;)a.decode(e,_,C),l=C.value,_=C.rest,i.push(l);if(2===i.length)throw Error("Found a source, but no line and column");if(3===i.length)throw Error("Found a source and line, but no column");S[o]=i}n.generatedColumn=p+i[0],p=n.generatedColumn,i.length>1&&(n.source=h+i[1],h+=i[1],n.originalLine=g+i[2],g=n.originalLine,n.originalLine+=1,n.originalColumn=d+i[3],d=n.originalColumn,i.length>4&&(n.name=m+i[4],m+=i[4])),y.push(n),"number"==typeof n.originalLine&&M.push(n)}s(y,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=y,s(M,t.compareByOriginalPositions),this.__originalMappings=M},BasicSourceMapConsumer.prototype._findMapping=function(e,r,n,t,i,a){if(e[n]<=0)throw TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[t]<0)throw TypeError("Column must be greater than or equal to 0, got "+e[t]);return o.search(e,r,i,a)},BasicSourceMapConsumer.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var r=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}},BasicSourceMapConsumer.prototype.originalPositionFor=function(e){var r={generatedLine:t.getArg(e,"line"),generatedColumn:t.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",t.compareByGeneratedPositionsDeflated,t.getArg(e,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(n>=0){var o=this._generatedMappings[n];if(o.generatedLine===r.generatedLine){var i=t.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),i=t.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var a=t.getArg(o,"name",null);return null!==a&&(a=this._names.at(a)),{source:i,line:t.getArg(o,"originalLine",null),column:t.getArg(o,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},BasicSourceMapConsumer.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e})},BasicSourceMapConsumer.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var n,o=this._findSourceIndex(e);if(o>=0)return this.sourcesContent[o];var i=e;if(null!=this.sourceRoot&&(i=t.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(n=t.urlParse(this.sourceRoot))){var a=i.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!n.path||"/"==n.path)&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw Error('"'+i+'" is not in the SourceMap.')},BasicSourceMapConsumer.prototype.generatedPositionFor=function(e){var r=t.getArg(e,"source");if((r=this._findSourceIndex(r))<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:t.getArg(e,"line"),originalColumn:t.getArg(e,"column")},o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",t.compareByOriginalPositions,t.getArg(e,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===n.source)return{line:t.getArg(i,"generatedLine",null),column:t.getArg(i,"generatedColumn",null),lastColumn:t.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},IndexedSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype),IndexedSourceMapConsumer.prototype.constructor=SourceMapConsumer,IndexedSourceMapConsumer.prototype._version=3,Object.defineProperty(IndexedSourceMapConsumer.prototype,"sources",{get:function(){for(var e=[],r=0;r<this._sections.length;r++)for(var n=0;n<this._sections[r].consumer.sources.length;n++)e.push(this._sections[r].consumer.sources[n]);return e}}),IndexedSourceMapConsumer.prototype.originalPositionFor=function(e){var r={generatedLine:t.getArg(e,"line"),generatedColumn:t.getArg(e,"column")},n=o.search(r,this._sections,function(e,r){var n=e.generatedLine-r.generatedOffset.generatedLine;return n||e.generatedColumn-r.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},IndexedSourceMapConsumer.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},IndexedSourceMapConsumer.prototype.sourceContentFor=function(e,r){for(var n=0;n<this._sections.length;n++){var t=this._sections[n].consumer.sourceContentFor(e,!0);if(t)return t}if(r)return null;throw Error('"'+e+'" is not in the SourceMap.')},IndexedSourceMapConsumer.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(-1!==n.consumer._findSourceIndex(t.getArg(e,"source"))){var o=n.consumer.generatedPositionFor(e);if(o)return{line:o.line+(n.generatedOffset.generatedLine-1),column:o.column+(n.generatedOffset.generatedLine===o.line?n.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},IndexedSourceMapConsumer.prototype._parseMappings=function(e,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var o=this._sections[n],i=o.consumer._generatedMappings,a=0;a<i.length;a++){var u=i[a],l=o.consumer._sources.at(u.source);l=t.computeSourceURL(o.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var c=null;u.name&&(c=o.consumer._names.at(u.name),this._names.add(c),c=this._names.indexOf(c));var p={source:l,generatedLine:u.generatedLine+(o.generatedOffset.generatedLine-1),generatedColumn:u.generatedColumn+(o.generatedOffset.generatedLine===u.generatedLine?o.generatedOffset.generatedColumn-1:0),originalLine:u.originalLine,originalColumn:u.originalColumn,name:c};this.__generatedMappings.push(p),"number"==typeof p.originalLine&&this.__originalMappings.push(p)}s(this.__generatedMappings,t.compareByGeneratedPositionsDeflated),s(this.__originalMappings,t.compareByOriginalPositions)}},"./@datadog/source-map/lib/source-map-generator.js"(e,r,n){var t=n("./@datadog/source-map/lib/base64-vlq.js"),o=n("./@datadog/source-map/lib/util.js"),i=n("./@datadog/source-map/lib/array-set.js").ArraySet,a=n("./@datadog/source-map/lib/mapping-list.js").MappingList;function SourceMapGenerator(e){e||(e={}),this._file=o.getArg(e,"file",null),this._sourceRoot=o.getArg(e,"sourceRoot",null),this._skipValidation=o.getArg(e,"skipValidation",!1),this._sources=new i,this._names=new i,this._mappings=new a,this._sourcesContents=null}SourceMapGenerator.prototype._version=3,SourceMapGenerator.fromSourceMap=function(e){var r=e.sourceRoot,n=new SourceMapGenerator({file:e.file,sourceRoot:r});return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=r&&(t.source=o.relative(r,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),n.addMapping(t)}),e.sources.forEach(function(t){var i=t;null!==r&&(i=o.relative(r,t)),n._sources.has(i)||n._sources.add(i);var a=e.sourceContentFor(t);null!=a&&n.setSourceContent(t,a)}),n},SourceMapGenerator.prototype.addMapping=function(e){var r=o.getArg(e,"generated"),n=o.getArg(e,"original",null),t=o.getArg(e,"source",null),i=o.getArg(e,"name",null);this._skipValidation||this._validateMapping(r,n,t,i),null!=t&&(t=String(t),this._sources.has(t)||this._sources.add(t)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:t,name:i})},SourceMapGenerator.prototype.setSourceContent=function(e,r){var n=e;null!=this._sourceRoot&&(n=o.relative(this._sourceRoot,n)),null!=r?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[o.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[o.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},SourceMapGenerator.prototype.applySourceMap=function(e,r,n){var t=r;if(null==r){if(null==e.file)throw Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');t=e.file}var a=this._sourceRoot;null!=a&&(t=o.relative(a,t));var s=new i,u=new i;this._mappings.unsortedForEach(function(r){if(r.source===t&&null!=r.originalLine){var i=e.originalPositionFor({line:r.originalLine,column:r.originalColumn});null!=i.source&&(r.source=i.source,null!=n&&(r.source=o.join(n,r.source)),null!=a&&(r.source=o.relative(a,r.source)),r.originalLine=i.line,r.originalColumn=i.column,null!=i.name&&(r.name=i.name))}var l=r.source;null==l||s.has(l)||s.add(l);var c=r.name;null==c||u.has(c)||u.add(c)},this),this._sources=s,this._names=u,e.sources.forEach(function(r){var t=e.sourceContentFor(r);null!=t&&(null!=n&&(r=o.join(n,r)),null!=a&&(r=o.relative(a,r)),this.setSourceContent(r,t))},this)},SourceMapGenerator.prototype._validateMapping=function(e,r,n,t){if(r&&"number"!=typeof r.line&&"number"!=typeof r.column)throw Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!e||!("line"in e)||!("column"in e)||!(e.line>0)||!(e.column>=0)||r||n||t){if(!e||!("line"in e)||!("column"in e)||!r||!("line"in r)||!("column"in r)||!(e.line>0)||!(e.column>=0)||!(r.line>0)||!(r.column>=0)||!n)throw Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:t}))}},SourceMapGenerator.prototype._serializeMappings=function(){for(var e,r,n,i,a=0,s=1,u=0,l=0,c=0,p=0,g="",d=this._mappings.toArray(),h=0,m=d.length;h<m;h++){if(r=d[h],e="",r.generatedLine!==s)for(a=0;r.generatedLine!==s;)e+=";",s++;else if(h>0){if(!o.compareByGeneratedPositionsInflated(r,d[h-1]))continue;e+=","}e+=t.encode(r.generatedColumn-a),a=r.generatedColumn,null!=r.source&&(i=this._sources.indexOf(r.source),e+=t.encode(i-p),p=i,e+=t.encode(r.originalLine-1-l),l=r.originalLine-1,e+=t.encode(r.originalColumn-u),u=r.originalColumn,null!=r.name&&(n=this._names.indexOf(r.name),e+=t.encode(n-c),c=n)),g+=e}return g},SourceMapGenerator.prototype._generateSourcesContent=function(e,r){return e.map(function(e){if(!this._sourcesContents)return null;null!=r&&(e=o.relative(r,e));var n=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)},SourceMapGenerator.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},SourceMapGenerator.prototype.toString=function(){return JSON.stringify(this.toJSON())},r.SourceMapGenerator=SourceMapGenerator},"./@datadog/source-map/lib/source-node.js"(e,r,n){var t=n("./@datadog/source-map/lib/source-map-generator.js").SourceMapGenerator,o=n("./@datadog/source-map/lib/util.js"),i=/(\r?\n)/,a="$$$isSourceNode$$$";function SourceNode(e,r,n,t,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==r?null:r,this.source=null==n?null:n,this.name=null==o?null:o,this[a]=!0,null!=t&&this.add(t)}SourceNode.fromStringWithSourceMap=function(e,r,n){var t=new SourceNode,a=e.split(i),s=0,shiftNextLine=function(){return getNextLine()+(getNextLine()||"");function getNextLine(){return s<a.length?a[s++]:void 0}},u=1,l=0,c=null;return r.eachMapping(function(e){if(null!==c)if(u<e.generatedLine)addMappingWithCode(c,shiftNextLine()),u++,l=0;else{var r=a[s]||"",n=r.substr(0,e.generatedColumn-l);a[s]=r.substr(e.generatedColumn-l),l=e.generatedColumn,addMappingWithCode(c,n),c=e;return}for(;u<e.generatedLine;)t.add(shiftNextLine()),u++;if(l<e.generatedColumn){var r=a[s]||"";t.add(r.substr(0,e.generatedColumn)),a[s]=r.substr(e.generatedColumn),l=e.generatedColumn}c=e},this),s<a.length&&(c&&addMappingWithCode(c,shiftNextLine()),t.add(a.splice(s).join(""))),r.sources.forEach(function(e){var i=r.sourceContentFor(e);null!=i&&(null!=n&&(e=o.join(n,e)),t.setSourceContent(e,i))}),t;function addMappingWithCode(e,r){if(null===e||void 0===e.source)t.add(r);else{var i=n?o.join(n,e.source):e.source;t.add(new SourceNode(e.originalLine,e.originalColumn,i,r,e.name))}}},SourceNode.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else if(e[a]||"string"==typeof e)e&&this.children.push(e);else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this},SourceNode.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[a]||"string"==typeof e)this.children.unshift(e);else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this},SourceNode.prototype.walk=function(e){for(var r,n=0,t=this.children.length;n<t;n++)(r=this.children[n])[a]?r.walk(e):""!==r&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})},SourceNode.prototype.join=function(e){var r,n,t=this.children.length;if(t>0){for(n=0,r=[];n<t-1;n++)r.push(this.children[n]),r.push(e);r.push(this.children[n]),this.children=r}return this},SourceNode.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[a]?n.replaceRight(e,r):"string"==typeof n?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this},SourceNode.prototype.setSourceContent=function(e,r){this.sourceContents[o.toSetString(e)]=r},SourceNode.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][a]&&this.children[r].walkSourceContents(e);for(var t=Object.keys(this.sourceContents),r=0,n=t.length;r<n;r++)e(o.fromSetString(t[r]),this.sourceContents[t[r]])},SourceNode.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e},SourceNode.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new t(e),o=!1,i=null,a=null,s=null,u=null;return this.walk(function(e,t){r.code+=e,null!==t.source&&null!==t.line&&null!==t.column?((i!==t.source||a!==t.line||s!==t.column||u!==t.name)&&n.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:r.line,column:r.column},name:t.name}),i=t.source,a=t.line,s=t.column,u=t.name,o=!0):o&&(n.addMapping({generated:{line:r.line,column:r.column}}),i=null,o=!1);for(var l=0,c=e.length;l<c;l++)10===e.charCodeAt(l)?(r.line++,r.column=0,l+1===c?(i=null,o=!1):o&&n.addMapping({source:t.source,original:{line:t.line,column:t.column},generated:{line:r.line,column:r.column},name:t.name})):r.column++}),this.walkSourceContents(function(e,r){n.setSourceContent(e,r)}),{code:r.code,map:n}},r.SourceNode=SourceNode},"./@datadog/source-map/lib/util.js"(e,r){r.getArg=function(e,r,n){if(r in e)return e[r];if(3==arguments.length)return n;throw Error('"'+r+'" is a required argument.')};var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,t=/^data:.+\,.+$/;function urlParse(e){var r=e.match(n);return r?{scheme:r[1],auth:r[2],host:r[3],port:r[4],path:r[5]}:null}function urlGenerate(e){var r="";return e.scheme&&(r+=e.scheme+":"),r+="//",e.auth&&(r+=e.auth+"@"),e.host&&(r+=e.host),e.port&&(r+=":"+e.port),e.path&&(r+=e.path),r}function normalize(e){var n=e,t=urlParse(e);if(t){if(!t.path)return e;n=t.path}for(var o,i=r.isAbsolute(n),a=n.split(/\/+/),s=0,u=a.length-1;u>=0;u--)"."===(o=a[u])?a.splice(u,1):".."===o?s++:s>0&&(""===o?(a.splice(u+1,s),s=0):(a.splice(u,2),s--));return(""===(n=a.join("/"))&&(n=i?"/":"."),t)?(t.path=n,urlGenerate(t)):n}function join(e,r){""===e&&(e="."),""===r&&(r=".");var n=urlParse(r),o=urlParse(e);if(o&&(e=o.path||"/"),n&&!n.scheme)return o&&(n.scheme=o.scheme),urlGenerate(n);if(n||r.match(t))return r;if(o&&!o.host&&!o.path)return o.host=r,urlGenerate(o);var i="/"===r.charAt(0)?r:normalize(e.replace(/\/+$/,"")+"/"+r);return o?(o.path=i,urlGenerate(o)):i}r.urlParse=urlParse,r.urlGenerate=urlGenerate,r.normalize=normalize,r.join=join,r.isAbsolute=function(e){return"/"===e.charAt(0)||n.test(e)},r.relative=function(e,r){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==r.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0||(e=e.slice(0,t)).match(/^([^\/]+:\/)?\/*$/))return r;++n}return Array(n+1).join("../")+r.substr(e.length+1)};var o=!("__proto__"in Object.create(null));function identity(e){return e}function toSetString(e){return isProtoString(e)?"$"+e:e}function fromSetString(e){return isProtoString(e)?e.slice(1):e}function isProtoString(e){if(!e)return!1;var r=e.length;if(r<9||95!==e.charCodeAt(r-1)||95!==e.charCodeAt(r-2)||111!==e.charCodeAt(r-3)||116!==e.charCodeAt(r-4)||111!==e.charCodeAt(r-5)||114!==e.charCodeAt(r-6)||112!==e.charCodeAt(r-7)||95!==e.charCodeAt(r-8)||95!==e.charCodeAt(r-9))return!1;for(var n=r-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function strcmp(e,r){return e===r?0:null===e?1:null===r?-1:e>r?1:-1}r.toSetString=o?identity:toSetString,r.fromSetString=o?identity:fromSetString,r.compareByOriginalPositions=function(e,r,n){var t=strcmp(e.source,r.source);return 0!==t||0!=(t=e.originalLine-r.originalLine)||0!=(t=e.originalColumn-r.originalColumn)||n||0!=(t=e.generatedColumn-r.generatedColumn)||0!=(t=e.generatedLine-r.generatedLine)?t:strcmp(e.name,r.name)},r.compareByGeneratedPositionsDeflated=function(e,r,n){var t=e.generatedLine-r.generatedLine;return 0!==t||0!=(t=e.generatedColumn-r.generatedColumn)||n||0!==(t=strcmp(e.source,r.source))||0!=(t=e.originalLine-r.originalLine)||0!=(t=e.originalColumn-r.originalColumn)?t:strcmp(e.name,r.name)},r.compareByGeneratedPositionsInflated=function(e,r){var n=e.generatedLine-r.generatedLine;return 0!==n||0!=(n=e.generatedColumn-r.generatedColumn)||0!==(n=strcmp(e.source,r.source))||0!=(n=e.originalLine-r.originalLine)||0!=(n=e.originalColumn-r.originalColumn)?n:strcmp(e.name,r.name)},r.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},r.computeSourceURL=function(e,r,n){if(r=r||"",e&&("/"!==e[e.length-1]&&"/"!==r[0]&&(e+="/"),r=e+r),n){var t=urlParse(n);if(!t)throw Error("sourceMapURL could not be parsed");if(t.path){var o=t.path.lastIndexOf("/");o>=0&&(t.path=t.path.substring(0,o+1))}r=join(urlGenerate(t),r)}return normalize(r)}}},r={};function __webpack_require__(n){var t=r[n];if(void 0!==t)return t.exports;var o=r[n]={exports:{}};return e[n](o,o.exports,__webpack_require__),o.exports}var n={};n.SourceMapGenerator=__webpack_require__("./@datadog/source-map/lib/source-map-generator.js").SourceMapGenerator,n.SourceMapConsumer=__webpack_require__("./@datadog/source-map/lib/source-map-consumer.js").SourceMapConsumer,n.SourceNode=__webpack_require__("./@datadog/source-map/lib/source-node.js").SourceNode,module.exports=n})();