text: if("function"!=typeof define)var define=require("amdefine")(module,require);define(function(e,n,t){function s(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var t=r.getArg(n,"version"),i=r.getArg(n,"sources"),o=r.getArg(n,"names",[]),s=r.getArg(n,"sourceRoot",null),u=r.getArg(n,"sourcesContent",null),l=r.getArg(n,"mappings"),c=r.getArg(n,"file",null);if(t!=this._version)throw new Error("Unsupported version: "+t);this._names=a.fromArray(o,!0),this._sources=a.fromArray(i,!0),this.sourceRoot=s,this.sourcesContent=u,this._mappings=l,this.file=c}var r=e("./util"),i=e("./binary-search"),a=e("./array-set").ArraySet,o=e("./base64-vlq");s.fromSourceMap=function(e){var n=Object.create(s.prototype);return n._names=a.fromArray(e._names.toArray(),!0),n._sources=a.fromArray(e._sources.toArray(),!0),n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n.__generatedMappings=e._mappings.slice().sort(r.compareByGeneratedPositions),n.__originalMappings=e._mappings.slice().sort(r.compareByOriginalPositions),n},s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return this.sourceRoot?r.join(this.sourceRoot,e):e},this)}}),s.prototype.__generatedMappings=null,Object.defineProperty(s.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot)),this.__generatedMappings}}),s.prototype.__originalMappings=null,Object.defineProperty(s.prototype,"_originalMappings",{get:function(){return this.__originalMappings||(this.__generatedMappings=[],this.__originalMappings=[],this._parseMappings(this._mappings,this.sourceRoot)),this.__originalMappings}}),s.prototype._parseMappings=function(e,n){for(var d,p,t=1,i=0,a=0,s=0,u=0,l=0,c=/^[,;]/,f=e;f.length>0;)if(";"===f.charAt(0))t++,f=f.slice(1),i=0;else if(","===f.charAt(0))f=f.slice(1);else{if(d={},d.generatedLine=t,p=o.decode(f),d.generatedColumn=i+p.value,i=d.generatedColumn,f=p.rest,f.length>0&&!c.test(f.charAt(0))){if(p=o.decode(f),d.source=this._sources.at(u+p.value),u+=p.value,f=p.rest,0===f.length||c.test(f.charAt(0)))throw new Error("Found a source, but no line and column");if(p=o.decode(f),d.originalLine=a+p.value,a=d.originalLine,d.originalLine+=1,f=p.rest,0===f.length||c.test(f.charAt(0)))throw new Error("Found a source and line, but no column");p=o.decode(f),d.originalColumn=s+p.value,s=d.originalColumn,f=p.rest,f.length>0&&!c.test(f.charAt(0))&&(p=o.decode(f),d.name=this._names.at(l+p.value),l+=p.value,f=p.rest)}this.__generatedMappings.push(d),"number"==typeof d.originalLine&&this.__originalMappings.push(d)}this.__generatedMappings.sort(r.compareByGeneratedPositions),this.__originalMappings.sort(r.compareByOriginalPositions)},s.prototype._findMapping=function(e,n,t,r,a){if(e[t]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[t]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return i.search(e,n,a)},s.prototype.originalPositionFor=function(e){var n={generatedLine:r.getArg(e,"line"),generatedColumn:r.getArg(e,"column")},t=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",r.compareByGeneratedPositions);if(t&&t.generatedLine===n.generatedLine){var i=r.getArg(t,"source",null);return i&&this.sourceRoot&&(i=r.join(this.sourceRoot,i)),{source:i,line:r.getArg(t,"originalLine",null),column:r.getArg(t,"originalColumn",null),name:r.getArg(t,"name",null)}}return{source:null,line:null,column:null,name:null}},s.prototype.sourceContentFor=function(e){if(!this.sourcesContent)return null;if(this.sourceRoot&&(e=r.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var n;if(this.sourceRoot&&(n=r.urlParse(this.sourceRoot))){var t=e.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];if((!n.path||"/"==n.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}throw new Error('"'+e+'" is not in the SourceMap.')},s.prototype.generatedPositionFor=function(e){var n={source:r.getArg(e,"source"),originalLine:r.getArg(e,"line"),originalColumn:r.getArg(e,"column")};this.sourceRoot&&(n.source=r.relative(this.sourceRoot,n.source));var t=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions);return t?{line:r.getArg(t,"generatedLine",null),column:r.getArg(t,"generatedColumn",null)}:{line:null,column:null}},s.GENERATED_ORDER=1,s.ORIGINAL_ORDER=2,s.prototype.eachMapping=function(e,n,t){var o,i=n||null,a=t||s.GENERATED_ORDER;switch(a){case s.GENERATED_ORDER:o=this._generatedMappings;break;case s.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;o.map(function(e){var n=e.source;return n&&u&&(n=r.join(u,n)),{source:n,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name}}).forEach(e,i)},n.SourceMapConsumer=s});