"use strict";function SourceMap(r){r=defaults(r,{file:null,root:null,orig:null,orig_line_diff:0,dest_line_diff:0});var o=new MOZ_SourceMap.SourceMapGenerator({file:r.file,sourceRoot:r.root}),n=r.orig&&new MOZ_SourceMap.SourceMapConsumer(r.orig);return n&&Array.isArray(r.orig.sources)&&n._sources.toArray().forEach(function(r){var e=n.sourceContentFor(r,!0);e&&o.setSourceContent(r,e)}),{add:function(e,i,u,t,l,c){if(n){var a=n.originalPositionFor({line:t,column:l});if(null===a.source)return;e=a.source,t=a.line,l=a.column,c=a.name||c}o.addMapping({generated:{line:i+r.dest_line_diff,column:u},original:{line:t+r.orig_line_diff,column:l},source:e,name:c})},get:function(){return o},toString:function(){return JSON.stringify(o.toJSON())}}}