feat: as docker mirror registry
feat: add global proxy config upgrade: upgrade front(angular) to 19 chore: deployment staff 1. Dockerfile: build frontend, backend, and run in nginx base image
This commit is contained in:
1 parent
aac6c67a5f
commit
6e866b83e4
57 files changed
+22226
-7343
No files matched your search
+5
-4
@@ -2,11 +2,12 @@ package api
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/loveuer/nf"
|
||||
|
||||
"nf-repo/internal/handler"
|
||||
"nf-repo/internal/interfaces"
|
||||
"nf-repo/internal/middleware/front"
|
||||
"nf-repo/internal/opt"
|
||||
|
||||
"github.com/loveuer/nf"
|
||||
)
|
||||
|
||||
func NewApi(
|
||||
@@ -23,14 +24,14 @@ func NewApi(
|
||||
}
|
||||
|
||||
{
|
||||
api := app.Group("/api/repo")
|
||||
api := app.Group("/_api/repo")
|
||||
api.Get("/settings", handler.RepoSettings)
|
||||
api.Get("/list", handler.RepoList(mh))
|
||||
api.Get("/tag/list", handler.TagList(mh))
|
||||
api.Post("/proxy", handler.ProxyDownloadImage(mh, bh))
|
||||
}
|
||||
|
||||
app.Use(front.NewFront(&front.DefaultFront, "dist/front/browser"))
|
||||
// app.Use(front.NewFront(&front.DefaultFront, "dist/front/browser"))
|
||||
|
||||
return app
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
||||
"nf-repo/internal/interfaces"
|
||||
"nf-repo/internal/model"
|
||||
"nf-repo/internal/opt"
|
||||
|
||||
"github.com/google/go-containerregistry/pkg/name"
|
||||
v1 "github.com/google/go-containerregistry/pkg/v1"
|
||||
"github.com/google/go-containerregistry/pkg/v1/remote"
|
||||
)
|
||||
|
||||
func PullRepo(ctx context.Context, repo string, tag string, proxy string,
|
||||
mh interfaces.ManifestHandler, bh interfaces.BlobHandler,
|
||||
) (*v1.Manifest, error) {
|
||||
if repo == "" || tag == "" {
|
||||
return nil, fmt.Errorf("invalid repo or tag")
|
||||
}
|
||||
|
||||
var (
|
||||
err error
|
||||
transport = &http.Transport{}
|
||||
puller *remote.Puller
|
||||
tn name.Tag
|
||||
des *remote.Descriptor
|
||||
img v1.Image
|
||||
manifest *v1.Manifest
|
||||
bs []byte
|
||||
mhash model.Hash
|
||||
target = fmt.Sprintf("%s:%s", repo, tag)
|
||||
)
|
||||
|
||||
if opt.Proxy != nil {
|
||||
transport.Proxy = http.ProxyURL(opt.Proxy)
|
||||
}
|
||||
|
||||
if proxy != "" {
|
||||
var pu *url.URL
|
||||
if pu, err = url.Parse(proxy); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
transport.Proxy = http.ProxyURL(pu)
|
||||
}
|
||||
|
||||
if puller, err = remote.NewPuller(
|
||||
remote.WithTransport(transport),
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if tn, err = name.NewTag(target); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if des, err = puller.Get(ctx, tn); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if img, err = des.Image(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if manifest, err = img.Manifest(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
total := model.ManifestCountSize(manifest)
|
||||
size := 0
|
||||
_ = total
|
||||
|
||||
var (
|
||||
tly v1.Layer
|
||||
tdigest v1.Hash
|
||||
treader io.ReadCloser
|
||||
)
|
||||
|
||||
if tly, err = img.LayerByDigest(manifest.Config.Digest); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if tdigest, err = tly.Digest(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if treader, err = tly.Uncompressed(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer treader.Close()
|
||||
|
||||
if err = bh.Put(
|
||||
ctx,
|
||||
target,
|
||||
model.Hash{Algorithm: tdigest.Algorithm, Hex: tdigest.Hex},
|
||||
treader,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
size = size + int(manifest.Config.Size)
|
||||
|
||||
if bs, err = json.Marshal(manifest); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if mhash, _, err = model.SHA256(bytes.NewReader(bs)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for idx := range manifest.Layers {
|
||||
var (
|
||||
reader io.ReadCloser
|
||||
lyHash v1.Hash
|
||||
ly v1.Layer
|
||||
)
|
||||
|
||||
lyHash = manifest.Layers[idx].Digest
|
||||
|
||||
if ly, err = img.LayerByDigest(manifest.Layers[idx].Digest); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if reader, err = ly.Compressed(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer reader.Close()
|
||||
|
||||
if err = bh.Put(ctx, repo, model.Hash{Algorithm: lyHash.Algorithm, Hex: lyHash.Hex}, reader); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
size = size + int(manifest.Layers[idx].Size)
|
||||
}
|
||||
|
||||
if re := mh.Put(ctx, repo, tag, mhash.String(), &model.RepoSimpleManifest{
|
||||
ContentType: string(manifest.MediaType),
|
||||
Blob: bs,
|
||||
}); re != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return manifest, nil
|
||||
}
|
||||
+16
-21
@@ -3,17 +3,18 @@ package handler
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/loveuer/nf"
|
||||
"github.com/sirupsen/logrus"
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
"nf-repo/internal/model"
|
||||
"nf-repo/internal/opt"
|
||||
"nf-repo/internal/util/rerr"
|
||||
"nf-repo/internal/verify"
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"nf-repo/internal/model"
|
||||
"nf-repo/internal/opt"
|
||||
"nf-repo/internal/tool/rerr"
|
||||
"nf-repo/internal/verify"
|
||||
|
||||
"github.com/loveuer/nf"
|
||||
"github.com/loveuer/nf/nft/log"
|
||||
)
|
||||
|
||||
func handleBlobs(c *nf.Ctx) error {
|
||||
@@ -39,15 +40,8 @@ func handleBlobs(c *nf.Ctx) error {
|
||||
rangeHeader := c.Get("Range")
|
||||
repo := c.Request.URL.Host + path.Join(elem[1:len(elem)-2]...)
|
||||
|
||||
logrus.
|
||||
WithField("handler", "handleBlob").
|
||||
WithField("path", c.Path()).
|
||||
WithField("method", c.Method()).
|
||||
WithField("target", target).
|
||||
WithField("service", service).
|
||||
WithField("repo", repo).
|
||||
WithField("digest", digest).
|
||||
Debug()
|
||||
log.Debug("handleBlob: path = %s, method = %s, target = %s, service = %s, repo = %s, digest = %s",
|
||||
c.Path(), c.Method(), target, service, repo, digest)
|
||||
|
||||
switch c.Method() {
|
||||
case http.MethodHead:
|
||||
@@ -68,7 +62,7 @@ func handleBlobs(c *nf.Ctx) error {
|
||||
} else if err != nil {
|
||||
var re model.RedirectError
|
||||
if errors.As(err, &re) {
|
||||
http.Redirect(c.RawWriter(), c.Request, re.Location, re.Code)
|
||||
http.Redirect(c.Writer, c.Request, re.Location, re.Code)
|
||||
return nil
|
||||
}
|
||||
return rerr.Error(c, rerr.ErrInternal(err))
|
||||
@@ -93,11 +87,12 @@ func handleBlobs(c *nf.Ctx) error {
|
||||
|
||||
size, err = b.blobHandler.Stat(c.Request.Context(), repo, h)
|
||||
if errors.Is(err, opt.ErrNotFound) {
|
||||
log.Error("handleBlobs: mirror registry get repo not found, repo = %s", repo)
|
||||
return rerr.Error(c, rerr.ErrBlobUnknown)
|
||||
} else if err != nil {
|
||||
var re model.RedirectError
|
||||
if errors.As(err, &re) {
|
||||
http.Redirect(c.RawWriter(), c.Request, re.Location, re.Code)
|
||||
http.Redirect(c.Writer, c.Request, re.Location, re.Code)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -110,7 +105,7 @@ func handleBlobs(c *nf.Ctx) error {
|
||||
} else if err != nil {
|
||||
var re model.RedirectError
|
||||
if errors.As(err, &re) {
|
||||
http.Redirect(c.RawWriter(), c.Request, re.Location, re.Code)
|
||||
http.Redirect(c.Writer, c.Request, re.Location, re.Code)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -162,7 +157,7 @@ func handleBlobs(c *nf.Ctx) error {
|
||||
c.Status(http.StatusOK)
|
||||
}
|
||||
|
||||
_, err = io.Copy(c.RawWriter(), r)
|
||||
_, err = io.Copy(c.Writer, r)
|
||||
return err
|
||||
|
||||
case http.MethodPost:
|
||||
@@ -190,7 +185,7 @@ func handleBlobs(c *nf.Ctx) error {
|
||||
|
||||
if err = b.blobHandler.Put(c.Request.Context(), repo, h, vrc); err != nil {
|
||||
if errors.As(err, &verify.Error{}) {
|
||||
log.Printf("Digest mismatch: %v", err)
|
||||
log.Info("Digest mismatch: %v", err)
|
||||
return rerr.Error(c, rerr.ErrDigestMismatch)
|
||||
}
|
||||
return rerr.Error(c, rerr.ErrInternal(err))
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"github.com/loveuer/nf"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
"nf-repo/internal/interfaces"
|
||||
"nf-repo/internal/model"
|
||||
"nf-repo/internal/util/rerr"
|
||||
"strconv"
|
||||
"nf-repo/internal/tool/rerr"
|
||||
|
||||
"github.com/loveuer/nf"
|
||||
)
|
||||
|
||||
func handleCatalog(ctx *nf.Ctx, m interfaces.ManifestHandler) error {
|
||||
|
||||
@@ -2,30 +2,30 @@ package handler
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/loveuer/nf"
|
||||
"github.com/sirupsen/logrus"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"nf-repo/internal/controller"
|
||||
"nf-repo/internal/interfaces"
|
||||
"nf-repo/internal/model"
|
||||
"nf-repo/internal/util/rerr"
|
||||
"strings"
|
||||
"nf-repo/internal/tool/rerr"
|
||||
|
||||
v1 "github.com/google/go-containerregistry/pkg/v1"
|
||||
"github.com/loveuer/nf"
|
||||
"github.com/loveuer/nf/nft/log"
|
||||
)
|
||||
|
||||
func handleManifest(ctx *nf.Ctx, m interfaces.ManifestHandler) error {
|
||||
func handleManifest(ctx *nf.Ctx, m interfaces.ManifestHandler, blobHandler interfaces.BlobHandler) error {
|
||||
elem := strings.Split(ctx.Path(), "/")
|
||||
elem = elem[1:]
|
||||
target := elem[len(elem)-1]
|
||||
repo := strings.Join(elem[1:len(elem)-2], "/")
|
||||
|
||||
logrus.
|
||||
WithField("handler", "handleManifest").
|
||||
WithField("path", ctx.Path()).
|
||||
WithField("method", ctx.Method()).
|
||||
WithField("repo", repo).
|
||||
WithField("target", target).
|
||||
Debug()
|
||||
log.Debug("handleManifest: path = %s, method = %s, repo = %s, target = %s",
|
||||
ctx.Path(), ctx.Method(), repo, target)
|
||||
|
||||
switch ctx.Method() {
|
||||
case http.MethodGet:
|
||||
@@ -38,6 +38,22 @@ func handleManifest(ctx *nf.Ctx, m interfaces.ManifestHandler) error {
|
||||
)
|
||||
|
||||
if reader, contentType, re = m.Get(ctx.Request.Context(), repo, target); re != nil {
|
||||
if re.Status == 404 {
|
||||
log.Debug("handleManifest: repo not found, start pull, repo = %s, tag = %s", repo, target)
|
||||
var manifest *v1.Manifest
|
||||
if manifest, err = controller.PullRepo(ctx.Context(), repo, target, "", m, blobHandler); err != nil {
|
||||
return rerr.Error(ctx, &rerr.RepositoryError{
|
||||
Status: http.StatusInternalServerError,
|
||||
Code: "INTERNAL_SERVER_ERROR",
|
||||
Message: err.Error(),
|
||||
})
|
||||
}
|
||||
|
||||
contentType = string(manifest.MediaType)
|
||||
bs, _ = json.Marshal(manifest)
|
||||
goto RETURN_GET
|
||||
}
|
||||
|
||||
return rerr.Error(ctx, re)
|
||||
}
|
||||
|
||||
@@ -49,6 +65,8 @@ func handleManifest(ctx *nf.Ctx, m interfaces.ManifestHandler) error {
|
||||
})
|
||||
}
|
||||
|
||||
RETURN_GET:
|
||||
|
||||
h, _, _ := model.SHA256(bytes.NewReader(bs))
|
||||
ctx.Set("Docker-Content-Digest", h.String())
|
||||
ctx.Set("Content-Type", contentType)
|
||||
@@ -107,16 +125,8 @@ func handleManifest(ctx *nf.Ctx, m interfaces.ManifestHandler) error {
|
||||
ContentType: ctx.Get("Content-Type"),
|
||||
}
|
||||
|
||||
logrus.
|
||||
WithField("handler", "handleManifest").
|
||||
WithField("path", ctx.Path()).
|
||||
WithField("method", ctx.Method()).
|
||||
WithField("repo", repo).
|
||||
WithField("target", target).
|
||||
WithField("digest", digest).
|
||||
WithField("content-type", ctx.Get("Content-Type")).
|
||||
WithField("content", buf.String()).
|
||||
Debug()
|
||||
log.Debug("handleManifest: path = %s, method = %s, repo = %s, target = %s, digest = %s, content-type = %s, content = %s",
|
||||
ctx.Path(), ctx.Method(), repo, target, digest, ctx.Get("Content-Type"), buf.String())
|
||||
|
||||
if err := m.Put(ctx.Request.Context(), repo, target, digest, &mf); err != nil {
|
||||
return rerr.Error(ctx, err)
|
||||
|
||||
@@ -4,14 +4,16 @@ import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/loveuer/nf"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"nf-repo/internal/interfaces"
|
||||
"nf-repo/internal/model"
|
||||
"nf-repo/internal/model/types"
|
||||
"nf-repo/internal/util/rerr"
|
||||
"strings"
|
||||
"nf-repo/internal/tool/rerr"
|
||||
|
||||
"github.com/loveuer/nf"
|
||||
)
|
||||
|
||||
func handleReferrers(ctx *nf.Ctx, m interfaces.ManifestHandler) error {
|
||||
@@ -51,7 +53,7 @@ func handleReferrers(ctx *nf.Ctx, m interfaces.ManifestHandler) error {
|
||||
ctx.Set("Content-Length", fmt.Sprint(len(msg)))
|
||||
ctx.Set("Content-Type", string(types.OCIImageIndex))
|
||||
ctx.Status(http.StatusOK)
|
||||
_, err = io.Copy(ctx.RawWriter(), bytes.NewReader(msg))
|
||||
_, err = io.Copy(ctx.Writer, bytes.NewReader(msg))
|
||||
|
||||
return err
|
||||
}
|
||||
+23
-23
@@ -4,25 +4,28 @@ import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/google/go-containerregistry/pkg/name"
|
||||
"github.com/google/go-containerregistry/pkg/v1"
|
||||
"github.com/google/go-containerregistry/pkg/v1/remote"
|
||||
"github.com/loveuer/nf"
|
||||
"github.com/sirupsen/logrus"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"nf-repo/internal/interfaces"
|
||||
"nf-repo/internal/model"
|
||||
"nf-repo/internal/opt"
|
||||
"nf-repo/internal/util/r"
|
||||
"nf-repo/internal/util/rerr"
|
||||
"strings"
|
||||
"nf-repo/internal/tool/r"
|
||||
"nf-repo/internal/tool/rerr"
|
||||
|
||||
"github.com/google/go-containerregistry/pkg/name"
|
||||
v1 "github.com/google/go-containerregistry/pkg/v1"
|
||||
"github.com/google/go-containerregistry/pkg/v1/remote"
|
||||
"github.com/loveuer/nf"
|
||||
"github.com/loveuer/nf/nft/log"
|
||||
"github.com/loveuer/nf/nft/resp"
|
||||
)
|
||||
|
||||
func RepoSettings(c *nf.Ctx) error {
|
||||
return r.Resp200(c, nf.Map{
|
||||
"base_address": opt.BaseAddress,
|
||||
return resp.Resp200(c, nf.Map{
|
||||
"repo_name": opt.Cfg.RepoName,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -42,7 +45,7 @@ func RepoList(mh interfaces.ManifestHandler) nf.HandlerFunc {
|
||||
)
|
||||
|
||||
if err = c.QueryParser(req); err != nil {
|
||||
return r.Resp400(c, err.Error())
|
||||
return resp.Resp400(c, err.Error())
|
||||
}
|
||||
|
||||
if req.N == 0 {
|
||||
@@ -50,14 +53,14 @@ func RepoList(mh interfaces.ManifestHandler) nf.HandlerFunc {
|
||||
}
|
||||
|
||||
if req.N > 1000 {
|
||||
return r.Resp400(c, "limit invalid: too big")
|
||||
return resp.Resp400(c, "limit invalid: too big")
|
||||
}
|
||||
|
||||
if catalog, re = mh.Catalog(c.Request.Context(), req.N, req.Last, req.Keyword); re != nil {
|
||||
return r.Resp(c, uint32(re.Status), "", re.Code, re.Message)
|
||||
return resp.Resp(c, uint32(re.Status), "", re.Code, re.Message)
|
||||
}
|
||||
|
||||
return r.Resp200(c, nf.Map{"list": catalog.Repos, "total": 0})
|
||||
return resp.Resp200(c, nf.Map{"list": catalog.Repos, "total": 0})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +130,7 @@ func ProxyDownloadImage(mh interfaces.ManifestHandler, bh interfaces.BlobHandler
|
||||
manifest *v1.Manifest
|
||||
bs []byte
|
||||
mhash model.Hash
|
||||
//progressCh = make(chan v1.Update, 16)
|
||||
// progressCh = make(chan v1.Update, 16)
|
||||
)
|
||||
|
||||
if err = c.BodyParser(req); err != nil {
|
||||
@@ -144,21 +147,18 @@ func ProxyDownloadImage(mh interfaces.ManifestHandler, bh interfaces.BlobHandler
|
||||
}
|
||||
|
||||
repo, tag := repoTags[0], repoTags[1]
|
||||
repo = strings.TrimPrefix(repo, opt.BaseAddress)
|
||||
repo = strings.TrimPrefix(repo, opt.Cfg.RepoName)
|
||||
repo = strings.Trim(repo, "/")
|
||||
|
||||
if req.Source == "" {
|
||||
return r.Resp400(c, "source invalid")
|
||||
}
|
||||
|
||||
imageName := fmt.Sprintf("%s/%s:%s", opt.BaseAddress, repo, tag)
|
||||
_ = imageName
|
||||
log.Debug("ProxyDownloadImage: req = %#v, repo = %s", *req, repo)
|
||||
|
||||
logrus.
|
||||
WithField("path", "handler.ProxyDownloadImage").
|
||||
WithField("req", *req).
|
||||
WithField("repo", repo).
|
||||
Debug()
|
||||
if opt.Proxy != nil {
|
||||
transport.Proxy = http.ProxyURL(opt.Proxy)
|
||||
}
|
||||
|
||||
if req.Proxy != "" {
|
||||
var pu *url.URL
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"github.com/loveuer/nf"
|
||||
"github.com/sirupsen/logrus"
|
||||
"nf-repo/internal/interfaces"
|
||||
"nf-repo/internal/opt"
|
||||
"nf-repo/internal/util/rerr"
|
||||
"nf-repo/internal/tool/rerr"
|
||||
|
||||
"github.com/loveuer/nf"
|
||||
"github.com/loveuer/nf/nft/log"
|
||||
)
|
||||
|
||||
type blob struct {
|
||||
@@ -13,9 +14,7 @@ type blob struct {
|
||||
uploadHandler interfaces.UploadHandler
|
||||
}
|
||||
|
||||
var (
|
||||
b = &blob{}
|
||||
)
|
||||
var b = &blob{}
|
||||
|
||||
func Root(bh interfaces.BlobHandler, uh interfaces.UploadHandler, mh interfaces.ManifestHandler) nf.HandlerFunc {
|
||||
b.blobHandler = bh
|
||||
@@ -26,7 +25,7 @@ func Root(bh interfaces.BlobHandler, uh interfaces.UploadHandler, mh interfaces.
|
||||
}
|
||||
|
||||
if isManifest(c) {
|
||||
return handleManifest(c, mh)
|
||||
return handleManifest(c, mh, bh)
|
||||
}
|
||||
|
||||
if isTags(c) {
|
||||
@@ -43,11 +42,7 @@ func Root(bh interfaces.BlobHandler, uh interfaces.UploadHandler, mh interfaces.
|
||||
|
||||
c.SetHeader("Docker-Distribution-API-Version", "registry/2.0")
|
||||
|
||||
logrus.
|
||||
WithField("path", c.Path()).
|
||||
WithField("method", c.Method()).
|
||||
WithField("headers", c.Request.Header).
|
||||
Warn()
|
||||
log.Warn("root.go Root: path = %s, method = %s, headers = %v", c.Path(), c.Method(), c.Request.Header)
|
||||
|
||||
return rerr.Error(c, rerr.ErrUnauthorized)
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"github.com/loveuer/nf"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"nf-repo/internal/interfaces"
|
||||
"nf-repo/internal/model"
|
||||
"nf-repo/internal/util/rerr"
|
||||
"strings"
|
||||
"nf-repo/internal/tool/rerr"
|
||||
|
||||
"github.com/loveuer/nf"
|
||||
)
|
||||
|
||||
func handleTags(ctx *nf.Ctx, m interfaces.ManifestHandler) error {
|
||||
|
||||
@@ -3,17 +3,19 @@ package blobs
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"io"
|
||||
"strings"
|
||||
|
||||
"nf-repo/internal/interfaces"
|
||||
"nf-repo/internal/model"
|
||||
"nf-repo/internal/verify"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
"github.com/aws/aws-sdk-go-v2/config"
|
||||
"github.com/aws/aws-sdk-go-v2/credentials"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3"
|
||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||
"github.com/sirupsen/logrus"
|
||||
"io"
|
||||
"nf-repo/internal/interfaces"
|
||||
"nf-repo/internal/model"
|
||||
"nf-repo/internal/verify"
|
||||
"strings"
|
||||
"github.com/loveuer/nf/nft/log"
|
||||
)
|
||||
|
||||
type s3Handler struct {
|
||||
@@ -76,22 +78,17 @@ func (s *s3Handler) Put(ctx context.Context, repo string, hash model.Hash, rc io
|
||||
ACL: types.ObjectCannedACLPublicRead,
|
||||
Body: bytes.NewReader(bs),
|
||||
}, s3.WithAPIOptions(
|
||||
//v4.AddUnsignedPayloadMiddleware,
|
||||
//v4.RemoveComputePayloadSHA256Middleware,
|
||||
// v4.AddUnsignedPayloadMiddleware,
|
||||
// v4.RemoveComputePayloadSHA256Middleware,
|
||||
)); err != nil {
|
||||
logrus.
|
||||
WithField("path", "s3Handler.Put").
|
||||
WithField("err", err).
|
||||
Debug()
|
||||
log.Debug("s3Handler: put object err, err = %s", err.Error())
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *s3Handler) Delete(ctx context.Context, repo string, hash model.Hash) error {
|
||||
var (
|
||||
err error
|
||||
)
|
||||
var err error
|
||||
|
||||
if _, err = s.client.DeleteObject(ctx, &s3.DeleteObjectInput{
|
||||
Bucket: aws.String(s.bucket),
|
||||
@@ -128,7 +125,7 @@ func NewS3BlobHandler(
|
||||
Value: aws.Credentials{AccessKeyID: accessKey, SecretAccessKey: secretKey},
|
||||
}),
|
||||
); err != nil {
|
||||
logrus.Panicf("init s3 client err: %v", err)
|
||||
log.Panic("init s3 client err: %v", err)
|
||||
}
|
||||
|
||||
client = s3.NewFromConfig(cfg, func(options *s3.Options) {
|
||||
@@ -139,16 +136,16 @@ func NewS3BlobHandler(
|
||||
Bucket: aws.String(bucket),
|
||||
}); err != nil {
|
||||
if !strings.Contains(err.Error(), "404") {
|
||||
logrus.Panicf("init s3 bucket err: %v", err)
|
||||
log.Panic("init s3 bucket err: %v", err)
|
||||
}
|
||||
|
||||
logrus.Info("s3 bucket not found, start create...")
|
||||
log.Info("s3 bucket not found, start create...")
|
||||
|
||||
if _, err = client.CreateBucket(ctx, &s3.CreateBucketInput{
|
||||
Bucket: aws.String(bucket),
|
||||
ACL: types.BucketCannedACLPublicRead,
|
||||
}); err != nil {
|
||||
logrus.Panicf("create s3 bucket err: %v", err)
|
||||
log.Panic("create s3 bucket err: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,15 @@ package dbs
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/glebarez/sqlite"
|
||||
"github.com/sirupsen/logrus"
|
||||
"gorm.io/gorm"
|
||||
"nf-repo/internal/interfaces"
|
||||
"nf-repo/internal/opt"
|
||||
"os"
|
||||
"path"
|
||||
|
||||
"nf-repo/internal/interfaces"
|
||||
"nf-repo/internal/opt"
|
||||
|
||||
"github.com/glebarez/sqlite"
|
||||
"github.com/loveuer/nf/nft/log"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type tx struct {
|
||||
@@ -18,7 +20,7 @@ type tx struct {
|
||||
func (t *tx) TX(ctx context.Context) *gorm.DB {
|
||||
db := t.db.Session(&gorm.Session{}).WithContext(ctx)
|
||||
|
||||
if opt.Debug {
|
||||
if opt.Cfg.Debug {
|
||||
db = db.Debug()
|
||||
}
|
||||
|
||||
@@ -31,24 +33,18 @@ func newTX(db *gorm.DB) interfaces.Database {
|
||||
|
||||
func Must(database interfaces.Database, err error) interfaces.Database {
|
||||
if err != nil {
|
||||
logrus.
|
||||
WithField("path", "tx.Must").
|
||||
WithField("err", err.Error()).
|
||||
Panic()
|
||||
log.Panic("tx.Must: err = %s", err.Error())
|
||||
}
|
||||
|
||||
if database == nil {
|
||||
logrus.
|
||||
WithField("path", "tx.Must").
|
||||
WithField("err", "database is nil").
|
||||
Panic()
|
||||
log.Panic("tx.Must: database is nil")
|
||||
}
|
||||
|
||||
return database
|
||||
}
|
||||
|
||||
func NewSqliteTX(filepath string) (interfaces.Database, error) {
|
||||
if err := os.MkdirAll(path.Dir(filepath), 0755); err != nil {
|
||||
if err := os.MkdirAll(path.Dir(filepath), 0o755); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,9 @@ package interfaces
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
|
||||
"nf-repo/internal/model"
|
||||
"nf-repo/internal/util/rerr"
|
||||
"nf-repo/internal/tool/rerr"
|
||||
)
|
||||
|
||||
type ManifestHandler interface {
|
||||
|
||||
@@ -6,16 +6,18 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/samber/lo"
|
||||
"github.com/sirupsen/logrus"
|
||||
"gorm.io/gorm"
|
||||
"gorm.io/gorm/clause"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"nf-repo/internal/interfaces"
|
||||
"nf-repo/internal/model"
|
||||
"nf-repo/internal/util/rerr"
|
||||
"nf-repo/internal/util/tools"
|
||||
"nf-repo/internal/tool/rerr"
|
||||
"nf-repo/internal/tool/tools"
|
||||
|
||||
"github.com/loveuer/nf/nft/log"
|
||||
"github.com/samber/lo"
|
||||
"gorm.io/gorm"
|
||||
"gorm.io/gorm/clause"
|
||||
)
|
||||
|
||||
type pm struct {
|
||||
@@ -56,7 +58,7 @@ func (m *dbManifests) Get(ctx context.Context, repo string, target string) (io.R
|
||||
return io.NopCloser(bytes.NewReader(pd.Content)), pd.ContentType, nil
|
||||
}
|
||||
|
||||
var pm = new(model.PackageManifest)
|
||||
pm := new(model.PackageManifest)
|
||||
|
||||
if err = m.db.TX(tools.Timeout(5)).
|
||||
Model(&model.PackageManifest{}).
|
||||
@@ -80,11 +82,7 @@ func (m *dbManifests) Get(ctx context.Context, repo string, target string) (io.R
|
||||
Where("id", pm.DigestId).
|
||||
Take(pd).
|
||||
Error; err != nil {
|
||||
logrus.
|
||||
WithField("path", "dbManifests.Get").
|
||||
WithField("digest", pm.DigestId).
|
||||
WithField("err", err.Error()).
|
||||
Error()
|
||||
log.Error("dbManifests: get err, digest = %s, err = %s", pm.Digest, err.Error())
|
||||
return nil, "", rerr.ErrInternal(err)
|
||||
}
|
||||
|
||||
@@ -92,7 +90,6 @@ func (m *dbManifests) Get(ctx context.Context, repo string, target string) (io.R
|
||||
}
|
||||
|
||||
func (m *dbManifests) Put(ctx context.Context, repo string, tag string, digest string, mf *model.RepoSimpleManifest) *rerr.RepositoryError {
|
||||
|
||||
var (
|
||||
err error
|
||||
pm = &model.PackageManifest{
|
||||
@@ -132,13 +129,11 @@ func (m *dbManifests) Put(ctx context.Context, repo string, tag string, digest s
|
||||
Column: clause.Column{Name: "size"},
|
||||
Value: pd.Size,
|
||||
},
|
||||
}}).
|
||||
},
|
||||
}).
|
||||
Create(pd).
|
||||
Error; err != nil {
|
||||
logrus.
|
||||
WithField("path", "dbManifests.Put.Create").
|
||||
WithField("err", err.Error()).
|
||||
Error()
|
||||
log.Error("dbManifests: put create err, err = %s", err.Error())
|
||||
return rerr.ErrInternal(err)
|
||||
}
|
||||
|
||||
@@ -156,10 +151,7 @@ func (m *dbManifests) Put(ctx context.Context, repo string, tag string, digest s
|
||||
"digest_id": pm.DigestId,
|
||||
}).
|
||||
Error; err != nil {
|
||||
logrus.
|
||||
WithField("path", "dbManifests.Put.Updates").
|
||||
WithField("err", err.Error()).
|
||||
Debug()
|
||||
log.Debug("dbManifests: put updates err, err = %s", err.Error())
|
||||
return rerr.ErrInternal(err)
|
||||
}
|
||||
|
||||
@@ -167,9 +159,7 @@ func (m *dbManifests) Put(ctx context.Context, repo string, tag string, digest s
|
||||
}
|
||||
|
||||
func (m *dbManifests) Delete(ctx context.Context, repo string, target string) *rerr.RepositoryError {
|
||||
var (
|
||||
err error
|
||||
)
|
||||
var err error
|
||||
|
||||
if err = m.db.TX(tools.Timeout(5)).
|
||||
Where("repo", repo).
|
||||
@@ -286,12 +276,7 @@ func (m *dbManifests) Referrers(ctx context.Context, repo string, target string)
|
||||
}
|
||||
}
|
||||
|
||||
logrus.
|
||||
WithField("path", "dbManifests.Referrers.Take").
|
||||
WithField("repo", repo).
|
||||
WithField("target", target).
|
||||
WithField("err", err.Error()).
|
||||
Debug()
|
||||
log.Debug("dbManifests: referrers take err, repo = %s, target = %s, err = %s", repo, target, err.Error())
|
||||
|
||||
return nil, rerr.ErrInternal(err)
|
||||
}
|
||||
@@ -309,11 +294,7 @@ func (m *dbManifests) Referrers(ctx context.Context, repo string, target string)
|
||||
}
|
||||
}
|
||||
|
||||
logrus.
|
||||
WithField("path", "dbManifests.Referrers.Take").
|
||||
WithField("repo", repo).
|
||||
WithField("target", target).
|
||||
Error()
|
||||
log.Error("dbManifests: referrers take err, repo = %s, target = %s, err = %s", repo, target, err.Error())
|
||||
|
||||
return nil, rerr.ErrInternal(err)
|
||||
}
|
||||
@@ -323,23 +304,14 @@ func (m *dbManifests) Referrers(ctx context.Context, repo string, target string)
|
||||
Take(pd).
|
||||
Error; err != nil {
|
||||
|
||||
logrus.
|
||||
WithField("path", "dbManifests.Referrers.Take").
|
||||
WithField("repo", repo).
|
||||
WithField("target", target).
|
||||
Error()
|
||||
log.Error("dbManifests: referrers take err, repo = %s, target = %s, err = %s", repo, target, err.Error())
|
||||
|
||||
return nil, rerr.ErrInternal(err)
|
||||
}
|
||||
}
|
||||
|
||||
if err = json.Unmarshal(pd.Content, manifest); err != nil {
|
||||
logrus.
|
||||
WithField("path", "dbManifests.Referrers.Unmarshal").
|
||||
WithField("repo", repo).
|
||||
WithField("target", target).
|
||||
WithField("err", err.Error()).
|
||||
Debug()
|
||||
log.Debug("dbManifests: referrers unmarshal err, repo %s, target = %s, err = %s", repo, target, err.Error())
|
||||
return nil, rerr.ErrInternal(err)
|
||||
}
|
||||
|
||||
@@ -347,18 +319,13 @@ func (m *dbManifests) Referrers(ctx context.Context, repo string, target string)
|
||||
}
|
||||
|
||||
func NewManifestDBHandler(tx interfaces.Database) interfaces.ManifestHandler {
|
||||
var (
|
||||
err error
|
||||
)
|
||||
var err error
|
||||
|
||||
if err = tx.TX(tools.Timeout(5)).AutoMigrate(
|
||||
&model.PackageManifest{},
|
||||
&model.PackageDigest{},
|
||||
); err != nil {
|
||||
logrus.
|
||||
WithField("path", "NewManifestDBHandler").
|
||||
WithField("method", "AutoMigrate").
|
||||
Panic(err)
|
||||
log.Panic("NewManifestDBHandler: db auto_migrate failed, err = %s", err.Error())
|
||||
}
|
||||
|
||||
return &dbManifests{db: tx}
|
||||
|
||||
@@ -5,16 +5,18 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/sirupsen/logrus"
|
||||
"io"
|
||||
"net/http"
|
||||
"nf-repo/internal/interfaces"
|
||||
"nf-repo/internal/model"
|
||||
"nf-repo/internal/model/types"
|
||||
"nf-repo/internal/util/rerr"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"nf-repo/internal/interfaces"
|
||||
"nf-repo/internal/model"
|
||||
"nf-repo/internal/model/types"
|
||||
"nf-repo/internal/tool/rerr"
|
||||
|
||||
"github.com/loveuer/nf/nft/log"
|
||||
)
|
||||
|
||||
type memManifest struct {
|
||||
@@ -203,7 +205,7 @@ func (m *memManifest) Put(ctx context.Context, repo string, target string, diges
|
||||
}
|
||||
} else {
|
||||
// TODO: Probably want to do an existence check for blobs.
|
||||
logrus.Warnf("TODO: Check blobs for %q", desc.Digest)
|
||||
log.Warn("TODO: Check blobs for %q", desc.Digest)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
@@ -3,8 +3,9 @@ package interfaces
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
|
||||
"nf-repo/internal/model"
|
||||
"nf-repo/internal/util/rerr"
|
||||
"nf-repo/internal/tool/rerr"
|
||||
)
|
||||
|
||||
type UploadHandler interface {
|
||||
|
||||
@@ -4,17 +4,19 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/sirupsen/logrus"
|
||||
"io"
|
||||
"net/http"
|
||||
"nf-repo/internal/interfaces"
|
||||
"nf-repo/internal/model"
|
||||
"nf-repo/internal/util/rerr"
|
||||
"nf-repo/internal/verify"
|
||||
"os"
|
||||
"path"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"nf-repo/internal/interfaces"
|
||||
"nf-repo/internal/model"
|
||||
"nf-repo/internal/tool/rerr"
|
||||
"nf-repo/internal/verify"
|
||||
|
||||
"github.com/loveuer/nf/nft/log"
|
||||
)
|
||||
|
||||
type localUploader struct {
|
||||
@@ -52,10 +54,9 @@ func (l *localUploader) Write(ctx context.Context, id string, reader io.ReadClos
|
||||
|
||||
if start > 0 {
|
||||
flag = os.O_APPEND | os.O_RDWR
|
||||
|
||||
}
|
||||
|
||||
if f, err = os.OpenFile(filename, flag, 0644); err != nil {
|
||||
if f, err = os.OpenFile(filename, flag, 0o644); err != nil {
|
||||
return 0, rerr.ErrInternal(err)
|
||||
}
|
||||
|
||||
@@ -84,7 +85,7 @@ func (l *localUploader) Done(ctx context.Context, bh interfaces.BlobHandler, id
|
||||
filename = path.Join(l.basedir, id)
|
||||
)
|
||||
|
||||
if f, err = os.OpenFile(filename, os.O_RDONLY, 0644); err != nil {
|
||||
if f, err = os.OpenFile(filename, os.O_RDONLY, 0o644); err != nil {
|
||||
return rerr.ErrInternal(err)
|
||||
}
|
||||
|
||||
@@ -96,19 +97,11 @@ func (l *localUploader) Done(ctx context.Context, bh interfaces.BlobHandler, id
|
||||
}
|
||||
defer vrc.Close()
|
||||
|
||||
logrus.
|
||||
WithField("path", "localUploader.Done").
|
||||
WithField("id", id).
|
||||
WithField("size", size).
|
||||
Error()
|
||||
log.Error("localUploader: upload done, id = %s, size = %d", id, size)
|
||||
|
||||
if err := bh.Put(ctx, repo, hash, vrc); err != nil {
|
||||
if errors.As(err, &verify.Error{}) {
|
||||
logrus.
|
||||
WithField("path", "handleBlobs.Put").
|
||||
WithField("repo", repo).
|
||||
WithField("hash", hash.String()).
|
||||
WithField("err", fmt.Sprintf("Digest mismatch: %v", err)).Debug()
|
||||
log.Debug("localUploader: blob handler put err, repo = %s, hash = %s, err = %s", repo, hash.String(), fmt.Sprintf("Digest mismatch: %v", err))
|
||||
return rerr.ErrDigestMismatch
|
||||
}
|
||||
return rerr.ErrInternal(err)
|
||||
@@ -118,27 +111,17 @@ func (l *localUploader) Done(ctx context.Context, bh interfaces.BlobHandler, id
|
||||
f.Close()
|
||||
|
||||
if err = os.Remove(filename); err != nil {
|
||||
logrus.
|
||||
WithField("path", "localUploader.Done.Remove").
|
||||
WithField("filename", filename).
|
||||
WithField("err", err.Error()).
|
||||
Warn()
|
||||
log.Warn("localUploader: os remove err, filename = %s, err = %s", filename, err.Error())
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewLocalUploader(basedir string) interfaces.UploadHandler {
|
||||
var (
|
||||
err error
|
||||
)
|
||||
var err error
|
||||
|
||||
if err = os.MkdirAll(basedir, 0755); err != nil {
|
||||
logrus.
|
||||
WithField("path", "uploads.localUploader.NewLocalUploader").
|
||||
WithField("basedir", basedir).
|
||||
WithField("err", err.Error()).
|
||||
Panic()
|
||||
if err = os.MkdirAll(basedir, 0o755); err != nil {
|
||||
log.Panic("NewLocalUploader: os MkdirAll err, basedir = %s, err = %s", basedir, err.Error())
|
||||
}
|
||||
|
||||
return &localUploader{lock: sync.Mutex{}, basedir: basedir, sizeMap: make(map[string]int)}
|
||||
|
||||
@@ -5,16 +5,18 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/sirupsen/logrus"
|
||||
"io"
|
||||
"net/http"
|
||||
"nf-repo/internal/interfaces"
|
||||
"nf-repo/internal/model"
|
||||
"nf-repo/internal/util/rerr"
|
||||
"nf-repo/internal/verify"
|
||||
"strconv"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"nf-repo/internal/interfaces"
|
||||
"nf-repo/internal/model"
|
||||
"nf-repo/internal/tool/rerr"
|
||||
"nf-repo/internal/verify"
|
||||
|
||||
"github.com/loveuer/nf/nft/log"
|
||||
)
|
||||
|
||||
type memUploader struct {
|
||||
@@ -77,11 +79,7 @@ func (m *memUploader) Done(ctx context.Context, bh interfaces.BlobHandler, id st
|
||||
|
||||
if err := bh.Put(ctx, repo, hash, vrc); err != nil {
|
||||
if errors.As(err, &verify.Error{}) {
|
||||
logrus.
|
||||
WithField("path", "handleBlobs.Put").
|
||||
WithField("repo", repo).
|
||||
WithField("hash", hash.String()).
|
||||
WithField("err", fmt.Sprintf("Digest mismatch: %v", err)).Debug()
|
||||
log.Debug("memUploader: handle blob put err, repo = %s, hash = %s, err = %s", repo, hash.String(), fmt.Sprintf("Digest mismatch: %v", err))
|
||||
return rerr.ErrDigestMismatch
|
||||
}
|
||||
return rerr.ErrInternal(err)
|
||||
|
||||
@@ -1,333 +0,0 @@
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Package: @angular/core
|
||||
License: "MIT"
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Package: rxjs
|
||||
License: "Apache-2.0"
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Package: tslib
|
||||
License: "0BSD"
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
--------------------------------------------------------------------------------
|
||||
Package: @angular/common
|
||||
License: "MIT"
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Package: @angular/platform-browser
|
||||
License: "MIT"
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Package: @angular/router
|
||||
License: "MIT"
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Package: @angular/cdk
|
||||
License: "MIT"
|
||||
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2024 Google LLC.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Package: @angular/material
|
||||
License: "MIT"
|
||||
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2024 Google LLC.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Package: @angular/animations
|
||||
License: "MIT"
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Package: @angular/forms
|
||||
License: "MIT"
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Package: zone.js
|
||||
License: "MIT"
|
||||
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2010-2023 Google LLC. https://angular.io/license
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB |
@@ -1,16 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en" data-critters-container>
|
||||
<head><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<meta charset="utf-8">
|
||||
<title>Front</title>
|
||||
<base href="/">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
<style type="text/css">@font-face{font-family:'Roboto';font-style:normal;font-weight:300;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOlCnqEu92Fr1MmSU5fCRc4EsA.woff2) format('woff2');unicode-range:U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;}@font-face{font-family:'Roboto';font-style:normal;font-weight:300;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOlCnqEu92Fr1MmSU5fABc4EsA.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}@font-face{font-family:'Roboto';font-style:normal;font-weight:300;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOlCnqEu92Fr1MmSU5fCBc4EsA.woff2) format('woff2');unicode-range:U+1F00-1FFF;}@font-face{font-family:'Roboto';font-style:normal;font-weight:300;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOlCnqEu92Fr1MmSU5fBxc4EsA.woff2) format('woff2');unicode-range:U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;}@font-face{font-family:'Roboto';font-style:normal;font-weight:300;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOlCnqEu92Fr1MmSU5fCxc4EsA.woff2) format('woff2');unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;}@font-face{font-family:'Roboto';font-style:normal;font-weight:300;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOlCnqEu92Fr1MmSU5fChc4EsA.woff2) format('woff2');unicode-range:U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}@font-face{font-family:'Roboto';font-style:normal;font-weight:300;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOlCnqEu92Fr1MmSU5fBBc4.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu72xKOzY.woff2) format('woff2');unicode-range:U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu5mxKOzY.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu7mxKOzY.woff2) format('woff2');unicode-range:U+1F00-1FFF;}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu4WxKOzY.woff2) format('woff2');unicode-range:U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu7WxKOzY.woff2) format('woff2');unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu7GxKOzY.woff2) format('woff2');unicode-range:U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu4mxK.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}@font-face{font-family:'Roboto';font-style:normal;font-weight:500;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOlCnqEu92Fr1MmEU9fCRc4EsA.woff2) format('woff2');unicode-range:U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;}@font-face{font-family:'Roboto';font-style:normal;font-weight:500;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOlCnqEu92Fr1MmEU9fABc4EsA.woff2) format('woff2');unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}@font-face{font-family:'Roboto';font-style:normal;font-weight:500;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOlCnqEu92Fr1MmEU9fCBc4EsA.woff2) format('woff2');unicode-range:U+1F00-1FFF;}@font-face{font-family:'Roboto';font-style:normal;font-weight:500;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOlCnqEu92Fr1MmEU9fBxc4EsA.woff2) format('wofLine truncated
|
||||
<style type="text/css">@font-face{font-family:'Material Icons';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/materialicons/v142/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');}.material-icons{font-family:'Material Icons';font-weight:normal;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:'liga';-webkit-font-smoothing:antialiased;}</style>
|
||||
<style>html{--mat-ripple-color:rgba(0, 0, 0, .1)}html{--mat-option-selected-state-label-text-color:#3f51b5;--mat-option-label-text-color:rgba(0, 0, 0, .87);--mat-option-hover-state-layer-color:rgba(0, 0, 0, .04);--mat-option-focus-state-layer-color:rgba(0, 0, 0, .04);--mat-option-selected-state-layer-color:rgba(0, 0, 0, .04)}html{--mat-optgroup-label-text-color:rgba(0, 0, 0, .87)}html{--mat-full-pseudo-checkbox-selected-icon-color:#ff4081;--mat-full-pseudo-checkbox-selected-checkmark-color:#fafafa;--mat-full-pseudo-checkbox-unselected-icon-color:rgba(0, 0, 0, .54);--mat-full-pseudo-checkbox-disabled-selected-checkmark-color:#fafafa;--mat-full-pseudo-checkbox-disabled-unselected-icon-color:#b0b0b0;--mat-full-pseudo-checkbox-disabled-selected-icon-color:#b0b0b0;--mat-minimal-pseudo-checkbox-selected-checkmark-color:#ff4081;--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color:#b0b0b0}html{--mat-app-background-color:#fafafa;--mat-app-text-color:rgba(0, 0, 0, .87)}html{--mat-option-label-text-font:Roboto, sans-serif;--mat-option-label-text-line-height:24px;--mat-option-label-text-size:16px;--mat-option-label-text-tracking:.03125em;--mat-option-label-text-weight:400}html{--mat-optgroup-label-text-font:Roboto, sans-serif;--mat-optgroup-label-text-line-height:24px;--mat-optgroup-label-text-size:16px;--mat-optgroup-label-text-tracking:.03125em;--mat-optgroup-label-text-weight:400}html{--mdc-elevated-card-container-shape:4px;--mdc-outlined-card-container-shape:4px;--mdc-outlined-card-outline-width:1px}html{--mdc-elevated-card-container-color:white;--mdc-elevated-card-container-elevation:0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mdc-outlined-card-container-color:white;--mdc-outlined-card-outline-color:rgba(0, 0, 0, .12);--mdc-outlined-card-container-elevation:0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mat-card-subtitle-text-color:rgba(0, 0, 0, .54)}html{--mat-card-title-text-font:Roboto, sans-serif;--mat-card-title-text-line-height:32px;--mat-card-title-text-size:20px;--mat-card-title-text-tracking:.0125em;--mat-card-title-text-weight:500;--mat-card-subtitle-text-font:Roboto, sans-serif;--mat-card-subtitle-text-line-height:22px;--mat-card-subtitle-text-size:14px;--mat-card-subtitle-text-tracking:.0071428571em;--mat-card-subtitle-text-weight:500}html{--mdc-linear-progress-active-indicator-height:4px;--mdc-linear-progress-track-height:4px;--mdc-linear-progress-track-shape:0}html{--mdc-plain-tooltip-container-shape:4px;--mdc-plain-tooltip-supporting-text-line-height:16px}html{--mdc-plain-tooltip-container-color:#616161;--mdc-plain-tooltip-supporting-text-color:#fff}html{--mdc-plain-tooltip-supporting-text-font:Roboto, sans-serif;--mdc-plain-tooltip-supporting-text-size:12px;--mdc-plain-tooltip-supporting-text-weight:400;--mdc-plain-tooltip-supporting-text-tracking:.0333333333em}html{--mdc-filled-text-field-active-indicator-height:1px;--mdc-filled-text-field-focus-active-indicator-height:2px;--mdc-filled-text-field-container-shape:4px;--mdc-outlined-text-field-outline-width:1px;--mdc-outlined-text-field-focus-outline-width:2px;--mdc-outlined-text-field-container-shape:4px}html{--mdc-filled-text-field-caret-color:#3f51b5;--mdc-filled-text-field-focus-active-indicator-color:#3f51b5;--mdc-filled-text-field-focus-label-text-color:rgba(63, 81, 181, .87);--mdc-filled-text-field-container-color:whitesmoke;--mdc-filled-text-field-disabled-container-color:#fafafa;--mdc-filled-text-field-label-text-color:rgba(0, 0, 0, .6);--mdc-filled-text-field-hover-label-text-color:rgba(0, 0, 0, .6);--mdc-filled-text-field-disabled-label-text-color:rgba(0, 0, 0, .38);--mdc-filled-text-field-input-text-color:rgba(0, 0, 0, .87);--mdc-filled-text-field-disabled-input-text-color:rgba(0, 0, 0, .38);--mdc-filled-text-field-input-text-placeholder-color:rgba(0, 0, 0, .6);--mdc-filled-text-field-error-hover-label-text-color:#f44336;--mdc-filled-text-field-error-focus-label-text-color:#f44336;--mdc-filled-text-field-error-label-text-color:#f44336;--mdc-filled-text-field-error-caret-color:#f44336;--mdc-filled-text-field-active-indicator-color:rgba(0, 0, 0, .42);--mdc-filled-text-field-disabled-active-indicator-color:rgba(0, 0, 0, .06);--mdc-filled-text-field-hover-active-indicator-color:rgba(0, 0, 0, .87);--mdc-filled-text-field-error-active-indicator-color:#f44336;--mdc-filled-text-field-error-focus-active-indicator-color:#f44336;--mdc-filled-text-field-error-hover-active-indicator-color:#f44336;--mdc-outlined-text-field-caret-color:#3f51b5;--mdc-outlined-text-field-focus-outline-color:#3f51b5;--mdc-outlined-text-field-focus-label-text-color:rgba(63, 81, 181, .87);--mdc-outlined-text-field-label-text-color:rgba(0, 0, 0, .6);--mdc-outlined-text-field-hover-label-text-color:rgba(0, 0, 0, .6);--mdc-outlined-text-field-disabled-label-text-color:rgba(0, 0, 0, .38);--mdc-outlined-text-field-input-text-color:rgba(0, 0, 0Line truncated
|
||||
</style><link rel="stylesheet" href="styles-7HNLK6WW.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-7HNLK6WW.css"></noscript></head>
|
||||
<body class="mat-typography">
|
||||
<app-root></app-root>
|
||||
<script src="polyfills-7NI4OVGA.js" type="module"></script><script src="main-GOH3XQ2N.js" type="module"></script></body>
|
||||
</html>
|
||||
@@ -1,13 +0,0 @@
|
||||
var dC=Object.defineProperty,uC=Object.defineProperties;var hC=Object.getOwnPropertyDescriptors;var Ca=Object.getOwnPropertySymbols;var Og=Object.prototype.hasOwnProperty,Fg=Object.prototype.propertyIsEnumerable;var kg=(t,e,i)=>e in t?dC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,w=(t,e)=>{for(var i in e||={})Og.call(e,i)&&kg(t,i,e[i]);if(Ca)for(var i of Ca(e))Fg.call(e,i)&&kg(t,i,e[i]);return t},fe=(t,e)=>uC(t,hC(e));var su=(t,e)=>{var i={};for(var n in t)Og.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(t!=null&&Ca)for(var n of Ca(t))e.indexOf(n)<0&&Fg.call(t,n)&&(i[n]=t[n]);return i};var Ea=(t,e,i)=>new Promise((n,r)=>{var o=c=>{try{a(i.next(c))}catch(l){r(l)}},s=c=>{try{a(i.throw(c))}catch(l){r(l)}},a=c=>c.done?n(c.value):Promise.resolve(c.value).then(o,s);a((i=i.apply(t,e)).next())});function fC(t,e){return Object.is(t,e)}var lt=null,Ia=!1,Sa=1,Hi=Symbol("SIGNAL");function le(t){let e=lt;return lt=t,e}var au={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Ng(t){if(Ia)throw new Error("");if(lt===null)return;lt.consumerOnSignalRead(t);let e=lt.nextProducerIndex++;if(Or(lt),e<lt.producerNode.length&<.producerNode[e]!==t&&Uo(lt)){let i=lt.producerNode[e];Ta(i,lt.producerIndexOfThis[e])}lt.producerNode[e]!==t&&(lt.producerNode[e]=t,lt.producerIndexOfThis[e]=Uo(lt)?zg(t,lt,e):0),lt.producerLastReadVersion[e]=t.version}function mC(){Sa++}function pC(t){if(!(Uo(t)&&!t.dirty)&&!(!t.dirty&&t.lastCleanEpoch===Sa)){if(!t.producerMustRecompute(t)&&!cu(t)){t.dirty=!1,t.lastCleanEpoch=Sa;return}t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=Sa}}function Pg(t){if(t.liveConsumerNode===void 0)return;let e=Ia;Ia=!0;try{for(let i of t.liveConsumerNode)i.dirty||gC(i)}finally{Ia=e}}function Lg(){return lt?.consumerAllowSignalWrites!==!1}function gC(t){t.dirty=!0,Pg(t),t.consumerMarkedDirty?.(t)}function jg(t){return t&&(t.nextProducerIndex=0),le(t)}function Vg(t,e){if(le(e),!(!t||t.producerNode===void 0||t.producerIndexOfThis===void 0||t.producerLastReadVersion===void 0)){if(Uo(t))for(let i=t.nextProducerIndex;i<t.producerNode.length;i++)Ta(t.producerNode[i],t.producerIndexOfThis[i]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function cu(t){Or(t);for(let e=0;e<t.producerNode.length;e++){let i=t.producerNode[e],n=t.producerLastReadVersion[e];if(n!==i.version||(pC(i),n!==i.version))return!0}return!1}function Bg(t){if(Or(t),Uo(t))for(let e=0;e<t.producerNode.length;e++)Ta(t.producerNode[e],t.producerIndexOfThis[e]);t.producerNode.length=t.producerLastReadVersion.length=t.producerIndexOfThis.length=0,t.liveConsumerNode&&(t.liveConsumerNode.length=t.liveConsumerIndexOfThis.length=0)}function zg(t,e,i){if(Hg(t),Or(t),t.liveConsumerNode.length===0)for(let n=0;n<t.producerNode.length;n++)t.producerIndexOfThis[n]=zg(t.producerNode[n],t,n);return t.liveConsumerIndexOfThis.push(i),t.liveConsumerNode.push(e)-1}function Ta(t,e){if(Hg(t),Or(t),t.liveConsumerNode.length===1)for(let n=0;n<t.producerNode.length;n++)Ta(t.producerNode[n],t.producerIndexOfThis[n]);let i=t.liveConsumerNode.length-1;if(t.liveConsumerNode[e]=t.liveConsumerNode[i],t.liveConsumerIndexOfThis[e]=t.liveConsumerIndexOfThis[i],t.liveConsumerNode.length--,t.liveConsumerIndexOfThis.length--,e<t.liveConsumerNode.length){let n=t.liveConsumerIndexOfThis[e],r=t.liveConsumerNode[e];Or(r),r.producerIndexOfThis[n]=e}}function Uo(t){return t.consumerIsAlwaysLive||(t?.liveConsumerNode?.length??0)>0}function Or(t){t.producerNode??=[],t.producerIndexOfThis??=[],t.producerLastReadVersion??=[]}function Hg(t){t.liveConsumerNode??=[],t.liveConsumerIndexOfThis??=[]}function vC(){throw new Error}var Ug=vC;function $g(){Ug()}function Wg(t){Ug=t}var _C=null;function Gg(t){let e=Object.create(Yg);e.value=t;let i=()=>(Ng(e),e.value);return i[Hi]=e,i}function lu(t,e){Lg()||$g(),t.equal(t.value,e)||(t.value=e,bC(t))}function qg(t,e){Lg()||$g(),lu(t,e(t.value))}var Yg=fe(w({},au),{equal:fC,value:void 0});function bC(t){t.version++,mC(),Pg(t),_C?.()}function V(t){return typeof t=="function"}function Fr(t){let i=t(n=>{Error.call(n),n.stack=new Error().stack});return i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i}var Ma=Fr(t=>function(i){t(this),this.message=i?`${i.length} errors occurred during unsubscription:
|
||||
${i.map((n,r)=>`${r+1}) ${n.toString()}`).join(`
|
||||
`)}`:"",this.name="UnsubscriptionError",this.errors=i});function Ui(t,e){if(t){let i=t.indexOf(e);0<=i&&t.splice(i,1)}}var Ee=class t{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;let{_parentage:i}=this;if(i)if(this._parentage=null,Array.isArray(i))for(let o of i)o.remove(this);else i.remove(this);let{initialTeardown:n}=this;if(V(n))try{n()}catch(o){e=o instanceof Ma?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{Qg(o)}catch(s){e=e??[],s instanceof Ma?e=[...e,...s.errors]:e.push(s)}}if(e)throw new Ma(e)}}add(e){var i;if(e&&e!==this)if(this.closed)Qg(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(i=this._finalizers)!==null&&i!==void 0?i:[]).push(e)}}_hasParent(e){let{_parentage:i}=this;return i===e||Array.isArray(i)&&i.includes(e)}_addParent(e){let{_parentage:i}=this;this._parentage=Array.isArray(i)?(i.push(e),i):i?[i,e]:e}_removeParent(e){let{_parentage:i}=this;i===e?this._parentage=null:Array.isArray(i)&&Ui(i,e)}remove(e){let{_finalizers:i}=this;i&&Ui(i,e),e instanceof t&&e._removeParent(this)}};Ee.EMPTY=(()=>{let t=new Ee;return t.closed=!0,t})();var du=Ee.EMPTY;function Aa(t){return t instanceof Ee||t&&"closed"in t&&V(t.remove)&&V(t.add)&&V(t.unsubscribe)}function Qg(t){V(t)?t():t.unsubscribe()}var tn={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Nr={setTimeout(t,e,...i){let{delegate:n}=Nr;return n?.setTimeout?n.setTimeout(t,e,...i):setTimeout(t,e,...i)},clearTimeout(t){let{delegate:e}=Nr;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0};function Ra(t){Nr.setTimeout(()=>{let{onUnhandledError:e}=tn;if(e)e(t);else throw t})}function $o(){}var Zg=uu("C",void 0,void 0);function Kg(t){return uu("E",void 0,t)}function Xg(t){return uu("N",t,void 0)}function uu(t,e,i){return{kind:t,value:e,error:i}}var $i=null;function Pr(t){if(tn.useDeprecatedSynchronousErrorHandling){let e=!$i;if(e&&($i={errorThrown:!1,error:null}),t(),e){let{errorThrown:i,error:n}=$i;if($i=null,i)throw n}}else t()}function Jg(t){tn.useDeprecatedSynchronousErrorHandling&&$i&&($i.errorThrown=!0,$i.error=t)}var Wi=class extends Ee{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Aa(e)&&e.add(this)):this.destination=xC}static create(e,i,n){return new Vn(e,i,n)}next(e){this.isStopped?fu(Xg(e),this):this._next(e)}error(e){this.isStopped?fu(Kg(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?fu(Zg,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},yC=Function.prototype.bind;function hu(t,e){return yC.call(t,e)}var mu=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:i}=this;if(i.next)try{i.next(e)}catch(n){ka(n)}}error(e){let{partialObserver:i}=this;if(i.error)try{i.error(e)}catch(n){ka(n)}else ka(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(i){ka(i)}}},Vn=class extends Wi{constructor(e,i,n){super();let r;if(V(e)||!e)r={next:e??void 0,error:i??void 0,complete:n??void 0};else{let o;this&&tn.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&hu(e.next,o),error:e.error&&hu(e.error,o),complete:e.complete&&hu(e.complete,o)}):r=e}this.destination=new mu(r)}};function ka(t){tn.useDeprecatedSynchronousErrorHandling?Jg(t):Ra(t)}function wC(t){throw t}function fu(t,e){let{onStoppedNotification:i}=tn;i&&Nr.setTimeout(()=>i(t,e))}var xC={closed:!0,next:$o,error:wC,complete:$o};var Lr=typeof Symbol=="function"&&Symbol.observable||"@@observable";function bt(t){return t}function pu(...t){return gu(t)}function gu(t){return t.length===0?bt:t.length===1?t[0]:function(i){return t.reduce((n,r)=>r(n),i)}}var Q=(()=>{class t{constructor(i){i&&(this._subscribe=i)}lift(i){let n=new t;return n.source=this,n.operator=i,n}subscribe(i,n,r){let o=CC(i)?i:new Vn(i,n,r);return Pr(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(i){try{return this._subscribe(i)}catch(n){i.error(n)}}forEach(i,n){return n=ev(n),new n((r,o)=>{let s=new Vn({next:a=>{try{i(a)}catch(c){o(c),s.unsubscribe()}},error:o,complete:r});this.subscribe(s)})}_subscribe(i){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(i)}[Lr](){return this}pipe(...i){return gu(i)(this)}toPromise(i){return i=ev(i),new i((n,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>n(o))})}}return t.create=e=>new t(e),t})();function ev(t){var e;return(e=t??tn.Promise)!==null&&e!==void 0?e:Promise}function DC(t){return t&&V(t.next)&&V(t.error)&&V(t.complete)}function CC(t){returLine truncated
|
||||
`);return i===-1?e:e.substring(0,i)}function zu(t,e){return t==null||t===""?e===null?"":e:e==null||e===""?t:t+" "+e}var ZC=Re({__forward_ref__:Re});function Gn(t){return t.__forward_ref__=Gn,t.toString=function(){return It(this())},t}function wt(t){return d_(t)?t():t}function d_(t){return typeof t=="function"&&t.hasOwnProperty(ZC)&&t.__forward_ref__===Gn}function D(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function de(t){return{providers:t.providers||[],imports:t.imports||[]}}function Pc(t){return Dv(t,h_)||Dv(t,f_)}function u_(t){return Pc(t)!==null}function Dv(t,e){return t.hasOwnProperty(e)?t[e]:null}function KC(t){let e=t&&(t[h_]||t[f_]);return e||null}function Cv(t){return t&&(t.hasOwnProperty(Ev)||t.hasOwnProperty(XC))?t[Ev]:null}var h_=Re({\u0275prov:Re}),Ev=Re({\u0275inj:Re}),f_=Re({ngInjectableDef:Re}),XC=Re({ngInjectorDef:Re}),x=class{constructor(e,i){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,typeof i=="number"?this.__NG_ELEMENT_ID__=i:i!==void 0&&(this.\u0275prov=D({token:this,providedIn:i.providedIn||"root",factory:i.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function m_(t){return t&&!!t.\u0275providers}var JC=Re({\u0275cmp:Re}),eE=Re({\u0275dir:Re}),tE=Re({\u0275pipe:Re}),nE=Re({\u0275mod:Re}),pc=Re({\u0275fac:Re}),Xo=Re({__NG_ELEMENT_ID__:Re}),Iv=Re({__NG_ENV_ID__:Re});function Gh(t){return typeof t=="string"?t:t==null?"":String(t)}function iE(t){return typeof t=="function"?t.name||t.toString():typeof t=="object"&&t!=null&&typeof t.type=="function"?t.type.name||t.type.toString():Gh(t)}function rE(t,e){let i=e?`. Dependency path: ${e.join(" > ")} > ${t}`:"";throw new I(-200,t)}function qh(t,e){throw new I(-201,!1)}var se=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}(se||{}),Hu;function p_(){return Hu}function Ct(t){let e=Hu;return Hu=t,e}function g_(t,e,i){let n=Pc(t);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(i&se.Optional)return null;if(e!==void 0)return e;qh(t,"Injector")}var oE={},Jo=oE,Uu="__NG_DI_FLAG__",gc="ngTempTokenPath",sE="ngTokenPath",aE=/\n/gm,cE="\u0275",Sv="__source",Yr;function lE(){return Yr}function _i(t){let e=Yr;return Yr=t,e}function dE(t,e=se.Default){if(Yr===void 0)throw new I(-203,!1);return Yr===null?g_(t,void 0,e):Yr.get(t,e&se.Optional?null:void 0,e)}function p(t,e=se.Default){return(p_()||dE)(wt(t),e)}function _(t,e=se.Default){return p(t,Lc(e))}function Lc(t){return typeof t>"u"||typeof t=="number"?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function $u(t){let e=[];for(let i=0;i<t.length;i++){let n=wt(t[i]);if(Array.isArray(n)){if(n.length===0)throw new I(900,!1);let r,o=se.Default;for(let s=0;s<n.length;s++){let a=n[s],c=uE(a);typeof c=="number"?c===-1?r=a.token:o|=c:r=a}e.push(p(r,o))}else e.push(p(n))}return e}function v_(t,e){return t[Uu]=e,t.prototype[Uu]=e,t}function uE(t){return t[Uu]}function hE(t,e,i,n){let r=t[gc];throw e[Sv]&&r.unshift(e[Sv]),t.message=fE(`
|
||||
`+t.message,r,i,n),t[sE]=r,t[gc]=null,t}function fE(t,e,i,n=null){t=t&&t.charAt(0)===`
|
||||
`&&t.charAt(1)==cE?t.slice(2):t;let r=It(e);if(Array.isArray(e))r=e.map(It).join(" -> ");else if(typeof e=="object"){let o=[];for(let s in e)if(e.hasOwnProperty(s)){let a=e[s];o.push(s+":"+(typeof a=="string"?JSON.stringify(a):It(a)))}r=`{${o.join(", ")}}`}return`${i}${n?"("+n+")":""}[${r}]: ${t.replace(aE,`
|
||||
`)}`}var jc=v_(l_("Optional"),8);var Yh=v_(l_("SkipSelf"),4);function Ki(t,e){let i=t.hasOwnProperty(pc);return i?t[pc]:null}function mE(t,e,i){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],o=e[n];if(i&&(r=i(r),o=i(o)),o!==r)return!1}return!0}function pE(t){return t.flat(Number.POSITIVE_INFINITY)}function Qh(t,e){t.forEach(i=>Array.isArray(i)?Qh(i,e):e(i))}function __(t,e,i){e>=t.length?t.push(i):t.splice(e,0,i)}function vc(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function gE(t,e){let i=[];for(let n=0;n<t;n++)i.push(e);return i}function vE(t,e,i,n){let r=t.length;if(r==e)t.push(i,n);else if(r===1)t.push(n,t[0]),t[0]=i;else{for(r--,t.push(t[r-1],t[r]);r>e;){let o=r-2;t[r]=t[o],r--}t[e]=i,t[e+1]=n}}function Zh(t,e,i){let n=ps(t,e);return n>=0?t[n|1]=i:(n=~n,vE(t,n,e,i)),n}function Cu(t,e){let i=ps(t,e);if(i>=0)return t[i|1]}function ps(t,e){return _E(t,e,1)}function _E(t,e,i){let n=0,r=t.length>>i;for(;r!==n;){let o=n+(r-n>>1),s=t[o<<i];if(e===s)return o<<i;s>e?r=o:n=o+1}return~(r<<i)}var Zr={},Et=[],Kr=new x(""),b_=new x("",-1),y_=new x(""),_c=class{get(e,i=Jo){if(i===Jo){let n=new Error(`NullInjectorError: No provider for ${It(e)}!`);throw n.name="NullInjectorError",n}return i}},w_=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}(w_||{}),xn=function(t){return t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}(xn||{}),E=function(t){return t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",t}(E||{});function bE(t,e,i){let n=t.length;for(;;){let r=t.indexOf(e,i);if(r===-1)return r;if(r===0||t.charCodeAt(r-1)<=32){let o=e.length;if(r+o===n||t.charCodeAt(r+o)<=32)return r}i=r+1}}function Wu(t,e,i){let n=0;for(;n<i.length;){let r=i[n];if(typeof r=="number"){if(r!==0)break;n++;let o=i[n++],s=i[n++],a=i[n++];t.setAttribute(e,s,a,o)}else{let o=r,s=i[++n];yE(o)?t.setProperty(e,o,s):t.setAttribute(e,o,s),n++}}return n}function x_(t){return t===3||t===4||t===6}function yE(t){return t.charCodeAt(0)===64}function es(t,e){if(!(e===null||e.length===0))if(t===null||t.length===0)t=e.slice();else{let i=-1;for(let n=0;n<e.length;n++){let r=e[n];typeof r=="number"?i=r:i===0||(i===-1||i===2?Tv(t,i,r,null,e[++n]):Tv(t,i,r,null,null))}}return t}function Tv(t,e,i,n,r){let o=0,s=t.length;if(e===-1)s=-1;else for(;o<t.length;){let a=t[o++];if(typeof a=="number"){if(a===e){s=-1;break}else if(a>e){s=o-1;break}}}for(;o<t.length;){let a=t[o];if(typeof a=="number")break;if(a===i){if(n===null){r!==null&&(t[o+1]=r);return}else if(n===t[o+1]){t[o+2]=r;return}}o++,n!==null&&o++,r!==null&&o++}s!==-1&&(t.splice(s,0,e),o=s+1),t.splice(o++,0,i),n!==null&&t.splice(o++,0,n),r!==null&&t.splice(o++,0,r)}var D_="ng-template";function wE(t,e,i,n){let r=0;if(n){for(;r<e.length&&typeof e[r]=="string";r+=2)if(e[r]==="class"&&bE(e[r+1].toLowerCase(),i,0)!==-1)return!0}else if(Kh(t))return!1;if(r=e.indexOf(1,r),r>-1){let o;for(;++r<e.length&&typeof(o=e[r])=="string";)if(o.toLowerCase()===i)return!0}return!1}function Kh(t){return t.type===4&&t.value!==D_}function xE(t,e,i){let n=t.type===4&&!i?D_:t.value;return e===n}function DE(t,e,i){let n=4,r=t.attrs,o=r!==null?IE(r):0,s=!1;for(let a=0;a<e.length;a++){let c=e[a];if(typeof c=="number"){if(!s&&!rn(n)&&!rn(c))return!1;if(s&&rn(c))continue;s=!1,n=c|n&1;continue}if(!s)if(n&4){if(n=2|n&1,c!==""&&!xE(t,c,i)||c===""&&e.length===1){if(rn(n))return!1;s=!0}}else if(n&8){if(r===null||!wE(t,r,c,i)){if(rn(n))return!1;s=!0}}else{let l=e[++a],d=CE(c,r,Kh(t),i);if(d===-1){if(rn(n))return!1;s=!0;continue}if(l!==""){let u;if(d>o?u="":u=r[d+1].toLowerCase(),n&2&&l!==u){if(rn(n))return!1;s=!0}}}}return rn(n)||s}function rn(t){return(t&1)===0}function CE(t,e,i,n){if(e===null)return-1;let r=0;if(n||!i){let o=!1;for(;r<e.length;){let s=e[r];if(s===t)return r;if(s===3||s===6)o=!0;else if(s===1||s===2){let a=e[++r];for(;typeof a=="string";)a=e[++r];continue}else{if(s===4)break;if(s===0){r+=4;continue}}r+=o?1:2}return-1}else return SE(e,t)}function C_(t,e,i=!1){for(let n=0;n<e.length;n++)if(DE(t,e[n],i))return!0;return!1}function EE(t){let e=t.attrs;if(e!=null){let i=e.indexOf(5);if(!(i&1))return e[i+1]}return null}function IE(t){for(let e=0;e<t.length;e++){let i=t[e];if(x_(i))return e}return t.length}function SE(t,e){let i=t.indexOf(4);if(i>-1)for(i++;i<t.length;){let n=t[i];if(typeof n=="number")return-1;if(n===e)return i;i++}return-1}function TE(t,e){e:for(let i=0;i<e.length;i++){let n=e[i];if(t.length===n.length){for(let r=0;r<t.length;r++)if(t[r]!==n[r])continue e;return!0}}return!1}function Mv(t,e){return t?":not("+e.trim()+")":e}function ME(t){let e=t[0],i=1,n=2,r="",o=!1;for(;i<t.length;){let s=t[i];if(typeof s=="string")if(n&2){let a=t[++i];r+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else n&8?r+="."+s:n&4&&(r+=" "+s);else r!==""&&!rn(s)&&(e+=Mv(o,r),r=""),n=s,o=o||!rn(n);i++}return r!==""&&(e+=Mv(o,r)),e}function AE(t){return t.map(ME).join(",")}function RE(t){let e=[],i=[],n=1,r=Line truncated
|
||||
`).forEach(i=>{let n=i.indexOf(":");if(n>0){let r=i.slice(0,n),o=r.toLowerCase(),s=i.slice(n+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((i,n)=>{this.setHeaderEntries(n,i)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([i,n])=>{this.setHeaderEntries(i,n)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let i=this.headers.get(e.toLowerCase());return i&&i.length>0?i[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,i){return this.clone({name:e,value:i,op:"a"})}set(e,i){return this.clone({name:e,value:i,op:"s"})}delete(e,i){return this.clone({name:e,value:i,op:"d"})}maybeSetNormalizedName(e,i){this.normalizedNames.has(i)||this.normalizedNames.set(i,e)}init(){this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(i=>{this.headers.set(i,e.headers.get(i)),this.normalizedNames.set(i,e.normalizedNames.get(i))})}clone(e){let i=new t;return i.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,i.lazyUpdate=(this.lazyUpdate||[]).concat([e]),i}applyUpdate(e){let i=e.name.toLowerCase();switch(e.op){case"a":case"s":let n=e.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(e.name,i);let r=(e.op==="a"?this.headers.get(i):void 0)||[];r.push(...n),this.headers.set(i,r);break;case"d":let o=e.value;if(!o)this.headers.delete(i),this.normalizedNames.delete(i);else{let s=this.headers.get(i);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(i),this.normalizedNames.delete(i)):this.headers.set(i,s)}break}}setHeaderEntries(e,i){let n=(Array.isArray(i)?i:[i]).map(o=>o.toString()),r=e.toLowerCase();this.headers.set(r,n),this.maybeSetNormalizedName(e,r)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(i=>e(this.normalizedNames.get(i),this.headers.get(i)))}};var Yf=class{encodeKey(e){return i0(e)}encodeValue(e){return i0(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function uR(t,e){let i=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=o==-1?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,o)),e.decodeValue(r.slice(o+1))],c=i.get(s)||[];c.push(a),i.set(s,c)}),i}var hR=/%(\d[a-f0-9])/gi,fR={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function i0(t){return encodeURIComponent(t).replace(hR,(e,i)=>fR[i]??e)}function Dl(t){return`${t}`}var Mi=class t{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new Yf,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=uR(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(i=>{let n=e.fromObject[i],r=Array.isArray(n)?n.map(Dl):[Dl(n)];this.map.set(i,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let i=this.map.get(e);return i?i[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,i){return this.clone({param:e,value:i,op:"a"})}appendAll(e){let i=[];return Object.keys(e).forEach(n=>{let r=e[n];Array.isArray(r)?r.forEach(o=>{i.push({param:n,value:o,op:"a"})}):i.push({param:n,value:r,op:"a"})}),this.clone(i)}set(e,i){return this.clone({param:e,value:i,op:"s"})}delete(e,i){return this.clone({param:e,value:i,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let i=this.encoder.encodeKey(e);return this.map.get(e).map(n=>i+"="+this.encoder.encodeValue(n)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let i=new t({encoder:this.encoder});return i.cloneFrom=this.cloneFrom||this,i.updates=(this.updates||[]).concat(e),i}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let i=(e.op==="a"?this.map.get(e.param):void 0)||[];i.push(Dl(e.value)),this.map.set(e.param,i);break;case"d":if(e.value!==void 0){let n=this.map.get(e.param)||[],r=n.indexOf(Dl(e.value));r!==-1&&n.splice(r,1),n.length>0?this.map.set(e.param,n):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};var Qf=class{constructor(){this.map=new Map}set(e,i){return this.map.set(e,i),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function
Line truncated
|
||||
`),M(),ye(2,o.hasAction?2:-1))},dependencies:[rd,YO,QO,ZO],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0});let t=e;return t})(),XO={snackBarState:To("state",[Fi("void, hidden",zt({transform:"scale(0.8)",opacity:0})),Fi("visible",zt({transform:"scale(1)",opacity:1})),wr("* => visible",yr("150ms cubic-bezier(0, 0, 0.2, 1)")),wr("* => void, * => hidden",yr("75ms cubic-bezier(0.4, 0.0, 1, 1)",zt({opacity:0})))])},JO=0,eF=(()=>{let e=class e extends Pi{constructor(n,r,o,s,a){super(),this._ngZone=n,this._elementRef=r,this._changeDetectorRef=o,this._platform=s,this.snackBarConfig=a,this._document=_(O),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new R,this._onExit=new R,this._onEnter=new R,this._animationState="void",this._liveElementId=`mat-snack-bar-container-live-${JO++}`,this.attachDomPortal=c=>{this._assertNotAttached();let l=this._portalOutlet.attachDomPortal(c);return this._afterPortalAttached(),l},a.politeness==="assertive"&&!a.announcementMessage?this._live="assertive":a.politeness==="off"?this._live="off":this._live="polite",this._platform.FIREFOX&&(this._live==="polite"&&(this._role="status"),this._live==="assertive"&&(this._role="alert"))}attachComponentPortal(n){this._assertNotAttached();let r=this._portalOutlet.attachComponentPortal(n);return this._afterPortalAttached(),r}attachTemplatePortal(n){this._assertNotAttached();let r=this._portalOutlet.attachTemplatePortal(n);return this._afterPortalAttached(),r}onAnimationEnd(n){let{fromState:r,toState:o}=n;if((o==="void"&&r!=="void"||o==="hidden")&&this._completeExit(),o==="visible"){let s=this._onEnter;this._ngZone.run(()=>{s.next(),s.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._ngZone.run(()=>{this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId)}),this._onExit}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){queueMicrotask(()=>{this._onExit.next(),this._onExit.complete()})}_afterPortalAttached(){let n=this._elementRef.nativeElement,r=this.snackBarConfig.panelClass;r&&(Array.isArray(r)?r.forEach(a=>n.classList.add(a)):n.classList.add(r)),this._exposeToModals();let o=this._label.nativeElement,s="mdc-snackbar__label";o.classList.toggle(s,!o.querySelector(`.${s}`))}_exposeToModals(){let n=this._liveElementId,r=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let o=0;o<r.length;o++){let s=r[o],a=s.getAttribute("aria-owns");this._trackedModals.add(s),a?a.indexOf(n)===-1&&s.setAttribute("aria-owns",a+" "+n):s.setAttribute("aria-owns",n)}}_clearFromModals(){this._trackedModals.forEach(n=>{let r=n.getAttribute("aria-owns");if(r){let o=r.replace(this._liveElementId,"").trim();o.length>0?n.setAttribute("aria-owns",o):n.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{let n=this._elementRef.nativeElement.querySelector("[aria-hidden]"),r=this._elementRef.nativeElement.querySelector("[aria-live]");if(n&&r){let o=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&n.contains(document.activeElement)&&(o=document.activeElement),n.removeAttribute("aria-hidden"),r.appendChild(n),o?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}};e.\u0275fac=function(r){return new(r||e)(f(A),f(k),f(Je),f(oe),f(Oo))},e.\u0275cmp=W({type:e,selectors:[["mat-snack-bar-container"]],viewQuery:function(r,o){if(r&1&&(qe(Li,7),qe(WO,7)),r&2){let s;U(s=$())&&(o._portalOutlet=s.first),U(s=$())&&(o._label=s.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(r,o){r&1&&Lf("@state.done",function(a){return o.onAnimationEnd(a)}),r&2&&Pf("@state",o._animationState)},standalone:!0,features:[ee,G],decls:6,vars:3,consts:[["label",""],[1,"mdc-snackbar__surface"],[1,"mat-mdc-snack-bar-label"],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(r,o){r&1&&(b(0,"div",1)(1,"div",2,0)(3,"div",3),z(4,GO,0,0,"ng-template",4),C(),_e(5,"div"),C()()),r&2&&(M(5),he("aria-live",o._live)("role",o._role)("id",o._liveElementId))},dependencies:[Li],styles:['.mdc-snackbar{display:none;position:fixed;right:0;bottom:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;pointer-events:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mdc-snackbar--opening,.mdc-snackbar--open,.mdc-snackbar--closing{display:flex}.mdc-snackbar--open .mdc-snackbar__label,.mdc-snackbar--open .mdc-snackbar__actions{visibility:visible}.mdc-snackbar__surface{padding-left:0;paddin
Line truncated
|
||||
--mat-mdc-form-field-label-transform,
|
||||
${oL} translateX(${u})
|
||||
)`}_isAttachedToDom(){let n=this._elementRef.nativeElement;if(n.getRootNode){let r=n.getRootNode();return r&&r!==n}return document.documentElement.contains(n)}};e.\u0275fac=function(r){return new(r||e)(f(k),f(Je),f(A),f(un),f(oe),f(iL,8),f(Ge,8),f(O))},e.\u0275cmp=W({type:e,selectors:[["mat-form-field"]],contentQueries:function(r,o,s){if(r&1&&(Oe(s,zo,5),Oe(s,zo,7),Oe(s,lg,5),Oe(s,uD,5),Oe(s,fD,5),Oe(s,JP,5),Oe(s,iD,5)),r&2){let a;U(a=$())&&(o._labelChildNonStatic=a.first),U(a=$())&&(o._labelChildStatic=a.first),U(a=$())&&(o._formFieldControl=a.first),U(a=$())&&(o._prefixChildren=a),U(a=$())&&(o._suffixChildren=a),U(a=$())&&(o._errorChildren=a),U(a=$())&&(o._hintChildren=a)}},viewQuery:function(r,o){if(r&1&&(qe(RP,5),qe(kP,5),qe(OP,5),qe(rD,5),qe(aD,5),qe(sD,5)),r&2){let s;U(s=$())&&(o._textField=s.first),U(s=$())&&(o._iconPrefixContainer=s.first),U(s=$())&&(o._textPrefixContainer=s.first),U(s=$())&&(o._floatingLabel=s.first),U(s=$())&&(o._notchedOutline=s.first),U(s=$())&&(o._lineRipple=s.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(r,o){r&2&&ie("mat-mdc-form-field-label-always-float",o._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",o._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",o._hasIconSuffix)("mat-form-field-invalid",o._control.errorState)("mat-form-field-disabled",o._control.disabled)("mat-form-field-autofilled",o._control.autofilled)("mat-form-field-no-animations",o._animationMode==="NoopAnimations")("mat-form-field-appearance-fill",o.appearance=="fill")("mat-form-field-appearance-outline",o.appearance=="outline")("mat-form-field-hide-placeholder",o._hasFloatingLabel()&&!o._shouldLabelFloat())("mat-focused",o._control.focused)("mat-primary",o.color!=="accent"&&o.color!=="warn")("mat-accent",o.color==="accent")("mat-warn",o.color==="warn")("ng-untouched",o._shouldForward("untouched"))("ng-touched",o._shouldForward("touched"))("ng-pristine",o._shouldForward("pristine"))("ng-dirty",o._shouldForward("dirty"))("ng-valid",o._shouldForward("valid"))("ng-invalid",o._shouldForward("invalid"))("ng-pending",o._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],standalone:!0,features:[we([{provide:dg,useExisting:e},{provide:mD,useExisting:e}]),G],ngContentSelectors:NP,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(r,o){if(r&1){let s=An();rt(FP),z(0,jP,1,1,"ng-template",null,0,rl),b(2,"div",4,1),be("click",function(c){return In(s),Sn(o._control.onContainerClick(c))}),z(4,VP,1,0,"div",5),b(5,"div",6),z(6,HP,2,2,"div",7)(7,UP,3,0,"div",8)(8,$P,3,0,"div",9),b(9,"div",10),z(10,GP,1,1,null,11),ae(11),C(),z(12,qP,2,0,"div",12)(13,YP,2,0,"div",13),C(),z(14,QP,1,0,"div",14),C(),b(15,"div",15),z(16,ZP,2,1)(17,XP,5,2),C()}if(r&2){let s;M(2),ie("mdc-text-field--filled",!o._hasOutline())("mdc-text-field--outlined",o._hasOutline())("mdc-text-field--no-label",!o._hasFloatingLabel())("mdc-text-field--disabled",o._control.disabled)("mdc-text-field--invalid",o._control.errorState),M(2),ye(4,!o._hasOutline()&&!o._control.disabled?4:-1),M(2),ye(6,o._hasOutline()?6:-1),M(),ye(7,o._hasIconPrefix?7:-1),M(),ye(8,o._hasTextPrefix?8:-1),M(2),ye(10,!o._hasOutline()||o._forceDisplayInfixLabel()?10:-1),M(2),ye(12,o._hasTextSuffix?12:-1),M(),ye(13,o._hasIconSuffix?13:-1),M(),ye(14,o._hasOutline()?-1:14),M(),ie("mat-mdc-form-field-subscript-dynamic-size",o.subscriptSizing==="dynamic"),M(),ye(16,(s=o._getDisplayedMessages())==="error"?16:s==="hint"?17:-1)}},dependencies:[rD,aD,wl,sD,iD],styles:['.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.m
Line truncated
|
||||
`);if(a.length>2){let c=a[0].slice(6),l=a[1].slice(5),d=JSON.parse(l);d.msg&&(this.title=d.msg),d.action&&d.action==="done"&&(this.repo_svc.GetCatalog(this.repo_svc.catalog().limit,this.repo_svc.catalog().last,this.repo_svc.catalog().keyword),this.msg_svc.success("\u83B7\u53D6\u955C\u50CF\u6210\u529F"),this.dialogRef.close())}}}this.inProgress=!1})}};e.\u0275fac=function(r){return new(r||e)(f(iu),f(kr),f(Fo))},e.\u0275cmp=W({type:e,selectors:[["app-download-image"]],standalone:!0,features:[G],decls:35,vars:9,consts:[["mat-dialog-title",""],[1,"content"],[1,"mat-typography"],["appearance","outline"],["matInput","","placeholder","golang:1.22.2-alpine3.19",3,"ngModelChange","ngModel"],["matSuffix",""],[2,"margin-left","1.5rem"],["matTextPrefix",""],["matInput","","placeholder","external/golang:latest",3,"ngModelChange","ngModel"],["matInput","","placeholder","socks5://127.0.0.1:7890",3,"ngModelChange","ngModel"],["align","end"],["mat-button","","mat-dialog-close",""],["mat-button","","cdkFocusInitial","","color","primary",3,"click"]],template:function(r,o){r&1&&(b(0,"h2",0),L(1),C(),b(2,"div",1)(3,"div"),_e(4,"mat-spinner"),C(),b(5,"div")(6,"mat-dialog-content",2)(7,"p")(8,"mat-form-field",3)(9,"mat-label"),L(10,"\u4E91\u4E0A\u955C\u50CF\u540D\u79F0"),C(),b(11,"input",4),Cs("ngModelChange",function(a){return il(o.source,a)||(o.source=a),a}),C(),b(12,"mat-icon",5),L(13,"clear"),C()()(),b(14,"p")(15,"mat-form-field",3)(16,"mat-label",6),L(17,"\u672C\u5730\u955C\u50CF\u540D\u79F0"),C(),b(18,"span",7),L(19),C(),b(20,"input",8),Cs("ngModelChange",function(a){return il(o.target,a)||(o.target=a),a}),C(),b(21,"mat-icon",5),L(22,"clear"),C()()(),b(23,"p")(24,"mat-form-field",3)(25,"mat-label"),L(26,"\u4EE3\u7406"),C(),b(27,"input",9),Cs("ngModelChange",function(a){return il(o.proxy,a)||(o.proxy=a),a}),C(),b(28,"mat-icon",5),L(29,"clear"),C()()()(),b(30,"mat-dialog-actions",10)(31,"button",11),L(32,"\u53D6\u6D88"),C(),b(33,"button",12),be("click",function(){return o.proxyDownload()}),L(34,"\u4E0B\u8F7D"),C()()()()),r&2&&(M(),Qt(o.title),M(2),Mt(o.inProgress?"download-overlay in-progress":"download-overlay"),M(2),Mt(o.inProgress?"forms in-progress":"forms"),M(6),Ds("ngModel",o.source),M(8),Qt(o.repo_svc.settings().base_address+"/ "),M(),Ds("ngModel",o.target),M(7),Ds("ngModel",o.proxy))},dependencies:[KD,XD,JD,QD,rd,zo,Gd,$d,ai,Wd,hD,Jx,Vo,Vd,rg,iC],styles:["mat-dialog-content[_ngcontent-%COMP%]{min-width:40rem}mat-dialog-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:100%}mat-dialog-content[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}div.content[_ngcontent-%COMP%]{position:relative}div.content[_ngcontent-%COMP%] div.download-overlay[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;display:none;align-items:center;justify-content:center;margin-top:-2rem;z-index:1000}div.content[_ngcontent-%COMP%] div.download-overlay.in-progress[_ngcontent-%COMP%]{display:flex}div.content[_ngcontent-%COMP%] div.forms[_ngcontent-%COMP%]{opacity:1}div.content[_ngcontent-%COMP%] div.forms.in-progress[_ngcontent-%COMP%]{opacity:.3}"]});let t=e;return t})();var sC=(()=>{let e=class e{transform(n,...r){if(n===0)return"0 Bytes";let o=1024,s=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],a=Math.floor(Math.log(n)/Math.log(o));return parseFloat((n/Math.pow(o,a)).toFixed(2))+" "+s[a]}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=Vc({name:"capacity",type:e,pure:!0,standalone:!0});let t=e;return t})();var Sg=class{constructor(e,i){this._document=i;let n=this._textarea=this._document.createElement("textarea"),r=n.style;r.position="fixed",r.top=r.opacity="0",r.left="-999em",n.setAttribute("aria-hidden","true"),n.value=e,n.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(n)}copy(){let e=this._textarea,i=!1;try{if(e){let n=this._document.activeElement;e.select(),e.setSelectionRange(0,e.value.length),i=this._document.execCommand("copy"),n&&n.focus()}}catch{}return i}destroy(){let e=this._textarea;e&&(e.remove(),this._textarea=void 0)}},aC=(()=>{let e=class e{constructor(n){this._document=n}copy(n){let r=this.beginCopy(n),o=r.copy();return r.destroy(),o}beginCopy(n){return new Sg(n,this._document)}};e.\u0275fac=function(r){return new(r||e)(p(O))},e.\u0275prov=D({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var oj=()=>["expandedDetail"];function sj(t,e){t&1&&(b(0,"th",23),L(1,"\xA0"),C())}function aj(t,e){t&1&&(b(0,"mat-icon"),L(1,"keyboard_arrow_up"),C())}function cj(t,e){t&1&&(b(0,"mat-icon"),L(1,"keyboard_arrow_down"),C())}function lj(t,e){if(t&1){let i=An();b(0,"td",24)(1,"button",25),be("click",function(r){let o=In(i).$implicit,s=Ne();return Sn(s.showTags(r,o))}),z(2,aj,2,0,"mat-icon")(3,cj,2,0),C()()}if(t&2){let i=e.$implicit,n=Ne();M(2),ye(2,n.expandedElement===i?2:3)}}function dj(t,e){t&1&&(b(0,"th",26),L(1,"ID"),C())}function uj(t,e){if(t&1&&(b(0,"td",24),L(1),C()),t&2){let i=e.$implicit;M(),ot(" ",i.id,"")}}function hj(t,e){t&1&&(
Line truncated
|
||||
@@ -1,2 +0,0 @@
|
||||
(function(e){let n=e.performance;function c(L){n&&n.mark&&n.mark(L)}function r(L,t){n&&n.measure&&n.measure(L,t)}c("Zone");let a=e.__Zone_symbol_prefix||"__zone_symbol__";function l(L){return a+L}let y=e[l("forceDuplicateZoneCheck")]===!0;if(e.Zone){if(y||typeof e.Zone.__symbol__!="function")throw new Error("Zone already loaded.");return e.Zone}let se=class se{static assertZonePatched(){if(e.Promise!==oe.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let t=se.current;for(;t.parent;)t=t.parent;return t}static get current(){return U.zone}static get currentTask(){return ne}static __load_patch(t,s,o=!1){if(oe.hasOwnProperty(t)){if(!o&&y)throw Error("Already loaded patch: "+t)}else if(!e["__Zone_disable_"+t]){let v="Zone:"+t;c(v),oe[t]=s(e,se,z),r(v,v)}}get parent(){return this._parent}get name(){return this._name}constructor(t,s){this._parent=t,this._name=s?s.name||"unnamed":"<root>",this._properties=s&&s.properties||{},this._zoneDelegate=new k(this,this._parent&&this._parent._zoneDelegate,s)}get(t){let s=this.getZoneWith(t);if(s)return s._properties[t]}getZoneWith(t){let s=this;for(;s;){if(s._properties.hasOwnProperty(t))return s;s=s._parent}return null}fork(t){if(!t)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,t)}wrap(t,s){if(typeof t!="function")throw new Error("Expecting function got: "+t);let o=this._zoneDelegate.intercept(this,t,s),v=this;return function(){return v.runGuarded(o,this,arguments,s)}}run(t,s,o,v){U={parent:U,zone:this};try{return this._zoneDelegate.invoke(this,t,s,o,v)}finally{U=U.parent}}runGuarded(t,s=null,o,v){U={parent:U,zone:this};try{try{return this._zoneDelegate.invoke(this,t,s,o,v)}catch(F){if(this._zoneDelegate.handleError(this,F))throw F}}finally{U=U.parent}}runTask(t,s,o){if(t.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(t.zone||$).name+"; Execution: "+this.name+")");if(t.state===H&&(t.type===K||t.type===P))return;let v=t.state!=T;v&&t._transitionTo(T,M),t.runCount++;let F=ne;ne=t,U={parent:U,zone:this};try{t.type==P&&t.data&&!t.data.isPeriodic&&(t.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,t,s,o)}catch(f){if(this._zoneDelegate.handleError(this,f))throw f}}finally{t.state!==H&&t.state!==d&&(t.type==K||t.data&&t.data.isPeriodic?v&&t._transitionTo(M,T):(t.runCount=0,this._updateTaskCount(t,-1),v&&t._transitionTo(H,T,H))),U=U.parent,ne=F}}scheduleTask(t){if(t.zone&&t.zone!==this){let o=this;for(;o;){if(o===t.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${t.zone.name}`);o=o.parent}}t._transitionTo(X,H);let s=[];t._zoneDelegates=s,t._zone=this;try{t=this._zoneDelegate.scheduleTask(this,t)}catch(o){throw t._transitionTo(d,X,H),this._zoneDelegate.handleError(this,o),o}return t._zoneDelegates===s&&this._updateTaskCount(t,1),t.state==X&&t._transitionTo(M,X),t}scheduleMicroTask(t,s,o,v){return this.scheduleTask(new m(N,t,s,o,v,void 0))}scheduleMacroTask(t,s,o,v,F){return this.scheduleTask(new m(P,t,s,o,v,F))}scheduleEventTask(t,s,o,v,F){return this.scheduleTask(new m(K,t,s,o,v,F))}cancelTask(t){if(t.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(t.zone||$).name+"; Execution: "+this.name+")");if(!(t.state!==M&&t.state!==T)){t._transitionTo(x,M,T);try{this._zoneDelegate.cancelTask(this,t)}catch(s){throw t._transitionTo(d,x),this._zoneDelegate.handleError(this,s),s}return this._updateTaskCount(t,-1),t._transitionTo(H,x),t.runCount=0,t}}_updateTaskCount(t,s){let o=t._zoneDelegates;s==-1&&(t._zoneDelegates=null);for(let v=0;v<o.length;v++)o[v]._updateTaskCount(t.type,s)}};se.__symbol__=l;let _=se,b={name:"",onHasTask:(L,t,s,o)=>L.hasTask(s,o),onScheduleTask:(L,t,s,o)=>L.scheduleTask(s,o),onInvokeTask:(L,t,s,o,v,F)=>L.invokeTask(s,o,v,F),onCancelTask:(L,t,s,o)=>L.cancelTask(s,o)};class k{constructor(t,s,o){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=t,this._parentDelegate=s,this._forkZS=o&&(o&&o.onFork?o:s._forkZS),this._forkDlgt=o&&(o.onFork?s:s._forkDlgt),this._forkCurrZone=o&&(o.onFork?this.zone:s._forkCurrZone),this._interceptZS=o&&(o.onIntercept?o:s._interceptZS),this._interceptDlgt=o&&(o.onIntercept?s:s._interceptDlgt),this._interceptCurrZone=o&&(o.onIntercept?this.zone:s._interceptCurrZone),this._invokeZS=o&&(o.onInvoke?o:s._invokeZS),this._invokeDlgt=o&&(o.onInvoke?s:s._invokeDlgt),this._invokeCurrZone=o&&(o.onInvoke?this.zone:s._invokeCurrZone),this._handleErrorZS=o&&(o.onHandleError?o:s._handleErrorZS),this._handleErrorDlgt=o&&(o.onHandleError?s:s._handleErrorDlgt),this._handleErrorCurrZone=o&&(o.onHandleError?this.zone:s._handleErrorCurrZone),this._scheduleTaskZS=o&&(o.onScheduleTaskLine truncated
|
||||
`+i.stack:""))}catch(C){p=C}b&&(p.throwOriginal=!0),p.rejection=i,p.promise=f,p.zone=n.current,p.task=n.currentTask,_.push(p),c.scheduleMicroTask()}}}return f}let U=y("rejectionHandledHandler");function ne(f){if(f[q]===d){try{let u=n[U];u&&typeof u=="function"&&u.call(this,{rejection:f[R],promise:f})}catch{}f[q]=x;for(let u=0;u<_.length;u++)f===_[u].promise&&_.splice(u,1)}}function ee(f,u,i,h,g){ne(f);let w=f[q],p=w?typeof h=="function"?h:j:typeof g=="function"?g:J;u.scheduleMicroTask(X,()=>{try{let C=f[R],S=!!i&&E===i[E];S&&(i[$]=C,i[H]=w);let D=u.run(p,void 0,S&&p!==J&&p!==j?[]:[C]);z(i,!0,D)}catch(C){z(i,!1,C)}},i)}let W="function ZoneAwarePromise() { [native code] }",se=function(){},L=e.AggregateError;class t{static toString(){return W}static resolve(u){return u instanceof t?u:z(new this(null),T,u)}static reject(u){return z(new this(null),x,u)}static withResolvers(){let u={};return u.promise=new t((i,h)=>{u.resolve=i,u.reject=h}),u}static any(u){if(!u||typeof u[Symbol.iterator]!="function")return Promise.reject(new L([],"All promises were rejected"));let i=[],h=0;try{for(let p of u)h++,i.push(t.resolve(p))}catch{return Promise.reject(new L([],"All promises were rejected"))}if(h===0)return Promise.reject(new L([],"All promises were rejected"));let g=!1,w=[];return new t((p,C)=>{for(let S=0;S<i.length;S++)i[S].then(D=>{g||(g=!0,p(D))},D=>{w.push(D),h--,h===0&&(g=!0,C(new L(w,"All promises were rejected")))})})}static race(u){let i,h,g=new this((C,S)=>{i=C,h=S});function w(C){i(C)}function p(C){h(C)}for(let C of u)B(C)||(C=this.resolve(C)),C.then(w,p);return g}static all(u){return t.allWithCallback(u)}static allSettled(u){return(this&&this.prototype instanceof t?this:t).allWithCallback(u,{thenCallback:h=>({status:"fulfilled",value:h}),errorCallback:h=>({status:"rejected",reason:h})})}static allWithCallback(u,i){let h,g,w=new this((D,G)=>{h=D,g=G}),p=2,C=0,S=[];for(let D of u){B(D)||(D=this.resolve(D));let G=C;try{D.then(V=>{S[G]=i?i.thenCallback(V):V,p--,p===0&&h(S)},V=>{i?(S[G]=i.errorCallback(V),p--,p===0&&h(S)):g(V)})}catch(V){g(V)}p++,C++}return p-=2,p===0&&h(S),w}constructor(u){let i=this;if(!(i instanceof t))throw new Error("Must be an instanceof Promise.");i[q]=M,i[R]=[];try{let h=P();u&&u(h(N(i,T)),h(N(i,x)))}catch(h){z(i,!1,h)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return t}then(u,i){let h=this.constructor?.[Symbol.species];(!h||typeof h!="function")&&(h=this.constructor||t);let g=new h(se),w=n.current;return this[q]==M?this[R].push(w,g,u,i):ee(this,w,g,u,i),g}catch(u){return this.then(null,u)}finally(u){let i=this.constructor?.[Symbol.species];(!i||typeof i!="function")&&(i=t);let h=new i(se);h[E]=E;let g=n.current;return this[q]==M?this[R].push(g,h,u,u):ee(this,g,h,u,u),h}}t.resolve=t.resolve,t.reject=t.reject,t.race=t.race,t.all=t.all;let s=e[k]=e.Promise;e.Promise=t;let o=y("thenPatched");function v(f){let u=f.prototype,i=r(u,"then");if(i&&(i.writable===!1||!i.configurable))return;let h=u.then;u[m]=h,f.prototype.then=function(g,w){return new t((C,S)=>{h.call(this,C,S)}).then(g,w)},f[o]=!0}c.patchThen=v;function F(f){return function(u,i){let h=f.apply(u,i);if(h instanceof t)return h;let g=h.constructor;return g[o]||v(g),h}}return s&&(v(s),ue(e,"fetch",f=>F(f))),Promise[n.__symbol__("uncaughtPromiseErrors")]=_,t});Zone.__load_patch("toString",e=>{let n=Function.prototype.toString,c=A("OriginalDelegate"),r=A("Promise"),a=A("Error"),l=function(){if(typeof this=="function"){let k=this[c];if(k)return typeof k=="function"?n.call(k):Object.prototype.toString.call(k);if(this===Promise){let m=e[r];if(m)return n.call(m)}if(this===Error){let m=e[a];if(m)return n.call(m)}}return n.call(this)};l[c]=n,Function.prototype.toString=l;let y=Object.prototype.toString,_="[object Promise]";Object.prototype.toString=function(){return typeof Promise=="function"&&this instanceof Promise?_:y.call(this)}});var _e=!1;if(typeof window<"u")try{let e=Object.defineProperty({},"passive",{get:function(){_e=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch{_e=!1}var _t={useG:!0},te={},et={},tt=new RegExp("^"+ge+"(\\w+)(true|false)$"),nt=A("propagationStopped");function rt(e,n){let c=(n?n(e):e)+ae,r=(n?n(e):e)+ce,a=ge+c,l=ge+r;te[e]={},te[e][ae]=a,te[e][ce]=l}function Et(e,n,c,r){let a=r&&r.add||Le,l=r&&r.rm||je,y=r&&r.listeners||"eventListeners",_=r&&r.rmAll||"removeAllListeners",b=A(a),k="."+a+":",m="prependListener",I="."+m+":",O=function(R,E,$){if(R.isRemoved)return;let H=R.callback;typeof H=="object"&&H.handleEvent&&(R.callback=T=>H.handleEvent(T),R.originalDelegate=H);let X;try{R.invoke(R,E,[$])}catch(T){X=T}let M=R.options;if(M&&typeof M=="object"&&M.once){let T=R.originalDelegate?R.originalDelegate:R.callback;E[l].call(E,$.type,T,M)}return X};function Z(R,E,$){if(E=E||e.event,!E)return;let H=R||E.target||e,X=H[te[E.type][$?ce:ae]];if(X){let M=[];if(X.length===1){let T=O(X[0],H,E);T&&M.push(T)}else{let T=X.slice();for(let x=0;x<T.length&&!(E&&E[nt]===!0);x++)
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
.mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0,0,.2,1);transform:scale3d(0,0,0);background-color:var(--mat-ripple-color, rgba(0, 0, 0, .1))}.cdk-high-contrast-active .mat-ripple-element{display:none}.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:#00000052}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0!important;box-sizing:content-box!important;height:auto!important;overflow:hidden!important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0!important;box-sizing:content-box!important;height:0!important}@keyframes cdk-text-field-autofill-start{}@keyframes cdk-text-field-autofill-end{}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}.mat-focus-indicator{position:relative}.mat-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border:var(--mat-focus-indicator-border-width, 3px) var(--mat-focus-indicator-border-style, solid) var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus:before{content:""}.cdk-high-contrast-active{--mat-focus-indicator-display: block}.mat-mdc-focus-indicator{position:relative}.mat-mdc-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-mdc-focus-indicator-display, none);border:var(--mat-mdc-focus-indicator-border-width, 3px) var(--mat-mdc-focus-indicator-border-style, solid) var(--mat-mdc-focus-indicator-border-color, transparent);border-radius:var(--mat-mdc-focus-indicator-border-radius, 4px)}.mat-mdc-focus-indicator:focus:before{content:""}.cdk-high-contrast-active{--mat-mdc-focus-indicator-display: block}.mat-app-background{background-color:var(--mat-app-background-color, transparent);color:var(--mat-app-text-color, inherit)}html{--mat-ripple-color:rgba(0, 0, 0, .1)}html{--mat-option-selected-state-label-text-color:#3f51b5;--mat-option-label-text-color:rgba(0, 0, 0, .87);--mat-option-hover-state-layer-color:rgba(0, 0, 0, .04);--mat-option-focus-state-layer-color:rgba(0, 0, 0, .04);--mat-option-selected-state-layer-color:rgba(0, 0, 0, .04)}.mat-accent{--mat-option-selected-state-label-text-color:#ff4081;--mat-option-label-text-color:rgba(0, 0, 0, .87);--mat-option-hover-state-layer-color:rgba(0, 0, 0, .04);--mat-option-focus-state-layer-color:rgba(0, 0, 0, .04);--mat-option-selected-state-layer-color:rgba(0, 0, 0, .04)}.mat-warn{--mat-option-selected-state-label-text-color:#f44336;--mat-option-label-text-color:rgba(0, 0, 0, .87);--mat-option-hover-state-layer-color:rgba(0, 0, 0, .04);--mat-option-focus-state-layer-color:rgba(0, 0, 0, .04);--mat-option-selected-state-layer-color:rgba(0, 0, 0, .04)}html{--mat-optgroup-label-text-color:rgba(0, 0, 0, .87)}.mat-primary{--mat-full-pseudo-checkbox-selected-icon-color:#3f51b5;--mat-full-pseudo-checkbox-selected-checkmark-color:#fafafa;--mat-full-pseudo-checkbox-unselected-icon-color:rgba(0, 0, 0, .54);--mat-full-pseudo-checkbox-disabled-selected-checkmark-color:#fafafa;--mat-full-pseudo-checkbox-disabled-unselected-icon-color:#b0b0b0;--mat-full-pseudo-checkbox-diLine truncated
|
||||
@@ -1,61 +0,0 @@
|
||||
package front
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"fmt"
|
||||
"github.com/loveuer/nf"
|
||||
"github.com/loveuer/nf/nft/log"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
//go:embed dist/front/browser
|
||||
var DefaultFront embed.FS
|
||||
|
||||
func NewFront(ff *embed.FS, basePath string) nf.HandlerFunc {
|
||||
var (
|
||||
e error
|
||||
indexBytes []byte
|
||||
index string
|
||||
)
|
||||
|
||||
index = fmt.Sprintf("%s/index.html", basePath)
|
||||
|
||||
if indexBytes, e = ff.ReadFile(index); e != nil {
|
||||
log.Panic("read index file err: %v", e)
|
||||
}
|
||||
|
||||
return func(c *nf.Ctx) error {
|
||||
var (
|
||||
err error
|
||||
bs []byte
|
||||
path = c.Path()
|
||||
)
|
||||
|
||||
if bs, err = ff.ReadFile(basePath + path); err != nil {
|
||||
log.Debug("embed read file [%s]%s err: %v", basePath, path, err)
|
||||
c.Set("Content-Type", "text/html")
|
||||
_, err = c.Write(indexBytes)
|
||||
return err
|
||||
}
|
||||
|
||||
var dbs []byte
|
||||
if len(bs) > 512 {
|
||||
dbs = bs[:512]
|
||||
} else {
|
||||
dbs = bs
|
||||
}
|
||||
|
||||
switch {
|
||||
case strings.HasSuffix(path, ".js"):
|
||||
c.Set("Content-Type", "application/javascript")
|
||||
case strings.HasSuffix(path, ".css"):
|
||||
c.Set("Content-Type", "text/css")
|
||||
default:
|
||||
c.Set("Content-Type", http.DetectContentType(dbs))
|
||||
}
|
||||
|
||||
_, err = c.Write(bs)
|
||||
return err
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,11 @@ package model
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io"
|
||||
|
||||
v1 "github.com/google/go-containerregistry/pkg/v1"
|
||||
"github.com/samber/lo"
|
||||
"io"
|
||||
|
||||
"nf-repo/internal/model/types"
|
||||
)
|
||||
|
||||
|
||||
+14
-3
@@ -1,16 +1,27 @@
|
||||
package opt
|
||||
|
||||
import "errors"
|
||||
import (
|
||||
"errors"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
const (
|
||||
DefaultMaxSize = 1024 * 1024 * 1024
|
||||
ReferrersEnabled = true
|
||||
|
||||
BaseAddress = "repo.me"
|
||||
RoleMustLess = true
|
||||
)
|
||||
|
||||
type config struct {
|
||||
Debug bool
|
||||
RepoName string
|
||||
Address string
|
||||
DataPath string
|
||||
Proxy string
|
||||
}
|
||||
|
||||
var (
|
||||
Debug = false
|
||||
Cfg = &config{}
|
||||
Proxy *url.URL
|
||||
ErrNotFound = errors.New("not found")
|
||||
)
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,125 @@
|
||||
package tools
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"github.com/jedib0t/go-pretty/v6/table"
|
||||
"github.com/loveuer/nf/nft/log"
|
||||
)
|
||||
|
||||
func TablePrinter(data any, writers ...io.Writer) {
|
||||
var w io.Writer = os.Stdout
|
||||
if len(writers) > 0 && writers[0] != nil {
|
||||
w = writers[0]
|
||||
}
|
||||
|
||||
t := table.NewWriter()
|
||||
structPrinter(t, "", data)
|
||||
_, _ = fmt.Fprintln(w, t.Render())
|
||||
}
|
||||
|
||||
func structPrinter(w table.Writer, prefix string, item any) {
|
||||
Start:
|
||||
rv := reflect.ValueOf(item)
|
||||
if rv.IsZero() {
|
||||
return
|
||||
}
|
||||
|
||||
for rv.Type().Kind() == reflect.Pointer {
|
||||
rv = rv.Elem()
|
||||
}
|
||||
|
||||
switch rv.Type().Kind() {
|
||||
case reflect.Invalid,
|
||||
reflect.Uintptr,
|
||||
reflect.Chan,
|
||||
reflect.Func,
|
||||
reflect.UnsafePointer:
|
||||
case reflect.Bool,
|
||||
reflect.Int,
|
||||
reflect.Int8,
|
||||
reflect.Int16,
|
||||
reflect.Int32,
|
||||
reflect.Int64,
|
||||
reflect.Uint,
|
||||
reflect.Uint8,
|
||||
reflect.Uint16,
|
||||
reflect.Uint32,
|
||||
reflect.Uint64,
|
||||
reflect.Float32,
|
||||
reflect.Float64,
|
||||
reflect.Complex64,
|
||||
reflect.Complex128,
|
||||
reflect.Interface:
|
||||
w.AppendRow(table.Row{strings.TrimPrefix(prefix, "."), rv.Interface()})
|
||||
case reflect.String:
|
||||
val := rv.String()
|
||||
if len(val) <= 160 {
|
||||
w.AppendRow(table.Row{strings.TrimPrefix(prefix, "."), val})
|
||||
return
|
||||
}
|
||||
|
||||
w.AppendRow(table.Row{strings.TrimPrefix(prefix, "."), val[0:64] + "..." + val[len(val)-64:]})
|
||||
case reflect.Array, reflect.Slice:
|
||||
for i := 0; i < rv.Len(); i++ {
|
||||
p := strings.Join([]string{prefix, fmt.Sprintf("[%d]", i)}, ".")
|
||||
structPrinter(w, p, rv.Index(i).Interface())
|
||||
}
|
||||
case reflect.Map:
|
||||
for _, k := range rv.MapKeys() {
|
||||
structPrinter(w, fmt.Sprintf("%s.{%v}", prefix, k), rv.MapIndex(k).Interface())
|
||||
}
|
||||
case reflect.Pointer:
|
||||
goto Start
|
||||
case reflect.Struct:
|
||||
for i := 0; i < rv.NumField(); i++ {
|
||||
p := fmt.Sprintf("%s.%s", prefix, rv.Type().Field(i).Name)
|
||||
field := rv.Field(i)
|
||||
|
||||
// log.Debug("TablePrinter: prefix: %s, field: %v", p, rv.Field(i))
|
||||
|
||||
if !field.CanInterface() {
|
||||
return
|
||||
}
|
||||
|
||||
structPrinter(w, p, field.Interface())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TableMapPrinter(data []byte) {
|
||||
m := make(map[string]any)
|
||||
if err := json.Unmarshal(data, &m); err != nil {
|
||||
log.Warn(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
t := table.NewWriter()
|
||||
addRow(t, "", m)
|
||||
fmt.Println(t.Render())
|
||||
}
|
||||
|
||||
func addRow(w table.Writer, prefix string, m any) {
|
||||
rv := reflect.ValueOf(m)
|
||||
switch rv.Type().Kind() {
|
||||
case reflect.Map:
|
||||
for _, k := range rv.MapKeys() {
|
||||
key := k.String()
|
||||
if prefix != "" {
|
||||
key = strings.Join([]string{prefix, k.String()}, ".")
|
||||
}
|
||||
addRow(w, key, rv.MapIndex(k).Interface())
|
||||
}
|
||||
case reflect.Slice, reflect.Array:
|
||||
for i := 0; i < rv.Len(); i++ {
|
||||
addRow(w, fmt.Sprintf("%s[%d]", prefix, i), rv.Index(i).Interface())
|
||||
}
|
||||
default:
|
||||
w.AppendRow(table.Row{prefix, m})
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user