// Code generated by "esc -o data.go -pkg=fixtures data"; DO NOT EDIT.

package fixtures

import (
	"bytes"
	"compress/gzip"
	"encoding/base64"
	"fmt"
	"io"
	"io/ioutil"
	"net/http"
	"os"
	"path"
	"sync"
	"time"
)

type _escLocalFS struct{}

var _escLocal _escLocalFS

type _escStaticFS struct{}

var _escStatic _escStaticFS

type _escDirectory struct {
	fs   http.FileSystem
	name string
}

type _escFile struct {
	compressed string
	size       int64
	modtime    int64
	local      string
	isDir      bool

	once sync.Once
	data []byte
	name string
}

func (_escLocalFS) Open(name string) (http.File, error) {
	f, present := _escData[path.Clean(name)]
	if !present {
		return nil, os.ErrNotExist
	}
	return os.Open(f.local)
}

func (_escStaticFS) prepare(name string) (*_escFile, error) {
	f, present := _escData[path.Clean(name)]
	if !present {
		return nil, os.ErrNotExist
	}
	var err error
	f.once.Do(func() {
		f.name = path.Base(name)
		if f.size == 0 {
			return
		}
		var gr *gzip.Reader
		b64 := base64.NewDecoder(base64.StdEncoding, bytes.NewBufferString(f.compressed))
		gr, err = gzip.NewReader(b64)
		if err != nil {
			return
		}
		f.data, err = ioutil.ReadAll(gr)
	})
	if err != nil {
		return nil, err
	}
	return f, nil
}

func (fs _escStaticFS) Open(name string) (http.File, error) {
	f, err := fs.prepare(name)
	if err != nil {
		return nil, err
	}
	return f.File()
}

func (dir _escDirectory) Open(name string) (http.File, error) {
	return dir.fs.Open(dir.name + name)
}

func (f *_escFile) File() (http.File, error) {
	type httpFile struct {
		*bytes.Reader
		*_escFile
	}
	return &httpFile{
		Reader:   bytes.NewReader(f.data),
		_escFile: f,
	}, nil
}

func (f *_escFile) Close() error {
	return nil
}

func (f *_escFile) Readdir(count int) ([]os.FileInfo, error) {
	if !f.isDir {
		return nil, fmt.Errorf(" escFile.Readdir: '%s' is not directory", f.name)
	}

	fis, ok := _escDirs[f.local]
	if !ok {
		return nil, fmt.Errorf(" escFile.Readdir: '%s' is directory, but we have no info about content of this dir, local=%s", f.name, f.local)
	}
	limit := count
	if count <= 0 || limit > len(fis) {
		limit = len(fis)
	}

	if len(fis) == 0 && count > 0 {
		return nil, io.EOF
	}

	return fis[0:limit], nil
}

func (f *_escFile) Stat() (os.FileInfo, error) {
	return f, nil
}

func (f *_escFile) Name() string {
	return f.name
}

func (f *_escFile) Size() int64 {
	return f.size
}

func (f *_escFile) Mode() os.FileMode {
	return 0
}

func (f *_escFile) ModTime() time.Time {
	return time.Unix(f.modtime, 0)
}

func (f *_escFile) IsDir() bool {
	return f.isDir
}

func (f *_escFile) Sys() interface{} {
	return f
}

// FS returns a http.Filesystem for the embedded assets. If useLocal is true,
// the filesystem's contents are instead used.
func FS(useLocal bool) http.FileSystem {
	if useLocal {
		return _escLocal
	}
	return _escStatic
}

// Dir returns a http.Filesystem for the embedded assets on a given prefix dir.
// If useLocal is true, the filesystem's contents are instead used.
func Dir(useLocal bool, name string) http.FileSystem {
	if useLocal {
		return _escDirectory{fs: _escLocal, name: name}
	}
	return _escDirectory{fs: _escStatic, name: name}
}

// FSByte returns the named file from the embedded assets. If useLocal is
// true, the filesystem's contents are instead used.
func FSByte(useLocal bool, name string) ([]byte, error) {
	if useLocal {
		f, err := _escLocal.Open(name)
		if err != nil {
			return nil, err
		}
		b, err := ioutil.ReadAll(f)
		_ = f.Close()
		return b, err
	}
	f, err := _escStatic.prepare(name)
	if err != nil {
		return nil, err
	}
	return f.data, nil
}

// FSMustByte is the same as FSByte, but panics if name is not present.
func FSMustByte(useLocal bool, name string) []byte {
	b, err := FSByte(useLocal, name)
	if err != nil {
		panic(err)
	}
	return b
}

