class Sprockets::SassProcessor

def call(input)

def call(input)
  context = input[:environment].context_class.new(input)
  engine_options = merge_options({
    filename: input[:filename],
    syntax: self.class.syntax,
    cache_store: build_cache_store(input, @cache_version),
    load_paths: context.environment.paths.map { |p| @importer_class.new(p.to_s) },
    importer: @importer_class.new(Pathname.new(context.filename).to_s),
    sprockets: {
      context: context,
      environment: input[:environment],
      dependencies: context.metadata[:dependencies]
    }
  })
  engine = Autoload::Sass::Engine.new(input[:data], engine_options)
  css, map = Utils.module_include(Autoload::Sass::Script::Functions, @functions) do
    engine.render_with_sourcemap('')
  end
  css = css.sub("\n/*# sourceMappingURL= */\n", '')
  map = SourceMapUtils.format_source_map(JSON.parse(map.to_json(css_uri: '')), input)
  map = SourceMapUtils.combine_source_maps(input[:metadata][:map], map)
  # Track all imported files
  sass_dependencies = Set.new([input[:filename]])
  engine.dependencies.map do |dependency|
    sass_dependencies << dependency.options[:filename]
    context.metadata[:dependencies] << URIUtils.build_file_digest_uri(dependency.options[:filename])
  end
  context.metadata.merge(data: css, sass_dependencies: sass_dependencies, map: map)
end