UNPKG

dd-trace

Version:

Datadog APM tracing client for JavaScript

1 lines 26.2 kB
(()=>{var e={"./source-map/lib/array-set.js":function(e,n){class t{constructor(){this._array=[],this._set=new Map}static fromArray(e,n){let r=new t;for(let t=0,o=e.length;t<o;t++)r.add(e[t],n);return r}size(){return this._set.size}add(e,n){let t=this.has(e),r=this._array.length;(!t||n)&&this._array.push(e),t||this._set.set(e,r)}has(e){return this._set.has(e)}indexOf(e){let n=this._set.get(e);if(n>=0)return n;throw Error('"'+e+'" is not in the set.')}at(e){if(e>=0&&e<this._array.length)return this._array[e];throw Error("No element indexed by "+e)}toArray(){return this._array.slice()}}n.ArraySet=t},"./source-map/lib/base64-vlq.js":function(e,n,t){let r=t("./source-map/lib/base64.js");n.encode=function(e){let n,t="",o=e<0?(-e<<1)+1:(e<<1)+0;do n=31&o,(o>>>=5)>0&&(n|=32),t+=r.encode(n);while(o>0);return t}},"./source-map/lib/base64.js":function(e,n){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");n.encode=function(e){if(0<=e&&e<t.length)return t[e];throw TypeError("Must be between 0 and 63: "+e)}},"./source-map/lib/binary-search.js":function(e,n){n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,r,o){if(0===t.length)return -1;let s=function e(t,r,o,s,i,l){let a=Math.floor((r-t)/2)+t,u=i(o,s[a],!0);return 0===u?a:u>0?r-a>1?e(a,r,o,s,i,l):l===n.LEAST_UPPER_BOUND?r<s.length?r:-1:a:a-t>1?e(t,a,o,s,i,l):l==n.LEAST_UPPER_BOUND?a:t<0?-1:t}(-1,t.length,e,t,r,o||n.GREATEST_LOWER_BOUND);if(s<0)return -1;for(;s-1>=0&&0===r(t[s],t[s-1],!0);)--s;return s}},"./source-map/lib/mapping-list.js":function(e,n,t){let r=t("./source-map/lib/util.js");n.MappingList=class{constructor(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}unsortedForEach(e,n){this._array.forEach(e,n)}add(e){var n;let t,o,s,i;(n=this._last,t=n.generatedLine,o=e.generatedLine,s=n.generatedColumn,i=e.generatedColumn,o>t||o==t&&i>=s||0>=r.compareByGeneratedPositionsInflated(n,e))?this._last=e:this._sorted=!1,this._array.push(e)}toArray(){return this._sorted||(this._array.sort(r.compareByGeneratedPositionsInflated),this._sorted=!0),this._array}}},"./source-map/lib/read-wasm.js":function(e,n,t){"use strict";let r=t("fs"),o=t("path");e.exports=function(){return new Promise((e,n)=>{let t=o.join(__dirname,"mappings.wasm");r.readFile(t,null,(t,r)=>{t?n(t):e(r.buffer)})})},e.exports.initialize=e=>{console.debug("SourceMapConsumer.initialize is a no-op when running in node.js")}},"./source-map/lib/source-map-consumer.js":function(e,n,t){let r=t("./source-map/lib/util.js"),o=t("./source-map/lib/binary-search.js"),s=t("./source-map/lib/array-set.js").ArraySet;t("./source-map/lib/base64-vlq.js");let i=t("./source-map/lib/read-wasm.js"),l=t("./source-map/lib/wasm.js"),a=Symbol("smcInternal");class u{constructor(e,n){if(e==a)return Promise.resolve(this);return function(e,n){let t=e;return"string"==typeof e&&(t=r.parseSourceMapInput(e)),Promise.resolve(null!=t.sections?new g(t,n):new c(t,n))}(e,n)}static initialize(e){i.initialize(e["lib/mappings.wasm"])}static fromSourceMap(e,n){var t,r;return t=e,r=n,c.fromSourceMap(t,r)}static async with(e,n,t){let r=await new u(e,n);try{return await t(r)}finally{r.destroy()}}eachMapping(e,n,t){throw Error("Subclasses must implement eachMapping")}allGeneratedPositionsFor(e){throw Error("Subclasses must implement allGeneratedPositionsFor")}destroy(){throw Error("Subclasses must implement destroy")}}u.prototype._version=3,u.GENERATED_ORDER=1,u.ORIGINAL_ORDER=2,u.GREATEST_LOWER_BOUND=1,u.LEAST_UPPER_BOUND=2,n.SourceMapConsumer=u;class c extends u{constructor(e,n){return super(a).then(t=>{let o=e;"string"==typeof e&&(o=r.parseSourceMapInput(e));let i=r.getArg(o,"version"),a=r.getArg(o,"sources").map(String),u=r.getArg(o,"names",[]),c=r.getArg(o,"sourceRoot",null),g=r.getArg(o,"sourcesContent",null),h=r.getArg(o,"mappings"),m=r.getArg(o,"file",null),p=r.getArg(o,"x_google_ignoreList",null);if(i!=t._version)throw Error("Unsupported version: "+i);return t._sourceLookupCache=new Map,t._names=s.fromArray(u.map(String),!0),t._sources=s.fromArray(a,!0),t._absoluteSources=s.fromArray(t._sources.toArray().map(function(e){return r.computeSourceURL(c,e,n)}),!0),t.sourceRoot=c,t.sourcesContent=g,t._mappings=h,t._sourceMapURL=n,t.file=m,t.x_google_ignoreList=p,t._computedColumnSpans=!1,t._mappingsPtr=0,t._wasm=null,l().then(e=>(t._wasm=e,t))})}_findSourceIndex(e){let n=this._sourceLookupCache.get(e);if("number"==typeof n)return n;let t=r.computeSourceURL(null,e,this._sourceMapURL);if(this._absoluteSources.has(t)){let n=this._absoluteSources.indexOf(t);return this._sourceLookupCache.set(e,n),n}let o=r.computeSourceURL(this.sourceRoot,e,this._sourceMapURL);if(this._absoluteSources.has(o)){let n=this._absoluteSources.indexOf(o);return this._sourceLookupCache.set(e,n),n}return -1}static fromSourceMap(e,n){return new c(e.toString())}get sources(){return this._absoluteSources.toArray()}_getMappingsPtr(){return 0===this._mappingsPtr&&this._parseMappings(),this._mappingsPtr}_parseMappings(){let e=this._mappings,n=e.length,t=this._wasm.exports.allocate_mappings(n)>>>0,r=new Uint8Array(this._wasm.exports.memory.buffer,t,n);for(let t=0;t<n;t++)r[t]=e.charCodeAt(t);let o=this._wasm.exports.parse_mappings(t);if(!o){let e=this._wasm.exports.get_last_error(),n=`Error parsing mappings (code ${e}): `;switch(e){case 1:n+="the mappings contained a negative line, column, source index, or name index";break;case 2:n+="the mappings contained a number larger than 2**32";break;case 3:n+="reached EOF while in the middle of parsing a VLQ";break;case 4:n+="invalid base 64 character while parsing a VLQ";break;default:n+="unknown error code"}throw Error(n)}this._mappingsPtr=o}eachMapping(e,n,t){let r=n||null,o=t||u.GENERATED_ORDER;this._wasm.withMappingCallback(n=>{null!==n.source&&(n.source=this._absoluteSources.at(n.source),null!==n.name&&(n.name=this._names.at(n.name))),this._computedColumnSpans&&null===n.lastGeneratedColumn&&(n.lastGeneratedColumn=1/0),e.call(r,n)},()=>{switch(o){case u.GENERATED_ORDER:this._wasm.exports.by_generated_location(this._getMappingsPtr());break;case u.ORIGINAL_ORDER:this._wasm.exports.by_original_location(this._getMappingsPtr());break;default:throw Error("Unknown order of iteration.")}})}allGeneratedPositionsFor(e){let n=r.getArg(e,"source"),t=r.getArg(e,"line"),o=e.column||0;if((n=this._findSourceIndex(n))<0)return[];if(t<1)throw Error("Line numbers must be >= 1");if(o<0)throw Error("Column numbers must be >= 0");let s=[];return this._wasm.withMappingCallback(e=>{let n=e.lastGeneratedColumn;this._computedColumnSpans&&null===n&&(n=1/0),s.push({line:e.generatedLine,column:e.generatedColumn,lastColumn:n})},()=>{this._wasm.exports.all_generated_locations_for(this._getMappingsPtr(),n,t-1,"column"in e,o)}),s}destroy(){0!==this._mappingsPtr&&(this._wasm.exports.free_mappings(this._mappingsPtr),this._mappingsPtr=0)}computeColumnSpans(){this._computedColumnSpans||(this._wasm.exports.compute_column_spans(this._getMappingsPtr()),this._computedColumnSpans=!0)}originalPositionFor(e){let n,t={generatedLine:r.getArg(e,"line"),generatedColumn:r.getArg(e,"column")};if(t.generatedLine<1)throw Error("Line numbers must be >= 1");if(t.generatedColumn<0)throw Error("Column numbers must be >= 0");let o=r.getArg(e,"bias",u.GREATEST_LOWER_BOUND);if(null==o&&(o=u.GREATEST_LOWER_BOUND),this._wasm.withMappingCallback(e=>n=e,()=>{this._wasm.exports.original_location_for(this._getMappingsPtr(),t.generatedLine-1,t.generatedColumn,o)}),n&&n.generatedLine===t.generatedLine){let e=r.getArg(n,"source",null);null!==e&&(e=this._absoluteSources.at(e));let t=r.getArg(n,"name",null);return null!==t&&(t=this._names.at(t)),{source:e,line:r.getArg(n,"originalLine",null),column:r.getArg(n,"originalColumn",null),name:t}}return{source:null,line:null,column:null,name:null}}hasContentsOfAllSources(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e})}sourceContentFor(e,n){if(!this.sourcesContent)return null;let t=this._findSourceIndex(e);if(t>=0)return this.sourcesContent[t];if(n)return null;throw Error('"'+e+'" is not in the SourceMap.')}generatedPositionFor(e){let n,t=r.getArg(e,"source");if((t=this._findSourceIndex(t))<0)return{line:null,column:null,lastColumn:null};let o={source:t,originalLine:r.getArg(e,"line"),originalColumn:r.getArg(e,"column")};if(o.originalLine<1)throw Error("Line numbers must be >= 1");if(o.originalColumn<0)throw Error("Column numbers must be >= 0");let s=r.getArg(e,"bias",u.GREATEST_LOWER_BOUND);if(null==s&&(s=u.GREATEST_LOWER_BOUND),this._wasm.withMappingCallback(e=>n=e,()=>{this._wasm.exports.generated_location_for(this._getMappingsPtr(),o.source,o.originalLine-1,o.originalColumn,s)}),n&&n.source===o.source){let e=n.lastGeneratedColumn;return this._computedColumnSpans&&null===e&&(e=1/0),{line:r.getArg(n,"generatedLine",null),column:r.getArg(n,"generatedColumn",null),lastColumn:e}}return{line:null,column:null,lastColumn:null}}}c.prototype.consumer=u;class g extends u{constructor(e,n){return super(a).then(t=>{let o=e;"string"==typeof e&&(o=r.parseSourceMapInput(e));let s=r.getArg(o,"version"),i=r.getArg(o,"sections");if(s!=t._version)throw Error("Unsupported version: "+s);let l={line:-1,column:0};return Promise.all(i.map(e=>{if(e.url)throw Error("Support for url field in sections not implemented.");let t=r.getArg(e,"offset"),o=r.getArg(t,"line"),s=r.getArg(t,"column");if(o<l.line||o===l.line&&s<l.column)throw Error("Section offsets must be ordered and non-overlapping.");return l=t,new u(r.getArg(e,"map"),n).then(e=>({generatedOffset:{generatedLine:o+1,generatedColumn:s+1},consumer:e}))})).then(e=>(t._sections=e,t))})}get sources(){let e=[];for(let n=0;n<this._sections.length;n++)for(let t=0;t<this._sections[n].consumer.sources.length;t++)e.push(this._sections[n].consumer.sources[t]);return e}originalPositionFor(e){let n={generatedLine:r.getArg(e,"line"),generatedColumn:r.getArg(e,"column")},t=o.search(n,this._sections,function(e,n){let t=e.generatedLine-n.generatedOffset.generatedLine;return t||e.generatedColumn-(n.generatedOffset.generatedColumn-1)}),s=this._sections[t];return s?s.consumer.originalPositionFor({line:n.generatedLine-(s.generatedOffset.generatedLine-1),column:n.generatedColumn-(s.generatedOffset.generatedLine===n.generatedLine?s.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}}hasContentsOfAllSources(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})}sourceContentFor(e,n){for(let n=0;n<this._sections.length;n++){let t=this._sections[n].consumer.sourceContentFor(e,!0);if(t)return t}if(n)return null;throw Error('"'+e+'" is not in the SourceMap.')}_findSectionIndex(e){for(let n=0;n<this._sections.length;n++){let{consumer:t}=this._sections[n];if(-1!==t._findSourceIndex(e))return n}return -1}generatedPositionFor(e){let n=this._findSectionIndex(r.getArg(e,"source")),t=n>=0?this._sections[n]:null,o=n>=0&&n+1<this._sections.length?this._sections[n+1]:null,s=t&&t.consumer.generatedPositionFor(e);if(s&&null!==s.line){let e=t.generatedOffset.generatedLine-1,n=t.generatedOffset.generatedColumn-1;return 1===s.line&&(s.column+=n,"number"==typeof s.lastColumn&&(s.lastColumn+=n)),s.lastColumn===1/0&&o&&s.line===o.generatedOffset.generatedLine&&(s.lastColumn=o.generatedOffset.generatedColumn-2),s.line+=e,s}return{line:null,column:null,lastColumn:null}}allGeneratedPositionsFor(e){let n=this._findSectionIndex(r.getArg(e,"source")),t=n>=0?this._sections[n]:null,o=n>=0&&n+1<this._sections.length?this._sections[n+1]:null;return t?t.consumer.allGeneratedPositionsFor(e).map(e=>{let n=t.generatedOffset.generatedLine-1,r=t.generatedOffset.generatedColumn-1;return 1===e.line&&(e.column+=r,"number"==typeof e.lastColumn&&(e.lastColumn+=r)),e.lastColumn===1/0&&o&&e.line===o.generatedOffset.generatedLine&&(e.lastColumn=o.generatedOffset.generatedColumn-2),e.line+=n,e}):[]}eachMapping(e,n,t){this._sections.forEach((r,o)=>{let s=o+1<this._sections.length?this._sections[o+1]:null,{generatedOffset:i}=r,l=i.generatedLine-1,a=i.generatedColumn-1;r.consumer.eachMapping(function(n){1===n.generatedLine&&(n.generatedColumn+=a,"number"==typeof n.lastGeneratedColumn&&(n.lastGeneratedColumn+=a)),n.lastGeneratedColumn===1/0&&s&&n.generatedLine===s.generatedOffset.generatedLine&&(n.lastGeneratedColumn=s.generatedOffset.generatedColumn-2),n.generatedLine+=l,e.call(this,n)},n,t)})}computeColumnSpans(){for(let e=0;e<this._sections.length;e++)this._sections[e].consumer.computeColumnSpans()}destroy(){for(let e=0;e<this._sections.length;e++)this._sections[e].consumer.destroy()}}},"./source-map/lib/source-map-generator.js":function(e,n,t){let r=t("./source-map/lib/base64-vlq.js"),o=t("./source-map/lib/util.js"),s=t("./source-map/lib/array-set.js").ArraySet,i=t("./source-map/lib/mapping-list.js").MappingList;class l{constructor(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 s,this._names=new s,this._mappings=new i,this._sourcesContents=null}static fromSourceMap(e){let n=e.sourceRoot,t=new l({file:e.file,sourceRoot:n});return e.eachMapping(function(e){let r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=n&&(r.source=o.relative(n,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),t.addMapping(r)}),e.sources.forEach(function(r){let s=r;null!=n&&(s=o.relative(n,r)),t._sources.has(s)||t._sources.add(s);let i=e.sourceContentFor(r);null!=i&&t.setSourceContent(r,i)}),t}addMapping(e){let n=o.getArg(e,"generated"),t=o.getArg(e,"original",null),r=o.getArg(e,"source",null),s=o.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,t,r,s),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=s&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:t&&t.line,originalColumn:t&&t.column,source:r,name:s})}setSourceContent(e,n){let t=e;null!=this._sourceRoot&&(t=o.relative(this._sourceRoot,t)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[o.toSetString(t)]=n):this._sourcesContents&&(delete this._sourcesContents[o.toSetString(t)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))}applySourceMap(e,n,t){let r=n;if(null==n){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.');r=e.file}let i=this._sourceRoot;null!=i&&(r=o.relative(i,r));let l=this._mappings.toArray().length>0?new s:this._sources,a=new s;this._mappings.unsortedForEach(function(n){if(n.source===r&&null!=n.originalLine){let r=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=r.source&&(n.source=r.source,null!=t&&(n.source=o.join(t,n.source)),null!=i&&(n.source=o.relative(i,n.source)),n.originalLine=r.line,n.originalColumn=r.column,null!=r.name&&(n.name=r.name))}let s=n.source;null==s||l.has(s)||l.add(s);let u=n.name;null==u||a.has(u)||a.add(u)},this),this._sources=l,this._names=a,e.sources.forEach(function(n){let r=e.sourceContentFor(n);null!=r&&(null!=t&&(n=o.join(t,n)),null!=i&&(n=o.relative(i,n)),this.setSourceContent(n,r))},this)}_validateMapping(e,n,t,r){if(n&&"number"!=typeof n.line&&"number"!=typeof n.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&&!n&&!t&&!r);else if(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&t);else throw Error("Invalid mapping: "+JSON.stringify({generated:e,source:t,original:n,name:r}))}_serializeMappings(){let e,n,t,s,i=0,l=1,a=0,u=0,c=0,g=0,h="",m=this._mappings.toArray();for(let p=0,d=m.length;p<d;p++){if(n=m[p],e="",n.generatedLine!==l)for(i=0;n.generatedLine!==l;)e+=";",l++;else if(p>0){if(!o.compareByGeneratedPositionsInflated(n,m[p-1]))continue;e+=","}e+=r.encode(n.generatedColumn-i),i=n.generatedColumn,null!=n.source&&(s=this._sources.indexOf(n.source),e+=r.encode(s-g),g=s,e+=r.encode(n.originalLine-1-u),u=n.originalLine-1,e+=r.encode(n.originalColumn-a),a=n.originalColumn,null!=n.name&&(t=this._names.indexOf(n.name),e+=r.encode(t-c),c=t)),h+=e}return h}_generateSourcesContent(e,n){return e.map(function(e){if(!this._sourcesContents)return null;null!=n&&(e=o.relative(n,e));let t=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,t)?this._sourcesContents[t]:null},this)}toJSON(){let 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}toString(){return JSON.stringify(this.toJSON())}}l.prototype._version=3,n.SourceMapGenerator=l},"./source-map/lib/source-node.js":function(e,n,t){let r=t("./source-map/lib/source-map-generator.js").SourceMapGenerator,o=t("./source-map/lib/util.js"),s=/(\r?\n)/,i="$$$isSourceNode$$$";class l{constructor(e,n,t,r,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==n?null:n,this.source=null==t?null:t,this.name=null==o?null:o,this[i]=!0,null!=r&&this.add(r)}static fromStringWithSourceMap(e,n,t){let r,i=new l,a=e.split(s),u=0,c=function(){return e()+(e()||"");function e(){return u<a.length?a[u++]:void 0}},g=1,h=0,m=null;return n.eachMapping(function(e){if(null!==m)if(g<e.generatedLine)p(m,c()),g++,h=0;else{let n=(r=a[u]||"").substr(0,e.generatedColumn-h);a[u]=r.substr(e.generatedColumn-h),h=e.generatedColumn,p(m,n),m=e;return}for(;g<e.generatedLine;)i.add(c()),g++;h<e.generatedColumn&&(r=a[u]||"",i.add(r.substr(0,e.generatedColumn)),a[u]=r.substr(e.generatedColumn),h=e.generatedColumn),m=e},this),u<a.length&&(m&&p(m,c()),i.add(a.splice(u).join(""))),n.sources.forEach(function(e){let r=n.sourceContentFor(e);null!=r&&(null!=t&&(e=o.join(t,e)),i.setSourceContent(e,r))}),i;function p(e,n){if(null===e||void 0===e.source)i.add(n);else{let r=t?o.join(t,e.source):e.source;i.add(new l(e.originalLine,e.originalColumn,r,n,e.name))}}}add(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else if(e[i]||"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}prepend(e){if(Array.isArray(e))for(let n=e.length-1;n>=0;n--)this.prepend(e[n]);else if(e[i]||"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}walk(e){let n;for(let t=0,r=this.children.length;t<r;t++)(n=this.children[t])[i]?n.walk(e):""!==n&&e(n,{source:this.source,line:this.line,column:this.column,name:this.name})}join(e){let n,t,r=this.children.length;if(r>0){for(t=0,n=[];t<r-1;t++)n.push(this.children[t]),n.push(e);n.push(this.children[t]),this.children=n}return this}replaceRight(e,n){let t=this.children[this.children.length-1];return t[i]?t.replaceRight(e,n):"string"==typeof t?this.children[this.children.length-1]=t.replace(e,n):this.children.push("".replace(e,n)),this}setSourceContent(e,n){this.sourceContents[o.toSetString(e)]=n}walkSourceContents(e){for(let n=0,t=this.children.length;n<t;n++)this.children[n][i]&&this.children[n].walkSourceContents(e);let n=Object.keys(this.sourceContents);for(let t=0,r=n.length;t<r;t++)e(o.fromSetString(n[t]),this.sourceContents[n[t]])}toString(){let e="";return this.walk(function(n){e+=n}),e}toStringWithSourceMap(e){let n={code:"",line:1,column:0},t=new r(e),o=!1,s=null,i=null,l=null,a=null;return this.walk(function(e,r){n.code+=e,null!==r.source&&null!==r.line&&null!==r.column?((s!==r.source||i!==r.line||l!==r.column||a!==r.name)&&t.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:n.line,column:n.column},name:r.name}),s=r.source,i=r.line,l=r.column,a=r.name,o=!0):o&&(t.addMapping({generated:{line:n.line,column:n.column}}),s=null,o=!1);for(let i=0,l=e.length;i<l;i++)10===e.charCodeAt(i)?(n.line++,n.column=0,i+1===l?(s=null,o=!1):o&&t.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:n.line,column:n.column},name:r.name})):n.column++}),this.walkSourceContents(function(e,n){t.setSourceContent(e,n)}),{code:n.code,map:t}}}n.SourceNode=l},"./source-map/lib/url.js":function(e,n,t){"use strict";e.exports="function"==typeof URL?URL:t("url").URL},"./source-map/lib/util.js":function(e,n,t){let r=t("./source-map/lib/url.js");n.getArg=function(e,n,t){if(n in e)return e[n];if(3==arguments.length)return t;throw Error('"'+n+'" is a required argument.')};let o=!("__proto__"in Object.create(null));function s(e){return e}function i(e){if(!e)return!1;let n=e.length;if(n<9||95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(let t=n-10;t>=0;t--)if(36!==e.charCodeAt(t))return!1;return!0}function l(e,n){return e===n?0:null===e?1:null===n?-1:e>n?1:-1}n.toSetString=o?s:function(e){return i(e)?"$"+e:e},n.fromSetString=o?s:function(e){return i(e)?e.slice(1):e},n.compareByGeneratedPositionsInflated=function(e,n){let t=e.generatedLine-n.generatedLine;return 0!==t||0!=(t=e.generatedColumn-n.generatedColumn)||0!==(t=l(e.source,n.source))||0!=(t=e.originalLine-n.originalLine)||0!=(t=e.originalColumn-n.originalColumn)?t:l(e.name,n.name)},n.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))};let a="http:",u=`${a}//host`;function c(e){return n=>{let t=p(n),o=h(n),s=new r(n,o);e(s);let i=s.toString();return"absolute"===t?i:"scheme-relative"===t?i.slice(a.length):"path-absolute"===t?i.slice(u.length):d(o,i)}}function g(e,n){return new r(e,n).toString()}function h(e){let n=e.split("..").length-1,t=function(e,n){let t=0;for(;;){let e="p"+t++;if(-1===n.indexOf(e))return e}}(0,e),r=`${u}/`;for(let e=0;e<n;e++)r+=`${t}/`;return r}let m=/^[A-Za-z0-9\+\-\.]+:/;function p(e){return"/"===e[0]?"/"===e[1]?"scheme-relative":"path-absolute":m.test(e)?"absolute":"path-relative"}function d(e,n){"string"==typeof e&&(e=new r(e)),"string"==typeof n&&(n=new r(n));let t=n.pathname.split("/"),o=e.pathname.split("/");for(o.length>0&&!o[o.length-1]&&o.pop();t.length>0&&o.length>0&&t[0]===o[0];)t.shift(),o.shift();return o.map(()=>"..").concat(t).join("/")+n.search+n.hash}let _=c(e=>{e.pathname=e.pathname.replace(/\/?$/,"/")}),f=c(e=>{e.href=new r(".",e.toString()).toString()}),C=c(e=>{});function b(e,n){let t=p(n),r=p(e);if(e=_(e),"absolute"===t)return g(n,void 0);if("absolute"===r)return g(n,e);if("scheme-relative"===t)return C(n);if("scheme-relative"===r)return g(n,g(e,u)).slice(a.length);if("path-absolute"===t)return C(n);if("path-absolute"===r)return g(n,g(e,u)).slice(u.length);let o=h(n+e),s=g(n,g(e,o));return d(o,s)}n.normalize=C,n.join=b,n.relative=function(e,n){let t=function(e,n){if(p(e)!==p(n))return null;let t=h(e+n),o=new r(e,t),s=new r(n,t);try{new r("",s.toString())}catch(e){return null}return s.protocol!==o.protocol||s.user!==o.user||s.password!==o.password||s.hostname!==o.hostname||s.port!==o.port?null:d(o,s)}(e,n);return"string"==typeof t?t:C(n)},n.computeSourceURL=function(e,n,t){e&&"path-absolute"===p(n)&&(n=n.replace(/^\//,""));let r=C(n||"");return e&&(r=b(e,r)),t&&(r=b(f(t),r)),r}},"./source-map/lib/wasm.js":function(e,n,t){let r=t("./source-map/lib/read-wasm.js");function o(){this.generatedLine=0,this.generatedColumn=0,this.lastGeneratedColumn=null,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}let s=null;e.exports=function(){if(s)return s;let e=[];return s=r().then(n=>WebAssembly.instantiate(n,{env:{mapping_callback(n,t,r,s,i,l,a,u,c,g){let h=new o;h.generatedLine=n+1,h.generatedColumn=t,r&&(h.lastGeneratedColumn=s-1),i&&(h.source=l,h.originalLine=a+1,h.originalColumn=u,c&&(h.name=g)),e[e.length-1](h)},start_all_generated_locations_for(){console.time("all_generated_locations_for")},end_all_generated_locations_for(){console.timeEnd("all_generated_locations_for")},start_compute_column_spans(){console.time("compute_column_spans")},end_compute_column_spans(){console.timeEnd("compute_column_spans")},start_generated_location_for(){console.time("generated_location_for")},end_generated_location_for(){console.timeEnd("generated_location_for")},start_original_location_for(){console.time("original_location_for")},end_original_location_for(){console.timeEnd("original_location_for")},start_parse_mappings(){console.time("parse_mappings")},end_parse_mappings(){console.timeEnd("parse_mappings")},start_sort_by_generated_location(){console.time("sort_by_generated_location")},end_sort_by_generated_location(){console.timeEnd("sort_by_generated_location")},start_sort_by_original_location(){console.time("sort_by_original_location")},end_sort_by_original_location(){console.timeEnd("sort_by_original_location")}}})).then(n=>({exports:n.instance.exports,withMappingCallback:(n,t)=>{e.push(n);try{t()}finally{e.pop()}}})).then(null,e=>{throw s=null,e})}},fs:function(e){"use strict";e.exports=require("fs")},path:function(e){"use strict";e.exports=require("path")},url:function(e){"use strict";e.exports=require("url")}},n={};function t(r){var o=n[r];if(void 0!==o)return o.exports;var s=n[r]={exports:{}};return e[r](s,s.exports,t),s.exports}var r={};r.SourceMapGenerator=t("./source-map/lib/source-map-generator.js").SourceMapGenerator,r.SourceMapConsumer=t("./source-map/lib/source-map-consumer.js").SourceMapConsumer,r.SourceNode=t("./source-map/lib/source-node.js").SourceNode,module.exports=r})();