// FSString is the string version of FSByte.
func FSString(useLocal bool, name string) (string, error) {
	b, err := FSByte(useLocal, name)
	return string(b), err
}

// FSMustString is the string version of FSMustByte.
func FSMustString(useLocal bool, name string) string {
	return string(FSMustByte(useLocal, name))
}

var _escData = map[string]*_escFile{

	"/data/git-0a00a25543e6d732dbf4e8e9fec55c8e65fc4e8d.tgz": {
		name:    "git-0a00a25543e6d732dbf4e8e9fec55c8e65fc4e8d.tgz",
		local:   "data/git-0a00a25543e6d732dbf4e8e9fec55c8e65fc4e8d.tgz",
		size:    92029,
		modtime: 1591691386,
		compressed: `
[encoded data, 124254 characters]
/4W/8Bf+wl/4C3/hL/yFv/Bfjf8B+f4mmAAIAgABAAD//+23TcN9ZwEA
`,
	},

	"/data/git-174be6bd4292c18160542ae6dc6704b877b8a01a.tgz": {
		name:    "git-174be6bd4292c18160542ae6dc6704b877b8a01a.tgz",
		local:   "data/git-174be6bd4292c18160542ae6dc6704b877b8a01a.tgz",
		size:    23712063,
		modtime: 1591691386,
		compressed: `
[encoded data, 32020912 characters]
`,
	},

	"/data/git-21504f6d2cc2ef0c9d6ebb8802c7b49abae40c1a.tgz": {
		name:    "git-21504f6d2cc2ef0c9d6ebb8802c7b49abae40c1a.tgz",
		local:   "data/git-21504f6d2cc2ef0c9d6ebb8802c7b49abae40c1a.tgz",
		size:    91705,
		modtime: 1591691386,
		compressed: `
[encoded data, 123849 characters]
iQAIAgABAAD//08gRm45ZgEA
`,
	},

	"/data/git-26baa505b9f6fb2024b9999c140b75514718c988.tgz": {
		name:    "git-26baa505b9f6fb2024b9999c140b75514718c988.tgz",
		local:   "data/git-26baa505b9f6fb2024b9999c140b75514718c988.tgz",
		size:    13140,
		modtime: 1591691386,
		compressed: `
[encoded data, 17577 characters]
JET/XwAAAP//QVQxIFQzAAA=
`,
	},

	"/data/git-4870d54b5b04e43da8cf99ceec179d9675494af8.tgz": {
		name:    "git-4870d54b5b04e43da8cf99ceec179d9675494af8.tgz",
		local:   "data/git-4870d54b5b04e43da8cf99ceec179d9675494af8.tgz",
		size:    103534,
		modtime: 1591691386,
		compressed: `
[encoded data, 139806 characters]
H/7whz/84X9P/i8DhozLANACAAEAAP//ZQ0NFG6UAQA=
`,
	},

	"/data/git-4e7600af05c3356e8b142263e127b76f010facfc.tgz": {
		name:    "git-4e7600af05c3356e8b142263e127b76f010facfc.tgz",
		local:   "data/git-4e7600af05c3356e8b142263e127b76f010facfc.tgz",
		size:    103580,
		modtime: 1591691386,
		compressed: `
[encoded data, 139887 characters]
OpwchpyUAQA=
`,
	},

	"/data/git-78c5fb882e76286d8201016cffee63ea7060a0c2.tgz": {
		name:    "git-78c5fb882e76286d8201016cffee63ea7060a0c2.tgz",
		local:   "data/git-78c5fb882e76286d8201016cffee63ea7060a0c2.tgz",
		size:    97453,
		modtime: 1591691386,
		compressed: `
[encoded data, 131625 characters]
MD2tfAEA
`,
	},

	"/data/git-7a725350b88b05ca03541b59dd0649fda7f521f2.tgz": {
		name:    "git-7a725350b88b05ca03541b59dd0649fda7f521f2.tgz",
		local:   "data/git-7a725350b88b05ca03541b59dd0649fda7f521f2.tgz",
		size:    92364,
		modtime: 1591691386,
		compressed: `
[encoded data, 124740 characters]
ADACAAEAAP//jg/CFsxoAQA=
`,
	},

	"/data/git-7cbde0ca02f13aedd5ec8b358ca17b1c0bf5ee64.tgz": {
		name:    "git-7cbde0ca02f13aedd5ec8b358ca17b1c0bf5ee64.tgz",
		local:   "data/git-7cbde0ca02f13aedd5ec8b358ca17b1c0bf5ee64.tgz",
		size:    85856,
		modtime: 1591691386,
		compressed: `
[encoded data, 115980 characters]
`,
	},

	"/data/git-935e5ac17c41c309c356639816ea0694a568c484.tgz": {
		name:    "git-935e5ac17c41c309c356639816ea0694a568c484.tgz",
		local:   "data/git-935e5ac17c41c309c356639816ea0694a568c484.tgz",
		size:    103543,
		modtime: 1591691386,
		compressed: `
[encoded data, 139806 characters]
gAABAgQIECBAgAABAgQI/P/gfwABgIUAANACAAEAAP//S7ZJoHeUAQA=
`,
	},

	"/data/git-ab06771a67110b976953d34400d4dbc465ccd2d9.tgz": {
		name:    "git-ab06771a67110b976953d34400d4dbc465ccd2d9.tgz",
		local:   "data/git-ab06771a67110b976953d34400d4dbc465ccd2d9.tgz",
		size:    87252,
		modtime: 1591691386,
		compressed: `
[encoded data, 117855 characters]
ZtRUAQA=
`,
	},

	"/data/git-bf3fedcc8e20fd0dec9172987ceea0038d17b516.tgz": {
		name:    "git-bf3fedcc8e20fd0dec9172987ceea0038d17b516.tgz",
		local:   "data/git-bf3fedcc8e20fd0dec9172987ceea0038d17b516.tgz",
		size:    6021,
		modtime: 1591691386,
		compressed: `
[encoded data, 8161 characters]
`,
	},

	"/data/git-c0c7c57ab1753ddbd26cc45322299ddd12842794.tgz": {
		name:    "git-c0c7c57ab1753ddbd26cc45322299ddd12842794.tgz",
		local:   "data/git-c0c7c57ab1753ddbd26cc45322299ddd12842794.tgz",
		size:    8079,
		modtime: 1591691386,
		compressed: `
[encoded data, 10935 characters]
Ilaejx8AAA==
`,
	},

	"/data/git-cf717ccadce761d60bb4a8557a7b9a2efd23816a.tgz": {
		name:    "git-cf717ccadce761d60bb4a8557a7b9a2efd23816a.tgz",
		local:   "data/git-cf717ccadce761d60bb4a8557a7b9a2efd23816a.tgz",
		size:    10458,
		modtime: 1591691386,
		compressed: `
[encoded data, 14159 characters]
`,
	},

	"/data/git-df6781fd40b8f4911d70ce71f8387b991615cd6d.tgz": {
		name:    "git-df6781fd40b8f4911d70ce71f8387b991615cd6d.tgz",
		local:   "data/git-df6781fd40b8f4911d70ce71f8387b991615cd6d.tgz",
		size:    103395,
		modtime: 1591691386,
		compressed: `
[encoded data, 139644 characters]
AQAA//9GaUxC45MBAA==
`,
	},

	"/data/git-e1580a78f7d36791249df76df8a2a2613d629902.tgz": {
		name:    "git-e1580a78f7d36791249df76df8a2a2613d629902.tgz",
		local:   "data/git-e1580a78f7d36791249df76df8a2a2613d629902.tgz",
		size:    7212,
		modtime: 1591691386,
		compressed: `
[encoded data, 9720 characters]
AAAAAAAAAAAAAAAAAAAAwMvDU8u4J4kAyAAAAQAA///GuxkgLBwAAA==
`,
	},

	"/data/pack-0d3d824fb5c930e7e7e1f0f399f2976847d31fd3.idx": {
		name:    "pack-0d3d824fb5c930e7e7e1f0f399f2976847d31fd3.idx",
		local:   "data/pack-0d3d824fb5c930e7e7e1f0f399f2976847d31fd3.idx",
		size:    27672,
		modtime: 1591691386,
		compressed: `
[encoded data, 36288 characters]
XwAAAP//vypyvxhsAAA=
`,
	},

	"/data/pack-0d3d824fb5c930e7e7e1f0f399f2976847d31fd3.pack": {
		name:    "pack-0d3d824fb5c930e7e7e1f0f399f2976847d31fd3.pack",
		local:   "data/pack-0d3d824fb5c930e7e7e1f0f399f2976847d31fd3.pack",
		size:    178490,
		modtime: 1591691386,
		compressed: `
[encoded data, 130005 characters]
gUR4jTkGTo0Q3X+sznI/rDta8DFb8L7wpFzcwMwWQ
[member cut: first 33554432 bytes kept]
