diff --git a/CHANGELOG.md b/CHANGELOG.md index fc4715cd..ecaf85ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,10 @@ - Enabled `process.env` in js migrations to allow accessing `os.Environ()`. +- Enabled file thumbs when visualizing `relation` display file fields. + +- Added new "View" collection type (@todo document) + ## v0.12.3 diff --git a/apis/collection_test.go b/apis/collection_test.go index c1035566..c120af8e 100644 --- a/apis/collection_test.go +++ b/apis/collection_test.go @@ -45,7 +45,7 @@ func TestCollectionsList(t *testing.T) { ExpectedContent: []string{ `"page":1`, `"perPage":30`, - `"totalItems":8`, + `"totalItems":10`, `"items":[{`, `"id":"_pb_users_auth_"`, `"id":"v851q4r790rhknl"`, @@ -73,10 +73,10 @@ func TestCollectionsList(t *testing.T) { ExpectedContent: []string{ `"page":2`, `"perPage":2`, - `"totalItems":8`, + `"totalItems":10`, `"items":[{`, - `"id":"v851q4r790rhknl"`, - `"id":"4d1blo5cuycfaca"`, + `"id":"kpv709sk2lqbqk8"`, + `"id":"9n89pl5vkct6330"`, }, ExpectedEvents: map[string]int{ "OnCollectionsListRequest": 1, @@ -231,7 +231,7 @@ func TestCollectionDelete(t *testing.T) { { Name: "authorized as admin + using the collection name", Method: http.MethodDelete, - Url: "/api/collections/demo1", + Url: "/api/collections/demo5", RequestHeaders: map[string]string{ "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", }, @@ -244,13 +244,13 @@ func TestCollectionDelete(t *testing.T) { "OnCollectionAfterDeleteRequest": 1, }, AfterTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { - ensureDeletedFiles(app, "wsmn24bux7wo113") + ensureDeletedFiles(app, "9n89pl5vkct6330") }, }, { Name: "authorized as admin + using the collection id", Method: http.MethodDelete, - Url: "/api/collections/wsmn24bux7wo113", + Url: "/api/collections/9n89pl5vkct6330", RequestHeaders: map[string]string{ "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", }, @@ -263,7 +263,7 @@ func TestCollectionDelete(t *testing.T) { "OnCollectionAfterDeleteRequest": 1, }, AfterTestFunc: func(t *testing.T, app *tests.TestApp, e *echo.Echo) { - ensureDeletedFiles(app, "wsmn24bux7wo113") + ensureDeletedFiles(app, "9n89pl5vkct6330") }, }, { @@ -292,6 +292,22 @@ func TestCollectionDelete(t *testing.T) { "OnCollectionBeforeDeleteRequest": 1, }, }, + { + Name: "authorized as admin + deleting a view", + Method: http.MethodDelete, + Url: "/api/collections/view2", + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", + }, + Delay: 100 * time.Millisecond, + ExpectedStatus: 204, + ExpectedEvents: map[string]int{ + "OnModelBeforeDelete": 1, + "OnModelAfterDelete": 1, + "OnCollectionBeforeDeleteRequest": 1, + "OnCollectionAfterDeleteRequest": 1, + }, + }, } for _, scenario := range scenarios { @@ -520,6 +536,56 @@ func TestCollectionCreate(t *testing.T) { `"options":{"minPasswordLength":{"code":"validation_required"`, }, }, + + // view + // ----------------------------------------------------------- + { + Name: "trying to create view collection with invalid options", + Method: http.MethodPost, + Url: "/api/collections", + Body: strings.NewReader(`{ + "name":"new", + "type":"view", + "schema":[{"type":"text","id":"12345789","name":"ignored!@#$"}], + "options":{"query": "invalid"} + }`), + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", + }, + ExpectedStatus: 400, + ExpectedContent: []string{ + `"data":{`, + `"options":{"query":{"code":"validation_invalid_view_query`, + }, + }, + { + Name: "creating view collection", + Method: http.MethodPost, + Url: "/api/collections", + Body: strings.NewReader(`{ + "name":"new", + "type":"view", + "schema":[{"type":"text","id":"12345789","name":"ignored!@#$"}], + "options": { + "query": "select 1 as id from _admins" + } + }`), + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", + }, + ExpectedStatus: 200, + ExpectedContent: []string{ + `"name":"new"`, + `"type":"view"`, + `"schema":[]`, + }, + ExpectedEvents: map[string]int{ + "OnModelBeforeCreate": 1, + "OnModelAfterCreate": 1, + "OnCollectionBeforeCreateRequest": 1, + "OnCollectionAfterCreateRequest": 1, + }, + }, } for _, scenario := range scenarios { @@ -660,7 +726,7 @@ func TestCollectionUpdate(t *testing.T) { { Name: "updating base collection with reserved auth fields", Method: http.MethodPatch, - Url: "/api/collections/demo1", + Url: "/api/collections/demo4", Body: strings.NewReader(`{ "schema":[ {"type":"text","name":"email"}, @@ -681,7 +747,7 @@ func TestCollectionUpdate(t *testing.T) { }, ExpectedStatus: 200, ExpectedContent: []string{ - `"name":"demo1"`, + `"name":"demo4"`, `"type":"base"`, `"schema":[{`, `"email"`, @@ -751,6 +817,7 @@ func TestCollectionUpdate(t *testing.T) { }, // rel field change displayFields propagation + // ----------------------------------------------------------- { Name: "renaming a display field should also update the referenced displayFields value", Method: http.MethodPatch, @@ -830,6 +897,60 @@ func TestCollectionUpdate(t *testing.T) { } }, }, + + // view + // ----------------------------------------------------------- + { + Name: "trying to update view collection with invalid options", + Method: http.MethodPatch, + Url: "/api/collections/view1", + Body: strings.NewReader(`{ + "schema":[{"type":"text","id":"12345789","name":"ignored!@#$"}], + "options":{"query": "invalid"} + }`), + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", + }, + ExpectedStatus: 400, + ExpectedContent: []string{ + `"data":{`, + `"options":{"query":{"code":"validation_invalid_view_query`, + }, + }, + { + Name: "updating view collection", + Method: http.MethodPatch, + Url: "/api/collections/view2", + Body: strings.NewReader(`{ + "name":"view2_update", + "schema":[{"type":"text","id":"12345789","name":"ignored!@#$"}], + "options": { + "query": "select 2 as id, created, updated, email from _admins" + } + }`), + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", + }, + ExpectedStatus: 200, + ExpectedContent: []string{ + `"name":"view2_update"`, + `"type":"view"`, + `"schema":[{`, + `"name":"email"`, + }, + NotExpectedContent: []string{ + // base model fields are not part of the schema + `"name":"id"`, + `"name":"created"`, + `"name":"updated"`, + }, + ExpectedEvents: map[string]int{ + "OnModelBeforeUpdate": 1, + "OnModelAfterUpdate": 1, + "OnCollectionBeforeUpdateRequest": 1, + "OnCollectionAfterUpdateRequest": 1, + }, + }, } for _, scenario := range scenarios { @@ -838,6 +959,8 @@ func TestCollectionUpdate(t *testing.T) { } func TestCollectionImport(t *testing.T) { + totalCollections := 10 + scenarios := []tests.ApiScenario{ { Name: "unauthorized", @@ -874,7 +997,7 @@ func TestCollectionImport(t *testing.T) { if err := app.Dao().CollectionQuery().All(&collections); err != nil { t.Fatal(err) } - expected := 8 + expected := totalCollections if len(collections) != expected { t.Fatalf("Expected %d collections, got %d", expected, len(collections)) } @@ -902,7 +1025,7 @@ func TestCollectionImport(t *testing.T) { if err := app.Dao().CollectionQuery().All(&collections); err != nil { t.Fatal(err) } - expected := 8 + expected := totalCollections if len(collections) != expected { t.Fatalf("Expected %d collections, got %d", expected, len(collections)) } @@ -944,7 +1067,7 @@ func TestCollectionImport(t *testing.T) { if err := app.Dao().CollectionQuery().All(&collections); err != nil { t.Fatal(err) } - expected := 8 + expected := totalCollections if len(collections) != expected { t.Fatalf("Expected %d collections, got %d", expected, len(collections)) } @@ -997,7 +1120,7 @@ func TestCollectionImport(t *testing.T) { if err := app.Dao().CollectionQuery().All(&collections); err != nil { t.Fatal(err) } - expected := 11 + expected := totalCollections + 3 if len(collections) != expected { t.Fatalf("Expected %d collections, got %d", expected, len(collections)) } @@ -1084,8 +1207,8 @@ func TestCollectionImport(t *testing.T) { ExpectedEvents: map[string]int{ "OnCollectionsAfterImportRequest": 1, "OnCollectionsBeforeImportRequest": 1, - "OnModelBeforeDelete": 6, - "OnModelAfterDelete": 6, + "OnModelBeforeDelete": 8, + "OnModelAfterDelete": 8, "OnModelBeforeUpdate": 2, "OnModelAfterUpdate": 2, "OnModelBeforeCreate": 1, diff --git a/apis/file.go b/apis/file.go index 8c1cad03..ffdfad5c 100644 --- a/apis/file.go +++ b/apis/file.go @@ -1,6 +1,8 @@ package apis import ( + "fmt" + "github.com/labstack/echo/v5" "github.com/pocketbase/pocketbase/core" "github.com/pocketbase/pocketbase/models" @@ -45,15 +47,27 @@ func (api *fileApi) download(c echo.Context) error { if fileField == nil { return NewNotFoundError("", nil) } + options, _ := fileField.Options.(*schema.FileOptions) + baseFilesPath := record.BaseFilesPath() + + // fetch the original view file field related record + if collection.IsView() { + fileRecord, err := api.app.Dao().FindRecordByViewFile(collection.Id, fileField.Name, filename) + if err != nil { + return NewNotFoundError("", fmt.Errorf("Failed to fetch view file field record: %w", err)) + } + baseFilesPath = fileRecord.BaseFilesPath() + } + fs, err := api.app.NewFilesystem() if err != nil { return NewBadRequestError("Filesystem initialization failure.", err) } defer fs.Close() - originalPath := record.BaseFilesPath() + "/" + filename + originalPath := baseFilesPath + "/" + filename servedPath := originalPath servedName := filename @@ -70,7 +84,7 @@ func (api *fileApi) download(c echo.Context) error { if list.ExistInSlice(oAttrs.ContentType, imageContentTypes) { // add thumb size as file suffix servedName = thumbSize + "_" + filename - servedPath = record.BaseFilesPath() + "/thumbs_" + filename + "/" + servedName + servedPath = baseFilesPath + "/thumbs_" + filename + "/" + servedName // check if the thumb exists: // - if doesn't exist - create a new thumb with the specified thumb size diff --git a/apis/middlewares.go b/apis/middlewares.go index 72ad40ec..b0561dca 100644 --- a/apis/middlewares.go +++ b/apis/middlewares.go @@ -59,9 +59,12 @@ func RequireGuestOnly() echo.MiddlewareFunc { // specifying their names. // // Example: -// apis.RequireRecordAuth() +// +// apis.RequireRecordAuth() +// // Or: -// apis.RequireRecordAuth("users", "supervisors") +// +// apis.RequireRecordAuth("users", "supervisors") // // To restrict the auth record only to the loaded context collection, // use [apis.RequireSameContextRecordAuth()] instead. @@ -83,7 +86,6 @@ func RequireRecordAuth(optCollectionNames ...string) echo.MiddlewareFunc { } } -// // RequireSameContextRecordAuth middleware requires a request to have // a valid record Authorization header. // @@ -261,7 +263,7 @@ func LoadCollectionContext(app core.App, optCollectionTypes ...string) echo.Midd } if len(optCollectionTypes) > 0 && !list.ExistInSlice(collection.Type, optCollectionTypes) { - return NewBadRequestError("Invalid collection type.", nil) + return NewBadRequestError("Unsupported collection type.", nil) } c.Set(ContextCollectionKey, collection) diff --git a/apis/record_crud.go b/apis/record_crud.go index 6ad4b6ab..90b00db6 100644 --- a/apis/record_crud.go +++ b/apis/record_crud.go @@ -26,14 +26,13 @@ func bindRecordCrudApi(app core.App, rg *echo.Group) { subGroup := rg.Group( "/collections/:collection", ActivityLogger(app), - LoadCollectionContext(app), ) - subGroup.GET("/records", api.list) - subGroup.POST("/records", api.create) - subGroup.GET("/records/:id", api.view) - subGroup.PATCH("/records/:id", api.update) - subGroup.DELETE("/records/:id", api.delete) + subGroup.GET("/records", api.list, LoadCollectionContext(app)) + subGroup.GET("/records/:id", api.view, LoadCollectionContext(app)) + subGroup.POST("/records", api.create, LoadCollectionContext(app, models.CollectionTypeBase, models.CollectionTypeAuth)) + subGroup.PATCH("/records/:id", api.update, LoadCollectionContext(app, models.CollectionTypeBase, models.CollectionTypeAuth)) + subGroup.DELETE("/records/:id", api.delete, LoadCollectionContext(app, models.CollectionTypeBase, models.CollectionTypeAuth)) } type recordApi struct { diff --git a/apis/record_crud_test.go b/apis/record_crud_test.go index 107f17a0..130e613d 100644 --- a/apis/record_crud_test.go +++ b/apis/record_crud_test.go @@ -256,7 +256,7 @@ func TestRecordCrudList(t *testing.T) { ExpectedEvents: map[string]int{"OnRecordsListRequest": 1}, }, - // auth collection checks + // auth collection // ----------------------------------------------------------- { Name: "check email visibility as guest", @@ -403,6 +403,63 @@ func TestRecordCrudList(t *testing.T) { }, ExpectedEvents: map[string]int{"OnRecordsListRequest": 1}, }, + + // view collection + // ----------------------------------------------------------- + { + Name: "public view records", + Method: http.MethodGet, + Url: "/api/collections/view2/records?filter=state=false", + ExpectedStatus: 200, + ExpectedContent: []string{ + `"page":1`, + `"perPage":30`, + `"totalPages":1`, + `"totalItems":2`, + `"items":[{`, + `"id":"al1h9ijdeojtsjy"`, + `"id":"imy661ixudk5izi"`, + }, + NotExpectedContent: []string{ + `"created"`, + `"updated"`, + }, + ExpectedEvents: map[string]int{"OnRecordsListRequest": 1}, + }, + { + Name: "guest that doesn't match the view collection list rule", + Method: http.MethodGet, + Url: "/api/collections/view1/records", + ExpectedStatus: 200, + ExpectedContent: []string{ + `"page":1`, + `"perPage":30`, + `"totalPages":0`, + `"totalItems":0`, + `"items":[]`, + }, + ExpectedEvents: map[string]int{"OnRecordsListRequest": 1}, + }, + { + Name: "authenticated record that matches the view collection list rule", + Method: http.MethodGet, + Url: "/api/collections/view1/records", + RequestHeaders: map[string]string{ + // users, test@example.com + "Authorization": "eyJhbGciOiJIUzI1NiJ9.eyJpZCI6IjRxMXhsY2xtZmxva3UzMyIsInR5cGUiOiJhdXRoUmVjb3JkIiwiY29sbGVjdGlvbklkIjoiX3BiX3VzZXJzX2F1dGhfIiwiZXhwIjoyMjA4OTg1MjYxfQ.UwD8JvkbQtXpymT09d7J6fdA0aP9g4FJ1GPh_ggEkzc", + }, + ExpectedStatus: 200, + ExpectedContent: []string{ + `"page":1`, + `"perPage":30`, + `"totalPages":1`, + `"totalItems":1`, + `"items":[{`, + `"id":"84nmscqy84lsi1t"`, + `"bool":true`, + }, + ExpectedEvents: map[string]int{"OnRecordsListRequest": 1}, + }, } for _, scenario := range scenarios { @@ -531,7 +588,7 @@ func TestRecordCrudView(t *testing.T) { ExpectedEvents: map[string]int{"OnRecordViewRequest": 1}, }, - // auth collection checks + // auth collection // ----------------------------------------------------------- { Name: "check email visibility as guest", @@ -629,6 +686,49 @@ func TestRecordCrudView(t *testing.T) { }, ExpectedEvents: map[string]int{"OnRecordViewRequest": 1}, }, + + // view collection + // ----------------------------------------------------------- + { + Name: "public view record", + Method: http.MethodGet, + Url: "/api/collections/view2/records/84nmscqy84lsi1t", + ExpectedStatus: 200, + ExpectedContent: []string{ + `"id":"84nmscqy84lsi1t"`, + `"state":true`, + `"file_many":["`, + `"rel_many":["`, + }, + NotExpectedContent: []string{ + `"created"`, + `"updated"`, + }, + ExpectedEvents: map[string]int{"OnRecordViewRequest": 1}, + }, + { + Name: "guest that doesn't match the view collection view rule", + Method: http.MethodGet, + Url: "/api/collections/view1/records/84nmscqy84lsi1t", + ExpectedStatus: 404, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "authenticated record that matches the view collection view rule", + Method: http.MethodGet, + Url: "/api/collections/view1/records/84nmscqy84lsi1t", + RequestHeaders: map[string]string{ + // users, test@example.com + "Authorization": "eyJhbGciOiJIUzI1NiJ9.eyJpZCI6IjRxMXhsY2xtZmxva3UzMyIsInR5cGUiOiJhdXRoUmVjb3JkIiwiY29sbGVjdGlvbklkIjoiX3BiX3VzZXJzX2F1dGhfIiwiZXhwIjoyMjA4OTg1MjYxfQ.UwD8JvkbQtXpymT09d7J6fdA0aP9g4FJ1GPh_ggEkzc", + }, + ExpectedStatus: 200, + ExpectedContent: []string{ + `"id":"84nmscqy84lsi1t"`, + `"bool":true`, + `"text":"`, + }, + ExpectedEvents: map[string]int{"OnRecordViewRequest": 1}, + }, } for _, scenario := range scenarios { @@ -690,6 +790,13 @@ func TestRecordCrudDelete(t *testing.T) { ExpectedStatus: 404, ExpectedContent: []string{`"data":{}`}, }, + { + Name: "trying to delete a view collection record", + Method: http.MethodDelete, + Url: "/api/collections/view1/records/imy661ixudk5izi", + ExpectedStatus: 400, + ExpectedContent: []string{`"data":{}`}, + }, { Name: "public collection record delete", Method: http.MethodDelete, @@ -885,6 +992,14 @@ func TestRecordCrudCreate(t *testing.T) { ExpectedStatus: 403, ExpectedContent: []string{`"data":{}`}, }, + { + Name: "trying to create a new view collection record", + Method: http.MethodPost, + Url: "/api/collections/view1/records", + Body: strings.NewReader(`{"text":"new"}`), + ExpectedStatus: 400, + ExpectedContent: []string{`"data":{}`}, + }, { Name: "submit nil body", Method: http.MethodPost, @@ -1428,6 +1543,14 @@ func TestRecordCrudUpdate(t *testing.T) { ExpectedStatus: 400, ExpectedContent: []string{`"data":{}`}, }, + { + Name: "trying to update a view collection record", + Method: http.MethodPatch, + Url: "/api/collections/view1/records/imy661ixudk5izi", + Body: strings.NewReader(`{"text":"new"}`), + ExpectedStatus: 400, + ExpectedContent: []string{`"data":{}`}, + }, { Name: "submit nil body", Method: http.MethodPatch, diff --git a/core/base.go b/core/base.go index 20165913..a6f0f858 100644 --- a/core/base.go +++ b/core/base.go @@ -472,7 +472,7 @@ func (app *BaseApp) NewMailClient() mailer.Mailer { // NB! Make sure to call `Close()` on the returned result // after you are done working with it. func (app *BaseApp) NewFilesystem() (*filesystem.System, error) { - if app.settings.S3.Enabled { + if app.settings != nil && app.settings.S3.Enabled { return filesystem.NewS3( app.settings.S3.Bucket, app.settings.S3.Region, diff --git a/daos/collection.go b/daos/collection.go index d057e2d0..f565c37f 100644 --- a/daos/collection.go +++ b/daos/collection.go @@ -129,13 +129,23 @@ func (dao *Dao) DeleteCollection(collection *models.Collection) error { return err } if total := len(result); total > 0 { - return fmt.Errorf("The collection %q has external relation field references (%d).", collection.Name, total) + names := make([]string, 0, len(result)) + for ref := range result { + names = append(names, ref.Name) + } + return fmt.Errorf("The collection %q has external relation field references (%s).", collection.Name, strings.Join(names, ", ")) } return dao.RunInTransaction(func(txDao *Dao) error { - // delete the related records table - if err := txDao.DeleteTable(collection.Name); err != nil { - return err + // delete the related view or records table + if collection.IsView() { + if err := txDao.DeleteView(collection.Name); err != nil { + return err + } + } else { + if err := txDao.DeleteTable(collection.Name); err != nil { + return err + } } return txDao.Delete(collection) @@ -163,13 +173,18 @@ func (dao *Dao) SaveCollection(collection *models.Collection) error { collection.Type = models.CollectionTypeBase } - // persist the collection model - if err := txDao.Save(collection); err != nil { - return err - } + switch collection.Type { + case models.CollectionTypeView: + return txDao.saveViewCollection(collection, oldCollection) + default: + // persist the collection model + if err := txDao.Save(collection); err != nil { + return err + } - // sync the changes with the related records table - return txDao.SyncRecordTableSchema(collection, oldCollection) + // sync the changes with the related records table + return txDao.SyncRecordTableSchema(collection, oldCollection) + } }) } @@ -274,8 +289,14 @@ func (dao *Dao) ImportCollections( continue // exist } - if err := txDao.DeleteTable(existing.Name); err != nil { - return err + if existing.IsView() { + if err := txDao.DeleteView(existing.Name); err != nil { + return err + } + } else { + if err := txDao.DeleteTable(existing.Name); err != nil { + return err + } } } } @@ -283,11 +304,58 @@ func (dao *Dao) ImportCollections( // sync the upserted collections with the related records table for _, imported := range importedCollections { existing := mappedExisting[imported.GetId()] - if err := txDao.SyncRecordTableSchema(imported, existing); err != nil { - return err + + if imported.IsView() { + if err := txDao.saveViewCollection(imported, existing); err != nil { + return err + } + } else { + if err := txDao.SyncRecordTableSchema(imported, existing); err != nil { + return err + } } } return nil }) } + +// saveViewCollection persists the provided View collection changes: +// - deletes the old related SQL view (if any) +// - creates a new SQL view with the latest newCollection.Options.Query +// - generates a new schema based on newCollection.Options.Query +// - updates newCollection.Schema based on the generated view table info and query +// - saves the newCollection +// +// This method returns an error if newCollection is not a "view". +func (dao *Dao) saveViewCollection(newCollection *models.Collection, oldCollection *models.Collection) error { + if newCollection.IsAuth() { + return errors.New("not a view collection") + } + + return dao.RunInTransaction(func(txDao *Dao) error { + query := newCollection.ViewOptions().Query + + // generate collection schema from the query + schema, err := txDao.CreateViewSchema(query) + if err != nil { + return err + } + + // delete old renamed view + if oldCollection != nil && newCollection.Name != oldCollection.Name { + if err := txDao.DeleteView(oldCollection.Name); err != nil { + return err + } + } + + // (re)create the view + if err := txDao.SaveView(newCollection.Name, query); err != nil { + return err + } + + newCollection.Schema = schema + + return txDao.Save(newCollection) + }) +} diff --git a/daos/collection_test.go b/daos/collection_test.go index 6bb4f8d5..9ac51010 100644 --- a/daos/collection_test.go +++ b/daos/collection_test.go @@ -45,16 +45,16 @@ func TestFindCollectionsByType(t *testing.T) { hasErr := err != nil if hasErr != scenario.expectError { - t.Errorf("(%d) Expected hasErr to be %v, got %v (%v)", i, scenario.expectError, hasErr, err) + t.Errorf("[%d] Expected hasErr to be %v, got %v (%v)", i, scenario.expectError, hasErr, err) } if len(collections) != scenario.expectTotal { - t.Errorf("(%d) Expected %d collections, got %d", i, scenario.expectTotal, len(collections)) + t.Errorf("[%d] Expected %d collections, got %d", i, scenario.expectTotal, len(collections)) } for _, c := range collections { if c.Type != scenario.collectionType { - t.Errorf("(%d) Expected collection with type %s, got %s: \n%v", i, scenario.collectionType, c.Type, c) + t.Errorf("[%d] Expected collection with type %s, got %s: \n%v", i, scenario.collectionType, c.Type, c) } } } @@ -80,11 +80,11 @@ func TestFindCollectionByNameOrId(t *testing.T) { hasErr := err != nil if hasErr != scenario.expectError { - t.Errorf("(%d) Expected hasErr to be %v, got %v (%v)", i, scenario.expectError, hasErr, err) + t.Errorf("[%d] Expected hasErr to be %v, got %v (%v)", i, scenario.expectError, hasErr, err) } if model != nil && model.Id != scenario.nameOrId && !strings.EqualFold(model.Name, scenario.nameOrId) { - t.Errorf("(%d) Expected model with identifier %s, got %v", i, scenario.nameOrId, model) + t.Errorf("[%d] Expected model with identifier %s, got %v", i, scenario.nameOrId, model) } } } @@ -108,7 +108,7 @@ func TestIsCollectionNameUnique(t *testing.T) { for i, scenario := range scenarios { result := app.Dao().IsCollectionNameUnique(scenario.name, scenario.excludeId) if result != scenario.expected { - t.Errorf("(%d) Expected %v, got %v", i, scenario.expected, result) + t.Errorf("[%d] Expected %v, got %v", i, scenario.expected, result) } } } @@ -155,7 +155,7 @@ func TestFindCollectionReferences(t *testing.T) { } for i, f := range fields { if !list.ExistInSlice(f.Name, expectedFields) { - t.Fatalf("(%d) Didn't expect field %v", i, f) + t.Fatalf("[%d] Didn't expect field %v", i, f) } } } @@ -165,21 +165,29 @@ func TestDeleteCollection(t *testing.T) { app, _ := tests.NewTestApp() defer app.Cleanup() - c0 := &models.Collection{} - c1, err := app.Dao().FindCollectionByNameOrId("clients") + colEmpty := &models.Collection{} + + colAuth, err := app.Dao().FindCollectionByNameOrId("clients") if err != nil { t.Fatal(err) } - c2, err := app.Dao().FindCollectionByNameOrId("demo2") + + colReferenced, err := app.Dao().FindCollectionByNameOrId("demo2") if err != nil { t.Fatal(err) } - c3, err := app.Dao().FindCollectionByNameOrId("demo1") + + colSystem, err := app.Dao().FindCollectionByNameOrId("demo3") if err != nil { t.Fatal(err) } - c3.System = true - if err := app.Dao().Save(c3); err != nil { + colSystem.System = true + if err := app.Dao().Save(colSystem); err != nil { + t.Fatal(err) + } + + colView, err := app.Dao().FindCollectionByNameOrId("view1") + if err != nil { t.Fatal(err) } @@ -187,18 +195,28 @@ func TestDeleteCollection(t *testing.T) { model *models.Collection expectError bool }{ - {c0, true}, - {c1, false}, - {c2, true}, // is part of a reference - {c3, true}, // system + {colEmpty, true}, + {colAuth, false}, + {colReferenced, true}, + {colSystem, true}, + {colView, false}, } - for i, scenario := range scenarios { - err := app.Dao().DeleteCollection(scenario.model) - hasErr := err != nil + for i, s := range scenarios { + err := app.Dao().DeleteCollection(s.model) - if hasErr != scenario.expectError { - t.Errorf("(%d) Expected hasErr %v, got %v", i, scenario.expectError, hasErr) + hasErr := err != nil + if hasErr != s.expectError { + t.Errorf("[%d] Expected hasErr %v, got %v (%v)", i, s.expectError, hasErr, err) + continue + } + + if hasErr { + continue + } + + if app.Dao().HasTable(s.model.Name) { + t.Errorf("[%d] Expected table/view %s to be deleted", i, s.model.Name) } } } @@ -244,7 +262,7 @@ func TestSaveCollectionCreate(t *testing.T) { } for i, c := range columns { if !list.ExistInSlice(c, expectedColumns) { - t.Fatalf("(%d) Didn't expect record column %s", i, c) + t.Fatalf("[%d] Didn't expect record column %s", i, c) } } } @@ -282,12 +300,14 @@ func TestSaveCollectionUpdate(t *testing.T) { } for i, c := range columns { if !list.ExistInSlice(c, expectedColumns) { - t.Fatalf("(%d) Didn't expect record column %s", i, c) + t.Fatalf("[%d] Didn't expect record column %s", i, c) } } } func TestImportCollections(t *testing.T) { + totalCollections := 10 + scenarios := []struct { name string jsonData string @@ -302,7 +322,7 @@ func TestImportCollections(t *testing.T) { name: "empty collections", jsonData: `[]`, expectError: true, - expectCollectionsCount: 8, + expectCollectionsCount: totalCollections, }, { name: "minimal collection import", @@ -312,7 +332,7 @@ func TestImportCollections(t *testing.T) { ]`, deleteMissing: false, expectError: false, - expectCollectionsCount: 10, + expectCollectionsCount: totalCollections + 2, }, { name: "minimal collection import + failed beforeRecordsSync", @@ -324,7 +344,7 @@ func TestImportCollections(t *testing.T) { }, deleteMissing: false, expectError: true, - expectCollectionsCount: 8, + expectCollectionsCount: totalCollections, }, { name: "minimal collection import + successful beforeRecordsSync", @@ -336,7 +356,7 @@ func TestImportCollections(t *testing.T) { }, deleteMissing: false, expectError: false, - expectCollectionsCount: 9, + expectCollectionsCount: totalCollections + 1, }, { name: "new + update + delete system collection", @@ -372,7 +392,7 @@ func TestImportCollections(t *testing.T) { ]`, deleteMissing: true, expectError: true, - expectCollectionsCount: 8, + expectCollectionsCount: totalCollections, }, { name: "new + update + delete non-system collection", @@ -442,11 +462,19 @@ func TestImportCollections(t *testing.T) { "type":"bool" } ] + }, + { + "id": "test_new_view", + "name": "new_view", + "type": "view", + "options": { + "query": "select id from demo2" + } } ]`, deleteMissing: true, expectError: false, - expectCollectionsCount: 3, + expectCollectionsCount: 4, }, { name: "test with deleteMissing: false", @@ -501,7 +529,7 @@ func TestImportCollections(t *testing.T) { ]`, deleteMissing: false, expectError: false, - expectCollectionsCount: 9, + expectCollectionsCount: totalCollections + 1, afterTestFunc: func(testApp *tests.TestApp, resultCollections []*models.Collection) { expectedCollectionFields := map[string]int{ "nologin": 1, @@ -509,7 +537,7 @@ func TestImportCollections(t *testing.T) { "demo2": 2, "demo3": 2, "demo4": 11, - "demo5": 5, + "demo5": 6, "new_import": 1, } for name, expectedCount := range expectedCollectionFields { diff --git a/daos/record.go b/daos/record.go index 4e61870d..bbf53891 100644 --- a/daos/record.go +++ b/daos/record.go @@ -128,7 +128,11 @@ func (dao *Dao) FindRecordsByExpr(collectionNameOrId string, exprs ...dbx.Expres // FindFirstRecordByData returns the first found record matching // the provided key-value pair. -func (dao *Dao) FindFirstRecordByData(collectionNameOrId string, key string, value any) (*models.Record, error) { +func (dao *Dao) FindFirstRecordByData( + collectionNameOrId string, + key string, + value any, +) (*models.Record, error) { collection, err := dao.FindCollectionByNameOrId(collectionNameOrId) if err != nil { return nil, err @@ -396,11 +400,15 @@ func (dao *Dao) cascadeRecordDelete(mainRecord *models.Record, refs map[*models. uniqueJsonEachAlias := "__je__" + security.PseudorandomString(4) for refCollection, fields := range refs { + if refCollection.IsView() { + continue // skip view collections + } + for _, field := range fields { recordTableName := inflector.Columnify(refCollection.Name) prefixedFieldName := recordTableName + "." + inflector.Columnify(field.Name) - // @todo optimize single relation lookup in v0.12+ + // @todo optimize single relation lookup query := dao.RecordQuery(refCollection). Distinct(true). InnerJoin(fmt.Sprintf( diff --git a/daos/table.go b/daos/table.go index b2f11876..c10a2d93 100644 --- a/daos/table.go +++ b/daos/table.go @@ -1,7 +1,10 @@ package daos import ( + "fmt" + "github.com/pocketbase/dbx" + "github.com/pocketbase/pocketbase/models" ) // HasTable checks if a table with the provided name exists (case insensitive). @@ -29,9 +32,28 @@ func (dao *Dao) GetTableColumns(tableName string) ([]string, error) { return columns, err } +// GetTableInfo returns the `table_info` pragma result for the specified table. +func (dao *Dao) GetTableInfo(tableName string) ([]*models.TableInfoRow, error) { + info := []*models.TableInfoRow{} + + err := dao.DB().NewQuery("SELECT * FROM PRAGMA_TABLE_INFO({:tableName})"). + Bind(dbx.Params{"tableName": tableName}). + All(&info) + + return info, err +} + // DeleteTable drops the specified table. +// +// This method is a no-op if a table with the provided name doesn't exist. +// +// Be aware that this method is vulnerable to SQL injection and the +// "tableName" argument must come only from trusted input! func (dao *Dao) DeleteTable(tableName string) error { - _, err := dao.DB().DropTable(tableName).Execute() + _, err := dao.DB().NewQuery(fmt.Sprintf( + "DROP TABLE IF EXISTS {{%s}}", + tableName, + )).Execute() return err } diff --git a/daos/table_test.go b/daos/table_test.go index b3845277..04e8281a 100644 --- a/daos/table_test.go +++ b/daos/table_test.go @@ -3,6 +3,7 @@ package daos_test import ( "context" "database/sql" + "encoding/json" "testing" "time" @@ -28,7 +29,7 @@ func TestHasTable(t *testing.T) { for i, scenario := range scenarios { result := app.Dao().HasTable(scenario.tableName) if result != scenario.expected { - t.Errorf("(%d) Expected %v, got %v", i, scenario.expected, result) + t.Errorf("[%d] Expected %v, got %v", i, scenario.expected, result) } } } @@ -45,21 +46,50 @@ func TestGetTableColumns(t *testing.T) { {"_params", []string{"id", "key", "value", "created", "updated"}}, } - for i, scenario := range scenarios { - columns, _ := app.Dao().GetTableColumns(scenario.tableName) + for i, s := range scenarios { + columns, _ := app.Dao().GetTableColumns(s.tableName) - if len(columns) != len(scenario.expected) { - t.Errorf("(%d) Expected columns %v, got %v", i, scenario.expected, columns) + if len(columns) != len(s.expected) { + t.Errorf("[%d] Expected columns %v, got %v", i, s.expected, columns) + continue } for _, c := range columns { - if !list.ExistInSlice(c, scenario.expected) { - t.Errorf("(%d) Didn't expect column %s", i, c) + if !list.ExistInSlice(c, s.expected) { + t.Errorf("[%d] Didn't expect column %s", i, c) } } } } +func TestGetTableInfo(t *testing.T) { + app, _ := tests.NewTestApp() + defer app.Cleanup() + + scenarios := []struct { + tableName string + expected string + }{ + {"", "[]"}, + {"missing", "[]"}, + { + "_admins", + `[{"PK":1,"Index":0,"Name":"id","Type":"TEXT","NotNull":false,"DefaultValue":null},{"PK":0,"Index":1,"Name":"avatar","Type":"INTEGER","NotNull":true,"DefaultValue":0},{"PK":0,"Index":2,"Name":"email","Type":"TEXT","NotNull":true,"DefaultValue":null},{"PK":0,"Index":3,"Name":"tokenKey","Type":"TEXT","NotNull":true,"DefaultValue":null},{"PK":0,"Index":4,"Name":"passwordHash","Type":"TEXT","NotNull":true,"DefaultValue":null},{"PK":0,"Index":5,"Name":"lastResetSentAt","Type":"TEXT","NotNull":true,"DefaultValue":""},{"PK":0,"Index":6,"Name":"created","Type":"TEXT","NotNull":true,"DefaultValue":""},{"PK":0,"Index":7,"Name":"updated","Type":"TEXT","NotNull":true,"DefaultValue":""}]`, + }, + } + + for i, s := range scenarios { + rows, _ := app.Dao().GetTableInfo(s.tableName) + + raw, _ := json.Marshal(rows) + rawStr := string(raw) + + if rawStr != s.expected { + t.Errorf("[%d] Expected \n%v, \ngot \n%v", i, s.expected, rawStr) + } + } +} + func TestDeleteTable(t *testing.T) { app, _ := tests.NewTestApp() defer app.Cleanup() @@ -69,16 +99,17 @@ func TestDeleteTable(t *testing.T) { expectError bool }{ {"", true}, - {"test", true}, + {"test", false}, // missing tables are ignored {"_admins", false}, {"demo3", false}, } - for i, scenario := range scenarios { - err := app.Dao().DeleteTable(scenario.tableName) + for i, s := range scenarios { + err := app.Dao().DeleteTable(s.tableName) + hasErr := err != nil - if hasErr != scenario.expectError { - t.Errorf("(%d) Expected hasErr %v, got %v", i, scenario.expectError, hasErr) + if hasErr != s.expectError { + t.Errorf("[%d] Expected hasErr %v, got %v", i, s.expectError, hasErr) } } } diff --git a/daos/view.go b/daos/view.go new file mode 100644 index 00000000..41c8c2b2 --- /dev/null +++ b/daos/view.go @@ -0,0 +1,583 @@ +package daos + +import ( + "errors" + "fmt" + "io" + "regexp" + "strings" + + "github.com/pocketbase/dbx" + "github.com/pocketbase/pocketbase/models" + "github.com/pocketbase/pocketbase/models/schema" + "github.com/pocketbase/pocketbase/tools/inflector" + "github.com/pocketbase/pocketbase/tools/list" + "github.com/pocketbase/pocketbase/tools/security" + "github.com/pocketbase/pocketbase/tools/tokenizer" + "github.com/pocketbase/pocketbase/tools/types" +) + +// DeleteView drops the specified view name. +// +// This method is a no-op if a view with the provided name doesn't exist. +// +// Be aware that this method is vulnerable to SQL injection and the +// "name" argument must come only from trusted input! +func (dao *Dao) DeleteView(name string) error { + _, err := dao.DB().NewQuery(fmt.Sprintf( + "DROP VIEW IF EXISTS {{%s}}", + name, + )).Execute() + + return err +} + +// SaveView creates (or updates already existing) persistent SQL view. +// +// Be aware that this method is vulnerable to SQL injection and the +// "selectQuery" argument must come only from trusted input! +func (dao *Dao) SaveView(name string, selectQuery string) error { + return dao.RunInTransaction(func(txDao *Dao) error { + // delete old view (if exists) + if err := txDao.DeleteView(name); err != nil { + return err + } + + trimmed := strings.Trim(selectQuery, ";") + + // try to eagerly detect multiple inline statements + tk := tokenizer.NewFromString(trimmed) + tk.Separators(';') + if queryParts, _ := tk.ScanAll(); len(queryParts) > 1 { + return errors.New("multiple statements are not supported") + } + + // (re)create the view + // + // note: the query is wrapped in a secondary SELECT as a rudimentary + // measure to discourage multiple inline sql statements execution. + viewQuery := fmt.Sprintf("CREATE VIEW {{%s}} AS SELECT * FROM (%s)", name, trimmed) + if _, err := txDao.DB().NewQuery(viewQuery).Execute(); err != nil { + return err + } + + // fetch the view table info to ensure that the view was created + // because missing tables or columns won't return an error + if _, err := txDao.GetTableInfo(name); err != nil { + return err + } + + return nil + }) +} + +// CreateViewSchema creates a new view schema from the provided select query. +// +// There are some caveats: +// - The select query must have an "id" column. +// - Wildcard ("*") columns are not supported to avoid accidentally leaking sensitive data. +func (dao *Dao) CreateViewSchema(selectQuery string) (schema.Schema, error) { + result := schema.NewSchema() + + suggestedFields, err := dao.parseQueryToFields(selectQuery) + if err != nil { + return result, err + } + + // note wrap in a transaction in case the selectQuery contains + // multiple statements allowing us to rollback on any error + txErr := dao.RunInTransaction(func(txDao *Dao) error { + tempView := "_temp_" + security.PseudorandomString(5) + // create a temp view with the provided query + if err := txDao.SaveView(tempView, selectQuery); err != nil { + return err + } + defer txDao.DeleteView(tempView) + + // extract the generated view table info + info, err := txDao.GetTableInfo(tempView) + if err != nil { + return err + } + + var hasId bool + + for _, row := range info { + if row.Name == schema.FieldNameId { + hasId = true + } + + if list.ExistInSlice(row.Name, schema.BaseModelFieldNames()) { + continue // skip base model fields since they are not part of the schema + } + + var field *schema.SchemaField + + if f, ok := suggestedFields[row.Name]; ok { + field = f.field + } else { + field = defaultViewField(row.Name) + } + + result.AddField(field) + } + + if !hasId { + return errors.New("missing required id column (you ca use `(ROW_NUMBER() OVER()) as id` if you don't have one)") + } + + return nil + }) + + return result, txErr +} + +// FindRecordByViewFile returns the original models.Record of the +// provided view collection file. +func (dao *Dao) FindRecordByViewFile( + viewCollectionNameOrId string, + fileFieldName string, + filename string, +) (*models.Record, error) { + view, err := dao.FindCollectionByNameOrId(viewCollectionNameOrId) + if err != nil { + return nil, err + } + + if !view.IsView() { + return nil, errors.New("not a view collection") + } + + var findFirstNonViewQueryFileField func(int) (*queryField, error) + findFirstNonViewQueryFileField = func(level int) (*queryField, error) { + // check the level depth to prevent infinite circular recursion + // (the limit is arbitrary and may change in the future) + if level > 5 { + return nil, errors.New("reached the max recursion level of view collection file field queries") + } + + queryFields, err := dao.parseQueryToFields(view.ViewOptions().Query) + if err != nil { + return nil, err + } + + for _, item := range queryFields { + if item.collection == nil || + item.original == nil || + item.field.Name != fileFieldName { + continue + } + + if item.collection.IsView() { + view = item.collection + fileFieldName = item.original.Name + return findFirstNonViewQueryFileField(level + 1) + } + + return item, nil + } + + return nil, errors.New("no query file field found") + } + + qf, err := findFirstNonViewQueryFileField(1) + if err != nil { + return nil, err + } + + cleanFieldName := inflector.Columnify(qf.original.Name) + + row := dbx.NullStringMap{} + + err = dao.RecordQuery(qf.collection). + InnerJoin(fmt.Sprintf( + // note: the case is used to normalize the value access + `json_each(CASE WHEN json_valid([[%s]]) THEN [[%s]] ELSE json_array([[%s]]) END) as {{_je_file}}`, + cleanFieldName, cleanFieldName, cleanFieldName, + ), dbx.HashExp{"_je_file.value": filename}). + Limit(1). + One(row) + if err != nil { + return nil, err + } + + return models.NewRecordFromNullStringMap(qf.collection, row), nil +} + +// ------------------------------------------------------------------- +// Raw query to schema helpers +// ------------------------------------------------------------------- + +type queryField struct { + // field is the final resolved field. + field *schema.SchemaField + + // collection refers to the original field's collection model. + // It could be nil if the found query field is not from a collection schema. + collection *models.Collection + + // original is the original found collection field. + // It could be nil if the found query field is not from a collection schema. + original *schema.SchemaField +} + +func defaultViewField(name string) *schema.SchemaField { + return &schema.SchemaField{ + Name: name, + Type: schema.FieldTypeJson, + } +} + +func (dao *Dao) parseQueryToFields(selectQuery string) (map[string]*queryField, error) { + p := new(identifiersParser) + if err := p.parse(selectQuery); err != nil { + return nil, err + } + + collections, err := dao.findCollectionsByIdentifiers(p.tables) + if err != nil { + return nil, err + } + + result := make(map[string]*queryField, len(p.columns)) + + var mainTable identifier + + if len(p.tables) > 0 { + mainTable = p.tables[0] + } + + for _, col := range p.columns { + colLower := strings.ToLower(col.original) + + // numeric expression cast + if strings.Contains(colLower, "(") && + (strings.HasPrefix(colLower, "count(") || + strings.HasPrefix(colLower, "total(") || + strings.Contains(colLower, " as numeric") || + strings.Contains(colLower, " as real") || + strings.Contains(colLower, " as int") || + strings.Contains(colLower, " as integer") || + strings.Contains(colLower, " as decimal")) { + result[col.alias] = &queryField{ + field: &schema.SchemaField{ + Name: col.alias, + Type: schema.FieldTypeNumber, + }, + } + continue + } + + parts := strings.Split(col.original, ".") + + var fieldName string + var collection *models.Collection + var isMainTableField bool + + if len(parts) == 2 { + fieldName = parts[1] + collection = collections[parts[0]] + isMainTableField = parts[0] == mainTable.alias + } else { + fieldName = parts[0] + collection = collections[mainTable.alias] + isMainTableField = true + } + + // fallback to the default field if the found column is not from a collection schema + if collection == nil { + result[col.alias] = &queryField{ + field: defaultViewField(col.alias), + } + continue + } + + if fieldName == "*" { + return nil, errors.New("dynamic column names are not supported") + } + + // find the first field by name (case insensitive) + var field *schema.SchemaField + for _, f := range collection.Schema.Fields() { + if strings.EqualFold(f.Name, fieldName) { + field = f + break + } + } + + if field != nil { + clone := *field + clone.Name = col.alias + result[col.alias] = &queryField{ + field: &clone, + collection: collection, + original: field, + } + continue + } + + if fieldName == schema.FieldNameId && !isMainTableField { + // convert to relation since it is a direct id reference to non-maintable collection + result[col.alias] = &queryField{ + field: &schema.SchemaField{ + Name: col.alias, + Type: schema.FieldTypeRelation, + Options: &schema.RelationOptions{ + MaxSelect: types.Pointer(1), + CollectionId: collection.Id, + }, + }, + collection: collection, + } + } else if fieldName == schema.FieldNameCreated || fieldName == schema.FieldNameUpdated { + result[col.alias] = &queryField{ + field: &schema.SchemaField{ + Name: col.alias, + Type: schema.FieldTypeDate, + }, + collection: collection, + } + } else if fieldName == schema.FieldNameUsername && collection.IsAuth() { + result[col.alias] = &queryField{ + field: &schema.SchemaField{ + Name: col.alias, + Type: schema.FieldTypeText, + }, + collection: collection, + } + } else if fieldName == schema.FieldNameEmail && collection.IsAuth() { + result[col.alias] = &queryField{ + field: &schema.SchemaField{ + Name: col.alias, + Type: schema.FieldTypeEmail, + }, + collection: collection, + } + } else if (fieldName == schema.FieldNameVerified || fieldName == schema.FieldNameEmailVisibility) && collection.IsAuth() { + result[col.alias] = &queryField{ + field: &schema.SchemaField{ + Name: col.alias, + Type: schema.FieldTypeBool, + }, + collection: collection, + } + } else { + result[col.alias] = &queryField{ + field: defaultViewField(col.alias), + collection: collection, + } + } + } + + return result, nil +} + +func (dao *Dao) findCollectionsByIdentifiers(tables []identifier) (map[string]*models.Collection, error) { + names := make([]any, 0, len(tables)) + + for _, table := range tables { + if strings.Contains(table.alias, "(") { + continue // skip expressions + } + names = append(names, table.original) + } + + if len(names) == 0 { + return nil, nil + } + + result := make(map[string]*models.Collection, len(names)) + collections := make([]*models.Collection, 0, len(names)) + + err := dao.CollectionQuery(). + AndWhere(dbx.In("name", names...)). + All(&collections) + if err != nil { + return nil, err + } + + for _, table := range tables { + for _, collection := range collections { + if collection.Name == table.original { + result[table.alias] = collection + } + } + } + + return result, nil +} + +// ------------------------------------------------------------------- +// Raw query identifiers parser +// ------------------------------------------------------------------- + +var joinReplaceRegex = regexp.MustCompile(`(?im)\s+(inner join|outer join|left join|right join|join)\s+?`) +var discardReplaceRegex = regexp.MustCompile(`(?im)\s+(where|group by|having|order|limit|with)\s+?`) +var commentsReplaceRegex = regexp.MustCompile(`(?m)(\/\*[\s\S]+\*\/)|(--.+$)`) + +type identifier struct { + original string + alias string +} + +type identifiersParser struct { + columns []identifier + tables []identifier +} + +func (p *identifiersParser) parse(selectQuery string) error { + str := strings.Trim(selectQuery, ";") + str = joinReplaceRegex.ReplaceAllString(str, " _join_ ") + str = discardReplaceRegex.ReplaceAllString(str, " _discard_ ") + str = commentsReplaceRegex.ReplaceAllString(str, "") + + tk := tokenizer.NewFromString(str) + tk.Separators(',', ' ', '\n', '\t') + tk.KeepSeparator(true) + + var skip bool + var partType string + var activeBuilder *strings.Builder + var selectParts strings.Builder + var fromParts strings.Builder + var joinParts strings.Builder + + for { + token, err := tk.Scan() + if err != nil { + if err != io.EOF { + return err + } + break + } + + trimmed := strings.ToLower(strings.TrimSpace(token)) + + switch trimmed { + case "select": + skip = false + partType = "select" + activeBuilder = &selectParts + case "from": + skip = false + partType = "from" + activeBuilder = &fromParts + case "_join_": + skip = false + + // the previous part was also a join + if partType == "join" { + joinParts.WriteString(",") + } + + partType = "join" + activeBuilder = &joinParts + case "_discard_": + // do nothing... + skip = true + default: + isJoin := partType == "join" + + if isJoin && trimmed == "on" { + skip = true + } + + if !skip && activeBuilder != nil { + activeBuilder.WriteString(" ") + activeBuilder.WriteString(token) + } + } + } + + selects, err := extractIdentifiers(selectParts.String()) + if err != nil { + return err + } + + froms, err := extractIdentifiers(fromParts.String()) + if err != nil { + return err + } + + joins, err := extractIdentifiers(joinParts.String()) + if err != nil { + return err + } + + p.columns = selects + p.tables = froms + p.tables = append(p.tables, joins...) + + return nil +} + +func extractIdentifiers(rawExpression string) ([]identifier, error) { + rawTk := tokenizer.NewFromString(rawExpression) + rawTk.Separators(',') + + rawIdentifiers, err := rawTk.ScanAll() + if err != nil { + return nil, err + } + + result := make([]identifier, 0, len(rawIdentifiers)) + + for _, rawIdentifier := range rawIdentifiers { + tk := tokenizer.NewFromString(rawIdentifier) + tk.Separators(' ', '\n', '\t') + + parts, err := tk.ScanAll() + if err != nil { + return nil, err + } + + resolved, err := identifierFromParts(parts) + if err != nil { + return nil, err + } + + result = append(result, resolved) + } + + return result, nil +} + +func identifierFromParts(parts []string) (identifier, error) { + var result identifier + + switch len(parts) { + case 3: + if !strings.EqualFold(parts[1], "as") { + return result, fmt.Errorf(`invalid identifier part - expected "as", got %v`, parts[1]) + } + + result.original = parts[0] + result.alias = parts[2] + case 2: + result.original = parts[0] + result.alias = parts[1] + case 1: + subParts := strings.Split(parts[0], ".") + result.original = parts[0] + result.alias = subParts[len(subParts)-1] + default: + return result, fmt.Errorf(`invalid identifier parts %v`, parts) + } + + result.original = trimRawIdentifier(result.original) + result.alias = trimRawIdentifier(result.alias) + + return result, nil +} + +func trimRawIdentifier(rawIdentifier string) string { + const trimChars = "`\"[];" + + parts := strings.Split(rawIdentifier, ".") + + for i := range parts { + parts[i] = strings.Trim(parts[i], trimChars) + } + + return strings.Join(parts, ".") +} diff --git a/daos/view_test.go b/daos/view_test.go new file mode 100644 index 00000000..1585f1aa --- /dev/null +++ b/daos/view_test.go @@ -0,0 +1,539 @@ +package daos_test + +import ( + "encoding/json" + "fmt" + "testing" + + "github.com/pocketbase/pocketbase/models" + "github.com/pocketbase/pocketbase/models/schema" + "github.com/pocketbase/pocketbase/tests" + "github.com/pocketbase/pocketbase/tools/list" +) + +func TestDeleteView(t *testing.T) { + app, _ := tests.NewTestApp() + defer app.Cleanup() + + scenarios := []struct { + viewName string + expectError bool + }{ + {"", true}, + {"demo1", true}, // not a view table + {"missing", false}, // missing or already deleted + {"view1", false}, // existing + {"VieW1", false}, // view names are case insensitives + } + + for i, s := range scenarios { + err := app.Dao().DeleteView(s.viewName) + + hasErr := err != nil + if hasErr != s.expectError { + t.Errorf("[%d - %q] Expected hasErr %v, got %v (%v)", i, s.viewName, s.expectError, hasErr, err) + } + } +} + +func TestSaveView(t *testing.T) { + app, _ := tests.NewTestApp() + defer app.Cleanup() + + scenarios := []struct { + scenarioName string + viewName string + query string + expectError bool + expectColumns []string + }{ + { + "empty name and query", + "", + "", + true, + nil, + }, + { + "empty name", + "", + "select * from _admins", + true, + nil, + }, + { + "empty query", + "123Test", + "", + true, + nil, + }, + { + "invalid query", + "123Test", + "123 456", + true, + nil, + }, + { + "missing table", + "123Test", + "select * from missing", + true, + nil, + }, + { + "non select query", + "123Test", + "drop table _admins", + true, + nil, + }, + { + "multiple select queries", + "123Test", + "select *, count(id) as c from _admins; select * from demo1;", + true, + nil, + }, + { + "try to break the parent parenthesis", + "123Test", + "select *, count(id) as c from `_admins`)", + true, + nil, + }, + { + "simple select query (+ trimmed semicolon)", + "123Test", + ";select *, count(id) as c from _admins;", + false, + []string{ + "id", "created", "updated", + "passwordHash", "tokenKey", "email", + "lastResetSentAt", "avatar", "c", + }, + }, + { + "update old view with new query", + "123Test", + "select 1 as test from _admins", + false, + []string{"test"}, + }, + } + + for _, s := range scenarios { + err := app.Dao().SaveView(s.viewName, s.query) + + hasErr := err != nil + if hasErr != s.expectError { + t.Errorf("[%s] Expected hasErr %v, got %v (%v)", s.scenarioName, s.expectError, hasErr, err) + continue + } + + if hasErr { + continue + } + + infoRows, err := app.Dao().GetTableInfo(s.viewName) + if err != nil { + t.Errorf("[%s] Failed to fetch table info for %s: %v", s.scenarioName, s.viewName, err) + continue + } + + if len(s.expectColumns) != len(infoRows) { + t.Errorf("[%s] Expected %d columns, got %d", s.scenarioName, len(s.expectColumns), len(infoRows)) + continue + } + + for _, row := range infoRows { + if !list.ExistInSlice(row.Name, s.expectColumns) { + t.Errorf("[%s] Missing %q column in %v", s.scenarioName, row.Name, s.expectColumns) + } + } + } +} + +func TestCreateViewSchema(t *testing.T) { + app, _ := tests.NewTestApp() + defer app.Cleanup() + + scenarios := []struct { + name string + query string + expectError bool + expectFields map[string]string // name-type pairs + }{ + { + "empty query", + "", + true, + nil, + }, + { + "invalid query", + "test 123456", + true, + nil, + }, + { + "missing table", + "select * from missing", + true, + nil, + }, + { + "query with wildcard column", + "select a.id, a.* from demo1 a", + true, + nil, + }, + { + "query without id", + "select text, url, created, updated from demo1", + true, + nil, + }, + { + "query with comments", + ` + select + -- test single line + id, + text, + /* multi + line comment */ + url, created, updated from demo1 + `, + false, + map[string]string{ + "text": schema.FieldTypeText, + "url": schema.FieldTypeUrl, + }, + }, + { + "query with all fields and quoted identifiers", + ` + select + "id", + "created", + "updated", + [text], + ` + "`bool`" + `, + "url", + "select_one", + "select_many", + "file_one", + "demo1"."file_many", + ` + "`demo1`." + "`number`" + ` number_alias, + "email", + "datetime", + "json", + "rel_one", + "rel_many" + from demo1 + `, + false, + map[string]string{ + "text": schema.FieldTypeText, + "bool": schema.FieldTypeBool, + "url": schema.FieldTypeUrl, + "select_one": schema.FieldTypeSelect, + "select_many": schema.FieldTypeSelect, + "file_one": schema.FieldTypeFile, + "file_many": schema.FieldTypeFile, + "number_alias": schema.FieldTypeNumber, + "email": schema.FieldTypeEmail, + "datetime": schema.FieldTypeDate, + "json": schema.FieldTypeJson, + "rel_one": schema.FieldTypeRelation, + "rel_many": schema.FieldTypeRelation, + }, + }, + { + "query with indirect relations fields", + "select a.id, b.id as bid, b.created from demo1 as a left join demo2 b", + false, + map[string]string{ + "bid": schema.FieldTypeRelation, + }, + }, + { + "query with multiple froms, joins and style of aliasses", + ` + select + a.id as id, + b.id as bid, + lj.id cid, + ij.id as did, + a.bool, + _admins.id as eid, + _admins.email + from demo1 a, demo2 as b + left join demo3 lj on lj.id = 123 + inner join demo4 as ij on ij.id = 123 + join _admins + where 1=1 + group by a.id + limit 10 + `, + false, + map[string]string{ + "bid": schema.FieldTypeRelation, + "cid": schema.FieldTypeRelation, + "did": schema.FieldTypeRelation, + "bool": schema.FieldTypeBool, + "eid": schema.FieldTypeJson, // not from collection + "email": schema.FieldTypeJson, // not from collection + }, + }, + { + "query with numeric casts", + `select + a.id, + count(a.id) count, + cast(a.id as int) cast_int, + cast(a.id as integer) cast_integer, + cast(a.id as real) cast_real, + cast(a.id as decimal) cast_decimal, + cast(a.id as numeric) cast_numeric, + avg(a.id) avg, + sum(a.id) sum, + total(a.id) total, + min(a.id) min, + max(a.id) max + from demo1 a`, + false, + map[string]string{ + "count": schema.FieldTypeNumber, + "total": schema.FieldTypeNumber, + "cast_int": schema.FieldTypeNumber, + "cast_integer": schema.FieldTypeNumber, + "cast_real": schema.FieldTypeNumber, + "cast_decimal": schema.FieldTypeNumber, + "cast_numeric": schema.FieldTypeNumber, + // json because they are nullable + "sum": schema.FieldTypeJson, + "avg": schema.FieldTypeJson, + "min": schema.FieldTypeJson, + "max": schema.FieldTypeJson, + }, + }, + { + "query with reserved auth collection fields", + ` + select + a.id, + a.username, + a.email, + a.emailVisibility, + a.verified, + demo1.id relid + from users a + left join demo1 + `, + false, + map[string]string{ + "username": schema.FieldTypeText, + "email": schema.FieldTypeEmail, + "emailVisibility": schema.FieldTypeBool, + "verified": schema.FieldTypeBool, + "relid": schema.FieldTypeRelation, + }, + }, + { + "query with unknown fields and aliases", + `select + id, + id as id2, + text as text_alias, + url as url_alias, + "demo1"."bool" as bool_alias, + number as number_alias, + created created_alias, + updated updated_alias, + 123 as custom + from demo1 + `, + false, + map[string]string{ + "id2": schema.FieldTypeJson, + "text_alias": schema.FieldTypeText, + "url_alias": schema.FieldTypeUrl, + "bool_alias": schema.FieldTypeBool, + "number_alias": schema.FieldTypeNumber, + "created_alias": schema.FieldTypeDate, + "updated_alias": schema.FieldTypeDate, + "custom": schema.FieldTypeJson, + }, + }, + } + + for _, s := range scenarios { + result, err := app.Dao().CreateViewSchema(s.query) + + hasErr := err != nil + if hasErr != s.expectError { + t.Errorf("[%s] Expected hasErr %v, got %v (%v)", s.name, s.expectError, hasErr, err) + continue + } + + if hasErr { + continue + } + + if len(s.expectFields) != len(result.Fields()) { + serialized, _ := json.Marshal(result) + t.Errorf("[%s] Expected %d fields, got %d: \n%s", s.name, len(s.expectFields), len(result.Fields()), serialized) + continue + } + + for name, typ := range s.expectFields { + field := result.GetFieldByName(name) + + if field == nil { + t.Errorf("[%s] Expected to find field %s, got nil", s.name, name) + continue + } + + if field.Type != typ { + t.Errorf("[%s] Expected field %s to be %q, got %s", s.name, name, typ, field.Type) + continue + } + } + } +} + +func TestFindRecordByViewFile(t *testing.T) { + app, _ := tests.NewTestApp() + defer app.Cleanup() + + prevCollection, err := app.Dao().FindCollectionByNameOrId("demo1") + if err != nil { + t.Fatal(err) + } + + totalLevels := 6 + + // create collection view mocks + fileOneAlias := "file_one one0" + fileManyAlias := "file_many many0" + mockCollections := make([]*models.Collection, 0, totalLevels) + for i := 0; i <= totalLevels; i++ { + view := new(models.Collection) + view.Type = models.CollectionTypeView + view.Name = fmt.Sprintf("_test_view%d", i) + view.SetOptions(&models.CollectionViewOptions{ + Query: fmt.Sprintf( + "select id, %s, %s from %s", + fileOneAlias, + fileManyAlias, + prevCollection.Name, + ), + }) + + // save view + if err := app.Dao().SaveCollection(view); err != nil { + t.Fatalf("Failed to save view%d: %v", i, err) + } + + mockCollections = append(mockCollections, view) + prevCollection = view + fileOneAlias = fmt.Sprintf("one%d one%d", i, i+1) + fileManyAlias = fmt.Sprintf("many%d many%d", i, i+1) + } + + fileOneName := "test_d61b33QdDU.txt" + fileManyName := "test_QZFjKjXchk.txt" + expectedRecordId := "84nmscqy84lsi1t" + + scenarios := []struct { + name string + collectionNameOrId string + fileFieldName string + filename string + expectError bool + expectRecordId string + }{ + { + "missing collection", + "missing", + "a", + fileOneName, + true, + "", + }, + { + "non-view collection", + "demo1", + "file_one", + fileOneName, + true, + "", + }, + { + "view collection after the max recursion limit", + mockCollections[totalLevels-1].Name, + fmt.Sprintf("one%d", totalLevels-1), + fileOneName, + true, + "", + }, + { + "first view collection (single file)", + mockCollections[0].Name, + "one0", + fileOneName, + false, + expectedRecordId, + }, + { + "first view collection (many files)", + mockCollections[0].Name, + "many0", + fileManyName, + false, + expectedRecordId, + }, + + { + "last view collection before the recursion limit (single file)", + mockCollections[totalLevels-2].Name, + fmt.Sprintf("one%d", totalLevels-2), + fileOneName, + false, + expectedRecordId, + }, + { + "last view collection before the recursion limit (many files)", + mockCollections[totalLevels-2].Name, + fmt.Sprintf("many%d", totalLevels-2), + fileManyName, + false, + expectedRecordId, + }, + } + + for _, s := range scenarios { + record, err := app.Dao().FindRecordByViewFile( + s.collectionNameOrId, + s.fileFieldName, + s.filename, + ) + + hasErr := err != nil + if hasErr != s.expectError { + t.Errorf("[%s] Expected hasErr %v, got %v (%v)", s.name, s.expectError, hasErr, err) + continue + } + + if hasErr { + continue + } + + if record.Id != s.expectRecordId { + t.Errorf("[%s] Expected recordId %q, got %q", s.name, s.expectRecordId, record.Id) + } + } +} diff --git a/forms/collection_upsert.go b/forms/collection_upsert.go index 1db1cf2f..aa100d4a 100644 --- a/forms/collection_upsert.go +++ b/forms/collection_upsert.go @@ -69,7 +69,7 @@ func NewCollectionUpsert(app core.App, collection *models.Collection) *Collectio } clone, _ := form.collection.Schema.Clone() - if clone != nil { + if clone != nil && form.Type != models.CollectionTypeView { form.Schema = *clone } else { form.Schema = schema.Schema{} @@ -86,6 +86,16 @@ func (form *CollectionUpsert) SetDao(dao *daos.Dao) { // Validate makes the form validatable by implementing [validation.Validatable] interface. func (form *CollectionUpsert) Validate() error { isAuth := form.Type == models.CollectionTypeAuth + isView := form.Type == models.CollectionTypeView + + // generate schema from the query (overwriting any explicit user defined schema) + if isView { + options := models.CollectionViewOptions{} + if err := decodeOptions(form.Options, &options); err != nil { + return err + } + form.Schema, _ = form.dao.CreateViewSchema(options.Query) + } return validation.ValidateStruct(form, validation.Field( @@ -104,7 +114,11 @@ func (form *CollectionUpsert) Validate() error { validation.Field( &form.Type, validation.Required, - validation.In(models.CollectionTypeAuth, models.CollectionTypeBase), + validation.In( + models.CollectionTypeBase, + models.CollectionTypeAuth, + models.CollectionTypeView, + ), validation.By(form.ensureNoTypeChange), ), validation.Field( @@ -115,23 +129,32 @@ func (form *CollectionUpsert) Validate() error { validation.By(form.ensureNoSystemNameChange), validation.By(form.checkUniqueName), ), - // validates using the type's own validation rules + some collection's specific + // validates using the type's own validation rules + some collection's specifics validation.Field( &form.Schema, validation.By(form.checkMinSchemaFields), validation.By(form.ensureNoSystemFieldsChange), validation.By(form.ensureNoFieldsTypeChange), validation.By(form.checkRelationFields), - validation.When( - isAuth, - validation.By(form.ensureNoAuthFieldName), - ), + validation.When(isAuth, validation.By(form.ensureNoAuthFieldName)), ), validation.Field(&form.ListRule, validation.By(form.checkRule)), validation.Field(&form.ViewRule, validation.By(form.checkRule)), - validation.Field(&form.CreateRule, validation.By(form.checkRule)), - validation.Field(&form.UpdateRule, validation.By(form.checkRule)), - validation.Field(&form.DeleteRule, validation.By(form.checkRule)), + validation.Field( + &form.CreateRule, + validation.When(isView, validation.Nil), + validation.By(form.checkRule), + ), + validation.Field( + &form.UpdateRule, + validation.When(isView, validation.Nil), + validation.By(form.checkRule), + ), + validation.Field( + &form.DeleteRule, + validation.When(isView, validation.Nil), + validation.By(form.checkRule), + ), validation.Field(&form.Options, validation.By(form.checkOptions)), ) } @@ -288,13 +311,15 @@ func (form *CollectionUpsert) ensureNoAuthFieldName(value any) error { } func (form *CollectionUpsert) checkMinSchemaFields(value any) error { - if form.Type == models.CollectionTypeAuth { - return nil // auth collections doesn't require having additional schema fields - } + v, _ := value.(schema.Schema) - v, ok := value.(schema.Schema) - if !ok || len(v.Fields()) == 0 { - return validation.ErrRequired + switch form.Type { + case models.CollectionTypeAuth, models.CollectionTypeView: + return nil // no schema fields constraint + default: + if len(v.Fields()) == 0 { + return validation.ErrRequired + } } return nil @@ -343,15 +368,11 @@ func (form *CollectionUpsert) checkRule(value any) error { func (form *CollectionUpsert) checkOptions(value any) error { v, _ := value.(types.JsonMap) - if form.Type == models.CollectionTypeAuth { - raw, err := v.MarshalJSON() - if err != nil { - return validation.NewError("validation_invalid_options", "Invalid options.") - } - + switch form.Type { + case models.CollectionTypeAuth: options := models.CollectionAuthOptions{} - if err := json.Unmarshal(raw, &options); err != nil { - return validation.NewError("validation_invalid_options", "Invalid options.") + if err := decodeOptions(v, &options); err != nil { + return err } // check the generic validations @@ -363,6 +384,39 @@ func (form *CollectionUpsert) checkOptions(value any) error { if err := form.checkRule(options.ManageRule); err != nil { return validation.Errors{"manageRule": err} } + case models.CollectionTypeView: + options := models.CollectionViewOptions{} + if err := decodeOptions(v, &options); err != nil { + return err + } + + // check the generic validations + if err := options.Validate(); err != nil { + return err + } + + // check the query option + if _, err := form.dao.CreateViewSchema(options.Query); err != nil { + return validation.Errors{ + "query": validation.NewError( + "validation_invalid_view_query", + fmt.Sprintf("Invalid query - %s", err.Error()), + ), + } + } + } + + return nil +} + +func decodeOptions(options types.JsonMap, result any) error { + raw, err := options.MarshalJSON() + if err != nil { + return validation.NewError("validation_invalid_options", "Invalid options.") + } + + if err := json.Unmarshal(raw, result); err != nil { + return validation.NewError("validation_invalid_options", "Invalid options.") } return nil @@ -398,7 +452,11 @@ func (form *CollectionUpsert) Submit(interceptors ...InterceptorFunc[*models.Col form.collection.Name = form.Name } - form.collection.Schema = form.Schema + // view schema is autogenerated on save + if !form.collection.IsView() { + form.collection.Schema = form.Schema + } + form.collection.ListRule = form.ListRule form.collection.ViewRule = form.ViewRule form.collection.CreateRule = form.CreateRule diff --git a/forms/collection_upsert_test.go b/forms/collection_upsert_test.go index fae2e7cc..39d4cc3c 100644 --- a/forms/collection_upsert_test.go +++ b/forms/collection_upsert_test.go @@ -22,7 +22,7 @@ func TestNewCollectionUpsert(t *testing.T) { collection.Name = "test_name" collection.Type = "test_type" collection.System = true - listRule := "testview" + listRule := "test_list" collection.ListRule = &listRule viewRule := "test_view" collection.ViewRule = &viewRule @@ -98,6 +98,7 @@ func TestCollectionUpsertValidateAndSubmit(t *testing.T) { }{ {"empty create (base)", "", "{}", []string{"name", "schema"}}, {"empty create (auth)", "", `{"type":"auth"}`, []string{"name"}}, + {"empty create (view)", "", `{"type":"view"}`, []string{"name", "options"}}, {"empty update", "demo2", "{}", []string{}}, { "create failure", @@ -188,7 +189,7 @@ func TestCollectionUpsertValidateAndSubmit(t *testing.T) { []string{"schema"}, }, { - "create failure - check type options validators", + "create failure - check auth options validators", "", `{ "name": "test_new", @@ -200,6 +201,16 @@ func TestCollectionUpsertValidateAndSubmit(t *testing.T) { }`, []string{"options"}, }, + { + "create failure - check view options validators", + "", + `{ + "name": "test_new", + "type": "view", + "options": { "query": "invalid query" } + }`, + []string{"options"}, + }, { "create success", "", @@ -356,6 +367,99 @@ func TestCollectionUpsertValidateAndSubmit(t *testing.T) { }`, []string{}, }, + + // view tests + // ----------------------------------------------------------- + { + "view create failure", + "", + `{ + "name": "upsert_view", + "type": "view", + "listRule": "id='123' && verified = true", + "viewRule": "id='123' && emailVisibility = true", + "schema": [ + {"id":"abc123","name":"some invalid field name that will be overwritten !@#$","type":"bool"} + ], + "options": { + "query": "select id, email from users; drop table _admins;" + } + }`, + []string{ + "listRule", + "viewRule", + "options", + }, + }, + { + "view create success", + "", + `{ + "name": "upsert_view", + "type": "view", + "listRule": "id='123' && verified = true", + "viewRule": "id='123' && emailVisibility = true", + "schema": [ + {"id":"abc123","name":"some invalid field name that will be overwritten !@#$","type":"bool"} + ], + "options": { + "query": "select id, emailVisibility, verified from users" + } + }`, + []string{ + // "schema", should be overwritten by an autogenerated from the query + }, + }, + { + "view update failure (schema autogeneration and rule fields check)", + "upsert_view", + `{ + "name": "upsert_view_2", + "listRule": "id='456' && verified = true", + "viewRule": "id='456'", + "createRule": "id='123'", + "updateRule": "id='123'", + "deleteRule": "id='123'", + "schema": [ + {"id":"abc123","name":"verified","type":"bool"} + ], + "options": { + "query": "select 1 as id" + } + }`, + []string{ + "listRule", // missing field (ignoring the old or explicit schema) + "createRule", // not allowed + "updateRule", // not allowed + "deleteRule", // not allowed + }, + }, + { + "view update failure (check query identifiers format)", + "upsert_view", + `{ + "listRule": null, + "viewRule": null, + "options": { + "query": "select 1 as id, 2 as [invalid!@#]" + } + }`, + []string{ + "schema", // should fail due to invalid field name + }, + }, + { + "view update success", + "upsert_view", + `{ + "listRule": null, + "viewRule": null, + "options": { + "query": "select 1 as id, 2 as valid" + } + }`, + []string{}, + }, } for _, s := range scenarios { @@ -454,10 +558,19 @@ func TestCollectionUpsertValidateAndSubmit(t *testing.T) { t.Errorf("[%s] Expected DeleteRule %v, got %v", s.testName, collection.DeleteRule, form.DeleteRule) } - formSchema, _ := form.Schema.MarshalJSON() - collectionSchema, _ := collection.Schema.MarshalJSON() - if string(formSchema) != string(collectionSchema) { - t.Errorf("[%s] Expected Schema %v, got %v", s.testName, string(collectionSchema), string(formSchema)) + rawFormSchema, _ := form.Schema.MarshalJSON() + rawCollectionSchema, _ := collection.Schema.MarshalJSON() + + if len(form.Schema.Fields()) != len(collection.Schema.Fields()) { + t.Errorf("[%s] Expected Schema \n%v, \ngot \n%v", s.testName, string(rawCollectionSchema), string(rawFormSchema)) + continue + } + + for _, f := range form.Schema.Fields() { + if collection.Schema.GetFieldByName(f.Name) == nil { + t.Errorf("[%s] Missing field %s \nin \n%v", s.testName, f.Name, string(rawFormSchema)) + continue + } } } } diff --git a/forms/collections_import_test.go b/forms/collections_import_test.go index f96b88ca..945812b7 100644 --- a/forms/collections_import_test.go +++ b/forms/collections_import_test.go @@ -38,6 +38,8 @@ func TestCollectionsImportValidate(t *testing.T) { } func TestCollectionsImportSubmit(t *testing.T) { + totalCollections := 10 + scenarios := []struct { name string jsonData string @@ -52,7 +54,7 @@ func TestCollectionsImportSubmit(t *testing.T) { "collections": [] }`, expectError: true, - expectCollectionsCount: 8, + expectCollectionsCount: totalCollections, expectEvents: nil, }, { @@ -82,7 +84,7 @@ func TestCollectionsImportSubmit(t *testing.T) { ] }`, expectError: true, - expectCollectionsCount: 8, + expectCollectionsCount: totalCollections, expectEvents: map[string]int{ "OnModelBeforeCreate": 2, }, @@ -101,7 +103,7 @@ func TestCollectionsImportSubmit(t *testing.T) { ] }`, expectError: true, - expectCollectionsCount: 8, + expectCollectionsCount: totalCollections, expectEvents: map[string]int{ "OnModelBeforeCreate": 2, }, @@ -137,7 +139,7 @@ func TestCollectionsImportSubmit(t *testing.T) { ] }`, expectError: false, - expectCollectionsCount: 11, + expectCollectionsCount: totalCollections + 3, expectEvents: map[string]int{ "OnModelBeforeCreate": 3, "OnModelAfterCreate": 3, @@ -160,7 +162,7 @@ func TestCollectionsImportSubmit(t *testing.T) { ] }`, expectError: true, - expectCollectionsCount: 8, + expectCollectionsCount: totalCollections, expectEvents: map[string]int{ "OnModelBeforeCreate": 1, }, @@ -202,7 +204,7 @@ func TestCollectionsImportSubmit(t *testing.T) { ] }`, expectError: true, - expectCollectionsCount: 8, + expectCollectionsCount: totalCollections, expectEvents: map[string]int{ "OnModelBeforeDelete": 5, }, @@ -253,7 +255,7 @@ func TestCollectionsImportSubmit(t *testing.T) { ] }`, expectError: false, - expectCollectionsCount: 10, + expectCollectionsCount: totalCollections + 2, expectEvents: map[string]int{ "OnModelBeforeUpdate": 1, "OnModelAfterUpdate": 1, @@ -341,8 +343,8 @@ func TestCollectionsImportSubmit(t *testing.T) { "OnModelAfterUpdate": 2, "OnModelBeforeCreate": 1, "OnModelAfterCreate": 1, - "OnModelBeforeDelete": 6, - "OnModelAfterDelete": 6, + "OnModelBeforeDelete": totalCollections - 2, + "OnModelAfterDelete": totalCollections - 2, }, }, } diff --git a/models/collection.go b/models/collection.go index 47ecf4a1..24c4f48b 100644 --- a/models/collection.go +++ b/models/collection.go @@ -17,6 +17,7 @@ var ( const ( CollectionTypeBase = "base" CollectionTypeAuth = "auth" + CollectionTypeView = "view" ) type Collection struct { @@ -52,11 +53,16 @@ func (m *Collection) IsBase() bool { return m.Type == CollectionTypeBase } -// IsBase checks if the current collection has "auth" type. +// IsAuth checks if the current collection has "auth" type. func (m *Collection) IsAuth() bool { return m.Type == CollectionTypeAuth } +// IsView checks if the current collection has "view" type. +func (m *Collection) IsView() bool { + return m.Type == CollectionTypeView +} + // MarshalJSON implements the [json.Marshaler] interface. func (m Collection) MarshalJSON() ([]byte, error) { type alias Collection // prevent recursion @@ -82,6 +88,14 @@ func (m *Collection) AuthOptions() CollectionAuthOptions { return result } +// ViewOptions decodes the current collection options and returns them +// as new [CollectionViewOptions] instance. +func (m *Collection) ViewOptions() CollectionViewOptions { + result := CollectionViewOptions{} + m.DecodeOptions(&result) + return result +} + // NormalizeOptions updates the current collection options with a // new normalized state based on the collection type. func (m *Collection) NormalizeOptions() error { @@ -89,6 +103,8 @@ func (m *Collection) NormalizeOptions() error { switch m.Type { case CollectionTypeAuth: typedOptions = m.AuthOptions() + case CollectionTypeView: + typedOptions = m.ViewOptions() default: typedOptions = m.BaseOptions() } @@ -143,7 +159,7 @@ func (m *Collection) SetOptions(typedOptions any) error { // ------------------------------------------------------------------- -// CollectionAuthOptions defines the "base" Collection.Options fields. +// CollectionBaseOptions defines the "base" Collection.Options fields. type CollectionBaseOptions struct { } @@ -152,6 +168,8 @@ func (o CollectionBaseOptions) Validate() error { return nil } +// ------------------------------------------------------------------- + // CollectionAuthOptions defines the "auth" Collection.Options fields. type CollectionAuthOptions struct { ManageRule *string `form:"manageRule" json:"manageRule"` @@ -184,3 +202,17 @@ func (o CollectionAuthOptions) Validate() error { ), ) } + +// ------------------------------------------------------------------- + +// CollectionViewOptions defines the "view" Collection.Options fields. +type CollectionViewOptions struct { + Query string `form:"query" json:"query"` +} + +// Validate implements [validation.Validatable] interface. +func (o CollectionViewOptions) Validate() error { + return validation.ValidateStruct(&o, + validation.Field(&o.Query, validation.Required), + ) +} diff --git a/models/collection_test.go b/models/collection_test.go index 57a1b9be..7f5738d9 100644 --- a/models/collection_test.go +++ b/models/collection_test.go @@ -97,11 +97,11 @@ func TestCollectionMarshalJSON(t *testing.T) { for _, s := range scenarios { result, err := s.collection.MarshalJSON() if err != nil { - t.Errorf("(%s) Unexpected error %v", s.name, err) + t.Errorf("[%s] Unexpected error %v", s.name, err) continue } if string(result) != s.expected { - t.Errorf("(%s) Expected\n%v \ngot \n%v", s.name, s.expected, string(result)) + t.Errorf("[%s] Expected\n%v \ngot \n%v", s.name, s.expected, string(result)) } } } @@ -143,7 +143,7 @@ func TestCollectionBaseOptions(t *testing.T) { } if strEncoded := string(encoded); strEncoded != s.expected { - t.Errorf("(%s) Expected \n%v \ngot \n%v", s.name, s.expected, strEncoded) + t.Errorf("[%s] Expected \n%v \ngot \n%v", s.name, s.expected, strEncoded) } } } @@ -188,7 +188,52 @@ func TestCollectionAuthOptions(t *testing.T) { } if strEncoded := string(encoded); strEncoded != s.expected { - t.Errorf("(%s) Expected \n%v \ngot \n%v", s.name, s.expected, strEncoded) + t.Errorf("[%s] Expected \n%v \ngot \n%v", s.name, s.expected, strEncoded) + } + } +} + +func TestCollectionViewOptions(t *testing.T) { + options := types.JsonMap{"query": "select id from demo1", "minPasswordLength": 4} + expectedSerialization := `{"query":"select id from demo1"}` + + scenarios := []struct { + name string + collection models.Collection + expected string + }{ + { + "no type", + models.Collection{Options: options}, + expectedSerialization, + }, + { + "unknown type", + models.Collection{Type: "anything", Options: options}, + expectedSerialization, + }, + { + "different type", + models.Collection{Type: models.CollectionTypeBase, Options: options}, + expectedSerialization, + }, + { + "view type", + models.Collection{Type: models.CollectionTypeView, Options: options}, + expectedSerialization, + }, + } + + for _, s := range scenarios { + result := s.collection.ViewOptions() + + encoded, err := json.Marshal(result) + if err != nil { + t.Fatal(err) + } + + if strEncoded := string(encoded); strEncoded != s.expected { + t.Errorf("[%s] Expected \n%v \ngot \n%v", s.name, s.expected, strEncoded) } } } @@ -218,7 +263,7 @@ func TestNormalizeOptions(t *testing.T) { for _, s := range scenarios { if err := s.collection.NormalizeOptions(); err != nil { - t.Errorf("(%s) Unexpected error %v", s.name, err) + t.Errorf("[%s] Unexpected error %v", s.name, err) continue } @@ -228,7 +273,7 @@ func TestNormalizeOptions(t *testing.T) { } if strEncoded := string(encoded); strEncoded != s.expected { - t.Errorf("(%s) Expected \n%v \ngot \n%v", s.name, s.expected, strEncoded) + t.Errorf("[%s] Expected \n%v \ngot \n%v", s.name, s.expected, strEncoded) } } } @@ -286,7 +331,7 @@ func TestSetOptions(t *testing.T) { for _, s := range scenarios { if err := s.collection.SetOptions(s.options); err != nil { - t.Errorf("(%s) Unexpected error %v", s.name, err) + t.Errorf("[%s] Unexpected error %v", s.name, err) continue } @@ -296,7 +341,7 @@ func TestSetOptions(t *testing.T) { } if strEncoded := string(encoded); strEncoded != s.expected { - t.Errorf("(%s) Expected \n%v \ngot \n%v", s.name, s.expected, strEncoded) + t.Errorf("[%s] Expected \n%v \ngot \n%v", s.name, s.expected, strEncoded) } } } @@ -378,18 +423,61 @@ func TestCollectionAuthOptionsValidate(t *testing.T) { // parse errors errs, ok := result.(validation.Errors) if !ok && result != nil { - t.Errorf("(%s) Failed to parse errors %v", s.name, result) + t.Errorf("[%s] Failed to parse errors %v", s.name, result) continue } if len(errs) != len(s.expectedErrors) { - t.Errorf("(%s) Expected error keys %v, got errors \n%v", s.name, s.expectedErrors, result) + t.Errorf("[%s] Expected error keys %v, got errors \n%v", s.name, s.expectedErrors, result) continue } for key := range errs { if !list.ExistInSlice(key, s.expectedErrors) { - t.Errorf("(%s) Unexpected error key %q in \n%v", s.name, key, errs) + t.Errorf("[%s] Unexpected error key %q in \n%v", s.name, key, errs) + } + } + } +} + +func TestCollectionViewOptionsValidate(t *testing.T) { + scenarios := []struct { + name string + options models.CollectionViewOptions + expectedErrors []string + }{ + { + "empty", + models.CollectionViewOptions{}, + []string{"query"}, + }, + { + "valid data", + models.CollectionViewOptions{ + Query: "test123", + }, + []string{}, + }, + } + + for _, s := range scenarios { + result := s.options.Validate() + + // parse errors + errs, ok := result.(validation.Errors) + if !ok && result != nil { + t.Errorf("[%s] Failed to parse errors %v", s.name, result) + continue + } + + if len(errs) != len(s.expectedErrors) { + t.Errorf("[%s] Expected error keys %v, got errors \n%v", s.name, s.expectedErrors, result) + continue + } + + for key := range errs { + if !list.ExistInSlice(key, s.expectedErrors) { + t.Errorf("[%s] Unexpected error key %q in \n%v", s.name, key, errs) } } } diff --git a/models/record.go b/models/record.go index 6f84ffb2..32ff26c5 100644 --- a/models/record.go +++ b/models/record.go @@ -59,6 +59,9 @@ func nullStringMapValue(data dbx.NullStringMap, key string) any { // NewRecordFromNullStringMap initializes a single new Record model // with data loaded from the provided NullStringMap. +// +// Note that this method is intended to load and Scan data from a database +// result and calls PostScan() which marks the record as "not new". func NewRecordFromNullStringMap(collection *Collection, data dbx.NullStringMap) *Record { resultMap := make(map[string]any, len(data)) @@ -89,6 +92,9 @@ func NewRecordFromNullStringMap(collection *Collection, data dbx.NullStringMap) // NewRecordsFromNullStringMaps initializes a new Record model for // each row in the provided NullStringMap slice. +// +// Note that this method is intended to load and Scan data from a database +// result and calls PostScan() for each record marking them as "not new". func NewRecordsFromNullStringMaps(collection *Collection, rows []dbx.NullStringMap) []*Record { result := make([]*Record, len(rows)) @@ -469,8 +475,12 @@ func (m *Record) PublicExport() map[string]any { // export base model fields result[schema.FieldNameId] = m.GetId() - result[schema.FieldNameCreated] = m.GetCreated() - result[schema.FieldNameUpdated] = m.GetUpdated() + if created := m.GetCreated(); !m.Collection().IsView() || !created.IsZero() { + result[schema.FieldNameCreated] = created + } + if updated := m.GetUpdated(); !m.Collection().IsView() || !updated.IsZero() { + result[schema.FieldNameUpdated] = updated + } // add helper collection reference fields result[schema.FieldNameCollectionId] = m.collection.Id diff --git a/models/schema/schema_field.go b/models/schema/schema_field.go index 840402da..b7bf8286 100644 --- a/models/schema/schema_field.go +++ b/models/schema/schema_field.go @@ -139,7 +139,7 @@ type SchemaField struct { func (f *SchemaField) ColDefinition() string { switch f.Type { case FieldTypeNumber: - return "REAL DEFAULT 0" + return "NUMERIC DEFAULT 0" case FieldTypeBool: return "BOOLEAN DEFAULT FALSE" case FieldTypeJson: diff --git a/models/schema/schema_field_test.go b/models/schema/schema_field_test.go index 4f10a503..e90b5c47 100644 --- a/models/schema/schema_field_test.go +++ b/models/schema/schema_field_test.go @@ -67,7 +67,7 @@ func TestSchemaFieldColDefinition(t *testing.T) { }, { schema.SchemaField{Type: schema.FieldTypeNumber, Name: "test"}, - "REAL DEFAULT 0", + "NUMERIC DEFAULT 0", }, { schema.SchemaField{Type: schema.FieldTypeBool, Name: "test"}, diff --git a/models/table_info.go b/models/table_info.go new file mode 100644 index 00000000..ef62bf88 --- /dev/null +++ b/models/table_info.go @@ -0,0 +1,15 @@ +package models + +import "github.com/pocketbase/pocketbase/tools/types" + +type TableInfoRow struct { + // the `db:"pk"` tag has special semantic so we cannot rename + // the original field without specifying a custom mapper + PK int + + Index int `db:"cid"` + Name string `db:"name"` + Type string `db:"type"` + NotNull bool `db:"notnull"` + DefaultValue types.JsonRaw `db:"dflt_value"` +} diff --git a/tests/data/data.db b/tests/data/data.db index 283f2d6c..ed9b50b1 100644 Binary files a/tests/data/data.db and b/tests/data/data.db differ diff --git a/tests/data/logs.db b/tests/data/logs.db index 363a146c..765c37f3 100644 Binary files a/tests/data/logs.db and b/tests/data/logs.db differ diff --git a/tests/data/storage/9n89pl5vkct6330/la4y2w4o98acwuj/300_uh_lkx91_hvb_Da8K5pl069.png b/tests/data/storage/9n89pl5vkct6330/la4y2w4o98acwuj/300_uh_lkx91_hvb_Da8K5pl069.png new file mode 100644 index 00000000..f6ce991a Binary files /dev/null and b/tests/data/storage/9n89pl5vkct6330/la4y2w4o98acwuj/300_uh_lkx91_hvb_Da8K5pl069.png differ diff --git a/tests/data/storage/9n89pl5vkct6330/la4y2w4o98acwuj/300_uh_lkx91_hvb_Da8K5pl069.png.attrs b/tests/data/storage/9n89pl5vkct6330/la4y2w4o98acwuj/300_uh_lkx91_hvb_Da8K5pl069.png.attrs new file mode 100644 index 00000000..06e64d61 --- /dev/null +++ b/tests/data/storage/9n89pl5vkct6330/la4y2w4o98acwuj/300_uh_lkx91_hvb_Da8K5pl069.png.attrs @@ -0,0 +1 @@ +{"user.cache_control":"","user.content_disposition":"","user.content_encoding":"","user.content_language":"","user.content_type":"image/png","user.metadata":{"original-filename":"300_UhLKX91HVb.png"},"md5":"zZhZjzVvCvpcxtMAJie3GQ=="} diff --git a/tests/data/storage/9n89pl5vkct6330/la4y2w4o98acwuj/thumbs_300_uh_lkx91_hvb_Da8K5pl069.png/100x100_300_uh_lkx91_hvb_Da8K5pl069.png b/tests/data/storage/9n89pl5vkct6330/la4y2w4o98acwuj/thumbs_300_uh_lkx91_hvb_Da8K5pl069.png/100x100_300_uh_lkx91_hvb_Da8K5pl069.png new file mode 100644 index 00000000..1b876773 Binary files /dev/null and b/tests/data/storage/9n89pl5vkct6330/la4y2w4o98acwuj/thumbs_300_uh_lkx91_hvb_Da8K5pl069.png/100x100_300_uh_lkx91_hvb_Da8K5pl069.png differ diff --git a/tests/data/storage/9n89pl5vkct6330/la4y2w4o98acwuj/thumbs_300_uh_lkx91_hvb_Da8K5pl069.png/100x100_300_uh_lkx91_hvb_Da8K5pl069.png.attrs b/tests/data/storage/9n89pl5vkct6330/la4y2w4o98acwuj/thumbs_300_uh_lkx91_hvb_Da8K5pl069.png/100x100_300_uh_lkx91_hvb_Da8K5pl069.png.attrs new file mode 100644 index 00000000..64e4c1d2 --- /dev/null +++ b/tests/data/storage/9n89pl5vkct6330/la4y2w4o98acwuj/thumbs_300_uh_lkx91_hvb_Da8K5pl069.png/100x100_300_uh_lkx91_hvb_Da8K5pl069.png.attrs @@ -0,0 +1 @@ +{"user.cache_control":"","user.content_disposition":"","user.content_encoding":"","user.content_language":"","user.content_type":"image/png","user.metadata":null,"md5":"R7TqfvF8HP3C4+FO2eZ9tg=="} diff --git a/tests/data/storage/9n89pl5vkct6330/qjeql998mtp1azp/logo_vcf_jjg5_tah_9MtIHytOmZ.svg b/tests/data/storage/9n89pl5vkct6330/qjeql998mtp1azp/logo_vcf_jjg5_tah_9MtIHytOmZ.svg new file mode 100644 index 00000000..5b5de956 --- /dev/null +++ b/tests/data/storage/9n89pl5vkct6330/qjeql998mtp1azp/logo_vcf_jjg5_tah_9MtIHytOmZ.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/tests/data/storage/9n89pl5vkct6330/qjeql998mtp1azp/logo_vcf_jjg5_tah_9MtIHytOmZ.svg.attrs b/tests/data/storage/9n89pl5vkct6330/qjeql998mtp1azp/logo_vcf_jjg5_tah_9MtIHytOmZ.svg.attrs new file mode 100644 index 00000000..749a85e2 --- /dev/null +++ b/tests/data/storage/9n89pl5vkct6330/qjeql998mtp1azp/logo_vcf_jjg5_tah_9MtIHytOmZ.svg.attrs @@ -0,0 +1 @@ +{"user.cache_control":"","user.content_disposition":"","user.content_encoding":"","user.content_language":"","user.content_type":"image/svg+xml","user.metadata":{"original-filename":"logo_vcfJJG5TAh.svg"},"md5":"9/B7afas4c3O6vbFcbpOug=="} diff --git a/tools/tokenizer/tokenizer.go b/tools/tokenizer/tokenizer.go index 31e76513..54a67d86 100644 --- a/tools/tokenizer/tokenizer.go +++ b/tools/tokenizer/tokenizer.go @@ -34,8 +34,9 @@ func NewFromBytes(b []byte) *Tokenizer { // New creates new Tokenizer from the provided reader with DefaultSeparators. func New(r io.Reader) *Tokenizer { return &Tokenizer{ - r: bufio.NewReader(r), - separators: DefaultSeparators, + r: bufio.NewReader(r), + separators: DefaultSeparators, + keepSeparator: false, } } @@ -44,14 +45,21 @@ func New(r io.Reader) *Tokenizer { type Tokenizer struct { r *bufio.Reader - separators []rune + separators []rune + keepSeparator bool } -// SetSeparators specifies the provided separatos of the current Tokenizer. -func (s *Tokenizer) SetSeparators(separators ...rune) { +// Separators defines the provided separatos of the current Tokenizer. +func (s *Tokenizer) Separators(separators ...rune) { s.separators = separators } +// KeepSeparator defines whether to keep the separator rune as part +// of the token (default to false). +func (s *Tokenizer) KeepSeparator(state bool) { + s.keepSeparator = state +} + // Scan reads and returns the next available token from the Tokenizer's buffer (trimmed). // // Returns [io.EOF] error when there are no more tokens to scan. @@ -128,6 +136,9 @@ func (s *Tokenizer) readToken() (string, error) { } if s.isSeperatorRune(ch) && parenthesis == 0 && quoteCh == eof { + if s.keepSeparator { + buf.WriteRune(ch) + } break } diff --git a/tools/tokenizer/tokenizer_test.go b/tools/tokenizer/tokenizer_test.go index 8bf21084..d728ba89 100644 --- a/tools/tokenizer/tokenizer_test.go +++ b/tools/tokenizer/tokenizer_test.go @@ -34,6 +34,10 @@ func TestFactories(t *testing.T) { t.Fatalf("[%s] Expected reader with content %q, got %q", s.name, expectedContent, content) } + if s.tk.keepSeparator != false { + t.Fatalf("[%s] Expected false, got true", s.name) + } + if len(s.tk.separators) != len(DefaultSeparators) { t.Fatalf("[%s] Expected \n%v, \ngot \n%v", s.name, DefaultSeparators, s.tk.separators) } @@ -81,23 +85,26 @@ func TestScan(t *testing.T) { func TestScanAll(t *testing.T) { scenarios := []struct { - name string - content string - separators []rune - expectError bool - expectTokens []string + name string + content string + separators []rune + keepSeparator bool + expectError bool + expectTokens []string }{ { "empty string", "", DefaultSeparators, false, + false, nil, }, { "unbalanced parenthesis", `(a,b() c`, DefaultSeparators, + false, true, []string{}, }, @@ -105,6 +112,7 @@ func TestScanAll(t *testing.T) { "unmatching quotes", `'asd"`, DefaultSeparators, + false, true, []string{}, }, @@ -113,6 +121,7 @@ func TestScanAll(t *testing.T) { `a, b, c, d, e 123, "abc"`, nil, false, + false, []string{ `a, b, c, d, e 123, "abc"`, }, @@ -122,6 +131,7 @@ func TestScanAll(t *testing.T) { `a, b, c, d e, "a,b, c ", (123, 456)`, DefaultSeparators, false, + false, []string{ "a", "b", @@ -131,6 +141,21 @@ func TestScanAll(t *testing.T) { `(123, 456)`, }, }, + { + "default separators (with preserve)", + `a, b, c, d e, "a,b, c ", (123, 456)`, + DefaultSeparators, + true, + false, + []string{ + "a,", + "b,", + "c,", + "d e,", + `"a,b, c ",`, + `(123, 456)`, + }, + }, { "custom separators", ` a , 123.456, b, c d, ( @@ -138,6 +163,7 @@ func TestScanAll(t *testing.T) { ),"(abc d", "abc) d", "(abc) d \" " 'abc "'`, []rune{',', ' ', '\t', '\n'}, false, + false, []string{ "a", "123.456", @@ -151,12 +177,34 @@ func TestScanAll(t *testing.T) { `'abc "'`, }, }, + { + "custom separators (with preserve)", + ` a , 123.456, b, c d, ( + test (a,b,c) " 123 " + ),"(abc d", "abc) d", "(abc) d \" " 'abc "'`, + []rune{',', ' ', '\t', '\n'}, + true, + false, + []string{ + "a ", + "123.456,", + "b,", + "c ", + "d,", + "(\n\t\t\t\ttest (a,b,c) \" 123 \"\n\t\t\t),", + `"(abc d",`, + `"abc) d",`, + `"(abc) d \" " `, + `'abc "'`, + }, + }, } for _, s := range scenarios { tk := NewFromString(s.content) - tk.SetSeparators(s.separators...) + tk.Separators(s.separators...) + tk.KeepSeparator(s.keepSeparator) tokens, err := tk.ScanAll() diff --git a/ui/.env b/ui/.env index 386e9a2a..035e31d2 100644 --- a/ui/.env +++ b/ui/.env @@ -8,4 +8,4 @@ PB_DOCS_URL = "https://pocketbase.io/docs/" PB_JS_SDK_URL = "https://github.com/pocketbase/js-sdk" PB_DART_SDK_URL = "https://github.com/pocketbase/dart-sdk" PB_RELEASES = "https://github.com/pocketbase/pocketbase/releases" -PB_VERSION = "v0.12.3" +PB_VERSION = "v0.13.0" diff --git a/ui/dist/assets/AuthMethodsDocs-3db66f7f.js b/ui/dist/assets/AuthMethodsDocs-97cd7d05.js similarity index 98% rename from ui/dist/assets/AuthMethodsDocs-3db66f7f.js rename to ui/dist/assets/AuthMethodsDocs-97cd7d05.js index ed2c2cc6..fd9493ab 100644 --- a/ui/dist/assets/AuthMethodsDocs-3db66f7f.js +++ b/ui/dist/assets/AuthMethodsDocs-97cd7d05.js @@ -1,4 +1,4 @@ -import{S as ke,i as be,s as ge,e as r,w as b,b as g,c as me,f as k,g as h,h as n,m as _e,x as G,O as re,P as we,k as ve,Q as Ce,n as Pe,t as L,a as Y,o as m,d as pe,R as Me,C as Se,p as $e,r as H,u as je,N as Ae}from"./index-3e0f12d8.js";import{S as Be}from"./SdkTabs-ed893501.js";function ue(a,l,o){const s=a.slice();return s[5]=l[o],s}function de(a,l,o){const s=a.slice();return s[5]=l[o],s}function fe(a,l){let o,s=l[5].code+"",_,f,i,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){o=r("button"),_=b(s),f=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(v,C){h(v,o,C),n(o,_),n(o,f),i||(u=je(o,"click",d),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&G(_,s),C&6&&H(o,"active",l[1]===l[5].code)},d(v){v&&m(o),i=!1,u()}}}function he(a,l){let o,s,_,f;return s=new Ae({props:{content:l[5].body}}),{key:a,first:null,c(){o=r("div"),me(s.$$.fragment),_=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(i,u){h(i,o,u),_e(s,o,null),n(o,_),f=!0},p(i,u){l=i;const d={};u&4&&(d.content=l[5].body),s.$set(d),(!f||u&6)&&H(o,"active",l[1]===l[5].code)},i(i){f||(L(s.$$.fragment,i),f=!0)},o(i){Y(s.$$.fragment,i),f=!1},d(i){i&&m(o),pe(s)}}}function Oe(a){var ae,ne;let l,o,s=a[0].name+"",_,f,i,u,d,v,C,F=a[0].name+"",U,R,q,P,D,j,W,M,K,X,Q,A,Z,V,y=a[0].name+"",E,x,I,B,J,S,O,w=[],ee=new Map,te,T,p=[],le=new Map,$;P=new Be({props:{js:` +import{S as ke,i as be,s as ge,e as r,w as b,b as g,c as me,f as k,g as h,h as n,m as _e,x as G,O as re,P as we,k as ve,Q as Ce,n as Pe,t as L,a as Y,o as m,d as pe,R as Me,C as Se,p as $e,r as H,u as je,N as Ae}from"./index-ffbb9561.js";import{S as Be}from"./SdkTabs-5b973c0d.js";function ue(a,l,o){const s=a.slice();return s[5]=l[o],s}function de(a,l,o){const s=a.slice();return s[5]=l[o],s}function fe(a,l){let o,s=l[5].code+"",_,f,i,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){o=r("button"),_=b(s),f=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(v,C){h(v,o,C),n(o,_),n(o,f),i||(u=je(o,"click",d),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&G(_,s),C&6&&H(o,"active",l[1]===l[5].code)},d(v){v&&m(o),i=!1,u()}}}function he(a,l){let o,s,_,f;return s=new Ae({props:{content:l[5].body}}),{key:a,first:null,c(){o=r("div"),me(s.$$.fragment),_=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(i,u){h(i,o,u),_e(s,o,null),n(o,_),f=!0},p(i,u){l=i;const d={};u&4&&(d.content=l[5].body),s.$set(d),(!f||u&6)&&H(o,"active",l[1]===l[5].code)},i(i){f||(L(s.$$.fragment,i),f=!0)},o(i){Y(s.$$.fragment,i),f=!1},d(i){i&&m(o),pe(s)}}}function Oe(a){var ae,ne;let l,o,s=a[0].name+"",_,f,i,u,d,v,C,F=a[0].name+"",U,R,q,P,D,j,W,M,K,X,Q,A,Z,V,y=a[0].name+"",E,x,I,B,J,S,O,w=[],ee=new Map,te,T,p=[],le=new Map,$;P=new Be({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/AuthRefreshDocs-8c1d08af.js b/ui/dist/assets/AuthRefreshDocs-82bf2d4d.js similarity index 98% rename from ui/dist/assets/AuthRefreshDocs-8c1d08af.js rename to ui/dist/assets/AuthRefreshDocs-82bf2d4d.js index b20ef94d..c3a567c4 100644 --- a/ui/dist/assets/AuthRefreshDocs-8c1d08af.js +++ b/ui/dist/assets/AuthRefreshDocs-82bf2d4d.js @@ -1,4 +1,4 @@ -import{S as ze,i as Ue,s as je,N as Ve,e as a,w as k,b as p,c as ae,f as b,g as c,h as o,m as ne,x as re,O as qe,P as xe,k as Je,Q as Ke,n as Qe,t as U,a as j,o as d,d as ie,R as Ie,C as He,p as We,r as x,u as Ge}from"./index-3e0f12d8.js";import{S as Xe}from"./SdkTabs-ed893501.js";function Ee(r,l,s){const n=r.slice();return n[5]=l[s],n}function Fe(r,l,s){const n=r.slice();return n[5]=l[s],n}function Le(r,l){let s,n=l[5].code+"",m,_,i,f;function v(){return l[4](l[5])}return{key:r,first:null,c(){s=a("button"),m=k(n),_=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(g,w){c(g,s,w),o(s,m),o(s,_),i||(f=Ge(s,"click",v),i=!0)},p(g,w){l=g,w&4&&n!==(n=l[5].code+"")&&re(m,n),w&6&&x(s,"active",l[1]===l[5].code)},d(g){g&&d(s),i=!1,f()}}}function Ne(r,l){let s,n,m,_;return n=new Ve({props:{content:l[5].body}}),{key:r,first:null,c(){s=a("div"),ae(n.$$.fragment),m=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(i,f){c(i,s,f),ne(n,s,null),o(s,m),_=!0},p(i,f){l=i;const v={};f&4&&(v.content=l[5].body),n.$set(v),(!_||f&6)&&x(s,"active",l[1]===l[5].code)},i(i){_||(U(n.$$.fragment,i),_=!0)},o(i){j(n.$$.fragment,i),_=!1},d(i){i&&d(s),ie(n)}}}function Ye(r){var Be,Me;let l,s,n=r[0].name+"",m,_,i,f,v,g,w,B,J,S,F,ce,L,M,de,K,N=r[0].name+"",Q,ue,pe,V,I,D,W,T,G,fe,X,C,Y,he,Z,be,h,me,P,_e,ke,ve,ee,ge,te,ye,Se,$e,oe,we,le,O,se,R,q,$=[],Te=new Map,Ce,H,y=[],Re=new Map,A;g=new Xe({props:{js:` +import{S as ze,i as Ue,s as je,N as Ve,e as a,w as k,b as p,c as ae,f as b,g as c,h as o,m as ne,x as re,O as qe,P as xe,k as Je,Q as Ke,n as Qe,t as U,a as j,o as d,d as ie,R as Ie,C as He,p as We,r as x,u as Ge}from"./index-ffbb9561.js";import{S as Xe}from"./SdkTabs-5b973c0d.js";function Ee(r,l,s){const n=r.slice();return n[5]=l[s],n}function Fe(r,l,s){const n=r.slice();return n[5]=l[s],n}function Le(r,l){let s,n=l[5].code+"",m,_,i,f;function v(){return l[4](l[5])}return{key:r,first:null,c(){s=a("button"),m=k(n),_=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(g,w){c(g,s,w),o(s,m),o(s,_),i||(f=Ge(s,"click",v),i=!0)},p(g,w){l=g,w&4&&n!==(n=l[5].code+"")&&re(m,n),w&6&&x(s,"active",l[1]===l[5].code)},d(g){g&&d(s),i=!1,f()}}}function Ne(r,l){let s,n,m,_;return n=new Ve({props:{content:l[5].body}}),{key:r,first:null,c(){s=a("div"),ae(n.$$.fragment),m=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(i,f){c(i,s,f),ne(n,s,null),o(s,m),_=!0},p(i,f){l=i;const v={};f&4&&(v.content=l[5].body),n.$set(v),(!_||f&6)&&x(s,"active",l[1]===l[5].code)},i(i){_||(U(n.$$.fragment,i),_=!0)},o(i){j(n.$$.fragment,i),_=!1},d(i){i&&d(s),ie(n)}}}function Ye(r){var Be,Me;let l,s,n=r[0].name+"",m,_,i,f,v,g,w,B,J,S,F,ce,L,M,de,K,N=r[0].name+"",Q,ue,pe,V,I,D,W,T,G,fe,X,C,Y,he,Z,be,h,me,P,_e,ke,ve,ee,ge,te,ye,Se,$e,oe,we,le,O,se,R,q,$=[],Te=new Map,Ce,H,y=[],Re=new Map,A;g=new Xe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${r[3]}'); diff --git a/ui/dist/assets/AuthWithOAuth2Docs-ebf26578.js b/ui/dist/assets/AuthWithOAuth2Docs-08a04f0f.js similarity index 98% rename from ui/dist/assets/AuthWithOAuth2Docs-ebf26578.js rename to ui/dist/assets/AuthWithOAuth2Docs-08a04f0f.js index 99ddbdc9..09d2fe53 100644 --- a/ui/dist/assets/AuthWithOAuth2Docs-ebf26578.js +++ b/ui/dist/assets/AuthWithOAuth2Docs-08a04f0f.js @@ -1,4 +1,4 @@ -import{S as je,i as He,s as Je,N as We,e as s,w as v,b as p,c as re,f as h,g as r,h as a,m as ce,x as de,O as Ve,P as Ne,k as Qe,Q as ze,n as Ke,t as j,a as H,o as c,d as ue,R as Ye,C as Be,p as Ge,r as J,u as Xe}from"./index-3e0f12d8.js";import{S as Ze}from"./SdkTabs-ed893501.js";function Fe(i,l,o){const n=i.slice();return n[5]=l[o],n}function Le(i,l,o){const n=i.slice();return n[5]=l[o],n}function xe(i,l){let o,n=l[5].code+"",m,_,d,b;function g(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=v(n),_=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(k,R){r(k,o,R),a(o,m),a(o,_),d||(b=Xe(o,"click",g),d=!0)},p(k,R){l=k,R&4&&n!==(n=l[5].code+"")&&de(m,n),R&6&&J(o,"active",l[1]===l[5].code)},d(k){k&&c(o),d=!1,b()}}}function Me(i,l){let o,n,m,_;return n=new We({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),re(n.$$.fragment),m=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(d,b){r(d,o,b),ce(n,o,null),a(o,m),_=!0},p(d,b){l=d;const g={};b&4&&(g.content=l[5].body),n.$set(g),(!_||b&6)&&J(o,"active",l[1]===l[5].code)},i(d){_||(j(n.$$.fragment,d),_=!0)},o(d){H(n.$$.fragment,d),_=!1},d(d){d&&c(o),ue(n)}}}function et(i){var qe,Ie;let l,o,n=i[0].name+"",m,_,d,b,g,k,R,C,N,y,L,pe,x,D,he,Q,M=i[0].name+"",z,be,K,q,Y,I,G,P,X,O,Z,fe,ee,$,te,me,ae,_e,f,ve,E,ge,ke,we,le,Se,oe,Re,ye,Oe,se,$e,ne,U,ie,A,V,S=[],Ae=new Map,Ee,B,w=[],Te=new Map,T;k=new Ze({props:{js:` +import{S as je,i as He,s as Je,N as We,e as s,w as v,b as p,c as re,f as h,g as r,h as a,m as ce,x as de,O as Ve,P as Ne,k as Qe,Q as ze,n as Ke,t as j,a as H,o as c,d as ue,R as Ye,C as Be,p as Ge,r as J,u as Xe}from"./index-ffbb9561.js";import{S as Ze}from"./SdkTabs-5b973c0d.js";function Fe(i,l,o){const n=i.slice();return n[5]=l[o],n}function Le(i,l,o){const n=i.slice();return n[5]=l[o],n}function xe(i,l){let o,n=l[5].code+"",m,_,d,b;function g(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=v(n),_=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(k,R){r(k,o,R),a(o,m),a(o,_),d||(b=Xe(o,"click",g),d=!0)},p(k,R){l=k,R&4&&n!==(n=l[5].code+"")&&de(m,n),R&6&&J(o,"active",l[1]===l[5].code)},d(k){k&&c(o),d=!1,b()}}}function Me(i,l){let o,n,m,_;return n=new We({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),re(n.$$.fragment),m=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(d,b){r(d,o,b),ce(n,o,null),a(o,m),_=!0},p(d,b){l=d;const g={};b&4&&(g.content=l[5].body),n.$set(g),(!_||b&6)&&J(o,"active",l[1]===l[5].code)},i(d){_||(j(n.$$.fragment,d),_=!0)},o(d){H(n.$$.fragment,d),_=!1},d(d){d&&c(o),ue(n)}}}function et(i){var qe,Ie;let l,o,n=i[0].name+"",m,_,d,b,g,k,R,C,N,y,L,pe,x,D,he,Q,M=i[0].name+"",z,be,K,q,Y,I,G,P,X,O,Z,fe,ee,$,te,me,ae,_e,f,ve,E,ge,ke,we,le,Se,oe,Re,ye,Oe,se,$e,ne,U,ie,A,V,S=[],Ae=new Map,Ee,B,w=[],Te=new Map,T;k=new Ze({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/AuthWithPasswordDocs-82c26bd0.js b/ui/dist/assets/AuthWithPasswordDocs-f5651e67.js similarity index 98% rename from ui/dist/assets/AuthWithPasswordDocs-82c26bd0.js rename to ui/dist/assets/AuthWithPasswordDocs-f5651e67.js index f0c9204f..aa6d846f 100644 --- a/ui/dist/assets/AuthWithPasswordDocs-82c26bd0.js +++ b/ui/dist/assets/AuthWithPasswordDocs-f5651e67.js @@ -1,4 +1,4 @@ -import{S as Se,i as ve,s as we,N as ke,e as s,w as f,b as u,c as Ot,f as h,g as r,h as o,m as At,x as Tt,O as ce,P as ye,k as ge,Q as Pe,n as Re,t as tt,a as et,o as c,d as Ut,R as $e,C as de,p as Ce,r as lt,u as Oe}from"./index-3e0f12d8.js";import{S as Ae}from"./SdkTabs-ed893501.js";function ue(n,e,l){const i=n.slice();return i[8]=e[l],i}function fe(n,e,l){const i=n.slice();return i[8]=e[l],i}function Te(n){let e;return{c(){e=f("email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Ue(n){let e;return{c(){e=f("username")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Me(n){let e;return{c(){e=f("username/email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function pe(n){let e;return{c(){e=s("strong"),e.textContent="username"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function be(n){let e;return{c(){e=f("or")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function me(n){let e;return{c(){e=s("strong"),e.textContent="email"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function he(n,e){let l,i=e[8].code+"",S,m,p,d;function _(){return e[7](e[8])}return{key:n,first:null,c(){l=s("button"),S=f(i),m=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m($,C){r($,l,C),o(l,S),o(l,m),p||(d=Oe(l,"click",_),p=!0)},p($,C){e=$,C&16&&i!==(i=e[8].code+"")&&Tt(S,i),C&24&<(l,"active",e[3]===e[8].code)},d($){$&&c(l),p=!1,d()}}}function _e(n,e){let l,i,S,m;return i=new ke({props:{content:e[8].body}}),{key:n,first:null,c(){l=s("div"),Ot(i.$$.fragment),S=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m(p,d){r(p,l,d),At(i,l,null),o(l,S),m=!0},p(p,d){e=p;const _={};d&16&&(_.content=e[8].body),i.$set(_),(!m||d&24)&<(l,"active",e[3]===e[8].code)},i(p){m||(tt(i.$$.fragment,p),m=!0)},o(p){et(i.$$.fragment,p),m=!1},d(p){p&&c(l),Ut(i)}}}function De(n){var se,ne;let e,l,i=n[0].name+"",S,m,p,d,_,$,C,O,B,Mt,ot,T,at,F,st,U,G,Dt,X,N,Et,nt,Z=n[0].name+"",it,Wt,rt,I,ct,M,dt,Lt,V,D,ut,Bt,ft,Ht,g,Yt,pt,bt,mt,qt,ht,_t,j,kt,E,St,Ft,vt,W,wt,Nt,yt,It,k,Vt,H,jt,Jt,Qt,gt,Kt,Pt,zt,Gt,Xt,Rt,Zt,$t,J,Ct,L,Q,A=[],xt=new Map,te,K,P=[],ee=new Map,Y;function le(t,a){if(t[1]&&t[2])return Me;if(t[1])return Ue;if(t[2])return Te}let q=le(n),R=q&&q(n);T=new Ae({props:{js:` +import{S as Se,i as ve,s as we,N as ke,e as s,w as f,b as u,c as Ot,f as h,g as r,h as o,m as At,x as Tt,O as ce,P as ye,k as ge,Q as Pe,n as Re,t as tt,a as et,o as c,d as Ut,R as $e,C as de,p as Ce,r as lt,u as Oe}from"./index-ffbb9561.js";import{S as Ae}from"./SdkTabs-5b973c0d.js";function ue(n,e,l){const i=n.slice();return i[8]=e[l],i}function fe(n,e,l){const i=n.slice();return i[8]=e[l],i}function Te(n){let e;return{c(){e=f("email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Ue(n){let e;return{c(){e=f("username")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Me(n){let e;return{c(){e=f("username/email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function pe(n){let e;return{c(){e=s("strong"),e.textContent="username"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function be(n){let e;return{c(){e=f("or")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function me(n){let e;return{c(){e=s("strong"),e.textContent="email"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function he(n,e){let l,i=e[8].code+"",S,m,p,d;function _(){return e[7](e[8])}return{key:n,first:null,c(){l=s("button"),S=f(i),m=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m($,C){r($,l,C),o(l,S),o(l,m),p||(d=Oe(l,"click",_),p=!0)},p($,C){e=$,C&16&&i!==(i=e[8].code+"")&&Tt(S,i),C&24&<(l,"active",e[3]===e[8].code)},d($){$&&c(l),p=!1,d()}}}function _e(n,e){let l,i,S,m;return i=new ke({props:{content:e[8].body}}),{key:n,first:null,c(){l=s("div"),Ot(i.$$.fragment),S=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m(p,d){r(p,l,d),At(i,l,null),o(l,S),m=!0},p(p,d){e=p;const _={};d&16&&(_.content=e[8].body),i.$set(_),(!m||d&24)&<(l,"active",e[3]===e[8].code)},i(p){m||(tt(i.$$.fragment,p),m=!0)},o(p){et(i.$$.fragment,p),m=!1},d(p){p&&c(l),Ut(i)}}}function De(n){var se,ne;let e,l,i=n[0].name+"",S,m,p,d,_,$,C,O,B,Mt,ot,T,at,F,st,U,G,Dt,X,N,Et,nt,Z=n[0].name+"",it,Wt,rt,I,ct,M,dt,Lt,V,D,ut,Bt,ft,Ht,g,Yt,pt,bt,mt,qt,ht,_t,j,kt,E,St,Ft,vt,W,wt,Nt,yt,It,k,Vt,H,jt,Jt,Qt,gt,Kt,Pt,zt,Gt,Xt,Rt,Zt,$t,J,Ct,L,Q,A=[],xt=new Map,te,K,P=[],ee=new Map,Y;function le(t,a){if(t[1]&&t[2])return Me;if(t[1])return Ue;if(t[2])return Te}let q=le(n),R=q&&q(n);T=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[6]}'); diff --git a/ui/dist/assets/CodeEditor-4caff52a.js b/ui/dist/assets/CodeEditor-4caff52a.js new file mode 100644 index 00000000..9a707870 --- /dev/null +++ b/ui/dist/assets/CodeEditor-4caff52a.js @@ -0,0 +1,14 @@ +import{S as ut,i as St,s as ft,e as dt,f as $t,T as I,g as gt,y as jO,o as Pt,I as mt,J as bt,K as Xt,L as Zt,C as xt,M as yt}from"./index-ffbb9561.js";import{P as kt,N as vt,u as Yt,D as wt,v as vO,T as B,I as xe,w as rO,x as l,y as Tt,L as iO,z as sO,A as R,B as nO,F as ye,G as lO,H as _,J as ke,K as ve,E as w,M as z,O as Wt,Q as Vt,R as Ye,U as b,V as Ut,W as _t,X as Ct,a as C,h as qt,b as jt,c as Gt,d as Rt,e as zt,s as At,f as It,g as Et,i as Nt,r as Bt,j as Dt,k as Lt,l as Jt,m as Mt,n as Ht,o as Ft,p as Kt,q as Oa,t as GO,C as E}from"./index-a6ccb683.js";class M{constructor(O,a,t,r,i,s,n,o,Q,p=0,c){this.p=O,this.stack=a,this.state=t,this.reducePos=r,this.pos=i,this.score=s,this.buffer=n,this.bufferBase=o,this.curContext=Q,this.lookAhead=p,this.parent=c}toString(){return`[${this.stack.filter((O,a)=>a%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,a,t=0){let r=O.parser.context;return new M(O,[],a,t,t,0,[],0,r?new RO(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,a){this.stack.push(this.state,a,this.bufferBase+this.buffer.length),this.state=O}reduce(O){var a;let t=O>>19,r=O&65535,{parser:i}=this.p,s=i.dynamicPrecedence(r);if(s&&(this.score+=s),t==0){this.pushState(i.getGoto(this.state,r,!0),this.reducePos),r=2e3&&!(!((a=this.p.parser.nodeSet.types[r])===null||a===void 0)&&a.isAnonymous)&&(o==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=Q):this.p.lastBigReductionSizen;)this.stack.pop();this.reduceContext(r,o)}storeNode(O,a,t,r=4,i=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&s.buffer[n-4]==0&&s.buffer[n-1]>-1){if(a==t)return;if(s.buffer[n-2]>=a){s.buffer[n-2]=t;return}}}if(!i||this.pos==t)this.buffer.push(O,a,t,r);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>t;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,r>4&&(r-=4);this.buffer[s]=O,this.buffer[s+1]=a,this.buffer[s+2]=t,this.buffer[s+3]=r}}shift(O,a,t){let r=this.pos;if(O&131072)this.pushState(O&65535,this.pos);else if(O&262144)this.pos=t,this.shiftContext(a,r),a<=this.p.parser.maxNode&&this.buffer.push(a,r,t,4);else{let i=O,{parser:s}=this.p;(t>this.pos||a<=s.maxNode)&&(this.pos=t,s.stateFlag(i,1)||(this.reducePos=t)),this.pushState(i,r),this.shiftContext(a,r),a<=s.maxNode&&this.buffer.push(a,r,t,4)}}apply(O,a,t){O&65536?this.reduce(O):this.shift(O,a,t)}useNode(O,a){let t=this.p.reused.length-1;(t<0||this.p.reused[t]!=O)&&(this.p.reused.push(O),t++);let r=this.pos;this.reducePos=this.pos=r+O.length,this.pushState(a,r),this.buffer.push(t,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,O,this,this.p.stream.reset(this.pos-O.length)))}split(){let O=this,a=O.buffer.length;for(;a>0&&O.buffer[a-2]>O.reducePos;)a-=4;let t=O.buffer.slice(a),r=O.bufferBase+a;for(;O&&r==O.bufferBase;)O=O.parent;return new M(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,t,r,this.curContext,this.lookAhead,O)}recoverByDelete(O,a){let t=O<=this.p.parser.maxNode;t&&this.storeNode(O,this.pos,a,4),this.storeNode(0,this.pos,a,t?8:4),this.pos=this.reducePos=a,this.score-=190}canShift(O){for(let a=new ea(this);;){let t=this.p.parser.stateSlot(a.state,4)||this.p.parser.hasAction(a.state,O);if(t==0)return!1;if(!(t&65536))return!0;a.reduce(t)}}recoverByInsert(O){if(this.stack.length>=300)return[];let a=this.p.parser.nextStates(this.state);if(a.length>4<<1||this.stack.length>=120){let r=[];for(let i=0,s;io&1&&n==s)||r.push(a[i],s)}a=r}let t=[];for(let r=0;r>19,r=O&65535,i=this.stack.length-t*3;if(i<0||a.getGoto(this.stack[i],r,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(O),!0}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:O}=this.p;return O.data[O.stateSlot(this.state,1)]==65535&&!O.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(O){if(this.state!=O.state||this.stack.length!=O.stack.length)return!1;for(let a=0;athis.lookAhead&&(this.emitLookAhead(),this.lookAhead=O)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class RO{constructor(O,a){this.tracker=O,this.context=a,this.hash=O.strict?O.hash(a):0}}var zO;(function(e){e[e.Insert=200]="Insert",e[e.Delete=190]="Delete",e[e.Reduce=100]="Reduce",e[e.MaxNext=4]="MaxNext",e[e.MaxInsertStackDepth=300]="MaxInsertStackDepth",e[e.DampenInsertStackDepth=120]="DampenInsertStackDepth",e[e.MinBigReduction=2e3]="MinBigReduction"})(zO||(zO={}));class ea{constructor(O){this.start=O,this.state=O.state,this.stack=O.stack,this.base=this.stack.length}reduce(O){let a=O&65535,t=O>>19;t==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],a,!0);this.state=r}}class H{constructor(O,a,t){this.stack=O,this.pos=a,this.index=t,this.buffer=O.buffer,this.index==0&&this.maybeNext()}static create(O,a=O.bufferBase+O.buffer.length){return new H(O,a,a-O.bufferBase)}maybeNext(){let O=this.stack.parent;O!=null&&(this.index=this.stack.bufferBase-O.bufferBase,this.stack=O,this.buffer=O.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new H(this.stack,this.pos,this.index)}}function G(e,O=Uint16Array){if(typeof e!="string")return e;let a=null;for(let t=0,r=0;t=92&&s--,s>=34&&s--;let o=s-32;if(o>=46&&(o-=46,n=!0),i+=o,n)break;i*=46}a?a[r++]=i:a=new O(i)}return a}class D{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const AO=new D;class ta{constructor(O,a){this.input=O,this.ranges=a,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=AO,this.rangeIndex=0,this.pos=this.chunkPos=a[0].from,this.range=a[0],this.end=a[a.length-1].to,this.readNext()}resolveOffset(O,a){let t=this.range,r=this.rangeIndex,i=this.pos+O;for(;it.to:i>=t.to;){if(r==this.ranges.length-1)return null;let s=this.ranges[++r];i+=s.from-t.to,t=s}return i}clipPos(O){if(O>=this.range.from&&OO)return Math.max(O,a.from);return this.end}peek(O){let a=this.chunkOff+O,t,r;if(a>=0&&a=this.chunk2Pos&&tn.to&&(this.chunk2=this.chunk2.slice(0,n.to-t)),r=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),r}acceptToken(O,a=0){let t=a?this.resolveOffset(a,-1):this.pos;if(t==null||t=this.chunk2Pos&&this.posthis.range.to?O.slice(0,this.range.to-this.pos):O,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(O=1){for(this.chunkOff+=O;this.pos+O>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();O-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=O,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(O,a){if(a?(this.token=a,a.start=O,a.lookAhead=O+1,a.value=a.extended=-1):this.token=AO,this.pos!=O){if(this.pos=O,O==this.end)return this.setDone(),this;for(;O=this.range.to;)this.range=this.ranges[++this.rangeIndex];O>=this.chunkPos&&O=this.chunkPos&&a<=this.chunkPos+this.chunk.length)return this.chunk.slice(O-this.chunkPos,a-this.chunkPos);if(O>=this.chunk2Pos&&a<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(O-this.chunk2Pos,a-this.chunk2Pos);if(O>=this.range.from&&a<=this.range.to)return this.input.read(O,a);let t="";for(let r of this.ranges){if(r.from>=a)break;r.to>O&&(t+=this.input.read(Math.max(r.from,O),Math.min(r.to,a)))}return t}}class V{constructor(O,a){this.data=O,this.id=a}token(O,a){let{parser:t}=a.p;we(this.data,O,a,this.id,t.data,t.tokenPrecTable)}}V.prototype.contextual=V.prototype.fallback=V.prototype.extend=!1;class bO{constructor(O,a,t){this.precTable=a,this.elseToken=t,this.data=typeof O=="string"?G(O):O}token(O,a){let t=O.pos,r;for(;r=O.pos,we(this.data,O,a,0,this.data,this.precTable),!(O.token.value>-1);){if(this.elseToken==null)return;if(O.next<0)break;O.advance(),O.reset(r+1,O.token)}r>t&&(O.reset(t,O.token),O.acceptToken(this.elseToken,r-t))}}bO.prototype.contextual=V.prototype.fallback=V.prototype.extend=!1;class Z{constructor(O,a={}){this.token=O,this.contextual=!!a.contextual,this.fallback=!!a.fallback,this.extend=!!a.extend}}function we(e,O,a,t,r,i){let s=0,n=1<0){let f=e[h];if(o.allows(f)&&(O.token.value==-1||O.token.value==f||aa(f,O.token.value,r,i))){O.acceptToken(f);break}}let p=O.next,c=0,u=e[s+2];if(O.next<0&&u>c&&e[Q+u*3-3]==65535&&e[Q+u*3-3]==65535){s=e[Q+u*3-1];continue O}for(;c>1,f=Q+h+(h<<1),$=e[f],g=e[f+1]||65536;if(p<$)u=h;else if(p>=g)c=h+1;else{s=e[f+2],O.advance();continue O}}break}}function IO(e,O,a){for(let t=O,r;(r=e[t])!=65535;t++)if(r==a)return t-O;return-1}function aa(e,O,a,t){let r=IO(a,t,O);return r<0||IO(a,t,e)O)&&!t.type.isError)return a<0?Math.max(0,Math.min(t.to-1,O-25)):Math.min(e.length,Math.max(t.from+1,O+25));if(a<0?t.prevSibling():t.nextSibling())break;if(!t.parent())return a<0?0:e.length}}class ra{constructor(O,a){this.fragments=O,this.nodeSet=a,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let O=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(O){for(this.safeFrom=O.openStart?NO(O.tree,O.from+O.offset,1)-O.offset:O.from,this.safeTo=O.openEnd?NO(O.tree,O.to+O.offset,-1)-O.offset:O.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(O.tree),this.start.push(-O.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(O){if(OO)return this.nextStart=s,null;if(i instanceof B){if(s==O){if(s=Math.max(this.safeFrom,O)&&(this.trees.push(i),this.start.push(s),this.index.push(0))}else this.index[a]++,this.nextStart=s+i.length}}}class ia{constructor(O,a){this.stream=a,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=O.tokenizers.map(t=>new D)}getActions(O){let a=0,t=null,{parser:r}=O.p,{tokenizers:i}=r,s=r.stateSlot(O.state,3),n=O.curContext?O.curContext.hash:0,o=0;for(let Q=0;Qc.end+25&&(o=Math.max(c.lookAhead,o)),c.value!=0)){let u=a;if(c.extended>-1&&(a=this.addActions(O,c.extended,c.end,a)),a=this.addActions(O,c.value,c.end,a),!p.extend&&(t=c,a>u))break}}for(;this.actions.length>a;)this.actions.pop();return o&&O.setLookAhead(o),!t&&O.pos==this.stream.end&&(t=new D,t.value=O.p.parser.eofTerm,t.start=t.end=O.pos,a=this.addActions(O,t.value,t.end,a)),this.mainToken=t,this.actions}getMainToken(O){if(this.mainToken)return this.mainToken;let a=new D,{pos:t,p:r}=O;return a.start=t,a.end=Math.min(t+1,r.stream.end),a.value=t==r.stream.end?r.parser.eofTerm:0,a}updateCachedToken(O,a,t){let r=this.stream.clipPos(t.pos);if(a.token(this.stream.reset(r,O),t),O.value>-1){let{parser:i}=t.p;for(let s=0;s=0&&t.p.parser.dialect.allows(n>>1)){n&1?O.extended=n>>1:O.value=n>>1;break}}}else O.value=0,O.end=this.stream.clipPos(r+1)}putAction(O,a,t,r){for(let i=0;iO.bufferLength*4?new ra(t,O.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let O=this.stacks,a=this.minStackPos,t=this.stacks=[],r,i;if(this.bigReductionCount>300&&O.length==1){let[s]=O;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;sa)t.push(n);else{if(this.advanceStack(n,t,O))continue;{r||(r=[],i=[]),r.push(n);let o=this.tokens.getMainToken(n);i.push(o.value,o.end)}}break}}if(!t.length){let s=r&&la(r);if(s)return this.stackToTree(s);if(this.parser.strict)throw X&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+a);this.recovering||(this.recovering=5)}if(this.recovering&&r){let s=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,t);if(s)return this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(t.length>s)for(t.sort((n,o)=>o.score-n.score);t.length>s;)t.pop();t.some(n=>n.reducePos>a)&&this.recovering--}else if(t.length>1){O:for(let s=0;s500&&Q.buffer.length>500)if((n.score-Q.score||n.buffer.length-Q.buffer.length)>0)t.splice(o--,1);else{t.splice(s--,1);continue O}}}t.length>12&&t.splice(12,t.length-12)}this.minStackPos=t[0].pos;for(let s=1;s ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return O.forceReduce()?O:null;if(this.fragments){let Q=O.curContext&&O.curContext.tracker.strict,p=Q?O.curContext.hash:0;for(let c=this.fragments.nodeAt(r);c;){let u=this.parser.nodeSet.types[c.type.id]==c.type?i.getGoto(O.state,c.type.id):-1;if(u>-1&&c.length&&(!Q||(c.prop(vO.contextHash)||0)==p))return O.useNode(c,u),X&&console.log(s+this.stackID(O)+` (via reuse of ${i.getName(c.type.id)})`),!0;if(!(c instanceof B)||c.children.length==0||c.positions[0]>0)break;let h=c.children[0];if(h instanceof B&&c.positions[0]==0)c=h;else break}}let n=i.stateSlot(O.state,4);if(n>0)return O.reduce(n),X&&console.log(s+this.stackID(O)+` (via always-reduce ${i.getName(n&65535)})`),!0;if(O.stack.length>=15e3)for(;O.stack.length>9e3&&O.forceReduce(););let o=this.tokens.getActions(O);for(let Q=0;Qr?a.push(f):t.push(f)}return!1}advanceFully(O,a){let t=O.pos;for(;;){if(!this.advanceStack(O,null,null))return!1;if(O.pos>t)return DO(O,a),!0}}runRecovery(O,a,t){let r=null,i=!1;for(let s=0;s ":"";if(n.deadEnd&&(i||(i=!0,n.restart(),X&&console.log(p+this.stackID(n)+" (restarted)"),this.advanceFully(n,t))))continue;let c=n.split(),u=p;for(let h=0;c.forceReduce()&&h<10&&(X&&console.log(u+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,t));h++)X&&(u=this.stackID(c)+" -> ");for(let h of n.recoverByInsert(o))X&&console.log(p+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,t);this.stream.end>n.pos?(Q==n.pos&&(Q++,o=0),n.recoverByDelete(o,Q),X&&console.log(p+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),DO(n,t)):(!r||r.scoree;class Te{constructor(O){this.start=O.start,this.shift=O.shift||pO,this.reduce=O.reduce||pO,this.reuse=O.reuse||pO,this.hash=O.hash||(()=>0),this.strict=O.strict!==!1}}class T extends kt{constructor(O){if(super(),this.wrappers=[],O.version!=14)throw new RangeError(`Parser version (${O.version}) doesn't match runtime version (${14})`);let a=O.nodeNames.split(" ");this.minRepeatTerm=a.length;for(let n=0;nO.topRules[n][1]),r=[];for(let n=0;n=0)i(p,o,n[Q++]);else{let c=n[Q+-p];for(let u=-p;u>0;u--)i(n[Q++],o,c);Q++}}}this.nodeSet=new vt(a.map((n,o)=>Yt.define({name:o>=this.minRepeatTerm?void 0:n,id:o,props:r[o],top:t.indexOf(o)>-1,error:o==0,skipped:O.skippedNodes&&O.skippedNodes.indexOf(o)>-1}))),O.propSources&&(this.nodeSet=this.nodeSet.extend(...O.propSources)),this.strict=!1,this.bufferLength=wt;let s=G(O.tokenData);this.context=O.context,this.specializerSpecs=O.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;ntypeof n=="number"?new V(s,n):n),this.topRules=O.topRules,this.dialects=O.dialects||{},this.dynamicPrecedences=O.dynamicPrecedences||null,this.tokenPrecTable=O.tokenPrec,this.termNames=O.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(O,a,t){let r=new sa(this,O,a,t);for(let i of this.wrappers)r=i(r,O,a,t);return r}getGoto(O,a,t=!1){let r=this.goto;if(a>=r[0])return-1;for(let i=r[a+1];;){let s=r[i++],n=s&1,o=r[i++];if(n&&t)return o;for(let Q=i+(s>>1);i0}validAction(O,a){if(a==this.stateSlot(O,4))return!0;for(let t=this.stateSlot(O,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=x(this.data,t+2);else return!1;if(a==x(this.data,t+1))return!0}}nextStates(O){let a=[];for(let t=this.stateSlot(O,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=x(this.data,t+2);else break;if(!(this.data[t+2]&1)){let r=this.data[t+1];a.some((i,s)=>s&1&&i==r)||a.push(this.data[t],r)}}return a}configure(O){let a=Object.assign(Object.create(T.prototype),this);if(O.props&&(a.nodeSet=this.nodeSet.extend(...O.props)),O.top){let t=this.topRules[O.top];if(!t)throw new RangeError(`Invalid top rule name ${O.top}`);a.top=t}return O.tokenizers&&(a.tokenizers=this.tokenizers.map(t=>{let r=O.tokenizers.find(i=>i.from==t);return r?r.to:t})),O.specializers&&(a.specializers=this.specializers.slice(),a.specializerSpecs=this.specializerSpecs.map((t,r)=>{let i=O.specializers.find(n=>n.from==t.external);if(!i)return t;let s=Object.assign(Object.assign({},t),{external:i.to});return a.specializers[r]=LO(s),s})),O.contextTracker&&(a.context=O.contextTracker),O.dialect&&(a.dialect=this.parseDialect(O.dialect)),O.strict!=null&&(a.strict=O.strict),O.wrap&&(a.wrappers=a.wrappers.concat(O.wrap)),O.bufferLength!=null&&(a.bufferLength=O.bufferLength),a}hasWrappers(){return this.wrappers.length>0}getName(O){return this.termNames?this.termNames[O]:String(O<=this.maxNode&&this.nodeSet.types[O].name||O)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(O){let a=this.dynamicPrecedences;return a==null?0:a[O]||0}parseDialect(O){let a=Object.keys(this.dialects),t=a.map(()=>!1);if(O)for(let i of O.split(" ")){let s=a.indexOf(i);s>=0&&(t[s]=!0)}let r=null;for(let i=0;it)&&a.p.parser.stateFlag(a.state,2)&&(!O||O.scoree.external(a,t)<<1|O}return e.get}const oa=54,Qa=1,ca=55,ha=2,pa=56,ua=3,JO=4,Sa=5,F=6,We=7,Ve=8,Ue=9,_e=10,fa=11,da=12,$a=13,uO=57,ga=14,MO=58,Pa=20,ma=22,Ce=23,ba=24,XO=26,qe=27,Xa=28,Za=31,xa=34,je=36,ya=37,ka=0,va=1,Ya={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},wa={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},HO={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Ta(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function Ge(e){return e==9||e==10||e==13||e==32}let FO=null,KO=null,Oe=0;function ZO(e,O){let a=e.pos+O;if(Oe==a&&KO==e)return FO;let t=e.peek(O);for(;Ge(t);)t=e.peek(++O);let r="";for(;Ta(t);)r+=String.fromCharCode(t),t=e.peek(++O);return KO=e,Oe=a,FO=r?r.toLowerCase():t==Wa||t==Va?void 0:null}const Re=60,K=62,YO=47,Wa=63,Va=33,Ua=45;function ee(e,O){this.name=e,this.parent=O,this.hash=O?O.hash:0;for(let a=0;a-1?new ee(ZO(t,1)||"",e):e},reduce(e,O){return O==Pa&&e?e.parent:e},reuse(e,O,a,t){let r=O.type.id;return r==F||r==je?new ee(ZO(t,1)||"",e):e},hash(e){return e?e.hash:0},strict:!1}),qa=new Z((e,O)=>{if(e.next!=Re){e.next<0&&O.context&&e.acceptToken(uO);return}e.advance();let a=e.next==YO;a&&e.advance();let t=ZO(e,0);if(t===void 0)return;if(!t)return e.acceptToken(a?ga:F);let r=O.context?O.context.name:null;if(a){if(t==r)return e.acceptToken(fa);if(r&&wa[r])return e.acceptToken(uO,-2);if(O.dialectEnabled(ka))return e.acceptToken(da);for(let i=O.context;i;i=i.parent)if(i.name==t)return;e.acceptToken($a)}else{if(t=="script")return e.acceptToken(We);if(t=="style")return e.acceptToken(Ve);if(t=="textarea")return e.acceptToken(Ue);if(Ya.hasOwnProperty(t))return e.acceptToken(_e);r&&HO[r]&&HO[r][t]?e.acceptToken(uO,-1):e.acceptToken(F)}},{contextual:!0}),ja=new Z(e=>{for(let O=0,a=0;;a++){if(e.next<0){a&&e.acceptToken(MO);break}if(e.next==Ua)O++;else if(e.next==K&&O>=2){a>3&&e.acceptToken(MO,-2);break}else O=0;e.advance()}});function Ga(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}const Ra=new Z((e,O)=>{if(e.next==YO&&e.peek(1)==K){let a=O.dialectEnabled(va)||Ga(O.context);e.acceptToken(a?Sa:JO,2)}else e.next==K&&e.acceptToken(JO,1)});function wO(e,O,a){let t=2+e.length;return new Z(r=>{for(let i=0,s=0,n=0;;n++){if(r.next<0){n&&r.acceptToken(O);break}if(i==0&&r.next==Re||i==1&&r.next==YO||i>=2&&is?r.acceptToken(O,-s):r.acceptToken(a,-(s-2));break}else if((r.next==10||r.next==13)&&n){r.acceptToken(O,1);break}else i=s=0;r.advance()}})}const za=wO("script",oa,Qa),Aa=wO("style",ca,ha),Ia=wO("textarea",pa,ua),Ea=rO({"Text RawText":l.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":l.angleBracket,TagName:l.tagName,"MismatchedCloseTag/TagName":[l.tagName,l.invalid],AttributeName:l.attributeName,"AttributeValue UnquotedAttributeValue":l.attributeValue,Is:l.definitionOperator,"EntityReference CharacterReference":l.character,Comment:l.blockComment,ProcessingInst:l.processingInstruction,DoctypeDecl:l.documentMeta}),Na=T.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(fQ&rO1G/TOOOd1G/T1G/TO(nQ&rO1G/WOOO`1G/W1G/WOOO`1G/Y1G/YO(yQ&rO1G/YOOOa-E7[-E7[O)RQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)WQ#tO'#C|OOOd-E7^-E7^O)]Q#tO'#DPOOO`-E7_-E7_O)bQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O)gQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rOOO`7+$t7+$tO)rQ#|O,59eO)wQ#|O,59hO)|Q#|O,59kOOO`1G/X1G/XO*RO7[O'#CvO*dOMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O*uO7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+WOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:"+s~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OhyO~OS!OOhyO~OS!QOhyO~OS!SOT!TOhyO~OS!TOhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXhgXTgX~OS!fOhyO~OS!gOhyO~OS!hOhyO~OS!iOT!jOhyO~OS!jOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:Ca,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[Ea],skippedNodes:[0],repeatNodeCount:9,tokenData:"#%g!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs4ysv-_vw5iwxJ^x}-_}!OKP!O!P-_!P!Q$q!Q![-_![!]!!O!]!^-_!^!_!&W!_!`#$o!`!a&X!a!c-_!c!}!!O!}#R-_#R#S!!O#S#T3V#T#o!!O#o#s-_#s$f$q$f%W-_%W%o!!O%o%p-_%p&a!!O&a&b-_&b1p!!O1p4U-_4U4d!!O4d4e-_4e$IS!!O$IS$I`-_$I`$Ib!!O$Ib$Kh-_$Kh%#t!!O%#t&/x-_&/x&Et!!O&Et&FV-_&FV;'S!!O;'S;:j!&Q;:j;=`4s<%l?&r-_?&r?Ah!!O?Ah?BY$q?BY?Mn!!O?MnO$q!Z$|c`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bX`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UV`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pT`POv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!cpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({W`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!a`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!a`!cpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYkWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]``P!a`!cp!^^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_1n!_!a&X!a#S-_#S#T3V#T#s-_#s$f$q$f;'S-_;'S;=`4s<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/echSkWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!^!_0p!a#S/^#S#T0p#T#s/^#s$f+P$f;'S/^;'S;=`1h<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0uXhSqr0psw0px!P0p!Q!_0p!a#s0p$f;'S0p;'S;=`1b<%l?Ah0p?BY?Mn0pS1eP;=`<%l0p[1kP;=`<%l/^!U1wbhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!U3SP;=`<%l1n!V3bchS`P!a`!cpOq&Xqr3Vrs&}sv3Vvw0pwx(tx!P3V!P!Q&X!Q!^3V!^!_1n!_!a&X!a#s3V#s$f&X$f;'S3V;'S;=`4m<%l?Ah3V?Ah?BY&X?BY?Mn3V?MnO&X!V4pP;=`<%l3V!_4vP;=`<%l-_!Z5SV!`h`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_5rjhSkWc!ROX7dXZ8qZ[7d[^8q^p7dqr:crs8qst@Ttw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^/^!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!Z7ibkWOX7dXZ8qZ[7d[^8q^p7dqr7drs8qst+Ptw7dwx8qx!]7d!]!^9f!^!a8q!a#S7d#S#T8q#T;'S7d;'S;=`:]<%lO7d!R8tVOp8qqs8qt!]8q!]!^9Z!^;'S8q;'S;=`9`<%lO8q!R9`Oa!R!R9cP;=`<%l8q!Z9mYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z:`P;=`<%l7d!_:jjhSkWOX7dXZ8qZ[7d[^8q^p7dqr:crs8qst/^tw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^<[!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!_b#d#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!>kdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#V1n#V#W!?y#W#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!@SdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#h1n#h#i!Ab#i#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!AkdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#m1n#m#n!By#n#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!CSdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#d1n#d#e!Db#e#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!DkdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#X1n#X#Y!5]#Y#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!FSchS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!a!G_!a!b##T!b#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!R!GfY!a`!cpOr!G_rs!HUsv!G_vw!Hpwx!Jvx!a!G_!a!b!Lv!b;'S!G_;'S;=`!N]<%lO!G_q!HZV!cpOv!HUvx!Hpx!a!HU!a!b!Iq!b;'S!HU;'S;=`!Jp<%lO!HUP!HsTO!a!Hp!a!b!IS!b;'S!Hp;'S;=`!Ik<%lO!HpP!IVTO!`!Hp!`!a!If!a;'S!Hp;'S;=`!Ik<%lO!HpP!IkOxPP!InP;=`<%l!Hpq!IvV!cpOv!HUvx!Hpx!`!HU!`!a!J]!a;'S!HU;'S;=`!Jp<%lO!HUq!JdS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!JsP;=`<%l!HUa!J{X!a`Or!Jvrs!Hpsv!Jvvw!Hpw!a!Jv!a!b!Kh!b;'S!Jv;'S;=`!Lp<%lO!Jva!KmX!a`Or!Jvrs!Hpsv!Jvvw!Hpw!`!Jv!`!a!LY!a;'S!Jv;'S;=`!Lp<%lO!Jva!LaT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!LsP;=`<%l!Jv!R!L}Y!a`!cpOr!G_rs!HUsv!G_vw!Hpwx!Jvx!`!G_!`!a!Mm!a;'S!G_;'S;=`!N]<%lO!G_!R!MvV!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!N`P;=`<%l!G_T!NhbhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!a!Hp!a!b# p!b#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT# ubhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!`!Hp!`!a!If!a#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT##QP;=`<%l!Nc!V##^chS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!`!G_!`!a!Mm!a#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!V#$lP;=`<%l!Ey!V#$zXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[za,Aa,Ia,Ra,qa,ja,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:485},tokenPrec:487});function ze(e,O){let a=Object.create(null);for(let t of e.getChildren(Ce)){let r=t.getChild(ba),i=t.getChild(XO)||t.getChild(qe);r&&(a[O.read(r.from,r.to)]=i?i.type.id==XO?O.read(i.from+1,i.to-1):O.read(i.from,i.to):"")}return a}function te(e,O){let a=e.getChild(ma);return a?O.read(a.from,a.to):" "}function SO(e,O,a){let t;for(let r of a)if(!r.attrs||r.attrs(t||(t=ze(e.node.parent.firstChild,O))))return{parser:r.parser};return null}function Ae(e=[],O=[]){let a=[],t=[],r=[],i=[];for(let n of e)(n.tag=="script"?a:n.tag=="style"?t:n.tag=="textarea"?r:i).push(n);let s=O.length?Object.create(null):null;for(let n of O)(s[n.name]||(s[n.name]=[])).push(n);return Tt((n,o)=>{var p;let Q=n.type.id;if(Q==Xa)return SO(n,o,a);if(Q==Za)return SO(n,o,t);if(Q==xa)return SO(n,o,r);if(Q==je&&i.length){let c=n.node,u=te(c,o),h;for(let f of i)if(f.tag==u&&(!f.attrs||f.attrs(h||(h=ze(c,o))))){let $=c.parent.lastChild;return{parser:f.parser,overlay:[{from:n.to,to:$.type.id==ya?$.from:c.parent.to}]}}}if(s&&Q==Ce){let c=n.node,u;if(u=c.firstChild){let h=s[o.read(u.from,u.to)];if(h)for(let f of h){if(f.tagName&&f.tagName!=te(c.parent,o))continue;let $=c.lastChild;if($.type.id==XO){let g=$.from+1,v=$.to-((p=$.lastChild)!=null&&p.isError?0:1);if(v>g)return{parser:f.parser,overlay:[{from:g,to:v}]}}else if($.type.id==qe)return{parser:f.parser,overlay:[{from:$.from,to:$.to}]}}}}return null})}const Ba=94,ae=1,Da=95,La=96,re=2,Ie=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Ja=58,Ma=40,Ee=95,Ha=91,L=45,Fa=46,Ka=35,Or=37;function OO(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function er(e){return e>=48&&e<=57}const tr=new Z((e,O)=>{for(let a=!1,t=0,r=0;;r++){let{next:i}=e;if(OO(i)||i==L||i==Ee||a&&er(i))!a&&(i!=L||r>0)&&(a=!0),t===r&&i==L&&t++,e.advance();else{a&&e.acceptToken(i==Ma?Da:t==2&&O.canShift(re)?re:La);break}}}),ar=new Z(e=>{if(Ie.includes(e.peek(-1))){let{next:O}=e;(OO(O)||O==Ee||O==Ka||O==Fa||O==Ha||O==Ja||O==L)&&e.acceptToken(Ba)}}),rr=new Z(e=>{if(!Ie.includes(e.peek(-1))){let{next:O}=e;if(O==Or&&(e.advance(),e.acceptToken(ae)),OO(O)){do e.advance();while(OO(e.next));e.acceptToken(ae)}}}),ir=rO({"AtKeyword import charset namespace keyframes media supports":l.definitionKeyword,"from to selector":l.keyword,NamespaceName:l.namespace,KeyframeName:l.labelName,TagName:l.tagName,ClassName:l.className,PseudoClassName:l.constant(l.className),IdName:l.labelName,"FeatureName PropertyName":l.propertyName,AttributeName:l.attributeName,NumberLiteral:l.number,KeywordQuery:l.keyword,UnaryQueryOp:l.operatorKeyword,"CallTag ValueName":l.atom,VariableName:l.variableName,Callee:l.operatorKeyword,Unit:l.unit,"UniversalSelector NestingSelector":l.definitionOperator,MatchOp:l.compareOperator,"ChildOp SiblingOp, LogicOp":l.logicOperator,BinOp:l.arithmeticOperator,Important:l.modifier,Comment:l.blockComment,ParenthesizedContent:l.special(l.name),ColorLiteral:l.color,StringLiteral:l.string,":":l.punctuation,"PseudoOp #":l.derefOperator,"; ,":l.separator,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace}),sr={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},nr={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},lr={__proto__:null,not:128,only:128,from:158,to:160},or=T.deserialize({version:14,states:"7WQYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ed'#EdO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#DvO&OQ[O'#DyO&TQ[O'#EPO&cQ[O'#EROOQS'#Ec'#EcOOQS'#ET'#ETQYQ[OOO&jQXO'#CdO'_QWO'#DaO'dQWO'#EjO'oQ[O'#EjQOQWOOOOQP'#Cg'#CgOOQP,59Q,59QO#fQ[O,59QO'yQ[O'#EWO(eQWO,58{O(mQ[O,59SO$lQ[O,59kO$qQ[O,59oO'yQ[O,59sO'yQ[O,59uO'yQ[O,59vO(xQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)PQWO,59SO)UQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)ZQ`O,59oOOQS'#Cp'#CpO$vQdO'#CqO)cQvO'#CsO*pQtO,5:POOQO'#Cx'#CxO)UQWO'#CwO+UQWO'#CyOOQS'#Eg'#EgOOQO'#Dh'#DhO+ZQ[O'#DoO+iQWO'#EkO&TQ[O'#DmO+wQWO'#DpOOQO'#El'#ElO(hQWO,5:^O+|QpO,5:`OOQS'#Dx'#DxO,UQWO,5:bO,ZQ[O,5:bOOQO'#D{'#D{O,cQWO,5:eO,hQWO,5:kO,pQWO,5:mOOQS-E8R-E8RO$vQdO,59{O,xQ[O'#EYO-VQWO,5;UO-VQWO,5;UOOQP1G.l1G.lO-|QXO,5:rOOQO-E8U-E8UOOQS1G.g1G.gOOQP1G.n1G.nO)PQWO1G.nO)UQWO1G.nOOQP1G/V1G/VO.ZQ`O1G/ZO.tQXO1G/_O/[QXO1G/aO/rQXO1G/bO0YQWO,59zO0_Q[O'#DOO0fQdO'#CoOOQP1G/Z1G/ZO$vQdO1G/ZO0mQpO,59]OOQS,59_,59_O$vQdO,59aO0uQWO1G/kOOQS,59c,59cO0zQ!bO,59eO1SQWO'#DhO1_QWO,5:TO1dQWO,5:ZO&TQ[O,5:VO&TQ[O'#EZO1lQWO,5;VO1wQWO,5:XO'yQ[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O2YQWO1G/|O2_QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO2mQtO1G/gOOQO,5:t,5:tO3TQ[O,5:tOOQO-E8W-E8WO3bQWO1G0pOOQP7+$Y7+$YOOQP7+$u7+$uO$vQdO7+$uOOQS1G/f1G/fO3mQXO'#EiO3tQWO,59jO3yQtO'#EUO4nQdO'#EfO4xQWO,59ZO4}QpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO5VQWO1G/PO$vQdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO5[QWO,5:uOOQO-E8X-E8XO5jQXO1G/vOOQS7+%h7+%hO5qQYO'#CsO(hQWO'#E[O5yQdO,5:hOOQS,5:h,5:hO6XQtO'#EXO$vQdO'#EXO7VQdO7+%ROOQO7+%R7+%ROOQO1G0`1G0`O7jQpO<T![;'S%^;'S;=`%o<%lO%^^;TUoWOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^^;nYoW#[UOy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^^[[oW#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^_?VSpVOy%^z;'S%^;'S;=`%o<%lO%^^?hWjSOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^_@VU#XPOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjSOy%^z{@}{;'S%^;'S;=`%o<%lO%^~ASUoWOy@}yzAfz{Bm{;'S@};'S;=`Co<%lO@}~AiTOzAfz{Ax{;'SAf;'S;=`Bg<%lOAf~A{VOzAfz{Ax{!PAf!P!QBb!Q;'SAf;'S;=`Bg<%lOAf~BgOR~~BjP;=`<%lAf~BrWoWOy@}yzAfz{Bm{!P@}!P!QC[!Q;'S@};'S;=`Co<%lO@}~CcSoWR~Oy%^z;'S%^;'S;=`%o<%lO%^~CrP;=`<%l@}^Cz[#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^XDuU]POy%^z![%^![!]EX!];'S%^;'S;=`%o<%lO%^XE`S^PoWOy%^z;'S%^;'S;=`%o<%lO%^_EqS!WVOy%^z;'S%^;'S;=`%o<%lO%^YFSSzQOy%^z;'S%^;'S;=`%o<%lO%^XFeU|POy%^z!`%^!`!aFw!a;'S%^;'S;=`%o<%lO%^XGOS|PoWOy%^z;'S%^;'S;=`%o<%lO%^XG_WOy%^z!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHO[!YPoWOy%^z}%^}!OGw!O!Q%^!Q![Gw![!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHySxPOy%^z;'S%^;'S;=`%o<%lO%^^I[SvUOy%^z;'S%^;'S;=`%o<%lO%^XIkUOy%^z#b%^#b#cI}#c;'S%^;'S;=`%o<%lO%^XJSUoWOy%^z#W%^#W#XJf#X;'S%^;'S;=`%o<%lO%^XJmS!`PoWOy%^z;'S%^;'S;=`%o<%lO%^XJ|UOy%^z#f%^#f#gJf#g;'S%^;'S;=`%o<%lO%^XKeS!RPOy%^z;'S%^;'S;=`%o<%lO%^_KvS!QVOy%^z;'S%^;'S;=`%o<%lO%^ZLXU!PPOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^WLnP;=`<%l$}",tokenizers:[ar,rr,tr,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:95,get:e=>sr[e]||-1},{term:56,get:e=>nr[e]||-1},{term:96,get:e=>lr[e]||-1}],tokenPrec:1123});let fO=null;function dO(){if(!fO&&typeof document=="object"&&document.body){let{style:e}=document.body,O=[],a=new Set;for(let t in e)t!="cssText"&&t!="cssFloat"&&typeof e[t]=="string"&&(/[A-Z]/.test(t)&&(t=t.replace(/[A-Z]/g,r=>"-"+r.toLowerCase())),a.has(t)||(O.push(t),a.add(t)));fO=O.sort().map(t=>({type:"property",label:t}))}return fO||[]}const ie=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),se=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),Qr=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),k=/^[\w-]*/,cr=e=>{let{state:O,pos:a}=e,t=_(O).resolveInner(a,-1);if(t.name=="PropertyName")return{from:t.from,options:dO(),validFor:k};if(t.name=="ValueName")return{from:t.from,options:se,validFor:k};if(t.name=="PseudoClassName")return{from:t.from,options:ie,validFor:k};if(t.name=="TagName"){for(let{parent:s}=t;s;s=s.parent)if(s.name=="Block")return{from:t.from,options:dO(),validFor:k};return{from:t.from,options:Qr,validFor:k}}if(!e.explicit)return null;let r=t.resolve(a),i=r.childBefore(a);return i&&i.name==":"&&r.name=="PseudoClassSelector"?{from:a,options:ie,validFor:k}:i&&i.name==":"&&r.name=="Declaration"||r.name=="ArgList"?{from:a,options:se,validFor:k}:r.name=="Block"?{from:a,options:dO(),validFor:k}:null},eO=iO.define({name:"css",parser:or.configure({props:[sO.add({Declaration:R()}),nO.add({Block:ye})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function hr(){return new lO(eO,eO.data.of({autocomplete:cr}))}const ne=301,le=1,pr=2,oe=302,ur=304,Sr=305,fr=3,dr=4,$r=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Ne=125,gr=59,Qe=47,Pr=42,mr=43,br=45,Xr=new Te({start:!1,shift(e,O){return O==fr||O==dr||O==ur?e:O==Sr},strict:!1}),Zr=new Z((e,O)=>{let{next:a}=e;(a==Ne||a==-1||O.context)&&O.canShift(oe)&&e.acceptToken(oe)},{contextual:!0,fallback:!0}),xr=new Z((e,O)=>{let{next:a}=e,t;$r.indexOf(a)>-1||a==Qe&&((t=e.peek(1))==Qe||t==Pr)||a!=Ne&&a!=gr&&a!=-1&&!O.context&&O.canShift(ne)&&e.acceptToken(ne)},{contextual:!0}),yr=new Z((e,O)=>{let{next:a}=e;if((a==mr||a==br)&&(e.advance(),a==e.next)){e.advance();let t=!O.context&&O.canShift(le);e.acceptToken(t?le:pr)}},{contextual:!0}),kr=rO({"get set async static":l.modifier,"for while do if else switch try catch finally return throw break continue default case":l.controlKeyword,"in of await yield void typeof delete instanceof":l.operatorKeyword,"let var const function class extends":l.definitionKeyword,"import export from":l.moduleKeyword,"with debugger as new":l.keyword,TemplateString:l.special(l.string),super:l.atom,BooleanLiteral:l.bool,this:l.self,null:l.null,Star:l.modifier,VariableName:l.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":l.function(l.variableName),VariableDefinition:l.definition(l.variableName),Label:l.labelName,PropertyName:l.propertyName,PrivatePropertyName:l.special(l.propertyName),"CallExpression/MemberExpression/PropertyName":l.function(l.propertyName),"FunctionDeclaration/VariableDefinition":l.function(l.definition(l.variableName)),"ClassDeclaration/VariableDefinition":l.definition(l.className),PropertyDefinition:l.definition(l.propertyName),PrivatePropertyDefinition:l.definition(l.special(l.propertyName)),UpdateOp:l.updateOperator,LineComment:l.lineComment,BlockComment:l.blockComment,Number:l.number,String:l.string,Escape:l.escape,ArithOp:l.arithmeticOperator,LogicOp:l.logicOperator,BitOp:l.bitwiseOperator,CompareOp:l.compareOperator,RegExp:l.regexp,Equals:l.definitionOperator,Arrow:l.function(l.punctuation),": Spread":l.punctuation,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace,"InterpolationStart InterpolationEnd":l.special(l.brace),".":l.derefOperator,", ;":l.separator,"@":l.meta,TypeName:l.typeName,TypeDefinition:l.definition(l.typeName),"type enum interface implements namespace module declare":l.definitionKeyword,"abstract global Privacy readonly override":l.modifier,"is keyof unique infer":l.operatorKeyword,JSXAttributeValue:l.attributeValue,JSXText:l.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":l.angleBracket,"JSXIdentifier JSXNameSpacedName":l.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":l.attributeName,"JSXBuiltin/JSXIdentifier":l.standard(l.tagName)}),vr={__proto__:null,export:14,as:19,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:70,void:74,typeof:78,super:96,new:130,delete:146,yield:155,await:159,class:164,public:219,private:219,protected:219,readonly:221,instanceof:240,satisfies:243,in:244,const:246,import:278,keyof:333,unique:337,infer:343,is:379,abstract:399,implements:401,type:403,let:406,var:408,interface:415,enum:419,namespace:425,module:427,declare:431,global:435,for:456,of:465,while:468,with:472,do:476,if:480,else:482,switch:486,case:492,try:498,catch:502,finally:506,return:510,throw:514,break:518,continue:522,debugger:526},Yr={__proto__:null,async:117,get:119,set:121,public:181,private:181,protected:181,static:183,abstract:185,override:187,readonly:193,accessor:195,new:383},wr={__proto__:null,"<":137},Tr=T.deserialize({version:14,states:"$BhO`QUOOO%QQUOOO'TQWOOP(_OSOOO*mQ(CjO'#CfO*tOpO'#CgO+SO!bO'#CgO+bO07`O'#DZO-sQUO'#DaO.TQUO'#DlO%QQUO'#DvO0[QUO'#EOOOQ(CY'#EW'#EWO0rQSO'#ETOOQO'#I_'#I_O0zQSO'#GjOOQO'#Eh'#EhO1VQSO'#EgO1[QSO'#EgO3^Q(CjO'#JbO5}Q(CjO'#JcO6kQSO'#FVO6pQ#tO'#FnOOQ(CY'#F_'#F_O6{O&jO'#F_O7ZQ,UO'#FuO8qQSO'#FtOOQ(CY'#Jc'#JcOOQ(CW'#Jb'#JbOOQQ'#J|'#J|O8vQSO'#IOO8{Q(C[O'#IPOOQQ'#JO'#JOOOQQ'#IT'#ITQ`QUOOO%QQUO'#DnO9TQUO'#DzO%QQUO'#D|O9[QSO'#GjO9aQ,UO'#ClO9oQSO'#EfO9zQSO'#EqO:PQ,UO'#F^O:nQSO'#GjO:sQSO'#GnO;OQSO'#GnO;^QSO'#GqO;^QSO'#GrO;^QSO'#GtO9[QSO'#GwO;}QSO'#GzO=`QSO'#CbO=pQSO'#HXO=xQSO'#H_O=xQSO'#HaO`QUO'#HcO=xQSO'#HeO=xQSO'#HhO=}QSO'#HnO>SQ(C]O'#HtO%QQUO'#HvO>_Q(C]O'#HxO>jQ(C]O'#HzO8{Q(C[O'#H|O>uQ(CjO'#CfO?wQWO'#DfQOQSOOO@_QSO'#EPO9aQ,UO'#EfO@jQSO'#EfO@uQ`O'#F^OOQQ'#Cd'#CdOOQ(CW'#Dk'#DkOOQ(CW'#Jf'#JfO%QQUO'#JfOBOQWO'#E_OOQ(CW'#E^'#E^OBYQ(C`O'#E_OBtQWO'#ESOOQO'#Ji'#JiOCYQWO'#ESOCgQWO'#E_OC}QWO'#EeODQQWO'#E_O@}QWO'#E_OBtQWO'#E_PDkO?MpO'#C`POOO)CDm)CDmOOOO'#IU'#IUODvOpO,59ROOQ(CY,59R,59ROOOO'#IV'#IVOEUO!bO,59RO%QQUO'#D]OOOO'#IX'#IXOEdO07`O,59uOOQ(CY,59u,59uOErQUO'#IYOFVQSO'#JdOHXQbO'#JdO+pQUO'#JdOH`QSO,59{OHvQSO'#EhOITQSO'#JqOI`QSO'#JpOI`QSO'#JpOIhQSO,5;UOImQSO'#JoOOQ(CY,5:W,5:WOItQUO,5:WOKuQ(CjO,5:bOLfQSO,5:jOLkQSO'#JmOMeQ(C[O'#JnO:sQSO'#JmOMlQSO'#JmOMtQSO,5;TOMyQSO'#JmOOQ(CY'#Cf'#CfO%QQUO'#EOONmQ`O,5:oOOQO'#Jj'#JjOOQO-E<]-E<]O9[QSO,5=UO! TQSO,5=UO! YQUO,5;RO!#]Q,UO'#EcO!$pQSO,5;RO!&YQ,UO'#DpO!&aQUO'#DuO!&kQWO,5;[O!&sQWO,5;[O%QQUO,5;[OOQQ'#E}'#E}OOQQ'#FP'#FPO%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]OOQQ'#FT'#FTO!'RQUO,5;nOOQ(CY,5;s,5;sOOQ(CY,5;t,5;tO!)UQSO,5;tOOQ(CY,5;u,5;uO%QQUO'#IeO!)^Q(C[O,5jOOQQ'#JW'#JWOOQQ,5>k,5>kOOQQ-EgQWO'#EkOOQ(CW'#Jo'#JoO!>nQ(C[O'#J}O8{Q(C[O,5=YO;^QSO,5=`OOQO'#Cr'#CrO!>yQWO,5=]O!?RQ,UO,5=^O!?^QSO,5=`O!?cQ`O,5=cO=}QSO'#G|O9[QSO'#HOO!?kQSO'#HOO9aQ,UO'#HRO!?pQSO'#HROOQQ,5=f,5=fO!?uQSO'#HSO!?}QSO'#ClO!@SQSO,58|O!@^QSO,58|O!BfQUO,58|OOQQ,58|,58|O!BsQ(C[O,58|O%QQUO,58|O!COQUO'#HZOOQQ'#H['#H[OOQQ'#H]'#H]O`QUO,5=sO!C`QSO,5=sO`QUO,5=yO`QUO,5={O!CeQSO,5=}O`QUO,5>PO!CjQSO,5>SO!CoQUO,5>YOOQQ,5>`,5>`O%QQUO,5>`O8{Q(C[O,5>bOOQQ,5>d,5>dO!GvQSO,5>dOOQQ,5>f,5>fO!GvQSO,5>fOOQQ,5>h,5>hO!G{QWO'#DXO%QQUO'#JfO!HjQWO'#JfO!IXQWO'#DgO!IjQWO'#DgO!K{QUO'#DgO!LSQSO'#JeO!L[QSO,5:QO!LaQSO'#ElO!LoQSO'#JrO!LwQSO,5;VO!L|QWO'#DgO!MZQWO'#EROOQ(CY,5:k,5:kO%QQUO,5:kO!MbQSO,5:kO=}QSO,5;QO!;xQWO,5;QO!tO+pQUO,5>tOOQO,5>z,5>zO#$vQUO'#IYOOQO-EtO$8XQSO1G5jO$8aQSO1G5vO$8iQbO1G5wO:sQSO,5>zO$8sQSO1G5sO$8sQSO1G5sO:sQSO1G5sO$8{Q(CjO1G5tO%QQUO1G5tO$9]Q(C[O1G5tO$9nQSO,5>|O:sQSO,5>|OOQO,5>|,5>|O$:SQSO,5>|OOQO-E<`-E<`OOQO1G0]1G0]OOQO1G0_1G0_O!)XQSO1G0_OOQQ7+([7+([O!#]Q,UO7+([O%QQUO7+([O$:bQSO7+([O$:mQ,UO7+([O$:{Q(CjO,59nO$=TQ(CjO,5UOOQQ,5>U,5>UO%QQUO'#HkO%&qQSO'#HmOOQQ,5>[,5>[O:sQSO,5>[OOQQ,5>^,5>^OOQQ7+)`7+)`OOQQ7+)f7+)fOOQQ7+)j7+)jOOQQ7+)l7+)lO%&vQWO1G5lO%'[Q$IUO1G0rO%'fQSO1G0rOOQO1G/m1G/mO%'qQ$IUO1G/mO=}QSO1G/mO!'RQUO'#DgOOQO,5>u,5>uOOQO-E{,5>{OOQO-E<_-E<_O!;xQWO1G/mOOQO-E<[-E<[OOQ(CY1G0X1G0XOOQ(CY7+%q7+%qO!MeQSO7+%qOOQ(CY7+&W7+&WO=}QSO7+&WO!;xQWO7+&WOOQO7+%t7+%tO$7kQ(CjO7+&POOQO7+&P7+&PO%QQUO7+&PO%'{Q(C[O7+&PO=}QSO7+%tO!;xQWO7+%tO%(WQ(C[O7+&POBtQWO7+%tO%(fQ(C[O7+&PO%(zQ(C`O7+&PO%)UQWO7+%tOBtQWO7+&PO%)cQWO7+&PO%)yQSO7++_O%)yQSO7++_O%*RQ(CjO7++`O%QQUO7++`OOQO1G4h1G4hO:sQSO1G4hO%*cQSO1G4hOOQO7+%y7+%yO!MeQSO<vOOQO-EwO%QQUO,5>wOOQO-ESQ$IUO1G0wO%>ZQ$IUO1G0wO%@RQ$IUO1G0wO%@fQ(CjO<VOOQQ,5>X,5>XO&#WQSO1G3vO:sQSO7+&^O!'RQUO7+&^OOQO7+%X7+%XO&#]Q$IUO1G5wO=}QSO7+%XOOQ(CY<zAN>zO%QQUOAN?VO=}QSOAN>zO&<^Q(C[OAN?VO!;xQWOAN>zO&zO&RO!V+iO^(qX'j(qX~O#W+mO'|%OO~Og+pO!X$yO'|%OO~O!X+rO~Oy+tO!XXO~O!t+yO~Ob,OO~O's#jO!W(sP~Ob%lO~O%a!OO's%|O~PRO!V,yO!W(fa~O!W2SO~P'TO^%^O#W2]O'j%^O~O^%^O!a#rO#W2]O'j%^O~O^%^O!a#rO!h%ZO!l2aO#W2]O'j%^O'|%OO(`'dO~O!]2bO!^2bO't!iO~PBtO![2eO!]2bO!^2bO#S2fO#T2fO't!iO~PBtO![2eO!]2bO!^2bO#P2gO#S2fO#T2fO't!iO~PBtO^%^O!a#rO!l2aO#W2]O'j%^O(`'dO~O^%^O'j%^O~P!3jO!V$^Oo$ja~O!S&|i!V&|i~P!3jO!V'xO!S(Wi~O!V(PO!S(di~O!S(ei!V(ei~P!3jO!V(]O!g(ai~O!V(bi!g(bi^(bi'j(bi~P!3jO#W2kO!V(bi!g(bi^(bi'j(bi~O|%vO!X%wO!x]O#a2nO#b2mO's%eO~O|%vO!X%wO#b2mO's%eO~Og2uO!X'QO%`2tO~Og2uO!X'QO%`2tO'|%OO~O#cvaPvaXva^vakva!eva!fva!hva!lva#fva#gva#hva#iva#jva#kva#lva#mva#nva#pva#rva#tva#uva'jva(Qva(`va!gva!Sva'hvaova!Xva%`va!ava~P#M{O#c$kaP$kaX$ka^$kak$kaz$ka!e$ka!f$ka!h$ka!l$ka#f$ka#g$ka#h$ka#i$ka#j$ka#k$ka#l$ka#m$ka#n$ka#p$ka#r$ka#t$ka#u$ka'j$ka(Q$ka(`$ka!g$ka!S$ka'h$kao$ka!X$ka%`$ka!a$ka~P#NqO#c$maP$maX$ma^$mak$maz$ma!e$ma!f$ma!h$ma!l$ma#f$ma#g$ma#h$ma#i$ma#j$ma#k$ma#l$ma#m$ma#n$ma#p$ma#r$ma#t$ma#u$ma'j$ma(Q$ma(`$ma!g$ma!S$ma'h$mao$ma!X$ma%`$ma!a$ma~P$ dO#c${aP${aX${a^${ak${az${a!V${a!e${a!f${a!h${a!l${a#f${a#g${a#h${a#i${a#j${a#k${a#l${a#m${a#n${a#p${a#r${a#t${a#u${a'j${a(Q${a(`${a!g${a!S${a'h${a#W${ao${a!X${a%`${a!a${a~P#(yO^#Zq!V#Zq'j#Zq'h#Zq!S#Zq!g#Zqo#Zq!X#Zq%`#Zq!a#Zq~P!3jOd'OX!V'OX~P!$uO!V._Od(Za~O!U2}O!V'PX!g'PX~P%QO!V.bO!g([a~O!V.bO!g([a~P!3jO!S3QO~O#x!ja!W!ja~PI{O#x!ba!V!ba!W!ba~P#?dO#x!na!W!na~P!6TO#x!pa!W!pa~P!8nO!X3dO$TfO$^3eO~O!W3iO~Oo3jO~P#(yO^$gq!V$gq'j$gq'h$gq!S$gq!g$gqo$gq!X$gq%`$gq!a$gq~P!3jO!S3kO~Ol.}O'uTO'xUO~Oy)sO|)tO(h)xOg%Wi(g%Wi!V%Wi#W%Wi~Od%Wi#x%Wi~P$HbOy)sO|)tOg%Yi(g%Yi(h%Yi!V%Yi#W%Yi~Od%Yi#x%Yi~P$ITO(`$WO~P#(yO!U3nO's%eO!V'YX!g'YX~O!V/VO!g(ma~O!V/VO!a#rO!g(ma~O!V/VO!a#rO(`'dO!g(ma~Od$ti!V$ti#W$ti#x$ti~P!-jO!U3vO's*UO!S'[X!V'[X~P!.XO!V/_O!S(na~O!V/_O!S(na~P#(yO!a#rO~O!a#rO#n4OO~Ok4RO!a#rO(`'dO~Od(Oi!V(Oi~P!-jO#W4UOd(Oi!V(Oi~P!-jO!g4XO~O^$hq!V$hq'j$hq'h$hq!S$hq!g$hqo$hq!X$hq%`$hq!a$hq~P!3jO!V4]O!X(oX~P#(yO!f#tO~P3zO!X$rX%TYX^$rX!V$rX'j$rX~P!,aO%T4_OghXyhX|hX!XhX(ghX(hhX^hX!VhX'jhX~O%T4_O~O%a4fO's+WO'uTO'xUO!V'eX!W'eX~O!V0_O!W(ua~OX4jO~O]4kO~O!S4oO~O^%^O'j%^O~P#(yO!X$yO~P#(yO!V4tO#W4vO!W(rX~O!W4wO~Ol!kO|4yO![5WO!]4}O!^4}O!x;oO!|5VO!}5UO#O5UO#P5TO#S5SO#T!wO't!iO'uTO'xUO(T!jO(_!nO~O!W5RO~P%#XOg5]O!X0zO%`5[O~Og5]O!X0zO%`5[O'|%OO~O's#jO!V'dX!W'dX~O!V1VO!W(sa~O'uTO'xUO(T5fO~O]5jO~O!g5mO~P%QO^5oO~O^5oO~P%QO#n5qO&Q5rO~PMPO_1mO!W5vO&`1lO~P`O!a5xO~O!a5zO!V(Yi!W(Yi!a(Yi!h(Yi'|(Yi~O!V#`i!W#`i~P#?dO#W5{O!V#`i!W#`i~O!V!Zi!W!Zi~P#?dO^%^O#W6UO'j%^O~O^%^O!a#rO#W6UO'j%^O~O^%^O!a#rO!l6ZO#W6UO'j%^O(`'dO~O!h%ZO'|%OO~P%(fO!]6[O!^6[O't!iO~PBtO![6_O!]6[O!^6[O#S6`O#T6`O't!iO~PBtO!V(]O!g(aq~O!V(bq!g(bq^(bq'j(bq~P!3jO|%vO!X%wO#b6dO's%eO~O!X'QO%`6gO~Og6jO!X'QO%`6gO~O#c%WiP%WiX%Wi^%Wik%Wiz%Wi!e%Wi!f%Wi!h%Wi!l%Wi#f%Wi#g%Wi#h%Wi#i%Wi#j%Wi#k%Wi#l%Wi#m%Wi#n%Wi#p%Wi#r%Wi#t%Wi#u%Wi'j%Wi(Q%Wi(`%Wi!g%Wi!S%Wi'h%Wio%Wi!X%Wi%`%Wi!a%Wi~P$HbO#c%YiP%YiX%Yi^%Yik%Yiz%Yi!e%Yi!f%Yi!h%Yi!l%Yi#f%Yi#g%Yi#h%Yi#i%Yi#j%Yi#k%Yi#l%Yi#m%Yi#n%Yi#p%Yi#r%Yi#t%Yi#u%Yi'j%Yi(Q%Yi(`%Yi!g%Yi!S%Yi'h%Yio%Yi!X%Yi%`%Yi!a%Yi~P$ITO#c$tiP$tiX$ti^$tik$tiz$ti!V$ti!e$ti!f$ti!h$ti!l$ti#f$ti#g$ti#h$ti#i$ti#j$ti#k$ti#l$ti#m$ti#n$ti#p$ti#r$ti#t$ti#u$ti'j$ti(Q$ti(`$ti!g$ti!S$ti'h$ti#W$tio$ti!X$ti%`$ti!a$ti~P#(yOd'Oa!V'Oa~P!-jO!V'Pa!g'Pa~P!3jO!V.bO!g([i~O#x#Zi!V#Zi!W#Zi~P#?dOP$YOy#vOz#wO|#xO!f#tO!h#uO!l$YO(QVOX#eik#ei!e#ei#g#ei#h#ei#i#ei#j#ei#k#ei#l#ei#m#ei#n#ei#p#ei#r#ei#t#ei#u#ei#x#ei(`#ei(g#ei(h#ei!V#ei!W#ei~O#f#ei~P%2xO#f;wO~P%2xOP$YOy#vOz#wO|#xO!f#tO!h#uO!l$YO#f;wO#g;xO#h;xO#i;xO(QVOX#ei!e#ei#j#ei#k#ei#l#ei#m#ei#n#ei#p#ei#r#ei#t#ei#u#ei#x#ei(`#ei(g#ei(h#ei!V#ei!W#ei~Ok#ei~P%5TOk;yO~P%5TOP$YOk;yOy#vOz#wO|#xO!f#tO!h#uO!l$YO#f;wO#g;xO#h;xO#i;xO#j;zO(QVO#p#ei#r#ei#t#ei#u#ei#x#ei(`#ei(g#ei(h#ei!V#ei!W#ei~OX#ei!e#ei#k#ei#l#ei#m#ei#n#ei~P%7`OXbO^#vy!V#vy'j#vy'h#vy!S#vy!g#vyo#vy!X#vy%`#vy!a#vy~P!3jOg=jOy)sO|)tO(g)vO(h)xO~OP#eiX#eik#eiz#ei!e#ei!f#ei!h#ei!l#ei#f#ei#g#ei#h#ei#i#ei#j#ei#k#ei#l#ei#m#ei#n#ei#p#ei#r#ei#t#ei#u#ei#x#ei(Q#ei(`#ei!V#ei!W#ei~P%AYO!f#tOP(PXX(PXg(PXk(PXy(PXz(PX|(PX!e(PX!h(PX!l(PX#f(PX#g(PX#h(PX#i(PX#j(PX#k(PX#l(PX#m(PX#n(PX#p(PX#r(PX#t(PX#u(PX#x(PX(Q(PX(`(PX(g(PX(h(PX!V(PX!W(PX~O#x#yi!V#yi!W#yi~P#?dO#x!ni!W!ni~P$!qO!W6vO~O!V'Xa!W'Xa~P#?dO!a#rO(`'dO!V'Ya!g'Ya~O!V/VO!g(mi~O!V/VO!a#rO!g(mi~Od$tq!V$tq#W$tq#x$tq~P!-jO!S'[a!V'[a~P#(yO!a6}O~O!V/_O!S(ni~P#(yO!V/_O!S(ni~O!S7RO~O!a#rO#n7WO~Ok7XO!a#rO(`'dO~O!S7ZO~Od$vq!V$vq#W$vq#x$vq~P!-jO^$hy!V$hy'j$hy'h$hy!S$hy!g$hyo$hy!X$hy%`$hy!a$hy~P!3jO!V4]O!X(oa~O^#Zy!V#Zy'j#Zy'h#Zy!S#Zy!g#Zyo#Zy!X#Zy%`#Zy!a#Zy~P!3jOX7`O~O!V0_O!W(ui~O]7fO~O!a5zO~O(T(qO!V'aX!W'aX~O!V4tO!W(ra~O!h%ZO'|%OO^(YX!a(YX!l(YX#W(YX'j(YX(`(YX~O's7oO~P.[O!x;oO!|7rO!}7qO#O7qO#P7pO#S'bO#T'bO~PBtO^%^O!a#rO!l'hO#W'fO'j%^O(`'dO~O!W7vO~P%#XOl!kO'uTO'xUO(T!jO(_!nO~O|7wO~P%MdO![7{O!]7zO!^7zO#P7pO#S'bO#T'bO't!iO~PBtO![7{O!]7zO!^7zO!}7|O#O7|O#P7pO#S'bO#T'bO't!iO~PBtO!]7zO!^7zO't!iO(T!jO(_!nO~O!X0zO~O!X0zO%`8OO~Og8RO!X0zO%`8OO~OX8WO!V'da!W'da~O!V1VO!W(si~O!g8[O~O!g8]O~O!g8^O~O!g8^O~P%QO^8`O~O!a8cO~O!g8dO~O!V(ei!W(ei~P#?dO^%^O#W8lO'j%^O~O^%^O!a#rO#W8lO'j%^O~O^%^O!a#rO!l8pO#W8lO'j%^O(`'dO~O!h%ZO'|%OO~P&$QO!]8qO!^8qO't!iO~PBtO!V(]O!g(ay~O!V(by!g(by^(by'j(by~P!3jO!X'QO%`8uO~O#c$tqP$tqX$tq^$tqk$tqz$tq!V$tq!e$tq!f$tq!h$tq!l$tq#f$tq#g$tq#h$tq#i$tq#j$tq#k$tq#l$tq#m$tq#n$tq#p$tq#r$tq#t$tq#u$tq'j$tq(Q$tq(`$tq!g$tq!S$tq'h$tq#W$tqo$tq!X$tq%`$tq!a$tq~P#(yO#c$vqP$vqX$vq^$vqk$vqz$vq!V$vq!e$vq!f$vq!h$vq!l$vq#f$vq#g$vq#h$vq#i$vq#j$vq#k$vq#l$vq#m$vq#n$vq#p$vq#r$vq#t$vq#u$vq'j$vq(Q$vq(`$vq!g$vq!S$vq'h$vq#W$vqo$vq!X$vq%`$vq!a$vq~P#(yO!V'Pi!g'Pi~P!3jO#x#Zq!V#Zq!W#Zq~P#?dOy/yOz/yO|/zOPvaXvagvakva!eva!fva!hva!lva#fva#gva#hva#iva#jva#kva#lva#mva#nva#pva#rva#tva#uva#xva(Qva(`va(gva(hva!Vva!Wva~Oy)sO|)tOP$kaX$kag$kak$kaz$ka!e$ka!f$ka!h$ka!l$ka#f$ka#g$ka#h$ka#i$ka#j$ka#k$ka#l$ka#m$ka#n$ka#p$ka#r$ka#t$ka#u$ka#x$ka(Q$ka(`$ka(g$ka(h$ka!V$ka!W$ka~Oy)sO|)tOP$maX$mag$mak$maz$ma!e$ma!f$ma!h$ma!l$ma#f$ma#g$ma#h$ma#i$ma#j$ma#k$ma#l$ma#m$ma#n$ma#p$ma#r$ma#t$ma#u$ma#x$ma(Q$ma(`$ma(g$ma(h$ma!V$ma!W$ma~OP${aX${ak${az${a!e${a!f${a!h${a!l${a#f${a#g${a#h${a#i${a#j${a#k${a#l${a#m${a#n${a#p${a#r${a#t${a#u${a#x${a(Q${a(`${a!V${a!W${a~P%AYO#x$gq!V$gq!W$gq~P#?dO#x$hq!V$hq!W$hq~P#?dO!W9PO~O#x9QO~P!-jO!a#rO!V'Yi!g'Yi~O!a#rO(`'dO!V'Yi!g'Yi~O!V/VO!g(mq~O!S'[i!V'[i~P#(yO!V/_O!S(nq~O!S9WO~P#(yO!S9WO~Od(Oy!V(Oy~P!-jO!V'_a!X'_a~P#(yO!X%Sq^%Sq!V%Sq'j%Sq~P#(yOX9]O~O!V0_O!W(uq~O#W9aO!V'aa!W'aa~O!V4tO!W(ri~P#?dOPYXXYXkYXyYXzYX|YX!SYX!VYX!eYX!fYX!hYX!lYX#WYX#ccX#fYX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#pYX#rYX#tYX#uYX#zYX(QYX(`YX(gYX(hYX~O!a%QX#n%QX~P&6lO#S-cO#T-cO~PBtO#P9eO#S-cO#T-cO~PBtO!}9fO#O9fO#P9eO#S-cO#T-cO~PBtO!]9iO!^9iO't!iO(T!jO(_!nO~O![9lO!]9iO!^9iO#P9eO#S-cO#T-cO't!iO~PBtO!X0zO%`9oO~O'uTO'xUO(T9tO~O!V1VO!W(sq~O!g9wO~O!g9wO~P%QO!g9yO~O!g9zO~O#W9|O!V#`y!W#`y~O!V#`y!W#`y~P#?dO^%^O#W:QO'j%^O~O^%^O!a#rO#W:QO'j%^O~O^%^O!a#rO!l:UO#W:QO'j%^O(`'dO~O!X'QO%`:XO~O#x#vy!V#vy!W#vy~P#?dOP$tiX$tik$tiz$ti!e$ti!f$ti!h$ti!l$ti#f$ti#g$ti#h$ti#i$ti#j$ti#k$ti#l$ti#m$ti#n$ti#p$ti#r$ti#t$ti#u$ti#x$ti(Q$ti(`$ti!V$ti!W$ti~P%AYOy)sO|)tO(h)xOP%WiX%Wig%Wik%Wiz%Wi!e%Wi!f%Wi!h%Wi!l%Wi#f%Wi#g%Wi#h%Wi#i%Wi#j%Wi#k%Wi#l%Wi#m%Wi#n%Wi#p%Wi#r%Wi#t%Wi#u%Wi#x%Wi(Q%Wi(`%Wi(g%Wi!V%Wi!W%Wi~Oy)sO|)tOP%YiX%Yig%Yik%Yiz%Yi!e%Yi!f%Yi!h%Yi!l%Yi#f%Yi#g%Yi#h%Yi#i%Yi#j%Yi#k%Yi#l%Yi#m%Yi#n%Yi#p%Yi#r%Yi#t%Yi#u%Yi#x%Yi(Q%Yi(`%Yi(g%Yi(h%Yi!V%Yi!W%Yi~O#x$hy!V$hy!W$hy~P#?dO#x#Zy!V#Zy!W#Zy~P#?dO!a#rO!V'Yq!g'Yq~O!V/VO!g(my~O!S'[q!V'[q~P#(yO!S:`O~P#(yO!V0_O!W(uy~O!V4tO!W(rq~O#S2fO#T2fO~PBtO#P:gO#S2fO#T2fO~PBtO!]:kO!^:kO't!iO(T!jO(_!nO~O!X0zO%`:nO~O!g:qO~O^%^O#W:vO'j%^O~O^%^O!a#rO#W:vO'j%^O~O!X'QO%`:{O~OP$tqX$tqk$tqz$tq!e$tq!f$tq!h$tq!l$tq#f$tq#g$tq#h$tq#i$tq#j$tq#k$tq#l$tq#m$tq#n$tq#p$tq#r$tq#t$tq#u$tq#x$tq(Q$tq(`$tq!V$tq!W$tq~P%AYOP$vqX$vqk$vqz$vq!e$vq!f$vq!h$vq!l$vq#f$vq#g$vq#h$vq#i$vq#j$vq#k$vq#l$vq#m$vq#n$vq#p$vq#r$vq#t$vq#u$vq#x$vq(Q$vq(`$vq!V$vq!W$vq~P%AYOd%[!Z!V%[!Z#W%[!Z#x%[!Z~P!-jO!V'aq!W'aq~P#?dO#S6`O#T6`O~PBtO!V#`!Z!W#`!Z~P#?dO^%^O#W;ZO'j%^O~O#c%[!ZP%[!ZX%[!Z^%[!Zk%[!Zz%[!Z!V%[!Z!e%[!Z!f%[!Z!h%[!Z!l%[!Z#f%[!Z#g%[!Z#h%[!Z#i%[!Z#j%[!Z#k%[!Z#l%[!Z#m%[!Z#n%[!Z#p%[!Z#r%[!Z#t%[!Z#u%[!Z'j%[!Z(Q%[!Z(`%[!Z!g%[!Z!S%[!Z'h%[!Z#W%[!Zo%[!Z!X%[!Z%`%[!Z!a%[!Z~P#(yOP%[!ZX%[!Zk%[!Zz%[!Z!e%[!Z!f%[!Z!h%[!Z!l%[!Z#f%[!Z#g%[!Z#h%[!Z#i%[!Z#j%[!Z#k%[!Z#l%[!Z#m%[!Z#n%[!Z#p%[!Z#r%[!Z#t%[!Z#u%[!Z#x%[!Z(Q%[!Z(`%[!Z!V%[!Z!W%[!Z~P%AYOo(UX~P1dO't!iO~P!'RO!ScX!VcX#WcX~P&6lOPYXXYXkYXyYXzYX|YX!VYX!VcX!eYX!fYX!hYX!lYX#WYX#WcX#ccX#fYX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#pYX#rYX#tYX#uYX#zYX(QYX(`YX(gYX(hYX~O!acX!gYX!gcX(`cX~P'!sOP;nOQ;nOa=_Ob!fOikOk;nOlkOmkOskOu;nOw;nO|WO!QkO!RkO!XXO!c;qO!hZO!k;nO!l;nO!m;nO!o;rO!q;sO!t!eO$P!hO$TfO's)RO'uTO'xUO(QVO(_[O(l=]O~O!Vv!>v!BnPPP!BuHdPPPPPPPPPPP!FTP!GiPPHd!HyPHdPHdHdHdHdPHd!J`PP!MiP#!nP#!r#!|##Q##QP!MfP##U##UP#&ZP#&_HdHd#&e#)iAQPAQPAQAQP#*sAQAQ#,mAQ#.zAQ#0nAQAQ#1[#3W#3W#3[#3d#3W#3lP#3WPAQ#4hAQ#5pAQAQ6iPPP#6{PP#7e#7eP#7eP#7z#7ePP#8QP#7wP#7w#8d!1p#7w#9O#9U6f(}#9X(}P#9`#9`#9`P(}P(}P(}P(}PP(}P#9f#9iP#9i(}P#9mP#9pP(}P(}P(}P(}P(}P(}(}PP#9v#9|#:W#:^#:d#:j#:p#;O#;U#;[#;f#;l#b#?r#@Q#@W#@^#@d#@j#@t#@z#AQ#A[#An#AtPPPPPPPPPP#AzPPPPPPP#Bn#FYP#Gu#G|#HUPPPP#L`$ U$'t$'w$'z$)w$)z$)}$*UPP$*[$*`$+X$,X$,]$,qPP$,u$,{$-PP$-S$-W$-Z$.P$.g$.l$.o$.r$.x$.{$/P$/TR!yRmpOXr!X#a%]&d&f&g&i,^,c1g1jU!pQ'Q-OQ%ctQ%kwQ%rzQ&[!TS&x!c,vQ'W!f[']!m!r!s!t!u!vS*[$y*aQ+U%lQ+c%tQ+}&UQ,|'PQ-W'XW-`'^'_'`'aQ/p*cQ1U,OU2b-b-d-eS4}0z5QS6[2e2gU7z5U5V5WQ8q6_S9i7{7|Q:k9lR TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody MethodDeclaration AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:362,context:Xr,nodeProps:[["group",-26,6,14,16,62,198,202,205,206,208,211,214,225,227,233,235,237,239,242,248,254,256,258,260,262,264,265,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,102,103,112,113,130,133,135,136,137,138,140,141,161,162,164,"Expression",-23,24,26,30,34,36,38,165,167,169,170,172,173,174,176,177,178,180,181,182,192,194,196,197,"Type",-3,84,95,101,"ClassItem"],["openedBy",31,"InterpolationStart",50,"[",54,"{",69,"(",142,"JSXStartTag",154,"JSXStartTag JSXStartCloseTag"],["closedBy",33,"InterpolationEnd",44,"]",55,"}",70,")",143,"JSXSelfCloseEndTag JSXEndTag",159,"JSXEndTag"]],propSources:[kr],skippedNodes:[0,3,4,268],repeatNodeCount:32,tokenData:"$>y(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tu>PuvBavwDxwxGgxyMvyz! Qz{!![{|!%O|}!&]}!O!%O!O!P!'g!P!Q!1w!Q!R#0t!R![#3T![!]#@T!]!^#Aa!^!_#Bk!_!`#GS!`!a#In!a!b#N{!b!c$$z!c!}>P!}#O$&U#O#P$'`#P#Q$,w#Q#R$.R#R#S>P#S#T$/`#T#o$0j#o#p$4z#p#q$5p#q#r$7Q#r#s$8^#s$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$I|>P$I|$I}$P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(n%d_$c&j'vp'y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$c&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$c&j'y!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU'y!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$c&j'vpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU'vpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX'vp'y!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$c&j'vp'y!b'l(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST'w#S$c&j'm(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$c&j'vp'y!b'm(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$c&j!l$Ip'vp'y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#p$Id$c&j'vp'y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#p$Id$c&j'vp'y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$2b3l_'u$(n$c&j'y!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k*r4r_$c&j'y!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k)`5vX$c&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q)`6jT$^#t$c&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#t6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y#t7bO$^#t#t7eP;=`<%l6y)`7kP;=`<%l5q*r7w]$^#t$c&j'y!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}%W8uZ'y!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p%W9oU$^#t'y!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}%W:UP;=`<%l8p*r:[P;=`<%l4k#%|:hg$c&j'vp'y!bOY%ZYZ&cZr%Zrs&}st%Ztu`k$c&j'vp'y!b(T!LY's&;d$V#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P+d@`k$c&j'vp'y!b$V#tOY%ZYZ&cZr%Zrs&}st%Ztu@Tuw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![@T![!^%Z!^!_*g!_!c%Z!c!}@T!}#O%Z#O#P&c#P#R%Z#R#S@T#S#T%Z#T#o@T#o#p*g#p$g%Z$g;'S@T;'S;=`BT<%lO@T+dBWP;=`<%l@T(CSB^P;=`<%l>P%#SBl`$c&j'vp'y!b#h$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#SCy_$c&j#z$Id'vp'y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%DfETa(h%Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#>fi$c&j'vp'y!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#>Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#b%Z#b#c#5T#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%Gh#@b_!a$b$c&j#x%Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$JT>P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(CS$=Uk$c&j'vp'y!b'm(;d(T!LY's&;d$V#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P",tokenizers:[xr,yr,2,3,4,5,6,7,8,9,10,11,12,13,Zr,new bO("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOq~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!O~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(S~~",141,325),new bO("j~RQYZXz{^~^O'p~~aP!P!Qd~iO'q~~",25,307)],topRules:{Script:[0,5],SingleExpression:[1,266],SingleClassItem:[2,267]},dialects:{jsx:13213,ts:13215},dynamicPrecedences:{76:1,78:1,162:1,190:1},specialized:[{term:311,get:e=>vr[e]||-1},{term:327,get:e=>Yr[e]||-1},{term:67,get:e=>wr[e]||-1}],tokenPrec:13238}),Wr=[b("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),b("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),b("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),b("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),b("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),b(`try { + \${} +} catch (\${error}) { + \${} +}`,{label:"try",detail:"/ catch block",type:"keyword"}),b("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),b(`if (\${}) { + \${} +} else { + \${} +}`,{label:"if",detail:"/ else block",type:"keyword"}),b(`class \${name} { + constructor(\${params}) { + \${} + } +}`,{label:"class",detail:"definition",type:"keyword"}),b('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),b('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],ce=new _t,Be=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function q(e){return(O,a)=>{let t=O.node.getChild("VariableDefinition");return t&&a(t,e),!0}}const Vr=["FunctionDeclaration"],Ur={FunctionDeclaration:q("function"),ClassDeclaration:q("class"),ClassExpression:()=>!0,EnumDeclaration:q("constant"),TypeAliasDeclaration:q("type"),NamespaceDeclaration:q("namespace"),VariableDefinition(e,O){e.matchContext(Vr)||O(e,"variable")},TypeDefinition(e,O){O(e,"type")},__proto__:null};function De(e,O){let a=ce.get(O);if(a)return a;let t=[],r=!0;function i(s,n){let o=e.sliceString(s.from,s.to);t.push({label:o,type:n})}return O.cursor(xe.IncludeAnonymous).iterate(s=>{if(r)r=!1;else if(s.name){let n=Ur[s.name];if(n&&n(s,i)||Be.has(s.name))return!1}else if(s.to-s.from>8192){for(let n of De(e,s.node))t.push(n);return!1}}),ce.set(O,t),t}const he=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,Le=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName"];function _r(e){let O=_(e.state).resolveInner(e.pos,-1);if(Le.indexOf(O.name)>-1)return null;let a=O.name=="VariableName"||O.to-O.from<20&&he.test(e.state.sliceDoc(O.from,O.to));if(!a&&!e.explicit)return null;let t=[];for(let r=O;r;r=r.parent)Be.has(r.name)&&(t=t.concat(De(e.state.doc,r)));return{options:t,from:a?O.from:e.pos,validFor:he}}const y=iO.define({name:"javascript",parser:Tr.configure({props:[sO.add({IfStatement:R({except:/^\s*({|else\b)/}),TryStatement:R({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Wt,SwitchBody:e=>{let O=e.textAfter,a=/^\s*\}/.test(O),t=/^\s*(case|default)\b/.test(O);return e.baseIndent+(a?0:t?1:2)*e.unit},Block:Vt({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":R({except:/^{/}),JSXElement(e){let O=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(O?0:e.unit)},JSXEscape(e){let O=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(O?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),nO.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression":ye,BlockComment(e){return{from:e.from+2,to:e.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Je={test:e=>/^JSX/.test(e.name),facet:Ut({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Me=y.configure({dialect:"ts"},"typescript"),He=y.configure({dialect:"jsx",props:[Ye.add(e=>e.isTop?[Je]:void 0)]}),Fe=y.configure({dialect:"jsx ts",props:[Ye.add(e=>e.isTop?[Je]:void 0)]},"typescript"),Cr="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(e=>({label:e,type:"keyword"}));function Ke(e={}){let O=e.jsx?e.typescript?Fe:He:e.typescript?Me:y;return new lO(O,[y.data.of({autocomplete:ke(Le,ve(Wr.concat(Cr)))}),y.data.of({autocomplete:_r}),e.jsx?Gr:[]])}function qr(e){for(;;){if(e.name=="JSXOpenTag"||e.name=="JSXSelfClosingTag"||e.name=="JSXFragmentTag")return e;if(!e.parent)return null;e=e.parent}}function pe(e,O,a=e.length){for(let t=O==null?void 0:O.firstChild;t;t=t.nextSibling)if(t.name=="JSXIdentifier"||t.name=="JSXBuiltin"||t.name=="JSXNamespacedName"||t.name=="JSXMemberExpression")return e.sliceString(t.from,Math.min(t.to,a));return""}const jr=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Gr=w.inputHandler.of((e,O,a,t)=>{if((jr?e.composing:e.compositionStarted)||e.state.readOnly||O!=a||t!=">"&&t!="/"||!y.isActiveAt(e.state,O,-1))return!1;let{state:r}=e,i=r.changeByRange(s=>{var n,o;let{head:Q}=s,p=_(r).resolveInner(Q,-1),c;if(p.name=="JSXStartTag"&&(p=p.parent),t==">"&&p.name=="JSXFragmentTag")return{range:z.cursor(Q+1),changes:{from:Q,insert:">"}};if(t=="/"&&p.name=="JSXFragmentTag"){let u=p.parent,h=u==null?void 0:u.parent;if(u.from==Q-1&&((n=h.lastChild)===null||n===void 0?void 0:n.name)!="JSXEndTag"&&(c=pe(r.doc,h==null?void 0:h.firstChild,Q))){let f=`/${c}>`;return{range:z.cursor(Q+f.length),changes:{from:Q,insert:f}}}}else if(t==">"){let u=qr(p);if(u&&((o=u.lastChild)===null||o===void 0?void 0:o.name)!="JSXEndTag"&&r.sliceDoc(Q,Q+2)!="`}}}return{range:s}});return i.changes.empty?!1:(e.dispatch(i,{userEvent:"input.type",scrollIntoView:!0}),!0)}),j=["_blank","_self","_top","_parent"],$O=["ascii","utf-8","utf-16","latin1","latin1"],gO=["get","post","put","delete"],PO=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],m=["true","false"],S={},Rr={a:{attrs:{href:null,ping:null,type:null,media:null,target:j,hreflang:null}},abbr:S,address:S,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:S,aside:S,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:S,base:{attrs:{href:null,target:j}},bdi:S,bdo:S,blockquote:{attrs:{cite:null}},body:S,br:S,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:PO,formmethod:gO,formnovalidate:["novalidate"],formtarget:j,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:S,center:S,cite:S,code:S,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:S,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:S,div:S,dl:S,dt:S,em:S,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:S,figure:S,footer:S,form:{attrs:{action:null,name:null,"accept-charset":$O,autocomplete:["on","off"],enctype:PO,method:gO,novalidate:["novalidate"],target:j}},h1:S,h2:S,h3:S,h4:S,h5:S,h6:S,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:S,hgroup:S,hr:S,html:{attrs:{manifest:null}},i:S,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:PO,formmethod:gO,formnovalidate:["novalidate"],formtarget:j,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:S,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:S,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:S,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:$O,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:S,noscript:S,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:S,param:{attrs:{name:null,value:null}},pre:S,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:S,rt:S,ruby:S,samp:S,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:$O}},section:S,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:S,source:{attrs:{src:null,type:null,media:null}},span:S,strong:S,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:S,summary:S,sup:S,table:S,tbody:S,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:S,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:S,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:S,time:{attrs:{datetime:null}},title:S,tr:S,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:S,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:S},Ot={accesskey:null,class:null,contenteditable:m,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:m,autocorrect:m,autocapitalize:m,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":m,"aria-autocomplete":["inline","list","both","none"],"aria-busy":m,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":m,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":m,"aria-hidden":m,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":m,"aria-multiselectable":m,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":m,"aria-relevant":null,"aria-required":m,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},et="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(e=>"on"+e);for(let e of et)Ot[e]=null;class tO{constructor(O,a){this.tags=Object.assign(Object.assign({},Rr),O),this.globalAttrs=Object.assign(Object.assign({},Ot),a),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}tO.default=new tO;function U(e,O,a=e.length){if(!O)return"";let t=O.firstChild,r=t&&t.getChild("TagName");return r?e.sliceString(r.from,Math.min(r.to,a)):""}function oO(e,O=!1){for(let a=e.parent;a;a=a.parent)if(a.name=="Element")if(O)O=!1;else return a;return null}function tt(e,O,a){let t=a.tags[U(e,oO(O,!0))];return(t==null?void 0:t.children)||a.allTags}function TO(e,O){let a=[];for(let t=O;t=oO(t);){let r=U(e,t);if(r&&t.lastChild.name=="CloseTag")break;r&&a.indexOf(r)<0&&(O.name=="EndTag"||O.from>=t.firstChild.to)&&a.push(r)}return a}const at=/^[:\-\.\w\u00b7-\uffff]*$/;function ue(e,O,a,t,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?"":">";return{from:t,to:r,options:tt(e.doc,a,O).map(s=>({label:s,type:"type"})).concat(TO(e.doc,a).map((s,n)=>({label:"/"+s,apply:"/"+s+i,type:"type",boost:99-n}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function Se(e,O,a,t){let r=/\s*>/.test(e.sliceDoc(t,t+5))?"":">";return{from:a,to:t,options:TO(e.doc,O).map((i,s)=>({label:i,apply:i+r,type:"type",boost:99-s})),validFor:at}}function zr(e,O,a,t){let r=[],i=0;for(let s of tt(e.doc,a,O))r.push({label:"<"+s,type:"type"});for(let s of TO(e.doc,a))r.push({label:"",type:"type",boost:99-i++});return{from:t,to:t,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Ar(e,O,a,t,r){let i=oO(a),s=i?O.tags[U(e.doc,i)]:null,n=s&&s.attrs?Object.keys(s.attrs):[],o=s&&s.globalAttrs===!1?n:n.length?n.concat(O.globalAttrNames):O.globalAttrNames;return{from:t,to:r,options:o.map(Q=>({label:Q,type:"property"})),validFor:at}}function Ir(e,O,a,t,r){var i;let s=(i=a.parent)===null||i===void 0?void 0:i.getChild("AttributeName"),n=[],o;if(s){let Q=e.sliceDoc(s.from,s.to),p=O.globalAttrs[Q];if(!p){let c=oO(a),u=c?O.tags[U(e.doc,c)]:null;p=(u==null?void 0:u.attrs)&&u.attrs[Q]}if(p){let c=e.sliceDoc(t,r).toLowerCase(),u='"',h='"';/^['"]/.test(c)?(o=c[0]=='"'?/^[^"]*$/:/^[^']*$/,u="",h=e.sliceDoc(r,r+1)==c[0]?"":c[0],c=c.slice(1),t++):o=/^[^\s<>='"]*$/;for(let f of p)n.push({label:f,apply:u+f+h,type:"constant"})}}return{from:t,to:r,options:n,validFor:o}}function Er(e,O){let{state:a,pos:t}=O,r=_(a).resolveInner(t),i=r.resolve(t,-1);for(let s=t,n;r==i&&(n=i.childBefore(s));){let o=n.lastChild;if(!o||!o.type.isError||o.fromEr(t,r)}const rt=[{tag:"script",attrs:e=>e.type=="text/typescript"||e.lang=="ts",parser:Me.parser},{tag:"script",attrs:e=>e.type=="text/babel"||e.type=="text/jsx",parser:He.parser},{tag:"script",attrs:e=>e.type=="text/typescript-jsx",parser:Fe.parser},{tag:"script",attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:y.parser},{tag:"style",attrs(e){return(!e.lang||e.lang=="css")&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:eO.parser}],it=[{name:"style",parser:eO.parser.configure({top:"Styles"})}].concat(et.map(e=>({name:e,parser:y.parser}))),J=iO.define({name:"html",parser:Na.configure({props:[sO.add({Element(e){let O=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+O[0].length?e.continue():e.lineIndent(e.node.from)+(O[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].lengthe.getChild("TagName")})],wrap:Ae(rt,it)}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}});function Br(e={}){let O="",a;e.matchClosingTags===!1&&(O="noMatch"),e.selfClosingTags===!0&&(O=(O?O+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(a=Ae((e.nestedLanguages||[]).concat(rt),(e.nestedAttributes||[]).concat(it)));let t=a||O?J.configure({dialect:O,wrap:a}):J;return new lO(t,[J.data.of({autocomplete:Nr(e)}),e.autoCloseTags!==!1?Dr:[],Ke().support,hr().support])}const fe=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),Dr=w.inputHandler.of((e,O,a,t)=>{if(e.composing||e.state.readOnly||O!=a||t!=">"&&t!="/"||!J.isActiveAt(e.state,O,-1))return!1;let{state:r}=e,i=r.changeByRange(s=>{var n,o,Q;let{head:p}=s,c=_(r).resolveInner(p,-1),u;if((c.name=="TagName"||c.name=="StartTag")&&(c=c.parent),t==">"&&c.name=="OpenTag"){if(((o=(n=c.parent)===null||n===void 0?void 0:n.lastChild)===null||o===void 0?void 0:o.name)!="CloseTag"&&(u=U(r.doc,c.parent,p))&&!fe.has(u)){let h=e.state.doc.sliceString(p,p+1)===">",f=`${h?"":">"}`;return{range:z.cursor(p+1),changes:{from:p+(h?1:0),insert:f}}}}else if(t=="/"&&c.name=="OpenTag"){let h=c.parent,f=h==null?void 0:h.parent;if(h.from==p-1&&((Q=f.lastChild)===null||Q===void 0?void 0:Q.name)!="CloseTag"&&(u=U(r.doc,f,p))&&!fe.has(u)){let $=e.state.doc.sliceString(p,p+1)===">",g=`/${u}${$?"":">"}`,v=p+g.length+($?1:0);return{range:z.cursor(v),changes:{from:p,insert:g}}}}return{range:s}});return i.changes.empty?!1:(e.dispatch(i,{userEvent:"input.type",scrollIntoView:!0}),!0)}),Lr=36,de=1,Jr=2,N=3,mO=4,Mr=5,Hr=6,Fr=7,Kr=8,Oi=9,ei=10,ti=11,ai=12,ri=13,ii=14,si=15,ni=16,li=17,$e=18,oi=19,st=20,nt=21,ge=22,Qi=23,ci=24;function xO(e){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57}function hi(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function Y(e,O,a){for(let t=!1;;){if(e.next<0)return;if(e.next==O&&!t){e.advance();return}t=a&&!t&&e.next==92,e.advance()}}function pi(e){for(;;){if(e.next<0||e.peek(1)<0)return;if(e.next==36&&e.peek(1)==36){e.advance(2);return}e.advance()}}function lt(e,O){for(;!(e.next!=95&&!xO(e.next));)O!=null&&(O+=String.fromCharCode(e.next)),e.advance();return O}function ui(e){if(e.next==39||e.next==34||e.next==96){let O=e.next;e.advance(),Y(e,O,!1)}else lt(e)}function Pe(e,O){for(;e.next==48||e.next==49;)e.advance();O&&e.next==O&&e.advance()}function me(e,O){for(;;){if(e.next==46){if(O)break;O=!0}else if(e.next<48||e.next>57)break;e.advance()}if(e.next==69||e.next==101)for(e.advance(),(e.next==43||e.next==45)&&e.advance();e.next>=48&&e.next<=57;)e.advance()}function be(e){for(;!(e.next<0||e.next==10);)e.advance()}function W(e,O){for(let a=0;a!=&|~^/",specialVar:"?",identifierQuotes:'"',words:ot(fi,Si)};function di(e,O,a,t){let r={};for(let i in yO)r[i]=(e.hasOwnProperty(i)?e:yO)[i];return O&&(r.words=ot(O,a||"",t)),r}function Qt(e){return new Z(O=>{var a;let{next:t}=O;if(O.advance(),W(t,Xe)){for(;W(O.next,Xe);)O.advance();O.acceptToken(Lr)}else if(t==36&&O.next==36&&e.doubleDollarQuotedStrings)pi(O),O.acceptToken(N);else if(t==39||t==34&&e.doubleQuotedStrings)Y(O,t,e.backslashEscapes),O.acceptToken(N);else if(t==35&&e.hashComments||t==47&&O.next==47&&e.slashComments)be(O),O.acceptToken(de);else if(t==45&&O.next==45&&(!e.spaceAfterDashes||O.peek(1)==32))be(O),O.acceptToken(de);else if(t==47&&O.next==42){O.advance();for(let r=-1,i=1;!(O.next<0);)if(O.advance(),r==42&&O.next==47){if(i--,!i){O.advance();break}r=-1}else r==47&&O.next==42?(i++,r=-1):r=O.next;O.acceptToken(Jr)}else if((t==101||t==69)&&O.next==39)O.advance(),Y(O,39,!0);else if((t==110||t==78)&&O.next==39&&e.charSetCasts)O.advance(),Y(O,39,e.backslashEscapes),O.acceptToken(N);else if(t==95&&e.charSetCasts)for(let r=0;;r++){if(O.next==39&&r>1){O.advance(),Y(O,39,e.backslashEscapes),O.acceptToken(N);break}if(!xO(O.next))break;O.advance()}else if(t==40)O.acceptToken(Fr);else if(t==41)O.acceptToken(Kr);else if(t==123)O.acceptToken(Oi);else if(t==125)O.acceptToken(ei);else if(t==91)O.acceptToken(ti);else if(t==93)O.acceptToken(ai);else if(t==59)O.acceptToken(ri);else if(e.unquotedBitLiterals&&t==48&&O.next==98)O.advance(),Pe(O),O.acceptToken(ge);else if((t==98||t==66)&&(O.next==39||O.next==34)){const r=O.next;O.advance(),e.treatBitsAsBytes?(Y(O,r,e.backslashEscapes),O.acceptToken(Qi)):(Pe(O,r),O.acceptToken(ge))}else if(t==48&&(O.next==120||O.next==88)||(t==120||t==88)&&O.next==39){let r=O.next==39;for(O.advance();hi(O.next);)O.advance();r&&O.next==39&&O.advance(),O.acceptToken(mO)}else if(t==46&&O.next>=48&&O.next<=57)me(O,!0),O.acceptToken(mO);else if(t==46)O.acceptToken(ii);else if(t>=48&&t<=57)me(O,!1),O.acceptToken(mO);else if(W(t,e.operatorChars)){for(;W(O.next,e.operatorChars);)O.advance();O.acceptToken(si)}else if(W(t,e.specialVar))O.next==t&&O.advance(),ui(O),O.acceptToken(li);else if(W(t,e.identifierQuotes))Y(O,t,!1),O.acceptToken(oi);else if(t==58||t==44)O.acceptToken(ni);else if(xO(t)){let r=lt(O,String.fromCharCode(t));O.acceptToken(O.next==46?$e:(a=e.words[r.toLowerCase()])!==null&&a!==void 0?a:$e)}})}const ct=Qt(yO),$i=T.deserialize({version:14,states:"%vQ]QQOOO#wQRO'#DSO$OQQO'#CwO%eQQO'#CxO%lQQO'#CyO%sQQO'#CzOOQQ'#DS'#DSOOQQ'#C}'#C}O'UQRO'#C{OOQQ'#Cv'#CvOOQQ'#C|'#C|Q]QQOOQOQQOOO'`QQO'#DOO(xQRO,59cO)PQQO,59cO)UQQO'#DSOOQQ,59d,59dO)cQQO,59dOOQQ,59e,59eO)jQQO,59eOOQQ,59f,59fO)qQQO,59fOOQQ-E6{-E6{OOQQ,59b,59bOOQQ-E6z-E6zOOQQ,59j,59jOOQQ-E6|-E6|O+VQRO1G.}O+^QQO,59cOOQQ1G/O1G/OOOQQ1G/P1G/POOQQ1G/Q1G/QP+kQQO'#C}O+rQQO1G.}O)PQQO,59cO,PQQO'#Cw",stateData:",[~OtOSPOSQOS~ORUOSUOTUOUUOVROXSOZTO]XO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O^]ORvXSvXTvXUvXVvXXvXZvX]vX_vX`vXavXbvXcvXdvXevXfvXgvXhvX~OsvX~P!jOa_Ob_Oc_O~ORUOSUOTUOUUOVROXSOZTO^tO_UO`UOa`Ob`Oc`OdUOeUOfUOgUOhUO~OWaO~P$ZOYcO~P$ZO[eO~P$ZORUOSUOTUOUUOVROXSOZTO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O]hOsoX~P%zOajObjOcjO~O^]ORkaSkaTkaUkaVkaXkaZka]ka_ka`kaakabkackadkaekafkagkahka~Oska~P'kO^]O~OWvXYvX[vX~P!jOWnO~P$ZOYoO~P$ZO[pO~P$ZO^]ORkiSkiTkiUkiVkiXkiZki]ki_ki`kiakibkickidkiekifkigkihki~Oski~P)xOWkaYka[ka~P'kO]hO~P$ZOWkiYki[ki~P)xOasObsOcsO~O",goto:"#hwPPPPPPPPPPPPPPPPPPPPPPPPPPx||||!Y!^!d!xPPP#[TYOZeUORSTWZbdfqT[OZQZORiZSWOZQbRQdSQfTZgWbdfqQ^PWk^lmrQl_Qm`RrseVORSTWZbdfq",nodeNames:"⚠ LineComment BlockComment String Number Bool Null ( ) { } [ ] ; . Operator Punctuation SpecialVar Identifier QuotedIdentifier Keyword Type Bits Bytes Builtin Script Statement CompositeIdentifier Parens Braces Brackets Statement",maxTerm:38,skippedNodes:[0,1,2],repeatNodeCount:3,tokenData:"RORO",tokenizers:[0,ct],topRules:{Script:[0,25]},tokenPrec:0});function kO(e){let O=e.cursor().moveTo(e.from,-1);for(;/Comment/.test(O.name);)O.moveTo(O.from,-1);return O.node}function A(e,O){let a=e.sliceString(O.from,O.to),t=/^([`'"])(.*)\1$/.exec(a);return t?t[2]:a}function aO(e){return e&&(e.name=="Identifier"||e.name=="QuotedIdentifier")}function gi(e,O){if(O.name=="CompositeIdentifier"){let a=[];for(let t=O.firstChild;t;t=t.nextSibling)aO(t)&&a.push(A(e,t));return a}return[A(e,O)]}function Ze(e,O){for(let a=[];;){if(!O||O.name!=".")return a;let t=kO(O);if(!aO(t))return a;a.unshift(A(e,t)),O=kO(t)}}function Pi(e,O){let a=_(e).resolveInner(O,-1),t=bi(e.doc,a);return a.name=="Identifier"||a.name=="QuotedIdentifier"||a.name=="Keyword"?{from:a.from,quoted:a.name=="QuotedIdentifier"?e.doc.sliceString(a.from,a.from+1):null,parents:Ze(e.doc,kO(a)),aliases:t}:a.name=="."?{from:O,quoted:null,parents:Ze(e.doc,a),aliases:t}:{from:O,quoted:null,parents:[],empty:!0,aliases:t}}const mi=new Set("where group having order union intersect except all distinct limit offset fetch for".split(" "));function bi(e,O){let a;for(let r=O;!a;r=r.parent){if(!r)return null;r.name=="Statement"&&(a=r)}let t=null;for(let r=a.firstChild,i=!1,s=null;r;r=r.nextSibling){let n=r.name=="Keyword"?e.sliceString(r.from,r.to).toLowerCase():null,o=null;if(!i)i=n=="from";else if(n=="as"&&s&&aO(r.nextSibling))o=A(e,r.nextSibling);else{if(n&&mi.has(n))break;s&&aO(r)&&(o=A(e,r))}o&&(t||(t=Object.create(null)),t[o]=gi(e,s)),s=/Identifier$/.test(r.name)?r:null}return t}function Xi(e,O){return e?O.map(a=>Object.assign(Object.assign({},a),{label:e+a.label+e,apply:void 0})):O}const Zi=/^\w*$/,xi=/^[`'"]?\w*[`'"]?$/;class WO{constructor(){this.list=[],this.children=void 0}child(O){let a=this.children||(this.children=Object.create(null));return a[O]||(a[O]=new WO)}childCompletions(O){return this.children?Object.keys(this.children).filter(a=>a).map(a=>({label:a,type:O})):[]}}function yi(e,O,a,t,r){let i=new WO,s=i.child(r||"");for(let n in e){let o=n.indexOf("."),p=(o>-1?i.child(n.slice(0,o)):s).child(o>-1?n.slice(o+1):n);p.list=e[n].map(c=>typeof c=="string"?{label:c,type:"property"}:c)}s.list=(O||s.childCompletions("type")).concat(t?s.child(t).list:[]);for(let n in i.children){let o=i.child(n);o.list.length||(o.list=o.childCompletions("type"))}return i.list=s.list.concat(a||i.childCompletions("type")),n=>{let{parents:o,from:Q,quoted:p,empty:c,aliases:u}=Pi(n.state,n.pos);if(c&&!n.explicit)return null;u&&o.length==1&&(o=u[o[0]]||o);let h=i;for(let g of o){for(;!h.children||!h.children[g];)if(h==i)h=s;else if(h==s&&t)h=h.child(t);else return null;h=h.child(g)}let f=p&&n.state.sliceDoc(n.pos,n.pos+1)==p,$=h.list;return h==i&&u&&($=$.concat(Object.keys(u).map(g=>({label:g,type:"constant"})))),{from:Q,to:f?n.pos+1:void 0,options:Xi(p,$),validFor:p?xi:Zi}}}function ki(e,O){let a=Object.keys(e).map(t=>({label:O?t.toUpperCase():t,type:e[t]==nt?"type":e[t]==st?"keyword":"variable",boost:-1}));return ke(["QuotedIdentifier","SpecialVar","String","LineComment","BlockComment","."],ve(a))}let vi=$i.configure({props:[sO.add({Statement:R()}),nO.add({Statement(e){return{from:e.firstChild.to,to:e.to}},BlockComment(e){return{from:e.from+2,to:e.to-2}}}),rO({Keyword:l.keyword,Type:l.typeName,Builtin:l.standard(l.name),Bits:l.number,Bytes:l.string,Bool:l.bool,Null:l.null,Number:l.number,String:l.string,Identifier:l.name,QuotedIdentifier:l.special(l.string),SpecialVar:l.special(l.name),LineComment:l.lineComment,BlockComment:l.blockComment,Operator:l.operator,"Semi Punctuation":l.punctuation,"( )":l.paren,"{ }":l.brace,"[ ]":l.squareBracket})]});class QO{constructor(O,a){this.dialect=O,this.language=a}get extension(){return this.language.extension}static define(O){let a=di(O,O.keywords,O.types,O.builtin),t=iO.define({name:"sql",parser:vi.configure({tokenizers:[{from:ct,to:Qt(a)}]}),languageData:{commentTokens:{line:"--",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}});return new QO(a,t)}}function Yi(e,O=!1){return ki(e.dialect.words,O)}function wi(e,O=!1){return e.language.data.of({autocomplete:Yi(e,O)})}function Ti(e){return e.schema?yi(e.schema,e.tables,e.schemas,e.defaultTable,e.defaultSchema):()=>null}function Wi(e){return e.schema?(e.dialect||ht).language.data.of({autocomplete:Ti(e)}):[]}function Vi(e={}){let O=e.dialect||ht;return new lO(O.language,[Wi(e),wi(O,!!e.upperCaseKeywords)])}const ht=QO.define({});function Ui(e){let O;return{c(){O=dt("div"),$t(O,"class","code-editor"),I(O,"min-height",e[0]?e[0]+"px":null),I(O,"max-height",e[1]?e[1]+"px":"auto")},m(a,t){gt(a,O,t),e[11](O)},p(a,[t]){t&1&&I(O,"min-height",a[0]?a[0]+"px":null),t&2&&I(O,"max-height",a[1]?a[1]+"px":"auto")},i:jO,o:jO,d(a){a&&Pt(O),e[11](null)}}}function _i(e,O,a){let t;mt(e,bt,d=>a(12,t=d));const r=Xt();let{id:i=""}=O,{value:s=""}=O,{minHeight:n=null}=O,{maxHeight:o=null}=O,{disabled:Q=!1}=O,{placeholder:p=""}=O,{language:c="javascript"}=O,{singleLine:u=!1}=O,h,f,$=new E,g=new E,v=new E,VO=new E;function cO(){h==null||h.focus()}function UO(){f==null||f.dispatchEvent(new CustomEvent("change",{detail:{value:s},bubbles:!0})),r("change",s)}function _O(){if(!i)return;const d=document.querySelectorAll('[for="'+i+'"]');for(let P of d)P.removeEventListener("click",cO)}function CO(){if(!i)return;_O();const d=document.querySelectorAll('[for="'+i+'"]');for(let P of d)P.addEventListener("click",cO)}function qO(){switch(c){case"html":return Br();case"sql":let d={};for(let P of t)d[P.name]=xt.getAllCollectionIdentifiers(P);return Vi({dialect:QO.define({keywords:"select from where having group by order limit offset join left right inner with like not in match asc desc regexp isnull notnull glob count avg sum min max current random cast as int real text date time datetime unixepoch strftime coalesce lower upper substr case when then iif if else json_extract json_each json_tree json_array_length json_valid ",operatorChars:"*+-%<>!=&|/~",identifierQuotes:'`"',specialVar:"@:?$"}),schema:d,upperCaseKeywords:!0});default:return Ke()}}Zt(()=>{const d={key:"Enter",run:P=>{u&&r("submit",s)}};return CO(),a(10,h=new w({parent:f,state:C.create({doc:s,extensions:[qt(),jt(),Gt(),Rt(),zt(),C.allowMultipleSelections.of(!0),At(It,{fallback:!0}),Et(),Nt(),Bt(),Dt(),Lt.of([d,...Jt,...Mt,Ht.find(P=>P.key==="Mod-d"),...Ft,...Kt]),w.lineWrapping,Oa({icons:!1}),$.of(qO()),VO.of(GO(p)),g.of(w.editable.of(!0)),v.of(C.readOnly.of(!1)),C.transactionFilter.of(P=>u&&P.newDoc.lines>1?[]:P),w.updateListener.of(P=>{!P.docChanged||Q||(a(3,s=P.state.doc.toString()),UO())})]})})),()=>{_O(),h==null||h.destroy()}});function pt(d){yt[d?"unshift":"push"](()=>{f=d,a(2,f)})}return e.$$set=d=>{"id"in d&&a(4,i=d.id),"value"in d&&a(3,s=d.value),"minHeight"in d&&a(0,n=d.minHeight),"maxHeight"in d&&a(1,o=d.maxHeight),"disabled"in d&&a(5,Q=d.disabled),"placeholder"in d&&a(6,p=d.placeholder),"language"in d&&a(7,c=d.language),"singleLine"in d&&a(8,u=d.singleLine)},e.$$.update=()=>{e.$$.dirty&16&&i&&CO(),e.$$.dirty&1152&&h&&c&&h.dispatch({effects:[$.reconfigure(qO())]}),e.$$.dirty&1056&&h&&typeof Q<"u"&&(h.dispatch({effects:[g.reconfigure(w.editable.of(!Q)),v.reconfigure(C.readOnly.of(Q))]}),UO()),e.$$.dirty&1032&&h&&s!=h.state.doc.toString()&&h.dispatch({changes:{from:0,to:h.state.doc.length,insert:s}}),e.$$.dirty&1088&&h&&typeof p<"u"&&h.dispatch({effects:[VO.reconfigure(GO(p))]})},[n,o,f,s,i,Q,p,c,u,cO,h,pt]}class ji extends ut{constructor(O){super(),St(this,O,_i,Ui,ft,{id:4,value:3,minHeight:0,maxHeight:1,disabled:5,placeholder:6,language:7,singleLine:8,focus:9})}get focus(){return this.$$.ctx[9]}}export{ji as default}; diff --git a/ui/dist/assets/CodeEditor-a45f274f.js b/ui/dist/assets/CodeEditor-a45f274f.js deleted file mode 100644 index 0f3c2c21..00000000 --- a/ui/dist/assets/CodeEditor-a45f274f.js +++ /dev/null @@ -1,13 +0,0 @@ -import{S as Ue,i as _e,s as qe,e as je,f as Ce,T as XO,g as Ge,y as ZO,o as Re,K as ze,L as Ae,M as Ie}from"./index-3e0f12d8.js";import{P as Ee,N as Ne,u as Be,D as De,v as QO,T as R,I as Oe,w as cO,x as l,y as Me,L as hO,z as pO,A as z,B as uO,F as ee,G as SO,H as C,J as Je,K as Le,E as k,M as j,O as Ke,Q as He,R as g,U as Fe,V as Ot,a as V,h as et,b as tt,c as at,d as it,e as rt,s as st,f as nt,g as lt,i as ot,r as Qt,j as ct,k as ht,l as pt,m as ut,n as St,o as $t,p as ft,q as dt,t as bO,C as G}from"./index-4934dad7.js";class N{constructor(O,t,a,i,s,r,n,o,c,h=0,Q){this.p=O,this.stack=t,this.state=a,this.reducePos=i,this.pos=s,this.score=r,this.buffer=n,this.bufferBase=o,this.curContext=c,this.lookAhead=h,this.parent=Q}toString(){return`[${this.stack.filter((O,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,t,a=0){let i=O.parser.context;return new N(O,[],t,a,a,0,[],0,i?new xO(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=O}reduce(O){let t=O>>19,a=O&65535,{parser:i}=this.p,s=i.dynamicPrecedence(a);if(s&&(this.score+=s),t==0){this.pushState(i.getGoto(this.state,a,!0),this.reducePos),a=2e3&&(n==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=o):this.p.lastBigReductionSizer;)this.stack.pop();this.reduceContext(a,n)}storeNode(O,t,a,i=4,s=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&r.buffer[n-4]==0&&r.buffer[n-1]>-1){if(t==a)return;if(r.buffer[n-2]>=t){r.buffer[n-2]=a;return}}}if(!s||this.pos==a)this.buffer.push(O,t,a,i);else{let r=this.buffer.length;if(r>0&&this.buffer[r-4]!=0)for(;r>0&&this.buffer[r-2]>a;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4);this.buffer[r]=O,this.buffer[r+1]=t,this.buffer[r+2]=a,this.buffer[r+3]=i}}shift(O,t,a){let i=this.pos;if(O&131072)this.pushState(O&65535,this.pos);else if(O&262144)this.pos=a,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,a,4);else{let s=O,{parser:r}=this.p;(a>this.pos||t<=r.maxNode)&&(this.pos=a,r.stateFlag(s,1)||(this.reducePos=a)),this.pushState(s,i),this.shiftContext(t,i),t<=r.maxNode&&this.buffer.push(t,i,a,4)}}apply(O,t,a){O&65536?this.reduce(O):this.shift(O,t,a)}useNode(O,t){let a=this.p.reused.length-1;(a<0||this.p.reused[a]!=O)&&(this.p.reused.push(O),a++);let i=this.pos;this.reducePos=this.pos=i+O.length,this.pushState(t,i),this.buffer.push(a,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,O,this,this.p.stream.reset(this.pos-O.length)))}split(){let O=this,t=O.buffer.length;for(;t>0&&O.buffer[t-2]>O.reducePos;)t-=4;let a=O.buffer.slice(t),i=O.bufferBase+t;for(;O&&i==O.bufferBase;)O=O.parent;return new N(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,a,i,this.curContext,this.lookAhead,O)}recoverByDelete(O,t){let a=O<=this.p.parser.maxNode;a&&this.storeNode(O,this.pos,t,4),this.storeNode(0,this.pos,t,a?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(O){for(let t=new Pt(this);;){let a=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,O);if(a==0)return!1;if(!(a&65536))return!0;t.reduce(a)}}recoverByInsert(O){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>4<<1||this.stack.length>=120){let i=[];for(let s=0,r;so&1&&n==r)||i.push(t[s],r)}t=i}let a=[];for(let i=0;i>19,i=O&65535,s=this.stack.length-a*3;if(s<0||t.getGoto(this.stack[s],i,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(O),!0}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:O}=this.p;return O.data[O.stateSlot(this.state,1)]==65535&&!O.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(O){if(this.state!=O.state||this.stack.length!=O.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=O)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class xO{constructor(O,t){this.tracker=O,this.context=t,this.hash=O.strict?O.hash(t):0}}var yO;(function(e){e[e.Insert=200]="Insert",e[e.Delete=190]="Delete",e[e.Reduce=100]="Reduce",e[e.MaxNext=4]="MaxNext",e[e.MaxInsertStackDepth=300]="MaxInsertStackDepth",e[e.DampenInsertStackDepth=120]="DampenInsertStackDepth",e[e.MinBigReduction=2e3]="MinBigReduction"})(yO||(yO={}));class Pt{constructor(O){this.start=O,this.state=O.state,this.stack=O.stack,this.base=this.stack.length}reduce(O){let t=O&65535,a=O>>19;a==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(a-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class B{constructor(O,t,a){this.stack=O,this.pos=t,this.index=a,this.buffer=O.buffer,this.index==0&&this.maybeNext()}static create(O,t=O.bufferBase+O.buffer.length){return new B(O,t,t-O.bufferBase)}maybeNext(){let O=this.stack.parent;O!=null&&(this.index=this.stack.bufferBase-O.bufferBase,this.stack=O,this.buffer=O.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new B(this.stack,this.pos,this.index)}}function q(e,O=Uint16Array){if(typeof e!="string")return e;let t=null;for(let a=0,i=0;a=92&&r--,r>=34&&r--;let o=r-32;if(o>=46&&(o-=46,n=!0),s+=o,n)break;s*=46}t?t[i++]=s:t=new O(s)}return t}class A{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const YO=new A;class gt{constructor(O,t){this.input=O,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=YO,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(O,t){let a=this.range,i=this.rangeIndex,s=this.pos+O;for(;sa.to:s>=a.to;){if(i==this.ranges.length-1)return null;let r=this.ranges[++i];s+=r.from-a.to,a=r}return s}clipPos(O){if(O>=this.range.from&&OO)return Math.max(O,t.from);return this.end}peek(O){let t=this.chunkOff+O,a,i;if(t>=0&&t=this.chunk2Pos&&an.to&&(this.chunk2=this.chunk2.slice(0,n.to-a)),i=this.chunk2.charCodeAt(0)}}return a>=this.token.lookAhead&&(this.token.lookAhead=a+1),i}acceptToken(O,t=0){let a=t?this.resolveOffset(t,-1):this.pos;if(a==null||a=this.chunk2Pos&&this.posthis.range.to?O.slice(0,this.range.to-this.pos):O,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(O=1){for(this.chunkOff+=O;this.pos+O>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();O-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=O,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(O,t){if(t?(this.token=t,t.start=O,t.lookAhead=O+1,t.value=t.extended=-1):this.token=YO,this.pos!=O){if(this.pos=O,O==this.end)return this.setDone(),this;for(;O=this.range.to;)this.range=this.ranges[++this.rangeIndex];O>=this.chunkPos&&O=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(O-this.chunkPos,t-this.chunkPos);if(O>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(O-this.chunk2Pos,t-this.chunk2Pos);if(O>=this.range.from&&t<=this.range.to)return this.input.read(O,t);let a="";for(let i of this.ranges){if(i.from>=t)break;i.to>O&&(a+=this.input.read(Math.max(i.from,O),Math.min(i.to,t)))}return a}}class v{constructor(O,t){this.data=O,this.id=t}token(O,t){let{parser:a}=t.p;te(this.data,O,t,this.id,a.data,a.tokenPrecTable)}}v.prototype.contextual=v.prototype.fallback=v.prototype.extend=!1;class nO{constructor(O,t,a){this.precTable=t,this.elseToken=a,this.data=typeof O=="string"?q(O):O}token(O,t){let a=O.pos,i;for(;i=O.pos,te(this.data,O,t,0,this.data,this.precTable),!(O.token.value>-1);){if(this.elseToken==null)return;if(O.next<0)break;O.advance(),O.reset(i+1,O.token)}i>a&&(O.reset(a,O.token),O.acceptToken(this.elseToken,i-a))}}nO.prototype.contextual=v.prototype.fallback=v.prototype.extend=!1;class b{constructor(O,t={}){this.token=O,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function te(e,O,t,a,i,s){let r=0,n=1<0){let $=e[S];if(o.allows($)&&(O.token.value==-1||O.token.value==$||mt($,O.token.value,i,s))){O.acceptToken($);break}}let h=O.next,Q=0,u=e[r+2];if(O.next<0&&u>Q&&e[c+u*3-3]==65535&&e[c+u*3-3]==65535){r=e[c+u*3-1];continue O}for(;Q>1,$=c+S+(S<<1),y=e[$],Y=e[$+1]||65536;if(h=Y)Q=S+1;else{r=e[$+2],O.advance();continue O}}break}}function kO(e,O,t){for(let a=O,i;(i=e[a])!=65535;a++)if(i==t)return a-O;return-1}function mt(e,O,t,a){let i=kO(t,a,O);return i<0||kO(t,a,e)O)&&!a.type.isError)return t<0?Math.max(0,Math.min(a.to-1,O-25)):Math.min(e.length,Math.max(a.from+1,O+25));if(t<0?a.prevSibling():a.nextSibling())break;if(!a.parent())return t<0?0:e.length}}class Xt{constructor(O,t){this.fragments=O,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let O=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(O){for(this.safeFrom=O.openStart?wO(O.tree,O.from+O.offset,1)-O.offset:O.from,this.safeTo=O.openEnd?wO(O.tree,O.to+O.offset,-1)-O.offset:O.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(O.tree),this.start.push(-O.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(O){if(OO)return this.nextStart=r,null;if(s instanceof R){if(r==O){if(r=Math.max(this.safeFrom,O)&&(this.trees.push(s),this.start.push(r),this.index.push(0))}else this.index[t]++,this.nextStart=r+s.length}}}class Zt{constructor(O,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=O.tokenizers.map(a=>new A)}getActions(O){let t=0,a=null,{parser:i}=O.p,{tokenizers:s}=i,r=i.stateSlot(O.state,3),n=O.curContext?O.curContext.hash:0,o=0;for(let c=0;cQ.end+25&&(o=Math.max(Q.lookAhead,o)),Q.value!=0)){let u=t;if(Q.extended>-1&&(t=this.addActions(O,Q.extended,Q.end,t)),t=this.addActions(O,Q.value,Q.end,t),!h.extend&&(a=Q,t>u))break}}for(;this.actions.length>t;)this.actions.pop();return o&&O.setLookAhead(o),!a&&O.pos==this.stream.end&&(a=new A,a.value=O.p.parser.eofTerm,a.start=a.end=O.pos,t=this.addActions(O,a.value,a.end,t)),this.mainToken=a,this.actions}getMainToken(O){if(this.mainToken)return this.mainToken;let t=new A,{pos:a,p:i}=O;return t.start=a,t.end=Math.min(a+1,i.stream.end),t.value=a==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(O,t,a){let i=this.stream.clipPos(a.pos);if(t.token(this.stream.reset(i,O),a),O.value>-1){let{parser:s}=a.p;for(let r=0;r=0&&a.p.parser.dialect.allows(n>>1)){n&1?O.extended=n>>1:O.value=n>>1;break}}}else O.value=0,O.end=this.stream.clipPos(i+1)}putAction(O,t,a,i){for(let s=0;sO.bufferLength*4?new Xt(a,O.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let O=this.stacks,t=this.minStackPos,a=this.stacks=[],i,s;if(this.bigReductionCount>300&&O.length==1){let[r]=O;for(;r.forceReduce()&&r.stack.length&&r.stack[r.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;rt)a.push(n);else{if(this.advanceStack(n,a,O))continue;{i||(i=[],s=[]),i.push(n);let o=this.tokens.getMainToken(n);s.push(o.value,o.end)}}break}}if(!a.length){let r=i&&yt(i);if(r)return this.stackToTree(r);if(this.parser.strict)throw m&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let r=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,a);if(r)return this.stackToTree(r.forceAll())}if(this.recovering){let r=this.recovering==1?1:this.recovering*3;if(a.length>r)for(a.sort((n,o)=>o.score-n.score);a.length>r;)a.pop();a.some(n=>n.reducePos>t)&&this.recovering--}else if(a.length>1){O:for(let r=0;r500&&c.buffer.length>500)if((n.score-c.score||n.buffer.length-c.buffer.length)>0)a.splice(o--,1);else{a.splice(r--,1);continue O}}}a.length>12&&a.splice(12,a.length-12)}this.minStackPos=a[0].pos;for(let r=1;r ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return O.forceReduce()?O:null;if(this.fragments){let c=O.curContext&&O.curContext.tracker.strict,h=c?O.curContext.hash:0;for(let Q=this.fragments.nodeAt(i);Q;){let u=this.parser.nodeSet.types[Q.type.id]==Q.type?s.getGoto(O.state,Q.type.id):-1;if(u>-1&&Q.length&&(!c||(Q.prop(QO.contextHash)||0)==h))return O.useNode(Q,u),m&&console.log(r+this.stackID(O)+` (via reuse of ${s.getName(Q.type.id)})`),!0;if(!(Q instanceof R)||Q.children.length==0||Q.positions[0]>0)break;let S=Q.children[0];if(S instanceof R&&Q.positions[0]==0)Q=S;else break}}let n=s.stateSlot(O.state,4);if(n>0)return O.reduce(n),m&&console.log(r+this.stackID(O)+` (via always-reduce ${s.getName(n&65535)})`),!0;if(O.stack.length>=15e3)for(;O.stack.length>9e3&&O.forceReduce(););let o=this.tokens.getActions(O);for(let c=0;ci?t.push($):a.push($)}return!1}advanceFully(O,t){let a=O.pos;for(;;){if(!this.advanceStack(O,null,null))return!1;if(O.pos>a)return TO(O,t),!0}}runRecovery(O,t,a){let i=null,s=!1;for(let r=0;r ":"";if(n.deadEnd&&(s||(s=!0,n.restart(),m&&console.log(h+this.stackID(n)+" (restarted)"),this.advanceFully(n,a))))continue;let Q=n.split(),u=h;for(let S=0;Q.forceReduce()&&S<10&&(m&&console.log(u+this.stackID(Q)+" (via force-reduce)"),!this.advanceFully(Q,a));S++)m&&(u=this.stackID(Q)+" -> ");for(let S of n.recoverByInsert(o))m&&console.log(h+this.stackID(S)+" (via recover-insert)"),this.advanceFully(S,a);this.stream.end>n.pos?(c==n.pos&&(c++,o=0),n.recoverByDelete(o,c),m&&console.log(h+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),TO(n,a)):(!i||i.scoree;class ae{constructor(O){this.start=O.start,this.shift=O.shift||F,this.reduce=O.reduce||F,this.reuse=O.reuse||F,this.hash=O.hash||(()=>0),this.strict=O.strict!==!1}}class w extends Ee{constructor(O){if(super(),this.wrappers=[],O.version!=14)throw new RangeError(`Parser version (${O.version}) doesn't match runtime version (${14})`);let t=O.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let n=0;nO.topRules[n][1]),i=[];for(let n=0;n=0)s(h,o,n[c++]);else{let Q=n[c+-h];for(let u=-h;u>0;u--)s(n[c++],o,Q);c++}}}this.nodeSet=new Ne(t.map((n,o)=>Be.define({name:o>=this.minRepeatTerm?void 0:n,id:o,props:i[o],top:a.indexOf(o)>-1,error:o==0,skipped:O.skippedNodes&&O.skippedNodes.indexOf(o)>-1}))),O.propSources&&(this.nodeSet=this.nodeSet.extend(...O.propSources)),this.strict=!1,this.bufferLength=De;let r=q(O.tokenData);this.context=O.context,this.specializerSpecs=O.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;ntypeof n=="number"?new v(r,n):n),this.topRules=O.topRules,this.dialects=O.dialects||{},this.dynamicPrecedences=O.dynamicPrecedences||null,this.tokenPrecTable=O.tokenPrec,this.termNames=O.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(O,t,a){let i=new bt(this,O,t,a);for(let s of this.wrappers)i=s(i,O,t,a);return i}getGoto(O,t,a=!1){let i=this.goto;if(t>=i[0])return-1;for(let s=i[t+1];;){let r=i[s++],n=r&1,o=i[s++];if(n&&a)return o;for(let c=s+(r>>1);s0}validAction(O,t){if(t==this.stateSlot(O,4))return!0;for(let a=this.stateSlot(O,1);;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=X(this.data,a+2);else return!1;if(t==X(this.data,a+1))return!0}}nextStates(O){let t=[];for(let a=this.stateSlot(O,1);;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=X(this.data,a+2);else break;if(!(this.data[a+2]&1)){let i=this.data[a+1];t.some((s,r)=>r&1&&s==i)||t.push(this.data[a],i)}}return t}configure(O){let t=Object.assign(Object.create(w.prototype),this);if(O.props&&(t.nodeSet=this.nodeSet.extend(...O.props)),O.top){let a=this.topRules[O.top];if(!a)throw new RangeError(`Invalid top rule name ${O.top}`);t.top=a}return O.tokenizers&&(t.tokenizers=this.tokenizers.map(a=>{let i=O.tokenizers.find(s=>s.from==a);return i?i.to:a})),O.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((a,i)=>{let s=O.specializers.find(n=>n.from==a.external);if(!s)return a;let r=Object.assign(Object.assign({},a),{external:s.to});return t.specializers[i]=VO(r),r})),O.contextTracker&&(t.context=O.contextTracker),O.dialect&&(t.dialect=this.parseDialect(O.dialect)),O.strict!=null&&(t.strict=O.strict),O.wrap&&(t.wrappers=t.wrappers.concat(O.wrap)),O.bufferLength!=null&&(t.bufferLength=O.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(O){return this.termNames?this.termNames[O]:String(O<=this.maxNode&&this.nodeSet.types[O].name||O)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(O){let t=this.dynamicPrecedences;return t==null?0:t[O]||0}parseDialect(O){let t=Object.keys(this.dialects),a=t.map(()=>!1);if(O)for(let s of O.split(" ")){let r=t.indexOf(s);r>=0&&(a[r]=!0)}let i=null;for(let s=0;sa)&&t.p.parser.stateFlag(t.state,2)&&(!O||O.scoree.external(t,a)<<1|O}return e.get}const Yt=54,kt=1,vt=55,wt=2,Wt=56,Tt=3,D=4,ie=5,re=6,se=7,ne=8,Vt=9,Ut=10,_t=11,OO=57,qt=12,UO=58,jt=18,Ct=20,le=21,Gt=22,lO=24,oe=25,Rt=27,zt=30,At=33,Qe=35,It=36,Et=0,Nt={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Bt={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},_O={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Dt(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function ce(e){return e==9||e==10||e==13||e==32}let qO=null,jO=null,CO=0;function oO(e,O){let t=e.pos+O;if(CO==t&&jO==e)return qO;let a=e.peek(O);for(;ce(a);)a=e.peek(++O);let i="";for(;Dt(a);)i+=String.fromCharCode(a),a=e.peek(++O);return jO=e,CO=t,qO=i?i.toLowerCase():a==Mt||a==Jt?void 0:null}const he=60,pe=62,ue=47,Mt=63,Jt=33,Lt=45;function GO(e,O){this.name=e,this.parent=O,this.hash=O?O.hash:0;for(let t=0;t-1?new GO(oO(a,1)||"",e):e},reduce(e,O){return O==jt&&e?e.parent:e},reuse(e,O,t,a){let i=O.type.id;return i==D||i==Qe?new GO(oO(a,1)||"",e):e},hash(e){return e?e.hash:0},strict:!1}),Ft=new b((e,O)=>{if(e.next!=he){e.next<0&&O.context&&e.acceptToken(OO);return}e.advance();let t=e.next==ue;t&&e.advance();let a=oO(e,0);if(a===void 0)return;if(!a)return e.acceptToken(t?qt:D);let i=O.context?O.context.name:null;if(t){if(a==i)return e.acceptToken(Vt);if(i&&Bt[i])return e.acceptToken(OO,-2);if(O.dialectEnabled(Et))return e.acceptToken(Ut);for(let s=O.context;s;s=s.parent)if(s.name==a)return;e.acceptToken(_t)}else{if(a=="script")return e.acceptToken(ie);if(a=="style")return e.acceptToken(re);if(a=="textarea")return e.acceptToken(se);if(Nt.hasOwnProperty(a))return e.acceptToken(ne);i&&_O[i]&&_O[i][a]?e.acceptToken(OO,-1):e.acceptToken(D)}},{contextual:!0}),Oa=new b(e=>{for(let O=0,t=0;;t++){if(e.next<0){t&&e.acceptToken(UO);break}if(e.next==Lt)O++;else if(e.next==pe&&O>=2){t>3&&e.acceptToken(UO,-2);break}else O=0;e.advance()}});function $O(e,O,t){let a=2+e.length;return new b(i=>{for(let s=0,r=0,n=0;;n++){if(i.next<0){n&&i.acceptToken(O);break}if(s==0&&i.next==he||s==1&&i.next==ue||s>=2&&sr?i.acceptToken(O,-r):i.acceptToken(t,-(r-2));break}else if((i.next==10||i.next==13)&&n){i.acceptToken(O,1);break}else s=r=0;i.advance()}})}const ea=$O("script",Yt,kt),ta=$O("style",vt,wt),aa=$O("textarea",Wt,Tt),ia=cO({"Text RawText":l.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":l.angleBracket,TagName:l.tagName,"MismatchedCloseTag/TagName":[l.tagName,l.invalid],AttributeName:l.attributeName,"AttributeValue UnquotedAttributeValue":l.attributeValue,Is:l.definitionOperator,"EntityReference CharacterReference":l.character,Comment:l.blockComment,ProcessingInst:l.processingInstruction,DoctypeDecl:l.documentMeta}),ra=w.deserialize({version:14,states:",xOVOxOOO!WQ!bO'#CoO!]Q!bO'#CyO!bQ!bO'#C|O!gQ!bO'#DPO!lQ!bO'#DRO!qOXO'#CnO!|OYO'#CnO#XO[O'#CnO$eOxO'#CnOOOW'#Cn'#CnO$lO!rO'#DTO$tQ!bO'#DVO$yQ!bO'#DWOOOW'#Dk'#DkOOOW'#DY'#DYQVOxOOO%OQ#tO,59ZO%WQ#tO,59eO%`Q#tO,59hO%hQ#tO,59kO%sQ#tO,59mOOOX'#D^'#D^O%{OXO'#CwO&WOXO,59YOOOY'#D_'#D_O&`OYO'#CzO&kOYO,59YOOO['#D`'#D`O&sO[O'#C}O'OO[O,59YOOOW'#Da'#DaO'WOxO,59YO'_Q!bO'#DQOOOW,59Y,59YOOO`'#Db'#DbO'dO!rO,59oOOOW,59o,59oO'lQ!bO,59qO'qQ!bO,59rOOOW-E7W-E7WO'vQ#tO'#CqOOQO'#DZ'#DZO(UQ#tO1G.uOOOX1G.u1G.uO(^Q#tO1G/POOOY1G/P1G/PO(fQ#tO1G/SOOO[1G/S1G/SO(nQ#tO1G/VOOOW1G/V1G/VOOOW1G/X1G/XO(yQ#tO1G/XOOOX-E7[-E7[O)RQ!bO'#CxOOOW1G.t1G.tOOOY-E7]-E7]O)WQ!bO'#C{OOO[-E7^-E7^O)]Q!bO'#DOOOOW-E7_-E7_O)bQ!bO,59lOOO`-E7`-E7`OOOW1G/Z1G/ZOOOW1G/]1G/]OOOW1G/^1G/^O)gQ&jO,59]OOQO-E7X-E7XOOOX7+$a7+$aOOOY7+$k7+$kOOO[7+$n7+$nOOOW7+$q7+$qOOOW7+$s7+$sO)rQ!bO,59dO)wQ!bO,59gO)|Q!bO,59jOOOW1G/W1G/WO*RO,UO'#CtO*dO7[O'#CtOOQO1G.w1G.wOOOW1G/O1G/OOOOW1G/R1G/ROOOW1G/U1G/UOOOO'#D['#D[O*uO,UO,59`OOQO,59`,59`OOOO'#D]'#D]O+WO7[O,59`OOOO-E7Y-E7YOOQO1G.z1G.zOOOO-E7Z-E7Z",stateData:"+u~O!^OS~OSSOTPOUQOVROWTOY]OZ[O[^O^^O_^O`^Oa^Ox^O{_O!dZO~OdaO~OdbO~OdcO~OddO~OdeO~O!WfOPkP!ZkP~O!XiOQnP!ZnP~O!YlORqP!ZqP~OSSOTPOUQOVROWTOXqOY]OZ[O[^O^^O_^O`^Oa^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OdvO~OdwO~OfyOj|O~OfyOj!OO~OfyOj!QO~OfyOj!SOv!TO~OfyOj!TO~O!WfOPkX!ZkX~OP!WO!Z!XO~O!XiOQnX!ZnX~OQ!ZO!Z!XO~O!YlORqX!ZqX~OR!]O!Z!XO~O!Z!XO~P#dOd!_O~O![sO!e!aO~Oj!bO~Oj!cO~Og!dOfeXjeXveX~OfyOj!fO~OfyOj!gO~OfyOj!hO~OfyOj!iOv!jO~OfyOj!jO~Od!kO~Od!lO~Od!mO~Oj!nO~Oi!qO!`!oO!b!pO~Oj!rO~Oj!sO~Oj!tO~O_!uO`!uOa!uO!`!wO!a!uO~O_!xO`!xOa!xO!b!wO!c!xO~O_!uO`!uOa!uO!`!{O!a!uO~O_!xO`!xOa!xO!b!{O!c!xO~Ov~vj`!dx{_a_~",goto:"%p!`PPPPPPPPPPPPPPPPPP!a!gP!mPP!yPP!|#P#S#Y#]#`#f#i#l#r#xP!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue EndTag ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag SelfClosingEndTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:Ht,nodeProps:[["closedBy",-10,1,2,3,5,6,7,8,9,10,11,"EndTag",4,"EndTag SelfClosingEndTag",-4,19,29,32,35,"CloseTag"],["group",-9,12,15,16,17,18,39,40,41,42,"Entity",14,"Entity TextContent",-3,27,30,33,"TextContent Entity"],["openedBy",26,"StartTag StartCloseTag",-4,28,31,34,36,"OpenTag",38,"StartTag"]],propSources:[ia],skippedNodes:[0],repeatNodeCount:9,tokenData:"#(r!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs4ysv-_vw5iwxJ^x}-_}!OKP!O!P-_!P!Q!!O!Q![-_![!]!$c!]!^-_!^!_!(k!_!`#'S!`!a#'z!a!c-_!c!}!$c!}#R-_#R#S!$c#S#T3V#T#o!$c#o#s-_#s$f$q$f%W-_%W%o!$c%o%p-_%p&a!$c&a&b-_&b1p!$c1p4U-_4U4d!$c4d4e-_4e$IS!$c$IS$I`-_$I`$Ib!$c$Ib$Kh-_$Kh%#t!$c%#t&/x-_&/x&Et!$c&Et&FV-_&FV;'S!$c;'S;:j!(e;:j;=`4s<%l?&r-_?&r?Ah!$c?Ah?BY$q?BY?Mn!$c?MnO$q!Z$|c^PiW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bX^P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UV^P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pT^POv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!cpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({W^P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!a`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!a`!cpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYiWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]`^P!a`!cp!^^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljfS^PiW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_1n!_!a&X!a#S-_#S#T3V#T#s-_#s$f$q$f;'S-_;'S;=`4s<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/ecfSiWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!^!_0p!a#S/^#S#T0p#T#s/^#s$f+P$f;'S/^;'S;=`1h<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0uXfSqr0psw0px!P0p!Q!_0p!a#s0p$f;'S0p;'S;=`1b<%l?Ah0p?BY?Mn0pS1eP;=`<%l0p[1kP;=`<%l/^!U1wbfS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!U3SP;=`<%l1n!V3bcfS^P!a`!cpOq&Xqr3Vrs&}sv3Vvw0pwx(tx!P3V!P!Q&X!Q!^3V!^!_1n!_!a&X!a#s3V#s$f&X$f;'S3V;'S;=`4m<%l?Ah3V?Ah?BY&X?BY?Mn3V?MnO&X!V4pP;=`<%l3V!_4vP;=`<%l-_!Z5SV!`h^P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_5rjfSiWa!ROX7dXZ8qZ[7d[^8q^p7dqr:crs8qst@Ttw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^/^!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!Z7ibiWOX7dXZ8qZ[7d[^8q^p7dqr7drs8qst+Ptw7dwx8qx!]7d!]!^9f!^!a8q!a#S7d#S#T8q#T;'S7d;'S;=`:]<%lO7d!R8tVOp8qqs8qt!]8q!]!^9Z!^;'S8q;'S;=`9`<%lO8q!R9`O_!R!R9cP;=`<%l8q!Z9mYiW_!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z:`P;=`<%l7d!_:jjfSiWOX7dXZ8qZ[7d[^8q^p7dqr:crs8qst/^tw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^<[!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!_{let c=n.type.id;if(c==Rt)return eO(n,o,t);if(c==zt)return eO(n,o,a);if(c==At)return eO(n,o,i);if(c==Qe&&s.length){let h=n.node,Q=RO(h,o),u;for(let S of s)if(S.tag==Q&&(!S.attrs||S.attrs(u||(u=Se(h,o))))){let $=h.parent.lastChild;return{parser:S.parser,overlay:[{from:n.to,to:$.type.id==It?$.from:h.parent.to}]}}}if(r&&c==le){let h=n.node,Q;if(Q=h.firstChild){let u=r[o.read(Q.from,Q.to)];if(u)for(let S of u){if(S.tagName&&S.tagName!=RO(h.parent,o))continue;let $=h.lastChild;if($.type.id==lO)return{parser:S.parser,overlay:[{from:$.from+1,to:$.to-1}]};if($.type.id==oe)return{parser:S.parser,overlay:[{from:$.from,to:$.to}]}}}}return null})}const sa=94,zO=1,na=95,la=96,AO=2,fe=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],oa=58,Qa=40,de=95,ca=91,I=45,ha=46,pa=35,ua=37;function M(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function Sa(e){return e>=48&&e<=57}const $a=new b((e,O)=>{for(let t=!1,a=0,i=0;;i++){let{next:s}=e;if(M(s)||s==I||s==de||t&&Sa(s))!t&&(s!=I||i>0)&&(t=!0),a===i&&s==I&&a++,e.advance();else{t&&e.acceptToken(s==Qa?na:a==2&&O.canShift(AO)?AO:la);break}}}),fa=new b(e=>{if(fe.includes(e.peek(-1))){let{next:O}=e;(M(O)||O==de||O==pa||O==ha||O==ca||O==oa||O==I)&&e.acceptToken(sa)}}),da=new b(e=>{if(!fe.includes(e.peek(-1))){let{next:O}=e;if(O==ua&&(e.advance(),e.acceptToken(zO)),M(O)){do e.advance();while(M(e.next));e.acceptToken(zO)}}}),Pa=cO({"AtKeyword import charset namespace keyframes media supports":l.definitionKeyword,"from to selector":l.keyword,NamespaceName:l.namespace,KeyframeName:l.labelName,TagName:l.tagName,ClassName:l.className,PseudoClassName:l.constant(l.className),IdName:l.labelName,"FeatureName PropertyName":l.propertyName,AttributeName:l.attributeName,NumberLiteral:l.number,KeywordQuery:l.keyword,UnaryQueryOp:l.operatorKeyword,"CallTag ValueName":l.atom,VariableName:l.variableName,Callee:l.operatorKeyword,Unit:l.unit,"UniversalSelector NestingSelector":l.definitionOperator,MatchOp:l.compareOperator,"ChildOp SiblingOp, LogicOp":l.logicOperator,BinOp:l.arithmeticOperator,Important:l.modifier,Comment:l.blockComment,ParenthesizedContent:l.special(l.name),ColorLiteral:l.color,StringLiteral:l.string,":":l.punctuation,"PseudoOp #":l.derefOperator,"; ,":l.separator,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace}),ga={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},ma={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},Xa={__proto__:null,not:128,only:128,from:158,to:160},Za=w.deserialize({version:14,states:"7WQYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ed'#EdO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#DvO&OQ[O'#DyO&TQ[O'#EPO&cQ[O'#EROOQS'#Ec'#EcOOQS'#ET'#ETQYQ[OOO&jQXO'#CdO'_QWO'#DaO'dQWO'#EjO'oQ[O'#EjQOQWOOOOQP'#Cg'#CgOOQP,59Q,59QO#fQ[O,59QO'yQ[O'#EWO(eQWO,58{O(mQ[O,59SO$lQ[O,59kO$qQ[O,59oO'yQ[O,59sO'yQ[O,59uO'yQ[O,59vO(xQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)PQWO,59SO)UQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)ZQ`O,59oOOQS'#Cp'#CpO$vQdO'#CqO)cQvO'#CsO*pQtO,5:POOQO'#Cx'#CxO)UQWO'#CwO+UQWO'#CyOOQS'#Eg'#EgOOQO'#Dh'#DhO+ZQ[O'#DoO+iQWO'#EkO&TQ[O'#DmO+wQWO'#DpOOQO'#El'#ElO(hQWO,5:^O+|QpO,5:`OOQS'#Dx'#DxO,UQWO,5:bO,ZQ[O,5:bOOQO'#D{'#D{O,cQWO,5:eO,hQWO,5:kO,pQWO,5:mOOQS-E8R-E8RO$vQdO,59{O,xQ[O'#EYO-VQWO,5;UO-VQWO,5;UOOQP1G.l1G.lO-|QXO,5:rOOQO-E8U-E8UOOQS1G.g1G.gOOQP1G.n1G.nO)PQWO1G.nO)UQWO1G.nOOQP1G/V1G/VO.ZQ`O1G/ZO.tQXO1G/_O/[QXO1G/aO/rQXO1G/bO0YQWO,59zO0_Q[O'#DOO0fQdO'#CoOOQP1G/Z1G/ZO$vQdO1G/ZO0mQpO,59]OOQS,59_,59_O$vQdO,59aO0uQWO1G/kOOQS,59c,59cO0zQ!bO,59eO1SQWO'#DhO1_QWO,5:TO1dQWO,5:ZO&TQ[O,5:VO&TQ[O'#EZO1lQWO,5;VO1wQWO,5:XO'yQ[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O2YQWO1G/|O2_QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO2mQtO1G/gOOQO,5:t,5:tO3TQ[O,5:tOOQO-E8W-E8WO3bQWO1G0pOOQP7+$Y7+$YOOQP7+$u7+$uO$vQdO7+$uOOQS1G/f1G/fO3mQXO'#EiO3tQWO,59jO3yQtO'#EUO4nQdO'#EfO4xQWO,59ZO4}QpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO5VQWO1G/PO$vQdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO5[QWO,5:uOOQO-E8X-E8XO5jQXO1G/vOOQS7+%h7+%hO5qQYO'#CsO(hQWO'#E[O5yQdO,5:hOOQS,5:h,5:hO6XQtO'#EXO$vQdO'#EXO7VQdO7+%ROOQO7+%R7+%ROOQO1G0`1G0`O7jQpO<T![;'S%^;'S;=`%o<%lO%^^;TUoWOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^^;nYoW#[UOy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^^[[oW#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^_?VSpVOy%^z;'S%^;'S;=`%o<%lO%^^?hWjSOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^_@VU#XPOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjSOy%^z{@}{;'S%^;'S;=`%o<%lO%^~ASUoWOy@}yzAfz{Bm{;'S@};'S;=`Co<%lO@}~AiTOzAfz{Ax{;'SAf;'S;=`Bg<%lOAf~A{VOzAfz{Ax{!PAf!P!QBb!Q;'SAf;'S;=`Bg<%lOAf~BgOR~~BjP;=`<%lAf~BrWoWOy@}yzAfz{Bm{!P@}!P!QC[!Q;'S@};'S;=`Co<%lO@}~CcSoWR~Oy%^z;'S%^;'S;=`%o<%lO%^~CrP;=`<%l@}^Cz[#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^XDuU]POy%^z![%^![!]EX!];'S%^;'S;=`%o<%lO%^XE`S^PoWOy%^z;'S%^;'S;=`%o<%lO%^_EqS!WVOy%^z;'S%^;'S;=`%o<%lO%^YFSSzQOy%^z;'S%^;'S;=`%o<%lO%^XFeU|POy%^z!`%^!`!aFw!a;'S%^;'S;=`%o<%lO%^XGOS|PoWOy%^z;'S%^;'S;=`%o<%lO%^XG_WOy%^z!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHO[!YPoWOy%^z}%^}!OGw!O!Q%^!Q![Gw![!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHySxPOy%^z;'S%^;'S;=`%o<%lO%^^I[SvUOy%^z;'S%^;'S;=`%o<%lO%^XIkUOy%^z#b%^#b#cI}#c;'S%^;'S;=`%o<%lO%^XJSUoWOy%^z#W%^#W#XJf#X;'S%^;'S;=`%o<%lO%^XJmS!`PoWOy%^z;'S%^;'S;=`%o<%lO%^XJ|UOy%^z#f%^#f#gJf#g;'S%^;'S;=`%o<%lO%^XKeS!RPOy%^z;'S%^;'S;=`%o<%lO%^_KvS!QVOy%^z;'S%^;'S;=`%o<%lO%^ZLXU!PPOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^WLnP;=`<%l$}",tokenizers:[fa,da,$a,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:95,get:e=>ga[e]||-1},{term:56,get:e=>ma[e]||-1},{term:96,get:e=>Xa[e]||-1}],tokenPrec:1123});let tO=null;function aO(){if(!tO&&typeof document=="object"&&document.body){let{style:e}=document.body,O=[],t=new Set;for(let a in e)a!="cssText"&&a!="cssFloat"&&typeof e[a]=="string"&&(/[A-Z]/.test(a)&&(a=a.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),t.has(a)||(O.push(a),t.add(a)));tO=O.sort().map(a=>({type:"property",label:a}))}return tO||[]}const IO=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),EO=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),ba=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),x=/^[\w-]*/,xa=e=>{let{state:O,pos:t}=e,a=C(O).resolveInner(t,-1);if(a.name=="PropertyName")return{from:a.from,options:aO(),validFor:x};if(a.name=="ValueName")return{from:a.from,options:EO,validFor:x};if(a.name=="PseudoClassName")return{from:a.from,options:IO,validFor:x};if(a.name=="TagName"){for(let{parent:r}=a;r;r=r.parent)if(r.name=="Block")return{from:a.from,options:aO(),validFor:x};return{from:a.from,options:ba,validFor:x}}if(!e.explicit)return null;let i=a.resolve(t),s=i.childBefore(t);return s&&s.name==":"&&i.name=="PseudoClassSelector"?{from:t,options:IO,validFor:x}:s&&s.name==":"&&i.name=="Declaration"||i.name=="ArgList"?{from:t,options:EO,validFor:x}:i.name=="Block"?{from:t,options:aO(),validFor:x}:null},J=hO.define({name:"css",parser:Za.configure({props:[pO.add({Declaration:z()}),uO.add({Block:ee})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function ya(){return new SO(J,J.data.of({autocomplete:xa}))}const NO=301,BO=1,Ya=2,DO=302,ka=304,va=305,wa=3,Wa=4,Ta=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Pe=125,Va=59,MO=47,Ua=42,_a=43,qa=45,ja=new ae({start:!1,shift(e,O){return O==wa||O==Wa||O==ka?e:O==va},strict:!1}),Ca=new b((e,O)=>{let{next:t}=e;(t==Pe||t==-1||O.context)&&O.canShift(DO)&&e.acceptToken(DO)},{contextual:!0,fallback:!0}),Ga=new b((e,O)=>{let{next:t}=e,a;Ta.indexOf(t)>-1||t==MO&&((a=e.peek(1))==MO||a==Ua)||t!=Pe&&t!=Va&&t!=-1&&!O.context&&O.canShift(NO)&&e.acceptToken(NO)},{contextual:!0}),Ra=new b((e,O)=>{let{next:t}=e;if((t==_a||t==qa)&&(e.advance(),t==e.next)){e.advance();let a=!O.context&&O.canShift(BO);e.acceptToken(a?BO:Ya)}},{contextual:!0}),za=cO({"get set async static":l.modifier,"for while do if else switch try catch finally return throw break continue default case":l.controlKeyword,"in of await yield void typeof delete instanceof":l.operatorKeyword,"let var const function class extends":l.definitionKeyword,"import export from":l.moduleKeyword,"with debugger as new":l.keyword,TemplateString:l.special(l.string),super:l.atom,BooleanLiteral:l.bool,this:l.self,null:l.null,Star:l.modifier,VariableName:l.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":l.function(l.variableName),VariableDefinition:l.definition(l.variableName),Label:l.labelName,PropertyName:l.propertyName,PrivatePropertyName:l.special(l.propertyName),"CallExpression/MemberExpression/PropertyName":l.function(l.propertyName),"FunctionDeclaration/VariableDefinition":l.function(l.definition(l.variableName)),"ClassDeclaration/VariableDefinition":l.definition(l.className),PropertyDefinition:l.definition(l.propertyName),PrivatePropertyDefinition:l.definition(l.special(l.propertyName)),UpdateOp:l.updateOperator,LineComment:l.lineComment,BlockComment:l.blockComment,Number:l.number,String:l.string,Escape:l.escape,ArithOp:l.arithmeticOperator,LogicOp:l.logicOperator,BitOp:l.bitwiseOperator,CompareOp:l.compareOperator,RegExp:l.regexp,Equals:l.definitionOperator,Arrow:l.function(l.punctuation),": Spread":l.punctuation,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace,"InterpolationStart InterpolationEnd":l.special(l.brace),".":l.derefOperator,", ;":l.separator,"@":l.meta,TypeName:l.typeName,TypeDefinition:l.definition(l.typeName),"type enum interface implements namespace module declare":l.definitionKeyword,"abstract global Privacy readonly override":l.modifier,"is keyof unique infer":l.operatorKeyword,JSXAttributeValue:l.attributeValue,JSXText:l.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":l.angleBracket,"JSXIdentifier JSXNameSpacedName":l.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":l.attributeName,"JSXBuiltin/JSXIdentifier":l.standard(l.tagName)}),Aa={__proto__:null,export:14,as:19,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:70,void:74,typeof:78,super:96,new:130,delete:146,yield:155,await:159,class:164,public:219,private:219,protected:219,readonly:221,instanceof:240,satisfies:243,in:244,const:246,import:278,keyof:333,unique:337,infer:343,is:379,abstract:399,implements:401,type:403,let:406,var:408,interface:415,enum:419,namespace:425,module:427,declare:431,global:435,for:456,of:465,while:468,with:472,do:476,if:480,else:482,switch:486,case:492,try:498,catch:502,finally:506,return:510,throw:514,break:518,continue:522,debugger:526},Ia={__proto__:null,async:117,get:119,set:121,public:181,private:181,protected:181,static:183,abstract:185,override:187,readonly:193,accessor:195,new:383},Ea={__proto__:null,"<":137},Na=w.deserialize({version:14,states:"$BhO`QUOOO%QQUOOO'TQWOOP(_OSOOO*mQ(CjO'#CfO*tOpO'#CgO+SO!bO'#CgO+bO07`O'#DZO-sQUO'#DaO.TQUO'#DlO%QQUO'#DvO0[QUO'#EOOOQ(CY'#EW'#EWO0rQSO'#ETOOQO'#I_'#I_O0zQSO'#GjOOQO'#Eh'#EhO1VQSO'#EgO1[QSO'#EgO3^Q(CjO'#JbO5}Q(CjO'#JcO6kQSO'#FVO6pQ#tO'#FnOOQ(CY'#F_'#F_O6{O&jO'#F_O7ZQ,UO'#FuO8qQSO'#FtOOQ(CY'#Jc'#JcOOQ(CW'#Jb'#JbOOQQ'#J|'#J|O8vQSO'#IOO8{Q(C[O'#IPOOQQ'#JO'#JOOOQQ'#IT'#ITQ`QUOOO%QQUO'#DnO9TQUO'#DzO%QQUO'#D|O9[QSO'#GjO9aQ,UO'#ClO9oQSO'#EfO9zQSO'#EqO:PQ,UO'#F^O:nQSO'#GjO:sQSO'#GnO;OQSO'#GnO;^QSO'#GqO;^QSO'#GrO;^QSO'#GtO9[QSO'#GwO;}QSO'#GzO=`QSO'#CbO=pQSO'#HXO=xQSO'#H_O=xQSO'#HaO`QUO'#HcO=xQSO'#HeO=xQSO'#HhO=}QSO'#HnO>SQ(C]O'#HtO%QQUO'#HvO>_Q(C]O'#HxO>jQ(C]O'#HzO8{Q(C[O'#H|O>uQ(CjO'#CfO?wQWO'#DfQOQSOOO@_QSO'#EPO9aQ,UO'#EfO@jQSO'#EfO@uQ`O'#F^OOQQ'#Cd'#CdOOQ(CW'#Dk'#DkOOQ(CW'#Jf'#JfO%QQUO'#JfOBOQWO'#E_OOQ(CW'#E^'#E^OBYQ(C`O'#E_OBtQWO'#ESOOQO'#Ji'#JiOCYQWO'#ESOCgQWO'#E_OC}QWO'#EeODQQWO'#E_O@}QWO'#E_OBtQWO'#E_PDkO?MpO'#C`POOO)CDm)CDmOOOO'#IU'#IUODvOpO,59ROOQ(CY,59R,59ROOOO'#IV'#IVOEUO!bO,59RO%QQUO'#D]OOOO'#IX'#IXOEdO07`O,59uOOQ(CY,59u,59uOErQUO'#IYOFVQSO'#JdOHXQbO'#JdO+pQUO'#JdOH`QSO,59{OHvQSO'#EhOITQSO'#JqOI`QSO'#JpOI`QSO'#JpOIhQSO,5;UOImQSO'#JoOOQ(CY,5:W,5:WOItQUO,5:WOKuQ(CjO,5:bOLfQSO,5:jOLkQSO'#JmOMeQ(C[O'#JnO:sQSO'#JmOMlQSO'#JmOMtQSO,5;TOMyQSO'#JmOOQ(CY'#Cf'#CfO%QQUO'#EOONmQ`O,5:oOOQO'#Jj'#JjOOQO-E<]-E<]O9[QSO,5=UO! TQSO,5=UO! YQUO,5;RO!#]Q,UO'#EcO!$pQSO,5;RO!&YQ,UO'#DpO!&aQUO'#DuO!&kQWO,5;[O!&sQWO,5;[O%QQUO,5;[OOQQ'#E}'#E}OOQQ'#FP'#FPO%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]O%QQUO,5;]OOQQ'#FT'#FTO!'RQUO,5;nOOQ(CY,5;s,5;sOOQ(CY,5;t,5;tO!)UQSO,5;tOOQ(CY,5;u,5;uO%QQUO'#IeO!)^Q(C[O,5jOOQQ'#JW'#JWOOQQ,5>k,5>kOOQQ-EgQWO'#EkOOQ(CW'#Jo'#JoO!>nQ(C[O'#J}O8{Q(C[O,5=YO;^QSO,5=`OOQO'#Cr'#CrO!>yQWO,5=]O!?RQ,UO,5=^O!?^QSO,5=`O!?cQ`O,5=cO=}QSO'#G|O9[QSO'#HOO!?kQSO'#HOO9aQ,UO'#HRO!?pQSO'#HROOQQ,5=f,5=fO!?uQSO'#HSO!?}QSO'#ClO!@SQSO,58|O!@^QSO,58|O!BfQUO,58|OOQQ,58|,58|O!BsQ(C[O,58|O%QQUO,58|O!COQUO'#HZOOQQ'#H['#H[OOQQ'#H]'#H]O`QUO,5=sO!C`QSO,5=sO`QUO,5=yO`QUO,5={O!CeQSO,5=}O`QUO,5>PO!CjQSO,5>SO!CoQUO,5>YOOQQ,5>`,5>`O%QQUO,5>`O8{Q(C[O,5>bOOQQ,5>d,5>dO!GvQSO,5>dOOQQ,5>f,5>fO!GvQSO,5>fOOQQ,5>h,5>hO!G{QWO'#DXO%QQUO'#JfO!HjQWO'#JfO!IXQWO'#DgO!IjQWO'#DgO!K{QUO'#DgO!LSQSO'#JeO!L[QSO,5:QO!LaQSO'#ElO!LoQSO'#JrO!LwQSO,5;VO!L|QWO'#DgO!MZQWO'#EROOQ(CY,5:k,5:kO%QQUO,5:kO!MbQSO,5:kO=}QSO,5;QO!;xQWO,5;QO!tO+pQUO,5>tOOQO,5>z,5>zO#$vQUO'#IYOOQO-EtO$8XQSO1G5jO$8aQSO1G5vO$8iQbO1G5wO:sQSO,5>zO$8sQSO1G5sO$8sQSO1G5sO:sQSO1G5sO$8{Q(CjO1G5tO%QQUO1G5tO$9]Q(C[O1G5tO$9nQSO,5>|O:sQSO,5>|OOQO,5>|,5>|O$:SQSO,5>|OOQO-E<`-E<`OOQO1G0]1G0]OOQO1G0_1G0_O!)XQSO1G0_OOQQ7+([7+([O!#]Q,UO7+([O%QQUO7+([O$:bQSO7+([O$:mQ,UO7+([O$:{Q(CjO,59nO$=TQ(CjO,5UOOQQ,5>U,5>UO%QQUO'#HkO%&qQSO'#HmOOQQ,5>[,5>[O:sQSO,5>[OOQQ,5>^,5>^OOQQ7+)`7+)`OOQQ7+)f7+)fOOQQ7+)j7+)jOOQQ7+)l7+)lO%&vQWO1G5lO%'[Q$IUO1G0rO%'fQSO1G0rOOQO1G/m1G/mO%'qQ$IUO1G/mO=}QSO1G/mO!'RQUO'#DgOOQO,5>u,5>uOOQO-E{,5>{OOQO-E<_-E<_O!;xQWO1G/mOOQO-E<[-E<[OOQ(CY1G0X1G0XOOQ(CY7+%q7+%qO!MeQSO7+%qOOQ(CY7+&W7+&WO=}QSO7+&WO!;xQWO7+&WOOQO7+%t7+%tO$7kQ(CjO7+&POOQO7+&P7+&PO%QQUO7+&PO%'{Q(C[O7+&PO=}QSO7+%tO!;xQWO7+%tO%(WQ(C[O7+&POBtQWO7+%tO%(fQ(C[O7+&PO%(zQ(C`O7+&PO%)UQWO7+%tOBtQWO7+&PO%)cQWO7+&PO%)yQSO7++_O%)yQSO7++_O%*RQ(CjO7++`O%QQUO7++`OOQO1G4h1G4hO:sQSO1G4hO%*cQSO1G4hOOQO7+%y7+%yO!MeQSO<vOOQO-EwO%QQUO,5>wOOQO-ESQ$IUO1G0wO%>ZQ$IUO1G0wO%@RQ$IUO1G0wO%@fQ(CjO<VOOQQ,5>X,5>XO&#WQSO1G3vO:sQSO7+&^O!'RQUO7+&^OOQO7+%X7+%XO&#]Q$IUO1G5wO=}QSO7+%XOOQ(CY<zAN>zO%QQUOAN?VO=}QSOAN>zO&<^Q(C[OAN?VO!;xQWOAN>zO&zO&RO!V+iO^(qX'j(qX~O#W+mO'|%OO~Og+pO!X$yO'|%OO~O!X+rO~Oy+tO!XXO~O!t+yO~Ob,OO~O's#jO!W(sP~Ob%lO~O%a!OO's%|O~PRO!V,yO!W(fa~O!W2SO~P'TO^%^O#W2]O'j%^O~O^%^O!a#rO#W2]O'j%^O~O^%^O!a#rO!h%ZO!l2aO#W2]O'j%^O'|%OO(`'dO~O!]2bO!^2bO't!iO~PBtO![2eO!]2bO!^2bO#S2fO#T2fO't!iO~PBtO![2eO!]2bO!^2bO#P2gO#S2fO#T2fO't!iO~PBtO^%^O!a#rO!l2aO#W2]O'j%^O(`'dO~O^%^O'j%^O~P!3jO!V$^Oo$ja~O!S&|i!V&|i~P!3jO!V'xO!S(Wi~O!V(PO!S(di~O!S(ei!V(ei~P!3jO!V(]O!g(ai~O!V(bi!g(bi^(bi'j(bi~P!3jO#W2kO!V(bi!g(bi^(bi'j(bi~O|%vO!X%wO!x]O#a2nO#b2mO's%eO~O|%vO!X%wO#b2mO's%eO~Og2uO!X'QO%`2tO~Og2uO!X'QO%`2tO'|%OO~O#cvaPvaXva^vakva!eva!fva!hva!lva#fva#gva#hva#iva#jva#kva#lva#mva#nva#pva#rva#tva#uva'jva(Qva(`va!gva!Sva'hvaova!Xva%`va!ava~P#M{O#c$kaP$kaX$ka^$kak$kaz$ka!e$ka!f$ka!h$ka!l$ka#f$ka#g$ka#h$ka#i$ka#j$ka#k$ka#l$ka#m$ka#n$ka#p$ka#r$ka#t$ka#u$ka'j$ka(Q$ka(`$ka!g$ka!S$ka'h$kao$ka!X$ka%`$ka!a$ka~P#NqO#c$maP$maX$ma^$mak$maz$ma!e$ma!f$ma!h$ma!l$ma#f$ma#g$ma#h$ma#i$ma#j$ma#k$ma#l$ma#m$ma#n$ma#p$ma#r$ma#t$ma#u$ma'j$ma(Q$ma(`$ma!g$ma!S$ma'h$mao$ma!X$ma%`$ma!a$ma~P$ dO#c${aP${aX${a^${ak${az${a!V${a!e${a!f${a!h${a!l${a#f${a#g${a#h${a#i${a#j${a#k${a#l${a#m${a#n${a#p${a#r${a#t${a#u${a'j${a(Q${a(`${a!g${a!S${a'h${a#W${ao${a!X${a%`${a!a${a~P#(yO^#Zq!V#Zq'j#Zq'h#Zq!S#Zq!g#Zqo#Zq!X#Zq%`#Zq!a#Zq~P!3jOd'OX!V'OX~P!$uO!V._Od(Za~O!U2}O!V'PX!g'PX~P%QO!V.bO!g([a~O!V.bO!g([a~P!3jO!S3QO~O#x!ja!W!ja~PI{O#x!ba!V!ba!W!ba~P#?dO#x!na!W!na~P!6TO#x!pa!W!pa~P!8nO!X3dO$TfO$^3eO~O!W3iO~Oo3jO~P#(yO^$gq!V$gq'j$gq'h$gq!S$gq!g$gqo$gq!X$gq%`$gq!a$gq~P!3jO!S3kO~Ol.}O'uTO'xUO~Oy)sO|)tO(h)xOg%Wi(g%Wi!V%Wi#W%Wi~Od%Wi#x%Wi~P$HbOy)sO|)tOg%Yi(g%Yi(h%Yi!V%Yi#W%Yi~Od%Yi#x%Yi~P$ITO(`$WO~P#(yO!U3nO's%eO!V'YX!g'YX~O!V/VO!g(ma~O!V/VO!a#rO!g(ma~O!V/VO!a#rO(`'dO!g(ma~Od$ti!V$ti#W$ti#x$ti~P!-jO!U3vO's*UO!S'[X!V'[X~P!.XO!V/_O!S(na~O!V/_O!S(na~P#(yO!a#rO~O!a#rO#n4OO~Ok4RO!a#rO(`'dO~Od(Oi!V(Oi~P!-jO#W4UOd(Oi!V(Oi~P!-jO!g4XO~O^$hq!V$hq'j$hq'h$hq!S$hq!g$hqo$hq!X$hq%`$hq!a$hq~P!3jO!V4]O!X(oX~P#(yO!f#tO~P3zO!X$rX%TYX^$rX!V$rX'j$rX~P!,aO%T4_OghXyhX|hX!XhX(ghX(hhX^hX!VhX'jhX~O%T4_O~O%a4fO's+WO'uTO'xUO!V'eX!W'eX~O!V0_O!W(ua~OX4jO~O]4kO~O!S4oO~O^%^O'j%^O~P#(yO!X$yO~P#(yO!V4tO#W4vO!W(rX~O!W4wO~Ol!kO|4yO![5WO!]4}O!^4}O!x;oO!|5VO!}5UO#O5UO#P5TO#S5SO#T!wO't!iO'uTO'xUO(T!jO(_!nO~O!W5RO~P%#XOg5]O!X0zO%`5[O~Og5]O!X0zO%`5[O'|%OO~O's#jO!V'dX!W'dX~O!V1VO!W(sa~O'uTO'xUO(T5fO~O]5jO~O!g5mO~P%QO^5oO~O^5oO~P%QO#n5qO&Q5rO~PMPO_1mO!W5vO&`1lO~P`O!a5xO~O!a5zO!V(Yi!W(Yi!a(Yi!h(Yi'|(Yi~O!V#`i!W#`i~P#?dO#W5{O!V#`i!W#`i~O!V!Zi!W!Zi~P#?dO^%^O#W6UO'j%^O~O^%^O!a#rO#W6UO'j%^O~O^%^O!a#rO!l6ZO#W6UO'j%^O(`'dO~O!h%ZO'|%OO~P%(fO!]6[O!^6[O't!iO~PBtO![6_O!]6[O!^6[O#S6`O#T6`O't!iO~PBtO!V(]O!g(aq~O!V(bq!g(bq^(bq'j(bq~P!3jO|%vO!X%wO#b6dO's%eO~O!X'QO%`6gO~Og6jO!X'QO%`6gO~O#c%WiP%WiX%Wi^%Wik%Wiz%Wi!e%Wi!f%Wi!h%Wi!l%Wi#f%Wi#g%Wi#h%Wi#i%Wi#j%Wi#k%Wi#l%Wi#m%Wi#n%Wi#p%Wi#r%Wi#t%Wi#u%Wi'j%Wi(Q%Wi(`%Wi!g%Wi!S%Wi'h%Wio%Wi!X%Wi%`%Wi!a%Wi~P$HbO#c%YiP%YiX%Yi^%Yik%Yiz%Yi!e%Yi!f%Yi!h%Yi!l%Yi#f%Yi#g%Yi#h%Yi#i%Yi#j%Yi#k%Yi#l%Yi#m%Yi#n%Yi#p%Yi#r%Yi#t%Yi#u%Yi'j%Yi(Q%Yi(`%Yi!g%Yi!S%Yi'h%Yio%Yi!X%Yi%`%Yi!a%Yi~P$ITO#c$tiP$tiX$ti^$tik$tiz$ti!V$ti!e$ti!f$ti!h$ti!l$ti#f$ti#g$ti#h$ti#i$ti#j$ti#k$ti#l$ti#m$ti#n$ti#p$ti#r$ti#t$ti#u$ti'j$ti(Q$ti(`$ti!g$ti!S$ti'h$ti#W$tio$ti!X$ti%`$ti!a$ti~P#(yOd'Oa!V'Oa~P!-jO!V'Pa!g'Pa~P!3jO!V.bO!g([i~O#x#Zi!V#Zi!W#Zi~P#?dOP$YOy#vOz#wO|#xO!f#tO!h#uO!l$YO(QVOX#eik#ei!e#ei#g#ei#h#ei#i#ei#j#ei#k#ei#l#ei#m#ei#n#ei#p#ei#r#ei#t#ei#u#ei#x#ei(`#ei(g#ei(h#ei!V#ei!W#ei~O#f#ei~P%2xO#f;wO~P%2xOP$YOy#vOz#wO|#xO!f#tO!h#uO!l$YO#f;wO#g;xO#h;xO#i;xO(QVOX#ei!e#ei#j#ei#k#ei#l#ei#m#ei#n#ei#p#ei#r#ei#t#ei#u#ei#x#ei(`#ei(g#ei(h#ei!V#ei!W#ei~Ok#ei~P%5TOk;yO~P%5TOP$YOk;yOy#vOz#wO|#xO!f#tO!h#uO!l$YO#f;wO#g;xO#h;xO#i;xO#j;zO(QVO#p#ei#r#ei#t#ei#u#ei#x#ei(`#ei(g#ei(h#ei!V#ei!W#ei~OX#ei!e#ei#k#ei#l#ei#m#ei#n#ei~P%7`OXbO^#vy!V#vy'j#vy'h#vy!S#vy!g#vyo#vy!X#vy%`#vy!a#vy~P!3jOg=jOy)sO|)tO(g)vO(h)xO~OP#eiX#eik#eiz#ei!e#ei!f#ei!h#ei!l#ei#f#ei#g#ei#h#ei#i#ei#j#ei#k#ei#l#ei#m#ei#n#ei#p#ei#r#ei#t#ei#u#ei#x#ei(Q#ei(`#ei!V#ei!W#ei~P%AYO!f#tOP(PXX(PXg(PXk(PXy(PXz(PX|(PX!e(PX!h(PX!l(PX#f(PX#g(PX#h(PX#i(PX#j(PX#k(PX#l(PX#m(PX#n(PX#p(PX#r(PX#t(PX#u(PX#x(PX(Q(PX(`(PX(g(PX(h(PX!V(PX!W(PX~O#x#yi!V#yi!W#yi~P#?dO#x!ni!W!ni~P$!qO!W6vO~O!V'Xa!W'Xa~P#?dO!a#rO(`'dO!V'Ya!g'Ya~O!V/VO!g(mi~O!V/VO!a#rO!g(mi~Od$tq!V$tq#W$tq#x$tq~P!-jO!S'[a!V'[a~P#(yO!a6}O~O!V/_O!S(ni~P#(yO!V/_O!S(ni~O!S7RO~O!a#rO#n7WO~Ok7XO!a#rO(`'dO~O!S7ZO~Od$vq!V$vq#W$vq#x$vq~P!-jO^$hy!V$hy'j$hy'h$hy!S$hy!g$hyo$hy!X$hy%`$hy!a$hy~P!3jO!V4]O!X(oa~O^#Zy!V#Zy'j#Zy'h#Zy!S#Zy!g#Zyo#Zy!X#Zy%`#Zy!a#Zy~P!3jOX7`O~O!V0_O!W(ui~O]7fO~O!a5zO~O(T(qO!V'aX!W'aX~O!V4tO!W(ra~O!h%ZO'|%OO^(YX!a(YX!l(YX#W(YX'j(YX(`(YX~O's7oO~P.[O!x;oO!|7rO!}7qO#O7qO#P7pO#S'bO#T'bO~PBtO^%^O!a#rO!l'hO#W'fO'j%^O(`'dO~O!W7vO~P%#XOl!kO'uTO'xUO(T!jO(_!nO~O|7wO~P%MdO![7{O!]7zO!^7zO#P7pO#S'bO#T'bO't!iO~PBtO![7{O!]7zO!^7zO!}7|O#O7|O#P7pO#S'bO#T'bO't!iO~PBtO!]7zO!^7zO't!iO(T!jO(_!nO~O!X0zO~O!X0zO%`8OO~Og8RO!X0zO%`8OO~OX8WO!V'da!W'da~O!V1VO!W(si~O!g8[O~O!g8]O~O!g8^O~O!g8^O~P%QO^8`O~O!a8cO~O!g8dO~O!V(ei!W(ei~P#?dO^%^O#W8lO'j%^O~O^%^O!a#rO#W8lO'j%^O~O^%^O!a#rO!l8pO#W8lO'j%^O(`'dO~O!h%ZO'|%OO~P&$QO!]8qO!^8qO't!iO~PBtO!V(]O!g(ay~O!V(by!g(by^(by'j(by~P!3jO!X'QO%`8uO~O#c$tqP$tqX$tq^$tqk$tqz$tq!V$tq!e$tq!f$tq!h$tq!l$tq#f$tq#g$tq#h$tq#i$tq#j$tq#k$tq#l$tq#m$tq#n$tq#p$tq#r$tq#t$tq#u$tq'j$tq(Q$tq(`$tq!g$tq!S$tq'h$tq#W$tqo$tq!X$tq%`$tq!a$tq~P#(yO#c$vqP$vqX$vq^$vqk$vqz$vq!V$vq!e$vq!f$vq!h$vq!l$vq#f$vq#g$vq#h$vq#i$vq#j$vq#k$vq#l$vq#m$vq#n$vq#p$vq#r$vq#t$vq#u$vq'j$vq(Q$vq(`$vq!g$vq!S$vq'h$vq#W$vqo$vq!X$vq%`$vq!a$vq~P#(yO!V'Pi!g'Pi~P!3jO#x#Zq!V#Zq!W#Zq~P#?dOy/yOz/yO|/zOPvaXvagvakva!eva!fva!hva!lva#fva#gva#hva#iva#jva#kva#lva#mva#nva#pva#rva#tva#uva#xva(Qva(`va(gva(hva!Vva!Wva~Oy)sO|)tOP$kaX$kag$kak$kaz$ka!e$ka!f$ka!h$ka!l$ka#f$ka#g$ka#h$ka#i$ka#j$ka#k$ka#l$ka#m$ka#n$ka#p$ka#r$ka#t$ka#u$ka#x$ka(Q$ka(`$ka(g$ka(h$ka!V$ka!W$ka~Oy)sO|)tOP$maX$mag$mak$maz$ma!e$ma!f$ma!h$ma!l$ma#f$ma#g$ma#h$ma#i$ma#j$ma#k$ma#l$ma#m$ma#n$ma#p$ma#r$ma#t$ma#u$ma#x$ma(Q$ma(`$ma(g$ma(h$ma!V$ma!W$ma~OP${aX${ak${az${a!e${a!f${a!h${a!l${a#f${a#g${a#h${a#i${a#j${a#k${a#l${a#m${a#n${a#p${a#r${a#t${a#u${a#x${a(Q${a(`${a!V${a!W${a~P%AYO#x$gq!V$gq!W$gq~P#?dO#x$hq!V$hq!W$hq~P#?dO!W9PO~O#x9QO~P!-jO!a#rO!V'Yi!g'Yi~O!a#rO(`'dO!V'Yi!g'Yi~O!V/VO!g(mq~O!S'[i!V'[i~P#(yO!V/_O!S(nq~O!S9WO~P#(yO!S9WO~Od(Oy!V(Oy~P!-jO!V'_a!X'_a~P#(yO!X%Sq^%Sq!V%Sq'j%Sq~P#(yOX9]O~O!V0_O!W(uq~O#W9aO!V'aa!W'aa~O!V4tO!W(ri~P#?dOPYXXYXkYXyYXzYX|YX!SYX!VYX!eYX!fYX!hYX!lYX#WYX#ccX#fYX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#pYX#rYX#tYX#uYX#zYX(QYX(`YX(gYX(hYX~O!a%QX#n%QX~P&6lO#S-cO#T-cO~PBtO#P9eO#S-cO#T-cO~PBtO!}9fO#O9fO#P9eO#S-cO#T-cO~PBtO!]9iO!^9iO't!iO(T!jO(_!nO~O![9lO!]9iO!^9iO#P9eO#S-cO#T-cO't!iO~PBtO!X0zO%`9oO~O'uTO'xUO(T9tO~O!V1VO!W(sq~O!g9wO~O!g9wO~P%QO!g9yO~O!g9zO~O#W9|O!V#`y!W#`y~O!V#`y!W#`y~P#?dO^%^O#W:QO'j%^O~O^%^O!a#rO#W:QO'j%^O~O^%^O!a#rO!l:UO#W:QO'j%^O(`'dO~O!X'QO%`:XO~O#x#vy!V#vy!W#vy~P#?dOP$tiX$tik$tiz$ti!e$ti!f$ti!h$ti!l$ti#f$ti#g$ti#h$ti#i$ti#j$ti#k$ti#l$ti#m$ti#n$ti#p$ti#r$ti#t$ti#u$ti#x$ti(Q$ti(`$ti!V$ti!W$ti~P%AYOy)sO|)tO(h)xOP%WiX%Wig%Wik%Wiz%Wi!e%Wi!f%Wi!h%Wi!l%Wi#f%Wi#g%Wi#h%Wi#i%Wi#j%Wi#k%Wi#l%Wi#m%Wi#n%Wi#p%Wi#r%Wi#t%Wi#u%Wi#x%Wi(Q%Wi(`%Wi(g%Wi!V%Wi!W%Wi~Oy)sO|)tOP%YiX%Yig%Yik%Yiz%Yi!e%Yi!f%Yi!h%Yi!l%Yi#f%Yi#g%Yi#h%Yi#i%Yi#j%Yi#k%Yi#l%Yi#m%Yi#n%Yi#p%Yi#r%Yi#t%Yi#u%Yi#x%Yi(Q%Yi(`%Yi(g%Yi(h%Yi!V%Yi!W%Yi~O#x$hy!V$hy!W$hy~P#?dO#x#Zy!V#Zy!W#Zy~P#?dO!a#rO!V'Yq!g'Yq~O!V/VO!g(my~O!S'[q!V'[q~P#(yO!S:`O~P#(yO!V0_O!W(uy~O!V4tO!W(rq~O#S2fO#T2fO~PBtO#P:gO#S2fO#T2fO~PBtO!]:kO!^:kO't!iO(T!jO(_!nO~O!X0zO%`:nO~O!g:qO~O^%^O#W:vO'j%^O~O^%^O!a#rO#W:vO'j%^O~O!X'QO%`:{O~OP$tqX$tqk$tqz$tq!e$tq!f$tq!h$tq!l$tq#f$tq#g$tq#h$tq#i$tq#j$tq#k$tq#l$tq#m$tq#n$tq#p$tq#r$tq#t$tq#u$tq#x$tq(Q$tq(`$tq!V$tq!W$tq~P%AYOP$vqX$vqk$vqz$vq!e$vq!f$vq!h$vq!l$vq#f$vq#g$vq#h$vq#i$vq#j$vq#k$vq#l$vq#m$vq#n$vq#p$vq#r$vq#t$vq#u$vq#x$vq(Q$vq(`$vq!V$vq!W$vq~P%AYOd%[!Z!V%[!Z#W%[!Z#x%[!Z~P!-jO!V'aq!W'aq~P#?dO#S6`O#T6`O~PBtO!V#`!Z!W#`!Z~P#?dO^%^O#W;ZO'j%^O~O#c%[!ZP%[!ZX%[!Z^%[!Zk%[!Zz%[!Z!V%[!Z!e%[!Z!f%[!Z!h%[!Z!l%[!Z#f%[!Z#g%[!Z#h%[!Z#i%[!Z#j%[!Z#k%[!Z#l%[!Z#m%[!Z#n%[!Z#p%[!Z#r%[!Z#t%[!Z#u%[!Z'j%[!Z(Q%[!Z(`%[!Z!g%[!Z!S%[!Z'h%[!Z#W%[!Zo%[!Z!X%[!Z%`%[!Z!a%[!Z~P#(yOP%[!ZX%[!Zk%[!Zz%[!Z!e%[!Z!f%[!Z!h%[!Z!l%[!Z#f%[!Z#g%[!Z#h%[!Z#i%[!Z#j%[!Z#k%[!Z#l%[!Z#m%[!Z#n%[!Z#p%[!Z#r%[!Z#t%[!Z#u%[!Z#x%[!Z(Q%[!Z(`%[!Z!V%[!Z!W%[!Z~P%AYOo(UX~P1dO't!iO~P!'RO!ScX!VcX#WcX~P&6lOPYXXYXkYXyYXzYX|YX!VYX!VcX!eYX!fYX!hYX!lYX#WYX#WcX#ccX#fYX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#pYX#rYX#tYX#uYX#zYX(QYX(`YX(gYX(hYX~O!acX!gYX!gcX(`cX~P'!sOP;nOQ;nOa=_Ob!fOikOk;nOlkOmkOskOu;nOw;nO|WO!QkO!RkO!XXO!c;qO!hZO!k;nO!l;nO!m;nO!o;rO!q;sO!t!eO$P!hO$TfO's)RO'uTO'xUO(QVO(_[O(l=]O~O!Vv!>v!BnPPP!BuHdPPPPPPPPPPP!FTP!GiPPHd!HyPHdPHdHdHdHdPHd!J`PP!MiP#!nP#!r#!|##Q##QP!MfP##U##UP#&ZP#&_HdHd#&e#)iAQPAQPAQAQP#*sAQAQ#,mAQ#.zAQ#0nAQAQ#1[#3W#3W#3[#3d#3W#3lP#3WPAQ#4hAQ#5pAQAQ6iPPP#6{PP#7e#7eP#7eP#7z#7ePP#8QP#7wP#7w#8d!1p#7w#9O#9U6f(}#9X(}P#9`#9`#9`P(}P(}P(}P(}PP(}P#9f#9iP#9i(}P#9mP#9pP(}P(}P(}P(}P(}P(}(}PP#9v#9|#:W#:^#:d#:j#:p#;O#;U#;[#;f#;l#b#?r#@Q#@W#@^#@d#@j#@t#@z#AQ#A[#An#AtPPPPPPPPPP#AzPPPPPPP#Bn#FYP#Gu#G|#HUPPPP#L`$ U$'t$'w$'z$)w$)z$)}$*UPP$*[$*`$+X$,X$,]$,qPP$,u$,{$-PP$-S$-W$-Z$.P$.g$.l$.o$.r$.x$.{$/P$/TR!yRmpOXr!X#a%]&d&f&g&i,^,c1g1jU!pQ'Q-OQ%ctQ%kwQ%rzQ&[!TS&x!c,vQ'W!f[']!m!r!s!t!u!vS*[$y*aQ+U%lQ+c%tQ+}&UQ,|'PQ-W'XW-`'^'_'`'aQ/p*cQ1U,OU2b-b-d-eS4}0z5QS6[2e2gU7z5U5V5WQ8q6_S9i7{7|Q:k9lR TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody MethodDeclaration AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:362,context:ja,nodeProps:[["group",-26,6,14,16,62,198,202,205,206,208,211,214,225,227,233,235,237,239,242,248,254,256,258,260,262,264,265,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,102,103,112,113,130,133,135,136,137,138,140,141,161,162,164,"Expression",-23,24,26,30,34,36,38,165,167,169,170,172,173,174,176,177,178,180,181,182,192,194,196,197,"Type",-3,84,95,101,"ClassItem"],["openedBy",31,"InterpolationStart",50,"[",54,"{",69,"(",142,"JSXStartTag",154,"JSXStartTag JSXStartCloseTag"],["closedBy",33,"InterpolationEnd",44,"]",55,"}",70,")",143,"JSXSelfCloseEndTag JSXEndTag",159,"JSXEndTag"]],propSources:[za],skippedNodes:[0,3,4,268],repeatNodeCount:32,tokenData:"$>y(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tu>PuvBavwDxwxGgxyMvyz! Qz{!![{|!%O|}!&]}!O!%O!O!P!'g!P!Q!1w!Q!R#0t!R![#3T![!]#@T!]!^#Aa!^!_#Bk!_!`#GS!`!a#In!a!b#N{!b!c$$z!c!}>P!}#O$&U#O#P$'`#P#Q$,w#Q#R$.R#R#S>P#S#T$/`#T#o$0j#o#p$4z#p#q$5p#q#r$7Q#r#s$8^#s$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$I|>P$I|$I}$P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(n%d_$c&j'vp'y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$c&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$c&j'y!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU'y!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$c&j'vpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU'vpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX'vp'y!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$c&j'vp'y!b'l(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST'w#S$c&j'm(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$c&j'vp'y!b'm(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$c&j!l$Ip'vp'y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#p$Id$c&j'vp'y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#p$Id$c&j'vp'y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$2b3l_'u$(n$c&j'y!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k*r4r_$c&j'y!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k)`5vX$c&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q)`6jT$^#t$c&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#t6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y#t7bO$^#t#t7eP;=`<%l6y)`7kP;=`<%l5q*r7w]$^#t$c&j'y!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}%W8uZ'y!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p%W9oU$^#t'y!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}%W:UP;=`<%l8p*r:[P;=`<%l4k#%|:hg$c&j'vp'y!bOY%ZYZ&cZr%Zrs&}st%Ztu`k$c&j'vp'y!b(T!LY's&;d$V#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P+d@`k$c&j'vp'y!b$V#tOY%ZYZ&cZr%Zrs&}st%Ztu@Tuw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![@T![!^%Z!^!_*g!_!c%Z!c!}@T!}#O%Z#O#P&c#P#R%Z#R#S@T#S#T%Z#T#o@T#o#p*g#p$g%Z$g;'S@T;'S;=`BT<%lO@T+dBWP;=`<%l@T(CSB^P;=`<%l>P%#SBl`$c&j'vp'y!b#h$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#SCy_$c&j#z$Id'vp'y!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%DfETa(h%Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#>fi$c&j'vp'y!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#>Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#b%Z#b#c#5T#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%Gh#@b_!a$b$c&j#x%Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$JT>P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(CS$=Uk$c&j'vp'y!b'm(;d(T!LY's&;d$V#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P",tokenizers:[Ga,Ra,2,3,4,5,6,7,8,9,10,11,12,13,Ca,new nO("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOq~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!O~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(S~~",141,325),new nO("j~RQYZXz{^~^O'p~~aP!P!Qd~iO'q~~",25,307)],topRules:{Script:[0,5],SingleExpression:[1,266],SingleClassItem:[2,267]},dialects:{jsx:13213,ts:13215},dynamicPrecedences:{76:1,78:1,162:1,190:1},specialized:[{term:311,get:e=>Aa[e]||-1},{term:327,get:e=>Ia[e]||-1},{term:67,get:e=>Ea[e]||-1}],tokenPrec:13238}),Ba=[g("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),g("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),g("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),g("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),g("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),g(`try { - \${} -} catch (\${error}) { - \${} -}`,{label:"try",detail:"/ catch block",type:"keyword"}),g("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),g(`if (\${}) { - \${} -} else { - \${} -}`,{label:"if",detail:"/ else block",type:"keyword"}),g(`class \${name} { - constructor(\${params}) { - \${} - } -}`,{label:"class",detail:"definition",type:"keyword"}),g('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),g('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],JO=new Fe,ge=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function U(e){return(O,t)=>{let a=O.node.getChild("VariableDefinition");return a&&t(a,e),!0}}const Da=["FunctionDeclaration"],Ma={FunctionDeclaration:U("function"),ClassDeclaration:U("class"),ClassExpression:()=>!0,EnumDeclaration:U("constant"),TypeAliasDeclaration:U("type"),NamespaceDeclaration:U("namespace"),VariableDefinition(e,O){e.matchContext(Da)||O(e,"variable")},TypeDefinition(e,O){O(e,"type")},__proto__:null};function me(e,O){let t=JO.get(O);if(t)return t;let a=[],i=!0;function s(r,n){let o=e.sliceString(r.from,r.to);a.push({label:o,type:n})}return O.cursor(Oe.IncludeAnonymous).iterate(r=>{if(i)i=!1;else if(r.name){let n=Ma[r.name];if(n&&n(r,s)||ge.has(r.name))return!1}else if(r.to-r.from>8192){for(let n of me(e,r.node))a.push(n);return!1}}),JO.set(O,a),a}const LO=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,Xe=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName"];function Ja(e){let O=C(e.state).resolveInner(e.pos,-1);if(Xe.indexOf(O.name)>-1)return null;let t=O.name=="VariableName"||O.to-O.from<20&&LO.test(e.state.sliceDoc(O.from,O.to));if(!t&&!e.explicit)return null;let a=[];for(let i=O;i;i=i.parent)ge.has(i.name)&&(a=a.concat(me(e.state.doc,i)));return{options:a,from:t?O.from:e.pos,validFor:LO}}const Z=hO.define({name:"javascript",parser:Na.configure({props:[pO.add({IfStatement:z({except:/^\s*({|else\b)/}),TryStatement:z({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Ke,SwitchBody:e=>{let O=e.textAfter,t=/^\s*\}/.test(O),a=/^\s*(case|default)\b/.test(O);return e.baseIndent+(t?0:a?1:2)*e.unit},Block:He({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":z({except:/^{/}),JSXElement(e){let O=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(O?0:e.unit)},JSXEscape(e){let O=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(O?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),uO.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression":ee,BlockComment(e){return{from:e.from+2,to:e.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Ze=Z.configure({dialect:"ts"},"typescript"),be=Z.configure({dialect:"jsx"}),xe=Z.configure({dialect:"jsx ts"},"typescript"),La="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(e=>({label:e,type:"keyword"}));function ye(e={}){let O=e.jsx?e.typescript?xe:be:e.typescript?Ze:Z;return new SO(O,[Z.data.of({autocomplete:Je(Xe,Le(Ba.concat(La)))}),Z.data.of({autocomplete:Ja}),e.jsx?Fa:[]])}function Ka(e){for(;;){if(e.name=="JSXOpenTag"||e.name=="JSXSelfClosingTag"||e.name=="JSXFragmentTag")return e;if(!e.parent)return null;e=e.parent}}function KO(e,O,t=e.length){for(let a=O==null?void 0:O.firstChild;a;a=a.nextSibling)if(a.name=="JSXIdentifier"||a.name=="JSXBuiltin"||a.name=="JSXNamespacedName"||a.name=="JSXMemberExpression")return e.sliceString(a.from,Math.min(a.to,t));return""}const Ha=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Fa=k.inputHandler.of((e,O,t,a)=>{if((Ha?e.composing:e.compositionStarted)||e.state.readOnly||O!=t||a!=">"&&a!="/"||!Z.isActiveAt(e.state,O,-1))return!1;let{state:i}=e,s=i.changeByRange(r=>{var n,o;let{head:c}=r,h=C(i).resolveInner(c,-1),Q;if(h.name=="JSXStartTag"&&(h=h.parent),a==">"&&h.name=="JSXFragmentTag")return{range:j.cursor(c+1),changes:{from:c,insert:"><>"}};if(a=="/"&&h.name=="JSXFragmentTag"){let u=h.parent,S=u==null?void 0:u.parent;if(u.from==c-1&&((n=S.lastChild)===null||n===void 0?void 0:n.name)!="JSXEndTag"&&(Q=KO(i.doc,S==null?void 0:S.firstChild,c))){let $=`/${Q}>`;return{range:j.cursor(c+$.length),changes:{from:c,insert:$}}}}else if(a==">"){let u=Ka(h);if(u&&((o=u.lastChild)===null||o===void 0?void 0:o.name)!="JSXEndTag"&&i.sliceDoc(c,c+2)!="`}}}return{range:r}});return s.changes.empty?!1:(e.dispatch(s,{userEvent:"input.type",scrollIntoView:!0}),!0)}),_=["_blank","_self","_top","_parent"],iO=["ascii","utf-8","utf-16","latin1","latin1"],rO=["get","post","put","delete"],sO=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],d=["true","false"],p={},Oi={a:{attrs:{href:null,ping:null,type:null,media:null,target:_,hreflang:null}},abbr:p,address:p,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:p,aside:p,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:p,base:{attrs:{href:null,target:_}},bdi:p,bdo:p,blockquote:{attrs:{cite:null}},body:p,br:p,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:sO,formmethod:rO,formnovalidate:["novalidate"],formtarget:_,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:p,center:p,cite:p,code:p,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:p,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:p,div:p,dl:p,dt:p,em:p,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:p,figure:p,footer:p,form:{attrs:{action:null,name:null,"accept-charset":iO,autocomplete:["on","off"],enctype:sO,method:rO,novalidate:["novalidate"],target:_}},h1:p,h2:p,h3:p,h4:p,h5:p,h6:p,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:p,hgroup:p,hr:p,html:{attrs:{manifest:null}},i:p,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:sO,formmethod:rO,formnovalidate:["novalidate"],formtarget:_,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:p,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:p,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:p,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:iO,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:p,noscript:p,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p,param:{attrs:{name:null,value:null}},pre:p,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:p,rt:p,ruby:p,samp:p,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:iO}},section:p,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:p,source:{attrs:{src:null,type:null,media:null}},span:p,strong:p,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:p,summary:p,sup:p,table:p,tbody:p,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:p,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:p,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:p,time:{attrs:{datetime:null}},title:p,tr:p,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:p,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:p},Ye={accesskey:null,class:null,contenteditable:d,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:d,autocorrect:d,autocapitalize:d,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":d,"aria-autocomplete":["inline","list","both","none"],"aria-busy":d,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":d,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":d,"aria-hidden":d,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":d,"aria-multiselectable":d,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":d,"aria-relevant":null,"aria-required":d,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},ke="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(e=>"on"+e);for(let e of ke)Ye[e]=null;class L{constructor(O,t){this.tags=Object.assign(Object.assign({},Oi),O),this.globalAttrs=Object.assign(Object.assign({},Ye),t),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}L.default=new L;function W(e,O,t=e.length){if(!O)return"";let a=O.firstChild,i=a&&a.getChild("TagName");return i?e.sliceString(i.from,Math.min(i.to,t)):""}function K(e,O=!1){for(let t=e.parent;t;t=t.parent)if(t.name=="Element")if(O)O=!1;else return t;return null}function ve(e,O,t){let a=t.tags[W(e,K(O,!0))];return(a==null?void 0:a.children)||t.allTags}function fO(e,O){let t=[];for(let a=O;a=K(a);){let i=W(e,a);if(i&&a.lastChild.name=="CloseTag")break;i&&t.indexOf(i)<0&&(O.name=="EndTag"||O.from>=a.firstChild.to)&&t.push(i)}return t}const we=/^[:\-\.\w\u00b7-\uffff]*$/;function HO(e,O,t,a,i){let s=/\s*>/.test(e.sliceDoc(i,i+5))?"":">";return{from:a,to:i,options:ve(e.doc,t,O).map(r=>({label:r,type:"type"})).concat(fO(e.doc,t).map((r,n)=>({label:"/"+r,apply:"/"+r+s,type:"type",boost:99-n}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function FO(e,O,t,a){let i=/\s*>/.test(e.sliceDoc(a,a+5))?"":">";return{from:t,to:a,options:fO(e.doc,O).map((s,r)=>({label:s,apply:s+i,type:"type",boost:99-r})),validFor:we}}function ei(e,O,t,a){let i=[],s=0;for(let r of ve(e.doc,t,O))i.push({label:"<"+r,type:"type"});for(let r of fO(e.doc,t))i.push({label:"",type:"type",boost:99-s++});return{from:a,to:a,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function ti(e,O,t,a,i){let s=K(t),r=s?O.tags[W(e.doc,s)]:null,n=r&&r.attrs?Object.keys(r.attrs):[],o=r&&r.globalAttrs===!1?n:n.length?n.concat(O.globalAttrNames):O.globalAttrNames;return{from:a,to:i,options:o.map(c=>({label:c,type:"property"})),validFor:we}}function ai(e,O,t,a,i){var s;let r=(s=t.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),n=[],o;if(r){let c=e.sliceDoc(r.from,r.to),h=O.globalAttrs[c];if(!h){let Q=K(t),u=Q?O.tags[W(e.doc,Q)]:null;h=(u==null?void 0:u.attrs)&&u.attrs[c]}if(h){let Q=e.sliceDoc(a,i).toLowerCase(),u='"',S='"';/^['"]/.test(Q)?(o=Q[0]=='"'?/^[^"]*$/:/^[^']*$/,u="",S=e.sliceDoc(i,i+1)==Q[0]?"":Q[0],Q=Q.slice(1),a++):o=/^[^\s<>='"]*$/;for(let $ of h)n.push({label:$,apply:u+$+S,type:"constant"})}}return{from:a,to:i,options:n,validFor:o}}function ii(e,O){let{state:t,pos:a}=O,i=C(t).resolveInner(a),s=i.resolve(a,-1);for(let r=a,n;i==s&&(n=s.childBefore(r));){let o=n.lastChild;if(!o||!o.type.isError||o.fromii(a,i)}const We=[{tag:"script",attrs:e=>e.type=="text/typescript"||e.lang=="ts",parser:Ze.parser},{tag:"script",attrs:e=>e.type=="text/babel"||e.type=="text/jsx",parser:be.parser},{tag:"script",attrs:e=>e.type=="text/typescript-jsx",parser:xe.parser},{tag:"script",attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:Z.parser},{tag:"style",attrs(e){return(!e.lang||e.lang=="css")&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:J.parser}],Te=[{name:"style",parser:J.parser.configure({top:"Styles"})}].concat(ke.map(e=>({name:e,parser:Z.parser}))),E=hO.define({name:"html",parser:ra.configure({props:[pO.add({Element(e){let O=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+O[0].length?e.continue():e.lineIndent(e.node.from)+(O[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].lengthe.getChild("TagName")})],wrap:$e(We,Te)}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}});function si(e={}){let O="",t;e.matchClosingTags===!1&&(O="noMatch"),e.selfClosingTags===!0&&(O=(O?O+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(t=$e((e.nestedLanguages||[]).concat(We),(e.nestedAttributes||[]).concat(Te)));let a=t||O?E.configure({dialect:O,wrap:t}):E;return new SO(a,[E.data.of({autocomplete:ri(e)}),e.autoCloseTags!==!1?ni:[],ye().support,ya().support])}const ni=k.inputHandler.of((e,O,t,a)=>{if(e.composing||e.state.readOnly||O!=t||a!=">"&&a!="/"||!E.isActiveAt(e.state,O,-1))return!1;let{state:i}=e,s=i.changeByRange(r=>{var n,o,c;let{head:h}=r,Q=C(i).resolveInner(h,-1),u;if((Q.name=="TagName"||Q.name=="StartTag")&&(Q=Q.parent),a==">"&&Q.name=="OpenTag"){if(((o=(n=Q.parent)===null||n===void 0?void 0:n.lastChild)===null||o===void 0?void 0:o.name)!="CloseTag"&&(u=W(i.doc,Q.parent,h))){let S=e.state.doc.sliceString(h,h+1)===">",$=`${S?"":">"}`;return{range:j.cursor(h+1),changes:{from:h+(S?1:0),insert:$}}}}else if(a=="/"&&Q.name=="OpenTag"){let S=Q.parent,$=S==null?void 0:S.parent;if(S.from==h-1&&((c=$.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(u=W(i.doc,$,h))){let y=e.state.doc.sliceString(h,h+1)===">",Y=`/${u}${y?"":">"}`,T=h+Y.length+(y?1:0);return{range:j.cursor(T),changes:{from:h,insert:Y}}}}return{range:r}});return s.changes.empty?!1:(e.dispatch(s,{userEvent:"input.type",scrollIntoView:!0}),!0)});function li(e){let O;return{c(){O=je("div"),Ce(O,"class","code-editor"),XO(O,"max-height",e[0]?e[0]+"px":"auto")},m(t,a){Ge(t,O,a),e[10](O)},p(t,[a]){a&1&&XO(O,"max-height",t[0]?t[0]+"px":"auto")},i:ZO,o:ZO,d(t){t&&Re(O),e[10](null)}}}function oi(e,O,t){const a=ze();let{id:i=""}=O,{value:s=""}=O,{maxHeight:r=null}=O,{disabled:n=!1}=O,{placeholder:o=""}=O,{language:c="javascript"}=O,{singleLine:h=!1}=O,Q,u,S=new G,$=new G,y=new G,Y=new G;function T(){Q==null||Q.focus()}function dO(){u==null||u.dispatchEvent(new CustomEvent("change",{detail:{value:s},bubbles:!0}))}function PO(){if(!i)return;const f=document.querySelectorAll('[for="'+i+'"]');for(let P of f)P.removeEventListener("click",T)}function gO(){if(!i)return;PO();const f=document.querySelectorAll('[for="'+i+'"]');for(let P of f)P.addEventListener("click",T)}function mO(){return c==="html"?si():ye()}Ae(()=>{const f={key:"Enter",run:P=>{h&&a("submit",s)}};return gO(),t(9,Q=new k({parent:u,state:V.create({doc:s,extensions:[et(),tt(),at(),it(),rt(),V.allowMultipleSelections.of(!0),st(nt,{fallback:!0}),lt(),ot(),Qt(),ct(),ht.of([f,...pt,...ut,St.find(P=>P.key==="Mod-d"),...$t,...ft]),k.lineWrapping,dt({icons:!1}),S.of(mO()),Y.of(bO(o)),$.of(k.editable.of(!0)),y.of(V.readOnly.of(!1)),V.transactionFilter.of(P=>h&&P.newDoc.lines>1?[]:P),k.updateListener.of(P=>{!P.docChanged||n||(t(2,s=P.state.doc.toString()),dO())})]})})),()=>{PO(),Q==null||Q.destroy()}});function Ve(f){Ie[f?"unshift":"push"](()=>{u=f,t(1,u)})}return e.$$set=f=>{"id"in f&&t(3,i=f.id),"value"in f&&t(2,s=f.value),"maxHeight"in f&&t(0,r=f.maxHeight),"disabled"in f&&t(4,n=f.disabled),"placeholder"in f&&t(5,o=f.placeholder),"language"in f&&t(6,c=f.language),"singleLine"in f&&t(7,h=f.singleLine)},e.$$.update=()=>{e.$$.dirty&8&&i&&gO(),e.$$.dirty&576&&Q&&c&&Q.dispatch({effects:[S.reconfigure(mO())]}),e.$$.dirty&528&&Q&&typeof n<"u"&&(Q.dispatch({effects:[$.reconfigure(k.editable.of(!n)),y.reconfigure(V.readOnly.of(n))]}),dO()),e.$$.dirty&516&&Q&&s!=Q.state.doc.toString()&&Q.dispatch({changes:{from:0,to:Q.state.doc.length,insert:s}}),e.$$.dirty&544&&Q&&typeof o<"u"&&Q.dispatch({effects:[Y.reconfigure(bO(o))]})},[r,u,s,i,n,o,c,h,T,Q,Ve]}class hi extends Ue{constructor(O){super(),_e(this,O,oi,li,qe,{id:3,value:2,maxHeight:0,disabled:4,placeholder:5,language:6,singleLine:7,focus:8})}get focus(){return this.$$.ctx[8]}}export{hi as default}; diff --git a/ui/dist/assets/ConfirmEmailChangeDocs-f219d7f9.js b/ui/dist/assets/ConfirmEmailChangeDocs-d42af417.js similarity index 97% rename from ui/dist/assets/ConfirmEmailChangeDocs-f219d7f9.js rename to ui/dist/assets/ConfirmEmailChangeDocs-d42af417.js index 41690a13..e7a5e156 100644 --- a/ui/dist/assets/ConfirmEmailChangeDocs-f219d7f9.js +++ b/ui/dist/assets/ConfirmEmailChangeDocs-d42af417.js @@ -1,4 +1,4 @@ -import{S as Ce,i as $e,s as we,e as c,w as v,b as h,c as he,f as b,g as r,h as n,m as ve,x as Y,O as pe,P as Pe,k as Se,Q as Oe,n as Re,t as Z,a as x,o as f,d as ge,R as Te,C as Ee,p as ye,r as j,u as Be,N as qe}from"./index-3e0f12d8.js";import{S as Ae}from"./SdkTabs-ed893501.js";function ue(o,l,s){const a=o.slice();return a[5]=l[s],a}function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l){let s,a=l[5].code+"",_,u,i,d;function p(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=v(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){r(C,s,$),n(s,_),n(s,u),i||(d=Be(s,"click",p),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&Y(_,a),$&6&&j(s,"active",l[1]===l[5].code)},d(C){C&&f(s),i=!1,d()}}}function ke(o,l){let s,a,_,u;return a=new qe({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){r(i,s,d),ve(a,s,null),n(s,_),u=!0},p(i,d){l=i;const p={};d&4&&(p.content=l[5].body),a.$set(p),(!u||d&6)&&j(s,"active",l[1]===l[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&f(s),ge(a)}}}function Ue(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,F,w,I,R,L,P,N,te,K,T,le,Q,M=o[0].name+"",z,se,G,E,J,y,V,B,X,S,q,g=[],ae=new Map,oe,A,k=[],ne=new Map,O;w=new Ae({props:{js:` +import{S as Ce,i as $e,s as we,e as c,w as v,b as h,c as he,f as b,g as r,h as n,m as ve,x as Y,O as pe,P as Pe,k as Se,Q as Oe,n as Re,t as Z,a as x,o as f,d as ge,R as Te,C as Ee,p as ye,r as j,u as Be,N as qe}from"./index-ffbb9561.js";import{S as Ae}from"./SdkTabs-5b973c0d.js";function ue(o,l,s){const a=o.slice();return a[5]=l[s],a}function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l){let s,a=l[5].code+"",_,u,i,d;function p(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=v(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){r(C,s,$),n(s,_),n(s,u),i||(d=Be(s,"click",p),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&Y(_,a),$&6&&j(s,"active",l[1]===l[5].code)},d(C){C&&f(s),i=!1,d()}}}function ke(o,l){let s,a,_,u;return a=new qe({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){r(i,s,d),ve(a,s,null),n(s,_),u=!0},p(i,d){l=i;const p={};d&4&&(p.content=l[5].body),a.$set(p),(!u||d&6)&&j(s,"active",l[1]===l[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&f(s),ge(a)}}}function Ue(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,F,w,I,R,L,P,N,te,K,T,le,Q,M=o[0].name+"",z,se,G,E,J,y,V,B,X,S,q,g=[],ae=new Map,oe,A,k=[],ne=new Map,O;w=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/ConfirmPasswordResetDocs-1f1084eb.js b/ui/dist/assets/ConfirmPasswordResetDocs-d848311f.js similarity index 98% rename from ui/dist/assets/ConfirmPasswordResetDocs-1f1084eb.js rename to ui/dist/assets/ConfirmPasswordResetDocs-d848311f.js index 48743ed3..701255f3 100644 --- a/ui/dist/assets/ConfirmPasswordResetDocs-1f1084eb.js +++ b/ui/dist/assets/ConfirmPasswordResetDocs-d848311f.js @@ -1,4 +1,4 @@ -import{S as Se,i as he,s as Re,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as we,x as K,O as me,P as Oe,k as Ne,Q as Ce,n as We,t as Z,a as x,o as d,d as Pe,R as $e,C as Ee,p as Te,r as U,u as ge,N as Ae}from"./index-3e0f12d8.js";import{S as De}from"./SdkTabs-ed893501.js";function ue(o,s,l){const a=o.slice();return a[5]=s[l],a}function be(o,s,l){const a=o.slice();return a[5]=s[l],a}function _e(o,s){let l,a=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=c("button"),_=w(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){r(S,l,h),n(l,_),n(l,u),i||(p=ge(l,"click",m),i=!0)},p(S,h){s=S,h&4&&a!==(a=s[5].code+"")&&K(_,a),h&6&&U(l,"active",s[1]===s[5].code)},d(S){S&&d(l),i=!1,p()}}}function ke(o,s){let l,a,_,u;return a=new Ae({props:{content:s[5].body}}),{key:o,first:null,c(){l=c("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){r(i,l,p),we(a,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),a.$set(m),(!u||p&6)&&U(l,"active",s[1]===s[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&d(l),Pe(a)}}}function ye(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,q=o[0].name+"",j,ee,H,R,L,W,Q,O,B,te,M,$,se,z,F=o[0].name+"",G,le,J,E,V,T,X,g,Y,N,A,P=[],ae=new Map,oe,D,k=[],ne=new Map,C;R=new De({props:{js:` +import{S as Se,i as he,s as Re,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as we,x as K,O as me,P as Oe,k as Ne,Q as Ce,n as We,t as Z,a as x,o as d,d as Pe,R as $e,C as Ee,p as Te,r as U,u as ge,N as Ae}from"./index-ffbb9561.js";import{S as De}from"./SdkTabs-5b973c0d.js";function ue(o,s,l){const a=o.slice();return a[5]=s[l],a}function be(o,s,l){const a=o.slice();return a[5]=s[l],a}function _e(o,s){let l,a=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=c("button"),_=w(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){r(S,l,h),n(l,_),n(l,u),i||(p=ge(l,"click",m),i=!0)},p(S,h){s=S,h&4&&a!==(a=s[5].code+"")&&K(_,a),h&6&&U(l,"active",s[1]===s[5].code)},d(S){S&&d(l),i=!1,p()}}}function ke(o,s){let l,a,_,u;return a=new Ae({props:{content:s[5].body}}),{key:o,first:null,c(){l=c("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){r(i,l,p),we(a,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),a.$set(m),(!u||p&6)&&U(l,"active",s[1]===s[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&d(l),Pe(a)}}}function ye(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,q=o[0].name+"",j,ee,H,R,L,W,Q,O,B,te,M,$,se,z,F=o[0].name+"",G,le,J,E,V,T,X,g,Y,N,A,P=[],ae=new Map,oe,D,k=[],ne=new Map,C;R=new De({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/ConfirmVerificationDocs-6fb82bb9.js b/ui/dist/assets/ConfirmVerificationDocs-4f3afd09.js similarity index 97% rename from ui/dist/assets/ConfirmVerificationDocs-6fb82bb9.js rename to ui/dist/assets/ConfirmVerificationDocs-4f3afd09.js index 61a39d05..29ce6601 100644 --- a/ui/dist/assets/ConfirmVerificationDocs-6fb82bb9.js +++ b/ui/dist/assets/ConfirmVerificationDocs-4f3afd09.js @@ -1,4 +1,4 @@ -import{S as we,i as Ce,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as n,m as he,x as D,O as de,P as Te,k as ge,Q as ye,n as Be,t as Z,a as x,o as f,d as $e,R as qe,C as Oe,p as Se,r as H,u as Ee,N as Ne}from"./index-3e0f12d8.js";import{S as Ve}from"./SdkTabs-ed893501.js";function ue(i,l,s){const o=i.slice();return o[5]=l[s],o}function be(i,l,s){const o=i.slice();return o[5]=l[s],o}function _e(i,l){let s,o=l[5].code+"",_,u,a,p;function d(){return l[4](l[5])}return{key:i,first:null,c(){s=c("button"),_=h(o),u=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(w,C){r(w,s,C),n(s,_),n(s,u),a||(p=Ee(s,"click",d),a=!0)},p(w,C){l=w,C&4&&o!==(o=l[5].code+"")&&D(_,o),C&6&&H(s,"active",l[1]===l[5].code)},d(w){w&&f(s),a=!1,p()}}}function ke(i,l){let s,o,_,u;return o=new Ne({props:{content:l[5].body}}),{key:i,first:null,c(){s=c("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(a,p){r(a,s,p),he(o,s,null),n(s,_),u=!0},p(a,p){l=a;const d={};p&4&&(d.content=l[5].body),o.$set(d),(!u||p&6)&&H(s,"active",l[1]===l[5].code)},i(a){u||(Z(o.$$.fragment,a),u=!0)},o(a){x(o.$$.fragment,a),u=!1},d(a){a&&f(s),$e(o)}}}function Ke(i){var re,fe;let l,s,o=i[0].name+"",_,u,a,p,d,w,C,M=i[0].name+"",F,ee,I,P,L,B,Q,T,A,te,R,q,le,z,U=i[0].name+"",G,se,J,O,W,S,X,E,Y,g,N,$=[],oe=new Map,ie,V,k=[],ne=new Map,y;P=new Ve({props:{js:` +import{S as we,i as Ce,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as n,m as he,x as D,O as de,P as Te,k as ge,Q as ye,n as Be,t as Z,a as x,o as f,d as $e,R as qe,C as Oe,p as Se,r as H,u as Ee,N as Ne}from"./index-ffbb9561.js";import{S as Ve}from"./SdkTabs-5b973c0d.js";function ue(i,l,s){const o=i.slice();return o[5]=l[s],o}function be(i,l,s){const o=i.slice();return o[5]=l[s],o}function _e(i,l){let s,o=l[5].code+"",_,u,a,p;function d(){return l[4](l[5])}return{key:i,first:null,c(){s=c("button"),_=h(o),u=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(w,C){r(w,s,C),n(s,_),n(s,u),a||(p=Ee(s,"click",d),a=!0)},p(w,C){l=w,C&4&&o!==(o=l[5].code+"")&&D(_,o),C&6&&H(s,"active",l[1]===l[5].code)},d(w){w&&f(s),a=!1,p()}}}function ke(i,l){let s,o,_,u;return o=new Ne({props:{content:l[5].body}}),{key:i,first:null,c(){s=c("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(a,p){r(a,s,p),he(o,s,null),n(s,_),u=!0},p(a,p){l=a;const d={};p&4&&(d.content=l[5].body),o.$set(d),(!u||p&6)&&H(s,"active",l[1]===l[5].code)},i(a){u||(Z(o.$$.fragment,a),u=!0)},o(a){x(o.$$.fragment,a),u=!1},d(a){a&&f(s),$e(o)}}}function Ke(i){var re,fe;let l,s,o=i[0].name+"",_,u,a,p,d,w,C,M=i[0].name+"",F,ee,I,P,L,B,Q,T,A,te,R,q,le,z,U=i[0].name+"",G,se,J,O,W,S,X,E,Y,g,N,$=[],oe=new Map,ie,V,k=[],ne=new Map,y;P=new Ve({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/CreateApiDocs-9eb0174f.js b/ui/dist/assets/CreateApiDocs-32d5a929.js similarity index 99% rename from ui/dist/assets/CreateApiDocs-9eb0174f.js rename to ui/dist/assets/CreateApiDocs-32d5a929.js index e7198946..bef2dad6 100644 --- a/ui/dist/assets/CreateApiDocs-9eb0174f.js +++ b/ui/dist/assets/CreateApiDocs-32d5a929.js @@ -1,4 +1,4 @@ -import{S as Ht,i as Lt,s as Pt,C as Q,N as At,e as a,w as k,b as m,c as Pe,f as h,g as r,h as n,m as Re,x,O as Le,P as ht,k as Rt,Q as Bt,n as Ft,t as fe,a as pe,o as d,d as Be,R as gt,p as jt,r as ue,u as Dt,y as le}from"./index-3e0f12d8.js";import{S as Nt}from"./SdkTabs-ed893501.js";function wt(o,e,l){const s=o.slice();return s[7]=e[l],s}function Ct(o,e,l){const s=o.slice();return s[7]=e[l],s}function St(o,e,l){const s=o.slice();return s[12]=e[l],s}function $t(o){let e;return{c(){e=a("p"),e.innerHTML="Requires admin Authorization:TOKEN header",h(e,"class","txt-hint txt-sm txt-right")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Tt(o){let e,l,s,b,p,c,f,y,T,w,O,g,D,V,L,J,j,B,S,N,q,C,_;function M(u,$){var ee,K;return(K=(ee=u[0])==null?void 0:ee.options)!=null&&K.requireEmail?Jt:Vt}let z=M(o),P=z(o);return{c(){e=a("tr"),e.innerHTML='Auth fields',l=m(),s=a("tr"),s.innerHTML=`
Optional +import{S as Ht,i as Lt,s as Pt,C as Q,N as At,e as a,w as k,b as m,c as Pe,f as h,g as r,h as n,m as Re,x,O as Le,P as ht,k as Rt,Q as Bt,n as Ft,t as fe,a as pe,o as d,d as Be,R as gt,p as jt,r as ue,u as Dt,y as le}from"./index-ffbb9561.js";import{S as Nt}from"./SdkTabs-5b973c0d.js";function wt(o,e,l){const s=o.slice();return s[7]=e[l],s}function Ct(o,e,l){const s=o.slice();return s[7]=e[l],s}function St(o,e,l){const s=o.slice();return s[12]=e[l],s}function $t(o){let e;return{c(){e=a("p"),e.innerHTML="Requires admin Authorization:TOKEN header",h(e,"class","txt-hint txt-sm txt-right")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Tt(o){let e,l,s,b,p,c,f,y,T,w,O,g,D,V,L,J,j,B,S,N,q,C,_;function M(u,$){var ee,K;return(K=(ee=u[0])==null?void 0:ee.options)!=null&&K.requireEmail?Jt:Vt}let z=M(o),P=z(o);return{c(){e=a("tr"),e.innerHTML='Auth fields',l=m(),s=a("tr"),s.innerHTML=`
Optional username
String The username of the auth record. diff --git a/ui/dist/assets/DeleteApiDocs-8ae8b556.js b/ui/dist/assets/DeleteApiDocs-3a858be4.js similarity index 97% rename from ui/dist/assets/DeleteApiDocs-8ae8b556.js rename to ui/dist/assets/DeleteApiDocs-3a858be4.js index 70a138aa..0c31fc10 100644 --- a/ui/dist/assets/DeleteApiDocs-8ae8b556.js +++ b/ui/dist/assets/DeleteApiDocs-3a858be4.js @@ -1,4 +1,4 @@ -import{S as Ce,i as Re,s as Pe,e as c,w as D,b as k,c as $e,f as m,g as d,h as n,m as we,x,O as _e,P as Ee,k as Oe,Q as Te,n as Be,t as ee,a as te,o as f,d as ge,R as Ie,C as Ae,p as Me,r as N,u as Se,N as qe}from"./index-3e0f12d8.js";import{S as He}from"./SdkTabs-ed893501.js";function ke(o,l,s){const a=o.slice();return a[6]=l[s],a}function he(o,l,s){const a=o.slice();return a[6]=l[s],a}function ve(o){let l;return{c(){l=c("p"),l.innerHTML="Requires admin Authorization:TOKEN header",m(l,"class","txt-hint txt-sm txt-right")},m(s,a){d(s,l,a)},d(s){s&&f(l)}}}function ye(o,l){let s,a=l[6].code+"",h,i,r,u;function $(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),h=D(a),i=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,g){d(b,s,g),n(s,h),n(s,i),r||(u=Se(s,"click",$),r=!0)},p(b,g){l=b,g&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&f(s),r=!1,u()}}}function De(o,l){let s,a,h,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),h=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,u){d(r,s,u),we(a,s,null),n(s,h),i=!0},p(r,u){l=r,(!i||u&20)&&N(s,"active",l[2]===l[6].code)},i(r){i||(ee(a.$$.fragment,r),i=!0)},o(r){te(a.$$.fragment,r),i=!1},d(r){r&&f(s),ge(a)}}}function Le(o){var ue,pe;let l,s,a=o[0].name+"",h,i,r,u,$,b,g,q=o[0].name+"",z,le,F,C,K,O,Q,y,H,se,L,E,oe,G,U=o[0].name+"",J,ae,V,ne,W,T,X,B,Y,I,Z,R,A,w=[],ie=new Map,re,M,v=[],ce=new Map,P;C=new He({props:{js:` +import{S as Ce,i as Re,s as Pe,e as c,w as D,b as k,c as $e,f as m,g as d,h as n,m as we,x,O as _e,P as Ee,k as Oe,Q as Te,n as Be,t as ee,a as te,o as f,d as ge,R as Ie,C as Ae,p as Me,r as N,u as Se,N as qe}from"./index-ffbb9561.js";import{S as He}from"./SdkTabs-5b973c0d.js";function ke(o,l,s){const a=o.slice();return a[6]=l[s],a}function he(o,l,s){const a=o.slice();return a[6]=l[s],a}function ve(o){let l;return{c(){l=c("p"),l.innerHTML="Requires admin Authorization:TOKEN header",m(l,"class","txt-hint txt-sm txt-right")},m(s,a){d(s,l,a)},d(s){s&&f(l)}}}function ye(o,l){let s,a=l[6].code+"",h,i,r,u;function $(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),h=D(a),i=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,g){d(b,s,g),n(s,h),n(s,i),r||(u=Se(s,"click",$),r=!0)},p(b,g){l=b,g&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&f(s),r=!1,u()}}}function De(o,l){let s,a,h,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),h=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,u){d(r,s,u),we(a,s,null),n(s,h),i=!0},p(r,u){l=r,(!i||u&20)&&N(s,"active",l[2]===l[6].code)},i(r){i||(ee(a.$$.fragment,r),i=!0)},o(r){te(a.$$.fragment,r),i=!1},d(r){r&&f(s),ge(a)}}}function Le(o){var ue,pe;let l,s,a=o[0].name+"",h,i,r,u,$,b,g,q=o[0].name+"",z,le,F,C,K,O,Q,y,H,se,L,E,oe,G,U=o[0].name+"",J,ae,V,ne,W,T,X,B,Y,I,Z,R,A,w=[],ie=new Map,re,M,v=[],ce=new Map,P;C=new He({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/FilterAutocompleteInput-6d6a13cf.js b/ui/dist/assets/FilterAutocompleteInput-6d6a13cf.js deleted file mode 100644 index caacd9bf..00000000 --- a/ui/dist/assets/FilterAutocompleteInput-6d6a13cf.js +++ /dev/null @@ -1 +0,0 @@ -import{S as oe,i as ae,s as ue,e as le,f as ce,g as fe,y as M,o as de,I as he,J as ge,K as pe,L as ye,C as I,M as me}from"./index-3e0f12d8.js";import{C as R,E as S,a as q,h as be,b as ke,c as xe,d as Ke,e as Ce,s as Se,f as qe,g as we,i as Le,r as Ee,j as Ie,k as Re,l as Ae,m as ve,n as Be,o as Oe,p as _e,q as Me,t as Y,S as De}from"./index-4934dad7.js";function He(e){Z(e,"start");var i={},n=e.languageData||{},g=!1;for(var p in e)if(p!=n&&e.hasOwnProperty(p))for(var d=i[p]=[],o=e[p],r=0;r2&&o.token&&typeof o.token!="string"){n.pending=[];for(var a=2;a-1)return null;var p=n.indent.length-1,d=e[n.state];e:for(;;){for(var o=0;on(21,g=t));const p=pe();let{id:d=""}=i,{value:o=""}=i,{disabled:r=!1}=i,{placeholder:l=""}=i,{baseCollection:a=null}=i,{singleLine:b=!1}=i,{extraAutocompleteKeys:A=[]}=i,{disableRequestKeys:x=!1}=i,{disableIndirectCollectionsKeys:K=!1}=i,f,k,v=r,D=new R,H=new R,F=new R,T=new R,w=[],U=[],W=[],N=[],L="",B="";function O(){f==null||f.focus()}let _=null;function j(){clearTimeout(_),_=setTimeout(()=>{w=$(g),N=ee(),U=x?[]:te(),W=K?[]:ne()},300)}function $(t){let s=t.slice();return a&&I.pushOrReplaceByKey(s,a,"id"),s}function V(){k==null||k.dispatchEvent(new CustomEvent("change",{detail:{value:o},bubbles:!0}))}function J(){if(!d)return;const t=document.querySelectorAll('[for="'+d+'"]');for(let s of t)s.removeEventListener("click",O)}function P(){if(!d)return;J();const t=document.querySelectorAll('[for="'+d+'"]');for(let s of t)s.addEventListener("click",O)}function C(t,s="",c=0){var m,z,Q;let h=w.find(y=>y.name==t||y.id==t);if(!h||c>=4)return[];let u=[s+"id",s+"created",s+"updated"];h.isAuth&&(u.push(s+"username"),u.push(s+"email"),u.push(s+"emailVisibility"),u.push(s+"verified"));for(const y of h.schema){const E=s+y.name;if(u.push(E),y.type==="relation"&&((m=y.options)!=null&&m.collectionId)){const X=C(y.options.collectionId,E+".",c+1);X.length&&(u=u.concat(X))}y.type==="select"&&((z=y.options)==null?void 0:z.maxSelect)!=1&&u.push(E+":each"),((Q=y.options)==null?void 0:Q.maxSelect)!=1&&["select","file","relation"].includes(y.type)&&u.push(E+":length")}return u}function ee(){return C(a==null?void 0:a.name)}function te(){const t=[];t.push("@request.method"),t.push("@request.query."),t.push("@request.data."),t.push("@request.auth.id"),t.push("@request.auth.collectionId"),t.push("@request.auth.collectionName"),t.push("@request.auth.verified"),t.push("@request.auth.username"),t.push("@request.auth.email"),t.push("@request.auth.emailVisibility"),t.push("@request.auth.created"),t.push("@request.auth.updated");const s=w.filter(h=>h.isAuth);for(const h of s){const u=C(h.id,"@request.auth.");for(const m of u)I.pushUnique(t,m)}const c=["created","updated"];if(a!=null&&a.id){const h=C(a.name,"@request.data.");for(const u of h){t.push(u);const m=u.split(".");m.length===3&&m[2].indexOf(":")===-1&&!c.includes(m[2])&&t.push(u+":isset")}}return t}function ne(){const t=[];for(const s of w){const c="@collection."+s.name+".",h=C(s.name,c);for(const u of h)t.push(u)}return t}function ie(t=!0,s=!0){let c=[].concat(A);return c=c.concat(N||[]),t&&(c=c.concat(U||[])),s&&(c=c.concat(W||[])),c.sort(function(h,u){return u.length-h.length}),c}function se(t){let s=t.matchBefore(/[\'\"\@\w\.]*/);if(s&&s.from==s.to&&!t.explicit)return null;let c=[{label:"false"},{label:"true"},{label:"@now"}];K||c.push({label:"@collection.*",apply:"@collection."});const h=ie(!x,!x&&s.text.startsWith("@c"));for(const u of h)c.push({label:u.endsWith(".")?u+"*":u,apply:u});return{from:s.from,options:c}}function G(){return De.define(He({start:[{regex:/true|false|null/,token:"atom"},{regex:/"(?:[^\\]|\\.)*?(?:"|$)/,token:"string"},{regex:/'(?:[^\\]|\\.)*?(?:'|$)/,token:"string"},{regex:/0x[a-f\d]+|[-+]?(?:\.\d+|\d+\.?\d*)(?:e[-+]?\d+)?/i,token:"number"},{regex:/\&\&|\|\||\=|\!\=|\~|\!\~|\>|\<|\>\=|\<\=/,token:"operator"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0},{regex:/\w+[\w\.]*\w+/,token:"keyword"},{regex:I.escapeRegExp("@now"),token:"keyword"},{regex:I.escapeRegExp("@request.method"),token:"keyword"}]}))}ye(()=>{const t={key:"Enter",run:s=>{b&&p("submit",o)}};return P(),n(11,f=new S({parent:k,state:q.create({doc:o,extensions:[be(),ke(),xe(),Ke(),Ce(),q.allowMultipleSelections.of(!0),Se(qe,{fallback:!0}),we(),Le(),Ee(),Ie(),Re.of([t,...Ae,...ve,Be.find(s=>s.key==="Mod-d"),...Oe,..._e]),S.lineWrapping,Me({override:[se],icons:!1}),T.of(Y(l)),H.of(S.editable.of(!r)),F.of(q.readOnly.of(r)),D.of(G()),q.transactionFilter.of(s=>b&&s.newDoc.lines>1?[]:s),S.updateListener.of(s=>{!s.docChanged||r||(n(1,o=s.state.doc.toString()),V())})]})})),()=>{clearTimeout(_),J(),f==null||f.destroy()}});function re(t){me[t?"unshift":"push"](()=>{k=t,n(0,k)})}return e.$$set=t=>{"id"in t&&n(2,d=t.id),"value"in t&&n(1,o=t.value),"disabled"in t&&n(3,r=t.disabled),"placeholder"in t&&n(4,l=t.placeholder),"baseCollection"in t&&n(5,a=t.baseCollection),"singleLine"in t&&n(6,b=t.singleLine),"extraAutocompleteKeys"in t&&n(7,A=t.extraAutocompleteKeys),"disableRequestKeys"in t&&n(8,x=t.disableRequestKeys),"disableIndirectCollectionsKeys"in t&&n(9,K=t.disableIndirectCollectionsKeys)},e.$$.update=()=>{e.$$.dirty[0]&32&&n(13,L=Je(a)),e.$$.dirty[0]&25352&&!r&&(B!=L||x!==-1||K!==-1)&&(n(14,B=L),j()),e.$$.dirty[0]&4&&d&&P(),e.$$.dirty[0]&2080&&f&&a!=null&&a.schema&&f.dispatch({effects:[D.reconfigure(G())]}),e.$$.dirty[0]&6152&&f&&v!=r&&(f.dispatch({effects:[H.reconfigure(S.editable.of(!r)),F.reconfigure(q.readOnly.of(r))]}),n(12,v=r),V()),e.$$.dirty[0]&2050&&f&&o!=f.state.doc.toString()&&f.dispatch({changes:{from:0,to:f.state.doc.length,insert:o}}),e.$$.dirty[0]&2064&&f&&typeof l<"u"&&f.dispatch({effects:[T.reconfigure(Y(l))]})},[k,o,d,r,l,a,b,A,x,K,O,f,v,L,B,re]}class Qe extends oe{constructor(i){super(),ae(this,i,Pe,Ve,ue,{id:2,value:1,disabled:3,placeholder:4,baseCollection:5,singleLine:6,extraAutocompleteKeys:7,disableRequestKeys:8,disableIndirectCollectionsKeys:9,focus:10},null,[-1,-1])}get focus(){return this.$$.ctx[10]}}export{Qe as default}; diff --git a/ui/dist/assets/FilterAutocompleteInput-80716b22.js b/ui/dist/assets/FilterAutocompleteInput-80716b22.js new file mode 100644 index 00000000..ce3ccb02 --- /dev/null +++ b/ui/dist/assets/FilterAutocompleteInput-80716b22.js @@ -0,0 +1 @@ +import{S as oe,i as ae,s as le,e as ue,f as ce,g as fe,y as M,o as de,I as he,J as ge,K as pe,L as ye,C as S,M as me}from"./index-ffbb9561.js";import{C as E,E as q,a as w,h as be,b as ke,c as xe,d as Ke,e as Ce,s as Se,f as qe,g as we,i as Le,r as Ie,j as Ee,k as Re,l as Ae,m as Be,n as Oe,o as _e,p as ve,q as Me,t as Y,S as De}from"./index-a6ccb683.js";function He(e){Z(e,"start");var i={},n=e.languageData||{},g=!1;for(var p in e)if(p!=n&&e.hasOwnProperty(p))for(var d=i[p]=[],o=e[p],s=0;s2&&o.token&&typeof o.token!="string"){n.pending=[];for(var a=2;a-1)return null;var p=n.indent.length-1,d=e[n.state];e:for(;;){for(var o=0;on(21,g=t));const p=pe();let{id:d=""}=i,{value:o=""}=i,{disabled:s=!1}=i,{placeholder:l=""}=i,{baseCollection:a=null}=i,{singleLine:b=!1}=i,{extraAutocompleteKeys:R=[]}=i,{disableRequestKeys:x=!1}=i,{disableIndirectCollectionsKeys:K=!1}=i,f,k,A=s,D=new E,H=new E,F=new E,T=new E,L=[],U=[],W=[],N=[],I="",B="";function O(){f==null||f.focus()}let _=null;function j(){clearTimeout(_),_=setTimeout(()=>{L=$(g),N=ee(),U=x?[]:te(),W=K?[]:ne()},300)}function $(t){let r=t.slice();return a&&S.pushOrReplaceByKey(r,a,"id"),r}function J(){k==null||k.dispatchEvent(new CustomEvent("change",{detail:{value:o},bubbles:!0}))}function P(){if(!d)return;const t=document.querySelectorAll('[for="'+d+'"]');for(let r of t)r.removeEventListener("click",O)}function V(){if(!d)return;P();const t=document.querySelectorAll('[for="'+d+'"]');for(let r of t)r.addEventListener("click",O)}function C(t,r="",c=0){var m,z,Q;let h=L.find(y=>y.name==t||y.id==t);if(!h||c>=4)return[];let u=S.getAllCollectionIdentifiers(h,r);for(const y of h.schema){const v=r+y.name;if(y.type==="relation"&&((m=y.options)!=null&&m.collectionId)){const X=C(y.options.collectionId,v+".",c+1);X.length&&(u=u.concat(X))}y.type==="select"&&((z=y.options)==null?void 0:z.maxSelect)!=1&&u.push(v+":each"),((Q=y.options)==null?void 0:Q.maxSelect)!=1&&["select","file","relation"].includes(y.type)&&u.push(v+":length")}return u}function ee(){return C(a==null?void 0:a.name)}function te(){const t=[];t.push("@request.method"),t.push("@request.query."),t.push("@request.data."),t.push("@request.auth.id"),t.push("@request.auth.collectionId"),t.push("@request.auth.collectionName"),t.push("@request.auth.verified"),t.push("@request.auth.username"),t.push("@request.auth.email"),t.push("@request.auth.emailVisibility"),t.push("@request.auth.created"),t.push("@request.auth.updated");const r=L.filter(h=>h.isAuth);for(const h of r){const u=C(h.id,"@request.auth.");for(const m of u)S.pushUnique(t,m)}const c=["created","updated"];if(a!=null&&a.id){const h=C(a.name,"@request.data.");for(const u of h){t.push(u);const m=u.split(".");m.length===3&&m[2].indexOf(":")===-1&&!c.includes(m[2])&&t.push(u+":isset")}}return t}function ne(){const t=[];for(const r of L){const c="@collection."+r.name+".",h=C(r.name,c);for(const u of h)t.push(u)}return t}function ie(t=!0,r=!0){let c=[].concat(R);return c=c.concat(N||[]),t&&(c=c.concat(U||[])),r&&(c=c.concat(W||[])),c.sort(function(h,u){return u.length-h.length}),c}function se(t){let r=t.matchBefore(/[\'\"\@\w\.]*/);if(r&&r.from==r.to&&!t.explicit)return null;let c=[{label:"false"},{label:"true"},{label:"@now"}];K||c.push({label:"@collection.*",apply:"@collection."});const h=ie(!x,!x&&r.text.startsWith("@c"));for(const u of h)c.push({label:u.endsWith(".")?u+"*":u,apply:u});return{from:r.from,options:c}}function G(){return De.define(He({start:[{regex:/true|false|null/,token:"atom"},{regex:/"(?:[^\\]|\\.)*?(?:"|$)/,token:"string"},{regex:/'(?:[^\\]|\\.)*?(?:'|$)/,token:"string"},{regex:/0x[a-f\d]+|[-+]?(?:\.\d+|\d+\.?\d*)(?:e[-+]?\d+)?/i,token:"number"},{regex:/\&\&|\|\||\=|\!\=|\~|\!\~|\>|\<|\>\=|\<\=/,token:"operator"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0},{regex:/\w+[\w\.]*\w+/,token:"keyword"},{regex:S.escapeRegExp("@now"),token:"keyword"},{regex:S.escapeRegExp("@request.method"),token:"keyword"}]}))}ye(()=>{const t={key:"Enter",run:r=>{b&&p("submit",o)}};return V(),n(11,f=new q({parent:k,state:w.create({doc:o,extensions:[be(),ke(),xe(),Ke(),Ce(),w.allowMultipleSelections.of(!0),Se(qe,{fallback:!0}),we(),Le(),Ie(),Ee(),Re.of([t,...Ae,...Be,Oe.find(r=>r.key==="Mod-d"),..._e,...ve]),q.lineWrapping,Me({override:[se],icons:!1}),T.of(Y(l)),H.of(q.editable.of(!s)),F.of(w.readOnly.of(s)),D.of(G()),w.transactionFilter.of(r=>b&&r.newDoc.lines>1?[]:r),q.updateListener.of(r=>{!r.docChanged||s||(n(1,o=r.state.doc.toString()),J())})]})})),()=>{clearTimeout(_),P(),f==null||f.destroy()}});function re(t){me[t?"unshift":"push"](()=>{k=t,n(0,k)})}return e.$$set=t=>{"id"in t&&n(2,d=t.id),"value"in t&&n(1,o=t.value),"disabled"in t&&n(3,s=t.disabled),"placeholder"in t&&n(4,l=t.placeholder),"baseCollection"in t&&n(5,a=t.baseCollection),"singleLine"in t&&n(6,b=t.singleLine),"extraAutocompleteKeys"in t&&n(7,R=t.extraAutocompleteKeys),"disableRequestKeys"in t&&n(8,x=t.disableRequestKeys),"disableIndirectCollectionsKeys"in t&&n(9,K=t.disableIndirectCollectionsKeys)},e.$$.update=()=>{e.$$.dirty[0]&32&&n(13,I=Pe(a)),e.$$.dirty[0]&25352&&!s&&(B!=I||x!==-1||K!==-1)&&(n(14,B=I),j()),e.$$.dirty[0]&4&&d&&V(),e.$$.dirty[0]&2080&&f&&a!=null&&a.schema&&f.dispatch({effects:[D.reconfigure(G())]}),e.$$.dirty[0]&6152&&f&&A!=s&&(f.dispatch({effects:[H.reconfigure(q.editable.of(!s)),F.reconfigure(w.readOnly.of(s))]}),n(12,A=s),J()),e.$$.dirty[0]&2050&&f&&o!=f.state.doc.toString()&&f.dispatch({changes:{from:0,to:f.state.doc.length,insert:o}}),e.$$.dirty[0]&2064&&f&&typeof l<"u"&&f.dispatch({effects:[T.reconfigure(Y(l))]})},[k,o,d,s,l,a,b,R,x,K,O,f,A,I,B,re]}class Qe extends oe{constructor(i){super(),ae(this,i,Ve,Je,le,{id:2,value:1,disabled:3,placeholder:4,baseCollection:5,singleLine:6,extraAutocompleteKeys:7,disableRequestKeys:8,disableIndirectCollectionsKeys:9,focus:10},null,[-1,-1])}get focus(){return this.$$.ctx[10]}}export{Qe as default}; diff --git a/ui/dist/assets/ListApiDocs-dc55646d.js b/ui/dist/assets/ListApiDocs-d17d7325.js similarity index 99% rename from ui/dist/assets/ListApiDocs-dc55646d.js rename to ui/dist/assets/ListApiDocs-d17d7325.js index 5bf9e9c1..68470ee2 100644 --- a/ui/dist/assets/ListApiDocs-dc55646d.js +++ b/ui/dist/assets/ListApiDocs-d17d7325.js @@ -1,4 +1,4 @@ -import{S as Se,i as Ne,s as qe,e,b as s,E as He,f as o,g as u,u as De,y as Fe,o as m,w as _,h as t,N as he,c as Yt,m as Zt,x as we,O as Le,P as Me,k as Be,Q as Ie,n as Ge,t as Bt,a as It,d as te,R as ze,C as _e,p as Ue,r as xe}from"./index-3e0f12d8.js";import{S as je}from"./SdkTabs-ed893501.js";function Qe(d){let n,a,r;return{c(){n=e("span"),n.textContent="Show details",a=s(),r=e("i"),o(n,"class","txt"),o(r,"class","ri-arrow-down-s-line")},m(f,p){u(f,n,p),u(f,a,p),u(f,r,p)},d(f){f&&m(n),f&&m(a),f&&m(r)}}}function Je(d){let n,a,r;return{c(){n=e("span"),n.textContent="Hide details",a=s(),r=e("i"),o(n,"class","txt"),o(r,"class","ri-arrow-up-s-line")},m(f,p){u(f,n,p),u(f,a,p),u(f,r,p)},d(f){f&&m(n),f&&m(a),f&&m(r)}}}function Ae(d){let n,a,r,f,p,b,x,$,h,w,c,V,bt,Gt,R,zt,q,it,F,W,ee,I,G,le,at,ht,X,xt,se,rt,ct,Y,O,Ut,wt,y,Z,_t,jt,$t,z,tt,Ct,Qt,kt,L,dt,gt,ne,ft,oe,D,vt,et,yt,U,pt,ie,H,Ft,lt,Lt,st,At,nt,j,E,Jt,Tt,Kt,Pt,C,Q,M,ae,Rt,re,ut,ce,B,Ot,de,Et,Vt,St,Wt,A,mt,J,K,S,Nt,fe,T,k,pe,N,v,ot,ue,P,qt,me,Dt,be,Ht,Xt,Mt;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format +import{S as Se,i as Ne,s as qe,e,b as s,E as He,f as o,g as u,u as De,y as Fe,o as m,w as _,h as t,N as he,c as Yt,m as Zt,x as we,O as Le,P as Me,k as Be,Q as Ie,n as Ge,t as Bt,a as It,d as te,R as ze,C as _e,p as Ue,r as xe}from"./index-ffbb9561.js";import{S as je}from"./SdkTabs-5b973c0d.js";function Qe(d){let n,a,r;return{c(){n=e("span"),n.textContent="Show details",a=s(),r=e("i"),o(n,"class","txt"),o(r,"class","ri-arrow-down-s-line")},m(f,p){u(f,n,p),u(f,a,p),u(f,r,p)},d(f){f&&m(n),f&&m(a),f&&m(r)}}}function Je(d){let n,a,r;return{c(){n=e("span"),n.textContent="Hide details",a=s(),r=e("i"),o(n,"class","txt"),o(r,"class","ri-arrow-up-s-line")},m(f,p){u(f,n,p),u(f,a,p),u(f,r,p)},d(f){f&&m(n),f&&m(a),f&&m(r)}}}function Ae(d){let n,a,r,f,p,b,x,$,h,w,c,V,bt,Gt,R,zt,q,it,F,W,ee,I,G,le,at,ht,X,xt,se,rt,ct,Y,O,Ut,wt,y,Z,_t,jt,$t,z,tt,Ct,Qt,kt,L,dt,gt,ne,ft,oe,D,vt,et,yt,U,pt,ie,H,Ft,lt,Lt,st,At,nt,j,E,Jt,Tt,Kt,Pt,C,Q,M,ae,Rt,re,ut,ce,B,Ot,de,Et,Vt,St,Wt,A,mt,J,K,S,Nt,fe,T,k,pe,N,v,ot,ue,P,qt,me,Dt,be,Ht,Xt,Mt;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format OPERAND OPERATOR OPERAND, where:`,a=s(),r=e("ul"),f=e("li"),f.innerHTML=`OPERAND - could be any of the above field literal, string (single diff --git a/ui/dist/assets/ListExternalAuthsDocs-954472a7.js b/ui/dist/assets/ListExternalAuthsDocs-d4af9a48.js similarity index 98% rename from ui/dist/assets/ListExternalAuthsDocs-954472a7.js rename to ui/dist/assets/ListExternalAuthsDocs-d4af9a48.js index 52e0b7e7..70d49bcf 100644 --- a/ui/dist/assets/ListExternalAuthsDocs-954472a7.js +++ b/ui/dist/assets/ListExternalAuthsDocs-d4af9a48.js @@ -1,4 +1,4 @@ -import{S as Be,i as qe,s as Oe,e as i,w as v,b as _,c as Se,f as b,g as r,h as s,m as Ee,x as U,O as Pe,P as Le,k as Me,Q as Re,n as We,t as te,a as le,o as d,d as Ie,R as ze,C as De,p as He,r as j,u as Ue,N as je}from"./index-3e0f12d8.js";import{S as Ne}from"./SdkTabs-ed893501.js";function ye(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ae(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ce(a,l){let o,n=l[5].code+"",f,h,c,u;function m(){return l[4](l[5])}return{key:a,first:null,c(){o=i("button"),f=v(n),h=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(g,P){r(g,o,P),s(o,f),s(o,h),c||(u=Ue(o,"click",m),c=!0)},p(g,P){l=g,P&4&&n!==(n=l[5].code+"")&&U(f,n),P&6&&j(o,"active",l[1]===l[5].code)},d(g){g&&d(o),c=!1,u()}}}function Te(a,l){let o,n,f,h;return n=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=i("div"),Se(n.$$.fragment),f=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Ee(n,o,null),s(o,f),h=!0},p(c,u){l=c;const m={};u&4&&(m.content=l[5].body),n.$set(m),(!h||u&6)&&j(o,"active",l[1]===l[5].code)},i(c){h||(te(n.$$.fragment,c),h=!0)},o(c){le(n.$$.fragment,c),h=!1},d(c){c&&d(o),Ie(n)}}}function Ge(a){var be,he,_e,ke;let l,o,n=a[0].name+"",f,h,c,u,m,g,P,M=a[0].name+"",N,oe,se,G,K,y,Q,S,F,w,R,ae,W,A,ne,J,z=a[0].name+"",V,ie,X,ce,re,D,Y,E,Z,I,x,B,ee,C,q,$=[],de=new Map,ue,O,k=[],pe=new Map,T;y=new Ne({props:{js:` +import{S as Be,i as qe,s as Oe,e as i,w as v,b as _,c as Se,f as b,g as r,h as s,m as Ee,x as U,O as Pe,P as Le,k as Me,Q as Re,n as We,t as te,a as le,o as d,d as Ie,R as ze,C as De,p as He,r as j,u as Ue,N as je}from"./index-ffbb9561.js";import{S as Ne}from"./SdkTabs-5b973c0d.js";function ye(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ae(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ce(a,l){let o,n=l[5].code+"",f,h,c,u;function m(){return l[4](l[5])}return{key:a,first:null,c(){o=i("button"),f=v(n),h=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(g,P){r(g,o,P),s(o,f),s(o,h),c||(u=Ue(o,"click",m),c=!0)},p(g,P){l=g,P&4&&n!==(n=l[5].code+"")&&U(f,n),P&6&&j(o,"active",l[1]===l[5].code)},d(g){g&&d(o),c=!1,u()}}}function Te(a,l){let o,n,f,h;return n=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=i("div"),Se(n.$$.fragment),f=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Ee(n,o,null),s(o,f),h=!0},p(c,u){l=c;const m={};u&4&&(m.content=l[5].body),n.$set(m),(!h||u&6)&&j(o,"active",l[1]===l[5].code)},i(c){h||(te(n.$$.fragment,c),h=!0)},o(c){le(n.$$.fragment,c),h=!1},d(c){c&&d(o),Ie(n)}}}function Ge(a){var be,he,_e,ke;let l,o,n=a[0].name+"",f,h,c,u,m,g,P,M=a[0].name+"",N,oe,se,G,K,y,Q,S,F,w,R,ae,W,A,ne,J,z=a[0].name+"",V,ie,X,ce,re,D,Y,E,Z,I,x,B,ee,C,q,$=[],de=new Map,ue,O,k=[],pe=new Map,T;y=new Ne({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/PageAdminConfirmPasswordReset-66c829b0.js b/ui/dist/assets/PageAdminConfirmPasswordReset-18b0e4d7.js similarity index 98% rename from ui/dist/assets/PageAdminConfirmPasswordReset-66c829b0.js rename to ui/dist/assets/PageAdminConfirmPasswordReset-18b0e4d7.js index 3570f888..c7145fde 100644 --- a/ui/dist/assets/PageAdminConfirmPasswordReset-66c829b0.js +++ b/ui/dist/assets/PageAdminConfirmPasswordReset-18b0e4d7.js @@ -1,2 +1,2 @@ -import{S as E,i as G,s as I,F as K,c as A,m as B,t as H,a as N,d as T,C as M,q as J,e as c,w as q,b as C,f as u,r as L,g as b,h as _,u as h,v as O,j as Q,l as U,o as w,A as V,p as W,B as X,D as Y,x as Z,z as S}from"./index-3e0f12d8.js";function y(f){let e,o,s;return{c(){e=q("for "),o=c("strong"),s=q(f[3]),u(o,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,o,t),_(o,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&w(e),l&&w(o)}}}function x(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0,t.autofocus=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[0]),t.focus(),p||(d=h(t,"input",f[6]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&1&&t.value!==n[0]&&S(t,n[0])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function ee(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password confirm"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[1]),p||(d=h(t,"input",f[7]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&2&&t.value!==n[1]&&S(t,n[1])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function te(f){let e,o,s,l,t,r,p,d,n,i,g,R,P,v,k,F,j,m=f[3]&&y(f);return r=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),{c(){e=c("form"),o=c("div"),s=c("h4"),l=q(`Reset your admin password +import{S as E,i as G,s as I,F as K,c as A,m as B,t as H,a as N,d as T,C as M,q as J,e as c,w as q,b as C,f as u,r as L,g as b,h as _,u as h,v as O,j as Q,l as U,o as w,A as V,p as W,B as X,D as Y,x as Z,z as S}from"./index-ffbb9561.js";function y(f){let e,o,s;return{c(){e=q("for "),o=c("strong"),s=q(f[3]),u(o,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,o,t),_(o,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&w(e),l&&w(o)}}}function x(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0,t.autofocus=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[0]),t.focus(),p||(d=h(t,"input",f[6]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&1&&t.value!==n[0]&&S(t,n[0])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function ee(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password confirm"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[1]),p||(d=h(t,"input",f[7]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&2&&t.value!==n[1]&&S(t,n[1])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function te(f){let e,o,s,l,t,r,p,d,n,i,g,R,P,v,k,F,j,m=f[3]&&y(f);return r=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),{c(){e=c("form"),o=c("div"),s=c("h4"),l=q(`Reset your admin password `),m&&m.c(),t=C(),A(r.$$.fragment),p=C(),A(d.$$.fragment),n=C(),i=c("button"),g=c("span"),g.textContent="Set new password",R=C(),P=c("div"),v=c("a"),v.textContent="Back to login",u(s,"class","m-b-xs"),u(o,"class","content txt-center m-b-sm"),u(g,"class","txt"),u(i,"type","submit"),u(i,"class","btn btn-lg btn-block"),i.disabled=f[2],L(i,"btn-loading",f[2]),u(e,"class","m-b-base"),u(v,"href","/login"),u(v,"class","link-hint"),u(P,"class","content txt-center")},m(a,$){b(a,e,$),_(e,o),_(o,s),_(s,l),m&&m.m(s,null),_(e,t),B(r,e,null),_(e,p),B(d,e,null),_(e,n),_(e,i),_(i,g),b(a,R,$),b(a,P,$),_(P,v),k=!0,F||(j=[h(e,"submit",O(f[4])),Q(U.call(null,v))],F=!0)},p(a,$){a[3]?m?m.p(a,$):(m=y(a),m.c(),m.m(s,null)):m&&(m.d(1),m=null);const z={};$&769&&(z.$$scope={dirty:$,ctx:a}),r.$set(z);const D={};$&770&&(D.$$scope={dirty:$,ctx:a}),d.$set(D),(!k||$&4)&&(i.disabled=a[2]),(!k||$&4)&&L(i,"btn-loading",a[2])},i(a){k||(H(r.$$.fragment,a),H(d.$$.fragment,a),k=!0)},o(a){N(r.$$.fragment,a),N(d.$$.fragment,a),k=!1},d(a){a&&w(e),m&&m.d(),T(r),T(d),a&&w(R),a&&w(P),F=!1,V(j)}}}function se(f){let e,o;return e=new K({props:{$$slots:{default:[te]},$$scope:{ctx:f}}}),{c(){A(e.$$.fragment)},m(s,l){B(e,s,l),o=!0},p(s,[l]){const t={};l&527&&(t.$$scope={dirty:l,ctx:s}),e.$set(t)},i(s){o||(H(e.$$.fragment,s),o=!0)},o(s){N(e.$$.fragment,s),o=!1},d(s){T(e,s)}}}function le(f,e,o){let s,{params:l}=e,t="",r="",p=!1;async function d(){if(!p){o(2,p=!0);try{await W.admins.confirmPasswordReset(l==null?void 0:l.token,t,r),X("Successfully set a new admin password."),Y("/")}catch(g){W.errorResponseHandler(g)}o(2,p=!1)}}function n(){t=this.value,o(0,t)}function i(){r=this.value,o(1,r)}return f.$$set=g=>{"params"in g&&o(5,l=g.params)},f.$$.update=()=>{f.$$.dirty&32&&o(3,s=M.getJWTPayload(l==null?void 0:l.token).email||"")},[t,r,p,s,d,l,n,i]}class ae extends E{constructor(e){super(),G(this,e,le,se,I,{params:5})}}export{ae as default}; diff --git a/ui/dist/assets/PageAdminRequestPasswordReset-63534a96.js b/ui/dist/assets/PageAdminRequestPasswordReset-e202dd28.js similarity index 98% rename from ui/dist/assets/PageAdminRequestPasswordReset-63534a96.js rename to ui/dist/assets/PageAdminRequestPasswordReset-e202dd28.js index 8bbe4252..15348a34 100644 --- a/ui/dist/assets/PageAdminRequestPasswordReset-63534a96.js +++ b/ui/dist/assets/PageAdminRequestPasswordReset-e202dd28.js @@ -1,2 +1,2 @@ -import{S as M,i as T,s as j,F as z,c as H,m as L,t as w,a as y,d as S,b as g,e as _,f as p,g as k,h as d,j as A,l as B,k as N,n as D,o as v,p as C,q as G,r as F,u as E,v as I,w as h,x as J,y as P,z as R}from"./index-3e0f12d8.js";function K(c){let e,s,n,l,t,o,f,m,i,a,b,u;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:r})=>({5:r}),({uniqueId:r})=>r?32:0]},$$scope:{ctx:c}}}),{c(){e=_("form"),s=_("div"),s.innerHTML=`

Forgotten admin password

+import{S as M,i as T,s as j,F as z,c as H,m as L,t as w,a as y,d as S,b as g,e as _,f as p,g as k,h as d,j as A,l as B,k as N,n as D,o as v,p as C,q as G,r as F,u as E,v as I,w as h,x as J,y as P,z as R}from"./index-ffbb9561.js";function K(c){let e,s,n,l,t,o,f,m,i,a,b,u;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:r})=>({5:r}),({uniqueId:r})=>r?32:0]},$$scope:{ctx:c}}}),{c(){e=_("form"),s=_("div"),s.innerHTML=`

Forgotten admin password

Enter the email associated with your account and we’ll send you a recovery link:

`,n=g(),H(l.$$.fragment),t=g(),o=_("button"),f=_("i"),m=g(),i=_("span"),i.textContent="Send recovery link",p(s,"class","content txt-center m-b-sm"),p(f,"class","ri-mail-send-line"),p(i,"class","txt"),p(o,"type","submit"),p(o,"class","btn btn-lg btn-block"),o.disabled=c[1],F(o,"btn-loading",c[1]),p(e,"class","m-b-base")},m(r,$){k(r,e,$),d(e,s),d(e,n),L(l,e,null),d(e,t),d(e,o),d(o,f),d(o,m),d(o,i),a=!0,b||(u=E(e,"submit",I(c[3])),b=!0)},p(r,$){const q={};$&97&&(q.$$scope={dirty:$,ctx:r}),l.$set(q),(!a||$&2)&&(o.disabled=r[1]),(!a||$&2)&&F(o,"btn-loading",r[1])},i(r){a||(w(l.$$.fragment,r),a=!0)},o(r){y(l.$$.fragment,r),a=!1},d(r){r&&v(e),S(l),b=!1,u()}}}function O(c){let e,s,n,l,t,o,f,m,i;return{c(){e=_("div"),s=_("div"),s.innerHTML='',n=g(),l=_("div"),t=_("p"),o=h("Check "),f=_("strong"),m=h(c[0]),i=h(" for the recovery link."),p(s,"class","icon"),p(f,"class","txt-nowrap"),p(l,"class","content"),p(e,"class","alert alert-success")},m(a,b){k(a,e,b),d(e,s),d(e,n),d(e,l),d(l,t),d(t,o),d(t,f),d(f,m),d(t,i)},p(a,b){b&1&&J(m,a[0])},i:P,o:P,d(a){a&&v(e)}}}function Q(c){let e,s,n,l,t,o,f,m;return{c(){e=_("label"),s=h("Email"),l=g(),t=_("input"),p(e,"for",n=c[5]),p(t,"type","email"),p(t,"id",o=c[5]),t.required=!0,t.autofocus=!0},m(i,a){k(i,e,a),d(e,s),k(i,l,a),k(i,t,a),R(t,c[0]),t.focus(),f||(m=E(t,"input",c[4]),f=!0)},p(i,a){a&32&&n!==(n=i[5])&&p(e,"for",n),a&32&&o!==(o=i[5])&&p(t,"id",o),a&1&&t.value!==i[0]&&R(t,i[0])},d(i){i&&v(e),i&&v(l),i&&v(t),f=!1,m()}}}function U(c){let e,s,n,l,t,o,f,m;const i=[O,K],a=[];function b(u,r){return u[2]?0:1}return e=b(c),s=a[e]=i[e](c),{c(){s.c(),n=g(),l=_("div"),t=_("a"),t.textContent="Back to login",p(t,"href","/login"),p(t,"class","link-hint"),p(l,"class","content txt-center")},m(u,r){a[e].m(u,r),k(u,n,r),k(u,l,r),d(l,t),o=!0,f||(m=A(B.call(null,t)),f=!0)},p(u,r){let $=e;e=b(u),e===$?a[e].p(u,r):(N(),y(a[$],1,1,()=>{a[$]=null}),D(),s=a[e],s?s.p(u,r):(s=a[e]=i[e](u),s.c()),w(s,1),s.m(n.parentNode,n))},i(u){o||(w(s),o=!0)},o(u){y(s),o=!1},d(u){a[e].d(u),u&&v(n),u&&v(l),f=!1,m()}}}function V(c){let e,s;return e=new z({props:{$$slots:{default:[U]},$$scope:{ctx:c}}}),{c(){H(e.$$.fragment)},m(n,l){L(e,n,l),s=!0},p(n,[l]){const t={};l&71&&(t.$$scope={dirty:l,ctx:n}),e.$set(t)},i(n){s||(w(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){S(e,n)}}}function W(c,e,s){let n="",l=!1,t=!1;async function o(){if(!l){s(1,l=!0);try{await C.admins.requestPasswordReset(n),s(2,t=!0)}catch(m){C.errorResponseHandler(m)}s(1,l=!1)}}function f(){n=this.value,s(0,n)}return[n,l,t,o,f]}class Y extends M{constructor(e){super(),T(this,e,W,V,j,{})}}export{Y as default}; diff --git a/ui/dist/assets/PageRecordConfirmEmailChange-02f333fb.js b/ui/dist/assets/PageRecordConfirmEmailChange-ec412fef.js similarity index 98% rename from ui/dist/assets/PageRecordConfirmEmailChange-02f333fb.js rename to ui/dist/assets/PageRecordConfirmEmailChange-ec412fef.js index 2cd80551..aefc750a 100644 --- a/ui/dist/assets/PageRecordConfirmEmailChange-02f333fb.js +++ b/ui/dist/assets/PageRecordConfirmEmailChange-ec412fef.js @@ -1,4 +1,4 @@ -import{S as z,i as G,s as I,F as J,c as S,m as L,t as v,a as y,d as R,C as M,E as N,g as _,k as W,n as Y,o as b,G as j,H as A,p as B,q as D,e as m,w as C,b as h,f as d,r as H,h as k,u as P,v as K,y as E,x as O,z as T}from"./index-3e0f12d8.js";function Q(r){let e,t,l,s,n,o,c,a,i,u,g,$,p=r[3]&&F(r);return o=new D({props:{class:"form-field required",name:"password",$$slots:{default:[V,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),t=m("div"),l=m("h5"),s=C(`Type your password to confirm changing your email address +import{S as z,i as G,s as I,F as J,c as S,m as L,t as v,a as y,d as R,C as M,E as N,g as _,k as W,n as Y,o as b,G as j,H as A,p as B,q as D,e as m,w as C,b as h,f as d,r as H,h as k,u as P,v as K,y as E,x as O,z as T}from"./index-ffbb9561.js";function Q(r){let e,t,l,s,n,o,c,a,i,u,g,$,p=r[3]&&F(r);return o=new D({props:{class:"form-field required",name:"password",$$slots:{default:[V,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),t=m("div"),l=m("h5"),s=C(`Type your password to confirm changing your email address `),p&&p.c(),n=h(),S(o.$$.fragment),c=h(),a=m("button"),i=m("span"),i.textContent="Confirm new email",d(t,"class","content txt-center m-b-base"),d(i,"class","txt"),d(a,"type","submit"),d(a,"class","btn btn-lg btn-block"),a.disabled=r[1],H(a,"btn-loading",r[1])},m(f,w){_(f,e,w),k(e,t),k(t,l),k(l,s),p&&p.m(l,null),k(e,n),L(o,e,null),k(e,c),k(e,a),k(a,i),u=!0,g||($=P(e,"submit",K(r[4])),g=!0)},p(f,w){f[3]?p?p.p(f,w):(p=F(f),p.c(),p.m(l,null)):p&&(p.d(1),p=null);const q={};w&769&&(q.$$scope={dirty:w,ctx:f}),o.$set(q),(!u||w&2)&&(a.disabled=f[1]),(!u||w&2)&&H(a,"btn-loading",f[1])},i(f){u||(v(o.$$.fragment,f),u=!0)},o(f){y(o.$$.fragment,f),u=!1},d(f){f&&b(e),p&&p.d(),R(o),g=!1,$()}}}function U(r){let e,t,l,s,n;return{c(){e=m("div"),e.innerHTML=`

Successfully changed the user email address.

You can now sign in with your new email address.

`,t=h(),l=m("button"),l.textContent="Close",d(e,"class","alert alert-success"),d(l,"type","button"),d(l,"class","btn btn-transparent btn-block")},m(o,c){_(o,e,c),_(o,t,c),_(o,l,c),s||(n=P(l,"click",r[6]),s=!0)},p:E,i:E,o:E,d(o){o&&b(e),o&&b(t),o&&b(l),s=!1,n()}}}function F(r){let e,t,l;return{c(){e=C("to "),t=m("strong"),l=C(r[3]),d(t,"class","txt-nowrap")},m(s,n){_(s,e,n),_(s,t,n),k(t,l)},p(s,n){n&8&&O(l,s[3])},d(s){s&&b(e),s&&b(t)}}}function V(r){let e,t,l,s,n,o,c,a;return{c(){e=m("label"),t=C("Password"),s=h(),n=m("input"),d(e,"for",l=r[8]),d(n,"type","password"),d(n,"id",o=r[8]),n.required=!0,n.autofocus=!0},m(i,u){_(i,e,u),k(e,t),_(i,s,u),_(i,n,u),T(n,r[0]),n.focus(),c||(a=P(n,"input",r[7]),c=!0)},p(i,u){u&256&&l!==(l=i[8])&&d(e,"for",l),u&256&&o!==(o=i[8])&&d(n,"id",o),u&1&&n.value!==i[0]&&T(n,i[0])},d(i){i&&b(e),i&&b(s),i&&b(n),c=!1,a()}}}function X(r){let e,t,l,s;const n=[U,Q],o=[];function c(a,i){return a[2]?0:1}return e=c(r),t=o[e]=n[e](r),{c(){t.c(),l=N()},m(a,i){o[e].m(a,i),_(a,l,i),s=!0},p(a,i){let u=e;e=c(a),e===u?o[e].p(a,i):(W(),y(o[u],1,1,()=>{o[u]=null}),Y(),t=o[e],t?t.p(a,i):(t=o[e]=n[e](a),t.c()),v(t,1),t.m(l.parentNode,l))},i(a){s||(v(t),s=!0)},o(a){y(t),s=!1},d(a){o[e].d(a),a&&b(l)}}}function Z(r){let e,t;return e=new J({props:{nobranding:!0,$$slots:{default:[X]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(l,s){L(e,l,s),t=!0},p(l,[s]){const n={};s&527&&(n.$$scope={dirty:s,ctx:l}),e.$set(n)},i(l){t||(v(e.$$.fragment,l),t=!0)},o(l){y(e.$$.fragment,l),t=!1},d(l){R(e,l)}}}function x(r,e,t){let l,{params:s}=e,n="",o=!1,c=!1;async function a(){if(o)return;t(1,o=!0);const g=new j("../");try{const $=A(s==null?void 0:s.token);await g.collection($.collectionId).confirmEmailChange(s==null?void 0:s.token,n),t(2,c=!0)}catch($){B.errorResponseHandler($)}t(1,o=!1)}const i=()=>window.close();function u(){n=this.value,t(0,n)}return r.$$set=g=>{"params"in g&&t(5,s=g.params)},r.$$.update=()=>{r.$$.dirty&32&&t(3,l=M.getJWTPayload(s==null?void 0:s.token).newEmail||"")},[n,o,c,l,a,s,i,u]}class te extends z{constructor(e){super(),G(this,e,x,Z,I,{params:5})}}export{te as default}; diff --git a/ui/dist/assets/PageRecordConfirmPasswordReset-33d374e8.js b/ui/dist/assets/PageRecordConfirmPasswordReset-d3cfe2c2.js similarity index 98% rename from ui/dist/assets/PageRecordConfirmPasswordReset-33d374e8.js rename to ui/dist/assets/PageRecordConfirmPasswordReset-d3cfe2c2.js index 1d8f4553..aeba9b5c 100644 --- a/ui/dist/assets/PageRecordConfirmPasswordReset-33d374e8.js +++ b/ui/dist/assets/PageRecordConfirmPasswordReset-d3cfe2c2.js @@ -1,4 +1,4 @@ -import{S as J,i as M,s as W,F as Y,c as F,m as N,t as y,a as q,d as T,C as j,E as A,g as _,k as B,n as D,o as m,G as K,H as O,p as Q,q as E,e as b,w as R,b as P,f as p,r as G,h as w,u as H,v as U,y as S,x as V,z as h}from"./index-3e0f12d8.js";function X(r){let e,l,s,n,t,o,c,a,i,u,v,k,g,C,d=r[4]&&I(r);return o=new E({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),a=new E({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),{c(){e=b("form"),l=b("div"),s=b("h5"),n=R(`Reset your user password +import{S as J,i as M,s as W,F as Y,c as F,m as N,t as y,a as q,d as T,C as j,E as A,g as _,k as B,n as D,o as m,G as K,H as O,p as Q,q as E,e as b,w as R,b as P,f as p,r as G,h as w,u as H,v as U,y as S,x as V,z as h}from"./index-ffbb9561.js";function X(r){let e,l,s,n,t,o,c,a,i,u,v,k,g,C,d=r[4]&&I(r);return o=new E({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),a=new E({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),{c(){e=b("form"),l=b("div"),s=b("h5"),n=R(`Reset your user password `),d&&d.c(),t=P(),F(o.$$.fragment),c=P(),F(a.$$.fragment),i=P(),u=b("button"),v=b("span"),v.textContent="Set new password",p(l,"class","content txt-center m-b-base"),p(v,"class","txt"),p(u,"type","submit"),p(u,"class","btn btn-lg btn-block"),u.disabled=r[2],G(u,"btn-loading",r[2])},m(f,$){_(f,e,$),w(e,l),w(l,s),w(s,n),d&&d.m(s,null),w(e,t),N(o,e,null),w(e,c),N(a,e,null),w(e,i),w(e,u),w(u,v),k=!0,g||(C=H(e,"submit",U(r[5])),g=!0)},p(f,$){f[4]?d?d.p(f,$):(d=I(f),d.c(),d.m(s,null)):d&&(d.d(1),d=null);const L={};$&3073&&(L.$$scope={dirty:$,ctx:f}),o.$set(L);const z={};$&3074&&(z.$$scope={dirty:$,ctx:f}),a.$set(z),(!k||$&4)&&(u.disabled=f[2]),(!k||$&4)&&G(u,"btn-loading",f[2])},i(f){k||(y(o.$$.fragment,f),y(a.$$.fragment,f),k=!0)},o(f){q(o.$$.fragment,f),q(a.$$.fragment,f),k=!1},d(f){f&&m(e),d&&d.d(),T(o),T(a),g=!1,C()}}}function Z(r){let e,l,s,n,t;return{c(){e=b("div"),e.innerHTML=`

Successfully changed the user password.

You can now sign in with your new password.

`,l=P(),s=b("button"),s.textContent="Close",p(e,"class","alert alert-success"),p(s,"type","button"),p(s,"class","btn btn-transparent btn-block")},m(o,c){_(o,e,c),_(o,l,c),_(o,s,c),n||(t=H(s,"click",r[7]),n=!0)},p:S,i:S,o:S,d(o){o&&m(e),o&&m(l),o&&m(s),n=!1,t()}}}function I(r){let e,l,s;return{c(){e=R("for "),l=b("strong"),s=R(r[4])},m(n,t){_(n,e,t),_(n,l,t),w(l,s)},p(n,t){t&16&&V(s,n[4])},d(n){n&&m(e),n&&m(l)}}}function x(r){let e,l,s,n,t,o,c,a;return{c(){e=b("label"),l=R("New password"),n=P(),t=b("input"),p(e,"for",s=r[10]),p(t,"type","password"),p(t,"id",o=r[10]),t.required=!0,t.autofocus=!0},m(i,u){_(i,e,u),w(e,l),_(i,n,u),_(i,t,u),h(t,r[0]),t.focus(),c||(a=H(t,"input",r[8]),c=!0)},p(i,u){u&1024&&s!==(s=i[10])&&p(e,"for",s),u&1024&&o!==(o=i[10])&&p(t,"id",o),u&1&&t.value!==i[0]&&h(t,i[0])},d(i){i&&m(e),i&&m(n),i&&m(t),c=!1,a()}}}function ee(r){let e,l,s,n,t,o,c,a;return{c(){e=b("label"),l=R("New password confirm"),n=P(),t=b("input"),p(e,"for",s=r[10]),p(t,"type","password"),p(t,"id",o=r[10]),t.required=!0},m(i,u){_(i,e,u),w(e,l),_(i,n,u),_(i,t,u),h(t,r[1]),c||(a=H(t,"input",r[9]),c=!0)},p(i,u){u&1024&&s!==(s=i[10])&&p(e,"for",s),u&1024&&o!==(o=i[10])&&p(t,"id",o),u&2&&t.value!==i[1]&&h(t,i[1])},d(i){i&&m(e),i&&m(n),i&&m(t),c=!1,a()}}}function te(r){let e,l,s,n;const t=[Z,X],o=[];function c(a,i){return a[3]?0:1}return e=c(r),l=o[e]=t[e](r),{c(){l.c(),s=A()},m(a,i){o[e].m(a,i),_(a,s,i),n=!0},p(a,i){let u=e;e=c(a),e===u?o[e].p(a,i):(B(),q(o[u],1,1,()=>{o[u]=null}),D(),l=o[e],l?l.p(a,i):(l=o[e]=t[e](a),l.c()),y(l,1),l.m(s.parentNode,s))},i(a){n||(y(l),n=!0)},o(a){q(l),n=!1},d(a){o[e].d(a),a&&m(s)}}}function se(r){let e,l;return e=new Y({props:{nobranding:!0,$$slots:{default:[te]},$$scope:{ctx:r}}}),{c(){F(e.$$.fragment)},m(s,n){N(e,s,n),l=!0},p(s,[n]){const t={};n&2079&&(t.$$scope={dirty:n,ctx:s}),e.$set(t)},i(s){l||(y(e.$$.fragment,s),l=!0)},o(s){q(e.$$.fragment,s),l=!1},d(s){T(e,s)}}}function le(r,e,l){let s,{params:n}=e,t="",o="",c=!1,a=!1;async function i(){if(c)return;l(2,c=!0);const g=new K("../");try{const C=O(n==null?void 0:n.token);await g.collection(C.collectionId).confirmPasswordReset(n==null?void 0:n.token,t,o),l(3,a=!0)}catch(C){Q.errorResponseHandler(C)}l(2,c=!1)}const u=()=>window.close();function v(){t=this.value,l(0,t)}function k(){o=this.value,l(1,o)}return r.$$set=g=>{"params"in g&&l(6,n=g.params)},r.$$.update=()=>{r.$$.dirty&64&&l(4,s=j.getJWTPayload(n==null?void 0:n.token).email||"")},[t,o,c,a,s,i,n,u,v,k]}class oe extends J{constructor(e){super(),M(this,e,le,se,W,{params:6})}}export{oe as default}; diff --git a/ui/dist/assets/PageRecordConfirmVerification-2f39c8aa.js b/ui/dist/assets/PageRecordConfirmVerification-3f096be7.js similarity index 97% rename from ui/dist/assets/PageRecordConfirmVerification-2f39c8aa.js rename to ui/dist/assets/PageRecordConfirmVerification-3f096be7.js index 731a57bc..41229ed9 100644 --- a/ui/dist/assets/PageRecordConfirmVerification-2f39c8aa.js +++ b/ui/dist/assets/PageRecordConfirmVerification-3f096be7.js @@ -1,3 +1,3 @@ -import{S as v,i as y,s as w,F as C,c as g,m as x,t as $,a as H,d as L,G as P,H as T,E as M,g as r,o as a,e as u,b as _,f,u as b,y as p}from"./index-3e0f12d8.js";function S(o){let t,s,e,n,l;return{c(){t=u("div"),t.innerHTML=`
+import{S as v,i as y,s as w,F as C,c as g,m as x,t as $,a as H,d as L,G as P,H as T,E as M,g as r,o as a,e as u,b as _,f,u as b,y as p}from"./index-ffbb9561.js";function S(o){let t,s,e,n,l;return{c(){t=u("div"),t.innerHTML=`

Invalid or expired verification token.

`,s=_(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-danger"),f(e,"type","button"),f(e,"class","btn btn-transparent btn-block")},m(i,c){r(i,t,c),r(i,s,c),r(i,e,c),n||(l=b(e,"click",o[4]),n=!0)},p,d(i){i&&a(t),i&&a(s),i&&a(e),n=!1,l()}}}function F(o){let t,s,e,n,l;return{c(){t=u("div"),t.innerHTML=`

Successfully verified email address.

`,s=_(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-success"),f(e,"type","button"),f(e,"class","btn btn-transparent btn-block")},m(i,c){r(i,t,c),r(i,s,c),r(i,e,c),n||(l=b(e,"click",o[3]),n=!0)},p,d(i){i&&a(t),i&&a(s),i&&a(e),n=!1,l()}}}function I(o){let t;return{c(){t=u("div"),t.innerHTML='
Please wait...
',f(t,"class","txt-center")},m(s,e){r(s,t,e)},p,d(s){s&&a(t)}}}function V(o){let t;function s(l,i){return l[1]?I:l[0]?F:S}let e=s(o),n=e(o);return{c(){n.c(),t=M()},m(l,i){n.m(l,i),r(l,t,i)},p(l,i){e===(e=s(l))&&n?n.p(l,i):(n.d(1),n=e(l),n&&(n.c(),n.m(t.parentNode,t)))},d(l){n.d(l),l&&a(t)}}}function q(o){let t,s;return t=new C({props:{nobranding:!0,$$slots:{default:[V]},$$scope:{ctx:o}}}),{c(){g(t.$$.fragment)},m(e,n){x(t,e,n),s=!0},p(e,[n]){const l={};n&67&&(l.$$scope={dirty:n,ctx:e}),t.$set(l)},i(e){s||($(t.$$.fragment,e),s=!0)},o(e){H(t.$$.fragment,e),s=!1},d(e){L(t,e)}}}function E(o,t,s){let{params:e}=t,n=!1,l=!1;i();async function i(){s(1,l=!0);const d=new P("../");try{const m=T(e==null?void 0:e.token);await d.collection(m.collectionId).confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch{s(0,n=!1)}s(1,l=!1)}const c=()=>window.close(),k=()=>window.close();return o.$$set=d=>{"params"in d&&s(2,e=d.params)},[n,l,e,c,k]}class N extends v{constructor(t){super(),y(this,t,E,q,w,{params:2})}}export{N as default}; diff --git a/ui/dist/assets/RealtimeApiDocs-1688c2b0.js b/ui/dist/assets/RealtimeApiDocs-bab3bf58.js similarity index 98% rename from ui/dist/assets/RealtimeApiDocs-1688c2b0.js rename to ui/dist/assets/RealtimeApiDocs-bab3bf58.js index 21f55310..cee8a10c 100644 --- a/ui/dist/assets/RealtimeApiDocs-1688c2b0.js +++ b/ui/dist/assets/RealtimeApiDocs-bab3bf58.js @@ -1,4 +1,4 @@ -import{S as re,i as ae,s as be,N as ue,C as P,e as u,w as y,b as a,c as te,f as p,g as t,h as I,m as ne,x as pe,t as ie,a as le,o as n,d as ce,R as me,p as de}from"./index-3e0f12d8.js";import{S as fe}from"./SdkTabs-ed893501.js";function $e(o){var B,U,W,A,H,L,T,q,M,N,j,J;let i,m,l=o[0].name+"",b,d,h,f,_,$,k,c,S,v,w,R,C,g,E,r,D;return c=new fe({props:{js:` +import{S as re,i as ae,s as be,N as ue,C as P,e as u,w as y,b as a,c as te,f as p,g as t,h as I,m as ne,x as pe,t as ie,a as le,o as n,d as ce,R as me,p as de}from"./index-ffbb9561.js";import{S as fe}from"./SdkTabs-5b973c0d.js";function $e(o){var B,U,W,A,H,L,T,q,M,N,j,J;let i,m,l=o[0].name+"",b,d,h,f,_,$,k,c,S,v,w,R,C,g,E,r,D;return c=new fe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[1]}'); diff --git a/ui/dist/assets/RequestEmailChangeDocs-39e41406.js b/ui/dist/assets/RequestEmailChangeDocs-327245a0.js similarity index 98% rename from ui/dist/assets/RequestEmailChangeDocs-39e41406.js rename to ui/dist/assets/RequestEmailChangeDocs-327245a0.js index 7b09080e..ce649ee6 100644 --- a/ui/dist/assets/RequestEmailChangeDocs-39e41406.js +++ b/ui/dist/assets/RequestEmailChangeDocs-327245a0.js @@ -1,4 +1,4 @@ -import{S as Te,i as Ee,s as Be,e as c,w as v,b as h,c as Pe,f,g as r,h as n,m as Ce,x as L,O as ve,P as Se,k as Re,Q as Me,n as Ae,t as x,a as ee,o as m,d as ye,R as We,C as ze,p as He,r as N,u as Oe,N as Ue}from"./index-3e0f12d8.js";import{S as je}from"./SdkTabs-ed893501.js";function we(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l,s){const a=o.slice();return a[5]=l[s],a}function $e(o,l){let s,a=l[5].code+"",_,b,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=v(a),b=h(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m($,q){r($,s,q),n(s,_),n(s,b),i||(p=Oe(s,"click",u),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&L(_,a),q&6&&N(s,"active",l[1]===l[5].code)},d($){$&&m(s),i=!1,p()}}}function qe(o,l){let s,a,_,b;return a=new Ue({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),Pe(a.$$.fragment),_=h(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m(i,p){r(i,s,p),Ce(a,s,null),n(s,_),b=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!b||p&6)&&N(s,"active",l[1]===l[5].code)},i(i){b||(x(a.$$.fragment,i),b=!0)},o(i){ee(a.$$.fragment,i),b=!1},d(i){i&&m(s),ye(a)}}}function De(o){var de,pe,ue,fe;let l,s,a=o[0].name+"",_,b,i,p,u,$,q,z=o[0].name+"",F,te,I,P,K,T,Q,w,H,le,O,E,se,G,U=o[0].name+"",J,ae,oe,j,V,B,X,S,Y,R,Z,C,M,g=[],ne=new Map,ie,A,k=[],ce=new Map,y;P=new je({props:{js:` +import{S as Te,i as Ee,s as Be,e as c,w as v,b as h,c as Pe,f,g as r,h as n,m as Ce,x as L,O as ve,P as Se,k as Re,Q as Me,n as Ae,t as x,a as ee,o as m,d as ye,R as We,C as ze,p as He,r as N,u as Oe,N as Ue}from"./index-ffbb9561.js";import{S as je}from"./SdkTabs-5b973c0d.js";function we(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l,s){const a=o.slice();return a[5]=l[s],a}function $e(o,l){let s,a=l[5].code+"",_,b,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=v(a),b=h(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m($,q){r($,s,q),n(s,_),n(s,b),i||(p=Oe(s,"click",u),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&L(_,a),q&6&&N(s,"active",l[1]===l[5].code)},d($){$&&m(s),i=!1,p()}}}function qe(o,l){let s,a,_,b;return a=new Ue({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),Pe(a.$$.fragment),_=h(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m(i,p){r(i,s,p),Ce(a,s,null),n(s,_),b=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!b||p&6)&&N(s,"active",l[1]===l[5].code)},i(i){b||(x(a.$$.fragment,i),b=!0)},o(i){ee(a.$$.fragment,i),b=!1},d(i){i&&m(s),ye(a)}}}function De(o){var de,pe,ue,fe;let l,s,a=o[0].name+"",_,b,i,p,u,$,q,z=o[0].name+"",F,te,I,P,K,T,Q,w,H,le,O,E,se,G,U=o[0].name+"",J,ae,oe,j,V,B,X,S,Y,R,Z,C,M,g=[],ne=new Map,ie,A,k=[],ce=new Map,y;P=new je({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/RequestPasswordResetDocs-4dade465.js b/ui/dist/assets/RequestPasswordResetDocs-aa324f13.js similarity index 97% rename from ui/dist/assets/RequestPasswordResetDocs-4dade465.js rename to ui/dist/assets/RequestPasswordResetDocs-aa324f13.js index 8d7aada7..1ed788fc 100644 --- a/ui/dist/assets/RequestPasswordResetDocs-4dade465.js +++ b/ui/dist/assets/RequestPasswordResetDocs-aa324f13.js @@ -1,4 +1,4 @@ -import{S as Pe,i as $e,s as qe,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as we,x as I,O as me,P as Re,k as ge,Q as ye,n as Be,t as Z,a as x,o as d,d as he,R as Ce,C as Se,p as Te,r as L,u as Me,N as Ae}from"./index-3e0f12d8.js";import{S as Ue}from"./SdkTabs-ed893501.js";function ue(a,s,l){const o=a.slice();return o[5]=s[l],o}function be(a,s,l){const o=a.slice();return o[5]=s[l],o}function _e(a,s){let l,o=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:a,first:null,c(){l=c("button"),_=w(o),u=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(P,$){r(P,l,$),n(l,_),n(l,u),i||(p=Me(l,"click",m),i=!0)},p(P,$){s=P,$&4&&o!==(o=s[5].code+"")&&I(_,o),$&6&&L(l,"active",s[1]===s[5].code)},d(P){P&&d(l),i=!1,p()}}}function ke(a,s){let l,o,_,u;return o=new Ae({props:{content:s[5].body}}),{key:a,first:null,c(){l=c("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(i,p){r(i,l,p),we(o,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),o.$set(m),(!u||p&6)&&L(l,"active",s[1]===s[5].code)},i(i){u||(Z(o.$$.fragment,i),u=!0)},o(i){x(o.$$.fragment,i),u=!1},d(i){i&&d(l),he(o)}}}function je(a){var re,de;let s,l,o=a[0].name+"",_,u,i,p,m,P,$,D=a[0].name+"",N,ee,Q,q,z,B,G,R,H,te,O,C,se,J,E=a[0].name+"",K,le,V,S,W,T,X,M,Y,g,A,h=[],oe=new Map,ae,U,k=[],ne=new Map,y;q=new Ue({props:{js:` +import{S as Pe,i as $e,s as qe,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as we,x as I,O as me,P as Re,k as ge,Q as ye,n as Be,t as Z,a as x,o as d,d as he,R as Ce,C as Se,p as Te,r as L,u as Me,N as Ae}from"./index-ffbb9561.js";import{S as Ue}from"./SdkTabs-5b973c0d.js";function ue(a,s,l){const o=a.slice();return o[5]=s[l],o}function be(a,s,l){const o=a.slice();return o[5]=s[l],o}function _e(a,s){let l,o=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:a,first:null,c(){l=c("button"),_=w(o),u=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(P,$){r(P,l,$),n(l,_),n(l,u),i||(p=Me(l,"click",m),i=!0)},p(P,$){s=P,$&4&&o!==(o=s[5].code+"")&&I(_,o),$&6&&L(l,"active",s[1]===s[5].code)},d(P){P&&d(l),i=!1,p()}}}function ke(a,s){let l,o,_,u;return o=new Ae({props:{content:s[5].body}}),{key:a,first:null,c(){l=c("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(i,p){r(i,l,p),we(o,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),o.$set(m),(!u||p&6)&&L(l,"active",s[1]===s[5].code)},i(i){u||(Z(o.$$.fragment,i),u=!0)},o(i){x(o.$$.fragment,i),u=!1},d(i){i&&d(l),he(o)}}}function je(a){var re,de;let s,l,o=a[0].name+"",_,u,i,p,m,P,$,D=a[0].name+"",N,ee,Q,q,z,B,G,R,H,te,O,C,se,J,E=a[0].name+"",K,le,V,S,W,T,X,M,Y,g,A,h=[],oe=new Map,ae,U,k=[],ne=new Map,y;q=new Ue({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/RequestVerificationDocs-019a72cd.js b/ui/dist/assets/RequestVerificationDocs-fa3c623a.js similarity index 97% rename from ui/dist/assets/RequestVerificationDocs-019a72cd.js rename to ui/dist/assets/RequestVerificationDocs-fa3c623a.js index 9e620576..2cd32852 100644 --- a/ui/dist/assets/RequestVerificationDocs-019a72cd.js +++ b/ui/dist/assets/RequestVerificationDocs-fa3c623a.js @@ -1,4 +1,4 @@ -import{S as qe,i as we,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as i,m as he,x as F,O as de,P as ge,k as ye,Q as Be,n as Ce,t as Z,a as x,o as f,d as $e,R as Se,C as Te,p as Re,r as I,u as Ve,N as Me}from"./index-3e0f12d8.js";import{S as Ae}from"./SdkTabs-ed893501.js";function pe(a,l,s){const o=a.slice();return o[5]=l[s],o}function be(a,l,s){const o=a.slice();return o[5]=l[s],o}function _e(a,l){let s,o=l[5].code+"",_,p,n,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){s=c("button"),_=h(o),p=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(q,w){r(q,s,w),i(s,_),i(s,p),n||(u=Ve(s,"click",d),n=!0)},p(q,w){l=q,w&4&&o!==(o=l[5].code+"")&&F(_,o),w&6&&I(s,"active",l[1]===l[5].code)},d(q){q&&f(s),n=!1,u()}}}function ke(a,l){let s,o,_,p;return o=new Me({props:{content:l[5].body}}),{key:a,first:null,c(){s=c("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(n,u){r(n,s,u),he(o,s,null),i(s,_),p=!0},p(n,u){l=n;const d={};u&4&&(d.content=l[5].body),o.$set(d),(!p||u&6)&&I(s,"active",l[1]===l[5].code)},i(n){p||(Z(o.$$.fragment,n),p=!0)},o(n){x(o.$$.fragment,n),p=!1},d(n){n&&f(s),$e(o)}}}function Ue(a){var re,fe;let l,s,o=a[0].name+"",_,p,n,u,d,q,w,j=a[0].name+"",L,ee,N,P,Q,C,z,g,D,te,H,S,le,G,O=a[0].name+"",J,se,K,T,W,R,X,V,Y,y,M,$=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Ae({props:{js:` +import{S as qe,i as we,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as i,m as he,x as F,O as de,P as ge,k as ye,Q as Be,n as Ce,t as Z,a as x,o as f,d as $e,R as Se,C as Te,p as Re,r as I,u as Ve,N as Me}from"./index-ffbb9561.js";import{S as Ae}from"./SdkTabs-5b973c0d.js";function pe(a,l,s){const o=a.slice();return o[5]=l[s],o}function be(a,l,s){const o=a.slice();return o[5]=l[s],o}function _e(a,l){let s,o=l[5].code+"",_,p,n,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){s=c("button"),_=h(o),p=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(q,w){r(q,s,w),i(s,_),i(s,p),n||(u=Ve(s,"click",d),n=!0)},p(q,w){l=q,w&4&&o!==(o=l[5].code+"")&&F(_,o),w&6&&I(s,"active",l[1]===l[5].code)},d(q){q&&f(s),n=!1,u()}}}function ke(a,l){let s,o,_,p;return o=new Me({props:{content:l[5].body}}),{key:a,first:null,c(){s=c("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(n,u){r(n,s,u),he(o,s,null),i(s,_),p=!0},p(n,u){l=n;const d={};u&4&&(d.content=l[5].body),o.$set(d),(!p||u&6)&&I(s,"active",l[1]===l[5].code)},i(n){p||(Z(o.$$.fragment,n),p=!0)},o(n){x(o.$$.fragment,n),p=!1},d(n){n&&f(s),$e(o)}}}function Ue(a){var re,fe;let l,s,o=a[0].name+"",_,p,n,u,d,q,w,j=a[0].name+"",L,ee,N,P,Q,C,z,g,D,te,H,S,le,G,O=a[0].name+"",J,se,K,T,W,R,X,V,Y,y,M,$=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/SdkTabs-ed893501.js b/ui/dist/assets/SdkTabs-5b973c0d.js similarity index 98% rename from ui/dist/assets/SdkTabs-ed893501.js rename to ui/dist/assets/SdkTabs-5b973c0d.js index be760666..b1d0c649 100644 --- a/ui/dist/assets/SdkTabs-ed893501.js +++ b/ui/dist/assets/SdkTabs-5b973c0d.js @@ -1 +1 @@ -import{S as q,i as B,s as F,e as v,b as j,f as h,g as y,h as m,O as C,P as J,k as O,Q,n as Y,t as N,a as P,o as w,w as E,r as S,u as z,x as R,N as A,c as G,m as H,d as L}from"./index-3e0f12d8.js";function D(o,e,l){const s=o.slice();return s[6]=e[l],s}function K(o,e,l){const s=o.slice();return s[6]=e[l],s}function T(o,e){let l,s,g=e[6].title+"",r,i,n,k;function c(){return e[5](e[6])}return{key:o,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=j(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(u,_){y(u,l,_),m(l,s),m(s,r),m(l,i),n||(k=z(l,"click",c),n=!0)},p(u,_){e=u,_&4&&g!==(g=e[6].title+"")&&R(r,g),_&6&&S(l,"active",e[1]===e[6].language)},d(u){u&&w(l),n=!1,k()}}}function I(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,u,_,p,f;return s=new A({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),G(s.$$.fragment),g=j(),r=v("div"),i=v("em"),n=v("a"),c=E(k),u=E(" SDK"),p=j(),h(n,"href",_=e[6].url),h(n,"target","_blank"),h(n,"rel","noopener noreferrer"),h(i,"class","txt-sm txt-hint"),h(r,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(b,t){y(b,l,t),H(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,u),m(l,p),f=!0},p(b,t){e=b;const a={};t&4&&(a.language=e[6].language),t&4&&(a.content=e[6].content),s.$set(a),(!f||t&4)&&k!==(k=e[6].title+"")&&R(c,k),(!f||t&4&&_!==(_=e[6].url))&&h(n,"href",_),(!f||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){f||(N(s.$$.fragment,b),f=!0)},o(b){P(s.$$.fragment,b),f=!1},d(b){b&&w(l),L(s)}}}function U(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,u,_=o[2];const p=t=>t[6].language;for(let t=0;t<_.length;t+=1){let a=K(o,_,t),d=p(a);g.set(d,s[t]=T(d,a))}let f=o[2];const b=t=>t[6].language;for(let t=0;tl(1,n=c.language);return o.$$set=c=>{"class"in c&&l(0,g=c.class),"js"in c&&l(3,r=c.js),"dart"in c&&l(4,i=c.dart)},o.$$.update=()=>{o.$$.dirty&2&&n&&localStorage.setItem(M,n),o.$$.dirty&24&&l(2,s=[{title:"JavaScript",language:"javascript",content:r,url:"https://github.com/pocketbase/js-sdk"},{title:"Dart",language:"dart",content:i,url:"https://github.com/pocketbase/dart-sdk"}])},[g,n,s,r,i,k]}class X extends q{constructor(e){super(),B(this,e,V,U,F,{class:0,js:3,dart:4})}}export{X as S}; +import{S as q,i as B,s as F,e as v,b as j,f as h,g as y,h as m,O as C,P as J,k as O,Q,n as Y,t as N,a as P,o as w,w as E,r as S,u as z,x as R,N as A,c as G,m as H,d as L}from"./index-ffbb9561.js";function D(o,e,l){const s=o.slice();return s[6]=e[l],s}function K(o,e,l){const s=o.slice();return s[6]=e[l],s}function T(o,e){let l,s,g=e[6].title+"",r,i,n,k;function c(){return e[5](e[6])}return{key:o,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=j(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(u,_){y(u,l,_),m(l,s),m(s,r),m(l,i),n||(k=z(l,"click",c),n=!0)},p(u,_){e=u,_&4&&g!==(g=e[6].title+"")&&R(r,g),_&6&&S(l,"active",e[1]===e[6].language)},d(u){u&&w(l),n=!1,k()}}}function I(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,u,_,p,f;return s=new A({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),G(s.$$.fragment),g=j(),r=v("div"),i=v("em"),n=v("a"),c=E(k),u=E(" SDK"),p=j(),h(n,"href",_=e[6].url),h(n,"target","_blank"),h(n,"rel","noopener noreferrer"),h(i,"class","txt-sm txt-hint"),h(r,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(b,t){y(b,l,t),H(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,u),m(l,p),f=!0},p(b,t){e=b;const a={};t&4&&(a.language=e[6].language),t&4&&(a.content=e[6].content),s.$set(a),(!f||t&4)&&k!==(k=e[6].title+"")&&R(c,k),(!f||t&4&&_!==(_=e[6].url))&&h(n,"href",_),(!f||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){f||(N(s.$$.fragment,b),f=!0)},o(b){P(s.$$.fragment,b),f=!1},d(b){b&&w(l),L(s)}}}function U(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,u,_=o[2];const p=t=>t[6].language;for(let t=0;t<_.length;t+=1){let a=K(o,_,t),d=p(a);g.set(d,s[t]=T(d,a))}let f=o[2];const b=t=>t[6].language;for(let t=0;tl(1,n=c.language);return o.$$set=c=>{"class"in c&&l(0,g=c.class),"js"in c&&l(3,r=c.js),"dart"in c&&l(4,i=c.dart)},o.$$.update=()=>{o.$$.dirty&2&&n&&localStorage.setItem(M,n),o.$$.dirty&24&&l(2,s=[{title:"JavaScript",language:"javascript",content:r,url:"https://github.com/pocketbase/js-sdk"},{title:"Dart",language:"dart",content:i,url:"https://github.com/pocketbase/dart-sdk"}])},[g,n,s,r,i,k]}class X extends q{constructor(e){super(),B(this,e,V,U,F,{class:0,js:3,dart:4})}}export{X as S}; diff --git a/ui/dist/assets/UnlinkExternalAuthDocs-c7d59832.js b/ui/dist/assets/UnlinkExternalAuthDocs-6ceca8bb.js similarity index 98% rename from ui/dist/assets/UnlinkExternalAuthDocs-c7d59832.js rename to ui/dist/assets/UnlinkExternalAuthDocs-6ceca8bb.js index bbf9eb18..aef58349 100644 --- a/ui/dist/assets/UnlinkExternalAuthDocs-c7d59832.js +++ b/ui/dist/assets/UnlinkExternalAuthDocs-6ceca8bb.js @@ -1,4 +1,4 @@ -import{S as qe,i as Oe,s as De,e as i,w as v,b as h,c as Se,f,g as r,h as s,m as Be,x as j,O as ye,P as Me,k as We,Q as ze,n as He,t as le,a as oe,o as d,d as Ue,R as Le,C as Re,p as je,r as I,u as Ie,N as Ne}from"./index-3e0f12d8.js";import{S as Ke}from"./SdkTabs-ed893501.js";function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l,o){const a=n.slice();return a[5]=l[o],a}function Te(n,l){let o,a=l[5].code+"",_,b,c,u;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),f(o,"class","tab-item"),I(o,"active",l[1]===l[5].code),this.first=o},m($,P){r($,o,P),s(o,_),s(o,b),c||(u=Ie(o,"click",m),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&j(_,a),P&6&&I(o,"active",l[1]===l[5].code)},d($){$&&d(o),c=!1,u()}}}function Ee(n,l){let o,a,_,b;return a=new Ne({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),f(o,"class","tab-item"),I(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Be(a,o,null),s(o,_),b=!0},p(c,u){l=c;const m={};u&4&&(m.content=l[5].body),a.$set(m),(!b||u&6)&&I(o,"active",l[1]===l[5].code)},i(c){b||(le(a.$$.fragment,c),b=!0)},o(c){oe(a.$$.fragment,c),b=!1},d(c){c&&d(o),Ue(a)}}}function Qe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,u,m,$,P,M=n[0].name+"",N,se,ae,K,Q,A,F,E,G,g,W,ne,z,y,ie,J,H=n[0].name+"",V,ce,X,re,Y,de,L,Z,S,x,B,ee,U,te,C,q,w=[],ue=new Map,pe,O,k=[],me=new Map,T;A=new Ke({props:{js:` +import{S as qe,i as Oe,s as De,e as i,w as v,b as h,c as Se,f,g as r,h as s,m as Be,x as j,O as ye,P as Me,k as We,Q as ze,n as He,t as le,a as oe,o as d,d as Ue,R as Le,C as Re,p as je,r as I,u as Ie,N as Ne}from"./index-ffbb9561.js";import{S as Ke}from"./SdkTabs-5b973c0d.js";function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l,o){const a=n.slice();return a[5]=l[o],a}function Te(n,l){let o,a=l[5].code+"",_,b,c,u;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),f(o,"class","tab-item"),I(o,"active",l[1]===l[5].code),this.first=o},m($,P){r($,o,P),s(o,_),s(o,b),c||(u=Ie(o,"click",m),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&j(_,a),P&6&&I(o,"active",l[1]===l[5].code)},d($){$&&d(o),c=!1,u()}}}function Ee(n,l){let o,a,_,b;return a=new Ne({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),f(o,"class","tab-item"),I(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Be(a,o,null),s(o,_),b=!0},p(c,u){l=c;const m={};u&4&&(m.content=l[5].body),a.$set(m),(!b||u&6)&&I(o,"active",l[1]===l[5].code)},i(c){b||(le(a.$$.fragment,c),b=!0)},o(c){oe(a.$$.fragment,c),b=!1},d(c){c&&d(o),Ue(a)}}}function Qe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,u,m,$,P,M=n[0].name+"",N,se,ae,K,Q,A,F,E,G,g,W,ne,z,y,ie,J,H=n[0].name+"",V,ce,X,re,Y,de,L,Z,S,x,B,ee,U,te,C,q,w=[],ue=new Map,pe,O,k=[],me=new Map,T;A=new Ke({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[3]}'); diff --git a/ui/dist/assets/UpdateApiDocs-6cd86ae2.js b/ui/dist/assets/UpdateApiDocs-66c52be5.js similarity index 99% rename from ui/dist/assets/UpdateApiDocs-6cd86ae2.js rename to ui/dist/assets/UpdateApiDocs-66c52be5.js index e5daea0b..02eb5cf1 100644 --- a/ui/dist/assets/UpdateApiDocs-6cd86ae2.js +++ b/ui/dist/assets/UpdateApiDocs-66c52be5.js @@ -1,4 +1,4 @@ -import{S as Ct,i as St,s as Ot,C as U,N as Tt,e as r,w as y,b as m,c as Ae,f as T,g as a,h as i,m as Be,x as I,O as Pe,P as ut,k as Mt,Q as $t,n as Rt,t as pe,a as fe,o,d as Fe,R as qt,p as Dt,r as ce,u as Ht,y as G}from"./index-3e0f12d8.js";import{S as Lt}from"./SdkTabs-ed893501.js";function bt(p,t,l){const s=p.slice();return s[7]=t[l],s}function mt(p,t,l){const s=p.slice();return s[7]=t[l],s}function _t(p,t,l){const s=p.slice();return s[12]=t[l],s}function yt(p){let t;return{c(){t=r("p"),t.innerHTML="Requires admin Authorization:TOKEN header",T(t,"class","txt-hint txt-sm txt-right")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function kt(p){let t,l,s,b,u,d,f,k,C,v,O,D,A,F,M,N,B;return{c(){t=r("tr"),t.innerHTML='Auth fields',l=m(),s=r("tr"),s.innerHTML=`
Optional +import{S as Ct,i as St,s as Ot,C as U,N as Tt,e as r,w as y,b as m,c as Ae,f as T,g as a,h as i,m as Be,x as I,O as Pe,P as ut,k as Mt,Q as $t,n as Rt,t as pe,a as fe,o,d as Fe,R as qt,p as Dt,r as ce,u as Ht,y as G}from"./index-ffbb9561.js";import{S as Lt}from"./SdkTabs-5b973c0d.js";function bt(p,t,l){const s=p.slice();return s[7]=t[l],s}function mt(p,t,l){const s=p.slice();return s[7]=t[l],s}function _t(p,t,l){const s=p.slice();return s[12]=t[l],s}function yt(p){let t;return{c(){t=r("p"),t.innerHTML="Requires admin Authorization:TOKEN header",T(t,"class","txt-hint txt-sm txt-right")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function kt(p){let t,l,s,b,u,d,f,k,C,v,O,D,A,F,M,N,B;return{c(){t=r("tr"),t.innerHTML='Auth fields',l=m(),s=r("tr"),s.innerHTML=`
Optional username
String The username of the auth record.`,b=m(),u=r("tr"),u.innerHTML=`
Optional diff --git a/ui/dist/assets/ViewApiDocs-08b517e0.js b/ui/dist/assets/ViewApiDocs-da1553a5.js similarity index 98% rename from ui/dist/assets/ViewApiDocs-08b517e0.js rename to ui/dist/assets/ViewApiDocs-da1553a5.js index 9a1cce6c..5e0cb0a5 100644 --- a/ui/dist/assets/ViewApiDocs-08b517e0.js +++ b/ui/dist/assets/ViewApiDocs-da1553a5.js @@ -1,4 +1,4 @@ -import{S as Ze,i as et,s as tt,N as Ye,e as o,w as m,b as f,c as _e,f as _,g as r,h as l,m as ke,x as me,O as Ve,P as lt,k as st,Q as nt,n as ot,t as z,a as G,o as d,d as he,R as it,C as ze,p as at,r as J,u as rt}from"./index-3e0f12d8.js";import{S as dt}from"./SdkTabs-ed893501.js";function Ge(i,s,n){const a=i.slice();return a[6]=s[n],a}function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i){let s;return{c(){s=o("p"),s.innerHTML="Requires admin Authorization:TOKEN header",_(s,"class","txt-hint txt-sm txt-right")},m(n,a){r(n,s,a)},d(n){n&&d(s)}}}function We(i,s){let n,a=s[6].code+"",w,c,p,u;function C(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),w=m(a),c=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(h,F){r(h,n,F),l(n,w),l(n,c),p||(u=rt(n,"click",C),p=!0)},p(h,F){s=h,F&20&&J(n,"active",s[2]===s[6].code)},d(h){h&&d(n),p=!1,u()}}}function Xe(i,s){let n,a,w,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),w=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(p,u){r(p,n,u),ke(a,n,null),l(n,w),c=!0},p(p,u){s=p,(!c||u&20)&&J(n,"active",s[2]===s[6].code)},i(p){c||(z(a.$$.fragment,p),c=!0)},o(p){G(a.$$.fragment,p),c=!1},d(p){p&&d(n),he(a)}}}function ct(i){var Ne,Ue;let s,n,a=i[0].name+"",w,c,p,u,C,h,F,N=i[0].name+"",K,ve,W,g,X,B,Y,$,U,we,j,E,ye,Z,Q=i[0].name+"",ee,$e,te,Ce,le,x,se,A,ne,I,oe,O,ie,Re,ae,D,re,Fe,de,ge,k,Oe,S,De,Pe,Te,ce,Ee,pe,Se,Be,xe,fe,Ae,ue,M,be,P,H,R=[],Ie=new Map,Me,q,y=[],He=new Map,T;g=new dt({props:{js:` +import{S as Ze,i as et,s as tt,N as Ye,e as o,w as m,b as f,c as _e,f as _,g as r,h as l,m as ke,x as me,O as Ve,P as lt,k as st,Q as nt,n as ot,t as z,a as G,o as d,d as he,R as it,C as ze,p as at,r as J,u as rt}from"./index-ffbb9561.js";import{S as dt}from"./SdkTabs-5b973c0d.js";function Ge(i,s,n){const a=i.slice();return a[6]=s[n],a}function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i){let s;return{c(){s=o("p"),s.innerHTML="Requires admin Authorization:TOKEN header",_(s,"class","txt-hint txt-sm txt-right")},m(n,a){r(n,s,a)},d(n){n&&d(s)}}}function We(i,s){let n,a=s[6].code+"",w,c,p,u;function C(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),w=m(a),c=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(h,F){r(h,n,F),l(n,w),l(n,c),p||(u=rt(n,"click",C),p=!0)},p(h,F){s=h,F&20&&J(n,"active",s[2]===s[6].code)},d(h){h&&d(n),p=!1,u()}}}function Xe(i,s){let n,a,w,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),w=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(p,u){r(p,n,u),ke(a,n,null),l(n,w),c=!0},p(p,u){s=p,(!c||u&20)&&J(n,"active",s[2]===s[6].code)},i(p){c||(z(a.$$.fragment,p),c=!0)},o(p){G(a.$$.fragment,p),c=!1},d(p){p&&d(n),he(a)}}}function ct(i){var Ne,Ue;let s,n,a=i[0].name+"",w,c,p,u,C,h,F,N=i[0].name+"",K,ve,W,g,X,B,Y,$,U,we,j,E,ye,Z,Q=i[0].name+"",ee,$e,te,Ce,le,x,se,A,ne,I,oe,O,ie,Re,ae,D,re,Fe,de,ge,k,Oe,S,De,Pe,Te,ce,Ee,pe,Se,Be,xe,fe,Ae,ue,M,be,P,H,R=[],Ie=new Map,Me,q,y=[],He=new Map,T;g=new dt({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/index-3e0f12d8.js b/ui/dist/assets/index-3e0f12d8.js deleted file mode 100644 index f27327f2..00000000 --- a/ui/dist/assets/index-3e0f12d8.js +++ /dev/null @@ -1,200 +0,0 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerpolicy&&(l.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?l.credentials="include":s.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=t(s);fetch(s.href,l)}})();function G(){}const kl=n=>n;function Xe(n,e){for(const t in e)n[t]=e[t];return n}function wb(n){return!!n&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"}function Rh(n){return n()}function iu(){return Object.create(null)}function Le(n){n.forEach(Rh)}function zt(n){return typeof n=="function"}function be(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Rl;function Hn(n,e){return Rl||(Rl=document.createElement("a")),Rl.href=e,n===Rl.href}function Sb(n){return Object.keys(n).length===0}function jh(n,...e){if(n==null)return G;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function Je(n,e,t){n.$$.on_destroy.push(jh(e,t))}function Ft(n,e,t,i){if(n){const s=Hh(n,e,t,i);return n[0](s)}}function Hh(n,e,t,i){return n[1]&&i?Xe(t.ctx.slice(),n[1](i(e))):t.ctx}function Rt(n,e,t,i){if(n[2]&&i){const s=n[2](i(t));if(e.dirty===void 0)return s;if(typeof s=="object"){const l=[],o=Math.max(e.dirty.length,s.length);for(let r=0;r32){const e=[],t=n.ctx.length/32;for(let i=0;iwindow.performance.now():()=>Date.now(),fa=qh?n=>requestAnimationFrame(n):G;const _s=new Set;function Vh(n){_s.forEach(e=>{e.c(n)||(_s.delete(e),e.f())}),_s.size!==0&&fa(Vh)}function Fo(n){let e;return _s.size===0&&fa(Vh),{promise:new Promise(t=>{_s.add(e={c:n,f:t})}),abort(){_s.delete(e)}}}function _(n,e){n.appendChild(e)}function zh(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function Tb(n){const e=v("style");return Cb(zh(n),e),e.sheet}function Cb(n,e){return _(n.head||n,e),e.sheet}function S(n,e,t){n.insertBefore(e,t||null)}function w(n){n.parentNode&&n.parentNode.removeChild(n)}function bt(n,e){for(let t=0;tn.removeEventListener(e,t,i)}function pt(n){return function(e){return e.preventDefault(),n.call(this,e)}}function yn(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function p(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function Zn(n,e){const t=Object.getOwnPropertyDescriptors(n.__proto__);for(const i in e)e[i]==null?n.removeAttribute(i):i==="style"?n.style.cssText=e[i]:i==="__value"?n.value=n[i]=e[i]:t[i]&&t[i].set?n[i]=e[i]:p(n,i,e[i])}function ht(n){return n===""?null:+n}function $b(n){return Array.from(n.childNodes)}function re(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function de(n,e){n.value=e??""}function Ir(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function x(n,e,t){n.classList[t?"add":"remove"](e)}function Bh(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}function Kt(n,e){return new n(e)}const po=new Map;let mo=0;function Mb(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function Db(n,e){const t={stylesheet:Tb(e),rules:{}};return po.set(n,t),t}function rl(n,e,t,i,s,l,o,r=0){const a=16.666/i;let u=`{ -`;for(let b=0;b<=1;b+=a){const y=e+(t-e)*l(b);u+=b*100+`%{${o(y,1-y)}} -`}const f=u+`100% {${o(t,1-t)}} -}`,c=`__svelte_${Mb(f)}_${r}`,d=zh(n),{stylesheet:m,rules:h}=po.get(d)||Db(d,n);h[c]||(h[c]=!0,m.insertRule(`@keyframes ${c} ${f}`,m.cssRules.length));const g=n.style.animation||"";return n.style.animation=`${g?`${g}, `:""}${c} ${i}ms linear ${s}ms 1 both`,mo+=1,c}function al(n,e){const t=(n.style.animation||"").split(", "),i=t.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),s=t.length-i.length;s&&(n.style.animation=i.join(", "),mo-=s,mo||Ob())}function Ob(){fa(()=>{mo||(po.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&w(e)}),po.clear())})}function Eb(n,e,t,i){if(!e)return G;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return G;const{delay:l=0,duration:o=300,easing:r=kl,start:a=No()+l,end:u=a+o,tick:f=G,css:c}=t(n,{from:e,to:s},i);let d=!0,m=!1,h;function g(){c&&(h=rl(n,0,1,o,l,r,c)),l||(m=!0)}function b(){c&&al(n,h),d=!1}return Fo(y=>{if(!m&&y>=a&&(m=!0),m&&y>=u&&(f(1,0),b()),!d)return!1;if(m){const k=y-a,T=0+1*r(k/o);f(T,1-T)}return!0}),g(),f(0,1),b}function Ab(n){const e=getComputedStyle(n);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:i}=e,s=n.getBoundingClientRect();n.style.position="absolute",n.style.width=t,n.style.height=i,Uh(n,s)}}function Uh(n,e){const t=n.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const i=getComputedStyle(n),s=i.transform==="none"?"":i.transform;n.style.transform=`${s} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}let ul;function li(n){ul=n}function wl(){if(!ul)throw new Error("Function called outside component initialization");return ul}function sn(n){wl().$$.on_mount.push(n)}function Ib(n){wl().$$.after_update.push(n)}function Wh(n){wl().$$.on_destroy.push(n)}function $t(){const n=wl();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=Bh(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function We(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const ms=[],ie=[],oo=[],Pr=[],Yh=Promise.resolve();let Lr=!1;function Kh(){Lr||(Lr=!0,Yh.then(ca))}function tn(){return Kh(),Yh}function nt(n){oo.push(n)}function we(n){Pr.push(n)}const Qo=new Set;let as=0;function ca(){if(as!==0)return;const n=ul;do{try{for(;as{Rs=null})),Rs}function Bi(n,e,t){n.dispatchEvent(Bh(`${e?"intro":"outro"}${t}`))}const ro=new Set;let Yn;function pe(){Yn={r:0,c:[],p:Yn}}function me(){Yn.r||Le(Yn.c),Yn=Yn.p}function A(n,e){n&&n.i&&(ro.delete(n),n.i(e))}function P(n,e,t,i){if(n&&n.o){if(ro.has(n))return;ro.add(n),Yn.c.push(()=>{ro.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const pa={duration:0};function Jh(n,e,t){const i={direction:"in"};let s=e(n,t,i),l=!1,o,r,a=0;function u(){o&&al(n,o)}function f(){const{delay:d=0,duration:m=300,easing:h=kl,tick:g=G,css:b}=s||pa;b&&(o=rl(n,0,1,m,d,h,b,a++)),g(0,1);const y=No()+d,k=y+m;r&&r.abort(),l=!0,nt(()=>Bi(n,!0,"start")),r=Fo(T=>{if(l){if(T>=k)return g(1,0),Bi(n,!0,"end"),u(),l=!1;if(T>=y){const C=h((T-y)/m);g(C,1-C)}}return l})}let c=!1;return{start(){c||(c=!0,al(n),zt(s)?(s=s(i),da().then(f)):f())},invalidate(){c=!1},end(){l&&(u(),l=!1)}}}function Zh(n,e,t){const i={direction:"out"};let s=e(n,t,i),l=!0,o;const r=Yn;r.r+=1;function a(){const{delay:u=0,duration:f=300,easing:c=kl,tick:d=G,css:m}=s||pa;m&&(o=rl(n,1,0,f,u,c,m));const h=No()+u,g=h+f;nt(()=>Bi(n,!1,"start")),Fo(b=>{if(l){if(b>=g)return d(0,1),Bi(n,!1,"end"),--r.r||Le(r.c),!1;if(b>=h){const y=c((b-h)/f);d(1-y,y)}}return l})}return zt(s)?da().then(()=>{s=s(i),a()}):a(),{end(u){u&&s.tick&&s.tick(1,0),l&&(o&&al(n,o),l=!1)}}}function ze(n,e,t,i){const s={direction:"both"};let l=e(n,t,s),o=i?0:1,r=null,a=null,u=null;function f(){u&&al(n,u)}function c(m,h){const g=m.b-o;return h*=Math.abs(g),{a:o,b:m.b,d:g,duration:h,start:m.start,end:m.start+h,group:m.group}}function d(m){const{delay:h=0,duration:g=300,easing:b=kl,tick:y=G,css:k}=l||pa,T={start:No()+h,b:m};m||(T.group=Yn,Yn.r+=1),r||a?a=T:(k&&(f(),u=rl(n,o,m,g,h,b,k)),m&&y(0,1),r=c(T,g),nt(()=>Bi(n,m,"start")),Fo(C=>{if(a&&C>a.start&&(r=c(a,g),a=null,Bi(n,r.b,"start"),k&&(f(),u=rl(n,o,r.b,r.duration,0,b,l.css))),r){if(C>=r.end)y(o=r.b,1-o),Bi(n,r.b,"end"),a||(r.b?f():--r.group.r||Le(r.group.c)),r=null;else if(C>=r.start){const M=C-r.start;o=r.a+r.d*b(M/r.duration),y(o,1-o)}}return!!(r||a)}))}return{run(m){zt(l)?da().then(()=>{l=l(s),d(m)}):d(m)},end(){f(),r=a=null}}}function su(n,e){const t=e.token={};function i(s,l,o,r){if(e.token!==t)return;e.resolved=r;let a=e.ctx;o!==void 0&&(a=a.slice(),a[o]=r);const u=s&&(e.current=s)(a);let f=!1;e.block&&(e.blocks?e.blocks.forEach((c,d)=>{d!==l&&c&&(pe(),P(c,1,1,()=>{e.blocks[d]===c&&(e.blocks[d]=null)}),me())}):e.block.d(1),u.c(),A(u,1),u.m(e.mount(),e.anchor),f=!0),e.block=u,e.blocks&&(e.blocks[l]=u),f&&ca()}if(wb(n)){const s=wl();if(n.then(l=>{li(s),i(e.then,1,e.value,l),li(null)},l=>{if(li(s),i(e.catch,2,e.error,l),li(null),!e.hasCatch)throw l}),e.current!==e.pending)return i(e.pending,0),!0}else{if(e.current!==e.then)return i(e.then,1,e.value,n),!0;e.resolved=n}}function Lb(n,e,t){const i=e.slice(),{resolved:s}=n;n.current===n.then&&(i[n.value]=s),n.current===n.catch&&(i[n.error]=s),n.block.p(i,t)}function Xi(n,e){n.d(1),e.delete(n.key)}function nn(n,e){P(n,1,1,()=>{e.delete(n.key)})}function Nb(n,e){n.f(),nn(n,e)}function wt(n,e,t,i,s,l,o,r,a,u,f,c){let d=n.length,m=l.length,h=d;const g={};for(;h--;)g[n[h].key]=h;const b=[],y=new Map,k=new Map;for(h=m;h--;){const $=c(s,l,h),O=t($);let E=o.get(O);E?i&&E.p($,e):(E=u(O,$),E.c()),y.set(O,b[h]=E),O in g&&k.set(O,Math.abs(h-g[O]))}const T=new Set,C=new Set;function M($){A($,1),$.m(r,f),o.set($.key,$),f=$.first,m--}for(;d&&m;){const $=b[m-1],O=n[d-1],E=$.key,I=O.key;$===O?(f=$.first,d--,m--):y.has(I)?!o.has(E)||T.has(E)?M($):C.has(I)?d--:k.get(E)>k.get(I)?(C.add(E),M($)):(T.add(I),d--):(a(O,o),d--)}for(;d--;){const $=n[d];y.has($.key)||a($,o)}for(;m;)M(b[m-1]);return b}function ln(n,e){const t={},i={},s={$$scope:1};let l=n.length;for(;l--;){const o=n[l],r=e[l];if(r){for(const a in o)a in r||(i[a]=1);for(const a in r)s[a]||(t[a]=r[a],s[a]=1);n[l]=r}else for(const a in o)s[a]=1}for(const o in i)o in t||(t[o]=void 0);return t}function Xn(n){return typeof n=="object"&&n!==null?n:{}}function ve(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function V(n){n&&n.c()}function H(n,e,t,i){const{fragment:s,after_update:l}=n.$$;s&&s.m(e,t),i||nt(()=>{const o=n.$$.on_mount.map(Rh).filter(zt);n.$$.on_destroy?n.$$.on_destroy.push(...o):Le(o),n.$$.on_mount=[]}),l.forEach(nt)}function q(n,e){const t=n.$$;t.fragment!==null&&(Le(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Fb(n,e){n.$$.dirty[0]===-1&&(ms.push(n),Kh(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const h=m.length?m[0]:d;return u.ctx&&s(u.ctx[c],u.ctx[c]=h)&&(!u.skip_bound&&u.bound[c]&&u.bound[c](h),f&&Fb(n,c)),d}):[],u.update(),f=!0,Le(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const c=$b(e.target);u.fragment&&u.fragment.l(c),c.forEach(w)}else u.fragment&&u.fragment.c();e.intro&&A(n.$$.fragment),H(n,e.target,e.anchor,e.customElement),ca()}li(a)}class ke{$destroy(){q(this,1),this.$destroy=G}$on(e,t){if(!zt(t))return G;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const s=i.indexOf(t);s!==-1&&i.splice(s,1)}}$set(e){this.$$set&&!Sb(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function Dt(n){if(!n)throw Error("Parameter args is required");if(!n.component==!n.asyncComponent)throw Error("One and only one of component and asyncComponent is required");if(n.component&&(n.asyncComponent=()=>Promise.resolve(n.component)),typeof n.asyncComponent!="function")throw Error("Parameter asyncComponent must be a function");if(n.conditions){Array.isArray(n.conditions)||(n.conditions=[n.conditions]);for(let t=0;t{i.delete(u),i.size===0&&(t(),t=null)}}return{set:s,update:l,subscribe:o}}function Xh(n,e,t){const i=!Array.isArray(n),s=i?[n]:n,l=e.length<2;return Gh(t,o=>{let r=!1;const a=[];let u=0,f=G;const c=()=>{if(u)return;f();const m=e(i?a[0]:a,o);l?o(m):f=zt(m)?m:G},d=s.map((m,h)=>jh(m,g=>{a[h]=g,u&=~(1<{u|=1<{q(f,1)}),me()}l?(e=Kt(l,o()),e.$on("routeEvent",r[7]),V(e.$$.fragment),A(e.$$.fragment,1),H(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&q(e,r)}}}function jb(n){let e,t,i;const s=[{params:n[1]},n[2]];var l=n[0];function o(r){let a={};for(let u=0;u{q(f,1)}),me()}l?(e=Kt(l,o()),e.$on("routeEvent",r[6]),V(e.$$.fragment),A(e.$$.fragment,1),H(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&q(e,r)}}}function Hb(n){let e,t,i,s;const l=[jb,Rb],o=[];function r(a,u){return a[1]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Ae()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(pe(),P(o[f],1,1,()=>{o[f]=null}),me(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function lu(){const n=window.location.href.indexOf("#/");let e=n>-1?window.location.href.substr(n+1):"/";const t=e.indexOf("?");let i="";return t>-1&&(i=e.substr(t+1),e=e.substr(0,t)),{location:e,querystring:i}}const Ro=Gh(null,function(e){e(lu());const t=()=>{e(lu())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}});Xh(Ro,n=>n.location);const ma=Xh(Ro,n=>n.querystring),ou=Pn(void 0);async function Ti(n){if(!n||n.length<1||n.charAt(0)!="/"&&n.indexOf("#/")!==0)throw Error("Invalid parameter location");await tn();const e=(n.charAt(0)=="#"?"":"#")+n;try{const t={...history.state};delete t.__svelte_spa_router_scrollX,delete t.__svelte_spa_router_scrollY,window.history.replaceState(t,void 0,e)}catch{console.warn("Caught exception while replacing the current page. If you're running this in the Svelte REPL, please note that the `replace` method might not work in this environment.")}window.dispatchEvent(new Event("hashchange"))}function Xt(n,e){if(e=au(e),!n||!n.tagName||n.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with tags');return ru(n,e),{update(t){t=au(t),ru(n,t)}}}function qb(n){n?window.scrollTo(n.__svelte_spa_router_scrollX,n.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function ru(n,e){let t=e.href||n.getAttribute("href");if(t&&t.charAt(0)=="/")t="#"+t;else if(!t||t.length<2||t.slice(0,2)!="#/")throw Error('Invalid value for "href" attribute: '+t);n.setAttribute("href",t),n.addEventListener("click",i=>{i.preventDefault(),e.disabled||Vb(i.currentTarget.getAttribute("href"))})}function au(n){return n&&typeof n=="string"?{href:n}:n||{}}function Vb(n){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=n}function zb(n,e,t){let{routes:i={}}=e,{prefix:s=""}=e,{restoreScrollState:l=!1}=e;class o{constructor(M,$){if(!$||typeof $!="function"&&(typeof $!="object"||$._sveltesparouter!==!0))throw Error("Invalid component object");if(!M||typeof M=="string"&&(M.length<1||M.charAt(0)!="/"&&M.charAt(0)!="*")||typeof M=="object"&&!(M instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:O,keys:E}=xh(M);this.path=M,typeof $=="object"&&$._sveltesparouter===!0?(this.component=$.component,this.conditions=$.conditions||[],this.userData=$.userData,this.props=$.props||{}):(this.component=()=>Promise.resolve($),this.conditions=[],this.props={}),this._pattern=O,this._keys=E}match(M){if(s){if(typeof s=="string")if(M.startsWith(s))M=M.substr(s.length)||"/";else return null;else if(s instanceof RegExp){const I=M.match(s);if(I&&I[0])M=M.substr(I[0].length)||"/";else return null}}const $=this._pattern.exec(M);if($===null)return null;if(this._keys===!1)return $;const O={};let E=0;for(;E{r.push(new o(M,C))}):Object.keys(i).forEach(C=>{r.push(new o(C,i[C]))});let a=null,u=null,f={};const c=$t();async function d(C,M){await tn(),c(C,M)}let m=null,h=null;l&&(h=C=>{C.state&&(C.state.__svelte_spa_router_scrollY||C.state.__svelte_spa_router_scrollX)?m=C.state:m=null},window.addEventListener("popstate",h),Ib(()=>{qb(m)}));let g=null,b=null;const y=Ro.subscribe(async C=>{g=C;let M=0;for(;M{ou.set(u)});return}t(0,a=null),b=null,ou.set(void 0)});Wh(()=>{y(),h&&window.removeEventListener("popstate",h)});function k(C){We.call(this,n,C)}function T(C){We.call(this,n,C)}return n.$$set=C=>{"routes"in C&&t(3,i=C.routes),"prefix"in C&&t(4,s=C.prefix),"restoreScrollState"in C&&t(5,l=C.restoreScrollState)},n.$$.update=()=>{n.$$.dirty&32&&(history.scrollRestoration=l?"manual":"auto")},[a,u,f,i,s,l,k,T]}class Bb extends ke{constructor(e){super(),ye(this,e,zb,Hb,be,{routes:3,prefix:4,restoreScrollState:5})}}const ao=[];let Qh;function eg(n){const e=n.pattern.test(Qh);uu(n,n.className,e),uu(n,n.inactiveClassName,!e)}function uu(n,e,t){(e||"").split(" ").forEach(i=>{i&&(n.node.classList.remove(i),t&&n.node.classList.add(i))})}Ro.subscribe(n=>{Qh=n.location+(n.querystring?"?"+n.querystring:""),ao.map(eg)});function Fn(n,e){if(e&&(typeof e=="string"||typeof e=="object"&&e instanceof RegExp)?e={path:e}:e=e||{},!e.path&&n.hasAttribute("href")&&(e.path=n.getAttribute("href"),e.path&&e.path.length>1&&e.path.charAt(0)=="#"&&(e.path=e.path.substring(1))),e.className||(e.className="active"),!e.path||typeof e.path=="string"&&(e.path.length<1||e.path.charAt(0)!="/"&&e.path.charAt(0)!="*"))throw Error('Invalid value for "path" argument');const{pattern:t}=typeof e.path=="string"?xh(e.path):{pattern:e.path},i={node:n,className:e.className,inactiveClassName:e.inactiveClassName,pattern:t};return ao.push(i),eg(i),{destroy(){ao.splice(ao.indexOf(i),1)}}}const Ub="modulepreload",Wb=function(n,e){return new URL(n,e).href},fu={},ft=function(e,t,i){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(l=>{if(l=Wb(l,i),l in fu)return;fu[l]=!0;const o=l.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(!!i)for(let f=s.length-1;f>=0;f--){const c=s[f];if(c.href===l&&(!o||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${r}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":Ub,o||(u.as="script",u.crossOrigin=""),u.href=l,document.head.appendChild(u),o)return new Promise((f,c)=>{u.addEventListener("load",f),u.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e())};var Nr=function(n,e){return Nr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])},Nr(n,e)};function Jt(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=n}Nr(n,e),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Fr=function(){return Fr=Object.assign||function(e){for(var t,i=1,s=arguments.length;i0&&s[s.length-1])||c[0]!==6&&c[0]!==2)){o=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};var Sl=function(){function n(e){e===void 0&&(e={}),this.load(e||{})}return n.prototype.load=function(e){for(var t=0,i=Object.entries(e);t0&&(!s.exp||s.exp-i>Date.now()/1e3))}(this.token)},enumerable:!1,configurable:!0}),n.prototype.save=function(e,t){this.baseToken=e||"",this.baseModel=t!==null&&typeof t=="object"?t.collectionId!==void 0?new Ki(t):new Ji(t):null,this.triggerChange()},n.prototype.clear=function(){this.baseToken="",this.baseModel=null,this.triggerChange()},n.prototype.loadFromCookie=function(e,t){t===void 0&&(t="pb_auth");var i=function(o,r){var a={};if(typeof o!="string")return a;for(var u=Object.assign({},r||{}).decode||Yb,f=0;f4096&&(a.model={id:(s=a==null?void 0:a.model)===null||s===void 0?void 0:s.id,email:(l=a==null?void 0:a.model)===null||l===void 0?void 0:l.email},this.model instanceof Ki&&(a.model.username=this.model.username,a.model.verified=this.model.verified,a.model.collectionId=this.model.collectionId),u=cu(t,JSON.stringify(a),e)),u},n.prototype.onChange=function(e,t){var i=this;return t===void 0&&(t=!1),this._onChangeCallbacks.push(e),t&&e(this.token,this.model),function(){for(var s=i._onChangeCallbacks.length-1;s>=0;s--)if(i._onChangeCallbacks[s]==e)return delete i._onChangeCallbacks[s],void i._onChangeCallbacks.splice(s,1)}},n.prototype.triggerChange=function(){for(var e=0,t=this._onChangeCallbacks;e0?e:1,this.perPage=t>=0?t:0,this.totalItems=i>=0?i:0,this.totalPages=s>=0?s:0,this.items=l||[]},ha=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return Jt(e,n),e.prototype.getFullList=function(t,i){return t===void 0&&(t=200),i===void 0&&(i={}),this._getFullList(this.baseCrudPath,t,i)},e.prototype.getList=function(t,i,s){return t===void 0&&(t=1),i===void 0&&(i=30),s===void 0&&(s={}),this._getList(this.baseCrudPath,t,i,s)},e.prototype.getFirstListItem=function(t,i){return i===void 0&&(i={}),this._getFirstListItem(this.baseCrudPath,t,i)},e.prototype.getOne=function(t,i){return i===void 0&&(i={}),this._getOne(this.baseCrudPath,t,i)},e.prototype.create=function(t,i){return t===void 0&&(t={}),i===void 0&&(i={}),this._create(this.baseCrudPath,t,i)},e.prototype.update=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),this._update(this.baseCrudPath,t,i,s)},e.prototype.delete=function(t,i){return i===void 0&&(i={}),this._delete(this.baseCrudPath,t,i)},e}(function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return Jt(e,n),e.prototype._getFullList=function(t,i,s){var l=this;i===void 0&&(i=100),s===void 0&&(s={});var o=[],r=function(a){return xt(l,void 0,void 0,function(){return Qt(this,function(u){return[2,this._getList(t,a,i,s).then(function(f){var c=f,d=c.items,m=c.totalItems;return o=o.concat(d),d.length&&m>o.length?r(a+1):o})]})})};return r(1)},e.prototype._getList=function(t,i,s,l){var o=this;return i===void 0&&(i=1),s===void 0&&(s=30),l===void 0&&(l={}),l=Object.assign({page:i,perPage:s},l),this.client.send(t,{method:"GET",params:l}).then(function(r){var a=[];if(r!=null&&r.items){r.items=r.items||[];for(var u=0,f=r.items;u=0;o--)this.subscriptions[t][o]===i&&(l=!0,delete this.subscriptions[t][o],this.subscriptions[t].splice(o,1),(s=this.eventSource)===null||s===void 0||s.removeEventListener(t,i));return l?(this.subscriptions[t].length||delete this.subscriptions[t],this.hasSubscriptionListeners()?[3,1]:(this.disconnect(),[3,3])):[2];case 1:return this.hasSubscriptionListeners(t)?[3,3]:[4,this.submitSubscriptions()];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.hasSubscriptionListeners=function(t){var i,s;if(this.subscriptions=this.subscriptions||{},t)return!!(!((i=this.subscriptions[t])===null||i===void 0)&&i.length);for(var l in this.subscriptions)if(!((s=this.subscriptions[l])===null||s===void 0)&&s.length)return!0;return!1},e.prototype.submitSubscriptions=function(){return xt(this,void 0,void 0,function(){return Qt(this,function(t){return this.clientId?(this.addAllSubscriptionListeners(),this.lastSentTopics=this.getNonEmptySubscriptionTopics(),[2,this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentTopics},params:{$cancelKey:"realtime_"+this.clientId}}).catch(function(i){if(!(i!=null&&i.isAbort))throw i})]):[2]})})},e.prototype.getNonEmptySubscriptionTopics=function(){var t=[];for(var i in this.subscriptions)this.subscriptions[i].length&&t.push(i);return t},e.prototype.addAllSubscriptionListeners=function(){if(this.eventSource)for(var t in this.removeAllSubscriptionListeners(),this.subscriptions)for(var i=0,s=this.subscriptions[t];i0?[2]:[2,new Promise(function(s,l){t.pendingConnects.push({resolve:s,reject:l}),t.pendingConnects.length>1||t.initConnect()})]})})},e.prototype.initConnect=function(){var t=this;this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(function(){t.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildUrl("/api/realtime")),this.eventSource.onerror=function(i){t.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",function(i){var s=i;t.clientId=s==null?void 0:s.lastEventId,t.submitSubscriptions().then(function(){return xt(t,void 0,void 0,function(){var l;return Qt(this,function(o){switch(o.label){case 0:l=3,o.label=1;case 1:return this.hasUnsentSubscriptions()&&l>0?(l--,[4,this.submitSubscriptions()]):[3,3];case 2:return o.sent(),[3,1];case 3:return[2]}})})}).then(function(){for(var l=0,o=t.pendingConnects;lthis.maxReconnectAttempts){for(var s=0,l=this.pendingConnects;s=400)throw new fl({url:k.url,status:k.status,data:T});return[2,T]}})})}).catch(function(k){throw new fl(k)})]})})},n.prototype.getFileUrl=function(e,t,i){i===void 0&&(i={});var s=[];s.push("api"),s.push("files"),s.push(encodeURIComponent(e.collectionId||e.collectionName)),s.push(encodeURIComponent(e.id)),s.push(encodeURIComponent(t));var l=this.buildUrl(s.join("/"));if(Object.keys(i).length){var o=new URLSearchParams(i);l+=(l.includes("?")?"&":"?")+o}return l},n.prototype.buildUrl=function(e){var t=this.baseUrl+(this.baseUrl.endsWith("/")?"":"/");return e&&(t+=e.startsWith("/")?e.substring(1):e),t},n.prototype.serializeQueryParams=function(e){var t=[];for(var i in e)if(e[i]!==null){var s=e[i],l=encodeURIComponent(i);if(Array.isArray(s))for(var o=0,r=s;o"u"}function Ui(n){return typeof n=="number"}function jo(n){return typeof n=="number"&&n%1===0}function a1(n){return typeof n=="string"}function u1(n){return Object.prototype.toString.call(n)==="[object Date]"}function Tg(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function f1(n){return Array.isArray(n)?n:[n]}function pu(n,e,t){if(n.length!==0)return n.reduce((i,s)=>{const l=[e(s),s];return i&&t(i[0],l[0])===i[0]?i:l},null)[1]}function c1(n,e){return e.reduce((t,i)=>(t[i]=n[i],t),{})}function Ss(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function oi(n,e,t){return jo(n)&&n>=e&&n<=t}function d1(n,e){return n-e*Math.floor(n/e)}function Ot(n,e=2){const t=n<0;let i;return t?i="-"+(""+-n).padStart(e,"0"):i=(""+n).padStart(e,"0"),i}function pi(n){if(!(Qe(n)||n===null||n===""))return parseInt(n,10)}function Ii(n){if(!(Qe(n)||n===null||n===""))return parseFloat(n)}function _a(n){if(!(Qe(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function ba(n,e,t=!1){const i=10**e;return(t?Math.trunc:Math.round)(n*i)/i}function Cl(n){return n%4===0&&(n%100!==0||n%400===0)}function Qs(n){return Cl(n)?366:365}function ho(n,e){const t=d1(e-1,12)+1,i=n+(e-t)/12;return t===2?Cl(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function va(n){let e=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function go(n){const e=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7,t=n-1,i=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7;return e===4||i===3?53:52}function Hr(n){return n>99?n:n>60?1900+n:2e3+n}function Cg(n,e,t,i=null){const s=new Date(n),l={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(l.timeZone=i);const o={timeZoneName:e,...l},r=new Intl.DateTimeFormat(t,o).formatToParts(s).find(a=>a.type.toLowerCase()==="timezonename");return r?r.value:null}function Ho(n,e){let t=parseInt(n,10);Number.isNaN(t)&&(t=0);const i=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-i:i;return t*60+s}function $g(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new Mn(`Invalid unit value ${n}`);return e}function _o(n,e){const t={};for(const i in n)if(Ss(n,i)){const s=n[i];if(s==null)continue;t[e(i)]=$g(s)}return t}function el(n,e){const t=Math.trunc(Math.abs(n/60)),i=Math.trunc(Math.abs(n%60)),s=n>=0?"+":"-";switch(e){case"short":return`${s}${Ot(t,2)}:${Ot(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${Ot(t,2)}${Ot(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function qo(n){return c1(n,["hour","minute","second","millisecond"])}const Mg=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,p1=["January","February","March","April","May","June","July","August","September","October","November","December"],Dg=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],m1=["J","F","M","A","M","J","J","A","S","O","N","D"];function Og(n){switch(n){case"narrow":return[...m1];case"short":return[...Dg];case"long":return[...p1];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Eg=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ag=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],h1=["M","T","W","T","F","S","S"];function Ig(n){switch(n){case"narrow":return[...h1];case"short":return[...Ag];case"long":return[...Eg];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Pg=["AM","PM"],g1=["Before Christ","Anno Domini"],_1=["BC","AD"],b1=["B","A"];function Lg(n){switch(n){case"narrow":return[...b1];case"short":return[..._1];case"long":return[...g1];default:return null}}function v1(n){return Pg[n.hour<12?0:1]}function y1(n,e){return Ig(e)[n.weekday-1]}function k1(n,e){return Og(e)[n.month-1]}function w1(n,e){return Lg(e)[n.year<0?0:1]}function S1(n,e,t="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},l=["hours","minutes","seconds"].indexOf(n)===-1;if(t==="auto"&&l){const c=n==="days";switch(e){case 1:return c?"tomorrow":`next ${s[n][0]}`;case-1:return c?"yesterday":`last ${s[n][0]}`;case 0:return c?"today":`this ${s[n][0]}`}}const o=Object.is(e,-0)||e<0,r=Math.abs(e),a=r===1,u=s[n],f=i?a?u[1]:u[2]||u[1]:a?s[n][0]:n;return o?`${r} ${f} ago`:`in ${r} ${f}`}function mu(n,e){let t="";for(const i of n)i.literal?t+=i.val:t+=e(i.val);return t}const T1={D:jr,DD:lg,DDD:og,DDDD:rg,t:ag,tt:ug,ttt:fg,tttt:cg,T:dg,TT:pg,TTT:mg,TTTT:hg,f:gg,ff:bg,fff:yg,ffff:wg,F:_g,FF:vg,FFF:kg,FFFF:Sg};class cn{static create(e,t={}){return new cn(e,t)}static parseFormat(e){let t=null,i="",s=!1;const l=[];for(let o=0;o0&&l.push({literal:s,val:i}),t=null,i="",s=!s):s||r===t?i+=r:(i.length>0&&l.push({literal:!1,val:i}),i=r,t=r)}return i.length>0&&l.push({literal:s,val:i}),l}static macroTokenToFormatOpts(e){return T1[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTime(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTimeParts(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).formatToParts()}resolvedOptions(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return Ot(e,t);const i={...this.opts};return t>0&&(i.padTo=t),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",l=(m,h)=>this.loc.extract(e,m,h),o=m=>e.isOffsetFixed&&e.offset===0&&m.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,m.format):"",r=()=>i?v1(e):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(m,h)=>i?k1(e,m):l(h?{month:m}:{month:m,day:"numeric"},"month"),u=(m,h)=>i?y1(e,m):l(h?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),f=m=>{const h=cn.macroTokenToFormatOpts(m);return h?this.formatWithSystemDefault(e,h):m},c=m=>i?w1(e,m):l({era:m},"era"),d=m=>{switch(m){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return r();case"d":return s?l({day:"numeric"},"day"):this.num(e.day);case"dd":return s?l({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return s?l({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?l({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return s?l({month:"numeric"},"month"):this.num(e.month);case"MM":return s?l({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return s?l({year:"numeric"},"year"):this.num(e.year);case"yy":return s?l({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?l({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?l({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(m)}};return mu(cn.parseFormat(t),d)}formatDurationFromString(e,t){const i=a=>{switch(a[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=a=>u=>{const f=i(u);return f?this.num(a.get(f),u.length):u},l=cn.parseFormat(t),o=l.reduce((a,{literal:u,val:f})=>u?a:a.concat(f),[]),r=e.shiftTo(...o.map(i).filter(a=>a));return mu(l,s(r))}}class Rn{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class $l{get type(){throw new ci}get name(){throw new ci}get ianaName(){return this.name}get isUniversal(){throw new ci}offsetName(e,t){throw new ci}formatOffset(e,t){throw new ci}offset(e){throw new ci}equals(e){throw new ci}get isValid(){throw new ci}}let er=null;class ya extends $l{static get instance(){return er===null&&(er=new ya),er}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return Cg(e,t,i)}formatOffset(e,t){return el(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let uo={};function C1(n){return uo[n]||(uo[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),uo[n]}const $1={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function M1(n,e){const t=n.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,l,o,r,a,u,f]=i;return[o,s,l,r,a,u,f]}function D1(n,e){const t=n.formatToParts(e),i=[];for(let s=0;s=0?h:1e3+h,(d-m)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let tr=null;class en extends $l{static get utcInstance(){return tr===null&&(tr=new en(0)),tr}static instance(e){return e===0?en.utcInstance:new en(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new en(Ho(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${el(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${el(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return el(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class O1 extends $l{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function mi(n,e){if(Qe(n)||n===null)return e;if(n instanceof $l)return n;if(a1(n)){const t=n.toLowerCase();return t==="local"||t==="system"?e:t==="utc"||t==="gmt"?en.utcInstance:en.parseSpecifier(t)||ri.create(n)}else return Ui(n)?en.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new O1(n)}let hu=()=>Date.now(),gu="system",_u=null,bu=null,vu=null,yu;class Nt{static get now(){return hu}static set now(e){hu=e}static set defaultZone(e){gu=e}static get defaultZone(){return mi(gu,ya.instance)}static get defaultLocale(){return _u}static set defaultLocale(e){_u=e}static get defaultNumberingSystem(){return bu}static set defaultNumberingSystem(e){bu=e}static get defaultOutputCalendar(){return vu}static set defaultOutputCalendar(e){vu=e}static get throwOnInvalid(){return yu}static set throwOnInvalid(e){yu=e}static resetCaches(){_t.resetCache(),ri.resetCache()}}let ku={};function E1(n,e={}){const t=JSON.stringify([n,e]);let i=ku[t];return i||(i=new Intl.ListFormat(n,e),ku[t]=i),i}let qr={};function Vr(n,e={}){const t=JSON.stringify([n,e]);let i=qr[t];return i||(i=new Intl.DateTimeFormat(n,e),qr[t]=i),i}let zr={};function A1(n,e={}){const t=JSON.stringify([n,e]);let i=zr[t];return i||(i=new Intl.NumberFormat(n,e),zr[t]=i),i}let Br={};function I1(n,e={}){const{base:t,...i}=e,s=JSON.stringify([n,i]);let l=Br[s];return l||(l=new Intl.RelativeTimeFormat(n,e),Br[s]=l),l}let Gs=null;function P1(){return Gs||(Gs=new Intl.DateTimeFormat().resolvedOptions().locale,Gs)}function L1(n){const e=n.indexOf("-u-");if(e===-1)return[n];{let t;const i=n.substring(0,e);try{t=Vr(n).resolvedOptions()}catch{t=Vr(i).resolvedOptions()}const{numberingSystem:s,calendar:l}=t;return[i,s,l]}}function N1(n,e,t){return(t||e)&&(n+="-u",t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function F1(n){const e=[];for(let t=1;t<=12;t++){const i=Ve.utc(2016,t,1);e.push(n(i))}return e}function R1(n){const e=[];for(let t=1;t<=7;t++){const i=Ve.utc(2016,11,13+t);e.push(n(i))}return e}function ql(n,e,t,i,s){const l=n.listingMode(t);return l==="error"?null:l==="en"?i(e):s(e)}function j1(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||new Intl.DateTimeFormat(n.intl).resolvedOptions().numberingSystem==="latn"}class H1{constructor(e,t,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:l,...o}=i;if(!t||Object.keys(o).length>0){const r={useGrouping:!1,...i};i.padTo>0&&(r.minimumIntegerDigits=i.padTo),this.inf=A1(e,r)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):ba(e,3);return Ot(t,this.padTo)}}}class q1{constructor(e,t,i){this.opts=i;let s;if(e.zone.isUniversal){const o=-1*(e.offset/60),r=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&ri.create(r).valid?(s=r,this.dt=e):(s="UTC",i.timeZoneName?this.dt=e:this.dt=e.offset===0?e:Ve.fromMillis(e.ts+e.offset*60*1e3))}else e.zone.type==="system"?this.dt=e:(this.dt=e,s=e.zone.name);const l={...this.opts};s&&(l.timeZone=s),this.dtf=Vr(t,l)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class V1{constructor(e,t,i){this.opts={style:"long",...i},!t&&Tg()&&(this.rtf=I1(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):S1(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class _t{static fromOpts(e){return _t.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){const l=e||Nt.defaultLocale,o=l||(s?"en-US":P1()),r=t||Nt.defaultNumberingSystem,a=i||Nt.defaultOutputCalendar;return new _t(o,r,a,l)}static resetCache(){Gs=null,qr={},zr={},Br={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return _t.create(e,t,i)}constructor(e,t,i,s){const[l,o,r]=L1(e);this.locale=l,this.numberingSystem=t||o||null,this.outputCalendar=i||r||null,this.intl=N1(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=j1(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:_t.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1,i=!0){return ql(this,e,i,Og,()=>{const s=t?{month:e,day:"numeric"}:{month:e},l=t?"format":"standalone";return this.monthsCache[l][e]||(this.monthsCache[l][e]=F1(o=>this.extract(o,s,"month"))),this.monthsCache[l][e]})}weekdays(e,t=!1,i=!0){return ql(this,e,i,Ig,()=>{const s=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},l=t?"format":"standalone";return this.weekdaysCache[l][e]||(this.weekdaysCache[l][e]=R1(o=>this.extract(o,s,"weekday"))),this.weekdaysCache[l][e]})}meridiems(e=!0){return ql(this,void 0,e,()=>Pg,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ve.utc(2016,11,13,9),Ve.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return ql(this,e,t,Lg,()=>{const i={era:e};return this.eraCache[e]||(this.eraCache[e]=[Ve.utc(-40,1,1),Ve.utc(2017,1,1)].map(s=>this.extract(s,i,"era"))),this.eraCache[e]})}extract(e,t,i){const s=this.dtFormatter(e,t),l=s.formatToParts(),o=l.find(r=>r.type.toLowerCase()===i);return o?o.value:null}numberFormatter(e={}){return new H1(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new q1(e,this.intl,t)}relFormatter(e={}){return new V1(this.intl,this.isEnglish(),e)}listFormatter(e={}){return E1(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}function Es(...n){const e=n.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function As(...n){return e=>n.reduce(([t,i,s],l)=>{const[o,r,a]=l(e,s);return[{...t,...o},r||i,a]},[{},null,1]).slice(0,2)}function Is(n,...e){if(n==null)return[null,null];for(const[t,i]of e){const s=t.exec(n);if(s)return i(s)}return[null,null]}function Ng(...n){return(e,t)=>{const i={};let s;for(s=0;sm!==void 0&&(h||m&&f)?-m:m;return[{years:d(Ii(t)),months:d(Ii(i)),weeks:d(Ii(s)),days:d(Ii(l)),hours:d(Ii(o)),minutes:d(Ii(r)),seconds:d(Ii(a),a==="-0"),milliseconds:d(_a(u),c)}]}const e0={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Sa(n,e,t,i,s,l,o){const r={year:e.length===2?Hr(pi(e)):pi(e),month:Dg.indexOf(t)+1,day:pi(i),hour:pi(s),minute:pi(l)};return o&&(r.second=pi(o)),n&&(r.weekday=n.length>3?Eg.indexOf(n)+1:Ag.indexOf(n)+1),r}const t0=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function n0(n){const[,e,t,i,s,l,o,r,a,u,f,c]=n,d=Sa(e,s,i,t,l,o,r);let m;return a?m=e0[a]:u?m=0:m=Ho(f,c),[d,new en(m)]}function i0(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const s0=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,l0=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,o0=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function wu(n){const[,e,t,i,s,l,o,r]=n;return[Sa(e,s,i,t,l,o,r),en.utcInstance]}function r0(n){const[,e,t,i,s,l,o,r]=n;return[Sa(e,r,t,i,s,l,o),en.utcInstance]}const a0=Es(B1,wa),u0=Es(U1,wa),f0=Es(W1,wa),c0=Es(Rg),Hg=As(G1,Ps,Ml,Dl),d0=As(Y1,Ps,Ml,Dl),p0=As(K1,Ps,Ml,Dl),m0=As(Ps,Ml,Dl);function h0(n){return Is(n,[a0,Hg],[u0,d0],[f0,p0],[c0,m0])}function g0(n){return Is(i0(n),[t0,n0])}function _0(n){return Is(n,[s0,wu],[l0,wu],[o0,r0])}function b0(n){return Is(n,[x1,Q1])}const v0=As(Ps);function y0(n){return Is(n,[X1,v0])}const k0=Es(J1,Z1),w0=Es(jg),S0=As(Ps,Ml,Dl);function T0(n){return Is(n,[k0,Hg],[w0,S0])}const C0="Invalid Duration",qg={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},$0={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...qg},wn=146097/400,fs=146097/4800,M0={years:{quarters:4,months:12,weeks:wn/7,days:wn,hours:wn*24,minutes:wn*24*60,seconds:wn*24*60*60,milliseconds:wn*24*60*60*1e3},quarters:{months:3,weeks:wn/28,days:wn/4,hours:wn*24/4,minutes:wn*24*60/4,seconds:wn*24*60*60/4,milliseconds:wn*24*60*60*1e3/4},months:{weeks:fs/7,days:fs,hours:fs*24,minutes:fs*24*60,seconds:fs*24*60*60,milliseconds:fs*24*60*60*1e3},...qg},ji=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],D0=ji.slice(0).reverse();function Pi(n,e,t=!1){const i={values:t?e.values:{...n.values,...e.values||{}},loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy};return new st(i)}function O0(n){return n<0?Math.floor(n):Math.ceil(n)}function Vg(n,e,t,i,s){const l=n[s][t],o=e[t]/l,r=Math.sign(o)===Math.sign(i[s]),a=!r&&i[s]!==0&&Math.abs(o)<=1?O0(o):Math.trunc(o);i[s]+=a,e[t]-=a*l}function E0(n,e){D0.reduce((t,i)=>Qe(e[i])?t:(t&&Vg(n,e,t,e,i),i),null)}class st{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;this.values=e.values,this.loc=e.loc||_t.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?M0:$0,this.isLuxonDuration=!0}static fromMillis(e,t){return st.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new Mn(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new st({values:_o(e,st.normalizeUnit),loc:_t.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(Ui(e))return st.fromMillis(e);if(st.isDuration(e))return e;if(typeof e=="object")return st.fromObject(e);throw new Mn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=b0(e);return i?st.fromObject(i,t):st.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=y0(e);return i?st.fromObject(i,t):st.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Mn("need to specify a reason the Duration is invalid");const i=e instanceof Rn?e:new Rn(e,t);if(Nt.throwOnInvalid)throw new l1(i);return new st({invalid:i})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new sg(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const i={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?cn.create(this.loc,i).formatDurationFromString(this,e):C0}toHuman(e={}){const t=ji.map(i=>{const s=this.values[i];return Qe(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=ba(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let s=e.format==="basic"?"hhmm":"hh:mm";(!e.suppressSeconds||i.seconds!==0||i.milliseconds!==0)&&(s+=e.format==="basic"?"ss":":ss",(!e.suppressMilliseconds||i.milliseconds!==0)&&(s+=".SSS"));let l=i.toFormat(s);return e.includePrefix&&(l="T"+l),l}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=st.fromDurationLike(e),i={};for(const s of ji)(Ss(t.values,s)||Ss(this.values,s))&&(i[s]=t.get(s)+this.get(s));return Pi(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=st.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const i of Object.keys(this.values))t[i]=$g(e(this.values[i],i));return Pi(this,{values:t},!0)}get(e){return this[st.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,..._o(e,st.normalizeUnit)};return Pi(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t}),l={loc:s};return i&&(l.conversionAccuracy=i),Pi(this,l)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return E0(this.matrix,e),Pi(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>st.normalizeUnit(o));const t={},i={},s=this.toObject();let l;for(const o of ji)if(e.indexOf(o)>=0){l=o;let r=0;for(const u in i)r+=this.matrix[u][o]*i[u],i[u]=0;Ui(s[o])&&(r+=s[o]);const a=Math.trunc(r);t[o]=a,i[o]=(r*1e3-a*1e3)/1e3;for(const u in s)ji.indexOf(u)>ji.indexOf(o)&&Vg(this.matrix,s,u,t,o)}else Ui(s[o])&&(i[o]=s[o]);for(const o in i)i[o]!==0&&(t[l]+=o===l?i[o]:i[o]/this.matrix[l][o]);return Pi(this,{values:t},!0).normalize()}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Pi(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of ji)if(!t(this.values[i],e.values[i]))return!1;return!0}}const js="Invalid Interval";function A0(n,e){return!n||!n.isValid?vt.invalid("missing or invalid start"):!e||!e.isValid?vt.invalid("missing or invalid end"):ee:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?vt.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Vs).filter(o=>this.contains(o)).sort(),i=[];let{s}=this,l=0;for(;s+this.e?this.e:o;i.push(vt.fromDateTimes(s,r)),s=r,l+=1}return i}splitBy(e){const t=st.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:i}=this,s=1,l;const o=[];for(;ia*s));l=+r>+this.e?this.e:r,o.push(vt.fromDateTimes(i,l)),i=l,s+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,i=this.e=i?null:vt.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return vt.fromDateTimes(t,i)}static merge(e){const[t,i]=e.sort((s,l)=>s.s-l.s).reduce(([s,l],o)=>l?l.overlaps(o)||l.abutsStart(o)?[s,l.union(o)]:[s.concat([l]),o]:[s,o],[[],null]);return i&&t.push(i),t}static xor(e){let t=null,i=0;const s=[],l=e.map(a=>[{time:a.s,type:"s"},{time:a.e,type:"e"}]),o=Array.prototype.concat(...l),r=o.sort((a,u)=>a.time-u.time);for(const a of r)i+=a.type==="s"?1:-1,i===1?t=a.time:(t&&+t!=+a.time&&s.push(vt.fromDateTimes(t,a.time)),t=null);return vt.merge(s)}difference(...e){return vt.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:js}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:js}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:js}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:js}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:js}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):st.invalid(this.invalidReason)}mapEndpoints(e){return vt.fromDateTimes(e(this.s),e(this.e))}}class Vl{static hasDST(e=Nt.defaultZone){const t=Ve.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return ri.isValidZone(e)}static normalizeZone(e){return mi(e,Nt.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||_t.create(t,i,l)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||_t.create(t,i,l)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||_t.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||_t.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return _t.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return _t.create(t,null,"gregory").eras(e)}static features(){return{relative:Tg()}}}function Su(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(n);return Math.floor(st.fromMillis(i).as("days"))}function I0(n,e,t){const i=[["years",(r,a)=>a.year-r.year],["quarters",(r,a)=>a.quarter-r.quarter],["months",(r,a)=>a.month-r.month+(a.year-r.year)*12],["weeks",(r,a)=>{const u=Su(r,a);return(u-u%7)/7}],["days",Su]],s={};let l,o;for(const[r,a]of i)if(t.indexOf(r)>=0){l=r;let u=a(n,e);o=n.plus({[r]:u}),o>e?(n=n.plus({[r]:u-1}),u-=1):n=o,s[r]=u}return[n,s,o,l]}function P0(n,e,t,i){let[s,l,o,r]=I0(n,e,t);const a=e-s,u=t.filter(c=>["hours","minutes","seconds","milliseconds"].indexOf(c)>=0);u.length===0&&(o0?st.fromMillis(a,i).shiftTo(...u).plus(f):f}const Ta={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Tu={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},L0=Ta.hanidec.replace(/[\[|\]]/g,"").split("");function N0(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t=l&&i<=o&&(e+=i-l)}}return parseInt(e,10)}else return e}function Ln({numberingSystem:n},e=""){return new RegExp(`${Ta[n||"latn"]}${e}`)}const F0="missing Intl.DateTimeFormat.formatToParts support";function rt(n,e=t=>t){return{regex:n,deser:([t])=>e(N0(t))}}const R0=String.fromCharCode(160),zg=`[ ${R0}]`,Bg=new RegExp(zg,"g");function j0(n){return n.replace(/\./g,"\\.?").replace(Bg,zg)}function Cu(n){return n.replace(/\./g,"").replace(Bg," ").toLowerCase()}function Nn(n,e){return n===null?null:{regex:RegExp(n.map(j0).join("|")),deser:([t])=>n.findIndex(i=>Cu(t)===Cu(i))+e}}function $u(n,e){return{regex:n,deser:([,t,i])=>Ho(t,i),groups:e}}function nr(n){return{regex:n,deser:([e])=>e}}function H0(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function q0(n,e){const t=Ln(e),i=Ln(e,"{2}"),s=Ln(e,"{3}"),l=Ln(e,"{4}"),o=Ln(e,"{6}"),r=Ln(e,"{1,2}"),a=Ln(e,"{1,3}"),u=Ln(e,"{1,6}"),f=Ln(e,"{1,9}"),c=Ln(e,"{2,4}"),d=Ln(e,"{4,6}"),m=b=>({regex:RegExp(H0(b.val)),deser:([y])=>y,literal:!0}),g=(b=>{if(n.literal)return m(b);switch(b.val){case"G":return Nn(e.eras("short",!1),0);case"GG":return Nn(e.eras("long",!1),0);case"y":return rt(u);case"yy":return rt(c,Hr);case"yyyy":return rt(l);case"yyyyy":return rt(d);case"yyyyyy":return rt(o);case"M":return rt(r);case"MM":return rt(i);case"MMM":return Nn(e.months("short",!0,!1),1);case"MMMM":return Nn(e.months("long",!0,!1),1);case"L":return rt(r);case"LL":return rt(i);case"LLL":return Nn(e.months("short",!1,!1),1);case"LLLL":return Nn(e.months("long",!1,!1),1);case"d":return rt(r);case"dd":return rt(i);case"o":return rt(a);case"ooo":return rt(s);case"HH":return rt(i);case"H":return rt(r);case"hh":return rt(i);case"h":return rt(r);case"mm":return rt(i);case"m":return rt(r);case"q":return rt(r);case"qq":return rt(i);case"s":return rt(r);case"ss":return rt(i);case"S":return rt(a);case"SSS":return rt(s);case"u":return nr(f);case"uu":return nr(r);case"uuu":return rt(t);case"a":return Nn(e.meridiems(),0);case"kkkk":return rt(l);case"kk":return rt(c,Hr);case"W":return rt(r);case"WW":return rt(i);case"E":case"c":return rt(t);case"EEE":return Nn(e.weekdays("short",!1,!1),1);case"EEEE":return Nn(e.weekdays("long",!1,!1),1);case"ccc":return Nn(e.weekdays("short",!0,!1),1);case"cccc":return Nn(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return $u(new RegExp(`([+-]${r.source})(?::(${i.source}))?`),2);case"ZZZ":return $u(new RegExp(`([+-]${r.source})(${i.source})?`),2);case"z":return nr(/[a-z_+-/]{1,256}?/i);default:return m(b)}})(n)||{invalidReason:F0};return g.token=n,g}const V0={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function z0(n,e,t){const{type:i,value:s}=n;if(i==="literal")return{literal:!0,val:s};const l=t[i];let o=V0[i];if(typeof o=="object"&&(o=o[l]),o)return{literal:!1,val:o}}function B0(n){return[`^${n.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,n]}function U0(n,e,t){const i=n.match(e);if(i){const s={};let l=1;for(const o in t)if(Ss(t,o)){const r=t[o],a=r.groups?r.groups+1:1;!r.literal&&r.token&&(s[r.token.val[0]]=r.deser(i.slice(l,l+a))),l+=a}return[i,s]}else return[i,{}]}function W0(n){const e=l=>{switch(l){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let t=null,i;return Qe(n.z)||(t=ri.create(n.z)),Qe(n.Z)||(t||(t=new en(n.Z)),i=n.Z),Qe(n.q)||(n.M=(n.q-1)*3+1),Qe(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),Qe(n.u)||(n.S=_a(n.u)),[Object.keys(n).reduce((l,o)=>{const r=e(o);return r&&(l[r]=n[o]),l},{}),t,i]}let ir=null;function Y0(){return ir||(ir=Ve.fromMillis(1555555555555)),ir}function K0(n,e){if(n.literal)return n;const t=cn.macroTokenToFormatOpts(n.val);if(!t)return n;const l=cn.create(e,t).formatDateTimeParts(Y0()).map(o=>z0(o,e,t));return l.includes(void 0)?n:l}function J0(n,e){return Array.prototype.concat(...n.map(t=>K0(t,e)))}function Ug(n,e,t){const i=J0(cn.parseFormat(t),n),s=i.map(o=>q0(o,n)),l=s.find(o=>o.invalidReason);if(l)return{input:e,tokens:i,invalidReason:l.invalidReason};{const[o,r]=B0(s),a=RegExp(o,"i"),[u,f]=U0(e,a,r),[c,d,m]=f?W0(f):[null,null,void 0];if(Ss(f,"a")&&Ss(f,"H"))throw new Zs("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:a,rawMatches:u,matches:f,result:c,zone:d,specificOffset:m}}}function Z0(n,e,t){const{result:i,zone:s,specificOffset:l,invalidReason:o}=Ug(n,e,t);return[i,s,l,o]}const Wg=[0,31,59,90,120,151,181,212,243,273,304,334],Yg=[0,31,60,91,121,152,182,213,244,274,305,335];function On(n,e){return new Rn("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function Kg(n,e,t){const i=new Date(Date.UTC(n,e-1,t));n<100&&n>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function Jg(n,e,t){return t+(Cl(n)?Yg:Wg)[e-1]}function Zg(n,e){const t=Cl(n)?Yg:Wg,i=t.findIndex(l=>lgo(e)?(r=e+1,o=1):r=e,{weekYear:r,weekNumber:o,weekday:l,...qo(n)}}function Mu(n){const{weekYear:e,weekNumber:t,weekday:i}=n,s=Kg(e,1,4),l=Qs(e);let o=t*7+i-s-3,r;o<1?(r=e-1,o+=Qs(r)):o>l?(r=e+1,o-=Qs(e)):r=e;const{month:a,day:u}=Zg(r,o);return{year:r,month:a,day:u,...qo(n)}}function sr(n){const{year:e,month:t,day:i}=n,s=Jg(e,t,i);return{year:e,ordinal:s,...qo(n)}}function Du(n){const{year:e,ordinal:t}=n,{month:i,day:s}=Zg(e,t);return{year:e,month:i,day:s,...qo(n)}}function G0(n){const e=jo(n.weekYear),t=oi(n.weekNumber,1,go(n.weekYear)),i=oi(n.weekday,1,7);return e?t?i?!1:On("weekday",n.weekday):On("week",n.week):On("weekYear",n.weekYear)}function X0(n){const e=jo(n.year),t=oi(n.ordinal,1,Qs(n.year));return e?t?!1:On("ordinal",n.ordinal):On("year",n.year)}function Gg(n){const e=jo(n.year),t=oi(n.month,1,12),i=oi(n.day,1,ho(n.year,n.month));return e?t?i?!1:On("day",n.day):On("month",n.month):On("year",n.year)}function Xg(n){const{hour:e,minute:t,second:i,millisecond:s}=n,l=oi(e,0,23)||e===24&&t===0&&i===0&&s===0,o=oi(t,0,59),r=oi(i,0,59),a=oi(s,0,999);return l?o?r?a?!1:On("millisecond",s):On("second",i):On("minute",t):On("hour",e)}const lr="Invalid DateTime",Ou=864e13;function zl(n){return new Rn("unsupported zone",`the zone "${n.name}" is not supported`)}function or(n){return n.weekData===null&&(n.weekData=Ur(n.c)),n.weekData}function Hs(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new Ve({...t,...e,old:t})}function xg(n,e,t){let i=n-e*60*1e3;const s=t.offset(i);if(e===s)return[i,e];i-=(s-e)*60*1e3;const l=t.offset(i);return s===l?[i,s]:[n-Math.min(s,l)*60*1e3,Math.max(s,l)]}function Eu(n,e){n+=e*60*1e3;const t=new Date(n);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function fo(n,e,t){return xg(va(n),e,t)}function Au(n,e){const t=n.o,i=n.c.year+Math.trunc(e.years),s=n.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,l={...n.c,year:i,month:s,day:Math.min(n.c.day,ho(i,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=st.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),r=va(l);let[a,u]=xg(r,t,n.zone);return o!==0&&(a+=o,u=n.zone.offset(a)),{ts:a,o:u}}function qs(n,e,t,i,s,l){const{setZone:o,zone:r}=t;if(n&&Object.keys(n).length!==0){const a=e||r,u=Ve.fromObject(n,{...t,zone:a,specificOffset:l});return o?u:u.setZone(r)}else return Ve.invalid(new Rn("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Bl(n,e,t=!0){return n.isValid?cn.create(_t.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function rr(n,e){const t=n.c.year>9999||n.c.year<0;let i="";return t&&n.c.year>=0&&(i+="+"),i+=Ot(n.c.year,t?6:4),e?(i+="-",i+=Ot(n.c.month),i+="-",i+=Ot(n.c.day)):(i+=Ot(n.c.month),i+=Ot(n.c.day)),i}function Iu(n,e,t,i,s,l){let o=Ot(n.c.hour);return e?(o+=":",o+=Ot(n.c.minute),(n.c.second!==0||!t)&&(o+=":")):o+=Ot(n.c.minute),(n.c.second!==0||!t)&&(o+=Ot(n.c.second),(n.c.millisecond!==0||!i)&&(o+=".",o+=Ot(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!l?o+="Z":n.o<0?(o+="-",o+=Ot(Math.trunc(-n.o/60)),o+=":",o+=Ot(Math.trunc(-n.o%60))):(o+="+",o+=Ot(Math.trunc(n.o/60)),o+=":",o+=Ot(Math.trunc(n.o%60)))),l&&(o+="["+n.zone.ianaName+"]"),o}const Qg={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},x0={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Q0={ordinal:1,hour:0,minute:0,second:0,millisecond:0},e_=["year","month","day","hour","minute","second","millisecond"],ev=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],tv=["year","ordinal","hour","minute","second","millisecond"];function Pu(n){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[n.toLowerCase()];if(!e)throw new sg(n);return e}function Lu(n,e){const t=mi(e.zone,Nt.defaultZone),i=_t.fromObject(e),s=Nt.now();let l,o;if(Qe(n.year))l=s;else{for(const u of e_)Qe(n[u])&&(n[u]=Qg[u]);const r=Gg(n)||Xg(n);if(r)return Ve.invalid(r);const a=t.offset(s);[l,o]=fo(n,a,t)}return new Ve({ts:l,zone:t,loc:i,o})}function Nu(n,e,t){const i=Qe(t.round)?!0:t.round,s=(o,r)=>(o=ba(o,i||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(o,r)),l=o=>t.calendary?e.hasSame(n,o)?0:e.startOf(o).diff(n.startOf(o),o).get(o):e.diff(n,o).get(o);if(t.unit)return s(l(t.unit),t.unit);for(const o of t.units){const r=l(o);if(Math.abs(r)>=1)return s(r,o)}return s(n>e?-0:0,t.units[t.units.length-1])}function Fu(n){let e={},t;return n.length>0&&typeof n[n.length-1]=="object"?(e=n[n.length-1],t=Array.from(n).slice(0,n.length-1)):t=Array.from(n),[e,t]}class Ve{constructor(e){const t=e.zone||Nt.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new Rn("invalid input"):null)||(t.isValid?null:zl(t));this.ts=Qe(e.ts)?Nt.now():e.ts;let s=null,l=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,l]=[e.old.c,e.old.o];else{const r=t.offset(this.ts);s=Eu(this.ts,r),i=Number.isNaN(s.year)?new Rn("invalid input"):null,s=i?null:s,l=i?null:r}this._zone=t,this.loc=e.loc||_t.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=l,this.isLuxonDateTime=!0}static now(){return new Ve({})}static local(){const[e,t]=Fu(arguments),[i,s,l,o,r,a,u]=t;return Lu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static utc(){const[e,t]=Fu(arguments),[i,s,l,o,r,a,u]=t;return e.zone=en.utcInstance,Lu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const i=u1(e)?e.valueOf():NaN;if(Number.isNaN(i))return Ve.invalid("invalid input");const s=mi(t.zone,Nt.defaultZone);return s.isValid?new Ve({ts:i,zone:s,loc:_t.fromObject(t)}):Ve.invalid(zl(s))}static fromMillis(e,t={}){if(Ui(e))return e<-Ou||e>Ou?Ve.invalid("Timestamp out of range"):new Ve({ts:e,zone:mi(t.zone,Nt.defaultZone),loc:_t.fromObject(t)});throw new Mn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(Ui(e))return new Ve({ts:e*1e3,zone:mi(t.zone,Nt.defaultZone),loc:_t.fromObject(t)});throw new Mn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=mi(t.zone,Nt.defaultZone);if(!i.isValid)return Ve.invalid(zl(i));const s=Nt.now(),l=Qe(t.specificOffset)?i.offset(s):t.specificOffset,o=_o(e,Pu),r=!Qe(o.ordinal),a=!Qe(o.year),u=!Qe(o.month)||!Qe(o.day),f=a||u,c=o.weekYear||o.weekNumber,d=_t.fromObject(t);if((f||r)&&c)throw new Zs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&r)throw new Zs("Can't mix ordinal dates with month/day");const m=c||o.weekday&&!f;let h,g,b=Eu(s,l);m?(h=ev,g=x0,b=Ur(b)):r?(h=tv,g=Q0,b=sr(b)):(h=e_,g=Qg);let y=!1;for(const E of h){const I=o[E];Qe(I)?y?o[E]=g[E]:o[E]=b[E]:y=!0}const k=m?G0(o):r?X0(o):Gg(o),T=k||Xg(o);if(T)return Ve.invalid(T);const C=m?Mu(o):r?Du(o):o,[M,$]=fo(C,l,i),O=new Ve({ts:M,zone:i,o:$,loc:d});return o.weekday&&f&&e.weekday!==O.weekday?Ve.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${O.toISO()}`):O}static fromISO(e,t={}){const[i,s]=h0(e);return qs(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,s]=g0(e);return qs(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,s]=_0(e);return qs(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(Qe(e)||Qe(t))throw new Mn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:l=null}=i,o=_t.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),[r,a,u,f]=Z0(o,e,t);return f?Ve.invalid(f):qs(r,a,i,`format ${t}`,e,u)}static fromString(e,t,i={}){return Ve.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,s]=T0(e);return qs(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new Mn("need to specify a reason the DateTime is invalid");const i=e instanceof Rn?e:new Rn(e,t);if(Nt.throwOnInvalid)throw new i1(i);return new Ve({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?or(this).weekYear:NaN}get weekNumber(){return this.isValid?or(this).weekNumber:NaN}get weekday(){return this.isValid?or(this).weekday:NaN}get ordinal(){return this.isValid?sr(this.c).ordinal:NaN}get monthShort(){return this.isValid?Vl.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Vl.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Vl.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Vl.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return Cl(this.year)}get daysInMonth(){return ho(this.year,this.month)}get daysInYear(){return this.isValid?Qs(this.year):NaN}get weeksInWeekYear(){return this.isValid?go(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:s}=cn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(en.instance(e),t)}toLocal(){return this.setZone(Nt.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=mi(e,Nt.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||i){const l=e.offset(this.ts),o=this.toObject();[s]=fo(o,l,e)}return Hs(this,{ts:s,zone:e})}else return Ve.invalid(zl(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return Hs(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=_o(e,Pu),i=!Qe(t.weekYear)||!Qe(t.weekNumber)||!Qe(t.weekday),s=!Qe(t.ordinal),l=!Qe(t.year),o=!Qe(t.month)||!Qe(t.day),r=l||o,a=t.weekYear||t.weekNumber;if((r||s)&&a)throw new Zs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new Zs("Can't mix ordinal dates with month/day");let u;i?u=Mu({...Ur(this.c),...t}):Qe(t.ordinal)?(u={...this.toObject(),...t},Qe(t.day)&&(u.day=Math.min(ho(u.year,u.month),u.day))):u=Du({...sr(this.c),...t});const[f,c]=fo(u,this.o,this.zone);return Hs(this,{ts:f,o:c})}plus(e){if(!this.isValid)return this;const t=st.fromDurationLike(e);return Hs(this,Au(this,t))}minus(e){if(!this.isValid)return this;const t=st.fromDurationLike(e).negate();return Hs(this,Au(this,t))}startOf(e){if(!this.isValid)return this;const t={},i=st.normalizeUnit(e);switch(i){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0;break}if(i==="weeks"&&(t.weekday=1),i==="quarters"){const s=Math.ceil(this.month/3);t.month=(s-1)*3+1}return this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?cn.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):lr}toLocaleString(e=jr,t={}){return this.isValid?cn.create(this.loc.clone(t),e).formatDateTime(this):lr}toLocaleParts(e={}){return this.isValid?cn.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:l=!1}={}){if(!this.isValid)return null;const o=e==="extended";let r=rr(this,o);return r+="T",r+=Iu(this,o,t,i,s,l),r}toISODate({format:e="extended"}={}){return this.isValid?rr(this,e==="extended"):null}toISOWeekDate(){return Bl(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:l=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+Iu(this,o==="extended",t,e,i,l):null}toRFC2822(){return Bl(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Bl(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?rr(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(i&&(s+=" "),t?s+="z":e&&(s+="ZZ")),Bl(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():lr}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",i={}){if(!this.isValid||!e.isValid)return st.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=f1(t).map(st.normalizeUnit),o=e.valueOf()>this.valueOf(),r=o?this:e,a=o?e:this,u=P0(r,a,l,s);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(Ve.now(),e,t)}until(e){return this.isValid?vt.fromDateTimes(this,e):this}hasSame(e,t){if(!this.isValid)return!1;const i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t)<=i&&i<=s.endOf(t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||Ve.fromObject({},{zone:this.zone}),i=e.padding?thist.valueOf(),Math.min)}static max(...e){if(!e.every(Ve.isDateTime))throw new Mn("max requires all arguments be DateTimes");return pu(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:s=null,numberingSystem:l=null}=i,o=_t.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0});return Ug(o,e,t)}static fromStringExplain(e,t,i={}){return Ve.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return jr}static get DATE_MED(){return lg}static get DATE_MED_WITH_WEEKDAY(){return o1}static get DATE_FULL(){return og}static get DATE_HUGE(){return rg}static get TIME_SIMPLE(){return ag}static get TIME_WITH_SECONDS(){return ug}static get TIME_WITH_SHORT_OFFSET(){return fg}static get TIME_WITH_LONG_OFFSET(){return cg}static get TIME_24_SIMPLE(){return dg}static get TIME_24_WITH_SECONDS(){return pg}static get TIME_24_WITH_SHORT_OFFSET(){return mg}static get TIME_24_WITH_LONG_OFFSET(){return hg}static get DATETIME_SHORT(){return gg}static get DATETIME_SHORT_WITH_SECONDS(){return _g}static get DATETIME_MED(){return bg}static get DATETIME_MED_WITH_SECONDS(){return vg}static get DATETIME_MED_WITH_WEEKDAY(){return r1}static get DATETIME_FULL(){return yg}static get DATETIME_FULL_WITH_SECONDS(){return kg}static get DATETIME_HUGE(){return wg}static get DATETIME_HUGE_WITH_SECONDS(){return Sg}}function Vs(n){if(Ve.isDateTime(n))return n;if(n&&n.valueOf&&Ui(n.valueOf()))return Ve.fromJSDate(n);if(n&&typeof n=="object")return Ve.fromObject(n);throw new Mn(`Unknown datetime argument: ${n}, of type ${typeof n}`)}const nv=[".jpg",".jpeg",".png",".svg",".gif",".jfif",".webp",".avif"],iv=[".mp4",".avi",".mov",".3gp",".wmv"],sv=[".aa",".aac",".m4v",".mp3",".ogg",".oga",".mogg",".amr"],lv=[".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odp",".odt",".ods",".txt"];class B{static isObject(e){return e!==null&&typeof e=="object"&&e.constructor===Object}static isEmpty(e){return e===""||e===null||e==="00000000-0000-0000-0000-000000000000"||e==="0001-01-01 00:00:00.000Z"||e==="0001-01-01"||typeof e>"u"||Array.isArray(e)&&e.length===0||B.isObject(e)&&Object.keys(e).length===0}static isInput(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return t==="input"||t==="select"||t==="textarea"||e.isContentEditable}static isFocusable(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return B.isInput(e)||t==="button"||t==="a"||t==="details"||e.tabIndex>=0}static hasNonEmptyProps(e){for(let t in e)if(!B.isEmpty(e[t]))return!0;return!1}static toArray(e,t=!1){return Array.isArray(e)?e.slice():(t||!B.isEmpty(e))&&typeof e<"u"?[e]:[]}static inArray(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t)return!0;return!1}static removeByValue(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t){e.splice(i,1);break}}static pushUnique(e,t){B.inArray(e,t)||e.push(t)}static findByKey(e,t,i){e=Array.isArray(e)?e:[];for(let s in e)if(e[s][t]==i)return e[s];return null}static groupByKey(e,t){e=Array.isArray(e)?e:[];const i={};for(let s in e)i[e[s][t]]=i[e[s][t]]||[],i[e[s][t]].push(e[s]);return i}static removeByKey(e,t,i){for(let s in e)if(e[s][t]==i){e.splice(s,1);break}}static pushOrReplaceByKey(e,t,i="id"){for(let s=e.length-1;s>=0;s--)if(e[s][i]==t[i]){e[s]=t;return}e.push(t)}static filterDuplicatesByKey(e,t="id"){e=Array.isArray(e)?e:[];const i={};for(const s of e)i[s[t]]=s;return Object.values(i)}static filterRedactedProps(e,t="******"){const i=JSON.parse(JSON.stringify(e||{}));for(let s in i)typeof i[s]=="object"&&i[s]!==null?i[s]=B.filterRedactedProps(i[s],t):i[s]===t&&delete i[s];return i}static getNestedVal(e,t,i=null,s="."){let l=e||{},o=(t||"").split(s);for(const r of o){if(!B.isObject(l)&&!Array.isArray(l)||typeof l[r]>"u")return i;l=l[r]}return l}static setByPath(e,t,i,s="."){if(e===null||typeof e!="object"){console.warn("setByPath: data not an object or array.");return}let l=e,o=t.split(s),r=o.pop();for(const a of o)(!B.isObject(l)&&!Array.isArray(l)||!B.isObject(l[a])&&!Array.isArray(l[a]))&&(l[a]={}),l=l[a];l[r]=i}static deleteByPath(e,t,i="."){let s=e||{},l=(t||"").split(i),o=l.pop();for(const r of l)(!B.isObject(s)&&!Array.isArray(s)||!B.isObject(s[r])&&!Array.isArray(s[r]))&&(s[r]={}),s=s[r];Array.isArray(s)?s.splice(o,1):B.isObject(s)&&delete s[o],l.length>0&&(Array.isArray(s)&&!s.length||B.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||B.isObject(e)&&Object.keys(e).length>0)&&B.deleteByPath(e,l.join(i),i)}static randomString(e){e=e||10;let t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s{console.warn("Failed to copy.",i)})}static downloadJson(e,t){const i="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e,null,2)),s=document.createElement("a");s.setAttribute("href",i),s.setAttribute("download",t+".json"),s.click(),s.remove()}static getJWTPayload(e){const t=(e||"").split(".")[1]||"";if(t==="")return{};try{const i=decodeURIComponent(atob(t));return JSON.parse(i)||{}}catch(i){console.warn("Failed to parse JWT payload data.",i)}return{}}static hasImageExtension(e){return!!nv.find(t=>e.toLowerCase().endsWith(t))}static hasVideoExtension(e){return!!iv.find(t=>e.toLowerCase().endsWith(t))}static hasAudioExtension(e){return!!sv.find(t=>e.toLowerCase().endsWith(t))}static hasDocumentExtension(e){return!!lv.find(t=>e.toLowerCase().endsWith(t))}static getFileType(e){return B.hasImageExtension(e)?"image":B.hasDocumentExtension(e)?"document":B.hasVideoExtension(e)?"video":B.hasAudioExtension(e)?"audio":"file"}static generateThumb(e,t=100,i=100){return new Promise(s=>{let l=new FileReader;l.onload=function(o){let r=new Image;r.onload=function(){let a=document.createElement("canvas"),u=a.getContext("2d"),f=r.width,c=r.height;return a.width=t,a.height=i,u.drawImage(r,f>c?(f-c)/2:0,0,f>c?c:f,f>c?c:f,0,0,t,i),s(a.toDataURL(e.type))},r.src=o.target.result},l.readAsDataURL(e)})}static addValueToFormData(e,t,i){if(!(typeof i>"u"))if(B.isEmpty(i))e.append(t,"");else if(Array.isArray(i))for(const s of i)B.addValueToFormData(e,t,s);else i instanceof File?e.append(t,i):i instanceof Date?e.append(t,i.toISOString()):B.isObject(i)?e.append(t,JSON.stringify(i)):e.append(t,""+i)}static dummyCollectionRecord(e){var s,l,o,r,a;const t=(e==null?void 0:e.schema)||[],i={id:"RECORD_ID",collectionId:e==null?void 0:e.id,collectionName:e==null?void 0:e.name,created:"2022-01-01 01:00:00.123Z",updated:"2022-01-01 23:59:59.456Z"};e!=null&&e.isAuth&&(i.username="username123",i.verified=!1,i.emailVisibility=!0,i.email="test@example.com");for(const u of t){let f=null;u.type==="number"?f=123:u.type==="date"?f="2022-01-01 10:00:00.123Z":u.type==="bool"?f=!0:u.type==="email"?f="test@example.com":u.type==="url"?f="https://example.com":u.type==="json"?f="JSON":u.type==="file"?(f="filename.jpg",((s=u.options)==null?void 0:s.maxSelect)!==1&&(f=[f])):u.type==="select"?(f=(o=(l=u.options)==null?void 0:l.values)==null?void 0:o[0],((r=u.options)==null?void 0:r.maxSelect)!==1&&(f=[f])):u.type==="relation"?(f="RELATION_RECORD_ID",((a=u.options)==null?void 0:a.maxSelect)!==1&&(f=[f])):f="test",i[u.name]=f}return i}static dummyCollectionSchemaData(e){var s,l,o,r;const t=(e==null?void 0:e.schema)||[],i={};for(const a of t){let u=null;if(a.type==="number")u=123;else if(a.type==="date")u="2022-01-01 10:00:00.123Z";else if(a.type==="bool")u=!0;else if(a.type==="email")u="test@example.com";else if(a.type==="url")u="https://example.com";else if(a.type==="json")u="JSON";else{if(a.type==="file")continue;a.type==="select"?(u=(l=(s=a.options)==null?void 0:s.values)==null?void 0:l[0],((o=a.options)==null?void 0:o.maxSelect)!==1&&(u=[u])):a.type==="relation"?(u="RELATION_RECORD_ID",((r=a.options)==null?void 0:r.maxSelect)!==1&&(u=[u])):u="test"}i[a.name]=u}return i}static getCollectionTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"auth":return"ri-group-line";case"single":return"ri-file-list-2-line";default:return"ri-folder-2-line"}}static getFieldTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"primary":return"ri-key-line";case"text":return"ri-text";case"number":return"ri-hashtag";case"date":return"ri-calendar-line";case"bool":return"ri-toggle-line";case"email":return"ri-mail-line";case"url":return"ri-link";case"editor":return"ri-edit-2-line";case"select":return"ri-list-check";case"json":return"ri-braces-line";case"file":return"ri-image-line";case"relation":return"ri-mind-map";case"user":return"ri-user-line";default:return"ri-star-s-line"}}static getFieldValueType(e){var t;switch(e==null?void 0:e.type){case"bool":return"Boolean";case"number":return"Number";case"file":return"File";case"select":case"relation":return((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)===1?"String":"Array";default:return"String"}}static zeroDefaultStr(e){var t;return(e==null?void 0:e.type)==="number"?"0":(e==null?void 0:e.type)==="bool"?"false":(e==null?void 0:e.type)==="json"?'null, "", [], {}':["select","relation","file"].includes(e==null?void 0:e.type)&&((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)!=1?"[]":'""'}static getApiExampleUrl(e){return(window.location.href.substring(0,window.location.href.indexOf("/_"))||e||"/").replace("//localhost","//127.0.0.1")}static hasCollectionChanges(e,t,i=!1){if(e=e||{},t=t||{},e.id!=t.id)return!0;for(let u in e)if(u!=="schema"&&JSON.stringify(e[u])!==JSON.stringify(t[u]))return!0;const s=Array.isArray(e.schema)?e.schema:[],l=Array.isArray(t.schema)?t.schema:[],o=s.filter(u=>(u==null?void 0:u.id)&&!B.findByKey(l,"id",u.id)),r=l.filter(u=>(u==null?void 0:u.id)&&!B.findByKey(s,"id",u.id)),a=l.filter(u=>{const f=B.isObject(u)&&B.findByKey(s,"id",u.id);if(!f)return!1;for(let c in f)if(JSON.stringify(u[c])!=JSON.stringify(f[c]))return!0;return!1});return!!(r.length||a.length||i&&o.length)}static sortCollections(e=[]){const t=[],i=[],s=[];for(const l of e)l.type==="auth"?t.push(l):l.type==="single"?i.push(l):s.push(l);return[].concat(t,i,s)}static yieldToMain(){return new Promise(e=>{setTimeout(e,0)})}static defaultFlatpickrOptions(){return{dateFormat:"Y-m-d H:i:S",disableMobile:!0,allowInput:!0,enableTime:!0,time_24hr:!0,locale:{firstDayOfWeek:1}}}static defaultEditorOptions(){return{branding:!1,promotion:!1,menubar:!1,min_height:270,height:270,max_height:700,autoresize_bottom_margin:30,skin:"pocketbase",content_style:"body { font-size: 14px }",plugins:["autoresize","autolink","lists","link","image","searchreplace","fullscreen","media","table","code","codesample"],toolbar:"undo redo | styles | alignleft aligncenter alignright | bold italic forecolor backcolor | bullist numlist | link image table codesample | code fullscreen",file_picker_types:"image",file_picker_callback:(e,t,i)=>{const s=document.createElement("input");s.setAttribute("type","file"),s.setAttribute("accept","image/*"),s.addEventListener("change",l=>{const o=l.target.files[0],r=new FileReader;r.addEventListener("load",()=>{if(!tinymce)return;const a="blobid"+new Date().getTime(),u=tinymce.activeEditor.editorUpload.blobCache,f=r.result.split(",")[1],c=u.create(a,o,f);u.add(c),e(c.blobUri(),{title:o.name})}),r.readAsDataURL(o)}),s.click()}}}static displayValue(e,t,i="N/A"){e=e||{},t=t||[];let s=[];for(const o of t){let r=e[o];typeof r>"u"||(B.isEmpty(r)?s.push(i):typeof r=="boolean"?s.push(r?"True":"False"):typeof r=="string"?(r=r.indexOf("<")>=0?B.plainText(r):r,s.push(B.truncate(r))):s.push(r))}if(s.length>0)return s.join(", ");const l=["title","name","email","username","heading","label","key","id"];for(const o of l)if(!B.isEmpty(e[o]))return e[o];return i}}const Vo=Pn([]);function t_(n,e=4e3){return zo(n,"info",e)}function Vt(n,e=3e3){return zo(n,"success",e)}function cl(n,e=4500){return zo(n,"error",e)}function ov(n,e=4500){return zo(n,"warning",e)}function zo(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{n_(i)},t)};Vo.update(s=>($a(s,i.message),B.pushOrReplaceByKey(s,i,"message"),s))}function n_(n){Vo.update(e=>($a(e,n),e))}function Ca(){Vo.update(n=>{for(let e of n)$a(n,e);return[]})}function $a(n,e){let t;typeof e=="string"?t=B.findByKey(n,"message",e):t=e,t&&(clearTimeout(t.timeout),B.removeByKey(n,"message",t.message))}const Ci=Pn({});function Vn(n){Ci.set(n||{})}function Ts(n){Ci.update(e=>(B.deleteByPath(e,n),e))}const Ma=Pn({});function Wr(n){Ma.set(n||{})}ga.prototype.logout=function(n=!0){this.authStore.clear(),n&&Ti("/login")};ga.prototype.errorResponseHandler=function(n,e=!0,t=""){if(!n||!(n instanceof Error)||n.isAbort)return;const i=(n==null?void 0:n.status)<<0||400,s=(n==null?void 0:n.data)||{};if(e&&i!==404){let l=s.message||n.message||t;l&&cl(l)}if(B.isEmpty(s.data)||Vn(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),Ti("/")};class rv extends ng{save(e,t){super.save(e,t),t instanceof Ji&&Wr(t)}clear(){super.clear(),Wr(null)}}const he=new ga("../",new rv("pb_admin_auth"));he.authStore.model instanceof Ji&&Wr(he.authStore.model);function av(n){let e,t,i,s,l,o,r,a,u,f,c,d;const m=n[3].default,h=Ft(m,n,n[2],null);return{c(){e=v("div"),t=v("main"),h&&h.c(),i=D(),s=v("footer"),l=v("a"),l.innerHTML='Docs',o=D(),r=v("span"),r.textContent="|",a=D(),u=v("a"),f=v("span"),f.textContent="PocketBase v0.12.3",p(t,"class","page-content"),p(l,"href","https://pocketbase.io/docs/"),p(l,"target","_blank"),p(l,"rel","noopener noreferrer"),p(r,"class","delimiter"),p(f,"class","txt"),p(u,"href","https://github.com/pocketbase/pocketbase/releases"),p(u,"target","_blank"),p(u,"rel","noopener noreferrer"),p(u,"title","Releases"),p(s,"class","page-footer"),p(e,"class",c="page-wrapper "+n[1]),x(e,"center-content",n[0])},m(g,b){S(g,e,b),_(e,t),h&&h.m(t,null),_(e,i),_(e,s),_(s,l),_(s,o),_(s,r),_(s,a),_(s,u),_(u,f),d=!0},p(g,[b]){h&&h.p&&(!d||b&4)&&jt(h,m,g,g[2],d?Rt(m,g[2],b,null):Ht(g[2]),null),(!d||b&2&&c!==(c="page-wrapper "+g[1]))&&p(e,"class",c),(!d||b&3)&&x(e,"center-content",g[0])},i(g){d||(A(h,g),d=!0)},o(g){P(h,g),d=!1},d(g){g&&w(e),h&&h.d(g)}}}function uv(n,e,t){let{$$slots:i={},$$scope:s}=e,{center:l=!1}=e,{class:o=""}=e;return n.$$set=r=>{"center"in r&&t(0,l=r.center),"class"in r&&t(1,o=r.class),"$$scope"in r&&t(2,s=r.$$scope)},[l,o,s,i]}class kn extends ke{constructor(e){super(),ye(this,e,uv,av,be,{center:0,class:1})}}function Ru(n){let e,t,i;return{c(){e=v("div"),e.innerHTML=``,t=D(),i=v("div"),p(e,"class","block txt-center m-b-lg"),p(i,"class","clearfix")},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},d(s){s&&w(e),s&&w(t),s&&w(i)}}}function fv(n){let e,t,i,s=!n[0]&&Ru();const l=n[1].default,o=Ft(l,n,n[2],null);return{c(){e=v("div"),s&&s.c(),t=D(),o&&o.c(),p(e,"class","wrapper wrapper-sm m-b-xl panel-wrapper svelte-lxxzfu")},m(r,a){S(r,e,a),s&&s.m(e,null),_(e,t),o&&o.m(e,null),i=!0},p(r,a){r[0]?s&&(s.d(1),s=null):s||(s=Ru(),s.c(),s.m(e,t)),o&&o.p&&(!i||a&4)&&jt(o,l,r,r[2],i?Rt(l,r[2],a,null):Ht(r[2]),null)},i(r){i||(A(o,r),i=!0)},o(r){P(o,r),i=!1},d(r){r&&w(e),s&&s.d(),o&&o.d(r)}}}function cv(n){let e,t;return e=new kn({props:{class:"full-page",center:!0,$$slots:{default:[fv]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&5&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function dv(n,e,t){let{$$slots:i={},$$scope:s}=e,{nobranding:l=!1}=e;return n.$$set=o=>{"nobranding"in o&&t(0,l=o.nobranding),"$$scope"in o&&t(2,s=o.$$scope)},[l,i,s]}class i_ extends ke{constructor(e){super(),ye(this,e,dv,cv,be,{nobranding:0})}}function ju(n,e,t){const i=n.slice();return i[11]=e[t],i}const pv=n=>({}),Hu=n=>({uniqueId:n[3]});function mv(n){let e=(n[11]||bo)+"",t;return{c(){t=z(e)},m(i,s){S(i,t,s)},p(i,s){s&4&&e!==(e=(i[11]||bo)+"")&&re(t,e)},d(i){i&&w(t)}}}function hv(n){var s,l;let e,t=(((s=n[11])==null?void 0:s.message)||((l=n[11])==null?void 0:l.code)||bo)+"",i;return{c(){e=v("pre"),i=z(t)},m(o,r){S(o,e,r),_(e,i)},p(o,r){var a,u;r&4&&t!==(t=(((a=o[11])==null?void 0:a.message)||((u=o[11])==null?void 0:u.code)||bo)+"")&&re(i,t)},d(o){o&&w(e)}}}function qu(n){let e,t;function i(o,r){return typeof o[11]=="object"?hv:mv}let s=i(n),l=s(n);return{c(){e=v("div"),l.c(),t=D(),p(e,"class","help-block help-block-error")},m(o,r){S(o,e,r),l.m(e,null),_(e,t)},p(o,r){s===(s=i(o))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,t)))},d(o){o&&w(e),l.d()}}}function gv(n){let e,t,i,s,l;const o=n[7].default,r=Ft(o,n,n[6],Hu);let a=n[2],u=[];for(let f=0;ft(5,i=h));let{$$slots:s={},$$scope:l}=e;const o="field_"+B.randomString(7);let{name:r=""}=e,{class:a=void 0}=e,u,f=[];function c(){Ts(r)}sn(()=>(u.addEventListener("input",c),u.addEventListener("change",c),()=>{u.removeEventListener("input",c),u.removeEventListener("change",c)}));function d(h){We.call(this,n,h)}function m(h){ie[h?"unshift":"push"](()=>{u=h,t(1,u)})}return n.$$set=h=>{"name"in h&&t(4,r=h.name),"class"in h&&t(0,a=h.class),"$$scope"in h&&t(6,l=h.$$scope)},n.$$.update=()=>{n.$$.dirty&48&&t(2,f=B.toArray(B.getNestedVal(i,r)))},[a,u,f,o,r,i,l,s,d,m]}class _e extends ke{constructor(e){super(),ye(this,e,_v,gv,be,{name:4,class:0})}}function bv(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Email"),s=D(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","email"),p(l,"autocomplete","off"),p(l,"id",o=n[9]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0]),l.focus(),r||(a=K(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&l.value!==u[0]&&de(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function vv(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=z("Password"),s=D(),l=v("input"),r=D(),a=v("div"),a.textContent="Minimum 10 characters.",p(e,"for",i=n[9]),p(l,"type","password"),p(l,"autocomplete","new-password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),de(l,n[1]),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[6]),u=!0)},p(c,d){d&512&&i!==(i=c[9])&&p(e,"for",i),d&512&&o!==(o=c[9])&&p(l,"id",o),d&2&&l.value!==c[1]&&de(l,c[1])},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function yv(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Password confirm"),s=D(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[2]),r||(a=K(l,"input",n[7]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&4&&l.value!==u[2]&&de(l,u[2])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function kv(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;return s=new _e({props:{class:"form-field required",name:"email",$$slots:{default:[bv,({uniqueId:h})=>({9:h}),({uniqueId:h})=>h?512:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[vv,({uniqueId:h})=>({9:h}),({uniqueId:h})=>h?512:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[yv,({uniqueId:h})=>({9:h}),({uniqueId:h})=>h?512:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

Create your first admin account in order to continue

",i=D(),V(s.$$.fragment),l=D(),V(o.$$.fragment),r=D(),V(a.$$.fragment),u=D(),f=v("button"),f.innerHTML=`Create and login - `,p(t,"class","content txt-center m-b-base"),p(f,"type","submit"),p(f,"class","btn btn-lg btn-block btn-next"),x(f,"btn-disabled",n[3]),x(f,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(h,g){S(h,e,g),_(e,t),_(e,i),H(s,e,null),_(e,l),H(o,e,null),_(e,r),H(a,e,null),_(e,u),_(e,f),c=!0,d||(m=K(e,"submit",pt(n[4])),d=!0)},p(h,[g]){const b={};g&1537&&(b.$$scope={dirty:g,ctx:h}),s.$set(b);const y={};g&1538&&(y.$$scope={dirty:g,ctx:h}),o.$set(y);const k={};g&1540&&(k.$$scope={dirty:g,ctx:h}),a.$set(k),(!c||g&8)&&x(f,"btn-disabled",h[3]),(!c||g&8)&&x(f,"btn-loading",h[3])},i(h){c||(A(s.$$.fragment,h),A(o.$$.fragment,h),A(a.$$.fragment,h),c=!0)},o(h){P(s.$$.fragment,h),P(o.$$.fragment,h),P(a.$$.fragment,h),c=!1},d(h){h&&w(e),q(s),q(o),q(a),d=!1,m()}}}function wv(n,e,t){const i=$t();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await he.admins.create({email:s,password:l,passwordConfirm:o}),await he.admins.authWithPassword(s,l),i("submit")}catch(d){he.errorResponseHandler(d)}t(3,r=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function c(){o=this.value,t(2,o)}return[s,l,o,r,a,u,f,c]}class Sv extends ke{constructor(e){super(),ye(this,e,wv,kv,be,{})}}function Vu(n){let e,t;return e=new i_({props:{$$slots:{default:[Tv]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function Tv(n){let e,t;return e=new Sv({}),e.$on("submit",n[1]),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p:G,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function Cv(n){let e,t,i=n[0]&&Vu(n);return{c(){i&&i.c(),e=Ae()},m(s,l){i&&i.m(s,l),S(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&A(i,1)):(i=Vu(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(pe(),P(i,1,1,()=>{i=null}),me())},i(s){t||(A(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function $v(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){he.logout(!1),t(0,i=!0);return}he.authStore.isValid?Ti("/collections"):he.logout()}return[i,async()=>{t(0,i=!1),await tn(),window.location.search=""}]}class Mv extends ke{constructor(e){super(),ye(this,e,$v,Cv,be,{})}}const St=Pn(""),vo=Pn(""),Cs=Pn(!1);function Bo(n){const e=n-1;return e*e*e+1}function yo(n,{delay:e=0,duration:t=400,easing:i=kl}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function En(n,{delay:e=0,duration:t=400,easing:i=Bo,x:s=0,y:l=0,opacity:o=0}={}){const r=getComputedStyle(n),a=+r.opacity,u=r.transform==="none"?"":r.transform,f=a*(1-o);return{delay:e,duration:t,easing:i,css:(c,d)=>` - transform: ${u} translate(${(1-c)*s}px, ${(1-c)*l}px); - opacity: ${a-f*d}`}}function It(n,{delay:e=0,duration:t=400,easing:i=Bo}={}){const s=getComputedStyle(n),l=+s.opacity,o=parseFloat(s.height),r=parseFloat(s.paddingTop),a=parseFloat(s.paddingBottom),u=parseFloat(s.marginTop),f=parseFloat(s.marginBottom),c=parseFloat(s.borderTopWidth),d=parseFloat(s.borderBottomWidth);return{delay:e,duration:t,easing:i,css:m=>`overflow: hidden;opacity: ${Math.min(m*20,1)*l};height: ${m*o}px;padding-top: ${m*r}px;padding-bottom: ${m*a}px;margin-top: ${m*u}px;margin-bottom: ${m*f}px;border-top-width: ${m*c}px;border-bottom-width: ${m*d}px;`}}function Pt(n,{delay:e=0,duration:t=400,easing:i=Bo,start:s=0,opacity:l=0}={}){const o=getComputedStyle(n),r=+o.opacity,a=o.transform==="none"?"":o.transform,u=1-s,f=r*(1-l);return{delay:e,duration:t,easing:i,css:(c,d)=>` - transform: ${a} scale(${1-u*d}); - opacity: ${r-f*d} - `}}function Dv(n){let e,t,i,s;return{c(){e=v("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(l,o){S(l,e,o),n[13](e),de(e,n[7]),i||(s=K(e,"input",n[14]),i=!0)},p(l,o){o&3&&t!==(t=l[0]||l[1])&&p(e,"placeholder",t),o&128&&e.value!==l[7]&&de(e,l[7])},i:G,o:G,d(l){l&&w(e),n[13](null),i=!1,s()}}}function Ov(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a){let u={id:a[8],singleLine:!0,disableRequestKeys:!0,disableIndirectCollectionsKeys:!0,extraAutocompleteKeys:a[3],baseCollection:a[2],placeholder:a[0]||a[1]};return a[7]!==void 0&&(u.value=a[7]),{props:u}}return o&&(e=Kt(o,r(n)),ie.push(()=>ve(e,"value",l)),e.$on("submit",n[10])),{c(){e&&V(e.$$.fragment),i=Ae()},m(a,u){e&&H(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u&8&&(f.extraAutocompleteKeys=a[3]),u&4&&(f.baseCollection=a[2]),u&3&&(f.placeholder=a[0]||a[1]),!t&&u&128&&(t=!0,f.value=a[7],we(()=>t=!1)),o!==(o=a[4])){if(e){pe();const c=e;P(c.$$.fragment,1,0,()=>{q(c,1)}),me()}o?(e=Kt(o,r(a)),ie.push(()=>ve(e,"value",l)),e.$on("submit",a[10]),V(e.$$.fragment),A(e.$$.fragment,1),H(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&q(e,a)}}}function zu(n){let e,t,i,s,l,o,r=n[7]!==n[0]&&Bu();return{c(){r&&r.c(),e=D(),t=v("button"),t.innerHTML='Clear',p(t,"type","button"),p(t,"class","btn btn-transparent btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(a,u){r&&r.m(a,u),S(a,e,u),S(a,t,u),s=!0,l||(o=K(t,"click",n[15]),l=!0)},p(a,u){a[7]!==a[0]?r?u&129&&A(r,1):(r=Bu(),r.c(),A(r,1),r.m(e.parentNode,e)):r&&(pe(),P(r,1,1,()=>{r=null}),me())},i(a){s||(A(r),a&&nt(()=>{i||(i=ze(t,En,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){P(r),a&&(i||(i=ze(t,En,{duration:150,x:5},!1)),i.run(0)),s=!1},d(a){r&&r.d(a),a&&w(e),a&&w(t),a&&i&&i.end(),l=!1,o()}}}function Bu(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Search',p(e,"type","submit"),p(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&nt(()=>{t||(t=ze(e,En,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=ze(e,En,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function Ev(n){let e,t,i,s,l,o,r,a,u,f;const c=[Ov,Dv],d=[];function m(g,b){return g[4]&&!g[5]?0:1}l=m(n),o=d[l]=c[l](n);let h=(n[0].length||n[7].length)&&zu(n);return{c(){e=v("form"),t=v("label"),i=v("i"),s=D(),o.c(),r=D(),h&&h.c(),p(i,"class","ri-search-line"),p(t,"for",n[8]),p(t,"class","m-l-10 txt-xl"),p(e,"class","searchbar")},m(g,b){S(g,e,b),_(e,t),_(t,i),_(e,s),d[l].m(e,null),_(e,r),h&&h.m(e,null),a=!0,u||(f=[K(e,"click",yn(n[11])),K(e,"submit",pt(n[10]))],u=!0)},p(g,[b]){let y=l;l=m(g),l===y?d[l].p(g,b):(pe(),P(d[y],1,1,()=>{d[y]=null}),me(),o=d[l],o?o.p(g,b):(o=d[l]=c[l](g),o.c()),A(o,1),o.m(e,r)),g[0].length||g[7].length?h?(h.p(g,b),b&129&&A(h,1)):(h=zu(g),h.c(),A(h,1),h.m(e,null)):h&&(pe(),P(h,1,1,()=>{h=null}),me())},i(g){a||(A(o),A(h),a=!0)},o(g){P(o),P(h),a=!1},d(g){g&&w(e),d[l].d(),h&&h.d(),u=!1,Le(f)}}}function Av(n,e,t){const i=$t(),s="search_"+B.randomString(7);let{value:l=""}=e,{placeholder:o='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:r=new bn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function m(M=!0){t(7,d=""),M&&(c==null||c.focus()),i("clear")}function h(){t(0,l=d),i("submit",l)}async function g(){u||f||(t(5,f=!0),t(4,u=(await ft(()=>import("./FilterAutocompleteInput-6d6a13cf.js"),["./FilterAutocompleteInput-6d6a13cf.js","./index-4934dad7.js"],import.meta.url)).default),t(5,f=!1))}sn(()=>{g()});function b(M){We.call(this,n,M)}function y(M){d=M,t(7,d),t(0,l)}function k(M){ie[M?"unshift":"push"](()=>{c=M,t(6,c)})}function T(){d=this.value,t(7,d),t(0,l)}const C=()=>{m(!1),h()};return n.$$set=M=>{"value"in M&&t(0,l=M.value),"placeholder"in M&&t(1,o=M.placeholder),"autocompleteCollection"in M&&t(2,r=M.autocompleteCollection),"extraAutocompleteKeys"in M&&t(3,a=M.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,o,r,a,u,f,c,d,s,m,h,b,y,k,T,C]}class Uo extends ke{constructor(e){super(),ye(this,e,Av,Ev,be,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}let Yr,Li;const Kr="app-tooltip";function Uu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function bi(){return Li=Li||document.querySelector("."+Kr),Li||(Li=document.createElement("div"),Li.classList.add(Kr),document.body.appendChild(Li)),Li}function s_(n,e){let t=bi();if(!t.classList.contains("active")||!(e!=null&&e.text)){Jr();return}t.textContent=e.text,t.className=Kr+" active",e.class&&t.classList.add(e.class),e.position&&t.classList.add(e.position),t.style.top="0px",t.style.left="0px";let i=t.offsetHeight,s=t.offsetWidth,l=n.getBoundingClientRect(),o=0,r=0,a=5;e.position=="left"?(o=l.top+l.height/2-i/2,r=l.left-s-a):e.position=="right"?(o=l.top+l.height/2-i/2,r=l.right+a):e.position=="top"?(o=l.top-i-a,r=l.left+l.width/2-s/2):e.position=="top-left"?(o=l.top-i-a,r=l.left):e.position=="top-right"?(o=l.top-i-a,r=l.right-s):e.position=="bottom-left"?(o=l.top+l.height+a,r=l.left):e.position=="bottom-right"?(o=l.top+l.height+a,r=l.right-s):(o=l.top+l.height+a,r=l.left+l.width/2-s/2),r+s>document.documentElement.clientWidth&&(r=document.documentElement.clientWidth-s),r=r>=0?r:0,o+i>document.documentElement.clientHeight&&(o=document.documentElement.clientHeight-i),o=o>=0?o:0,t.style.top=o+"px",t.style.left=r+"px"}function Jr(){clearTimeout(Yr),bi().classList.remove("active"),bi().activeNode=void 0}function Iv(n,e){bi().activeNode=n,clearTimeout(Yr),Yr=setTimeout(()=>{bi().classList.add("active"),s_(n,e)},isNaN(e.delay)?0:e.delay)}function Ye(n,e){let t=Uu(e);function i(){Iv(n,t)}function s(){Jr()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&B.isFocusable(n))&&n.addEventListener("click",s),bi(),{update(l){var o,r;t=Uu(l),(r=(o=bi())==null?void 0:o.activeNode)!=null&&r.contains(n)&&s_(n,t)},destroy(){var l,o;(o=(l=bi())==null?void 0:l.activeNode)!=null&&o.contains(n)&&Jr(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function Pv(n){let e,t,i,s;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"aria-label","Refresh"),p(e,"class","btn btn-transparent btn-circle svelte-1bvelc2"),x(e,"refreshing",n[1])},m(l,o){S(l,e,o),i||(s=[Pe(t=Ye.call(null,e,n[0])),K(e,"click",n[2])],i=!0)},p(l,[o]){t&&zt(t.update)&&o&1&&t.update.call(null,l[0]),o&2&&x(e,"refreshing",l[1])},i:G,o:G,d(l){l&&w(e),i=!1,Le(s)}}}function Lv(n,e,t){const i=$t();let{tooltip:s={text:"Refresh",position:"right"}}=e,l=null;function o(){i("refresh");const r=s;t(0,s=null),clearTimeout(l),t(1,l=setTimeout(()=>{t(1,l=null),t(0,s=r)},150))}return sn(()=>()=>clearTimeout(l)),n.$$set=r=>{"tooltip"in r&&t(0,s=r.tooltip)},[s,l,o]}class Da extends ke{constructor(e){super(),ye(this,e,Lv,Pv,be,{tooltip:0})}}function Nv(n){let e,t,i,s,l;const o=n[6].default,r=Ft(o,n,n[5],null);return{c(){e=v("th"),r&&r.c(),p(e,"tabindex","0"),p(e,"title",n[2]),p(e,"class",t="col-sort "+n[1]),x(e,"col-sort-disabled",n[3]),x(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),x(e,"sort-desc",n[0]==="-"+n[2]),x(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){S(a,e,u),r&&r.m(e,null),i=!0,s||(l=[K(e,"click",n[7]),K(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&jt(r,o,a,a[5],i?Rt(o,a[5],u,null):Ht(a[5]),null),(!i||u&4)&&p(e,"title",a[2]),(!i||u&2&&t!==(t="col-sort "+a[1]))&&p(e,"class",t),(!i||u&10)&&x(e,"col-sort-disabled",a[3]),(!i||u&7)&&x(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&x(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&x(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(A(r,a),i=!0)},o(a){P(r,a),i=!1},d(a){a&&w(e),r&&r.d(a),s=!1,Le(l)}}}function Fv(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{name:o}=e,{sort:r=""}=e,{disable:a=!1}=e;function u(){a||("-"+o===r?t(0,r="+"+o):t(0,r="-"+o))}const f=()=>u(),c=d=>{(d.code==="Enter"||d.code==="Space")&&(d.preventDefault(),u())};return n.$$set=d=>{"class"in d&&t(1,l=d.class),"name"in d&&t(2,o=d.name),"sort"in d&&t(0,r=d.sort),"disable"in d&&t(3,a=d.disable),"$$scope"in d&&t(5,s=d.$$scope)},[r,l,o,a,u,s,i,f,c]}class Ut extends ke{constructor(e){super(),ye(this,e,Fv,Nv,be,{class:1,name:2,sort:0,disable:3})}}function Rv(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function jv(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("div"),i=z(n[2]),s=D(),l=v("div"),o=z(n[1]),r=z(" UTC"),p(t,"class","date"),p(l,"class","time svelte-zdiknu"),p(e,"class","datetime svelte-zdiknu")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(e,s),_(e,l),_(l,o),_(l,r)},p(a,u){u&4&&re(i,a[2]),u&2&&re(o,a[1])},d(a){a&&w(e)}}}function Hv(n){let e;function t(l,o){return l[0]?jv:Rv}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:G,o:G,d(l){s.d(l),l&&w(e)}}}function qv(n,e,t){let i,s,{date:l=""}=e;return n.$$set=o=>{"date"in o&&t(0,l=o.date)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=l?l.substring(0,10):null),n.$$.dirty&1&&t(1,s=l?l.substring(10,19):null)},[l,s,i]}class Zi extends ke{constructor(e){super(),ye(this,e,qv,Hv,be,{date:0})}}const Vv=n=>({}),Wu=n=>({}),zv=n=>({}),Yu=n=>({});function Bv(n){let e,t,i,s,l,o,r,a;const u=n[5].before,f=Ft(u,n,n[4],Yu),c=n[5].default,d=Ft(c,n,n[4],null),m=n[5].after,h=Ft(m,n,n[4],Wu);return{c(){e=v("div"),f&&f.c(),t=D(),i=v("div"),d&&d.c(),l=D(),h&&h.c(),p(i,"class",s="horizontal-scroller "+n[0]+" "+n[3]+" svelte-wc2j9h"),p(e,"class","horizontal-scroller-wrapper svelte-wc2j9h")},m(g,b){S(g,e,b),f&&f.m(e,null),_(e,t),_(e,i),d&&d.m(i,null),n[6](i),_(e,l),h&&h.m(e,null),o=!0,r||(a=[K(window,"resize",n[1]),K(i,"scroll",n[1])],r=!0)},p(g,[b]){f&&f.p&&(!o||b&16)&&jt(f,u,g,g[4],o?Rt(u,g[4],b,zv):Ht(g[4]),Yu),d&&d.p&&(!o||b&16)&&jt(d,c,g,g[4],o?Rt(c,g[4],b,null):Ht(g[4]),null),(!o||b&9&&s!==(s="horizontal-scroller "+g[0]+" "+g[3]+" svelte-wc2j9h"))&&p(i,"class",s),h&&h.p&&(!o||b&16)&&jt(h,m,g,g[4],o?Rt(m,g[4],b,Vv):Ht(g[4]),Wu)},i(g){o||(A(f,g),A(d,g),A(h,g),o=!0)},o(g){P(f,g),P(d,g),P(h,g),o=!1},d(g){g&&w(e),f&&f.d(g),d&&d.d(g),n[6](null),h&&h.d(g),r=!1,Le(a)}}}function Uv(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,o=null,r="",a=null,u;function f(){o&&(clearTimeout(a),a=setTimeout(()=>{const d=o.offsetWidth,m=o.scrollWidth;m-d?(t(3,r="scrollable"),o.scrollLeft===0?t(3,r+=" scroll-start"):o.scrollLeft+d==m&&t(3,r+=" scroll-end")):t(3,r="")},100))}sn(()=>(f(),u=new MutationObserver(()=>{f()}),u.observe(o,{attributeFilter:["width"],childList:!0,subtree:!0}),()=>{u==null||u.disconnect(),clearTimeout(a)}));function c(d){ie[d?"unshift":"push"](()=>{o=d,t(2,o)})}return n.$$set=d=>{"class"in d&&t(0,l=d.class),"$$scope"in d&&t(4,s=d.$$scope)},[l,f,o,r,s,i,c]}class Oa extends ke{constructor(e){super(),ye(this,e,Uv,Bv,be,{class:0,refresh:1})}get refresh(){return this.$$.ctx[1]}}function Ku(n,e,t){const i=n.slice();return i[23]=e[t],i}function Wv(n){let e;return{c(){e=v("div"),e.innerHTML=` - method`,p(e,"class","col-header-content")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function Yv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="url",p(t,"class",B.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function Kv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="referer",p(t,"class",B.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function Jv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="User IP",p(t,"class",B.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function Zv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="status",p(t,"class",B.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function Gv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function Ju(n){let e;function t(l,o){return l[6]?xv:Xv}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function Xv(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&Zu(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No logs found.",s=D(),o&&o.c(),l=D(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(t,s),o&&o.m(t,null),_(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=Zu(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function xv(n){let e;return{c(){e=v("tr"),e.innerHTML=` - `},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function Zu(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[19]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function Gu(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),p(e,"title","Error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Xu(n,e){var Se,Ue,lt;let t,i,s,l=((Se=e[23].method)==null?void 0:Se.toUpperCase())+"",o,r,a,u,f,c=e[23].url+"",d,m,h,g,b,y,k=(e[23].referer||"N/A")+"",T,C,M,$,O,E=(e[23].userIp||"N/A")+"",I,L,N,F,U,J=e[23].status+"",ne,Z,te,ee,R,X,Y,se,He,Re,Fe=(((Ue=e[23].meta)==null?void 0:Ue.errorMessage)||((lt=e[23].meta)==null?void 0:lt.errorData))&&Gu();ee=new Zi({props:{date:e[23].created}});function qe(){return e[17](e[23])}function ge(...ue){return e[18](e[23],...ue)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("span"),o=z(l),a=D(),u=v("td"),f=v("span"),d=z(c),h=D(),Fe&&Fe.c(),g=D(),b=v("td"),y=v("span"),T=z(k),M=D(),$=v("td"),O=v("span"),I=z(E),N=D(),F=v("td"),U=v("span"),ne=z(J),Z=D(),te=v("td"),V(ee.$$.fragment),R=D(),X=v("td"),X.innerHTML='',Y=D(),p(s,"class",r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]),p(i,"class","col-type-text col-field-method min-width"),p(f,"class","txt txt-ellipsis"),p(f,"title",m=e[23].url),p(u,"class","col-type-text col-field-url"),p(y,"class","txt txt-ellipsis"),p(y,"title",C=e[23].referer),x(y,"txt-hint",!e[23].referer),p(b,"class","col-type-text col-field-referer"),p(O,"class","txt txt-ellipsis"),p(O,"title",L=e[23].userIp),x(O,"txt-hint",!e[23].userIp),p($,"class","col-type-number col-field-userIp"),p(U,"class","label"),x(U,"label-danger",e[23].status>=400),p(F,"class","col-type-number col-field-status"),p(te,"class","col-type-date col-field-created"),p(X,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(ue,fe){S(ue,t,fe),_(t,i),_(i,s),_(s,o),_(t,a),_(t,u),_(u,f),_(f,d),_(u,h),Fe&&Fe.m(u,null),_(t,g),_(t,b),_(b,y),_(y,T),_(t,M),_(t,$),_($,O),_(O,I),_(t,N),_(t,F),_(F,U),_(U,ne),_(t,Z),_(t,te),H(ee,te,null),_(t,R),_(t,X),_(t,Y),se=!0,He||(Re=[K(t,"click",qe),K(t,"keydown",ge)],He=!0)},p(ue,fe){var oe,je,Me;e=ue,(!se||fe&8)&&l!==(l=((oe=e[23].method)==null?void 0:oe.toUpperCase())+"")&&re(o,l),(!se||fe&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&p(s,"class",r),(!se||fe&8)&&c!==(c=e[23].url+"")&&re(d,c),(!se||fe&8&&m!==(m=e[23].url))&&p(f,"title",m),(je=e[23].meta)!=null&&je.errorMessage||(Me=e[23].meta)!=null&&Me.errorData?Fe||(Fe=Gu(),Fe.c(),Fe.m(u,null)):Fe&&(Fe.d(1),Fe=null),(!se||fe&8)&&k!==(k=(e[23].referer||"N/A")+"")&&re(T,k),(!se||fe&8&&C!==(C=e[23].referer))&&p(y,"title",C),(!se||fe&8)&&x(y,"txt-hint",!e[23].referer),(!se||fe&8)&&E!==(E=(e[23].userIp||"N/A")+"")&&re(I,E),(!se||fe&8&&L!==(L=e[23].userIp))&&p(O,"title",L),(!se||fe&8)&&x(O,"txt-hint",!e[23].userIp),(!se||fe&8)&&J!==(J=e[23].status+"")&&re(ne,J),(!se||fe&8)&&x(U,"label-danger",e[23].status>=400);const ae={};fe&8&&(ae.date=e[23].created),ee.$set(ae)},i(ue){se||(A(ee.$$.fragment,ue),se=!0)},o(ue){P(ee.$$.fragment,ue),se=!1},d(ue){ue&&w(t),Fe&&Fe.d(),q(ee),He=!1,Le(Re)}}}function Qv(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$,O,E,I=[],L=new Map,N;function F(ge){n[11](ge)}let U={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[Wv]},$$scope:{ctx:n}};n[1]!==void 0&&(U.sort=n[1]),s=new Ut({props:U}),ie.push(()=>ve(s,"sort",F));function J(ge){n[12](ge)}let ne={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[Yv]},$$scope:{ctx:n}};n[1]!==void 0&&(ne.sort=n[1]),r=new Ut({props:ne}),ie.push(()=>ve(r,"sort",J));function Z(ge){n[13](ge)}let te={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[Kv]},$$scope:{ctx:n}};n[1]!==void 0&&(te.sort=n[1]),f=new Ut({props:te}),ie.push(()=>ve(f,"sort",Z));function ee(ge){n[14](ge)}let R={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[Jv]},$$scope:{ctx:n}};n[1]!==void 0&&(R.sort=n[1]),m=new Ut({props:R}),ie.push(()=>ve(m,"sort",ee));function X(ge){n[15](ge)}let Y={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[Zv]},$$scope:{ctx:n}};n[1]!==void 0&&(Y.sort=n[1]),b=new Ut({props:Y}),ie.push(()=>ve(b,"sort",X));function se(ge){n[16](ge)}let He={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[Gv]},$$scope:{ctx:n}};n[1]!==void 0&&(He.sort=n[1]),T=new Ut({props:He}),ie.push(()=>ve(T,"sort",se));let Re=n[3];const Fe=ge=>ge[23].id;for(let ge=0;gel=!1)),s.$set(Ue);const lt={};Se&67108864&&(lt.$$scope={dirty:Se,ctx:ge}),!a&&Se&2&&(a=!0,lt.sort=ge[1],we(()=>a=!1)),r.$set(lt);const ue={};Se&67108864&&(ue.$$scope={dirty:Se,ctx:ge}),!c&&Se&2&&(c=!0,ue.sort=ge[1],we(()=>c=!1)),f.$set(ue);const fe={};Se&67108864&&(fe.$$scope={dirty:Se,ctx:ge}),!h&&Se&2&&(h=!0,fe.sort=ge[1],we(()=>h=!1)),m.$set(fe);const ae={};Se&67108864&&(ae.$$scope={dirty:Se,ctx:ge}),!y&&Se&2&&(y=!0,ae.sort=ge[1],we(()=>y=!1)),b.$set(ae);const oe={};Se&67108864&&(oe.$$scope={dirty:Se,ctx:ge}),!C&&Se&2&&(C=!0,oe.sort=ge[1],we(()=>C=!1)),T.$set(oe),Se&841&&(Re=ge[3],pe(),I=wt(I,Se,Fe,1,ge,Re,L,E,nn,Xu,null,Ku),me(),!Re.length&&qe?qe.p(ge,Se):Re.length?qe&&(qe.d(1),qe=null):(qe=Ju(ge),qe.c(),qe.m(E,null))),(!N||Se&64)&&x(e,"table-loading",ge[6])},i(ge){if(!N){A(s.$$.fragment,ge),A(r.$$.fragment,ge),A(f.$$.fragment,ge),A(m.$$.fragment,ge),A(b.$$.fragment,ge),A(T.$$.fragment,ge);for(let Se=0;Se{if(L<=1&&g(),t(6,d=!1),t(5,f=F.page),t(4,c=F.totalItems),s("load",u.concat(F.items)),N){const U=++m;for(;F.items.length&&m==U;)t(3,u=u.concat(F.items.splice(0,10))),await B.yieldToMain()}else t(3,u=u.concat(F.items))}).catch(F=>{F!=null&&F.isAbort||(t(6,d=!1),console.warn(F),g(),he.errorResponseHandler(F,!1))})}function g(){t(3,u=[]),t(5,f=1),t(4,c=0)}function b(L){a=L,t(1,a)}function y(L){a=L,t(1,a)}function k(L){a=L,t(1,a)}function T(L){a=L,t(1,a)}function C(L){a=L,t(1,a)}function M(L){a=L,t(1,a)}const $=L=>s("select",L),O=(L,N)=>{N.code==="Enter"&&(N.preventDefault(),s("select",L))},E=()=>t(0,o=""),I=()=>h(f+1);return n.$$set=L=>{"filter"in L&&t(0,o=L.filter),"presets"in L&&t(10,r=L.presets),"sort"in L&&t(1,a=L.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a<"u"||typeof o<"u"||typeof r<"u")&&(g(),h(1)),n.$$.dirty&24&&t(7,i=c>u.length)},[o,a,h,u,c,f,d,i,s,l,r,b,y,k,T,C,M,$,O,E,I]}class ny extends ke{constructor(e){super(),ye(this,e,ty,ey,be,{filter:0,presets:10,sort:1,load:2})}get load(){return this.$$.ctx[2]}}/*! - * Chart.js v3.9.1 - * https://www.chartjs.org - * (c) 2022 Chart.js Contributors - * Released under the MIT License - */function ti(){}const iy=function(){let n=0;return function(){return n++}}();function ut(n){return n===null||typeof n>"u"}function gt(n){if(Array.isArray&&Array.isArray(n))return!0;const e=Object.prototype.toString.call(n);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function Ge(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const Ct=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function Tn(n,e){return Ct(n)?n:e}function et(n,e){return typeof n>"u"?e:n}const sy=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,l_=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function yt(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function ct(n,e,t,i){let s,l,o;if(gt(n))if(l=n.length,i)for(s=l-1;s>=0;s--)e.call(t,n[s],s);else for(s=0;sn,x:n=>n.x,y:n=>n.y};function ki(n,e){return(ef[e]||(ef[e]=ry(e)))(n)}function ry(n){const e=ay(n);return t=>{for(const i of e){if(i==="")break;t=t&&t[i]}return t}}function ay(n){const e=n.split("."),t=[];let i="";for(const s of e)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(t.push(i),i="");return t}function Ea(n){return n.charAt(0).toUpperCase()+n.slice(1)}const An=n=>typeof n<"u",wi=n=>typeof n=="function",tf=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function uy(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Tt=Math.PI,dt=2*Tt,fy=dt+Tt,So=Number.POSITIVE_INFINITY,cy=Tt/180,kt=Tt/2,zs=Tt/4,nf=Tt*2/3,Dn=Math.log10,Jn=Math.sign;function sf(n){const e=Math.round(n);n=nl(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(Dn(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function dy(n){const e=[],t=Math.sqrt(n);let i;for(i=1;is-l).pop(),e}function $s(n){return!isNaN(parseFloat(n))&&isFinite(n)}function nl(n,e,t){return Math.abs(n-e)=n}function r_(n,e,t){let i,s,l;for(i=0,s=n.length;ia&&u=Math.min(e,t)-i&&n<=Math.max(e,t)+i}function Ia(n,e,t){t=t||(o=>n[o]1;)l=s+i>>1,t(l)?s=l:i=l;return{lo:s,hi:i}}const zi=(n,e,t,i)=>Ia(n,t,i?s=>n[s][e]<=t:s=>n[s][e]Ia(n,t,i=>n[i][e]>=t);function _y(n,e,t){let i=0,s=n.length;for(;ii&&n[s-1]>t;)s--;return i>0||s{const i="_onData"+Ea(t),s=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...l){const o=s.apply(this,l);return n._chartjs.listeners.forEach(r=>{typeof r[i]=="function"&&r[i](...l)}),o}})})}function of(n,e){const t=n._chartjs;if(!t)return;const i=t.listeners,s=i.indexOf(e);s!==-1&&i.splice(s,1),!(i.length>0)&&(u_.forEach(l=>{delete n[l]}),delete n._chartjs)}function f_(n){const e=new Set;let t,i;for(t=0,i=n.length;t"u"?function(n){return n()}:window.requestAnimationFrame}();function d_(n,e,t){const i=t||(o=>Array.prototype.slice.call(o));let s=!1,l=[];return function(...o){l=i(o),s||(s=!0,c_.call(window,()=>{s=!1,n.apply(e,l)}))}}function vy(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}const yy=n=>n==="start"?"left":n==="end"?"right":"center",rf=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2;function p_(n,e,t){const i=e.length;let s=0,l=i;if(n._sorted){const{iScale:o,_parsed:r}=n,a=o.axis,{min:u,max:f,minDefined:c,maxDefined:d}=o.getUserBounds();c&&(s=Wt(Math.min(zi(r,o.axis,u).lo,t?i:zi(e,a,o.getPixelForValue(u)).lo),0,i-1)),d?l=Wt(Math.max(zi(r,o.axis,f,!0).hi+1,t?0:zi(e,a,o.getPixelForValue(f),!0).hi+1),s,i)-s:l=i-s}return{start:s,count:l}}function m_(n){const{xScale:e,yScale:t,_scaleRanges:i}=n,s={xmin:e.min,xmax:e.max,ymin:t.min,ymax:t.max};if(!i)return n._scaleRanges=s,!0;const l=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==t.min||i.ymax!==t.max;return Object.assign(i,s),l}const Ul=n=>n===0||n===1,af=(n,e,t)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*dt/t)),uf=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*dt/t)+1,il={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*kt)+1,easeOutSine:n=>Math.sin(n*kt),easeInOutSine:n=>-.5*(Math.cos(Tt*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>Ul(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>Ul(n)?n:af(n,.075,.3),easeOutElastic:n=>Ul(n)?n:uf(n,.075,.3),easeInOutElastic(n){return Ul(n)?n:n<.5?.5*af(n*2,.1125,.45):.5+.5*uf(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let e=1.70158;return(n/=.5)<1?.5*(n*n*(((e*=1.525)+1)*n-e)):.5*((n-=2)*n*(((e*=1.525)+1)*n+e)+2)},easeInBounce:n=>1-il.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?il.easeInBounce(n*2)*.5:il.easeOutBounce(n*2-1)*.5+.5};/*! - * @kurkle/color v0.2.1 - * https://github.com/kurkle/color#readme - * (c) 2022 Jukka Kurkela - * Released under the MIT License - */function Ol(n){return n+.5|0}const hi=(n,e,t)=>Math.max(Math.min(n,t),e);function Xs(n){return hi(Ol(n*2.55),0,255)}function vi(n){return hi(Ol(n*255),0,255)}function si(n){return hi(Ol(n/2.55)/100,0,1)}function ff(n){return hi(Ol(n*100),0,100)}const Sn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Gr=[..."0123456789ABCDEF"],ky=n=>Gr[n&15],wy=n=>Gr[(n&240)>>4]+Gr[n&15],Wl=n=>(n&240)>>4===(n&15),Sy=n=>Wl(n.r)&&Wl(n.g)&&Wl(n.b)&&Wl(n.a);function Ty(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&Sn[n[1]]*17,g:255&Sn[n[2]]*17,b:255&Sn[n[3]]*17,a:e===5?Sn[n[4]]*17:255}:(e===7||e===9)&&(t={r:Sn[n[1]]<<4|Sn[n[2]],g:Sn[n[3]]<<4|Sn[n[4]],b:Sn[n[5]]<<4|Sn[n[6]],a:e===9?Sn[n[7]]<<4|Sn[n[8]]:255})),t}const Cy=(n,e)=>n<255?e(n):"";function $y(n){var e=Sy(n)?ky:wy;return n?"#"+e(n.r)+e(n.g)+e(n.b)+Cy(n.a,e):void 0}const My=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function h_(n,e,t){const i=e*Math.min(t,1-t),s=(l,o=(l+n/30)%12)=>t-i*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function Dy(n,e,t){const i=(s,l=(s+n/60)%6)=>t-t*e*Math.max(Math.min(l,4-l,1),0);return[i(5),i(3),i(1)]}function Oy(n,e,t){const i=h_(n,1,.5);let s;for(e+t>1&&(s=1/(e+t),e*=s,t*=s),s=0;s<3;s++)i[s]*=1-e-t,i[s]+=e;return i}function Ey(n,e,t,i,s){return n===s?(e-t)/i+(e.5?f/(2-l-o):f/(l+o),a=Ey(t,i,s,f,l),a=a*60+.5),[a|0,u||0,r]}function La(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(vi)}function Na(n,e,t){return La(h_,n,e,t)}function Ay(n,e,t){return La(Oy,n,e,t)}function Iy(n,e,t){return La(Dy,n,e,t)}function g_(n){return(n%360+360)%360}function Py(n){const e=My.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?Xs(+e[5]):vi(+e[5]));const s=g_(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=Ay(s,l,o):e[1]==="hsv"?i=Iy(s,l,o):i=Na(s,l,o),{r:i[0],g:i[1],b:i[2],a:t}}function Ly(n,e){var t=Pa(n);t[0]=g_(t[0]+e),t=Na(t),n.r=t[0],n.g=t[1],n.b=t[2]}function Ny(n){if(!n)return;const e=Pa(n),t=e[0],i=ff(e[1]),s=ff(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${si(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const cf={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},df={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Fy(){const n={},e=Object.keys(df),t=Object.keys(cf);let i,s,l,o,r;for(i=0;i>16&255,l>>8&255,l&255]}return n}let Yl;function Ry(n){Yl||(Yl=Fy(),Yl.transparent=[0,0,0,0]);const e=Yl[n.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const jy=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Hy(n){const e=jy.exec(n);let t=255,i,s,l;if(e){if(e[7]!==i){const o=+e[7];t=e[8]?Xs(o):hi(o*255,0,255)}return i=+e[1],s=+e[3],l=+e[5],i=255&(e[2]?Xs(i):hi(i,0,255)),s=255&(e[4]?Xs(s):hi(s,0,255)),l=255&(e[6]?Xs(l):hi(l,0,255)),{r:i,g:s,b:l,a:t}}}function qy(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${si(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const ar=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,cs=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function Vy(n,e,t){const i=cs(si(n.r)),s=cs(si(n.g)),l=cs(si(n.b));return{r:vi(ar(i+t*(cs(si(e.r))-i))),g:vi(ar(s+t*(cs(si(e.g))-s))),b:vi(ar(l+t*(cs(si(e.b))-l))),a:n.a+t*(e.a-n.a)}}function Kl(n,e,t){if(n){let i=Pa(n);i[e]=Math.max(0,Math.min(i[e]+i[e]*t,e===0?360:1)),i=Na(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function __(n,e){return n&&Object.assign(e||{},n)}function pf(n){var e={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(e={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(e.a=vi(n[3]))):(e=__(n,{r:0,g:0,b:0,a:1}),e.a=vi(e.a)),e}function zy(n){return n.charAt(0)==="r"?Hy(n):Py(n)}class To{constructor(e){if(e instanceof To)return e;const t=typeof e;let i;t==="object"?i=pf(e):t==="string"&&(i=Ty(e)||Ry(e)||zy(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=__(this._rgb);return e&&(e.a=si(e.a)),e}set rgb(e){this._rgb=pf(e)}rgbString(){return this._valid?qy(this._rgb):void 0}hexString(){return this._valid?$y(this._rgb):void 0}hslString(){return this._valid?Ny(this._rgb):void 0}mix(e,t){if(e){const i=this.rgb,s=e.rgb;let l;const o=t===l?.5:t,r=2*o-1,a=i.a-s.a,u=((r*a===-1?r:(r+a)/(1+r*a))+1)/2;l=1-u,i.r=255&u*i.r+l*s.r+.5,i.g=255&u*i.g+l*s.g+.5,i.b=255&u*i.b+l*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(e,t){return e&&(this._rgb=Vy(this._rgb,e._rgb,t)),this}clone(){return new To(this.rgb)}alpha(e){return this._rgb.a=vi(e),this}clearer(e){const t=this._rgb;return t.a*=1-e,this}greyscale(){const e=this._rgb,t=Ol(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=t,this}opaquer(e){const t=this._rgb;return t.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Kl(this._rgb,2,e),this}darken(e){return Kl(this._rgb,2,-e),this}saturate(e){return Kl(this._rgb,1,e),this}desaturate(e){return Kl(this._rgb,1,-e),this}rotate(e){return Ly(this._rgb,e),this}}function b_(n){return new To(n)}function v_(n){if(n&&typeof n=="object"){const e=n.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function mf(n){return v_(n)?n:b_(n)}function ur(n){return v_(n)?n:b_(n).saturate(.5).darken(.1).hexString()}const Gi=Object.create(null),Xr=Object.create(null);function sl(n,e){if(!e)return n;const t=e.split(".");for(let i=0,s=t.length;it.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,i)=>ur(i.backgroundColor),this.hoverBorderColor=(t,i)=>ur(i.borderColor),this.hoverColor=(t,i)=>ur(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e)}set(e,t){return fr(this,e,t)}get(e){return sl(this,e)}describe(e,t){return fr(Xr,e,t)}override(e,t){return fr(Gi,e,t)}route(e,t,i,s){const l=sl(this,e),o=sl(this,i),r="_"+t;Object.defineProperties(l,{[r]:{value:l[t],writable:!0},[t]:{enumerable:!0,get(){const a=this[r],u=o[s];return Ge(a)?Object.assign({},u,a):et(a,u)},set(a){this[r]=a}}})}}var tt=new By({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function Uy(n){return!n||ut(n.size)||ut(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function Co(n,e,t,i,s){let l=e[s];return l||(l=e[s]=n.measureText(s).width,t.push(s)),l>i&&(i=l),i}function Wy(n,e,t,i){i=i||{};let s=i.data=i.data||{},l=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(s=i.data={},l=i.garbageCollect=[],i.font=e),n.save(),n.font=e;let o=0;const r=t.length;let a,u,f,c,d;for(a=0;at.length){for(a=0;a0&&n.stroke()}}function hl(n,e,t){return t=t||.5,!e||n&&n.x>e.left-t&&n.xe.top-t&&n.y0&&l.strokeColor!=="";let a,u;for(n.save(),n.font=s.string,Zy(n,l),a=0;a+n||0;function ja(n,e){const t={},i=Ge(e),s=i?Object.keys(e):e,l=Ge(n)?i?o=>et(n[o],n[e[o]]):o=>n[o]:()=>n;for(const o of s)t[o]=e2(l(o));return t}function y_(n){return ja(n,{top:"y",right:"x",bottom:"y",left:"x"})}function vs(n){return ja(n,["topLeft","topRight","bottomLeft","bottomRight"])}function In(n){const e=y_(n);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function _n(n,e){n=n||{},e=e||tt.font;let t=et(n.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let i=et(n.style,e.style);i&&!(""+i).match(xy)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const s={family:et(n.family,e.family),lineHeight:Qy(et(n.lineHeight,e.lineHeight),t),size:t,style:i,weight:et(n.weight,e.weight),string:""};return s.string=Uy(s),s}function Jl(n,e,t,i){let s=!0,l,o,r;for(l=0,o=n.length;lt&&r===0?0:r+a;return{min:o(i,-Math.abs(l)),max:o(s,l)}}function $i(n,e){return Object.assign(Object.create(n),e)}function Ha(n,e=[""],t=n,i,s=()=>n[0]){An(i)||(i=T_("_fallback",n));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:t,_fallback:i,_getTarget:s,override:o=>Ha([o,...n],e,t,i)};return new Proxy(l,{deleteProperty(o,r){return delete o[r],delete o._keys,delete n[0][r],!0},get(o,r){return w_(o,r,()=>u2(r,e,n,o))},getOwnPropertyDescriptor(o,r){return Reflect.getOwnPropertyDescriptor(o._scopes[0],r)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(o,r){return _f(o).includes(r)},ownKeys(o){return _f(o)},set(o,r,a){const u=o._storage||(o._storage=s());return o[r]=u[r]=a,delete o._keys,!0}})}function Ms(n,e,t,i){const s={_cacheable:!1,_proxy:n,_context:e,_subProxy:t,_stack:new Set,_descriptors:k_(n,i),setContext:l=>Ms(n,l,t,i),override:l=>Ms(n.override(l),e,t,i)};return new Proxy(s,{deleteProperty(l,o){return delete l[o],delete n[o],!0},get(l,o,r){return w_(l,o,()=>i2(l,o,r))},getOwnPropertyDescriptor(l,o){return l._descriptors.allKeys?Reflect.has(n,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,o)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(l,o){return Reflect.has(n,o)},ownKeys(){return Reflect.ownKeys(n)},set(l,o,r){return n[o]=r,delete l[o],!0}})}function k_(n,e={scriptable:!0,indexable:!0}){const{_scriptable:t=e.scriptable,_indexable:i=e.indexable,_allKeys:s=e.allKeys}=n;return{allKeys:s,scriptable:t,indexable:i,isScriptable:wi(t)?t:()=>t,isIndexable:wi(i)?i:()=>i}}const n2=(n,e)=>n?n+Ea(e):e,qa=(n,e)=>Ge(e)&&n!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function w_(n,e,t){if(Object.prototype.hasOwnProperty.call(n,e))return n[e];const i=t();return n[e]=i,i}function i2(n,e,t){const{_proxy:i,_context:s,_subProxy:l,_descriptors:o}=n;let r=i[e];return wi(r)&&o.isScriptable(e)&&(r=s2(e,r,n,t)),gt(r)&&r.length&&(r=l2(e,r,n,o.isIndexable)),qa(e,r)&&(r=Ms(r,s,l&&l[e],o)),r}function s2(n,e,t,i){const{_proxy:s,_context:l,_subProxy:o,_stack:r}=t;if(r.has(n))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+n);return r.add(n),e=e(l,o||i),r.delete(n),qa(n,e)&&(e=Va(s._scopes,s,n,e)),e}function l2(n,e,t,i){const{_proxy:s,_context:l,_subProxy:o,_descriptors:r}=t;if(An(l.index)&&i(n))e=e[l.index%e.length];else if(Ge(e[0])){const a=e,u=s._scopes.filter(f=>f!==a);e=[];for(const f of a){const c=Va(u,s,n,f);e.push(Ms(c,l,o&&o[n],r))}}return e}function S_(n,e,t){return wi(n)?n(e,t):n}const o2=(n,e)=>n===!0?e:typeof n=="string"?ki(e,n):void 0;function r2(n,e,t,i,s){for(const l of e){const o=o2(t,l);if(o){n.add(o);const r=S_(o._fallback,t,s);if(An(r)&&r!==t&&r!==i)return r}else if(o===!1&&An(i)&&t!==i)return null}return!1}function Va(n,e,t,i){const s=e._rootScopes,l=S_(e._fallback,t,i),o=[...n,...s],r=new Set;r.add(i);let a=gf(r,o,t,l||t,i);return a===null||An(l)&&l!==t&&(a=gf(r,o,l,a,i),a===null)?!1:Ha(Array.from(r),[""],s,l,()=>a2(e,t,i))}function gf(n,e,t,i,s){for(;t;)t=r2(n,e,t,i,s);return t}function a2(n,e,t){const i=n._getTarget();e in i||(i[e]={});const s=i[e];return gt(s)&&Ge(t)?t:s}function u2(n,e,t,i){let s;for(const l of e)if(s=T_(n2(l,n),t),An(s))return qa(n,s)?Va(t,i,n,s):s}function T_(n,e){for(const t of e){if(!t)continue;const i=t[n];if(An(i))return i}}function _f(n){let e=n._keys;return e||(e=n._keys=f2(n._scopes)),e}function f2(n){const e=new Set;for(const t of n)for(const i of Object.keys(t).filter(s=>!s.startsWith("_")))e.add(i);return Array.from(e)}function C_(n,e,t,i){const{iScale:s}=n,{key:l="r"}=this._parsing,o=new Array(i);let r,a,u,f;for(r=0,a=i;ren==="x"?"y":"x";function d2(n,e,t,i){const s=n.skip?e:n,l=e,o=t.skip?e:t,r=Zr(l,s),a=Zr(o,l);let u=r/(r+a),f=a/(r+a);u=isNaN(u)?0:u,f=isNaN(f)?0:f;const c=i*u,d=i*f;return{previous:{x:l.x-c*(o.x-s.x),y:l.y-c*(o.y-s.y)},next:{x:l.x+d*(o.x-s.x),y:l.y+d*(o.y-s.y)}}}function p2(n,e,t){const i=n.length;let s,l,o,r,a,u=Ds(n,0);for(let f=0;f!u.skip)),e.cubicInterpolationMode==="monotone")h2(n,s);else{let u=i?n[n.length-1]:n[0];for(l=0,o=n.length;lwindow.getComputedStyle(n,null);function b2(n,e){return Wo(n).getPropertyValue(e)}const v2=["top","right","bottom","left"];function Wi(n,e,t){const i={};t=t?"-"+t:"";for(let s=0;s<4;s++){const l=v2[s];i[l]=parseFloat(n[e+"-"+l+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const y2=(n,e,t)=>(n>0||e>0)&&(!t||!t.shadowRoot);function k2(n,e){const t=n.touches,i=t&&t.length?t[0]:n,{offsetX:s,offsetY:l}=i;let o=!1,r,a;if(y2(s,l,n.target))r=s,a=l;else{const u=e.getBoundingClientRect();r=i.clientX-u.left,a=i.clientY-u.top,o=!0}return{x:r,y:a,box:o}}function Hi(n,e){if("native"in n)return n;const{canvas:t,currentDevicePixelRatio:i}=e,s=Wo(t),l=s.boxSizing==="border-box",o=Wi(s,"padding"),r=Wi(s,"border","width"),{x:a,y:u,box:f}=k2(n,t),c=o.left+(f&&r.left),d=o.top+(f&&r.top);let{width:m,height:h}=e;return l&&(m-=o.width+r.width,h-=o.height+r.height),{x:Math.round((a-c)/m*t.width/i),y:Math.round((u-d)/h*t.height/i)}}function w2(n,e,t){let i,s;if(e===void 0||t===void 0){const l=za(n);if(!l)e=n.clientWidth,t=n.clientHeight;else{const o=l.getBoundingClientRect(),r=Wo(l),a=Wi(r,"border","width"),u=Wi(r,"padding");e=o.width-u.width-a.width,t=o.height-u.height-a.height,i=Do(r.maxWidth,l,"clientWidth"),s=Do(r.maxHeight,l,"clientHeight")}}return{width:e,height:t,maxWidth:i||So,maxHeight:s||So}}const cr=n=>Math.round(n*10)/10;function S2(n,e,t,i){const s=Wo(n),l=Wi(s,"margin"),o=Do(s.maxWidth,n,"clientWidth")||So,r=Do(s.maxHeight,n,"clientHeight")||So,a=w2(n,e,t);let{width:u,height:f}=a;if(s.boxSizing==="content-box"){const c=Wi(s,"border","width"),d=Wi(s,"padding");u-=d.width+c.width,f-=d.height+c.height}return u=Math.max(0,u-l.width),f=Math.max(0,i?Math.floor(u/i):f-l.height),u=cr(Math.min(u,o,a.maxWidth)),f=cr(Math.min(f,r,a.maxHeight)),u&&!f&&(f=cr(u/2)),{width:u,height:f}}function bf(n,e,t){const i=e||1,s=Math.floor(n.height*i),l=Math.floor(n.width*i);n.height=s/i,n.width=l/i;const o=n.canvas;return o.style&&(t||!o.style.height&&!o.style.width)&&(o.style.height=`${n.height}px`,o.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||o.height!==s||o.width!==l?(n.currentDevicePixelRatio=i,o.height=s,o.width=l,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const T2=function(){let n=!1;try{const e={get passive(){return n=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return n}();function vf(n,e){const t=b2(n,e),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function qi(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)}}function C2(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:i==="middle"?t<.5?n.y:e.y:i==="after"?t<1?n.y:e.y:t>0?e.y:n.y}}function $2(n,e,t,i){const s={x:n.cp2x,y:n.cp2y},l={x:e.cp1x,y:e.cp1y},o=qi(n,s,t),r=qi(s,l,t),a=qi(l,e,t),u=qi(o,r,t),f=qi(r,a,t);return qi(u,f,t)}const yf=new Map;function M2(n,e){e=e||{};const t=n+JSON.stringify(e);let i=yf.get(t);return i||(i=new Intl.NumberFormat(n,e),yf.set(t,i)),i}function El(n,e,t){return M2(e,t).format(n)}const D2=function(n,e){return{x(t){return n+n+e-t},setWidth(t){e=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,i){return t-i},leftForLtr(t,i){return t-i}}},O2=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,e){return n+e},leftForLtr(n,e){return n}}};function dr(n,e,t){return n?D2(e,t):O2()}function E2(n,e){let t,i;(e==="ltr"||e==="rtl")&&(t=n.canvas.style,i=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",e,"important"),n.prevTextDirection=i)}function A2(n,e){e!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",e[0],e[1]))}function D_(n){return n==="angle"?{between:pl,compare:my,normalize:gn}:{between:ml,compare:(e,t)=>e-t,normalize:e=>e}}function kf({start:n,end:e,count:t,loop:i,style:s}){return{start:n%t,end:e%t,loop:i&&(e-n+1)%t===0,style:s}}function I2(n,e,t){const{property:i,start:s,end:l}=t,{between:o,normalize:r}=D_(i),a=e.length;let{start:u,end:f,loop:c}=n,d,m;if(c){for(u+=a,f+=a,d=0,m=a;da(s,T,y)&&r(s,T)!==0,M=()=>r(l,y)===0||a(l,T,y),$=()=>g||C(),O=()=>!g||M();for(let E=f,I=f;E<=c;++E)k=e[E%o],!k.skip&&(y=u(k[i]),y!==T&&(g=a(y,s,l),b===null&&$()&&(b=r(y,s)===0?E:I),b!==null&&O()&&(h.push(kf({start:b,end:E,loop:d,count:o,style:m})),b=null),I=E,T=y));return b!==null&&h.push(kf({start:b,end:c,loop:d,count:o,style:m})),h}function E_(n,e){const t=[],i=n.segments;for(let s=0;ss&&n[l%e].skip;)l--;return l%=e,{start:s,end:l}}function L2(n,e,t,i){const s=n.length,l=[];let o=e,r=n[e],a;for(a=e+1;a<=t;++a){const u=n[a%s];u.skip||u.stop?r.skip||(i=!1,l.push({start:e%s,end:(a-1)%s,loop:i}),e=o=u.stop?a:null):(o=a,r.skip&&(e=a)),r=u}return o!==null&&l.push({start:e%s,end:o%s,loop:i}),l}function N2(n,e){const t=n.points,i=n.options.spanGaps,s=t.length;if(!s)return[];const l=!!n._loop,{start:o,end:r}=P2(t,s,l,i);if(i===!0)return wf(n,[{start:o,end:r,loop:l}],t,e);const a=rr({chart:e,initial:t.initial,numSteps:o,currentStep:Math.min(i-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=c_.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const l=i.items;let o=l.length-1,r=!1,a;for(;o>=0;--o)a=l[o],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(e),r=!0):(l[o]=l[l.length-1],l.pop());r&&(s.draw(),this._notify(s,i,e,"progress")),l.length||(i.running=!1,this._notify(s,i,e,"complete"),i.initial=!1),t+=l.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){const t=this._charts;let i=t.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,i)),i}listen(e,t,i){this._getAnims(e).listeners[t].push(i)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const i=t.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var ni=new j2;const Tf="transparent",H2={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=mf(n||Tf),s=i.valid&&mf(e||Tf);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class q2{constructor(e,t,i,s){const l=t[i];s=Jl([e.to,s,l,e.from]);const o=Jl([e.from,l,s]);this._active=!0,this._fn=e.fn||H2[e.type||typeof o],this._easing=il[e.easing]||il.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);const s=this._target[this._prop],l=i-this._start,o=this._duration-l;this._start=i,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=l,this._loop=!!e.loop,this._to=Jl([e.to,t,s,e.from]),this._from=Jl([e.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,i=this._duration,s=this._prop,l=this._from,o=this._loop,r=this._to;let a;if(this._active=l!==r&&(o||t1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[s]=this._fn(l,r,a)}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,i)=>{e.push({res:t,rej:i})})}_notify(e){const t=e?"res":"rej",i=this._promises||[];for(let s=0;sn!=="onProgress"&&n!=="onComplete"&&n!=="fn"});tt.set("animations",{colors:{type:"color",properties:z2},numbers:{type:"number",properties:V2}});tt.describe("animations",{_fallback:"animation"});tt.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:n=>n|0}}}});class A_{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!Ge(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!Ge(s))return;const l={};for(const o of B2)l[o]=s[o];(gt(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=W2(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&U2(e.options.$animations,i).then(()=>{e.options=i},()=>{}),l}_createAnimations(e,t){const i=this._properties,s=[],l=e.$animations||(e.$animations={}),o=Object.keys(t),r=Date.now();let a;for(a=o.length-1;a>=0;--a){const u=o[a];if(u.charAt(0)==="$")continue;if(u==="options"){s.push(...this._animateOptions(e,t));continue}const f=t[u];let c=l[u];const d=i.get(u);if(c)if(d&&c.active()){c.update(d,f,r);continue}else c.cancel();if(!d||!d.duration){e[u]=f;continue}l[u]=c=new q2(d,e,u,f),s.push(c)}return s}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}const i=this._createAnimations(e,t);if(i.length)return ni.add(this._chart,i),!0}}function U2(n,e){const t=[],i=Object.keys(e);for(let s=0;s0||!t&&l<0)return s.index}return null}function Of(n,e){const{chart:t,_cachedMeta:i}=n,s=t._stacks||(t._stacks={}),{iScale:l,vScale:o,index:r}=i,a=l.axis,u=o.axis,f=Z2(l,o,i),c=e.length;let d;for(let m=0;mt[i].axis===e).shift()}function x2(n,e){return $i(n,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Q2(n,e,t){return $i(n,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function Bs(n,e){const t=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){e=e||n._parsed;for(const s of e){const l=s._stacks;if(!l||l[i]===void 0||l[i][t]===void 0)return;delete l[i][t]}}}const mr=n=>n==="reset"||n==="none",Ef=(n,e)=>e?n:Object.assign({},n),ek=(n,e,t)=>n&&!e.hidden&&e._stacked&&{keys:I_(t,!0),values:null};class zn{constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Mf(e.vScale,e),this.addElements()}updateIndex(e){this.index!==e&&Bs(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,i=this.getDataset(),s=(c,d,m,h)=>c==="x"?d:c==="r"?h:m,l=t.xAxisID=et(i.xAxisID,pr(e,"x")),o=t.yAxisID=et(i.yAxisID,pr(e,"y")),r=t.rAxisID=et(i.rAxisID,pr(e,"r")),a=t.indexAxis,u=t.iAxisID=s(a,l,o,r),f=t.vAxisID=s(a,o,l,r);t.xScale=this.getScaleForId(l),t.yScale=this.getScaleForId(o),t.rScale=this.getScaleForId(r),t.iScale=this.getScaleForId(u),t.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&of(this._data,this),e._stacked&&Bs(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),i=this._data;if(Ge(t))this._data=J2(t);else if(i!==t){if(i){of(i,this);const s=this._cachedMeta;Bs(s),s._parsed=[]}t&&Object.isExtensible(t)&&by(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const l=t._stacked;t._stacked=Mf(t.vScale,t),t.stack!==i.stack&&(s=!0,Bs(t),t.stack=i.stack),this._resyncElements(e),(s||l!==t._stacked)&&Of(this,t._parsed)}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:i,_data:s}=this,{iScale:l,_stacked:o}=i,r=l.axis;let a=e===0&&t===s.length?!0:i._sorted,u=e>0&&i._parsed[e-1],f,c,d;if(this._parsing===!1)i._parsed=s,i._sorted=!0,d=s;else{gt(s[e])?d=this.parseArrayData(i,s,e,t):Ge(s[e])?d=this.parseObjectData(i,s,e,t):d=this.parsePrimitiveData(i,s,e,t);const m=()=>c[r]===null||u&&c[r]g||c=0;--d)if(!h()){this.updateRangeFromParsed(u,e,m,a);break}}return u}getAllParsedValues(e){const t=this._cachedMeta._parsed,i=[];let s,l,o;for(s=0,l=t.length;s=0&&ethis.getContext(i,s),g=u.resolveNamedOptions(d,m,h,c);return g.$shared&&(g.$shared=a,l[o]=Object.freeze(Ef(g,a))),g}_resolveAnimations(e,t,i){const s=this.chart,l=this._cachedDataOpts,o=`animation-${t}`,r=l[o];if(r)return r;let a;if(s.options.animation!==!1){const f=this.chart.config,c=f.datasetAnimationScopeKeys(this._type,t),d=f.getOptionScopes(this.getDataset(),c);a=f.createResolver(d,this.getContext(e,i,t))}const u=new A_(s,a&&a.animations);return a&&a._cacheable&&(l[o]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||mr(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const i=this.resolveDataElementOptions(e,t),s=this._sharedOptions,l=this.getSharedOptions(i),o=this.includeOptions(t,l)||l!==s;return this.updateSharedOptions(l,t,i),{sharedOptions:l,includeOptions:o}}updateElement(e,t,i,s){mr(s)?Object.assign(e,i):this._resolveAnimations(t,s).update(e,i)}updateSharedOptions(e,t,i){e&&!mr(t)&&this._resolveAnimations(void 0,t).update(e,i)}_setStyle(e,t,i,s){e.active=s;const l=this.getStyle(t,s);this._resolveAnimations(t,i,s).update(e,{options:!s&&this.getSharedOptions(l)||l})}removeHoverStyle(e,t,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,t,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,i=this._cachedMeta.data;for(const[r,a,u]of this._syncList)this[r](a,u);this._syncList=[];const s=i.length,l=t.length,o=Math.min(l,s);o&&this.parse(0,o),l>s?this._insertElements(s,l-s,e):l{for(u.length+=t,r=u.length-1;r>=o;r--)u[r]=u[r-t]};for(a(l),r=e;rs-l))}return n._cache.$bar}function nk(n){const e=n.iScale,t=tk(e,n.type);let i=e._length,s,l,o,r;const a=()=>{o===32767||o===-32768||(An(r)&&(i=Math.min(i,Math.abs(o-r)||i)),r=o)};for(s=0,l=t.length;s0?s[n-1]:null,r=nMath.abs(r)&&(a=r,u=o),e[t.axis]=u,e._custom={barStart:a,barEnd:u,start:s,end:l,min:o,max:r}}function P_(n,e,t,i){return gt(n)?lk(n,e,t,i):e[t.axis]=t.parse(n,i),e}function Af(n,e,t,i){const s=n.iScale,l=n.vScale,o=s.getLabels(),r=s===l,a=[];let u,f,c,d;for(u=t,f=t+i;u=t?1:-1)}function rk(n){let e,t,i,s,l;return n.horizontal?(e=n.base>n.x,t="left",i="right"):(e=n.basea.controller.options.grouped),l=i.options.stacked,o=[],r=a=>{const u=a.controller.getParsed(t),f=u&&u[a.vScale.axis];if(ut(f)||isNaN(f))return!0};for(const a of s)if(!(t!==void 0&&r(a))&&((l===!1||o.indexOf(a.stack)===-1||l===void 0&&a.stack===void 0)&&o.push(a.stack),a.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,t,i){const s=this._getStacks(e,i),l=t!==void 0?s.indexOf(t):-1;return l===-1?s.length-1:l}_getRuler(){const e=this.options,t=this._cachedMeta,i=t.iScale,s=[];let l,o;for(l=0,o=t.data.length;l=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}getLabelAndValue(e){const t=this._cachedMeta,{xScale:i,yScale:s}=t,l=this.getParsed(e),o=i.getLabelForValue(l.x),r=s.getLabelForValue(l.y),a=l._custom;return{label:t.label,value:"("+o+", "+r+(a?", "+a:"")+")"}}update(e){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,i,s){const l=s==="reset",{iScale:o,vScale:r}=this._cachedMeta,{sharedOptions:a,includeOptions:u}=this._getSharedOptions(t,s),f=o.axis,c=r.axis;for(let d=t;dpl(T,r,a,!0)?1:Math.max(C,C*t,M,M*t),h=(T,C,M)=>pl(T,r,a,!0)?-1:Math.min(C,C*t,M,M*t),g=m(0,u,c),b=m(kt,f,d),y=h(Tt,u,c),k=h(Tt+kt,f,d);i=(g-y)/2,s=(b-k)/2,l=-(g+y)/2,o=-(b+k)/2}return{ratioX:i,ratioY:s,offsetX:l,offsetY:o}}class Al extends zn{constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let l=a=>+i[a];if(Ge(i[e])){const{key:a="value"}=this._parsing;l=u=>+ki(i[u],a)}let o,r;for(o=e,r=e+t;o0&&!isNaN(e)?dt*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=El(t._parsed[e],i.options.locale);return{label:s[e]||"",value:l}}getMaxBorderWidth(e){let t=0;const i=this.chart;let s,l,o,r,a;if(!e){for(s=0,l=i.data.datasets.length;sn!=="spacing",_indexable:n=>n!=="spacing"};Al.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const e=n.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:t}}=n.legend.options;return e.labels.map((i,s)=>{const o=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:t,hidden:!n.getDataVisibility(s),index:s}})}return[]}},onClick(n,e,t){t.chart.toggleDataVisibility(e.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){let e=n.label;const t=": "+n.formattedValue;return gt(e)?(e=e.slice(),e[0]+=t):e+=t,e}}}}};class Yo extends zn{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:i,data:s=[],_dataset:l}=t,o=this.chart._animationsDisabled;let{start:r,count:a}=p_(t,s,o);this._drawStart=r,this._drawCount=a,m_(t)&&(r=0,a=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!l._decimated,i.points=s;const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:u},e),this.updateElements(s,r,a,e)}updateElements(e,t,i,s){const l=s==="reset",{iScale:o,vScale:r,_stacked:a,_dataset:u}=this._cachedMeta,{sharedOptions:f,includeOptions:c}=this._getSharedOptions(t,s),d=o.axis,m=r.axis,{spanGaps:h,segment:g}=this.options,b=$s(h)?h:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||l||s==="none";let k=t>0&&this.getParsed(t-1);for(let T=t;T0&&Math.abs(M[d]-k[d])>b,g&&($.parsed=M,$.raw=u.data[T]),c&&($.options=f||this.resolveDataElementOptions(T,C.active?"active":s)),y||this.updateElement(C,T,$,s),k=M}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,i=t.options&&t.options.borderWidth||0,s=e.data||[];if(!s.length)return i;const l=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,l,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Yo.id="line";Yo.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};Yo.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Wa extends zn{constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=El(t._parsed[e].r,i.options.locale);return{label:s[e]||"",value:l}}parseObjectData(e,t,i,s){return C_.bind(this)(e,t,i,s)}update(e){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){const e=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((i,s)=>{const l=this.getParsed(s).r;!isNaN(l)&&this.chart.getDataVisibility(s)&&(lt.max&&(t.max=l))}),t}_updateRadius(){const e=this.chart,t=e.chartArea,i=e.options,s=Math.min(t.right-t.left,t.bottom-t.top),l=Math.max(s/2,0),o=Math.max(i.cutoutPercentage?l/100*i.cutoutPercentage:1,0),r=(l-o)/e.getVisibleDatasetCount();this.outerRadius=l-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(e,t,i,s){const l=s==="reset",o=this.chart,a=o.options.animation,u=this._cachedMeta.rScale,f=u.xCenter,c=u.yCenter,d=u.getIndexAngle(0)-.5*Tt;let m=d,h;const g=360/this.countVisibleElements();for(h=0;h{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&t++}),t}_computeAngle(e,t,i){return this.chart.getDataVisibility(e)?jn(this.resolveDataElementOptions(e,t).angle||i):0}}Wa.id="polarArea";Wa.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};Wa.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const e=n.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:t}}=n.legend.options;return e.labels.map((i,s)=>{const o=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:t,hidden:!n.getDataVisibility(s),index:s}})}return[]}},onClick(n,e,t){t.chart.toggleDataVisibility(e.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){return n.chart.data.labels[n.dataIndex]+": "+n.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class L_ extends Al{}L_.id="pie";L_.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Ya extends zn{getLabelAndValue(e){const t=this._cachedMeta.vScale,i=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(i[t.axis])}}parseObjectData(e,t,i,s){return C_.bind(this)(e,t,i,s)}update(e){const t=this._cachedMeta,i=t.dataset,s=t.data||[],l=t.iScale.getLabels();if(i.points=s,e!=="resize"){const o=this.resolveDatasetElementOptions(e);this.options.showLine||(o.borderWidth=0);const r={_loop:!0,_fullLoop:l.length===s.length,options:o};this.updateElement(i,void 0,r,e)}this.updateElements(s,0,s.length,e)}updateElements(e,t,i,s){const l=this._cachedMeta.rScale,o=s==="reset";for(let r=t;r{s[l]=i[l]&&i[l].active()?i[l]._to:this[l]}),s}};ai.defaults={};ai.defaultRoutes=void 0;const N_={values(n){return gt(n)?n:""+n},numeric(n,e,t){if(n===0)return"0";const i=this.chart.options.locale;let s,l=n;if(t.length>1){const u=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(u<1e-4||u>1e15)&&(s="scientific"),l=dk(n,t)}const o=Dn(Math.abs(l)),r=Math.max(Math.min(-1*Math.floor(o),20),0),a={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(a,this.options.ticks.format),El(n,i,a)},logarithmic(n,e,t){if(n===0)return"0";const i=n/Math.pow(10,Math.floor(Dn(n)));return i===1||i===2||i===5?N_.numeric.call(this,n,e,t):""}};function dk(n,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&n!==Math.floor(n)&&(t=n-Math.floor(n)),t}var Ko={formatters:N_};tt.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(n,e)=>e.lineWidth,tickColor:(n,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ko.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});tt.route("scale.ticks","color","","color");tt.route("scale.grid","color","","borderColor");tt.route("scale.grid","borderColor","","borderColor");tt.route("scale.title","color","","color");tt.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"});tt.describe("scales",{_fallback:"scale"});tt.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"});function pk(n,e){const t=n.options.ticks,i=t.maxTicksLimit||mk(n),s=t.major.enabled?gk(e):[],l=s.length,o=s[0],r=s[l-1],a=[];if(l>i)return _k(e,a,s,l/i),a;const u=hk(s,e,i);if(l>0){let f,c;const d=l>1?Math.round((r-o)/(l-1)):null;for(Gl(e,a,u,ut(d)?0:o-d,o),f=0,c=l-1;fs)return a}return Math.max(s,1)}function gk(n){const e=[];let t,i;for(t=0,i=n.length;tn==="left"?"right":n==="right"?"left":n,Lf=(n,e,t)=>e==="top"||e==="left"?n[e]+t:n[e]-t;function Nf(n,e){const t=[],i=n.length/e,s=n.length;let l=0;for(;lo+r)))return a}function kk(n,e){ct(n,t=>{const i=t.gc,s=i.length/2;let l;if(s>e){for(l=0;li?i:t,i=s&&t>i?t:i,{min:Tn(t,Tn(i,t)),max:Tn(i,Tn(t,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){yt(this.options.beforeUpdate,[this])}update(e,t,i){const{beginAtZero:s,grace:l,ticks:o}=this.options,r=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=t2(this,l,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=r=l||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const f=this._getLabelSizes(),c=f.widest.width,d=f.highest.height,m=Wt(this.chart.width-c,0,this.maxWidth);r=e.offset?this.maxWidth/i:m/(i-1),c+6>r&&(r=m/(i-(e.offset?.5:1)),a=this.maxHeight-Us(e.grid)-t.padding-Ff(e.title,this.chart.options.font),u=Math.sqrt(c*c+d*d),o=Aa(Math.min(Math.asin(Wt((f.highest.height+6)/r,-1,1)),Math.asin(Wt(a/u,-1,1))-Math.asin(Wt(d/u,-1,1)))),o=Math.max(s,Math.min(l,o))),this.labelRotation=o}afterCalculateLabelRotation(){yt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){yt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:i,title:s,grid:l}}=this,o=this._isVisible(),r=this.isHorizontal();if(o){const a=Ff(s,t.options.font);if(r?(e.width=this.maxWidth,e.height=Us(l)+a):(e.height=this.maxHeight,e.width=Us(l)+a),i.display&&this.ticks.length){const{first:u,last:f,widest:c,highest:d}=this._getLabelSizes(),m=i.padding*2,h=jn(this.labelRotation),g=Math.cos(h),b=Math.sin(h);if(r){const y=i.mirror?0:b*c.width+g*d.height;e.height=Math.min(this.maxHeight,e.height+y+m)}else{const y=i.mirror?0:g*c.width+b*d.height;e.width=Math.min(this.maxWidth,e.width+y+m)}this._calculatePadding(u,f,b,g)}}this._handleMargins(),r?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,i,s){const{ticks:{align:l,padding:o},position:r}=this.options,a=this.labelRotation!==0,u=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,m=0;a?u?(d=s*e.width,m=i*t.height):(d=i*e.height,m=s*t.width):l==="start"?m=t.width:l==="end"?d=e.width:l!=="inner"&&(d=e.width/2,m=t.width/2),this.paddingLeft=Math.max((d-f+o)*this.width/(this.width-f),0),this.paddingRight=Math.max((m-c+o)*this.width/(this.width-c),0)}else{let f=t.height/2,c=e.height/2;l==="start"?(f=0,c=e.height):l==="end"&&(f=t.height,c=0),this.paddingTop=f+o,this.paddingBottom=c+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){yt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return t==="top"||t==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,i;for(t=0,i=e.length;t({width:l[O]||0,height:o[O]||0});return{first:$(0),last:$(t-1),widest:$(C),highest:$(M),widths:l,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return hy(this._alignToPixels?Ni(this.chart,t,0):t)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&er*s?r/i:a/s:a*s0}_computeGridLineItems(e){const t=this.axis,i=this.chart,s=this.options,{grid:l,position:o}=s,r=l.offset,a=this.isHorizontal(),f=this.ticks.length+(r?1:0),c=Us(l),d=[],m=l.setContext(this.getContext()),h=m.drawBorder?m.borderWidth:0,g=h/2,b=function(ne){return Ni(i,ne,h)};let y,k,T,C,M,$,O,E,I,L,N,F;if(o==="top")y=b(this.bottom),$=this.bottom-c,E=y-g,L=b(e.top)+g,F=e.bottom;else if(o==="bottom")y=b(this.top),L=e.top,F=b(e.bottom)-g,$=y+g,E=this.top+c;else if(o==="left")y=b(this.right),M=this.right-c,O=y-g,I=b(e.left)+g,N=e.right;else if(o==="right")y=b(this.left),I=e.left,N=b(e.right)-g,M=y+g,O=this.left+c;else if(t==="x"){if(o==="center")y=b((e.top+e.bottom)/2+.5);else if(Ge(o)){const ne=Object.keys(o)[0],Z=o[ne];y=b(this.chart.scales[ne].getPixelForValue(Z))}L=e.top,F=e.bottom,$=y+g,E=$+c}else if(t==="y"){if(o==="center")y=b((e.left+e.right)/2);else if(Ge(o)){const ne=Object.keys(o)[0],Z=o[ne];y=b(this.chart.scales[ne].getPixelForValue(Z))}M=y-g,O=M-c,I=e.left,N=e.right}const U=et(s.ticks.maxTicksLimit,f),J=Math.max(1,Math.ceil(f/U));for(k=0;kl.value===e);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const t=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let l,o;const r=(a,u,f)=>{!f.width||!f.color||(i.save(),i.lineWidth=f.width,i.strokeStyle=f.color,i.setLineDash(f.borderDash||[]),i.lineDashOffset=f.borderDashOffset,i.beginPath(),i.moveTo(a.x,a.y),i.lineTo(u.x,u.y),i.stroke(),i.restore())};if(t.display)for(l=0,o=s.length;l{this.draw(s)}}]:[{z:i,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:t,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let l,o;for(l=0,o=t.length;l{const i=t.split("."),s=i.pop(),l=[n].concat(i).join("."),o=e[t].split("."),r=o.pop(),a=o.join(".");tt.route(l,s,a,r)})}function Dk(n){return"id"in n&&"defaults"in n}class Ok{constructor(){this.controllers=new Xl(zn,"datasets",!0),this.elements=new Xl(ai,"elements"),this.plugins=new Xl(Object,"plugins"),this.scales=new Xl(Qi,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,i){[...t].forEach(s=>{const l=i||this._getRegistryForType(s);i||l.isForType(s)||l===this.plugins&&s.id?this._exec(e,l,s):ct(s,o=>{const r=i||this._getRegistryForType(o);this._exec(e,r,o)})})}_exec(e,t,i){const s=Ea(e);yt(i["before"+s],[],i),t[e](i),yt(i["after"+s],[],i)}_getRegistryForType(e){for(let t=0;t0&&this.getParsed(t-1);for(let C=t;C0&&Math.abs($[m]-T[m])>y,b&&(O.parsed=$,O.raw=u.data[C]),d&&(O.options=c||this.resolveDataElementOptions(C,M.active?"active":s)),k||this.updateElement(M,C,O,s),T=$}this.updateSharedOptions(c,s,f)}getMaxOverflow(){const e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let r=0;for(let a=t.length-1;a>=0;--a)r=Math.max(r,t[a].size(this.resolveDataElementOptions(a))/2);return r>0&&r}const i=e.dataset,s=i.options&&i.options.borderWidth||0;if(!t.length)return s;const l=t[0].size(this.resolveDataElementOptions(0)),o=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(s,l,o)/2}}Ka.id="scatter";Ka.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};Ka.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(n){return"("+n.label+", "+n.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function Fi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Qr{constructor(e){this.options=e||{}}init(e){}formats(){return Fi()}parse(e,t){return Fi()}format(e,t){return Fi()}add(e,t,i){return Fi()}diff(e,t,i){return Fi()}startOf(e,t,i){return Fi()}endOf(e,t){return Fi()}}Qr.override=function(n){Object.assign(Qr.prototype,n)};var F_={_date:Qr};function Ek(n,e,t,i){const{controller:s,data:l,_sorted:o}=n,r=s._cachedMeta.iScale;if(r&&e===r.axis&&e!=="r"&&o&&l.length){const a=r._reversePixels?gy:zi;if(i){if(s._sharedOptions){const u=l[0],f=typeof u.getRange=="function"&&u.getRange(e);if(f){const c=a(l,e,t-f),d=a(l,e,t+f);return{lo:c.lo,hi:d.hi}}}}else return a(l,e,t)}return{lo:0,hi:l.length-1}}function Il(n,e,t,i,s){const l=n.getSortedVisibleDatasetMetas(),o=t[e];for(let r=0,a=l.length;r{a[o](e[t],s)&&(l.push({element:a,datasetIndex:u,index:f}),r=r||a.inRange(e.x,e.y,s))}),i&&!r?[]:l}var Lk={evaluateInteractionItems:Il,modes:{index(n,e,t,i){const s=Hi(e,n),l=t.axis||"x",o=t.includeInvisible||!1,r=t.intersect?gr(n,s,l,i,o):_r(n,s,l,!1,i,o),a=[];return r.length?(n.getSortedVisibleDatasetMetas().forEach(u=>{const f=r[0].index,c=u.data[f];c&&!c.skip&&a.push({element:c,datasetIndex:u.index,index:f})}),a):[]},dataset(n,e,t,i){const s=Hi(e,n),l=t.axis||"xy",o=t.includeInvisible||!1;let r=t.intersect?gr(n,s,l,i,o):_r(n,s,l,!1,i,o);if(r.length>0){const a=r[0].datasetIndex,u=n.getDatasetMeta(a).data;r=[];for(let f=0;ft.pos===e)}function jf(n,e){return n.filter(t=>R_.indexOf(t.pos)===-1&&t.box.axis===e)}function Ys(n,e){return n.sort((t,i)=>{const s=e?i:t,l=e?t:i;return s.weight===l.weight?s.index-l.index:s.weight-l.weight})}function Nk(n){const e=[];let t,i,s,l,o,r;for(t=0,i=(n||[]).length;tu.box.fullSize),!0),i=Ys(Ws(e,"left"),!0),s=Ys(Ws(e,"right")),l=Ys(Ws(e,"top"),!0),o=Ys(Ws(e,"bottom")),r=jf(e,"x"),a=jf(e,"y");return{fullSize:t,leftAndTop:i.concat(l),rightAndBottom:s.concat(a).concat(o).concat(r),chartArea:Ws(e,"chartArea"),vertical:i.concat(s).concat(a),horizontal:l.concat(o).concat(r)}}function Hf(n,e,t,i){return Math.max(n[t],e[t])+Math.max(n[i],e[i])}function j_(n,e){n.top=Math.max(n.top,e.top),n.left=Math.max(n.left,e.left),n.bottom=Math.max(n.bottom,e.bottom),n.right=Math.max(n.right,e.right)}function Hk(n,e,t,i){const{pos:s,box:l}=t,o=n.maxPadding;if(!Ge(s)){t.size&&(n[s]-=t.size);const c=i[t.stack]||{size:0,count:1};c.size=Math.max(c.size,t.horizontal?l.height:l.width),t.size=c.size/c.count,n[s]+=t.size}l.getPadding&&j_(o,l.getPadding());const r=Math.max(0,e.outerWidth-Hf(o,n,"left","right")),a=Math.max(0,e.outerHeight-Hf(o,n,"top","bottom")),u=r!==n.w,f=a!==n.h;return n.w=r,n.h=a,t.horizontal?{same:u,other:f}:{same:f,other:u}}function qk(n){const e=n.maxPadding;function t(i){const s=Math.max(e[i]-n[i],0);return n[i]+=s,s}n.y+=t("top"),n.x+=t("left"),t("right"),t("bottom")}function Vk(n,e){const t=e.maxPadding;function i(s){const l={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{l[o]=Math.max(e[o],t[o])}),l}return i(n?["left","right"]:["top","bottom"])}function xs(n,e,t,i){const s=[];let l,o,r,a,u,f;for(l=0,o=n.length,u=0;l{typeof g.beforeLayout=="function"&&g.beforeLayout()});const f=a.reduce((g,b)=>b.box.options&&b.box.options.display===!1?g:g+1,0)||1,c=Object.freeze({outerWidth:e,outerHeight:t,padding:s,availableWidth:l,availableHeight:o,vBoxMaxWidth:l/2/f,hBoxMaxHeight:o/2}),d=Object.assign({},s);j_(d,In(i));const m=Object.assign({maxPadding:d,w:l,h:o,x:s.left,y:s.top},s),h=Rk(a.concat(u),c);xs(r.fullSize,m,c,h),xs(a,m,c,h),xs(u,m,c,h)&&xs(a,m,c,h),qk(m),qf(r.leftAndTop,m,c,h),m.x+=m.w,m.y+=m.h,qf(r.rightAndBottom,m,c,h),n.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},ct(r.chartArea,g=>{const b=g.box;Object.assign(b,n.chartArea),b.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class H_{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,i){}removeEventListener(e,t,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,i,s){return t=Math.max(0,t||e.width),i=i||e.height,{width:t,height:Math.max(0,s?Math.floor(t/s):i)}}isAttached(e){return!0}updateConfig(e){}}class zk extends H_{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const co="$chartjs",Bk={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Vf=n=>n===null||n==="";function Uk(n,e){const t=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[co]={initial:{height:i,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",Vf(s)){const l=vf(n,"width");l!==void 0&&(n.width=l)}if(Vf(i))if(n.style.height==="")n.height=n.width/(e||2);else{const l=vf(n,"height");l!==void 0&&(n.height=l)}return n}const q_=T2?{passive:!0}:!1;function Wk(n,e,t){n.addEventListener(e,t,q_)}function Yk(n,e,t){n.canvas.removeEventListener(e,t,q_)}function Kk(n,e){const t=Bk[n.type]||n.type,{x:i,y:s}=Hi(n,e);return{type:t,chart:e,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Oo(n,e){for(const t of n)if(t===e||t.contains(e))return!0}function Jk(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||Oo(r.addedNodes,i),o=o&&!Oo(r.removedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function Zk(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||Oo(r.removedNodes,i),o=o&&!Oo(r.addedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const gl=new Map;let zf=0;function V_(){const n=window.devicePixelRatio;n!==zf&&(zf=n,gl.forEach((e,t)=>{t.currentDevicePixelRatio!==n&&e()}))}function Gk(n,e){gl.size||window.addEventListener("resize",V_),gl.set(n,e)}function Xk(n){gl.delete(n),gl.size||window.removeEventListener("resize",V_)}function xk(n,e,t){const i=n.canvas,s=i&&za(i);if(!s)return;const l=d_((r,a)=>{const u=s.clientWidth;t(r,a),u{const a=r[0],u=a.contentRect.width,f=a.contentRect.height;u===0&&f===0||l(u,f)});return o.observe(s),Gk(n,l),o}function br(n,e,t){t&&t.disconnect(),e==="resize"&&Xk(n)}function Qk(n,e,t){const i=n.canvas,s=d_(l=>{n.ctx!==null&&t(Kk(l,n))},n,l=>{const o=l[0];return[o,o.offsetX,o.offsetY]});return Wk(i,e,s),s}class ew extends H_{acquireContext(e,t){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(Uk(e,t),i):null}releaseContext(e){const t=e.canvas;if(!t[co])return!1;const i=t[co].initial;["height","width"].forEach(l=>{const o=i[l];ut(o)?t.removeAttribute(l):t.setAttribute(l,o)});const s=i.style||{};return Object.keys(s).forEach(l=>{t.style[l]=s[l]}),t.width=t.width,delete t[co],!0}addEventListener(e,t,i){this.removeEventListener(e,t);const s=e.$proxies||(e.$proxies={}),o={attach:Jk,detach:Zk,resize:xk}[t]||Qk;s[t]=o(e,t,i)}removeEventListener(e,t){const i=e.$proxies||(e.$proxies={}),s=i[t];if(!s)return;({attach:br,detach:br,resize:br}[t]||Yk)(e,t,s),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,s){return S2(e,t,i,s)}isAttached(e){const t=za(e);return!!(t&&t.isConnected)}}function tw(n){return!M_()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?zk:ew}class nw{constructor(){this._init=[]}notify(e,t,i,s){t==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const l=s?this._descriptors(e).filter(s):this._descriptors(e),o=this._notify(l,e,t,i);return t==="afterDestroy"&&(this._notify(l,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,t,i,s){s=s||{};for(const l of e){const o=l.plugin,r=o[i],a=[t,s,l.options];if(yt(r,a,o)===!1&&s.cancelable)return!1}return!0}invalidate(){ut(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const i=e&&e.config,s=et(i.options&&i.options.plugins,{}),l=iw(i);return s===!1&&!t?[]:lw(e,l,s,t)}_notifyStateChanges(e){const t=this._oldCache||[],i=this._cache,s=(l,o)=>l.filter(r=>!o.some(a=>r.plugin.id===a.plugin.id));this._notify(s(t,i),e,"stop"),this._notify(s(i,t),e,"start")}}function iw(n){const e={},t=[],i=Object.keys(Kn.plugins.items);for(let l=0;l{const a=i[r];if(!Ge(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const u=ta(r,a),f=aw(u,s),c=t.scales||{};l[u]=l[u]||r,o[r]=tl(Object.create(null),[{axis:u},a,c[u],c[f]])}),n.data.datasets.forEach(r=>{const a=r.type||n.type,u=r.indexAxis||ea(a,e),c=(Gi[a]||{}).scales||{};Object.keys(c).forEach(d=>{const m=rw(d,u),h=r[m+"AxisID"]||l[m]||m;o[h]=o[h]||Object.create(null),tl(o[h],[{axis:m},i[h],c[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];tl(a,[tt.scales[a.type],tt.scale])}),o}function z_(n){const e=n.options||(n.options={});e.plugins=et(e.plugins,{}),e.scales=fw(n,e)}function B_(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function cw(n){return n=n||{},n.data=B_(n.data),z_(n),n}const Bf=new Map,U_=new Set;function eo(n,e){let t=Bf.get(n);return t||(t=e(),Bf.set(n,t),U_.add(t)),t}const Ks=(n,e,t)=>{const i=ki(e,t);i!==void 0&&n.add(i)};class dw{constructor(e){this._config=cw(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=B_(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),z_(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return eo(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return eo(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return eo(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id,i=this.type;return eo(`${i}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){const i=this._scopeCache;let s=i.get(e);return(!s||t)&&(s=new Map,i.set(e,s)),s}getOptionScopes(e,t,i){const{options:s,type:l}=this,o=this._cachedScopes(e,i),r=o.get(t);if(r)return r;const a=new Set;t.forEach(f=>{e&&(a.add(e),f.forEach(c=>Ks(a,e,c))),f.forEach(c=>Ks(a,s,c)),f.forEach(c=>Ks(a,Gi[l]||{},c)),f.forEach(c=>Ks(a,tt,c)),f.forEach(c=>Ks(a,Xr,c))});const u=Array.from(a);return u.length===0&&u.push(Object.create(null)),U_.has(t)&&o.set(t,u),u}chartOptionScopes(){const{options:e,type:t}=this;return[e,Gi[t]||{},tt.datasets[t]||{},{type:t},tt,Xr]}resolveNamedOptions(e,t,i,s=[""]){const l={$shared:!0},{resolver:o,subPrefixes:r}=Uf(this._resolverCache,e,s);let a=o;if(mw(o,t)){l.$shared=!1,i=wi(i)?i():i;const u=this.createResolver(e,i,r);a=Ms(o,i,u)}for(const u of t)l[u]=a[u];return l}createResolver(e,t,i=[""],s){const{resolver:l}=Uf(this._resolverCache,e,i);return Ge(t)?Ms(l,t,void 0,s):l}}function Uf(n,e,t){let i=n.get(e);i||(i=new Map,n.set(e,i));const s=t.join();let l=i.get(s);return l||(l={resolver:Ha(e,t),subPrefixes:t.filter(r=>!r.toLowerCase().includes("hover"))},i.set(s,l)),l}const pw=n=>Ge(n)&&Object.getOwnPropertyNames(n).reduce((e,t)=>e||wi(n[t]),!1);function mw(n,e){const{isScriptable:t,isIndexable:i}=k_(n);for(const s of e){const l=t(s),o=i(s),r=(o||l)&&n[s];if(l&&(wi(r)||pw(r))||o&>(r))return!0}return!1}var hw="3.9.1";const gw=["top","bottom","left","right","chartArea"];function Wf(n,e){return n==="top"||n==="bottom"||gw.indexOf(n)===-1&&e==="x"}function Yf(n,e){return function(t,i){return t[n]===i[n]?t[e]-i[e]:t[n]-i[n]}}function Kf(n){const e=n.chart,t=e.options.animation;e.notifyPlugins("afterRender"),yt(t&&t.onComplete,[n],e)}function _w(n){const e=n.chart,t=e.options.animation;yt(t&&t.onProgress,[n],e)}function W_(n){return M_()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Eo={},Y_=n=>{const e=W_(n);return Object.values(Eo).filter(t=>t.canvas===e).pop()};function bw(n,e,t){const i=Object.keys(n);for(const s of i){const l=+s;if(l>=e){const o=n[s];delete n[s],(t>0||l>e)&&(n[l+t]=o)}}}function vw(n,e,t,i){return!t||n.type==="mouseout"?null:i?e:n}class Ao{constructor(e,t){const i=this.config=new dw(t),s=W_(e),l=Y_(s);if(l)throw new Error("Canvas is already in use. Chart with ID '"+l.id+"' must be destroyed before the canvas with ID '"+l.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||tw(s)),this.platform.updateConfig(i);const r=this.platform.acquireContext(s,o.aspectRatio),a=r&&r.canvas,u=a&&a.height,f=a&&a.width;if(this.id=iy(),this.ctx=r,this.canvas=a,this.width=f,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new nw,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=vy(c=>this.update(c),o.resizeDelay||0),this._dataChanges=[],Eo[this.id]=this,!r||!a){console.error("Failed to create chart: can't acquire context from the given item");return}ni.listen(this,"complete",Kf),ni.listen(this,"progress",_w),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:s,_aspectRatio:l}=this;return ut(e)?t&&l?l:s?i/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():bf(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return hf(this.canvas,this.ctx),this}stop(){return ni.stop(this),this}resize(e,t){ni.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const i=this.options,s=this.canvas,l=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,e,t,l),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,bf(this,r,!0)&&(this.notifyPlugins("resize",{size:o}),yt(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};ct(t,(i,s)=>{i.id=s})}buildOrUpdateScales(){const e=this.options,t=e.scales,i=this.scales,s=Object.keys(i).reduce((o,r)=>(o[r]=!1,o),{});let l=[];t&&(l=l.concat(Object.keys(t).map(o=>{const r=t[o],a=ta(o,r),u=a==="r",f=a==="x";return{options:r,dposition:u?"chartArea":f?"bottom":"left",dtype:u?"radialLinear":f?"category":"linear"}}))),ct(l,o=>{const r=o.options,a=r.id,u=ta(a,r),f=et(r.type,o.dtype);(r.position===void 0||Wf(r.position,u)!==Wf(o.dposition))&&(r.position=o.dposition),s[a]=!0;let c=null;if(a in i&&i[a].type===f)c=i[a];else{const d=Kn.getScale(f);c=new d({id:a,type:f,ctx:this.ctx,chart:this}),i[c.id]=c}c.init(r,e)}),ct(s,(o,r)=>{o||delete i[r]}),ct(i,o=>{Ql.configure(this,o,o.options),Ql.addBox(this,o)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,i=e.length;if(e.sort((s,l)=>s.index-l.index),i>t){for(let s=t;st.length&&delete this._stacks,e.forEach((i,s)=>{t.filter(l=>l===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=t.length;i{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const i=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const l=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,f=this.data.datasets.length;u{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Yf("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){ct(this.scales,e=>{Ql.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!tf(t,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:l}of t){const o=i==="_removeElements"?-l:l;bw(e,s,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,i=l=>new Set(e.filter(o=>o[0]===l).map((o,r)=>r+","+o.splice(1).join(","))),s=i(0);for(let l=1;ll.split(",")).map(l=>({method:l[1],start:+l[2],count:+l[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Ql.update(this,this.width,this.height,e);const t=this.chartArea,i=t.width<=0||t.height<=0;this._layers=[],ct(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,l)=>{s._idx=l}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let t=0,i=this.data.datasets.length;t=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,i=e._clip,s=!i.disabled,l=this.chartArea,o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&Fa(t,{left:i.left===!1?0:l.left-i.left,right:i.right===!1?this.width:l.right+i.right,top:i.top===!1?0:l.top-i.top,bottom:i.bottom===!1?this.height:l.bottom+i.bottom}),e.controller.draw(),s&&Ra(t),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return hl(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,i,s){const l=Lk.modes[t];return typeof l=="function"?l(this,e,i,s):[]}getDatasetMeta(e){const t=this.data.datasets[e],i=this._metasets;let s=i.filter(l=>l&&l._dataset===t).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=$i(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!t.hidden}setDatasetVisibility(e,t){const i=this.getDatasetMeta(e);i.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,i){const s=i?"show":"hide",l=this.getDatasetMeta(e),o=l.controller._resolveAnimations(void 0,s);An(t)?(l.data[t].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),o.update(l,{visible:i}),this.update(r=>r.datasetIndex===e?s:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),ni.remove(this),e=0,t=this.data.datasets.length;e{t.addEventListener(this,l,o),e[l]=o},s=(l,o,r)=>{l.offsetX=o,l.offsetY=r,this._eventHandler(l)};ct(this.options.events,l=>i(l,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,i=(a,u)=>{t.addEventListener(this,a,u),e[a]=u},s=(a,u)=>{e[a]&&(t.removeEventListener(this,a,u),delete e[a])},l=(a,u)=>{this.canvas&&this.resize(a,u)};let o;const r=()=>{s("attach",r),this.attached=!0,this.resize(),i("resize",l),i("detach",o)};o=()=>{this.attached=!1,s("resize",l),this._stop(),this._resize(0,0),i("attach",r)},t.isAttached(this.canvas)?r():o()}unbindEvents(){ct(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},ct(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,i){const s=i?"set":"remove";let l,o,r,a;for(t==="dataset"&&(l=this.getDatasetMeta(e[0].datasetIndex),l.controller["_"+s+"DatasetHoverStyle"]()),r=0,a=e.length;r{const r=this.getDatasetMeta(l);if(!r)throw new Error("No dataset found at index "+l);return{datasetIndex:l,element:r.data[o],index:o}});!ko(i,t)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,t))}notifyPlugins(e,t,i){return this._plugins.notify(this,e,t,i)}_updateHoverStyles(e,t,i){const s=this.options.hover,l=(a,u)=>a.filter(f=>!u.some(c=>f.datasetIndex===c.datasetIndex&&f.index===c.index)),o=l(t,e),r=i?e:l(e,t);o.length&&this.updateHoverStyle(o,s.mode,!1),r.length&&s.mode&&this.updateHoverStyle(r,s.mode,!0)}_eventHandler(e,t){const i={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},s=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const l=this._handleEvent(e,t,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(l||i.changed)&&this.render(),this}_handleEvent(e,t,i){const{_active:s=[],options:l}=this,o=t,r=this._getActiveElements(e,s,i,o),a=uy(e),u=vw(e,this._lastEvent,i,a);i&&(this._lastEvent=null,yt(l.onHover,[e,r,this],this),a&&yt(l.onClick,[e,r,this],this));const f=!ko(r,s);return(f||t)&&(this._active=r,this._updateHoverStyles(r,s,t)),this._lastEvent=u,f}_getActiveElements(e,t,i,s){if(e.type==="mouseout")return[];if(!i)return t;const l=this.options.hover;return this.getElementsAtEventForMode(e,l.mode,l,s)}}const Jf=()=>ct(Ao.instances,n=>n._plugins.invalidate()),di=!0;Object.defineProperties(Ao,{defaults:{enumerable:di,value:tt},instances:{enumerable:di,value:Eo},overrides:{enumerable:di,value:Gi},registry:{enumerable:di,value:Kn},version:{enumerable:di,value:hw},getChart:{enumerable:di,value:Y_},register:{enumerable:di,value:(...n)=>{Kn.add(...n),Jf()}},unregister:{enumerable:di,value:(...n)=>{Kn.remove(...n),Jf()}}});function K_(n,e,t){const{startAngle:i,pixelMargin:s,x:l,y:o,outerRadius:r,innerRadius:a}=e;let u=s/r;n.beginPath(),n.arc(l,o,r,i-u,t+u),a>s?(u=s/a,n.arc(l,o,a,t+u,i-u,!0)):n.arc(l,o,s,t+kt,i-kt),n.closePath(),n.clip()}function yw(n){return ja(n,["outerStart","outerEnd","innerStart","innerEnd"])}function kw(n,e,t,i){const s=yw(n.options.borderRadius),l=(t-e)/2,o=Math.min(l,i*e/2),r=a=>{const u=(t-Math.min(l,a))*i/2;return Wt(a,0,Math.min(l,u))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:Wt(s.innerStart,0,o),innerEnd:Wt(s.innerEnd,0,o)}}function ds(n,e,t,i){return{x:t+n*Math.cos(e),y:i+n*Math.sin(e)}}function na(n,e,t,i,s,l){const{x:o,y:r,startAngle:a,pixelMargin:u,innerRadius:f}=e,c=Math.max(e.outerRadius+i+t-u,0),d=f>0?f+i+t+u:0;let m=0;const h=s-a;if(i){const ne=f>0?f-i:0,Z=c>0?c-i:0,te=(ne+Z)/2,ee=te!==0?h*te/(te+i):h;m=(h-ee)/2}const g=Math.max(.001,h*c-t/Tt)/c,b=(h-g)/2,y=a+b+m,k=s-b-m,{outerStart:T,outerEnd:C,innerStart:M,innerEnd:$}=kw(e,d,c,k-y),O=c-T,E=c-C,I=y+T/O,L=k-C/E,N=d+M,F=d+$,U=y+M/N,J=k-$/F;if(n.beginPath(),l){if(n.arc(o,r,c,I,L),C>0){const te=ds(E,L,o,r);n.arc(te.x,te.y,C,L,k+kt)}const ne=ds(F,k,o,r);if(n.lineTo(ne.x,ne.y),$>0){const te=ds(F,J,o,r);n.arc(te.x,te.y,$,k+kt,J+Math.PI)}if(n.arc(o,r,d,k-$/d,y+M/d,!0),M>0){const te=ds(N,U,o,r);n.arc(te.x,te.y,M,U+Math.PI,y-kt)}const Z=ds(O,y,o,r);if(n.lineTo(Z.x,Z.y),T>0){const te=ds(O,I,o,r);n.arc(te.x,te.y,T,y-kt,I)}}else{n.moveTo(o,r);const ne=Math.cos(I)*c+o,Z=Math.sin(I)*c+r;n.lineTo(ne,Z);const te=Math.cos(L)*c+o,ee=Math.sin(L)*c+r;n.lineTo(te,ee)}n.closePath()}function ww(n,e,t,i,s){const{fullCircles:l,startAngle:o,circumference:r}=e;let a=e.endAngle;if(l){na(n,e,t,i,o+dt,s);for(let u=0;u=dt||pl(l,r,a),g=ml(o,u+d,f+d);return h&&g}getCenterPoint(e){const{x:t,y:i,startAngle:s,endAngle:l,innerRadius:o,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:a,spacing:u}=this.options,f=(s+l)/2,c=(o+r+u+a)/2;return{x:t+Math.cos(f)*c,y:i+Math.sin(f)*c}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:i}=this,s=(t.offset||0)/2,l=(t.spacing||0)/2,o=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=i>dt?Math.floor(i/dt):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let r=0;if(s){r=s/2;const u=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(u)*r,Math.sin(u)*r),this.circumference>=Tt&&(r=s)}e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor;const a=ww(e,this,r,l,o);Tw(e,this,r,l,a,o),e.restore()}}Ja.id="arc";Ja.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};Ja.defaultRoutes={backgroundColor:"backgroundColor"};function J_(n,e,t=e){n.lineCap=et(t.borderCapStyle,e.borderCapStyle),n.setLineDash(et(t.borderDash,e.borderDash)),n.lineDashOffset=et(t.borderDashOffset,e.borderDashOffset),n.lineJoin=et(t.borderJoinStyle,e.borderJoinStyle),n.lineWidth=et(t.borderWidth,e.borderWidth),n.strokeStyle=et(t.borderColor,e.borderColor)}function Cw(n,e,t){n.lineTo(t.x,t.y)}function $w(n){return n.stepped?Ky:n.tension||n.cubicInterpolationMode==="monotone"?Jy:Cw}function Z_(n,e,t={}){const i=n.length,{start:s=0,end:l=i-1}=t,{start:o,end:r}=e,a=Math.max(s,o),u=Math.min(l,r),f=sr&&l>r;return{count:i,start:a,loop:e.loop,ilen:u(o+(u?r-C:C))%l,T=()=>{g!==b&&(n.lineTo(f,b),n.lineTo(f,g),n.lineTo(f,y))};for(a&&(m=s[k(0)],n.moveTo(m.x,m.y)),d=0;d<=r;++d){if(m=s[k(d)],m.skip)continue;const C=m.x,M=m.y,$=C|0;$===h?(Mb&&(b=M),f=(c*f+C)/++c):(T(),n.lineTo(C,M),h=$,c=0,g=b=M),y=M}T()}function ia(n){const e=n.options,t=e.borderDash&&e.borderDash.length;return!n._decimated&&!n._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!t?Dw:Mw}function Ow(n){return n.stepped?C2:n.tension||n.cubicInterpolationMode==="monotone"?$2:qi}function Ew(n,e,t,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,t,i)&&s.closePath()),J_(n,e.options),n.stroke(s)}function Aw(n,e,t,i){const{segments:s,options:l}=e,o=ia(e);for(const r of s)J_(n,l,r.style),n.beginPath(),o(n,e,r,{start:t,end:t+i-1})&&n.closePath(),n.stroke()}const Iw=typeof Path2D=="function";function Pw(n,e,t,i){Iw&&!e.options.segment?Ew(n,e,t,i):Aw(n,e,t,i)}class Mi extends ai{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;_2(this._points,i,e,s,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=N2(this,this.options.segment))}first(){const e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){const e=this.segments,t=this.points,i=e.length;return i&&t[e[i-1].end]}interpolate(e,t){const i=this.options,s=e[t],l=this.points,o=E_(this,{property:t,start:s,end:s});if(!o.length)return;const r=[],a=Ow(i);let u,f;for(u=0,f=o.length;un!=="borderDash"&&n!=="fill"};function Zf(n,e,t,i){const s=n.options,{[t]:l}=n.getProps([t],i);return Math.abs(e-l){r=Ga(o,r,s);const a=s[o],u=s[r];i!==null?(l.push({x:a.x,y:i}),l.push({x:u.x,y:i})):t!==null&&(l.push({x:t,y:a.y}),l.push({x:t,y:u.y}))}),l}function Ga(n,e,t){for(;e>n;e--){const i=t[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function Gf(n,e,t,i){return n&&e?i(n[t],e[t]):n?n[t]:e?e[t]:0}function X_(n,e){let t=[],i=!1;return gt(n)?(i=!0,t=n):t=qw(n,e),t.length?new Mi({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function Xf(n){return n&&n.fill!==!1}function Vw(n,e,t){let s=n[e].fill;const l=[e];let o;if(!t)return s;for(;s!==!1&&l.indexOf(s)===-1;){if(!Ct(s))return s;if(o=n[s],!o)return!1;if(o.visible)return s;l.push(s),s=o.fill}return!1}function zw(n,e,t){const i=Yw(n);if(Ge(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return Ct(s)&&Math.floor(s)===s?Bw(i[0],e,s,t):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function Bw(n,e,t,i){return(n==="-"||n==="+")&&(t=e+t),t===e||t<0||t>=i?!1:t}function Uw(n,e){let t=null;return n==="start"?t=e.bottom:n==="end"?t=e.top:Ge(n)?t=e.getPixelForValue(n.value):e.getBasePixel&&(t=e.getBasePixel()),t}function Ww(n,e,t){let i;return n==="start"?i=t:n==="end"?i=e.options.reverse?e.min:e.max:Ge(n)?i=n.value:i=e.getBaseValue(),i}function Yw(n){const e=n.options,t=e.fill;let i=et(t&&t.target,t);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function Kw(n){const{scale:e,index:t,line:i}=n,s=[],l=i.segments,o=i.points,r=Jw(e,t);r.push(X_({x:null,y:e.bottom},i));for(let a=0;a=0;--o){const r=s[o].$filler;r&&(r.line.updateControlPoints(l,r.axis),i&&r.fill&&kr(n.ctx,r,l))}},beforeDatasetsDraw(n,e,t){if(t.drawTime!=="beforeDatasetsDraw")return;const i=n.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const l=i[s].$filler;Xf(l)&&kr(n.ctx,l,n.chartArea)}},beforeDatasetDraw(n,e,t){const i=e.meta.$filler;!Xf(i)||t.drawTime!=="beforeDatasetDraw"||kr(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ll={average(n){if(!n.length)return!1;let e,t,i=0,s=0,l=0;for(e=0,t=n.length;e-1?n.split(` -`):n}function lS(n,e){const{element:t,datasetIndex:i,index:s}=e,l=n.getDatasetMeta(i).controller,{label:o,value:r}=l.getLabelAndValue(s);return{chart:n,label:o,parsed:l.getParsed(s),raw:n.data.datasets[i].data[s],formattedValue:r,dataset:l.getDataset(),dataIndex:s,datasetIndex:i,element:t}}function tc(n,e){const t=n.chart.ctx,{body:i,footer:s,title:l}=n,{boxWidth:o,boxHeight:r}=e,a=_n(e.bodyFont),u=_n(e.titleFont),f=_n(e.footerFont),c=l.length,d=s.length,m=i.length,h=In(e.padding);let g=h.height,b=0,y=i.reduce((C,M)=>C+M.before.length+M.lines.length+M.after.length,0);if(y+=n.beforeBody.length+n.afterBody.length,c&&(g+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),y){const C=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;g+=m*C+(y-m)*a.lineHeight+(y-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*f.lineHeight+(d-1)*e.footerSpacing);let k=0;const T=function(C){b=Math.max(b,t.measureText(C).width+k)};return t.save(),t.font=u.string,ct(n.title,T),t.font=a.string,ct(n.beforeBody.concat(n.afterBody),T),k=e.displayColors?o+2+e.boxPadding:0,ct(i,C=>{ct(C.before,T),ct(C.lines,T),ct(C.after,T)}),k=0,t.font=f.string,ct(n.footer,T),t.restore(),b+=h.width,{width:b,height:g}}function oS(n,e){const{y:t,height:i}=e;return tn.height-i/2?"bottom":"center"}function rS(n,e,t,i){const{x:s,width:l}=i,o=t.caretSize+t.caretPadding;if(n==="left"&&s+l+o>e.width||n==="right"&&s-l-o<0)return!0}function aS(n,e,t,i){const{x:s,width:l}=t,{width:o,chartArea:{left:r,right:a}}=n;let u="center";return i==="center"?u=s<=(r+a)/2?"left":"right":s<=l/2?u="left":s>=o-l/2&&(u="right"),rS(u,n,e,t)&&(u="center"),u}function nc(n,e,t){const i=t.yAlign||e.yAlign||oS(n,t);return{xAlign:t.xAlign||e.xAlign||aS(n,e,t,i),yAlign:i}}function uS(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function fS(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function ic(n,e,t,i){const{caretSize:s,caretPadding:l,cornerRadius:o}=n,{xAlign:r,yAlign:a}=t,u=s+l,{topLeft:f,topRight:c,bottomLeft:d,bottomRight:m}=vs(o);let h=uS(e,r);const g=fS(e,a,u);return a==="center"?r==="left"?h+=u:r==="right"&&(h-=u):r==="left"?h-=Math.max(f,d)+s:r==="right"&&(h+=Math.max(c,m)+s),{x:Wt(h,0,i.width-e.width),y:Wt(g,0,i.height-e.height)}}function to(n,e,t){const i=In(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function sc(n){return Wn([],ii(n))}function cS(n,e,t){return $i(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function lc(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class la extends ai{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart||e._chart,this._chart=this.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&t.options.animation&&i.animations,l=new A_(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=cS(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,t){const{callbacks:i}=t,s=i.beforeTitle.apply(this,[e]),l=i.title.apply(this,[e]),o=i.afterTitle.apply(this,[e]);let r=[];return r=Wn(r,ii(s)),r=Wn(r,ii(l)),r=Wn(r,ii(o)),r}getBeforeBody(e,t){return sc(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return ct(e,l=>{const o={before:[],lines:[],after:[]},r=lc(i,l);Wn(o.before,ii(r.beforeLabel.call(this,l))),Wn(o.lines,r.label.call(this,l)),Wn(o.after,ii(r.afterLabel.call(this,l))),s.push(o)}),s}getAfterBody(e,t){return sc(t.callbacks.afterBody.apply(this,[e]))}getFooter(e,t){const{callbacks:i}=t,s=i.beforeFooter.apply(this,[e]),l=i.footer.apply(this,[e]),o=i.afterFooter.apply(this,[e]);let r=[];return r=Wn(r,ii(s)),r=Wn(r,ii(l)),r=Wn(r,ii(o)),r}_createItems(e){const t=this._active,i=this.chart.data,s=[],l=[],o=[];let r=[],a,u;for(a=0,u=t.length;ae.filter(f,c,d,i))),e.itemSort&&(r=r.sort((f,c)=>e.itemSort(f,c,i))),ct(r,f=>{const c=lc(e.callbacks,f);s.push(c.labelColor.call(this,f)),l.push(c.labelPointStyle.call(this,f)),o.push(c.labelTextColor.call(this,f))}),this.labelColors=s,this.labelPointStyles=l,this.labelTextColors=o,this.dataPoints=r,r}update(e,t){const i=this.options.setContext(this.getContext()),s=this._active;let l,o=[];if(!s.length)this.opacity!==0&&(l={opacity:0});else{const r=ll[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const a=this._size=tc(this,i),u=Object.assign({},r,a),f=nc(this.chart,i,u),c=ic(i,u,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,l={opacity:1,x:c.x,y:c.y,width:a.width,height:a.height,caretX:r.x,caretY:r.y}}this._tooltipItems=o,this.$context=void 0,l&&this._resolveAnimations().update(this,l),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,i,s){const l=this.getCaretPosition(e,i,s);t.lineTo(l.x1,l.y1),t.lineTo(l.x2,l.y2),t.lineTo(l.x3,l.y3)}getCaretPosition(e,t,i){const{xAlign:s,yAlign:l}=this,{caretSize:o,cornerRadius:r}=i,{topLeft:a,topRight:u,bottomLeft:f,bottomRight:c}=vs(r),{x:d,y:m}=e,{width:h,height:g}=t;let b,y,k,T,C,M;return l==="center"?(C=m+g/2,s==="left"?(b=d,y=b-o,T=C+o,M=C-o):(b=d+h,y=b+o,T=C-o,M=C+o),k=b):(s==="left"?y=d+Math.max(a,f)+o:s==="right"?y=d+h-Math.max(u,c)-o:y=this.caretX,l==="top"?(T=m,C=T-o,b=y-o,k=y+o):(T=m+g,C=T+o,b=y+o,k=y-o),M=T),{x1:b,x2:y,x3:k,y1:T,y2:C,y3:M}}drawTitle(e,t,i){const s=this.title,l=s.length;let o,r,a;if(l){const u=dr(i.rtl,this.x,this.width);for(e.x=to(this,i.titleAlign,i),t.textAlign=u.textAlign(i.titleAlign),t.textBaseline="middle",o=_n(i.titleFont),r=i.titleSpacing,t.fillStyle=i.titleColor,t.font=o.string,a=0;aT!==0)?(e.beginPath(),e.fillStyle=l.multiKeyBackground,Mo(e,{x:b,y:g,w:u,h:a,radius:k}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),Mo(e,{x:y,y:g+1,w:u-2,h:a-2,radius:k}),e.fill()):(e.fillStyle=l.multiKeyBackground,e.fillRect(b,g,u,a),e.strokeRect(b,g,u,a),e.fillStyle=o.backgroundColor,e.fillRect(y,g+1,u-2,a-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,t,i){const{body:s}=this,{bodySpacing:l,bodyAlign:o,displayColors:r,boxHeight:a,boxWidth:u,boxPadding:f}=i,c=_n(i.bodyFont);let d=c.lineHeight,m=0;const h=dr(i.rtl,this.x,this.width),g=function(E){t.fillText(E,h.x(e.x+m),e.y+d/2),e.y+=d+l},b=h.textAlign(o);let y,k,T,C,M,$,O;for(t.textAlign=o,t.textBaseline="middle",t.font=c.string,e.x=to(this,b,i),t.fillStyle=i.bodyColor,ct(this.beforeBody,g),m=r&&b!=="right"?o==="center"?u/2+f:u+2+f:0,C=0,$=s.length;C<$;++C){for(y=s[C],k=this.labelTextColors[C],t.fillStyle=k,ct(y.before,g),T=y.lines,r&&T.length&&(this._drawColorBox(t,e,C,h,i),d=Math.max(c.lineHeight,a)),M=0,O=T.length;M0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,i=this.$animations,s=i&&i.x,l=i&&i.y;if(s||l){const o=ll[e.position].call(this,this._active,this._eventPosition);if(!o)return;const r=this._size=tc(this,e),a=Object.assign({},o,this._size),u=nc(t,e,a),f=ic(e,a,u,t);(s._to!==f.x||l._to!==f.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=r.width,this.height=r.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(t);const s={width:this.width,height:this.height},l={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=In(t.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&r&&(e.save(),e.globalAlpha=i,this.drawBackground(l,e,s,t),E2(e,t.textDirection),l.y+=o.top,this.drawTitle(l,e,t),this.drawBody(l,e,t),this.drawFooter(l,e,t),A2(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const i=this._active,s=e.map(({datasetIndex:r,index:a})=>{const u=this.chart.getDatasetMeta(r);if(!u)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:u.data[a],index:a}}),l=!ko(i,s),o=this._positionChanged(s,t);(l||o)&&(this._active=s,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,i=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,l=this._active||[],o=this._getActiveElements(e,l,t,i),r=this._positionChanged(o,e),a=t||!ko(o,l)||r;return a&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),a}_getActiveElements(e,t,i,s){const l=this.options;if(e.type==="mouseout")return[];if(!s)return t;const o=this.chart.getElementsAtEventForMode(e,l.mode,l,i);return l.reverse&&o.reverse(),o}_positionChanged(e,t){const{caretX:i,caretY:s,options:l}=this,o=ll[l.position].call(this,e,t);return o!==!1&&(i!==o.x||s!==o.y)}}la.positioners=ll;var dS={id:"tooltip",_element:la,positioners:ll,afterInit(n,e,t){t&&(n.tooltip=new la({chart:n,options:t}))},beforeUpdate(n,e,t){n.tooltip&&n.tooltip.initialize(t)},reset(n,e,t){n.tooltip&&n.tooltip.initialize(t)},afterDraw(n){const e=n.tooltip;if(e&&e._willRender()){const t={tooltip:e};if(n.notifyPlugins("beforeTooltipDraw",t)===!1)return;e.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",t)}},afterEvent(n,e){if(n.tooltip){const t=e.replay;n.tooltip.handleEvent(e.event,t,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(n,e)=>e.bodyFont.size,boxWidth:(n,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:ti,title(n){if(n.length>0){const e=n[0],t=e.chart.data.labels,i=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndexn!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const pS=(n,e,t,i)=>(typeof e=="string"?(t=n.push(e)-1,i.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function mS(n,e,t,i){const s=n.indexOf(e);if(s===-1)return pS(n,e,t,i);const l=n.lastIndexOf(e);return s!==l?t:s}const hS=(n,e)=>n===null?null:Wt(Math.round(n),0,e);class oa extends Qi{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const i=this.getLabels();for(const{index:s,label:l}of t)i[s]===l&&i.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(ut(e))return null;const i=this.getLabels();return t=isFinite(t)&&i[t]===e?t:mS(i,e,et(t,e),this._addedLabels),hS(t,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(i=0),t||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const e=this.min,t=this.max,i=this.options.offset,s=[];let l=this.getLabels();l=e===0&&t===l.length-1?l:l.slice(e,t+1),this._valueRange=Math.max(l.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=e;o<=t;o++)s.push({value:o});return s}getLabelForValue(e){const t=this.getLabels();return e>=0&&et.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}oa.id="category";oa.defaults={ticks:{callback:oa.prototype.getLabelForValue}};function gS(n,e){const t=[],{bounds:s,step:l,min:o,max:r,precision:a,count:u,maxTicks:f,maxDigits:c,includeBounds:d}=n,m=l||1,h=f-1,{min:g,max:b}=e,y=!ut(o),k=!ut(r),T=!ut(u),C=(b-g)/(c+1);let M=sf((b-g)/h/m)*m,$,O,E,I;if(M<1e-14&&!y&&!k)return[{value:g},{value:b}];I=Math.ceil(b/M)-Math.floor(g/M),I>h&&(M=sf(I*M/h/m)*m),ut(a)||($=Math.pow(10,a),M=Math.ceil(M*$)/$),s==="ticks"?(O=Math.floor(g/M)*M,E=Math.ceil(b/M)*M):(O=g,E=b),y&&k&&l&&py((r-o)/l,M/1e3)?(I=Math.round(Math.min((r-o)/M,f)),M=(r-o)/I,O=o,E=r):T?(O=y?o:O,E=k?r:E,I=u-1,M=(E-O)/I):(I=(E-O)/M,nl(I,Math.round(I),M/1e3)?I=Math.round(I):I=Math.ceil(I));const L=Math.max(lf(M),lf(O));$=Math.pow(10,ut(a)?L:a),O=Math.round(O*$)/$,E=Math.round(E*$)/$;let N=0;for(y&&(d&&O!==o?(t.push({value:o}),Os=t?s:a,r=a=>l=i?l:a;if(e){const a=Jn(s),u=Jn(l);a<0&&u<0?r(0):a>0&&u>0&&o(0)}if(s===l){let a=1;(l>=Number.MAX_SAFE_INTEGER||s<=Number.MIN_SAFE_INTEGER)&&(a=Math.abs(l*.05)),r(l+a),e||o(s-a)}this.min=s,this.max=l}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:t,stepSize:i}=e,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},l=this._range||this,o=gS(s,l);return e.bounds==="ticks"&&r_(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let t=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const s=(i-t)/Math.max(e.length-1,1)/2;t-=s,i+=s}this._startValue=t,this._endValue=i,this._valueRange=i-t}getLabelForValue(e){return El(e,this.chart.options.locale,this.options.ticks.format)}}class Xa extends Io{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Ct(e)?e:0,this.max=Ct(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,i=jn(this.options.ticks.minRotation),s=(e?Math.sin(i):Math.cos(i))||.001,l=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,l.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}Xa.id="linear";Xa.defaults={ticks:{callback:Ko.formatters.numeric}};function rc(n){return n/Math.pow(10,Math.floor(Dn(n)))===1}function _S(n,e){const t=Math.floor(Dn(e.max)),i=Math.ceil(e.max/Math.pow(10,t)),s=[];let l=Tn(n.min,Math.pow(10,Math.floor(Dn(e.min)))),o=Math.floor(Dn(l)),r=Math.floor(l/Math.pow(10,o)),a=o<0?Math.pow(10,Math.abs(o)):1;do s.push({value:l,major:rc(l)}),++r,r===10&&(r=1,++o,a=o>=0?1:a),l=Math.round(r*Math.pow(10,o)*a)/a;while(o0?i:null}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Ct(e)?Math.max(0,e):null,this.max=Ct(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let i=this.min,s=this.max;const l=a=>i=e?i:a,o=a=>s=t?s:a,r=(a,u)=>Math.pow(10,Math.floor(Dn(a))+u);i===s&&(i<=0?(l(1),o(10)):(l(r(i,-1)),o(r(s,1)))),i<=0&&l(r(s,-1)),s<=0&&o(r(i,1)),this._zero&&this.min!==this._suggestedMin&&i===r(this.min,0)&&l(r(i,-1)),this.min=i,this.max=s}buildTicks(){const e=this.options,t={min:this._userMin,max:this._userMax},i=_S(t,this);return e.bounds==="ticks"&&r_(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":El(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Dn(e),this._valueRange=Dn(this.max)-Dn(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Dn(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}Q_.id="logarithmic";Q_.defaults={ticks:{callback:Ko.formatters.logarithmic,major:{enabled:!0}}};function ra(n){const e=n.ticks;if(e.display&&n.display){const t=In(e.backdropPadding);return et(e.font&&e.font.size,tt.font.size)+t.height}return 0}function bS(n,e,t){return t=gt(t)?t:[t],{w:Wy(n,e.string,t),h:t.length*e.lineHeight}}function ac(n,e,t,i,s){return n===i||n===s?{start:e-t/2,end:e+t/2}:ns?{start:e-t,end:e}:{start:e,end:e+t}}function vS(n){const e={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},t=Object.assign({},e),i=[],s=[],l=n._pointLabels.length,o=n.options.pointLabels,r=o.centerPointLabels?Tt/l:0;for(let a=0;ae.r&&(r=(i.end-e.r)/l,n.r=Math.max(n.r,e.r+r)),s.starte.b&&(a=(s.end-e.b)/o,n.b=Math.max(n.b,e.b+a))}function kS(n,e,t){const i=[],s=n._pointLabels.length,l=n.options,o=ra(l)/2,r=n.drawingArea,a=l.pointLabels.centerPointLabels?Tt/s:0;for(let u=0;u270||t<90)&&(n-=e),n}function CS(n,e){const{ctx:t,options:{pointLabels:i}}=n;for(let s=e-1;s>=0;s--){const l=i.setContext(n.getPointLabelContext(s)),o=_n(l.font),{x:r,y:a,textAlign:u,left:f,top:c,right:d,bottom:m}=n._pointLabelItems[s],{backdropColor:h}=l;if(!ut(h)){const g=vs(l.borderRadius),b=In(l.backdropPadding);t.fillStyle=h;const y=f-b.left,k=c-b.top,T=d-f+b.width,C=m-c+b.height;Object.values(g).some(M=>M!==0)?(t.beginPath(),Mo(t,{x:y,y:k,w:T,h:C,radius:g}),t.fill()):t.fillRect(y,k,T,C)}$o(t,n._pointLabels[s],r,a+o.lineHeight/2,o,{color:l.color,textAlign:u,textBaseline:"middle"})}}function eb(n,e,t,i){const{ctx:s}=n;if(t)s.arc(n.xCenter,n.yCenter,e,0,dt);else{let l=n.getPointPosition(0,e);s.moveTo(l.x,l.y);for(let o=1;o{const s=yt(this.options.pointLabels.callback,[t,i],this);return s||s===0?s:""}).filter((t,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?vS(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,i,s){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,i,s))}getIndexAngle(e){const t=dt/(this._pointLabels.length||1),i=this.options.startAngle||0;return gn(e*t+jn(i))}getDistanceFromCenterForValue(e){if(ut(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(ut(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e{if(f!==0){r=this.getDistanceFromCenterForValue(u.value);const c=s.setContext(this.getContext(f-1));$S(this,c,r,l)}}),i.display){for(e.save(),o=l-1;o>=0;o--){const u=i.setContext(this.getPointLabelContext(o)),{color:f,lineWidth:c}=u;!c||!f||(e.lineWidth=c,e.strokeStyle=f,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,r=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,r),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(a.x,a.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,t=this.options,i=t.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let l,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((r,a)=>{if(a===0&&!t.reverse)return;const u=i.setContext(this.getContext(a)),f=_n(u.font);if(l=this.getDistanceFromCenterForValue(this.ticks[a].value),u.showLabelBackdrop){e.font=f.string,o=e.measureText(r.label).width,e.fillStyle=u.backdropColor;const c=In(u.backdropPadding);e.fillRect(-o/2-c.left,-l-f.size/2-c.top,o+c.width,f.size+c.height)}$o(e,r.label,0,-l,f,{color:u.color})}),e.restore()}drawTitle(){}}Zo.id="radialLinear";Zo.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ko.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(n){return n},padding:5,centerPointLabels:!1}};Zo.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};Zo.descriptors={angleLines:{_fallback:"grid"}};const Go={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},un=Object.keys(Go);function DS(n,e){return n-e}function uc(n,e){if(ut(e))return null;const t=n._adapter,{parser:i,round:s,isoWeekday:l}=n._parseOpts;let o=e;return typeof i=="function"&&(o=i(o)),Ct(o)||(o=typeof i=="string"?t.parse(o,i):t.parse(o)),o===null?null:(s&&(o=s==="week"&&($s(l)||l===!0)?t.startOf(o,"isoWeek",l):t.startOf(o,s)),+o)}function fc(n,e,t,i){const s=un.length;for(let l=un.indexOf(n);l=un.indexOf(t);l--){const o=un[l];if(Go[o].common&&n._adapter.diff(s,i,o)>=e-1)return o}return un[t?un.indexOf(t):0]}function ES(n){for(let e=un.indexOf(n)+1,t=un.length;e=e?t[i]:t[s];n[l]=!0}}function AS(n,e,t,i){const s=n._adapter,l=+s.startOf(e[0].value,i),o=e[e.length-1].value;let r,a;for(r=l;r<=o;r=+s.add(r,1,i))a=t[r],a>=0&&(e[a].major=!0);return e}function dc(n,e,t){const i=[],s={},l=e.length;let o,r;for(o=0;o+e.value))}initOffsets(e){let t=0,i=0,s,l;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?t=1-s:t=(this.getDecimalForValue(e[1])-s)/2,l=this.getDecimalForValue(e[e.length-1]),e.length===1?i=l:i=(l-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;t=Wt(t,0,o),i=Wt(i,0,o),this._offsets={start:t,end:i,factor:1/(t+1+i)}}_generate(){const e=this._adapter,t=this.min,i=this.max,s=this.options,l=s.time,o=l.unit||fc(l.minUnit,t,i,this._getLabelCapacity(t)),r=et(l.stepSize,1),a=o==="week"?l.isoWeekday:!1,u=$s(a)||a===!0,f={};let c=t,d,m;if(u&&(c=+e.startOf(c,"isoWeek",a)),c=+e.startOf(c,u?"day":o),e.diff(i,t,o)>1e5*r)throw new Error(t+" and "+i+" are too far apart with stepSize of "+r+" "+o);const h=s.ticks.source==="data"&&this.getDataTimestamps();for(d=c,m=0;dg-b).map(g=>+g)}getLabelForValue(e){const t=this._adapter,i=this.options.time;return i.tooltipFormat?t.format(e,i.tooltipFormat):t.format(e,i.displayFormats.datetime)}_tickFormatFunction(e,t,i,s){const l=this.options,o=l.time.displayFormats,r=this._unit,a=this._majorUnit,u=r&&o[r],f=a&&o[a],c=i[t],d=a&&f&&c&&c.major,m=this._adapter.format(e,s||(d?f:u)),h=l.ticks.callback;return h?yt(h,[m,t,i],this):m}generateTickLabels(e){let t,i,s;for(t=0,i=e.length;t0?r:1}getDataTimestamps(){let e=this._cache.data||[],t,i;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,i=s.length;t=n[i].pos&&e<=n[s].pos&&({lo:i,hi:s}=zi(n,"pos",e)),{pos:l,time:r}=n[i],{pos:o,time:a}=n[s]):(e>=n[i].time&&e<=n[s].time&&({lo:i,hi:s}=zi(n,"time",e)),{time:l,pos:r}=n[i],{time:o,pos:a}=n[s]);const u=o-l;return u?r+(a-r)*(e-l)/u:r}class tb extends Pl{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=no(t,this.min),this._tableRange=no(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:i}=this,s=[],l=[];let o,r,a,u,f;for(o=0,r=e.length;o=t&&u<=i&&s.push(u);if(s.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(o=0,r=s.length;o{t||(t=ze(e,Pt,{duration:150},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=ze(e,Pt,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function PS(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=z(n[1]),t=D(),s=z(i)},m(l,o){S(l,e,o),S(l,t,o),S(l,s,o)},p(l,o){o&2&&re(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&re(s,i)},d(l){l&&w(e),l&&w(t),l&&w(s)}}}function LS(n){let e;return{c(){e=z("Loading...")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function NS(n){let e,t,i,s,l,o=n[2]&&pc();function r(f,c){return f[2]?LS:PS}let a=r(n),u=a(n);return{c(){e=v("div"),o&&o.c(),t=D(),i=v("canvas"),s=D(),l=v("div"),u.c(),p(i,"class","chart-canvas svelte-vh4sl8"),Ir(i,"height","250px"),Ir(i,"width","100%"),p(e,"class","chart-wrapper svelte-vh4sl8"),x(e,"loading",n[2]),p(l,"class","txt-hint m-t-xs txt-right")},m(f,c){S(f,e,c),o&&o.m(e,null),_(e,t),_(e,i),n[8](i),S(f,s,c),S(f,l,c),u.m(l,null)},p(f,[c]){f[2]?o?c&4&&A(o,1):(o=pc(),o.c(),A(o,1),o.m(e,t)):o&&(pe(),P(o,1,1,()=>{o=null}),me()),c&4&&x(e,"loading",f[2]),a===(a=r(f))&&u?u.p(f,c):(u.d(1),u=a(f),u&&(u.c(),u.m(l,null)))},i(f){A(o)},o(f){P(o)},d(f){f&&w(e),o&&o.d(),n[8](null),f&&w(s),f&&w(l),u.d()}}}function FS(n,e,t){let{filter:i=""}=e,{presets:s=""}=e,l,o,r=[],a=0,u=!1;async function f(){return t(2,u=!0),he.logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(m=>{c();for(let h of m)r.push({x:new Date(h.date),y:h.total}),t(1,a+=h.total);r.push({x:new Date,y:void 0})}).catch(m=>{m!=null&&m.isAbort||(c(),console.warn(m),he.errorResponseHandler(m,!1))}).finally(()=>{t(2,u=!1)})}function c(){t(1,a=0),t(7,r=[])}sn(()=>(Ao.register(Mi,Jo,Yo,Xa,Pl,sS,dS),t(6,o=new Ao(l,{type:"line",data:{datasets:[{label:"Total requests",data:r,borderColor:"#ef4565",pointBackgroundColor:"#ef4565",backgroundColor:"rgb(239,69,101,0.05)",borderWidth:2,pointRadius:1,pointBorderWidth:0,fill:!0}]},options:{animation:!1,interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,grid:{color:"#edf0f3",borderColor:"#dee3e8"},ticks:{precision:0,maxTicksLimit:6,autoSkip:!0,color:"#666f75"}},x:{type:"time",time:{unit:"hour",tooltipFormat:"DD h a"},grid:{borderColor:"#dee3e8",color:m=>m.tick.major?"#edf0f3":""},ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:m=>m.tick.major?"#16161a":"#666f75"}}},plugins:{legend:{display:!1}}}})),()=>o==null?void 0:o.destroy()));function d(m){ie[m?"unshift":"push"](()=>{l=m,t(0,l)})}return n.$$set=m=>{"filter"in m&&t(3,i=m.filter),"presets"in m&&t(4,s=m.presets)},n.$$.update=()=>{n.$$.dirty&24&&(typeof i<"u"||typeof s<"u")&&f(),n.$$.dirty&192&&typeof r<"u"&&o&&(t(6,o.data.datasets[0].data=r,o),o.update())},[l,a,u,i,s,f,o,r,d]}class RS extends ke{constructor(e){super(),ye(this,e,FS,NS,be,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var mc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},aa={},jS={get exports(){return aa},set exports(n){aa=n}};(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** - * Prism: Lightweight, robust, elegant syntax highlighting - * - * @license MIT - * @author Lea Verou - * @namespace - * @public - */var t=function(i){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,l=0,o={},r={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function k(T){return T instanceof a?new a(T.type,k(T.content),T.alias):Array.isArray(T)?T.map(k):T.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(M){var k=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(M.stack)||[])[1];if(k){var T=document.getElementsByTagName("script");for(var C in T)if(T[C].src==k)return T[C]}return null}},isActive:function(k,T,C){for(var M="no-"+T;k;){var $=k.classList;if($.contains(T))return!0;if($.contains(M))return!1;k=k.parentElement}return!!C}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(k,T){var C=r.util.clone(r.languages[k]);for(var M in T)C[M]=T[M];return C},insertBefore:function(k,T,C,M){M=M||r.languages;var $=M[k],O={};for(var E in $)if($.hasOwnProperty(E)){if(E==T)for(var I in C)C.hasOwnProperty(I)&&(O[I]=C[I]);C.hasOwnProperty(E)||(O[E]=$[E])}var L=M[k];return M[k]=O,r.languages.DFS(r.languages,function(N,F){F===L&&N!=k&&(this[N]=O)}),O},DFS:function k(T,C,M,$){$=$||{};var O=r.util.objId;for(var E in T)if(T.hasOwnProperty(E)){C.call(T,E,T[E],M||E);var I=T[E],L=r.util.type(I);L==="Object"&&!$[O(I)]?($[O(I)]=!0,k(I,C,null,$)):L==="Array"&&!$[O(I)]&&($[O(I)]=!0,k(I,C,E,$))}}},plugins:{},highlightAll:function(k,T){r.highlightAllUnder(document,k,T)},highlightAllUnder:function(k,T,C){var M={callback:C,container:k,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",M),M.elements=Array.prototype.slice.apply(M.container.querySelectorAll(M.selector)),r.hooks.run("before-all-elements-highlight",M);for(var $=0,O;O=M.elements[$++];)r.highlightElement(O,T===!0,M.callback)},highlightElement:function(k,T,C){var M=r.util.getLanguage(k),$=r.languages[M];r.util.setLanguage(k,M);var O=k.parentElement;O&&O.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(O,M);var E=k.textContent,I={element:k,language:M,grammar:$,code:E};function L(F){I.highlightedCode=F,r.hooks.run("before-insert",I),I.element.innerHTML=I.highlightedCode,r.hooks.run("after-highlight",I),r.hooks.run("complete",I),C&&C.call(I.element)}if(r.hooks.run("before-sanity-check",I),O=I.element.parentElement,O&&O.nodeName.toLowerCase()==="pre"&&!O.hasAttribute("tabindex")&&O.setAttribute("tabindex","0"),!I.code){r.hooks.run("complete",I),C&&C.call(I.element);return}if(r.hooks.run("before-highlight",I),!I.grammar){L(r.util.encode(I.code));return}if(T&&i.Worker){var N=new Worker(r.filename);N.onmessage=function(F){L(F.data)},N.postMessage(JSON.stringify({language:I.language,code:I.code,immediateClose:!0}))}else L(r.highlight(I.code,I.grammar,I.language))},highlight:function(k,T,C){var M={code:k,grammar:T,language:C};if(r.hooks.run("before-tokenize",M),!M.grammar)throw new Error('The language "'+M.language+'" has no grammar.');return M.tokens=r.tokenize(M.code,M.grammar),r.hooks.run("after-tokenize",M),a.stringify(r.util.encode(M.tokens),M.language)},tokenize:function(k,T){var C=T.rest;if(C){for(var M in C)T[M]=C[M];delete T.rest}var $=new c;return d($,$.head,k),f(k,$,T,$.head,0),h($)},hooks:{all:{},add:function(k,T){var C=r.hooks.all;C[k]=C[k]||[],C[k].push(T)},run:function(k,T){var C=r.hooks.all[k];if(!(!C||!C.length))for(var M=0,$;$=C[M++];)$(T)}},Token:a};i.Prism=r;function a(k,T,C,M){this.type=k,this.content=T,this.alias=C,this.length=(M||"").length|0}a.stringify=function k(T,C){if(typeof T=="string")return T;if(Array.isArray(T)){var M="";return T.forEach(function(L){M+=k(L,C)}),M}var $={type:T.type,content:k(T.content,C),tag:"span",classes:["token",T.type],attributes:{},language:C},O=T.alias;O&&(Array.isArray(O)?Array.prototype.push.apply($.classes,O):$.classes.push(O)),r.hooks.run("wrap",$);var E="";for(var I in $.attributes)E+=" "+I+'="'+($.attributes[I]||"").replace(/"/g,""")+'"';return"<"+$.tag+' class="'+$.classes.join(" ")+'"'+E+">"+$.content+""};function u(k,T,C,M){k.lastIndex=T;var $=k.exec(C);if($&&M&&$[1]){var O=$[1].length;$.index+=O,$[0]=$[0].slice(O)}return $}function f(k,T,C,M,$,O){for(var E in C)if(!(!C.hasOwnProperty(E)||!C[E])){var I=C[E];I=Array.isArray(I)?I:[I];for(var L=0;L=O.reach);R+=ee.value.length,ee=ee.next){var X=ee.value;if(T.length>k.length)return;if(!(X instanceof a)){var Y=1,se;if(J){if(se=u(te,R,k,U),!se||se.index>=k.length)break;var qe=se.index,He=se.index+se[0].length,Re=R;for(Re+=ee.value.length;qe>=Re;)ee=ee.next,Re+=ee.value.length;if(Re-=ee.value.length,R=Re,ee.value instanceof a)continue;for(var Fe=ee;Fe!==T.tail&&(ReO.reach&&(O.reach=lt);var ue=ee.prev;Se&&(ue=d(T,ue,Se),R+=Se.length),m(T,ue,Y);var fe=new a(E,F?r.tokenize(ge,F):ge,ne,ge);if(ee=d(T,ue,fe),Ue&&d(T,ee,Ue),Y>1){var ae={cause:E+","+L,reach:lt};f(k,T,C,ee.prev,R,ae),O&&ae.reach>O.reach&&(O.reach=ae.reach)}}}}}}function c(){var k={value:null,prev:null,next:null},T={value:null,prev:k,next:null};k.next=T,this.head=k,this.tail=T,this.length=0}function d(k,T,C){var M=T.next,$={value:C,prev:T,next:M};return T.next=$,M.prev=$,k.length++,$}function m(k,T,C){for(var M=T.next,$=0;$/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(i){i.type==="entity"&&(i.attributes.title=i.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(s,l){var o={};o["language-"+l]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[l]},o.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:o}};r["language-"+l]={pattern:/[\s\S]+/,inside:t.languages[l]};var a={};a[s]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return s}),"i"),lookbehind:!0,greedy:!0,inside:r},t.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(i,s){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+i+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[s,"language-"+s],inside:t.languages[s]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(i){var s=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;i.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+s.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+s.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+s.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+s.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:s,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},i.languages.css.atrule.inside.rest=i.languages.css;var l=i.languages.markup;l&&(l.tag.addInlined("style","css"),l.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(typeof t>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i="Loading…",s=function(g,b){return"✖ Error "+g+" while fetching file: "+b},l="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},r="data-src-status",a="loading",u="loaded",f="failed",c="pre[data-src]:not(["+r+'="'+u+'"]):not(['+r+'="'+a+'"])';function d(g,b,y){var k=new XMLHttpRequest;k.open("GET",g,!0),k.onreadystatechange=function(){k.readyState==4&&(k.status<400&&k.responseText?b(k.responseText):k.status>=400?y(s(k.status,k.statusText)):y(l))},k.send(null)}function m(g){var b=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(g||"");if(b){var y=Number(b[1]),k=b[2],T=b[3];return k?T?[y,Number(T)]:[y,void 0]:[y,y]}}t.hooks.add("before-highlightall",function(g){g.selector+=", "+c}),t.hooks.add("before-sanity-check",function(g){var b=g.element;if(b.matches(c)){g.code="",b.setAttribute(r,a);var y=b.appendChild(document.createElement("CODE"));y.textContent=i;var k=b.getAttribute("data-src"),T=g.language;if(T==="none"){var C=(/\.(\w+)$/.exec(k)||[,"none"])[1];T=o[C]||C}t.util.setLanguage(y,T),t.util.setLanguage(b,T);var M=t.plugins.autoloader;M&&M.loadLanguages(T),d(k,function($){b.setAttribute(r,u);var O=m(b.getAttribute("data-range"));if(O){var E=$.split(/\r\n?|\n/g),I=O[0],L=O[1]==null?E.length:O[1];I<0&&(I+=E.length),I=Math.max(0,Math.min(I-1,E.length)),L<0&&(L+=E.length),L=Math.max(0,Math.min(L,E.length)),$=E.slice(I,L).join(` -`),b.hasAttribute("data-start")||b.setAttribute("data-start",String(I+1))}y.textContent=$,t.highlightElement(y)},function($){b.setAttribute(r,f),y.textContent=$})}}),t.plugins.fileHighlight={highlight:function(b){for(var y=(b||document).querySelectorAll(c),k=0,T;T=y[k++];)t.highlightElement(T)}};var h=!1;t.fileHighlight=function(){h||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),h=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(jS);const Js=aa;var hc={},HS={get exports(){return hc},set exports(n){hc=n}};(function(n){(function(){if(typeof Prism>"u")return;var e=Object.assign||function(o,r){for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);return o};function t(o){this.defaults=e({},o)}function i(o){return o.replace(/-(\w)/g,function(r,a){return a.toUpperCase()})}function s(o){for(var r=0,a=0;ar&&(f[d]=` -`+f[d],c=m)}a[u]=f.join("")}return a.join(` -`)}},n.exports&&(n.exports=t),Prism.plugins.NormalizeWhitespace=new t({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.hooks.add("before-sanity-check",function(o){var r=Prism.plugins.NormalizeWhitespace;if(!(o.settings&&o.settings["whitespace-normalization"]===!1)&&Prism.util.isActive(o.element,"whitespace-normalization",!0)){if((!o.element||!o.element.parentNode)&&o.code){o.code=r.normalize(o.code,o.settings);return}var a=o.element.parentNode;if(!(!o.code||!a||a.nodeName.toLowerCase()!=="pre")){o.settings==null&&(o.settings={});for(var u in l)if(Object.hasOwnProperty.call(l,u)){var f=l[u];if(a.hasAttribute("data-"+u))try{var c=JSON.parse(a.getAttribute("data-"+u)||"true");typeof c===f&&(o.settings[u]=c)}catch{}}for(var d=a.childNodes,m="",h="",g=!1,b=0;b>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),n.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:n.languages.dart}}},string:/[\s\S]+/}},string:void 0}),n.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),n.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":i,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})})(Prism);function qS(n){let e,t,i;return{c(){e=v("div"),t=v("code"),p(t,"class","svelte-10s5tkd"),p(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){S(s,e,l),_(e,t),t.innerHTML=n[1]},p(s,[l]){l&2&&(t.innerHTML=s[1]),l&1&&i!==(i="code-wrapper prism-light "+s[0]+" svelte-10s5tkd")&&p(e,"class",i)},i:G,o:G,d(s){s&&w(e)}}}function VS(n,e,t){let{class:i=""}=e,{content:s=""}=e,{language:l="javascript"}=e,o="";function r(a){return a=typeof a=="string"?a:"",a=Js.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Js.highlight(a,Js.languages[l]||Js.languages.javascript,l)}return n.$$set=a=>{"class"in a&&t(0,i=a.class),"content"in a&&t(2,s=a.content),"language"in a&&t(3,l=a.language)},n.$$.update=()=>{n.$$.dirty&4&&typeof Js<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class nb extends ke{constructor(e){super(),ye(this,e,VS,qS,be,{class:0,content:2,language:3})}}const zS=n=>({}),gc=n=>({}),BS=n=>({}),_c=n=>({});function bc(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T=n[4]&&!n[2]&&vc(n);const C=n[19].header,M=Ft(C,n,n[18],_c);let $=n[4]&&n[2]&&yc(n);const O=n[19].default,E=Ft(O,n,n[18],null),I=n[19].footer,L=Ft(I,n,n[18],gc);return{c(){e=v("div"),t=v("div"),s=D(),l=v("div"),o=v("div"),T&&T.c(),r=D(),M&&M.c(),a=D(),$&&$.c(),u=D(),f=v("div"),E&&E.c(),c=D(),d=v("div"),L&&L.c(),p(t,"class","overlay"),p(o,"class","overlay-panel-section panel-header"),p(f,"class","overlay-panel-section panel-content"),p(d,"class","overlay-panel-section panel-footer"),p(l,"class",m="overlay-panel "+n[1]+" "+n[8]),x(l,"popup",n[2]),p(e,"class","overlay-panel-container"),x(e,"padded",n[2]),x(e,"active",n[0])},m(N,F){S(N,e,F),_(e,t),_(e,s),_(e,l),_(l,o),T&&T.m(o,null),_(o,r),M&&M.m(o,null),_(o,a),$&&$.m(o,null),_(l,u),_(l,f),E&&E.m(f,null),n[21](f),_(l,c),_(l,d),L&&L.m(d,null),b=!0,y||(k=[K(t,"click",pt(n[20])),K(f,"scroll",n[22])],y=!0)},p(N,F){n=N,n[4]&&!n[2]?T?T.p(n,F):(T=vc(n),T.c(),T.m(o,r)):T&&(T.d(1),T=null),M&&M.p&&(!b||F[0]&262144)&&jt(M,C,n,n[18],b?Rt(C,n[18],F,BS):Ht(n[18]),_c),n[4]&&n[2]?$?$.p(n,F):($=yc(n),$.c(),$.m(o,null)):$&&($.d(1),$=null),E&&E.p&&(!b||F[0]&262144)&&jt(E,O,n,n[18],b?Rt(O,n[18],F,null):Ht(n[18]),null),L&&L.p&&(!b||F[0]&262144)&&jt(L,I,n,n[18],b?Rt(I,n[18],F,zS):Ht(n[18]),gc),(!b||F[0]&258&&m!==(m="overlay-panel "+n[1]+" "+n[8]))&&p(l,"class",m),(!b||F[0]&262)&&x(l,"popup",n[2]),(!b||F[0]&4)&&x(e,"padded",n[2]),(!b||F[0]&1)&&x(e,"active",n[0])},i(N){b||(N&&nt(()=>{i||(i=ze(t,yo,{duration:ps,opacity:0},!0)),i.run(1)}),A(M,N),A(E,N),A(L,N),nt(()=>{g&&g.end(1),h=Jh(l,En,n[2]?{duration:ps,y:-10}:{duration:ps,x:50}),h.start()}),b=!0)},o(N){N&&(i||(i=ze(t,yo,{duration:ps,opacity:0},!1)),i.run(0)),P(M,N),P(E,N),P(L,N),h&&h.invalidate(),g=Zh(l,En,n[2]?{duration:ps,y:10}:{duration:ps,x:50}),b=!1},d(N){N&&w(e),N&&i&&i.end(),T&&T.d(),M&&M.d(N),$&&$.d(),E&&E.d(N),n[21](null),L&&L.d(N),N&&g&&g.end(),y=!1,Le(k)}}}function vc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=K(e,"click",pt(n[5])),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function yc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-transparent btn-close m-l-auto")},m(s,l){S(s,e,l),t||(i=K(e,"click",pt(n[5])),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function US(n){let e,t,i,s,l=n[0]&&bc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","overlay-panel-wrapper")},m(o,r){S(o,e,r),l&&l.m(e,null),n[23](e),t=!0,i||(s=[K(window,"resize",n[10]),K(window,"keydown",n[9])],i=!0)},p(o,r){o[0]?l?(l.p(o,r),r[0]&1&&A(l,1)):(l=bc(o),l.c(),A(l,1),l.m(e,null)):l&&(pe(),P(l,1,1,()=>{l=null}),me())},i(o){t||(A(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[23](null),i=!1,Le(s)}}}let Ri,wr=[];function ib(){return Ri=Ri||document.querySelector(".overlays"),Ri||(Ri=document.createElement("div"),Ri.classList.add("overlays"),document.body.appendChild(Ri)),Ri}let ps=150;function kc(){return 1e3+ib().querySelectorAll(".overlay-panel-container.active").length}function WS(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{active:o=!1}=e,{popup:r=!1}=e,{overlayClose:a=!0}=e,{btnClose:u=!0}=e,{escClose:f=!0}=e,{beforeOpen:c=void 0}=e,{beforeHide:d=void 0}=e;const m=$t(),h="op_"+B.randomString(10);let g,b,y,k,T="",C=o;function M(){typeof c=="function"&&c()===!1||t(0,o=!0)}function $(){typeof d=="function"&&d()===!1||t(0,o=!1)}function O(){return o}async function E(R){t(17,C=R),R?(y=document.activeElement,g==null||g.focus(),m("show")):(clearTimeout(k),y==null||y.focus(),m("hide")),await tn(),I()}function I(){g&&(o?t(6,g.style.zIndex=kc(),g):t(6,g.style="",g))}function L(){B.pushUnique(wr,h),document.body.classList.add("overlay-active")}function N(){B.removeByValue(wr,h),wr.length||document.body.classList.remove("overlay-active")}function F(R){o&&f&&R.code=="Escape"&&!B.isInput(R.target)&&g&&g.style.zIndex==kc()&&(R.preventDefault(),$())}function U(R){o&&J(b)}function J(R,X){X&&t(8,T=""),R&&(k||(k=setTimeout(()=>{if(clearTimeout(k),k=null,!R)return;if(R.scrollHeight-R.offsetHeight>0)t(8,T="scrollable");else{t(8,T="");return}R.scrollTop==0?t(8,T+=" scroll-top-reached"):R.scrollTop+R.offsetHeight==R.scrollHeight&&t(8,T+=" scroll-bottom-reached")},100)))}sn(()=>(ib().appendChild(g),()=>{var R;clearTimeout(k),N(),(R=g==null?void 0:g.classList)==null||R.add("hidden"),setTimeout(()=>{g==null||g.remove()},0)}));const ne=()=>a?$():!0;function Z(R){ie[R?"unshift":"push"](()=>{b=R,t(7,b)})}const te=R=>J(R.target);function ee(R){ie[R?"unshift":"push"](()=>{g=R,t(6,g)})}return n.$$set=R=>{"class"in R&&t(1,l=R.class),"active"in R&&t(0,o=R.active),"popup"in R&&t(2,r=R.popup),"overlayClose"in R&&t(3,a=R.overlayClose),"btnClose"in R&&t(4,u=R.btnClose),"escClose"in R&&t(12,f=R.escClose),"beforeOpen"in R&&t(13,c=R.beforeOpen),"beforeHide"in R&&t(14,d=R.beforeHide),"$$scope"in R&&t(18,s=R.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&131073&&C!=o&&E(o),n.$$.dirty[0]&128&&J(b,!0),n.$$.dirty[0]&64&&g&&I(),n.$$.dirty[0]&1&&(o?L():N())},[o,l,r,a,u,$,g,b,T,F,U,J,f,c,d,M,O,C,s,i,ne,Z,te,ee]}class Bn extends ke{constructor(e){super(),ye(this,e,WS,US,be,{class:1,active:0,popup:2,overlayClose:3,btnClose:4,escClose:12,beforeOpen:13,beforeHide:14,show:15,hide:5,isActive:16},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[5]}get isActive(){return this.$$.ctx[16]}}function YS(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function KS(n){let e,t=n[2].referer+"",i,s;return{c(){e=v("a"),i=z(t),p(e,"href",s=n[2].referer),p(e,"target","_blank"),p(e,"rel","noopener noreferrer")},m(l,o){S(l,e,o),_(e,i)},p(l,o){o&4&&t!==(t=l[2].referer+"")&&re(i,t),o&4&&s!==(s=l[2].referer)&&p(e,"href",s)},d(l){l&&w(e)}}}function JS(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function ZS(n){let e,t;return e=new nb({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&4&&(l.content=JSON.stringify(i[2].meta,null,2)),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function GS(n){var Ee;let e,t,i,s,l,o,r=n[2].id+"",a,u,f,c,d,m,h,g=n[2].status+"",b,y,k,T,C,M,$=((Ee=n[2].method)==null?void 0:Ee.toUpperCase())+"",O,E,I,L,N,F,U=n[2].auth+"",J,ne,Z,te,ee,R,X=n[2].url+"",Y,se,He,Re,Fe,qe,ge,Se,Ue,lt,ue,fe=n[2].remoteIp+"",ae,oe,je,Me,Te,ce,$e=n[2].userIp+"",Ze,it,Mt,ot,Qn,ui,ts=n[2].userAgent+"",ns,Ll,fi,is,Nl,Oi,ss,on,xe,ls,ei,os,Ei,Ai,qt,Zt;function Fl(Ie,De){return Ie[2].referer?KS:YS}let j=Fl(n),W=j(n);const Q=[ZS,JS],le=[];function Ce(Ie,De){return De&4&&(ss=null),ss==null&&(ss=!B.isEmpty(Ie[2].meta)),ss?0:1}return on=Ce(n,-1),xe=le[on]=Q[on](n),qt=new Zi({props:{date:n[2].created}}),{c(){e=v("table"),t=v("tbody"),i=v("tr"),s=v("td"),s.textContent="ID",l=D(),o=v("td"),a=z(r),u=D(),f=v("tr"),c=v("td"),c.textContent="Status",d=D(),m=v("td"),h=v("span"),b=z(g),y=D(),k=v("tr"),T=v("td"),T.textContent="Method",C=D(),M=v("td"),O=z($),E=D(),I=v("tr"),L=v("td"),L.textContent="Auth",N=D(),F=v("td"),J=z(U),ne=D(),Z=v("tr"),te=v("td"),te.textContent="URL",ee=D(),R=v("td"),Y=z(X),se=D(),He=v("tr"),Re=v("td"),Re.textContent="Referer",Fe=D(),qe=v("td"),W.c(),ge=D(),Se=v("tr"),Ue=v("td"),Ue.textContent="Remote IP",lt=D(),ue=v("td"),ae=z(fe),oe=D(),je=v("tr"),Me=v("td"),Me.textContent="User IP",Te=D(),ce=v("td"),Ze=z($e),it=D(),Mt=v("tr"),ot=v("td"),ot.textContent="UserAgent",Qn=D(),ui=v("td"),ns=z(ts),Ll=D(),fi=v("tr"),is=v("td"),is.textContent="Meta",Nl=D(),Oi=v("td"),xe.c(),ls=D(),ei=v("tr"),os=v("td"),os.textContent="Created",Ei=D(),Ai=v("td"),V(qt.$$.fragment),p(s,"class","min-width txt-hint txt-bold"),p(c,"class","min-width txt-hint txt-bold"),p(h,"class","label"),x(h,"label-danger",n[2].status>=400),p(T,"class","min-width txt-hint txt-bold"),p(L,"class","min-width txt-hint txt-bold"),p(te,"class","min-width txt-hint txt-bold"),p(Re,"class","min-width txt-hint txt-bold"),p(Ue,"class","min-width txt-hint txt-bold"),p(Me,"class","min-width txt-hint txt-bold"),p(ot,"class","min-width txt-hint txt-bold"),p(is,"class","min-width txt-hint txt-bold"),p(os,"class","min-width txt-hint txt-bold"),p(e,"class","table-compact table-border")},m(Ie,De){S(Ie,e,De),_(e,t),_(t,i),_(i,s),_(i,l),_(i,o),_(o,a),_(t,u),_(t,f),_(f,c),_(f,d),_(f,m),_(m,h),_(h,b),_(t,y),_(t,k),_(k,T),_(k,C),_(k,M),_(M,O),_(t,E),_(t,I),_(I,L),_(I,N),_(I,F),_(F,J),_(t,ne),_(t,Z),_(Z,te),_(Z,ee),_(Z,R),_(R,Y),_(t,se),_(t,He),_(He,Re),_(He,Fe),_(He,qe),W.m(qe,null),_(t,ge),_(t,Se),_(Se,Ue),_(Se,lt),_(Se,ue),_(ue,ae),_(t,oe),_(t,je),_(je,Me),_(je,Te),_(je,ce),_(ce,Ze),_(t,it),_(t,Mt),_(Mt,ot),_(Mt,Qn),_(Mt,ui),_(ui,ns),_(t,Ll),_(t,fi),_(fi,is),_(fi,Nl),_(fi,Oi),le[on].m(Oi,null),_(t,ls),_(t,ei),_(ei,os),_(ei,Ei),_(ei,Ai),H(qt,Ai,null),Zt=!0},p(Ie,De){var Be;(!Zt||De&4)&&r!==(r=Ie[2].id+"")&&re(a,r),(!Zt||De&4)&&g!==(g=Ie[2].status+"")&&re(b,g),(!Zt||De&4)&&x(h,"label-danger",Ie[2].status>=400),(!Zt||De&4)&&$!==($=((Be=Ie[2].method)==null?void 0:Be.toUpperCase())+"")&&re(O,$),(!Zt||De&4)&&U!==(U=Ie[2].auth+"")&&re(J,U),(!Zt||De&4)&&X!==(X=Ie[2].url+"")&&re(Y,X),j===(j=Fl(Ie))&&W?W.p(Ie,De):(W.d(1),W=j(Ie),W&&(W.c(),W.m(qe,null))),(!Zt||De&4)&&fe!==(fe=Ie[2].remoteIp+"")&&re(ae,fe),(!Zt||De&4)&&$e!==($e=Ie[2].userIp+"")&&re(Ze,$e),(!Zt||De&4)&&ts!==(ts=Ie[2].userAgent+"")&&re(ns,ts);let Ke=on;on=Ce(Ie,De),on===Ke?le[on].p(Ie,De):(pe(),P(le[Ke],1,1,()=>{le[Ke]=null}),me(),xe=le[on],xe?xe.p(Ie,De):(xe=le[on]=Q[on](Ie),xe.c()),A(xe,1),xe.m(Oi,null));const Ne={};De&4&&(Ne.date=Ie[2].created),qt.$set(Ne)},i(Ie){Zt||(A(xe),A(qt.$$.fragment,Ie),Zt=!0)},o(Ie){P(xe),P(qt.$$.fragment,Ie),Zt=!1},d(Ie){Ie&&w(e),W.d(),le[on].d(),q(qt)}}}function XS(n){let e;return{c(){e=v("h4"),e.textContent="Request log"},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function xS(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Close',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[4]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function QS(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[xS],header:[XS],default:[GS]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){V(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&260&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[5](null),q(e,s)}}}function e3(n,e,t){let i,s=new Rr;function l(c){return t(2,s=c),i==null?void 0:i.show()}function o(){return i==null?void 0:i.hide()}const r=()=>o();function a(c){ie[c?"unshift":"push"](()=>{i=c,t(1,i)})}function u(c){We.call(this,n,c)}function f(c){We.call(this,n,c)}return[o,i,s,l,r,a,u,f]}class t3 extends ke{constructor(e){super(),ye(this,e,e3,QS,be,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function n3(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=z("Include requests by admins"),p(e,"type","checkbox"),p(e,"id",t=n[14]),p(s,"for",o=n[14])},m(u,f){S(u,e,f),e.checked=n[0],S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[8]),r=!0)},p(u,f){f&16384&&t!==(t=u[14])&&p(e,"id",t),f&1&&(e.checked=u[0]),f&16384&&o!==(o=u[14])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function wc(n){let e,t,i;function s(o){n[10](o)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new RS({props:l}),ie.push(()=>ve(e,"filter",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};r&16&&(a.presets=o[4]),!t&&r&4&&(t=!0,a.filter=o[2],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function Sc(n){let e,t,i;function s(o){n[11](o)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new ny({props:l}),ie.push(()=>ve(e,"filter",s)),e.$on("select",n[12]),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};r&16&&(a.presets=o[4]),!t&&r&4&&(t=!0,a.filter=o[2],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function i3(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k=n[3],T,C=n[3],M,$;r=new Da({}),r.$on("refresh",n[7]),d=new _e({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[n3,({uniqueId:I})=>({14:I}),({uniqueId:I})=>I?16384:0]},$$scope:{ctx:n}}}),h=new Uo({props:{value:n[2],placeholder:"Search logs, ex. status > 200",extraAutocompleteKeys:["method","url","remoteIp","userIp","referer","status","auth","userAgent"]}}),h.$on("submit",n[9]);let O=wc(n),E=Sc(n);return{c(){e=v("div"),t=v("header"),i=v("nav"),s=v("div"),l=z(n[5]),o=D(),V(r.$$.fragment),a=D(),u=v("div"),f=D(),c=v("div"),V(d.$$.fragment),m=D(),V(h.$$.fragment),g=D(),b=v("div"),y=D(),O.c(),T=D(),E.c(),M=Ae(),p(s,"class","breadcrumb-item"),p(i,"class","breadcrumbs"),p(u,"class","flex-fill"),p(c,"class","inline-flex"),p(t,"class","page-header"),p(b,"class","clearfix m-b-base"),p(e,"class","page-header-wrapper m-b-0")},m(I,L){S(I,e,L),_(e,t),_(t,i),_(i,s),_(s,l),_(t,o),H(r,t,null),_(t,a),_(t,u),_(t,f),_(t,c),H(d,c,null),_(e,m),H(h,e,null),_(e,g),_(e,b),_(e,y),O.m(e,null),S(I,T,L),E.m(I,L),S(I,M,L),$=!0},p(I,L){(!$||L&32)&&re(l,I[5]);const N={};L&49153&&(N.$$scope={dirty:L,ctx:I}),d.$set(N);const F={};L&4&&(F.value=I[2]),h.$set(F),L&8&&be(k,k=I[3])?(pe(),P(O,1,1,G),me(),O=wc(I),O.c(),A(O,1),O.m(e,null)):O.p(I,L),L&8&&be(C,C=I[3])?(pe(),P(E,1,1,G),me(),E=Sc(I),E.c(),A(E,1),E.m(M.parentNode,M)):E.p(I,L)},i(I){$||(A(r.$$.fragment,I),A(d.$$.fragment,I),A(h.$$.fragment,I),A(O),A(E),$=!0)},o(I){P(r.$$.fragment,I),P(d.$$.fragment,I),P(h.$$.fragment,I),P(O),P(E),$=!1},d(I){I&&w(e),q(r),q(d),q(h),O.d(I),I&&w(T),I&&w(M),E.d(I)}}}function s3(n){let e,t,i,s;e=new kn({props:{$$slots:{default:[i3]},$$scope:{ctx:n}}});let l={};return i=new t3({props:l}),n[13](i),{c(){V(e.$$.fragment),t=D(),V(i.$$.fragment)},m(o,r){H(e,o,r),S(o,t,r),H(i,o,r),s=!0},p(o,[r]){const a={};r&32831&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){P(e.$$.fragment,o),P(i.$$.fragment,o),s=!1},d(o){q(e,o),o&&w(t),n[13](null),q(i,o)}}}const Tc="includeAdminLogs";function l3(n,e,t){var y;let i,s;Je(n,St,k=>t(5,s=k)),Yt(St,s="Request logs",s);let l,o="",r=((y=window.localStorage)==null?void 0:y.getItem(Tc))<<0,a=1;function u(){t(3,a++,a)}const f=()=>u();function c(){r=this.checked,t(0,r)}const d=k=>t(2,o=k.detail);function m(k){o=k,t(2,o)}function h(k){o=k,t(2,o)}const g=k=>l==null?void 0:l.show(k==null?void 0:k.detail);function b(k){ie[k?"unshift":"push"](()=>{l=k,t(1,l)})}return n.$$.update=()=>{n.$$.dirty&1&&t(4,i=r?"":'auth!="admin"'),n.$$.dirty&1&&typeof r<"u"&&window.localStorage&&window.localStorage.setItem(Tc,r<<0)},[r,l,o,a,i,s,u,f,c,d,m,h,g,b]}class o3 extends ke{constructor(e){super(),ye(this,e,l3,s3,be,{})}}const es=Pn([]),Si=Pn({}),Po=Pn(!1);function r3(n){es.update(e=>{const t=B.findByKey(e,"id",n);return t?Si.set(t):e.length&&Si.set(e[0]),e})}function a3(n){es.update(e=>(B.removeByKey(e,"id",n.id),Si.update(t=>t.id===n.id?e[0]:t),e))}async function sb(n=null){Po.set(!0);try{let e=await he.collections.getFullList(200,{sort:"+created"});e=B.sortCollections(e),es.set(e);const t=n&&B.findByKey(e,"id",n);t?Si.set(t):e.length&&Si.set(e[0])}catch(e){he.errorResponseHandler(e)}Po.set(!1)}const xa=Pn({});function fn(n,e,t){xa.set({text:n,yesCallback:e,noCallback:t})}function lb(){xa.set({})}function Cc(n){let e,t,i,s;const l=n[14].default,o=Ft(l,n,n[13],null);return{c(){e=v("div"),o&&o.c(),p(e,"class",n[1]),x(e,"active",n[0])},m(r,a){S(r,e,a),o&&o.m(e,null),s=!0},p(r,a){o&&o.p&&(!s||a&8192)&&jt(o,l,r,r[13],s?Rt(l,r[13],a,null):Ht(r[13]),null),(!s||a&2)&&p(e,"class",r[1]),(!s||a&3)&&x(e,"active",r[0])},i(r){s||(A(o,r),r&&nt(()=>{i&&i.end(1),t=Jh(e,En,{duration:150,y:-5}),t.start()}),s=!0)},o(r){P(o,r),t&&t.invalidate(),r&&(i=Zh(e,En,{duration:150,y:2})),s=!1},d(r){r&&w(e),o&&o.d(r),r&&i&&i.end()}}}function u3(n){let e,t,i,s,l=n[0]&&Cc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","toggler-container")},m(o,r){S(o,e,r),l&&l.m(e,null),n[15](e),t=!0,i||(s=[K(window,"click",n[3]),K(window,"keydown",n[4]),K(window,"focusin",n[5])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&A(l,1)):(l=Cc(o),l.c(),A(l,1),l.m(e,null)):l&&(pe(),P(l,1,1,()=>{l=null}),me())},i(o){t||(A(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[15](null),i=!1,Le(s)}}}function f3(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:o=!1}=e,{escClose:r=!0}=e,{closableClass:a="closable"}=e,{class:u=""}=e,f,c;const d=$t();function m(){t(0,o=!1)}function h(){t(0,o=!0)}function g(){o?m():h()}function b(I){return!f||I.classList.contains(a)||(c==null?void 0:c.contains(I))&&!f.contains(I)||f.contains(I)&&I.closest&&I.closest("."+a)}function y(I){(!o||b(I.target))&&(I.preventDefault(),I.stopPropagation(),g())}function k(I){(I.code==="Enter"||I.code==="Space")&&(!o||b(I.target))&&(I.preventDefault(),I.stopPropagation(),g())}function T(I){o&&!(f!=null&&f.contains(I.target))&&!(c!=null&&c.contains(I.target))&&m()}function C(I){o&&r&&I.code==="Escape"&&(I.preventDefault(),m())}function M(I){return T(I)}function $(I){O(),t(12,c=I||(f==null?void 0:f.parentNode)),c&&(f==null||f.addEventListener("click",y),c.addEventListener("click",y),c.addEventListener("keydown",k))}function O(){c&&(f==null||f.removeEventListener("click",y),c.removeEventListener("click",y),c.removeEventListener("keydown",k))}sn(()=>($(),()=>O()));function E(I){ie[I?"unshift":"push"](()=>{f=I,t(2,f)})}return n.$$set=I=>{"trigger"in I&&t(6,l=I.trigger),"active"in I&&t(0,o=I.active),"escClose"in I&&t(7,r=I.escClose),"closableClass"in I&&t(8,a=I.closableClass),"class"in I&&t(1,u=I.class),"$$scope"in I&&t(13,s=I.$$scope)},n.$$.update=()=>{var I,L;n.$$.dirty&68&&f&&$(l),n.$$.dirty&4097&&(o?((I=c==null?void 0:c.classList)==null||I.add("active"),d("show")):((L=c==null?void 0:c.classList)==null||L.remove("active"),d("hide")))},[o,u,f,T,C,M,l,r,a,m,h,g,c,s,i,E]}class xn extends ke{constructor(e){super(),ye(this,e,f3,u3,be,{trigger:6,active:0,escClose:7,closableClass:8,class:1,hide:9,show:10,toggle:11})}get hide(){return this.$$.ctx[9]}get show(){return this.$$.ctx[10]}get toggle(){return this.$$.ctx[11]}}const c3=n=>({active:n&1}),$c=n=>({active:n[0]});function Mc(n){let e,t,i;const s=n[15].default,l=Ft(s,n,n[14],null);return{c(){e=v("div"),l&&l.c(),p(e,"class","accordion-content")},m(o,r){S(o,e,r),l&&l.m(e,null),i=!0},p(o,r){l&&l.p&&(!i||r&16384)&&jt(l,s,o,o[14],i?Rt(s,o[14],r,null):Ht(o[14]),null)},i(o){i||(A(l,o),o&&nt(()=>{t||(t=ze(e,It,{duration:150},!0)),t.run(1)}),i=!0)},o(o){P(l,o),o&&(t||(t=ze(e,It,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),o&&t&&t.end()}}}function d3(n){let e,t,i,s,l,o,r;const a=n[15].header,u=Ft(a,n,n[14],$c);let f=n[0]&&Mc(n);return{c(){e=v("div"),t=v("button"),u&&u.c(),i=D(),f&&f.c(),p(t,"type","button"),p(t,"class","accordion-header"),p(t,"draggable",n[2]),x(t,"interactive",n[3]),p(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),x(e,"active",n[0])},m(c,d){S(c,e,d),_(e,t),u&&u.m(t,null),_(e,i),f&&f.m(e,null),n[22](e),l=!0,o||(r=[K(t,"click",pt(n[17])),K(t,"drop",pt(n[18])),K(t,"dragstart",n[19]),K(t,"dragenter",n[20]),K(t,"dragleave",n[21]),K(t,"dragover",pt(n[16]))],o=!0)},p(c,[d]){u&&u.p&&(!l||d&16385)&&jt(u,a,c,c[14],l?Rt(a,c[14],d,c3):Ht(c[14]),$c),(!l||d&4)&&p(t,"draggable",c[2]),(!l||d&8)&&x(t,"interactive",c[3]),c[0]?f?(f.p(c,d),d&1&&A(f,1)):(f=Mc(c),f.c(),A(f,1),f.m(e,null)):f&&(pe(),P(f,1,1,()=>{f=null}),me()),(!l||d&130&&s!==(s="accordion "+(c[7]?"drag-over":"")+" "+c[1]))&&p(e,"class",s),(!l||d&131)&&x(e,"active",c[0])},i(c){l||(A(u,c),A(f),l=!0)},o(c){P(u,c),P(f),l=!1},d(c){c&&w(e),u&&u.d(c),f&&f.d(),n[22](null),o=!1,Le(r)}}}function p3(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=$t();let o,r,{class:a=""}=e,{draggable:u=!1}=e,{active:f=!1}=e,{interactive:c=!0}=e,{single:d=!1}=e,m=!1;function h(){return!!f}function g(){k(),t(0,f=!0),l("expand")}function b(){t(0,f=!1),clearTimeout(r),l("collapse")}function y(){l("toggle"),f?b():g()}function k(){if(d&&o.closest(".accordions")){const L=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const N of L)N.click()}}sn(()=>()=>clearTimeout(r));function T(L){We.call(this,n,L)}const C=()=>c&&y(),M=L=>{u&&(t(7,m=!1),k(),l("drop",L))},$=L=>u&&l("dragstart",L),O=L=>{u&&(t(7,m=!0),l("dragenter",L))},E=L=>{u&&(t(7,m=!1),l("dragleave",L))};function I(L){ie[L?"unshift":"push"](()=>{o=L,t(6,o)})}return n.$$set=L=>{"class"in L&&t(1,a=L.class),"draggable"in L&&t(2,u=L.draggable),"active"in L&&t(0,f=L.active),"interactive"in L&&t(3,c=L.interactive),"single"in L&&t(9,d=L.single),"$$scope"in L&&t(14,s=L.$$scope)},n.$$.update=()=>{n.$$.dirty&8257&&f&&(clearTimeout(r),t(13,r=setTimeout(()=>{o!=null&&o.scrollIntoViewIfNeeded?o==null||o.scrollIntoViewIfNeeded():o!=null&&o.scrollIntoView&&(o==null||o.scrollIntoView({behavior:"smooth",block:"nearest"}))},200)))},[f,a,u,c,y,k,o,m,l,d,h,g,b,r,s,i,T,C,M,$,O,E,I]}class ys extends ke{constructor(e){super(),ye(this,e,p3,d3,be,{class:1,draggable:2,active:0,interactive:3,single:9,isExpanded:10,expand:11,collapse:12,toggle:4,collapseSiblings:5})}get isExpanded(){return this.$$.ctx[10]}get expand(){return this.$$.ctx[11]}get collapse(){return this.$$.ctx[12]}get toggle(){return this.$$.ctx[4]}get collapseSiblings(){return this.$$.ctx[5]}}const m3=n=>({}),Dc=n=>({});function Oc(n,e,t){const i=n.slice();return i[46]=e[t],i}const h3=n=>({}),Ec=n=>({});function Ac(n,e,t){const i=n.slice();return i[46]=e[t],i[50]=t,i}function Ic(n){let e,t,i;return{c(){e=v("div"),t=z(n[2]),i=D(),p(e,"class","block txt-placeholder"),x(e,"link-hint",!n[5])},m(s,l){S(s,e,l),_(e,t),_(e,i)},p(s,l){l[0]&4&&re(t,s[2]),l[0]&32&&x(e,"link-hint",!s[5])},d(s){s&&w(e)}}}function g3(n){let e,t=n[46]+"",i;return{c(){e=v("span"),i=z(t),p(e,"class","txt")},m(s,l){S(s,e,l),_(e,i)},p(s,l){l[0]&1&&t!==(t=s[46]+"")&&re(i,t)},i:G,o:G,d(s){s&&w(e)}}}function _3(n){let e,t,i;const s=[{item:n[46]},n[9]];var l=n[8];function o(r){let a={};for(let u=0;u{q(f,1)}),me()}l?(e=Kt(l,o()),V(e.$$.fragment),A(e.$$.fragment,1),H(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&q(e,r)}}}function Pc(n){let e,t,i;function s(){return n[34](n[46])}return{c(){e=v("span"),e.innerHTML='',p(e,"class","clear")},m(l,o){S(l,e,o),t||(i=[Pe(Ye.call(null,e,"Clear")),K(e,"click",yn(pt(s)))],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Le(i)}}}function Lc(n){let e,t,i,s,l,o;const r=[_3,g3],a=[];function u(c,d){return c[8]?0:1}t=u(n),i=a[t]=r[t](n);let f=(n[4]||n[6])&&Pc(n);return{c(){e=v("div"),i.c(),s=D(),f&&f.c(),l=D(),p(e,"class","option")},m(c,d){S(c,e,d),a[t].m(e,null),_(e,s),f&&f.m(e,null),_(e,l),o=!0},p(c,d){let m=t;t=u(c),t===m?a[t].p(c,d):(pe(),P(a[m],1,1,()=>{a[m]=null}),me(),i=a[t],i?i.p(c,d):(i=a[t]=r[t](c),i.c()),A(i,1),i.m(e,s)),c[4]||c[6]?f?f.p(c,d):(f=Pc(c),f.c(),f.m(e,l)):f&&(f.d(1),f=null)},i(c){o||(A(i),o=!0)},o(c){P(i),o=!1},d(c){c&&w(e),a[t].d(),f&&f.d()}}}function Nc(n){let e,t,i={class:"dropdown dropdown-block options-dropdown dropdown-left",trigger:n[18],$$slots:{default:[y3]},$$scope:{ctx:n}};return e=new xn({props:i}),n[39](e),e.$on("show",n[24]),e.$on("hide",n[40]),{c(){V(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,l){const o={};l[0]&262144&&(o.trigger=s[18]),l[0]&1612938|l[1]&2048&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[39](null),q(e,s)}}}function Fc(n){let e,t,i,s,l,o,r,a,u=n[15].length&&Rc(n);return{c(){e=v("div"),t=v("label"),i=v("div"),i.innerHTML='',s=D(),l=v("input"),o=D(),u&&u.c(),p(i,"class","addon p-r-0"),l.autofocus=!0,p(l,"type","text"),p(l,"placeholder",n[3]),p(t,"class","input-group"),p(e,"class","form-field form-field-sm options-search")},m(f,c){S(f,e,c),_(e,t),_(t,i),_(t,s),_(t,l),de(l,n[15]),_(t,o),u&&u.m(t,null),l.focus(),r||(a=K(l,"input",n[36]),r=!0)},p(f,c){c[0]&8&&p(l,"placeholder",f[3]),c[0]&32768&&l.value!==f[15]&&de(l,f[15]),f[15].length?u?u.p(f,c):(u=Rc(f),u.c(),u.m(t,null)):u&&(u.d(1),u=null)},d(f){f&&w(e),u&&u.d(),r=!1,a()}}}function Rc(n){let e,t,i,s;return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","btn btn-sm btn-circle btn-transparent clear"),p(e,"class","addon suffix p-r-5")},m(l,o){S(l,e,o),_(e,t),i||(s=K(t,"click",yn(pt(n[21]))),i=!0)},p:G,d(l){l&&w(e),i=!1,s()}}}function jc(n){let e,t=n[1]&&Hc(n);return{c(){t&&t.c(),e=Ae()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1]?t?t.p(i,s):(t=Hc(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function Hc(n){let e,t;return{c(){e=v("div"),t=z(n[1]),p(e,"class","txt-missing")},m(i,s){S(i,e,s),_(e,t)},p(i,s){s[0]&2&&re(t,i[1])},d(i){i&&w(e)}}}function b3(n){let e=n[46]+"",t;return{c(){t=z(e)},m(i,s){S(i,t,s)},p(i,s){s[0]&1048576&&e!==(e=i[46]+"")&&re(t,e)},i:G,o:G,d(i){i&&w(t)}}}function v3(n){let e,t,i;const s=[{item:n[46]},n[11]];var l=n[10];function o(r){let a={};for(let u=0;u{q(f,1)}),me()}l?(e=Kt(l,o()),V(e.$$.fragment),A(e.$$.fragment,1),H(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&q(e,r)}}}function qc(n){let e,t,i,s,l,o,r;const a=[v3,b3],u=[];function f(m,h){return m[10]?0:1}t=f(n),i=u[t]=a[t](n);function c(...m){return n[37](n[46],...m)}function d(...m){return n[38](n[46],...m)}return{c(){e=v("div"),i.c(),s=D(),p(e,"tabindex","0"),p(e,"class","dropdown-item option"),x(e,"closable",n[7]),x(e,"selected",n[19](n[46]))},m(m,h){S(m,e,h),u[t].m(e,null),_(e,s),l=!0,o||(r=[K(e,"click",c),K(e,"keydown",d)],o=!0)},p(m,h){n=m;let g=t;t=f(n),t===g?u[t].p(n,h):(pe(),P(u[g],1,1,()=>{u[g]=null}),me(),i=u[t],i?i.p(n,h):(i=u[t]=a[t](n),i.c()),A(i,1),i.m(e,s)),(!l||h[0]&128)&&x(e,"closable",n[7]),(!l||h[0]&1572864)&&x(e,"selected",n[19](n[46]))},i(m){l||(A(i),l=!0)},o(m){P(i),l=!1},d(m){m&&w(e),u[t].d(),o=!1,Le(r)}}}function y3(n){let e,t,i,s,l,o=n[12]&&Fc(n);const r=n[33].beforeOptions,a=Ft(r,n,n[42],Ec);let u=n[20],f=[];for(let g=0;gP(f[g],1,1,()=>{f[g]=null});let d=null;u.length||(d=jc(n));const m=n[33].afterOptions,h=Ft(m,n,n[42],Dc);return{c(){o&&o.c(),e=D(),a&&a.c(),t=D(),i=v("div");for(let g=0;gP(a[d],1,1,()=>{a[d]=null});let f=null;r.length||(f=Ic(n));let c=!n[5]&&Nc(n);return{c(){e=v("div"),t=v("div");for(let d=0;d{c=null}),me()):c?(c.p(d,m),m[0]&32&&A(c,1)):(c=Nc(d),c.c(),A(c,1),c.m(e,null)),(!o||m[0]&8192&&l!==(l="select "+d[13]))&&p(e,"class",l),(!o||m[0]&8208)&&x(e,"multiple",d[4]),(!o||m[0]&8224)&&x(e,"disabled",d[5])},i(d){if(!o){for(let m=0;mje(Me,oe))||[]}function Y(ae,oe){ae.preventDefault(),g&&d?J(oe):U(oe)}function se(ae,oe){(ae.code==="Enter"||ae.code==="Space")&&Y(ae,oe)}function He(){R(),setTimeout(()=>{const ae=L==null?void 0:L.querySelector(".dropdown-item.option.selected");ae&&(ae.focus(),ae.scrollIntoView({block:"nearest"}))},0)}function Re(ae){ae.stopPropagation(),!m&&(E==null||E.toggle())}sn(()=>{const ae=document.querySelectorAll(`label[for="${r}"]`);for(const oe of ae)oe.addEventListener("click",Re);return()=>{for(const oe of ae)oe.removeEventListener("click",Re)}});const Fe=ae=>F(ae);function qe(ae){ie[ae?"unshift":"push"](()=>{N=ae,t(18,N)})}function ge(){I=this.value,t(15,I)}const Se=(ae,oe)=>Y(oe,ae),Ue=(ae,oe)=>se(oe,ae);function lt(ae){ie[ae?"unshift":"push"](()=>{E=ae,t(16,E)})}function ue(ae){We.call(this,n,ae)}function fe(ae){ie[ae?"unshift":"push"](()=>{L=ae,t(17,L)})}return n.$$set=ae=>{"id"in ae&&t(25,r=ae.id),"noOptionsText"in ae&&t(1,a=ae.noOptionsText),"selectPlaceholder"in ae&&t(2,u=ae.selectPlaceholder),"searchPlaceholder"in ae&&t(3,f=ae.searchPlaceholder),"items"in ae&&t(26,c=ae.items),"multiple"in ae&&t(4,d=ae.multiple),"disabled"in ae&&t(5,m=ae.disabled),"selected"in ae&&t(0,h=ae.selected),"toggle"in ae&&t(6,g=ae.toggle),"closable"in ae&&t(7,b=ae.closable),"labelComponent"in ae&&t(8,y=ae.labelComponent),"labelComponentProps"in ae&&t(9,k=ae.labelComponentProps),"optionComponent"in ae&&t(10,T=ae.optionComponent),"optionComponentProps"in ae&&t(11,C=ae.optionComponentProps),"searchable"in ae&&t(12,M=ae.searchable),"searchFunc"in ae&&t(27,$=ae.searchFunc),"class"in ae&&t(13,O=ae.class),"$$scope"in ae&&t(42,o=ae.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&67108864&&c&&(ee(),R()),n.$$.dirty[0]&67141632&&t(20,i=X(c,I)),n.$$.dirty[0]&1&&t(19,s=function(ae){const oe=B.toArray(h);return B.inArray(oe,ae)})},[h,a,u,f,d,m,g,b,y,k,T,C,M,O,F,I,E,L,N,s,i,R,Y,se,He,r,c,$,U,J,ne,Z,te,l,Fe,qe,ge,Se,Ue,lt,ue,fe,o]}class Qa extends ke{constructor(e){super(),ye(this,e,S3,k3,be,{id:25,noOptionsText:1,selectPlaceholder:2,searchPlaceholder:3,items:26,multiple:4,disabled:5,selected:0,toggle:6,closable:7,labelComponent:8,labelComponentProps:9,optionComponent:10,optionComponentProps:11,searchable:12,searchFunc:27,class:13,deselectItem:14,selectItem:28,toggleItem:29,reset:30,showDropdown:31,hideDropdown:32},null,[-1,-1])}get deselectItem(){return this.$$.ctx[14]}get selectItem(){return this.$$.ctx[28]}get toggleItem(){return this.$$.ctx[29]}get reset(){return this.$$.ctx[30]}get showDropdown(){return this.$$.ctx[31]}get hideDropdown(){return this.$$.ctx[32]}}function Vc(n){let e,t;return{c(){e=v("i"),p(e,"class",t="icon "+n[0].icon)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t="icon "+i[0].icon)&&p(e,"class",t)},d(i){i&&w(e)}}}function T3(n){let e,t,i=(n[0].label||n[0].name||n[0].title||n[0].id||n[0].value)+"",s,l=n[0].icon&&Vc(n);return{c(){l&&l.c(),e=D(),t=v("span"),s=z(i),p(t,"class","txt")},m(o,r){l&&l.m(o,r),S(o,e,r),S(o,t,r),_(t,s)},p(o,[r]){o[0].icon?l?l.p(o,r):(l=Vc(o),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null),r&1&&i!==(i=(o[0].label||o[0].name||o[0].title||o[0].id||o[0].value)+"")&&re(s,i)},i:G,o:G,d(o){l&&l.d(o),o&&w(e),o&&w(t)}}}function C3(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class zc extends ke{constructor(e){super(),ye(this,e,C3,T3,be,{item:0})}}const $3=n=>({}),Bc=n=>({});function M3(n){let e;const t=n[8].afterOptions,i=Ft(t,n,n[12],Bc);return{c(){i&&i.c()},m(s,l){i&&i.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l&4096)&&jt(i,t,s,s[12],e?Rt(t,s[12],l,$3):Ht(s[12]),Bc)},i(s){e||(A(i,s),e=!0)},o(s){P(i,s),e=!1},d(s){i&&i.d(s)}}}function D3(n){let e,t,i;const s=[{items:n[1]},{multiple:n[2]},{labelComponent:n[3]},{optionComponent:n[4]},n[5]];function l(r){n[9](r)}let o={$$slots:{afterOptions:[M3]},$$scope:{ctx:n}};for(let r=0;rve(e,"selected",l)),e.$on("show",n[10]),e.$on("hide",n[11]),{c(){V(e.$$.fragment)},m(r,a){H(e,r,a),i=!0},p(r,[a]){const u=a&62?ln(s,[a&2&&{items:r[1]},a&4&&{multiple:r[2]},a&8&&{labelComponent:r[3]},a&16&&{optionComponent:r[4]},a&32&&Xn(r[5])]):{};a&4096&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.selected=r[0],we(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){q(e,r)}}}function O3(n,e,t){const i=["items","multiple","selected","labelComponent","optionComponent","selectionKey","keyOfSelected"];let s=At(e,i),{$$slots:l={},$$scope:o}=e,{items:r=[]}=e,{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{labelComponent:f=zc}=e,{optionComponent:c=zc}=e,{selectionKey:d="value"}=e,{keyOfSelected:m=a?[]:void 0}=e;function h(T){T=B.toArray(T,!0);let C=[];for(let M of T){const $=B.findByKey(r,d,M);$&&C.push($)}T.length&&!C.length||t(0,u=a?C:C[0])}async function g(T){let C=B.toArray(T,!0).map(M=>M[d]);r.length&&t(6,m=a?C:C[0])}function b(T){u=T,t(0,u)}function y(T){We.call(this,n,T)}function k(T){We.call(this,n,T)}return n.$$set=T=>{e=Xe(Xe({},e),Gn(T)),t(5,s=At(e,i)),"items"in T&&t(1,r=T.items),"multiple"in T&&t(2,a=T.multiple),"selected"in T&&t(0,u=T.selected),"labelComponent"in T&&t(3,f=T.labelComponent),"optionComponent"in T&&t(4,c=T.optionComponent),"selectionKey"in T&&t(7,d=T.selectionKey),"keyOfSelected"in T&&t(6,m=T.keyOfSelected),"$$scope"in T&&t(12,o=T.$$scope)},n.$$.update=()=>{n.$$.dirty&66&&r&&h(m),n.$$.dirty&1&&g(u)},[u,r,a,f,c,s,m,d,l,b,y,k,o]}class Ls extends ke{constructor(e){super(),ye(this,e,O3,D3,be,{items:1,multiple:2,selected:0,labelComponent:3,optionComponent:4,selectionKey:7,keyOfSelected:6})}}function E3(n){let e,t,i;const s=[{class:"field-type-select "+n[1]},{items:n[2]},n[3]];function l(r){n[4](r)}let o={};for(let r=0;rve(e,"keyOfSelected",l)),{c(){V(e.$$.fragment)},m(r,a){H(e,r,a),i=!0},p(r,[a]){const u=a&14?ln(s,[a&2&&{class:"field-type-select "+r[1]},a&4&&{items:r[2]},a&8&&Xn(r[3])]):{};!t&&a&1&&(t=!0,u.keyOfSelected=r[0],we(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){q(e,r)}}}function A3(n,e,t){const i=["value","class"];let s=At(e,i),{value:l="text"}=e,{class:o=""}=e;const r=[{label:"Plain text",value:"text",icon:B.getFieldTypeIcon("text")},{label:"Rich editor",value:"editor",icon:B.getFieldTypeIcon("editor")},{label:"Number",value:"number",icon:B.getFieldTypeIcon("number")},{label:"Bool",value:"bool",icon:B.getFieldTypeIcon("bool")},{label:"Email",value:"email",icon:B.getFieldTypeIcon("email")},{label:"Url",value:"url",icon:B.getFieldTypeIcon("url")},{label:"DateTime",value:"date",icon:B.getFieldTypeIcon("date")},{label:"Select",value:"select",icon:B.getFieldTypeIcon("select")},{label:"File",value:"file",icon:B.getFieldTypeIcon("file")},{label:"Relation",value:"relation",icon:B.getFieldTypeIcon("relation")},{label:"JSON",value:"json",icon:B.getFieldTypeIcon("json")}];function a(u){l=u,t(0,l)}return n.$$set=u=>{e=Xe(Xe({},e),Gn(u)),t(3,s=At(e,i)),"value"in u&&t(0,l=u.value),"class"in u&&t(1,o=u.class)},[l,o,r,s,a]}class I3 extends ke{constructor(e){super(),ye(this,e,A3,E3,be,{value:0,class:1})}}function P3(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Min length"),s=D(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",o=n[5]),p(l,"step","1"),p(l,"min","0")},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].min),r||(a=K(l,"input",n[2]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].min&&de(l,u[0].min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function L3(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=z("Max length"),s=D(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",o=n[5]),p(l,"step","1"),p(l,"min",r=n[0].min||0)},m(f,c){S(f,e,c),_(e,t),S(f,s,c),S(f,l,c),de(l,n[0].max),a||(u=K(l,"input",n[3]),a=!0)},p(f,c){c&32&&i!==(i=f[5])&&p(e,"for",i),c&32&&o!==(o=f[5])&&p(l,"id",o),c&1&&r!==(r=f[0].min||0)&&p(l,"min",r),c&1&&ht(l.value)!==f[0].max&&de(l,f[0].max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function N3(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=z("Regex pattern"),s=D(),l=v("input"),r=D(),a=v("div"),a.innerHTML="Valid Go regular expression, eg. ^\\w+$.",p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5]),p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),de(l,n[0].pattern),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[4]),u=!0)},p(c,d){d&32&&i!==(i=c[5])&&p(e,"for",i),d&32&&o!==(o=c[5])&&p(l,"id",o),d&1&&l.value!==c[0].pattern&&de(l,c[0].pattern)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function F3(n){let e,t,i,s,l,o,r,a,u,f;return i=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[P3,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[L3,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.pattern",$$slots:{default:[N3,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=D(),l=v("div"),V(o.$$.fragment),r=D(),a=v("div"),V(u.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(a,"class","col-sm-12"),p(e,"class","grid")},m(c,d){S(c,e,d),_(e,t),H(i,t,null),_(e,s),_(e,l),H(o,l,null),_(e,r),_(e,a),H(u,a,null),f=!0},p(c,[d]){const m={};d&2&&(m.name="schema."+c[1]+".options.min"),d&97&&(m.$$scope={dirty:d,ctx:c}),i.$set(m);const h={};d&2&&(h.name="schema."+c[1]+".options.max"),d&97&&(h.$$scope={dirty:d,ctx:c}),o.$set(h);const g={};d&2&&(g.name="schema."+c[1]+".options.pattern"),d&97&&(g.$$scope={dirty:d,ctx:c}),u.$set(g)},i(c){f||(A(i.$$.fragment,c),A(o.$$.fragment,c),A(u.$$.fragment,c),f=!0)},o(c){P(i.$$.fragment,c),P(o.$$.fragment,c),P(u.$$.fragment,c),f=!1},d(c){c&&w(e),q(i),q(o),q(u)}}}function R3(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.min=ht(this.value),t(0,s)}function o(){s.max=ht(this.value),t(0,s)}function r(){s.pattern=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"options"in a&&t(0,s=a.options)},[s,i,l,o,r]}class j3 extends ke{constructor(e){super(),ye(this,e,R3,F3,be,{key:1,options:0})}}function H3(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Min"),s=D(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].min),r||(a=K(l,"input",n[2]),r=!0)},p(u,f){f&16&&i!==(i=u[4])&&p(e,"for",i),f&16&&o!==(o=u[4])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].min&&de(l,u[0].min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function q3(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=z("Max"),s=D(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4]),p(l,"min",r=n[0].min)},m(f,c){S(f,e,c),_(e,t),S(f,s,c),S(f,l,c),de(l,n[0].max),a||(u=K(l,"input",n[3]),a=!0)},p(f,c){c&16&&i!==(i=f[4])&&p(e,"for",i),c&16&&o!==(o=f[4])&&p(l,"id",o),c&1&&r!==(r=f[0].min)&&p(l,"min",r),c&1&&ht(l.value)!==f[0].max&&de(l,f[0].max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function V3(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[H3,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[q3,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=D(),l=v("div"),V(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),H(i,t,null),_(e,s),_(e,l),H(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),q(i),q(o)}}}function z3(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.min=ht(this.value),t(0,s)}function o(){s.max=ht(this.value),t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class B3 extends ke{constructor(e){super(),ye(this,e,z3,V3,be,{key:1,options:0})}}function U3(n,e,t){let{key:i=""}=e,{options:s={}}=e;return n.$$set=l=>{"key"in l&&t(0,i=l.key),"options"in l&&t(1,s=l.options)},[i,s]}class W3 extends ke{constructor(e){super(),ye(this,e,U3,null,be,{key:0,options:1})}}function Y3(n){let e,t,i,s,l=[{type:t=n[3].type||"text"},{value:n[2]},n[3]],o={};for(let r=0;r{t(0,o=B.splitNonEmpty(u.target.value,r))};return n.$$set=u=>{e=Xe(Xe({},e),Gn(u)),t(3,l=At(e,s)),"value"in u&&t(0,o=u.value),"separator"in u&&t(1,r=u.separator)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=(o||[]).join(", "))},[o,r,i,l,a]}class Ns extends ke{constructor(e){super(),ye(this,e,K3,Y3,be,{value:0,separator:1})}}function J3(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function h(b){n[2](b)}let g={id:n[4],disabled:!B.isEmpty(n[0].onlyDomains)};return n[0].exceptDomains!==void 0&&(g.value=n[0].exceptDomains),r=new Ns({props:g}),ie.push(()=>ve(r,"value",h)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=D(),s=v("i"),o=D(),V(r.$$.fragment),u=D(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[4]),p(f,"class","help-block")},m(b,y){S(b,e,y),_(e,t),_(e,i),_(e,s),S(b,o,y),H(r,b,y),S(b,u,y),S(b,f,y),c=!0,d||(m=Pe(Ye.call(null,s,{text:`List of domains that are NOT allowed. - This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&16&&l!==(l=b[4]))&&p(e,"for",l);const k={};y&16&&(k.id=b[4]),y&1&&(k.disabled=!B.isEmpty(b[0].onlyDomains)),!a&&y&1&&(a=!0,k.value=b[0].exceptDomains,we(()=>a=!1)),r.$set(k)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&w(e),b&&w(o),q(r,b),b&&w(u),b&&w(f),d=!1,m()}}}function Z3(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function h(b){n[3](b)}let g={id:n[4]+".options.onlyDomains",disabled:!B.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(g.value=n[0].onlyDomains),r=new Ns({props:g}),ie.push(()=>ve(r,"value",h)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=D(),s=v("i"),o=D(),V(r.$$.fragment),u=D(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[4]+".options.onlyDomains"),p(f,"class","help-block")},m(b,y){S(b,e,y),_(e,t),_(e,i),_(e,s),S(b,o,y),H(r,b,y),S(b,u,y),S(b,f,y),c=!0,d||(m=Pe(Ye.call(null,s,{text:`List of domains that are ONLY allowed. - This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&16&&l!==(l=b[4]+".options.onlyDomains"))&&p(e,"for",l);const k={};y&16&&(k.id=b[4]+".options.onlyDomains"),y&1&&(k.disabled=!B.isEmpty(b[0].exceptDomains)),!a&&y&1&&(a=!0,k.value=b[0].onlyDomains,we(()=>a=!1)),r.$set(k)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&w(e),b&&w(o),q(r,b),b&&w(u),b&&w(f),d=!1,m()}}}function G3(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[J3,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[Z3,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=D(),l=v("div"),V(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),H(i,t,null),_(e,s),_(e,l),H(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.onlyDomains"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),q(i),q(o)}}}function X3(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.exceptDomains,r)&&(s.exceptDomains=r,t(0,s))}function o(r){n.$$.not_equal(s.onlyDomains,r)&&(s.onlyDomains=r,t(0,s))}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class ob extends ke{constructor(e){super(),ye(this,e,X3,G3,be,{key:1,options:0})}}function x3(n){let e,t,i,s;function l(a){n[2](a)}function o(a){n[3](a)}let r={};return n[0]!==void 0&&(r.key=n[0]),n[1]!==void 0&&(r.options=n[1]),e=new ob({props:r}),ie.push(()=>ve(e,"key",l)),ie.push(()=>ve(e,"options",o)),{c(){V(e.$$.fragment)},m(a,u){H(e,a,u),s=!0},p(a,[u]){const f={};!t&&u&1&&(t=!0,f.key=a[0],we(()=>t=!1)),!i&&u&2&&(i=!0,f.options=a[1],we(()=>i=!1)),e.$set(f)},i(a){s||(A(e.$$.fragment,a),s=!0)},o(a){P(e.$$.fragment,a),s=!1},d(a){q(e,a)}}}function Q3(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){i=r,t(0,i)}function o(r){s=r,t(1,s)}return n.$$set=r=>{"key"in r&&t(0,i=r.key),"options"in r&&t(1,s=r.options)},[i,s,l,o]}class eT extends ke{constructor(e){super(),ye(this,e,Q3,x3,be,{key:0,options:1})}}function tT(n,e,t){let{key:i=""}=e,{options:s={}}=e;return n.$$set=l=>{"key"in l&&t(0,i=l.key),"options"in l&&t(1,s=l.options)},[i,s]}class nT extends ke{constructor(e){super(),ye(this,e,tT,null,be,{key:0,options:1})}}var Sr=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ks={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},_l={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var e=n%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},rn=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},Cn=function(n){return n===!0?1:0};function Uc(n,e){var t;return function(){var i=this,s=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,s)},e)}}var Tr=function(n){return n instanceof Array?n:[n]};function Gt(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function at(n,e,t){var i=window.document.createElement(n);return e=e||"",t=t||"",i.className=e,t!==void 0&&(i.textContent=t),i}function io(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function rb(n,e){if(e(n))return n;if(n.parentNode)return rb(n.parentNode,e)}function so(n,e){var t=at("div","numInputWrapper"),i=at("input","numInput "+n),s=at("span","arrowUp"),l=at("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?i.type="number":(i.type="text",i.pattern="\\d*"),e!==void 0)for(var o in e)i.setAttribute(o,e[o]);return t.appendChild(i),t.appendChild(s),t.appendChild(l),t}function mn(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var Cr=function(){},Lo=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},iT={D:Cr,F:function(n,e,t){n.setMonth(t.months.longhand.indexOf(e))},G:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},H:function(n,e){n.setHours(parseFloat(e))},J:function(n,e){n.setDate(parseFloat(e))},K:function(n,e,t){n.setHours(n.getHours()%12+12*Cn(new RegExp(t.amPM[1],"i").test(e)))},M:function(n,e,t){n.setMonth(t.months.shorthand.indexOf(e))},S:function(n,e){n.setSeconds(parseFloat(e))},U:function(n,e){return new Date(parseFloat(e)*1e3)},W:function(n,e,t){var i=parseInt(e),s=new Date(n.getFullYear(),0,2+(i-1)*7,0,0,0,0);return s.setDate(s.getDate()-s.getDay()+t.firstDayOfWeek),s},Y:function(n,e){n.setFullYear(parseFloat(e))},Z:function(n,e){return new Date(e)},d:function(n,e){n.setDate(parseFloat(e))},h:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},i:function(n,e){n.setMinutes(parseFloat(e))},j:function(n,e){n.setDate(parseFloat(e))},l:Cr,m:function(n,e){n.setMonth(parseFloat(e)-1)},n:function(n,e){n.setMonth(parseFloat(e)-1)},s:function(n,e){n.setSeconds(parseFloat(e))},u:function(n,e){return new Date(parseFloat(e))},w:Cr,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},Vi={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},ol={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[ol.w(n,e,t)]},F:function(n,e,t){return Lo(ol.n(n,e,t)-1,!1,e)},G:function(n,e,t){return rn(ol.h(n,e,t))},H:function(n){return rn(n.getHours())},J:function(n,e){return e.ordinal!==void 0?n.getDate()+e.ordinal(n.getDate()):n.getDate()},K:function(n,e){return e.amPM[Cn(n.getHours()>11)]},M:function(n,e){return Lo(n.getMonth(),!0,e)},S:function(n){return rn(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return rn(n.getFullYear(),4)},d:function(n){return rn(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return rn(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return rn(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}},ab=function(n){var e=n.config,t=e===void 0?ks:e,i=n.l10n,s=i===void 0?_l:i,l=n.isMobile,o=l===void 0?!1:l;return function(r,a,u){var f=u||s;return t.formatDate!==void 0&&!o?t.formatDate(r,a,f):a.split("").map(function(c,d,m){return ol[c]&&m[d-1]!=="\\"?ol[c](r,f,t):c!=="\\"?c:""}).join("")}},ua=function(n){var e=n.config,t=e===void 0?ks:e,i=n.l10n,s=i===void 0?_l:i;return function(l,o,r,a){if(!(l!==0&&!l)){var u=a||s,f,c=l;if(l instanceof Date)f=new Date(l.getTime());else if(typeof l!="string"&&l.toFixed!==void 0)f=new Date(l);else if(typeof l=="string"){var d=o||(t||ks).dateFormat,m=String(l).trim();if(m==="today")f=new Date,r=!0;else if(t&&t.parseDate)f=t.parseDate(l,d);else if(/Z$/.test(m)||/GMT$/.test(m))f=new Date(l);else{for(var h=void 0,g=[],b=0,y=0,k="";bMath.min(e,t)&&n=0?new Date:new Date(t.config.minDate.getTime()),Q=Mr(t.config);W.setHours(Q.hours,Q.minutes,Q.seconds,W.getMilliseconds()),t.selectedDates=[W],t.latestSelectedDateObj=W}j!==void 0&&j.type!=="blur"&&Fl(j);var le=t._input.value;c(),qt(),t._input.value!==le&&t._debouncedChange()}function u(j,W){return j%12+12*Cn(W===t.l10n.amPM[1])}function f(j){switch(j%24){case 0:case 12:return 12;default:return j%12}}function c(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var j=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,W=(parseInt(t.minuteElement.value,10)||0)%60,Q=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(j=u(j,t.amPM.textContent));var le=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&hn(t.latestSelectedDateObj,t.config.minDate,!0)===0,Ce=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&hn(t.latestSelectedDateObj,t.config.maxDate,!0)===0;if(t.config.maxTime!==void 0&&t.config.minTime!==void 0&&t.config.minTime>t.config.maxTime){var Ee=$r(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Ie=$r(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),De=$r(j,W,Q);if(De>Ie&&De=12)]),t.secondElement!==void 0&&(t.secondElement.value=rn(Q)))}function h(j){var W=mn(j),Q=parseInt(W.value)+(j.delta||0);(Q/1e3>1||j.key==="Enter"&&!/[^\d]/.test(Q.toString()))&&ge(Q)}function g(j,W,Q,le){if(W instanceof Array)return W.forEach(function(Ce){return g(j,Ce,Q,le)});if(j instanceof Array)return j.forEach(function(Ce){return g(Ce,W,Q,le)});j.addEventListener(W,Q,le),t._handlers.push({remove:function(){return j.removeEventListener(W,Q,le)}})}function b(){xe("onChange")}function y(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(Q){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+Q+"]"),function(le){return g(le,"click",t[Q])})}),t.isMobile){ss();return}var j=Uc(ae,50);if(t._debouncedChange=Uc(b,rT),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&g(t.daysContainer,"mouseover",function(Q){t.config.mode==="range"&&fe(mn(Q))}),g(t._input,"keydown",ue),t.calendarContainer!==void 0&&g(t.calendarContainer,"keydown",ue),!t.config.inline&&!t.config.static&&g(window,"resize",j),window.ontouchstart!==void 0?g(window.document,"touchstart",qe):g(window.document,"mousedown",qe),g(window.document,"focus",qe,{capture:!0}),t.config.clickOpens===!0&&(g(t._input,"focus",t.open),g(t._input,"click",t.open)),t.daysContainer!==void 0&&(g(t.monthNav,"click",Zt),g(t.monthNav,["keyup","increment"],h),g(t.daysContainer,"click",Qn)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var W=function(Q){return mn(Q).select()};g(t.timeContainer,["increment"],a),g(t.timeContainer,"blur",a,{capture:!0}),g(t.timeContainer,"click",T),g([t.hourElement,t.minuteElement],["focus","click"],W),t.secondElement!==void 0&&g(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&g(t.amPM,"click",function(Q){a(Q)})}t.config.allowInput&&g(t._input,"blur",lt)}function k(j,W){var Q=j!==void 0?t.parseDate(j):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate1),t.calendarContainer.appendChild(j);var Ce=t.config.appendTo!==void 0&&t.config.appendTo.nodeType!==void 0;if((t.config.inline||t.config.static)&&(t.calendarContainer.classList.add(t.config.inline?"inline":"static"),t.config.inline&&(!Ce&&t.element.parentNode?t.element.parentNode.insertBefore(t.calendarContainer,t._input.nextSibling):t.config.appendTo!==void 0&&t.config.appendTo.appendChild(t.calendarContainer)),t.config.static)){var Ee=at("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(Ee,t.element),Ee.appendChild(t.element),t.altInput&&Ee.appendChild(t.altInput),Ee.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function $(j,W,Q,le){var Ce=Se(W,!0),Ee=at("span",j,W.getDate().toString());return Ee.dateObj=W,Ee.$i=le,Ee.setAttribute("aria-label",t.formatDate(W,t.config.ariaDateFormat)),j.indexOf("hidden")===-1&&hn(W,t.now)===0&&(t.todayDateElem=Ee,Ee.classList.add("today"),Ee.setAttribute("aria-current","date")),Ce?(Ee.tabIndex=-1,ei(W)&&(Ee.classList.add("selected"),t.selectedDateElem=Ee,t.config.mode==="range"&&(Gt(Ee,"startRange",t.selectedDates[0]&&hn(W,t.selectedDates[0],!0)===0),Gt(Ee,"endRange",t.selectedDates[1]&&hn(W,t.selectedDates[1],!0)===0),j==="nextMonthDay"&&Ee.classList.add("inRange")))):Ee.classList.add("flatpickr-disabled"),t.config.mode==="range"&&os(W)&&!ei(W)&&Ee.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&j!=="prevMonthDay"&&le%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend",""+t.config.getWeek(W)+""),xe("onDayCreate",Ee),Ee}function O(j){j.focus(),t.config.mode==="range"&&fe(j)}function E(j){for(var W=j>0?0:t.config.showMonths-1,Q=j>0?t.config.showMonths:-1,le=W;le!=Q;le+=j)for(var Ce=t.daysContainer.children[le],Ee=j>0?0:Ce.children.length-1,Ie=j>0?Ce.children.length:-1,De=Ee;De!=Ie;De+=j){var Ke=Ce.children[De];if(Ke.className.indexOf("hidden")===-1&&Se(Ke.dateObj))return Ke}}function I(j,W){for(var Q=j.className.indexOf("Month")===-1?j.dateObj.getMonth():t.currentMonth,le=W>0?t.config.showMonths:-1,Ce=W>0?1:-1,Ee=Q-t.currentMonth;Ee!=le;Ee+=Ce)for(var Ie=t.daysContainer.children[Ee],De=Q-t.currentMonth===Ee?j.$i+W:W<0?Ie.children.length-1:0,Ke=Ie.children.length,Ne=De;Ne>=0&&Ne0?Ke:-1);Ne+=Ce){var Be=Ie.children[Ne];if(Be.className.indexOf("hidden")===-1&&Se(Be.dateObj)&&Math.abs(j.$i-Ne)>=Math.abs(W))return O(Be)}t.changeMonth(Ce),L(E(Ce),0)}function L(j,W){var Q=l(),le=Ue(Q||document.body),Ce=j!==void 0?j:le?Q:t.selectedDateElem!==void 0&&Ue(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&Ue(t.todayDateElem)?t.todayDateElem:E(W>0?1:-1);Ce===void 0?t._input.focus():le?I(Ce,W):O(Ce)}function N(j,W){for(var Q=(new Date(j,W,1).getDay()-t.l10n.firstDayOfWeek+7)%7,le=t.utils.getDaysInMonth((W-1+12)%12,j),Ce=t.utils.getDaysInMonth(W,j),Ee=window.document.createDocumentFragment(),Ie=t.config.showMonths>1,De=Ie?"prevMonthDay hidden":"prevMonthDay",Ke=Ie?"nextMonthDay hidden":"nextMonthDay",Ne=le+1-Q,Be=0;Ne<=le;Ne++,Be++)Ee.appendChild($("flatpickr-day "+De,new Date(j,W-1,Ne),Ne,Be));for(Ne=1;Ne<=Ce;Ne++,Be++)Ee.appendChild($("flatpickr-day",new Date(j,W,Ne),Ne,Be));for(var mt=Ce+1;mt<=42-Q&&(t.config.showMonths===1||Be%7!==0);mt++,Be++)Ee.appendChild($("flatpickr-day "+Ke,new Date(j,W+1,mt%Ce),mt,Be));var Un=at("div","dayContainer");return Un.appendChild(Ee),Un}function F(){if(t.daysContainer!==void 0){io(t.daysContainer),t.weekNumbers&&io(t.weekNumbers);for(var j=document.createDocumentFragment(),W=0;W1||t.config.monthSelectorType!=="dropdown")){var j=function(le){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&let.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var W=0;W<12;W++)if(j(W)){var Q=at("option","flatpickr-monthDropdown-month");Q.value=new Date(t.currentYear,W).getMonth().toString(),Q.textContent=Lo(W,t.config.shorthandCurrentMonth,t.l10n),Q.tabIndex=-1,t.currentMonth===W&&(Q.selected=!0),t.monthsDropdownContainer.appendChild(Q)}}}function J(){var j=at("div","flatpickr-month"),W=window.document.createDocumentFragment(),Q;t.config.showMonths>1||t.config.monthSelectorType==="static"?Q=at("span","cur-month"):(t.monthsDropdownContainer=at("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),g(t.monthsDropdownContainer,"change",function(Ie){var De=mn(Ie),Ke=parseInt(De.value,10);t.changeMonth(Ke-t.currentMonth),xe("onMonthChange")}),U(),Q=t.monthsDropdownContainer);var le=so("cur-year",{tabindex:"-1"}),Ce=le.getElementsByTagName("input")[0];Ce.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&Ce.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(Ce.setAttribute("max",t.config.maxDate.getFullYear().toString()),Ce.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Ee=at("div","flatpickr-current-month");return Ee.appendChild(Q),Ee.appendChild(le),W.appendChild(Ee),j.appendChild(W),{container:j,yearElement:Ce,monthElement:Q}}function ne(){io(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var j=t.config.showMonths;j--;){var W=J();t.yearElements.push(W.yearElement),t.monthElements.push(W.monthElement),t.monthNav.appendChild(W.container)}t.monthNav.appendChild(t.nextMonthNav)}function Z(){return t.monthNav=at("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=at("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=at("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,ne(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(j){t.__hidePrevMonthArrow!==j&&(Gt(t.prevMonthNav,"flatpickr-disabled",j),t.__hidePrevMonthArrow=j)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(j){t.__hideNextMonthArrow!==j&&(Gt(t.nextMonthNav,"flatpickr-disabled",j),t.__hideNextMonthArrow=j)}}),t.currentYearElement=t.yearElements[0],Ei(),t.monthNav}function te(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var j=Mr(t.config);t.timeContainer=at("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var W=at("span","flatpickr-time-separator",":"),Q=so("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=Q.getElementsByTagName("input")[0];var le=so("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=le.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=rn(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?j.hours:f(j.hours)),t.minuteElement.value=rn(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():j.minutes),t.hourElement.setAttribute("step",t.config.hourIncrement.toString()),t.minuteElement.setAttribute("step",t.config.minuteIncrement.toString()),t.hourElement.setAttribute("min",t.config.time_24hr?"0":"1"),t.hourElement.setAttribute("max",t.config.time_24hr?"23":"12"),t.hourElement.setAttribute("maxlength","2"),t.minuteElement.setAttribute("min","0"),t.minuteElement.setAttribute("max","59"),t.minuteElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(Q),t.timeContainer.appendChild(W),t.timeContainer.appendChild(le),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var Ce=so("flatpickr-second");t.secondElement=Ce.getElementsByTagName("input")[0],t.secondElement.value=rn(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():j.seconds),t.secondElement.setAttribute("step",t.minuteElement.getAttribute("step")),t.secondElement.setAttribute("min","0"),t.secondElement.setAttribute("max","59"),t.secondElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(at("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(Ce)}return t.config.time_24hr||(t.amPM=at("span","flatpickr-am-pm",t.l10n.amPM[Cn((t.latestSelectedDateObj?t.hourElement.value:t.config.defaultHour)>11)]),t.amPM.title=t.l10n.toggleTitle,t.amPM.tabIndex=-1,t.timeContainer.appendChild(t.amPM)),t.timeContainer}function ee(){t.weekdayContainer?io(t.weekdayContainer):t.weekdayContainer=at("div","flatpickr-weekdays");for(var j=t.config.showMonths;j--;){var W=at("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(W)}return R(),t.weekdayContainer}function R(){if(t.weekdayContainer){var j=t.l10n.firstDayOfWeek,W=Wc(t.l10n.weekdays.shorthand);j>0&&j - `+W.join("")+` - - `}}function X(){t.calendarContainer.classList.add("hasWeeks");var j=at("div","flatpickr-weekwrapper");j.appendChild(at("span","flatpickr-weekday",t.l10n.weekAbbreviation));var W=at("div","flatpickr-weeks");return j.appendChild(W),{weekWrapper:j,weekNumbers:W}}function Y(j,W){W===void 0&&(W=!0);var Q=W?j:j-t.currentMonth;Q<0&&t._hidePrevMonthArrow===!0||Q>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=Q,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,xe("onYearChange"),U()),F(),xe("onMonthChange"),Ei())}function se(j,W){if(j===void 0&&(j=!0),W===void 0&&(W=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,W===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var Q=Mr(t.config),le=Q.hours,Ce=Q.minutes,Ee=Q.seconds;m(le,Ce,Ee)}t.redraw(),j&&xe("onChange")}function He(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),xe("onClose")}function Re(){t.config!==void 0&&xe("onDestroy");for(var j=t._handlers.length;j--;)t._handlers[j].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var W=t.calendarContainer.parentNode;if(W.lastChild&&W.removeChild(W.lastChild),W.parentNode){for(;W.firstChild;)W.parentNode.insertBefore(W.firstChild,W);W.parentNode.removeChild(W)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(Q){try{delete t[Q]}catch{}})}function Fe(j){return t.calendarContainer.contains(j)}function qe(j){if(t.isOpen&&!t.config.inline){var W=mn(j),Q=Fe(W),le=W===t.input||W===t.altInput||t.element.contains(W)||j.path&&j.path.indexOf&&(~j.path.indexOf(t.input)||~j.path.indexOf(t.altInput)),Ce=!le&&!Q&&!Fe(j.relatedTarget),Ee=!t.config.ignoredFocusElements.some(function(Ie){return Ie.contains(W)});Ce&&Ee&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&a(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function ge(j){if(!(!j||t.config.minDate&&jt.config.maxDate.getFullYear())){var W=j,Q=t.currentYear!==W;t.currentYear=W||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),Q&&(t.redraw(),xe("onYearChange"),U())}}function Se(j,W){var Q;W===void 0&&(W=!0);var le=t.parseDate(j,void 0,W);if(t.config.minDate&&le&&hn(le,t.config.minDate,W!==void 0?W:!t.minDateHasTime)<0||t.config.maxDate&&le&&hn(le,t.config.maxDate,W!==void 0?W:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(le===void 0)return!1;for(var Ce=!!t.config.enable,Ee=(Q=t.config.enable)!==null&&Q!==void 0?Q:t.config.disable,Ie=0,De=void 0;Ie=De.from.getTime()&&le.getTime()<=De.to.getTime())return Ce}return!Ce}function Ue(j){return t.daysContainer!==void 0?j.className.indexOf("hidden")===-1&&j.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(j):!1}function lt(j){var W=j.target===t._input,Q=t._input.value.trimEnd()!==Ai();W&&Q&&!(j.relatedTarget&&Fe(j.relatedTarget))&&t.setDate(t._input.value,!0,j.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function ue(j){var W=mn(j),Q=t.config.wrap?n.contains(W):W===t._input,le=t.config.allowInput,Ce=t.isOpen&&(!le||!Q),Ee=t.config.inline&&Q&&!le;if(j.keyCode===13&&Q){if(le)return t.setDate(t._input.value,!0,W===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),W.blur();t.open()}else if(Fe(W)||Ce||Ee){var Ie=!!t.timeContainer&&t.timeContainer.contains(W);switch(j.keyCode){case 13:Ie?(j.preventDefault(),a(),ot()):Qn(j);break;case 27:j.preventDefault(),ot();break;case 8:case 46:Q&&!t.config.allowInput&&(j.preventDefault(),t.clear());break;case 37:case 39:if(!Ie&&!Q){j.preventDefault();var De=l();if(t.daysContainer!==void 0&&(le===!1||De&&Ue(De))){var Ke=j.keyCode===39?1:-1;j.ctrlKey?(j.stopPropagation(),Y(Ke),L(E(1),0)):L(void 0,Ke)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:j.preventDefault();var Ne=j.keyCode===40?1:-1;t.daysContainer&&W.$i!==void 0||W===t.input||W===t.altInput?j.ctrlKey?(j.stopPropagation(),ge(t.currentYear-Ne),L(E(1),0)):Ie||L(void 0,Ne*7):W===t.currentYearElement?ge(t.currentYear-Ne):t.config.enableTime&&(!Ie&&t.hourElement&&t.hourElement.focus(),a(j),t._debouncedChange());break;case 9:if(Ie){var Be=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(pn){return pn}),mt=Be.indexOf(W);if(mt!==-1){var Un=Be[mt+(j.shiftKey?-1:1)];j.preventDefault(),(Un||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(W)&&j.shiftKey&&(j.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&W===t.amPM)switch(j.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],c(),qt();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],c(),qt();break}(Q||Fe(W))&&xe("onKeyDown",j)}function fe(j,W){if(W===void 0&&(W="flatpickr-day"),!(t.selectedDates.length!==1||j&&(!j.classList.contains(W)||j.classList.contains("flatpickr-disabled")))){for(var Q=j?j.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),le=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Ce=Math.min(Q,t.selectedDates[0].getTime()),Ee=Math.max(Q,t.selectedDates[0].getTime()),Ie=!1,De=0,Ke=0,Ne=Ce;NeCe&&NeDe)?De=Ne:Ne>le&&(!Ke||Ne ."+W));Be.forEach(function(mt){var Un=mt.dateObj,pn=Un.getTime(),Fs=De>0&&pn0&&pn>Ke;if(Fs){mt.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(rs){mt.classList.remove(rs)});return}else if(Ie&&!Fs)return;["startRange","inRange","endRange","notAllowed"].forEach(function(rs){mt.classList.remove(rs)}),j!==void 0&&(j.classList.add(Q<=t.selectedDates[0].getTime()?"startRange":"endRange"),leQ&&pn===le&&mt.classList.add("endRange"),pn>=De&&(Ke===0||pn<=Ke)&&sT(pn,le,Q)&&mt.classList.add("inRange"))})}}function ae(){t.isOpen&&!t.config.static&&!t.config.inline&&$e()}function oe(j,W){if(W===void 0&&(W=t._positionElement),t.isMobile===!0){if(j){j.preventDefault();var Q=mn(j);Q&&Q.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),xe("onOpen");return}else if(t._input.disabled||t.config.inline)return;var le=t.isOpen;t.isOpen=!0,le||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),xe("onOpen"),$e(W)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(j===void 0||!t.timeContainer.contains(j.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function je(j){return function(W){var Q=t.config["_"+j+"Date"]=t.parseDate(W,t.config.dateFormat),le=t.config["_"+(j==="min"?"max":"min")+"Date"];Q!==void 0&&(t[j==="min"?"minDateHasTime":"maxDateHasTime"]=Q.getHours()>0||Q.getMinutes()>0||Q.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Ce){return Se(Ce)}),!t.selectedDates.length&&j==="min"&&d(Q),qt()),t.daysContainer&&(Mt(),Q!==void 0?t.currentYearElement[j]=Q.getFullYear().toString():t.currentYearElement.removeAttribute(j),t.currentYearElement.disabled=!!le&&Q!==void 0&&le.getFullYear()===Q.getFullYear())}}function Me(){var j=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],W=Bt(Bt({},JSON.parse(JSON.stringify(n.dataset||{}))),e),Q={};t.config.parseDate=W.parseDate,t.config.formatDate=W.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(Be){t.config._enable=fi(Be)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(Be){t.config._disable=fi(Be)}});var le=W.mode==="time";if(!W.dateFormat&&(W.enableTime||le)){var Ce=Et.defaultConfig.dateFormat||ks.dateFormat;Q.dateFormat=W.noCalendar||le?"H:i"+(W.enableSeconds?":S":""):Ce+" H:i"+(W.enableSeconds?":S":"")}if(W.altInput&&(W.enableTime||le)&&!W.altFormat){var Ee=Et.defaultConfig.altFormat||ks.altFormat;Q.altFormat=W.noCalendar||le?"h:i"+(W.enableSeconds?":S K":" K"):Ee+(" h:i"+(W.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:je("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:je("max")});var Ie=function(Be){return function(mt){t.config[Be==="min"?"_minTime":"_maxTime"]=t.parseDate(mt,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:Ie("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:Ie("max")}),W.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,Q,W);for(var De=0;De-1?t.config[Ne]=Tr(Ke[Ne]).map(o).concat(t.config[Ne]):typeof W[Ne]>"u"&&(t.config[Ne]=Ke[Ne])}W.altInputClass||(t.config.altInputClass=Te().className+" "+t.config.altInputClass),xe("onParseConfig")}function Te(){return t.config.wrap?n.querySelector("[data-input]"):n}function ce(){typeof t.config.locale!="object"&&typeof Et.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=Bt(Bt({},Et.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?Et.l10ns[t.config.locale]:void 0),Vi.D="("+t.l10n.weekdays.shorthand.join("|")+")",Vi.l="("+t.l10n.weekdays.longhand.join("|")+")",Vi.M="("+t.l10n.months.shorthand.join("|")+")",Vi.F="("+t.l10n.months.longhand.join("|")+")",Vi.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var j=Bt(Bt({},e),JSON.parse(JSON.stringify(n.dataset||{})));j.time_24hr===void 0&&Et.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=ab(t),t.parseDate=ua({config:t.config,l10n:t.l10n})}function $e(j){if(typeof t.config.position=="function")return void t.config.position(t,j);if(t.calendarContainer!==void 0){xe("onPreCalendarPosition");var W=j||t._positionElement,Q=Array.prototype.reduce.call(t.calendarContainer.children,function(yb,kb){return yb+kb.offsetHeight},0),le=t.calendarContainer.offsetWidth,Ce=t.config.position.split(" "),Ee=Ce[0],Ie=Ce.length>1?Ce[1]:null,De=W.getBoundingClientRect(),Ke=window.innerHeight-De.bottom,Ne=Ee==="above"||Ee!=="below"&&KeQ,Be=window.pageYOffset+De.top+(Ne?-Q-2:W.offsetHeight+2);if(Gt(t.calendarContainer,"arrowTop",!Ne),Gt(t.calendarContainer,"arrowBottom",Ne),!t.config.inline){var mt=window.pageXOffset+De.left,Un=!1,pn=!1;Ie==="center"?(mt-=(le-De.width)/2,Un=!0):Ie==="right"&&(mt-=le-De.width,pn=!0),Gt(t.calendarContainer,"arrowLeft",!Un&&!pn),Gt(t.calendarContainer,"arrowCenter",Un),Gt(t.calendarContainer,"arrowRight",pn);var Fs=window.document.body.offsetWidth-(window.pageXOffset+De.right),rs=mt+le>window.document.body.offsetWidth,pb=Fs+le>window.document.body.offsetWidth;if(Gt(t.calendarContainer,"rightMost",rs),!t.config.static)if(t.calendarContainer.style.top=Be+"px",!rs)t.calendarContainer.style.left=mt+"px",t.calendarContainer.style.right="auto";else if(!pb)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=Fs+"px";else{var xo=Ze();if(xo===void 0)return;var mb=window.document.body.offsetWidth,hb=Math.max(0,mb/2-le/2),gb=".flatpickr-calendar.centerMost:before",_b=".flatpickr-calendar.centerMost:after",bb=xo.cssRules.length,vb="{left:"+De.left+"px;right:auto;}";Gt(t.calendarContainer,"rightMost",!1),Gt(t.calendarContainer,"centerMost",!0),xo.insertRule(gb+","+_b+vb,bb),t.calendarContainer.style.left=hb+"px",t.calendarContainer.style.right="auto"}}}}function Ze(){for(var j=null,W=0;Wt.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=le,t.config.mode==="single")t.selectedDates=[Ce];else if(t.config.mode==="multiple"){var Ie=ei(Ce);Ie?t.selectedDates.splice(parseInt(Ie),1):t.selectedDates.push(Ce)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Ce,t.selectedDates.push(Ce),hn(Ce,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(Be,mt){return Be.getTime()-mt.getTime()}));if(c(),Ee){var De=t.currentYear!==Ce.getFullYear();t.currentYear=Ce.getFullYear(),t.currentMonth=Ce.getMonth(),De&&(xe("onYearChange"),U()),xe("onMonthChange")}if(Ei(),F(),qt(),!Ee&&t.config.mode!=="range"&&t.config.showMonths===1?O(le):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var Ke=t.config.mode==="single"&&!t.config.enableTime,Ne=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(Ke||Ne)&&ot()}b()}}var ui={locale:[ce,R],showMonths:[ne,r,ee],minDate:[k],maxDate:[k],positionElement:[Oi],clickOpens:[function(){t.config.clickOpens===!0?(g(t._input,"focus",t.open),g(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function ts(j,W){if(j!==null&&typeof j=="object"){Object.assign(t.config,j);for(var Q in j)ui[Q]!==void 0&&ui[Q].forEach(function(le){return le()})}else t.config[j]=W,ui[j]!==void 0?ui[j].forEach(function(le){return le()}):Sr.indexOf(j)>-1&&(t.config[j]=Tr(W));t.redraw(),qt(!0)}function ns(j,W){var Q=[];if(j instanceof Array)Q=j.map(function(le){return t.parseDate(le,W)});else if(j instanceof Date||typeof j=="number")Q=[t.parseDate(j,W)];else if(typeof j=="string")switch(t.config.mode){case"single":case"time":Q=[t.parseDate(j,W)];break;case"multiple":Q=j.split(t.config.conjunction).map(function(le){return t.parseDate(le,W)});break;case"range":Q=j.split(t.l10n.rangeSeparator).map(function(le){return t.parseDate(le,W)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(j)));t.selectedDates=t.config.allowInvalidPreload?Q:Q.filter(function(le){return le instanceof Date&&Se(le,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(le,Ce){return le.getTime()-Ce.getTime()})}function Ll(j,W,Q){if(W===void 0&&(W=!1),Q===void 0&&(Q=t.config.dateFormat),j!==0&&!j||j instanceof Array&&j.length===0)return t.clear(W);ns(j,Q),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),k(void 0,W),d(),t.selectedDates.length===0&&t.clear(!1),qt(W),W&&xe("onChange")}function fi(j){return j.slice().map(function(W){return typeof W=="string"||typeof W=="number"||W instanceof Date?t.parseDate(W,void 0,!0):W&&typeof W=="object"&&W.from&&W.to?{from:t.parseDate(W.from,void 0),to:t.parseDate(W.to,void 0)}:W}).filter(function(W){return W})}function is(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var j=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);j&&ns(j,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function Nl(){if(t.input=Te(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=at(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),Oi()}function Oi(){t._positionElement=t.config.positionElement||t._input}function ss(){var j=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=at("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=j,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=j==="datetime-local"?"Y-m-d\\TH:i:S":j==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}g(t.mobileInput,"change",function(W){t.setDate(mn(W).value,!1,t.mobileFormatStr),xe("onChange"),xe("onClose")})}function on(j){if(t.isOpen===!0)return t.close();t.open(j)}function xe(j,W){if(t.config!==void 0){var Q=t.config[j];if(Q!==void 0&&Q.length>0)for(var le=0;Q[le]&&le=0&&hn(j,t.selectedDates[1])<=0}function Ei(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(j,W){var Q=new Date(t.currentYear,t.currentMonth,1);Q.setMonth(t.currentMonth+W),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[W].textContent=Lo(Q.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=Q.getMonth().toString(),j.value=Q.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYeart.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function Ai(j){var W=j||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(Q){return t.formatDate(Q,W)}).filter(function(Q,le,Ce){return t.config.mode!=="range"||t.config.enableTime||Ce.indexOf(Q)===le}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function qt(j){j===void 0&&(j=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=Ai(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Ai(t.config.altFormat)),j!==!1&&xe("onValueUpdate")}function Zt(j){var W=mn(j),Q=t.prevMonthNav.contains(W),le=t.nextMonthNav.contains(W);Q||le?Y(Q?-1:1):t.yearElements.indexOf(W)>=0?W.select():W.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):W.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Fl(j){j.preventDefault();var W=j.type==="keydown",Q=mn(j),le=Q;t.amPM!==void 0&&Q===t.amPM&&(t.amPM.textContent=t.l10n.amPM[Cn(t.amPM.textContent===t.l10n.amPM[0])]);var Ce=parseFloat(le.getAttribute("min")),Ee=parseFloat(le.getAttribute("max")),Ie=parseFloat(le.getAttribute("step")),De=parseInt(le.value,10),Ke=j.delta||(W?j.which===38?1:-1:0),Ne=De+Ie*Ke;if(typeof le.value<"u"&&le.value.length===2){var Be=le===t.hourElement,mt=le===t.minuteElement;NeEe&&(Ne=le===t.hourElement?Ne-Ee-Cn(!t.amPM):Ce,mt&&C(void 0,1,t.hourElement)),t.amPM&&Be&&(Ie===1?Ne+De===23:Math.abs(Ne-De)>Ie)&&(t.amPM.textContent=t.l10n.amPM[Cn(t.amPM.textContent===t.l10n.amPM[0])]),le.value=rn(Ne)}}return s(),t}function ws(n,e){for(var t=Array.prototype.slice.call(n).filter(function(o){return o instanceof HTMLElement}),i=[],s=0;st===e[i]))}function dT(n,e,t){const i=["value","formattedValue","element","dateFormat","options","input","flatpickr"];let s=At(e,i),{$$slots:l={},$$scope:o}=e;const r=new Set(["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"]);let{value:a=void 0,formattedValue:u="",element:f=void 0,dateFormat:c=void 0}=e,{options:d={}}=e,m=!1,{input:h=void 0,flatpickr:g=void 0}=e;sn(()=>{const C=f??h,M=y(d);return M.onReady.push(($,O,E)=>{a===void 0&&k($,O,E),tn().then(()=>{t(8,m=!0)})}),t(3,g=Et(C,Object.assign(M,f?{wrap:!0}:{}))),()=>{g.destroy()}});const b=$t();function y(C={}){C=Object.assign({},C);for(const M of r){const $=(O,E,I)=>{b(cT(M),[O,E,I])};M in C?(Array.isArray(C[M])||(C[M]=[C[M]]),C[M].push($)):C[M]=[$]}return C.onChange&&!C.onChange.includes(k)&&C.onChange.push(k),C}function k(C,M,$){const O=Yc($,C);!Kc(a,O)&&(a||O)&&t(2,a=O),t(4,u=M)}function T(C){ie[C?"unshift":"push"](()=>{h=C,t(0,h)})}return n.$$set=C=>{e=Xe(Xe({},e),Gn(C)),t(1,s=At(e,i)),"value"in C&&t(2,a=C.value),"formattedValue"in C&&t(4,u=C.formattedValue),"element"in C&&t(5,f=C.element),"dateFormat"in C&&t(6,c=C.dateFormat),"options"in C&&t(7,d=C.options),"input"in C&&t(0,h=C.input),"flatpickr"in C&&t(3,g=C.flatpickr),"$$scope"in C&&t(9,o=C.$$scope)},n.$$.update=()=>{if(n.$$.dirty&332&&g&&m&&(Kc(a,Yc(g,g.selectedDates))||g.setDate(a,!0,c)),n.$$.dirty&392&&g&&m)for(const[C,M]of Object.entries(y(d)))g.set(C,M)},[h,s,a,g,u,f,c,d,m,o,l,T]}class eu extends ke{constructor(e){super(),ye(this,e,dT,fT,be,{value:2,formattedValue:4,element:5,dateFormat:6,options:7,input:0,flatpickr:3})}}function pT(n){let e,t,i,s,l,o,r;function a(f){n[2](f)}let u={id:n[4],options:B.defaultFlatpickrOptions(),value:n[0].min};return n[0].min!==void 0&&(u.formattedValue=n[0].min),l=new eu({props:u}),ie.push(()=>ve(l,"formattedValue",a)),{c(){e=v("label"),t=z("Min date (UTC)"),s=D(),V(l.$$.fragment),p(e,"for",i=n[4])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c&16&&i!==(i=f[4]))&&p(e,"for",i);const d={};c&16&&(d.id=f[4]),c&1&&(d.value=f[0].min),!o&&c&1&&(o=!0,d.formattedValue=f[0].min,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),q(l,f)}}}function mT(n){let e,t,i,s,l,o,r;function a(f){n[3](f)}let u={id:n[4],options:B.defaultFlatpickrOptions(),value:n[0].max};return n[0].max!==void 0&&(u.formattedValue=n[0].max),l=new eu({props:u}),ie.push(()=>ve(l,"formattedValue",a)),{c(){e=v("label"),t=z("Max date (UTC)"),s=D(),V(l.$$.fragment),p(e,"for",i=n[4])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c&16&&i!==(i=f[4]))&&p(e,"for",i);const d={};c&16&&(d.id=f[4]),c&1&&(d.value=f[0].max),!o&&c&1&&(o=!0,d.formattedValue=f[0].max,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),q(l,f)}}}function hT(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[pT,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[mT,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=D(),l=v("div"),V(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),H(i,t,null),_(e,s),_(e,l),H(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),q(i),q(o)}}}function gT(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.min,r)&&(s.min=r,t(0,s))}function o(r){n.$$.not_equal(s.max,r)&&(s.max=r,t(0,s))}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class _T extends ke{constructor(e){super(),ye(this,e,gT,hT,be,{key:1,options:0})}}function bT(n){let e,t,i,s,l,o,r,a,u;function f(d){n[2](d)}let c={id:n[4],placeholder:"eg. optionA, optionB",required:!0};return n[0].values!==void 0&&(c.value=n[0].values),l=new Ns({props:c}),ie.push(()=>ve(l,"value",f)),{c(){e=v("label"),t=z("Choices"),s=D(),V(l.$$.fragment),r=D(),a=v("div"),a.textContent="Use comma as separator.",p(e,"for",i=n[4]),p(a,"class","help-block")},m(d,m){S(d,e,m),_(e,t),S(d,s,m),H(l,d,m),S(d,r,m),S(d,a,m),u=!0},p(d,m){(!u||m&16&&i!==(i=d[4]))&&p(e,"for",i);const h={};m&16&&(h.id=d[4]),!o&&m&1&&(o=!0,h.value=d[0].values,we(()=>o=!1)),l.$set(h)},i(d){u||(A(l.$$.fragment,d),u=!0)},o(d){P(l.$$.fragment,d),u=!1},d(d){d&&w(e),d&&w(s),q(l,d),d&&w(r),d&&w(a)}}}function vT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Max select"),s=D(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4]),p(l,"step","1"),p(l,"min","1"),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].maxSelect),r||(a=K(l,"input",n[3]),r=!0)},p(u,f){f&16&&i!==(i=u[4])&&p(e,"for",i),f&16&&o!==(o=u[4])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].maxSelect&&de(l,u[0].maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function yT(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.values",$$slots:{default:[bT,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[vT,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=D(),l=v("div"),V(o.$$.fragment),p(t,"class","col-sm-9"),p(l,"class","col-sm-3"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),H(i,t,null),_(e,s),_(e,l),H(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.values"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.maxSelect"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),q(i),q(o)}}}function kT(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.values,r)&&(s.values=r,t(0,s))}function o(){s.maxSelect=ht(this.value),t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},n.$$.update=()=>{n.$$.dirty&1&&B.isEmpty(s)&&t(0,s={maxSelect:1,values:[]})},[s,i,l,o]}class wT extends ke{constructor(e){super(),ye(this,e,kT,yT,be,{key:1,options:0})}}function ST(n){let e;return{c(){e=v("i"),p(e,"class","ri-arrow-down-s-line txt-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function TT(n){let e;return{c(){e=v("i"),p(e,"class","ri-arrow-up-s-line txt-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Jc(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$,O='"{"a":1,"b":2}"',E,I,L,N,F,U,J,ne,Z,te,ee,R,X;return{c(){e=v("div"),t=v("div"),i=v("div"),s=z("In order to support seamlessly both "),l=v("code"),l.textContent="application/json",o=z(` and - `),r=v("code"),r.textContent="multipart/form-data",a=z(` - requests, the following normalization rules are applied if the `),u=v("code"),u.textContent="json",f=z(` field is a - `),c=v("strong"),c.textContent="plain string",d=z(`: - `),m=v("ul"),h=v("li"),h.innerHTML=""true" is converted to the json true",g=D(),b=v("li"),b.innerHTML=""false" is converted to the json false",y=D(),k=v("li"),k.innerHTML=""null" is converted to the json null",T=D(),C=v("li"),C.innerHTML=""[1,2,3]" is converted to the json [1,2,3]",M=D(),$=v("li"),E=z(O),I=z(" is converted to the json "),L=v("code"),L.textContent='{"a":1,"b":2}',N=D(),F=v("li"),F.textContent="numeric strings are converted to json number",U=D(),J=v("li"),J.textContent="double quoted strings are left as they are (aka. without normalizations)",ne=D(),Z=v("li"),Z.textContent="any other string (empty string too) is double quoted",te=z(` - Alternatively, if you want to avoid the string value normalizations, you can wrap your data inside - an object, eg.`),ee=v("code"),ee.textContent='{"data": anything}',p(i,"class","content"),p(t,"class","alert alert-warning m-b-0 m-t-10"),p(e,"class","block")},m(Y,se){S(Y,e,se),_(e,t),_(t,i),_(i,s),_(i,l),_(i,o),_(i,r),_(i,a),_(i,u),_(i,f),_(i,c),_(i,d),_(i,m),_(m,h),_(m,g),_(m,b),_(m,y),_(m,k),_(m,T),_(m,C),_(m,M),_(m,$),_($,E),_($,I),_($,L),_(m,N),_(m,F),_(m,U),_(m,J),_(m,ne),_(m,Z),_(i,te),_(i,ee),X=!0},i(Y){X||(Y&&nt(()=>{R||(R=ze(e,It,{duration:150},!0)),R.run(1)}),X=!0)},o(Y){Y&&(R||(R=ze(e,It,{duration:150},!1)),R.run(0)),X=!1},d(Y){Y&&w(e),Y&&R&&R.end()}}}function CT(n){let e,t,i,s,l,o,r;function a(d,m){return d[0]?TT:ST}let u=a(n),f=u(n),c=n[0]&&Jc();return{c(){e=v("button"),t=v("strong"),t.textContent="String value normalizations",i=D(),f.c(),s=D(),c&&c.c(),l=Ae(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","inline-flex txt-sm flex-gap-5 link-hint")},m(d,m){S(d,e,m),_(e,t),_(e,i),f.m(e,null),S(d,s,m),c&&c.m(d,m),S(d,l,m),o||(r=K(e,"click",n[3]),o=!0)},p(d,[m]){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(e,null))),d[0]?c?m&1&&A(c,1):(c=Jc(),c.c(),A(c,1),c.m(l.parentNode,l)):c&&(pe(),P(c,1,1,()=>{c=null}),me())},i(d){A(c)},o(d){P(c)},d(d){d&&w(e),f.d(),d&&w(s),c&&c.d(d),d&&w(l),o=!1,r()}}}function $T(n,e,t){const i="",s={};let l=!1;return[l,i,s,()=>{t(0,l=!l)}]}class MT extends ke{constructor(e){super(),ye(this,e,$T,CT,be,{key:1,options:2})}get key(){return this.$$.ctx[1]}get options(){return this.$$.ctx[2]}}function DT(n){let e,t=(n[0].ext||"N/A")+"",i,s,l,o=n[0].mimeType+"",r;return{c(){e=v("span"),i=z(t),s=D(),l=v("small"),r=z(o),p(e,"class","txt"),p(l,"class","txt-hint")},m(a,u){S(a,e,u),_(e,i),S(a,s,u),S(a,l,u),_(l,r)},p(a,[u]){u&1&&t!==(t=(a[0].ext||"N/A")+"")&&re(i,t),u&1&&o!==(o=a[0].mimeType+"")&&re(r,o)},i:G,o:G,d(a){a&&w(e),a&&w(s),a&&w(l)}}}function OT(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class Zc extends ke{constructor(e){super(),ye(this,e,OT,DT,be,{item:0})}}const ET=[{ext:".xpm",mimeType:"image/x-xpixmap"},{ext:".7z",mimeType:"application/x-7z-compressed"},{ext:".zip",mimeType:"application/zip"},{ext:".xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{ext:".docx",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{ext:".pptx",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{ext:".epub",mimeType:"application/epub+zip"},{ext:".jar",mimeType:"application/jar"},{ext:".odt",mimeType:"application/vnd.oasis.opendocument.text"},{ext:".ott",mimeType:"application/vnd.oasis.opendocument.text-template"},{ext:".ods",mimeType:"application/vnd.oasis.opendocument.spreadsheet"},{ext:".ots",mimeType:"application/vnd.oasis.opendocument.spreadsheet-template"},{ext:".odp",mimeType:"application/vnd.oasis.opendocument.presentation"},{ext:".otp",mimeType:"application/vnd.oasis.opendocument.presentation-template"},{ext:".odg",mimeType:"application/vnd.oasis.opendocument.graphics"},{ext:".otg",mimeType:"application/vnd.oasis.opendocument.graphics-template"},{ext:".odf",mimeType:"application/vnd.oasis.opendocument.formula"},{ext:".odc",mimeType:"application/vnd.oasis.opendocument.chart"},{ext:".sxc",mimeType:"application/vnd.sun.xml.calc"},{ext:".pdf",mimeType:"application/pdf"},{ext:".fdf",mimeType:"application/vnd.fdf"},{ext:"",mimeType:"application/x-ole-storage"},{ext:".msi",mimeType:"application/x-ms-installer"},{ext:".aaf",mimeType:"application/octet-stream"},{ext:".msg",mimeType:"application/vnd.ms-outlook"},{ext:".xls",mimeType:"application/vnd.ms-excel"},{ext:".pub",mimeType:"application/vnd.ms-publisher"},{ext:".ppt",mimeType:"application/vnd.ms-powerpoint"},{ext:".doc",mimeType:"application/msword"},{ext:".ps",mimeType:"application/postscript"},{ext:".psd",mimeType:"image/vnd.adobe.photoshop"},{ext:".p7s",mimeType:"application/pkcs7-signature"},{ext:".ogg",mimeType:"application/ogg"},{ext:".oga",mimeType:"audio/ogg"},{ext:".ogv",mimeType:"video/ogg"},{ext:".png",mimeType:"image/png"},{ext:".png",mimeType:"image/vnd.mozilla.apng"},{ext:".jpg",mimeType:"image/jpeg"},{ext:".jxl",mimeType:"image/jxl"},{ext:".jp2",mimeType:"image/jp2"},{ext:".jpf",mimeType:"image/jpx"},{ext:".jpm",mimeType:"image/jpm"},{ext:".jxs",mimeType:"image/jxs"},{ext:".gif",mimeType:"image/gif"},{ext:".webp",mimeType:"image/webp"},{ext:".exe",mimeType:"application/vnd.microsoft.portable-executable"},{ext:"",mimeType:"application/x-elf"},{ext:"",mimeType:"application/x-object"},{ext:"",mimeType:"application/x-executable"},{ext:".so",mimeType:"application/x-sharedlib"},{ext:"",mimeType:"application/x-coredump"},{ext:".a",mimeType:"application/x-archive"},{ext:".deb",mimeType:"application/vnd.debian.binary-package"},{ext:".tar",mimeType:"application/x-tar"},{ext:".xar",mimeType:"application/x-xar"},{ext:".bz2",mimeType:"application/x-bzip2"},{ext:".fits",mimeType:"application/fits"},{ext:".tiff",mimeType:"image/tiff"},{ext:".bmp",mimeType:"image/bmp"},{ext:".ico",mimeType:"image/x-icon"},{ext:".mp3",mimeType:"audio/mpeg"},{ext:".flac",mimeType:"audio/flac"},{ext:".midi",mimeType:"audio/midi"},{ext:".ape",mimeType:"audio/ape"},{ext:".mpc",mimeType:"audio/musepack"},{ext:".amr",mimeType:"audio/amr"},{ext:".wav",mimeType:"audio/wav"},{ext:".aiff",mimeType:"audio/aiff"},{ext:".au",mimeType:"audio/basic"},{ext:".mpeg",mimeType:"video/mpeg"},{ext:".mov",mimeType:"video/quicktime"},{ext:".mqv",mimeType:"video/quicktime"},{ext:".mp4",mimeType:"video/mp4"},{ext:".webm",mimeType:"video/webm"},{ext:".3gp",mimeType:"video/3gpp"},{ext:".3g2",mimeType:"video/3gpp2"},{ext:".avi",mimeType:"video/x-msvideo"},{ext:".flv",mimeType:"video/x-flv"},{ext:".mkv",mimeType:"video/x-matroska"},{ext:".asf",mimeType:"video/x-ms-asf"},{ext:".aac",mimeType:"audio/aac"},{ext:".voc",mimeType:"audio/x-unknown"},{ext:".mp4",mimeType:"audio/mp4"},{ext:".m4a",mimeType:"audio/x-m4a"},{ext:".m3u",mimeType:"application/vnd.apple.mpegurl"},{ext:".m4v",mimeType:"video/x-m4v"},{ext:".rmvb",mimeType:"application/vnd.rn-realmedia-vbr"},{ext:".gz",mimeType:"application/gzip"},{ext:".class",mimeType:"application/x-java-applet"},{ext:".swf",mimeType:"application/x-shockwave-flash"},{ext:".crx",mimeType:"application/x-chrome-extension"},{ext:".ttf",mimeType:"font/ttf"},{ext:".woff",mimeType:"font/woff"},{ext:".woff2",mimeType:"font/woff2"},{ext:".otf",mimeType:"font/otf"},{ext:".ttc",mimeType:"font/collection"},{ext:".eot",mimeType:"application/vnd.ms-fontobject"},{ext:".wasm",mimeType:"application/wasm"},{ext:".shx",mimeType:"application/vnd.shx"},{ext:".shp",mimeType:"application/vnd.shp"},{ext:".dbf",mimeType:"application/x-dbf"},{ext:".dcm",mimeType:"application/dicom"},{ext:".rar",mimeType:"application/x-rar-compressed"},{ext:".djvu",mimeType:"image/vnd.djvu"},{ext:".mobi",mimeType:"application/x-mobipocket-ebook"},{ext:".lit",mimeType:"application/x-ms-reader"},{ext:".bpg",mimeType:"image/bpg"},{ext:".sqlite",mimeType:"application/vnd.sqlite3"},{ext:".dwg",mimeType:"image/vnd.dwg"},{ext:".nes",mimeType:"application/vnd.nintendo.snes.rom"},{ext:".lnk",mimeType:"application/x-ms-shortcut"},{ext:".macho",mimeType:"application/x-mach-binary"},{ext:".qcp",mimeType:"audio/qcelp"},{ext:".icns",mimeType:"image/x-icns"},{ext:".heic",mimeType:"image/heic"},{ext:".heic",mimeType:"image/heic-sequence"},{ext:".heif",mimeType:"image/heif"},{ext:".heif",mimeType:"image/heif-sequence"},{ext:".hdr",mimeType:"image/vnd.radiance"},{ext:".mrc",mimeType:"application/marc"},{ext:".mdb",mimeType:"application/x-msaccess"},{ext:".accdb",mimeType:"application/x-msaccess"},{ext:".zst",mimeType:"application/zstd"},{ext:".cab",mimeType:"application/vnd.ms-cab-compressed"},{ext:".rpm",mimeType:"application/x-rpm"},{ext:".xz",mimeType:"application/x-xz"},{ext:".lz",mimeType:"application/lzip"},{ext:".torrent",mimeType:"application/x-bittorrent"},{ext:".cpio",mimeType:"application/x-cpio"},{ext:"",mimeType:"application/tzif"},{ext:".xcf",mimeType:"image/x-xcf"},{ext:".pat",mimeType:"image/x-gimp-pat"},{ext:".gbr",mimeType:"image/x-gimp-gbr"},{ext:".glb",mimeType:"model/gltf-binary"},{ext:".avif",mimeType:"image/avif"},{ext:".cab",mimeType:"application/x-installshield"},{ext:".jxr",mimeType:"image/jxr"},{ext:".txt",mimeType:"text/plain"},{ext:".html",mimeType:"text/html"},{ext:".svg",mimeType:"image/svg+xml"},{ext:".xml",mimeType:"text/xml"},{ext:".rss",mimeType:"application/rss+xml"},{ext:".atom",mimeType:"applicatiotom+xml"},{ext:".x3d",mimeType:"model/x3d+xml"},{ext:".kml",mimeType:"application/vnd.google-earth.kml+xml"},{ext:".xlf",mimeType:"application/x-xliff+xml"},{ext:".dae",mimeType:"model/vnd.collada+xml"},{ext:".gml",mimeType:"application/gml+xml"},{ext:".gpx",mimeType:"application/gpx+xml"},{ext:".tcx",mimeType:"application/vnd.garmin.tcx+xml"},{ext:".amf",mimeType:"application/x-amf"},{ext:".3mf",mimeType:"application/vnd.ms-package.3dmanufacturing-3dmodel+xml"},{ext:".xfdf",mimeType:"application/vnd.adobe.xfdf"},{ext:".owl",mimeType:"application/owl+xml"},{ext:".php",mimeType:"text/x-php"},{ext:".js",mimeType:"application/javascript"},{ext:".lua",mimeType:"text/x-lua"},{ext:".pl",mimeType:"text/x-perl"},{ext:".py",mimeType:"text/x-python"},{ext:".json",mimeType:"application/json"},{ext:".geojson",mimeType:"application/geo+json"},{ext:".har",mimeType:"application/json"},{ext:".ndjson",mimeType:"application/x-ndjson"},{ext:".rtf",mimeType:"text/rtf"},{ext:".srt",mimeType:"application/x-subrip"},{ext:".tcl",mimeType:"text/x-tcl"},{ext:".csv",mimeType:"text/csv"},{ext:".tsv",mimeType:"text/tab-separated-values"},{ext:".vcf",mimeType:"text/vcard"},{ext:".ics",mimeType:"text/calendar"},{ext:".warc",mimeType:"application/warc"},{ext:".vtt",mimeType:"text/vtt"},{ext:"",mimeType:"application/octet-stream"}];function AT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Max file size (bytes)"),s=D(),l=v("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",o=n[12]),p(l,"step","1"),p(l,"min","0")},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].maxSize),r||(a=K(l,"input",n[3]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&o!==(o=u[12])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].maxSize&&de(l,u[0].maxSize)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function IT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Max files"),s=D(),l=v("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",o=n[12]),p(l,"step","1"),p(l,"min",""),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].maxSelect),r||(a=K(l,"input",n[4]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&o!==(o=u[12])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].maxSelect&&de(l,u[0].maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function PT(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("button"),e.innerHTML='Images (jpg, png, svg, gif, webp)',t=D(),i=v("button"),i.innerHTML='Documents (pdf, doc/docx, xls/xlsx)',s=D(),l=v("button"),l.innerHTML='Videos (mp4, avi, mov, 3gp)',o=D(),r=v("button"),r.innerHTML='Archives (zip, 7zip, rar)',p(e,"type","button"),p(e,"class","dropdown-item closable"),p(i,"type","button"),p(i,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable"),p(r,"type","button"),p(r,"class","dropdown-item closable")},m(f,c){S(f,e,c),S(f,t,c),S(f,i,c),S(f,s,c),S(f,l,c),S(f,o,c),S(f,r,c),a||(u=[K(e,"click",n[6]),K(i,"click",n[7]),K(l,"click",n[8]),K(r,"click",n[9])],a=!0)},p:G,d(f){f&&w(e),f&&w(t),f&&w(i),f&&w(s),f&&w(l),f&&w(o),f&&w(r),a=!1,Le(u)}}}function LT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T;function C($){n[5]($)}let M={id:n[12],multiple:!0,searchable:!0,closable:!1,selectionKey:"mimeType",selectPlaceholder:"No restriction",items:n[2],labelComponent:Zc,optionComponent:Zc};return n[0].mimeTypes!==void 0&&(M.keyOfSelected=n[0].mimeTypes),r=new Ls({props:M}),ie.push(()=>ve(r,"keyOfSelected",C)),b=new xn({props:{class:"dropdown dropdown-sm dropdown-nowrap dropdown-left",$$slots:{default:[PT]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Allowed mime types",i=D(),s=v("i"),o=D(),V(r.$$.fragment),u=D(),f=v("div"),c=v("button"),d=v("span"),d.textContent="Choose presets",m=D(),h=v("i"),g=D(),V(b.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(d,"class","txt link-primary"),p(h,"class","ri-arrow-drop-down-fill"),p(c,"type","button"),p(c,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m($,O){S($,e,O),_(e,t),_(e,i),_(e,s),S($,o,O),H(r,$,O),S($,u,O),S($,f,O),_(f,c),_(c,d),_(c,m),_(c,h),_(c,g),H(b,c,null),y=!0,k||(T=Pe(Ye.call(null,s,{text:`Allow files ONLY with the listed mime types. - Leave empty for no restriction.`,position:"top"})),k=!0)},p($,O){(!y||O&4096&&l!==(l=$[12]))&&p(e,"for",l);const E={};O&4096&&(E.id=$[12]),O&4&&(E.items=$[2]),!a&&O&1&&(a=!0,E.keyOfSelected=$[0].mimeTypes,we(()=>a=!1)),r.$set(E);const I={};O&8193&&(I.$$scope={dirty:O,ctx:$}),b.$set(I)},i($){y||(A(r.$$.fragment,$),A(b.$$.fragment,$),y=!0)},o($){P(r.$$.fragment,$),P(b.$$.fragment,$),y=!1},d($){$&&w(e),$&&w(o),q(r,$),$&&w(u),$&&w(f),q(b),k=!1,T()}}}function NT(n){let e;return{c(){e=v("ul"),e.innerHTML=`
  • WxH - (eg. 100x50) - crop to WxH viewbox (from center)
  • -
  • WxHt - (eg. 100x50t) - crop to WxH viewbox (from top)
  • -
  • WxHb - (eg. 100x50b) - crop to WxH viewbox (from bottom)
  • -
  • WxHf - (eg. 100x50f) - fit inside a WxH viewbox (without cropping)
  • -
  • 0xH - (eg. 0x50) - resize to H height preserving the aspect ratio
  • -
  • Wx0 - (eg. 100x0) - resize to W width preserving the aspect ratio
  • `,p(e,"class","m-0")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function FT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M;function $(E){n[10](E)}let O={id:n[12],placeholder:"eg. 50x50, 480x720"};return n[0].thumbs!==void 0&&(O.value=n[0].thumbs),r=new Ns({props:O}),ie.push(()=>ve(r,"value",$)),k=new xn({props:{class:"dropdown dropdown-sm dropdown-center dropdown-nowrap p-r-10",$$slots:{default:[NT]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Thumb sizes",i=D(),s=v("i"),o=D(),V(r.$$.fragment),u=D(),f=v("div"),c=v("span"),c.textContent="Use comma as separator.",d=D(),m=v("button"),h=v("span"),h.textContent="Supported formats",g=D(),b=v("i"),y=D(),V(k.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(c,"class","txt"),p(h,"class","txt link-primary"),p(b,"class","ri-arrow-drop-down-fill"),p(m,"type","button"),p(m,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(E,I){S(E,e,I),_(e,t),_(e,i),_(e,s),S(E,o,I),H(r,E,I),S(E,u,I),S(E,f,I),_(f,c),_(f,d),_(f,m),_(m,h),_(m,g),_(m,b),_(m,y),H(k,m,null),T=!0,C||(M=Pe(Ye.call(null,s,{text:"List of additional thumb sizes for image files, along with the default thumb size of 100x100. The thumbs are generated lazily on first access.",position:"top"})),C=!0)},p(E,I){(!T||I&4096&&l!==(l=E[12]))&&p(e,"for",l);const L={};I&4096&&(L.id=E[12]),!a&&I&1&&(a=!0,L.value=E[0].thumbs,we(()=>a=!1)),r.$set(L);const N={};I&8192&&(N.$$scope={dirty:I,ctx:E}),k.$set(N)},i(E){T||(A(r.$$.fragment,E),A(k.$$.fragment,E),T=!0)},o(E){P(r.$$.fragment,E),P(k.$$.fragment,E),T=!1},d(E){E&&w(e),E&&w(o),q(r,E),E&&w(u),E&&w(f),q(k),C=!1,M()}}}function RT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;return i=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[AT,({uniqueId:h})=>({12:h}),({uniqueId:h})=>h?4096:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[IT,({uniqueId:h})=>({12:h}),({uniqueId:h})=>h?4096:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[LT,({uniqueId:h})=>({12:h}),({uniqueId:h})=>h?4096:0]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[FT,({uniqueId:h})=>({12:h}),({uniqueId:h})=>h?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=D(),l=v("div"),V(o.$$.fragment),r=D(),a=v("div"),V(u.$$.fragment),f=D(),c=v("div"),V(d.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(a,"class","col-sm-12"),p(c,"class","col-sm-12"),p(e,"class","grid")},m(h,g){S(h,e,g),_(e,t),H(i,t,null),_(e,s),_(e,l),H(o,l,null),_(e,r),_(e,a),H(u,a,null),_(e,f),_(e,c),H(d,c,null),m=!0},p(h,[g]){const b={};g&2&&(b.name="schema."+h[1]+".options.maxSize"),g&12289&&(b.$$scope={dirty:g,ctx:h}),i.$set(b);const y={};g&2&&(y.name="schema."+h[1]+".options.maxSelect"),g&12289&&(y.$$scope={dirty:g,ctx:h}),o.$set(y);const k={};g&2&&(k.name="schema."+h[1]+".options.mimeTypes"),g&12293&&(k.$$scope={dirty:g,ctx:h}),u.$set(k);const T={};g&2&&(T.name="schema."+h[1]+".options.thumbs"),g&12289&&(T.$$scope={dirty:g,ctx:h}),d.$set(T)},i(h){m||(A(i.$$.fragment,h),A(o.$$.fragment,h),A(u.$$.fragment,h),A(d.$$.fragment,h),m=!0)},o(h){P(i.$$.fragment,h),P(o.$$.fragment,h),P(u.$$.fragment,h),P(d.$$.fragment,h),m=!1},d(h){h&&w(e),q(i),q(o),q(u),q(d)}}}function jT(n,e,t){let{key:i=""}=e,{options:s={}}=e,l=ET.slice();function o(){if(B.isEmpty(s.mimeTypes))return;const g=[];for(const b of s.mimeTypes)l.find(y=>y.mimeType===b)||g.push({mimeType:b});g.length&&t(2,l=l.concat(g))}function r(){s.maxSize=ht(this.value),t(0,s)}function a(){s.maxSelect=ht(this.value),t(0,s)}function u(g){n.$$.not_equal(s.mimeTypes,g)&&(s.mimeTypes=g,t(0,s))}const f=()=>{t(0,s.mimeTypes=["image/jpeg","image/png","image/svg+xml","image/gif","image/webp"],s)},c=()=>{t(0,s.mimeTypes=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],s)},d=()=>{t(0,s.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],s)},m=()=>{t(0,s.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],s)};function h(g){n.$$.not_equal(s.thumbs,g)&&(s.thumbs=g,t(0,s))}return n.$$set=g=>{"key"in g&&t(1,i=g.key),"options"in g&&t(0,s=g.options)},n.$$.update=()=>{n.$$.dirty&1&&(B.isEmpty(s)?t(0,s={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]}):o())},[s,i,l,r,a,u,f,c,d,m,h]}class HT extends ke{constructor(e){super(),ye(this,e,jT,RT,be,{key:1,options:0})}}function qT(n){let e,t,i,s,l;return{c(){e=v("hr"),t=D(),i=v("button"),i.innerHTML=` - New collection`,p(i,"type","button"),p(i,"class","btn btn-transparent btn-block btn-sm")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=K(i,"click",n[7]),s=!0)},p:G,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function VT(n){let e,t,i,s,l,o,r;function a(f){n[8](f)}let u={searchable:n[2].length>5,selectPlaceholder:"Select collection",noOptionsText:"No collections found",selectionKey:"id",items:n[2],$$slots:{afterOptions:[qT]},$$scope:{ctx:n}};return n[0].collectionId!==void 0&&(u.keyOfSelected=n[0].collectionId),l=new Ls({props:u}),ie.push(()=>ve(l,"keyOfSelected",a)),{c(){e=v("label"),t=z("Collection"),s=D(),V(l.$$.fragment),p(e,"for",i=n[18])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c&262144&&i!==(i=f[18]))&&p(e,"for",i);const d={};c&4&&(d.searchable=f[2].length>5),c&4&&(d.items=f[2]),c&524296&&(d.$$scope={dirty:c,ctx:f}),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].collectionId,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),q(l,f)}}}function zT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("span"),t.textContent="Max select",i=D(),s=v("i"),o=D(),r=v("input"),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[18]),p(r,"type","number"),p(r,"id",a=n[18]),p(r,"step","1"),p(r,"min","1")},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),de(r,n[0].maxSelect),u||(f=[Pe(Ye.call(null,s,{text:"Leave empty for no limit.",position:"top"})),K(r,"input",n[9])],u=!0)},p(c,d){d&262144&&l!==(l=c[18])&&p(e,"for",l),d&262144&&a!==(a=c[18])&&p(r,"id",a),d&1&&ht(r.value)!==c[0].maxSelect&&de(r,c[0].maxSelect)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,Le(f)}}}function BT(n){let e,t,i,s,l,o,r,a,u,f,c;function d(h){n[10](h)}let m={multiple:!0,searchable:!0,id:n[18],selectPlaceholder:"Auto",items:n[4]};return n[0].displayFields!==void 0&&(m.selected=n[0].displayFields),r=new Qa({props:m}),ie.push(()=>ve(r,"selected",d)),{c(){e=v("label"),t=v("span"),t.textContent="Display fields",i=D(),s=v("i"),o=D(),V(r.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[18])},m(h,g){S(h,e,g),_(e,t),_(e,i),_(e,s),S(h,o,g),H(r,h,g),u=!0,f||(c=Pe(Ye.call(null,s,{text:"Optionally select the field(s) that will be used in the listings UI. Leave empty for auto.",position:"top"})),f=!0)},p(h,g){(!u||g&262144&&l!==(l=h[18]))&&p(e,"for",l);const b={};g&262144&&(b.id=h[18]),g&16&&(b.items=h[4]),!a&&g&1&&(a=!0,b.selected=h[0].displayFields,we(()=>a=!1)),r.$set(b)},i(h){u||(A(r.$$.fragment,h),u=!0)},o(h){P(r.$$.fragment,h),u=!1},d(h){h&&w(e),h&&w(o),q(r,h),f=!1,c()}}}function UT(n){let e,t,i,s,l,o,r;function a(f){n[11](f)}let u={id:n[18],items:n[5]};return n[0].cascadeDelete!==void 0&&(u.keyOfSelected=n[0].cascadeDelete),l=new Ls({props:u}),ie.push(()=>ve(l,"keyOfSelected",a)),{c(){e=v("label"),t=z("Cascade delete"),s=D(),V(l.$$.fragment),p(e,"for",i=n[18])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c&262144&&i!==(i=f[18]))&&p(e,"for",i);const d={};c&262144&&(d.id=f[18]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].cascadeDelete,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),q(l,f)}}}function WT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;i=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.collectionId",$$slots:{default:[VT,({uniqueId:y})=>({18:y}),({uniqueId:y})=>y?262144:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[zT,({uniqueId:y})=>({18:y}),({uniqueId:y})=>y?262144:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.displayFields",$$slots:{default:[BT,({uniqueId:y})=>({18:y}),({uniqueId:y})=>y?262144:0]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[UT,({uniqueId:y})=>({18:y}),({uniqueId:y})=>y?262144:0]},$$scope:{ctx:n}}});let b={};return h=new tu({props:b}),n[12](h),h.$on("save",n[13]),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=D(),l=v("div"),V(o.$$.fragment),r=D(),a=v("div"),V(u.$$.fragment),f=D(),c=v("div"),V(d.$$.fragment),m=D(),V(h.$$.fragment),p(t,"class","col-sm-9"),p(l,"class","col-sm-3"),p(a,"class","col-sm-9"),p(c,"class","col-sm-3"),p(e,"class","grid")},m(y,k){S(y,e,k),_(e,t),H(i,t,null),_(e,s),_(e,l),H(o,l,null),_(e,r),_(e,a),H(u,a,null),_(e,f),_(e,c),H(d,c,null),S(y,m,k),H(h,y,k),g=!0},p(y,[k]){const T={};k&2&&(T.name="schema."+y[1]+".options.collectionId"),k&786445&&(T.$$scope={dirty:k,ctx:y}),i.$set(T);const C={};k&2&&(C.name="schema."+y[1]+".options.maxSelect"),k&786433&&(C.$$scope={dirty:k,ctx:y}),o.$set(C);const M={};k&2&&(M.name="schema."+y[1]+".options.displayFields"),k&786449&&(M.$$scope={dirty:k,ctx:y}),u.$set(M);const $={};k&2&&($.name="schema."+y[1]+".options.cascadeDelete"),k&786433&&($.$$scope={dirty:k,ctx:y}),d.$set($);const O={};h.$set(O)},i(y){g||(A(i.$$.fragment,y),A(o.$$.fragment,y),A(u.$$.fragment,y),A(d.$$.fragment,y),A(h.$$.fragment,y),g=!0)},o(y){P(i.$$.fragment,y),P(o.$$.fragment,y),P(u.$$.fragment,y),P(d.$$.fragment,y),P(h.$$.fragment,y),g=!1},d(y){y&&w(e),q(i),q(o),q(u),q(d),y&&w(m),n[12](null),q(h,y)}}}function YT(n,e,t){let i,s;Je(n,es,M=>t(2,s=M));let{key:l=""}=e,{options:o={}}=e;const r=[{label:"False",value:!1},{label:"True",value:!0}],a=["id","created","updated"],u=["username","email","emailVisibility","verified"];let f=null,c=[],d=null;function m(){var M;if(t(4,c=a.slice(0)),!!i){i.isAuth&&t(4,c=c.concat(u));for(const $ of i.schema)c.push($.name);if(((M=o==null?void 0:o.displayFields)==null?void 0:M.length)>0)for(let $=o.displayFields.length-1;$>=0;$--)c.includes(o.displayFields[$])||o.displayFields.splice($,1)}}const h=()=>f==null?void 0:f.show();function g(M){n.$$.not_equal(o.collectionId,M)&&(o.collectionId=M,t(0,o))}function b(){o.maxSelect=ht(this.value),t(0,o)}function y(M){n.$$.not_equal(o.displayFields,M)&&(o.displayFields=M,t(0,o))}function k(M){n.$$.not_equal(o.cascadeDelete,M)&&(o.cascadeDelete=M,t(0,o))}function T(M){ie[M?"unshift":"push"](()=>{f=M,t(3,f)})}const C=M=>{var $,O;(O=($=M==null?void 0:M.detail)==null?void 0:$.collection)!=null&&O.id&&t(0,o.collectionId=M.detail.collection.id,o)};return n.$$set=M=>{"key"in M&&t(1,l=M.key),"options"in M&&t(0,o=M.options)},n.$$.update=()=>{n.$$.dirty&1&&B.isEmpty(o)&&t(0,o={maxSelect:1,collectionId:null,cascadeDelete:!1,displayFields:[]}),n.$$.dirty&5&&(i=s.find(M=>M.id==o.collectionId)||null),n.$$.dirty&65&&d!=o.collectionId&&(t(6,d=o.collectionId),m())},[o,l,s,f,c,r,d,h,g,b,y,k,T,C]}class KT extends ke{constructor(e){super(),ye(this,e,YT,WT,be,{key:1,options:0})}}function JT(n){let e,t,i,s,l,o,r;function a(f){n[17](f)}let u={id:n[43],disabled:n[0].id};return n[0].type!==void 0&&(u.value=n[0].type),l=new I3({props:u}),ie.push(()=>ve(l,"value",a)),{c(){e=v("label"),t=z("Type"),s=D(),V(l.$$.fragment),p(e,"for",i=n[43])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c[1]&4096&&i!==(i=f[43]))&&p(e,"for",i);const d={};c[1]&4096&&(d.id=f[43]),c[0]&1&&(d.disabled=f[0].id),!o&&c[0]&1&&(o=!0,d.value=f[0].type,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),q(l,f)}}}function Gc(n){let e,t,i;return{c(){e=v("span"),e.textContent="Duplicated or invalid name",p(e,"class","txt invalid-name-note svelte-1tpxlm5")},m(s,l){S(s,e,l),i=!0},i(s){i||(nt(()=>{t||(t=ze(e,En,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){t||(t=ze(e,En,{duration:150,x:5},!1)),t.run(0),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function ZT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h=!n[5]&&Gc();return{c(){e=v("label"),t=v("span"),t.textContent="Name",i=D(),h&&h.c(),l=D(),o=v("input"),p(t,"class","txt"),p(e,"for",s=n[43]),p(o,"type","text"),p(o,"id",r=n[43]),o.required=!0,o.disabled=a=n[0].id&&n[0].system,p(o,"spellcheck","false"),o.autofocus=u=!n[0].id,o.value=f=n[0].name},m(g,b){S(g,e,b),_(e,t),_(e,i),h&&h.m(e,null),S(g,l,b),S(g,o,b),c=!0,n[0].id||o.focus(),d||(m=K(o,"input",n[18]),d=!0)},p(g,b){g[5]?h&&(pe(),P(h,1,1,()=>{h=null}),me()):h?b[0]&32&&A(h,1):(h=Gc(),h.c(),A(h,1),h.m(e,null)),(!c||b[1]&4096&&s!==(s=g[43]))&&p(e,"for",s),(!c||b[1]&4096&&r!==(r=g[43]))&&p(o,"id",r),(!c||b[0]&1&&a!==(a=g[0].id&&g[0].system))&&(o.disabled=a),(!c||b[0]&1&&u!==(u=!g[0].id))&&(o.autofocus=u),(!c||b[0]&1&&f!==(f=g[0].name)&&o.value!==f)&&(o.value=f)},i(g){c||(A(h),c=!0)},o(g){P(h),c=!1},d(g){g&&w(e),h&&h.d(),g&&w(l),g&&w(o),d=!1,m()}}}function GT(n){let e,t,i;function s(o){n[29](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new KT({props:l}),ie.push(()=>ve(e,"options",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function XT(n){let e,t,i;function s(o){n[28](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new HT({props:l}),ie.push(()=>ve(e,"options",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function xT(n){let e,t,i;function s(o){n[27](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new MT({props:l}),ie.push(()=>ve(e,"options",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function QT(n){let e,t,i;function s(o){n[26](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new wT({props:l}),ie.push(()=>ve(e,"options",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function eC(n){let e,t,i;function s(o){n[25](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new _T({props:l}),ie.push(()=>ve(e,"options",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function tC(n){let e,t,i;function s(o){n[24](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new nT({props:l}),ie.push(()=>ve(e,"options",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function nC(n){let e,t,i;function s(o){n[23](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new eT({props:l}),ie.push(()=>ve(e,"options",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function iC(n){let e,t,i;function s(o){n[22](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new ob({props:l}),ie.push(()=>ve(e,"options",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function sC(n){let e,t,i;function s(o){n[21](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new W3({props:l}),ie.push(()=>ve(e,"options",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function lC(n){let e,t,i;function s(o){n[20](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new B3({props:l}),ie.push(()=>ve(e,"options",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function oC(n){let e,t,i;function s(o){n[19](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new j3({props:l}),ie.push(()=>ve(e,"options",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function rC(n){let e,t,i,s,l,o=gs(n[0])+"",r,a,u,f,c,d,m;return{c(){e=v("input"),i=D(),s=v("label"),l=v("span"),r=z(o),a=D(),u=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[43]),p(l,"class","txt"),p(u,"class","ri-information-line link-hint"),p(s,"for",c=n[43])},m(h,g){S(h,e,g),e.checked=n[0].required,S(h,i,g),S(h,s,g),_(s,l),_(l,r),_(s,a),_(s,u),d||(m=[K(e,"change",n[30]),Pe(f=Ye.call(null,u,{text:`Requires the field value to be ${gs(n[0])} -(aka. not ${B.zeroDefaultStr(n[0])}).`,position:"right"}))],d=!0)},p(h,g){g[1]&4096&&t!==(t=h[43])&&p(e,"id",t),g[0]&1&&(e.checked=h[0].required),g[0]&1&&o!==(o=gs(h[0])+"")&&re(r,o),f&&zt(f.update)&&g[0]&1&&f.update.call(null,{text:`Requires the field value to be ${gs(h[0])} -(aka. not ${B.zeroDefaultStr(h[0])}).`,position:"right"}),g[1]&4096&&c!==(c=h[43])&&p(s,"for",c)},d(h){h&&w(e),h&&w(i),h&&w(s),d=!1,Le(m)}}}function Xc(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle m-0",name:"unique",$$slots:{default:[aC,({uniqueId:i})=>({43:i}),({uniqueId:i})=>[0,i?4096:0]]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s[0]&1|s[1]&12288&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function aC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=z("Unique"),p(e,"type","checkbox"),p(e,"id",t=n[43]),p(s,"for",o=n[43])},m(u,f){S(u,e,f),e.checked=n[0].unique,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[31]),r=!0)},p(u,f){f[1]&4096&&t!==(t=u[43])&&p(e,"id",t),f[0]&1&&(e.checked=u[0].unique),f[1]&4096&&o!==(o=u[43])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function xc(n){let e,t,i,s,l,o,r,a,u,f;a=new xn({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[uC]},$$scope:{ctx:n}}});let c=n[8]&&Qc(n);return{c(){e=v("div"),t=v("div"),i=D(),s=v("div"),l=v("button"),o=v("i"),r=D(),V(a.$$.fragment),u=D(),c&&c.c(),p(t,"class","flex-fill"),p(o,"class","ri-more-line"),p(l,"type","button"),p(l,"aria-label","More"),p(l,"class","btn btn-circle btn-sm btn-transparent"),p(s,"class","inline-flex flex-gap-sm flex-nowrap"),p(e,"class","col-sm-4 txt-right")},m(d,m){S(d,e,m),_(e,t),_(e,i),_(e,s),_(s,l),_(l,o),_(l,r),H(a,l,null),_(s,u),c&&c.m(s,null),f=!0},p(d,m){const h={};m[1]&8192&&(h.$$scope={dirty:m,ctx:d}),a.$set(h),d[8]?c?c.p(d,m):(c=Qc(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i(d){f||(A(a.$$.fragment,d),f=!0)},o(d){P(a.$$.fragment,d),f=!1},d(d){d&&w(e),q(a),c&&c.d()}}}function uC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Remove',p(e,"type","button"),p(e,"class","dropdown-item txt-right")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[9]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function Qc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Done',p(e,"type","button"),p(e,"class","btn btn-sm btn-outline btn-expanded-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",yn(n[3])),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function fC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$;s=new _e({props:{class:"form-field required "+(n[0].id?"disabled":""),name:"schema."+n[1]+".type",$$slots:{default:[JT,({uniqueId:F})=>({43:F}),({uniqueId:F})=>[0,F?4096:0]]},$$scope:{ctx:n}}}),r=new _e({props:{class:` - form-field - required - `+(n[5]?"":"invalid")+` - `+(n[0].id&&n[0].system?"disabled":"")+` - `,name:"schema."+n[1]+".name",$$slots:{default:[ZT,({uniqueId:F})=>({43:F}),({uniqueId:F})=>[0,F?4096:0]]},$$scope:{ctx:n}}});const O=[oC,lC,sC,iC,nC,tC,eC,QT,xT,XT,GT],E=[];function I(F,U){return F[0].type==="text"?0:F[0].type==="number"?1:F[0].type==="bool"?2:F[0].type==="email"?3:F[0].type==="url"?4:F[0].type==="editor"?5:F[0].type==="date"?6:F[0].type==="select"?7:F[0].type==="json"?8:F[0].type==="file"?9:F[0].type==="relation"?10:-1}~(f=I(n))&&(c=E[f]=O[f](n)),h=new _e({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[rC,({uniqueId:F})=>({43:F}),({uniqueId:F})=>[0,F?4096:0]]},$$scope:{ctx:n}}});let L=n[0].type!=="file"&&Xc(n),N=!n[0].toDelete&&xc(n);return{c(){e=v("form"),t=v("div"),i=v("div"),V(s.$$.fragment),l=D(),o=v("div"),V(r.$$.fragment),a=D(),u=v("div"),c&&c.c(),d=D(),m=v("div"),V(h.$$.fragment),g=D(),b=v("div"),L&&L.c(),y=D(),N&&N.c(),k=D(),T=v("input"),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(u,"class","col-sm-12 hidden-empty"),p(m,"class","col-sm-4 flex"),p(b,"class","col-sm-4 flex"),p(t,"class","grid"),p(T,"type","submit"),p(T,"class","hidden"),p(T,"tabindex","-1"),p(e,"class","field-form")},m(F,U){S(F,e,U),_(e,t),_(t,i),H(s,i,null),_(t,l),_(t,o),H(r,o,null),_(t,a),_(t,u),~f&&E[f].m(u,null),_(t,d),_(t,m),H(h,m,null),_(t,g),_(t,b),L&&L.m(b,null),_(t,y),N&&N.m(t,null),_(e,k),_(e,T),C=!0,M||($=[K(e,"dragstart",pC),K(e,"submit",pt(n[32]))],M=!0)},p(F,U){const J={};U[0]&1&&(J.class="form-field required "+(F[0].id?"disabled":"")),U[0]&2&&(J.name="schema."+F[1]+".type"),U[0]&1|U[1]&12288&&(J.$$scope={dirty:U,ctx:F}),s.$set(J);const ne={};U[0]&33&&(ne.class=` - form-field - required - `+(F[5]?"":"invalid")+` - `+(F[0].id&&F[0].system?"disabled":"")+` - `),U[0]&2&&(ne.name="schema."+F[1]+".name"),U[0]&33|U[1]&12288&&(ne.$$scope={dirty:U,ctx:F}),r.$set(ne);let Z=f;f=I(F),f===Z?~f&&E[f].p(F,U):(c&&(pe(),P(E[Z],1,1,()=>{E[Z]=null}),me()),~f?(c=E[f],c?c.p(F,U):(c=E[f]=O[f](F),c.c()),A(c,1),c.m(u,null)):c=null);const te={};U[0]&1|U[1]&12288&&(te.$$scope={dirty:U,ctx:F}),h.$set(te),F[0].type!=="file"?L?(L.p(F,U),U[0]&1&&A(L,1)):(L=Xc(F),L.c(),A(L,1),L.m(b,null)):L&&(pe(),P(L,1,1,()=>{L=null}),me()),F[0].toDelete?N&&(pe(),P(N,1,1,()=>{N=null}),me()):N?(N.p(F,U),U[0]&1&&A(N,1)):(N=xc(F),N.c(),A(N,1),N.m(t,null))},i(F){C||(A(s.$$.fragment,F),A(r.$$.fragment,F),A(c),A(h.$$.fragment,F),A(L),A(N),C=!0)},o(F){P(s.$$.fragment,F),P(r.$$.fragment,F),P(c),P(h.$$.fragment,F),P(L),P(N),C=!1},d(F){F&&w(e),q(s),q(r),~f&&E[f].d(),q(h),L&&L.d(),N&&N.d(),M=!1,Le($)}}}function ed(n){let e,t,i,s,l=n[0].system&&td(),o=!n[0].id&&nd(n),r=n[0].required&&id(n),a=n[0].unique&&sd();return{c(){e=v("div"),l&&l.c(),t=D(),o&&o.c(),i=D(),r&&r.c(),s=D(),a&&a.c(),p(e,"class","inline-flex")},m(u,f){S(u,e,f),l&&l.m(e,null),_(e,t),o&&o.m(e,null),_(e,i),r&&r.m(e,null),_(e,s),a&&a.m(e,null)},p(u,f){u[0].system?l||(l=td(),l.c(),l.m(e,t)):l&&(l.d(1),l=null),u[0].id?o&&(o.d(1),o=null):o?o.p(u,f):(o=nd(u),o.c(),o.m(e,i)),u[0].required?r?r.p(u,f):(r=id(u),r.c(),r.m(e,s)):r&&(r.d(1),r=null),u[0].unique?a||(a=sd(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(u){u&&w(e),l&&l.d(),o&&o.d(),r&&r.d(),a&&a.d()}}}function td(n){let e;return{c(){e=v("span"),e.textContent="System",p(e,"class","label label-danger")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function nd(n){let e;return{c(){e=v("span"),e.textContent="New",p(e,"class","label"),x(e,"label-warning",n[8]&&!n[0].toDelete)},m(t,i){S(t,e,i)},p(t,i){i[0]&257&&x(e,"label-warning",t[8]&&!t[0].toDelete)},d(t){t&&w(e)}}}function id(n){let e,t=gs(n[0])+"",i;return{c(){e=v("span"),i=z(t),p(e,"class","label label-success")},m(s,l){S(s,e,l),_(e,i)},p(s,l){l[0]&1&&t!==(t=gs(s[0])+"")&&re(i,t)},d(s){s&&w(e)}}}function sd(n){let e;return{c(){e=v("span"),e.textContent="Unique",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function ld(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(nt(()=>{t||(t=ze(e,Pt,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=ze(e,Pt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function od(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-transparent")},m(s,l){S(s,e,l),t||(i=K(e,"click",yn(n[16])),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function cC(n){let e,t,i,s,l,o,r=(n[0].name||"-")+"",a,u,f,c,d,m,h,g,b,y=!n[0].toDelete&&ed(n),k=n[7]&&!n[0].system&&ld(),T=n[0].toDelete&&od(n);return{c(){e=v("div"),t=v("span"),i=v("i"),l=D(),o=v("strong"),a=z(r),f=D(),y&&y.c(),c=D(),d=v("div"),m=D(),k&&k.c(),h=D(),T&&T.c(),g=Ae(),p(i,"class",s=yi(B.getFieldTypeIcon(n[0].type))+" svelte-1tpxlm5"),p(t,"class","icon field-type"),p(o,"class","title field-name svelte-1tpxlm5"),p(o,"title",u=n[0].name),x(o,"txt-strikethrough",n[0].toDelete),p(e,"class","inline-flex"),p(d,"class","flex-fill")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(e,l),_(e,o),_(o,a),S(C,f,M),y&&y.m(C,M),S(C,c,M),S(C,d,M),S(C,m,M),k&&k.m(C,M),S(C,h,M),T&&T.m(C,M),S(C,g,M),b=!0},p(C,M){(!b||M[0]&1&&s!==(s=yi(B.getFieldTypeIcon(C[0].type))+" svelte-1tpxlm5"))&&p(i,"class",s),(!b||M[0]&1)&&r!==(r=(C[0].name||"-")+"")&&re(a,r),(!b||M[0]&1&&u!==(u=C[0].name))&&p(o,"title",u),(!b||M[0]&1)&&x(o,"txt-strikethrough",C[0].toDelete),C[0].toDelete?y&&(y.d(1),y=null):y?y.p(C,M):(y=ed(C),y.c(),y.m(c.parentNode,c)),C[7]&&!C[0].system?k?M[0]&129&&A(k,1):(k=ld(),k.c(),A(k,1),k.m(h.parentNode,h)):k&&(pe(),P(k,1,1,()=>{k=null}),me()),C[0].toDelete?T?T.p(C,M):(T=od(C),T.c(),T.m(g.parentNode,g)):T&&(T.d(1),T=null)},i(C){b||(A(k),b=!0)},o(C){P(k),b=!1},d(C){C&&w(e),C&&w(f),y&&y.d(C),C&&w(c),C&&w(d),C&&w(m),k&&k.d(C),C&&w(h),T&&T.d(C),C&&w(g)}}}function dC(n){let e,t;const i=[{draggable:!0},{single:!0},{interactive:n[8]},{class:n[2]||n[0].toDelete||n[0].system?"field-accordion disabled":"field-accordion"},n[11]];let s={$$slots:{header:[cC],default:[fC]},$$scope:{ctx:n}};for(let l=0;l{n.stopPropagation(),n.preventDefault(),n.stopImmediatePropagation()};function mC(n,e,t){let i,s,l,o;const r=["key","field","disabled","excludeNames","expand","collapse"];let a=At(e,r),u;Je(n,Ci,ue=>t(15,u=ue));const f=$t();let{key:c="0"}=e,{field:d=new dn}=e,{disabled:m=!1}=e,{excludeNames:h=[]}=e,g,b=d.type;function y(){g==null||g.expand()}function k(){g==null||g.collapse()}function T(){d.id?t(0,d.toDelete=!0,d):(k(),f("remove"))}function C(ue){if(ue=(""+ue).toLowerCase(),!ue)return!1;for(const fe of h)if(fe.toLowerCase()===ue)return!1;return!0}function M(ue){return B.slugify(ue)}sn(()=>{d!=null&&d.onMountExpand&&(t(0,d.onMountExpand=!1,d),y())});const $=()=>{t(0,d.toDelete=!1,d)};function O(ue){n.$$.not_equal(d.type,ue)&&(d.type=ue,t(0,d),t(14,b),t(4,g))}const E=ue=>{t(0,d.name=M(ue.target.value),d),ue.target.value=d.name};function I(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,b),t(4,g))}function L(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,b),t(4,g))}function N(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,b),t(4,g))}function F(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,b),t(4,g))}function U(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,b),t(4,g))}function J(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,b),t(4,g))}function ne(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,b),t(4,g))}function Z(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,b),t(4,g))}function te(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,b),t(4,g))}function ee(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,b),t(4,g))}function R(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,b),t(4,g))}function X(){d.required=this.checked,t(0,d),t(14,b),t(4,g)}function Y(){d.unique=this.checked,t(0,d),t(14,b),t(4,g)}const se=()=>{i&&k()};function He(ue){ie[ue?"unshift":"push"](()=>{g=ue,t(4,g)})}function Re(ue){We.call(this,n,ue)}function Fe(ue){We.call(this,n,ue)}function qe(ue){We.call(this,n,ue)}function ge(ue){We.call(this,n,ue)}function Se(ue){We.call(this,n,ue)}function Ue(ue){We.call(this,n,ue)}function lt(ue){We.call(this,n,ue)}return n.$$set=ue=>{e=Xe(Xe({},e),Gn(ue)),t(11,a=At(e,r)),"key"in ue&&t(1,c=ue.key),"field"in ue&&t(0,d=ue.field),"disabled"in ue&&t(2,m=ue.disabled),"excludeNames"in ue&&t(12,h=ue.excludeNames)},n.$$.update=()=>{n.$$.dirty[0]&16385&&b!=d.type&&(t(14,b=d.type),t(0,d.options={},d),t(0,d.unique=!1,d)),n.$$.dirty[0]&17&&d.toDelete&&(g&&k(),d.originalName&&d.name!==d.originalName&&t(0,d.name=d.originalName,d)),n.$$.dirty[0]&1&&!d.originalName&&d.name&&t(0,d.originalName=d.name,d),n.$$.dirty[0]&1&&typeof d.toDelete>"u"&&t(0,d.toDelete=!1,d),n.$$.dirty[0]&1&&d.required&&t(0,d.nullable=!1,d),n.$$.dirty[0]&1&&t(6,i=!B.isEmpty(d.name)&&d.type),n.$$.dirty[0]&80&&(i||g&&y()),n.$$.dirty[0]&69&&t(8,s=!m&&!d.system&&!d.toDelete&&i),n.$$.dirty[0]&1&&t(5,l=C(d.name)),n.$$.dirty[0]&32802&&t(7,o=!l||!B.isEmpty(B.getNestedVal(u,`schema.${c}`)))},[d,c,m,k,g,l,i,o,s,T,M,a,h,y,b,u,$,O,E,I,L,N,F,U,J,ne,Z,te,ee,R,X,Y,se,He,Re,Fe,qe,ge,Se,Ue,lt]}class hC extends ke{constructor(e){super(),ye(this,e,mC,dC,be,{key:1,field:0,disabled:2,excludeNames:12,expand:13,collapse:3},null,[-1,-1])}get expand(){return this.$$.ctx[13]}get collapse(){return this.$$.ctx[3]}}function rd(n,e,t){const i=n.slice();return i[13]=e[t],i[14]=e,i[15]=t,i}function ad(n){let e,t,i,s,l,o,r,a;return{c(){e=z(`, - `),t=v("code"),t.textContent="username",i=z(` , - `),s=v("code"),s.textContent="email",l=z(` , - `),o=v("code"),o.textContent="emailVisibility",r=z(` , - `),a=v("code"),a.textContent="verified",p(t,"class","txt-sm"),p(s,"class","txt-sm"),p(o,"class","txt-sm"),p(a,"class","txt-sm")},m(u,f){S(u,e,f),S(u,t,f),S(u,i,f),S(u,s,f),S(u,l,f),S(u,o,f),S(u,r,f),S(u,a,f)},d(u){u&&w(e),u&&w(t),u&&w(i),u&&w(s),u&&w(l),u&&w(o),u&&w(r),u&&w(a)}}}function ud(n,e){let t,i,s,l;function o(c){e[6](c,e[13],e[14],e[15])}function r(){return e[7](e[15])}function a(...c){return e[8](e[15],...c)}function u(...c){return e[9](e[15],...c)}let f={key:e[15],excludeNames:e[1].concat(e[4](e[13]))};return e[13]!==void 0&&(f.field=e[13]),i=new hC({props:f}),ie.push(()=>ve(i,"field",o)),i.$on("remove",r),i.$on("dragstart",a),i.$on("drop",u),{key:n,first:null,c(){t=Ae(),V(i.$$.fragment),this.first=t},m(c,d){S(c,t,d),H(i,c,d),l=!0},p(c,d){e=c;const m={};d&1&&(m.key=e[15]),d&3&&(m.excludeNames=e[1].concat(e[4](e[13]))),!s&&d&1&&(s=!0,m.field=e[13],we(()=>s=!1)),i.$set(m)},i(c){l||(A(i.$$.fragment,c),l=!0)},o(c){P(i.$$.fragment,c),l=!1},d(c){c&&w(t),q(i,c)}}}function gC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m=[],h=new Map,g,b,y,k,T,C,M,$,O,E,I,L=n[0].isAuth&&ad(),N=n[0].schema;const F=U=>U[13];for(let U=0;Uy.name===b)}function f(b){let y=[];if(b.toDelete)return y;for(let k of i.schema)k===b||k.toDelete||y.push(k.name);return y}function c(b,y){if(!b)return;b.dataTransfer.dropEffect="move";const k=parseInt(b.dataTransfer.getData("text/plain")),T=i.schema;ko(b),h=(b,y)=>_C(y==null?void 0:y.detail,b),g=(b,y)=>c(y==null?void 0:y.detail,b);return n.$$set=b=>{"collection"in b&&t(0,i=b.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof i.schema>"u"&&(t(0,i=i||new bn),t(0,i.schema=[],i)),n.$$.dirty&1&&(i.isAuth?t(1,l=s.concat(["username","email","emailVisibility","verified","tokenKey","passwordHash","lastResetSentAt","lastVerificationSentAt","password","passwordConfirm","oldPassword"])):t(1,l=s.slice(0)))},[i,l,o,r,f,c,d,m,h,g]}class vC extends ke{constructor(e){super(),ye(this,e,bC,gC,be,{collection:0})}}const yC=n=>({isAdminOnly:n&256}),fd=n=>({isAdminOnly:n[8]});function kC(n){let e,t;return e=new _e({props:{class:"form-field rule-field m-0 "+(n[4]?"requied":"")+" "+(n[8]?"disabled":""),name:n[3],$$slots:{default:[DC,({uniqueId:i})=>({17:i}),({uniqueId:i})=>i?131072:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&272&&(l.class="form-field rule-field m-0 "+(i[4]?"requied":"")+" "+(i[8]?"disabled":"")),s&8&&(l.name=i[3]),s&147815&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function wC(n){let e;return{c(){e=v("div"),e.innerHTML='',p(e,"class","txt-center")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function SC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - Set Admins only`,p(e,"type","button"),p(e,"class","btn btn-sm btn-transparent btn-hint lock-toggle svelte-1qbi6vr")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[10]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function TC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - Set custom rule`,p(e,"type","button"),p(e,"class","btn btn-sm btn-transparent btn-success lock-toggle svelte-1qbi6vr")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[9]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function CC(n){let e;return{c(){e=z("Leave empty to grant everyone access.")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function $C(n){let e,t,i,s,l;return{c(){e=z(`Only admins will be able to perform this action ( - `),t=v("button"),t.textContent="unlock to change",i=z(` - ).`),p(t,"type","button"),p(t,"class","link-hint")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=K(t,"click",n[9]),s=!0)},p:G,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function MC(n){let e;function t(l,o){return l[8]?$C:CC}let i=t(n),s=i(n);return{c(){e=v("p"),s.c()},m(l,o){S(l,e,o),s.m(e,null)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null)))},d(l){l&&w(e),s.d()}}}function DC(n){let e,t,i,s,l=n[8]?"Admins only":"Custom rule",o,r,a,u,f,c,d,m,h;function g(E,I){return E[8]?TC:SC}let b=g(n),y=b(n);function k(E){n[13](E)}var T=n[6];function C(E){let I={id:E[17],baseCollection:E[1],disabled:E[8]};return E[0]!==void 0&&(I.value=E[0]),{props:I}}T&&(f=Kt(T,C(n)),n[12](f),ie.push(()=>ve(f,"value",k)));const M=n[11].default,$=Ft(M,n,n[14],fd),O=$||MC(n);return{c(){e=v("label"),t=v("span"),i=z(n[2]),s=z(" - "),o=z(l),r=D(),y.c(),u=D(),f&&V(f.$$.fragment),d=D(),m=v("div"),O&&O.c(),p(t,"class","txt"),p(e,"for",a=n[17]),p(m,"class","help-block")},m(E,I){S(E,e,I),_(e,t),_(t,i),_(t,s),_(t,o),_(e,r),y.m(e,null),S(E,u,I),f&&H(f,E,I),S(E,d,I),S(E,m,I),O&&O.m(m,null),h=!0},p(E,I){(!h||I&4)&&re(i,E[2]),(!h||I&256)&&l!==(l=E[8]?"Admins only":"Custom rule")&&re(o,l),b===(b=g(E))&&y?y.p(E,I):(y.d(1),y=b(E),y&&(y.c(),y.m(e,null))),(!h||I&131072&&a!==(a=E[17]))&&p(e,"for",a);const L={};if(I&131072&&(L.id=E[17]),I&2&&(L.baseCollection=E[1]),I&256&&(L.disabled=E[8]),!c&&I&1&&(c=!0,L.value=E[0],we(()=>c=!1)),T!==(T=E[6])){if(f){pe();const N=f;P(N.$$.fragment,1,0,()=>{q(N,1)}),me()}T?(f=Kt(T,C(E)),E[12](f),ie.push(()=>ve(f,"value",k)),V(f.$$.fragment),A(f.$$.fragment,1),H(f,d.parentNode,d)):f=null}else T&&f.$set(L);$?$.p&&(!h||I&16640)&&jt($,M,E,E[14],h?Rt(M,E[14],I,yC):Ht(E[14]),fd):O&&O.p&&(!h||I&256)&&O.p(E,h?I:-1)},i(E){h||(f&&A(f.$$.fragment,E),A(O,E),h=!0)},o(E){f&&P(f.$$.fragment,E),P(O,E),h=!1},d(E){E&&w(e),y.d(),E&&w(u),n[12](null),f&&q(f,E),E&&w(d),E&&w(m),O&&O.d(E)}}}function OC(n){let e,t,i,s;const l=[wC,kC],o=[];function r(a,u){return a[7]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Ae()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(pe(),P(o[f],1,1,()=>{o[f]=null}),me(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}let cd;function EC(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:u="rule"}=e,{required:f=!1}=e,c=null,d=null,m=cd,h=!1;g();async function g(){m||h||(t(7,h=!0),t(6,m=(await ft(()=>import("./FilterAutocompleteInput-6d6a13cf.js"),["./FilterAutocompleteInput-6d6a13cf.js","./index-4934dad7.js"],import.meta.url)).default),cd=m,t(7,h=!1))}async function b(){t(0,r=d||""),await tn(),c==null||c.focus()}async function y(){d=r,t(0,r=null)}function k(C){ie[C?"unshift":"push"](()=>{c=C,t(5,c)})}function T(C){r=C,t(0,r)}return n.$$set=C=>{"collection"in C&&t(1,o=C.collection),"rule"in C&&t(0,r=C.rule),"label"in C&&t(2,a=C.label),"formKey"in C&&t(3,u=C.formKey),"required"in C&&t(4,f=C.required),"$$scope"in C&&t(14,l=C.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(8,i=r===null)},[r,o,a,u,f,c,m,h,i,b,y,s,k,T,l]}class hs extends ke{constructor(e){super(),ye(this,e,EC,OC,be,{collection:1,rule:0,label:2,formKey:3,required:4})}}function dd(n,e,t){const i=n.slice();return i[9]=e[t],i}function pd(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$,O,E,I,L,N,F,U,J,ne=n[0].schema,Z=[];for(let te=0;te@request filter:",y=D(),k=v("div"),k.innerHTML=`@request.method - @request.query.* - @request.data.* - @request.auth.*`,T=D(),C=v("hr"),M=D(),$=v("p"),$.innerHTML="You could also add constraints and query other collections using the @collection filter:",O=D(),E=v("div"),E.innerHTML="@collection.ANY_COLLECTION_NAME.*",I=D(),L=v("hr"),N=D(),F=v("p"),F.innerHTML=`Example rule: -
    - @request.auth.id != "" && created > "2022-01-01 00:00:00"`,p(s,"class","m-b-0"),p(o,"class","inline-flex flex-gap-5"),p(h,"class","m-t-10 m-b-5"),p(b,"class","m-b-0"),p(k,"class","inline-flex flex-gap-5"),p(C,"class","m-t-10 m-b-5"),p($,"class","m-b-0"),p(E,"class","inline-flex flex-gap-5"),p(L,"class","m-t-10 m-b-5"),p(i,"class","content"),p(t,"class","alert alert-warning m-0")},m(te,ee){S(te,e,ee),_(e,t),_(t,i),_(i,s),_(i,l),_(i,o),_(o,r),_(o,a),_(o,u),_(o,f),_(o,c),_(o,d);for(let R=0;R{U||(U=ze(e,It,{duration:150},!0)),U.run(1)}),J=!0)},o(te){te&&(U||(U=ze(e,It,{duration:150},!1)),U.run(0)),J=!1},d(te){te&&w(e),bt(Z,te),te&&U&&U.end()}}}function AC(n){let e,t=n[9].name+"",i;return{c(){e=v("code"),i=z(t)},m(s,l){S(s,e,l),_(e,i)},p(s,l){l&1&&t!==(t=s[9].name+"")&&re(i,t)},d(s){s&&w(e)}}}function IC(n){let e,t=n[9].name+"",i,s;return{c(){e=v("code"),i=z(t),s=z(".*")},m(l,o){S(l,e,o),_(e,i),_(e,s)},p(l,o){o&1&&t!==(t=l[9].name+"")&&re(i,t)},d(l){l&&w(e)}}}function md(n){let e;function t(l,o){return l[9].type==="relation"||l[9].type==="user"?IC:AC}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function hd(n){let e,t,i,s,l;function o(a){n[8](a)}let r={label:"Manage action",formKey:"options.manageRule",collection:n[0],$$slots:{default:[PC]},$$scope:{ctx:n}};return n[0].options.manageRule!==void 0&&(r.rule=n[0].options.manageRule),i=new hs({props:r}),ie.push(()=>ve(i,"rule",o)),{c(){e=v("hr"),t=D(),V(i.$$.fragment),p(e,"class","m-t-sm m-b-sm")},m(a,u){S(a,e,u),S(a,t,u),H(i,a,u),l=!0},p(a,u){const f={};u&1&&(f.collection=a[0]),u&4096&&(f.$$scope={dirty:u,ctx:a}),!s&&u&1&&(s=!0,f.rule=a[0].options.manageRule,we(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){P(i.$$.fragment,a),l=!1},d(a){a&&w(e),a&&w(t),q(i,a)}}}function PC(n){let e,t,i;return{c(){e=v("p"),e.textContent=`This API rule gives admin-like permissions to allow fully managing the auth record(s), eg. - changing the password without requiring to enter the old one, directly updating the verified - state or email, etc.`,t=D(),i=v("p"),i.innerHTML="This rule is executed in addition to the create and update API rules."},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},p:G,d(s){s&&w(e),s&&w(t),s&&w(i)}}}function LC(n){var ae;let e,t,i,s,l,o=n[1]?"Hide available fields":"Show available fields",r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$,O,E,I,L,N,F,U,J,ne,Z,te,ee,R,X,Y=n[1]&&pd(n);function se(oe){n[3](oe)}let He={label:"List/Search action",formKey:"listRule",collection:n[0]};n[0].listRule!==void 0&&(He.rule=n[0].listRule),f=new hs({props:He}),ie.push(()=>ve(f,"rule",se));function Re(oe){n[4](oe)}let Fe={label:"View action",formKey:"viewRule",collection:n[0]};n[0].viewRule!==void 0&&(Fe.rule=n[0].viewRule),g=new hs({props:Fe}),ie.push(()=>ve(g,"rule",Re));function qe(oe){n[5](oe)}let ge={label:"Create action",formKey:"createRule",collection:n[0]};n[0].createRule!==void 0&&(ge.rule=n[0].createRule),C=new hs({props:ge}),ie.push(()=>ve(C,"rule",qe));function Se(oe){n[6](oe)}let Ue={label:"Update action",formKey:"updateRule",collection:n[0]};n[0].updateRule!==void 0&&(Ue.rule=n[0].updateRule),I=new hs({props:Ue}),ie.push(()=>ve(I,"rule",Se));function lt(oe){n[7](oe)}let ue={label:"Delete action",formKey:"deleteRule",collection:n[0]};n[0].deleteRule!==void 0&&(ue.rule=n[0].deleteRule),J=new hs({props:ue}),ie.push(()=>ve(J,"rule",lt));let fe=((ae=n[0])==null?void 0:ae.isAuth)&&hd(n);return{c(){e=v("div"),t=v("div"),i=v("p"),i.innerHTML=`All rules follow the -
    PocketBase filter syntax and operators - .`,s=D(),l=v("button"),r=z(o),a=D(),Y&&Y.c(),u=D(),V(f.$$.fragment),d=D(),m=v("hr"),h=D(),V(g.$$.fragment),y=D(),k=v("hr"),T=D(),V(C.$$.fragment),$=D(),O=v("hr"),E=D(),V(I.$$.fragment),N=D(),F=v("hr"),U=D(),V(J.$$.fragment),Z=D(),fe&&fe.c(),te=Ae(),p(l,"type","button"),p(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),p(t,"class","flex txt-sm txt-hint m-b-5"),p(e,"class","block m-b-base"),p(m,"class","m-t-sm m-b-sm"),p(k,"class","m-t-sm m-b-sm"),p(O,"class","m-t-sm m-b-sm"),p(F,"class","m-t-sm m-b-sm")},m(oe,je){S(oe,e,je),_(e,t),_(t,i),_(t,s),_(t,l),_(l,r),_(e,a),Y&&Y.m(e,null),S(oe,u,je),H(f,oe,je),S(oe,d,je),S(oe,m,je),S(oe,h,je),H(g,oe,je),S(oe,y,je),S(oe,k,je),S(oe,T,je),H(C,oe,je),S(oe,$,je),S(oe,O,je),S(oe,E,je),H(I,oe,je),S(oe,N,je),S(oe,F,je),S(oe,U,je),H(J,oe,je),S(oe,Z,je),fe&&fe.m(oe,je),S(oe,te,je),ee=!0,R||(X=K(l,"click",n[2]),R=!0)},p(oe,[je]){var it;(!ee||je&2)&&o!==(o=oe[1]?"Hide available fields":"Show available fields")&&re(r,o),oe[1]?Y?(Y.p(oe,je),je&2&&A(Y,1)):(Y=pd(oe),Y.c(),A(Y,1),Y.m(e,null)):Y&&(pe(),P(Y,1,1,()=>{Y=null}),me());const Me={};je&1&&(Me.collection=oe[0]),!c&&je&1&&(c=!0,Me.rule=oe[0].listRule,we(()=>c=!1)),f.$set(Me);const Te={};je&1&&(Te.collection=oe[0]),!b&&je&1&&(b=!0,Te.rule=oe[0].viewRule,we(()=>b=!1)),g.$set(Te);const ce={};je&1&&(ce.collection=oe[0]),!M&&je&1&&(M=!0,ce.rule=oe[0].createRule,we(()=>M=!1)),C.$set(ce);const $e={};je&1&&($e.collection=oe[0]),!L&&je&1&&(L=!0,$e.rule=oe[0].updateRule,we(()=>L=!1)),I.$set($e);const Ze={};je&1&&(Ze.collection=oe[0]),!ne&&je&1&&(ne=!0,Ze.rule=oe[0].deleteRule,we(()=>ne=!1)),J.$set(Ze),(it=oe[0])!=null&&it.isAuth?fe?(fe.p(oe,je),je&1&&A(fe,1)):(fe=hd(oe),fe.c(),A(fe,1),fe.m(te.parentNode,te)):fe&&(pe(),P(fe,1,1,()=>{fe=null}),me())},i(oe){ee||(A(Y),A(f.$$.fragment,oe),A(g.$$.fragment,oe),A(C.$$.fragment,oe),A(I.$$.fragment,oe),A(J.$$.fragment,oe),A(fe),ee=!0)},o(oe){P(Y),P(f.$$.fragment,oe),P(g.$$.fragment,oe),P(C.$$.fragment,oe),P(I.$$.fragment,oe),P(J.$$.fragment,oe),P(fe),ee=!1},d(oe){oe&&w(e),Y&&Y.d(),oe&&w(u),q(f,oe),oe&&w(d),oe&&w(m),oe&&w(h),q(g,oe),oe&&w(y),oe&&w(k),oe&&w(T),q(C,oe),oe&&w($),oe&&w(O),oe&&w(E),q(I,oe),oe&&w(N),oe&&w(F),oe&&w(U),q(J,oe),oe&&w(Z),fe&&fe.d(oe),oe&&w(te),R=!1,X()}}}function NC(n,e,t){let{collection:i=new bn}=e,s=!1;const l=()=>t(1,s=!s);function o(d){n.$$.not_equal(i.listRule,d)&&(i.listRule=d,t(0,i))}function r(d){n.$$.not_equal(i.viewRule,d)&&(i.viewRule=d,t(0,i))}function a(d){n.$$.not_equal(i.createRule,d)&&(i.createRule=d,t(0,i))}function u(d){n.$$.not_equal(i.updateRule,d)&&(i.updateRule=d,t(0,i))}function f(d){n.$$.not_equal(i.deleteRule,d)&&(i.deleteRule=d,t(0,i))}function c(d){n.$$.not_equal(i.options.manageRule,d)&&(i.options.manageRule=d,t(0,i))}return n.$$set=d=>{"collection"in d&&t(0,i=d.collection)},[i,s,l,o,r,a,u,f,c]}class FC extends ke{constructor(e){super(),ye(this,e,NC,LC,be,{collection:0})}}function RC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=z("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowUsernameAuth,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[5]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowUsernameAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function jC(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[RC,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&12289&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function HC(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function qC(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function gd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(nt(()=>{t||(t=ze(e,Pt,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=ze(e,Pt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function VC(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].options.allowUsernameAuth?qC:HC}let u=a(n),f=u(n),c=n[3]&&gd();return{c(){e=v("div"),e.innerHTML=` - Username/Password`,t=D(),i=v("div"),s=D(),f.c(),l=D(),c&&c.c(),o=Ae(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,m){S(d,e,m),S(d,t,m),S(d,i,m),S(d,s,m),f.m(d,m),S(d,l,m),c&&c.m(d,m),S(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[3]?c?m&8&&A(c,1):(c=gd(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(pe(),P(c,1,1,()=>{c=null}),me())},i(d){r||(A(c),r=!0)},o(d){P(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function zC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=z("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowEmailAuth,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[6]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowEmailAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function _d(n){let e,t,i,s,l,o,r,a;return i=new _e({props:{class:"form-field "+(B.isEmpty(n[0].options.onlyEmailDomains)?"":"disabled"),name:"options.exceptEmailDomains",$$slots:{default:[BC,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field "+(B.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[UC,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=D(),l=v("div"),V(o.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid grid-sm p-t-sm")},m(u,f){S(u,e,f),_(e,t),H(i,t,null),_(e,s),_(e,l),H(o,l,null),a=!0},p(u,f){const c={};f&1&&(c.class="form-field "+(B.isEmpty(u[0].options.onlyEmailDomains)?"":"disabled")),f&12289&&(c.$$scope={dirty:f,ctx:u}),i.$set(c);const d={};f&1&&(d.class="form-field "+(B.isEmpty(u[0].options.exceptEmailDomains)?"":"disabled")),f&12289&&(d.$$scope={dirty:f,ctx:u}),o.$set(d)},i(u){a||(A(i.$$.fragment,u),A(o.$$.fragment,u),u&&nt(()=>{r||(r=ze(e,It,{duration:150},!0)),r.run(1)}),a=!0)},o(u){P(i.$$.fragment,u),P(o.$$.fragment,u),u&&(r||(r=ze(e,It,{duration:150},!1)),r.run(0)),a=!1},d(u){u&&w(e),q(i),q(o),u&&r&&r.end()}}}function BC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function h(b){n[7](b)}let g={id:n[12],disabled:!B.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(g.value=n[0].options.exceptEmailDomains),r=new Ns({props:g}),ie.push(()=>ve(r,"value",h)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=D(),s=v("i"),o=D(),V(r.$$.fragment),u=D(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(b,y){S(b,e,y),_(e,t),_(e,i),_(e,s),S(b,o,y),H(r,b,y),S(b,u,y),S(b,f,y),c=!0,d||(m=Pe(Ye.call(null,s,{text:`Email domains that are NOT allowed to sign up. - This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&4096&&l!==(l=b[12]))&&p(e,"for",l);const k={};y&4096&&(k.id=b[12]),y&1&&(k.disabled=!B.isEmpty(b[0].options.onlyEmailDomains)),!a&&y&1&&(a=!0,k.value=b[0].options.exceptEmailDomains,we(()=>a=!1)),r.$set(k)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&w(e),b&&w(o),q(r,b),b&&w(u),b&&w(f),d=!1,m()}}}function UC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function h(b){n[8](b)}let g={id:n[12],disabled:!B.isEmpty(n[0].options.exceptEmailDomains)};return n[0].options.onlyEmailDomains!==void 0&&(g.value=n[0].options.onlyEmailDomains),r=new Ns({props:g}),ie.push(()=>ve(r,"value",h)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=D(),s=v("i"),o=D(),V(r.$$.fragment),u=D(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(b,y){S(b,e,y),_(e,t),_(e,i),_(e,s),S(b,o,y),H(r,b,y),S(b,u,y),S(b,f,y),c=!0,d||(m=Pe(Ye.call(null,s,{text:`Email domains that are ONLY allowed to sign up. - This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&4096&&l!==(l=b[12]))&&p(e,"for",l);const k={};y&4096&&(k.id=b[12]),y&1&&(k.disabled=!B.isEmpty(b[0].options.exceptEmailDomains)),!a&&y&1&&(a=!0,k.value=b[0].options.onlyEmailDomains,we(()=>a=!1)),r.$set(k)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&w(e),b&&w(o),q(r,b),b&&w(u),b&&w(f),d=!1,m()}}}function WC(n){let e,t,i,s;e=new _e({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[zC,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&_d(n);return{c(){V(e.$$.fragment),t=D(),l&&l.c(),i=Ae()},m(o,r){H(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowEmailAuth?l?(l.p(o,r),r&1&&A(l,1)):(l=_d(o),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),me())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){q(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function YC(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function KC(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function bd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(nt(()=>{t||(t=ze(e,Pt,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=ze(e,Pt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function JC(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].options.allowEmailAuth?KC:YC}let u=a(n),f=u(n),c=n[2]&&bd();return{c(){e=v("div"),e.innerHTML=` - Email/Password`,t=D(),i=v("div"),s=D(),f.c(),l=D(),c&&c.c(),o=Ae(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,m){S(d,e,m),S(d,t,m),S(d,i,m),S(d,s,m),f.m(d,m),S(d,l,m),c&&c.m(d,m),S(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[2]?c?m&4&&A(c,1):(c=bd(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(pe(),P(c,1,1,()=>{c=null}),me())},i(d){r||(A(c),r=!0)},o(d){P(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function ZC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=z("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowOAuth2Auth,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[9]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowOAuth2Auth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function vd(n){let e,t,i;return{c(){e=v("div"),e.innerHTML='',p(e,"class","block")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&nt(()=>{t||(t=ze(e,It,{duration:150},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=ze(e,It,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function GC(n){let e,t,i,s;e=new _e({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowOAuth2Auth",$$slots:{default:[ZC,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowOAuth2Auth&&vd();return{c(){V(e.$$.fragment),t=D(),l&&l.c(),i=Ae()},m(o,r){H(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowOAuth2Auth?l?r&1&&A(l,1):(l=vd(),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),me())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){q(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function XC(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function xC(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function yd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(nt(()=>{t||(t=ze(e,Pt,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=ze(e,Pt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function QC(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].options.allowOAuth2Auth?xC:XC}let u=a(n),f=u(n),c=n[1]&&yd();return{c(){e=v("div"),e.innerHTML=` - OAuth2`,t=D(),i=v("div"),s=D(),f.c(),l=D(),c&&c.c(),o=Ae(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,m){S(d,e,m),S(d,t,m),S(d,i,m),S(d,s,m),f.m(d,m),S(d,l,m),c&&c.m(d,m),S(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[1]?c?m&2&&A(c,1):(c=yd(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(pe(),P(c,1,1,()=>{c=null}),me())},i(d){r||(A(c),r=!0)},o(d){P(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function e$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Minimum password length"),s=D(),l=v("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",o=n[12]),l.required=!0,p(l,"min","6"),p(l,"max","72")},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].options.minPasswordLength),r||(a=K(l,"input",n[10]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&o!==(o=u[12])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].options.minPasswordLength&&de(l,u[0].options.minPasswordLength)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function t$(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=D(),s=v("label"),l=v("span"),l.textContent="Always require email",o=D(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(l,"class","txt"),p(r,"class","ri-information-line txt-sm link-hint"),p(s,"for",a=n[12])},m(c,d){S(c,e,d),e.checked=n[0].options.requireEmail,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[K(e,"change",n[11]),Pe(Ye.call(null,r,{text:`The constraint is applied only for new records. -Also note that some OAuth2 providers (like Twitter), don't return an email and the authentication may fail if the email field is required.`,position:"right"}))],u=!0)},p(c,d){d&4096&&t!==(t=c[12])&&p(e,"id",t),d&1&&(e.checked=c[0].options.requireEmail),d&4096&&a!==(a=c[12])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Le(f)}}}function n$(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y;return s=new ys({props:{single:!0,$$slots:{header:[VC],default:[jC]},$$scope:{ctx:n}}}),o=new ys({props:{single:!0,$$slots:{header:[JC],default:[WC]},$$scope:{ctx:n}}}),a=new ys({props:{single:!0,$$slots:{header:[QC],default:[GC]},$$scope:{ctx:n}}}),h=new _e({props:{class:"form-field required",name:"options.minPasswordLength",$$slots:{default:[e$,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}}),b=new _e({props:{class:"form-field form-field-toggle m-b-sm",name:"options.requireEmail",$$slots:{default:[t$,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("h4"),e.textContent="Auth methods",t=D(),i=v("div"),V(s.$$.fragment),l=D(),V(o.$$.fragment),r=D(),V(a.$$.fragment),u=D(),f=v("hr"),c=D(),d=v("h4"),d.textContent="General",m=D(),V(h.$$.fragment),g=D(),V(b.$$.fragment),p(e,"class","section-title"),p(i,"class","accordions"),p(d,"class","section-title")},m(k,T){S(k,e,T),S(k,t,T),S(k,i,T),H(s,i,null),_(i,l),H(o,i,null),_(i,r),H(a,i,null),S(k,u,T),S(k,f,T),S(k,c,T),S(k,d,T),S(k,m,T),H(h,k,T),S(k,g,T),H(b,k,T),y=!0},p(k,[T]){const C={};T&8201&&(C.$$scope={dirty:T,ctx:k}),s.$set(C);const M={};T&8197&&(M.$$scope={dirty:T,ctx:k}),o.$set(M);const $={};T&8195&&($.$$scope={dirty:T,ctx:k}),a.$set($);const O={};T&12289&&(O.$$scope={dirty:T,ctx:k}),h.$set(O);const E={};T&12289&&(E.$$scope={dirty:T,ctx:k}),b.$set(E)},i(k){y||(A(s.$$.fragment,k),A(o.$$.fragment,k),A(a.$$.fragment,k),A(h.$$.fragment,k),A(b.$$.fragment,k),y=!0)},o(k){P(s.$$.fragment,k),P(o.$$.fragment,k),P(a.$$.fragment,k),P(h.$$.fragment,k),P(b.$$.fragment,k),y=!1},d(k){k&&w(e),k&&w(t),k&&w(i),q(s),q(o),q(a),k&&w(u),k&&w(f),k&&w(c),k&&w(d),k&&w(m),q(h,k),k&&w(g),q(b,k)}}}function i$(n,e,t){let i,s,l,o;Je(n,Ci,g=>t(4,o=g));let{collection:r=new bn}=e;function a(){r.options.allowUsernameAuth=this.checked,t(0,r)}function u(){r.options.allowEmailAuth=this.checked,t(0,r)}function f(g){n.$$.not_equal(r.options.exceptEmailDomains,g)&&(r.options.exceptEmailDomains=g,t(0,r))}function c(g){n.$$.not_equal(r.options.onlyEmailDomains,g)&&(r.options.onlyEmailDomains=g,t(0,r))}function d(){r.options.allowOAuth2Auth=this.checked,t(0,r)}function m(){r.options.minPasswordLength=ht(this.value),t(0,r)}function h(){r.options.requireEmail=this.checked,t(0,r)}return n.$$set=g=>{"collection"in g&&t(0,r=g.collection)},n.$$.update=()=>{var g,b,y,k;n.$$.dirty&1&&r.isAuth&&B.isEmpty(r.options)&&t(0,r.options={allowEmailAuth:!0,allowUsernameAuth:!0,allowOAuth2Auth:!0,minPasswordLength:8},r),n.$$.dirty&16&&t(2,s=!B.isEmpty((g=o==null?void 0:o.options)==null?void 0:g.allowEmailAuth)||!B.isEmpty((b=o==null?void 0:o.options)==null?void 0:b.onlyEmailDomains)||!B.isEmpty((y=o==null?void 0:o.options)==null?void 0:y.exceptEmailDomains)),n.$$.dirty&16&&t(1,l=!B.isEmpty((k=o==null?void 0:o.options)==null?void 0:k.allowOAuth2Auth))},t(3,i=!1),[r,l,s,i,o,a,u,f,c,d,m,h]}class s$ extends ke{constructor(e){super(),ye(this,e,i$,n$,be,{collection:0})}}function kd(n,e,t){const i=n.slice();return i[14]=e[t],i}function wd(n,e,t){const i=n.slice();return i[14]=e[t],i}function Sd(n){let e;return{c(){e=v("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Td(n){let e,t,i,s,l=n[1].originalName+"",o,r,a,u,f,c=n[1].name+"",d;return{c(){e=v("li"),t=v("div"),i=z(`Renamed collection - `),s=v("strong"),o=z(l),r=D(),a=v("i"),u=D(),f=v("strong"),d=z(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(m,h){S(m,e,h),_(e,t),_(t,i),_(t,s),_(s,o),_(t,r),_(t,a),_(t,u),_(t,f),_(f,d)},p(m,h){h&2&&l!==(l=m[1].originalName+"")&&re(o,l),h&2&&c!==(c=m[1].name+"")&&re(d,c)},d(m){m&&w(e)}}}function Cd(n){let e,t,i,s,l=n[14].originalName+"",o,r,a,u,f,c=n[14].name+"",d;return{c(){e=v("li"),t=v("div"),i=z(`Renamed field - `),s=v("strong"),o=z(l),r=D(),a=v("i"),u=D(),f=v("strong"),d=z(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(m,h){S(m,e,h),_(e,t),_(t,i),_(t,s),_(s,o),_(t,r),_(t,a),_(t,u),_(t,f),_(f,d)},p(m,h){h&16&&l!==(l=m[14].originalName+"")&&re(o,l),h&16&&c!==(c=m[14].name+"")&&re(d,c)},d(m){m&&w(e)}}}function $d(n){let e,t,i,s=n[14].name+"",l,o;return{c(){e=v("li"),t=z("Removed field "),i=v("span"),l=z(s),o=D(),p(i,"class","txt-bold"),p(e,"class","txt-danger")},m(r,a){S(r,e,a),_(e,t),_(e,i),_(i,l),_(e,o)},p(r,a){a&8&&s!==(s=r[14].name+"")&&re(l,s)},d(r){r&&w(e)}}}function l$(n){let e,t,i,s,l,o,r,a,u,f,c,d,m=n[3].length&&Sd(),h=n[5]&&Td(n),g=n[4],b=[];for(let T=0;T',i=D(),s=v("div"),l=v("p"),l.textContent=`If any of the following changes is part of another collection rule or filter, you'll have to - update it manually!`,o=D(),m&&m.c(),r=D(),a=v("h6"),a.textContent="Changes:",u=D(),f=v("ul"),h&&h.c(),c=D();for(let T=0;TCancel',t=D(),i=v("button"),i.innerHTML='Confirm',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-transparent"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),e.focus(),s||(l=[K(e,"click",n[8]),K(i,"click",n[9])],s=!0)},p:G,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Le(l)}}}function a$(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[r$],header:[o$],default:[l$]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){V(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&524346&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),q(e,s)}}}function u$(n,e,t){let i,s,l;const o=$t();let r,a;async function u(y){t(1,a=y),await tn(),!i&&!s.length&&!l.length?c():r==null||r.show()}function f(){r==null||r.hide()}function c(){f(),o("confirm")}const d=()=>f(),m=()=>c();function h(y){ie[y?"unshift":"push"](()=>{r=y,t(2,r)})}function g(y){We.call(this,n,y)}function b(y){We.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=(a==null?void 0:a.originalName)!=(a==null?void 0:a.name)),n.$$.dirty&2&&t(4,s=(a==null?void 0:a.schema.filter(y=>y.id&&!y.toDelete&&y.originalName!=y.name))||[]),n.$$.dirty&2&&t(3,l=(a==null?void 0:a.schema.filter(y=>y.id&&y.toDelete))||[])},[f,a,r,l,s,i,c,u,d,m,h,g,b]}class f$ extends ke{constructor(e){super(),ye(this,e,u$,a$,be,{show:7,hide:0})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}}function Md(n,e,t){const i=n.slice();return i[46]=e[t][0],i[47]=e[t][1],i}function Dd(n){let e,t,i,s;function l(r){n[32](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new FC({props:o}),ie.push(()=>ve(t,"collection",l)),{c(){e=v("div"),V(t.$$.fragment),p(e,"class","tab-item active")},m(r,a){S(r,e,a),H(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],we(()=>i=!1)),t.$set(u)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),q(t)}}}function Od(n){let e,t,i,s;function l(r){n[33](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new s$({props:o}),ie.push(()=>ve(t,"collection",l)),{c(){e=v("div"),V(t.$$.fragment),p(e,"class","tab-item"),x(e,"active",n[3]===Os)},m(r,a){S(r,e,a),H(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],we(()=>i=!1)),t.$set(u),(!s||a[0]&8)&&x(e,"active",r[3]===Os)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),q(t)}}}function c$(n){let e,t,i,s,l,o,r;function a(d){n[31](d)}let u={};n[2]!==void 0&&(u.collection=n[2]),i=new vC({props:u}),ie.push(()=>ve(i,"collection",a));let f=n[3]===bl&&Dd(n),c=n[2].isAuth&&Od(n);return{c(){e=v("div"),t=v("div"),V(i.$$.fragment),l=D(),f&&f.c(),o=D(),c&&c.c(),p(t,"class","tab-item"),x(t,"active",n[3]===_i),p(e,"class","tabs-content svelte-1yfp6mj")},m(d,m){S(d,e,m),_(e,t),H(i,t,null),_(e,l),f&&f.m(e,null),_(e,o),c&&c.m(e,null),r=!0},p(d,m){const h={};!s&&m[0]&4&&(s=!0,h.collection=d[2],we(()=>s=!1)),i.$set(h),(!r||m[0]&8)&&x(t,"active",d[3]===_i),d[3]===bl?f?(f.p(d,m),m[0]&8&&A(f,1)):(f=Dd(d),f.c(),A(f,1),f.m(e,o)):f&&(pe(),P(f,1,1,()=>{f=null}),me()),d[2].isAuth?c?(c.p(d,m),m[0]&4&&A(c,1)):(c=Od(d),c.c(),A(c,1),c.m(e,null)):c&&(pe(),P(c,1,1,()=>{c=null}),me())},i(d){r||(A(i.$$.fragment,d),A(f),A(c),r=!0)},o(d){P(i.$$.fragment,d),P(f),P(c),r=!1},d(d){d&&w(e),q(i),f&&f.d(),c&&c.d()}}}function Ed(n){let e,t,i,s,l,o,r;return o=new xn({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[d$]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=D(),i=v("button"),s=v("i"),l=D(),V(o.$$.fragment),p(e,"class","flex-fill"),p(s,"class","ri-more-line"),p(i,"type","button"),p(i,"aria-label","More"),p(i,"class","btn btn-sm btn-circle btn-transparent flex-gap-0")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),_(i,s),_(i,l),H(o,i,null),r=!0},p(a,u){const f={};u[1]&524288&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(A(o.$$.fragment,a),r=!0)},o(a){P(o.$$.fragment,a),r=!1},d(a){a&&w(e),a&&w(t),a&&w(i),q(o)}}}function d$(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML=` - Duplicate`,t=D(),i=v("button"),i.innerHTML=` - Delete`,p(e,"type","button"),p(e,"class","dropdown-item closable"),p(i,"type","button"),p(i,"class","dropdown-item txt-danger closable")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=[K(e,"click",n[23]),K(i,"click",yn(pt(n[24])))],s=!0)},p:G,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Le(l)}}}function Ad(n){let e,t,i,s;return i=new xn({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[p$]},$$scope:{ctx:n}}}),{c(){e=v("i"),t=D(),V(i.$$.fragment),p(e,"class","ri-arrow-down-s-fill")},m(l,o){S(l,e,o),S(l,t,o),H(i,l,o),s=!0},p(l,o){const r={};o[0]&68|o[1]&524288&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(e),l&&w(t),q(i,l)}}}function Id(n){let e,t,i,s,l,o=n[47]+"",r,a,u,f,c;function d(){return n[26](n[46])}return{c(){e=v("button"),t=v("i"),s=D(),l=v("span"),r=z(o),a=z(" collection"),u=D(),p(t,"class",i=yi(B.getCollectionTypeIcon(n[46]))+" svelte-1yfp6mj"),p(l,"class","txt"),p(e,"type","button"),p(e,"class","dropdown-item closable"),x(e,"selected",n[46]==n[2].type)},m(m,h){S(m,e,h),_(e,t),_(e,s),_(e,l),_(l,r),_(l,a),_(e,u),f||(c=K(e,"click",d),f=!0)},p(m,h){n=m,h[0]&64&&i!==(i=yi(B.getCollectionTypeIcon(n[46]))+" svelte-1yfp6mj")&&p(t,"class",i),h[0]&64&&o!==(o=n[47]+"")&&re(r,o),h[0]&68&&x(e,"selected",n[46]==n[2].type)},d(m){m&&w(e),f=!1,c()}}}function p$(n){let e,t=Object.entries(n[6]),i=[];for(let s=0;s{N=null}),me()),(!E||J[0]&4&&C!==(C="btn btn-sm p-r-10 p-l-10 "+(U[2].isNew?"btn-secondary":"btn-transparent")))&&p(d,"class",C),(!E||J[0]&4&&M!==(M=!U[2].isNew))&&(d.disabled=M),U[2].system?F||(F=Pd(),F.c(),F.m(O.parentNode,O)):F&&(F.d(1),F=null)},i(U){E||(A(N),E=!0)},o(U){P(N),E=!1},d(U){U&&w(e),U&&w(s),U&&w(l),U&&w(f),U&&w(c),N&&N.d(),U&&w($),F&&F.d(U),U&&w(O),I=!1,L()}}}function Ld(n){let e,t,i,s,l,o;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(r,a){S(r,e,a),s=!0,l||(o=Pe(t=Ye.call(null,e,n[13])),l=!0)},p(r,a){t&&zt(t.update)&&a[0]&8192&&t.update.call(null,r[13])},i(r){s||(r&&nt(()=>{i||(i=ze(e,Pt,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(r){r&&(i||(i=ze(e,Pt,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&w(e),r&&i&&i.end(),l=!1,o()}}}function Nd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&nt(()=>{t||(t=ze(e,Pt,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=ze(e,Pt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function Fd(n){var a,u,f;let e,t,i,s=!B.isEmpty((a=n[5])==null?void 0:a.options)&&!((f=(u=n[5])==null?void 0:u.options)!=null&&f.manageRule),l,o,r=s&&Rd();return{c(){e=v("button"),t=v("span"),t.textContent="Options",i=D(),r&&r.c(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","tab-item"),x(e,"active",n[3]===Os)},m(c,d){S(c,e,d),_(e,t),_(e,i),r&&r.m(e,null),l||(o=K(e,"click",n[30]),l=!0)},p(c,d){var m,h,g;d[0]&32&&(s=!B.isEmpty((m=c[5])==null?void 0:m.options)&&!((g=(h=c[5])==null?void 0:h.options)!=null&&g.manageRule)),s?r?d[0]&32&&A(r,1):(r=Rd(),r.c(),A(r,1),r.m(e,null)):r&&(pe(),P(r,1,1,()=>{r=null}),me()),d[0]&8&&x(e,"active",c[3]===Os)},d(c){c&&w(e),r&&r.d(),l=!1,o()}}}function Rd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&nt(()=>{t||(t=ze(e,Pt,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=ze(e,Pt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function h$(n){var U,J,ne,Z,te,ee,R,X;let e,t=n[2].isNew?"New collection":"Edit collection",i,s,l,o,r,a,u,f,c,d,m,h,g=!B.isEmpty((U=n[5])==null?void 0:U.schema),b,y,k,T,C=!B.isEmpty((J=n[5])==null?void 0:J.listRule)||!B.isEmpty((ne=n[5])==null?void 0:ne.viewRule)||!B.isEmpty((Z=n[5])==null?void 0:Z.createRule)||!B.isEmpty((te=n[5])==null?void 0:te.updateRule)||!B.isEmpty((ee=n[5])==null?void 0:ee.deleteRule)||!B.isEmpty((X=(R=n[5])==null?void 0:R.options)==null?void 0:X.manageRule),M,$,O,E,I=!n[2].isNew&&!n[2].system&&Ed(n);r=new _e({props:{class:"form-field collection-field-name required m-b-0 "+(n[12]?"disabled":""),name:"name",$$slots:{default:[m$,({uniqueId:Y})=>({45:Y}),({uniqueId:Y})=>[0,Y?16384:0]]},$$scope:{ctx:n}}});let L=g&&Ld(n),N=C&&Nd(),F=n[2].isAuth&&Fd(n);return{c(){e=v("h4"),i=z(t),s=D(),I&&I.c(),l=D(),o=v("form"),V(r.$$.fragment),a=D(),u=v("input"),f=D(),c=v("div"),d=v("button"),m=v("span"),m.textContent="Fields",h=D(),L&&L.c(),b=D(),y=v("button"),k=v("span"),k.textContent="API Rules",T=D(),N&&N.c(),M=D(),F&&F.c(),p(e,"class","upsert-panel-title svelte-1yfp6mj"),p(u,"type","submit"),p(u,"class","hidden"),p(u,"tabindex","-1"),p(o,"class","block"),p(m,"class","txt"),p(d,"type","button"),p(d,"class","tab-item"),x(d,"active",n[3]===_i),p(k,"class","txt"),p(y,"type","button"),p(y,"class","tab-item"),x(y,"active",n[3]===bl),p(c,"class","tabs-header stretched")},m(Y,se){S(Y,e,se),_(e,i),S(Y,s,se),I&&I.m(Y,se),S(Y,l,se),S(Y,o,se),H(r,o,null),_(o,a),_(o,u),S(Y,f,se),S(Y,c,se),_(c,d),_(d,m),_(d,h),L&&L.m(d,null),_(c,b),_(c,y),_(y,k),_(y,T),N&&N.m(y,null),_(c,M),F&&F.m(c,null),$=!0,O||(E=[K(o,"submit",pt(n[27])),K(d,"click",n[28]),K(y,"click",n[29])],O=!0)},p(Y,se){var Re,Fe,qe,ge,Se,Ue,lt,ue;(!$||se[0]&4)&&t!==(t=Y[2].isNew?"New collection":"Edit collection")&&re(i,t),!Y[2].isNew&&!Y[2].system?I?(I.p(Y,se),se[0]&4&&A(I,1)):(I=Ed(Y),I.c(),A(I,1),I.m(l.parentNode,l)):I&&(pe(),P(I,1,1,()=>{I=null}),me());const He={};se[0]&4096&&(He.class="form-field collection-field-name required m-b-0 "+(Y[12]?"disabled":"")),se[0]&4164|se[1]&540672&&(He.$$scope={dirty:se,ctx:Y}),r.$set(He),se[0]&32&&(g=!B.isEmpty((Re=Y[5])==null?void 0:Re.schema)),g?L?(L.p(Y,se),se[0]&32&&A(L,1)):(L=Ld(Y),L.c(),A(L,1),L.m(d,null)):L&&(pe(),P(L,1,1,()=>{L=null}),me()),(!$||se[0]&8)&&x(d,"active",Y[3]===_i),se[0]&32&&(C=!B.isEmpty((Fe=Y[5])==null?void 0:Fe.listRule)||!B.isEmpty((qe=Y[5])==null?void 0:qe.viewRule)||!B.isEmpty((ge=Y[5])==null?void 0:ge.createRule)||!B.isEmpty((Se=Y[5])==null?void 0:Se.updateRule)||!B.isEmpty((Ue=Y[5])==null?void 0:Ue.deleteRule)||!B.isEmpty((ue=(lt=Y[5])==null?void 0:lt.options)==null?void 0:ue.manageRule)),C?N?se[0]&32&&A(N,1):(N=Nd(),N.c(),A(N,1),N.m(y,null)):N&&(pe(),P(N,1,1,()=>{N=null}),me()),(!$||se[0]&8)&&x(y,"active",Y[3]===bl),Y[2].isAuth?F?F.p(Y,se):(F=Fd(Y),F.c(),F.m(c,null)):F&&(F.d(1),F=null)},i(Y){$||(A(I),A(r.$$.fragment,Y),A(L),A(N),$=!0)},o(Y){P(I),P(r.$$.fragment,Y),P(L),P(N),$=!1},d(Y){Y&&w(e),Y&&w(s),I&&I.d(Y),Y&&w(l),Y&&w(o),q(r),Y&&w(f),Y&&w(c),L&&L.d(),N&&N.d(),F&&F.d(),O=!1,Le(E)}}}function g$(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=D(),s=v("button"),l=v("span"),r=z(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[9],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-expanded"),s.disabled=a=!n[11]||n[9],x(s,"btn-loading",n[9])},m(c,d){S(c,e,d),_(e,t),S(c,i,d),S(c,s,d),_(s,l),_(l,r),u||(f=[K(e,"click",n[21]),K(s,"click",n[22])],u=!0)},p(c,d){d[0]&512&&(e.disabled=c[9]),d[0]&4&&o!==(o=c[2].isNew?"Create":"Save changes")&&re(r,o),d[0]&2560&&a!==(a=!c[11]||c[9])&&(s.disabled=a),d[0]&512&&x(s,"btn-loading",c[9])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Le(f)}}}function _$(n){let e,t,i,s,l={class:"overlay-panel-lg colored-header collection-panel",beforeHide:n[34],$$slots:{footer:[g$],header:[h$],default:[c$]},$$scope:{ctx:n}};e=new Bn({props:l}),n[35](e),e.$on("hide",n[36]),e.$on("show",n[37]);let o={};return i=new f$({props:o}),n[38](i),i.$on("confirm",n[39]),{c(){V(e.$$.fragment),t=D(),V(i.$$.fragment)},m(r,a){H(e,r,a),S(r,t,a),H(i,r,a),s=!0},p(r,a){const u={};a[0]&1040&&(u.beforeHide=r[34]),a[0]&14956|a[1]&524288&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};i.$set(f)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),s=!1},d(r){n[35](null),q(e,r),r&&w(t),n[38](null),q(i,r)}}}const _i="fields",bl="api_rules",Os="options",b$="base",jd="auth";function Dr(n){return JSON.stringify(n)}function v$(n,e,t){let i,s,l,o,r;Je(n,Ci,fe=>t(5,r=fe));const a={};a[b$]="Base",a[jd]="Auth";const u=$t();let f,c,d=null,m=new bn,h=!1,g=!1,b=_i,y=Dr(m);function k(fe){t(3,b=fe)}function T(fe){return M(fe),t(10,g=!0),k(_i),f==null?void 0:f.show()}function C(){return f==null?void 0:f.hide()}async function M(fe){Vn({}),typeof fe<"u"?(d=fe,t(2,m=fe==null?void 0:fe.clone())):(d=null,t(2,m=new bn)),t(2,m.schema=m.schema||[],m),t(2,m.originalName=m.name||"",m),await tn(),t(20,y=Dr(m))}function $(){if(m.isNew)return O();c==null||c.show(m)}function O(){if(h)return;t(9,h=!0);const fe=E();let ae;m.isNew?ae=he.collections.create(fe):ae=he.collections.update(m.id,fe),ae.then(oe=>{Ca(),sb(oe.id),t(10,g=!1),C(),Vt(m.isNew?"Successfully created collection.":"Successfully updated collection."),u("save",{isNew:m.isNew,collection:oe})}).catch(oe=>{he.errorResponseHandler(oe)}).finally(()=>{t(9,h=!1)})}function E(){const fe=m.export();fe.schema=fe.schema.slice(0);for(let ae=fe.schema.length-1;ae>=0;ae--)fe.schema[ae].toDelete&&fe.schema.splice(ae,1);return fe}function I(){d!=null&&d.id&&fn(`Do you really want to delete collection "${d==null?void 0:d.name}" and all its records?`,()=>he.collections.delete(d==null?void 0:d.id).then(()=>{C(),Vt(`Successfully deleted collection "${d==null?void 0:d.name}".`),u("delete",d),a3(d)}).catch(fe=>{he.errorResponseHandler(fe)}))}function L(fe){t(2,m.type=fe,m),Ts("schema")}function N(){l?fn("You have unsaved changes. Do you really want to discard them?",()=>{F()}):F()}async function F(){const fe=d==null?void 0:d.clone();if(fe&&(fe.id="",fe.created="",fe.updated="",fe.name+="_duplicate",!B.isEmpty(fe.schema)))for(const ae of fe.schema)ae.id="";T(fe),await tn(),t(20,y="")}const U=()=>C(),J=()=>$(),ne=()=>N(),Z=()=>I(),te=fe=>{t(2,m.name=B.slugify(fe.target.value),m),fe.target.value=m.name},ee=fe=>L(fe),R=()=>{o&&$()},X=()=>k(_i),Y=()=>k(bl),se=()=>k(Os);function He(fe){m=fe,t(2,m)}function Re(fe){m=fe,t(2,m)}function Fe(fe){m=fe,t(2,m)}const qe=()=>l&&g?(fn("You have unsaved changes. Do you really want to close the panel?",()=>{t(10,g=!1),C()}),!1):!0;function ge(fe){ie[fe?"unshift":"push"](()=>{f=fe,t(7,f)})}function Se(fe){We.call(this,n,fe)}function Ue(fe){We.call(this,n,fe)}function lt(fe){ie[fe?"unshift":"push"](()=>{c=fe,t(8,c)})}const ue=()=>O();return n.$$.update=()=>{n.$$.dirty[0]&32&&t(13,i=typeof B.getNestedVal(r,"schema.message",null)=="string"?B.getNestedVal(r,"schema.message"):"Has errors"),n.$$.dirty[0]&4&&t(12,s=!m.isNew&&m.system),n.$$.dirty[0]&1048580&&t(4,l=y!=Dr(m)),n.$$.dirty[0]&20&&t(11,o=m.isNew||l),n.$$.dirty[0]&12&&b===Os&&m.type!==jd&&k(_i)},[k,C,m,b,l,r,a,f,c,h,g,o,s,i,$,O,I,L,N,T,y,U,J,ne,Z,te,ee,R,X,Y,se,He,Re,Fe,qe,ge,Se,Ue,lt,ue]}class tu extends ke{constructor(e){super(),ye(this,e,v$,_$,be,{changeTab:0,show:19,hide:1},null,[-1,-1])}get changeTab(){return this.$$.ctx[0]}get show(){return this.$$.ctx[19]}get hide(){return this.$$.ctx[1]}}function Hd(n,e,t){const i=n.slice();return i[15]=e[t],i}function qd(n){let e,t=n[1].length&&Vd();return{c(){t&&t.c(),e=Ae()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1].length?t||(t=Vd(),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function Vd(n){let e;return{c(){e=v("p"),e.textContent="No collections found.",p(e,"class","txt-hint m-t-10 m-b-10 txt-center")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function zd(n,e){let t,i,s,l,o,r=e[15].name+"",a,u,f,c,d;return{key:n,first:null,c(){var m;t=v("a"),i=v("i"),l=D(),o=v("span"),a=z(r),u=D(),p(i,"class",s=B.getCollectionTypeIcon(e[15].type)),p(o,"class","txt"),p(t,"href",f="/collections?collectionId="+e[15].id),p(t,"class","sidebar-list-item"),x(t,"active",((m=e[5])==null?void 0:m.id)===e[15].id),this.first=t},m(m,h){S(m,t,h),_(t,i),_(t,l),_(t,o),_(o,a),_(t,u),c||(d=Pe(Xt.call(null,t)),c=!0)},p(m,h){var g;e=m,h&8&&s!==(s=B.getCollectionTypeIcon(e[15].type))&&p(i,"class",s),h&8&&r!==(r=e[15].name+"")&&re(a,r),h&8&&f!==(f="/collections?collectionId="+e[15].id)&&p(t,"href",f),h&40&&x(t,"active",((g=e[5])==null?void 0:g.id)===e[15].id)},d(m){m&&w(t),c=!1,d()}}}function Bd(n){let e,t,i,s;return{c(){e=v("footer"),t=v("button"),t.innerHTML=` - New collection`,p(t,"type","button"),p(t,"class","btn btn-block btn-outline"),p(e,"class","sidebar-footer")},m(l,o){S(l,e,o),_(e,t),i||(s=K(t,"click",n[12]),i=!0)},p:G,d(l){l&&w(e),i=!1,s()}}}function y$(n){let e,t,i,s,l,o,r,a,u,f,c,d=[],m=new Map,h,g,b,y,k,T,C=n[3];const M=I=>I[15].id;for(let I=0;I',o=D(),r=v("input"),a=D(),u=v("hr"),f=D(),c=v("div");for(let I=0;I20),p(e,"class","page-sidebar collection-sidebar")},m(I,L){S(I,e,L),_(e,t),_(t,i),_(i,s),_(s,l),_(i,o),_(i,r),de(r,n[0]),_(e,a),_(e,u),_(e,f),_(e,c);for(let N=0;N20),I[7]?O&&(O.d(1),O=null):O?O.p(I,L):(O=Bd(I),O.c(),O.m(e,null));const N={};b.$set(N)},i(I){y||(A(b.$$.fragment,I),y=!0)},o(I){P(b.$$.fragment,I),y=!1},d(I){I&&w(e);for(let L=0;L{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function w$(n,e,t){let i,s,l,o,r,a,u;Je(n,Si,k=>t(5,o=k)),Je(n,es,k=>t(9,r=k)),Je(n,Po,k=>t(6,a=k)),Je(n,Cs,k=>t(7,u=k));let f,c="";function d(k){Yt(Si,o=k,o)}const m=()=>t(0,c="");function h(){c=this.value,t(0,c)}const g=()=>f==null?void 0:f.show();function b(k){ie[k?"unshift":"push"](()=>{f=k,t(2,f)})}const y=k=>{var T;(T=k.detail)!=null&&T.isNew&&k.detail.collection&&d(k.detail.collection)};return n.$$.update=()=>{n.$$.dirty&1&&t(1,i=c.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=c!==""),n.$$.dirty&515&&t(3,l=r.filter(k=>k.id==c||k.name.replace(/\s+/g,"").toLowerCase().includes(i))),n.$$.dirty&512&&r&&k$()},[c,i,f,l,s,o,a,u,d,r,m,h,g,b,y]}class S$ extends ke{constructor(e){super(),ye(this,e,w$,y$,be,{})}}function Ud(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function Wd(n){n[18]=n[19].default}function Yd(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function Kd(n){let e;return{c(){e=v("hr"),p(e,"class","m-t-sm m-b-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Jd(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,c=i&&Kd();function d(){return e[9](e[14])}return{key:n,first:null,c(){t=Ae(),c&&c.c(),s=D(),l=v("button"),r=z(o),a=D(),p(l,"type","button"),p(l,"class","sidebar-item"),x(l,"active",e[5]===e[14]),this.first=t},m(m,h){S(m,t,h),c&&c.m(m,h),S(m,s,h),S(m,l,h),_(l,r),_(l,a),u||(f=K(l,"click",d),u=!0)},p(m,h){e=m,h&8&&(i=e[21]===Object.keys(e[6]).length),i?c||(c=Kd(),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null),h&8&&o!==(o=e[15].label+"")&&re(r,o),h&40&&x(l,"active",e[5]===e[14])},d(m){m&&w(t),c&&c.d(m),m&&w(s),m&&w(l),u=!1,f()}}}function Zd(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:$$,then:C$,catch:T$,value:19,blocks:[,,,]};return su(t=n[15].component,s),{c(){e=Ae(),s.block.c()},m(l,o){S(l,e,o),s.block.m(l,s.anchor=o),s.mount=()=>e.parentNode,s.anchor=e,i=!0},p(l,o){n=l,s.ctx=n,o&8&&t!==(t=n[15].component)&&su(t,s)||Lb(s,n,o)},i(l){i||(A(s.block),i=!0)},o(l){for(let o=0;o<3;o+=1){const r=s.blocks[o];P(r)}i=!1},d(l){l&&w(e),s.block.d(l),s.token=null,s=null}}}function T$(n){return{c:G,m:G,p:G,i:G,o:G,d:G}}function C$(n){Wd(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){V(e.$$.fragment),t=D()},m(s,l){H(e,s,l),S(s,t,l),i=!0},p(s,l){Wd(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(A(e.$$.fragment,s),i=!0)},o(s){P(e.$$.fragment,s),i=!1},d(s){q(e,s),s&&w(t)}}}function $$(n){return{c:G,m:G,p:G,i:G,o:G,d:G}}function Gd(n,e){let t,i,s,l=e[5]===e[14]&&Zd(e);return{key:n,first:null,c(){t=Ae(),l&&l.c(),i=Ae(),this.first=t},m(o,r){S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){e=o,e[5]===e[14]?l?(l.p(e,r),r&40&&A(l,1)):(l=Zd(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),me())},i(o){s||(A(l),s=!0)},o(o){P(l),s=!1},d(o){o&&w(t),l&&l.d(o),o&&w(i)}}}function M$(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,c=Object.entries(n[3]);const d=g=>g[14];for(let g=0;gg[14];for(let g=0;gClose',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[8]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function O$(n){let e,t,i={class:"docs-panel",$$slots:{footer:[D$],default:[M$]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){V(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),q(e,s)}}}function E$(n,e,t){const i={list:{label:"List/Search",component:ft(()=>import("./ListApiDocs-dc55646d.js"),["./ListApiDocs-dc55646d.js","./SdkTabs-ed893501.js","./SdkTabs-9b0b7a06.css","./ListApiDocs-68f52edd.css"],import.meta.url)},view:{label:"View",component:ft(()=>import("./ViewApiDocs-08b517e0.js"),["./ViewApiDocs-08b517e0.js","./SdkTabs-ed893501.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},create:{label:"Create",component:ft(()=>import("./CreateApiDocs-9eb0174f.js"),["./CreateApiDocs-9eb0174f.js","./SdkTabs-ed893501.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},update:{label:"Update",component:ft(()=>import("./UpdateApiDocs-6cd86ae2.js"),["./UpdateApiDocs-6cd86ae2.js","./SdkTabs-ed893501.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},delete:{label:"Delete",component:ft(()=>import("./DeleteApiDocs-8ae8b556.js"),["./DeleteApiDocs-8ae8b556.js","./SdkTabs-ed893501.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:ft(()=>import("./RealtimeApiDocs-1688c2b0.js"),["./RealtimeApiDocs-1688c2b0.js","./SdkTabs-ed893501.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:ft(()=>import("./AuthWithPasswordDocs-82c26bd0.js"),["./AuthWithPasswordDocs-82c26bd0.js","./SdkTabs-ed893501.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:ft(()=>import("./AuthWithOAuth2Docs-ebf26578.js"),["./AuthWithOAuth2Docs-ebf26578.js","./SdkTabs-ed893501.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},refresh:{label:"Auth refresh",component:ft(()=>import("./AuthRefreshDocs-8c1d08af.js"),["./AuthRefreshDocs-8c1d08af.js","./SdkTabs-ed893501.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-verification":{label:"Request verification",component:ft(()=>import("./RequestVerificationDocs-019a72cd.js"),["./RequestVerificationDocs-019a72cd.js","./SdkTabs-ed893501.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:ft(()=>import("./ConfirmVerificationDocs-6fb82bb9.js"),["./ConfirmVerificationDocs-6fb82bb9.js","./SdkTabs-ed893501.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:ft(()=>import("./RequestPasswordResetDocs-4dade465.js"),["./RequestPasswordResetDocs-4dade465.js","./SdkTabs-ed893501.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:ft(()=>import("./ConfirmPasswordResetDocs-1f1084eb.js"),["./ConfirmPasswordResetDocs-1f1084eb.js","./SdkTabs-ed893501.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:ft(()=>import("./RequestEmailChangeDocs-39e41406.js"),["./RequestEmailChangeDocs-39e41406.js","./SdkTabs-ed893501.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:ft(()=>import("./ConfirmEmailChangeDocs-f219d7f9.js"),["./ConfirmEmailChangeDocs-f219d7f9.js","./SdkTabs-ed893501.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:ft(()=>import("./AuthMethodsDocs-3db66f7f.js"),["./AuthMethodsDocs-3db66f7f.js","./SdkTabs-ed893501.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:ft(()=>import("./ListExternalAuthsDocs-954472a7.js"),["./ListExternalAuthsDocs-954472a7.js","./SdkTabs-ed893501.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:ft(()=>import("./UnlinkExternalAuthDocs-c7d59832.js"),["./UnlinkExternalAuthDocs-c7d59832.js","./SdkTabs-ed893501.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}};let l,o=new bn,r,a=[];a.length&&(r=Object.keys(a)[0]);function u(y){return t(2,o=y),c(Object.keys(a)[0]),l==null?void 0:l.show()}function f(){return l==null?void 0:l.hide()}function c(y){t(5,r=y)}const d=()=>f(),m=y=>c(y);function h(y){ie[y?"unshift":"push"](()=>{l=y,t(4,l)})}function g(y){We.call(this,n,y)}function b(y){We.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&12&&(o.isAuth?(t(3,a=Object.assign({},i,s)),!(o!=null&&o.options.allowUsernameAuth)&&!(o!=null&&o.options.allowEmailAuth)&&delete a["auth-with-password"],o!=null&&o.options.allowOAuth2Auth||delete a["auth-with-oauth2"]):t(3,a=Object.assign({},i)))},[f,c,o,a,l,r,i,u,d,m,h,g,b]}class A$ extends ke{constructor(e){super(),ye(this,e,E$,O$,be,{show:7,hide:0,changeTab:1})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}get changeTab(){return this.$$.ctx[1]}}function I$(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Username",o=D(),r=v("input"),p(t,"class",B.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","text"),p(r,"requried",a=!n[0].isNew),p(r,"placeholder",u=n[0].isNew?"Leave empty to auto generate...":n[3]),p(r,"id",f=n[12])},m(m,h){S(m,e,h),_(e,t),_(e,i),_(e,s),S(m,o,h),S(m,r,h),de(r,n[0].username),c||(d=K(r,"input",n[4]),c=!0)},p(m,h){h&4096&&l!==(l=m[12])&&p(e,"for",l),h&1&&a!==(a=!m[0].isNew)&&p(r,"requried",a),h&1&&u!==(u=m[0].isNew?"Leave empty to auto generate...":m[3])&&p(r,"placeholder",u),h&4096&&f!==(f=m[12])&&p(r,"id",f),h&1&&r.value!==m[0].username&&de(r,m[0].username)},d(m){m&&w(e),m&&w(o),m&&w(r),c=!1,d()}}}function P$(n){let e,t,i,s,l,o,r,a,u,f,c=n[0].emailVisibility?"On":"Off",d,m,h,g,b,y,k,T,C;return{c(){var M;e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Email",o=D(),r=v("div"),a=v("button"),u=v("span"),f=z("Public: "),d=z(c),h=D(),g=v("input"),p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[12]),p(u,"class","txt"),p(a,"type","button"),p(a,"class",m="btn btn-sm btn-transparent "+(n[0].emailVisibility?"btn-success":"btn-hint")),p(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),p(g,"type","email"),g.autofocus=b=n[0].isNew,p(g,"autocomplete","off"),p(g,"id",y=n[12]),g.required=k=(M=n[1].options)==null?void 0:M.requireEmail,p(g,"class","svelte-1751a4d")},m(M,$){S(M,e,$),_(e,t),_(e,i),_(e,s),S(M,o,$),S(M,r,$),_(r,a),_(a,u),_(u,f),_(u,d),S(M,h,$),S(M,g,$),de(g,n[0].email),n[0].isNew&&g.focus(),T||(C=[Pe(Ye.call(null,a,{text:"Make email public or private",position:"top-right"})),K(a,"click",n[5]),K(g,"input",n[6])],T=!0)},p(M,$){var O;$&4096&&l!==(l=M[12])&&p(e,"for",l),$&1&&c!==(c=M[0].emailVisibility?"On":"Off")&&re(d,c),$&1&&m!==(m="btn btn-sm btn-transparent "+(M[0].emailVisibility?"btn-success":"btn-hint"))&&p(a,"class",m),$&1&&b!==(b=M[0].isNew)&&(g.autofocus=b),$&4096&&y!==(y=M[12])&&p(g,"id",y),$&2&&k!==(k=(O=M[1].options)==null?void 0:O.requireEmail)&&(g.required=k),$&1&&g.value!==M[0].email&&de(g,M[0].email)},d(M){M&&w(e),M&&w(o),M&&w(r),M&&w(h),M&&w(g),T=!1,Le(C)}}}function Xd(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[L$,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&12292&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function L$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=z("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[2],S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[7]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&4&&(e.checked=u[2]),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function xd(n){let e,t,i,s,l,o,r,a,u;return s=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[N$,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),r=new _e({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[F$,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),V(s.$$.fragment),l=D(),o=v("div"),V(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),x(t,"p-t-xs",n[2]),p(e,"class","block")},m(f,c){S(f,e,c),_(e,t),_(t,i),H(s,i,null),_(t,l),_(t,o),H(r,o,null),u=!0},p(f,c){const d={};c&12289&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const m={};c&12289&&(m.$$scope={dirty:c,ctx:f}),r.$set(m),(!u||c&4)&&x(t,"p-t-xs",f[2])},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&nt(()=>{a||(a=ze(e,It,{duration:150},!0)),a.run(1)}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=ze(e,It,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),q(s),q(r),f&&a&&a.end()}}}function N$(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Password",o=D(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[12]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),de(r,n[0].password),u||(f=K(r,"input",n[8]),u=!0)},p(c,d){d&4096&&l!==(l=c[12])&&p(e,"for",l),d&4096&&a!==(a=c[12])&&p(r,"id",a),d&1&&r.value!==c[0].password&&de(r,c[0].password)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function F$(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Password confirm",o=D(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[12]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),de(r,n[0].passwordConfirm),u||(f=K(r,"input",n[9]),u=!0)},p(c,d){d&4096&&l!==(l=c[12])&&p(e,"for",l),d&4096&&a!==(a=c[12])&&p(r,"id",a),d&1&&r.value!==c[0].passwordConfirm&&de(r,c[0].passwordConfirm)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function R$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=z("Verified"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].verified,S(u,i,f),S(u,s,f),_(s,l),r||(a=[K(e,"change",n[10]),K(e,"change",pt(n[11]))],r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].verified),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Le(a)}}}function j$(n){var b;let e,t,i,s,l,o,r,a,u,f,c,d,m;i=new _e({props:{class:"form-field "+(n[0].isNew?"":"required"),name:"username",$$slots:{default:[I$,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field "+((b=n[1].options)!=null&&b.requireEmail?"required":""),name:"email",$$slots:{default:[P$,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}});let h=!n[0].isNew&&Xd(n),g=(n[0].isNew||n[2])&&xd(n);return d=new _e({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[R$,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=D(),l=v("div"),V(o.$$.fragment),r=D(),a=v("div"),h&&h.c(),u=D(),g&&g.c(),f=D(),c=v("div"),V(d.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(a,"class","col-lg-12"),p(c,"class","col-lg-12"),p(e,"class","grid m-b-base")},m(y,k){S(y,e,k),_(e,t),H(i,t,null),_(e,s),_(e,l),H(o,l,null),_(e,r),_(e,a),h&&h.m(a,null),_(a,u),g&&g.m(a,null),_(e,f),_(e,c),H(d,c,null),m=!0},p(y,[k]){var $;const T={};k&1&&(T.class="form-field "+(y[0].isNew?"":"required")),k&12289&&(T.$$scope={dirty:k,ctx:y}),i.$set(T);const C={};k&2&&(C.class="form-field "+(($=y[1].options)!=null&&$.requireEmail?"required":"")),k&12291&&(C.$$scope={dirty:k,ctx:y}),o.$set(C),y[0].isNew?h&&(pe(),P(h,1,1,()=>{h=null}),me()):h?(h.p(y,k),k&1&&A(h,1)):(h=Xd(y),h.c(),A(h,1),h.m(a,u)),y[0].isNew||y[2]?g?(g.p(y,k),k&5&&A(g,1)):(g=xd(y),g.c(),A(g,1),g.m(a,null)):g&&(pe(),P(g,1,1,()=>{g=null}),me());const M={};k&12289&&(M.$$scope={dirty:k,ctx:y}),d.$set(M)},i(y){m||(A(i.$$.fragment,y),A(o.$$.fragment,y),A(h),A(g),A(d.$$.fragment,y),m=!0)},o(y){P(i.$$.fragment,y),P(o.$$.fragment,y),P(h),P(g),P(d.$$.fragment,y),m=!1},d(y){y&&w(e),q(i),q(o),h&&h.d(),g&&g.d(),q(d)}}}function H$(n,e,t){let{collection:i=new bn}=e,{record:s=new Ki}=e,l=s.username||null,o=!1;function r(){s.username=this.value,t(0,s),t(2,o)}const a=()=>t(0,s.emailVisibility=!s.emailVisibility,s);function u(){s.email=this.value,t(0,s),t(2,o)}function f(){o=this.checked,t(2,o)}function c(){s.password=this.value,t(0,s),t(2,o)}function d(){s.passwordConfirm=this.value,t(0,s),t(2,o)}function m(){s.verified=this.checked,t(0,s),t(2,o)}const h=g=>{s.isNew||fn("Do you really want to manually change the verified account state?",()=>{},()=>{t(0,s.verified=!g.target.checked,s)})};return n.$$set=g=>{"collection"in g&&t(1,i=g.collection),"record"in g&&t(0,s=g.record)},n.$$.update=()=>{n.$$.dirty&1&&!s.username&&s.username!==null&&t(0,s.username=null,s),n.$$.dirty&4&&(o||(t(0,s.password=null,s),t(0,s.passwordConfirm=null,s),Ts("password"),Ts("passwordConfirm")))},[s,i,o,l,r,a,u,f,c,d,m,h]}class q$ extends ke{constructor(e){super(),ye(this,e,H$,j$,be,{collection:1,record:0})}}function V$(n){let e,t,i,s=[n[3]],l={};for(let o=0;o{r&&(t(1,r.style.height="",r),t(1,r.style.height=Math.min(r.scrollHeight+2,o)+"px",r))},0)}function f(m){if((m==null?void 0:m.code)==="Enter"&&!(m!=null&&m.shiftKey)&&!(m!=null&&m.isComposing)){m.preventDefault();const h=r.closest("form");h!=null&&h.requestSubmit&&h.requestSubmit()}}sn(()=>(u(),()=>clearTimeout(a)));function c(m){ie[m?"unshift":"push"](()=>{r=m,t(1,r)})}function d(){l=this.value,t(0,l)}return n.$$set=m=>{e=Xe(Xe({},e),Gn(m)),t(3,s=At(e,i)),"value"in m&&t(0,l=m.value),"maxHeight"in m&&t(4,o=m.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof l!==void 0&&u()},[l,r,f,s,o,c,d]}class B$ extends ke{constructor(e){super(),ye(this,e,z$,V$,be,{value:0,maxHeight:4})}}function U$(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d;function m(g){n[2](g)}let h={id:n[3],required:n[1].required};return n[0]!==void 0&&(h.value=n[0]),f=new B$({props:h}),ie.push(()=>ve(f,"value",m)),{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=z(o),u=D(),V(f.$$.fragment),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(g,b){S(g,e,b),_(e,t),_(e,s),_(e,l),_(l,r),S(g,u,b),H(f,g,b),d=!0},p(g,b){(!d||b&2&&i!==(i=B.getFieldTypeIcon(g[1].type)))&&p(t,"class",i),(!d||b&2)&&o!==(o=g[1].name+"")&&re(r,o),(!d||b&8&&a!==(a=g[3]))&&p(e,"for",a);const y={};b&8&&(y.id=g[3]),b&2&&(y.required=g[1].required),!c&&b&1&&(c=!0,y.value=g[0],we(()=>c=!1)),f.$set(y)},i(g){d||(A(f.$$.fragment,g),d=!0)},o(g){P(f.$$.fragment,g),d=!1},d(g){g&&w(e),g&&w(u),q(f,g)}}}function W$(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[U$,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function Y$(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class K$ extends ke{constructor(e){super(),ye(this,e,Y$,W$,be,{field:1,value:0})}}function J$(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h,g,b;return{c(){var y,k;e=v("label"),t=v("i"),s=D(),l=v("span"),r=z(o),u=D(),f=v("input"),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","number"),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"min",m=(y=n[1].options)==null?void 0:y.min),p(f,"max",h=(k=n[1].options)==null?void 0:k.max),p(f,"step","any")},m(y,k){S(y,e,k),_(e,t),_(e,s),_(e,l),_(l,r),S(y,u,k),S(y,f,k),de(f,n[0]),g||(b=K(f,"input",n[2]),g=!0)},p(y,k){var T,C;k&2&&i!==(i=B.getFieldTypeIcon(y[1].type))&&p(t,"class",i),k&2&&o!==(o=y[1].name+"")&&re(r,o),k&8&&a!==(a=y[3])&&p(e,"for",a),k&8&&c!==(c=y[3])&&p(f,"id",c),k&2&&d!==(d=y[1].required)&&(f.required=d),k&2&&m!==(m=(T=y[1].options)==null?void 0:T.min)&&p(f,"min",m),k&2&&h!==(h=(C=y[1].options)==null?void 0:C.max)&&p(f,"max",h),k&1&&ht(f.value)!==y[0]&&de(f,y[0])},d(y){y&&w(e),y&&w(u),y&&w(f),g=!1,b()}}}function Z$(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[J$,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function G$(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=ht(this.value),t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class X$ extends ke{constructor(e){super(),ye(this,e,G$,Z$,be,{field:1,value:0})}}function x$(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=v("input"),i=D(),s=v("label"),o=z(l),p(e,"type","checkbox"),p(e,"id",t=n[3]),p(s,"for",r=n[3])},m(f,c){S(f,e,c),e.checked=n[0],S(f,i,c),S(f,s,c),_(s,o),a||(u=K(e,"change",n[2]),a=!0)},p(f,c){c&8&&t!==(t=f[3])&&p(e,"id",t),c&1&&(e.checked=f[0]),c&2&&l!==(l=f[1].name+"")&&re(o,l),c&8&&r!==(r=f[3])&&p(s,"for",r)},d(f){f&&w(e),f&&w(i),f&&w(s),a=!1,u()}}}function Q$(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[x$,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function e4(n,e,t){let{field:i=new dn}=e,{value:s=!1}=e;function l(){s=this.checked,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class t4 extends ke{constructor(e){super(),ye(this,e,e4,Q$,be,{field:1,value:0})}}function n4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h;return{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=z(o),u=D(),f=v("input"),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","email"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(g,b){S(g,e,b),_(e,t),_(e,s),_(e,l),_(l,r),S(g,u,b),S(g,f,b),de(f,n[0]),m||(h=K(f,"input",n[2]),m=!0)},p(g,b){b&2&&i!==(i=B.getFieldTypeIcon(g[1].type))&&p(t,"class",i),b&2&&o!==(o=g[1].name+"")&&re(r,o),b&8&&a!==(a=g[3])&&p(e,"for",a),b&8&&c!==(c=g[3])&&p(f,"id",c),b&2&&d!==(d=g[1].required)&&(f.required=d),b&1&&f.value!==g[0]&&de(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,h()}}}function i4(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[n4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function s4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class l4 extends ke{constructor(e){super(),ye(this,e,s4,i4,be,{field:1,value:0})}}function o4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h;return{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=z(o),u=D(),f=v("input"),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","url"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(g,b){S(g,e,b),_(e,t),_(e,s),_(e,l),_(l,r),S(g,u,b),S(g,f,b),de(f,n[0]),m||(h=K(f,"input",n[2]),m=!0)},p(g,b){b&2&&i!==(i=B.getFieldTypeIcon(g[1].type))&&p(t,"class",i),b&2&&o!==(o=g[1].name+"")&&re(r,o),b&8&&a!==(a=g[3])&&p(e,"for",a),b&8&&c!==(c=g[3])&&p(f,"id",c),b&2&&d!==(d=g[1].required)&&(f.required=d),b&1&&de(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,h()}}}function r4(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[o4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function a4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class u4 extends ke{constructor(e){super(),ye(this,e,a4,r4,be,{field:1,value:0})}}function Qd(n){let e,t,i,s;return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","link-hint clear-btn svelte-11df51y"),p(e,"class","form-field-addon")},m(l,o){S(l,e,o),_(e,t),i||(s=[Pe(Ye.call(null,t,"Clear")),K(t,"click",n[5])],i=!0)},p:G,d(l){l&&w(e),i=!1,Le(s)}}}function f4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h,g,b=n[0]&&!n[1].required&&Qd(n);function y(C){n[6](C)}function k(C){n[7](C)}let T={id:n[8],options:B.defaultFlatpickrOptions()};return n[2]!==void 0&&(T.value=n[2]),n[0]!==void 0&&(T.formattedValue=n[0]),d=new eu({props:T}),ie.push(()=>ve(d,"value",y)),ie.push(()=>ve(d,"formattedValue",k)),d.$on("close",n[3]),{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=z(o),a=z(" (UTC)"),f=D(),b&&b.c(),c=D(),V(d.$$.fragment),p(t,"class",i=yi(B.getFieldTypeIcon(n[1].type))+" svelte-11df51y"),p(l,"class","txt"),p(e,"for",u=n[8])},m(C,M){S(C,e,M),_(e,t),_(e,s),_(e,l),_(l,r),_(l,a),S(C,f,M),b&&b.m(C,M),S(C,c,M),H(d,C,M),g=!0},p(C,M){(!g||M&2&&i!==(i=yi(B.getFieldTypeIcon(C[1].type))+" svelte-11df51y"))&&p(t,"class",i),(!g||M&2)&&o!==(o=C[1].name+"")&&re(r,o),(!g||M&256&&u!==(u=C[8]))&&p(e,"for",u),C[0]&&!C[1].required?b?b.p(C,M):(b=Qd(C),b.c(),b.m(c.parentNode,c)):b&&(b.d(1),b=null);const $={};M&256&&($.id=C[8]),!m&&M&4&&(m=!0,$.value=C[2],we(()=>m=!1)),!h&&M&1&&(h=!0,$.formattedValue=C[0],we(()=>h=!1)),d.$set($)},i(C){g||(A(d.$$.fragment,C),g=!0)},o(C){P(d.$$.fragment,C),g=!1},d(C){C&&w(e),C&&w(f),b&&b.d(C),C&&w(c),q(d,C)}}}function c4(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[f4,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&775&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function d4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e,l=s;function o(c){c.detail&&c.detail.length==3&&t(0,s=c.detail[1])}function r(){t(0,s="")}const a=()=>r();function u(c){l=c,t(2,l),t(0,s)}function f(c){s=c,t(0,s)}return n.$$set=c=>{"field"in c&&t(1,i=c.field),"value"in c&&t(0,s=c.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19)),n.$$.dirty&5&&l!=s&&t(2,l=s)},[s,i,l,o,r,a,u,f]}class p4 extends ke{constructor(e){super(),ye(this,e,d4,c4,be,{field:1,value:0})}}function ep(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=v("div"),t=z("Select up to "),s=z(i),l=z(" items."),p(e,"class","help-block")},m(o,r){S(o,e,r),_(e,t),_(e,s),_(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&re(s,i)},d(o){o&&w(e)}}}function m4(n){var k,T,C,M,$;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h;function g(O){n[3](O)}let b={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],closable:!n[2]||((k=n[0])==null?void 0:k.length)>=((T=n[1].options)==null?void 0:T.maxSelect),items:(C=n[1].options)==null?void 0:C.values,searchable:((M=n[1].options)==null?void 0:M.values)>5};n[0]!==void 0&&(b.selected=n[0]),f=new Qa({props:b}),ie.push(()=>ve(f,"selected",g));let y=(($=n[1].options)==null?void 0:$.maxSelect)>1&&ep(n);return{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=z(o),u=D(),V(f.$$.fragment),d=D(),y&&y.c(),m=Ae(),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(O,E){S(O,e,E),_(e,t),_(e,s),_(e,l),_(l,r),S(O,u,E),H(f,O,E),S(O,d,E),y&&y.m(O,E),S(O,m,E),h=!0},p(O,E){var L,N,F,U,J;(!h||E&2&&i!==(i=B.getFieldTypeIcon(O[1].type)))&&p(t,"class",i),(!h||E&2)&&o!==(o=O[1].name+"")&&re(r,o),(!h||E&16&&a!==(a=O[4]))&&p(e,"for",a);const I={};E&16&&(I.id=O[4]),E&6&&(I.toggle=!O[1].required||O[2]),E&4&&(I.multiple=O[2]),E&7&&(I.closable=!O[2]||((L=O[0])==null?void 0:L.length)>=((N=O[1].options)==null?void 0:N.maxSelect)),E&2&&(I.items=(F=O[1].options)==null?void 0:F.values),E&2&&(I.searchable=((U=O[1].options)==null?void 0:U.values)>5),!c&&E&1&&(c=!0,I.selected=O[0],we(()=>c=!1)),f.$set(I),((J=O[1].options)==null?void 0:J.maxSelect)>1?y?y.p(O,E):(y=ep(O),y.c(),y.m(m.parentNode,m)):y&&(y.d(1),y=null)},i(O){h||(A(f.$$.fragment,O),h=!0)},o(O){P(f.$$.fragment,O),h=!1},d(O){O&&w(e),O&&w(u),q(f,O),O&&w(d),y&&y.d(O),O&&w(m)}}}function h4(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[m4,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function g4(n,e,t){let i,{field:s=new dn}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l),t(2,i),t(1,s)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r;n.$$.dirty&2&&t(2,i=((r=s.options)==null?void 0:r.maxSelect)>1),n.$$.dirty&5&&typeof l>"u"&&t(0,l=i?[]:""),n.$$.dirty&7&&i&&Array.isArray(l)&&l.length>s.options.maxSelect&&t(0,l=l.slice(l.length-s.options.maxSelect))},[l,s,i,o]}class _4 extends ke{constructor(e){super(),ye(this,e,g4,h4,be,{field:1,value:0})}}function b4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h;return{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=z(o),u=D(),f=v("textarea"),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4]),p(f,"id",c=n[4]),p(f,"class","txt-mono"),f.required=d=n[1].required,f.value=n[2]},m(g,b){S(g,e,b),_(e,t),_(e,s),_(e,l),_(l,r),S(g,u,b),S(g,f,b),m||(h=K(f,"input",n[3]),m=!0)},p(g,b){b&2&&i!==(i=B.getFieldTypeIcon(g[1].type))&&p(t,"class",i),b&2&&o!==(o=g[1].name+"")&&re(r,o),b&16&&a!==(a=g[4])&&p(e,"for",a),b&16&&c!==(c=g[4])&&p(f,"id",c),b&2&&d!==(d=g[1].required)&&(f.required=d),b&4&&(f.value=g[2])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,h()}}}function v4(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[b4,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function y4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e,l=JSON.stringify(typeof s>"u"?null:s,null,2);const o=r=>{t(2,l=r.target.value),t(0,s=r.target.value.trim())};return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},n.$$.update=()=>{n.$$.dirty&5&&s!==(l==null?void 0:l.trim())&&(t(2,l=JSON.stringify(typeof s>"u"?null:s,null,2)),t(0,s=l))},[s,i,l,o]}class k4 extends ke{constructor(e){super(),ye(this,e,y4,v4,be,{field:1,value:0})}}function w4(n){let e,t;return{c(){e=v("i"),p(e,"class","ri-file-line"),p(e,"alt",t=n[0].name)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&p(e,"alt",t)},d(i){i&&w(e)}}}function S4(n){let e,t,i;return{c(){e=v("img"),Hn(e.src,t=n[2])||p(e,"src",t),p(e,"width",n[1]),p(e,"height",n[1]),p(e,"alt",i=n[0].name)},m(s,l){S(s,e,l)},p(s,l){l&4&&!Hn(e.src,t=s[2])&&p(e,"src",t),l&2&&p(e,"width",s[1]),l&2&&p(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&p(e,"alt",i)},d(s){s&&w(e)}}}function T4(n){let e;function t(l,o){return l[2]?S4:w4}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:G,o:G,d(l){s.d(l),l&&w(e)}}}function C4(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){t(2,i=""),B.hasImageExtension(s==null?void 0:s.name)&&B.generateThumb(s,l,l).then(r=>{t(2,i=r)}).catch(r=>{console.warn("Unable to generate thumb: ",r)})}return n.$$set=r=>{"file"in r&&t(0,s=r.file),"size"in r&&t(1,l=r.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&o()},t(2,i=""),[s,l,i]}class $4 extends ke{constructor(e){super(),ye(this,e,C4,T4,be,{file:0,size:1})}}function tp(n){let e;function t(l,o){return l[4]==="image"?D4:M4}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function M4(n){let e,t;return{c(){e=v("object"),t=z("Cannot preview the file."),p(e,"title",n[2]),p(e,"data",n[1])},m(i,s){S(i,e,s),_(e,t)},p(i,s){s&4&&p(e,"title",i[2]),s&2&&p(e,"data",i[1])},d(i){i&&w(e)}}}function D4(n){let e,t,i;return{c(){e=v("img"),Hn(e.src,t=n[1])||p(e,"src",t),p(e,"alt",i="Preview "+n[2])},m(s,l){S(s,e,l)},p(s,l){l&2&&!Hn(e.src,t=s[1])&&p(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&p(e,"alt",i)},d(s){s&&w(e)}}}function O4(n){var s;let e=(s=n[3])==null?void 0:s.isActive(),t,i=e&&tp(n);return{c(){i&&i.c(),t=Ae()},m(l,o){i&&i.m(l,o),S(l,t,o)},p(l,o){var r;o&8&&(e=(r=l[3])==null?void 0:r.isActive()),e?i?i.p(l,o):(i=tp(l),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(l){i&&i.d(l),l&&w(t)}}}function E4(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=K(e,"click",pt(n[0])),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function A4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("a"),t=z(n[2]),i=D(),s=v("i"),l=D(),o=v("div"),r=D(),a=v("button"),a.textContent="Close",p(s,"class","ri-external-link-line"),p(e,"href",n[1]),p(e,"title",n[2]),p(e,"target","_blank"),p(e,"rel","noreferrer noopener"),p(e,"class","link-hint txt-ellipsis inline-flex"),p(o,"class","flex-fill"),p(a,"type","button"),p(a,"class","btn btn-transparent")},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,l,d),S(c,o,d),S(c,r,d),S(c,a,d),u||(f=K(a,"click",n[0]),u=!0)},p(c,d){d&4&&re(t,c[2]),d&2&&p(e,"href",c[1]),d&4&&p(e,"title",c[2])},d(c){c&&w(e),c&&w(l),c&&w(o),c&&w(r),c&&w(a),u=!1,f()}}}function I4(n){let e,t,i={class:"preview preview-"+n[4],btnClose:!1,popup:!0,$$slots:{footer:[A4],header:[E4],default:[O4]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[6](e),e.$on("show",n[7]),e.$on("hide",n[8]),{c(){V(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="preview preview-"+s[4]),l&542&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[6](null),q(e,s)}}}function P4(n,e,t){let i,s,l,o="";function r(d){d!==""&&(t(1,o=d),l==null||l.show())}function a(){return l==null?void 0:l.hide()}function u(d){ie[d?"unshift":"push"](()=>{l=d,t(3,l)})}function f(d){We.call(this,n,d)}function c(d){We.call(this,n,d)}return n.$$.update=()=>{n.$$.dirty&2&&t(2,i=o.substring(o.lastIndexOf("/")+1)),n.$$.dirty&4&&t(4,s=B.getFileType(i))},[a,o,i,l,s,r,u,f,c]}class L4 extends ke{constructor(e){super(),ye(this,e,P4,I4,be,{show:5,hide:0})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[0]}}function N4(n){let e;return{c(){e=v("i"),p(e,"class","ri-file-3-line")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function F4(n){let e;return{c(){e=v("i"),p(e,"class","ri-video-line")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function R4(n){let e,t,i,s,l;return{c(){e=v("img"),Hn(e.src,t=n[4])||p(e,"src",t),p(e,"alt",n[0]),p(e,"title",i="Preview "+n[0])},m(o,r){S(o,e,r),s||(l=K(e,"error",n[7]),s=!0)},p(o,r){r&16&&!Hn(e.src,t=o[4])&&p(e,"src",t),r&1&&p(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&p(e,"title",i)},d(o){o&&w(e),s=!1,l()}}}function j4(n){let e,t,i,s,l,o,r,a;function u(m,h){return m[2]==="image"?R4:m[2]==="video"||m[2]==="audio"?F4:N4}let f=u(n),c=f(n),d={};return l=new L4({props:d}),n[10](l),{c(){e=v("a"),c.c(),s=D(),V(l.$$.fragment),p(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:"")),p(e,"href",n[6]),p(e,"target","_blank"),p(e,"rel","noreferrer"),p(e,"title",i=(n[5]?"Preview":"Download")+" "+n[0])},m(m,h){S(m,e,h),c.m(e,null),S(m,s,h),H(l,m,h),o=!0,r||(a=K(e,"click",yn(n[9])),r=!0)},p(m,[h]){f===(f=u(m))&&c?c.p(m,h):(c.d(1),c=f(m),c&&(c.c(),c.m(e,null))),(!o||h&2&&t!==(t="thumb "+(m[1]?`thumb-${m[1]}`:"")))&&p(e,"class",t),(!o||h&33&&i!==(i=(m[5]?"Preview":"Download")+" "+m[0]))&&p(e,"title",i);const g={};l.$set(g)},i(m){o||(A(l.$$.fragment,m),o=!0)},o(m){P(l.$$.fragment,m),o=!1},d(m){m&&w(e),c.d(),m&&w(s),n[10](null),q(l,m),r=!1,a()}}}function H4(n,e,t){let i,s,{record:l=null}=e,{filename:o=""}=e,{size:r=""}=e,a,u="",f=he.getFileUrl(l,o);function c(){t(4,u="")}const d=h=>{s&&(h.preventDefault(),a==null||a.show(f))};function m(h){ie[h?"unshift":"push"](()=>{a=h,t(3,a)})}return n.$$set=h=>{"record"in h&&t(8,l=h.record),"filename"in h&&t(0,o=h.filename),"size"in h&&t(1,r=h.size)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=B.getFileType(o)),n.$$.dirty&5&&t(5,s=["image","audio","video"].includes(i)||o.endsWith(".pdf"))},t(4,u=f?f+"?thumb=100x100":""),[o,r,i,a,u,s,f,c,l,d,m]}class ub extends ke{constructor(e){super(),ye(this,e,H4,j4,be,{record:8,filename:0,size:1})}}function np(n,e,t){const i=n.slice();return i[22]=e[t],i[24]=t,i}function ip(n,e,t){const i=n.slice();i[25]=e[t],i[24]=t;const s=i[1].includes(i[24]);return i[26]=s,i}function q4(n){let e,t,i;function s(){return n[14](n[24])}return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove")},m(l,o){S(l,e,o),t||(i=[Pe(Ye.call(null,e,"Remove file")),K(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Le(i)}}}function V4(n){let e,t,i;function s(){return n[13](n[24])}return{c(){e=v("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-transparent")},m(l,o){S(l,e,o),t||(i=K(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,i()}}}function sp(n,e){let t,i,s,l,o,r,a=e[25]+"",u,f,c,d,m,h,g;s=new ub({props:{record:e[2],filename:e[25]}});function b(T,C){return C&18&&(h=null),h==null&&(h=!!T[1].includes(T[24])),h?V4:q4}let y=b(e,-1),k=y(e);return{key:n,first:null,c(){t=v("div"),i=v("div"),V(s.$$.fragment),l=D(),o=v("div"),r=v("a"),u=z(a),d=D(),m=v("div"),k.c(),x(i,"fade",e[1].includes(e[24])),p(r,"href",f=he.getFileUrl(e[2],e[25])),p(r,"class",c="txt-ellipsis "+(e[26]?"txt-strikethrough txt-hint":"link-primary")),p(r,"title","Download"),p(r,"target","_blank"),p(r,"rel","noopener noreferrer"),p(o,"class","content"),p(m,"class","actions"),p(t,"class","list-item"),this.first=t},m(T,C){S(T,t,C),_(t,i),H(s,i,null),_(t,l),_(t,o),_(o,r),_(r,u),_(t,d),_(t,m),k.m(m,null),g=!0},p(T,C){e=T;const M={};C&4&&(M.record=e[2]),C&16&&(M.filename=e[25]),s.$set(M),(!g||C&18)&&x(i,"fade",e[1].includes(e[24])),(!g||C&16)&&a!==(a=e[25]+"")&&re(u,a),(!g||C&20&&f!==(f=he.getFileUrl(e[2],e[25])))&&p(r,"href",f),(!g||C&18&&c!==(c="txt-ellipsis "+(e[26]?"txt-strikethrough txt-hint":"link-primary")))&&p(r,"class",c),y===(y=b(e,C))&&k?k.p(e,C):(k.d(1),k=y(e),k&&(k.c(),k.m(m,null)))},i(T){g||(A(s.$$.fragment,T),g=!0)},o(T){P(s.$$.fragment,T),g=!1},d(T){T&&w(t),q(s),k.d()}}}function lp(n){let e,t,i,s,l,o,r,a,u=n[22].name+"",f,c,d,m,h,g,b;i=new $4({props:{file:n[22]}});function y(){return n[15](n[24])}return{c(){e=v("div"),t=v("figure"),V(i.$$.fragment),s=D(),l=v("div"),o=v("small"),o.textContent="New",r=D(),a=v("span"),f=z(u),d=D(),m=v("button"),m.innerHTML='',p(t,"class","thumb"),p(o,"class","label label-success m-r-5"),p(a,"class","txt"),p(l,"class","filename"),p(l,"title",c=n[22].name),p(m,"type","button"),p(m,"class","btn btn-transparent btn-sm btn-circle btn-remove"),p(e,"class","list-item")},m(k,T){S(k,e,T),_(e,t),H(i,t,null),_(e,s),_(e,l),_(l,o),_(l,r),_(l,a),_(a,f),_(e,d),_(e,m),h=!0,g||(b=[Pe(Ye.call(null,m,"Remove file")),K(m,"click",y)],g=!0)},p(k,T){n=k;const C={};T&1&&(C.file=n[22]),i.$set(C),(!h||T&1)&&u!==(u=n[22].name+"")&&re(f,u),(!h||T&1&&c!==(c=n[22].name))&&p(l,"title",c)},i(k){h||(A(i.$$.fragment,k),h=!0)},o(k){P(i.$$.fragment,k),h=!1},d(k){k&&w(e),q(i),g=!1,Le(b)}}}function op(n){let e,t,i,s,l,o;return{c(){e=v("div"),t=v("input"),i=D(),s=v("button"),s.innerHTML=` - Upload new file`,p(t,"type","file"),p(t,"class","hidden"),t.multiple=n[5],p(s,"type","button"),p(s,"class","btn btn-transparent btn-sm btn-block"),p(e,"class","list-item list-item-btn")},m(r,a){S(r,e,a),_(e,t),n[16](t),_(e,i),_(e,s),l||(o=[K(t,"change",n[17]),K(s,"click",n[18])],l=!0)},p(r,a){a&32&&(t.multiple=r[5])},d(r){r&&w(e),n[16](null),l=!1,Le(o)}}}function z4(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,c=[],d=new Map,m,h,g,b=n[4];const y=$=>$[25]+$[2].id;for(let $=0;$P(T[$],1,1,()=>{T[$]=null});let M=!n[8]&&op(n);return{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=z(o),u=D(),f=v("div");for(let $=0;$({21:i}),({uniqueId:i})=>i?2097152:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field form-field-list form-field-file "+(i[3].required?"required":"")),s&8&&(l.name=i[3].name),s&270533119&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function U4(n,e,t){let i,s,l,{record:o}=e,{value:r=""}=e,{uploadedFiles:a=[]}=e,{deletedFileIndexes:u=[]}=e,{field:f=new dn}=e,c,d;function m(E){B.removeByValue(u,E),t(1,u)}function h(E){B.pushUnique(u,E),t(1,u)}function g(E){B.isEmpty(a[E])||a.splice(E,1),t(0,a)}function b(){d==null||d.dispatchEvent(new CustomEvent("change",{detail:{value:r,uploadedFiles:a,deletedFileIndexes:u},bubbles:!0}))}const y=E=>m(E),k=E=>h(E),T=E=>g(E);function C(E){ie[E?"unshift":"push"](()=>{c=E,t(6,c)})}const M=()=>{for(let E of c.files)a.push(E);t(0,a),t(6,c.value=null,c)},$=()=>c==null?void 0:c.click();function O(E){ie[E?"unshift":"push"](()=>{d=E,t(7,d)})}return n.$$set=E=>{"record"in E&&t(2,o=E.record),"value"in E&&t(12,r=E.value),"uploadedFiles"in E&&t(0,a=E.uploadedFiles),"deletedFileIndexes"in E&&t(1,u=E.deletedFileIndexes),"field"in E&&t(3,f=E.field)},n.$$.update=()=>{var E,I;n.$$.dirty&1&&(Array.isArray(a)||t(0,a=B.toArray(a))),n.$$.dirty&2&&(Array.isArray(u)||t(1,u=B.toArray(u))),n.$$.dirty&8&&t(5,i=((E=f.options)==null?void 0:E.maxSelect)>1),n.$$.dirty&4128&&B.isEmpty(r)&&t(12,r=i?[]:""),n.$$.dirty&4096&&t(4,s=B.toArray(r)),n.$$.dirty&27&&t(8,l=(s.length||a.length)&&((I=f.options)==null?void 0:I.maxSelect)<=s.length+a.length-u.length),n.$$.dirty&3&&(a!==-1||u!==-1)&&b()},[a,u,o,f,s,i,c,d,l,m,h,g,r,y,k,T,C,M,$,O]}class W4 extends ke{constructor(e){super(),ye(this,e,U4,B4,be,{record:2,value:12,uploadedFiles:0,deletedFileIndexes:1,field:3})}}function rp(n){return typeof n=="function"?{threshold:100,callback:n}:n||{}}function Y4(n,e){e=rp(e),e!=null&&e.callback&&e.callback();function t(i){if(!(e!=null&&e.callback))return;i.target.scrollHeight-i.target.clientHeight-i.target.scrollTop<=e.threshold&&e.callback()}return n.addEventListener("scroll",t),n.addEventListener("resize",t),{update(i){e=rp(i)},destroy(){n.removeEventListener("scroll",t),n.removeEventListener("resize",t)}}}const K4=n=>({dragging:n&2,dragover:n&4}),ap=n=>({dragging:n[1],dragover:n[2]});function J4(n){let e,t,i,s;const l=n[8].default,o=Ft(l,n,n[7],ap);return{c(){e=v("div"),o&&o.c(),p(e,"draggable",!0),p(e,"class","draggable svelte-28orm4"),x(e,"dragging",n[1]),x(e,"dragover",n[2])},m(r,a){S(r,e,a),o&&o.m(e,null),t=!0,i||(s=[K(e,"dragover",pt(n[9])),K(e,"dragleave",pt(n[10])),K(e,"dragend",n[11]),K(e,"dragstart",n[12]),K(e,"drop",n[13])],i=!0)},p(r,[a]){o&&o.p&&(!t||a&134)&&jt(o,l,r,r[7],t?Rt(l,r[7],a,K4):Ht(r[7]),ap),(!t||a&2)&&x(e,"dragging",r[1]),(!t||a&4)&&x(e,"dragover",r[2])},i(r){t||(A(o,r),t=!0)},o(r){P(o,r),t=!1},d(r){r&&w(e),o&&o.d(r),i=!1,Le(s)}}}function Z4(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=$t();let{index:o}=e,{list:r=[]}=e,{disabled:a=!1}=e,u=!1,f=!1;function c(k,T){!k&&!a||(t(1,u=!0),k.dataTransfer.effectAllowed="move",k.dataTransfer.dropEffect="move",k.dataTransfer.setData("text/plain",T))}function d(k,T){if(!k&&!a)return;t(2,f=!1),t(1,u=!1),k.dataTransfer.dropEffect="move";const C=parseInt(k.dataTransfer.getData("text/plain"));C{t(2,f=!0)},h=()=>{t(2,f=!1)},g=()=>{t(2,f=!1),t(1,u=!1)},b=k=>c(k,o),y=k=>d(k,o);return n.$$set=k=>{"index"in k&&t(0,o=k.index),"list"in k&&t(5,r=k.list),"disabled"in k&&t(6,a=k.disabled),"$$scope"in k&&t(7,s=k.$$scope)},[o,u,f,c,d,r,a,s,i,m,h,g,b,y]}class G4 extends ke{constructor(e){super(),ye(this,e,Z4,J4,be,{index:0,list:5,disabled:6})}}function X4(n){let e,t,i,s,l,o=B.truncate(n[1],150)+"",r,a,u;return{c(){e=v("div"),t=v("i"),s=D(),l=v("span"),r=z(o),p(t,"class","link-hint txt-sm ri-information-line svelte-1v6tn2p"),p(l,"class","txt txt-ellipsis svelte-1v6tn2p"),p(e,"class","record-info svelte-1v6tn2p")},m(f,c){S(f,e,c),_(e,t),_(e,s),_(e,l),_(l,r),a||(u=Pe(i=Ye.call(null,t,{text:B.truncate(JSON.stringify(B.truncateObject(n[0]),null,2),800,!0),class:"code",position:"left"})),a=!0)},p(f,[c]){i&&zt(i.update)&&c&1&&i.update.call(null,{text:B.truncate(JSON.stringify(B.truncateObject(f[0]),null,2),800,!0),class:"code",position:"left"}),c&2&&o!==(o=B.truncate(f[1],150)+"")&&re(r,o)},i:G,o:G,d(f){f&&w(e),a=!1,u()}}}function x4(n,e,t){let i,{record:s}=e,{displayFields:l=[]}=e;return n.$$set=o=>{"record"in o&&t(0,s=o.record),"displayFields"in o&&t(2,l=o.displayFields)},n.$$.update=()=>{n.$$.dirty&5&&t(1,i=B.displayValue(s,l))},[s,i,l]}class Xo extends ke{constructor(e){super(),ye(this,e,x4,X4,be,{record:0,displayFields:2})}}function up(n,e,t){const i=n.slice();return i[49]=e[t],i[51]=t,i}function fp(n,e,t){const i=n.slice();i[49]=e[t];const s=i[8](i[49]);return i[6]=s,i}function cp(n){let e,t;function i(o,r){return o[11]?eM:Q4}let s=i(n),l=s(n);return{c(){e=v("div"),l.c(),t=D(),p(e,"class","list-item")},m(o,r){S(o,e,r),l.m(e,null),_(e,t)},p(o,r){s===(s=i(o))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,t)))},d(o){o&&w(e),l.d()}}}function Q4(n){var l;let e,t,i,s=((l=n[2])==null?void 0:l.length)&&dp(n);return{c(){e=v("span"),e.textContent="No records found.",t=D(),s&&s.c(),i=Ae(),p(e,"class","txt txt-hint")},m(o,r){S(o,e,r),S(o,t,r),s&&s.m(o,r),S(o,i,r)},p(o,r){var a;(a=o[2])!=null&&a.length?s?s.p(o,r):(s=dp(o),s.c(),s.m(i.parentNode,i)):s&&(s.d(1),s=null)},d(o){o&&w(e),o&&w(t),s&&s.d(o),o&&w(i)}}}function eM(n){let e;return{c(){e=v("div"),e.innerHTML='',p(e,"class","block txt-center")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function dp(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[35]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function tM(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-blank-circle-line txt-disabled")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function nM(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function pp(n,e){let t,i,s,l,o,r,a,u,f,c,d;function m(T,C){return T[6]?nM:tM}let h=m(e),g=h(e);l=new Xo({props:{record:e[49],displayFields:e[13]}});function b(){return e[32](e[49])}function y(){return e[33](e[49])}function k(...T){return e[34](e[49],...T)}return{key:n,first:null,c(){t=v("div"),g.c(),i=D(),s=v("div"),V(l.$$.fragment),o=D(),r=v("div"),a=v("button"),a.innerHTML='',u=D(),p(s,"class","content"),p(a,"type","button"),p(a,"class","btn btn-sm btn-circle btn-transparent btn-hint m-l-auto"),p(r,"class","actions nonintrusive"),p(t,"tabindex","0"),p(t,"class","list-item handle"),x(t,"selected",e[6]),x(t,"disabled",!e[6]&&e[5]>1&&!e[9]),this.first=t},m(T,C){S(T,t,C),g.m(t,null),_(t,i),_(t,s),H(l,s,null),_(t,o),_(t,r),_(r,a),_(t,u),f=!0,c||(d=[Pe(Ye.call(null,a,"Edit")),K(a,"keydown",yn(e[27])),K(a,"click",yn(b)),K(t,"click",y),K(t,"keydown",k)],c=!0)},p(T,C){e=T,h!==(h=m(e))&&(g.d(1),g=h(e),g&&(g.c(),g.m(t,i)));const M={};C[0]&8&&(M.record=e[49]),C[0]&8192&&(M.displayFields=e[13]),l.$set(M),(!f||C[0]&264)&&x(t,"selected",e[6]),(!f||C[0]&808)&&x(t,"disabled",!e[6]&&e[5]>1&&!e[9])},i(T){f||(A(l.$$.fragment,T),f=!0)},o(T){P(l.$$.fragment,T),f=!1},d(T){T&&w(t),g.d(),q(l),c=!1,Le(d)}}}function mp(n){let e,t=n[6].length+"",i,s,l,o;return{c(){e=z("("),i=z(t),s=z(" of MAX "),l=z(n[5]),o=z(")")},m(r,a){S(r,e,a),S(r,i,a),S(r,s,a),S(r,l,a),S(r,o,a)},p(r,a){a[0]&64&&t!==(t=r[6].length+"")&&re(i,t),a[0]&32&&re(l,r[5])},d(r){r&&w(e),r&&w(i),r&&w(s),r&&w(l),r&&w(o)}}}function iM(n){let e;return{c(){e=v("p"),e.textContent="No selected records.",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function sM(n){let e,t,i=n[6],s=[];for(let o=0;oP(s[o],1,1,()=>{s[o]=null});return{c(){e=v("div");for(let o=0;o',l=D(),p(s,"type","button"),p(s,"title","Remove"),p(s,"class","btn btn-circle btn-transparent btn-hint btn-xs"),p(e,"class","label"),x(e,"label-danger",n[52]),x(e,"label-warning",n[53])},m(f,c){S(f,e,c),H(t,e,null),_(e,i),_(e,s),S(f,l,c),o=!0,r||(a=K(s,"click",u),r=!0)},p(f,c){n=f;const d={};c[0]&64&&(d.record=n[49]),c[0]&8192&&(d.displayFields=n[13]),t.$set(d),(!o||c[1]&2097152)&&x(e,"label-danger",n[52]),(!o||c[1]&4194304)&&x(e,"label-warning",n[53])},i(f){o||(A(t.$$.fragment,f),o=!0)},o(f){P(t.$$.fragment,f),o=!1},d(f){f&&w(e),q(t),f&&w(l),r=!1,a()}}}function hp(n){let e,t,i;function s(o){n[38](o)}let l={index:n[51],$$slots:{default:[lM,({dragging:o,dragover:r})=>({52:o,53:r}),({dragging:o,dragover:r})=>[0,(o?2097152:0)|(r?4194304:0)]]},$$scope:{ctx:n}};return n[6]!==void 0&&(l.list=n[6]),e=new G4({props:l}),ie.push(()=>ve(e,"list",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};r[0]&8256|r[1]&39845888&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&64&&(t=!0,a.list=o[6],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function oM(n){let e,t,i,s,l,o,r=[],a=new Map,u,f,c,d,m,h,g,b,y,k,T;t=new Uo({props:{value:n[2],autocompleteCollection:n[12]}}),t.$on("submit",n[30]);let C=n[3];const M=N=>N[49].id;for(let N=0;N1&&mp(n);const E=[sM,iM],I=[];function L(N,F){return N[6].length?0:1}return h=L(n),g=I[h]=E[h](n),{c(){e=v("div"),V(t.$$.fragment),i=D(),s=v("button"),s.innerHTML='
    New record
    ',l=D(),o=v("div");for(let N=0;N1?O?O.p(N,F):(O=mp(N),O.c(),O.m(c,null)):O&&(O.d(1),O=null);let J=h;h=L(N),h===J?I[h].p(N,F):(pe(),P(I[J],1,1,()=>{I[J]=null}),me(),g=I[h],g?g.p(N,F):(g=I[h]=E[h](N),g.c()),A(g,1),g.m(b.parentNode,b))},i(N){if(!y){A(t.$$.fragment,N);for(let F=0;FCancel',t=D(),i=v("button"),i.innerHTML='Save selection',p(e,"type","button"),p(e,"class","btn btn-transparent"),p(i,"type","button"),p(i,"class","btn")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=[K(e,"click",n[28]),K(i,"click",n[29])],s=!0)},p:G,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Le(l)}}}function uM(n){let e,t,i,s;const l=[{popup:!0},{class:"overlay-panel-xl"},n[19]];let o={$$slots:{footer:[aM],header:[rM],default:[oM]},$$scope:{ctx:n}};for(let a=0;at(26,m=Te));const h=$t(),g="picker_"+B.randomString(5);let{value:b}=e,{field:y}=e,k,T,C="",M=[],$=[],O=1,E=0,I=!1,L=!1;function N(){return t(2,C=""),t(3,M=[]),t(6,$=[]),U(),J(!0),k==null?void 0:k.show()}function F(){return k==null?void 0:k.hide()}async function U(){const Te=B.toArray(b);if(!s||!Te.length)return;t(24,L=!0);let ce=[];const $e=Te.slice(),Ze=[];for(;$e.length>0;){const it=[];for(const Mt of $e.splice(0,Or))it.push(`id="${Mt}"`);Ze.push(he.collection(s).getFullList(Or,{filter:it.join("||"),$autoCancel:!1}))}try{await Promise.all(Ze).then(it=>{ce=ce.concat(...it)}),t(6,$=[]);for(const it of Te){const Mt=B.findByKey(ce,"id",it);Mt&&$.push(Mt)}C.trim()||t(3,M=B.filterDuplicatesByKey($.concat(M)))}catch(it){he.errorResponseHandler(it)}t(24,L=!1)}async function J(Te=!1){if(s){t(4,I=!0),Te&&(C.trim()?t(3,M=[]):t(3,M=B.toArray($).slice()));try{const ce=Te?1:O+1,$e=await he.collection(s).getList(ce,Or,{filter:C,sort:"-created",$cancelKey:g+"loadList"});t(3,M=B.filterDuplicatesByKey(M.concat($e.items))),O=$e.page,t(23,E=$e.totalItems)}catch(ce){he.errorResponseHandler(ce)}t(4,I=!1)}}function ne(Te){i==1?t(6,$=[Te]):u&&(B.pushOrReplaceByKey($,Te),t(6,$))}function Z(Te){B.removeByKey($,"id",Te.id),t(6,$)}function te(Te){f(Te)?Z(Te):ne(Te)}function ee(){var Te;i!=1?t(20,b=$.map(ce=>ce.id)):t(20,b=((Te=$==null?void 0:$[0])==null?void 0:Te.id)||""),h("save",$),F()}function R(Te){We.call(this,n,Te)}const X=()=>F(),Y=()=>ee(),se=Te=>t(2,C=Te.detail),He=()=>T==null?void 0:T.show(),Re=Te=>T==null?void 0:T.show(Te),Fe=Te=>te(Te),qe=(Te,ce)=>{(ce.code==="Enter"||ce.code==="Space")&&(ce.preventDefault(),ce.stopPropagation(),te(Te))},ge=()=>t(2,C=""),Se=()=>{a&&!I&&J()},Ue=Te=>Z(Te);function lt(Te){$=Te,t(6,$)}function ue(Te){ie[Te?"unshift":"push"](()=>{k=Te,t(1,k)})}function fe(Te){We.call(this,n,Te)}function ae(Te){We.call(this,n,Te)}function oe(Te){ie[Te?"unshift":"push"](()=>{T=Te,t(7,T)})}const je=Te=>{B.removeByKey(M,"id",Te.detail.id),M.unshift(Te.detail),t(3,M),ne(Te.detail)},Me=Te=>{B.removeByKey(M,"id",Te.detail.id),t(3,M),Z(Te.detail)};return n.$$set=Te=>{e=Xe(Xe({},e),Gn(Te)),t(19,d=At(e,c)),"value"in Te&&t(20,b=Te.value),"field"in Te&&t(21,y=Te.field)},n.$$.update=()=>{var Te,ce,$e;n.$$.dirty[0]&2097152&&t(5,i=((Te=y==null?void 0:y.options)==null?void 0:Te.maxSelect)||null),n.$$.dirty[0]&2097152&&t(25,s=(ce=y==null?void 0:y.options)==null?void 0:ce.collectionId),n.$$.dirty[0]&2097152&&t(13,l=($e=y==null?void 0:y.options)==null?void 0:$e.displayFields),n.$$.dirty[0]&100663296&&t(12,o=m.find(Ze=>Ze.id==s)||null),n.$$.dirty[0]&16777222&&typeof C<"u"&&!L&&k!=null&&k.isActive()&&J(!0),n.$$.dirty[0]&16777232&&t(11,r=I||L),n.$$.dirty[0]&8388616&&t(10,a=E>M.length),n.$$.dirty[0]&96&&t(9,u=i===null||i>$.length),n.$$.dirty[0]&64&&t(8,f=function(Ze){return B.findByKey($,"id",Ze.id)})},[F,k,C,M,I,i,$,T,f,u,a,r,o,l,J,ne,Z,te,ee,d,b,y,N,E,L,s,m,R,X,Y,se,He,Re,Fe,qe,ge,Se,Ue,lt,ue,fe,ae,oe,je,Me]}class cM extends ke{constructor(e){super(),ye(this,e,fM,uM,be,{value:20,field:21,show:22,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[22]}get hide(){return this.$$.ctx[0]}}function gp(n,e,t){const i=n.slice();return i[13]=e[t],i}function _p(n,e,t){const i=n.slice();return i[16]=e[t],i}function bp(n){let e,t=n[4]&&vp(n);return{c(){t&&t.c(),e=Ae()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[4]?t?t.p(i,s):(t=vp(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function vp(n){let e,t=B.toArray(n[0]).slice(0,10),i=[];for(let s=0;s
    - `,p(e,"class","list-item")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function kp(n){var d;let e,t,i,s,l,o,r,a,u,f;i=new Xo({props:{record:n[13],displayFields:(d=n[2].options)==null?void 0:d.displayFields}});function c(){return n[7](n[13])}return{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=D(),l=v("div"),o=v("button"),o.innerHTML='',r=D(),p(t,"class","content"),p(o,"type","button"),p(o,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),p(l,"class","actions"),p(e,"class","list-item")},m(m,h){S(m,e,h),_(e,t),H(i,t,null),_(e,s),_(e,l),_(l,o),_(e,r),a=!0,u||(f=[Pe(Ye.call(null,o,"Remove")),K(o,"click",c)],u=!0)},p(m,h){var b;n=m;const g={};h&8&&(g.record=n[13]),h&4&&(g.displayFields=(b=n[2].options)==null?void 0:b.displayFields),i.$set(g)},i(m){a||(A(i.$$.fragment,m),a=!0)},o(m){P(i.$$.fragment,m),a=!1},d(m){m&&w(e),q(i),u=!1,Le(f)}}}function dM(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,c,d,m,h,g,b,y,k=n[3],T=[];for(let $=0;$P(T[$],1,1,()=>{T[$]=null});let M=null;return k.length||(M=bp(n)),{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=z(o),u=D(),f=v("div"),c=v("div");for(let $=0;$ - - Open picker`,p(t,"class",i=yi(B.getFieldTypeIcon(n[2].type))+" svelte-1ynw0pc"),p(l,"class","txt"),p(e,"for",a=n[12]),p(c,"class","relations-list svelte-1ynw0pc"),p(h,"type","button"),p(h,"class","btn btn-transparent btn-sm btn-block"),p(m,"class","list-item list-item-btn"),p(f,"class","list")},m($,O){S($,e,O),_(e,t),_(e,s),_(e,l),_(l,r),S($,u,O),S($,f,O),_(f,c);for(let E=0;E({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l={value:n[0],field:n[2]};return i=new cM({props:l}),n[9](i),i.$on("save",n[10]),{c(){V(e.$$.fragment),t=D(),V(i.$$.fragment)},m(o,r){H(e,o,r),S(o,t,r),H(i,o,r),s=!0},p(o,[r]){const a={};r&4&&(a.class="form-field form-field-list "+(o[2].required?"required":"")),r&4&&(a.name=o[2].name),r&528415&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};r&1&&(u.value=o[0]),r&4&&(u.field=o[2]),i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){P(e.$$.fragment,o),P(i.$$.fragment,o),s=!1},d(o){q(e,o),o&&w(t),n[9](null),q(i,o)}}}const wp=100;function mM(n,e,t){let i,{value:s}=e,{picker:l}=e,{field:o=new dn}=e,r=[],a=!1;u();async function u(){var k,T;const g=B.toArray(s);if(!((k=o==null?void 0:o.options)!=null&&k.collectionId)||!g.length){t(3,r=[]),t(4,a=!1);return}t(4,a=!0);const b=g.slice(),y=[];for(;b.length>0;){const C=[];for(const M of b.splice(0,wp))C.push(`id="${M}"`);y.push(he.collection((T=o==null?void 0:o.options)==null?void 0:T.collectionId).getFullList(wp,{filter:C.join("||"),$autoCancel:!1}))}try{let C=[];await Promise.all(y).then(M=>{C=C.concat(...M)});for(const M of g){const $=B.findByKey(C,"id",M);$&&r.push($)}t(3,r)}catch(C){he.errorResponseHandler(C)}t(4,a=!1)}function f(g){var b;B.removeByKey(r,"id",g.id),t(3,r),i?t(0,s=r.map(y=>y.id)):t(0,s=((b=r[0])==null?void 0:b.id)||"")}const c=g=>f(g),d=()=>l==null?void 0:l.show();function m(g){ie[g?"unshift":"push"](()=>{l=g,t(1,l)})}const h=g=>{var b;t(3,r=g.detail||[]),t(0,s=i?r.map(y=>y.id):((b=r[0])==null?void 0:b.id)||"")};return n.$$set=g=>{"value"in g&&t(0,s=g.value),"picker"in g&&t(1,l=g.picker),"field"in g&&t(2,o=g.field)},n.$$.update=()=>{var g;n.$$.dirty&4&&t(5,i=((g=o.options)==null?void 0:g.maxSelect)!=1)},[s,l,o,r,a,i,f,c,d,m,h]}class hM extends ke{constructor(e){super(),ye(this,e,mM,pM,be,{value:0,picker:1,field:2})}}const gM=["Activate","AddUndo","BeforeAddUndo","BeforeExecCommand","BeforeGetContent","BeforeRenderUI","BeforeSetContent","BeforePaste","Blur","Change","ClearUndos","Click","ContextMenu","Copy","Cut","Dblclick","Deactivate","Dirty","Drag","DragDrop","DragEnd","DragGesture","DragOver","Drop","ExecCommand","Focus","FocusIn","FocusOut","GetContent","Hide","Init","KeyDown","KeyPress","KeyUp","LoadContent","MouseDown","MouseEnter","MouseLeave","MouseMove","MouseOut","MouseOver","MouseUp","NodeChange","ObjectResizeStart","ObjectResized","ObjectSelected","Paste","PostProcess","PostRender","PreProcess","ProgressState","Redo","Remove","Reset","ResizeEditor","SaveContent","SelectionChange","SetAttrib","SetContent","Show","Submit","Undo","VisualAid"],_M=(n,e)=>{gM.forEach(t=>{n.on(t,i=>{e(t.toLowerCase(),{eventName:t,event:i,editor:n})})})};function bM(n){let e;return{c(){e=v("textarea"),p(e,"id",n[0]),Ir(e,"visibility","hidden")},m(t,i){S(t,e,i),n[18](e)},p(t,i){i&1&&p(e,"id",t[0])},d(t){t&&w(e),n[18](null)}}}function vM(n){let e;return{c(){e=v("div"),p(e,"id",n[0])},m(t,i){S(t,e,i),n[17](e)},p(t,i){i&1&&p(e,"id",t[0])},d(t){t&&w(e),n[17](null)}}}function yM(n){let e;function t(l,o){return l[1]?vM:bM}let i=t(n),s=i(n);return{c(){e=v("div"),s.c(),p(e,"class",n[2])},m(l,o){S(l,e,o),s.m(e,null),n[19](e)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null))),o&4&&p(e,"class",l[2])},i:G,o:G,d(l){l&&w(e),s.d(),n[19](null)}}}const fb=n=>n+"_"+Math.floor(Math.random()*1e9)+String(Date.now()),kM=()=>{let n={listeners:[],scriptId:fb("tiny-script"),scriptLoaded:!1,injected:!1};const e=(i,s,l,o)=>{n.injected=!0;const r=s.createElement("script");r.referrerPolicy="origin",r.type="application/javascript",r.src=l,r.onload=()=>{o()},s.head&&s.head.appendChild(r)};return{load:(i,s,l)=>{n.scriptLoaded?l():(n.listeners.push(l),n.injected||e(n.scriptId,i,s,()=>{n.listeners.forEach(o=>o()),n.scriptLoaded=!0}))}}};let wM=kM();function SM(n,e,t){var i;let{id:s=fb("tinymce-svelte")}=e,{inline:l=void 0}=e,{disabled:o=!1}=e,{apiKey:r="no-api-key"}=e,{channel:a="6"}=e,{scriptSrc:u=void 0}=e,{conf:f={}}=e,{modelEvents:c="change input undo redo"}=e,{value:d=""}=e,{text:m=""}=e,{cssClass:h="tinymce-wrapper"}=e,g,b,y,k="",T=o;const C=$t(),M=()=>{const N=(()=>typeof window<"u"?window:global)();return N&&N.tinymce?N.tinymce:null},$=()=>{const L=Object.assign(Object.assign({},f),{target:b,inline:l!==void 0?l:f.inline!==void 0?f.inline:!1,readonly:o,setup:N=>{t(14,y=N),N.on("init",()=>{N.setContent(d),N.on(c,()=>{t(15,k=N.getContent()),k!==d&&(t(5,d=k),t(6,m=N.getContent({format:"text"})))})}),_M(N,C),typeof f.setup=="function"&&f.setup(N)}});t(4,b.style.visibility="",b),M().init(L)};sn(()=>{if(M()!==null)$();else{const L=u||`https://cdn.tiny.cloud/1/${r}/tinymce/${a}/tinymce.min.js`;wM.load(g.ownerDocument,L,()=>{$()})}}),Wh(()=>{var L;y&&((L=M())===null||L===void 0||L.remove(y))});function O(L){ie[L?"unshift":"push"](()=>{b=L,t(4,b)})}function E(L){ie[L?"unshift":"push"](()=>{b=L,t(4,b)})}function I(L){ie[L?"unshift":"push"](()=>{g=L,t(3,g)})}return n.$$set=L=>{"id"in L&&t(0,s=L.id),"inline"in L&&t(1,l=L.inline),"disabled"in L&&t(7,o=L.disabled),"apiKey"in L&&t(8,r=L.apiKey),"channel"in L&&t(9,a=L.channel),"scriptSrc"in L&&t(10,u=L.scriptSrc),"conf"in L&&t(11,f=L.conf),"modelEvents"in L&&t(12,c=L.modelEvents),"value"in L&&t(5,d=L.value),"text"in L&&t(6,m=L.text),"cssClass"in L&&t(2,h=L.cssClass)},n.$$.update=()=>{n.$$.dirty&123040&&(y&&k!==d&&(y.setContent(d),t(6,m=y.getContent({format:"text"}))),y&&o!==T&&(t(16,T=o),typeof(t(13,i=y.mode)===null||i===void 0?void 0:i.set)=="function"?y.mode.set(o?"readonly":"design"):y.setMode(o?"readonly":"design")))},[s,l,h,g,b,d,m,o,r,a,u,f,c,i,y,k,T,O,E,I]}class TM extends ke{constructor(e){super(),ye(this,e,SM,yM,be,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function CM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d;function m(g){n[2](g)}let h={id:n[3],scriptSrc:"./libs/tinymce/tinymce.min.js",conf:B.defaultEditorOptions()};return n[0]!==void 0&&(h.value=n[0]),f=new TM({props:h}),ie.push(()=>ve(f,"value",m)),{c(){e=v("label"),t=v("i"),s=D(),l=v("span"),r=z(o),u=D(),V(f.$$.fragment),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(g,b){S(g,e,b),_(e,t),_(e,s),_(e,l),_(l,r),S(g,u,b),H(f,g,b),d=!0},p(g,b){(!d||b&2&&i!==(i=B.getFieldTypeIcon(g[1].type)))&&p(t,"class",i),(!d||b&2)&&o!==(o=g[1].name+"")&&re(r,o),(!d||b&8&&a!==(a=g[3]))&&p(e,"for",a);const y={};b&8&&(y.id=g[3]),!c&&b&1&&(c=!0,y.value=g[0],we(()=>c=!1)),f.$set(y)},i(g){d||(A(f.$$.fragment,g),d=!0)},o(g){P(f.$$.fragment,g),d=!1},d(g){g&&w(e),g&&w(u),q(f,g)}}}function $M(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[CM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function MM(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class DM extends ke{constructor(e){super(),ye(this,e,MM,$M,be,{field:1,value:0})}}function OM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Auth URL"),s=D(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].authUrl),r||(a=K(l,"input",n[2]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&de(l,u[0].authUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function EM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Token URL"),s=D(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].tokenUrl),r||(a=K(l,"input",n[3]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&l.value!==u[0].tokenUrl&&de(l,u[0].tokenUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function AM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("User API URL"),s=D(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].userApiUrl),r||(a=K(l,"input",n[4]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&l.value!==u[0].userApiUrl&&de(l,u[0].userApiUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function IM(n){let e,t,i,s,l,o,r,a,u,f,c,d;return l=new _e({props:{class:"form-field",name:n[1]+".authUrl",$$slots:{default:[OM,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field",name:n[1]+".tokenUrl",$$slots:{default:[EM,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),c=new _e({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[AM,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Selfhosted endpoints (optional)",t=D(),i=v("div"),s=v("div"),V(l.$$.fragment),o=D(),r=v("div"),V(a.$$.fragment),u=D(),f=v("div"),V(c.$$.fragment),p(e,"class","section-title"),p(s,"class","col-lg-4"),p(r,"class","col-lg-4"),p(f,"class","col-lg-4"),p(i,"class","grid")},m(m,h){S(m,e,h),S(m,t,h),S(m,i,h),_(i,s),H(l,s,null),_(i,o),_(i,r),H(a,r,null),_(i,u),_(i,f),H(c,f,null),d=!0},p(m,[h]){const g={};h&2&&(g.name=m[1]+".authUrl"),h&97&&(g.$$scope={dirty:h,ctx:m}),l.$set(g);const b={};h&2&&(b.name=m[1]+".tokenUrl"),h&97&&(b.$$scope={dirty:h,ctx:m}),a.$set(b);const y={};h&2&&(y.name=m[1]+".userApiUrl"),h&97&&(y.$$scope={dirty:h,ctx:m}),c.$set(y)},i(m){d||(A(l.$$.fragment,m),A(a.$$.fragment,m),A(c.$$.fragment,m),d=!0)},o(m){P(l.$$.fragment,m),P(a.$$.fragment,m),P(c.$$.fragment,m),d=!1},d(m){m&&w(e),m&&w(t),m&&w(i),q(l),q(a),q(c)}}}function PM(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}function r(){s.userApiUrl=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"config"in a&&t(0,s=a.config)},[s,i,l,o,r]}class Sp extends ke{constructor(e){super(),ye(this,e,PM,IM,be,{key:1,config:0})}}function LM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=z("Auth URL"),s=D(),l=v("input"),r=D(),a=v("div"),a.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize",p(e,"for",i=n[4]),p(l,"type","url"),p(l,"id",o=n[4]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),de(l,n[0].authUrl),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[2]),u=!0)},p(c,d){d&16&&i!==(i=c[4])&&p(e,"for",i),d&16&&o!==(o=c[4])&&p(l,"id",o),d&1&&de(l,c[0].authUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function NM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=z("Token URL"),s=D(),l=v("input"),r=D(),a=v("div"),a.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token",p(e,"for",i=n[4]),p(l,"type","text"),p(l,"id",o=n[4]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),de(l,n[0].tokenUrl),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[3]),u=!0)},p(c,d){d&16&&i!==(i=c[4])&&p(e,"for",i),d&16&&o!==(o=c[4])&&p(l,"id",o),d&1&&l.value!==c[0].tokenUrl&&de(l,c[0].tokenUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function FM(n){let e,t,i,s,l,o,r,a,u;return l=new _e({props:{class:"form-field required",name:n[1]+".authUrl",$$slots:{default:[LM,({uniqueId:f})=>({4:f}),({uniqueId:f})=>f?16:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field required",name:n[1]+".tokenUrl",$$slots:{default:[NM,({uniqueId:f})=>({4:f}),({uniqueId:f})=>f?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Azure AD endpoints",t=D(),i=v("div"),s=v("div"),V(l.$$.fragment),o=D(),r=v("div"),V(a.$$.fragment),p(e,"class","section-title"),p(s,"class","col-lg-12"),p(r,"class","col-lg-12"),p(i,"class","grid")},m(f,c){S(f,e,c),S(f,t,c),S(f,i,c),_(i,s),H(l,s,null),_(i,o),_(i,r),H(a,r,null),u=!0},p(f,[c]){const d={};c&2&&(d.name=f[1]+".authUrl"),c&49&&(d.$$scope={dirty:c,ctx:f}),l.$set(d);const m={};c&2&&(m.name=f[1]+".tokenUrl"),c&49&&(m.$$scope={dirty:c,ctx:f}),a.$set(m)},i(f){u||(A(l.$$.fragment,f),A(a.$$.fragment,f),u=!0)},o(f){P(l.$$.fragment,f),P(a.$$.fragment,f),u=!1},d(f){f&&w(e),f&&w(t),f&&w(i),q(l),q(a)}}}function RM(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"config"in r&&t(0,s=r.config)},[s,i,l,o]}class jM extends ke{constructor(e){super(),ye(this,e,RM,FM,be,{key:1,config:0})}}function HM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=z("Auth URL"),s=D(),l=v("input"),r=D(),a=v("div"),a.textContent="Eg. https://YOUR_AUTHENTIK_URL/application/o/authorize/",p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),de(l,n[0].authUrl),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[2]),u=!0)},p(c,d){d&32&&i!==(i=c[5])&&p(e,"for",i),d&32&&o!==(o=c[5])&&p(l,"id",o),d&1&&de(l,c[0].authUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function qM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=z("Token URL"),s=D(),l=v("input"),r=D(),a=v("div"),a.textContent="Eg. https://YOUR_AUTHENTIK_URL/application/o/token/",p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),de(l,n[0].tokenUrl),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[3]),u=!0)},p(c,d){d&32&&i!==(i=c[5])&&p(e,"for",i),d&32&&o!==(o=c[5])&&p(l,"id",o),d&1&&l.value!==c[0].tokenUrl&&de(l,c[0].tokenUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function VM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=z("User API URL"),s=D(),l=v("input"),r=D(),a=v("div"),a.textContent="Eg. https://YOUR_AUTHENTIK_URL/application/o/userinfo/",p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),de(l,n[0].userApiUrl),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[4]),u=!0)},p(c,d){d&32&&i!==(i=c[5])&&p(e,"for",i),d&32&&o!==(o=c[5])&&p(l,"id",o),d&1&&l.value!==c[0].userApiUrl&&de(l,c[0].userApiUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function zM(n){let e,t,i,s,l,o,r,a,u,f,c,d;return l=new _e({props:{class:"form-field required",name:n[1]+".authUrl",$$slots:{default:[HM,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field required",name:n[1]+".tokenUrl",$$slots:{default:[qM,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),c=new _e({props:{class:"form-field required",name:n[1]+".userApiUrl",$$slots:{default:[VM,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Authentik endpoints",t=D(),i=v("div"),s=v("div"),V(l.$$.fragment),o=D(),r=v("div"),V(a.$$.fragment),u=D(),f=v("div"),V(c.$$.fragment),p(e,"class","section-title"),p(s,"class","col-lg-12"),p(r,"class","col-lg-12"),p(f,"class","col-lg-12"),p(i,"class","grid")},m(m,h){S(m,e,h),S(m,t,h),S(m,i,h),_(i,s),H(l,s,null),_(i,o),_(i,r),H(a,r,null),_(i,u),_(i,f),H(c,f,null),d=!0},p(m,[h]){const g={};h&2&&(g.name=m[1]+".authUrl"),h&97&&(g.$$scope={dirty:h,ctx:m}),l.$set(g);const b={};h&2&&(b.name=m[1]+".tokenUrl"),h&97&&(b.$$scope={dirty:h,ctx:m}),a.$set(b);const y={};h&2&&(y.name=m[1]+".userApiUrl"),h&97&&(y.$$scope={dirty:h,ctx:m}),c.$set(y)},i(m){d||(A(l.$$.fragment,m),A(a.$$.fragment,m),A(c.$$.fragment,m),d=!0)},o(m){P(l.$$.fragment,m),P(a.$$.fragment,m),P(c.$$.fragment,m),d=!1},d(m){m&&w(e),m&&w(t),m&&w(i),q(l),q(a),q(c)}}}function BM(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}function r(){s.userApiUrl=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"config"in a&&t(0,s=a.config)},[s,i,l,o,r]}class UM extends ke{constructor(e){super(),ye(this,e,BM,zM,be,{key:1,config:0})}}const vl={googleAuth:{title:"Google",icon:"ri-google-fill"},facebookAuth:{title:"Facebook",icon:"ri-facebook-fill"},twitterAuth:{title:"Twitter",icon:"ri-twitter-fill"},githubAuth:{title:"GitHub",icon:"ri-github-fill"},gitlabAuth:{title:"GitLab",icon:"ri-gitlab-fill",optionsComponent:Sp},discordAuth:{title:"Discord",icon:"ri-discord-fill"},microsoftAuth:{title:"Microsoft",icon:"ri-microsoft-fill",optionsComponent:jM},spotifyAuth:{title:"Spotify",icon:"ri-spotify-fill"},kakaoAuth:{title:"Kakao",icon:"ri-kakao-talk-fill"},twitchAuth:{title:"Twitch",icon:"ri-twitch-fill"},stravaAuth:{title:"Strava",icon:"ri-riding-fill"},giteeAuth:{title:"Gitee",icon:"ri-git-repository-fill"},giteaAuth:{title:"Gitea",icon:"ri-cup-fill",optionsComponent:Sp},livechatAuth:{title:"LiveChat",icon:"ri-chat-1-fill"},authentikAuth:{title:"Authentik",icon:"ri-lock-fill",optionsComponent:UM}};function Tp(n,e,t){const i=n.slice();return i[9]=e[t],i}function WM(n){let e;return{c(){e=v("h6"),e.textContent="No linked OAuth2 providers.",p(e,"class","txt-hint txt-center m-t-sm m-b-sm")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function YM(n){let e,t=n[1],i=[];for(let s=0;s',p(e,"class","block txt-center")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function Cp(n){let e,t,i,s,l,o=n[3](n[9].provider)+"",r,a,u,f,c=n[9].providerId+"",d,m,h,g,b,y;function k(){return n[6](n[9])}return{c(){e=v("div"),t=v("i"),s=D(),l=v("span"),r=z(o),a=D(),u=v("div"),f=z("ID: "),d=z(c),m=D(),h=v("button"),h.innerHTML='',g=D(),p(t,"class",i=n[4](n[9].provider)),p(l,"class","txt"),p(u,"class","txt-hint"),p(h,"type","button"),p(h,"class","btn btn-transparent link-hint btn-circle btn-sm m-l-auto"),p(e,"class","list-item")},m(T,C){S(T,e,C),_(e,t),_(e,s),_(e,l),_(l,r),_(e,a),_(e,u),_(u,f),_(u,d),_(e,m),_(e,h),_(e,g),b||(y=K(h,"click",k),b=!0)},p(T,C){n=T,C&2&&i!==(i=n[4](n[9].provider))&&p(t,"class",i),C&2&&o!==(o=n[3](n[9].provider)+"")&&re(r,o),C&2&&c!==(c=n[9].providerId+"")&&re(d,c)},d(T){T&&w(e),b=!1,y()}}}function JM(n){let e;function t(l,o){var r;return l[2]?KM:(r=l[0])!=null&&r.id&&l[1].length?YM:WM}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:G,o:G,d(l){s.d(l),l&&w(e)}}}function ZM(n,e,t){const i=$t();let{record:s}=e,l=[],o=!1;function r(d){var m;return((m=vl[d+"Auth"])==null?void 0:m.title)||B.sentenize(d,!1)}function a(d){var m;return((m=vl[d+"Auth"])==null?void 0:m.icon)||`ri-${d}-line`}async function u(){if(!(s!=null&&s.id)){t(1,l=[]),t(2,o=!1);return}t(2,o=!0);try{t(1,l=await he.collection(s.collectionId).listExternalAuths(s.id))}catch(d){he.errorResponseHandler(d)}t(2,o=!1)}function f(d){!(s!=null&&s.id)||!d||fn(`Do you really want to unlink the ${r(d)} provider?`,()=>he.collection(s.collectionId).unlinkExternalAuth(s.id,d).then(()=>{Vt(`Successfully unlinked the ${r(d)} provider.`),i("unlink",d),u()}).catch(m=>{he.errorResponseHandler(m)}))}u();const c=d=>f(d.provider);return n.$$set=d=>{"record"in d&&t(0,s=d.record)},[s,l,o,r,a,f,c]}class GM extends ke{constructor(e){super(),ye(this,e,ZM,JM,be,{record:0})}}function $p(n,e,t){const i=n.slice();return i[51]=e[t],i[52]=e,i[53]=t,i}function Mp(n){let e,t;return e=new _e({props:{class:"form-field disabled",name:"id",$$slots:{default:[XM,({uniqueId:i})=>({54:i}),({uniqueId:i})=>[0,i?8388608:0]]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s[0]&4|s[1]&25165824&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function XM(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="id",l=D(),o=v("span"),a=D(),u=v("div"),f=v("i"),d=D(),m=v("input"),p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(o,"class","flex-fill"),p(e,"for",r=n[54]),p(f,"class","ri-calendar-event-line txt-disabled"),p(u,"class","form-field-addon"),p(m,"type","text"),p(m,"id",h=n[54]),m.value=g=n[2].id,m.readOnly=!0},m(k,T){S(k,e,T),_(e,t),_(e,i),_(e,s),_(e,l),_(e,o),S(k,a,T),S(k,u,T),_(u,f),S(k,d,T),S(k,m,T),b||(y=Pe(c=Ye.call(null,f,{text:`Created: ${n[2].created} -Updated: ${n[2].updated}`,position:"left"})),b=!0)},p(k,T){T[1]&8388608&&r!==(r=k[54])&&p(e,"for",r),c&&zt(c.update)&&T[0]&4&&c.update.call(null,{text:`Created: ${k[2].created} -Updated: ${k[2].updated}`,position:"left"}),T[1]&8388608&&h!==(h=k[54])&&p(m,"id",h),T[0]&4&&g!==(g=k[2].id)&&m.value!==g&&(m.value=g)},d(k){k&&w(e),k&&w(a),k&&w(u),k&&w(d),k&&w(m),b=!1,y()}}}function Dp(n){var u,f;let e,t,i,s,l;function o(c){n[29](c)}let r={collection:n[0]};n[2]!==void 0&&(r.record=n[2]),e=new q$({props:r}),ie.push(()=>ve(e,"record",o));let a=((f=(u=n[0])==null?void 0:u.schema)==null?void 0:f.length)&&Op();return{c(){V(e.$$.fragment),i=D(),a&&a.c(),s=Ae()},m(c,d){H(e,c,d),S(c,i,d),a&&a.m(c,d),S(c,s,d),l=!0},p(c,d){var h,g;const m={};d[0]&1&&(m.collection=c[0]),!t&&d[0]&4&&(t=!0,m.record=c[2],we(()=>t=!1)),e.$set(m),(g=(h=c[0])==null?void 0:h.schema)!=null&&g.length?a||(a=Op(),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null)},i(c){l||(A(e.$$.fragment,c),l=!0)},o(c){P(e.$$.fragment,c),l=!1},d(c){q(e,c),c&&w(i),a&&a.d(c),c&&w(s)}}}function Op(n){let e;return{c(){e=v("hr")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function xM(n){let e,t,i;function s(o){n[42](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new hM({props:l}),ie.push(()=>ve(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function QM(n){let e,t,i,s,l;function o(f){n[39](f,n[51])}function r(f){n[40](f,n[51])}function a(f){n[41](f,n[51])}let u={field:n[51],record:n[2]};return n[2][n[51].name]!==void 0&&(u.value=n[2][n[51].name]),n[3][n[51].name]!==void 0&&(u.uploadedFiles=n[3][n[51].name]),n[4][n[51].name]!==void 0&&(u.deletedFileIndexes=n[4][n[51].name]),e=new W4({props:u}),ie.push(()=>ve(e,"value",o)),ie.push(()=>ve(e,"uploadedFiles",r)),ie.push(()=>ve(e,"deletedFileIndexes",a)),{c(){V(e.$$.fragment)},m(f,c){H(e,f,c),l=!0},p(f,c){n=f;const d={};c[0]&1&&(d.field=n[51]),c[0]&4&&(d.record=n[2]),!t&&c[0]&5&&(t=!0,d.value=n[2][n[51].name],we(()=>t=!1)),!i&&c[0]&9&&(i=!0,d.uploadedFiles=n[3][n[51].name],we(()=>i=!1)),!s&&c[0]&17&&(s=!0,d.deletedFileIndexes=n[4][n[51].name],we(()=>s=!1)),e.$set(d)},i(f){l||(A(e.$$.fragment,f),l=!0)},o(f){P(e.$$.fragment,f),l=!1},d(f){q(e,f)}}}function e5(n){let e,t,i;function s(o){n[38](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new k4({props:l}),ie.push(()=>ve(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function t5(n){let e,t,i;function s(o){n[37](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new _4({props:l}),ie.push(()=>ve(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function n5(n){let e,t,i;function s(o){n[36](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new p4({props:l}),ie.push(()=>ve(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function i5(n){let e,t,i;function s(o){n[35](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new DM({props:l}),ie.push(()=>ve(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function s5(n){let e,t,i;function s(o){n[34](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new u4({props:l}),ie.push(()=>ve(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function l5(n){let e,t,i;function s(o){n[33](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new l4({props:l}),ie.push(()=>ve(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function o5(n){let e,t,i;function s(o){n[32](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new t4({props:l}),ie.push(()=>ve(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function r5(n){let e,t,i;function s(o){n[31](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new X$({props:l}),ie.push(()=>ve(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function a5(n){let e,t,i;function s(o){n[30](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new K$({props:l}),ie.push(()=>ve(e,"value",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function Ep(n,e){let t,i,s,l,o;const r=[a5,r5,o5,l5,s5,i5,n5,t5,e5,QM,xM],a=[];function u(f,c){return f[51].type==="text"?0:f[51].type==="number"?1:f[51].type==="bool"?2:f[51].type==="email"?3:f[51].type==="url"?4:f[51].type==="editor"?5:f[51].type==="date"?6:f[51].type==="select"?7:f[51].type==="json"?8:f[51].type==="file"?9:f[51].type==="relation"?10:-1}return~(i=u(e))&&(s=a[i]=r[i](e)),{key:n,first:null,c(){t=Ae(),s&&s.c(),l=Ae(),this.first=t},m(f,c){S(f,t,c),~i&&a[i].m(f,c),S(f,l,c),o=!0},p(f,c){e=f;let d=i;i=u(e),i===d?~i&&a[i].p(e,c):(s&&(pe(),P(a[d],1,1,()=>{a[d]=null}),me()),~i?(s=a[i],s?s.p(e,c):(s=a[i]=r[i](e),s.c()),A(s,1),s.m(l.parentNode,l)):s=null)},i(f){o||(A(s),o=!0)},o(f){P(s),o=!1},d(f){f&&w(t),~i&&a[i].d(f),f&&w(l)}}}function Ap(n){let e,t,i;return t=new GM({props:{record:n[2]}}),{c(){e=v("div"),V(t.$$.fragment),p(e,"class","tab-item"),x(e,"active",n[10]===yl)},m(s,l){S(s,e,l),H(t,e,null),i=!0},p(s,l){const o={};l[0]&4&&(o.record=s[2]),t.$set(o),(!i||l[0]&1024)&&x(e,"active",s[10]===yl)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),q(t)}}}function u5(n){var b,y;let e,t,i,s,l=[],o=new Map,r,a,u,f,c=!n[2].isNew&&Mp(n),d=((b=n[0])==null?void 0:b.isAuth)&&Dp(n),m=((y=n[0])==null?void 0:y.schema)||[];const h=k=>k[51].name;for(let k=0;k{c=null}),me()):c?(c.p(k,T),T[0]&4&&A(c,1)):(c=Mp(k),c.c(),A(c,1),c.m(t,i)),(C=k[0])!=null&&C.isAuth?d?(d.p(k,T),T[0]&1&&A(d,1)):(d=Dp(k),d.c(),A(d,1),d.m(t,s)):d&&(pe(),P(d,1,1,()=>{d=null}),me()),T[0]&29&&(m=((M=k[0])==null?void 0:M.schema)||[],pe(),l=wt(l,T,h,1,k,m,o,t,nn,Ep,null,$p),me()),(!a||T[0]&1024)&&x(t,"active",k[10]===Yi),k[0].isAuth&&!k[2].isNew?g?(g.p(k,T),T[0]&5&&A(g,1)):(g=Ap(k),g.c(),A(g,1),g.m(e,null)):g&&(pe(),P(g,1,1,()=>{g=null}),me())},i(k){if(!a){A(c),A(d);for(let T=0;T - Send verification email`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[23]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function Lp(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - Send password reset email`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[24]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function f5(n){let e,t,i,s,l,o,r,a=n[0].isAuth&&!n[7].verified&&n[7].email&&Pp(n),u=n[0].isAuth&&n[7].email&&Lp(n);return{c(){a&&a.c(),e=D(),u&&u.c(),t=D(),i=v("button"),i.innerHTML=` - Duplicate`,s=D(),l=v("button"),l.innerHTML=` - Delete`,p(i,"type","button"),p(i,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item txt-danger closable")},m(f,c){a&&a.m(f,c),S(f,e,c),u&&u.m(f,c),S(f,t,c),S(f,i,c),S(f,s,c),S(f,l,c),o||(r=[K(i,"click",n[25]),K(l,"click",yn(pt(n[26])))],o=!0)},p(f,c){f[0].isAuth&&!f[7].verified&&f[7].email?a?a.p(f,c):(a=Pp(f),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null),f[0].isAuth&&f[7].email?u?u.p(f,c):(u=Lp(f),u.c(),u.m(t.parentNode,t)):u&&(u.d(1),u=null)},d(f){a&&a.d(f),f&&w(e),u&&u.d(f),f&&w(t),f&&w(i),f&&w(s),f&&w(l),o=!1,Le(r)}}}function Np(n){let e,t,i,s,l,o;return{c(){e=v("div"),t=v("button"),t.textContent="Account",i=D(),s=v("button"),s.textContent="Authorized providers",p(t,"type","button"),p(t,"class","tab-item"),x(t,"active",n[10]===Yi),p(s,"type","button"),p(s,"class","tab-item"),x(s,"active",n[10]===yl),p(e,"class","tabs-header stretched")},m(r,a){S(r,e,a),_(e,t),_(e,i),_(e,s),l||(o=[K(t,"click",n[27]),K(s,"click",n[28])],l=!0)},p(r,a){a[0]&1024&&x(t,"active",r[10]===Yi),a[0]&1024&&x(s,"active",r[10]===yl)},d(r){r&&w(e),l=!1,Le(o)}}}function c5(n){var g;let e,t=n[2].isNew?"New":"Edit",i,s,l,o=((g=n[0])==null?void 0:g.name)+"",r,a,u,f,c,d,m=!n[2].isNew&&Ip(n),h=n[0].isAuth&&!n[2].isNew&&Np(n);return{c(){e=v("h4"),i=z(t),s=D(),l=v("strong"),r=z(o),a=z(" record"),u=D(),m&&m.c(),f=D(),h&&h.c(),c=Ae()},m(b,y){S(b,e,y),_(e,i),_(e,s),_(e,l),_(l,r),_(e,a),S(b,u,y),m&&m.m(b,y),S(b,f,y),h&&h.m(b,y),S(b,c,y),d=!0},p(b,y){var k;(!d||y[0]&4)&&t!==(t=b[2].isNew?"New":"Edit")&&re(i,t),(!d||y[0]&1)&&o!==(o=((k=b[0])==null?void 0:k.name)+"")&&re(r,o),b[2].isNew?m&&(pe(),P(m,1,1,()=>{m=null}),me()):m?(m.p(b,y),y[0]&4&&A(m,1)):(m=Ip(b),m.c(),A(m,1),m.m(f.parentNode,f)),b[0].isAuth&&!b[2].isNew?h?h.p(b,y):(h=Np(b),h.c(),h.m(c.parentNode,c)):h&&(h.d(1),h=null)},i(b){d||(A(m),d=!0)},o(b){P(m),d=!1},d(b){b&&w(e),b&&w(u),m&&m.d(b),b&&w(f),h&&h.d(b),b&&w(c)}}}function d5(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=D(),s=v("button"),l=v("span"),r=z(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[8],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[13]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[11]||n[8],x(s,"btn-loading",n[8])},m(c,d){S(c,e,d),_(e,t),S(c,i,d),S(c,s,d),_(s,l),_(l,r),u||(f=K(e,"click",n[22]),u=!0)},p(c,d){d[0]&256&&(e.disabled=c[8]),d[0]&4&&o!==(o=c[2].isNew?"Create":"Save changes")&&re(r,o),d[0]&2304&&a!==(a=!c[11]||c[8])&&(s.disabled=a),d[0]&256&&x(s,"btn-loading",c[8])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,f()}}}function p5(n){var s;let e,t,i={class:` - record-panel - `+(n[12]?"overlay-panel-xl":"overlay-panel-lg")+` - `+((s=n[0])!=null&&s.isAuth&&!n[2].isNew?"colored-header":"")+` - `,beforeHide:n[43],$$slots:{footer:[d5],header:[c5],default:[u5]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[44](e),e.$on("hide",n[45]),e.$on("show",n[46]),{c(){V(e.$$.fragment)},m(l,o){H(e,l,o),t=!0},p(l,o){var a;const r={};o[0]&4101&&(r.class=` - record-panel - `+(l[12]?"overlay-panel-xl":"overlay-panel-lg")+` - `+((a=l[0])!=null&&a.isAuth&&!l[2].isNew?"colored-header":"")+` - `),o[0]&544&&(r.beforeHide=l[43]),o[0]&3485|o[1]&16777216&&(r.$$scope={dirty:o,ctx:l}),e.$set(r)},i(l){t||(A(e.$$.fragment,l),t=!0)},o(l){P(e.$$.fragment,l),t=!1},d(l){n[44](null),q(e,l)}}}const Yi="form",yl="providers";function Fp(n){return JSON.stringify(n)}function m5(n,e,t){let i,s,l,o;const r=$t(),a="record_"+B.randomString(5);let{collection:u}=e,f,c=null,d=new Ki,m=!1,h=!1,g={},b={},y="",k=Yi;function T(ce){return M(ce),t(9,h=!0),t(10,k=Yi),f==null?void 0:f.show()}function C(){return f==null?void 0:f.hide()}async function M(ce){Vn({}),t(7,c=ce||{}),ce!=null&&ce.clone?t(2,d=ce.clone()):t(2,d=new Ki),t(3,g={}),t(4,b={}),await tn(),t(20,y=Fp(d))}function $(){if(m||!o||!(u!=null&&u.id))return;t(8,m=!0);const ce=E();let $e;d.isNew?$e=he.collection(u.id).create(ce):$e=he.collection(u.id).update(d.id,ce),$e.then(Ze=>{Vt(d.isNew?"Successfully created record.":"Successfully updated record."),t(9,h=!1),C(),r("save",Ze)}).catch(Ze=>{he.errorResponseHandler(Ze)}).finally(()=>{t(8,m=!1)})}function O(){c!=null&&c.id&&fn("Do you really want to delete the selected record?",()=>he.collection(c.collectionId).delete(c.id).then(()=>{C(),Vt("Successfully deleted record."),r("delete",c)}).catch(ce=>{he.errorResponseHandler(ce)}))}function E(){const ce=(d==null?void 0:d.export())||{},$e=new FormData,Ze={};for(const it of(u==null?void 0:u.schema)||[])Ze[it.name]=!0;u!=null&&u.isAuth&&(Ze.username=!0,Ze.email=!0,Ze.emailVisibility=!0,Ze.password=!0,Ze.passwordConfirm=!0,Ze.verified=!0);for(const it in ce)Ze[it]&&(typeof ce[it]>"u"&&(ce[it]=null),B.addValueToFormData($e,it,ce[it]));for(const it in g){const Mt=B.toArray(g[it]);for(const ot of Mt)$e.append(it,ot)}for(const it in b){const Mt=B.toArray(b[it]);for(const ot of Mt)$e.append(it+"."+ot,"")}return $e}function I(){!(u!=null&&u.id)||!(c!=null&&c.email)||fn(`Do you really want to sent verification email to ${c.email}?`,()=>he.collection(u.id).requestVerification(c.email).then(()=>{Vt(`Successfully sent verification email to ${c.email}.`)}).catch(ce=>{he.errorResponseHandler(ce)}))}function L(){!(u!=null&&u.id)||!(c!=null&&c.email)||fn(`Do you really want to sent password reset email to ${c.email}?`,()=>he.collection(u.id).requestPasswordReset(c.email).then(()=>{Vt(`Successfully sent password reset email to ${c.email}.`)}).catch(ce=>{he.errorResponseHandler(ce)}))}function N(){l?fn("You have unsaved changes. Do you really want to discard them?",()=>{F()}):F()}async function F(){const ce=c==null?void 0:c.clone();if(ce){ce.id="",ce.created="",ce.updated="";const $e=(u==null?void 0:u.schema)||[];for(const Ze of $e)Ze.type==="file"&&delete ce[Ze.name]}T(ce),await tn(),t(20,y="")}const U=()=>C(),J=()=>I(),ne=()=>L(),Z=()=>N(),te=()=>O(),ee=()=>t(10,k=Yi),R=()=>t(10,k=yl);function X(ce){d=ce,t(2,d)}function Y(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function se(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function He(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function Re(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function Fe(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function qe(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function ge(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function Se(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function Ue(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function lt(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}function ue(ce,$e){n.$$.not_equal(g[$e.name],ce)&&(g[$e.name]=ce,t(3,g))}function fe(ce,$e){n.$$.not_equal(b[$e.name],ce)&&(b[$e.name]=ce,t(4,b))}function ae(ce,$e){n.$$.not_equal(d[$e.name],ce)&&(d[$e.name]=ce,t(2,d))}const oe=()=>l&&h?(fn("You have unsaved changes. Do you really want to close the panel?",()=>{t(9,h=!1),C()}),!1):(Vn({}),!0);function je(ce){ie[ce?"unshift":"push"](()=>{f=ce,t(6,f)})}function Me(ce){We.call(this,n,ce)}function Te(ce){We.call(this,n,ce)}return n.$$set=ce=>{"collection"in ce&&t(0,u=ce.collection)},n.$$.update=()=>{var ce;n.$$.dirty[0]&1&&t(12,i=!!((ce=u==null?void 0:u.schema)!=null&&ce.find($e=>$e.type==="editor"))),n.$$.dirty[0]&24&&t(21,s=B.hasNonEmptyProps(g)||B.hasNonEmptyProps(b)),n.$$.dirty[0]&3145732&&t(5,l=s||y!=Fp(d)),n.$$.dirty[0]&36&&t(11,o=d.isNew||l)},[u,C,d,g,b,l,f,c,m,h,k,o,i,a,$,O,I,L,N,T,y,s,U,J,ne,Z,te,ee,R,X,Y,se,He,Re,Fe,qe,ge,Se,Ue,lt,ue,fe,ae,oe,je,Me,Te]}class cb extends ke{constructor(e){super(),ye(this,e,m5,p5,be,{collection:0,show:19,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[19]}get hide(){return this.$$.ctx[1]}}function h5(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class",t=n[2]?n[1]:n[0])},m(o,r){S(o,e,r),s||(l=[Pe(i=Ye.call(null,e,n[2]?"":"Copy")),K(e,"click",yn(n[3]))],s=!0)},p(o,[r]){r&7&&t!==(t=o[2]?o[1]:o[0])&&p(e,"class",t),i&&zt(i.update)&&r&4&&i.update.call(null,o[2]?"":"Copy")},i:G,o:G,d(o){o&&w(e),s=!1,Le(l)}}}function g5(n,e,t){let{value:i=""}=e,{idleClasses:s="ri-file-copy-line txt-sm link-hint"}=e,{successClasses:l="ri-check-line txt-sm txt-success"}=e,{successDuration:o=500}=e,r;function a(){i&&(B.copyToClipboard(i),clearTimeout(r),t(2,r=setTimeout(()=>{clearTimeout(r),t(2,r=null)},o)))}return sn(()=>()=>{r&&clearTimeout(r)}),n.$$set=u=>{"value"in u&&t(4,i=u.value),"idleClasses"in u&&t(0,s=u.idleClasses),"successClasses"in u&&t(1,l=u.successClasses),"successDuration"in u&&t(5,o=u.successDuration)},[s,l,r,a,i,o]}class db extends ke{constructor(e){super(),ye(this,e,g5,h5,be,{value:4,idleClasses:0,successClasses:1,successDuration:5})}}function Rp(n,e,t){const i=n.slice();return i[12]=e[t],i[5]=t,i}function jp(n,e,t){const i=n.slice();return i[9]=e[t],i}function Hp(n,e,t){const i=n.slice();return i[3]=e[t],i[5]=t,i}function qp(n,e,t){const i=n.slice();return i[3]=e[t],i[5]=t,i}function _5(n){const e=n.slice(),t=B.toArray(e[0][e[1].name]);e[6]=t;const i=B.toArray(e[0].expand[e[1].name]);return e[7]=i,e}function b5(n){let e,t=B.truncate(n[0][n[1].name])+"",i,s;return{c(){e=v("span"),i=z(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=B.truncate(n[0][n[1].name]))},m(l,o){S(l,e,o),_(e,i)},p(l,o){o&3&&t!==(t=B.truncate(l[0][l[1].name])+"")&&re(i,t),o&3&&s!==(s=B.truncate(l[0][l[1].name]))&&p(e,"title",s)},i:G,o:G,d(l){l&&w(e)}}}function v5(n){let e,t=[],i=new Map,s,l=B.toArray(n[0][n[1].name]);const o=r=>r[5]+r[12];for(let r=0;r20&&Up();return{c(){e=v("div"),i.c(),s=D(),u&&u.c(),p(e,"class","inline-flex")},m(f,c){S(f,e,c),r[t].m(e,null),_(e,s),u&&u.m(e,null),l=!0},p(f,c){let d=t;t=a(f),t===d?r[t].p(f,c):(pe(),P(r[d],1,1,()=>{r[d]=null}),me(),i=r[t],i?i.p(f,c):(i=r[t]=o[t](f),i.c()),A(i,1),i.m(e,s)),f[6].length>20?u||(u=Up(),u.c(),u.m(e,null)):u&&(u.d(1),u=null)},i(f){l||(A(i),l=!0)},o(f){P(i),l=!1},d(f){f&&w(e),r[t].d(),u&&u.d()}}}function k5(n){let e,t=[],i=new Map,s=B.toArray(n[0][n[1].name]);const l=o=>o[5]+o[3];for(let o=0;or[5]+r[3];for(let r=0;r{a[m]=null}),me(),s=a[i],s?s.p(f(c,i),d):(s=a[i]=r[i](f(c,i)),s.c()),A(s,1),s.m(e,null)),(!o||d&2&&l!==(l="col-type-"+c[1].type+" col-field-"+c[1].name+" svelte-4cdww"))&&p(e,"class",l)},i(c){o||(A(s),o=!0)},o(c){P(s),o=!1},d(c){c&&w(e),a[i].d()}}}function I5(n,e,t){let{record:i}=e,{field:s}=e;function l(o){We.call(this,n,o)}return n.$$set=o=>{"record"in o&&t(0,i=o.record),"field"in o&&t(1,s=o.field)},[i,s,l]}class P5 extends ke{constructor(e){super(),ye(this,e,I5,A5,be,{record:0,field:1})}}function Yp(n,e,t){const i=n.slice();return i[53]=e[t],i}function Kp(n,e,t){const i=n.slice();return i[56]=e[t],i}function Jp(n,e,t){const i=n.slice();return i[56]=e[t],i}function Zp(n,e,t){const i=n.slice();return i[49]=e[t],i}function L5(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("input"),s=D(),l=v("label"),p(t,"type","checkbox"),p(t,"id","checkbox_0"),t.disabled=i=!n[4].length,t.checked=n[14],p(l,"for","checkbox_0"),p(e,"class","form-field")},m(a,u){S(a,e,u),_(e,t),_(e,s),_(e,l),o||(r=K(t,"change",n[26]),o=!0)},p(a,u){u[0]&16&&i!==(i=!a[4].length)&&(t.disabled=i),u[0]&16384&&(t.checked=a[14])},d(a){a&&w(e),o=!1,r()}}}function N5(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function Gp(n){let e,t,i;function s(o){n[27](o)}let l={class:"col-type-text col-field-id",name:"id",$$slots:{default:[F5]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ut({props:l}),ie.push(()=>ve(e,"sort",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};r[1]&1073741824&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function F5(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="id",p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function Xp(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l,o=e&&xp(n),r=i&&Qp(n);return{c(){o&&o.c(),t=D(),r&&r.c(),s=Ae()},m(a,u){o&&o.m(a,u),S(a,t,u),r&&r.m(a,u),S(a,s,u),l=!0},p(a,u){u[0]&128&&(e=!a[7].includes("@username")),e?o?(o.p(a,u),u[0]&128&&A(o,1)):(o=xp(a),o.c(),A(o,1),o.m(t.parentNode,t)):o&&(pe(),P(o,1,1,()=>{o=null}),me()),u[0]&128&&(i=!a[7].includes("@email")),i?r?(r.p(a,u),u[0]&128&&A(r,1)):(r=Qp(a),r.c(),A(r,1),r.m(s.parentNode,s)):r&&(pe(),P(r,1,1,()=>{r=null}),me())},i(a){l||(A(o),A(r),l=!0)},o(a){P(o),P(r),l=!1},d(a){o&&o.d(a),a&&w(t),r&&r.d(a),a&&w(s)}}}function xp(n){let e,t,i;function s(o){n[28](o)}let l={class:"col-type-text col-field-id",name:"username",$$slots:{default:[R5]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ut({props:l}),ie.push(()=>ve(e,"sort",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};r[1]&1073741824&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function R5(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="username",p(t,"class",B.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function Qp(n){let e,t,i;function s(o){n[29](o)}let l={class:"col-type-email col-field-email",name:"email",$$slots:{default:[j5]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ut({props:l}),ie.push(()=>ve(e,"sort",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};r[1]&1073741824&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function j5(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="email",p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function H5(n){let e,t,i,s,l,o=n[56].name+"",r;return{c(){e=v("div"),t=v("i"),s=D(),l=v("span"),r=z(o),p(t,"class",i=B.getFieldTypeIcon(n[56].type)),p(l,"class","txt"),p(e,"class","col-header-content")},m(a,u){S(a,e,u),_(e,t),_(e,s),_(e,l),_(l,r)},p(a,u){u[0]&65536&&i!==(i=B.getFieldTypeIcon(a[56].type))&&p(t,"class",i),u[0]&65536&&o!==(o=a[56].name+"")&&re(r,o)},d(a){a&&w(e)}}}function em(n,e){let t,i,s,l;function o(a){e[30](a)}let r={class:"col-type-"+e[56].type+" col-field-"+e[56].name,name:e[56].name,$$slots:{default:[H5]},$$scope:{ctx:e}};return e[0]!==void 0&&(r.sort=e[0]),i=new Ut({props:r}),ie.push(()=>ve(i,"sort",o)),{key:n,first:null,c(){t=Ae(),V(i.$$.fragment),this.first=t},m(a,u){S(a,t,u),H(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&65536&&(f.class="col-type-"+e[56].type+" col-field-"+e[56].name),u[0]&65536&&(f.name=e[56].name),u[0]&65536|u[1]&1073741824&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.sort=e[0],we(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){P(i.$$.fragment,a),l=!1},d(a){a&&w(t),q(i,a)}}}function tm(n){let e,t,i;function s(o){n[31](o)}let l={class:"col-type-date col-field-created",name:"created",$$slots:{default:[q5]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ut({props:l}),ie.push(()=>ve(e,"sort",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};r[1]&1073741824&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function q5(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function nm(n){let e,t,i;function s(o){n[32](o)}let l={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[V5]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ut({props:l}),ie.push(()=>ve(e,"sort",s)),{c(){V(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};r[1]&1073741824&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],we(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){q(e,o)}}}function V5(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="updated",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function im(n){let e;function t(l,o){return l[10]?B5:z5}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function z5(n){let e,t,i,s,l;function o(u,f){var c;return(c=u[1])!=null&&c.length?W5:U5}let r=o(n),a=r(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No records found.",s=D(),a.c(),l=D(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(u,f){S(u,e,f),_(e,t),_(t,i),_(t,s),a.m(t,null),_(e,l)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a.d(1),a=r(u),a&&(a.c(),a.m(t,null)))},d(u){u&&w(e),a.d()}}}function B5(n){let e;return{c(){e=v("tr"),e.innerHTML=` - `},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function U5(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - New record`,p(e,"type","button"),p(e,"class","btn btn-secondary btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[38]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function W5(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[37]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function sm(n){let e,t,i,s,l,o,r=n[53].id+"",a,u,f;s=new db({props:{value:n[53].id}});let c=n[2].isAuth&&lm(n);return{c(){e=v("td"),t=v("div"),i=v("div"),V(s.$$.fragment),l=D(),o=v("div"),a=z(r),u=D(),c&&c.c(),p(o,"class","txt"),p(i,"class","label"),p(t,"class","flex flex-gap-5"),p(e,"class","col-type-text col-field-id")},m(d,m){S(d,e,m),_(e,t),_(t,i),H(s,i,null),_(i,l),_(i,o),_(o,a),_(t,u),c&&c.m(t,null),f=!0},p(d,m){const h={};m[0]&16&&(h.value=d[53].id),s.$set(h),(!f||m[0]&16)&&r!==(r=d[53].id+"")&&re(a,r),d[2].isAuth?c?c.p(d,m):(c=lm(d),c.c(),c.m(t,null)):c&&(c.d(1),c=null)},i(d){f||(A(s.$$.fragment,d),f=!0)},o(d){P(s.$$.fragment,d),f=!1},d(d){d&&w(e),q(s),c&&c.d()}}}function lm(n){let e;function t(l,o){return l[53].verified?K5:Y5}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i!==(i=t(l))&&(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function Y5(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-sm txt-hint")},m(s,l){S(s,e,l),t||(i=Pe(Ye.call(null,e,"Unverified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function K5(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-sm txt-success")},m(s,l){S(s,e,l),t||(i=Pe(Ye.call(null,e,"Verified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function om(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l=e&&rm(n),o=i&&am(n);return{c(){l&&l.c(),t=D(),o&&o.c(),s=Ae()},m(r,a){l&&l.m(r,a),S(r,t,a),o&&o.m(r,a),S(r,s,a)},p(r,a){a[0]&128&&(e=!r[7].includes("@username")),e?l?l.p(r,a):(l=rm(r),l.c(),l.m(t.parentNode,t)):l&&(l.d(1),l=null),a[0]&128&&(i=!r[7].includes("@email")),i?o?o.p(r,a):(o=am(r),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},d(r){l&&l.d(r),r&&w(t),o&&o.d(r),r&&w(s)}}}function rm(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!B.isEmpty(o[53].username)),t?Z5:J5}let s=i(n,[-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-username")},m(o,r){S(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&w(e),l.d()}}}function J5(n){let e,t=n[53].username+"",i,s;return{c(){e=v("span"),i=z(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[53].username)},m(l,o){S(l,e,o),_(e,i)},p(l,o){o[0]&16&&t!==(t=l[53].username+"")&&re(i,t),o[0]&16&&s!==(s=l[53].username)&&p(e,"title",s)},d(l){l&&w(e)}}}function Z5(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function am(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!B.isEmpty(o[53].email)),t?X5:G5}let s=i(n,[-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-email")},m(o,r){S(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&w(e),l.d()}}}function G5(n){let e,t=n[53].email+"",i,s;return{c(){e=v("span"),i=z(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[53].email)},m(l,o){S(l,e,o),_(e,i)},p(l,o){o[0]&16&&t!==(t=l[53].email+"")&&re(i,t),o[0]&16&&s!==(s=l[53].email)&&p(e,"title",s)},d(l){l&&w(e)}}}function X5(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function um(n,e){let t,i,s;return i=new P5({props:{record:e[53],field:e[56]}}),{key:n,first:null,c(){t=Ae(),V(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),H(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&16&&(r.record=e[53]),o[0]&65536&&(r.field=e[56]),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),q(i,l)}}}function fm(n){let e,t,i;return t=new Zi({props:{date:n[53].created}}),{c(){e=v("td"),V(t.$$.fragment),p(e,"class","col-type-date col-field-created")},m(s,l){S(s,e,l),H(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[53].created),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),q(t)}}}function cm(n){let e,t,i;return t=new Zi({props:{date:n[53].updated}}),{c(){e=v("td"),V(t.$$.fragment),p(e,"class","col-type-date col-field-updated")},m(s,l){S(s,e,l),H(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[53].updated),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),q(t)}}}function dm(n,e){let t,i,s,l,o,r,a,u,f,c,d=!e[7].includes("@id"),m,h,g=[],b=new Map,y,k=!e[7].includes("@created"),T,C=!e[7].includes("@updated"),M,$,O,E,I,L;function N(){return e[34](e[53])}let F=d&&sm(e),U=e[2].isAuth&&om(e),J=e[16];const ne=X=>X[56].name;for(let X=0;X',O=D(),p(l,"type","checkbox"),p(l,"id",o="checkbox_"+e[53].id),l.checked=r=e[6][e[53].id],p(u,"for",f="checkbox_"+e[53].id),p(s,"class","form-field"),p(i,"class","bulk-select-col min-width"),p($,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(X,Y){S(X,t,Y),_(t,i),_(i,s),_(s,l),_(s,a),_(s,u),_(t,c),F&&F.m(t,null),_(t,m),U&&U.m(t,null),_(t,h);for(let se=0;se{F=null}),me()),e[2].isAuth?U?U.p(e,Y):(U=om(e),U.c(),U.m(t,h)):U&&(U.d(1),U=null),Y[0]&65552&&(J=e[16],pe(),g=wt(g,Y,ne,1,e,J,b,t,nn,um,y,Kp),me()),Y[0]&128&&(k=!e[7].includes("@created")),k?Z?(Z.p(e,Y),Y[0]&128&&A(Z,1)):(Z=fm(e),Z.c(),A(Z,1),Z.m(t,T)):Z&&(pe(),P(Z,1,1,()=>{Z=null}),me()),Y[0]&128&&(C=!e[7].includes("@updated")),C?te?(te.p(e,Y),Y[0]&128&&A(te,1)):(te=cm(e),te.c(),A(te,1),te.m(t,M)):te&&(pe(),P(te,1,1,()=>{te=null}),me())},i(X){if(!E){A(F);for(let Y=0;YR[56].name;for(let R=0;RR[53].id;for(let R=0;R',k=D(),T=v("tbody");for(let R=0;R{L=null}),me()),R[2].isAuth?N?(N.p(R,X),X[0]&4&&A(N,1)):(N=Xp(R),N.c(),A(N,1),N.m(i,a)):N&&(pe(),P(N,1,1,()=>{N=null}),me()),X[0]&65537&&(F=R[16],pe(),u=wt(u,X,U,1,R,F,f,i,nn,em,c,Jp),me()),X[0]&128&&(d=!R[7].includes("@created")),d?J?(J.p(R,X),X[0]&128&&A(J,1)):(J=tm(R),J.c(),A(J,1),J.m(i,m)):J&&(pe(),P(J,1,1,()=>{J=null}),me()),X[0]&128&&(h=!R[7].includes("@updated")),h?ne?(ne.p(R,X),X[0]&128&&A(ne,1)):(ne=nm(R),ne.c(),A(ne,1),ne.m(i,g)):ne&&(pe(),P(ne,1,1,()=>{ne=null}),me()),X[0]&1246422&&(Z=R[4],pe(),C=wt(C,X,te,1,R,Z,M,T,nn,dm,null,Yp),me(),!Z.length&&ee?ee.p(R,X):Z.length?ee&&(ee.d(1),ee=null):(ee=im(R),ee.c(),ee.m(T,null))),(!$||X[0]&1024)&&x(e,"table-loading",R[10])},i(R){if(!$){A(L),A(N);for(let X=0;X({52:l}),({uniqueId:l})=>[0,l?2097152:0]]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=Ae(),V(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),H(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&8320|o[1]&1075838976&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),q(i,l)}}}function eD(n){let e,t,i=[],s=new Map,l,o,r=n[13];const a=u=>u[49].id+u[49].name;for(let u=0;uReset',c=D(),d=v("div"),m=D(),h=v("button"),h.innerHTML='Delete selected',p(t,"class","txt"),p(f,"type","button"),p(f,"class","btn btn-xs btn-transparent btn-outline p-l-5 p-r-5"),x(f,"btn-disabled",n[11]),p(d,"class","flex-fill"),p(h,"type","button"),p(h,"class","btn btn-sm btn-transparent btn-danger"),x(h,"btn-loading",n[11]),x(h,"btn-disabled",n[11]),p(e,"class","bulkbar")},m(T,C){S(T,e,C),_(e,t),_(t,i),_(t,s),_(s,l),_(t,o),_(t,a),_(e,u),_(e,f),_(e,c),_(e,d),_(e,m),_(e,h),b=!0,y||(k=[K(f,"click",n[40]),K(h,"click",n[41])],y=!0)},p(T,C){(!b||C[0]&256)&&re(l,T[8]),(!b||C[0]&256)&&r!==(r=T[8]===1?"record":"records")&&re(a,r),(!b||C[0]&2048)&&x(f,"btn-disabled",T[11]),(!b||C[0]&2048)&&x(h,"btn-loading",T[11]),(!b||C[0]&2048)&&x(h,"btn-disabled",T[11])},i(T){b||(T&&nt(()=>{g||(g=ze(e,En,{duration:150,y:5},!0)),g.run(1)}),b=!0)},o(T){T&&(g||(g=ze(e,En,{duration:150,y:5},!1)),g.run(0)),b=!1},d(T){T&&w(e),T&&g&&g.end(),y=!1,Le(k)}}}function nD(n){let e,t,i,s,l,o;e=new Oa({props:{class:"table-wrapper",$$slots:{before:[tD],default:[x5]},$$scope:{ctx:n}}});let r=n[4].length&&mm(n),a=n[4].length&&n[15]&&hm(n),u=n[8]&&gm(n);return{c(){V(e.$$.fragment),t=D(),r&&r.c(),i=D(),a&&a.c(),s=D(),u&&u.c(),l=Ae()},m(f,c){H(e,f,c),S(f,t,c),r&&r.m(f,c),S(f,i,c),a&&a.m(f,c),S(f,s,c),u&&u.m(f,c),S(f,l,c),o=!0},p(f,c){const d={};c[0]&95447|c[1]&1073741824&&(d.$$scope={dirty:c,ctx:f}),e.$set(d),f[4].length?r?r.p(f,c):(r=mm(f),r.c(),r.m(i.parentNode,i)):r&&(r.d(1),r=null),f[4].length&&f[15]?a?a.p(f,c):(a=hm(f),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null),f[8]?u?(u.p(f,c),c[0]&256&&A(u,1)):(u=gm(f),u.c(),A(u,1),u.m(l.parentNode,l)):u&&(pe(),P(u,1,1,()=>{u=null}),me())},i(f){o||(A(e.$$.fragment,f),A(u),o=!0)},o(f){P(e.$$.fragment,f),P(u),o=!1},d(f){q(e,f),f&&w(t),r&&r.d(f),f&&w(i),a&&a.d(f),f&&w(s),u&&u.d(f),f&&w(l)}}}const iD=/^([\+\-])?(\w+)$/;function sD(n,e,t){let i,s,l,o,r,a;const u=$t();let{collection:f}=e,{sort:c=""}=e,{filter:d=""}=e,m=[],h=1,g=0,b={},y=!0,k=!1,T=0,C,M=[],$=[];function O(){f!=null&&f.id&&localStorage.setItem((f==null?void 0:f.id)+"@hiddenCollumns",JSON.stringify(M))}function E(){if(t(7,M=[]),!!(f!=null&&f.id))try{const Me=localStorage.getItem(f.id+"@hiddenCollumns");Me&&t(7,M=JSON.parse(Me)||[])}catch{}}async function I(){const Me=h;for(let Te=1;Te<=Me;Te++)(Te===1||o)&&await L(Te,!1)}async function L(Me=1,Te=!0){var it,Mt;if(!(f!=null&&f.id))return;t(10,y=!0);let ce=c;const $e=ce.match(iD),Ze=$e?s.find(ot=>ot.name===$e[2]):null;if($e&&((Mt=(it=Ze==null?void 0:Ze.options)==null?void 0:it.displayFields)==null?void 0:Mt.length)>0){const ot=[];for(const Qn of Ze.options.displayFields)ot.push(($e[1]||"")+$e[2]+"."+Qn);ce=ot.join(",")}return he.collection(f.id).getList(Me,30,{sort:ce,filter:d,expand:s.map(ot=>ot.name).join(",")}).then(async ot=>{if(Me<=1&&N(),t(10,y=!1),t(9,h=ot.page),t(5,g=ot.totalItems),u("load",m.concat(ot.items)),Te){const Qn=++T;for(;ot.items.length&&T==Qn;)t(4,m=m.concat(ot.items.splice(0,15))),await B.yieldToMain()}else t(4,m=m.concat(ot.items))}).catch(ot=>{ot!=null&&ot.isAbort||(t(10,y=!1),console.warn(ot),N(),he.errorResponseHandler(ot,!1))})}function N(){t(4,m=[]),t(9,h=1),t(5,g=0),t(6,b={})}function F(){a?U():J()}function U(){t(6,b={})}function J(){for(const Me of m)t(6,b[Me.id]=Me,b);t(6,b)}function ne(Me){b[Me.id]?delete b[Me.id]:t(6,b[Me.id]=Me,b),t(6,b)}function Z(){fn(`Do you really want to delete the selected ${r===1?"record":"records"}?`,te)}async function te(){if(k||!r||!(f!=null&&f.id))return;let Me=[];for(const Te of Object.keys(b))Me.push(he.collection(f.id).delete(Te));return t(11,k=!0),Promise.all(Me).then(()=>{Vt(`Successfully deleted the selected ${r===1?"record":"records"}.`),U()}).catch(Te=>{he.errorResponseHandler(Te)}).finally(()=>(t(11,k=!1),I()))}function ee(Me){We.call(this,n,Me)}const R=(Me,Te)=>{Te.target.checked?B.removeByValue(M,Me.id):B.pushUnique(M,Me.id),t(7,M)},X=()=>F();function Y(Me){c=Me,t(0,c)}function se(Me){c=Me,t(0,c)}function He(Me){c=Me,t(0,c)}function Re(Me){c=Me,t(0,c)}function Fe(Me){c=Me,t(0,c)}function qe(Me){c=Me,t(0,c)}function ge(Me){ie[Me?"unshift":"push"](()=>{C=Me,t(12,C)})}const Se=Me=>ne(Me),Ue=Me=>u("select",Me),lt=(Me,Te)=>{Te.code==="Enter"&&(Te.preventDefault(),u("select",Me))},ue=()=>t(1,d=""),fe=()=>u("new"),ae=()=>L(h+1),oe=()=>U(),je=()=>Z();return n.$$set=Me=>{"collection"in Me&&t(2,f=Me.collection),"sort"in Me&&t(0,c=Me.sort),"filter"in Me&&t(1,d=Me.filter)},n.$$.update=()=>{n.$$.dirty[0]&4&&f!=null&&f.id&&(E(),N()),n.$$.dirty[0]&4&&t(23,i=(f==null?void 0:f.schema)||[]),n.$$.dirty[0]&8388608&&(s=i.filter(Me=>Me.type==="relation")),n.$$.dirty[0]&8388736&&t(16,l=i.filter(Me=>!M.includes(Me.id))),n.$$.dirty[0]&7&&f!=null&&f.id&&c!==-1&&d!==-1&&L(1),n.$$.dirty[0]&48&&t(15,o=g>m.length),n.$$.dirty[0]&64&&t(8,r=Object.keys(b).length),n.$$.dirty[0]&272&&t(14,a=m.length&&r===m.length),n.$$.dirty[0]&128&&M!==-1&&O(),n.$$.dirty[0]&8388612&&t(13,$=[].concat(f.isAuth?[{id:"@username",name:"username"},{id:"@email",name:"email"}]:[],i.map(Me=>({id:Me.id,name:Me.name})),[{id:"@created",name:"created"},{id:"@updated",name:"updated"}]))},[c,d,f,L,m,g,b,M,r,h,y,k,C,$,a,o,l,u,F,U,ne,Z,I,i,ee,R,X,Y,se,He,Re,Fe,qe,ge,Se,Ue,lt,ue,fe,ae,oe,je]}class lD extends ke{constructor(e){super(),ye(this,e,sD,nD,be,{collection:2,sort:0,filter:1,reloadLoadedPages:22,load:3},null,[-1,-1])}get reloadLoadedPages(){return this.$$.ctx[22]}get load(){return this.$$.ctx[3]}}function oD(n){let e,t,i,s;return e=new S$({}),i=new kn({props:{$$slots:{default:[uD]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment),t=D(),V(i.$$.fragment)},m(l,o){H(e,l,o),S(l,t,o),H(i,l,o),s=!0},p(l,o){const r={};o[0]&759|o[1]&2&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){q(e,l),l&&w(t),q(i,l)}}}function rD(n){let e,t;return e=new kn({props:{center:!0,$$slots:{default:[dD]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s[0]&528|s[1]&2&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function aD(n){let e,t;return e=new kn({props:{center:!0,$$slots:{default:[pD]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s[1]&2&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function _m(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"aria-label","Edit collection"),p(e,"class","btn btn-transparent btn-circle")},m(s,l){S(s,e,l),t||(i=[Pe(Ye.call(null,e,{text:"Edit collection",position:"right"})),K(e,"click",n[14])],t=!0)},p:G,d(s){s&&w(e),t=!1,Le(i)}}}function uD(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$,O,E,I,L,N,F=!n[9]&&_m(n);c=new Da({}),c.$on("refresh",n[15]),k=new Uo({props:{value:n[0],autocompleteCollection:n[2]}}),k.$on("submit",n[18]);function U(Z){n[20](Z)}function J(Z){n[21](Z)}let ne={collection:n[2]};return n[0]!==void 0&&(ne.filter=n[0]),n[1]!==void 0&&(ne.sort=n[1]),$=new lD({props:ne}),n[19]($),ie.push(()=>ve($,"filter",U)),ie.push(()=>ve($,"sort",J)),$.$on("select",n[22]),$.$on("new",n[23]),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Collections",s=D(),l=v("div"),r=z(o),a=D(),u=v("div"),F&&F.c(),f=D(),V(c.$$.fragment),d=D(),m=v("div"),h=v("button"),h.innerHTML=` - API Preview`,g=D(),b=v("button"),b.innerHTML=` - New record`,y=D(),V(k.$$.fragment),T=D(),C=v("div"),M=D(),V($.$$.fragment),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(u,"class","inline-flex gap-5"),p(h,"type","button"),p(h,"class","btn btn-outline"),p(b,"type","button"),p(b,"class","btn btn-expanded"),p(m,"class","btns-group"),p(e,"class","page-header"),p(C,"class","clearfix m-b-base")},m(Z,te){S(Z,e,te),_(e,t),_(t,i),_(t,s),_(t,l),_(l,r),_(e,a),_(e,u),F&&F.m(u,null),_(u,f),H(c,u,null),_(e,d),_(e,m),_(m,h),_(m,g),_(m,b),S(Z,y,te),H(k,Z,te),S(Z,T,te),S(Z,C,te),S(Z,M,te),H($,Z,te),I=!0,L||(N=[K(h,"click",n[16]),K(b,"click",n[17])],L=!0)},p(Z,te){(!I||te[0]&4)&&o!==(o=Z[2].name+"")&&re(r,o),Z[9]?F&&(F.d(1),F=null):F?F.p(Z,te):(F=_m(Z),F.c(),F.m(u,f));const ee={};te[0]&1&&(ee.value=Z[0]),te[0]&4&&(ee.autocompleteCollection=Z[2]),k.$set(ee);const R={};te[0]&4&&(R.collection=Z[2]),!O&&te[0]&1&&(O=!0,R.filter=Z[0],we(()=>O=!1)),!E&&te[0]&2&&(E=!0,R.sort=Z[1],we(()=>E=!1)),$.$set(R)},i(Z){I||(A(c.$$.fragment,Z),A(k.$$.fragment,Z),A($.$$.fragment,Z),I=!0)},o(Z){P(c.$$.fragment,Z),P(k.$$.fragment,Z),P($.$$.fragment,Z),I=!1},d(Z){Z&&w(e),F&&F.d(),q(c),Z&&w(y),q(k,Z),Z&&w(T),Z&&w(C),Z&&w(M),n[19](null),q($,Z),L=!1,Le(N)}}}function fD(n){let e,t,i,s,l;return{c(){e=v("h1"),e.textContent="Create your first collection to add records!",t=D(),i=v("button"),i.innerHTML=` - Create new collection`,p(e,"class","m-b-10"),p(i,"type","button"),p(i,"class","btn btn-expanded-lg btn-lg")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=K(i,"click",n[13]),s=!0)},p:G,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function cD(n){let e;return{c(){e=v("h1"),e.textContent="You don't have any collections yet.",p(e,"class","m-b-10")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function dD(n){let e,t,i;function s(r,a){return r[9]?cD:fD}let l=s(n),o=l(n);return{c(){e=v("div"),t=v("div"),t.innerHTML='',i=D(),o.c(),p(t,"class","icon"),p(e,"class","placeholder-section m-b-base")},m(r,a){S(r,e,a),_(e,t),_(e,i),o.m(e,null)},p(r,a){l===(l=s(r))&&o?o.p(r,a):(o.d(1),o=l(r),o&&(o.c(),o.m(e,null)))},d(r){r&&w(e),o.d()}}}function pD(n){let e;return{c(){e=v("div"),e.innerHTML=` -

    Loading collections...

    `,p(e,"class","placeholder-section m-b-base")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function mD(n){let e,t,i,s,l,o,r,a,u;const f=[aD,rD,oD],c=[];function d(b,y){return b[3]&&!b[8].length?0:b[8].length?2:1}e=d(n),t=c[e]=f[e](n);let m={};s=new tu({props:m}),n[24](s);let h={};o=new A$({props:h}),n[25](o);let g={collection:n[2]};return a=new cb({props:g}),n[26](a),a.$on("save",n[27]),a.$on("delete",n[28]),{c(){t.c(),i=D(),V(s.$$.fragment),l=D(),V(o.$$.fragment),r=D(),V(a.$$.fragment)},m(b,y){c[e].m(b,y),S(b,i,y),H(s,b,y),S(b,l,y),H(o,b,y),S(b,r,y),H(a,b,y),u=!0},p(b,y){let k=e;e=d(b),e===k?c[e].p(b,y):(pe(),P(c[k],1,1,()=>{c[k]=null}),me(),t=c[e],t?t.p(b,y):(t=c[e]=f[e](b),t.c()),A(t,1),t.m(i.parentNode,i));const T={};s.$set(T);const C={};o.$set(C);const M={};y[0]&4&&(M.collection=b[2]),a.$set(M)},i(b){u||(A(t),A(s.$$.fragment,b),A(o.$$.fragment,b),A(a.$$.fragment,b),u=!0)},o(b){P(t),P(s.$$.fragment,b),P(o.$$.fragment,b),P(a.$$.fragment,b),u=!1},d(b){c[e].d(b),b&&w(i),n[24](null),q(s,b),b&&w(l),n[25](null),q(o,b),b&&w(r),n[26](null),q(a,b)}}}function hD(n,e,t){let i,s,l,o,r,a,u;Je(n,Si,R=>t(2,s=R)),Je(n,St,R=>t(29,l=R)),Je(n,Po,R=>t(3,o=R)),Je(n,ma,R=>t(12,r=R)),Je(n,es,R=>t(8,a=R)),Je(n,Cs,R=>t(9,u=R));const f=new URLSearchParams(r);let c,d,m,h,g=f.get("filter")||"",b=f.get("sort")||"-created",y=f.get("collectionId")||(s==null?void 0:s.id);function k(){t(10,y=s.id),t(1,b="-created"),t(0,g="")}sb(y);const T=()=>c==null?void 0:c.show(),C=()=>c==null?void 0:c.show(s),M=()=>h==null?void 0:h.load(),$=()=>d==null?void 0:d.show(s),O=()=>m==null?void 0:m.show(),E=R=>t(0,g=R.detail);function I(R){ie[R?"unshift":"push"](()=>{h=R,t(7,h)})}function L(R){g=R,t(0,g)}function N(R){b=R,t(1,b)}const F=R=>m==null?void 0:m.show(R==null?void 0:R.detail),U=()=>m==null?void 0:m.show();function J(R){ie[R?"unshift":"push"](()=>{c=R,t(4,c)})}function ne(R){ie[R?"unshift":"push"](()=>{d=R,t(5,d)})}function Z(R){ie[R?"unshift":"push"](()=>{m=R,t(6,m)})}const te=()=>h==null?void 0:h.reloadLoadedPages(),ee=()=>h==null?void 0:h.reloadLoadedPages();return n.$$.update=()=>{if(n.$$.dirty[0]&4096&&t(11,i=new URLSearchParams(r)),n.$$.dirty[0]&3080&&!o&&i.get("collectionId")&&i.get("collectionId")!=y&&r3(i.get("collectionId")),n.$$.dirty[0]&1028&&s!=null&&s.id&&y!=s.id&&k(),n.$$.dirty[0]&7&&(b||g||s!=null&&s.id)){const R=new URLSearchParams({collectionId:(s==null?void 0:s.id)||"",filter:g,sort:b}).toString();Ti("/collections?"+R)}n.$$.dirty[0]&4&&Yt(St,l=(s==null?void 0:s.name)||"Collections",l)},[g,b,s,o,c,d,m,h,a,u,y,i,r,T,C,M,$,O,E,I,L,N,F,U,J,ne,Z,te,ee]}class gD extends ke{constructor(e){super(),ye(this,e,hD,mD,be,{},null,[-1,-1])}}function _D(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$,O,E,I;return{c(){e=v("aside"),t=v("div"),i=v("div"),i.textContent="System",s=D(),l=v("a"),l.innerHTML=` - Application`,o=D(),r=v("a"),r.innerHTML=` - Mail settings`,a=D(),u=v("a"),u.innerHTML=` - Files storage`,f=D(),c=v("div"),c.innerHTML='Sync',d=D(),m=v("a"),m.innerHTML=` - Export collections`,h=D(),g=v("a"),g.innerHTML=` - Import collections`,b=D(),y=v("div"),y.textContent="Authentication",k=D(),T=v("a"),T.innerHTML=` - Auth providers`,C=D(),M=v("a"),M.innerHTML=` - Token options`,$=D(),O=v("a"),O.innerHTML=` - Admins`,p(i,"class","sidebar-title"),p(l,"href","/settings"),p(l,"class","sidebar-list-item"),p(r,"href","/settings/mail"),p(r,"class","sidebar-list-item"),p(u,"href","/settings/storage"),p(u,"class","sidebar-list-item"),p(c,"class","sidebar-title"),p(m,"href","/settings/export-collections"),p(m,"class","sidebar-list-item"),p(g,"href","/settings/import-collections"),p(g,"class","sidebar-list-item"),p(y,"class","sidebar-title"),p(T,"href","/settings/auth-providers"),p(T,"class","sidebar-list-item"),p(M,"href","/settings/tokens"),p(M,"class","sidebar-list-item"),p(O,"href","/settings/admins"),p(O,"class","sidebar-list-item"),p(t,"class","sidebar-content"),p(e,"class","page-sidebar settings-sidebar")},m(L,N){S(L,e,N),_(e,t),_(t,i),_(t,s),_(t,l),_(t,o),_(t,r),_(t,a),_(t,u),_(t,f),_(t,c),_(t,d),_(t,m),_(t,h),_(t,g),_(t,b),_(t,y),_(t,k),_(t,T),_(t,C),_(t,M),_(t,$),_(t,O),E||(I=[Pe(Fn.call(null,l,{path:"/settings"})),Pe(Xt.call(null,l)),Pe(Fn.call(null,r,{path:"/settings/mail/?.*"})),Pe(Xt.call(null,r)),Pe(Fn.call(null,u,{path:"/settings/storage/?.*"})),Pe(Xt.call(null,u)),Pe(Fn.call(null,m,{path:"/settings/export-collections/?.*"})),Pe(Xt.call(null,m)),Pe(Fn.call(null,g,{path:"/settings/import-collections/?.*"})),Pe(Xt.call(null,g)),Pe(Fn.call(null,T,{path:"/settings/auth-providers/?.*"})),Pe(Xt.call(null,T)),Pe(Fn.call(null,M,{path:"/settings/tokens/?.*"})),Pe(Xt.call(null,M)),Pe(Fn.call(null,O,{path:"/settings/admins/?.*"})),Pe(Xt.call(null,O))],E=!0)},p:G,i:G,o:G,d(L){L&&w(e),E=!1,Le(I)}}}class Di extends ke{constructor(e){super(),ye(this,e,null,_D,be,{})}}function bm(n,e,t){const i=n.slice();return i[30]=e[t],i}function vm(n){let e,t;return e=new _e({props:{class:"form-field disabled",name:"id",$$slots:{default:[bD,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s[0]&536870914|s[1]&4&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function bD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="ID",o=D(),r=v("div"),a=v("i"),f=D(),c=v("input"),p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"for",l=n[29]),p(a,"class","ri-calendar-event-line txt-disabled"),p(r,"class","form-field-addon"),p(c,"type","text"),p(c,"id",d=n[29]),c.value=m=n[1].id,c.disabled=!0},m(b,y){S(b,e,y),_(e,t),_(e,i),_(e,s),S(b,o,y),S(b,r,y),_(r,a),S(b,f,y),S(b,c,y),h||(g=Pe(u=Ye.call(null,a,{text:`Created: ${n[1].created} -Updated: ${n[1].updated}`,position:"left"})),h=!0)},p(b,y){y[0]&536870912&&l!==(l=b[29])&&p(e,"for",l),u&&zt(u.update)&&y[0]&2&&u.update.call(null,{text:`Created: ${b[1].created} -Updated: ${b[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=b[29])&&p(c,"id",d),y[0]&2&&m!==(m=b[1].id)&&c.value!==m&&(c.value=m)},d(b){b&&w(e),b&&w(o),b&&w(r),b&&w(f),b&&w(c),h=!1,g()}}}function ym(n){let e,t,i,s,l,o,r;function a(){return n[17](n[30])}return{c(){e=v("button"),t=v("img"),s=D(),Hn(t.src,i="./images/avatars/avatar"+n[30]+".svg")||p(t,"src",i),p(t,"alt","Avatar "+n[30]),p(e,"type","button"),p(e,"class",l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))},m(u,f){S(u,e,f),_(e,t),_(e,s),o||(r=K(e,"click",a),o=!0)},p(u,f){n=u,f[0]&4&&l!==(l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))&&p(e,"class",l)},d(u){u&&w(e),o=!1,r()}}}function vD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Email",o=D(),r=v("input"),p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","email"),p(r,"autocomplete","off"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),de(r,n[3]),u||(f=K(r,"input",n[18]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&8&&r.value!==c[3]&&de(r,c[3])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function km(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle",$$slots:{default:[yD,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s[0]&536870928|s[1]&4&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function yD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=z("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[29]),p(s,"for",o=n[29])},m(u,f){S(u,e,f),e.checked=n[4],S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[19]),r=!0)},p(u,f){f[0]&536870912&&t!==(t=u[29])&&p(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&536870912&&o!==(o=u[29])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function wm(n){let e,t,i,s,l,o,r,a,u;return s=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[kD,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),r=new _e({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[wD,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),V(s.$$.fragment),l=D(),o=v("div"),V(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),p(e,"class","col-12")},m(f,c){S(f,e,c),_(e,t),_(t,i),H(s,i,null),_(t,l),_(t,o),H(r,o,null),u=!0},p(f,c){const d={};c[0]&536871168|c[1]&4&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const m={};c[0]&536871424|c[1]&4&&(m.$$scope={dirty:c,ctx:f}),r.$set(m)},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&nt(()=>{a||(a=ze(t,It,{duration:150},!0)),a.run(1)}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=ze(t,It,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),q(s),q(r),f&&a&&a.end()}}}function kD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Password",o=D(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),de(r,n[8]),u||(f=K(r,"input",n[20]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&256&&r.value!==c[8]&&de(r,c[8])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function wD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=D(),s=v("span"),s.textContent="Password confirm",o=D(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),de(r,n[9]),u||(f=K(r,"input",n[21]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&512&&r.value!==c[9]&&de(r,c[9])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function SD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h=!n[1].isNew&&vm(n),g=[0,1,2,3,4,5,6,7,8,9],b=[];for(let T=0;T<10;T+=1)b[T]=ym(bm(n,g,T));a=new _e({props:{class:"form-field required",name:"email",$$slots:{default:[vD,({uniqueId:T})=>({29:T}),({uniqueId:T})=>[T?536870912:0]]},$$scope:{ctx:n}}});let y=!n[1].isNew&&km(n),k=(n[1].isNew||n[4])&&wm(n);return{c(){e=v("form"),h&&h.c(),t=D(),i=v("div"),s=v("p"),s.textContent="Avatar",l=D(),o=v("div");for(let T=0;T<10;T+=1)b[T].c();r=D(),V(a.$$.fragment),u=D(),y&&y.c(),f=D(),k&&k.c(),p(s,"class","section-title"),p(o,"class","flex flex-gap-xs flex-wrap"),p(i,"class","content"),p(e,"id",n[11]),p(e,"class","grid"),p(e,"autocomplete","off")},m(T,C){S(T,e,C),h&&h.m(e,null),_(e,t),_(e,i),_(i,s),_(i,l),_(i,o);for(let M=0;M<10;M+=1)b[M].m(o,null);_(e,r),H(a,e,null),_(e,u),y&&y.m(e,null),_(e,f),k&&k.m(e,null),c=!0,d||(m=K(e,"submit",pt(n[12])),d=!0)},p(T,C){if(T[1].isNew?h&&(pe(),P(h,1,1,()=>{h=null}),me()):h?(h.p(T,C),C[0]&2&&A(h,1)):(h=vm(T),h.c(),A(h,1),h.m(e,t)),C[0]&4){g=[0,1,2,3,4,5,6,7,8,9];let $;for($=0;$<10;$+=1){const O=bm(T,g,$);b[$]?b[$].p(O,C):(b[$]=ym(O),b[$].c(),b[$].m(o,null))}for(;$<10;$+=1)b[$].d(1)}const M={};C[0]&536870920|C[1]&4&&(M.$$scope={dirty:C,ctx:T}),a.$set(M),T[1].isNew?y&&(pe(),P(y,1,1,()=>{y=null}),me()):y?(y.p(T,C),C[0]&2&&A(y,1)):(y=km(T),y.c(),A(y,1),y.m(e,f)),T[1].isNew||T[4]?k?(k.p(T,C),C[0]&18&&A(k,1)):(k=wm(T),k.c(),A(k,1),k.m(e,null)):k&&(pe(),P(k,1,1,()=>{k=null}),me())},i(T){c||(A(h),A(a.$$.fragment,T),A(y),A(k),c=!0)},o(T){P(h),P(a.$$.fragment,T),P(y),P(k),c=!1},d(T){T&&w(e),h&&h.d(),bt(b,T),q(a),y&&y.d(),k&&k.d(),d=!1,m()}}}function TD(n){let e,t=n[1].isNew?"New admin":"Edit admin",i;return{c(){e=v("h4"),i=z(t)},m(s,l){S(s,e,l),_(e,i)},p(s,l){l[0]&2&&t!==(t=s[1].isNew?"New admin":"Edit admin")&&re(i,t)},d(s){s&&w(e)}}}function Sm(n){let e,t,i,s,l,o,r,a,u;return o=new xn({props:{class:"dropdown dropdown-upside dropdown-left dropdown-nowrap",$$slots:{default:[CD]},$$scope:{ctx:n}}}),{c(){e=v("button"),t=v("span"),i=D(),s=v("i"),l=D(),V(o.$$.fragment),r=D(),a=v("div"),p(s,"class","ri-more-line"),p(e,"type","button"),p(e,"aria-label","More"),p(e,"class","btn btn-sm btn-circle btn-transparent"),p(a,"class","flex-fill")},m(f,c){S(f,e,c),_(e,t),_(e,i),_(e,s),_(e,l),H(o,e,null),S(f,r,c),S(f,a,c),u=!0},p(f,c){const d={};c[1]&4&&(d.$$scope={dirty:c,ctx:f}),o.$set(d)},i(f){u||(A(o.$$.fragment,f),u=!0)},o(f){P(o.$$.fragment,f),u=!1},d(f){f&&w(e),q(o),f&&w(r),f&&w(a)}}}function CD(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - Delete`,p(e,"type","button"),p(e,"class","dropdown-item txt-danger")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[15]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function $D(n){let e,t,i,s,l,o,r=n[1].isNew?"Create":"Save changes",a,u,f,c,d,m=!n[1].isNew&&Sm(n);return{c(){m&&m.c(),e=D(),t=v("button"),i=v("span"),i.textContent="Cancel",s=D(),l=v("button"),o=v("span"),a=z(r),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-transparent"),t.disabled=n[6],p(o,"class","txt"),p(l,"type","submit"),p(l,"form",n[11]),p(l,"class","btn btn-expanded"),l.disabled=u=!n[10]||n[6],x(l,"btn-loading",n[6])},m(h,g){m&&m.m(h,g),S(h,e,g),S(h,t,g),_(t,i),S(h,s,g),S(h,l,g),_(l,o),_(o,a),f=!0,c||(d=K(t,"click",n[16]),c=!0)},p(h,g){h[1].isNew?m&&(pe(),P(m,1,1,()=>{m=null}),me()):m?(m.p(h,g),g[0]&2&&A(m,1)):(m=Sm(h),m.c(),A(m,1),m.m(e.parentNode,e)),(!f||g[0]&64)&&(t.disabled=h[6]),(!f||g[0]&2)&&r!==(r=h[1].isNew?"Create":"Save changes")&&re(a,r),(!f||g[0]&1088&&u!==(u=!h[10]||h[6]))&&(l.disabled=u),(!f||g[0]&64)&&x(l,"btn-loading",h[6])},i(h){f||(A(m),f=!0)},o(h){P(m),f=!1},d(h){m&&m.d(h),h&&w(e),h&&w(t),h&&w(s),h&&w(l),c=!1,d()}}}function MD(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[22],$$slots:{footer:[$D],header:[TD],default:[SD]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[23](e),e.$on("hide",n[24]),e.$on("show",n[25]),{c(){V(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,l){const o={};l[0]&1152&&(o.beforeHide=s[22]),l[0]&1886|l[1]&4&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[23](null),q(e,s)}}}function DD(n,e,t){let i;const s=$t(),l="admin_"+B.randomString(5);let o,r=new Ji,a=!1,u=!1,f=0,c="",d="",m="",h=!1;function g(Z){return y(Z),t(7,u=!0),o==null?void 0:o.show()}function b(){return o==null?void 0:o.hide()}function y(Z){t(1,r=Z!=null&&Z.clone?Z.clone():new Ji),k()}function k(){t(4,h=!1),t(3,c=(r==null?void 0:r.email)||""),t(2,f=(r==null?void 0:r.avatar)||0),t(8,d=""),t(9,m=""),Vn({})}function T(){if(a||!i)return;t(6,a=!0);const Z={email:c,avatar:f};(r.isNew||h)&&(Z.password=d,Z.passwordConfirm=m);let te;r.isNew?te=he.admins.create(Z):te=he.admins.update(r.id,Z),te.then(async ee=>{var R;t(7,u=!1),b(),Vt(r.isNew?"Successfully created admin.":"Successfully updated admin."),s("save",ee),((R=he.authStore.model)==null?void 0:R.id)===ee.id&&he.authStore.save(he.authStore.token,ee)}).catch(ee=>{he.errorResponseHandler(ee)}).finally(()=>{t(6,a=!1)})}function C(){r!=null&&r.id&&fn("Do you really want to delete the selected admin?",()=>he.admins.delete(r.id).then(()=>{t(7,u=!1),b(),Vt("Successfully deleted admin."),s("delete",r)}).catch(Z=>{he.errorResponseHandler(Z)}))}const M=()=>C(),$=()=>b(),O=Z=>t(2,f=Z);function E(){c=this.value,t(3,c)}function I(){h=this.checked,t(4,h)}function L(){d=this.value,t(8,d)}function N(){m=this.value,t(9,m)}const F=()=>i&&u?(fn("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),b()}),!1):!0;function U(Z){ie[Z?"unshift":"push"](()=>{o=Z,t(5,o)})}function J(Z){We.call(this,n,Z)}function ne(Z){We.call(this,n,Z)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=r.isNew&&c!=""||h||c!==r.email||f!==r.avatar)},[b,r,f,c,h,o,a,u,d,m,i,l,T,C,g,M,$,O,E,I,L,N,F,U,J,ne]}class OD extends ke{constructor(e){super(),ye(this,e,DD,MD,be,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function Tm(n,e,t){const i=n.slice();return i[24]=e[t],i}function ED(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="id",p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function AD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="email",p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function ID(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function PD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),s.textContent="updated",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:G,d(l){l&&w(e)}}}function Cm(n){let e;function t(l,o){return l[5]?ND:LD}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function LD(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&$m(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No admins found.",s=D(),o&&o.c(),l=D(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(t,s),o&&o.m(t,null),_(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?o?o.p(a,u):(o=$m(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function ND(n){let e;return{c(){e=v("tr"),e.innerHTML=` - `},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function $m(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[17]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function Mm(n){let e;return{c(){e=v("span"),e.textContent="You",p(e,"class","label label-warning m-l-5")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Dm(n,e){let t,i,s,l,o,r,a,u,f,c,d,m=e[24].id+"",h,g,b,y,k,T=e[24].email+"",C,M,$,O,E,I,L,N,F,U,J,ne,Z,te;f=new db({props:{value:e[24].id}});let ee=e[24].id===e[7].id&&Mm();E=new Zi({props:{date:e[24].created}}),N=new Zi({props:{date:e[24].updated}});function R(){return e[15](e[24])}function X(...Y){return e[16](e[24],...Y)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("figure"),l=v("img"),r=D(),a=v("td"),u=v("div"),V(f.$$.fragment),c=D(),d=v("span"),h=z(m),g=D(),ee&&ee.c(),b=D(),y=v("td"),k=v("span"),C=z(T),$=D(),O=v("td"),V(E.$$.fragment),I=D(),L=v("td"),V(N.$$.fragment),F=D(),U=v("td"),U.innerHTML='',J=D(),Hn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg")||p(l,"src",o),p(l,"alt","Admin avatar"),p(s,"class","thumb thumb-sm thumb-circle"),p(i,"class","min-width"),p(d,"class","txt"),p(u,"class","label"),p(a,"class","col-type-text col-field-id"),p(k,"class","txt txt-ellipsis"),p(k,"title",M=e[24].email),p(y,"class","col-type-email col-field-email"),p(O,"class","col-type-date col-field-created"),p(L,"class","col-type-date col-field-updated"),p(U,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(Y,se){S(Y,t,se),_(t,i),_(i,s),_(s,l),_(t,r),_(t,a),_(a,u),H(f,u,null),_(u,c),_(u,d),_(d,h),_(a,g),ee&&ee.m(a,null),_(t,b),_(t,y),_(y,k),_(k,C),_(t,$),_(t,O),H(E,O,null),_(t,I),_(t,L),H(N,L,null),_(t,F),_(t,U),_(t,J),ne=!0,Z||(te=[K(t,"click",R),K(t,"keydown",X)],Z=!0)},p(Y,se){e=Y,(!ne||se&16&&!Hn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&p(l,"src",o);const He={};se&16&&(He.value=e[24].id),f.$set(He),(!ne||se&16)&&m!==(m=e[24].id+"")&&re(h,m),e[24].id===e[7].id?ee||(ee=Mm(),ee.c(),ee.m(a,null)):ee&&(ee.d(1),ee=null),(!ne||se&16)&&T!==(T=e[24].email+"")&&re(C,T),(!ne||se&16&&M!==(M=e[24].email))&&p(k,"title",M);const Re={};se&16&&(Re.date=e[24].created),E.$set(Re);const Fe={};se&16&&(Fe.date=e[24].updated),N.$set(Fe)},i(Y){ne||(A(f.$$.fragment,Y),A(E.$$.fragment,Y),A(N.$$.fragment,Y),ne=!0)},o(Y){P(f.$$.fragment,Y),P(E.$$.fragment,Y),P(N.$$.fragment,Y),ne=!1},d(Y){Y&&w(t),q(f),ee&&ee.d(),q(E),q(N),Z=!1,Le(te)}}}function FD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M=[],$=new Map,O;function E(R){n[11](R)}let I={class:"col-type-text",name:"id",$$slots:{default:[ED]},$$scope:{ctx:n}};n[2]!==void 0&&(I.sort=n[2]),o=new Ut({props:I}),ie.push(()=>ve(o,"sort",E));function L(R){n[12](R)}let N={class:"col-type-email col-field-email",name:"email",$$slots:{default:[AD]},$$scope:{ctx:n}};n[2]!==void 0&&(N.sort=n[2]),u=new Ut({props:N}),ie.push(()=>ve(u,"sort",L));function F(R){n[13](R)}let U={class:"col-type-date col-field-created",name:"created",$$slots:{default:[ID]},$$scope:{ctx:n}};n[2]!==void 0&&(U.sort=n[2]),d=new Ut({props:U}),ie.push(()=>ve(d,"sort",F));function J(R){n[14](R)}let ne={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[PD]},$$scope:{ctx:n}};n[2]!==void 0&&(ne.sort=n[2]),g=new Ut({props:ne}),ie.push(()=>ve(g,"sort",J));let Z=n[4];const te=R=>R[24].id;for(let R=0;Rr=!1)),o.$set(Y);const se={};X&134217728&&(se.$$scope={dirty:X,ctx:R}),!f&&X&4&&(f=!0,se.sort=R[2],we(()=>f=!1)),u.$set(se);const He={};X&134217728&&(He.$$scope={dirty:X,ctx:R}),!m&&X&4&&(m=!0,He.sort=R[2],we(()=>m=!1)),d.$set(He);const Re={};X&134217728&&(Re.$$scope={dirty:X,ctx:R}),!b&&X&4&&(b=!0,Re.sort=R[2],we(()=>b=!1)),g.$set(Re),X&186&&(Z=R[4],pe(),M=wt(M,X,te,1,R,Z,$,C,nn,Dm,null,Tm),me(),!Z.length&&ee?ee.p(R,X):Z.length?ee&&(ee.d(1),ee=null):(ee=Cm(R),ee.c(),ee.m(C,null))),(!O||X&32)&&x(e,"table-loading",R[5])},i(R){if(!O){A(o.$$.fragment,R),A(u.$$.fragment,R),A(d.$$.fragment,R),A(g.$$.fragment,R);for(let X=0;X - New admin`,m=D(),V(h.$$.fragment),g=D(),b=v("div"),y=D(),V(k.$$.fragment),T=D(),E&&E.c(),C=Ae(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(f,"class","flex-fill"),p(d,"type","button"),p(d,"class","btn btn-expanded"),p(e,"class","page-header"),p(b,"class","clearfix m-b-base")},m(I,L){S(I,e,L),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),_(e,r),H(a,e,null),_(e,u),_(e,f),_(e,c),_(e,d),S(I,m,L),H(h,I,L),S(I,g,L),S(I,b,L),S(I,y,L),H(k,I,L),S(I,T,L),E&&E.m(I,L),S(I,C,L),M=!0,$||(O=K(d,"click",n[9]),$=!0)},p(I,L){(!M||L&64)&&re(o,I[6]);const N={};L&2&&(N.value=I[1]),h.$set(N);const F={};L&134217918&&(F.$$scope={dirty:L,ctx:I}),k.$set(F),I[4].length?E?E.p(I,L):(E=Om(I),E.c(),E.m(C.parentNode,C)):E&&(E.d(1),E=null)},i(I){M||(A(a.$$.fragment,I),A(h.$$.fragment,I),A(k.$$.fragment,I),M=!0)},o(I){P(a.$$.fragment,I),P(h.$$.fragment,I),P(k.$$.fragment,I),M=!1},d(I){I&&w(e),q(a),I&&w(m),q(h,I),I&&w(g),I&&w(b),I&&w(y),q(k,I),I&&w(T),E&&E.d(I),I&&w(C),$=!1,O()}}}function jD(n){let e,t,i,s,l,o;e=new Di({}),i=new kn({props:{$$slots:{default:[RD]},$$scope:{ctx:n}}});let r={};return l=new OD({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){V(e.$$.fragment),t=D(),V(i.$$.fragment),s=D(),V(l.$$.fragment)},m(a,u){H(e,a,u),S(a,t,u),H(i,a,u),S(a,s,u),H(l,a,u),o=!0},p(a,[u]){const f={};u&134217982&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){q(e,a),a&&w(t),q(i,a),a&&w(s),n[18](null),q(l,a)}}}function HD(n,e,t){let i,s,l;Je(n,ma,N=>t(21,i=N)),Je(n,St,N=>t(6,s=N)),Je(n,Ma,N=>t(7,l=N)),Yt(St,s="Admins",s);const o=new URLSearchParams(i);let r,a=[],u=!1,f=o.get("filter")||"",c=o.get("sort")||"-created";function d(){return t(5,u=!0),t(4,a=[]),he.admins.getFullList(100,{sort:c||"-created",filter:f}).then(N=>{t(4,a=N),t(5,u=!1)}).catch(N=>{N!=null&&N.isAbort||(t(5,u=!1),console.warn(N),m(),he.errorResponseHandler(N,!1))})}function m(){t(4,a=[])}const h=()=>d(),g=()=>r==null?void 0:r.show(),b=N=>t(1,f=N.detail);function y(N){c=N,t(2,c)}function k(N){c=N,t(2,c)}function T(N){c=N,t(2,c)}function C(N){c=N,t(2,c)}const M=N=>r==null?void 0:r.show(N),$=(N,F)=>{(F.code==="Enter"||F.code==="Space")&&(F.preventDefault(),r==null||r.show(N))},O=()=>t(1,f="");function E(N){ie[N?"unshift":"push"](()=>{r=N,t(3,r)})}const I=()=>d(),L=()=>d();return n.$$.update=()=>{if(n.$$.dirty&6&&c!==-1&&f!==-1){const N=new URLSearchParams({filter:f,sort:c}).toString();Ti("/settings/admins?"+N),d()}},[d,f,c,r,a,u,s,l,h,g,b,y,k,T,C,M,$,O,E,I,L]}class qD extends ke{constructor(e){super(),ye(this,e,HD,jD,be,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function VD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Email"),s=D(),l=v("input"),p(e,"for",i=n[8]),p(l,"type","email"),p(l,"id",o=n[8]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0]),l.focus(),r||(a=K(l,"input",n[4]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(l,"id",o),f&1&&l.value!==u[0]&&de(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function zD(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=z("Password"),s=D(),l=v("input"),r=D(),a=v("div"),u=v("a"),u.textContent="Forgotten password?",p(e,"for",i=n[8]),p(l,"type","password"),p(l,"id",o=n[8]),l.required=!0,p(u,"href","/request-password-reset"),p(u,"class","link-hint"),p(a,"class","help-block")},m(d,m){S(d,e,m),_(e,t),S(d,s,m),S(d,l,m),de(l,n[1]),S(d,r,m),S(d,a,m),_(a,u),f||(c=[K(l,"input",n[5]),Pe(Xt.call(null,u))],f=!0)},p(d,m){m&256&&i!==(i=d[8])&&p(e,"for",i),m&256&&o!==(o=d[8])&&p(l,"id",o),m&2&&l.value!==d[1]&&de(l,d[1])},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),f=!1,Le(c)}}}function BD(n){let e,t,i,s,l,o,r,a,u,f,c;return s=new _e({props:{class:"form-field required",name:"identity",$$slots:{default:[VD,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[zD,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

    Admin sign in

    ",i=D(),V(s.$$.fragment),l=D(),V(o.$$.fragment),r=D(),a=v("button"),a.innerHTML=`Login - `,p(t,"class","content txt-center m-b-base"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block btn-next"),x(a,"btn-disabled",n[2]),x(a,"btn-loading",n[2]),p(e,"class","block")},m(d,m){S(d,e,m),_(e,t),_(e,i),H(s,e,null),_(e,l),H(o,e,null),_(e,r),_(e,a),u=!0,f||(c=K(e,"submit",pt(n[3])),f=!0)},p(d,m){const h={};m&769&&(h.$$scope={dirty:m,ctx:d}),s.$set(h);const g={};m&770&&(g.$$scope={dirty:m,ctx:d}),o.$set(g),(!u||m&4)&&x(a,"btn-disabled",d[2]),(!u||m&4)&&x(a,"btn-loading",d[2])},i(d){u||(A(s.$$.fragment,d),A(o.$$.fragment,d),u=!0)},o(d){P(s.$$.fragment,d),P(o.$$.fragment,d),u=!1},d(d){d&&w(e),q(s),q(o),f=!1,c()}}}function UD(n){let e,t;return e=new i_({props:{$$slots:{default:[BD]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&519&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function WD(n,e,t){let i;Je(n,ma,c=>t(6,i=c));const s=new URLSearchParams(i);let l=s.get("demoEmail")||"",o=s.get("demoPassword")||"",r=!1;function a(){if(!r)return t(2,r=!0),he.admins.authWithPassword(l,o).then(()=>{Ca(),Ti("/")}).catch(()=>{cl("Invalid login credentials.")}).finally(()=>{t(2,r=!1)})}function u(){l=this.value,t(0,l)}function f(){o=this.value,t(1,o)}return[l,o,r,a,u,f]}class YD extends ke{constructor(e){super(),ye(this,e,WD,UD,be,{})}}function KD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M;i=new _e({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[ZD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[GD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[XD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),f=new _e({props:{class:"form-field form-field-toggle",name:"meta.hideControls",$$slots:{default:[xD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}});let $=n[3]&&Em(n);return{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=D(),l=v("div"),V(o.$$.fragment),r=D(),V(a.$$.fragment),u=D(),V(f.$$.fragment),c=D(),d=v("div"),m=v("div"),h=D(),$&&$.c(),g=D(),b=v("button"),y=v("span"),y.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(m,"class","flex-fill"),p(y,"class","txt"),p(b,"type","submit"),p(b,"class","btn btn-expanded"),b.disabled=k=!n[3]||n[2],x(b,"btn-loading",n[2]),p(d,"class","col-lg-12 flex"),p(e,"class","grid")},m(O,E){S(O,e,E),_(e,t),H(i,t,null),_(e,s),_(e,l),H(o,l,null),_(e,r),H(a,e,null),_(e,u),H(f,e,null),_(e,c),_(e,d),_(d,m),_(d,h),$&&$.m(d,null),_(d,g),_(d,b),_(b,y),T=!0,C||(M=K(b,"click",n[13]),C=!0)},p(O,E){const I={};E&1572865&&(I.$$scope={dirty:E,ctx:O}),i.$set(I);const L={};E&1572865&&(L.$$scope={dirty:E,ctx:O}),o.$set(L);const N={};E&1572865&&(N.$$scope={dirty:E,ctx:O}),a.$set(N);const F={};E&1572865&&(F.$$scope={dirty:E,ctx:O}),f.$set(F),O[3]?$?$.p(O,E):($=Em(O),$.c(),$.m(d,g)):$&&($.d(1),$=null),(!T||E&12&&k!==(k=!O[3]||O[2]))&&(b.disabled=k),(!T||E&4)&&x(b,"btn-loading",O[2])},i(O){T||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(a.$$.fragment,O),A(f.$$.fragment,O),T=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(a.$$.fragment,O),P(f.$$.fragment,O),T=!1},d(O){O&&w(e),q(i),q(o),q(a),q(f),$&&$.d(),C=!1,M()}}}function JD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function ZD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Application name"),s=D(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].meta.appName),r||(a=K(l,"input",n[8]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].meta.appName&&de(l,u[0].meta.appName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function GD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Application url"),s=D(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].meta.appUrl),r||(a=K(l,"input",n[9]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].meta.appUrl&&de(l,u[0].meta.appUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function XD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Logs max days retention"),s=D(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","number"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].logs.maxDays),r||(a=K(l,"input",n[10]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].logs.maxDays&&de(l,u[0].logs.maxDays)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function xD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=D(),s=v("label"),l=v("span"),l.textContent="Hide collection create and edit controls",o=D(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[19]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[19])},m(c,d){S(c,e,d),e.checked=n[0].meta.hideControls,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[K(e,"change",n[11]),Pe(Ye.call(null,r,{text:"This could prevent making accidental schema changes when in production environment.",position:"right"}))],u=!0)},p(c,d){d&524288&&t!==(t=c[19])&&p(e,"id",t),d&1&&(e.checked=c[0].meta.hideControls),d&524288&&a!==(a=c[19])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Le(f)}}}function Em(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),_(e,t),i||(s=K(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function QD(n){let e,t,i,s,l,o,r,a,u;const f=[JD,KD],c=[];function d(m,h){return m[1]?0:1}return l=d(n),o=c[l]=f[l](n),{c(){e=v("header"),e.innerHTML=``,t=D(),i=v("div"),s=v("form"),o.c(),p(e,"class","page-header"),p(s,"class","panel"),p(s,"autocomplete","off"),p(i,"class","wrapper")},m(m,h){S(m,e,h),S(m,t,h),S(m,i,h),_(i,s),c[l].m(s,null),r=!0,a||(u=K(s,"submit",pt(n[4])),a=!0)},p(m,h){let g=l;l=d(m),l===g?c[l].p(m,h):(pe(),P(c[g],1,1,()=>{c[g]=null}),me(),o=c[l],o?o.p(m,h):(o=c[l]=f[l](m),o.c()),A(o,1),o.m(s,null))},i(m){r||(A(o),r=!0)},o(m){P(o),r=!1},d(m){m&&w(e),m&&w(t),m&&w(i),c[l].d(),a=!1,u()}}}function eO(n){let e,t,i,s;return e=new Di({}),i=new kn({props:{$$slots:{default:[QD]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment),t=D(),V(i.$$.fragment)},m(l,o){H(e,l,o),S(l,t,o),H(i,l,o),s=!0},p(l,[o]){const r={};o&1048591&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){q(e,l),l&&w(t),q(i,l)}}}function tO(n,e,t){let i,s,l,o;Je(n,Cs,$=>t(14,s=$)),Je(n,vo,$=>t(15,l=$)),Je(n,St,$=>t(16,o=$)),Yt(St,o="Application settings",o);let r={},a={},u=!1,f=!1,c="";d();async function d(){t(1,u=!0);try{const $=await he.settings.getAll()||{};h($)}catch($){he.errorResponseHandler($)}t(1,u=!1)}async function m(){if(!(f||!i)){t(2,f=!0);try{const $=await he.settings.update(B.filterRedactedProps(a));h($),Vt("Successfully saved application settings.")}catch($){he.errorResponseHandler($)}t(2,f=!1)}}function h($={}){var O,E;Yt(vo,l=(O=$==null?void 0:$.meta)==null?void 0:O.appName,l),Yt(Cs,s=!!((E=$==null?void 0:$.meta)!=null&&E.hideControls),s),t(0,a={meta:($==null?void 0:$.meta)||{},logs:($==null?void 0:$.logs)||{}}),t(6,r=JSON.parse(JSON.stringify(a)))}function g(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function b(){a.meta.appName=this.value,t(0,a)}function y(){a.meta.appUrl=this.value,t(0,a)}function k(){a.logs.maxDays=ht(this.value),t(0,a)}function T(){a.meta.hideControls=this.checked,t(0,a)}const C=()=>g(),M=()=>m();return n.$$.update=()=>{n.$$.dirty&64&&t(7,c=JSON.stringify(r)),n.$$.dirty&129&&t(3,i=c!=JSON.stringify(a))},[a,u,f,i,m,g,r,c,b,y,k,T,C,M]}class nO extends ke{constructor(e){super(),ye(this,e,tO,eO,be,{})}}function iO(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o',i=D(),s=v("input"),p(t,"type","button"),p(t,"class","btn btn-transparent btn-circle"),p(e,"class","form-field-addon"),Zn(s,a)},m(u,f){S(u,e,f),_(e,t),S(u,i,f),S(u,s,f),s.autofocus&&s.focus(),l||(o=[Pe(Ye.call(null,t,{position:"left",text:"Set new value"})),K(t,"click",n[6])],l=!0)},p(u,f){Zn(s,a=ln(r,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&w(e),u&&w(i),u&&w(s),l=!1,Le(o)}}}function lO(n){let e;function t(l,o){return l[3]?sO:iO}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:G,o:G,d(l){s.d(l),l&&w(e)}}}function oO(n,e,t){const i=["value","mask"];let s=At(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function u(){t(0,l=""),t(3,a=!1),await tn(),r==null||r.focus()}const f=()=>u();function c(m){ie[m?"unshift":"push"](()=>{r=m,t(2,r)})}function d(){l=this.value,t(0,l)}return n.$$set=m=>{e=Xe(Xe({},e),Gn(m)),t(5,s=At(e,i)),"value"in m&&t(0,l=m.value),"mask"in m&&t(1,o=m.mask)},n.$$.update=()=>{n.$$.dirty&3&&l===o&&t(3,a=!0)},[l,o,r,a,u,s,f,c,d]}class nu extends ke{constructor(e){super(),ye(this,e,oO,lO,be,{value:0,mask:1})}}function rO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;return{c(){e=v("label"),t=z("Subject"),s=D(),l=v("input"),r=D(),a=v("div"),u=z(`Available placeholder parameters: - `),f=v("button"),f.textContent=`{APP_NAME} - `,c=z(`, - `),d=v("button"),d.textContent=`{APP_URL} - `,m=z("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(a,"class","help-block")},m(b,y){S(b,e,y),_(e,t),S(b,s,y),S(b,l,y),de(l,n[0].subject),S(b,r,y),S(b,a,y),_(a,u),_(a,f),_(a,c),_(a,d),_(a,m),h||(g=[K(l,"input",n[13]),K(f,"click",n[14]),K(d,"click",n[15])],h=!0)},p(b,y){y[1]&1&&i!==(i=b[31])&&p(e,"for",i),y[1]&1&&o!==(o=b[31])&&p(l,"id",o),y[0]&1&&l.value!==b[0].subject&&de(l,b[0].subject)},d(b){b&&w(e),b&&w(s),b&&w(l),b&&w(r),b&&w(a),h=!1,Le(g)}}}function aO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y;return{c(){e=v("label"),t=z("Action URL"),s=D(),l=v("input"),r=D(),a=v("div"),u=z(`Available placeholder parameters: - `),f=v("button"),f.textContent=`{APP_NAME} - `,c=z(`, - `),d=v("button"),d.textContent=`{APP_URL} - `,m=z(`, - `),h=v("button"),h.textContent=`{TOKEN} - `,g=z("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(h,"type","button"),p(h,"class","label label-sm link-primary txt-mono"),p(h,"title","Required parameter"),p(a,"class","help-block")},m(k,T){S(k,e,T),_(e,t),S(k,s,T),S(k,l,T),de(l,n[0].actionUrl),S(k,r,T),S(k,a,T),_(a,u),_(a,f),_(a,c),_(a,d),_(a,m),_(a,h),_(a,g),b||(y=[K(l,"input",n[16]),K(f,"click",n[17]),K(d,"click",n[18]),K(h,"click",n[19])],b=!0)},p(k,T){T[1]&1&&i!==(i=k[31])&&p(e,"for",i),T[1]&1&&o!==(o=k[31])&&p(l,"id",o),T[0]&1&&l.value!==k[0].actionUrl&&de(l,k[0].actionUrl)},d(k){k&&w(e),k&&w(s),k&&w(l),k&&w(r),k&&w(a),b=!1,Le(y)}}}function uO(n){let e,t,i,s;return{c(){e=v("textarea"),p(e,"id",t=n[31]),p(e,"class","txt-mono"),p(e,"spellcheck","false"),p(e,"rows","14"),e.required=!0},m(l,o){S(l,e,o),de(e,n[0].body),i||(s=K(e,"input",n[21]),i=!0)},p(l,o){o[1]&1&&t!==(t=l[31])&&p(e,"id",t),o[0]&1&&de(e,l[0].body)},i:G,o:G,d(l){l&&w(e),i=!1,s()}}}function fO(n){let e,t,i,s;function l(a){n[20](a)}var o=n[4];function r(a){let u={id:a[31],language:"html"};return a[0].body!==void 0&&(u.value=a[0].body),{props:u}}return o&&(e=Kt(o,r(n)),ie.push(()=>ve(e,"value",l))),{c(){e&&V(e.$$.fragment),i=Ae()},m(a,u){e&&H(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u[1]&1&&(f.id=a[31]),!t&&u[0]&1&&(t=!0,f.value=a[0].body,we(()=>t=!1)),o!==(o=a[4])){if(e){pe();const c=e;P(c.$$.fragment,1,0,()=>{q(c,1)}),me()}o?(e=Kt(o,r(a)),ie.push(()=>ve(e,"value",l)),V(e.$$.fragment),A(e.$$.fragment,1),H(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&q(e,a)}}}function cO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C;const M=[fO,uO],$=[];function O(E,I){return E[4]&&!E[5]?0:1}return l=O(n),o=$[l]=M[l](n),{c(){e=v("label"),t=z("Body (HTML)"),s=D(),o.c(),r=D(),a=v("div"),u=z(`Available placeholder parameters: - `),f=v("button"),f.textContent=`{APP_NAME} - `,c=z(`, - `),d=v("button"),d.textContent=`{APP_URL} - `,m=z(`, - `),h=v("button"),h.textContent=`{TOKEN} - `,g=z(`, - `),b=v("button"),b.textContent=`{ACTION_URL} - `,y=z("."),p(e,"for",i=n[31]),p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(h,"type","button"),p(h,"class","label label-sm link-primary txt-mono"),p(b,"type","button"),p(b,"class","label label-sm link-primary txt-mono"),p(b,"title","Required parameter"),p(a,"class","help-block")},m(E,I){S(E,e,I),_(e,t),S(E,s,I),$[l].m(E,I),S(E,r,I),S(E,a,I),_(a,u),_(a,f),_(a,c),_(a,d),_(a,m),_(a,h),_(a,g),_(a,b),_(a,y),k=!0,T||(C=[K(f,"click",n[22]),K(d,"click",n[23]),K(h,"click",n[24]),K(b,"click",n[25])],T=!0)},p(E,I){(!k||I[1]&1&&i!==(i=E[31]))&&p(e,"for",i);let L=l;l=O(E),l===L?$[l].p(E,I):(pe(),P($[L],1,1,()=>{$[L]=null}),me(),o=$[l],o?o.p(E,I):(o=$[l]=M[l](E),o.c()),A(o,1),o.m(r.parentNode,r))},i(E){k||(A(o),k=!0)},o(E){P(o),k=!1},d(E){E&&w(e),E&&w(s),$[l].d(E),E&&w(r),E&&w(a),T=!1,Le(C)}}}function dO(n){let e,t,i,s,l,o;return e=new _e({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[rO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new _e({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[aO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new _e({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[cO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment),t=D(),V(i.$$.fragment),s=D(),V(l.$$.fragment)},m(r,a){H(e,r,a),S(r,t,a),H(i,r,a),S(r,s,a),H(l,r,a),o=!0},p(r,a){const u={};a[0]&2&&(u.name=r[1]+".subject"),a[0]&1|a[1]&3&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a[0]&2&&(f.name=r[1]+".actionUrl"),a[0]&1|a[1]&3&&(f.$$scope={dirty:a,ctx:r}),i.$set(f);const c={};a[0]&2&&(c.name=r[1]+".body"),a[0]&49|a[1]&3&&(c.$$scope={dirty:a,ctx:r}),l.$set(c)},i(r){o||(A(e.$$.fragment,r),A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){q(e,r),r&&w(t),q(i,r),r&&w(s),q(l,r)}}}function Am(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&nt(()=>{t||(t=ze(e,Pt,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=ze(e,Pt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function pO(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Am();return{c(){e=v("div"),t=v("i"),i=D(),s=v("span"),l=z(n[2]),o=D(),r=v("div"),a=D(),f&&f.c(),u=Ae(),p(t,"class","ri-draft-line"),p(s,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),_(s,l),S(c,o,d),S(c,r,d),S(c,a,d),f&&f.m(c,d),S(c,u,d)},p(c,d){d[0]&4&&re(l,c[2]),c[6]?f?d[0]&64&&A(f,1):(f=Am(),f.c(),A(f,1),f.m(u.parentNode,u)):f&&(pe(),P(f,1,1,()=>{f=null}),me())},d(c){c&&w(e),c&&w(o),c&&w(r),c&&w(a),f&&f.d(c),c&&w(u)}}}function mO(n){let e,t;const i=[n[8]];let s={$$slots:{header:[pO],default:[dO]},$$scope:{ctx:n}};for(let l=0;lt(12,o=R));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,c=Im,d=!1;function m(){f==null||f.expand()}function h(){f==null||f.collapse()}function g(){f==null||f.collapseSiblings()}async function b(){c||d||(t(5,d=!0),t(4,c=(await ft(()=>import("./CodeEditor-a45f274f.js"),["./CodeEditor-a45f274f.js","./index-4934dad7.js"],import.meta.url)).default),Im=c,t(5,d=!1))}function y(R){B.copyToClipboard(R),t_(`Copied ${R} to clipboard`,2e3)}b();function k(){u.subject=this.value,t(0,u)}const T=()=>y("{APP_NAME}"),C=()=>y("{APP_URL}");function M(){u.actionUrl=this.value,t(0,u)}const $=()=>y("{APP_NAME}"),O=()=>y("{APP_URL}"),E=()=>y("{TOKEN}");function I(R){n.$$.not_equal(u.body,R)&&(u.body=R,t(0,u))}function L(){u.body=this.value,t(0,u)}const N=()=>y("{APP_NAME}"),F=()=>y("{APP_URL}"),U=()=>y("{TOKEN}"),J=()=>y("{ACTION_URL}");function ne(R){ie[R?"unshift":"push"](()=>{f=R,t(3,f)})}function Z(R){We.call(this,n,R)}function te(R){We.call(this,n,R)}function ee(R){We.call(this,n,R)}return n.$$set=R=>{e=Xe(Xe({},e),Gn(R)),t(8,l=At(e,s)),"key"in R&&t(1,r=R.key),"title"in R&&t(2,a=R.title),"config"in R&&t(0,u=R.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!B.isEmpty(B.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||Ts(r))},[u,r,a,f,c,d,i,y,l,m,h,g,o,k,T,C,M,$,O,E,I,L,N,F,U,J,ne,Z,te,ee]}class Er extends ke{constructor(e){super(),ye(this,e,hO,mO,be,{key:1,title:2,config:0,expand:9,collapse:10,collapseSiblings:11},null,[-1,-1])}get expand(){return this.$$.ctx[9]}get collapse(){return this.$$.ctx[10]}get collapseSiblings(){return this.$$.ctx[11]}}function Pm(n,e,t){const i=n.slice();return i[22]=e[t],i}function Lm(n,e){let t,i,s,l,o,r=e[22].label+"",a,u,f,c,d;return{key:n,first:null,c(){t=v("div"),i=v("input"),l=D(),o=v("label"),a=z(r),f=D(),p(i,"type","radio"),p(i,"name","template"),p(i,"id",s=e[21]+e[22].value),i.__value=e[22].value,i.value=i.__value,e[12][0].push(i),p(o,"for",u=e[21]+e[22].value),p(t,"class","form-field-block"),this.first=t},m(m,h){S(m,t,h),_(t,i),i.checked=i.__value===e[2],_(t,l),_(t,o),_(o,a),_(t,f),c||(d=K(i,"change",e[11]),c=!0)},p(m,h){e=m,h&2097152&&s!==(s=e[21]+e[22].value)&&p(i,"id",s),h&4&&(i.checked=i.__value===e[2]),h&2097152&&u!==(u=e[21]+e[22].value)&&p(o,"for",u)},d(m){m&&w(t),e[12][0].splice(e[12][0].indexOf(i),1),c=!1,d()}}}function gO(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[22].value;for(let o=0;o({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),s=new _e({props:{class:"form-field required m-0",name:"email",$$slots:{default:[_O,({uniqueId:a})=>({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),V(t.$$.fragment),i=D(),V(s.$$.fragment),p(e,"id",n[6]),p(e,"autocomplete","off")},m(a,u){S(a,e,u),H(t,e,null),_(e,i),H(s,e,null),l=!0,o||(r=K(e,"submit",pt(n[14])),o=!0)},p(a,u){const f={};u&35651588&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const c={};u&35651586&&(c.$$scope={dirty:u,ctx:a}),s.$set(c)},i(a){l||(A(t.$$.fragment,a),A(s.$$.fragment,a),l=!0)},o(a){P(t.$$.fragment,a),P(s.$$.fragment,a),l=!1},d(a){a&&w(e),q(t),q(s),o=!1,r()}}}function vO(n){let e;return{c(){e=v("h4"),e.textContent="Send test email",p(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function yO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("button"),t=z("Close"),i=D(),s=v("button"),l=v("i"),o=D(),r=v("span"),r.textContent="Send",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[4],p(l,"class","ri-mail-send-line"),p(r,"class","txt"),p(s,"type","submit"),p(s,"form",n[6]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[5]||n[4],x(s,"btn-loading",n[4])},m(c,d){S(c,e,d),_(e,t),S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[K(e,"click",n[0]),K(s,"click",n[10])],u=!0)},p(c,d){d&16&&(e.disabled=c[4]),d&48&&a!==(a=!c[5]||c[4])&&(s.disabled=a),d&16&&x(s,"btn-loading",c[4])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Le(f)}}}function kO(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[15],popup:!0,$$slots:{footer:[yO],header:[vO],default:[bO]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[16](e),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){V(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[15]),l&33554486&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[16](null),q(e,s)}}}const Ar="last_email_test",Nm="email_test_request";function wO(n,e,t){let i;const s=$t(),l="email_test_"+B.randomString(5),o=[{label:'"Verification" template',value:"verification"},{label:'"Password reset" template',value:"password-reset"},{label:'"Confirm email change" template',value:"email-change"}];let r,a=localStorage.getItem(Ar),u=o[0].value,f=!1,c=null;function d(E="",I=""){t(1,a=E||localStorage.getItem(Ar)),t(2,u=I||o[0].value),Vn({}),r==null||r.show()}function m(){return clearTimeout(c),r==null?void 0:r.hide()}async function h(){if(!(!i||f)){t(4,f=!0),localStorage==null||localStorage.setItem(Ar,a),clearTimeout(c),c=setTimeout(()=>{he.cancelRequest(Nm),cl("Test email send timeout.")},3e4);try{await he.settings.testEmail(a,u,{$cancelKey:Nm}),Vt("Successfully sent test email."),s("submit"),t(4,f=!1),await tn(),m()}catch(E){t(4,f=!1),he.errorResponseHandler(E)}clearTimeout(c)}}const g=[[]],b=()=>h();function y(){u=this.__value,t(2,u)}function k(){a=this.value,t(1,a)}const T=()=>h(),C=()=>!f;function M(E){ie[E?"unshift":"push"](()=>{r=E,t(3,r)})}function $(E){We.call(this,n,E)}function O(E){We.call(this,n,E)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[m,a,u,r,f,i,l,o,h,d,b,y,g,k,T,C,M,$,O]}class SO extends ke{constructor(e){super(),ye(this,e,wO,kO,be,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function TO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$,O,E,I,L;i=new _e({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[$O,({uniqueId:Y})=>({31:Y}),({uniqueId:Y})=>[0,Y?1:0]]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[MO,({uniqueId:Y})=>({31:Y}),({uniqueId:Y})=>[0,Y?1:0]]},$$scope:{ctx:n}}});function N(Y){n[14](Y)}let F={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(F.config=n[0].meta.verificationTemplate),u=new Er({props:F}),ie.push(()=>ve(u,"config",N));function U(Y){n[15](Y)}let J={single:!0,key:"meta.resetPasswordTemplate",title:'Default "Password reset" email template'};n[0].meta.resetPasswordTemplate!==void 0&&(J.config=n[0].meta.resetPasswordTemplate),d=new Er({props:J}),ie.push(()=>ve(d,"config",U));function ne(Y){n[16](Y)}let Z={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(Z.config=n[0].meta.confirmEmailChangeTemplate),g=new Er({props:Z}),ie.push(()=>ve(g,"config",ne)),C=new _e({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[DO,({uniqueId:Y})=>({31:Y}),({uniqueId:Y})=>[0,Y?1:0]]},$$scope:{ctx:n}}});let te=n[0].smtp.enabled&&Fm(n);function ee(Y,se){return Y[4]?FO:NO}let R=ee(n),X=R(n);return{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=D(),l=v("div"),V(o.$$.fragment),r=D(),a=v("div"),V(u.$$.fragment),c=D(),V(d.$$.fragment),h=D(),V(g.$$.fragment),y=D(),k=v("hr"),T=D(),V(C.$$.fragment),M=D(),te&&te.c(),$=D(),O=v("div"),E=v("div"),I=D(),X.c(),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid m-b-base"),p(a,"class","accordions"),p(E,"class","flex-fill"),p(O,"class","flex")},m(Y,se){S(Y,e,se),_(e,t),H(i,t,null),_(e,s),_(e,l),H(o,l,null),S(Y,r,se),S(Y,a,se),H(u,a,null),_(a,c),H(d,a,null),_(a,h),H(g,a,null),S(Y,y,se),S(Y,k,se),S(Y,T,se),H(C,Y,se),S(Y,M,se),te&&te.m(Y,se),S(Y,$,se),S(Y,O,se),_(O,E),_(O,I),X.m(O,null),L=!0},p(Y,se){const He={};se[0]&1|se[1]&3&&(He.$$scope={dirty:se,ctx:Y}),i.$set(He);const Re={};se[0]&1|se[1]&3&&(Re.$$scope={dirty:se,ctx:Y}),o.$set(Re);const Fe={};!f&&se[0]&1&&(f=!0,Fe.config=Y[0].meta.verificationTemplate,we(()=>f=!1)),u.$set(Fe);const qe={};!m&&se[0]&1&&(m=!0,qe.config=Y[0].meta.resetPasswordTemplate,we(()=>m=!1)),d.$set(qe);const ge={};!b&&se[0]&1&&(b=!0,ge.config=Y[0].meta.confirmEmailChangeTemplate,we(()=>b=!1)),g.$set(ge);const Se={};se[0]&1|se[1]&3&&(Se.$$scope={dirty:se,ctx:Y}),C.$set(Se),Y[0].smtp.enabled?te?(te.p(Y,se),se[0]&1&&A(te,1)):(te=Fm(Y),te.c(),A(te,1),te.m($.parentNode,$)):te&&(pe(),P(te,1,1,()=>{te=null}),me()),R===(R=ee(Y))&&X?X.p(Y,se):(X.d(1),X=R(Y),X&&(X.c(),X.m(O,null)))},i(Y){L||(A(i.$$.fragment,Y),A(o.$$.fragment,Y),A(u.$$.fragment,Y),A(d.$$.fragment,Y),A(g.$$.fragment,Y),A(C.$$.fragment,Y),A(te),L=!0)},o(Y){P(i.$$.fragment,Y),P(o.$$.fragment,Y),P(u.$$.fragment,Y),P(d.$$.fragment,Y),P(g.$$.fragment,Y),P(C.$$.fragment,Y),P(te),L=!1},d(Y){Y&&w(e),q(i),q(o),Y&&w(r),Y&&w(a),q(u),q(d),q(g),Y&&w(y),Y&&w(k),Y&&w(T),q(C,Y),Y&&w(M),te&&te.d(Y),Y&&w($),Y&&w(O),X.d()}}}function CO(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function $O(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Sender name"),s=D(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].meta.senderName),r||(a=K(l,"input",n[12]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderName&&de(l,u[0].meta.senderName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function MO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Sender address"),s=D(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","email"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].meta.senderAddress),r||(a=K(l,"input",n[13]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderAddress&&de(l,u[0].meta.senderAddress)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function DO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=D(),s=v("label"),l=v("span"),l.innerHTML="Use SMTP mail server (recommended)",o=D(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[31]),e.required=!0,p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[31])},m(c,d){S(c,e,d),e.checked=n[0].smtp.enabled,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[K(e,"change",n[17]),Pe(Ye.call(null,r,{text:'By default PocketBase uses the unix "sendmail" command for sending emails. For better emails deliverability it is recommended to use a SMTP mail server.',position:"top"}))],u=!0)},p(c,d){d[1]&1&&t!==(t=c[31])&&p(e,"id",t),d[0]&1&&(e.checked=c[0].smtp.enabled),d[1]&1&&a!==(a=c[31])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Le(f)}}}function Fm(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$;return i=new _e({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[OO,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[EO,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[AO,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field",name:"smtp.authMethod",$$slots:{default:[IO,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),g=new _e({props:{class:"form-field",name:"smtp.username",$$slots:{default:[PO,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),k=new _e({props:{class:"form-field",name:"smtp.password",$$slots:{default:[LO,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=D(),l=v("div"),V(o.$$.fragment),r=D(),a=v("div"),V(u.$$.fragment),f=D(),c=v("div"),V(d.$$.fragment),m=D(),h=v("div"),V(g.$$.fragment),b=D(),y=v("div"),V(k.$$.fragment),T=D(),C=v("div"),p(t,"class","col-lg-4"),p(l,"class","col-lg-2"),p(a,"class","col-lg-3"),p(c,"class","col-lg-3"),p(h,"class","col-lg-6"),p(y,"class","col-lg-6"),p(C,"class","col-lg-12"),p(e,"class","grid")},m(O,E){S(O,e,E),_(e,t),H(i,t,null),_(e,s),_(e,l),H(o,l,null),_(e,r),_(e,a),H(u,a,null),_(e,f),_(e,c),H(d,c,null),_(e,m),_(e,h),H(g,h,null),_(e,b),_(e,y),H(k,y,null),_(e,T),_(e,C),$=!0},p(O,E){const I={};E[0]&1|E[1]&3&&(I.$$scope={dirty:E,ctx:O}),i.$set(I);const L={};E[0]&1|E[1]&3&&(L.$$scope={dirty:E,ctx:O}),o.$set(L);const N={};E[0]&1|E[1]&3&&(N.$$scope={dirty:E,ctx:O}),u.$set(N);const F={};E[0]&1|E[1]&3&&(F.$$scope={dirty:E,ctx:O}),d.$set(F);const U={};E[0]&1|E[1]&3&&(U.$$scope={dirty:E,ctx:O}),g.$set(U);const J={};E[0]&1|E[1]&3&&(J.$$scope={dirty:E,ctx:O}),k.$set(J)},i(O){$||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(d.$$.fragment,O),A(g.$$.fragment,O),A(k.$$.fragment,O),O&&nt(()=>{M||(M=ze(e,It,{duration:150},!0)),M.run(1)}),$=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(u.$$.fragment,O),P(d.$$.fragment,O),P(g.$$.fragment,O),P(k.$$.fragment,O),O&&(M||(M=ze(e,It,{duration:150},!1)),M.run(0)),$=!1},d(O){O&&w(e),q(i),q(o),q(u),q(d),q(g),q(k),O&&M&&M.end()}}}function OO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("SMTP server host"),s=D(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].smtp.host),r||(a=K(l,"input",n[18]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].smtp.host&&de(l,u[0].smtp.host)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function EO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Port"),s=D(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","number"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].smtp.port),r||(a=K(l,"input",n[19]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&ht(l.value)!==u[0].smtp.port&&de(l,u[0].smtp.port)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function AO(n){let e,t,i,s,l,o,r;function a(f){n[20](f)}let u={id:n[31],items:n[6]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new Ls({props:u}),ie.push(()=>ve(l,"keyOfSelected",a)),{c(){e=v("label"),t=z("TLS Encryption"),s=D(),V(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=f[0].smtp.tls,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),q(l,f)}}}function IO(n){let e,t,i,s,l,o,r;function a(f){n[21](f)}let u={id:n[31],items:n[7]};return n[0].smtp.authMethod!==void 0&&(u.keyOfSelected=n[0].smtp.authMethod),l=new Ls({props:u}),ie.push(()=>ve(l,"keyOfSelected",a)),{c(){e=v("label"),t=z("AUTH Method"),s=D(),V(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=f[0].smtp.authMethod,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),q(l,f)}}}function PO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Username"),s=D(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].smtp.username),r||(a=K(l,"input",n[22]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].smtp.username&&de(l,u[0].smtp.username)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function LO(n){let e,t,i,s,l,o,r;function a(f){n[23](f)}let u={id:n[31]};return n[0].smtp.password!==void 0&&(u.value=n[0].smtp.password),l=new nu({props:u}),ie.push(()=>ve(l,"value",a)),{c(){e=v("label"),t=z("Password"),s=D(),V(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.value=f[0].smtp.password,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),q(l,f)}}}function NO(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - Send test email`,p(e,"type","button"),p(e,"class","btn btn-expanded btn-outline")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[26]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function FO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=D(),s=v("button"),l=v("span"),l.textContent="Save changes",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3],p(l,"class","txt"),p(s,"type","submit"),p(s,"class","btn btn-expanded"),s.disabled=o=!n[4]||n[3],x(s,"btn-loading",n[3])},m(u,f){S(u,e,f),_(e,t),S(u,i,f),S(u,s,f),_(s,l),r||(a=[K(e,"click",n[24]),K(s,"click",n[25])],r=!0)},p(u,f){f[0]&8&&(e.disabled=u[3]),f[0]&24&&o!==(o=!u[4]||u[3])&&(s.disabled=o),f[0]&8&&x(s,"btn-loading",u[3])},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Le(a)}}}function RO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b;const y=[CO,TO],k=[];function T(C,M){return C[2]?0:1}return d=T(n),m=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=z(n[5]),r=D(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Configure common settings for sending emails.

    ",c=D(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(C,r,M),S(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),h=!0,g||(b=K(u,"submit",pt(n[27])),g=!0)},p(C,M){(!h||M[0]&32)&&re(o,C[5]);let $=d;d=T(C),d===$?k[d].p(C,M):(pe(),P(k[$],1,1,()=>{k[$]=null}),me(),m=k[d],m?m.p(C,M):(m=k[d]=y[d](C),m.c()),A(m,1),m.m(u,null))},i(C){h||(A(m),h=!0)},o(C){P(m),h=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),g=!1,b()}}}function jO(n){let e,t,i,s,l,o;e=new Di({}),i=new kn({props:{$$slots:{default:[RO]},$$scope:{ctx:n}}});let r={};return l=new SO({props:r}),n[28](l),{c(){V(e.$$.fragment),t=D(),V(i.$$.fragment),s=D(),V(l.$$.fragment)},m(a,u){H(e,a,u),S(a,t,u),H(i,a,u),S(a,s,u),H(l,a,u),o=!0},p(a,u){const f={};u[0]&63|u[1]&2&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){q(e,a),a&&w(t),q(i,a),a&&w(s),n[28](null),q(l,a)}}}function HO(n,e,t){let i,s,l;Je(n,St,ee=>t(5,l=ee));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}],r=[{label:"PLAIN (default)",value:"PLAIN"},{label:"LOGIN",value:"LOGIN"}];Yt(St,l="Mail settings",l);let a,u={},f={},c=!1,d=!1;m();async function m(){t(2,c=!0);try{const ee=await he.settings.getAll()||{};g(ee)}catch(ee){he.errorResponseHandler(ee)}t(2,c=!1)}async function h(){if(!(d||!s)){t(3,d=!0);try{const ee=await he.settings.update(B.filterRedactedProps(f));g(ee),Vn({}),Vt("Successfully saved mail settings.")}catch(ee){he.errorResponseHandler(ee)}t(3,d=!1)}}function g(ee={}){t(0,f={meta:(ee==null?void 0:ee.meta)||{},smtp:(ee==null?void 0:ee.smtp)||{}}),f.smtp.authMethod||t(0,f.smtp.authMethod=r[0].value,f),t(10,u=JSON.parse(JSON.stringify(f)))}function b(){t(0,f=JSON.parse(JSON.stringify(u||{})))}function y(){f.meta.senderName=this.value,t(0,f)}function k(){f.meta.senderAddress=this.value,t(0,f)}function T(ee){n.$$.not_equal(f.meta.verificationTemplate,ee)&&(f.meta.verificationTemplate=ee,t(0,f))}function C(ee){n.$$.not_equal(f.meta.resetPasswordTemplate,ee)&&(f.meta.resetPasswordTemplate=ee,t(0,f))}function M(ee){n.$$.not_equal(f.meta.confirmEmailChangeTemplate,ee)&&(f.meta.confirmEmailChangeTemplate=ee,t(0,f))}function $(){f.smtp.enabled=this.checked,t(0,f)}function O(){f.smtp.host=this.value,t(0,f)}function E(){f.smtp.port=ht(this.value),t(0,f)}function I(ee){n.$$.not_equal(f.smtp.tls,ee)&&(f.smtp.tls=ee,t(0,f))}function L(ee){n.$$.not_equal(f.smtp.authMethod,ee)&&(f.smtp.authMethod=ee,t(0,f))}function N(){f.smtp.username=this.value,t(0,f)}function F(ee){n.$$.not_equal(f.smtp.password,ee)&&(f.smtp.password=ee,t(0,f))}const U=()=>b(),J=()=>h(),ne=()=>a==null?void 0:a.show(),Z=()=>h();function te(ee){ie[ee?"unshift":"push"](()=>{a=ee,t(1,a)})}return n.$$.update=()=>{n.$$.dirty[0]&1024&&t(11,i=JSON.stringify(u)),n.$$.dirty[0]&2049&&t(4,s=i!=JSON.stringify(f))},[f,a,c,d,s,l,o,r,h,b,u,i,y,k,T,C,M,$,O,E,I,L,N,F,U,J,ne,Z,te]}class qO extends ke{constructor(e){super(),ye(this,e,HO,jO,be,{},null,[-1,-1])}}function VO(n){var C,M;let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;e=new _e({props:{class:"form-field form-field-toggle",$$slots:{default:[BO,({uniqueId:$})=>({25:$}),({uniqueId:$})=>$?33554432:0]},$$scope:{ctx:n}}});let b=((C=n[0].s3)==null?void 0:C.enabled)!=n[1].s3.enabled&&Rm(n),y=n[1].s3.enabled&&jm(n),k=((M=n[1].s3)==null?void 0:M.enabled)&&!n[6]&&!n[3]&&Hm(n),T=n[6]&&qm(n);return{c(){V(e.$$.fragment),t=D(),b&&b.c(),i=D(),y&&y.c(),s=D(),l=v("div"),o=v("div"),r=D(),k&&k.c(),a=D(),T&&T.c(),u=D(),f=v("button"),c=v("span"),c.textContent="Save changes",p(o,"class","flex-fill"),p(c,"class","txt"),p(f,"type","submit"),p(f,"class","btn btn-expanded"),f.disabled=d=!n[6]||n[3],x(f,"btn-loading",n[3]),p(l,"class","flex")},m($,O){H(e,$,O),S($,t,O),b&&b.m($,O),S($,i,O),y&&y.m($,O),S($,s,O),S($,l,O),_(l,o),_(l,r),k&&k.m(l,null),_(l,a),T&&T.m(l,null),_(l,u),_(l,f),_(f,c),m=!0,h||(g=K(f,"click",n[19]),h=!0)},p($,O){var I,L;const E={};O&100663298&&(E.$$scope={dirty:O,ctx:$}),e.$set(E),((I=$[0].s3)==null?void 0:I.enabled)!=$[1].s3.enabled?b?(b.p($,O),O&3&&A(b,1)):(b=Rm($),b.c(),A(b,1),b.m(i.parentNode,i)):b&&(pe(),P(b,1,1,()=>{b=null}),me()),$[1].s3.enabled?y?(y.p($,O),O&2&&A(y,1)):(y=jm($),y.c(),A(y,1),y.m(s.parentNode,s)):y&&(pe(),P(y,1,1,()=>{y=null}),me()),(L=$[1].s3)!=null&&L.enabled&&!$[6]&&!$[3]?k?k.p($,O):(k=Hm($),k.c(),k.m(l,a)):k&&(k.d(1),k=null),$[6]?T?T.p($,O):(T=qm($),T.c(),T.m(l,u)):T&&(T.d(1),T=null),(!m||O&72&&d!==(d=!$[6]||$[3]))&&(f.disabled=d),(!m||O&8)&&x(f,"btn-loading",$[3])},i($){m||(A(e.$$.fragment,$),A(b),A(y),m=!0)},o($){P(e.$$.fragment,$),P(b),P(y),m=!1},d($){q(e,$),$&&w(t),b&&b.d($),$&&w(i),y&&y.d($),$&&w(s),$&&w(l),k&&k.d(),T&&T.d(),h=!1,g()}}}function zO(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function BO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=z("Use S3 storage"),p(e,"type","checkbox"),p(e,"id",t=n[25]),e.required=!0,p(s,"for",o=n[25])},m(u,f){S(u,e,f),e.checked=n[1].s3.enabled,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[11]),r=!0)},p(u,f){f&33554432&&t!==(t=u[25])&&p(e,"id",t),f&2&&(e.checked=u[1].s3.enabled),f&33554432&&o!==(o=u[25])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Rm(n){var I;let e,t,i,s,l,o,r,a=(I=n[0].s3)!=null&&I.enabled?"S3 storage":"local file system",u,f,c,d=n[1].s3.enabled?"S3 storage":"local file system",m,h,g,b,y,k,T,C,M,$,O,E;return{c(){e=v("div"),t=v("div"),i=v("div"),i.innerHTML='',s=D(),l=v("div"),o=z(`If you have existing uploaded files, you'll have to migrate them manually from - the - `),r=v("strong"),u=z(a),f=z(` - to the - `),c=v("strong"),m=z(d),h=z(`. - `),g=v("br"),b=z(` - There are numerous command line tools that can help you, such as: - `),y=v("a"),y.textContent=`rclone - `,k=z(`, - `),T=v("a"),T.textContent=`s5cmd - `,C=z(", etc."),M=D(),$=v("div"),p(i,"class","icon"),p(y,"href","https://github.com/rclone/rclone"),p(y,"target","_blank"),p(y,"rel","noopener noreferrer"),p(y,"class","txt-bold"),p(T,"href","https://github.com/peak/s5cmd"),p(T,"target","_blank"),p(T,"rel","noopener noreferrer"),p(T,"class","txt-bold"),p(l,"class","content"),p(t,"class","alert alert-warning m-0"),p($,"class","clearfix m-t-base")},m(L,N){S(L,e,N),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),_(l,r),_(r,u),_(l,f),_(l,c),_(c,m),_(l,h),_(l,g),_(l,b),_(l,y),_(l,k),_(l,T),_(l,C),_(e,M),_(e,$),E=!0},p(L,N){var F;(!E||N&1)&&a!==(a=(F=L[0].s3)!=null&&F.enabled?"S3 storage":"local file system")&&re(u,a),(!E||N&2)&&d!==(d=L[1].s3.enabled?"S3 storage":"local file system")&&re(m,d)},i(L){E||(L&&nt(()=>{O||(O=ze(e,It,{duration:150},!0)),O.run(1)}),E=!0)},o(L){L&&(O||(O=ze(e,It,{duration:150},!1)),O.run(0)),E=!1},d(L){L&&w(e),L&&O&&O.end()}}}function jm(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$;return i=new _e({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[UO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[WO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field required",name:"s3.region",$$slots:{default:[YO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[KO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),g=new _e({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[JO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),k=new _e({props:{class:"form-field",name:"s3.forcePathStyle",$$slots:{default:[ZO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),V(i.$$.fragment),s=D(),l=v("div"),V(o.$$.fragment),r=D(),a=v("div"),V(u.$$.fragment),f=D(),c=v("div"),V(d.$$.fragment),m=D(),h=v("div"),V(g.$$.fragment),b=D(),y=v("div"),V(k.$$.fragment),T=D(),C=v("div"),p(t,"class","col-lg-6"),p(l,"class","col-lg-3"),p(a,"class","col-lg-3"),p(c,"class","col-lg-6"),p(h,"class","col-lg-6"),p(y,"class","col-lg-12"),p(C,"class","col-lg-12"),p(e,"class","grid")},m(O,E){S(O,e,E),_(e,t),H(i,t,null),_(e,s),_(e,l),H(o,l,null),_(e,r),_(e,a),H(u,a,null),_(e,f),_(e,c),H(d,c,null),_(e,m),_(e,h),H(g,h,null),_(e,b),_(e,y),H(k,y,null),_(e,T),_(e,C),$=!0},p(O,E){const I={};E&100663298&&(I.$$scope={dirty:E,ctx:O}),i.$set(I);const L={};E&100663298&&(L.$$scope={dirty:E,ctx:O}),o.$set(L);const N={};E&100663298&&(N.$$scope={dirty:E,ctx:O}),u.$set(N);const F={};E&100663298&&(F.$$scope={dirty:E,ctx:O}),d.$set(F);const U={};E&100663298&&(U.$$scope={dirty:E,ctx:O}),g.$set(U);const J={};E&100663298&&(J.$$scope={dirty:E,ctx:O}),k.$set(J)},i(O){$||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(d.$$.fragment,O),A(g.$$.fragment,O),A(k.$$.fragment,O),O&&nt(()=>{M||(M=ze(e,It,{duration:150},!0)),M.run(1)}),$=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(u.$$.fragment,O),P(d.$$.fragment,O),P(g.$$.fragment,O),P(k.$$.fragment,O),O&&(M||(M=ze(e,It,{duration:150},!1)),M.run(0)),$=!1},d(O){O&&w(e),q(i),q(o),q(u),q(d),q(g),q(k),O&&M&&M.end()}}}function UO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Endpoint"),s=D(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[1].s3.endpoint),r||(a=K(l,"input",n[12]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.endpoint&&de(l,u[1].s3.endpoint)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function WO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Bucket"),s=D(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[1].s3.bucket),r||(a=K(l,"input",n[13]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.bucket&&de(l,u[1].s3.bucket)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function YO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Region"),s=D(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[1].s3.region),r||(a=K(l,"input",n[14]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.region&&de(l,u[1].s3.region)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function KO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Access key"),s=D(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[1].s3.accessKey),r||(a=K(l,"input",n[15]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.accessKey&&de(l,u[1].s3.accessKey)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function JO(n){let e,t,i,s,l,o,r;function a(f){n[16](f)}let u={id:n[25],required:!0};return n[1].s3.secret!==void 0&&(u.value=n[1].s3.secret),l=new nu({props:u}),ie.push(()=>ve(l,"value",a)),{c(){e=v("label"),t=z("Secret"),s=D(),V(l.$$.fragment),p(e,"for",i=n[25])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c&33554432&&i!==(i=f[25]))&&p(e,"for",i);const d={};c&33554432&&(d.id=f[25]),!o&&c&2&&(o=!0,d.value=f[1].s3.secret,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),q(l,f)}}}function ZO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=D(),s=v("label"),l=v("span"),l.textContent="Force path-style addressing",o=D(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[25]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[25])},m(c,d){S(c,e,d),e.checked=n[1].s3.forcePathStyle,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[K(e,"change",n[17]),Pe(Ye.call(null,r,{text:'Forces the request to use path-style addressing, eg. "https://s3.amazonaws.com/BUCKET/KEY" instead of the default "https://BUCKET.s3.amazonaws.com/KEY".',position:"top"}))],u=!0)},p(c,d){d&33554432&&t!==(t=c[25])&&p(e,"id",t),d&2&&(e.checked=c[1].s3.forcePathStyle),d&33554432&&a!==(a=c[25])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Le(f)}}}function Hm(n){let e;function t(l,o){return l[4]?xO:l[5]?XO:GO}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function GO(n){let e;return{c(){e=v("div"),e.innerHTML=` - S3 connected successfully`,p(e,"class","label label-sm label-success entrance-right")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function XO(n){let e,t,i,s;return{c(){e=v("div"),e.innerHTML=` - Failed to establish S3 connection`,p(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;S(l,e,o),i||(s=Pe(t=Ye.call(null,e,(r=n[5].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&zt(t.update)&&o&32&&t.update.call(null,(r=l[5].data)==null?void 0:r.message)},d(l){l&&w(e),i=!1,s()}}}function xO(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:G,d(t){t&&w(e)}}}function qm(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3]},m(l,o){S(l,e,o),_(e,t),i||(s=K(e,"click",n[18]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&w(e),i=!1,s()}}}function QO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b;const y=[zO,VO],k=[];function T(C,M){return C[2]?0:1}return d=T(n),m=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=z(n[7]),r=D(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML=`

    By default PocketBase uses the local file system to store uploaded files.

    -

    If you have limited disk space, you could optionally connect to a S3 compatible storage.

    `,c=D(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(C,r,M),S(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),h=!0,g||(b=K(u,"submit",pt(n[20])),g=!0)},p(C,M){(!h||M&128)&&re(o,C[7]);let $=d;d=T(C),d===$?k[d].p(C,M):(pe(),P(k[$],1,1,()=>{k[$]=null}),me(),m=k[d],m?m.p(C,M):(m=k[d]=y[d](C),m.c()),A(m,1),m.m(u,null))},i(C){h||(A(m),h=!0)},o(C){P(m),h=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),g=!1,b()}}}function eE(n){let e,t,i,s;return e=new Di({}),i=new kn({props:{$$slots:{default:[QO]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment),t=D(),V(i.$$.fragment)},m(l,o){H(e,l,o),S(l,t,o),H(i,l,o),s=!0},p(l,[o]){const r={};o&67109119&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){q(e,l),l&&w(t),q(i,l)}}}const lo="s3_test_request";function tE(n,e,t){let i,s,l;Je(n,St,F=>t(7,l=F)),Yt(St,l="Files storage",l);let o={},r={},a=!1,u=!1,f=!1,c=null,d=null;m();async function m(){t(2,a=!0);try{const F=await he.settings.getAll()||{};g(F)}catch(F){he.errorResponseHandler(F)}t(2,a=!1)}async function h(){if(!(u||!s)){t(3,u=!0);try{he.cancelRequest(lo);const F=await he.settings.update(B.filterRedactedProps(r));Vn({}),await g(F),Ca(),c?ov("Successfully saved but failed to establish S3 connection."):Vt("Successfully saved files storage settings.")}catch(F){he.errorResponseHandler(F)}t(3,u=!1)}}async function g(F={}){t(1,r={s3:(F==null?void 0:F.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r))),await y()}async function b(){t(1,r=JSON.parse(JSON.stringify(o||{}))),await y()}async function y(){if(t(5,c=null),!!r.s3.enabled){he.cancelRequest(lo),clearTimeout(d),d=setTimeout(()=>{he.cancelRequest(lo),addErrorToast("S3 test connection timeout.")},3e4),t(4,f=!0);try{await he.settings.testS3({$cancelKey:lo})}catch(F){t(5,c=F)}t(4,f=!1),clearTimeout(d)}}sn(()=>()=>{clearTimeout(d)});function k(){r.s3.enabled=this.checked,t(1,r)}function T(){r.s3.endpoint=this.value,t(1,r)}function C(){r.s3.bucket=this.value,t(1,r)}function M(){r.s3.region=this.value,t(1,r)}function $(){r.s3.accessKey=this.value,t(1,r)}function O(F){n.$$.not_equal(r.s3.secret,F)&&(r.s3.secret=F,t(1,r))}function E(){r.s3.forcePathStyle=this.checked,t(1,r)}const I=()=>b(),L=()=>h(),N=()=>h();return n.$$.update=()=>{n.$$.dirty&1&&t(10,i=JSON.stringify(o)),n.$$.dirty&1026&&t(6,s=i!=JSON.stringify(r))},[o,r,a,u,f,c,s,l,h,b,i,k,T,C,M,$,O,E,I,L,N]}class nE extends ke{constructor(e){super(),ye(this,e,tE,eE,be,{})}}function iE(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=D(),s=v("label"),l=z("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[20]),p(s,"for",o=n[20])},m(u,f){S(u,e,f),e.checked=n[0].enabled,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[12]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&1048576&&o!==(o=u[20])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function sE(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Client ID"),s=D(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),de(l,n[0].clientId),r||(a=K(l,"input",n[13]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].clientId&&de(l,u[0].clientId)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function lE(n){let e,t,i,s,l,o,r;function a(f){n[14](f)}let u={id:n[20],required:!0};return n[0].clientSecret!==void 0&&(u.value=n[0].clientSecret),l=new nu({props:u}),ie.push(()=>ve(l,"value",a)),{c(){e=v("label"),t=z("Client Secret"),s=D(),V(l.$$.fragment),p(e,"for",i=n[20])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c&1048576&&i!==(i=f[20]))&&p(e,"for",i);const d={};c&1048576&&(d.id=f[20]),!o&&c&1&&(o=!0,d.value=f[0].clientSecret,we(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),q(l,f)}}}function Vm(n){let e,t,i,s;function l(a){n[15](a)}var o=n[4];function r(a){let u={key:a[1]};return a[0]!==void 0&&(u.config=a[0]),{props:u}}return o&&(t=Kt(o,r(n)),ie.push(()=>ve(t,"config",l))),{c(){e=v("div"),t&&V(t.$$.fragment),p(e,"class","col-lg-12")},m(a,u){S(a,e,u),t&&H(t,e,null),s=!0},p(a,u){const f={};if(u&2&&(f.key=a[1]),!i&&u&1&&(i=!0,f.config=a[0],we(()=>i=!1)),o!==(o=a[4])){if(t){pe();const c=t;P(c.$$.fragment,1,0,()=>{q(c,1)}),me()}o?(t=Kt(o,r(a)),ie.push(()=>ve(t,"config",l)),V(t.$$.fragment),A(t.$$.fragment,1),H(t,e,null)):t=null}else o&&t.$set(f)},i(a){s||(t&&A(t.$$.fragment,a),s=!0)},o(a){t&&P(t.$$.fragment,a),s=!1},d(a){a&&w(e),t&&q(t)}}}function oE(n){let e,t,i,s,l,o,r,a,u,f,c,d;e=new _e({props:{class:"form-field form-field-toggle m-b-0",name:n[1]+".enabled",$$slots:{default:[iE,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}}),r=new _e({props:{class:"form-field required",name:n[1]+".clientId",$$slots:{default:[sE,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}}),f=new _e({props:{class:"form-field required",name:n[1]+".clientSecret",$$slots:{default:[lE,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}});let m=n[4]&&Vm(n);return{c(){V(e.$$.fragment),t=D(),i=v("div"),s=v("div"),l=D(),o=v("div"),V(r.$$.fragment),a=D(),u=v("div"),V(f.$$.fragment),c=D(),m&&m.c(),p(s,"class","col-12 spacing"),p(o,"class","col-lg-6"),p(u,"class","col-lg-6"),p(i,"class","grid")},m(h,g){H(e,h,g),S(h,t,g),S(h,i,g),_(i,s),_(i,l),_(i,o),H(r,o,null),_(i,a),_(i,u),H(f,u,null),_(i,c),m&&m.m(i,null),d=!0},p(h,g){const b={};g&2&&(b.name=h[1]+".enabled"),g&3145729&&(b.$$scope={dirty:g,ctx:h}),e.$set(b);const y={};g&2&&(y.name=h[1]+".clientId"),g&3145729&&(y.$$scope={dirty:g,ctx:h}),r.$set(y);const k={};g&2&&(k.name=h[1]+".clientSecret"),g&3145729&&(k.$$scope={dirty:g,ctx:h}),f.$set(k),h[4]?m?(m.p(h,g),g&16&&A(m,1)):(m=Vm(h),m.c(),A(m,1),m.m(i,null)):m&&(pe(),P(m,1,1,()=>{m=null}),me())},i(h){d||(A(e.$$.fragment,h),A(r.$$.fragment,h),A(f.$$.fragment,h),A(m),d=!0)},o(h){P(e.$$.fragment,h),P(r.$$.fragment,h),P(f.$$.fragment,h),P(m),d=!1},d(h){q(e,h),h&&w(t),h&&w(i),q(r),q(f),m&&m.d()}}}function zm(n){let e;return{c(){e=v("i"),p(e,"class",n[3])},m(t,i){S(t,e,i)},p(t,i){i&8&&p(e,"class",t[3])},d(t){t&&w(e)}}}function Bm(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Pe(Ye.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&nt(()=>{t||(t=ze(e,Pt,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=ze(e,Pt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function rE(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label label-hint")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function aE(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function uE(n){let e,t,i,s,l,o,r,a,u,f=n[3]&&zm(n),c=n[6]&&Bm();function d(g,b){return g[0].enabled?aE:rE}let m=d(n),h=m(n);return{c(){e=v("div"),f&&f.c(),t=D(),i=v("span"),s=z(n[2]),l=D(),o=v("div"),r=D(),c&&c.c(),a=D(),h.c(),u=Ae(),p(i,"class","txt"),p(e,"class","inline-flex"),p(o,"class","flex-fill")},m(g,b){S(g,e,b),f&&f.m(e,null),_(e,t),_(e,i),_(i,s),S(g,l,b),S(g,o,b),S(g,r,b),c&&c.m(g,b),S(g,a,b),h.m(g,b),S(g,u,b)},p(g,b){g[3]?f?f.p(g,b):(f=zm(g),f.c(),f.m(e,t)):f&&(f.d(1),f=null),b&4&&re(s,g[2]),g[6]?c?b&64&&A(c,1):(c=Bm(),c.c(),A(c,1),c.m(a.parentNode,a)):c&&(pe(),P(c,1,1,()=>{c=null}),me()),m!==(m=d(g))&&(h.d(1),h=m(g),h&&(h.c(),h.m(u.parentNode,u)))},d(g){g&&w(e),f&&f.d(),g&&w(l),g&&w(o),g&&w(r),c&&c.d(g),g&&w(a),h.d(g),g&&w(u)}}}function fE(n){let e,t;const i=[n[7]];let s={$$slots:{header:[uE],default:[oE]},$$scope:{ctx:n}};for(let l=0;lt(11,o=E));let{key:r}=e,{title:a}=e,{icon:u=""}=e,{config:f={}}=e,{optionsComponent:c}=e,d;function m(){d==null||d.expand()}function h(){d==null||d.collapse()}function g(){d==null||d.collapseSiblings()}function b(){f.enabled=this.checked,t(0,f)}function y(){f.clientId=this.value,t(0,f)}function k(E){n.$$.not_equal(f.clientSecret,E)&&(f.clientSecret=E,t(0,f))}function T(E){f=E,t(0,f)}function C(E){ie[E?"unshift":"push"](()=>{d=E,t(5,d)})}function M(E){We.call(this,n,E)}function $(E){We.call(this,n,E)}function O(E){We.call(this,n,E)}return n.$$set=E=>{e=Xe(Xe({},e),Gn(E)),t(7,l=At(e,s)),"key"in E&&t(1,r=E.key),"title"in E&&t(2,a=E.title),"icon"in E&&t(3,u=E.icon),"config"in E&&t(0,f=E.config),"optionsComponent"in E&&t(4,c=E.optionsComponent)},n.$$.update=()=>{n.$$.dirty&2050&&t(6,i=!B.isEmpty(B.getNestedVal(o,r))),n.$$.dirty&3&&(f.enabled||Ts(r))},[f,r,a,u,c,d,i,l,m,h,g,o,b,y,k,T,C,M,$,O]}class dE extends ke{constructor(e){super(),ye(this,e,cE,fE,be,{key:1,title:2,icon:3,config:0,optionsComponent:4,expand:8,collapse:9,collapseSiblings:10})}get expand(){return this.$$.ctx[8]}get collapse(){return this.$$.ctx[9]}get collapseSiblings(){return this.$$.ctx[10]}}function Um(n,e,t){const i=n.slice();return i[15]=e[t][0],i[16]=e[t][1],i[17]=e,i[18]=t,i}function pE(n){let e,t,i,s,l,o,r,a,u,f,c=Object.entries(vl),d=[];for(let g=0;gP(d[g],1,1,()=>{d[g]=null});let h=n[4]&&Ym(n);return{c(){e=v("div");for(let g=0;gn[10](e,t),o=()=>n[10](null,t);function r(u){n[11](u,n[15])}let a={single:!0,key:n[15],title:n[16].title,icon:n[16].icon||"ri-fingerprint-line",optionsComponent:n[16].optionsComponent};return n[0][n[15]]!==void 0&&(a.config=n[0][n[15]]),e=new dE({props:a}),l(),ie.push(()=>ve(e,"config",r)),{c(){V(e.$$.fragment)},m(u,f){H(e,u,f),s=!0},p(u,f){n=u,t!==n[15]&&(o(),t=n[15],l());const c={};!i&&f&1&&(i=!0,c.config=n[0][n[15]],we(()=>i=!1)),e.$set(c)},i(u){s||(A(e.$$.fragment,u),s=!0)},o(u){P(e.$$.fragment,u),s=!1},d(u){o(),q(e,u)}}}function Ym(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3]},m(l,o){S(l,e,o),_(e,t),i||(s=K(e,"click",n[12]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&w(e),i=!1,s()}}}function hE(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b;const y=[mE,pE],k=[];function T(C,M){return C[2]?0:1}return d=T(n),m=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=z(n[5]),r=D(),a=v("div"),u=v("form"),f=v("h6"),f.textContent="Manage the allowed users OAuth2 sign-in/sign-up methods.",c=D(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(C,r,M),S(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),h=!0,g||(b=K(u,"submit",pt(n[6])),g=!0)},p(C,M){(!h||M&32)&&re(o,C[5]);let $=d;d=T(C),d===$?k[d].p(C,M):(pe(),P(k[$],1,1,()=>{k[$]=null}),me(),m=k[d],m?m.p(C,M):(m=k[d]=y[d](C),m.c()),A(m,1),m.m(u,null))},i(C){h||(A(m),h=!0)},o(C){P(m),h=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),g=!1,b()}}}function gE(n){let e,t,i,s;return e=new Di({}),i=new kn({props:{$$slots:{default:[hE]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment),t=D(),V(i.$$.fragment)},m(l,o){H(e,l,o),S(l,t,o),H(i,l,o),s=!0},p(l,[o]){const r={};o&524351&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){q(e,l),l&&w(t),q(i,l)}}}function _E(n,e,t){let i,s,l;Je(n,St,k=>t(5,l=k)),Yt(St,l="Auth providers",l);let o={},r={},a={},u=!1,f=!1;c();async function c(){t(2,u=!0);try{const k=await he.settings.getAll()||{};m(k)}catch(k){he.errorResponseHandler(k)}t(2,u=!1)}async function d(){var k;if(!(f||!s)){t(3,f=!0);try{const T=await he.settings.update(B.filterRedactedProps(a));m(T),Vn({}),(k=o[Object.keys(o)[0]])==null||k.collapseSiblings(),Vt("Successfully updated auth providers.")}catch(T){he.errorResponseHandler(T)}t(3,f=!1)}}function m(k){k=k||{},t(0,a={});for(const T in vl)t(0,a[T]=Object.assign({enabled:!1},k[T]),a);t(8,r=JSON.parse(JSON.stringify(a)))}function h(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function g(k,T){ie[k?"unshift":"push"](()=>{o[T]=k,t(1,o)})}function b(k,T){n.$$.not_equal(a[T],k)&&(a[T]=k,t(0,a))}const y=()=>h();return n.$$.update=()=>{n.$$.dirty&256&&t(9,i=JSON.stringify(r)),n.$$.dirty&513&&t(4,s=i!=JSON.stringify(a))},[a,o,u,f,s,l,d,h,r,i,g,b,y]}class bE extends ke{constructor(e){super(),ye(this,e,_E,gE,be,{})}}function Km(n,e,t){const i=n.slice();return i[16]=e[t],i[17]=e,i[18]=t,i}function vE(n){let e=[],t=new Map,i,s,l,o,r,a,u,f,c,d,m,h=n[5];const g=y=>y[16].key;for(let y=0;y({19:l}),({uniqueId:l})=>l?524288:0]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=Ae(),V(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),H(i,l,o),s=!0},p(l,o){e=l;const r={};o&1572865&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),q(i,l)}}}function Zm(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),_(e,t),i||(s=K(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function wE(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b;const y=[yE,vE],k=[];function T(C,M){return C[1]?0:1}return d=T(n),m=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=z(n[4]),r=D(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Adjust common token options.

    ",c=D(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content m-b-sm txt-xl"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(C,r,M),S(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),h=!0,g||(b=K(u,"submit",pt(n[6])),g=!0)},p(C,M){(!h||M&16)&&re(o,C[4]);let $=d;d=T(C),d===$?k[d].p(C,M):(pe(),P(k[$],1,1,()=>{k[$]=null}),me(),m=k[d],m?m.p(C,M):(m=k[d]=y[d](C),m.c()),A(m,1),m.m(u,null))},i(C){h||(A(m),h=!0)},o(C){P(m),h=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),g=!1,b()}}}function SE(n){let e,t,i,s;return e=new Di({}),i=new kn({props:{$$slots:{default:[wE]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment),t=D(),V(i.$$.fragment)},m(l,o){H(e,l,o),S(l,t,o),H(i,l,o),s=!0},p(l,[o]){const r={};o&1048607&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){q(e,l),l&&w(t),q(i,l)}}}function TE(n,e,t){let i,s,l;Je(n,St,T=>t(4,l=T));const o=[{key:"recordAuthToken",label:"Auth record authentication token"},{key:"recordVerificationToken",label:"Auth record email verification token"},{key:"recordPasswordResetToken",label:"Auth record password reset token"},{key:"recordEmailChangeToken",label:"Auth record email change token"},{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"}];Yt(St,l="Token options",l);let r={},a={},u=!1,f=!1;c();async function c(){t(1,u=!0);try{const T=await he.settings.getAll()||{};m(T)}catch(T){he.errorResponseHandler(T)}t(1,u=!1)}async function d(){if(!(f||!s)){t(2,f=!0);try{const T=await he.settings.update(B.filterRedactedProps(a));m(T),Vt("Successfully saved tokens options.")}catch(T){he.errorResponseHandler(T)}t(2,f=!1)}}function m(T){var C;T=T||{},t(0,a={});for(const M of o)t(0,a[M.key]={duration:((C=T[M.key])==null?void 0:C.duration)||0},a);t(8,r=JSON.parse(JSON.stringify(a)))}function h(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function g(T){a[T.key].duration=ht(this.value),t(0,a)}const b=T=>{a[T.key].secret?(delete a[T.key].secret,t(0,a)):t(0,a[T.key].secret=B.randomString(50),a)},y=()=>h(),k=()=>d();return n.$$.update=()=>{n.$$.dirty&256&&t(9,i=JSON.stringify(r)),n.$$.dirty&513&&t(3,s=i!=JSON.stringify(a))},[a,u,f,s,l,o,d,h,r,i,g,b,y,k]}class CE extends ke{constructor(e){super(),ye(this,e,TE,SE,be,{})}}function $E(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h;return o=new nb({props:{content:n[2]}}),{c(){e=v("div"),e.innerHTML=`

    Below you'll find your current collections configuration that you could import in - another PocketBase environment.

    `,t=D(),i=v("div"),s=v("button"),s.innerHTML='Copy',l=D(),V(o.$$.fragment),r=D(),a=v("div"),u=v("div"),f=D(),c=v("button"),c.innerHTML=` - Download as JSON`,p(e,"class","content txt-xl m-b-base"),p(s,"type","button"),p(s,"class","btn btn-sm btn-transparent fade copy-schema svelte-jm5c4z"),p(i,"tabindex","0"),p(i,"class","export-preview svelte-jm5c4z"),p(u,"class","flex-fill"),p(c,"type","button"),p(c,"class","btn btn-expanded"),p(a,"class","flex m-t-base")},m(g,b){S(g,e,b),S(g,t,b),S(g,i,b),_(i,s),_(i,l),H(o,i,null),n[8](i),S(g,r,b),S(g,a,b),_(a,u),_(a,f),_(a,c),d=!0,m||(h=[K(s,"click",n[7]),K(i,"keydown",n[9]),K(c,"click",n[10])],m=!0)},p(g,b){const y={};b&4&&(y.content=g[2]),o.$set(y)},i(g){d||(A(o.$$.fragment,g),d=!0)},o(g){P(o.$$.fragment,g),d=!1},d(g){g&&w(e),g&&w(t),g&&w(i),q(o),n[8](null),g&&w(r),g&&w(a),m=!1,Le(h)}}}function ME(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function DE(n){let e,t,i,s,l,o,r,a,u,f,c,d;const m=[ME,$E],h=[];function g(b,y){return b[1]?0:1}return f=g(n),c=h[f]=m[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=z(n[3]),r=D(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(b,y){S(b,e,y),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(b,r,y),S(b,a,y),_(a,u),h[f].m(u,null),d=!0},p(b,y){(!d||y&8)&&re(o,b[3]);let k=f;f=g(b),f===k?h[f].p(b,y):(pe(),P(h[k],1,1,()=>{h[k]=null}),me(),c=h[f],c?c.p(b,y):(c=h[f]=m[f](b),c.c()),A(c,1),c.m(u,null))},i(b){d||(A(c),d=!0)},o(b){P(c),d=!1},d(b){b&&w(e),b&&w(r),b&&w(a),h[f].d()}}}function OE(n){let e,t,i,s;return e=new Di({}),i=new kn({props:{$$slots:{default:[DE]},$$scope:{ctx:n}}}),{c(){V(e.$$.fragment),t=D(),V(i.$$.fragment)},m(l,o){H(e,l,o),S(l,t,o),H(i,l,o),s=!0},p(l,[o]){const r={};o&8207&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){q(e,l),l&&w(t),q(i,l)}}}function EE(n,e,t){let i,s;Je(n,St,b=>t(3,s=b)),Yt(St,s="Export collections",s);const l="export_"+B.randomString(5);let o,r=[],a=!1;u();async function u(){t(1,a=!0);try{t(6,r=await he.collections.getFullList(100,{$cancelKey:l}));for(let b of r)delete b.created,delete b.updated}catch(b){he.errorResponseHandler(b)}t(1,a=!1)}function f(){B.downloadJson(r,"pb_schema")}function c(){B.copyToClipboard(i),t_("The configuration was copied to your clipboard!",3e3)}const d=()=>c();function m(b){ie[b?"unshift":"push"](()=>{o=b,t(0,o)})}const h=b=>{if(b.ctrlKey&&b.code==="KeyA"){b.preventDefault();const y=window.getSelection(),k=document.createRange();k.selectNodeContents(o),y.removeAllRanges(),y.addRange(k)}},g=()=>f();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,4))},[o,a,i,s,f,c,r,d,m,h,g]}class AE extends ke{constructor(e){super(),ye(this,e,EE,OE,be,{})}}function Gm(n,e,t){const i=n.slice();return i[14]=e[t],i}function Xm(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function xm(n,e,t){const i=n.slice();return i[14]=e[t],i}function Qm(n,e,t){const i=n.slice();return i[17]=e[t][0],i[23]=e[t][1],i}function eh(n,e,t){const i=n.slice();return i[14]=e[t],i}function th(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function nh(n,e,t){const i=n.slice();return i[30]=e[t],i}function IE(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&ih(),a=n[0].name!==n[1].name&&sh(n);return{c(){e=v("div"),r&&r.c(),t=D(),a&&a.c(),i=D(),s=v("strong"),o=z(l),p(s,"class","txt"),p(e,"class","inline-flex fleg-gap-5")},m(u,f){S(u,e,f),r&&r.m(e,null),_(e,t),a&&a.m(e,null),_(e,i),_(e,s),_(s,o)},p(u,f){u[9]?r||(r=ih(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),u[0].name!==u[1].name?a?a.p(u,f):(a=sh(u),a.c(),a.m(e,i)):a&&(a.d(1),a=null),f[0]&2&&l!==(l=u[1].name+"")&&re(o,l)},d(u){u&&w(e),r&&r.d(),a&&a.d()}}}function PE(n){var o;let e,t,i,s=((o=n[0])==null?void 0:o.name)+"",l;return{c(){e=v("span"),e.textContent="Deleted",t=D(),i=v("strong"),l=z(s),p(e,"class","label label-danger")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),_(i,l)},p(r,a){var u;a[0]&1&&s!==(s=((u=r[0])==null?void 0:u.name)+"")&&re(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function LE(n){var o;let e,t,i,s=((o=n[1])==null?void 0:o.name)+"",l;return{c(){e=v("span"),e.textContent="Added",t=D(),i=v("strong"),l=z(s),p(e,"class","label label-success")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),_(i,l)},p(r,a){var u;a[0]&2&&s!==(s=((u=r[1])==null?void 0:u.name)+"")&&re(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function ih(n){let e;return{c(){e=v("span"),e.textContent="Changed",p(e,"class","label label-warning")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function sh(n){let e,t=n[0].name+"",i,s,l;return{c(){e=v("strong"),i=z(t),s=D(),l=v("i"),p(e,"class","txt-strikethrough txt-hint"),p(l,"class","ri-arrow-right-line txt-sm")},m(o,r){S(o,e,r),_(e,i),S(o,s,r),S(o,l,r)},p(o,r){r[0]&1&&t!==(t=o[0].name+"")&&re(i,t)},d(o){o&&w(e),o&&w(s),o&&w(l)}}}function lh(n){var b,y;let e,t,i,s=n[30]+"",l,o,r,a,u=n[12]((b=n[0])==null?void 0:b[n[30]])+"",f,c,d,m,h=n[12]((y=n[1])==null?void 0:y[n[30]])+"",g;return{c(){var k,T,C,M,$,O;e=v("tr"),t=v("td"),i=v("span"),l=z(s),o=D(),r=v("td"),a=v("pre"),f=z(u),c=D(),d=v("td"),m=v("pre"),g=z(h),p(t,"class","min-width svelte-lmkr38"),p(a,"class","txt"),p(r,"class","svelte-lmkr38"),x(r,"changed-old-col",!n[10]&&an((k=n[0])==null?void 0:k[n[30]],(T=n[1])==null?void 0:T[n[30]])),x(r,"changed-none-col",n[10]),p(m,"class","txt"),p(d,"class","svelte-lmkr38"),x(d,"changed-new-col",!n[5]&&an((C=n[0])==null?void 0:C[n[30]],(M=n[1])==null?void 0:M[n[30]])),x(d,"changed-none-col",n[5]),p(e,"class","svelte-lmkr38"),x(e,"txt-primary",an(($=n[0])==null?void 0:$[n[30]],(O=n[1])==null?void 0:O[n[30]]))},m(k,T){S(k,e,T),_(e,t),_(t,i),_(i,l),_(e,o),_(e,r),_(r,a),_(a,f),_(e,c),_(e,d),_(d,m),_(m,g)},p(k,T){var C,M,$,O,E,I,L,N;T[0]&1&&u!==(u=k[12]((C=k[0])==null?void 0:C[k[30]])+"")&&re(f,u),T[0]&3075&&x(r,"changed-old-col",!k[10]&&an((M=k[0])==null?void 0:M[k[30]],($=k[1])==null?void 0:$[k[30]])),T[0]&1024&&x(r,"changed-none-col",k[10]),T[0]&2&&h!==(h=k[12]((O=k[1])==null?void 0:O[k[30]])+"")&&re(g,h),T[0]&2083&&x(d,"changed-new-col",!k[5]&&an((E=k[0])==null?void 0:E[k[30]],(I=k[1])==null?void 0:I[k[30]])),T[0]&32&&x(d,"changed-none-col",k[5]),T[0]&2051&&x(e,"txt-primary",an((L=k[0])==null?void 0:L[k[30]],(N=k[1])==null?void 0:N[k[30]]))},d(k){k&&w(e)}}}function oh(n){let e,t=n[6],i=[];for(let s=0;sProps - Old - New`,l=D(),o=v("tbody");for(let C=0;C!["schema","created","updated"].includes(y));function g(){t(4,f=Array.isArray(r==null?void 0:r.schema)?r==null?void 0:r.schema.concat():[]),a||t(4,f=f.concat(u.filter(y=>!f.find(k=>y.id==k.id))))}function b(y){return typeof y>"u"?"":B.isObject(y)?JSON.stringify(y,null,4):y}return n.$$set=y=>{"collectionA"in y&&t(0,o=y.collectionA),"collectionB"in y&&t(1,r=y.collectionB),"deleteMissing"in y&&t(2,a=y.deleteMissing)},n.$$.update=()=>{n.$$.dirty[0]&2&&t(5,i=!(r!=null&&r.id)&&!(r!=null&&r.name)),n.$$.dirty[0]&33&&t(10,s=!i&&!(o!=null&&o.id)),n.$$.dirty[0]&1&&t(3,u=Array.isArray(o==null?void 0:o.schema)?o==null?void 0:o.schema.concat():[]),n.$$.dirty[0]&7&&(typeof(o==null?void 0:o.schema)<"u"||typeof(r==null?void 0:r.schema)<"u"||typeof a<"u")&&g(),n.$$.dirty[0]&24&&t(6,c=u.filter(y=>!f.find(k=>y.id==k.id))),n.$$.dirty[0]&24&&t(7,d=f.filter(y=>u.find(k=>k.id==y.id))),n.$$.dirty[0]&24&&t(8,m=f.filter(y=>!u.find(k=>k.id==y.id))),n.$$.dirty[0]&7&&t(9,l=B.hasCollectionChanges(o,r,a))},[o,r,a,u,f,i,c,d,m,l,s,h,b]}class RE extends ke{constructor(e){super(),ye(this,e,FE,NE,be,{collectionA:0,collectionB:1,deleteMissing:2},null,[-1,-1])}}function mh(n,e,t){const i=n.slice();return i[17]=e[t],i}function hh(n){let e,t;return e=new RE({props:{collectionA:n[17].old,collectionB:n[17].new,deleteMissing:n[3]}}),{c(){V(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&4&&(l.collectionA=i[17].old),s&4&&(l.collectionB=i[17].new),s&8&&(l.deleteMissing=i[3]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){q(e,i)}}}function jE(n){let e,t,i=n[2],s=[];for(let o=0;oP(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o{h()}):h()}async function h(){if(!u){t(4,u=!0);try{await he.collections.import(o,a),Vt("Successfully imported collections configuration."),i("submit")}catch(C){he.errorResponseHandler(C)}t(4,u=!1),c()}}const g=()=>m(),b=()=>!u;function y(C){ie[C?"unshift":"push"](()=>{s=C,t(1,s)})}function k(C){We.call(this,n,C)}function T(C){We.call(this,n,C)}return n.$$.update=()=>{n.$$.dirty&384&&Array.isArray(l)&&Array.isArray(o)&&d()},[c,s,r,a,u,m,f,l,o,g,b,y,k,T]}class BE extends ke{constructor(e){super(),ye(this,e,zE,VE,be,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function gh(n,e,t){const i=n.slice();return i[32]=e[t],i}function _h(n,e,t){const i=n.slice();return i[35]=e[t],i}function bh(n,e,t){const i=n.slice();return i[32]=e[t],i}function UE(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k,T,C,M,$,O;a=new _e({props:{class:"form-field "+(n[6]?"":"field-error"),name:"collections",$$slots:{default:[YE,({uniqueId:U})=>({40:U}),({uniqueId:U})=>[0,U?512:0]]},$$scope:{ctx:n}}});let E=!1,I=n[6]&&n[1].length&&!n[7]&&yh(),L=n[6]&&n[1].length&&n[7]&&kh(n),N=n[13].length&&Ih(n),F=!!n[0]&&Ph(n);return{c(){e=v("input"),t=D(),i=v("div"),s=v("p"),l=z(`Paste below the collections configuration you want to import or - `),o=v("button"),o.innerHTML='Load from JSON file',r=D(),V(a.$$.fragment),u=D(),f=D(),I&&I.c(),c=D(),L&&L.c(),d=D(),N&&N.c(),m=D(),h=v("div"),F&&F.c(),g=D(),b=v("div"),y=D(),k=v("button"),T=v("span"),T.textContent="Review",p(e,"type","file"),p(e,"class","hidden"),p(e,"accept",".json"),p(o,"class","btn btn-outline btn-sm m-l-5"),x(o,"btn-loading",n[12]),p(i,"class","content txt-xl m-b-base"),p(b,"class","flex-fill"),p(T,"class","txt"),p(k,"type","button"),p(k,"class","btn btn-expanded btn-warning m-l-auto"),k.disabled=C=!n[14],p(h,"class","flex m-t-base")},m(U,J){S(U,e,J),n[19](e),S(U,t,J),S(U,i,J),_(i,s),_(s,l),_(s,o),S(U,r,J),H(a,U,J),S(U,u,J),S(U,f,J),I&&I.m(U,J),S(U,c,J),L&&L.m(U,J),S(U,d,J),N&&N.m(U,J),S(U,m,J),S(U,h,J),F&&F.m(h,null),_(h,g),_(h,b),_(h,y),_(h,k),_(k,T),M=!0,$||(O=[K(e,"change",n[20]),K(o,"click",n[21]),K(k,"click",n[26])],$=!0)},p(U,J){(!M||J[0]&4096)&&x(o,"btn-loading",U[12]);const ne={};J[0]&64&&(ne.class="form-field "+(U[6]?"":"field-error")),J[0]&65|J[1]&1536&&(ne.$$scope={dirty:J,ctx:U}),a.$set(ne),U[6]&&U[1].length&&!U[7]?I||(I=yh(),I.c(),I.m(c.parentNode,c)):I&&(I.d(1),I=null),U[6]&&U[1].length&&U[7]?L?L.p(U,J):(L=kh(U),L.c(),L.m(d.parentNode,d)):L&&(L.d(1),L=null),U[13].length?N?N.p(U,J):(N=Ih(U),N.c(),N.m(m.parentNode,m)):N&&(N.d(1),N=null),U[0]?F?F.p(U,J):(F=Ph(U),F.c(),F.m(h,g)):F&&(F.d(1),F=null),(!M||J[0]&16384&&C!==(C=!U[14]))&&(k.disabled=C)},i(U){M||(A(a.$$.fragment,U),A(E),M=!0)},o(U){P(a.$$.fragment,U),P(E),M=!1},d(U){U&&w(e),n[19](null),U&&w(t),U&&w(i),U&&w(r),q(a,U),U&&w(u),U&&w(f),I&&I.d(U),U&&w(c),L&&L.d(U),U&&w(d),N&&N.d(U),U&&w(m),U&&w(h),F&&F.d(),$=!1,Le(O)}}}function WE(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:G,i:G,o:G,d(t){t&&w(e)}}}function vh(n){let e;return{c(){e=v("div"),e.textContent="Invalid collections configuration.",p(e,"class","help-block help-block-error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function YE(n){let e,t,i,s,l,o,r,a,u,f,c=!!n[0]&&!n[6]&&vh();return{c(){e=v("label"),t=z("Collections"),s=D(),l=v("textarea"),r=D(),c&&c.c(),a=Ae(),p(e,"for",i=n[40]),p(e,"class","p-b-10"),p(l,"id",o=n[40]),p(l,"class","code"),p(l,"spellcheck","false"),p(l,"rows","15"),l.required=!0},m(d,m){S(d,e,m),_(e,t),S(d,s,m),S(d,l,m),de(l,n[0]),S(d,r,m),c&&c.m(d,m),S(d,a,m),u||(f=K(l,"input",n[22]),u=!0)},p(d,m){m[1]&512&&i!==(i=d[40])&&p(e,"for",i),m[1]&512&&o!==(o=d[40])&&p(l,"id",o),m[0]&1&&de(l,d[0]),d[0]&&!d[6]?c||(c=vh(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),c&&c.d(d),d&&w(a),u=!1,f()}}}function yh(n){let e;return{c(){e=v("div"),e.innerHTML=`
    -
    Your collections configuration is already up-to-date!
    `,p(e,"class","alert alert-info")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function kh(n){let e,t,i,s,l,o=n[9].length&&wh(n),r=n[4].length&&Ch(n),a=n[8].length&&Oh(n);return{c(){e=v("h5"),e.textContent="Detected changes",t=D(),i=v("div"),o&&o.c(),s=D(),r&&r.c(),l=D(),a&&a.c(),p(e,"class","section-title"),p(i,"class","list")},m(u,f){S(u,e,f),S(u,t,f),S(u,i,f),o&&o.m(i,null),_(i,s),r&&r.m(i,null),_(i,l),a&&a.m(i,null)},p(u,f){u[9].length?o?o.p(u,f):(o=wh(u),o.c(),o.m(i,s)):o&&(o.d(1),o=null),u[4].length?r?r.p(u,f):(r=Ch(u),r.c(),r.m(i,l)):r&&(r.d(1),r=null),u[8].length?a?a.p(u,f):(a=Oh(u),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},d(u){u&&w(e),u&&w(t),u&&w(i),o&&o.d(),r&&r.d(),a&&a.d()}}}function wh(n){let e=[],t=new Map,i,s=n[9];const l=o=>o[32].id;for(let o=0;oo[35].old.id+o[35].new.id;for(let o=0;oo[32].id;for(let o=0;o',i=D(),s=v("div"),s.innerHTML=`Some of the imported collections shares the same name and/or fields but are - imported with different IDs. You can replace them in the import if you want - to.`,l=D(),o=v("button"),o.innerHTML='Replace with original ids',p(t,"class","icon"),p(s,"class","content"),p(o,"type","button"),p(o,"class","btn btn-warning btn-sm btn-outline"),p(e,"class","alert alert-warning m-t-base")},m(u,f){S(u,e,f),_(e,t),_(e,i),_(e,s),_(e,l),_(e,o),r||(a=K(o,"click",n[24]),r=!0)},p:G,d(u){u&&w(e),r=!1,a()}}}function Ph(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear',p(e,"type","button"),p(e,"class","btn btn-transparent link-hint")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[25]),t=!0)},p:G,d(s){s&&w(e),t=!1,i()}}}function KE(n){let e,t,i,s,l,o,r,a,u,f,c,d;const m=[WE,UE],h=[];function g(b,y){return b[5]?0:1}return f=g(n),c=h[f]=m[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=D(),l=v("div"),o=z(n[15]),r=D(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(b,y){S(b,e,y),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(b,r,y),S(b,a,y),_(a,u),h[f].m(u,null),d=!0},p(b,y){(!d||y[0]&32768)&&re(o,b[15]);let k=f;f=g(b),f===k?h[f].p(b,y):(pe(),P(h[k],1,1,()=>{h[k]=null}),me(),c=h[f],c?c.p(b,y):(c=h[f]=m[f](b),c.c()),A(c,1),c.m(u,null))},i(b){d||(A(c),d=!0)},o(b){P(c),d=!1},d(b){b&&w(e),b&&w(r),b&&w(a),h[f].d()}}}function JE(n){let e,t,i,s,l,o;e=new Di({}),i=new kn({props:{$$slots:{default:[KE]},$$scope:{ctx:n}}});let r={};return l=new BE({props:r}),n[27](l),l.$on("submit",n[28]),{c(){V(e.$$.fragment),t=D(),V(i.$$.fragment),s=D(),V(l.$$.fragment)},m(a,u){H(e,a,u),S(a,t,u),H(i,a,u),S(a,s,u),H(l,a,u),o=!0},p(a,u){const f={};u[0]&65535|u[1]&1024&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){q(e,a),a&&w(t),q(i,a),a&&w(s),n[27](null),q(l,a)}}}function ZE(n,e,t){let i,s,l,o,r,a,u;Je(n,St,R=>t(15,u=R)),Yt(St,u="Import collections",u);let f,c,d="",m=!1,h=[],g=[],b=!0,y=[],k=!1;T();async function T(){t(5,k=!0);try{t(2,g=await he.collections.getFullList(200));for(let R of g)delete R.created,delete R.updated}catch(R){he.errorResponseHandler(R)}t(5,k=!1)}function C(){if(t(4,y=[]),!!i)for(let R of h){const X=B.findByKey(g,"id",R.id);!(X!=null&&X.id)||!B.hasCollectionChanges(X,R,b)||y.push({new:R,old:X})}}function M(){t(1,h=[]);try{t(1,h=JSON.parse(d))}catch{}Array.isArray(h)?t(1,h=B.filterDuplicatesByKey(h)):t(1,h=[]);for(let R of h)delete R.created,delete R.updated,R.schema=B.filterDuplicatesByKey(R.schema)}function $(){var R,X;for(let Y of h){const se=B.findByKey(g,"name",Y.name)||B.findByKey(g,"id",Y.id);if(!se)continue;const He=Y.id,Re=se.id;Y.id=Re;const Fe=Array.isArray(se.schema)?se.schema:[],qe=Array.isArray(Y.schema)?Y.schema:[];for(const ge of qe){const Se=B.findByKey(Fe,"name",ge.name);Se&&Se.id&&(ge.id=Se.id)}for(let ge of h)if(Array.isArray(ge.schema))for(let Se of ge.schema)(R=Se.options)!=null&&R.collectionId&&((X=Se.options)==null?void 0:X.collectionId)===He&&(Se.options.collectionId=Re)}t(0,d=JSON.stringify(h,null,4))}function O(R){t(12,m=!0);const X=new FileReader;X.onload=async Y=>{t(12,m=!1),t(10,f.value="",f),t(0,d=Y.target.result),await tn(),h.length||(cl("Invalid collections configuration."),E())},X.onerror=Y=>{console.warn(Y),cl("Failed to load the imported JSON."),t(12,m=!1),t(10,f.value="",f)},X.readAsText(R)}function E(){t(0,d=""),t(10,f.value="",f),Vn({})}function I(R){ie[R?"unshift":"push"](()=>{f=R,t(10,f)})}const L=()=>{f.files.length&&O(f.files[0])},N=()=>{f.click()};function F(){d=this.value,t(0,d)}function U(){b=this.checked,t(3,b)}const J=()=>$(),ne=()=>E(),Z=()=>c==null?void 0:c.show(g,h,b);function te(R){ie[R?"unshift":"push"](()=>{c=R,t(11,c)})}const ee=()=>E();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof d<"u"&&M(),n.$$.dirty[0]&3&&t(6,i=!!d&&h.length&&h.length===h.filter(R=>!!R.id&&!!R.name).length),n.$$.dirty[0]&78&&t(9,s=g.filter(R=>i&&b&&!B.findByKey(h,"id",R.id))),n.$$.dirty[0]&70&&t(8,l=h.filter(R=>i&&!B.findByKey(g,"id",R.id))),n.$$.dirty[0]&10&&(typeof h<"u"||typeof b<"u")&&C(),n.$$.dirty[0]&785&&t(7,o=!!d&&(s.length||l.length||y.length)),n.$$.dirty[0]&224&&t(14,r=!k&&i&&o),n.$$.dirty[0]&6&&t(13,a=h.filter(R=>{let X=B.findByKey(g,"name",R.name)||B.findByKey(g,"id",R.id);if(!X)return!1;if(X.id!=R.id)return!0;const Y=Array.isArray(X.schema)?X.schema:[],se=Array.isArray(R.schema)?R.schema:[];for(const He of se){if(B.findByKey(Y,"id",He.id))continue;const Fe=B.findByKey(Y,"name",He.name);if(Fe&&He.id!=Fe.id)return!0}return!1}))},[d,h,g,b,y,k,i,o,l,s,f,c,m,a,r,u,$,O,E,I,L,N,F,U,J,ne,Z,te,ee]}class GE extends ke{constructor(e){super(),ye(this,e,ZE,JE,be,{},null,[-1,-1])}}const Lt=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?Ti("/"):!0}],XE={"/login":Dt({component:YD,conditions:Lt.concat([n=>!he.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":Dt({asyncComponent:()=>ft(()=>import("./PageAdminRequestPasswordReset-63534a96.js"),[],import.meta.url),conditions:Lt.concat([n=>!he.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":Dt({asyncComponent:()=>ft(()=>import("./PageAdminConfirmPasswordReset-66c829b0.js"),[],import.meta.url),conditions:Lt.concat([n=>!he.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":Dt({component:gD,conditions:Lt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":Dt({component:o3,conditions:Lt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":Dt({component:nO,conditions:Lt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":Dt({component:qD,conditions:Lt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":Dt({component:qO,conditions:Lt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":Dt({component:nE,conditions:Lt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":Dt({component:bE,conditions:Lt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":Dt({component:CE,conditions:Lt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":Dt({component:AE,conditions:Lt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":Dt({component:GE,conditions:Lt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":Dt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmPasswordReset-33d374e8.js"),[],import.meta.url),conditions:Lt,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":Dt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmPasswordReset-33d374e8.js"),[],import.meta.url),conditions:Lt,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":Dt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmVerification-2f39c8aa.js"),[],import.meta.url),conditions:Lt,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":Dt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmVerification-2f39c8aa.js"),[],import.meta.url),conditions:Lt,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":Dt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmEmailChange-02f333fb.js"),[],import.meta.url),conditions:Lt,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":Dt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmEmailChange-02f333fb.js"),[],import.meta.url),conditions:Lt,userData:{showAppSidebar:!1}}),"*":Dt({component:Mv,userData:{showAppSidebar:!1}})};function xE(n,{from:e,to:t},i={}){const s=getComputedStyle(n),l=s.transform==="none"?"":s.transform,[o,r]=s.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*o/t.width-(t.left+o),u=e.top+e.height*r/t.height-(t.top+r),{delay:f=0,duration:c=m=>Math.sqrt(m)*120,easing:d=Bo}=i;return{delay:f,duration:zt(c)?c(Math.sqrt(a*a+u*u)):c,easing:d,css:(m,h)=>{const g=h*a,b=h*u,y=m+h*e.width/t.width,k=m+h*e.height/t.height;return`transform: ${l} translate(${g}px, ${b}px) scale(${y}, ${k});`}}}function Lh(n,e,t){const i=n.slice();return i[2]=e[t],i}function QE(n){let e;return{c(){e=v("i"),p(e,"class","ri-alert-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function eA(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function tA(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function nA(n){let e;return{c(){e=v("i"),p(e,"class","ri-information-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Nh(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,c,d,m=G,h,g,b;function y(M,$){return M[2].type==="info"?nA:M[2].type==="success"?tA:M[2].type==="warning"?eA:QE}let k=y(e),T=k(e);function C(){return e[1](e[2])}return{key:n,first:null,c(){t=v("div"),i=v("div"),T.c(),s=D(),l=v("div"),r=z(o),a=D(),u=v("button"),u.innerHTML='',f=D(),p(i,"class","icon"),p(l,"class","content"),p(u,"type","button"),p(u,"class","close"),p(t,"class","alert txt-break"),x(t,"alert-info",e[2].type=="info"),x(t,"alert-success",e[2].type=="success"),x(t,"alert-danger",e[2].type=="error"),x(t,"alert-warning",e[2].type=="warning"),this.first=t},m(M,$){S(M,t,$),_(t,i),T.m(i,null),_(t,s),_(t,l),_(l,r),_(t,a),_(t,u),_(t,f),h=!0,g||(b=K(u,"click",pt(C)),g=!0)},p(M,$){e=M,k!==(k=y(e))&&(T.d(1),T=k(e),T&&(T.c(),T.m(i,null))),(!h||$&1)&&o!==(o=e[2].message+"")&&re(r,o),(!h||$&1)&&x(t,"alert-info",e[2].type=="info"),(!h||$&1)&&x(t,"alert-success",e[2].type=="success"),(!h||$&1)&&x(t,"alert-danger",e[2].type=="error"),(!h||$&1)&&x(t,"alert-warning",e[2].type=="warning")},r(){d=t.getBoundingClientRect()},f(){Ab(t),m(),Uh(t,d)},a(){m(),m=Eb(t,d,xE,{duration:150})},i(M){h||(nt(()=>{c||(c=ze(t,yo,{duration:150},!0)),c.run(1)}),h=!0)},o(M){c||(c=ze(t,yo,{duration:150},!1)),c.run(0),h=!1},d(M){M&&w(t),T.d(),M&&c&&c.end(),g=!1,b()}}}function iA(n){let e,t=[],i=new Map,s,l=n[0];const o=r=>r[2].message;for(let r=0;rt(0,i=l)),[i,l=>n_(l)]}class lA extends ke{constructor(e){super(),ye(this,e,sA,iA,be,{})}}function oA(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=v("h4"),i=z(t),p(e,"class","block center txt-break"),p(e,"slot","header")},m(l,o){S(l,e,o),_(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&re(i,t)},d(l){l&&w(e)}}}function rA(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="No",i=D(),s=v("button"),l=v("span"),l.textContent="Yes",p(t,"class","txt"),e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-transparent btn-expanded-sm"),e.disabled=n[2],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],x(s,"btn-loading",n[2])},m(a,u){S(a,e,u),_(e,t),S(a,i,u),S(a,s,u),_(s,l),e.focus(),o||(r=[K(e,"click",n[4]),K(s,"click",n[5])],o=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&x(s,"btn-loading",a[2])},d(a){a&&w(e),a&&w(i),a&&w(s),o=!1,Le(r)}}}function aA(n){let e,t,i={class:"confirm-popup hide-content overlay-panel-sm",overlayClose:!n[2],escClose:!n[2],btnClose:!1,popup:!0,$$slots:{footer:[rA],header:[oA]},$$scope:{ctx:n}};return e=new Bn({props:i}),n[6](e),e.$on("hide",n[7]),{c(){V(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&4&&(o.overlayClose=!s[2]),l&4&&(o.escClose=!s[2]),l&271&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[6](null),q(e,s)}}}function uA(n,e,t){let i;Je(n,xa,c=>t(1,i=c));let s,l=!1,o=!1;const r=()=>{t(3,o=!1),s==null||s.hide()},a=async()=>{i!=null&&i.yesCallback&&(t(2,l=!0),await Promise.resolve(i.yesCallback()),t(2,l=!1)),t(3,o=!0),s==null||s.hide()};function u(c){ie[c?"unshift":"push"](()=>{s=c,t(0,s)})}const f=async()=>{!o&&(i!=null&&i.noCallback)&&i.noCallback(),await tn(),t(3,o=!1),lb()};return n.$$.update=()=>{n.$$.dirty&3&&i!=null&&i.text&&(t(3,o=!1),s==null||s.show())},[s,i,l,o,r,a,u,f]}class fA extends ke{constructor(e){super(),ye(this,e,uA,aA,be,{})}}function Fh(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,y,k;return g=new xn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[cA]},$$scope:{ctx:n}}}),{c(){var T;e=v("aside"),t=v("a"),t.innerHTML='PocketBase logo',i=D(),s=v("nav"),l=v("a"),l.innerHTML='',o=D(),r=v("a"),r.innerHTML='',a=D(),u=v("a"),u.innerHTML='',f=D(),c=v("figure"),d=v("img"),h=D(),V(g.$$.fragment),p(t,"href","/"),p(t,"class","logo logo-sm"),p(l,"href","/collections"),p(l,"class","menu-item"),p(l,"aria-label","Collections"),p(r,"href","/logs"),p(r,"class","menu-item"),p(r,"aria-label","Logs"),p(u,"href","/settings"),p(u,"class","menu-item"),p(u,"aria-label","Settings"),p(s,"class","main-menu"),Hn(d.src,m="./images/avatars/avatar"+(((T=n[0])==null?void 0:T.avatar)||0)+".svg")||p(d,"src",m),p(d,"alt","Avatar"),p(c,"class","thumb thumb-circle link-hint closable"),p(e,"class","app-sidebar")},m(T,C){S(T,e,C),_(e,t),_(e,i),_(e,s),_(s,l),_(s,o),_(s,r),_(s,a),_(s,u),_(e,f),_(e,c),_(c,d),_(c,h),H(g,c,null),b=!0,y||(k=[Pe(Xt.call(null,t)),Pe(Xt.call(null,l)),Pe(Fn.call(null,l,{path:"/collections/?.*",className:"current-route"})),Pe(Ye.call(null,l,{text:"Collections",position:"right"})),Pe(Xt.call(null,r)),Pe(Fn.call(null,r,{path:"/logs/?.*",className:"current-route"})),Pe(Ye.call(null,r,{text:"Logs",position:"right"})),Pe(Xt.call(null,u)),Pe(Fn.call(null,u,{path:"/settings/?.*",className:"current-route"})),Pe(Ye.call(null,u,{text:"Settings",position:"right"}))],y=!0)},p(T,C){var $;(!b||C&1&&!Hn(d.src,m="./images/avatars/avatar"+((($=T[0])==null?void 0:$.avatar)||0)+".svg"))&&p(d,"src",m);const M={};C&1024&&(M.$$scope={dirty:C,ctx:T}),g.$set(M)},i(T){b||(A(g.$$.fragment,T),b=!0)},o(T){P(g.$$.fragment,T),b=!1},d(T){T&&w(e),q(g),y=!1,Le(k)}}}function cA(n){let e,t,i,s,l,o,r;return{c(){e=v("a"),e.innerHTML=` - Manage admins`,t=D(),i=v("hr"),s=D(),l=v("button"),l.innerHTML=` - Logout`,p(e,"href","/settings/admins"),p(e,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),S(a,s,u),S(a,l,u),o||(r=[Pe(Xt.call(null,e)),K(l,"click",n[6])],o=!0)},p:G,d(a){a&&w(e),a&&w(t),a&&w(i),a&&w(s),a&&w(l),o=!1,Le(r)}}}function dA(n){var m;let e,t,i,s,l,o,r,a,u,f,c;document.title=e=B.joinNonEmpty([n[3],n[2],"PocketBase"]," - ");let d=((m=n[0])==null?void 0:m.id)&&n[1]&&Fh(n);return o=new Bb({props:{routes:XE}}),o.$on("routeLoading",n[4]),o.$on("conditionsFailed",n[5]),a=new lA({}),f=new fA({}),{c(){t=D(),i=v("div"),d&&d.c(),s=D(),l=v("div"),V(o.$$.fragment),r=D(),V(a.$$.fragment),u=D(),V(f.$$.fragment),p(l,"class","app-body"),p(i,"class","app-layout")},m(h,g){S(h,t,g),S(h,i,g),d&&d.m(i,null),_(i,s),_(i,l),H(o,l,null),_(l,r),H(a,l,null),S(h,u,g),H(f,h,g),c=!0},p(h,[g]){var b;(!c||g&12)&&e!==(e=B.joinNonEmpty([h[3],h[2],"PocketBase"]," - "))&&(document.title=e),(b=h[0])!=null&&b.id&&h[1]?d?(d.p(h,g),g&3&&A(d,1)):(d=Fh(h),d.c(),A(d,1),d.m(i,s)):d&&(pe(),P(d,1,1,()=>{d=null}),me())},i(h){c||(A(d),A(o.$$.fragment,h),A(a.$$.fragment,h),A(f.$$.fragment,h),c=!0)},o(h){P(d),P(o.$$.fragment,h),P(a.$$.fragment,h),P(f.$$.fragment,h),c=!1},d(h){h&&w(t),h&&w(i),d&&d.d(),q(o),q(a),h&&w(u),q(f,h)}}}function pA(n,e,t){let i,s,l,o;Je(n,Cs,m=>t(8,i=m)),Je(n,vo,m=>t(2,s=m)),Je(n,Ma,m=>t(0,l=m)),Je(n,St,m=>t(3,o=m));let r,a=!1;function u(m){var h,g,b,y;((h=m==null?void 0:m.detail)==null?void 0:h.location)!==r&&(t(1,a=!!((b=(g=m==null?void 0:m.detail)==null?void 0:g.userData)!=null&&b.showAppSidebar)),r=(y=m==null?void 0:m.detail)==null?void 0:y.location,Yt(St,o="",o),Vn({}),lb())}function f(){Ti("/")}async function c(){var m,h;if(l!=null&&l.id)try{const g=await he.settings.getAll({$cancelKey:"initialAppSettings"});Yt(vo,s=((m=g==null?void 0:g.meta)==null?void 0:m.appName)||"",s),Yt(Cs,i=!!((h=g==null?void 0:g.meta)!=null&&h.hideControls),i)}catch(g){g!=null&&g.isAbort||console.warn("Failed to load app settings.",g)}}function d(){he.logout()}return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&c()},[l,a,s,o,u,f,d]}class mA extends ke{constructor(e){super(),ye(this,e,pA,dA,be,{})}}new mA({target:document.getElementById("app")});export{Le as A,Vt as B,B as C,Ti as D,Ae as E,i_ as F,ga as G,du as H,Je as I,es as J,$t as K,sn as L,ie as M,nb as N,wt as O,Xi as P,nn as Q,bn as R,ke as S,Ir as T,P as a,D as b,V as c,q as d,v as e,p as f,S as g,_ as h,ye as i,Pe as j,pe as k,Xt as l,H as m,me as n,w as o,he as p,_e as q,x as r,be as s,A as t,K as u,pt as v,z as w,re as x,G as y,de as z}; diff --git a/ui/dist/assets/index-4934dad7.js b/ui/dist/assets/index-4934dad7.js deleted file mode 100644 index 29905eec..00000000 --- a/ui/dist/assets/index-4934dad7.js +++ /dev/null @@ -1,13 +0,0 @@ -class I{constructor(){}lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),He.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let i=[];return this.decompose(e,t,i,0),He.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new ii(this),r=new ii(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new ii(this,e)}iterRange(e,t=this.length){return new nl(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new sl(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?I.empty:e.length<=32?new G(e):He.from(G.split(e,[]))}}class G extends I{constructor(e,t=zh(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new qh(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new G(Sr(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=$i(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new G(l,o.length+r.length));else{let a=l.length>>1;i.push(new G(l.slice(0,a)),new G(l.slice(a)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof G))return super.replace(e,t,i);let s=$i(this.text,$i(i.text,Sr(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new G(s,r):He.from(G.split(s,[]),r)}sliceString(e,t=this.length,i=` -`){let s="";for(let r=0,o=0;r<=t&&oe&&o&&(s+=i),er&&(s+=l.slice(Math.max(0,e-r),t-r)),r=a+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],s=-1;for(let r of e)i.push(r),s+=r.length+1,i.length==32&&(t.push(new G(i,s)),i=[],s=-1);return s>-1&&t.push(new G(i,s)),t}}class He extends I{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.children[r],l=s+o.length,a=i+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,i,s);s=l+1,i=a+1}}decompose(e,t,i,s){for(let r=0,o=0;o<=t&&r=o){let h=s&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!h?i.push(l):l.decompose(e-o,t-o,i,h)}o=a+1}}replace(e,t,i){if(i.lines=r&&t<=l){let a=o.replace(e-r,t-r,i),h=this.lines-o.lines+a.lines;if(a.lines>5-1&&a.lines>h>>5+1){let c=this.children.slice();return c[s]=a,new He(c,this.length-(t-e)+i.length)}return super.replace(r,l,a)}r=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=` -`){let s="";for(let r=0,o=0;re&&r&&(s+=i),eo&&(s+=l.sliceString(e-o,t-o,i)),o=a+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof He))return 0;let i=0,[s,r,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==l)return i;let a=this.children[s],h=e.children[r];if(a!=h)return i+a.scanIdentical(h,t);i+=a.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let p of e)p.flatten(d);return new G(d,t)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],a=0,h=-1,c=[];function f(d){let p;if(d.lines>r&&d instanceof He)for(let g of d.children)f(g);else d.lines>o&&(a>o||!a)?(u(),l.push(d)):d instanceof G&&a&&(p=c[c.length-1])instanceof G&&d.lines+p.lines<=32?(a+=d.lines,h+=d.length+1,c[c.length-1]=new G(p.text.concat(d.text),p.length+1+d.length)):(a+d.lines>s&&u(),a+=d.lines,h+=d.length+1,c.push(d))}function u(){a!=0&&(l.push(c.length==1?c[0]:He.from(c,h)),h=-1,a=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new He(l,t)}}I.empty=new G([""],0);function zh(n){let e=-1;for(let t of n)e+=t.length+1;return e}function $i(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r=t&&(a>i&&(l=l.slice(0,i-s)),s0?1:(e instanceof G?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof G?s.text.length:s.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=` -`,this;e--}else if(s instanceof G){let a=s.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=s.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof G?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class nl{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new ii(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class sl{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=this.inner.next(e);return t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(I.prototype[Symbol.iterator]=function(){return this.iter()},ii.prototype[Symbol.iterator]=nl.prototype[Symbol.iterator]=sl.prototype[Symbol.iterator]=function(){return this});class qh{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}}let Pt="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;nn)return Pt[e-1]<=n;return!1}function Cr(n){return n>=127462&&n<=127487}const Ar=8205;function de(n,e,t=!0,i=!0){return(t?rl:Kh)(n,e,i)}function rl(n,e,t){if(e==n.length)return e;e&&ol(n.charCodeAt(e))&&ll(n.charCodeAt(e-1))&&e--;let i=se(n,e);for(e+=Ce(i);e=0&&Cr(se(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function Kh(n,e,t){for(;e>0;){let i=rl(n,e-2,t);if(i=56320&&n<57344}function ll(n){return n>=55296&&n<56320}function se(n,e){let t=n.charCodeAt(e);if(!ll(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return ol(i)?(t-55296<<10)+(i-56320)+65536:t}function Ks(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Ce(n){return n<65536?1:2}const Zn=/\r\n?|\n/;var ae=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(ae||(ae={}));class Ke{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return r+(e-s);r+=l}else{if(i!=ae.Simple&&h>=e&&(i==ae.TrackDel&&se||i==ae.TrackBefore&&se))return null;if(h>e||h==e&&t<0&&!l)return e==s||t<0?r:r+a;r+=a}s=h}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let i=0,s=0;i=0&&s<=t&&l>=e)return st?"cover":!0;s=l}return!1}toString(){let e="";for(let t=0;t=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Ke(e)}static create(e){return new Ke(e)}}class Q extends Ke{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return es(this,(t,i,s,r,o)=>e=e.replace(s,s+(i-t),o),!1),e}mapDesc(e,t=!1){return ts(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let s=0,r=0;s=0){t[s]=l,t[s+1]=o;let a=s>>1;for(;i.length0&&et(i,t,r.text),r.forward(c),l+=c}let h=e[o++];for(;l>1].toJSON()))}return e}static of(e,t,i){let s=[],r=[],o=0,l=null;function a(c=!1){if(!c&&!s.length)return;ou||f<0||u>t)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${t})`);let p=d?typeof d=="string"?I.of(d.split(i||Zn)):d:I.empty,g=p.length;if(f==u&&g==0)return;fo&&le(s,f-o,-1),le(s,u-f,g),et(r,s,p),o=u}}return h(e),a(!l),l}static empty(e){return new Q(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let s=0;sl&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)t.push(r[0],0);else{for(;i.length=0&&t<=0&&t==n[s+1]?n[s]+=e:e==0&&n[s]==0?n[s+1]+=t:i?(n[s]+=e,n[s+1]+=t):n.push(e,t)}function et(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],a=n.sections[o++];e(s,h,r,c,f),s=h,r=c}}}function ts(n,e,t,i=!1){let s=[],r=i?[]:null,o=new ri(n),l=new ri(e);for(let a=-1;;)if(o.ins==-1&&l.ins==-1){let h=Math.min(o.len,l.len);le(s,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len=0&&a=0){let h=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);h+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.lena||o.ins>=0&&o.len>a)&&(l||i.length>h),r.forward2(a),o.forward(a)}}}}class ri{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?I.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?I.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class gt{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&16?this.to:this.from}get head(){return this.flags&16?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&4?-1:this.flags&8?1:0}get bidiLevel(){let e=this.flags&3;return e==3?null:e}get goalColumn(){let e=this.flags>>5;return e==33554431?void 0:e}map(e,t=-1){let i,s;return this.empty?i=s=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new gt(i,s,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return b.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return b.range(this.anchor,i)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return b.range(e.anchor,e.head)}static create(e,t,i){return new gt(e,t,i)}}class b{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:b.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let t=0;te.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new b(e.ranges.map(t=>gt.fromJSON(t)),e.main)}static single(e,t=e){return new b([b.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;se?4:0)|r)}static normalized(e,t=0){let i=e[t];e.sort((s,r)=>s.from-r.from),t=e.indexOf(i);for(let s=1;sr.head?b.range(a,l):b.range(l,a))}}return new b(e,t)}}function hl(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let js=0;class D{constructor(e,t,i,s,r){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=s,this.id=js++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}static define(e={}){return new D(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:Us),!!e.static,e.enables)}of(e){return new Ki([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ki(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ki(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function Us(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class Ki{constructor(e,t,i,s){this.dependencies=e,this.facet=t,this.type=i,this.value=s,this.id=js++}dynamicSlot(e){var t;let i=this.value,s=this.facet.compareInput,r=this.id,o=e[r]>>1,l=this.type==2,a=!1,h=!1,c=[];for(let f of this.dependencies)f=="doc"?a=!0:f=="selection"?h=!0:((t=e[f.id])!==null&&t!==void 0?t:1)&1||c.push(e[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,u){if(a&&u.docChanged||h&&(u.docChanged||u.selection)||is(f,c)){let d=i(f);if(l?!Mr(d,f.values[o],s):!s(d,f.values[o]))return f.values[o]=d,1}return 0},reconfigure:(f,u)=>{let d,p=u.config.address[r];if(p!=null){let g=Yi(u,p);if(this.dependencies.every(m=>m instanceof D?u.facet(m)===f.facet(m):m instanceof we?u.field(m,!1)==f.field(m,!1):!0)||(l?Mr(d=i(f),g,s):s(d=i(f),g)))return f.values[o]=g,0}else d=i(f);return f.values[o]=d,1}}}}function Mr(n,e,t){if(n.length!=e.length)return!1;for(let i=0;in[a.id]),s=t.map(a=>a.type),r=i.filter(a=>!(a&1)),o=n[e.id]>>1;function l(a){let h=[];for(let c=0;ci===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Dr).find(i=>i.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,s)=>{let r=i.values[t],o=this.updateF(r,s);return this.compareF(r,o)?0:(i.values[t]=o,1)},reconfigure:(i,s)=>s.config.address[this.id]!=null?(i.values[t]=s.field(this),0):(i.values[t]=this.create(i),1)}}init(e){return[this,Dr.of({field:this,create:e})]}get extension(){return this}}const pt={lowest:4,low:3,default:2,high:1,highest:0};function Gt(n){return e=>new cl(e,n)}const St={highest:Gt(pt.highest),high:Gt(pt.high),default:Gt(pt.default),low:Gt(pt.low),lowest:Gt(pt.lowest)};class cl{constructor(e,t){this.inner=e,this.prec=t}}class kn{of(e){return new ns(this,e)}reconfigure(e){return kn.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class ns{constructor(e,t){this.compartment=e,this.inner=t}}class Xi{constructor(e,t,i,s,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,i){let s=[],r=Object.create(null),o=new Map;for(let u of Uh(e,t,o))u instanceof we?s.push(u):(r[u.facet.id]||(r[u.facet.id]=[])).push(u);let l=Object.create(null),a=[],h=[];for(let u of s)l[u.id]=h.length<<1,h.push(d=>u.slot(d));let c=i==null?void 0:i.config.facets;for(let u in r){let d=r[u],p=d[0].facet,g=c&&c[u]||[];if(d.every(m=>m.type==0))if(l[p.id]=a.length<<1|1,Us(g,d))a.push(i.facet(p));else{let m=p.combine(d.map(y=>y.value));a.push(i&&p.compare(m,i.facet(p))?i.facet(p):m)}else{for(let m of d)m.type==0?(l[m.id]=a.length<<1|1,a.push(m.value)):(l[m.id]=h.length<<1,h.push(y=>m.dynamicSlot(y)));l[p.id]=h.length<<1,h.push(m=>jh(m,p,d))}}let f=h.map(u=>u(l));return new Xi(e,o,f,l,a,r)}}function Uh(n,e,t){let i=[[],[],[],[],[]],s=new Map;function r(o,l){let a=s.get(o);if(a!=null){if(a<=l)return;let h=i[a].indexOf(o);h>-1&&i[a].splice(h,1),o instanceof ns&&t.delete(o.compartment)}if(s.set(o,l),Array.isArray(o))for(let h of o)r(h,l);else if(o instanceof ns){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;t.set(o.compartment,h),r(h,l)}else if(o instanceof cl)r(o.inner,o.prec);else if(o instanceof we)i[l].push(o),o.provides&&r(o.provides,l);else if(o instanceof Ki)i[l].push(o),o.facet.extensions&&r(o.facet.extensions,pt.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(h,l)}}return r(n,pt.default),i.reduce((o,l)=>o.concat(l))}function ni(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let s=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|s}function Yi(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const fl=D.define(),ul=D.define({combine:n=>n.some(e=>e),static:!0}),dl=D.define({combine:n=>n.length?n[0]:void 0,static:!0}),pl=D.define(),gl=D.define(),ml=D.define(),yl=D.define({combine:n=>n.length?n[0]:!1});class ht{constructor(e,t){this.type=e,this.value=t}static define(){return new Gh}}class Gh{of(e){return new ht(this,e)}}class Jh{constructor(e){this.map=e}of(e){return new E(this,e)}}class E{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new E(this.type,t)}is(e){return this.type==e}static define(e={}){return new Jh(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let s of e){let r=s.map(t);r&&i.push(r)}return i}}E.reconfigure=E.define();E.appendConfig=E.define();class Z{constructor(e,t,i,s,r,o){this.startState=e,this.changes=t,this.selection=i,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,i&&hl(i,t.newLength),r.some(l=>l.type==Z.time)||(this.annotations=r.concat(Z.time.of(Date.now())))}static create(e,t,i,s,r,o){return new Z(e,t,i,s,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Z.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}Z.time=ht.define();Z.userEvent=ht.define();Z.addToHistory=ht.define();Z.remote=ht.define();function _h(n,e){let t=[];for(let i=0,s=0;;){let r,o;if(i=n[i]))r=n[i++],o=n[i++];else if(s=0;s--){let r=i[s](n);r instanceof Z?n=r:Array.isArray(r)&&r.length==1&&r[0]instanceof Z?n=r[0]:n=wl(e,Rt(r),!1)}return n}function Yh(n){let e=n.startState,t=e.facet(ml),i=n;for(let s=t.length-1;s>=0;s--){let r=t[s](n);r&&Object.keys(r).length&&(i=bl(i,ss(e,r,n.changes.newLength),!0))}return i==n?n:Z.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const Qh=[];function Rt(n){return n==null?Qh:Array.isArray(n)?n:[n]}var q=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(q||(q={}));const Zh=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let rs;try{rs=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function ec(n){if(rs)return rs.test(n);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||Zh.test(t)))return!0}return!1}function tc(n){return e=>{if(!/\S/.test(e))return q.Space;if(ec(e))return q.Word;for(let t=0;t-1)return q.Word;return q.Other}}class N{constructor(e,t,i,s,r,o){this.config=e,this.doc=t,this.selection=i,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let l=0;ls.set(a,l)),t=null),s.set(o.value.compartment,o.value.extension)):o.is(E.reconfigure)?(t=null,i=o.value):o.is(E.appendConfig)&&(t=null,i=Rt(i).concat(o.value));let r;t?r=e.startState.values.slice():(t=Xi.resolve(i,s,this),r=new N(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(l,a)=>a.reconfigure(l,this),null).values),new N(t,e.newDoc,e.newSelection,r,(o,l)=>l.update(o,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:b.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),s=this.changes(i.changes),r=[i.range],o=Rt(i.effects);for(let l=1;lo.spec.fromJSON(l,a)))}}return N.create({doc:e.doc,selection:b.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=Xi.resolve(e.extensions||[],new Map),i=e.doc instanceof I?e.doc:I.of((e.doc||"").split(t.staticFacet(N.lineSeparator)||Zn)),s=e.selection?e.selection instanceof b?e.selection:b.single(e.selection.anchor,e.selection.head):b.single(0);return hl(s,i.length),t.staticFacet(ul)||(s=s.asSingle()),new N(t,i,s,t.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(N.tabSize)}get lineBreak(){return this.facet(N.lineSeparator)||` -`}get readOnly(){return this.facet(yl)}phrase(e,...t){for(let i of this.facet(N.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>t.length?i:t[r-1]})),e}languageDataAt(e,t,i=-1){let s=[];for(let r of this.facet(fl))for(let o of r(this,t,i))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){return tc(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:i,length:s}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-i,l=e-i;for(;o>0;){let a=de(t,o,!1);if(r(t.slice(a,o))!=q.Word)break;o=a}for(;ln.length?n[0]:4});N.lineSeparator=dl;N.readOnly=yl;N.phrases=D.define({compare(n,e){let t=Object.keys(n),i=Object.keys(e);return t.length==i.length&&t.every(s=>n[s]==e[s])}});N.languageData=fl;N.changeFilter=pl;N.transactionFilter=gl;N.transactionExtender=ml;kn.reconfigure=E.define();function Ct(n,e,t={}){let i={};for(let s of n)for(let r of Object.keys(s)){let o=s[r],l=i[r];if(l===void 0)i[r]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,r))i[r]=t[r](l,o);else throw new Error("Config merge conflict for field "+r)}for(let s in e)i[s]===void 0&&(i[s]=e[s]);return i}class bt{eq(e){return this==e}range(e,t=e){return os.create(e,t,this)}}bt.prototype.startSide=bt.prototype.endSide=0;bt.prototype.point=!1;bt.prototype.mapMode=ae.TrackDel;let os=class xl{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new xl(e,t,i)}};function ls(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class Gs{constructor(e,t,i,s){this.from=e,this.to=t,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,s=0){let r=i?this.to:this.from;for(let o=s,l=r.length;;){if(o==l)return o;let a=o+l>>1,h=r[a]-e||(i?this.value[a].endSide:this.value[a].startSide)-t;if(a==o)return h>=0?o:l;h>=0?l=a:o=a+1}}between(e,t,i,s){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(i,1e9,!1,r);rd||u==d&&h.startSide>0&&h.endSide<=0)continue;(d-u||h.endSide-h.startSide)<0||(o<0&&(o=u),h.point&&(l=Math.max(l,d-u)),i.push(h),s.push(u-o),r.push(d-o))}return{mapped:i.length?new Gs(s,r,i,l):null,pos:o}}}class j{constructor(e,t,i,s){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=s}static create(e,t,i,s){return new j(e,t,i,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:s=0,filterTo:r=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(i&&(t=t.slice().sort(ls)),this.isEmpty)return t.length?j.of(t):this;let l=new kl(this,null,-1).goto(0),a=0,h=[],c=new wt;for(;l.value||a=0){let f=t[a++];c.addInner(f.from,f.to,f.value)||h.push(f)}else l.rangeIndex==1&&l.chunkIndexthis.chunkEnd(l.chunkIndex)||rl.to||r=r&&e<=r+o.length&&o.between(r,e-r,t-r,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return oi.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return oi.from(e).goto(t)}static compare(e,t,i,s,r=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),l=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),a=Or(o,l,i),h=new Jt(o,a,r),c=new Jt(l,a,r);i.iterGaps((f,u,d)=>Tr(h,f,c,u,d,s)),i.empty&&i.length==0&&Tr(h,0,c,0,0,s)}static eq(e,t,i=0,s){s==null&&(s=1e9-1);let r=e.filter(c=>!c.isEmpty&&t.indexOf(c)<0),o=t.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(r.length!=o.length)return!1;if(!r.length)return!0;let l=Or(r,o),a=new Jt(r,l,0).goto(i),h=new Jt(o,l,0).goto(i);for(;;){if(a.to!=h.to||!as(a.active,h.active)||a.point&&(!h.point||!a.point.eq(h.point)))return!1;if(a.to>s)return!0;a.next(),h.next()}}static spans(e,t,i,s,r=-1){let o=new Jt(e,null,r).goto(t),l=t,a=o.openStart;for(;;){let h=Math.min(o.to,i);if(o.point){let c=o.activeForPoint(o.to),f=o.pointFroml&&(s.span(l,h,o.active,a),a=o.openEnd(h));if(o.to>i)return a+(o.point&&o.to>i?1:0);l=o.to,o.next()}}static of(e,t=!1){let i=new wt;for(let s of e instanceof os?[e]:t?ic(e):e)i.add(s.from,s.to,s.value);return i.finish()}}j.empty=new j([],[],null,-1);function ic(n){if(n.length>1)for(let e=n[0],t=1;t0)return n.slice().sort(ls);e=i}return n}j.empty.nextLayer=j.empty;class wt{constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}finishChunk(e){this.chunks.push(new Gs(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}add(e,t,i){this.addInner(e,t,i)||(this.nextLayer||(this.nextLayer=new wt)).add(e,t,i)}addInner(e,t,i){let s=e-this.lastTo||i.startSide-this.last.endSide;if(s<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return s<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(j.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=j.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Or(n,e,t){let i=new Map;for(let r of n)for(let o=0;o=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&s.push(new kl(o,t,i,r));return s.length==1?s[0]:new oi(s)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let i=this.heap.length>>1;i>=0;i--)En(this.heap,i);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let i=this.heap.length>>1;i>=0;i--)En(this.heap,i);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),En(this.heap,0)}}}function En(n,e){for(let t=n[e];;){let i=(e<<1)+1;if(i>=n.length)break;let s=n[i];if(i+1=0&&(s=n[i+1],i++),t.compare(s)<0)break;n[i]=t,n[e]=s,e=i}}class Jt{constructor(e,t,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=oi.from(e,t,i)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Si(this.active,e),Si(this.activeTo,e),Si(this.activeRank,e),this.minActive=Br(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:s,rank:r}=this.cursor;for(;t-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>e){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),i&&Si(i,s)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let r=this.cursor.value;if(!r.point)this.addActive(i),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&i[s]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}}function Tr(n,e,t,i,s,r){n.goto(e),t.goto(i);let o=i+s,l=i,a=i-e;for(;;){let h=n.to+a-t.to||n.endSide-t.endSide,c=h<0?n.to+a:t.to,f=Math.min(c,o);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&as(n.activeForPoint(n.to+a),t.activeForPoint(t.to))||r.comparePoint(l,f,n.point,t.point):f>l&&!as(n.active,t.active)&&r.compareRange(l,f,n.active,t.active),c>o)break;l=c,h<=0&&n.next(),h>=0&&t.next()}}function as(n,e){if(n.length!=e.length)return!1;for(let t=0;t=e;i--)n[i+1]=n[i];n[e]=t}function Br(n,e){let t=-1,i=1e9;for(let s=0;s=e)return s;if(s==n.length)break;r+=n.charCodeAt(s)==9?t-r%t:1,s=de(n,s)}return i===!0?-1:n.length}const cs="ͼ",Pr=typeof Symbol>"u"?"__"+cs:Symbol.for(cs),fs=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Rr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class ot{constructor(e,t){this.rules=[];let{finish:i}=t||{};function s(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function r(o,l,a,h){let c=[],f=/^@(\w+)\b/.exec(o[0]),u=f&&f[1]=="keyframes";if(f&&l==null)return a.push(o[0]+";");for(let d in l){let p=l[d];if(/&/.test(d))r(d.split(/,\s*/).map(g=>o.map(m=>g.replace(/&/,m))).reduce((g,m)=>g.concat(m)),p,a);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+d+") should be a primitive value.");r(s(d),p,c,u)}else p!=null&&c.push(d.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+p+";")}(c.length||u)&&a.push((i&&!f&&!h?o.map(i):o).join(", ")+" {"+c.join(" ")+"}")}for(let o in e)r(s(o),e[o],this.rules)}getRules(){return this.rules.join(` -`)}static newName(){let e=Rr[Pr]||1;return Rr[Pr]=e+1,cs+e.toString(36)}static mount(e,t){(e[fs]||new nc(e)).mount(Array.isArray(t)?t:[t])}}let Ai=null;class nc{constructor(e){if(!e.head&&e.adoptedStyleSheets&&typeof CSSStyleSheet<"u"){if(Ai)return e.adoptedStyleSheets=[Ai.sheet].concat(e.adoptedStyleSheets),e[fs]=Ai;this.sheet=new CSSStyleSheet,e.adoptedStyleSheets=[this.sheet].concat(e.adoptedStyleSheets),Ai=this}else{this.styleTag=(e.ownerDocument||e).createElement("style");let t=e.head||e;t.insertBefore(this.styleTag,t.firstChild)}this.modules=[],e[fs]=this}mount(e){let t=this.sheet,i=0,s=0;for(let r=0;r-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,o),t)for(let a=0;a",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Lr=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),sc=typeof navigator<"u"&&/Mac/.test(navigator.platform),rc=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),oc=sc||Lr&&+Lr[1]<57;for(var re=0;re<10;re++)lt[48+re]=lt[96+re]=String(re);for(var re=1;re<=24;re++)lt[re+111]="F"+re;for(var re=65;re<=90;re++)lt[re]=String.fromCharCode(re+32),li[re]=String.fromCharCode(re);for(var In in lt)li.hasOwnProperty(In)||(li[In]=lt[In]);function lc(n){var e=oc&&(n.ctrlKey||n.altKey||n.metaKey)||rc&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?li:lt)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function Qi(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function Nt(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function ac(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function ji(n,e){if(!e.anchorNode)return!1;try{return Nt(n,e.anchorNode)}catch{return!1}}function ai(n){return n.nodeType==3?Vt(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function Zi(n,e,t,i){return t?Er(n,e,t,i,-1)||Er(n,e,t,i,1):!1}function en(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function Er(n,e,t,i,s){for(;;){if(n==t&&e==i)return!0;if(e==(s<0?0:hi(n))){if(n.nodeName=="DIV")return!1;let r=n.parentNode;if(!r||r.nodeType!=1)return!1;e=en(n)+(s<0?0:1),n=r}else if(n.nodeType==1){if(n=n.childNodes[e+(s<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=s<0?hi(n):0}else return!1}}function hi(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}const vl={left:0,right:0,top:0,bottom:0};function Js(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function hc(n){return{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function cc(n,e,t,i,s,r,o,l){let a=n.ownerDocument,h=a.defaultView||window;for(let c=n;c;)if(c.nodeType==1){let f,u=c==a.body;if(u)f=hc(h);else{if(c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let g=c.getBoundingClientRect();f={left:g.left,right:g.left+c.clientWidth,top:g.top,bottom:g.top+c.clientHeight}}let d=0,p=0;if(s=="nearest")e.top0&&e.bottom>f.bottom+p&&(p=e.bottom-f.bottom+p+o)):e.bottom>f.bottom&&(p=e.bottom-f.bottom+o,t<0&&e.top-p0&&e.right>f.right+d&&(d=e.right-f.right+d+r)):e.right>f.right&&(d=e.right-f.right+r,t<0&&e.leftt.clientHeight||t.scrollWidth>t.clientWidth)return t;t=t.assignedSlot||t.parentNode}else if(t.nodeType==11)t=t.host;else break;return null}class uc{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){this.set(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset)}set(e,t,i,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=s}}let Dt=null;function Sl(n){if(n.setActive)return n.setActive();if(Dt)return n.focus(Dt);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(Dt==null?{get preventScroll(){return Dt={preventScroll:!0},!0}}:void 0),!Dt){Dt=!1;for(let t=0;tt)return f.domBoundsAround(e,t,h);if(u>=e&&s==-1&&(s=a,r=h),h>t&&f.dom.parentNode==this.dom){o=a,l=c;break}c=u,h=u+f.breakAfter}return{from:r,to:l<0?i+this.length:l,startDOM:(s?this.children[s-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.dirty|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.dirty|=2),t.dirty&1)return;t.dirty|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.dirty&&this.markParentsDirty(!0))}setDOM(e){this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,i=_s){this.markDirty();for(let s=e;sthis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function Ml(n,e,t,i,s,r,o,l,a){let{children:h}=n,c=h.length?h[e]:null,f=r.length?r[r.length-1]:null,u=f?f.breakAfter:o;if(!(e==i&&c&&!o&&!u&&r.length<2&&c.merge(t,s,r.length?f:null,t==0,l,a))){if(i0&&(!o&&r.length&&c.merge(t,c.length,r[0],!1,l,0)?c.breakAfter=r.shift().breakAfter:(t2);var A={mac:Wr||/Mac/.test(Ae.platform),windows:/Win/.test(Ae.platform),linux:/Linux|X11/.test(Ae.platform),ie:vn,ie_version:Ol?us.documentMode||6:ps?+ps[1]:ds?+ds[1]:0,gecko:Vr,gecko_version:Vr?+(/Firefox\/(\d+)/.exec(Ae.userAgent)||[0,0])[1]:0,chrome:!!Nn,chrome_version:Nn?+Nn[1]:0,ios:Wr,android:/Android\b/.test(Ae.userAgent),webkit:Fr,safari:Tl,webkit_version:Fr?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:us.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const gc=256;class at extends z{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,i){return i&&(!(i instanceof at)||this.length-(t-e)+i.length>gc)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new at(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new he(this.dom,e)}domBoundsAround(e,t,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return gs(this.dom,e,t)}}class Ue extends z{constructor(e,t=[],i=0){super(),this.mark=e,this.children=t,this.length=i;for(let s of t)s.setParent(this)}setAttrs(e){if(Cl(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.dirty|=6)}sync(e){this.dom?this.dirty&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e)}merge(e,t,i,s,r,o){return i&&(!(i instanceof Ue&&i.mark.eq(this.mark))||e&&r<=0||te&&t.push(i=e&&(s=r),i=a,r++}let o=this.length-e;return this.length=e,s>-1&&(this.children.length=s,this.markDirty()),new Ue(this.mark,t,o)}domAtPos(e){return Rl(this,e)}coordsAt(e,t){return El(this,e,t)}}function gs(n,e,t){let i=n.nodeValue.length;e>i&&(e=i);let s=e,r=e,o=0;e==0&&t<0||e==i&&t>=0?A.chrome||A.gecko||(e?(s--,o=1):r=0)?0:l.length-1];return A.safari&&!o&&a.width==0&&(a=Array.prototype.find.call(l,h=>h.width)||a),o?Js(a,o<0):a||null}class tt extends z{constructor(e,t,i){super(),this.widget=e,this.length=t,this.side=i,this.prevWidget=null}static create(e,t,i){return new(e.customView||tt)(e,t,i)}split(e){let t=tt.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(){(!this.dom||!this.widget.updateDOM(this.dom))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(this.editorView)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,t,i,s,r,o){return i&&(!(i instanceof tt)||!this.widget.compare(i.widget)||e>0&&r<=0||t0?i.length-1:0;s=i[r],!(e>0?r==0:r==i.length-1||s.top0?-1:1);return this.length?s:Js(s,this.side>0)}get isEditable(){return!1}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Bl extends tt{domAtPos(e){let{topView:t,text:i}=this.widget;return t?ms(e,0,t,i,(s,r)=>s.domAtPos(r),s=>new he(i,Math.min(s,i.nodeValue.length))):new he(i,Math.min(e,i.nodeValue.length))}sync(){this.setDOM(this.widget.toDOM())}localPosFromDOM(e,t){let{topView:i,text:s}=this.widget;return i?Pl(e,t,i,s):Math.min(t,this.length)}ignoreMutation(){return!1}get overrideDOMText(){return null}coordsAt(e,t){let{topView:i,text:s}=this.widget;return i?ms(e,t,i,s,(r,o,l)=>r.coordsAt(o,l),(r,o)=>gs(s,r,o)):gs(s,e,t)}destroy(){var e;super.destroy(),(e=this.widget.topView)===null||e===void 0||e.destroy()}get isEditable(){return!0}canReuseDOM(){return!0}}function ms(n,e,t,i,s,r){if(t instanceof Ue){for(let o=t.dom.firstChild;o;o=o.nextSibling){let l=z.get(o);if(!l)return r(n,e);let a=Nt(o,i),h=l.length+(a?i.nodeValue.length:0);if(n0?-1:1);return i&&i.topt.top?{left:t.left,right:t.right,top:i.top,bottom:i.bottom}:t}get overrideDOMText(){return I.empty}}at.prototype.children=tt.prototype.children=Ft.prototype.children=_s;function mc(n,e){let t=n.parent,i=t?t.children.indexOf(n):-1;for(;t&&i>=0;)if(e<0?i>0:ir&&e0;r--){let o=i[r-1];if(o.dom.parentNode==t)return o.domAtPos(o.length)}for(let r=s;r0&&e instanceof Ue&&s.length&&(i=s[s.length-1])instanceof Ue&&i.mark.eq(e.mark)?Ll(i,e.children[0],t-1):(s.push(e),e.setParent(n)),n.length+=e.length}function El(n,e,t){let i=null,s=-1,r=null,o=-1;function l(h,c){for(let f=0,u=0;f=c&&(d.children.length?l(d,c-u):!r&&(p>c||u==p&&d.getSide()>0)?(r=d,o=c-u):(u0?3e8:-4e8:t>0?1e8:-1e8,new xt(e,t,t,i,e.widget||null,!1)}static replace(e){let t=!!e.block,i,s;if(e.isBlockGap)i=-5e8,s=4e8;else{let{start:r,end:o}=Il(e,t);i=(r?t?-3e8:-1:5e8)-1,s=(o?t?2e8:1:-6e8)+1}return new xt(e,i,s,t,e.widget||null,!0)}static line(e){return new bi(e)}static set(e,t=!1){return j.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}T.none=j.empty;class Sn extends T{constructor(e){let{start:t,end:i}=Il(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){return this==e||e instanceof Sn&&this.tagName==e.tagName&&this.class==e.class&&Xs(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}Sn.prototype.point=!1;class bi extends T{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof bi&&this.spec.class==e.spec.class&&Xs(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}bi.prototype.mapMode=ae.TrackBefore;bi.prototype.point=!0;class xt extends T{constructor(e,t,i,s,r,o){super(t,i,r,e),this.block=s,this.isReplace=o,this.mapMode=s?t<=0?ae.TrackBefore:ae.TrackAfter:ae.TrackDel}get type(){return this.startSide=5}eq(e){return e instanceof xt&&bc(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}xt.prototype.point=!0;function Il(n,e=!1){let{inclusiveStart:t,inclusiveEnd:i}=n;return t==null&&(t=n.inclusive),i==null&&(i=n.inclusive),{start:t??e,end:i??e}}function bc(n,e){return n==e||!!(n&&e&&n.compare(e))}function ws(n,e,t,i=0){let s=t.length-1;s>=0&&t[s]+i>=n?t[s]=Math.max(t[s],e):t.push(n,e)}class pe extends z{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,i,s,r,o){if(i){if(!(i instanceof pe))return!1;this.dom||i.transferDOM(this)}return s&&this.setDeco(i?i.attrs:null),Dl(this,e,t,i?i.children:[],r,o),!0}split(e){let t=new pe;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i,off:s}=this.childPos(e);s&&(t.append(this.children[i].split(s),0),this.children[i].merge(s,this.children[i].length,null,!1,0,0),i++);for(let r=i;r0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Xs(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Ll(this,e,t)}addLineDeco(e){let t=e.spec.attributes,i=e.spec.class;t&&(this.attrs=ys(t,this.attrs||{})),i&&(this.attrs=ys({class:i},this.attrs||{}))}domAtPos(e){return Rl(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.dirty|=6)}sync(e){var t;this.dom?this.dirty&4&&(Cl(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(bs(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e);let i=this.dom.lastChild;for(;i&&z.get(i)instanceof Ue;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((t=z.get(i))===null||t===void 0?void 0:t.isEditable)==!1&&(!A.ios||!this.children.some(s=>s instanceof at))){let s=document.createElement("BR");s.cmIgnore=!0,this.dom.appendChild(s)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0;for(let t of this.children){if(!(t instanceof at)||/[^ -~]/.test(t.text))return null;let i=ai(t.dom);if(i.length!=1)return null;e+=i[0].width}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length}:null}coordsAt(e,t){return El(this,e,t)}become(e){return!1}get type(){return $.Text}static find(e,t){for(let i=0,s=0;i=t){if(r instanceof pe)return r;if(o>t)break}s=o+r.breakAfter}return null}}class yt extends z{constructor(e,t,i){super(),this.widget=e,this.length=t,this.type=i,this.breakAfter=0,this.prevWidget=null}merge(e,t,i,s,r,o){return i&&(!(i instanceof yt)||!this.widget.compare(i.widget)||e>0&&r<=0||t0;){if(this.textOff==this.text.length){let{value:r,lineBreak:o,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=r,this.textOff=0}let s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-i)),this.getLine().append(Mi(new at(this.text.slice(this.textOff,this.textOff+s)),t),i),this.atCursorPos=!0,this.textOff+=s,e-=s,i=0}}span(e,t,i,s){this.buildText(t-e,i,s),this.pos=t,this.openStart<0&&(this.openStart=s)}point(e,t,i,s,r,o){if(this.disallowBlockEffectsFor[o]&&i instanceof xt){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=t-e;if(i instanceof xt)if(i.block){let{type:a}=i;a==$.WidgetAfter&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new yt(i.widget||new Hr("div"),l,a))}else{let a=tt.create(i.widget||new Hr("span"),l,l?0:i.startSide),h=this.atCursorPos&&!a.isEditable&&r<=s.length&&(e0),c=!a.isEditable&&(es.length||i.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!h&&(this.pendingBuffer=0),this.flushBuffer(s),h&&(f.append(Mi(new Ft(1),s),r),r=s.length+Math.max(0,r-s.length)),f.append(Mi(a,s),r),this.atCursorPos=c,this.pendingBuffer=c?es.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=s.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=r)}static build(e,t,i,s,r){let o=new Ys(e,t,i,r);return o.openEnd=j.spans(s,t,i,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function Mi(n,e){for(let t of e)n=new Ue(t,[n],n.length);return n}class Hr extends ct{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}}const Nl=D.define(),Vl=D.define(),Fl=D.define(),Wl=D.define(),xs=D.define(),Hl=D.define(),zl=D.define({combine:n=>n.some(e=>e)}),ql=D.define({combine:n=>n.some(e=>e)});class tn{constructor(e,t="nearest",i="nearest",s=5,r=5){this.range=e,this.y=t,this.x=i,this.yMargin=s,this.xMargin=r}map(e){return e.empty?this:new tn(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const zr=E.define({map:(n,e)=>n.map(e)});function Le(n,e,t){let i=n.facet(Wl);i.length?i[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const Cn=D.define({combine:n=>n.length?n[0]:!0});let wc=0;const Qt=D.define();class me{constructor(e,t,i,s){this.id=e,this.create=t,this.domEventHandlers=i,this.extension=s(this)}static define(e,t){const{eventHandlers:i,provide:s,decorations:r}=t||{};return new me(wc++,e,i,o=>{let l=[Qt.of(o)];return r&&l.push(ci.of(a=>{let h=a.plugin(o);return h?r(h):T.none})),s&&l.push(s(o)),l})}static fromClass(e,t){return me.define(i=>new e(i),t)}}class Vn{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(i){if(Le(t.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Le(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(i){Le(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const $l=D.define(),Qs=D.define(),ci=D.define(),Kl=D.define(),jl=D.define(),Zt=D.define();class je{constructor(e,t,i,s){this.fromA=e,this.toA=t,this.fromB=i,this.toB=s}join(e){return new je(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,i=this;for(;t>0;t--){let s=e[t-1];if(!(s.fromA>i.toA)){if(s.toAc)break;r+=2}if(!a)return i;new je(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),o=a.toA,l=a.toB}}}class nn{constructor(e,t,i){this.view=e,this.state=t,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=Q.empty(this.startState.doc.length);for(let o of i)this.changes=this.changes.compose(o.changes);let s=[];this.changes.iterChangedRanges((o,l,a,h)=>s.push(new je(o,l,a,h))),this.changedRanges=s;let r=e.hasFocus;r!=e.inputState.notifiedFocused&&(e.inputState.notifiedFocused=r,this.flags|=1)}static create(e,t,i){return new nn(e,t,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}var J=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(J||(J={}));const ks=J.LTR,xc=J.RTL;function Ul(n){let e=[];for(let t=0;t=t){if(l.level==i)return o;(r<0||(s!=0?s<0?l.fromt:e[r].level>l.level))&&(r=o)}}if(r<0)throw new RangeError("Index out of range");return r}}const K=[];function Ac(n,e){let t=n.length,i=e==ks?1:2,s=e==ks?2:1;if(!n||i==1&&!Cc.test(n))return Gl(t);for(let o=0,l=i,a=i;o=0;u-=3)if(Ie[u+1]==-c){let d=Ie[u+2],p=d&2?i:d&4?d&1?s:i:0;p&&(K[o]=K[Ie[u]]=p),l=u;break}}else{if(Ie.length==189)break;Ie[l++]=o,Ie[l++]=h,Ie[l++]=a}else if((f=K[o])==2||f==1){let u=f==i;a=u?0:1;for(let d=l-3;d>=0;d-=3){let p=Ie[d+2];if(p&2)break;if(u)Ie[d+2]|=2;else{if(p&4)break;Ie[d+2]|=4}}}for(let o=0;ol;){let c=h,f=K[--h]!=2;for(;h>l&&f==(K[h-1]!=2);)h--;r.push(new Et(h,c,f?2:1))}else r.push(new Et(l,o,0))}else for(let o=0;o1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=o-1);i=r+o}}readNode(e){if(e.cmIgnore)return;let t=z.get(e),i=t&&t.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let s=i.iter();!s.next().done;)s.lineBreak?this.lineBreak():this.append(s.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+Math.min(t,i.offset))}}function qr(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}class $r{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class Kr extends z{constructor(e){super(),this.view=e,this.compositionDeco=T.none,this.decorations=[],this.dynamicDecorationMap=[],this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new pe],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new je(0,0,0,e.state.doc.length)],0)}get editorView(){return this.view}get length(){return this.view.state.doc.length}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every(({fromA:o,toA:l})=>lthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=T.none:(e.transactions.length||this.dirty)&&(this.compositionDeco=Oc(this.view,e.changes)),(A.ie||A.chrome)&&!this.compositionDeco.size&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=this.decorations,s=this.updateDeco(),r=Rc(i,s,e.changes);return t=je.extendWithRanges(t,r),this.dirty==0&&t.length==0?!1:(this.updateInner(t,e.startState.doc.length),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let r=A.chrome||A.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(r),this.dirty=0,r&&(r.written||i.selectionRange.focusNode!=r.node)&&(this.forceSelection=!0),this.dom.style.height=""});let s=[];if(this.view.viewport.from||this.view.viewport.to=0?e[s]:null;if(!r)break;let{fromA:o,toA:l,fromB:a,toB:h}=r,{content:c,breakAtStart:f,openStart:u,openEnd:d}=Ys.build(this.view.state.doc,a,h,this.decorations,this.dynamicDecorationMap),{i:p,off:g}=i.findPos(l,1),{i:m,off:y}=i.findPos(o,-1);Ml(this,m,y,p,g,c,f,u,d)}}updateSelection(e=!1,t=!1){if((e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange(),!(t||this.mayControlSelection()))return;let i=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,r=this.domAtPos(s.anchor),o=s.empty?r:this.domAtPos(s.head);if(A.gecko&&s.empty&&Dc(r)){let a=document.createTextNode("");this.view.observer.ignore(()=>r.node.insertBefore(a,r.node.childNodes[r.offset]||null)),r=o=new he(a,0),i=!0}let l=this.view.observer.selectionRange;(i||!l.focusNode||!Zi(r.node,r.offset,l.anchorNode,l.anchorOffset)||!Zi(o.node,o.offset,l.focusNode,l.focusOffset))&&(this.view.observer.ignore(()=>{A.android&&A.chrome&&this.dom.contains(l.focusNode)&&Lc(l.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let a=Qi(this.view.root);if(a)if(s.empty){if(A.gecko){let h=Bc(r.node,r.offset);if(h&&h!=3){let c=Yl(r.node,r.offset,h==1?1:-1);c&&(r=new he(c,h==1?0:c.nodeValue.length))}}a.collapse(r.node,r.offset),s.bidiLevel!=null&&l.cursorBidiLevel!=null&&(l.cursorBidiLevel=s.bidiLevel)}else if(a.extend){a.collapse(r.node,r.offset);try{a.extend(o.node,o.offset)}catch{}}else{let h=document.createRange();s.anchor>s.head&&([r,o]=[o,r]),h.setEnd(o.node,o.offset),h.setStart(r.node,r.offset),a.removeAllRanges(),a.addRange(h)}}),this.view.observer.setSelectionRange(r,o)),this.impreciseAnchor=r.precise?null:new he(l.anchorNode,l.anchorOffset),this.impreciseHead=o.precise?null:new he(l.focusNode,l.focusOffset)}enforceCursorAssoc(){if(this.compositionDeco.size)return;let{view:e}=this,t=e.state.selection.main,i=Qi(e.root),{anchorNode:s,anchorOffset:r}=e.observer.selectionRange;if(!i||!t.empty||!t.assoc||!i.modify)return;let o=pe.find(this,t.head);if(!o)return;let l=o.posAtStart;if(t.head==l||t.head==l+o.length)return;let a=this.coordsAt(t.head,-1),h=this.coordsAt(t.head,1);if(!a||!h||a.bottom>h.top)return;let c=this.domAtPos(t.head+t.assoc);i.collapse(c.node,c.offset),i.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&i.collapse(s,r)}mayControlSelection(){let e=this.view.root.activeElement;return e==this.dom||ji(this.dom,this.view.observer.selectionRange)&&!(e&&this.dom.contains(e))}nearest(e){for(let t=e;t;){let i=z.get(t);if(i&&i.rootView==this)return i;t=t.parentNode}return null}posFromDOM(e,t){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,t)+i.posAtStart}domAtPos(e){let{i:t,off:i}=this.childCursor().findPos(e,-1);for(;to||e==o&&r.type!=$.WidgetBefore&&r.type!=$.WidgetAfter&&(!s||t==2||this.children[s-1].breakAfter||this.children[s-1].type==$.WidgetBefore&&t>-2))return r.coordsAt(e-o,t);i=o}}measureVisibleLineHeights(e){let t=[],{from:i,to:s}=e,r=this.view.contentDOM.clientWidth,o=r>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==J.LTR;for(let h=0,c=0;cs)break;if(h>=i){let d=f.dom.getBoundingClientRect();if(t.push(d.height),o){let p=f.dom.lastChild,g=p?ai(p):[];if(g.length){let m=g[g.length-1],y=a?m.right-d.left:d.right-m.left;y>l&&(l=y,this.minWidth=r,this.minWidthFrom=h,this.minWidthTo=u)}}}h=u+f.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?J.RTL:J.LTR}measureTextSize(){for(let s of this.children)if(s instanceof pe){let r=s.measureTextSize();if(r)return r}let e=document.createElement("div"),t,i;return e.className="cm-line",e.style.width="99999px",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let s=ai(e.firstChild)[0];t=e.getBoundingClientRect().height,i=s?s.width/27:7,e.remove()}),{lineHeight:t,charWidth:i}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new Al(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,s=0;;s++){let r=s==t.viewports.length?null:t.viewports[s],o=r?r.from-1:this.length;if(o>i){let l=t.lineBlockAt(o).bottom-t.lineBlockAt(i).top;e.push(T.replace({widget:new jr(l),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!r)break;i=r.to+1}return T.set(e)}updateDeco(){let e=this.view.state.facet(ci).map((t,i)=>(this.dynamicDecorationMap[i]=typeof t=="function")?t(this.view):t);for(let t=e.length;tt.anchor?-1:1),s;if(!i)return;!t.empty&&(s=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(i={left:Math.min(i.left,s.left),top:Math.min(i.top,s.top),right:Math.max(i.right,s.right),bottom:Math.max(i.bottom,s.bottom)});let r=0,o=0,l=0,a=0;for(let c of this.view.state.facet(jl).map(f=>f(this.view)))if(c){let{left:f,right:u,top:d,bottom:p}=c;f!=null&&(r=Math.max(r,f)),u!=null&&(o=Math.max(o,u)),d!=null&&(l=Math.max(l,d)),p!=null&&(a=Math.max(a,p))}let h={left:i.left-r,top:i.top-l,right:i.right+o,bottom:i.bottom+a};cc(this.view.scrollDOM,h,t.head0&&t<=0)n=n.childNodes[e-1],e=hi(n);else if(n.nodeType==1&&e=0)n=n.childNodes[e],e=0;else return null}}function Bc(n,e){return n.nodeType!=1?0:(e&&n.childNodes[e-1].contentEditable=="false"?1:0)|(e0;){let h=de(s.text,o,!1);if(i(s.text.slice(h,o))!=a)break;o=h}for(;ln?e.left-n:Math.max(0,n-e.right)}function Nc(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function Fn(n,e){return n.tope.top+1}function Ur(n,e){return en.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function Ss(n,e,t){let i,s,r,o,l=!1,a,h,c,f;for(let p=n.firstChild;p;p=p.nextSibling){let g=ai(p);for(let m=0;mM||o==M&&r>S){i=p,s=y,r=S,o=M;let v=M?t0?m0)}S==0?t>y.bottom&&(!c||c.bottomy.top)&&(h=p,f=y):c&&Fn(c,y)?c=Gr(c,y.bottom):f&&Fn(f,y)&&(f=Ur(f,y.top))}}if(c&&c.bottom>=t?(i=a,s=c):f&&f.top<=t&&(i=h,s=f),!i)return{node:n,offset:0};let u=Math.max(s.left,Math.min(s.right,e));if(i.nodeType==3)return Jr(i,u,t);if(l&&i.contentEditable!="false")return Ss(i,u,t);let d=Array.prototype.indexOf.call(n.childNodes,i)+(e>=(s.left+s.right)/2?1:0);return{node:n,offset:d}}function Jr(n,e,t){let i=n.nodeValue.length,s=-1,r=1e9,o=0;for(let l=0;lt?c.top-t:t-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&f=(c.left+c.right)/2,d=u;if((A.chrome||A.gecko)&&Vt(n,l).getBoundingClientRect().left==c.right&&(d=!u),f<=0)return{node:n,offset:l+(d?1:0)};s=l+(d?1:0),r=f}}}return{node:n,offset:s>-1?s:o>0?n.nodeValue.length:0}}function Ql(n,{x:e,y:t},i,s=-1){var r;let o=n.contentDOM.getBoundingClientRect(),l=o.top+n.viewState.paddingTop,a,{docHeight:h}=n.viewState,c=t-l;if(c<0)return 0;if(c>h)return n.state.doc.length;for(let y=n.defaultLineHeight/2,S=!1;a=n.elementAtHeight(c),a.type!=$.Text;)for(;c=s>0?a.bottom+y:a.top-y,!(c>=0&&c<=h);){if(S)return i?null:0;S=!0,s=-s}t=l+c;let f=a.from;if(fn.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:i?null:_r(n,o,a,e,t);let u=n.dom.ownerDocument,d=n.root.elementFromPoint?n.root:u,p=d.elementFromPoint(e,t);p&&!n.contentDOM.contains(p)&&(p=null),p||(e=Math.max(o.left+1,Math.min(o.right-1,e)),p=d.elementFromPoint(e,t),p&&!n.contentDOM.contains(p)&&(p=null));let g,m=-1;if(p&&((r=n.docView.nearest(p))===null||r===void 0?void 0:r.isEditable)!=!1){if(u.caretPositionFromPoint){let y=u.caretPositionFromPoint(e,t);y&&({offsetNode:g,offset:m}=y)}else if(u.caretRangeFromPoint){let y=u.caretRangeFromPoint(e,t);y&&({startContainer:g,startOffset:m}=y,(!n.contentDOM.contains(g)||A.safari&&Vc(g,m,e)||A.chrome&&Fc(g,m,e))&&(g=void 0))}}if(!g||!n.docView.dom.contains(g)){let y=pe.find(n.docView,f);if(!y)return c>a.top+a.height/2?a.to:a.from;({node:g,offset:m}=Ss(y.dom,e,t))}return n.docView.posFromDOM(g,m)}function _r(n,e,t,i,s){let r=Math.round((i-e.left)*n.defaultCharacterWidth);if(n.lineWrapping&&t.height>n.defaultLineHeight*1.5){let l=Math.floor((s-t.top)/n.defaultLineHeight);r+=l*n.viewState.heightOracle.lineLength}let o=n.state.sliceDoc(t.from,t.to);return t.from+hs(o,r,n.state.tabSize)}function Vc(n,e,t){let i;if(n.nodeType!=3||e!=(i=n.nodeValue.length))return!1;for(let s=n.nextSibling;s;s=s.nextSibling)if(s.nodeType!=1||s.nodeName!="BR")return!1;return Vt(n,i-1,i).getBoundingClientRect().left>t}function Fc(n,e,t){if(e!=0)return!1;for(let s=n;;){let r=s.parentNode;if(!r||r.nodeType!=1||r.firstChild!=s)return!1;if(r.classList.contains("cm-line"))break;s=r}let i=n.nodeType==1?n.getBoundingClientRect():Vt(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-i.left>5}function Wc(n,e,t,i){let s=n.state.doc.lineAt(e.head),r=!i||!n.lineWrapping?null:n.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head);if(r){let a=n.dom.getBoundingClientRect(),h=n.textDirectionAt(s.from),c=n.posAtCoords({x:t==(h==J.LTR)?a.right-1:a.left+1,y:(r.top+r.bottom)/2});if(c!=null)return b.cursor(c,t?-1:1)}let o=pe.find(n.docView,e.head),l=o?t?o.posAtEnd:o.posAtStart:t?s.to:s.from;return b.cursor(l,t?-1:1)}function Xr(n,e,t,i){let s=n.state.doc.lineAt(e.head),r=n.bidiSpans(s),o=n.textDirectionAt(s.from);for(let l=e,a=null;;){let h=Mc(s,r,o,l,t),c=Jl;if(!h){if(s.number==(t?n.state.doc.lines:1))return l;c=` -`,s=n.state.doc.line(s.number+(t?1:-1)),r=n.bidiSpans(s),h=b.cursor(t?s.from:s.to)}if(a){if(!a(c))return l}else{if(!i)return h;a=i(c)}l=h}}function Hc(n,e,t){let i=n.state.charCategorizer(e),s=i(t);return r=>{let o=i(r);return s==q.Space&&(s=o),s==o}}function zc(n,e,t,i){let s=e.head,r=t?1:-1;if(s==(t?n.state.doc.length:0))return b.cursor(s,e.assoc);let o=e.goalColumn,l,a=n.contentDOM.getBoundingClientRect(),h=n.coordsAtPos(s),c=n.documentTop;if(h)o==null&&(o=h.left-a.left),l=r<0?h.top:h.bottom;else{let d=n.viewState.lineBlockAt(s);o==null&&(o=Math.min(a.right-a.left,n.defaultCharacterWidth*(s-d.from))),l=(r<0?d.top:d.bottom)+c}let f=a.left+o,u=i??n.defaultLineHeight>>1;for(let d=0;;d+=10){let p=l+(u+d)*r,g=Ql(n,{x:f,y:p},!1,r);if(pa.bottom||(r<0?gs))return b.cursor(g,e.assoc,void 0,o)}}function Wn(n,e,t){let i=n.state.facet(Kl).map(s=>s(n));for(;;){let s=!1;for(let r of i)r.between(t.from-1,t.from+1,(o,l,a)=>{t.from>o&&t.fromt.from?b.cursor(o,1):b.cursor(l,-1),s=!0)});if(!s)return t}}class qc{constructor(e){this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.mouseSelection=null;let t=(i,s)=>{this.ignoreDuringComposition(s)||s.type=="keydown"&&this.keydown(e,s)||(this.mustFlushObserver(s)&&e.observer.forceFlush(),this.runCustomHandlers(s.type,e,s)?s.preventDefault():i(e,s))};for(let i in ee){let s=ee[i];e.contentDOM.addEventListener(i,r=>{Yr(e,r)&&t(s,r)},Cs[i]),this.registeredEvents.push(i)}e.scrollDOM.addEventListener("mousedown",i=>{i.target==e.scrollDOM&&t(ee.mousedown,i)}),A.chrome&&A.chrome_version==102&&e.scrollDOM.addEventListener("wheel",()=>{this.chromeScrollHack<0?e.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout(()=>{this.chromeScrollHack=-1,e.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=e.hasFocus,A.safari&&e.contentDOM.addEventListener("input",()=>null)}setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}ensureHandlers(e,t){var i;let s;this.customHandlers=[];for(let r of t)if(s=(i=r.update(e).spec)===null||i===void 0?void 0:i.domEventHandlers){this.customHandlers.push({plugin:r.value,handlers:s});for(let o in s)this.registeredEvents.indexOf(o)<0&&o!="scroll"&&(this.registeredEvents.push(o),e.contentDOM.addEventListener(o,l=>{Yr(e,l)&&this.runCustomHandlers(o,e,l)&&l.preventDefault()}))}}runCustomHandlers(e,t,i){for(let s of this.customHandlers){let r=s.handlers[e];if(r)try{if(r.call(s.plugin,i,t)||i.defaultPrevented)return!0}catch(o){Le(t.state,o)}}return!1}runScrollHandlers(e,t){this.lastScrollTop=e.scrollDOM.scrollTop,this.lastScrollLeft=e.scrollDOM.scrollLeft;for(let i of this.customHandlers){let s=i.handlers.scroll;if(s)try{s.call(i.plugin,t,e)}catch(r){Le(e.state,r)}}}keydown(e,t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),t.keyCode==9&&Date.now()s.keyCode==t.keyCode))&&!t.ctrlKey||$c.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)?(this.pendingIOSKey=i||t,setTimeout(()=>this.flushIOSKey(e),250),!0):!1}flushIOSKey(e){let t=this.pendingIOSKey;return t?(this.pendingIOSKey=void 0,Lt(e.contentDOM,t.key,t.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:A.safari&&!A.ios&&Date.now()-this.compositionEndedAt<100?(this.compositionEndedAt=0,!0):!1:!1}mustFlushObserver(e){return e.type=="keydown"&&e.keyCode!=229}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const Zl=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],$c="dthko",ea=[16,17,18,20,91,92,224,225];function Di(n){return n*.7+8}class Kc{constructor(e,t,i,s){this.view=e,this.style=i,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=fc(e.contentDOM);let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(N.allowMultipleSelections)&&jc(e,t),this.dragMove=Uc(e,t),this.dragging=Gc(e,t)&&sa(t)==1?null:!1,this.dragging===!1&&(t.preventDefault(),this.select(t))}move(e){var t;if(e.buttons==0)return this.destroy();if(this.dragging!==!1)return;this.select(this.lastEvent=e);let i=0,s=0,r=((t=this.scrollParent)===null||t===void 0?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight};e.clientX<=r.left?i=-Di(r.left-e.clientX):e.clientX>=r.right&&(i=Di(e.clientX-r.right)),e.clientY<=r.top?s=-Di(r.top-e.clientY):e.clientY>=r.bottom&&(s=Di(e.clientY-r.bottom)),this.setScrollSpeed(i,s)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}select(e){let t=this.style.get(e,this.extend,this.multiple);(this.mustSelect||!t.eq(this.view.state.selection)||t.main.assoc!=this.view.state.selection.main.assoc)&&this.view.dispatch({selection:t,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.docChanged&&this.dragging&&(this.dragging=this.dragging.map(e.changes)),this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function jc(n,e){let t=n.state.facet(Nl);return t.length?t[0](e):A.mac?e.metaKey:e.ctrlKey}function Uc(n,e){let t=n.state.facet(Vl);return t.length?t[0](e):A.mac?!e.altKey:!e.ctrlKey}function Gc(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let i=Qi(n.root);if(!i||i.rangeCount==0)return!0;let s=i.getRangeAt(0).getClientRects();for(let r=0;r=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function Yr(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,i;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(i=z.get(t))&&i.ignoreEvent(e))return!1;return!0}const ee=Object.create(null),Cs=Object.create(null),ta=A.ie&&A.ie_version<15||A.ios&&A.webkit_version<604;function Jc(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),ia(n,t.value)},50)}function ia(n,e){let{state:t}=n,i,s=1,r=t.toText(e),o=r.lines==t.selection.ranges.length;if(As!=null&&t.selection.ranges.every(a=>a.empty)&&As==r.toString()){let a=-1;i=t.changeByRange(h=>{let c=t.doc.lineAt(h.from);if(c.from==a)return{range:h};a=c.from;let f=t.toText((o?r.line(s++).text:e)+t.lineBreak);return{changes:{from:c.from,insert:f},range:b.cursor(h.from+f.length)}})}else o?i=t.changeByRange(a=>{let h=r.line(s++);return{changes:{from:a.from,to:a.to,insert:h.text},range:b.cursor(a.from+h.length)}}):i=t.replaceSelection(r);n.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}ee.keydown=(n,e)=>{n.inputState.setSelectionOrigin("select"),e.keyCode==27?n.inputState.lastEscPress=Date.now():ea.indexOf(e.keyCode)<0&&(n.inputState.lastEscPress=0)};ee.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};ee.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};Cs.touchstart=Cs.touchmove={passive:!0};ee.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return;let t=null;for(let i of n.state.facet(Fl))if(t=i(n,e),t)break;if(!t&&e.button==0&&(t=Yc(n,e)),t){let i=n.root.activeElement!=n.contentDOM;i&&n.observer.ignore(()=>Sl(n.contentDOM)),n.inputState.startMouseSelection(new Kc(n,e,t,i))}};function Qr(n,e,t,i){if(i==1)return b.cursor(e,t);if(i==2)return Ec(n.state,e,t);{let s=pe.find(n.docView,e),r=n.state.doc.lineAt(s?s.posAtEnd:e),o=s?s.posAtStart:r.from,l=s?s.posAtEnd:r.to;return ln>=e.top&&n<=e.bottom,Zr=(n,e,t)=>na(e,t)&&n>=t.left&&n<=t.right;function _c(n,e,t,i){let s=pe.find(n.docView,e);if(!s)return 1;let r=e-s.posAtStart;if(r==0)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&Zr(t,i,o))return-1;let l=s.coordsAt(r,1);return l&&Zr(t,i,l)?1:o&&na(i,o)?-1:1}function eo(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:_c(n,t,e.clientX,e.clientY)}}const Xc=A.ie&&A.ie_version<=11;let to=null,io=0,no=0;function sa(n){if(!Xc)return n.detail;let e=to,t=no;return to=n,no=Date.now(),io=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(io+1)%3:1}function Yc(n,e){let t=eo(n,e),i=sa(e),s=n.state.selection;return{update(r){r.docChanged&&(t.pos=r.changes.mapPos(t.pos),s=s.map(r.changes))},get(r,o,l){let a=eo(n,r),h=Qr(n,a.pos,a.bias,i);if(t.pos!=a.pos&&!o){let c=Qr(n,t.pos,t.bias,i),f=Math.min(c.from,h.from),u=Math.max(c.to,h.to);h=f1&&s.ranges.some(c=>c.eq(h))?Qc(s,h):l?s.addRange(h):b.create([h])}}}function Qc(n,e){for(let t=0;;t++)if(n.ranges[t].eq(e))return b.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}ee.dragstart=(n,e)=>{let{selection:{main:t}}=n.state,{mouseSelection:i}=n.inputState;i&&(i.dragging=t),e.dataTransfer&&(e.dataTransfer.setData("Text",n.state.sliceDoc(t.from,t.to)),e.dataTransfer.effectAllowed="copyMove")};function so(n,e,t,i){if(!t)return;let s=n.posAtCoords({x:e.clientX,y:e.clientY},!1);e.preventDefault();let{mouseSelection:r}=n.inputState,o=i&&r&&r.dragging&&r.dragMove?{from:r.dragging.from,to:r.dragging.to}:null,l={from:s,insert:t},a=n.state.changes(o?[o,l]:l);n.focus(),n.dispatch({changes:a,selection:{anchor:a.mapPos(s,-1),head:a.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"})}ee.drop=(n,e)=>{if(!e.dataTransfer)return;if(n.state.readOnly)return e.preventDefault();let t=e.dataTransfer.files;if(t&&t.length){e.preventDefault();let i=Array(t.length),s=0,r=()=>{++s==t.length&&so(n,e,i.filter(o=>o!=null).join(n.state.lineBreak),!1)};for(let o=0;o{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(i[o]=l.result),r()},l.readAsText(t[o])}}else so(n,e,e.dataTransfer.getData("Text"),!0)};ee.paste=(n,e)=>{if(n.state.readOnly)return e.preventDefault();n.observer.flush();let t=ta?null:e.clipboardData;t?(ia(n,t.getData("text/plain")),e.preventDefault()):Jc(n)};function Zc(n,e){let t=n.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),n.focus()},50)}function ef(n){let e=[],t=[],i=!1;for(let s of n.selection.ranges)s.empty||(e.push(n.sliceDoc(s.from,s.to)),t.push(s));if(!e.length){let s=-1;for(let{from:r}of n.selection.ranges){let o=n.doc.lineAt(r);o.number>s&&(e.push(o.text),t.push({from:o.from,to:Math.min(n.doc.length,o.to+1)})),s=o.number}i=!0}return{text:e.join(n.lineBreak),ranges:t,linewise:i}}let As=null;ee.copy=ee.cut=(n,e)=>{let{text:t,ranges:i,linewise:s}=ef(n.state);if(!t&&!s)return;As=s?t:null;let r=ta?null:e.clipboardData;r?(e.preventDefault(),r.clearData(),r.setData("text/plain",t)):Zc(n,t),e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"})};function ra(n){setTimeout(()=>{n.hasFocus!=n.inputState.notifiedFocused&&n.update([])},10)}ee.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),ra(n)};ee.blur=n=>{n.observer.clearSelectionRange(),ra(n)};ee.compositionstart=ee.compositionupdate=n=>{n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0)};ee.compositionend=n=>{n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionFirstChange=null,A.chrome&&A.android&&n.observer.flushSoon(),setTimeout(()=>{n.inputState.composing<0&&n.docView.compositionDeco.size&&n.update([])},50)};ee.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};ee.beforeinput=(n,e)=>{var t;let i;if(A.chrome&&A.android&&(i=Zl.find(s=>s.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let s=((t=window.visualViewport)===null||t===void 0?void 0:t.height)||0;setTimeout(()=>{var r;(((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0)>s+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}};const ro=["pre-wrap","normal","pre-line","break-spaces"];class tf{constructor(e){this.lineWrapping=e,this.doc=I.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength)),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return ro.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i-1,l=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=i,this.lineLength=s,l){this.heightSamples={};for(let a=0;a0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>Ui&&(e.heightChanged=!0),this.height=t)}replace(e,t,i){return ge.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,s){let r=this;for(let o=s.length-1;o>=0;o--){let{fromA:l,toA:a,fromB:h,toB:c}=s[o],f=r.lineAt(l,H.ByPosNoHeight,t,0,0),u=f.to>=a?f:r.lineAt(a,H.ByPosNoHeight,t,0,0);for(c+=u.to-a,a=u.to;o>0&&f.from<=s[o-1].toA;)l=s[o-1].fromA,h=s[o-1].fromB,o--,lr*2){let l=e[t-1];l.break?e.splice(--t,1,l.left,null,l.right):e.splice(--t,1,l.left,l.right),i+=1+l.break,s-=l.size}else if(r>s*2){let l=e[i];l.break?e.splice(i,1,l.left,null,l.right):e.splice(i,1,l.left,l.right),i+=2+l.break,r-=l.size}else break;else if(s=r&&o(this.blockAt(0,i,s,r))}updateHeight(e,t=0,i=!1,s){return s&&s.from<=t&&s.more&&this.setHeight(e,s.heights[s.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Se extends oa{constructor(e,t){super(e,t,$.Text),this.collapsed=0,this.widgetHeight=0}replace(e,t,i){let s=i[0];return i.length==1&&(s instanceof Se||s instanceof ne&&s.flags&4)&&Math.abs(this.length-s.length)<10?(s instanceof ne?s=new Se(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):ge.of(i)}updateHeight(e,t=0,i=!1,s){return s&&s.from<=t&&s.more?this.setHeight(e,s.heights[s.index++]):(i||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class ne extends ge{constructor(e){super(e,0)}lines(e,t){let i=e.lineAt(t).number,s=e.lineAt(t+this.length).number;return{firstLine:i,lastLine:s,lineHeight:this.height/(s-i+1)}}blockAt(e,t,i,s){let{firstLine:r,lastLine:o,lineHeight:l}=this.lines(t,s),a=Math.max(0,Math.min(o-r,Math.floor((e-i)/l))),{from:h,length:c}=t.line(r+a);return new nt(h,c,i+l*a,l,$.Text)}lineAt(e,t,i,s,r){if(t==H.ByHeight)return this.blockAt(e,i,s,r);if(t==H.ByPosNoHeight){let{from:f,to:u}=i.lineAt(e);return new nt(f,u-f,0,0,$.Text)}let{firstLine:o,lineHeight:l}=this.lines(i,r),{from:a,length:h,number:c}=i.lineAt(e);return new nt(a,h,s+l*(c-o),l,$.Text)}forEachLine(e,t,i,s,r,o){let{firstLine:l,lineHeight:a}=this.lines(i,r);for(let h=Math.max(e,r),c=Math.min(r+this.length,t);h<=c;){let f=i.lineAt(h);h==e&&(s+=a*(f.number-l)),o(new nt(f.from,f.length,s,a,$.Text)),s+=a,h=f.to+1}}replace(e,t,i){let s=this.length-t;if(s>0){let r=i[i.length-1];r instanceof ne?i[i.length-1]=new ne(r.length+s):i.push(null,new ne(s-1))}if(e>0){let r=i[0];r instanceof ne?i[0]=new ne(e+r.length):i.unshift(new ne(e-1),null)}return ge.of(i)}decomposeLeft(e,t){t.push(new ne(e-1),null)}decomposeRight(e,t){t.push(null,new ne(this.length-e-1))}updateHeight(e,t=0,i=!1,s){let r=t+this.length;if(s&&s.from<=t+this.length&&s.more){let o=[],l=Math.max(t,s.from),a=-1,h=e.heightChanged;for(s.from>t&&o.push(new ne(s.from-t-1).updateHeight(e,t));l<=r&&s.more;){let f=e.doc.lineAt(l).length;o.length&&o.push(null);let u=s.heights[s.index++];a==-1?a=u:Math.abs(u-a)>=Ui&&(a=-2);let d=new Se(f,u);d.outdated=!1,o.push(d),l+=f+1}l<=r&&o.push(null,new ne(r-l).updateHeight(e,l));let c=ge.of(o);return e.heightChanged=h||a<0||Math.abs(c.height-this.height)>=Ui||Math.abs(a-this.lines(e.doc,t).lineHeight)>=Ui,c}else(i||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class sf extends ge{constructor(e,t,i){super(e.length+t+i.length,e.height+i.height,t|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,t,i,s){let r=i+this.left.height;return el))return h;let c=t==H.ByPosNoHeight?H.ByPosNoHeight:H.ByPos;return a?h.join(this.right.lineAt(l,c,i,o,l)):this.left.lineAt(l,c,i,s,r).join(h)}forEachLine(e,t,i,s,r,o){let l=s+this.left.height,a=r+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,t,i,l,a,o);else{let h=this.lineAt(a,H.ByPos,i,s,r);e=e&&h.from<=t&&o(h),t>h.to&&this.right.forEachLine(h.to+1,t,i,l,a,o)}}replace(e,t,i){let s=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-s,t-s,i));let r=[];e>0&&this.decomposeLeft(e,r);let o=r.length;for(let l of i)r.push(l);if(e>0&&oo(r,o-1),t=i&&t.push(null)),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,s=i+this.break;if(e>=s)return this.right.decomposeRight(e-s,t);e2*t.size||t.size>2*e.size?ge.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,i=!1,s){let{left:r,right:o}=this,l=t+r.length+this.break,a=null;return s&&s.from<=t+r.length&&s.more?a=r=r.updateHeight(e,t,i,s):r.updateHeight(e,t,i),s&&s.from<=l+o.length&&s.more?a=o=o.updateHeight(e,l,i,s):o.updateHeight(e,l,i),a?this.balanced(r,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function oo(n,e){let t,i;n[e]==null&&(t=n[e-1])instanceof ne&&(i=n[e+1])instanceof ne&&n.splice(e-1,3,new ne(t.length+1+i.length))}const rf=5;class Zs{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let i=Math.min(t,this.lineEnd),s=this.nodes[this.nodes.length-1];s instanceof Se?s.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Se(i-this.pos,-1)),this.writtenTo=i,t>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e=rf)&&this.addLineDeco(s,r)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new Se(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let i=new ne(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Se)return e;let t=new Se(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine(),e.type==$.WidgetAfter&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,e.type!=$.WidgetBefore&&(this.covering=e)}addLineDeco(e,t){let i=this.ensureLine();i.length+=t,i.collapsed+=t,i.widgetHeight=Math.max(i.widgetHeight,e),this.writtenTo=this.pos=this.pos+t}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Se)&&!this.isCovered?this.nodes.push(new Se(0,-1)):(this.writtenToc.clientHeight||c.scrollWidth>c.clientWidth)&&f.overflow!="visible"){let u=c.getBoundingClientRect();r=Math.max(r,u.left),o=Math.min(o,u.right),l=Math.max(l,u.top),a=h==n.parentNode?u.bottom:Math.min(a,u.bottom)}h=f.position=="absolute"||f.position=="fixed"?c.offsetParent:c.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:r-t.left,right:Math.max(r,o)-t.left,top:l-(t.top+e),bottom:Math.max(l,a)-(t.top+e)}}function hf(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Hn{constructor(e,t,i){this.from=e,this.to=t,this.size=i}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new tf(t),this.stateDeco=e.facet(ci).filter(i=>typeof i!="function"),this.heightMap=ge.empty().applyChanges(this.stateDeco,I.empty,this.heightOracle.setDoc(e.doc),[new je(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=T.set(this.lineGaps.map(i=>i.draw(!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let s=i?t.head:t.anchor;if(!e.some(({from:r,to:o})=>s>=r&&s<=o)){let{from:r,to:o}=this.lineBlockAt(s);e.push(new Oi(r,o))}}this.viewports=e.sort((i,s)=>i.from-s.from),this.scaler=this.heightMap.height<=7e6?ao:new df(this.heightOracle.doc,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.state.doc,0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:ei(e,this.scaler))})}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(ci).filter(h=>typeof h!="function");let s=e.changedRanges,r=je.extendWithRanges(s,of(i,this.stateDeco,e?e.changes:Q.empty(this.state.doc.length))),o=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),r),this.heightMap.height!=o&&(e.flags|=2);let l=r.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,t));let a=!e.changes.empty||e.flags&2||l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,this.updateForViewport(),a&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(ql)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,i=window.getComputedStyle(t),s=this.heightOracle,r=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?J.RTL:J.LTR;let o=this.heightOracle.mustRefreshForWrapping(r),l=o||this.mustMeasureContent||this.contentDOMHeight!=t.clientHeight;this.contentDOMHeight=t.clientHeight,this.mustMeasureContent=!1;let a=0,h=0,c=parseInt(i.paddingTop)||0,f=parseInt(i.paddingBottom)||0;(this.paddingTop!=c||this.paddingBottom!=f)&&(this.paddingTop=c,this.paddingBottom=f,a|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(s.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,a|=8);let u=(this.printing?hf:af)(t,this.paddingTop),d=u.top-this.pixelViewport.top,p=u.bottom-this.pixelViewport.bottom;this.pixelViewport=u;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;let m=t.clientWidth;if((this.contentDOMWidth!=m||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=m,this.editorHeight=e.scrollDOM.clientHeight,a|=8),l){let S=e.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(S)&&(o=!0),o||s.lineWrapping&&Math.abs(m-this.contentDOMWidth)>s.charWidth){let{lineHeight:M,charWidth:v}=e.docView.measureTextSize();o=M>0&&s.refresh(r,M,v,m/v,S),o&&(e.docView.minWidth=0,a|=8)}d>0&&p>0?h=Math.max(d,p):d<0&&p<0&&(h=Math.min(d,p)),s.heightChanged=!1;for(let M of this.viewports){let v=M.from==this.viewport.from?S:e.docView.measureVisibleLineHeights(M);this.heightMap=(o?ge.empty().applyChanges(this.stateDeco,I.empty,this.heightOracle,[new je(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(s,0,o,new nf(M.from,v))}s.heightChanged&&(a|=2)}let y=!this.viewportIsAppropriate(this.viewport,h)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return y&&(this.viewport=this.getViewport(h,this.scrollTarget)),this.updateForViewport(),(a&2||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),a|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),a}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),s=this.heightMap,r=this.state.doc,{visibleTop:o,visibleBottom:l}=this,a=new Oi(s.lineAt(o-i*1e3,H.ByHeight,r,0,0).from,s.lineAt(l+(1-i)*1e3,H.ByHeight,r,0,0).to);if(t){let{head:h}=t.range;if(ha.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=s.lineAt(h,H.ByPos,r,0,0),u;t.y=="center"?u=(f.top+f.bottom)/2-c/2:t.y=="start"||t.y=="nearest"&&h=l+Math.max(10,Math.min(i,250)))&&s>o-2*1e3&&r>1,o=s<<1;if(this.defaultTextDirection!=J.LTR&&!i)return[];let l=[],a=(h,c,f,u)=>{if(c-hh&&mm.from>=f.from&&m.to<=f.to&&Math.abs(m.from-h)m.fromy));if(!g){if(cm.from<=c&&m.to>=c)){let m=t.moveToLineBoundary(b.cursor(c),!1,!0).head;m>h&&(c=m)}g=new Hn(h,c,this.gapSize(f,h,c,u))}l.push(g)};for(let h of this.viewportLines){if(h.lengthh.from&&a(h.from,u,h,c),dt.draw(this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];j.spans(e,this.viewport.from,this.viewport.to,{span(s,r){t.push({from:s,to:r})},point(){}},20);let i=t.length!=this.visibleRanges.length||this.visibleRanges.some((s,r)=>s.from!=t[r].from||s.to!=t[r].to);return this.visibleRanges=t,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||ei(this.heightMap.lineAt(e,H.ByPos,this.state.doc,0,0),this.scaler)}lineBlockAtHeight(e){return ei(this.heightMap.lineAt(this.scaler.fromDOM(e),H.ByHeight,this.state.doc,0,0),this.scaler)}elementAtHeight(e){return ei(this.heightMap.blockAt(this.scaler.fromDOM(e),this.state.doc,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Oi{constructor(e,t){this.from=e,this.to=t}}function ff(n,e,t){let i=[],s=n,r=0;return j.spans(t,n,e,{span(){},point(o,l){o>s&&(i.push({from:s,to:o}),r+=o-s),s=l}},20),s=1)return e[e.length-1].to;let i=Math.floor(n*t);for(let s=0;;s++){let{from:r,to:o}=e[s],l=o-r;if(i<=l)return r+i;i-=l}}function Bi(n,e){let t=0;for(let{from:i,to:s}of n.ranges){if(e<=s){t+=e-i;break}t+=s-i}return t/n.total}function uf(n,e){for(let t of n)if(e(t))return t}const ao={toDOM(n){return n},fromDOM(n){return n},scale:1};class df{constructor(e,t,i){let s=0,r=0,o=0;this.viewports=i.map(({from:l,to:a})=>{let h=t.lineAt(l,H.ByPos,e,0,0).top,c=t.lineAt(a,H.ByPos,e,0,0).bottom;return s+=c-h,{from:l,to:a,top:h,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(t.height-s);for(let l of this.viewports)l.domTop=o+(l.top-r)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),r=l.bottom}toDOM(e){for(let t=0,i=0,s=0;;t++){let r=tei(s,e)):n.type)}const Pi=D.define({combine:n=>n.join(" ")}),Ms=D.define({combine:n=>n.indexOf(!0)>-1}),Ds=ot.newName(),la=ot.newName(),aa=ot.newName(),ha={"&light":"."+la,"&dark":"."+aa};function Os(n,e,t){return new ot(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,s=>{if(s=="&")return n;if(!t||!t[s])throw new RangeError(`Unsupported selector: ${s}`);return t[s]}):n+" "+i}})}const pf=Os("."+Ds,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},"&.cm-focused .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},ha);class gf{constructor(e,t,i,s){this.typeOver=s,this.bounds=null,this.text="";let{impreciseHead:r,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,i,0))){let l=r||o?[]:yf(e),a=new _l(l,e.state);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=bf(l,this.bounds.from)}else{let l=e.observer.selectionRange,a=r&&r.node==l.focusNode&&r.offset==l.focusOffset||!Nt(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),h=o&&o.node==l.anchorNode&&o.offset==l.anchorOffset||!Nt(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset);this.newSel=b.single(h,a)}}}function ca(n,e){let t,{newSel:i}=e,s=n.state.selection.main;if(e.bounds){let{from:r,to:o}=e.bounds,l=s.from,a=null;(n.inputState.lastKeyCode===8&&n.inputState.lastKeyTime>Date.now()-100||A.android&&e.text.length=s.from&&t.to<=s.to&&(t.from!=s.from||t.to!=s.to)&&s.to-s.from-(t.to-t.from)<=4?t={from:s.from,to:s.to,insert:n.state.doc.slice(s.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,s.to))}:(A.mac||A.android)&&t&&t.from==t.to&&t.from==s.head-1&&/^\. ?$/.test(t.insert.toString())?(i&&t.insert.length==2&&(i=b.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:I.of([" "])}):A.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==` - `&&n.lineWrapping&&(i&&(i=b.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:I.of([" "])}),t){let r=n.state;if(A.ios&&n.inputState.flushIOSKey(n)||A.android&&(t.from==s.from&&t.to==s.to&&t.insert.length==1&&t.insert.lines==2&&Lt(n.contentDOM,"Enter",13)||t.from==s.from-1&&t.to==s.to&&t.insert.length==0&&Lt(n.contentDOM,"Backspace",8)||t.from==s.from&&t.to==s.to+1&&t.insert.length==0&&Lt(n.contentDOM,"Delete",46)))return!0;let o=t.insert.toString();if(n.state.facet(Hl).some(h=>h(n,t.from,t.to,o)))return!0;n.inputState.composing>=0&&n.inputState.composing++;let l;if(t.from>=s.from&&t.to<=s.to&&t.to-t.from>=(s.to-s.from)/3&&(!i||i.main.empty&&i.main.from==t.from+t.insert.length)&&n.inputState.composing<0){let h=s.fromt.to?r.sliceDoc(t.to,s.to):"";l=r.replaceSelection(n.state.toText(h+t.insert.sliceString(0,void 0,n.state.lineBreak)+c))}else{let h=r.changes(t),c=i&&!r.selection.main.eq(i.main)&&i.main.to<=h.newLength?i.main:void 0;if(r.selection.ranges.length>1&&n.inputState.composing>=0&&t.to<=s.to&&t.to>=s.to-10){let f=n.state.sliceDoc(t.from,t.to),u=Xl(n)||n.state.doc.lineAt(s.head),d=s.to-t.to,p=s.to-s.from;l=r.changeByRange(g=>{if(g.from==s.from&&g.to==s.to)return{changes:h,range:c||g.map(h)};let m=g.to-d,y=m-f.length;if(g.to-g.from!=p||n.state.sliceDoc(y,m)!=f||u&&g.to>=u.from&&g.from<=u.to)return{range:g};let S=r.changes({from:y,to:m,insert:t.insert}),M=g.to-s.to;return{changes:S,range:c?b.range(Math.max(0,c.anchor+M),Math.max(0,c.head+M)):g.map(S)}})}else l={changes:h,selection:c&&r.selection.replaceRange(c)}}let a="input.type";return n.composing&&(a+=".compose",n.inputState.compositionFirstChange&&(a+=".start",n.inputState.compositionFirstChange=!1)),n.dispatch(l,{scrollIntoView:!0,userEvent:a}),!0}else if(i&&!i.main.eq(s)){let r=!1,o="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(r=!0),o=n.inputState.lastSelectionOrigin),n.dispatch({selection:i,scrollIntoView:r,userEvent:o}),!0}else return!1}function mf(n,e,t,i){let s=Math.min(n.length,e.length),r=0;for(;r0&&l>0&&n.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(i=="end"){let a=Math.max(0,r-Math.min(o,l));t-=o+a-r}if(o=o?r-t:0;r-=a,l=r+(l-o),o=r}else if(l=l?r-t:0;r-=a,o=r+(o-l),l=r}return{from:r,toA:o,toB:l}}function yf(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:s,focusOffset:r}=n.observer.selectionRange;return t&&(e.push(new $r(t,i)),(s!=t||r!=i)&&e.push(new $r(s,r))),e}function bf(n,e){if(n.length==0)return null;let t=n[0].pos,i=n.length==2?n[1].pos:t;return t>-1&&i>-1?b.single(t+e,i+e):null}const wf={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},zn=A.ie&&A.ie_version<=11;class xf{constructor(e){this.view=e,this.active=!1,this.selectionRange=new uc,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let i of t)this.queue.push(i);(A.ie&&A.ie_version<=11||A.ios&&e.composing)&&t.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),zn&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)this.view.requestMeasure()),this.resizeContent.observe(e.contentDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runScrollHandlers(this.view,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,i)=>t!=e[i]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,s=this.selectionRange;if(i.state.facet(Cn)?i.root.activeElement!=this.dom:!ji(i.dom,s))return;let r=s.anchorNode&&i.docView.nearest(s.anchorNode);if(r&&r.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(A.ie&&A.ie_version<=11||A.android&&A.chrome)&&!i.state.selection.main.empty&&s.focusNode&&Zi(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=A.safari&&e.root.nodeType==11&&ac(this.dom.ownerDocument)==this.dom&&kf(this.view)||Qi(e.root);if(!t||this.selectionRange.eq(t))return!1;let i=ji(this.dom,t);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let r=this.delayedAndroidKey;r&&(this.clearDelayedAndroidKey(),!this.flush()&&r.force&&Lt(this.dom,r.key,r.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(s)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}processRecords(){let e=this.queue;for(let r of this.observer.takeRecords())e.push(r);e.length&&(this.queue=[]);let t=-1,i=-1,s=!1;for(let r of e){let o=this.readMutation(r);o&&(o.typeOver&&(s=!0),t==-1?{from:t,to:i}=o:(t=Math.min(o.from,t),i=Math.max(o.to,i)))}return{from:t,to:i,typeOver:s}}readChange(){let{from:e,to:t,typeOver:i}=this.processRecords(),s=this.selectionChanged&&ji(this.dom,this.selectionRange);return e<0&&!s?null:(e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new gf(this.view,e,t,i))}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return!1;let i=this.view.state,s=ca(this.view,t);return this.view.state==i&&this.view.update([]),s}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.dirty|=4),e.type=="childList"){let i=ho(t,e.previousSibling||e.target.previousSibling,-1),s=ho(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:s?t.posBefore(s):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,i,s;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect(),(s=this.resizeContent)===null||s===void 0||s.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function ho(n,e,t){for(;e;){let i=z.get(e);if(i&&i.parent==n)return i;let s=e.parentNode;e=s!=n.dom?s:t>0?e.nextSibling:e.previousSibling}return null}function kf(n){let e=null;function t(a){a.preventDefault(),a.stopImmediatePropagation(),e=a.getTargetRanges()[0]}if(n.contentDOM.addEventListener("beforeinput",t,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",t,!0),!e)return null;let i=e.startContainer,s=e.startOffset,r=e.endContainer,o=e.endOffset,l=n.docView.domAtPos(n.state.selection.main.anchor);return Zi(l.node,l.offset,r,o)&&([i,s,r,o]=[r,o,i,s]),{anchorNode:i,anchorOffset:s,focusNode:r,focusOffset:o}}class O{constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=e.dispatch||(t=>this.update([t])),this.dispatch=this.dispatch.bind(this),this._root=e.root||dc(e.parent)||document,this.viewState=new lo(e.state||N.create(e)),this.plugins=this.state.facet(Qt).map(t=>new Vn(t));for(let t of this.plugins)t.update(this);this.observer=new xf(this),this.inputState=new qc(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new Kr(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}dispatch(...e){this._dispatch(e.length==1&&e[0]instanceof Z?e[0]:this.state.update(...e))}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,i=!1,s,r=this.state;for(let h of e){if(h.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=h.state}if(this.destroyed){this.viewState.state=r;return}let o=this.observer.delayedAndroidKey,l=null;if(o?(this.observer.clearDelayedAndroidKey(),l=this.observer.readChange(),(l&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(l=null)):this.observer.clear(),r.facet(N.phrases)!=this.state.facet(N.phrases))return this.setState(r);s=nn.create(this,r,e);let a=this.viewState.scrollTarget;try{this.updateState=2;for(let h of e){if(a&&(a=a.map(h.changes)),h.scrollIntoView){let{main:c}=h.state.selection;a=new tn(c.empty?c:b.cursor(c.head,c.head>c.anchor?-1:1))}for(let c of h.effects)c.is(zr)&&(a=c.value)}this.viewState.update(s,a),this.bidiCache=sn.update(this.bidiCache,s.changes),s.empty||(this.updatePlugins(s),this.inputState.update(s)),t=this.docView.update(s),this.state.facet(Zt)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(h=>h.isUserEvent("select.pointer")))}finally{this.updateState=0}if(s.startState.facet(Pi)!=s.state.facet(Pi)&&(this.viewState.mustMeasureContent=!0),(t||i||a||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!s.empty)for(let h of this.state.facet(xs))h(s);l&&!ca(this,l)&&o.force&&Lt(this.contentDOM,o.key,o.keyCode)}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new lo(e),this.plugins=e.facet(Qt).map(i=>new Vn(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView=new Kr(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Qt),i=e.state.facet(Qt);if(t!=i){let s=[];for(let r of i){let o=t.indexOf(r);if(o<0)s.push(new Vn(r));else{let l=this.plugins[o];l.mustUpdate=e,s.push(l)}}for(let r of this.plugins)r.mustUpdate!=e&&r.destroy(this);this.plugins=s,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else for(let s of this.plugins)s.mustUpdate=e;for(let s=0;s-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,{scrollHeight:i,scrollTop:s,clientHeight:r}=this.scrollDOM,o=s>i-r-4?i:s;try{for(let l=0;;l++){this.updateState=1;let a=this.viewport,h=this.viewState.lineBlockAtHeight(o),c=this.viewState.measure(this);if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let f=[];c&4||([this.measureRequests,f]=[f,this.measureRequests]);let u=f.map(m=>{try{return m.read(this)}catch(y){return Le(this.state,y),co}}),d=nn.create(this,this.state,[]),p=!1,g=!1;d.flags|=c,t?t.flags|=c:t=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),p=this.docView.update(d));for(let m=0;m1||m<-1)&&(this.scrollDOM.scrollTop+=m,g=!0)}if(p&&this.docView.updateSelection(!0),this.viewport.from==a.from&&this.viewport.to==a.to&&!g&&this.measureRequests.length==0)break}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let l of this.state.facet(xs))l(t)}get themeClasses(){return Ds+" "+(this.state.facet(Ms)?aa:la)+" "+this.state.facet(Pi)}updateAttrs(){let e=fo(this,$l,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Cn)?"true":"false",class:"cm-content",style:`${A.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),fo(this,Qs,t);let i=this.observer.ignore(()=>{let s=bs(this.contentDOM,this.contentAttrs,t),r=bs(this.dom,this.editorAttrs,e);return s||r});return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let s of i.effects)if(s.is(O.announce)){t&&(this.announceDOM.textContent=""),t=!1;let r=this.announceDOM.appendChild(document.createElement("div"));r.textContent=s.value}}mountStyles(){this.styleModules=this.state.facet(Zt),ot.mount(this.root,this.styleModules.concat(pf).reverse())}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;ti.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,i){return Wn(this,e,Xr(this,e,t,i))}moveByGroup(e,t){return Wn(this,e,Xr(this,e,t,i=>Hc(this,e.head,i)))}moveToLineBoundary(e,t,i=!0){return Wc(this,e,t,i)}moveVertically(e,t,i){return Wn(this,e,zc(this,e,t,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),Ql(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let i=this.docView.coordsAt(e,t);if(!i||i.left==i.right)return i;let s=this.state.doc.lineAt(e),r=this.bidiSpans(s),o=r[Et.find(r,e-s.from,-1,t)];return Js(i,o.dir==J.LTR==t>0)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(zl)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>vf)return Gl(e.length);let t=this.textDirectionAt(e.from);for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t)return s.order;let i=Ac(e.text,t);return this.bidiCache.push(new sn(e.from,e.to,t,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||A.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Sl(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return zr.of(new tn(typeof e=="number"?b.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}static domEventHandlers(e){return me.define(()=>({}),{eventHandlers:e})}static theme(e,t){let i=ot.newName(),s=[Pi.of(i),Zt.of(Os(`.${i}`,e))];return t&&t.dark&&s.push(Ms.of(!0)),s}static baseTheme(e){return St.lowest(Zt.of(Os("."+Ds,e,ha)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),s=i&&z.get(i)||z.get(e);return((t=s==null?void 0:s.rootView)===null||t===void 0?void 0:t.view)||null}}O.styleModule=Zt;O.inputHandler=Hl;O.perLineTextDirection=zl;O.exceptionSink=Wl;O.updateListener=xs;O.editable=Cn;O.mouseSelectionStyle=Fl;O.dragMovesSelection=Vl;O.clickAddsSelectionRange=Nl;O.decorations=ci;O.atomicRanges=Kl;O.scrollMargins=jl;O.darkTheme=Ms;O.contentAttributes=Qs;O.editorAttributes=$l;O.lineWrapping=O.contentAttributes.of({class:"cm-lineWrapping"});O.announce=E.define();const vf=4096,co={};class sn{constructor(e,t,i,s){this.from=e,this.to=t,this.dir=i,this.order=s}static update(e,t){if(t.empty)return e;let i=[],s=e.length?e[e.length-1].dir:J.LTR;for(let r=Math.max(0,e.length-10);r=0;s--){let r=i[s],o=typeof r=="function"?r(n):r;o&&ys(o,t)}return t}const Sf=A.mac?"mac":A.windows?"win":A.linux?"linux":"key";function Cf(n,e){const t=n.split(/-(?!$)/);let i=t[t.length-1];i=="Space"&&(i=" ");let s,r,o,l;for(let a=0;ai.concat(s),[]))),t}function Mf(n,e,t){return ua(fa(n.state),e,n,t)}let Ze=null;const Df=4e3;function Of(n,e=Sf){let t=Object.create(null),i=Object.create(null),s=(o,l)=>{let a=i[o];if(a==null)i[o]=l;else if(a!=l)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},r=(o,l,a,h)=>{var c,f;let u=t[o]||(t[o]=Object.create(null)),d=l.split(/ (?!$)/).map(m=>Cf(m,e));for(let m=1;m{let M=Ze={view:S,prefix:y,scope:o};return setTimeout(()=>{Ze==M&&(Ze=null)},Df),!0}]})}let p=d.join(" ");s(p,!1);let g=u[p]||(u[p]={preventDefault:!1,run:((f=(c=u._any)===null||c===void 0?void 0:c.run)===null||f===void 0?void 0:f.slice())||[]});a&&g.run.push(a),h&&(g.preventDefault=!0)};for(let o of n){let l=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let h of l){let c=t[h]||(t[h]=Object.create(null));c._any||(c._any={preventDefault:!1,run:[]});for(let f in c)c[f].run.push(o.any)}let a=o[e]||o.key;if(a)for(let h of l)r(h,a,o.run,o.preventDefault),o.shift&&r(h,"Shift-"+a,o.shift,o.preventDefault)}return t}function ua(n,e,t,i){let s=lc(e),r=se(s,0),o=Ce(r)==s.length&&s!=" ",l="",a=!1;Ze&&Ze.view==t&&Ze.scope==i&&(l=Ze.prefix+" ",(a=ea.indexOf(e.keyCode)<0)&&(Ze=null));let h=new Set,c=p=>{if(p){for(let g of p.run)if(!h.has(g)&&(h.add(g),g(t,e)))return!0;p.preventDefault&&(a=!0)}return!1},f=n[i],u,d;if(f){if(c(f[l+Ri(s,e,!o)]))return!0;if(o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(A.windows&&e.ctrlKey&&e.altKey)&&(u=lt[e.keyCode])&&u!=s){if(c(f[l+Ri(u,e,!0)]))return!0;if(e.shiftKey&&(d=li[e.keyCode])!=s&&d!=u&&c(f[l+Ri(d,e,!1)]))return!0}else if(o&&e.shiftKey&&c(f[l+Ri(s,e,!0)]))return!0;if(c(f._any))return!0}return a}class wi{constructor(e,t,i,s,r){this.className=e,this.left=t,this.top=i,this.width=s,this.height=r}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,i){if(i.empty){let s=e.coordsAtPos(i.head,i.assoc||1);if(!s)return[];let r=da(e);return[new wi(t,s.left-r.left,s.top-r.top,null,s.bottom-s.top)]}else return Tf(e,t,i)}}function da(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==J.LTR?e.left:e.right-n.scrollDOM.clientWidth)-n.scrollDOM.scrollLeft,top:e.top-n.scrollDOM.scrollTop}}function po(n,e,t){let i=b.cursor(e);return{from:Math.max(t.from,n.moveToLineBoundary(i,!1,!0).from),to:Math.min(t.to,n.moveToLineBoundary(i,!0,!0).from),type:$.Text}}function go(n,e){let t=n.lineBlockAt(e);if(Array.isArray(t.type)){for(let i of t.type)if(i.to>e||i.to==e&&(i.to==t.to||i.type==$.Text))return i}return t}function Tf(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let i=Math.max(t.from,n.viewport.from),s=Math.min(t.to,n.viewport.to),r=n.textDirection==J.LTR,o=n.contentDOM,l=o.getBoundingClientRect(),a=da(n),h=window.getComputedStyle(o.firstChild),c=l.left+parseInt(h.paddingLeft)+Math.min(0,parseInt(h.textIndent)),f=l.right-parseInt(h.paddingRight),u=go(n,i),d=go(n,s),p=u.type==$.Text?u:null,g=d.type==$.Text?d:null;if(n.lineWrapping&&(p&&(p=po(n,i,p)),g&&(g=po(n,s,g))),p&&g&&p.from==g.from)return y(S(t.from,t.to,p));{let v=p?S(t.from,null,p):M(u,!1),k=g?S(null,t.to,g):M(d,!0),C=[];return(p||u).to<(g||d).from-1?C.push(m(c,v.bottom,f,k.top)):v.bottomV&&Y.from=ue)break;_>fe&&R(Math.max(ie,fe),v==null&&ie<=V,Math.min(_,ue),k==null&&_>=X,Xe.dir)}if(fe=te.to+1,fe>=ue)break}return L.length==0&&R(V,v==null,X,k==null,n.textDirection),{top:B,bottom:F,horizontal:L}}function M(v,k){let C=l.top+(k?v.top:v.bottom);return{top:C,bottom:C,horizontal:[]}}}function Bf(n,e){return n.constructor==e.constructor&&n.eq(e)}class Pf{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Gi)!=e.state.facet(Gi)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&e.view.requestMeasure(this.measureReq)}setOrder(e){let t=0,i=e.facet(Gi);for(;t!Bf(t,this.drawn[i]))){let t=this.dom.firstChild,i=0;for(let s of e)s.update&&t&&s.constructor&&this.drawn[i].constructor&&s.update(t,this.drawn[i])?(t=t.nextSibling,i++):this.dom.insertBefore(s.draw(),t);for(;t;){let s=t.nextSibling;t.remove(),t=s}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Gi=D.define();function pa(n){return[me.define(e=>new Pf(e,n)),Gi.of(n)]}const ga=!A.ios,fi=D.define({combine(n){return Ct(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function vg(n={}){return[fi.of(n),Rf,Lf,Ef,ql.of(!0)]}function ma(n){return n.startState.facet(fi)!=n.state.facet(fi)}const Rf=pa({above:!0,markers(n){let{state:e}=n,t=e.facet(fi),i=[];for(let s of e.selection.ranges){let r=s==e.selection.main;if(s.empty?!r||ga:t.drawRangeCursor){let o=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=s.empty?s:b.cursor(s.head,s.head>s.anchor?-1:1);for(let a of wi.forRange(n,o,l))i.push(a)}}return i},update(n,e){n.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=ma(n);return t&&mo(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){mo(e.state,n)},class:"cm-cursorLayer"});function mo(n,e){e.style.animationDuration=n.facet(fi).cursorBlinkRate+"ms"}const Lf=pa({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:wi.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||ma(n)},class:"cm-selectionLayer"}),ya={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};ga&&(ya[".cm-line"].caretColor="transparent !important");const Ef=St.highest(O.theme(ya)),ba=E.define({map(n,e){return n==null?null:e.mapPos(n)}}),ti=we.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,i)=>i.is(ba)?i.value:t,n)}}),If=me.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field(ti);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(ti)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let n=this.view.state.field(ti),e=n!=null&&this.view.coordsAtPos(n);if(!e)return null;let t=this.view.scrollDOM.getBoundingClientRect();return{left:e.left-t.left+this.view.scrollDOM.scrollLeft,top:e.top-t.top+this.view.scrollDOM.scrollTop,height:e.bottom-e.top}}drawCursor(n){this.cursor&&(n?(this.cursor.style.left=n.left+"px",this.cursor.style.top=n.top+"px",this.cursor.style.height=n.height+"px"):this.cursor.style.left="-100000px")}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field(ti)!=n&&this.view.dispatch({effects:ba.of(n)})}},{eventHandlers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Sg(){return[ti,If]}function yo(n,e,t,i,s){e.lastIndex=0;for(let r=n.iterRange(t,i),o=t,l;!r.next().done;o+=r.value.length)if(!r.lineBreak)for(;l=e.exec(r.value);)s(o+l.index,l)}function Nf(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let i=[];for(let{from:s,to:r}of t)s=Math.max(n.state.doc.lineAt(s).from,s-e),r=Math.min(n.state.doc.lineAt(r).to,r+e),i.length&&i[i.length-1].to>=s?i[i.length-1].to=r:i.push({from:s,to:r});return i}class Vf{constructor(e){const{regexp:t,decoration:i,decorate:s,boundary:r,maxLength:o=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,s)this.addMatch=(l,a,h,c)=>s(c,h,h+l[0].length,l,a);else if(typeof i=="function")this.addMatch=(l,a,h,c)=>{let f=i(l,a,h);f&&c(h,h+l[0].length,f)};else if(i)this.addMatch=(l,a,h,c)=>c(h,h+l[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=r,this.maxLength=o}createDeco(e){let t=new wt,i=t.add.bind(t);for(let{from:s,to:r}of Nf(e,this.maxLength))yo(e.state.doc,this.regexp,s,r,(o,l)=>this.addMatch(l,e,o,i));return t.finish()}updateDeco(e,t){let i=1e9,s=-1;return e.docChanged&&e.changes.iterChanges((r,o,l,a)=>{a>e.view.viewport.from&&l1e3?this.createDeco(e.view):s>-1?this.updateRange(e.view,t.map(e.changes),i,s):t}updateRange(e,t,i,s){for(let r of e.visibleRanges){let o=Math.max(r.from,i),l=Math.min(r.to,s);if(l>o){let a=e.state.doc.lineAt(o),h=a.toa.from;o--)if(this.boundary.test(a.text[o-1-a.from])){c=o;break}for(;lu.push(y.range(g,m));if(a==h)for(this.regexp.lastIndex=c-a.from;(d=this.regexp.exec(a.text))&&d.indexthis.addMatch(m,e,g,p));t=t.update({filterFrom:c,filterTo:f,filter:(g,m)=>gf,add:u})}}return t}}const Ts=/x/.unicode!=null?"gu":"g",Ff=new RegExp(`[\0-\b ---Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,Ts),Wf={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let qn=null;function Hf(){var n;if(qn==null&&typeof document<"u"&&document.body){let e=document.body.style;qn=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return qn||!1}const Ji=D.define({combine(n){let e=Ct(n,{render:null,specialChars:Ff,addSpecialChars:null});return(e.replaceTabs=!Hf())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Ts)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Ts)),e}});function Cg(n={}){return[Ji.of(n),zf()]}let bo=null;function zf(){return bo||(bo=me.fromClass(class{constructor(n){this.view=n,this.decorations=T.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Ji)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new Vf({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:s}=t.state,r=se(e[0],0);if(r==9){let o=s.lineAt(i),l=t.state.tabSize,a=yi(o.text,l,i-o.from);return T.replace({widget:new jf((l-a%l)*this.view.defaultCharacterWidth)})}return this.decorationCache[r]||(this.decorationCache[r]=T.replace({widget:new Kf(n,r)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Ji);n.startState.facet(Ji)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const qf="•";function $f(n){return n>=32?qf:n==10?"␤":String.fromCharCode(9216+n)}class Kf extends ct{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=$f(this.code),i=e.state.phrase("Control character")+" "+(Wf[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,i,t);if(s)return s;let r=document.createElement("span");return r.textContent=t,r.title=i,r.setAttribute("aria-label",i),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class jf extends ct{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}class Uf extends ct{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}ignoreEvent(){return!1}}function Ag(n){return me.fromClass(class{constructor(e){this.view=e,this.placeholder=T.set([T.widget({widget:new Uf(n),side:1}).range(0)])}get decorations(){return this.view.state.doc.length?T.none:this.placeholder}},{decorations:e=>e.decorations})}const Bs=2e3;function Gf(n,e,t){let i=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>Bs||t.off>Bs||e.col<0||t.col<0){let o=Math.min(e.off,t.off),l=Math.max(e.off,t.off);for(let a=i;a<=s;a++){let h=n.doc.line(a);h.length<=l&&r.push(b.range(h.from+o,h.to+l))}}else{let o=Math.min(e.col,t.col),l=Math.max(e.col,t.col);for(let a=i;a<=s;a++){let h=n.doc.line(a),c=hs(h.text,o,n.tabSize,!0);if(c<0)r.push(b.cursor(h.to));else{let f=hs(h.text,l,n.tabSize);r.push(b.range(h.from+c,h.from+f))}}}return r}function Jf(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function wo(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=n.state.doc.lineAt(t),s=t-i.from,r=s>Bs?-1:s==i.length?Jf(n,e.clientX):yi(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:r,off:s}}function _f(n,e){let t=wo(n,e),i=n.state.selection;return t?{update(s){if(s.docChanged){let r=s.changes.mapPos(s.startState.doc.line(t.line).from),o=s.state.doc.lineAt(r);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},i=i.map(s.changes)}},get(s,r,o){let l=wo(n,s);if(!l)return i;let a=Gf(n.state,t,l);return a.length?o?b.create(a.concat(i.ranges)):b.create(a):i}}:null}function Mg(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return O.mouseSelectionStyle.of((t,i)=>e(i)?_f(t,i):null)}const Li="-10000px";class Xf{constructor(e,t,i){this.facet=t,this.createTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(s=>s),this.tooltipViews=this.tooltips.map(i)}update(e){var t;let i=e.state.facet(this.facet),s=i.filter(o=>o);if(i===this.input){for(let o of this.tooltipViews)o.update&&o.update(e);return!1}let r=[];for(let o=0;o{var e,t,i;return{position:A.ios?"absolute":((e=n.find(s=>s.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(s=>s.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((i=n.find(s=>s.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||Yf}}}),wa=me.fromClass(class{constructor(n){this.view=n,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet($n);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new Xf(n,xa,t=>this.createTooltip(t)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n);e&&this.observeIntersection();let t=e||n.geometryChanged,i=n.state.facet($n);if(i.position!=this.position){this.position=i.position;for(let s of this.manager.tooltipViews)s.dom.style.position=this.position;t=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let s of this.manager.tooltipViews)this.container.appendChild(s.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n){let e=n.create(this.view);if(e.dom.classList.add("cm-tooltip"),n.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",e.dom.appendChild(t)}return e.dom.style.position=this.position,e.dom.style.top=Li,this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var n,e;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),(n=t.destroy)===null||n===void 0||n.call(t);(e=this.intersectionObserver)===null||e===void 0||e.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=this.view.dom.getBoundingClientRect();return{editor:n,parent:this.parent?this.container.getBoundingClientRect():n,pos:this.manager.tooltips.map((e,t)=>{let i=this.manager.tooltipViews[t];return i.getCoords?i.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet($n).tooltipSpace(this.view)}}writeMeasure(n){let{editor:e,space:t}=n,i=[];for(let s=0;s=Math.min(e.bottom,t.bottom)||a.rightMath.min(e.right,t.right)+.1){l.style.top=Li;continue}let c=r.arrow?o.dom.querySelector(".cm-tooltip-arrow"):null,f=c?7:0,u=h.right-h.left,d=h.bottom-h.top,p=o.offset||Zf,g=this.view.textDirection==J.LTR,m=h.width>t.right-t.left?g?t.left:t.right-h.width:g?Math.min(a.left-(c?14:0)+p.x,t.right-u):Math.max(t.left,a.left-u+(c?14:0)-p.x),y=!!r.above;!r.strictSide&&(y?a.top-(h.bottom-h.top)-p.yt.bottom)&&y==t.bottom-a.bottom>a.top-t.top&&(y=!y);let S=(y?a.top-t.top:t.bottom-a.bottom)-f;if(Sm&&k.topM&&(M=y?k.top-d-2-f:k.bottom+f+2);this.position=="absolute"?(l.style.top=M-n.parent.top+"px",l.style.left=m-n.parent.left+"px"):(l.style.top=M+"px",l.style.left=m+"px"),c&&(c.style.left=`${a.left+(g?p.x:-p.x)-(m+14-7)}px`),o.overlap!==!0&&i.push({left:m,top:M,right:v,bottom:M+d}),l.classList.toggle("cm-tooltip-above",y),l.classList.toggle("cm-tooltip-below",!y),o.positioned&&o.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=Li}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),Qf=O.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:`${7}px`,width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:`${7}px solid transparent`,borderRight:`${7}px solid transparent`},".cm-tooltip-above &":{bottom:`-${7}px`,"&:before":{borderTop:`${7}px solid #bbb`},"&:after":{borderTop:`${7}px solid #f5f5f5`,bottom:"1px"}},".cm-tooltip-below &":{top:`-${7}px`,"&:before":{borderBottom:`${7}px solid #bbb`},"&:after":{borderBottom:`${7}px solid #f5f5f5`,top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Zf={x:0,y:0},xa=D.define({enables:[wa,Qf]});function eu(n,e){let t=n.plugin(wa);if(!t)return null;let i=t.manager.tooltips.indexOf(e);return i<0?null:t.manager.tooltipViews[i]}const xo=D.define({combine(n){let e,t;for(let i of n)e=e||i.topContainer,t=t||i.bottomContainer;return{topContainer:e,bottomContainer:t}}});function rn(n,e){let t=n.plugin(ka),i=t?t.specs.indexOf(e):-1;return i>-1?t.panels[i]:null}const ka=me.fromClass(class{constructor(n){this.input=n.state.facet(on),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(xo);this.top=new Ei(n,!0,e.topContainer),this.bottom=new Ei(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(xo);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Ei(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Ei(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(on);if(t!=this.input){let i=t.filter(a=>a),s=[],r=[],o=[],l=[];for(let a of i){let h=this.specs.indexOf(a),c;h<0?(c=a(n.view),l.push(c)):(c=this.panels[h],c.update&&c.update(n)),s.push(c),(c.top?r:o).push(c)}this.specs=i,this.panels=s,this.top.sync(r),this.bottom.sync(o);for(let a of l)a.dom.classList.add("cm-panel"),a.mount&&a.mount()}else for(let i of this.panels)i.update&&i.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>O.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class Ei{constructor(e,t,i){this.view=e,this.top=t,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=ko(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=ko(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function ko(n){let e=n.nextSibling;return n.remove(),e}const on=D.define({enables:ka});class kt extends bt{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}kt.prototype.elementClass="";kt.prototype.toDOM=void 0;kt.prototype.mapMode=ae.TrackBefore;kt.prototype.startSide=kt.prototype.endSide=-1;kt.prototype.point=!0;const tu=D.define(),iu=new class extends kt{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},nu=tu.compute(["selection"],n=>{let e=[],t=-1;for(let i of n.selection.ranges){let s=n.doc.lineAt(i.head).from;s>t&&(t=s,e.push(iu.range(s)))}return j.of(e)});function Dg(){return nu}const su=1024;let ru=0;class De{constructor(e,t){this.from=e,this.to=t}}class P{constructor(e={}){this.id=ru++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=ye.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}P.closedBy=new P({deserialize:n=>n.split(" ")});P.openedBy=new P({deserialize:n=>n.split(" ")});P.group=new P({deserialize:n=>n.split(" ")});P.contextHash=new P({perNode:!0});P.lookAhead=new P({perNode:!0});P.mounted=new P({perNode:!0});class ou{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}}const lu=Object.create(null);class ye{constructor(e,t,i,s=0){this.name=e,this.props=t,this.id=i,this.flags=s}static define(e){let t=e.props&&e.props.length?Object.create(null):lu,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),s=new ye(e.name||"",t,e.id,i);if(e.props){for(let r of e.props)if(Array.isArray(r)||(r=r(s)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[r[0].id]=r[1]}}return s}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(P.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let s of i.split(" "))t[s]=e[i];return i=>{for(let s=i.prop(P.group),r=-1;r<(s?s.length:0);r++){let o=t[r<0?i.name:s[r]];if(o)return o}}}}ye.none=new ye("",Object.create(null),0,8);class tr{constructor(e){this.types=e;for(let t=0;t=s&&(o.type.isAnonymous||t(o)!==!1)){if(o.firstChild())continue;l=!0}for(;l&&i&&!o.type.isAnonymous&&i(o),!o.nextSibling();){if(!o.parent())return;l=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:sr(ye.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,s)=>new W(this.type,t,i,s,this.propValues),e.makeTree||((t,i,s)=>new W(ye.none,t,i,s)))}static build(e){return hu(e)}}W.empty=new W(ye.none,[],[],0);class ir{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new ir(this.buffer,this.index)}}class At{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return ye.none}toString(){let e=[];for(let t=0;t0));a=o[a+3]);return l}slice(e,t,i){let s=this.buffer,r=new Uint16Array(t-e),o=0;for(let l=e,a=0;l=e&&te;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function Sa(n,e){let t=n.childBefore(e);for(;t;){let i=t.lastChild;if(!i||i.to!=t.to)break;i.type.isError&&i.from==i.to?(n=t,t=i.prevSibling):t=i}return n}function Wt(n,e,t,i){for(var s;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to0?l.length:-1;e!=h;e+=t){let c=l[e],f=a[e]+o.from;if(va(s,i,f,f+c.length)){if(c instanceof At){if(r&U.ExcludeBuffers)continue;let u=c.findChild(0,c.buffer.length,t,i-f,s);if(u>-1)return new ze(new au(o,c,e,f),null,u)}else if(r&U.IncludeAnonymous||!c.type.isAnonymous||nr(c)){let u;if(!(r&U.IgnoreMounts)&&c.props&&(u=c.prop(P.mounted))&&!u.overlay)return new Be(u.tree,f,e,o);let d=new Be(c,f,e,o);return r&U.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(t<0?c.children.length-1:0,t,i,s)}}}if(r&U.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let s;if(!(i&U.IgnoreOverlays)&&(s=this._tree.prop(P.mounted))&&s.overlay){let r=e-this.from;for(let{from:o,to:l}of s.overlay)if((t>0?o<=r:o=r:l>r))return new Be(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}cursor(e=0){return new ui(this,e)}get tree(){return this._tree}toTree(){return this._tree}resolve(e,t=0){return Wt(this,e,t,!1)}resolveInner(e,t=0){return Wt(this,e,t,!0)}enterUnfinishedNodesBefore(e){return Sa(this,e)}getChild(e,t=null,i=null){let s=ln(this,e,t,i);return s.length?s[0]:null}getChildren(e,t=null,i=null){return ln(this,e,t,i)}toString(){return this._tree.toString()}get node(){return this}matchContext(e){return an(this,e)}}function ln(n,e,t,i){let s=n.cursor(),r=[];if(!s.firstChild())return r;if(t!=null){for(;!s.type.is(t);)if(!s.nextSibling())return r}for(;;){if(i!=null&&s.type.is(i))return r;if(s.type.is(e)&&r.push(s.node),!s.nextSibling())return i==null?r:[]}}function an(n,e,t=e.length-1){for(let i=n.parent;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class au{constructor(e,t,i,s){this.parent=e,this.buffer=t,this.index=i,this.start=s}}class ze{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.context.start,i);return r<0?null:new ze(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&U.ExcludeBuffers)return null;let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new ze(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new ze(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new ze(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}cursor(e=0){return new ui(this,e)}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,s=this.index+4,r=i.buffer[this.index+3];if(r>s){let o=i.buffer[this.index+1];e.push(i.slice(s,r,o)),t.push(0)}return new W(this.type,e,t,this.to-this.from)}resolve(e,t=0){return Wt(this,e,t,!1)}resolveInner(e,t=0){return Wt(this,e,t,!0)}enterUnfinishedNodesBefore(e){return Sa(this,e)}toString(){return this.context.buffer.childString(this.index)}getChild(e,t=null,i=null){let s=ln(this,e,t,i);return s.length?s[0]:null}getChildren(e,t=null,i=null){return ln(this,e,t,i)}get node(){return this}matchContext(e){return an(this,e)}}class ui{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Be)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:s}=this.buffer;return this.type=t||s.set.types[s.buffer[e]],this.from=i+s.buffer[e+1],this.to=i+s.buffer[e+2],!0}yield(e){return e?e instanceof Be?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:s}=this.buffer,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.buffer.start,i);return r<0?!1:(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?i&U.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&U.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&U.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let s=i<0?0:this.stack[i]+4;if(this.index!=s)return this.yieldBuf(t.findChild(s,this.index,-1,0,4))}else{let s=t.buffer[this.index+3];if(s<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(s)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:s}=this;if(s){if(e>0){if(this.index-1)for(let r=t+e,o=e<0?-1:i._tree.children.length;r!=o;r+=e){let l=i._tree.children[r];if(this.mode&U.IncludeAnonymous||l instanceof At||!l.type.isAnonymous||nr(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==s){if(s==this.index)return o;t=o,i=r+1;break e}s=this.stack[--r]}}for(let s=i;s=0;r--){if(r<0)return an(this.node,e,s);let o=i[t.buffer[this.stack[r]]];if(!o.isAnonymous){if(e[s]&&e[s]!=o.name)return!1;s--}}return!0}}function nr(n){return n.children.some(e=>e instanceof At||!e.type.isAnonymous||nr(e))}function hu(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:s=su,reused:r=[],minRepeatType:o=i.types.length}=n,l=Array.isArray(t)?new ir(t,t.length):t,a=i.types,h=0,c=0;function f(v,k,C,B,F){let{id:L,start:R,end:V,size:X}=l,Y=c;for(;X<0;)if(l.next(),X==-1){let ie=r[L];C.push(ie),B.push(R-v);return}else if(X==-3){h=L;return}else if(X==-4){c=L;return}else throw new RangeError(`Unrecognized record size: ${X}`);let fe=a[L],ue,te,Xe=R-v;if(V-R<=s&&(te=g(l.pos-k,F))){let ie=new Uint16Array(te.size-te.skip),_=l.pos-te.size,Je=ie.length;for(;l.pos>_;)Je=m(te.start,ie,Je);ue=new At(ie,V-te.start,i),Xe=te.start-v}else{let ie=l.pos-X;l.next();let _=[],Je=[],ut=L>=o?L:-1,Mt=0,vi=V;for(;l.pos>ie;)ut>=0&&l.id==ut&&l.size>=0?(l.end<=vi-s&&(d(_,Je,R,Mt,l.end,vi,ut,Y),Mt=_.length,vi=l.end),l.next()):f(R,ie,_,Je,ut);if(ut>=0&&Mt>0&&Mt<_.length&&d(_,Je,R,Mt,R,vi,ut,Y),_.reverse(),Je.reverse(),ut>-1&&Mt>0){let vr=u(fe);ue=sr(fe,_,Je,0,_.length,0,V-R,vr,vr)}else ue=p(fe,_,Je,V-R,Y-V)}C.push(ue),B.push(Xe)}function u(v){return(k,C,B)=>{let F=0,L=k.length-1,R,V;if(L>=0&&(R=k[L])instanceof W){if(!L&&R.type==v&&R.length==B)return R;(V=R.prop(P.lookAhead))&&(F=C[L]+R.length+V)}return p(v,k,C,B,F)}}function d(v,k,C,B,F,L,R,V){let X=[],Y=[];for(;v.length>B;)X.push(v.pop()),Y.push(k.pop()+C-F);v.push(p(i.types[R],X,Y,L-F,V-L)),k.push(F-C)}function p(v,k,C,B,F=0,L){if(h){let R=[P.contextHash,h];L=L?[R].concat(L):[R]}if(F>25){let R=[P.lookAhead,F];L=L?[R].concat(L):[R]}return new W(v,k,C,B,L)}function g(v,k){let C=l.fork(),B=0,F=0,L=0,R=C.end-s,V={size:0,start:0,skip:0};e:for(let X=C.pos-v;C.pos>X;){let Y=C.size;if(C.id==k&&Y>=0){V.size=B,V.start=F,V.skip=L,L+=4,B+=4,C.next();continue}let fe=C.pos-Y;if(Y<0||fe=o?4:0,te=C.start;for(C.next();C.pos>fe;){if(C.size<0)if(C.size==-3)ue+=4;else break e;else C.id>=o&&(ue+=4);C.next()}F=te,B+=Y,L+=ue}return(k<0||B==v)&&(V.size=B,V.start=F,V.skip=L),V.size>4?V:void 0}function m(v,k,C){let{id:B,start:F,end:L,size:R}=l;if(l.next(),R>=0&&B4){let X=l.pos-(R-4);for(;l.pos>X;)C=m(v,k,C)}k[--C]=V,k[--C]=L-v,k[--C]=F-v,k[--C]=B}else R==-3?h=B:R==-4&&(c=B);return C}let y=[],S=[];for(;l.pos>0;)f(n.start||0,n.bufferStart||0,y,S,-1);let M=(e=n.length)!==null&&e!==void 0?e:y.length?S[0]+y[0].length:0;return new W(a[n.topID],y.reverse(),S.reverse(),M)}const So=new WeakMap;function _i(n,e){if(!n.isAnonymous||e instanceof At||e.type!=n)return 1;let t=So.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof W)){t=1;break}t+=_i(n,i)}So.set(e,t)}return t}function sr(n,e,t,i,s,r,o,l,a){let h=0;for(let p=i;p=c)break;C+=B}if(M==v+1){if(C>c){let B=p[v];d(B.children,B.positions,0,B.children.length,g[v]+S);continue}f.push(p[v])}else{let B=g[M-1]+p[M-1].length-k;f.push(sr(n,p,g,v,M,k,B,null,a))}u.push(k+S-r)}}return d(e,t,i,s,0),(l||a)(f,u,o)}class Og{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let s=this.map.get(e);s||this.map.set(e,s=new Map),s.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof ze?this.setBuffer(e.context.buffer,e.index,t):e instanceof Be&&this.map.set(e.tree,t)}get(e){return e instanceof ze?this.getBuffer(e.context.buffer,e.index):e instanceof Be?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class _e{constructor(e,t,i,s,r=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=s,this.open=(r?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let s=[new _e(0,e.length,e,0,!1,i)];for(let r of t)r.to>e.length&&s.push(r);return s}static applyChanges(e,t,i=128){if(!t.length)return e;let s=[],r=1,o=e.length?e[0]:null;for(let l=0,a=0,h=0;;l++){let c=l=i)for(;o&&o.from=u.from||f<=u.to||h){let d=Math.max(u.from,a)-h,p=Math.min(u.to,f)-h;u=d>=p?null:new _e(d,p,u.tree,u.offset+h,l>0,!!c)}if(u&&s.push(u),o.to>f)break;o=rnew De(s.from,s.to)):[new De(0,0)]:[new De(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let s=this.startParse(e,t,i);for(;;){let r=s.advance();if(r)return r}}}class cu{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function Tg(n){return(e,t,i,s)=>new uu(e,n,t,i,s)}class Co{constructor(e,t,i,s,r){this.parser=e,this.parse=t,this.overlay=i,this.target=s,this.ranges=r}}class fu{constructor(e,t,i,s,r,o,l){this.parser=e,this.predicate=t,this.mounts=i,this.index=s,this.start=r,this.target=o,this.prev=l,this.depth=0,this.ranges=[]}}const Ps=new P({perNode:!0});class uu{constructor(e,t,i,s,r){this.nest=t,this.input=i,this.fragments=s,this.ranges=r,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let s of this.inner)s.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new W(i.type,i.children,i.positions,i.length,i.propValues.concat([[Ps,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[P.mounted.id]=new ou(t,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;tc.frag.from<=s.from&&c.frag.to>=s.to&&c.mount.overlay);if(h)for(let c of h.mount.overlay){let f=c.from+h.pos,u=c.to+h.pos;f>=s.from&&u<=s.to&&!t.ranges.some(d=>d.fromf)&&t.ranges.push({from:f,to:u})}}l=!1}else if(i&&(o=du(i.ranges,s.from,s.to)))l=o!=2;else if(!s.type.isAnonymous&&s.fromnew De(f.from-s.from,f.to-s.from)):null,s.tree,c)),r.overlay?c.length&&(i={ranges:c,depth:0,prev:i}):l=!1}}else t&&(a=t.predicate(s))&&(a===!0&&(a=new De(s.from,s.to)),a.fromnew De(c.from-t.start,c.to-t.start)),t.target,h)),t=t.prev}i&&!--i.depth&&(i=i.prev)}}}}function du(n,e,t){for(let i of n){if(i.from>=t)break;if(i.to>e)return i.from<=e&&i.to>=t?2:1}return 0}function Ao(n,e,t,i,s,r){if(e=e.to);i++);let o=s.children[i],l=o.buffer;function a(h,c,f,u,d){let p=h;for(;l[p+2]+r<=e.from;)p=l[p+3];let g=[],m=[];Ao(o,h,p,g,m,u);let y=l[p+1],S=l[p+2],M=y+r==e.from&&S+r==e.to&&l[p]==e.type.id;return g.push(M?e.toTree():a(p+4,l[p+3],o.set.types[l[p]],y,S-y)),m.push(y-u),Ao(o,l[p+3],c,g,m,u),new W(f,g,m,d)}s.children[i]=a(0,l.length,ye.none,0,o.length);for(let h=0;h<=t;h++)n.childAfter(e.from)}class Mo{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(U.IncludeAnonymous|U.IgnoreMounts)}moveTo(e){let{cursor:t}=this,i=e-this.offset;for(;!this.done&&t.from=e&&t.enter(i,1,U.IgnoreOverlays|U.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof W)t=t.children[0];else break}return!1}}class gu{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(t=i.tree.prop(Ps))!==null&&t!==void 0?t:i.to,this.inner=new Mo(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(Ps))!==null&&e!==void 0?e:t.to,this.inner=new Mo(t.tree,-t.offset)}}findMounts(e,t){var i;let s=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let r=this.inner.cursor.node;r;r=r.parent){let o=(i=r.tree)===null||i===void 0?void 0:i.prop(P.mounted);if(o&&o.parser==t)for(let l=this.fragI;l=r.to)break;a.tree==this.curFrag.tree&&s.push({frag:a,pos:r.from-a.offset,mount:o})}}}return s}}function Do(n,e){let t=null,i=e;for(let s=1,r=0;s=l)break;a.to<=o||(t||(i=t=e.slice()),a.froml&&t.splice(r+1,0,new De(l,a.to))):a.to>l?t[r--]=new De(l,a.to):t.splice(r--,1))}}return i}function mu(n,e,t,i){let s=0,r=0,o=!1,l=!1,a=-1e9,h=[];for(;;){let c=s==n.length?1e9:o?n[s].to:n[s].from,f=r==e.length?1e9:l?e[r].to:e[r].from;if(o!=l){let u=Math.max(a,t),d=Math.min(c,f,i);unew De(u.from+i,u.to+i)),f=mu(e,c,a,h);for(let u=0,d=a;;u++){let p=u==f.length,g=p?h:f[u].from;if(g>d&&t.push(new _e(d,g,s.tree,-o,r.from>=d||r.openStart,r.to<=g||r.openEnd)),p)break;d=f[u].to}}else t.push(new _e(a,h,s.tree,-o,r.from>=o||r.openStart,r.to<=l||r.openEnd))}return t}let yu=0;class We{constructor(e,t,i){this.set=e,this.base=t,this.modified=i,this.id=yu++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let t=new We([],null,[]);if(t.set.push(t),e)for(let i of e.set)t.set.push(i);return t}static defineModifier(){let e=new hn;return t=>t.modified.indexOf(e)>-1?t:hn.get(t.base||t,t.modified.concat(e).sort((i,s)=>i.id-s.id))}}let bu=0;class hn{constructor(){this.instances=[],this.id=bu++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(l=>l.base==e&&wu(t,l.modified));if(i)return i;let s=[],r=new We(s,e,t);for(let l of t)l.instances.push(r);let o=xu(t);for(let l of e.set)if(!l.modified.length)for(let a of o)s.push(hn.get(l,a));return r}}function wu(n,e){return n.length==e.length&&n.every((t,i)=>t==e[i])}function xu(n){let e=[[]];for(let t=0;ti.length-t.length)}function ku(n){let e=Object.create(null);for(let t in n){let i=n[t];Array.isArray(i)||(i=[i]);for(let s of t.split(" "))if(s){let r=[],o=2,l=s;for(let f=0;;){if(l=="..."&&f>0&&f+3==s.length){o=1;break}let u=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!u)throw new RangeError("Invalid path: "+s);if(r.push(u[0]=="*"?"":u[0][0]=='"'?JSON.parse(u[0]):u[0]),f+=u[0].length,f==s.length)break;let d=s[f++];if(f==s.length&&d=="!"){o=0;break}if(d!="/")throw new RangeError("Invalid path: "+s);l=s.slice(f)}let a=r.length-1,h=r[a];if(!h)throw new RangeError("Invalid path: "+s);let c=new cn(i,o,a>0?r.slice(0,a):null);e[h]=c.sort(e[h])}}return Aa.add(e)}const Aa=new P;class cn{constructor(e,t,i,s){this.tags=e,this.mode=t,this.context=i,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let o=s;for(let l of r)for(let a of l.set){let h=t[a.id];if(h){o=o?o+" "+h:h;break}}return o},scope:i}}function vu(n,e){let t=null;for(let i of n){let s=i.style(e);s&&(t=t?t+" "+s:s)}return t}function Su(n,e,t,i=0,s=n.length){let r=new Cu(i,Array.isArray(e)?e:[e],t);r.highlightRange(n.cursor(),i,s,"",r.highlighters),r.flush(s)}class Cu{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,i,s,r){let{type:o,from:l,to:a}=e;if(l>=i||a<=t)return;o.isTop&&(r=this.highlighters.filter(d=>!d.scope||d.scope(o)));let h=s,c=Au(e)||cn.empty,f=vu(r,c.tags);if(f&&(h&&(h+=" "),h+=f,c.mode==1&&(s+=(s?" ":"")+f)),this.startSpan(e.from,h),c.opaque)return;let u=e.tree&&e.tree.prop(P.mounted);if(u&&u.overlay){let d=e.node.enter(u.overlay[0].from+l,1),p=this.highlighters.filter(m=>!m.scope||m.scope(u.tree.type)),g=e.firstChild();for(let m=0,y=l;;m++){let S=m=M||!e.nextSibling())););if(!S||M>i)break;y=S.to+l,y>t&&(this.highlightRange(d.cursor(),Math.max(t,S.from+l),Math.min(i,y),s,p),this.startSpan(y,h))}g&&e.parent()}else if(e.firstChild()){do if(!(e.to<=t)){if(e.from>=i)break;this.highlightRange(e,t,i,s,r),this.startSpan(Math.min(i,e.to),h)}while(e.nextSibling());e.parent()}}}function Au(n){let e=n.type.prop(Aa);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const w=We.define,Ni=w(),Ye=w(),To=w(Ye),Bo=w(Ye),Qe=w(),Vi=w(Qe),Kn=w(Qe),Fe=w(),dt=w(Fe),Ne=w(),Ve=w(),Rs=w(),_t=w(Rs),Fi=w(),x={comment:Ni,lineComment:w(Ni),blockComment:w(Ni),docComment:w(Ni),name:Ye,variableName:w(Ye),typeName:To,tagName:w(To),propertyName:Bo,attributeName:w(Bo),className:w(Ye),labelName:w(Ye),namespace:w(Ye),macroName:w(Ye),literal:Qe,string:Vi,docString:w(Vi),character:w(Vi),attributeValue:w(Vi),number:Kn,integer:w(Kn),float:w(Kn),bool:w(Qe),regexp:w(Qe),escape:w(Qe),color:w(Qe),url:w(Qe),keyword:Ne,self:w(Ne),null:w(Ne),atom:w(Ne),unit:w(Ne),modifier:w(Ne),operatorKeyword:w(Ne),controlKeyword:w(Ne),definitionKeyword:w(Ne),moduleKeyword:w(Ne),operator:Ve,derefOperator:w(Ve),arithmeticOperator:w(Ve),logicOperator:w(Ve),bitwiseOperator:w(Ve),compareOperator:w(Ve),updateOperator:w(Ve),definitionOperator:w(Ve),typeOperator:w(Ve),controlOperator:w(Ve),punctuation:Rs,separator:w(Rs),bracket:_t,angleBracket:w(_t),squareBracket:w(_t),paren:w(_t),brace:w(_t),content:Fe,heading:dt,heading1:w(dt),heading2:w(dt),heading3:w(dt),heading4:w(dt),heading5:w(dt),heading6:w(dt),contentSeparator:w(Fe),list:w(Fe),quote:w(Fe),emphasis:w(Fe),strong:w(Fe),link:w(Fe),monospace:w(Fe),strikethrough:w(Fe),inserted:w(),deleted:w(),changed:w(),invalid:w(),meta:Fi,documentMeta:w(Fi),annotation:w(Fi),processingInstruction:w(Fi),definition:We.defineModifier(),constant:We.defineModifier(),function:We.defineModifier(),standard:We.defineModifier(),local:We.defineModifier(),special:We.defineModifier()};Ma([{tag:x.link,class:"tok-link"},{tag:x.heading,class:"tok-heading"},{tag:x.emphasis,class:"tok-emphasis"},{tag:x.strong,class:"tok-strong"},{tag:x.keyword,class:"tok-keyword"},{tag:x.atom,class:"tok-atom"},{tag:x.bool,class:"tok-bool"},{tag:x.url,class:"tok-url"},{tag:x.labelName,class:"tok-labelName"},{tag:x.inserted,class:"tok-inserted"},{tag:x.deleted,class:"tok-deleted"},{tag:x.literal,class:"tok-literal"},{tag:x.string,class:"tok-string"},{tag:x.number,class:"tok-number"},{tag:[x.regexp,x.escape,x.special(x.string)],class:"tok-string2"},{tag:x.variableName,class:"tok-variableName"},{tag:x.local(x.variableName),class:"tok-variableName tok-local"},{tag:x.definition(x.variableName),class:"tok-variableName tok-definition"},{tag:x.special(x.variableName),class:"tok-variableName2"},{tag:x.definition(x.propertyName),class:"tok-propertyName tok-definition"},{tag:x.typeName,class:"tok-typeName"},{tag:x.namespace,class:"tok-namespace"},{tag:x.className,class:"tok-className"},{tag:x.macroName,class:"tok-macroName"},{tag:x.propertyName,class:"tok-propertyName"},{tag:x.operator,class:"tok-operator"},{tag:x.comment,class:"tok-comment"},{tag:x.meta,class:"tok-meta"},{tag:x.invalid,class:"tok-invalid"},{tag:x.punctuation,class:"tok-punctuation"}]);var jn;const Ht=new P;function Da(n){return D.define({combine:n?e=>e.concat(n):void 0})}class Oe{constructor(e,t,i=[],s=""){this.data=e,this.name=s,N.prototype.hasOwnProperty("tree")||Object.defineProperty(N.prototype,"tree",{get(){return be(this)}}),this.parser=t,this.extension=[$t.of(this),N.languageData.of((r,o,l)=>r.facet(Po(r,o,l)))].concat(i)}isActiveAt(e,t,i=-1){return Po(e,t,i)==this.data}findRegions(e){let t=e.facet($t);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],s=(r,o)=>{if(r.prop(Ht)==this.data){i.push({from:o,to:o+r.length});return}let l=r.prop(P.mounted);if(l){if(l.tree.prop(Ht)==this.data){if(l.overlay)for(let a of l.overlay)i.push({from:a.from+o,to:a.to+o});else i.push({from:o,to:o+r.length});return}else if(l.overlay){let a=i.length;if(s(l.tree,l.overlay[0].from+o),i.length>a)return}}for(let a=0;ai.isTop?t:void 0)]}),e.name)}configure(e,t){return new Ls(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function be(n){let e=n.field(Oe.state,!1);return e?e.tree:W.empty}class Mu{constructor(e,t=e.length){this.doc=e,this.length=t,this.cursorPos=0,this.string="",this.cursor=e.iter()}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}}let Xt=null;class zt{constructor(e,t,i=[],s,r,o,l,a){this.parser=e,this.state=t,this.fragments=i,this.tree=s,this.treeLen=r,this.viewport=o,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new zt(e,t,[],W.empty,0,i,[],null)}startParse(){return this.parser.startParse(new Mu(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=W.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let s=Date.now()+e;e=()=>Date.now()>s}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(_e.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Xt;Xt=this;try{return e()}finally{Xt=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Ro(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:s,treeLen:r,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((h,c,f,u)=>a.push({fromA:h,toA:c,fromB:f,toB:u})),i=_e.applyChanges(i,a),s=W.empty,r=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let h of this.skipped){let c=e.mapPos(h.from,1),f=e.mapPos(h.to,-1);ce.from&&(this.fragments=Ro(this.fragments,s,r),this.skipped.splice(i--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Ca{createParse(t,i,s){let r=s[0].from,o=s[s.length-1].to;return{parsedPos:r,advance(){let a=Xt;if(a){for(let h of s)a.tempSkipped.push(h);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=o,new W(ye.none,[],[],o-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Xt}}function Ro(n,e,t){return _e.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class qt{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new qt(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=zt.create(e.facet($t).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new qt(i)}}Oe.state=we.define({create:qt.init,update(n,e){for(let t of e.effects)if(t.is(Oe.setState))return t.value;return e.startState.facet($t)!=e.state.facet($t)?qt.init(e.state):n.apply(e)}});let Oa=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Oa=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:500-100})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const Un=typeof navigator<"u"&&(!((jn=navigator.scheduling)===null||jn===void 0)&&jn.isInputPending)?()=>navigator.scheduling.isInputPending():null,Du=me.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Oe.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),e.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Oe.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=Oa(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnds+1e3,a=r.context.work(()=>Un&&Un()||Date.now()>o,s+(l?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:Oe.setState.of(new qt(r.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Le(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),$t=D.define({combine(n){return n.length?n[0]:null},enables:n=>[Oe.state,Du,O.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class Pg{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const Ta=D.define(),An=D.define({combine:n=>{if(!n.length)return" ";if(!/^(?: +|\t+)$/.test(n[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return n[0]}});function vt(n){let e=n.facet(An);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function fn(n,e){let t="",i=n.tabSize;if(n.facet(An).charCodeAt(0)==9)for(;e>=i;)t+=" ",e-=i;for(let s=0;s=i.from&&s<=i.to?r&&s==e?{text:"",from:e}:(t<0?s-1&&(r+=o-this.countColumn(i,i.search(/\S|$/))),r}countColumn(e,t=e.length){return yi(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:i,from:s}=this.lineAt(e,t),r=this.options.overrideIndentation;if(r){let o=r(s);if(o>-1)return o}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Ou=new P;function Tu(n,e,t){return Pa(e.resolveInner(t).enterUnfinishedNodesBefore(t),t,n)}function Bu(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function Pu(n){let e=n.type.prop(Ou);if(e)return e;let t=n.firstChild,i;if(t&&(i=t.type.prop(P.closedBy))){let s=n.lastChild,r=s&&i.indexOf(s.name)>-1;return o=>Ra(o,!0,1,void 0,r&&!Bu(o)?s.from:void 0)}return n.parent==null?Ru:null}function Pa(n,e,t){for(;n;n=n.parent){let i=Pu(n);if(i)return i(rr.create(t,e,n))}return null}function Ru(){return 0}class rr extends Mn{constructor(e,t,i){super(e.state,e.options),this.base=e,this.pos=t,this.node=i}static create(e,t,i){return new rr(e,t,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){let e=this.state.doc.lineAt(this.node.from);for(;;){let t=this.node.resolve(e.from);for(;t.parent&&t.parent.from==t.from;)t=t.parent;if(Lu(t,this.node))break;e=this.state.doc.lineAt(t.from)}return this.lineIndent(e.from)}continue(){let e=this.node.parent;return e?Pa(e,this.pos,this.base):0}}function Lu(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function Eu(n){let e=n.node,t=e.childAfter(e.from),i=e.lastChild;if(!t)return null;let s=n.options.simulateBreak,r=n.state.doc.lineAt(t.from),o=s==null||s<=r.from?r.to:Math.min(r.to,s);for(let l=t.to;;){let a=e.childAfter(l);if(!a||a==i)return null;if(!a.type.isSkipped)return a.fromRa(i,e,t,n)}function Ra(n,e,t,i,s){let r=n.textAfter,o=r.match(/^\s*/)[0].length,l=i&&r.slice(o,o+i.length)==i||s==n.pos+o,a=e?Eu(n):null;return a?l?n.column(a.from):n.column(a.to):n.baseIndent+(l?0:n.unit*t)}const Lg=n=>n.baseIndent;function Eg({except:n,units:e=1}={}){return t=>{let i=n&&n.test(t.textAfter);return t.baseIndent+(i?0:e*t.unit)}}const Ig=new P;function Ng(n){let e=n.firstChild,t=n.lastChild;return e&&e.tol.prop(Ht)==o.data:o?l=>l==o:void 0,this.style=Ma(e.map(l=>({tag:l.tag,class:l.class||s(Object.assign({},l,{tag:null}))})),{all:r}).style,this.module=i?new ot(i):null,this.themeType=t.themeType}static define(e,t){return new Dn(e,t||{})}}const Es=D.define(),La=D.define({combine(n){return n.length?[n[0]]:null}});function Gn(n){let e=n.facet(Es);return e.length?e:n.facet(La)}function Vg(n,e){let t=[Nu],i;return n instanceof Dn&&(n.module&&t.push(O.styleModule.of(n.module)),i=n.themeType),e!=null&&e.fallback?t.push(La.of(n)):i?t.push(Es.computeN([O.darkTheme],s=>s.facet(O.darkTheme)==(i=="dark")?[n]:[])):t.push(Es.of(n)),t}class Iu{constructor(e){this.markCache=Object.create(null),this.tree=be(e.state),this.decorations=this.buildDeco(e,Gn(e.state))}update(e){let t=be(e.state),i=Gn(e.state),s=i!=Gn(e.startState);t.length{i.add(o,l,this.markCache[a]||(this.markCache[a]=T.mark({class:a})))},s,r);return i.finish()}}const Nu=St.high(me.fromClass(Iu,{decorations:n=>n.decorations})),Fg=Dn.define([{tag:x.meta,color:"#404740"},{tag:x.link,textDecoration:"underline"},{tag:x.heading,textDecoration:"underline",fontWeight:"bold"},{tag:x.emphasis,fontStyle:"italic"},{tag:x.strong,fontWeight:"bold"},{tag:x.strikethrough,textDecoration:"line-through"},{tag:x.keyword,color:"#708"},{tag:[x.atom,x.bool,x.url,x.contentSeparator,x.labelName],color:"#219"},{tag:[x.literal,x.inserted],color:"#164"},{tag:[x.string,x.deleted],color:"#a11"},{tag:[x.regexp,x.escape,x.special(x.string)],color:"#e40"},{tag:x.definition(x.variableName),color:"#00f"},{tag:x.local(x.variableName),color:"#30a"},{tag:[x.typeName,x.namespace],color:"#085"},{tag:x.className,color:"#167"},{tag:[x.special(x.variableName),x.macroName],color:"#256"},{tag:x.definition(x.propertyName),color:"#00c"},{tag:x.comment,color:"#940"},{tag:x.invalid,color:"#f00"}]),Vu=O.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Ea=1e4,Ia="()[]{}",Na=D.define({combine(n){return Ct(n,{afterCursor:!0,brackets:Ia,maxScanDistance:Ea,renderMatch:Hu})}}),Fu=T.mark({class:"cm-matchingBracket"}),Wu=T.mark({class:"cm-nonmatchingBracket"});function Hu(n){let e=[],t=n.matched?Fu:Wu;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const zu=we.define({create(){return T.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],i=e.state.facet(Na);for(let s of e.state.selection.ranges){if(!s.empty)continue;let r=qe(e.state,s.head,-1,i)||s.head>0&&qe(e.state,s.head-1,1,i)||i.afterCursor&&(qe(e.state,s.head,1,i)||s.headO.decorations.from(n)}),qu=[zu,Vu];function Wg(n={}){return[Na.of(n),qu]}const $u=new P;function Is(n,e,t){let i=n.prop(e<0?P.openedBy:P.closedBy);if(i)return i;if(n.name.length==1){let s=t.indexOf(n.name);if(s>-1&&s%2==(e<0?1:0))return[t[s+e]]}return null}function Ns(n){let e=n.type.prop($u);return e?e(n.node):n}function qe(n,e,t,i={}){let s=i.maxScanDistance||Ea,r=i.brackets||Ia,o=be(n),l=o.resolveInner(e,t);for(let a=l;a;a=a.parent){let h=Is(a.type,t,r);if(h&&a.from0?e>=c.from&&ec.from&&e<=c.to))return Ku(n,e,t,a,c,h,r)}}return ju(n,e,t,o,l.type,s,r)}function Ku(n,e,t,i,s,r,o){let l=i.parent,a={from:s.from,to:s.to},h=0,c=l==null?void 0:l.cursor();if(c&&(t<0?c.childBefore(i.from):c.childAfter(i.to)))do if(t<0?c.to<=i.from:c.from>=i.to){if(h==0&&r.indexOf(c.type.name)>-1&&c.from0)return null;let h={from:t<0?e-1:e,to:t>0?e+1:e},c=n.doc.iterRange(e,t>0?n.doc.length:0),f=0;for(let u=0;!c.next().done&&u<=r;){let d=c.value;t<0&&(u+=d.length);let p=e+u*t;for(let g=t>0?0:d.length-1,m=t>0?d.length:-1;g!=m;g+=t){let y=o.indexOf(d[g]);if(!(y<0||i.resolveInner(p+g,1).type!=s))if(y%2==0==t>0)f++;else{if(f==1)return{start:h,end:{from:p+g,to:p+g+1},matched:y>>1==a>>1};f--}}t>0&&(u+=d.length)}return c.done?{start:h,matched:!1}:null}function Lo(n,e,t,i=0,s=0){e==null&&(e=n.search(/[^\s\u00a0]/),e==-1&&(e=n.length));let r=s;for(let o=i;o=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.post}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPosi?o.toLowerCase():o,r=this.string.substr(this.pos,e.length);return s(r)==s(e)?(t!==!1&&(this.pos+=e.length),!0):null}else{let s=this.string.slice(this.pos).match(e);return s&&s.index>0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}}current(){return this.string.slice(this.start,this.pos)}}function Uu(n){return{name:n.name||"",token:n.token,blankLine:n.blankLine||(()=>{}),startState:n.startState||(()=>!0),copyState:n.copyState||Gu,indent:n.indent||(()=>null),languageData:n.languageData||{},tokenTable:n.tokenTable||lr}}function Gu(n){if(typeof n!="object")return n;let e={};for(let t in n){let i=n[t];e[t]=i instanceof Array?i.slice():i}return e}class Fa extends Oe{constructor(e){let t=Da(e.languageData),i=Uu(e),s,r=new class extends Ca{createParse(o,l,a){return new _u(s,o,l,a)}};super(t,r,[Ta.of((o,l)=>this.getIndent(o,l))],e.name),this.topNode=Qu(t),s=this,this.streamParser=i,this.stateAfter=new P({perNode:!0}),this.tokenTable=e.tokenTable?new qa(i.tokenTable):Yu}static define(e){return new Fa(e)}getIndent(e,t){let i=be(e.state),s=i.resolve(t);for(;s&&s.type!=this.topNode;)s=s.parent;if(!s)return null;let r=or(this,i,0,s.from,t),o,l;if(r?(l=r.state,o=r.pos+1):(l=this.streamParser.startState(e.unit),o=0),t-o>1e4)return null;for(;o=i&&t+e.length<=s&&e.prop(n.stateAfter);if(r)return{state:n.streamParser.copyState(r),pos:t+e.length};for(let o=e.children.length-1;o>=0;o--){let l=e.children[o],a=t+e.positions[o],h=l instanceof W&&a=e.length)return e;!s&&e.type==n.topNode&&(s=!0);for(let r=e.children.length-1;r>=0;r--){let o=e.positions[r],l=e.children[r],a;if(ot&&or(n,s.tree,0-s.offset,t,o),a;if(l&&(a=Wa(n,s.tree,t+s.offset,l.pos+s.offset,!1)))return{state:l.state,tree:a}}return{state:n.streamParser.startState(i?vt(i):4),tree:W.empty}}class _u{constructor(e,t,i,s){this.lang=e,this.input=t,this.fragments=i,this.ranges=s,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=s[s.length-1].to;let r=zt.get(),o=s[0].from,{state:l,tree:a}=Ju(e,i,o,r==null?void 0:r.state);this.state=l,this.parsedPos=this.chunkStart=o+a.length;for(let h=0;h=t?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,t),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let t=this.input.chunk(e);if(this.input.lineChunks)t==` -`&&(t="");else{let i=t.indexOf(` -`);i>-1&&(t=t.slice(0,i))}return e+t.length<=this.to?t:t.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,t=this.lineAfter(e),i=e+t.length;for(let s=this.rangeIndex;;){let r=this.ranges[s].to;if(r>=i||(t=t.slice(0,r-(i-t.length)),s++,s==this.ranges.length))break;let o=this.ranges[s].from,l=this.lineAfter(o);t+=l,i=o+l.length}return{line:t,end:i}}skipGapsTo(e,t,i){for(;;){let s=this.ranges[this.rangeIndex].to,r=e+t;if(i>0?s>r:s>=r)break;let o=this.ranges[++this.rangeIndex].from;t+=o-s}return t}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){r=this.skipGapsTo(t,r,1),t+=r;let o=this.chunk.length;r=this.skipGapsTo(i,r,-1),i+=r,s+=this.chunk.length-o}return this.chunk.push(e,t,i,s),r}parseLine(e){let{line:t,end:i}=this.nextLine(),s=0,{streamParser:r}=this.lang,o=new Va(t,e?e.state.tabSize:4,e?vt(e.state):2);if(o.eol())r.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let l=Ha(r.token,o,this.state);if(l&&(s=this.emitToken(this.lang.tokenTable.resolve(l),this.parsedPos+o.start,this.parsedPos+o.pos,4,s)),o.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPose.start)return s}throw new Error("Stream parser failed to advance stream.")}const lr=Object.create(null),di=[ye.none],Xu=new tr(di),Eo=[],za=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])za[n]=$a(lr,e);class qa{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),za)}resolve(e){return e?this.table[e]||(this.table[e]=$a(this.extra,e)):0}}const Yu=new qa(lr);function Jn(n,e){Eo.indexOf(n)>-1||(Eo.push(n),console.warn(e))}function $a(n,e){let t=null;for(let r of e.split(".")){let o=n[r]||x[r];o?typeof o=="function"?t?t=o(t):Jn(r,`Modifier ${r} used at start of tag`):t?Jn(r,`Tag ${r} used as modifier`):t=o:Jn(r,`Unknown highlighting tag ${r}`)}if(!t)return 0;let i=e.replace(/ /g,"_"),s=ye.define({id:di.length,name:i,props:[ku({[i]:t})]});return di.push(s),s.id}function Qu(n){let e=ye.define({id:di.length,name:"Document",props:[Ht.add(()=>n)]});return di.push(e),e}const Zu=n=>{let e=hr(n.state);return e.line?ed(n):e.block?id(n):!1};function ar(n,e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let s=n(e,t);return s?(i(t.update(s)),!0):!1}}const ed=ar(rd,0),td=ar(Ka,0),id=ar((n,e)=>Ka(n,e,sd(e)),0);function hr(n,e=n.selection.main.head){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const Yt=50;function nd(n,{open:e,close:t},i,s){let r=n.sliceDoc(i-Yt,i),o=n.sliceDoc(s,s+Yt),l=/\s*$/.exec(r)[0].length,a=/^\s*/.exec(o)[0].length,h=r.length-l;if(r.slice(h-e.length,h)==e&&o.slice(a,a+t.length)==t)return{open:{pos:i-l,margin:l&&1},close:{pos:s+a,margin:a&&1}};let c,f;s-i<=2*Yt?c=f=n.sliceDoc(i,s):(c=n.sliceDoc(i,i+Yt),f=n.sliceDoc(s-Yt,s));let u=/^\s*/.exec(c)[0].length,d=/\s*$/.exec(f)[0].length,p=f.length-d-t.length;return c.slice(u,u+e.length)==e&&f.slice(p,p+t.length)==t?{open:{pos:i+u+e.length,margin:/\s/.test(c.charAt(u+e.length))?1:0},close:{pos:s-d-t.length,margin:/\s/.test(f.charAt(p-1))?1:0}}:null}function sd(n){let e=[];for(let t of n.selection.ranges){let i=n.doc.lineAt(t.from),s=t.to<=i.to?i:n.doc.lineAt(t.to),r=e.length-1;r>=0&&e[r].to>i.from?e[r].to=s.to:e.push({from:i.from,to:s.to})}return e}function Ka(n,e,t=e.selection.ranges){let i=t.map(r=>hr(e,r.from).block);if(!i.every(r=>r))return null;let s=t.map((r,o)=>nd(e,i[o],r.from,r.to));if(n!=2&&!s.every(r=>r))return{changes:e.changes(t.map((r,o)=>s[o]?[]:[{from:r.from,insert:i[o].open+" "},{from:r.to,insert:" "+i[o].close}]))};if(n!=1&&s.some(r=>r)){let r=[];for(let o=0,l;os&&(r==o||o>c.from)){s=c.from;let f=hr(e,h).line;if(!f)continue;let u=/^\s*/.exec(c.text)[0].length,d=u==c.length,p=c.text.slice(u,u+f.length)==f?u:-1;ur.comment<0&&(!r.empty||r.single))){let r=[];for(let{line:l,token:a,indent:h,empty:c,single:f}of i)(f||!c)&&r.push({from:l.from+h,insert:a+" "});let o=e.changes(r);return{changes:o,selection:e.selection.map(o,1)}}else if(n!=1&&i.some(r=>r.comment>=0)){let r=[];for(let{line:o,comment:l,token:a}of i)if(l>=0){let h=o.from+l,c=h+a.length;o.text[c-o.from]==" "&&c++,r.push({from:h,to:c})}return{changes:r}}return null}const Vs=ht.define(),od=ht.define(),ld=D.define(),ja=D.define({combine(n){return Ct(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(i,s)=>e(i,s)||t(i,s)})}});function ad(n){let e=0;return n.iterChangedRanges((t,i)=>e=i),e}const Ua=we.define({create(){return $e.empty},update(n,e){let t=e.state.facet(ja),i=e.annotation(Vs);if(i){let a=e.docChanged?b.single(ad(e.changes)):void 0,h=ke.fromTransaction(e,a),c=i.side,f=c==0?n.undone:n.done;return h?f=un(f,f.length,t.minDepth,h):f=_a(f,e.startState.selection),new $e(c==0?i.rest:f,c==0?f:i.rest)}let s=e.annotation(od);if((s=="full"||s=="before")&&(n=n.isolate()),e.annotation(Z.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let r=ke.fromTransaction(e),o=e.annotation(Z.time),l=e.annotation(Z.userEvent);return r?n=n.addChanges(r,o,l,t,e):e.selection&&(n=n.addSelection(e.startState.selection,o,l,t.newGroupDelay)),(s=="full"||s=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new $e(n.done.map(ke.fromJSON),n.undone.map(ke.fromJSON))}});function Hg(n={}){return[Ua,ja.of(n),O.domEventHandlers({beforeinput(e,t){let i=e.inputType=="historyUndo"?Ga:e.inputType=="historyRedo"?Fs:null;return i?(e.preventDefault(),i(t)):!1}})]}function On(n,e){return function({state:t,dispatch:i}){if(!e&&t.readOnly)return!1;let s=t.field(Ua,!1);if(!s)return!1;let r=s.pop(n,t,e);return r?(i(r),!0):!1}}const Ga=On(0,!1),Fs=On(1,!1),hd=On(0,!0),cd=On(1,!0);class ke{constructor(e,t,i,s,r){this.changes=e,this.effects=t,this.mapped=i,this.startSelection=s,this.selectionsAfter=r}setSelAfter(e){return new ke(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(s=>s.toJSON())}}static fromJSON(e){return new ke(e.changes&&Q.fromJSON(e.changes),[],e.mapped&&Ke.fromJSON(e.mapped),e.startSelection&&b.fromJSON(e.startSelection),e.selectionsAfter.map(b.fromJSON))}static fromTransaction(e,t){let i=Te;for(let s of e.startState.facet(ld)){let r=s(e);r.length&&(i=i.concat(r))}return!i.length&&e.changes.empty?null:new ke(e.changes.invert(e.startState.doc),i,void 0,t||e.startState.selection,Te)}static selection(e){return new ke(void 0,Te,void 0,void 0,e)}}function un(n,e,t,i){let s=e+1>t+20?e-t-1:0,r=n.slice(s,e);return r.push(i),r}function fd(n,e){let t=[],i=!1;return n.iterChangedRanges((s,r)=>t.push(s,r)),e.iterChangedRanges((s,r,o,l)=>{for(let a=0;a=h&&o<=c&&(i=!0)}}),i}function ud(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,i)=>t.empty!=e.ranges[i].empty).length===0}function Ja(n,e){return n.length?e.length?n.concat(e):n:e}const Te=[],dd=200;function _a(n,e){if(n.length){let t=n[n.length-1],i=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-dd));return i.length&&i[i.length-1].eq(e)?n:(i.push(e),un(n,n.length-1,1e9,t.setSelAfter(i)))}else return[ke.selection([e])]}function pd(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function _n(n,e){if(!n.length)return n;let t=n.length,i=Te;for(;t;){let s=gd(n[t-1],e,i);if(s.changes&&!s.changes.empty||s.effects.length){let r=n.slice(0,t);return r[t-1]=s,r}else e=s.mapped,t--,i=s.selectionsAfter}return i.length?[ke.selection(i)]:Te}function gd(n,e,t){let i=Ja(n.selectionsAfter.length?n.selectionsAfter.map(l=>l.map(e)):Te,t);if(!n.changes)return ke.selection(i);let s=n.changes.map(e),r=e.mapDesc(n.changes,!0),o=n.mapped?n.mapped.composeDesc(r):r;return new ke(s,E.mapEffects(n.effects,e),o,n.startSelection.map(r),i)}const md=/^(input\.type|delete)($|\.)/;class $e{constructor(e,t,i=0,s=void 0){this.done=e,this.undone=t,this.prevTime=i,this.prevUserEvent=s}isolate(){return this.prevTime?new $e(this.done,this.undone):this}addChanges(e,t,i,s,r){let o=this.done,l=o[o.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!i||md.test(i))&&(!l.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?n.moveByChar(t,e):Tn(t,e))}function ce(n){return n.textDirectionAt(n.state.selection.main.head)==J.LTR}const Ya=n=>Xa(n,!ce(n)),Qa=n=>Xa(n,ce(n));function Za(n,e){return Ee(n,t=>t.empty?n.moveByGroup(t,e):Tn(t,e))}const yd=n=>Za(n,!ce(n)),bd=n=>Za(n,ce(n));function wd(n,e,t){if(e.type.prop(t))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Bn(n,e,t){let i=be(n).resolveInner(e.head),s=t?P.closedBy:P.openedBy;for(let a=e.head;;){let h=t?i.childAfter(a):i.childBefore(a);if(!h)break;wd(n,h,s)?i=h:a=t?h.to:h.from}let r=i.type.prop(s),o,l;return r&&(o=t?qe(n,i.from,1):qe(n,i.to,-1))&&o.matched?l=t?o.end.to:o.end.from:l=t?i.to:i.from,b.cursor(l,t?-1:1)}const xd=n=>Ee(n,e=>Bn(n.state,e,!ce(n))),kd=n=>Ee(n,e=>Bn(n.state,e,ce(n)));function eh(n,e){return Ee(n,t=>{if(!t.empty)return Tn(t,e);let i=n.moveVertically(t,e);return i.head!=t.head?i:n.moveToLineBoundary(t,e)})}const th=n=>eh(n,!1),ih=n=>eh(n,!0);function nh(n){return Math.max(n.defaultLineHeight,Math.min(n.dom.clientHeight,innerHeight)-5)}function sh(n,e){let{state:t}=n,i=jt(t.selection,l=>l.empty?n.moveVertically(l,e,nh(n)):Tn(l,e));if(i.eq(t.selection))return!1;let s=n.coordsAtPos(t.selection.main.head),r=n.scrollDOM.getBoundingClientRect(),o;return s&&s.top>r.top&&s.bottomsh(n,!1),Ws=n=>sh(n,!0);function ft(n,e,t){let i=n.lineBlockAt(e.head),s=n.moveToLineBoundary(e,t);if(s.head==e.head&&s.head!=(t?i.to:i.from)&&(s=n.moveToLineBoundary(e,t,!1)),!t&&s.head==i.from&&i.length){let r=/^\s*/.exec(n.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;r&&e.head!=i.from+r&&(s=b.cursor(i.from+r))}return s}const vd=n=>Ee(n,e=>ft(n,e,!0)),Sd=n=>Ee(n,e=>ft(n,e,!1)),Cd=n=>Ee(n,e=>ft(n,e,!ce(n))),Ad=n=>Ee(n,e=>ft(n,e,ce(n))),Md=n=>Ee(n,e=>b.cursor(n.lineBlockAt(e.head).from,1)),Dd=n=>Ee(n,e=>b.cursor(n.lineBlockAt(e.head).to,-1));function Od(n,e,t){let i=!1,s=jt(n.selection,r=>{let o=qe(n,r.head,-1)||qe(n,r.head,1)||r.head>0&&qe(n,r.head-1,1)||r.headOd(n,e,!1);function Re(n,e){let t=jt(n.state.selection,i=>{let s=e(i);return b.range(i.anchor,s.head,s.goalColumn,s.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(Ge(n.state,t)),!0)}function rh(n,e){return Re(n,t=>n.moveByChar(t,e))}const oh=n=>rh(n,!ce(n)),lh=n=>rh(n,ce(n));function ah(n,e){return Re(n,t=>n.moveByGroup(t,e))}const Bd=n=>ah(n,!ce(n)),Pd=n=>ah(n,ce(n)),Rd=n=>Re(n,e=>Bn(n.state,e,!ce(n))),Ld=n=>Re(n,e=>Bn(n.state,e,ce(n)));function hh(n,e){return Re(n,t=>n.moveVertically(t,e))}const ch=n=>hh(n,!1),fh=n=>hh(n,!0);function uh(n,e){return Re(n,t=>n.moveVertically(t,e,nh(n)))}const No=n=>uh(n,!1),Vo=n=>uh(n,!0),Ed=n=>Re(n,e=>ft(n,e,!0)),Id=n=>Re(n,e=>ft(n,e,!1)),Nd=n=>Re(n,e=>ft(n,e,!ce(n))),Vd=n=>Re(n,e=>ft(n,e,ce(n))),Fd=n=>Re(n,e=>b.cursor(n.lineBlockAt(e.head).from)),Wd=n=>Re(n,e=>b.cursor(n.lineBlockAt(e.head).to)),Fo=({state:n,dispatch:e})=>(e(Ge(n,{anchor:0})),!0),Wo=({state:n,dispatch:e})=>(e(Ge(n,{anchor:n.doc.length})),!0),Ho=({state:n,dispatch:e})=>(e(Ge(n,{anchor:n.selection.main.anchor,head:0})),!0),zo=({state:n,dispatch:e})=>(e(Ge(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),Hd=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),zd=({state:n,dispatch:e})=>{let t=Rn(n).map(({from:i,to:s})=>b.range(i,Math.min(s+1,n.doc.length)));return e(n.update({selection:b.create(t),userEvent:"select"})),!0},qd=({state:n,dispatch:e})=>{let t=jt(n.selection,i=>{var s;let r=be(n).resolveInner(i.head,1);for(;!(r.from=i.to||r.to>i.to&&r.from<=i.from||!(!((s=r.parent)===null||s===void 0)&&s.parent));)r=r.parent;return b.range(r.to,r.from)});return e(Ge(n,t)),!0},$d=({state:n,dispatch:e})=>{let t=n.selection,i=null;return t.ranges.length>1?i=b.create([t.main]):t.main.empty||(i=b.create([b.cursor(t.main.head)])),i?(e(Ge(n,i)),!0):!1};function Pn(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:i}=n,s=i.changeByRange(r=>{let{from:o,to:l}=r;if(o==l){let a=e(o);ao&&(t="delete.forward",a=Wi(n,a,!0)),o=Math.min(o,a),l=Math.max(l,a)}else o=Wi(n,o,!1),l=Wi(n,l,!0);return o==l?{range:r}:{changes:{from:o,to:l},range:b.cursor(o)}});return s.changes.empty?!1:(n.dispatch(i.update(s,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?O.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function Wi(n,e,t){if(n instanceof O)for(let i of n.state.facet(O.atomicRanges).map(s=>s(n)))i.between(e,e,(s,r)=>{se&&(e=t?r:s)});return e}const dh=(n,e)=>Pn(n,t=>{let{state:i}=n,s=i.doc.lineAt(t),r,o;if(!e&&t>s.from&&tdh(n,!1),ph=n=>dh(n,!0),gh=(n,e)=>Pn(n,t=>{let i=t,{state:s}=n,r=s.doc.lineAt(i),o=s.charCategorizer(i);for(let l=null;;){if(i==(e?r.to:r.from)){i==t&&r.number!=(e?s.doc.lines:1)&&(i+=e?1:-1);break}let a=de(r.text,i-r.from,e)+r.from,h=r.text.slice(Math.min(i,a)-r.from,Math.max(i,a)-r.from),c=o(h);if(l!=null&&c!=l)break;(h!=" "||i!=t)&&(l=c),i=a}return i}),mh=n=>gh(n,!1),Kd=n=>gh(n,!0),yh=n=>Pn(n,e=>{let t=n.lineBlockAt(e).to;return ePn(n,e=>{let t=n.lineBlockAt(e).from;return e>t?t:Math.max(0,e-1)}),Ud=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:I.of(["",""])},range:b.cursor(i.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},Gd=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>{if(!i.empty||i.from==0||i.from==n.doc.length)return{range:i};let s=i.from,r=n.doc.lineAt(s),o=s==r.from?s-1:de(r.text,s-r.from,!1)+r.from,l=s==r.to?s+1:de(r.text,s-r.from,!0)+r.from;return{changes:{from:o,to:l,insert:n.doc.slice(s,l).append(n.doc.slice(o,s))},range:b.cursor(l)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Rn(n){let e=[],t=-1;for(let i of n.selection.ranges){let s=n.doc.lineAt(i.from),r=n.doc.lineAt(i.to);if(!i.empty&&i.to==r.from&&(r=n.doc.lineAt(i.to-1)),t>=s.number){let o=e[e.length-1];o.to=r.to,o.ranges.push(i)}else e.push({from:s.from,to:r.to,ranges:[i]});t=r.number+1}return e}function bh(n,e,t){if(n.readOnly)return!1;let i=[],s=[];for(let r of Rn(n)){if(t?r.to==n.doc.length:r.from==0)continue;let o=n.doc.lineAt(t?r.to+1:r.from-1),l=o.length+1;if(t){i.push({from:r.to,to:o.to},{from:r.from,insert:o.text+n.lineBreak});for(let a of r.ranges)s.push(b.range(Math.min(n.doc.length,a.anchor+l),Math.min(n.doc.length,a.head+l)))}else{i.push({from:o.from,to:r.from},{from:r.to,insert:n.lineBreak+o.text});for(let a of r.ranges)s.push(b.range(a.anchor-l,a.head-l))}}return i.length?(e(n.update({changes:i,scrollIntoView:!0,selection:b.create(s,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Jd=({state:n,dispatch:e})=>bh(n,e,!1),_d=({state:n,dispatch:e})=>bh(n,e,!0);function wh(n,e,t){if(n.readOnly)return!1;let i=[];for(let s of Rn(n))t?i.push({from:s.from,insert:n.doc.slice(s.from,s.to)+n.lineBreak}):i.push({from:s.to,insert:n.lineBreak+n.doc.slice(s.from,s.to)});return e(n.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Xd=({state:n,dispatch:e})=>wh(n,e,!1),Yd=({state:n,dispatch:e})=>wh(n,e,!0),Qd=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(Rn(e).map(({from:s,to:r})=>(s>0?s--:rn.moveVertically(s,!0)).map(t);return n.dispatch({changes:t,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Zd(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=be(n).resolveInner(e),i=t.childBefore(e),s=t.childAfter(e),r;return i&&s&&i.to<=e&&s.from>=e&&(r=i.type.prop(P.closedBy))&&r.indexOf(s.name)>-1&&n.doc.lineAt(i.to).from==n.doc.lineAt(s.from).from?{from:i.to,to:s.from}:null}const ep=xh(!1),tp=xh(!0);function xh(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange(s=>{let{from:r,to:o}=s,l=e.doc.lineAt(r),a=!n&&r==o&&Zd(e,r);n&&(r=o=(o<=l.to?l:e.doc.lineAt(o)).to);let h=new Mn(e,{simulateBreak:r,simulateDoubleBreak:!!a}),c=Ba(h,r);for(c==null&&(c=/^\s*/.exec(e.doc.lineAt(r).text)[0].length);ol.from&&r{let s=[];for(let o=i.from;o<=i.to;){let l=n.doc.lineAt(o);l.number>t&&(i.empty||i.to>l.from)&&(e(l,s,i),t=l.number),o=l.to+1}let r=n.changes(s);return{changes:s,range:b.range(r.mapPos(i.anchor,1),r.mapPos(i.head,1))}})}const ip=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),i=new Mn(n,{overrideIndentation:r=>{let o=t[r];return o??-1}}),s=cr(n,(r,o,l)=>{let a=Ba(i,r.from);if(a==null)return;/\S/.test(r.text)||(a=0);let h=/^\s*/.exec(r.text)[0],c=fn(n,a);(h!=c||l.fromn.readOnly?!1:(e(n.update(cr(n,(t,i)=>{i.push({from:t.from,insert:n.facet(An)})}),{userEvent:"input.indent"})),!0),sp=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(cr(n,(t,i)=>{let s=/^\s*/.exec(t.text)[0];if(!s)return;let r=yi(s,n.tabSize),o=0,l=fn(n,Math.max(0,r-vt(n)));for(;o({mac:n.key,run:n.run,shift:n.shift}))),qg=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:xd,shift:Rd},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:kd,shift:Ld},{key:"Alt-ArrowUp",run:Jd},{key:"Shift-Alt-ArrowUp",run:Xd},{key:"Alt-ArrowDown",run:_d},{key:"Shift-Alt-ArrowDown",run:Yd},{key:"Escape",run:$d},{key:"Mod-Enter",run:tp},{key:"Alt-l",mac:"Ctrl-l",run:zd},{key:"Mod-i",run:qd,preventDefault:!0},{key:"Mod-[",run:sp},{key:"Mod-]",run:np},{key:"Mod-Alt-\\",run:ip},{key:"Shift-Mod-k",run:Qd},{key:"Shift-Mod-\\",run:Td},{key:"Mod-/",run:Zu},{key:"Alt-A",run:td}].concat(op);function oe(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=t[i];typeof s=="string"?n.setAttribute(i,s):s!=null&&(n[i]=s)}e++}for(;en.normalize("NFKD"):n=>n;class Kt{constructor(e,t,i=0,s=e.length,r,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,s),this.bufferStart=i,this.normalize=r?l=>r(qo(l)):qo,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return se(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=Ks(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=Ce(e);let s=this.normalize(t);for(let r=0,o=i;;r++){let l=s.charCodeAt(r),a=this.match(l,o);if(a)return this.value=a,this;if(r==s.length-1)break;o==i&&rthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let i=this.curLineStart+t.index,s=i+t[0].length;if(this.matchPos=dn(this.text,s+(i==s?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,s,t)))return this.value={from:i,to:s,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||s.to<=t){let l=new It(t,e.sliceString(t,i));return Xn.set(e,l),l}if(s.from==t&&s.to==i)return s;let{text:r,from:o}=s;return o>t&&(r=e.sliceString(t,o)+r,o=t),s.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let i=this.flat.from+t.index,s=i+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,s,t)))return this.value={from:i,to:s,match:t},this.matchPos=dn(this.text,s+(i==s?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=It.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(Sh.prototype[Symbol.iterator]=Ch.prototype[Symbol.iterator]=function(){return this});function lp(n){try{return new RegExp(n,fr),!0}catch{return!1}}function dn(n,e){if(e>=n.length)return e;let t=n.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function zs(n){let e=oe("input",{class:"cm-textfield",name:"line"}),t=oe("form",{class:"cm-gotoLine",onkeydown:s=>{s.keyCode==27?(s.preventDefault(),n.dispatch({effects:pn.of(!1)}),n.focus()):s.keyCode==13&&(s.preventDefault(),i())},onsubmit:s=>{s.preventDefault(),i()}},oe("label",n.state.phrase("Go to line"),": ",e)," ",oe("button",{class:"cm-button",type:"submit"},n.state.phrase("go")));function i(){let s=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!s)return;let{state:r}=n,o=r.doc.lineAt(r.selection.main.head),[,l,a,h,c]=s,f=h?+h.slice(1):0,u=a?+a:o.number;if(a&&c){let p=u/100;l&&(p=p*(l=="-"?-1:1)+o.number/r.doc.lines),u=Math.round(r.doc.lines*p)}else a&&l&&(u=u*(l=="-"?-1:1)+o.number);let d=r.doc.line(Math.max(1,Math.min(r.doc.lines,u)));n.dispatch({effects:pn.of(!1),selection:b.cursor(d.from+Math.max(0,Math.min(f,d.length))),scrollIntoView:!0}),n.focus()}return{dom:t}}const pn=E.define(),$o=we.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(pn)&&(n=t.value);return n},provide:n=>on.from(n,e=>e?zs:null)}),ap=n=>{let e=rn(n,zs);if(!e){let t=[pn.of(!0)];n.state.field($o,!1)==null&&t.push(E.appendConfig.of([$o,hp])),n.dispatch({effects:t}),e=rn(n,zs)}return e&&e.dom.querySelector("input").focus(),!0},hp=O.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),cp={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Ah=D.define({combine(n){return Ct(n,cp,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function $g(n){let e=[gp,pp];return n&&e.push(Ah.of(n)),e}const fp=T.mark({class:"cm-selectionMatch"}),up=T.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Ko(n,e,t,i){return(t==0||n(e.sliceDoc(t-1,t))!=q.Word)&&(i==e.doc.length||n(e.sliceDoc(i,i+1))!=q.Word)}function dp(n,e,t,i){return n(e.sliceDoc(t,t+1))==q.Word&&n(e.sliceDoc(i-1,i))==q.Word}const pp=me.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(Ah),{state:t}=n,i=t.selection;if(i.ranges.length>1)return T.none;let s=i.main,r,o=null;if(s.empty){if(!e.highlightWordAroundCursor)return T.none;let a=t.wordAt(s.head);if(!a)return T.none;o=t.charCategorizer(s.head),r=t.sliceDoc(a.from,a.to)}else{let a=s.to-s.from;if(a200)return T.none;if(e.wholeWords){if(r=t.sliceDoc(s.from,s.to),o=t.charCategorizer(s.head),!(Ko(o,t,s.from,s.to)&&dp(o,t,s.from,s.to)))return T.none}else if(r=t.sliceDoc(s.from,s.to).trim(),!r)return T.none}let l=[];for(let a of n.visibleRanges){let h=new Kt(t.doc,r,a.from,a.to);for(;!h.next().done;){let{from:c,to:f}=h.value;if((!o||Ko(o,t,c,f))&&(s.empty&&c<=s.from&&f>=s.to?l.push(up.range(c,f)):(c>=s.to||f<=s.from)&&l.push(fp.range(c,f)),l.length>e.maxMatches))return T.none}}return T.set(l)}},{decorations:n=>n.decorations}),gp=O.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),mp=({state:n,dispatch:e})=>{let{selection:t}=n,i=b.create(t.ranges.map(s=>n.wordAt(s.head)||b.cursor(s.head)),t.mainIndex);return i.eq(t)?!1:(e(n.update({selection:i})),!0)};function yp(n,e){let{main:t,ranges:i}=n.selection,s=n.wordAt(t.head),r=s&&s.from==t.from&&s.to==t.to;for(let o=!1,l=new Kt(n.doc,e,i[i.length-1].to);;)if(l.next(),l.done){if(o)return null;l=new Kt(n.doc,e,0,Math.max(0,i[i.length-1].from-1)),o=!0}else{if(o&&i.some(a=>a.from==l.value.from))continue;if(r){let a=n.wordAt(l.value.from);if(!a||a.from!=l.value.from||a.to!=l.value.to)continue}return l.value}}const bp=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(r=>r.from===r.to))return mp({state:n,dispatch:e});let i=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(r=>n.sliceDoc(r.from,r.to)!=i))return!1;let s=yp(n,i);return s?(e(n.update({selection:n.selection.addRange(b.range(s.from,s.to),!1),effects:O.scrollIntoView(s.to)})),!0):!1},ur=D.define({combine(n){return Ct(n,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:e=>new Tp(e)})}});class Mh{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||lp(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,i)=>i=="n"?` -`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new vp(this):new xp(this)}getCursor(e,t=0,i){let s=e.doc?e:N.create({doc:e});return i==null&&(i=s.doc.length),this.regexp?Tt(this,s,t,i):Ot(this,s,t,i)}}class Dh{constructor(e){this.spec=e}}function Ot(n,e,t,i){return new Kt(e.doc,n.unquoted,t,i,n.caseSensitive?void 0:s=>s.toLowerCase(),n.wholeWord?wp(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function wp(n,e){return(t,i,s,r)=>((r>t||r+s.length=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Ot(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function Tt(n,e,t,i){return new Sh(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?kp(e.charCategorizer(e.selection.main.head)):void 0},t,i)}function gn(n,e){return n.slice(de(n,e,!1),e)}function mn(n,e){return n.slice(e,de(n,e))}function kp(n){return(e,t,i)=>!i[0].length||(n(gn(i.input,i.index))!=q.Word||n(mn(i.input,i.index))!=q.Word)&&(n(mn(i.input,i.index+i[0].length))!=q.Word||n(gn(i.input,i.index+i[0].length))!=q.Word)}class vp extends Dh{nextMatch(e,t,i){let s=Tt(this.spec,e,i,e.doc.length).next();return s.done&&(s=Tt(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=1;;s++){let r=Math.max(t,i-s*1e4),o=Tt(this.spec,e,r,i),l=null;for(;!o.next().done;)l=o.value;if(l&&(r==t||l.from>r+10))return l;if(r==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(t,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Tt(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const pi=E.define(),dr=E.define(),st=we.define({create(n){return new Yn(qs(n).create(),null)},update(n,e){for(let t of e.effects)t.is(pi)?n=new Yn(t.value.create(),n.panel):t.is(dr)&&(n=new Yn(n.query,t.value?pr:null));return n},provide:n=>on.from(n,e=>e.panel)});class Yn{constructor(e,t){this.query=e,this.panel=t}}const Sp=T.mark({class:"cm-searchMatch"}),Cp=T.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Ap=me.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(st))}update(n){let e=n.state.field(st);(e!=n.startState.field(st)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return T.none;let{view:t}=this,i=new wt;for(let s=0,r=t.visibleRanges,o=r.length;sr[s+1].from-2*250;)a=r[++s].to;n.highlight(t.state,l,a,(h,c)=>{let f=t.state.selection.ranges.some(u=>u.from==h&&u.to==c);i.add(h,c,f?Cp:Sp)})}return i.finish()}},{decorations:n=>n.decorations});function xi(n){return e=>{let t=e.state.field(st,!1);return t&&t.query.spec.valid?n(e,t):Oh(e)}}const yn=xi((n,{query:e})=>{let{to:t}=n.state.selection.main,i=e.nextMatch(n.state,t,t);return i?(n.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:gr(n,i),userEvent:"select.search"}),!0):!1}),bn=xi((n,{query:e})=>{let{state:t}=n,{from:i}=t.selection.main,s=e.prevMatch(t,i,i);return s?(n.dispatch({selection:{anchor:s.from,head:s.to},scrollIntoView:!0,effects:gr(n,s),userEvent:"select.search"}),!0):!1}),Mp=xi((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:b.create(t.map(i=>b.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),Dp=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:i,to:s}=t.main,r=[],o=0;for(let l=new Kt(n.doc,n.sliceDoc(i,s));!l.next().done;){if(r.length>1e3)return!1;l.value.from==i&&(o=r.length),r.push(b.range(l.value.from,l.value.to))}return e(n.update({selection:b.create(r,o),userEvent:"select.search.matches"})),!0},jo=xi((n,{query:e})=>{let{state:t}=n,{from:i,to:s}=t.selection.main;if(t.readOnly)return!1;let r=e.nextMatch(t,i,i);if(!r)return!1;let o=[],l,a,h=[];if(r.from==i&&r.to==s&&(a=t.toText(e.getReplacement(r)),o.push({from:r.from,to:r.to,insert:a}),r=e.nextMatch(t,r.from,r.to),h.push(O.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(i).number)+"."))),r){let c=o.length==0||o[0].from>=r.to?0:r.to-r.from-a.length;l={anchor:r.from-c,head:r.to-c},h.push(gr(n,r))}return n.dispatch({changes:o,selection:l,scrollIntoView:!!l,effects:h,userEvent:"input.replace"}),!0}),Op=xi((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(s=>{let{from:r,to:o}=s;return{from:r,to:o,insert:e.getReplacement(s)}});if(!t.length)return!1;let i=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:O.announce.of(i),userEvent:"input.replace.all"}),!0});function pr(n){return n.state.facet(ur).createPanel(n)}function qs(n,e){var t,i,s,r;let o=n.selection.main,l=o.empty||o.to>o.from+100?"":n.sliceDoc(o.from,o.to);if(e&&!l)return e;let a=n.facet(ur);return new Mh({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:a.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:a.caseSensitive,literal:(s=e==null?void 0:e.literal)!==null&&s!==void 0?s:a.literal,wholeWord:(r=e==null?void 0:e.wholeWord)!==null&&r!==void 0?r:a.wholeWord})}const Oh=n=>{let e=n.state.field(st,!1);if(e&&e.panel){let t=rn(n,pr);if(!t)return!1;let i=t.dom.querySelector("[main-field]");if(i&&i!=n.root.activeElement){let s=qs(n.state,e.query.spec);s.valid&&n.dispatch({effects:pi.of(s)}),i.focus(),i.select()}}else n.dispatch({effects:[dr.of(!0),e?pi.of(qs(n.state,e.query.spec)):E.appendConfig.of(Pp)]});return!0},Th=n=>{let e=n.state.field(st,!1);if(!e||!e.panel)return!1;let t=rn(n,pr);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:dr.of(!1)}),!0},Kg=[{key:"Mod-f",run:Oh,scope:"editor search-panel"},{key:"F3",run:yn,shift:bn,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:yn,shift:bn,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Th,scope:"editor search-panel"},{key:"Mod-Shift-l",run:Dp},{key:"Alt-g",run:ap},{key:"Mod-d",run:bp,preventDefault:!0}];class Tp{constructor(e){this.view=e;let t=this.query=e.state.field(st).query.spec;this.commit=this.commit.bind(this),this.searchField=oe("input",{value:t.search,placeholder:ve(e,"Find"),"aria-label":ve(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=oe("input",{value:t.replace,placeholder:ve(e,"Replace"),"aria-label":ve(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=oe("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=oe("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=oe("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function i(s,r,o){return oe("button",{class:"cm-button",name:s,onclick:r,type:"button"},o)}this.dom=oe("div",{onkeydown:s=>this.keydown(s),class:"cm-search"},[this.searchField,i("next",()=>yn(e),[ve(e,"next")]),i("prev",()=>bn(e),[ve(e,"previous")]),i("select",()=>Mp(e),[ve(e,"all")]),oe("label",null,[this.caseField,ve(e,"match case")]),oe("label",null,[this.reField,ve(e,"regexp")]),oe("label",null,[this.wordField,ve(e,"by word")]),...e.state.readOnly?[]:[oe("br"),this.replaceField,i("replace",()=>jo(e),[ve(e,"replace")]),i("replaceAll",()=>Op(e),[ve(e,"replace all")])],oe("button",{name:"close",onclick:()=>Th(e),"aria-label":ve(e,"close"),type:"button"},["×"])])}commit(){let e=new Mh({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:pi.of(e)}))}keydown(e){Mf(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?bn:yn)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),jo(this.view))}update(e){for(let t of e.transactions)for(let i of t.effects)i.is(pi)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(ur).top}}function ve(n,e){return n.state.phrase(e)}const Hi=30,zi=/[\s\.,:;?!]/;function gr(n,{from:e,to:t}){let i=n.state.doc.lineAt(e),s=n.state.doc.lineAt(t).to,r=Math.max(i.from,e-Hi),o=Math.min(s,t+Hi),l=n.state.sliceDoc(r,o);if(r!=i.from){for(let a=0;al.length-Hi;a--)if(!zi.test(l[a-1])&&zi.test(l[a])){l=l.slice(0,a);break}}return O.announce.of(`${n.state.phrase("current match")}. ${l} ${n.state.phrase("on line")} ${i.number}.`)}const Bp=O.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),Pp=[st,St.lowest(Ap),Bp];class Bh{constructor(e,t,i){this.state=e,this.pos=t,this.explicit=i,this.abortListeners=[]}tokenBefore(e){let t=be(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),i=Math.max(t.from,this.pos-250),s=t.text.slice(i-t.from,this.pos-t.from),r=s.search(Ph(e,!1));return r<0?null:{from:i+r,to:this.pos,text:s.slice(r)}}get aborted(){return this.abortListeners==null}addEventListener(e,t){e=="abort"&&this.abortListeners&&this.abortListeners.push(t)}}function Uo(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Rp(n){let e=Object.create(null),t=Object.create(null);for(let{label:s}of n){e[s[0]]=!0;for(let r=1;rtypeof s=="string"?{label:s}:s),[t,i]=e.every(s=>/^\w+$/.test(s.label))?[/\w*$/,/\w+$/]:Rp(e);return s=>{let r=s.matchBefore(i);return r||s.explicit?{from:r?r.from:s.pos,options:e,validFor:t}:null}}function jg(n,e){return t=>{for(let i=be(t.state).resolveInner(t.pos,-1);i;i=i.parent)if(n.indexOf(i.name)>-1)return null;return e(t)}}class Go{constructor(e,t,i){this.completion=e,this.source=t,this.match=i}}function rt(n){return n.selection.main.head}function Ph(n,e){var t;let{source:i}=n,s=e&&i[0]!="^",r=i[i.length-1]!="$";return!s&&!r?n:new RegExp(`${s?"^":""}(?:${i})${r?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const Ep=ht.define();function Ip(n,e,t,i){return Object.assign(Object.assign({},n.changeByRange(s=>{if(s==n.selection.main)return{changes:{from:t,to:i,insert:e},range:b.cursor(t+e.length)};let r=i-t;return!s.empty||r&&n.sliceDoc(s.from-r,s.from)!=n.sliceDoc(t,i)?{range:s}:{changes:{from:s.from-r,to:s.from,insert:e},range:b.cursor(s.from-r+e.length)}})),{userEvent:"input.complete"})}function Rh(n,e){const t=e.completion.apply||e.completion.label;let i=e.source;typeof t=="string"?n.dispatch(Object.assign(Object.assign({},Ip(n.state,t,i.from,i.to)),{annotations:Ep.of(e.completion)})):t(n,e.completion,i.from,i.to)}const Jo=new WeakMap;function Np(n){if(!Array.isArray(n))return n;let e=Jo.get(n);return e||Jo.set(n,e=Lp(n)),e}class Vp{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let t=0;t=48&&k<=57||k>=97&&k<=122?2:k>=65&&k<=90?1:0:(C=Ks(k))!=C.toLowerCase()?1:C!=C.toUpperCase()?2:0;(!S||B==1&&m||v==0&&B!=0)&&(t[f]==k||i[f]==k&&(u=!0)?o[f++]=S:o.length&&(y=!1)),v=B,S+=Ce(k)}return f==a&&o[0]==0&&y?this.result(-100+(u?-200:0),o,e):d==a&&p==0?[-200-e.length,0,g]:l>-1?[-700-e.length,l,l+this.pattern.length]:d==a?[-200+-700-e.length,p,g]:f==a?this.result(-100+(u?-200:0)+-700+(y?0:-1100),o,e):t.length==2?null:this.result((s[0]?-700:0)+-200+-1100,s,e)}result(e,t,i){let s=[e-i.length],r=1;for(let o of t){let l=o+(this.astral?Ce(se(i,o)):1);r>1&&s[r-1]==o?s[r-1]=l:(s[r++]=o,s[r++]=l)}return s}}const Pe=D.define({combine(n){return Ct(n,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>i=>_o(e(i),t(i)),optionClass:(e,t)=>i=>_o(e(i),t(i)),addToOptions:(e,t)=>e.concat(t)})}});function _o(n,e){return n?e?n+" "+e:n:e}function Fp(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),t.type&&i.classList.add(...t.type.split(/\s+/g).map(s=>"cm-completionIcon-"+s)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(t,i,s){let r=document.createElement("span");r.className="cm-completionLabel";let{label:o}=t,l=0;for(let a=1;al&&r.appendChild(document.createTextNode(o.slice(l,h)));let f=r.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(o.slice(h,c))),f.className="cm-completionMatchedText",l=c}return lt.position-i.position).map(t=>t.render)}function Xo(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let s=Math.floor(e/t);return{from:s*t,to:(s+1)*t}}let i=Math.floor((n-e)/t);return{from:n-(i+1)*t,to:n-i*t}}class Wp{constructor(e,t){this.view=e,this.stateField=t,this.info=null,this.placeInfo={read:()=>this.measureInfo(),write:l=>this.positionInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:s,selected:r}=i.open,o=e.state.facet(Pe);this.optionContent=Fp(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=Xo(s.length,r,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{for(let a=l.target,h;a&&a!=this.dom;a=a.parentNode)if(a.nodeName=="LI"&&(h=/-(\d+)$/.exec(a.id))&&+h[1]{this.info&&this.view.requestMeasure(this.placeInfo)})}mount(){this.updateSel()}update(e){var t,i,s;let r=e.state.field(this.stateField),o=e.startState.field(this.stateField);this.updateTooltipClass(e.state),r!=o&&(this.updateSel(),((t=r.open)===null||t===void 0?void 0:t.disabled)!=((i=o.open)===null||i===void 0?void 0:i.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(!((s=r.open)===null||s===void 0)&&s.disabled)))}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of t.split(" "))i&&this.dom.classList.add(i);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfo)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=Xo(t.options.length,t.selected,this.view.state.facet(Pe).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t.options,e.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfo)})),this.updateSelectedOption(t.selected)){this.info&&(this.info.remove(),this.info=null);let{completion:i}=t.options[t.selected],{info:s}=i;if(!s)return;let r=typeof s=="string"?document.createTextNode(s):s(i);if(!r)return;"then"in r?r.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o)}).catch(o=>Le(this.view.state,o,"completion info")):this.addInfoPane(r)}}addInfoPane(e){let t=this.info=document.createElement("div");t.className="cm-tooltip cm-completionInfo",t.appendChild(e),this.dom.appendChild(t),this.view.requestMeasure(this.placeInfo)}updateSelectedOption(e){let t=null;for(let i=this.list.firstChild,s=this.range.from;i;i=i.nextSibling,s++)s==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),t=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return t&&zp(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),s=e.getBoundingClientRect(),r=this.space;if(!r){let p=this.dom.ownerDocument.defaultView||window;r={left:0,top:0,right:p.innerWidth,bottom:p.innerHeight}}if(s.top>Math.min(r.bottom,t.bottom)-10||s.bottom=i.height||p>t.top?c=s.bottom-t.top+"px":f=t.bottom-s.top+"px"}return{top:c,bottom:f,maxWidth:h,class:a?o?"left-narrow":"right-narrow":l?"left":"right"}}positionInfo(e){this.info&&(e?(this.info.style.top=e.top,this.info.style.bottom=e.bottom,this.info.style.maxWidth=e.maxWidth,this.info.className="cm-tooltip cm-completionInfo cm-completionInfo-"+e.class):this.info.style.top="-1e6px")}createListBox(e,t,i){const s=document.createElement("ul");s.id=t,s.setAttribute("role","listbox"),s.setAttribute("aria-expanded","true"),s.setAttribute("aria-label",this.view.state.phrase("Completions"));for(let r=i.from;rnew Wp(e,n)}function zp(n,e){let t=n.getBoundingClientRect(),i=e.getBoundingClientRect();i.topt.bottom&&(n.scrollTop+=i.bottom-t.bottom)}function Yo(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function qp(n,e){let t=[],i=0;for(let l of n)if(l.hasResult())if(l.result.filter===!1){let a=l.result.getMatch;for(let h of l.result.options){let c=[1e9-i++];if(a)for(let f of a(h))c.push(f);t.push(new Go(h,l,c))}}else{let a=new Vp(e.sliceDoc(l.from,l.to)),h;for(let c of l.result.options)(h=a.match(c.label))&&(c.boost!=null&&(h[0]+=c.boost),t.push(new Go(c,l,h)))}let s=[],r=null,o=e.facet(Pe).compareCompletions;for(let l of t.sort((a,h)=>h.match[0]-a.match[0]||o(a.completion,h.completion)))!r||r.label!=l.completion.label||r.detail!=l.completion.detail||r.type!=null&&l.completion.type!=null&&r.type!=l.completion.type||r.apply!=l.completion.apply?s.push(l):Yo(l.completion)>Yo(r)&&(s[s.length-1]=l),r=l.completion;return s}class Bt{constructor(e,t,i,s,r,o){this.options=e,this.attrs=t,this.tooltip=i,this.timestamp=s,this.selected=r,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Bt(this.options,Qo(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,i,s,r){let o=qp(e,t);if(!o.length)return s&&e.some(a=>a.state==1)?new Bt(s.options,s.attrs,s.tooltip,s.timestamp,s.selected,!0):null;let l=t.facet(Pe).selectOnOpen?0:-1;if(s&&s.selected!=l&&s.selected!=-1){let a=s.options[s.selected].completion;for(let h=0;hh.hasResult()?Math.min(a,h.from):a,1e8),create:Hp(Me),above:r.aboveCursor},s?s.timestamp:Date.now(),l,!1)}map(e){return new Bt(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class wn{constructor(e,t,i){this.active=e,this.id=t,this.open=i}static start(){return new wn(jp,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,i=t.facet(Pe),r=(i.override||t.languageDataAt("autocomplete",rt(t)).map(Np)).map(l=>(this.active.find(h=>h.source==l)||new xe(l,this.active.some(h=>h.state!=0)?1:0)).update(e,i));r.length==this.active.length&&r.every((l,a)=>l==this.active[a])&&(r=this.active);let o=this.open;o&&e.docChanged&&(o=o.map(e.changes)),e.selection||r.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!$p(r,this.active)?o=Bt.build(r,t,this.id,o,i):o&&o.disabled&&!r.some(l=>l.state==1)&&(o=null),!o&&r.every(l=>l.state!=1)&&r.some(l=>l.hasResult())&&(r=r.map(l=>l.hasResult()?new xe(l.source,0):l));for(let l of e.effects)l.is(Eh)&&(o=o&&o.setSelected(l.value,this.id));return r==this.active&&o==this.open?this:new wn(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:Kp}}function $p(n,e){if(n==e)return!0;for(let t=0,i=0;;){for(;t-1&&(t["aria-activedescendant"]=n+"-"+e),t}const jp=[];function $s(n){return n.isUserEvent("input.type")?"input":n.isUserEvent("delete.backward")?"delete":null}class xe{constructor(e,t,i=-1){this.source=e,this.state=t,this.explicitPos=i}hasResult(){return!1}update(e,t){let i=$s(e),s=this;i?s=s.handleUserEvent(e,i,t):e.docChanged?s=s.handleChange(e):e.selection&&s.state!=0&&(s=new xe(s.source,0));for(let r of e.effects)if(r.is(mr))s=new xe(s.source,1,r.value?rt(e.state):-1);else if(r.is(xn))s=new xe(s.source,0);else if(r.is(Lh))for(let o of r.value)o.source==s.source&&(s=o);return s}handleUserEvent(e,t,i){return t=="delete"||!i.activateOnTyping?this.map(e.changes):new xe(this.source,1)}handleChange(e){return e.changes.touchesRange(rt(e.startState))?new xe(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new xe(this.source,this.state,e.mapPos(this.explicitPos))}}class si extends xe{constructor(e,t,i,s,r){super(e,2,t),this.result=i,this.from=s,this.to=r}hasResult(){return!0}handleUserEvent(e,t,i){var s;let r=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),l=rt(e.state);if((this.explicitPos<0?l<=r:lo||t=="delete"&&rt(e.startState)==this.from)return new xe(this.source,t=="input"&&i.activateOnTyping?1:0);let a=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos),h;return Up(this.result.validFor,e.state,r,o)?new si(this.source,a,this.result,r,o):this.result.update&&(h=this.result.update(this.result,r,o,new Bh(e.state,l,a>=0)))?new si(this.source,a,h,h.from,(s=h.to)!==null&&s!==void 0?s:rt(e.state)):new xe(this.source,1,a)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new xe(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new si(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}function Up(n,e,t,i){if(!n)return!1;let s=e.sliceDoc(t,i);return typeof n=="function"?n(s,t,i,e):Ph(n,!0).test(s)}const mr=E.define(),xn=E.define(),Lh=E.define({map(n,e){return n.map(t=>t.map(e))}}),Eh=E.define(),Me=we.define({create(){return wn.start()},update(n,e){return n.update(e)},provide:n=>[xa.from(n,e=>e.tooltip),O.contentAttributes.from(n,e=>e.attrs)]});function qi(n,e="option"){return t=>{let i=t.state.field(Me,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+s*(n?1:-1):n?0:o-1;return l<0?l=e=="page"?0:o-1:l>=o&&(l=e=="page"?o-1:0),t.dispatch({effects:Eh.of(l)}),!0}}const Gp=n=>{let e=n.state.field(Me,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||Date.now()-e.open.timestampn.state.field(Me,!1)?(n.dispatch({effects:mr.of(!0)}),!0):!1,_p=n=>{let e=n.state.field(Me,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:xn.of(null)}),!0)};class Xp{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const Zo=50,Yp=50,Qp=1e3,Zp=me.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let e of n.state.field(Me).active)e.state==1&&this.startQuery(e)}update(n){let e=n.state.field(Me);if(!n.selectionSet&&!n.docChanged&&n.startState.field(Me)==e)return;let t=n.transactions.some(i=>(i.selection||i.docChanged)&&!$s(i));for(let i=0;iYp&&Date.now()-s.time>Qp){for(let r of s.context.abortListeners)try{r()}catch(o){Le(this.view.state,o)}s.context.abortListeners=null,this.running.splice(i--,1)}else s.updates.push(...n.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some(i=>i.state==1&&!this.running.some(s=>s.active.source==i.source))?setTimeout(()=>this.startUpdate(),Zo):-1,this.composing!=0)for(let i of n.transactions)$s(i)=="input"?this.composing=2:this.composing==2&&i.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:n}=this.view,e=n.field(Me);for(let t of e.active)t.state==1&&!this.running.some(i=>i.active.source==t.source)&&this.startQuery(t)}startQuery(n){let{state:e}=this.view,t=rt(e),i=new Bh(e,t,n.explicitPos==t),s=new Xp(n,i);this.running.push(s),Promise.resolve(n.source(i)).then(r=>{s.context.aborted||(s.done=r||null,this.scheduleAccept())},r=>{this.view.dispatch({effects:xn.of(null)}),Le(this.view.state,r)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),Zo))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(Pe);for(let i=0;io.source==s.active.source);if(r&&r.state==1)if(s.done==null){let o=new xe(s.active.source,0);for(let l of s.updates)o=o.update(l,t);o.state!=1&&e.push(o)}else this.startQuery(r)}e.length&&this.view.dispatch({effects:Lh.of(e)})}},{eventHandlers:{blur(){let n=this.view.state.field(Me,!1);n&&n.tooltip&&this.view.state.facet(Pe).closeOnBlur&&this.view.dispatch({effects:xn.of(null)})},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:mr.of(!1)}),20),this.composing=0}}}),Ih=O.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:`${400}px`,boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`${30}px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`${30}px`},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class eg{constructor(e,t,i,s){this.field=e,this.line=t,this.from=i,this.to=s}}class yr{constructor(e,t,i){this.field=e,this.from=t,this.to=i}map(e){let t=e.mapPos(this.from,-1,ae.TrackDel),i=e.mapPos(this.to,1,ae.TrackDel);return t==null||i==null?null:new yr(this.field,t,i)}}class br{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let i=[],s=[t],r=e.doc.lineAt(t),o=/^\s*/.exec(r.text)[0];for(let a of this.lines){if(i.length){let h=o,c=/^\t*/.exec(a)[0].length;for(let f=0;fnew yr(a.field,s[a.line]+a.from,s[a.line]+a.to));return{text:i,ranges:l}}static parse(e){let t=[],i=[],s=[],r;for(let o of e.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(o);){let l=r[1]?+r[1]:null,a=r[2]||r[3]||"",h=-1;for(let c=0;c=h&&f.field++}s.push(new eg(h,i.length,r.index,r.index+a.length)),o=o.slice(0,r.index)+a+o.slice(r.index+r[0].length)}for(let l;l=/\\([{}])/.exec(o);){o=o.slice(0,l.index)+l[1]+o.slice(l.index+l[0].length);for(let a of s)a.line==i.length&&a.from>l.index&&(a.from--,a.to--)}i.push(o)}return new br(i,s)}}let tg=T.widget({widget:new class extends ct{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),ig=T.mark({class:"cm-snippetField"});class Ut{constructor(e,t){this.ranges=e,this.active=t,this.deco=T.set(e.map(i=>(i.from==i.to?tg:ig).range(i.from,i.to)))}map(e){let t=[];for(let i of this.ranges){let s=i.map(e);if(!s)return null;t.push(s)}return new Ut(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(i=>i.field==this.active&&i.from<=t.from&&i.to>=t.to))}}const ki=E.define({map(n,e){return n&&n.map(e)}}),ng=E.define(),gi=we.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(ki))return t.value;if(t.is(ng)&&n)return new Ut(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>O.decorations.from(n,e=>e?e.deco:T.none)});function wr(n,e){return b.create(n.filter(t=>t.field==e).map(t=>b.range(t.from,t.to)))}function sg(n){let e=br.parse(n);return(t,i,s,r)=>{let{text:o,ranges:l}=e.instantiate(t.state,s),a={changes:{from:s,to:r,insert:I.of(o)},scrollIntoView:!0};if(l.length&&(a.selection=wr(l,0)),l.length>1){let h=new Ut(l,0),c=a.effects=[ki.of(h)];t.state.field(gi,!1)===void 0&&c.push(E.appendConfig.of([gi,hg,cg,Ih]))}t.dispatch(t.state.update(a))}}function Nh(n){return({state:e,dispatch:t})=>{let i=e.field(gi,!1);if(!i||n<0&&i.active==0)return!1;let s=i.active+n,r=n>0&&!i.ranges.some(o=>o.field==s+n);return t(e.update({selection:wr(i.ranges,s),effects:ki.of(r?null:new Ut(i.ranges,s))})),!0}}const rg=({state:n,dispatch:e})=>n.field(gi,!1)?(e(n.update({effects:ki.of(null)})),!0):!1,og=Nh(1),lg=Nh(-1),ag=[{key:"Tab",run:og,shift:lg},{key:"Escape",run:rg}],el=D.define({combine(n){return n.length?n[0]:ag}}),hg=St.highest(er.compute([el],n=>n.facet(el)));function Ug(n,e){return Object.assign(Object.assign({},e),{apply:sg(n)})}const cg=O.domEventHandlers({mousedown(n,e){let t=e.state.field(gi,!1),i;if(!t||(i=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let s=t.ranges.find(r=>r.from<=i&&r.to>=i);return!s||s.field==t.active?!1:(e.dispatch({selection:wr(t.ranges,s.field),effects:ki.of(t.ranges.some(r=>r.field>s.field)?new Ut(t.ranges,s.field):null)}),!0)}}),mi={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},mt=E.define({map(n,e){let t=e.mapPos(n,-1,ae.TrackAfter);return t??void 0}}),xr=E.define({map(n,e){return e.mapPos(n)}}),kr=new class extends bt{};kr.startSide=1;kr.endSide=-1;const Vh=we.define({create(){return j.empty},update(n,e){if(e.selection){let t=e.state.doc.lineAt(e.selection.main.head).from,i=e.startState.doc.lineAt(e.startState.selection.main.head).from;t!=e.changes.mapPos(i,-1)&&(n=j.empty)}n=n.map(e.changes);for(let t of e.effects)t.is(mt)?n=n.update({add:[kr.range(t.value,t.value+1)]}):t.is(xr)&&(n=n.update({filter:i=>i!=t.value}));return n}});function Gg(){return[ug,Vh]}const Qn="()[]{}<>";function Fh(n){for(let e=0;e{if((fg?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let s=n.state.selection.main;if(i.length>2||i.length==2&&Ce(se(i,0))==1||e!=s.from||t!=s.to)return!1;let r=pg(n.state,i);return r?(n.dispatch(r),!0):!1}),dg=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let i=Wh(n,n.selection.main.head).brackets||mi.brackets,s=null,r=n.changeByRange(o=>{if(o.empty){let l=gg(n.doc,o.head);for(let a of i)if(a==l&&Ln(n.doc,o.head)==Fh(se(a,0)))return{changes:{from:o.head-a.length,to:o.head+a.length},range:b.cursor(o.head-a.length)}}return{range:s=o}});return s||e(n.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!s},Jg=[{key:"Backspace",run:dg}];function pg(n,e){let t=Wh(n,n.selection.main.head),i=t.brackets||mi.brackets;for(let s of i){let r=Fh(se(s,0));if(e==s)return r==s?bg(n,s,i.indexOf(s+s+s)>-1,t):mg(n,s,r,t.before||mi.before);if(e==r&&Hh(n,n.selection.main.from))return yg(n,s,r)}return null}function Hh(n,e){let t=!1;return n.field(Vh).between(0,n.doc.length,i=>{i==e&&(t=!0)}),t}function Ln(n,e){let t=n.sliceString(e,e+2);return t.slice(0,Ce(se(t,0)))}function gg(n,e){let t=n.sliceString(e-2,e);return Ce(se(t,0))==t.length?t:t.slice(1)}function mg(n,e,t,i){let s=null,r=n.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:mt.of(o.to+e.length),range:b.range(o.anchor+e.length,o.head+e.length)};let l=Ln(n.doc,o.head);return!l||/\s/.test(l)||i.indexOf(l)>-1?{changes:{insert:e+t,from:o.head},effects:mt.of(o.head+e.length),range:b.cursor(o.head+e.length)}:{range:s=o}});return s?null:n.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function yg(n,e,t){let i=null,s=n.selection.ranges.map(r=>r.empty&&Ln(n.doc,r.head)==t?b.cursor(r.head+t.length):i=r);return i?null:n.update({selection:b.create(s,n.selection.mainIndex),scrollIntoView:!0,effects:n.selection.ranges.map(({from:r})=>xr.of(r))})}function bg(n,e,t,i){let s=i.stringPrefixes||mi.stringPrefixes,r=null,o=n.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:mt.of(l.to+e.length),range:b.range(l.anchor+e.length,l.head+e.length)};let a=l.head,h=Ln(n.doc,a),c;if(h==e){if(tl(n,a))return{changes:{insert:e+e,from:a},effects:mt.of(a+e.length),range:b.cursor(a+e.length)};if(Hh(n,a)){let f=t&&n.sliceDoc(a,a+e.length*3)==e+e+e;return{range:b.cursor(a+e.length*(f?3:1)),effects:xr.of(a)}}}else{if(t&&n.sliceDoc(a-2*e.length,a)==e+e&&(c=il(n,a-2*e.length,s))>-1&&tl(n,c))return{changes:{insert:e+e+e+e,from:a},effects:mt.of(a+e.length),range:b.cursor(a+e.length)};if(n.charCategorizer(a)(h)!=q.Word&&il(n,a,s)>-1&&!wg(n,a,e,s))return{changes:{insert:e+e,from:a},effects:mt.of(a+e.length),range:b.cursor(a+e.length)}}return{range:r=l}});return r?null:n.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function tl(n,e){let t=be(n).resolveInner(e+1);return t.parent&&t.from==e}function wg(n,e,t,i){let s=be(n).resolveInner(e,-1),r=i.reduce((o,l)=>Math.max(o,l.length),0);for(let o=0;o<5;o++){let l=n.sliceDoc(s.from,Math.min(s.to,s.from+t.length+r)),a=l.indexOf(t);if(!a||a>-1&&i.indexOf(l.slice(0,a))>-1){let c=s.firstChild;for(;c&&c.from==s.from&&c.to-c.from>t.length+a;){if(n.sliceDoc(c.to-t.length,c.to)==t)return!1;c=c.firstChild}return!0}let h=s.to==e&&s.parent;if(!h)break;s=h}return!1}function il(n,e,t){let i=n.charCategorizer(e);if(i(n.sliceDoc(e-1,e))!=q.Word)return e;for(let s of t){let r=e-s.length;if(n.sliceDoc(r,e)==s&&i(n.sliceDoc(r-1,r))!=q.Word)return r}return-1}function _g(n={}){return[Me,Pe.of(n),Zp,kg,Ih]}const xg=[{key:"Ctrl-Space",run:Jp},{key:"Escape",run:_p},{key:"ArrowDown",run:qi(!0)},{key:"ArrowUp",run:qi(!1)},{key:"PageDown",run:qi(!0,"page")},{key:"PageUp",run:qi(!1,"page")},{key:"Enter",run:Gp}],kg=St.highest(er.computeN([Pe],n=>n.facet(Pe).defaultKeymap?[xg]:[]));export{Eg as A,Ig as B,kn as C,su as D,O as E,Ng as F,Pg as G,be as H,U as I,jg as J,Lp as K,Ls as L,b as M,tr as N,Lg as O,Ca as P,Rg as Q,Ug as R,Fa as S,W as T,Og as U,$u as V,N as a,Cg as b,Hg as c,vg as d,Sg as e,Fg as f,Wg as g,Dg as h,Gg as i,$g as j,er as k,Jg as l,qg as m,Kg as n,zg as o,xg as p,_g as q,Mg as r,Vg as s,Ag as t,ye as u,P as v,ku as w,x,Tg as y,Ou as z}; diff --git a/ui/dist/assets/index-7f786dc0.css b/ui/dist/assets/index-7f786dc0.css deleted file mode 100644 index 7c0e001d..00000000 --- a/ui/dist/assets/index-7f786dc0.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:remixicon;src:url(../fonts/remixicon/remixicon.woff2?v=1) format("woff2"),url(../fonts/remixicon/remixicon.woff?v=1) format("woff"),url(../fonts/remixicon/remixicon.ttf?v=1) format("truetype"),url(../fonts/remixicon/remixicon.svg?v=1#remixicon) format("svg");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-regular.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-regular.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-italic.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600italic.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700italic.woff) format("woff")}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:400;src:local(""),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-regular.woff2) format("woff2"),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-regular.woff) format("woff")}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:600;src:local(""),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-600.woff2) format("woff2"),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-600.woff) format("woff")}:root{--baseFontFamily: "Source Sans Pro", sans-serif, emoji;--monospaceFontFamily: "Ubuntu Mono", monospace, emoji;--iconFontFamily: "remixicon";--txtPrimaryColor: #16161a;--txtHintColor: #666f75;--txtDisabledColor: #a0a6ac;--primaryColor: #16161a;--bodyColor: #f8f9fa;--baseColor: #ffffff;--baseAlt1Color: #e4e9ec;--baseAlt2Color: #d7dde4;--baseAlt3Color: #c6cdd7;--baseAlt4Color: #a5b0c0;--infoColor: #3da9fc;--infoAltColor: #d8eefe;--successColor: #2cb67d;--successAltColor: #d6f5e8;--dangerColor: #e13756;--dangerAltColor: #fcdee4;--warningColor: #ff8e3c;--warningAltColor: #ffe7d6;--overlayColor: rgba(53, 71, 104, .25);--tooltipColor: rgba(0, 0, 0, .85);--shadowColor: rgba(0, 0, 0, .06);--baseFontSize: 14.5px;--xsFontSize: 12px;--smFontSize: 13px;--lgFontSize: 15px;--xlFontSize: 16px;--baseLineHeight: 22px;--smLineHeight: 16px;--lgLineHeight: 24px;--inputHeight: 34px;--btnHeight: 40px;--xsBtnHeight: 22px;--smBtnHeight: 30px;--lgBtnHeight: 54px;--baseSpacing: 30px;--xsSpacing: 15px;--smSpacing: 20px;--lgSpacing: 50px;--xlSpacing: 60px;--wrapperWidth: 850px;--smWrapperWidth: 420px;--lgWrapperWidth: 1200px;--appSidebarWidth: 75px;--pageSidebarWidth: 220px;--baseAnimationSpeed: .15s;--activeAnimationSpeed: 70ms;--entranceAnimationSpeed: .25s;--baseRadius: 3px;--lgRadius: 12px;--btnRadius: 3px;accent-color:var(--primaryColor)}html,body,div,span,applet,object,iframe,h1,h2,.breadcrumbs .breadcrumb-item,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}i{font-family:remixicon!important;font-style:normal;font-weight:400;font-size:1.1238rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}i:before{vertical-align:top;margin-top:1px;display:inline-block}.ri-24-hours-fill:before{content:"\ea01"}.ri-24-hours-line:before{content:"\ea02"}.ri-4k-fill:before{content:"\ea03"}.ri-4k-line:before{content:"\ea04"}.ri-a-b:before{content:"\ea05"}.ri-account-box-fill:before{content:"\ea06"}.ri-account-box-line:before{content:"\ea07"}.ri-account-circle-fill:before{content:"\ea08"}.ri-account-circle-line:before{content:"\ea09"}.ri-account-pin-box-fill:before{content:"\ea0a"}.ri-account-pin-box-line:before{content:"\ea0b"}.ri-account-pin-circle-fill:before{content:"\ea0c"}.ri-account-pin-circle-line:before{content:"\ea0d"}.ri-add-box-fill:before{content:"\ea0e"}.ri-add-box-line:before{content:"\ea0f"}.ri-add-circle-fill:before{content:"\ea10"}.ri-add-circle-line:before{content:"\ea11"}.ri-add-fill:before{content:"\ea12"}.ri-add-line:before{content:"\ea13"}.ri-admin-fill:before{content:"\ea14"}.ri-admin-line:before{content:"\ea15"}.ri-advertisement-fill:before{content:"\ea16"}.ri-advertisement-line:before{content:"\ea17"}.ri-airplay-fill:before{content:"\ea18"}.ri-airplay-line:before{content:"\ea19"}.ri-alarm-fill:before{content:"\ea1a"}.ri-alarm-line:before{content:"\ea1b"}.ri-alarm-warning-fill:before{content:"\ea1c"}.ri-alarm-warning-line:before{content:"\ea1d"}.ri-album-fill:before{content:"\ea1e"}.ri-album-line:before{content:"\ea1f"}.ri-alert-fill:before{content:"\ea20"}.ri-alert-line:before{content:"\ea21"}.ri-aliens-fill:before{content:"\ea22"}.ri-aliens-line:before{content:"\ea23"}.ri-align-bottom:before{content:"\ea24"}.ri-align-center:before{content:"\ea25"}.ri-align-justify:before{content:"\ea26"}.ri-align-left:before{content:"\ea27"}.ri-align-right:before{content:"\ea28"}.ri-align-top:before{content:"\ea29"}.ri-align-vertically:before{content:"\ea2a"}.ri-alipay-fill:before{content:"\ea2b"}.ri-alipay-line:before{content:"\ea2c"}.ri-amazon-fill:before{content:"\ea2d"}.ri-amazon-line:before{content:"\ea2e"}.ri-anchor-fill:before{content:"\ea2f"}.ri-anchor-line:before{content:"\ea30"}.ri-ancient-gate-fill:before{content:"\ea31"}.ri-ancient-gate-line:before{content:"\ea32"}.ri-ancient-pavilion-fill:before{content:"\ea33"}.ri-ancient-pavilion-line:before{content:"\ea34"}.ri-android-fill:before{content:"\ea35"}.ri-android-line:before{content:"\ea36"}.ri-angularjs-fill:before{content:"\ea37"}.ri-angularjs-line:before{content:"\ea38"}.ri-anticlockwise-2-fill:before{content:"\ea39"}.ri-anticlockwise-2-line:before{content:"\ea3a"}.ri-anticlockwise-fill:before{content:"\ea3b"}.ri-anticlockwise-line:before{content:"\ea3c"}.ri-app-store-fill:before{content:"\ea3d"}.ri-app-store-line:before{content:"\ea3e"}.ri-apple-fill:before{content:"\ea3f"}.ri-apple-line:before{content:"\ea40"}.ri-apps-2-fill:before{content:"\ea41"}.ri-apps-2-line:before{content:"\ea42"}.ri-apps-fill:before{content:"\ea43"}.ri-apps-line:before{content:"\ea44"}.ri-archive-drawer-fill:before{content:"\ea45"}.ri-archive-drawer-line:before{content:"\ea46"}.ri-archive-fill:before{content:"\ea47"}.ri-archive-line:before{content:"\ea48"}.ri-arrow-down-circle-fill:before{content:"\ea49"}.ri-arrow-down-circle-line:before{content:"\ea4a"}.ri-arrow-down-fill:before{content:"\ea4b"}.ri-arrow-down-line:before{content:"\ea4c"}.ri-arrow-down-s-fill:before{content:"\ea4d"}.ri-arrow-down-s-line:before{content:"\ea4e"}.ri-arrow-drop-down-fill:before{content:"\ea4f"}.ri-arrow-drop-down-line:before{content:"\ea50"}.ri-arrow-drop-left-fill:before{content:"\ea51"}.ri-arrow-drop-left-line:before{content:"\ea52"}.ri-arrow-drop-right-fill:before{content:"\ea53"}.ri-arrow-drop-right-line:before{content:"\ea54"}.ri-arrow-drop-up-fill:before{content:"\ea55"}.ri-arrow-drop-up-line:before{content:"\ea56"}.ri-arrow-go-back-fill:before{content:"\ea57"}.ri-arrow-go-back-line:before{content:"\ea58"}.ri-arrow-go-forward-fill:before{content:"\ea59"}.ri-arrow-go-forward-line:before{content:"\ea5a"}.ri-arrow-left-circle-fill:before{content:"\ea5b"}.ri-arrow-left-circle-line:before{content:"\ea5c"}.ri-arrow-left-down-fill:before{content:"\ea5d"}.ri-arrow-left-down-line:before{content:"\ea5e"}.ri-arrow-left-fill:before{content:"\ea5f"}.ri-arrow-left-line:before{content:"\ea60"}.ri-arrow-left-right-fill:before{content:"\ea61"}.ri-arrow-left-right-line:before{content:"\ea62"}.ri-arrow-left-s-fill:before{content:"\ea63"}.ri-arrow-left-s-line:before{content:"\ea64"}.ri-arrow-left-up-fill:before{content:"\ea65"}.ri-arrow-left-up-line:before{content:"\ea66"}.ri-arrow-right-circle-fill:before{content:"\ea67"}.ri-arrow-right-circle-line:before{content:"\ea68"}.ri-arrow-right-down-fill:before{content:"\ea69"}.ri-arrow-right-down-line:before{content:"\ea6a"}.ri-arrow-right-fill:before{content:"\ea6b"}.ri-arrow-right-line:before{content:"\ea6c"}.ri-arrow-right-s-fill:before{content:"\ea6d"}.ri-arrow-right-s-line:before{content:"\ea6e"}.ri-arrow-right-up-fill:before{content:"\ea6f"}.ri-arrow-right-up-line:before{content:"\ea70"}.ri-arrow-up-circle-fill:before{content:"\ea71"}.ri-arrow-up-circle-line:before{content:"\ea72"}.ri-arrow-up-down-fill:before{content:"\ea73"}.ri-arrow-up-down-line:before{content:"\ea74"}.ri-arrow-up-fill:before{content:"\ea75"}.ri-arrow-up-line:before{content:"\ea76"}.ri-arrow-up-s-fill:before{content:"\ea77"}.ri-arrow-up-s-line:before{content:"\ea78"}.ri-artboard-2-fill:before{content:"\ea79"}.ri-artboard-2-line:before{content:"\ea7a"}.ri-artboard-fill:before{content:"\ea7b"}.ri-artboard-line:before{content:"\ea7c"}.ri-article-fill:before{content:"\ea7d"}.ri-article-line:before{content:"\ea7e"}.ri-aspect-ratio-fill:before{content:"\ea7f"}.ri-aspect-ratio-line:before{content:"\ea80"}.ri-asterisk:before{content:"\ea81"}.ri-at-fill:before{content:"\ea82"}.ri-at-line:before{content:"\ea83"}.ri-attachment-2:before{content:"\ea84"}.ri-attachment-fill:before{content:"\ea85"}.ri-attachment-line:before{content:"\ea86"}.ri-auction-fill:before{content:"\ea87"}.ri-auction-line:before{content:"\ea88"}.ri-award-fill:before{content:"\ea89"}.ri-award-line:before{content:"\ea8a"}.ri-baidu-fill:before{content:"\ea8b"}.ri-baidu-line:before{content:"\ea8c"}.ri-ball-pen-fill:before{content:"\ea8d"}.ri-ball-pen-line:before{content:"\ea8e"}.ri-bank-card-2-fill:before{content:"\ea8f"}.ri-bank-card-2-line:before{content:"\ea90"}.ri-bank-card-fill:before{content:"\ea91"}.ri-bank-card-line:before{content:"\ea92"}.ri-bank-fill:before{content:"\ea93"}.ri-bank-line:before{content:"\ea94"}.ri-bar-chart-2-fill:before{content:"\ea95"}.ri-bar-chart-2-line:before{content:"\ea96"}.ri-bar-chart-box-fill:before{content:"\ea97"}.ri-bar-chart-box-line:before{content:"\ea98"}.ri-bar-chart-fill:before{content:"\ea99"}.ri-bar-chart-grouped-fill:before{content:"\ea9a"}.ri-bar-chart-grouped-line:before{content:"\ea9b"}.ri-bar-chart-horizontal-fill:before{content:"\ea9c"}.ri-bar-chart-horizontal-line:before{content:"\ea9d"}.ri-bar-chart-line:before{content:"\ea9e"}.ri-barcode-box-fill:before{content:"\ea9f"}.ri-barcode-box-line:before{content:"\eaa0"}.ri-barcode-fill:before{content:"\eaa1"}.ri-barcode-line:before{content:"\eaa2"}.ri-barricade-fill:before{content:"\eaa3"}.ri-barricade-line:before{content:"\eaa4"}.ri-base-station-fill:before{content:"\eaa5"}.ri-base-station-line:before{content:"\eaa6"}.ri-basketball-fill:before{content:"\eaa7"}.ri-basketball-line:before{content:"\eaa8"}.ri-battery-2-charge-fill:before{content:"\eaa9"}.ri-battery-2-charge-line:before{content:"\eaaa"}.ri-battery-2-fill:before{content:"\eaab"}.ri-battery-2-line:before{content:"\eaac"}.ri-battery-charge-fill:before{content:"\eaad"}.ri-battery-charge-line:before{content:"\eaae"}.ri-battery-fill:before{content:"\eaaf"}.ri-battery-line:before{content:"\eab0"}.ri-battery-low-fill:before{content:"\eab1"}.ri-battery-low-line:before{content:"\eab2"}.ri-battery-saver-fill:before{content:"\eab3"}.ri-battery-saver-line:before{content:"\eab4"}.ri-battery-share-fill:before{content:"\eab5"}.ri-battery-share-line:before{content:"\eab6"}.ri-bear-smile-fill:before{content:"\eab7"}.ri-bear-smile-line:before{content:"\eab8"}.ri-behance-fill:before{content:"\eab9"}.ri-behance-line:before{content:"\eaba"}.ri-bell-fill:before{content:"\eabb"}.ri-bell-line:before{content:"\eabc"}.ri-bike-fill:before{content:"\eabd"}.ri-bike-line:before{content:"\eabe"}.ri-bilibili-fill:before{content:"\eabf"}.ri-bilibili-line:before{content:"\eac0"}.ri-bill-fill:before{content:"\eac1"}.ri-bill-line:before{content:"\eac2"}.ri-billiards-fill:before{content:"\eac3"}.ri-billiards-line:before{content:"\eac4"}.ri-bit-coin-fill:before{content:"\eac5"}.ri-bit-coin-line:before{content:"\eac6"}.ri-blaze-fill:before{content:"\eac7"}.ri-blaze-line:before{content:"\eac8"}.ri-bluetooth-connect-fill:before{content:"\eac9"}.ri-bluetooth-connect-line:before{content:"\eaca"}.ri-bluetooth-fill:before{content:"\eacb"}.ri-bluetooth-line:before{content:"\eacc"}.ri-blur-off-fill:before{content:"\eacd"}.ri-blur-off-line:before{content:"\eace"}.ri-body-scan-fill:before{content:"\eacf"}.ri-body-scan-line:before{content:"\ead0"}.ri-bold:before{content:"\ead1"}.ri-book-2-fill:before{content:"\ead2"}.ri-book-2-line:before{content:"\ead3"}.ri-book-3-fill:before{content:"\ead4"}.ri-book-3-line:before{content:"\ead5"}.ri-book-fill:before{content:"\ead6"}.ri-book-line:before{content:"\ead7"}.ri-book-mark-fill:before{content:"\ead8"}.ri-book-mark-line:before{content:"\ead9"}.ri-book-open-fill:before{content:"\eada"}.ri-book-open-line:before{content:"\eadb"}.ri-book-read-fill:before{content:"\eadc"}.ri-book-read-line:before{content:"\eadd"}.ri-booklet-fill:before{content:"\eade"}.ri-booklet-line:before{content:"\eadf"}.ri-bookmark-2-fill:before{content:"\eae0"}.ri-bookmark-2-line:before{content:"\eae1"}.ri-bookmark-3-fill:before{content:"\eae2"}.ri-bookmark-3-line:before{content:"\eae3"}.ri-bookmark-fill:before{content:"\eae4"}.ri-bookmark-line:before{content:"\eae5"}.ri-boxing-fill:before{content:"\eae6"}.ri-boxing-line:before{content:"\eae7"}.ri-braces-fill:before{content:"\eae8"}.ri-braces-line:before{content:"\eae9"}.ri-brackets-fill:before{content:"\eaea"}.ri-brackets-line:before{content:"\eaeb"}.ri-briefcase-2-fill:before{content:"\eaec"}.ri-briefcase-2-line:before{content:"\eaed"}.ri-briefcase-3-fill:before{content:"\eaee"}.ri-briefcase-3-line:before{content:"\eaef"}.ri-briefcase-4-fill:before{content:"\eaf0"}.ri-briefcase-4-line:before{content:"\eaf1"}.ri-briefcase-5-fill:before{content:"\eaf2"}.ri-briefcase-5-line:before{content:"\eaf3"}.ri-briefcase-fill:before{content:"\eaf4"}.ri-briefcase-line:before{content:"\eaf5"}.ri-bring-forward:before{content:"\eaf6"}.ri-bring-to-front:before{content:"\eaf7"}.ri-broadcast-fill:before{content:"\eaf8"}.ri-broadcast-line:before{content:"\eaf9"}.ri-brush-2-fill:before{content:"\eafa"}.ri-brush-2-line:before{content:"\eafb"}.ri-brush-3-fill:before{content:"\eafc"}.ri-brush-3-line:before{content:"\eafd"}.ri-brush-4-fill:before{content:"\eafe"}.ri-brush-4-line:before{content:"\eaff"}.ri-brush-fill:before{content:"\eb00"}.ri-brush-line:before{content:"\eb01"}.ri-bubble-chart-fill:before{content:"\eb02"}.ri-bubble-chart-line:before{content:"\eb03"}.ri-bug-2-fill:before{content:"\eb04"}.ri-bug-2-line:before{content:"\eb05"}.ri-bug-fill:before{content:"\eb06"}.ri-bug-line:before{content:"\eb07"}.ri-building-2-fill:before{content:"\eb08"}.ri-building-2-line:before{content:"\eb09"}.ri-building-3-fill:before{content:"\eb0a"}.ri-building-3-line:before{content:"\eb0b"}.ri-building-4-fill:before{content:"\eb0c"}.ri-building-4-line:before{content:"\eb0d"}.ri-building-fill:before{content:"\eb0e"}.ri-building-line:before{content:"\eb0f"}.ri-bus-2-fill:before{content:"\eb10"}.ri-bus-2-line:before{content:"\eb11"}.ri-bus-fill:before{content:"\eb12"}.ri-bus-line:before{content:"\eb13"}.ri-bus-wifi-fill:before{content:"\eb14"}.ri-bus-wifi-line:before{content:"\eb15"}.ri-cactus-fill:before{content:"\eb16"}.ri-cactus-line:before{content:"\eb17"}.ri-cake-2-fill:before{content:"\eb18"}.ri-cake-2-line:before{content:"\eb19"}.ri-cake-3-fill:before{content:"\eb1a"}.ri-cake-3-line:before{content:"\eb1b"}.ri-cake-fill:before{content:"\eb1c"}.ri-cake-line:before{content:"\eb1d"}.ri-calculator-fill:before{content:"\eb1e"}.ri-calculator-line:before{content:"\eb1f"}.ri-calendar-2-fill:before{content:"\eb20"}.ri-calendar-2-line:before{content:"\eb21"}.ri-calendar-check-fill:before{content:"\eb22"}.ri-calendar-check-line:before{content:"\eb23"}.ri-calendar-event-fill:before{content:"\eb24"}.ri-calendar-event-line:before{content:"\eb25"}.ri-calendar-fill:before{content:"\eb26"}.ri-calendar-line:before{content:"\eb27"}.ri-calendar-todo-fill:before{content:"\eb28"}.ri-calendar-todo-line:before{content:"\eb29"}.ri-camera-2-fill:before{content:"\eb2a"}.ri-camera-2-line:before{content:"\eb2b"}.ri-camera-3-fill:before{content:"\eb2c"}.ri-camera-3-line:before{content:"\eb2d"}.ri-camera-fill:before{content:"\eb2e"}.ri-camera-lens-fill:before{content:"\eb2f"}.ri-camera-lens-line:before{content:"\eb30"}.ri-camera-line:before{content:"\eb31"}.ri-camera-off-fill:before{content:"\eb32"}.ri-camera-off-line:before{content:"\eb33"}.ri-camera-switch-fill:before{content:"\eb34"}.ri-camera-switch-line:before{content:"\eb35"}.ri-capsule-fill:before{content:"\eb36"}.ri-capsule-line:before{content:"\eb37"}.ri-car-fill:before{content:"\eb38"}.ri-car-line:before{content:"\eb39"}.ri-car-washing-fill:before{content:"\eb3a"}.ri-car-washing-line:before{content:"\eb3b"}.ri-caravan-fill:before{content:"\eb3c"}.ri-caravan-line:before{content:"\eb3d"}.ri-cast-fill:before{content:"\eb3e"}.ri-cast-line:before{content:"\eb3f"}.ri-cellphone-fill:before{content:"\eb40"}.ri-cellphone-line:before{content:"\eb41"}.ri-celsius-fill:before{content:"\eb42"}.ri-celsius-line:before{content:"\eb43"}.ri-centos-fill:before{content:"\eb44"}.ri-centos-line:before{content:"\eb45"}.ri-character-recognition-fill:before{content:"\eb46"}.ri-character-recognition-line:before{content:"\eb47"}.ri-charging-pile-2-fill:before{content:"\eb48"}.ri-charging-pile-2-line:before{content:"\eb49"}.ri-charging-pile-fill:before{content:"\eb4a"}.ri-charging-pile-line:before{content:"\eb4b"}.ri-chat-1-fill:before{content:"\eb4c"}.ri-chat-1-line:before{content:"\eb4d"}.ri-chat-2-fill:before{content:"\eb4e"}.ri-chat-2-line:before{content:"\eb4f"}.ri-chat-3-fill:before{content:"\eb50"}.ri-chat-3-line:before{content:"\eb51"}.ri-chat-4-fill:before{content:"\eb52"}.ri-chat-4-line:before{content:"\eb53"}.ri-chat-check-fill:before{content:"\eb54"}.ri-chat-check-line:before{content:"\eb55"}.ri-chat-delete-fill:before{content:"\eb56"}.ri-chat-delete-line:before{content:"\eb57"}.ri-chat-download-fill:before{content:"\eb58"}.ri-chat-download-line:before{content:"\eb59"}.ri-chat-follow-up-fill:before{content:"\eb5a"}.ri-chat-follow-up-line:before{content:"\eb5b"}.ri-chat-forward-fill:before{content:"\eb5c"}.ri-chat-forward-line:before{content:"\eb5d"}.ri-chat-heart-fill:before{content:"\eb5e"}.ri-chat-heart-line:before{content:"\eb5f"}.ri-chat-history-fill:before{content:"\eb60"}.ri-chat-history-line:before{content:"\eb61"}.ri-chat-new-fill:before{content:"\eb62"}.ri-chat-new-line:before{content:"\eb63"}.ri-chat-off-fill:before{content:"\eb64"}.ri-chat-off-line:before{content:"\eb65"}.ri-chat-poll-fill:before{content:"\eb66"}.ri-chat-poll-line:before{content:"\eb67"}.ri-chat-private-fill:before{content:"\eb68"}.ri-chat-private-line:before{content:"\eb69"}.ri-chat-quote-fill:before{content:"\eb6a"}.ri-chat-quote-line:before{content:"\eb6b"}.ri-chat-settings-fill:before{content:"\eb6c"}.ri-chat-settings-line:before{content:"\eb6d"}.ri-chat-smile-2-fill:before{content:"\eb6e"}.ri-chat-smile-2-line:before{content:"\eb6f"}.ri-chat-smile-3-fill:before{content:"\eb70"}.ri-chat-smile-3-line:before{content:"\eb71"}.ri-chat-smile-fill:before{content:"\eb72"}.ri-chat-smile-line:before{content:"\eb73"}.ri-chat-upload-fill:before{content:"\eb74"}.ri-chat-upload-line:before{content:"\eb75"}.ri-chat-voice-fill:before{content:"\eb76"}.ri-chat-voice-line:before{content:"\eb77"}.ri-check-double-fill:before{content:"\eb78"}.ri-check-double-line:before{content:"\eb79"}.ri-check-fill:before{content:"\eb7a"}.ri-check-line:before{content:"\eb7b"}.ri-checkbox-blank-circle-fill:before{content:"\eb7c"}.ri-checkbox-blank-circle-line:before{content:"\eb7d"}.ri-checkbox-blank-fill:before{content:"\eb7e"}.ri-checkbox-blank-line:before{content:"\eb7f"}.ri-checkbox-circle-fill:before{content:"\eb80"}.ri-checkbox-circle-line:before{content:"\eb81"}.ri-checkbox-fill:before{content:"\eb82"}.ri-checkbox-indeterminate-fill:before{content:"\eb83"}.ri-checkbox-indeterminate-line:before{content:"\eb84"}.ri-checkbox-line:before{content:"\eb85"}.ri-checkbox-multiple-blank-fill:before{content:"\eb86"}.ri-checkbox-multiple-blank-line:before{content:"\eb87"}.ri-checkbox-multiple-fill:before{content:"\eb88"}.ri-checkbox-multiple-line:before{content:"\eb89"}.ri-china-railway-fill:before{content:"\eb8a"}.ri-china-railway-line:before{content:"\eb8b"}.ri-chrome-fill:before{content:"\eb8c"}.ri-chrome-line:before{content:"\eb8d"}.ri-clapperboard-fill:before{content:"\eb8e"}.ri-clapperboard-line:before{content:"\eb8f"}.ri-clipboard-fill:before{content:"\eb90"}.ri-clipboard-line:before{content:"\eb91"}.ri-clockwise-2-fill:before{content:"\eb92"}.ri-clockwise-2-line:before{content:"\eb93"}.ri-clockwise-fill:before{content:"\eb94"}.ri-clockwise-line:before{content:"\eb95"}.ri-close-circle-fill:before{content:"\eb96"}.ri-close-circle-line:before{content:"\eb97"}.ri-close-fill:before{content:"\eb98"}.ri-close-line:before{content:"\eb99"}.ri-closed-captioning-fill:before{content:"\eb9a"}.ri-closed-captioning-line:before{content:"\eb9b"}.ri-cloud-fill:before{content:"\eb9c"}.ri-cloud-line:before{content:"\eb9d"}.ri-cloud-off-fill:before{content:"\eb9e"}.ri-cloud-off-line:before{content:"\eb9f"}.ri-cloud-windy-fill:before{content:"\eba0"}.ri-cloud-windy-line:before{content:"\eba1"}.ri-cloudy-2-fill:before{content:"\eba2"}.ri-cloudy-2-line:before{content:"\eba3"}.ri-cloudy-fill:before{content:"\eba4"}.ri-cloudy-line:before{content:"\eba5"}.ri-code-box-fill:before{content:"\eba6"}.ri-code-box-line:before{content:"\eba7"}.ri-code-fill:before{content:"\eba8"}.ri-code-line:before{content:"\eba9"}.ri-code-s-fill:before{content:"\ebaa"}.ri-code-s-line:before{content:"\ebab"}.ri-code-s-slash-fill:before{content:"\ebac"}.ri-code-s-slash-line:before{content:"\ebad"}.ri-code-view:before{content:"\ebae"}.ri-codepen-fill:before{content:"\ebaf"}.ri-codepen-line:before{content:"\ebb0"}.ri-coin-fill:before{content:"\ebb1"}.ri-coin-line:before{content:"\ebb2"}.ri-coins-fill:before{content:"\ebb3"}.ri-coins-line:before{content:"\ebb4"}.ri-collage-fill:before{content:"\ebb5"}.ri-collage-line:before{content:"\ebb6"}.ri-command-fill:before{content:"\ebb7"}.ri-command-line:before{content:"\ebb8"}.ri-community-fill:before{content:"\ebb9"}.ri-community-line:before{content:"\ebba"}.ri-compass-2-fill:before{content:"\ebbb"}.ri-compass-2-line:before{content:"\ebbc"}.ri-compass-3-fill:before{content:"\ebbd"}.ri-compass-3-line:before{content:"\ebbe"}.ri-compass-4-fill:before{content:"\ebbf"}.ri-compass-4-line:before{content:"\ebc0"}.ri-compass-discover-fill:before{content:"\ebc1"}.ri-compass-discover-line:before{content:"\ebc2"}.ri-compass-fill:before{content:"\ebc3"}.ri-compass-line:before{content:"\ebc4"}.ri-compasses-2-fill:before{content:"\ebc5"}.ri-compasses-2-line:before{content:"\ebc6"}.ri-compasses-fill:before{content:"\ebc7"}.ri-compasses-line:before{content:"\ebc8"}.ri-computer-fill:before{content:"\ebc9"}.ri-computer-line:before{content:"\ebca"}.ri-contacts-book-2-fill:before{content:"\ebcb"}.ri-contacts-book-2-line:before{content:"\ebcc"}.ri-contacts-book-fill:before{content:"\ebcd"}.ri-contacts-book-line:before{content:"\ebce"}.ri-contacts-book-upload-fill:before{content:"\ebcf"}.ri-contacts-book-upload-line:before{content:"\ebd0"}.ri-contacts-fill:before{content:"\ebd1"}.ri-contacts-line:before{content:"\ebd2"}.ri-contrast-2-fill:before{content:"\ebd3"}.ri-contrast-2-line:before{content:"\ebd4"}.ri-contrast-drop-2-fill:before{content:"\ebd5"}.ri-contrast-drop-2-line:before{content:"\ebd6"}.ri-contrast-drop-fill:before{content:"\ebd7"}.ri-contrast-drop-line:before{content:"\ebd8"}.ri-contrast-fill:before{content:"\ebd9"}.ri-contrast-line:before{content:"\ebda"}.ri-copper-coin-fill:before{content:"\ebdb"}.ri-copper-coin-line:before{content:"\ebdc"}.ri-copper-diamond-fill:before{content:"\ebdd"}.ri-copper-diamond-line:before{content:"\ebde"}.ri-copyleft-fill:before{content:"\ebdf"}.ri-copyleft-line:before{content:"\ebe0"}.ri-copyright-fill:before{content:"\ebe1"}.ri-copyright-line:before{content:"\ebe2"}.ri-coreos-fill:before{content:"\ebe3"}.ri-coreos-line:before{content:"\ebe4"}.ri-coupon-2-fill:before{content:"\ebe5"}.ri-coupon-2-line:before{content:"\ebe6"}.ri-coupon-3-fill:before{content:"\ebe7"}.ri-coupon-3-line:before{content:"\ebe8"}.ri-coupon-4-fill:before{content:"\ebe9"}.ri-coupon-4-line:before{content:"\ebea"}.ri-coupon-5-fill:before{content:"\ebeb"}.ri-coupon-5-line:before{content:"\ebec"}.ri-coupon-fill:before{content:"\ebed"}.ri-coupon-line:before{content:"\ebee"}.ri-cpu-fill:before{content:"\ebef"}.ri-cpu-line:before{content:"\ebf0"}.ri-creative-commons-by-fill:before{content:"\ebf1"}.ri-creative-commons-by-line:before{content:"\ebf2"}.ri-creative-commons-fill:before{content:"\ebf3"}.ri-creative-commons-line:before{content:"\ebf4"}.ri-creative-commons-nc-fill:before{content:"\ebf5"}.ri-creative-commons-nc-line:before{content:"\ebf6"}.ri-creative-commons-nd-fill:before{content:"\ebf7"}.ri-creative-commons-nd-line:before{content:"\ebf8"}.ri-creative-commons-sa-fill:before{content:"\ebf9"}.ri-creative-commons-sa-line:before{content:"\ebfa"}.ri-creative-commons-zero-fill:before{content:"\ebfb"}.ri-creative-commons-zero-line:before{content:"\ebfc"}.ri-criminal-fill:before{content:"\ebfd"}.ri-criminal-line:before{content:"\ebfe"}.ri-crop-2-fill:before{content:"\ebff"}.ri-crop-2-line:before{content:"\ec00"}.ri-crop-fill:before{content:"\ec01"}.ri-crop-line:before{content:"\ec02"}.ri-css3-fill:before{content:"\ec03"}.ri-css3-line:before{content:"\ec04"}.ri-cup-fill:before{content:"\ec05"}.ri-cup-line:before{content:"\ec06"}.ri-currency-fill:before{content:"\ec07"}.ri-currency-line:before{content:"\ec08"}.ri-cursor-fill:before{content:"\ec09"}.ri-cursor-line:before{content:"\ec0a"}.ri-customer-service-2-fill:before{content:"\ec0b"}.ri-customer-service-2-line:before{content:"\ec0c"}.ri-customer-service-fill:before{content:"\ec0d"}.ri-customer-service-line:before{content:"\ec0e"}.ri-dashboard-2-fill:before{content:"\ec0f"}.ri-dashboard-2-line:before{content:"\ec10"}.ri-dashboard-3-fill:before{content:"\ec11"}.ri-dashboard-3-line:before{content:"\ec12"}.ri-dashboard-fill:before{content:"\ec13"}.ri-dashboard-line:before{content:"\ec14"}.ri-database-2-fill:before{content:"\ec15"}.ri-database-2-line:before{content:"\ec16"}.ri-database-fill:before{content:"\ec17"}.ri-database-line:before{content:"\ec18"}.ri-delete-back-2-fill:before{content:"\ec19"}.ri-delete-back-2-line:before{content:"\ec1a"}.ri-delete-back-fill:before{content:"\ec1b"}.ri-delete-back-line:before{content:"\ec1c"}.ri-delete-bin-2-fill:before{content:"\ec1d"}.ri-delete-bin-2-line:before{content:"\ec1e"}.ri-delete-bin-3-fill:before{content:"\ec1f"}.ri-delete-bin-3-line:before{content:"\ec20"}.ri-delete-bin-4-fill:before{content:"\ec21"}.ri-delete-bin-4-line:before{content:"\ec22"}.ri-delete-bin-5-fill:before{content:"\ec23"}.ri-delete-bin-5-line:before{content:"\ec24"}.ri-delete-bin-6-fill:before{content:"\ec25"}.ri-delete-bin-6-line:before{content:"\ec26"}.ri-delete-bin-7-fill:before{content:"\ec27"}.ri-delete-bin-7-line:before{content:"\ec28"}.ri-delete-bin-fill:before{content:"\ec29"}.ri-delete-bin-line:before{content:"\ec2a"}.ri-delete-column:before{content:"\ec2b"}.ri-delete-row:before{content:"\ec2c"}.ri-device-fill:before{content:"\ec2d"}.ri-device-line:before{content:"\ec2e"}.ri-device-recover-fill:before{content:"\ec2f"}.ri-device-recover-line:before{content:"\ec30"}.ri-dingding-fill:before{content:"\ec31"}.ri-dingding-line:before{content:"\ec32"}.ri-direction-fill:before{content:"\ec33"}.ri-direction-line:before{content:"\ec34"}.ri-disc-fill:before{content:"\ec35"}.ri-disc-line:before{content:"\ec36"}.ri-discord-fill:before{content:"\ec37"}.ri-discord-line:before{content:"\ec38"}.ri-discuss-fill:before{content:"\ec39"}.ri-discuss-line:before{content:"\ec3a"}.ri-dislike-fill:before{content:"\ec3b"}.ri-dislike-line:before{content:"\ec3c"}.ri-disqus-fill:before{content:"\ec3d"}.ri-disqus-line:before{content:"\ec3e"}.ri-divide-fill:before{content:"\ec3f"}.ri-divide-line:before{content:"\ec40"}.ri-donut-chart-fill:before{content:"\ec41"}.ri-donut-chart-line:before{content:"\ec42"}.ri-door-closed-fill:before{content:"\ec43"}.ri-door-closed-line:before{content:"\ec44"}.ri-door-fill:before{content:"\ec45"}.ri-door-line:before{content:"\ec46"}.ri-door-lock-box-fill:before{content:"\ec47"}.ri-door-lock-box-line:before{content:"\ec48"}.ri-door-lock-fill:before{content:"\ec49"}.ri-door-lock-line:before{content:"\ec4a"}.ri-door-open-fill:before{content:"\ec4b"}.ri-door-open-line:before{content:"\ec4c"}.ri-dossier-fill:before{content:"\ec4d"}.ri-dossier-line:before{content:"\ec4e"}.ri-douban-fill:before{content:"\ec4f"}.ri-douban-line:before{content:"\ec50"}.ri-double-quotes-l:before{content:"\ec51"}.ri-double-quotes-r:before{content:"\ec52"}.ri-download-2-fill:before{content:"\ec53"}.ri-download-2-line:before{content:"\ec54"}.ri-download-cloud-2-fill:before{content:"\ec55"}.ri-download-cloud-2-line:before{content:"\ec56"}.ri-download-cloud-fill:before{content:"\ec57"}.ri-download-cloud-line:before{content:"\ec58"}.ri-download-fill:before{content:"\ec59"}.ri-download-line:before{content:"\ec5a"}.ri-draft-fill:before{content:"\ec5b"}.ri-draft-line:before{content:"\ec5c"}.ri-drag-drop-fill:before{content:"\ec5d"}.ri-drag-drop-line:before{content:"\ec5e"}.ri-drag-move-2-fill:before{content:"\ec5f"}.ri-drag-move-2-line:before{content:"\ec60"}.ri-drag-move-fill:before{content:"\ec61"}.ri-drag-move-line:before{content:"\ec62"}.ri-dribbble-fill:before{content:"\ec63"}.ri-dribbble-line:before{content:"\ec64"}.ri-drive-fill:before{content:"\ec65"}.ri-drive-line:before{content:"\ec66"}.ri-drizzle-fill:before{content:"\ec67"}.ri-drizzle-line:before{content:"\ec68"}.ri-drop-fill:before{content:"\ec69"}.ri-drop-line:before{content:"\ec6a"}.ri-dropbox-fill:before{content:"\ec6b"}.ri-dropbox-line:before{content:"\ec6c"}.ri-dual-sim-1-fill:before{content:"\ec6d"}.ri-dual-sim-1-line:before{content:"\ec6e"}.ri-dual-sim-2-fill:before{content:"\ec6f"}.ri-dual-sim-2-line:before{content:"\ec70"}.ri-dv-fill:before{content:"\ec71"}.ri-dv-line:before{content:"\ec72"}.ri-dvd-fill:before{content:"\ec73"}.ri-dvd-line:before{content:"\ec74"}.ri-e-bike-2-fill:before{content:"\ec75"}.ri-e-bike-2-line:before{content:"\ec76"}.ri-e-bike-fill:before{content:"\ec77"}.ri-e-bike-line:before{content:"\ec78"}.ri-earth-fill:before{content:"\ec79"}.ri-earth-line:before{content:"\ec7a"}.ri-earthquake-fill:before{content:"\ec7b"}.ri-earthquake-line:before{content:"\ec7c"}.ri-edge-fill:before{content:"\ec7d"}.ri-edge-line:before{content:"\ec7e"}.ri-edit-2-fill:before{content:"\ec7f"}.ri-edit-2-line:before{content:"\ec80"}.ri-edit-box-fill:before{content:"\ec81"}.ri-edit-box-line:before{content:"\ec82"}.ri-edit-circle-fill:before{content:"\ec83"}.ri-edit-circle-line:before{content:"\ec84"}.ri-edit-fill:before{content:"\ec85"}.ri-edit-line:before{content:"\ec86"}.ri-eject-fill:before{content:"\ec87"}.ri-eject-line:before{content:"\ec88"}.ri-emotion-2-fill:before{content:"\ec89"}.ri-emotion-2-line:before{content:"\ec8a"}.ri-emotion-fill:before{content:"\ec8b"}.ri-emotion-happy-fill:before{content:"\ec8c"}.ri-emotion-happy-line:before{content:"\ec8d"}.ri-emotion-laugh-fill:before{content:"\ec8e"}.ri-emotion-laugh-line:before{content:"\ec8f"}.ri-emotion-line:before{content:"\ec90"}.ri-emotion-normal-fill:before{content:"\ec91"}.ri-emotion-normal-line:before{content:"\ec92"}.ri-emotion-sad-fill:before{content:"\ec93"}.ri-emotion-sad-line:before{content:"\ec94"}.ri-emotion-unhappy-fill:before{content:"\ec95"}.ri-emotion-unhappy-line:before{content:"\ec96"}.ri-empathize-fill:before{content:"\ec97"}.ri-empathize-line:before{content:"\ec98"}.ri-emphasis-cn:before{content:"\ec99"}.ri-emphasis:before{content:"\ec9a"}.ri-english-input:before{content:"\ec9b"}.ri-equalizer-fill:before{content:"\ec9c"}.ri-equalizer-line:before{content:"\ec9d"}.ri-eraser-fill:before{content:"\ec9e"}.ri-eraser-line:before{content:"\ec9f"}.ri-error-warning-fill:before{content:"\eca0"}.ri-error-warning-line:before{content:"\eca1"}.ri-evernote-fill:before{content:"\eca2"}.ri-evernote-line:before{content:"\eca3"}.ri-exchange-box-fill:before{content:"\eca4"}.ri-exchange-box-line:before{content:"\eca5"}.ri-exchange-cny-fill:before{content:"\eca6"}.ri-exchange-cny-line:before{content:"\eca7"}.ri-exchange-dollar-fill:before{content:"\eca8"}.ri-exchange-dollar-line:before{content:"\eca9"}.ri-exchange-fill:before{content:"\ecaa"}.ri-exchange-funds-fill:before{content:"\ecab"}.ri-exchange-funds-line:before{content:"\ecac"}.ri-exchange-line:before{content:"\ecad"}.ri-external-link-fill:before{content:"\ecae"}.ri-external-link-line:before{content:"\ecaf"}.ri-eye-2-fill:before{content:"\ecb0"}.ri-eye-2-line:before{content:"\ecb1"}.ri-eye-close-fill:before{content:"\ecb2"}.ri-eye-close-line:before{content:"\ecb3"}.ri-eye-fill:before{content:"\ecb4"}.ri-eye-line:before{content:"\ecb5"}.ri-eye-off-fill:before{content:"\ecb6"}.ri-eye-off-line:before{content:"\ecb7"}.ri-facebook-box-fill:before{content:"\ecb8"}.ri-facebook-box-line:before{content:"\ecb9"}.ri-facebook-circle-fill:before{content:"\ecba"}.ri-facebook-circle-line:before{content:"\ecbb"}.ri-facebook-fill:before{content:"\ecbc"}.ri-facebook-line:before{content:"\ecbd"}.ri-fahrenheit-fill:before{content:"\ecbe"}.ri-fahrenheit-line:before{content:"\ecbf"}.ri-feedback-fill:before{content:"\ecc0"}.ri-feedback-line:before{content:"\ecc1"}.ri-file-2-fill:before{content:"\ecc2"}.ri-file-2-line:before{content:"\ecc3"}.ri-file-3-fill:before{content:"\ecc4"}.ri-file-3-line:before{content:"\ecc5"}.ri-file-4-fill:before{content:"\ecc6"}.ri-file-4-line:before{content:"\ecc7"}.ri-file-add-fill:before{content:"\ecc8"}.ri-file-add-line:before{content:"\ecc9"}.ri-file-chart-2-fill:before{content:"\ecca"}.ri-file-chart-2-line:before{content:"\eccb"}.ri-file-chart-fill:before{content:"\eccc"}.ri-file-chart-line:before{content:"\eccd"}.ri-file-cloud-fill:before{content:"\ecce"}.ri-file-cloud-line:before{content:"\eccf"}.ri-file-code-fill:before{content:"\ecd0"}.ri-file-code-line:before{content:"\ecd1"}.ri-file-copy-2-fill:before{content:"\ecd2"}.ri-file-copy-2-line:before{content:"\ecd3"}.ri-file-copy-fill:before{content:"\ecd4"}.ri-file-copy-line:before{content:"\ecd5"}.ri-file-damage-fill:before{content:"\ecd6"}.ri-file-damage-line:before{content:"\ecd7"}.ri-file-download-fill:before{content:"\ecd8"}.ri-file-download-line:before{content:"\ecd9"}.ri-file-edit-fill:before{content:"\ecda"}.ri-file-edit-line:before{content:"\ecdb"}.ri-file-excel-2-fill:before{content:"\ecdc"}.ri-file-excel-2-line:before{content:"\ecdd"}.ri-file-excel-fill:before{content:"\ecde"}.ri-file-excel-line:before{content:"\ecdf"}.ri-file-fill:before{content:"\ece0"}.ri-file-forbid-fill:before{content:"\ece1"}.ri-file-forbid-line:before{content:"\ece2"}.ri-file-gif-fill:before{content:"\ece3"}.ri-file-gif-line:before{content:"\ece4"}.ri-file-history-fill:before{content:"\ece5"}.ri-file-history-line:before{content:"\ece6"}.ri-file-hwp-fill:before{content:"\ece7"}.ri-file-hwp-line:before{content:"\ece8"}.ri-file-info-fill:before{content:"\ece9"}.ri-file-info-line:before{content:"\ecea"}.ri-file-line:before{content:"\eceb"}.ri-file-list-2-fill:before{content:"\ecec"}.ri-file-list-2-line:before{content:"\eced"}.ri-file-list-3-fill:before{content:"\ecee"}.ri-file-list-3-line:before{content:"\ecef"}.ri-file-list-fill:before{content:"\ecf0"}.ri-file-list-line:before{content:"\ecf1"}.ri-file-lock-fill:before{content:"\ecf2"}.ri-file-lock-line:before{content:"\ecf3"}.ri-file-mark-fill:before{content:"\ecf4"}.ri-file-mark-line:before{content:"\ecf5"}.ri-file-music-fill:before{content:"\ecf6"}.ri-file-music-line:before{content:"\ecf7"}.ri-file-paper-2-fill:before{content:"\ecf8"}.ri-file-paper-2-line:before{content:"\ecf9"}.ri-file-paper-fill:before{content:"\ecfa"}.ri-file-paper-line:before{content:"\ecfb"}.ri-file-pdf-fill:before{content:"\ecfc"}.ri-file-pdf-line:before{content:"\ecfd"}.ri-file-ppt-2-fill:before{content:"\ecfe"}.ri-file-ppt-2-line:before{content:"\ecff"}.ri-file-ppt-fill:before{content:"\ed00"}.ri-file-ppt-line:before{content:"\ed01"}.ri-file-reduce-fill:before{content:"\ed02"}.ri-file-reduce-line:before{content:"\ed03"}.ri-file-search-fill:before{content:"\ed04"}.ri-file-search-line:before{content:"\ed05"}.ri-file-settings-fill:before{content:"\ed06"}.ri-file-settings-line:before{content:"\ed07"}.ri-file-shield-2-fill:before{content:"\ed08"}.ri-file-shield-2-line:before{content:"\ed09"}.ri-file-shield-fill:before{content:"\ed0a"}.ri-file-shield-line:before{content:"\ed0b"}.ri-file-shred-fill:before{content:"\ed0c"}.ri-file-shred-line:before{content:"\ed0d"}.ri-file-text-fill:before{content:"\ed0e"}.ri-file-text-line:before{content:"\ed0f"}.ri-file-transfer-fill:before{content:"\ed10"}.ri-file-transfer-line:before{content:"\ed11"}.ri-file-unknow-fill:before{content:"\ed12"}.ri-file-unknow-line:before{content:"\ed13"}.ri-file-upload-fill:before{content:"\ed14"}.ri-file-upload-line:before{content:"\ed15"}.ri-file-user-fill:before{content:"\ed16"}.ri-file-user-line:before{content:"\ed17"}.ri-file-warning-fill:before{content:"\ed18"}.ri-file-warning-line:before{content:"\ed19"}.ri-file-word-2-fill:before{content:"\ed1a"}.ri-file-word-2-line:before{content:"\ed1b"}.ri-file-word-fill:before{content:"\ed1c"}.ri-file-word-line:before{content:"\ed1d"}.ri-file-zip-fill:before{content:"\ed1e"}.ri-file-zip-line:before{content:"\ed1f"}.ri-film-fill:before{content:"\ed20"}.ri-film-line:before{content:"\ed21"}.ri-filter-2-fill:before{content:"\ed22"}.ri-filter-2-line:before{content:"\ed23"}.ri-filter-3-fill:before{content:"\ed24"}.ri-filter-3-line:before{content:"\ed25"}.ri-filter-fill:before{content:"\ed26"}.ri-filter-line:before{content:"\ed27"}.ri-filter-off-fill:before{content:"\ed28"}.ri-filter-off-line:before{content:"\ed29"}.ri-find-replace-fill:before{content:"\ed2a"}.ri-find-replace-line:before{content:"\ed2b"}.ri-finder-fill:before{content:"\ed2c"}.ri-finder-line:before{content:"\ed2d"}.ri-fingerprint-2-fill:before{content:"\ed2e"}.ri-fingerprint-2-line:before{content:"\ed2f"}.ri-fingerprint-fill:before{content:"\ed30"}.ri-fingerprint-line:before{content:"\ed31"}.ri-fire-fill:before{content:"\ed32"}.ri-fire-line:before{content:"\ed33"}.ri-firefox-fill:before{content:"\ed34"}.ri-firefox-line:before{content:"\ed35"}.ri-first-aid-kit-fill:before{content:"\ed36"}.ri-first-aid-kit-line:before{content:"\ed37"}.ri-flag-2-fill:before{content:"\ed38"}.ri-flag-2-line:before{content:"\ed39"}.ri-flag-fill:before{content:"\ed3a"}.ri-flag-line:before{content:"\ed3b"}.ri-flashlight-fill:before{content:"\ed3c"}.ri-flashlight-line:before{content:"\ed3d"}.ri-flask-fill:before{content:"\ed3e"}.ri-flask-line:before{content:"\ed3f"}.ri-flight-land-fill:before{content:"\ed40"}.ri-flight-land-line:before{content:"\ed41"}.ri-flight-takeoff-fill:before{content:"\ed42"}.ri-flight-takeoff-line:before{content:"\ed43"}.ri-flood-fill:before{content:"\ed44"}.ri-flood-line:before{content:"\ed45"}.ri-flow-chart:before{content:"\ed46"}.ri-flutter-fill:before{content:"\ed47"}.ri-flutter-line:before{content:"\ed48"}.ri-focus-2-fill:before{content:"\ed49"}.ri-focus-2-line:before{content:"\ed4a"}.ri-focus-3-fill:before{content:"\ed4b"}.ri-focus-3-line:before{content:"\ed4c"}.ri-focus-fill:before{content:"\ed4d"}.ri-focus-line:before{content:"\ed4e"}.ri-foggy-fill:before{content:"\ed4f"}.ri-foggy-line:before{content:"\ed50"}.ri-folder-2-fill:before{content:"\ed51"}.ri-folder-2-line:before{content:"\ed52"}.ri-folder-3-fill:before{content:"\ed53"}.ri-folder-3-line:before{content:"\ed54"}.ri-folder-4-fill:before{content:"\ed55"}.ri-folder-4-line:before{content:"\ed56"}.ri-folder-5-fill:before{content:"\ed57"}.ri-folder-5-line:before{content:"\ed58"}.ri-folder-add-fill:before{content:"\ed59"}.ri-folder-add-line:before{content:"\ed5a"}.ri-folder-chart-2-fill:before{content:"\ed5b"}.ri-folder-chart-2-line:before{content:"\ed5c"}.ri-folder-chart-fill:before{content:"\ed5d"}.ri-folder-chart-line:before{content:"\ed5e"}.ri-folder-download-fill:before{content:"\ed5f"}.ri-folder-download-line:before{content:"\ed60"}.ri-folder-fill:before{content:"\ed61"}.ri-folder-forbid-fill:before{content:"\ed62"}.ri-folder-forbid-line:before{content:"\ed63"}.ri-folder-history-fill:before{content:"\ed64"}.ri-folder-history-line:before{content:"\ed65"}.ri-folder-info-fill:before{content:"\ed66"}.ri-folder-info-line:before{content:"\ed67"}.ri-folder-keyhole-fill:before{content:"\ed68"}.ri-folder-keyhole-line:before{content:"\ed69"}.ri-folder-line:before{content:"\ed6a"}.ri-folder-lock-fill:before{content:"\ed6b"}.ri-folder-lock-line:before{content:"\ed6c"}.ri-folder-music-fill:before{content:"\ed6d"}.ri-folder-music-line:before{content:"\ed6e"}.ri-folder-open-fill:before{content:"\ed6f"}.ri-folder-open-line:before{content:"\ed70"}.ri-folder-received-fill:before{content:"\ed71"}.ri-folder-received-line:before{content:"\ed72"}.ri-folder-reduce-fill:before{content:"\ed73"}.ri-folder-reduce-line:before{content:"\ed74"}.ri-folder-settings-fill:before{content:"\ed75"}.ri-folder-settings-line:before{content:"\ed76"}.ri-folder-shared-fill:before{content:"\ed77"}.ri-folder-shared-line:before{content:"\ed78"}.ri-folder-shield-2-fill:before{content:"\ed79"}.ri-folder-shield-2-line:before{content:"\ed7a"}.ri-folder-shield-fill:before{content:"\ed7b"}.ri-folder-shield-line:before{content:"\ed7c"}.ri-folder-transfer-fill:before{content:"\ed7d"}.ri-folder-transfer-line:before{content:"\ed7e"}.ri-folder-unknow-fill:before{content:"\ed7f"}.ri-folder-unknow-line:before{content:"\ed80"}.ri-folder-upload-fill:before{content:"\ed81"}.ri-folder-upload-line:before{content:"\ed82"}.ri-folder-user-fill:before{content:"\ed83"}.ri-folder-user-line:before{content:"\ed84"}.ri-folder-warning-fill:before{content:"\ed85"}.ri-folder-warning-line:before{content:"\ed86"}.ri-folder-zip-fill:before{content:"\ed87"}.ri-folder-zip-line:before{content:"\ed88"}.ri-folders-fill:before{content:"\ed89"}.ri-folders-line:before{content:"\ed8a"}.ri-font-color:before{content:"\ed8b"}.ri-font-size-2:before{content:"\ed8c"}.ri-font-size:before{content:"\ed8d"}.ri-football-fill:before{content:"\ed8e"}.ri-football-line:before{content:"\ed8f"}.ri-footprint-fill:before{content:"\ed90"}.ri-footprint-line:before{content:"\ed91"}.ri-forbid-2-fill:before{content:"\ed92"}.ri-forbid-2-line:before{content:"\ed93"}.ri-forbid-fill:before{content:"\ed94"}.ri-forbid-line:before{content:"\ed95"}.ri-format-clear:before{content:"\ed96"}.ri-fridge-fill:before{content:"\ed97"}.ri-fridge-line:before{content:"\ed98"}.ri-fullscreen-exit-fill:before{content:"\ed99"}.ri-fullscreen-exit-line:before{content:"\ed9a"}.ri-fullscreen-fill:before{content:"\ed9b"}.ri-fullscreen-line:before{content:"\ed9c"}.ri-function-fill:before{content:"\ed9d"}.ri-function-line:before{content:"\ed9e"}.ri-functions:before{content:"\ed9f"}.ri-funds-box-fill:before{content:"\eda0"}.ri-funds-box-line:before{content:"\eda1"}.ri-funds-fill:before{content:"\eda2"}.ri-funds-line:before{content:"\eda3"}.ri-gallery-fill:before{content:"\eda4"}.ri-gallery-line:before{content:"\eda5"}.ri-gallery-upload-fill:before{content:"\eda6"}.ri-gallery-upload-line:before{content:"\eda7"}.ri-game-fill:before{content:"\eda8"}.ri-game-line:before{content:"\eda9"}.ri-gamepad-fill:before{content:"\edaa"}.ri-gamepad-line:before{content:"\edab"}.ri-gas-station-fill:before{content:"\edac"}.ri-gas-station-line:before{content:"\edad"}.ri-gatsby-fill:before{content:"\edae"}.ri-gatsby-line:before{content:"\edaf"}.ri-genderless-fill:before{content:"\edb0"}.ri-genderless-line:before{content:"\edb1"}.ri-ghost-2-fill:before{content:"\edb2"}.ri-ghost-2-line:before{content:"\edb3"}.ri-ghost-fill:before{content:"\edb4"}.ri-ghost-line:before{content:"\edb5"}.ri-ghost-smile-fill:before{content:"\edb6"}.ri-ghost-smile-line:before{content:"\edb7"}.ri-gift-2-fill:before{content:"\edb8"}.ri-gift-2-line:before{content:"\edb9"}.ri-gift-fill:before{content:"\edba"}.ri-gift-line:before{content:"\edbb"}.ri-git-branch-fill:before{content:"\edbc"}.ri-git-branch-line:before{content:"\edbd"}.ri-git-commit-fill:before{content:"\edbe"}.ri-git-commit-line:before{content:"\edbf"}.ri-git-merge-fill:before{content:"\edc0"}.ri-git-merge-line:before{content:"\edc1"}.ri-git-pull-request-fill:before{content:"\edc2"}.ri-git-pull-request-line:before{content:"\edc3"}.ri-git-repository-commits-fill:before{content:"\edc4"}.ri-git-repository-commits-line:before{content:"\edc5"}.ri-git-repository-fill:before{content:"\edc6"}.ri-git-repository-line:before{content:"\edc7"}.ri-git-repository-private-fill:before{content:"\edc8"}.ri-git-repository-private-line:before{content:"\edc9"}.ri-github-fill:before{content:"\edca"}.ri-github-line:before{content:"\edcb"}.ri-gitlab-fill:before{content:"\edcc"}.ri-gitlab-line:before{content:"\edcd"}.ri-global-fill:before{content:"\edce"}.ri-global-line:before{content:"\edcf"}.ri-globe-fill:before{content:"\edd0"}.ri-globe-line:before{content:"\edd1"}.ri-goblet-fill:before{content:"\edd2"}.ri-goblet-line:before{content:"\edd3"}.ri-google-fill:before{content:"\edd4"}.ri-google-line:before{content:"\edd5"}.ri-google-play-fill:before{content:"\edd6"}.ri-google-play-line:before{content:"\edd7"}.ri-government-fill:before{content:"\edd8"}.ri-government-line:before{content:"\edd9"}.ri-gps-fill:before{content:"\edda"}.ri-gps-line:before{content:"\eddb"}.ri-gradienter-fill:before{content:"\eddc"}.ri-gradienter-line:before{content:"\eddd"}.ri-grid-fill:before{content:"\edde"}.ri-grid-line:before{content:"\eddf"}.ri-group-2-fill:before{content:"\ede0"}.ri-group-2-line:before{content:"\ede1"}.ri-group-fill:before{content:"\ede2"}.ri-group-line:before{content:"\ede3"}.ri-guide-fill:before{content:"\ede4"}.ri-guide-line:before{content:"\ede5"}.ri-h-1:before{content:"\ede6"}.ri-h-2:before{content:"\ede7"}.ri-h-3:before{content:"\ede8"}.ri-h-4:before{content:"\ede9"}.ri-h-5:before{content:"\edea"}.ri-h-6:before{content:"\edeb"}.ri-hail-fill:before{content:"\edec"}.ri-hail-line:before{content:"\eded"}.ri-hammer-fill:before{content:"\edee"}.ri-hammer-line:before{content:"\edef"}.ri-hand-coin-fill:before{content:"\edf0"}.ri-hand-coin-line:before{content:"\edf1"}.ri-hand-heart-fill:before{content:"\edf2"}.ri-hand-heart-line:before{content:"\edf3"}.ri-hand-sanitizer-fill:before{content:"\edf4"}.ri-hand-sanitizer-line:before{content:"\edf5"}.ri-handbag-fill:before{content:"\edf6"}.ri-handbag-line:before{content:"\edf7"}.ri-hard-drive-2-fill:before{content:"\edf8"}.ri-hard-drive-2-line:before{content:"\edf9"}.ri-hard-drive-fill:before{content:"\edfa"}.ri-hard-drive-line:before{content:"\edfb"}.ri-hashtag:before{content:"\edfc"}.ri-haze-2-fill:before{content:"\edfd"}.ri-haze-2-line:before{content:"\edfe"}.ri-haze-fill:before{content:"\edff"}.ri-haze-line:before{content:"\ee00"}.ri-hd-fill:before{content:"\ee01"}.ri-hd-line:before{content:"\ee02"}.ri-heading:before{content:"\ee03"}.ri-headphone-fill:before{content:"\ee04"}.ri-headphone-line:before{content:"\ee05"}.ri-health-book-fill:before{content:"\ee06"}.ri-health-book-line:before{content:"\ee07"}.ri-heart-2-fill:before{content:"\ee08"}.ri-heart-2-line:before{content:"\ee09"}.ri-heart-3-fill:before{content:"\ee0a"}.ri-heart-3-line:before{content:"\ee0b"}.ri-heart-add-fill:before{content:"\ee0c"}.ri-heart-add-line:before{content:"\ee0d"}.ri-heart-fill:before{content:"\ee0e"}.ri-heart-line:before{content:"\ee0f"}.ri-heart-pulse-fill:before{content:"\ee10"}.ri-heart-pulse-line:before{content:"\ee11"}.ri-hearts-fill:before{content:"\ee12"}.ri-hearts-line:before{content:"\ee13"}.ri-heavy-showers-fill:before{content:"\ee14"}.ri-heavy-showers-line:before{content:"\ee15"}.ri-history-fill:before{content:"\ee16"}.ri-history-line:before{content:"\ee17"}.ri-home-2-fill:before{content:"\ee18"}.ri-home-2-line:before{content:"\ee19"}.ri-home-3-fill:before{content:"\ee1a"}.ri-home-3-line:before{content:"\ee1b"}.ri-home-4-fill:before{content:"\ee1c"}.ri-home-4-line:before{content:"\ee1d"}.ri-home-5-fill:before{content:"\ee1e"}.ri-home-5-line:before{content:"\ee1f"}.ri-home-6-fill:before{content:"\ee20"}.ri-home-6-line:before{content:"\ee21"}.ri-home-7-fill:before{content:"\ee22"}.ri-home-7-line:before{content:"\ee23"}.ri-home-8-fill:before{content:"\ee24"}.ri-home-8-line:before{content:"\ee25"}.ri-home-fill:before{content:"\ee26"}.ri-home-gear-fill:before{content:"\ee27"}.ri-home-gear-line:before{content:"\ee28"}.ri-home-heart-fill:before{content:"\ee29"}.ri-home-heart-line:before{content:"\ee2a"}.ri-home-line:before{content:"\ee2b"}.ri-home-smile-2-fill:before{content:"\ee2c"}.ri-home-smile-2-line:before{content:"\ee2d"}.ri-home-smile-fill:before{content:"\ee2e"}.ri-home-smile-line:before{content:"\ee2f"}.ri-home-wifi-fill:before{content:"\ee30"}.ri-home-wifi-line:before{content:"\ee31"}.ri-honor-of-kings-fill:before{content:"\ee32"}.ri-honor-of-kings-line:before{content:"\ee33"}.ri-honour-fill:before{content:"\ee34"}.ri-honour-line:before{content:"\ee35"}.ri-hospital-fill:before{content:"\ee36"}.ri-hospital-line:before{content:"\ee37"}.ri-hotel-bed-fill:before{content:"\ee38"}.ri-hotel-bed-line:before{content:"\ee39"}.ri-hotel-fill:before{content:"\ee3a"}.ri-hotel-line:before{content:"\ee3b"}.ri-hotspot-fill:before{content:"\ee3c"}.ri-hotspot-line:before{content:"\ee3d"}.ri-hq-fill:before{content:"\ee3e"}.ri-hq-line:before{content:"\ee3f"}.ri-html5-fill:before{content:"\ee40"}.ri-html5-line:before{content:"\ee41"}.ri-ie-fill:before{content:"\ee42"}.ri-ie-line:before{content:"\ee43"}.ri-image-2-fill:before{content:"\ee44"}.ri-image-2-line:before{content:"\ee45"}.ri-image-add-fill:before{content:"\ee46"}.ri-image-add-line:before{content:"\ee47"}.ri-image-edit-fill:before{content:"\ee48"}.ri-image-edit-line:before{content:"\ee49"}.ri-image-fill:before{content:"\ee4a"}.ri-image-line:before{content:"\ee4b"}.ri-inbox-archive-fill:before{content:"\ee4c"}.ri-inbox-archive-line:before{content:"\ee4d"}.ri-inbox-fill:before{content:"\ee4e"}.ri-inbox-line:before{content:"\ee4f"}.ri-inbox-unarchive-fill:before{content:"\ee50"}.ri-inbox-unarchive-line:before{content:"\ee51"}.ri-increase-decrease-fill:before{content:"\ee52"}.ri-increase-decrease-line:before{content:"\ee53"}.ri-indent-decrease:before{content:"\ee54"}.ri-indent-increase:before{content:"\ee55"}.ri-indeterminate-circle-fill:before{content:"\ee56"}.ri-indeterminate-circle-line:before{content:"\ee57"}.ri-information-fill:before{content:"\ee58"}.ri-information-line:before{content:"\ee59"}.ri-infrared-thermometer-fill:before{content:"\ee5a"}.ri-infrared-thermometer-line:before{content:"\ee5b"}.ri-ink-bottle-fill:before{content:"\ee5c"}.ri-ink-bottle-line:before{content:"\ee5d"}.ri-input-cursor-move:before{content:"\ee5e"}.ri-input-method-fill:before{content:"\ee5f"}.ri-input-method-line:before{content:"\ee60"}.ri-insert-column-left:before{content:"\ee61"}.ri-insert-column-right:before{content:"\ee62"}.ri-insert-row-bottom:before{content:"\ee63"}.ri-insert-row-top:before{content:"\ee64"}.ri-instagram-fill:before{content:"\ee65"}.ri-instagram-line:before{content:"\ee66"}.ri-install-fill:before{content:"\ee67"}.ri-install-line:before{content:"\ee68"}.ri-invision-fill:before{content:"\ee69"}.ri-invision-line:before{content:"\ee6a"}.ri-italic:before{content:"\ee6b"}.ri-kakao-talk-fill:before{content:"\ee6c"}.ri-kakao-talk-line:before{content:"\ee6d"}.ri-key-2-fill:before{content:"\ee6e"}.ri-key-2-line:before{content:"\ee6f"}.ri-key-fill:before{content:"\ee70"}.ri-key-line:before{content:"\ee71"}.ri-keyboard-box-fill:before{content:"\ee72"}.ri-keyboard-box-line:before{content:"\ee73"}.ri-keyboard-fill:before{content:"\ee74"}.ri-keyboard-line:before{content:"\ee75"}.ri-keynote-fill:before{content:"\ee76"}.ri-keynote-line:before{content:"\ee77"}.ri-knife-blood-fill:before{content:"\ee78"}.ri-knife-blood-line:before{content:"\ee79"}.ri-knife-fill:before{content:"\ee7a"}.ri-knife-line:before{content:"\ee7b"}.ri-landscape-fill:before{content:"\ee7c"}.ri-landscape-line:before{content:"\ee7d"}.ri-layout-2-fill:before{content:"\ee7e"}.ri-layout-2-line:before{content:"\ee7f"}.ri-layout-3-fill:before{content:"\ee80"}.ri-layout-3-line:before{content:"\ee81"}.ri-layout-4-fill:before{content:"\ee82"}.ri-layout-4-line:before{content:"\ee83"}.ri-layout-5-fill:before{content:"\ee84"}.ri-layout-5-line:before{content:"\ee85"}.ri-layout-6-fill:before{content:"\ee86"}.ri-layout-6-line:before{content:"\ee87"}.ri-layout-bottom-2-fill:before{content:"\ee88"}.ri-layout-bottom-2-line:before{content:"\ee89"}.ri-layout-bottom-fill:before{content:"\ee8a"}.ri-layout-bottom-line:before{content:"\ee8b"}.ri-layout-column-fill:before{content:"\ee8c"}.ri-layout-column-line:before{content:"\ee8d"}.ri-layout-fill:before{content:"\ee8e"}.ri-layout-grid-fill:before{content:"\ee8f"}.ri-layout-grid-line:before{content:"\ee90"}.ri-layout-left-2-fill:before{content:"\ee91"}.ri-layout-left-2-line:before{content:"\ee92"}.ri-layout-left-fill:before{content:"\ee93"}.ri-layout-left-line:before{content:"\ee94"}.ri-layout-line:before{content:"\ee95"}.ri-layout-masonry-fill:before{content:"\ee96"}.ri-layout-masonry-line:before{content:"\ee97"}.ri-layout-right-2-fill:before{content:"\ee98"}.ri-layout-right-2-line:before{content:"\ee99"}.ri-layout-right-fill:before{content:"\ee9a"}.ri-layout-right-line:before{content:"\ee9b"}.ri-layout-row-fill:before{content:"\ee9c"}.ri-layout-row-line:before{content:"\ee9d"}.ri-layout-top-2-fill:before{content:"\ee9e"}.ri-layout-top-2-line:before{content:"\ee9f"}.ri-layout-top-fill:before{content:"\eea0"}.ri-layout-top-line:before{content:"\eea1"}.ri-leaf-fill:before{content:"\eea2"}.ri-leaf-line:before{content:"\eea3"}.ri-lifebuoy-fill:before{content:"\eea4"}.ri-lifebuoy-line:before{content:"\eea5"}.ri-lightbulb-fill:before{content:"\eea6"}.ri-lightbulb-flash-fill:before{content:"\eea7"}.ri-lightbulb-flash-line:before{content:"\eea8"}.ri-lightbulb-line:before{content:"\eea9"}.ri-line-chart-fill:before{content:"\eeaa"}.ri-line-chart-line:before{content:"\eeab"}.ri-line-fill:before{content:"\eeac"}.ri-line-height:before{content:"\eead"}.ri-line-line:before{content:"\eeae"}.ri-link-m:before{content:"\eeaf"}.ri-link-unlink-m:before{content:"\eeb0"}.ri-link-unlink:before{content:"\eeb1"}.ri-link:before{content:"\eeb2"}.ri-linkedin-box-fill:before{content:"\eeb3"}.ri-linkedin-box-line:before{content:"\eeb4"}.ri-linkedin-fill:before{content:"\eeb5"}.ri-linkedin-line:before{content:"\eeb6"}.ri-links-fill:before{content:"\eeb7"}.ri-links-line:before{content:"\eeb8"}.ri-list-check-2:before{content:"\eeb9"}.ri-list-check:before{content:"\eeba"}.ri-list-ordered:before{content:"\eebb"}.ri-list-settings-fill:before{content:"\eebc"}.ri-list-settings-line:before{content:"\eebd"}.ri-list-unordered:before{content:"\eebe"}.ri-live-fill:before{content:"\eebf"}.ri-live-line:before{content:"\eec0"}.ri-loader-2-fill:before{content:"\eec1"}.ri-loader-2-line:before{content:"\eec2"}.ri-loader-3-fill:before{content:"\eec3"}.ri-loader-3-line:before{content:"\eec4"}.ri-loader-4-fill:before{content:"\eec5"}.ri-loader-4-line:before{content:"\eec6"}.ri-loader-5-fill:before{content:"\eec7"}.ri-loader-5-line:before{content:"\eec8"}.ri-loader-fill:before{content:"\eec9"}.ri-loader-line:before{content:"\eeca"}.ri-lock-2-fill:before{content:"\eecb"}.ri-lock-2-line:before{content:"\eecc"}.ri-lock-fill:before{content:"\eecd"}.ri-lock-line:before{content:"\eece"}.ri-lock-password-fill:before{content:"\eecf"}.ri-lock-password-line:before{content:"\eed0"}.ri-lock-unlock-fill:before{content:"\eed1"}.ri-lock-unlock-line:before{content:"\eed2"}.ri-login-box-fill:before{content:"\eed3"}.ri-login-box-line:before{content:"\eed4"}.ri-login-circle-fill:before{content:"\eed5"}.ri-login-circle-line:before{content:"\eed6"}.ri-logout-box-fill:before{content:"\eed7"}.ri-logout-box-line:before{content:"\eed8"}.ri-logout-box-r-fill:before{content:"\eed9"}.ri-logout-box-r-line:before{content:"\eeda"}.ri-logout-circle-fill:before{content:"\eedb"}.ri-logout-circle-line:before{content:"\eedc"}.ri-logout-circle-r-fill:before{content:"\eedd"}.ri-logout-circle-r-line:before{content:"\eede"}.ri-luggage-cart-fill:before{content:"\eedf"}.ri-luggage-cart-line:before{content:"\eee0"}.ri-luggage-deposit-fill:before{content:"\eee1"}.ri-luggage-deposit-line:before{content:"\eee2"}.ri-lungs-fill:before{content:"\eee3"}.ri-lungs-line:before{content:"\eee4"}.ri-mac-fill:before{content:"\eee5"}.ri-mac-line:before{content:"\eee6"}.ri-macbook-fill:before{content:"\eee7"}.ri-macbook-line:before{content:"\eee8"}.ri-magic-fill:before{content:"\eee9"}.ri-magic-line:before{content:"\eeea"}.ri-mail-add-fill:before{content:"\eeeb"}.ri-mail-add-line:before{content:"\eeec"}.ri-mail-check-fill:before{content:"\eeed"}.ri-mail-check-line:before{content:"\eeee"}.ri-mail-close-fill:before{content:"\eeef"}.ri-mail-close-line:before{content:"\eef0"}.ri-mail-download-fill:before{content:"\eef1"}.ri-mail-download-line:before{content:"\eef2"}.ri-mail-fill:before{content:"\eef3"}.ri-mail-forbid-fill:before{content:"\eef4"}.ri-mail-forbid-line:before{content:"\eef5"}.ri-mail-line:before{content:"\eef6"}.ri-mail-lock-fill:before{content:"\eef7"}.ri-mail-lock-line:before{content:"\eef8"}.ri-mail-open-fill:before{content:"\eef9"}.ri-mail-open-line:before{content:"\eefa"}.ri-mail-send-fill:before{content:"\eefb"}.ri-mail-send-line:before{content:"\eefc"}.ri-mail-settings-fill:before{content:"\eefd"}.ri-mail-settings-line:before{content:"\eefe"}.ri-mail-star-fill:before{content:"\eeff"}.ri-mail-star-line:before{content:"\ef00"}.ri-mail-unread-fill:before{content:"\ef01"}.ri-mail-unread-line:before{content:"\ef02"}.ri-mail-volume-fill:before{content:"\ef03"}.ri-mail-volume-line:before{content:"\ef04"}.ri-map-2-fill:before{content:"\ef05"}.ri-map-2-line:before{content:"\ef06"}.ri-map-fill:before{content:"\ef07"}.ri-map-line:before{content:"\ef08"}.ri-map-pin-2-fill:before{content:"\ef09"}.ri-map-pin-2-line:before{content:"\ef0a"}.ri-map-pin-3-fill:before{content:"\ef0b"}.ri-map-pin-3-line:before{content:"\ef0c"}.ri-map-pin-4-fill:before{content:"\ef0d"}.ri-map-pin-4-line:before{content:"\ef0e"}.ri-map-pin-5-fill:before{content:"\ef0f"}.ri-map-pin-5-line:before{content:"\ef10"}.ri-map-pin-add-fill:before{content:"\ef11"}.ri-map-pin-add-line:before{content:"\ef12"}.ri-map-pin-fill:before{content:"\ef13"}.ri-map-pin-line:before{content:"\ef14"}.ri-map-pin-range-fill:before{content:"\ef15"}.ri-map-pin-range-line:before{content:"\ef16"}.ri-map-pin-time-fill:before{content:"\ef17"}.ri-map-pin-time-line:before{content:"\ef18"}.ri-map-pin-user-fill:before{content:"\ef19"}.ri-map-pin-user-line:before{content:"\ef1a"}.ri-mark-pen-fill:before{content:"\ef1b"}.ri-mark-pen-line:before{content:"\ef1c"}.ri-markdown-fill:before{content:"\ef1d"}.ri-markdown-line:before{content:"\ef1e"}.ri-markup-fill:before{content:"\ef1f"}.ri-markup-line:before{content:"\ef20"}.ri-mastercard-fill:before{content:"\ef21"}.ri-mastercard-line:before{content:"\ef22"}.ri-mastodon-fill:before{content:"\ef23"}.ri-mastodon-line:before{content:"\ef24"}.ri-medal-2-fill:before{content:"\ef25"}.ri-medal-2-line:before{content:"\ef26"}.ri-medal-fill:before{content:"\ef27"}.ri-medal-line:before{content:"\ef28"}.ri-medicine-bottle-fill:before{content:"\ef29"}.ri-medicine-bottle-line:before{content:"\ef2a"}.ri-medium-fill:before{content:"\ef2b"}.ri-medium-line:before{content:"\ef2c"}.ri-men-fill:before{content:"\ef2d"}.ri-men-line:before{content:"\ef2e"}.ri-mental-health-fill:before{content:"\ef2f"}.ri-mental-health-line:before{content:"\ef30"}.ri-menu-2-fill:before{content:"\ef31"}.ri-menu-2-line:before{content:"\ef32"}.ri-menu-3-fill:before{content:"\ef33"}.ri-menu-3-line:before{content:"\ef34"}.ri-menu-4-fill:before{content:"\ef35"}.ri-menu-4-line:before{content:"\ef36"}.ri-menu-5-fill:before{content:"\ef37"}.ri-menu-5-line:before{content:"\ef38"}.ri-menu-add-fill:before{content:"\ef39"}.ri-menu-add-line:before{content:"\ef3a"}.ri-menu-fill:before{content:"\ef3b"}.ri-menu-fold-fill:before{content:"\ef3c"}.ri-menu-fold-line:before{content:"\ef3d"}.ri-menu-line:before{content:"\ef3e"}.ri-menu-unfold-fill:before{content:"\ef3f"}.ri-menu-unfold-line:before{content:"\ef40"}.ri-merge-cells-horizontal:before{content:"\ef41"}.ri-merge-cells-vertical:before{content:"\ef42"}.ri-message-2-fill:before{content:"\ef43"}.ri-message-2-line:before{content:"\ef44"}.ri-message-3-fill:before{content:"\ef45"}.ri-message-3-line:before{content:"\ef46"}.ri-message-fill:before{content:"\ef47"}.ri-message-line:before{content:"\ef48"}.ri-messenger-fill:before{content:"\ef49"}.ri-messenger-line:before{content:"\ef4a"}.ri-meteor-fill:before{content:"\ef4b"}.ri-meteor-line:before{content:"\ef4c"}.ri-mic-2-fill:before{content:"\ef4d"}.ri-mic-2-line:before{content:"\ef4e"}.ri-mic-fill:before{content:"\ef4f"}.ri-mic-line:before{content:"\ef50"}.ri-mic-off-fill:before{content:"\ef51"}.ri-mic-off-line:before{content:"\ef52"}.ri-mickey-fill:before{content:"\ef53"}.ri-mickey-line:before{content:"\ef54"}.ri-microscope-fill:before{content:"\ef55"}.ri-microscope-line:before{content:"\ef56"}.ri-microsoft-fill:before{content:"\ef57"}.ri-microsoft-line:before{content:"\ef58"}.ri-mind-map:before{content:"\ef59"}.ri-mini-program-fill:before{content:"\ef5a"}.ri-mini-program-line:before{content:"\ef5b"}.ri-mist-fill:before{content:"\ef5c"}.ri-mist-line:before{content:"\ef5d"}.ri-money-cny-box-fill:before{content:"\ef5e"}.ri-money-cny-box-line:before{content:"\ef5f"}.ri-money-cny-circle-fill:before{content:"\ef60"}.ri-money-cny-circle-line:before{content:"\ef61"}.ri-money-dollar-box-fill:before{content:"\ef62"}.ri-money-dollar-box-line:before{content:"\ef63"}.ri-money-dollar-circle-fill:before{content:"\ef64"}.ri-money-dollar-circle-line:before{content:"\ef65"}.ri-money-euro-box-fill:before{content:"\ef66"}.ri-money-euro-box-line:before{content:"\ef67"}.ri-money-euro-circle-fill:before{content:"\ef68"}.ri-money-euro-circle-line:before{content:"\ef69"}.ri-money-pound-box-fill:before{content:"\ef6a"}.ri-money-pound-box-line:before{content:"\ef6b"}.ri-money-pound-circle-fill:before{content:"\ef6c"}.ri-money-pound-circle-line:before{content:"\ef6d"}.ri-moon-clear-fill:before{content:"\ef6e"}.ri-moon-clear-line:before{content:"\ef6f"}.ri-moon-cloudy-fill:before{content:"\ef70"}.ri-moon-cloudy-line:before{content:"\ef71"}.ri-moon-fill:before{content:"\ef72"}.ri-moon-foggy-fill:before{content:"\ef73"}.ri-moon-foggy-line:before{content:"\ef74"}.ri-moon-line:before{content:"\ef75"}.ri-more-2-fill:before{content:"\ef76"}.ri-more-2-line:before{content:"\ef77"}.ri-more-fill:before{content:"\ef78"}.ri-more-line:before{content:"\ef79"}.ri-motorbike-fill:before{content:"\ef7a"}.ri-motorbike-line:before{content:"\ef7b"}.ri-mouse-fill:before{content:"\ef7c"}.ri-mouse-line:before{content:"\ef7d"}.ri-movie-2-fill:before{content:"\ef7e"}.ri-movie-2-line:before{content:"\ef7f"}.ri-movie-fill:before{content:"\ef80"}.ri-movie-line:before{content:"\ef81"}.ri-music-2-fill:before{content:"\ef82"}.ri-music-2-line:before{content:"\ef83"}.ri-music-fill:before{content:"\ef84"}.ri-music-line:before{content:"\ef85"}.ri-mv-fill:before{content:"\ef86"}.ri-mv-line:before{content:"\ef87"}.ri-navigation-fill:before{content:"\ef88"}.ri-navigation-line:before{content:"\ef89"}.ri-netease-cloud-music-fill:before{content:"\ef8a"}.ri-netease-cloud-music-line:before{content:"\ef8b"}.ri-netflix-fill:before{content:"\ef8c"}.ri-netflix-line:before{content:"\ef8d"}.ri-newspaper-fill:before{content:"\ef8e"}.ri-newspaper-line:before{content:"\ef8f"}.ri-node-tree:before{content:"\ef90"}.ri-notification-2-fill:before{content:"\ef91"}.ri-notification-2-line:before{content:"\ef92"}.ri-notification-3-fill:before{content:"\ef93"}.ri-notification-3-line:before{content:"\ef94"}.ri-notification-4-fill:before{content:"\ef95"}.ri-notification-4-line:before{content:"\ef96"}.ri-notification-badge-fill:before{content:"\ef97"}.ri-notification-badge-line:before{content:"\ef98"}.ri-notification-fill:before{content:"\ef99"}.ri-notification-line:before{content:"\ef9a"}.ri-notification-off-fill:before{content:"\ef9b"}.ri-notification-off-line:before{content:"\ef9c"}.ri-npmjs-fill:before{content:"\ef9d"}.ri-npmjs-line:before{content:"\ef9e"}.ri-number-0:before{content:"\ef9f"}.ri-number-1:before{content:"\efa0"}.ri-number-2:before{content:"\efa1"}.ri-number-3:before{content:"\efa2"}.ri-number-4:before{content:"\efa3"}.ri-number-5:before{content:"\efa4"}.ri-number-6:before{content:"\efa5"}.ri-number-7:before{content:"\efa6"}.ri-number-8:before{content:"\efa7"}.ri-number-9:before{content:"\efa8"}.ri-numbers-fill:before{content:"\efa9"}.ri-numbers-line:before{content:"\efaa"}.ri-nurse-fill:before{content:"\efab"}.ri-nurse-line:before{content:"\efac"}.ri-oil-fill:before{content:"\efad"}.ri-oil-line:before{content:"\efae"}.ri-omega:before{content:"\efaf"}.ri-open-arm-fill:before{content:"\efb0"}.ri-open-arm-line:before{content:"\efb1"}.ri-open-source-fill:before{content:"\efb2"}.ri-open-source-line:before{content:"\efb3"}.ri-opera-fill:before{content:"\efb4"}.ri-opera-line:before{content:"\efb5"}.ri-order-play-fill:before{content:"\efb6"}.ri-order-play-line:before{content:"\efb7"}.ri-organization-chart:before{content:"\efb8"}.ri-outlet-2-fill:before{content:"\efb9"}.ri-outlet-2-line:before{content:"\efba"}.ri-outlet-fill:before{content:"\efbb"}.ri-outlet-line:before{content:"\efbc"}.ri-page-separator:before{content:"\efbd"}.ri-pages-fill:before{content:"\efbe"}.ri-pages-line:before{content:"\efbf"}.ri-paint-brush-fill:before{content:"\efc0"}.ri-paint-brush-line:before{content:"\efc1"}.ri-paint-fill:before{content:"\efc2"}.ri-paint-line:before{content:"\efc3"}.ri-palette-fill:before{content:"\efc4"}.ri-palette-line:before{content:"\efc5"}.ri-pantone-fill:before{content:"\efc6"}.ri-pantone-line:before{content:"\efc7"}.ri-paragraph:before{content:"\efc8"}.ri-parent-fill:before{content:"\efc9"}.ri-parent-line:before{content:"\efca"}.ri-parentheses-fill:before{content:"\efcb"}.ri-parentheses-line:before{content:"\efcc"}.ri-parking-box-fill:before{content:"\efcd"}.ri-parking-box-line:before{content:"\efce"}.ri-parking-fill:before{content:"\efcf"}.ri-parking-line:before{content:"\efd0"}.ri-passport-fill:before{content:"\efd1"}.ri-passport-line:before{content:"\efd2"}.ri-patreon-fill:before{content:"\efd3"}.ri-patreon-line:before{content:"\efd4"}.ri-pause-circle-fill:before{content:"\efd5"}.ri-pause-circle-line:before{content:"\efd6"}.ri-pause-fill:before{content:"\efd7"}.ri-pause-line:before{content:"\efd8"}.ri-pause-mini-fill:before{content:"\efd9"}.ri-pause-mini-line:before{content:"\efda"}.ri-paypal-fill:before{content:"\efdb"}.ri-paypal-line:before{content:"\efdc"}.ri-pen-nib-fill:before{content:"\efdd"}.ri-pen-nib-line:before{content:"\efde"}.ri-pencil-fill:before{content:"\efdf"}.ri-pencil-line:before{content:"\efe0"}.ri-pencil-ruler-2-fill:before{content:"\efe1"}.ri-pencil-ruler-2-line:before{content:"\efe2"}.ri-pencil-ruler-fill:before{content:"\efe3"}.ri-pencil-ruler-line:before{content:"\efe4"}.ri-percent-fill:before{content:"\efe5"}.ri-percent-line:before{content:"\efe6"}.ri-phone-camera-fill:before{content:"\efe7"}.ri-phone-camera-line:before{content:"\efe8"}.ri-phone-fill:before{content:"\efe9"}.ri-phone-find-fill:before{content:"\efea"}.ri-phone-find-line:before{content:"\efeb"}.ri-phone-line:before{content:"\efec"}.ri-phone-lock-fill:before{content:"\efed"}.ri-phone-lock-line:before{content:"\efee"}.ri-picture-in-picture-2-fill:before{content:"\efef"}.ri-picture-in-picture-2-line:before{content:"\eff0"}.ri-picture-in-picture-exit-fill:before{content:"\eff1"}.ri-picture-in-picture-exit-line:before{content:"\eff2"}.ri-picture-in-picture-fill:before{content:"\eff3"}.ri-picture-in-picture-line:before{content:"\eff4"}.ri-pie-chart-2-fill:before{content:"\eff5"}.ri-pie-chart-2-line:before{content:"\eff6"}.ri-pie-chart-box-fill:before{content:"\eff7"}.ri-pie-chart-box-line:before{content:"\eff8"}.ri-pie-chart-fill:before{content:"\eff9"}.ri-pie-chart-line:before{content:"\effa"}.ri-pin-distance-fill:before{content:"\effb"}.ri-pin-distance-line:before{content:"\effc"}.ri-ping-pong-fill:before{content:"\effd"}.ri-ping-pong-line:before{content:"\effe"}.ri-pinterest-fill:before{content:"\efff"}.ri-pinterest-line:before{content:"\f000"}.ri-pinyin-input:before{content:"\f001"}.ri-pixelfed-fill:before{content:"\f002"}.ri-pixelfed-line:before{content:"\f003"}.ri-plane-fill:before{content:"\f004"}.ri-plane-line:before{content:"\f005"}.ri-plant-fill:before{content:"\f006"}.ri-plant-line:before{content:"\f007"}.ri-play-circle-fill:before{content:"\f008"}.ri-play-circle-line:before{content:"\f009"}.ri-play-fill:before{content:"\f00a"}.ri-play-line:before{content:"\f00b"}.ri-play-list-2-fill:before{content:"\f00c"}.ri-play-list-2-line:before{content:"\f00d"}.ri-play-list-add-fill:before{content:"\f00e"}.ri-play-list-add-line:before{content:"\f00f"}.ri-play-list-fill:before{content:"\f010"}.ri-play-list-line:before{content:"\f011"}.ri-play-mini-fill:before{content:"\f012"}.ri-play-mini-line:before{content:"\f013"}.ri-playstation-fill:before{content:"\f014"}.ri-playstation-line:before{content:"\f015"}.ri-plug-2-fill:before{content:"\f016"}.ri-plug-2-line:before{content:"\f017"}.ri-plug-fill:before{content:"\f018"}.ri-plug-line:before{content:"\f019"}.ri-polaroid-2-fill:before{content:"\f01a"}.ri-polaroid-2-line:before{content:"\f01b"}.ri-polaroid-fill:before{content:"\f01c"}.ri-polaroid-line:before{content:"\f01d"}.ri-police-car-fill:before{content:"\f01e"}.ri-police-car-line:before{content:"\f01f"}.ri-price-tag-2-fill:before{content:"\f020"}.ri-price-tag-2-line:before{content:"\f021"}.ri-price-tag-3-fill:before{content:"\f022"}.ri-price-tag-3-line:before{content:"\f023"}.ri-price-tag-fill:before{content:"\f024"}.ri-price-tag-line:before{content:"\f025"}.ri-printer-cloud-fill:before{content:"\f026"}.ri-printer-cloud-line:before{content:"\f027"}.ri-printer-fill:before{content:"\f028"}.ri-printer-line:before{content:"\f029"}.ri-product-hunt-fill:before{content:"\f02a"}.ri-product-hunt-line:before{content:"\f02b"}.ri-profile-fill:before{content:"\f02c"}.ri-profile-line:before{content:"\f02d"}.ri-projector-2-fill:before{content:"\f02e"}.ri-projector-2-line:before{content:"\f02f"}.ri-projector-fill:before{content:"\f030"}.ri-projector-line:before{content:"\f031"}.ri-psychotherapy-fill:before{content:"\f032"}.ri-psychotherapy-line:before{content:"\f033"}.ri-pulse-fill:before{content:"\f034"}.ri-pulse-line:before{content:"\f035"}.ri-pushpin-2-fill:before{content:"\f036"}.ri-pushpin-2-line:before{content:"\f037"}.ri-pushpin-fill:before{content:"\f038"}.ri-pushpin-line:before{content:"\f039"}.ri-qq-fill:before{content:"\f03a"}.ri-qq-line:before{content:"\f03b"}.ri-qr-code-fill:before{content:"\f03c"}.ri-qr-code-line:before{content:"\f03d"}.ri-qr-scan-2-fill:before{content:"\f03e"}.ri-qr-scan-2-line:before{content:"\f03f"}.ri-qr-scan-fill:before{content:"\f040"}.ri-qr-scan-line:before{content:"\f041"}.ri-question-answer-fill:before{content:"\f042"}.ri-question-answer-line:before{content:"\f043"}.ri-question-fill:before{content:"\f044"}.ri-question-line:before{content:"\f045"}.ri-question-mark:before{content:"\f046"}.ri-questionnaire-fill:before{content:"\f047"}.ri-questionnaire-line:before{content:"\f048"}.ri-quill-pen-fill:before{content:"\f049"}.ri-quill-pen-line:before{content:"\f04a"}.ri-radar-fill:before{content:"\f04b"}.ri-radar-line:before{content:"\f04c"}.ri-radio-2-fill:before{content:"\f04d"}.ri-radio-2-line:before{content:"\f04e"}.ri-radio-button-fill:before{content:"\f04f"}.ri-radio-button-line:before{content:"\f050"}.ri-radio-fill:before{content:"\f051"}.ri-radio-line:before{content:"\f052"}.ri-rainbow-fill:before{content:"\f053"}.ri-rainbow-line:before{content:"\f054"}.ri-rainy-fill:before{content:"\f055"}.ri-rainy-line:before{content:"\f056"}.ri-reactjs-fill:before{content:"\f057"}.ri-reactjs-line:before{content:"\f058"}.ri-record-circle-fill:before{content:"\f059"}.ri-record-circle-line:before{content:"\f05a"}.ri-record-mail-fill:before{content:"\f05b"}.ri-record-mail-line:before{content:"\f05c"}.ri-recycle-fill:before{content:"\f05d"}.ri-recycle-line:before{content:"\f05e"}.ri-red-packet-fill:before{content:"\f05f"}.ri-red-packet-line:before{content:"\f060"}.ri-reddit-fill:before{content:"\f061"}.ri-reddit-line:before{content:"\f062"}.ri-refresh-fill:before{content:"\f063"}.ri-refresh-line:before{content:"\f064"}.ri-refund-2-fill:before{content:"\f065"}.ri-refund-2-line:before{content:"\f066"}.ri-refund-fill:before{content:"\f067"}.ri-refund-line:before{content:"\f068"}.ri-registered-fill:before{content:"\f069"}.ri-registered-line:before{content:"\f06a"}.ri-remixicon-fill:before{content:"\f06b"}.ri-remixicon-line:before{content:"\f06c"}.ri-remote-control-2-fill:before{content:"\f06d"}.ri-remote-control-2-line:before{content:"\f06e"}.ri-remote-control-fill:before{content:"\f06f"}.ri-remote-control-line:before{content:"\f070"}.ri-repeat-2-fill:before{content:"\f071"}.ri-repeat-2-line:before{content:"\f072"}.ri-repeat-fill:before{content:"\f073"}.ri-repeat-line:before{content:"\f074"}.ri-repeat-one-fill:before{content:"\f075"}.ri-repeat-one-line:before{content:"\f076"}.ri-reply-all-fill:before{content:"\f077"}.ri-reply-all-line:before{content:"\f078"}.ri-reply-fill:before{content:"\f079"}.ri-reply-line:before{content:"\f07a"}.ri-reserved-fill:before{content:"\f07b"}.ri-reserved-line:before{content:"\f07c"}.ri-rest-time-fill:before{content:"\f07d"}.ri-rest-time-line:before{content:"\f07e"}.ri-restart-fill:before{content:"\f07f"}.ri-restart-line:before{content:"\f080"}.ri-restaurant-2-fill:before{content:"\f081"}.ri-restaurant-2-line:before{content:"\f082"}.ri-restaurant-fill:before{content:"\f083"}.ri-restaurant-line:before{content:"\f084"}.ri-rewind-fill:before{content:"\f085"}.ri-rewind-line:before{content:"\f086"}.ri-rewind-mini-fill:before{content:"\f087"}.ri-rewind-mini-line:before{content:"\f088"}.ri-rhythm-fill:before{content:"\f089"}.ri-rhythm-line:before{content:"\f08a"}.ri-riding-fill:before{content:"\f08b"}.ri-riding-line:before{content:"\f08c"}.ri-road-map-fill:before{content:"\f08d"}.ri-road-map-line:before{content:"\f08e"}.ri-roadster-fill:before{content:"\f08f"}.ri-roadster-line:before{content:"\f090"}.ri-robot-fill:before{content:"\f091"}.ri-robot-line:before{content:"\f092"}.ri-rocket-2-fill:before{content:"\f093"}.ri-rocket-2-line:before{content:"\f094"}.ri-rocket-fill:before{content:"\f095"}.ri-rocket-line:before{content:"\f096"}.ri-rotate-lock-fill:before{content:"\f097"}.ri-rotate-lock-line:before{content:"\f098"}.ri-rounded-corner:before{content:"\f099"}.ri-route-fill:before{content:"\f09a"}.ri-route-line:before{content:"\f09b"}.ri-router-fill:before{content:"\f09c"}.ri-router-line:before{content:"\f09d"}.ri-rss-fill:before{content:"\f09e"}.ri-rss-line:before{content:"\f09f"}.ri-ruler-2-fill:before{content:"\f0a0"}.ri-ruler-2-line:before{content:"\f0a1"}.ri-ruler-fill:before{content:"\f0a2"}.ri-ruler-line:before{content:"\f0a3"}.ri-run-fill:before{content:"\f0a4"}.ri-run-line:before{content:"\f0a5"}.ri-safari-fill:before{content:"\f0a6"}.ri-safari-line:before{content:"\f0a7"}.ri-safe-2-fill:before{content:"\f0a8"}.ri-safe-2-line:before{content:"\f0a9"}.ri-safe-fill:before{content:"\f0aa"}.ri-safe-line:before{content:"\f0ab"}.ri-sailboat-fill:before{content:"\f0ac"}.ri-sailboat-line:before{content:"\f0ad"}.ri-save-2-fill:before{content:"\f0ae"}.ri-save-2-line:before{content:"\f0af"}.ri-save-3-fill:before{content:"\f0b0"}.ri-save-3-line:before{content:"\f0b1"}.ri-save-fill:before{content:"\f0b2"}.ri-save-line:before{content:"\f0b3"}.ri-scales-2-fill:before{content:"\f0b4"}.ri-scales-2-line:before{content:"\f0b5"}.ri-scales-3-fill:before{content:"\f0b6"}.ri-scales-3-line:before{content:"\f0b7"}.ri-scales-fill:before{content:"\f0b8"}.ri-scales-line:before{content:"\f0b9"}.ri-scan-2-fill:before{content:"\f0ba"}.ri-scan-2-line:before{content:"\f0bb"}.ri-scan-fill:before{content:"\f0bc"}.ri-scan-line:before{content:"\f0bd"}.ri-scissors-2-fill:before{content:"\f0be"}.ri-scissors-2-line:before{content:"\f0bf"}.ri-scissors-cut-fill:before{content:"\f0c0"}.ri-scissors-cut-line:before{content:"\f0c1"}.ri-scissors-fill:before{content:"\f0c2"}.ri-scissors-line:before{content:"\f0c3"}.ri-screenshot-2-fill:before{content:"\f0c4"}.ri-screenshot-2-line:before{content:"\f0c5"}.ri-screenshot-fill:before{content:"\f0c6"}.ri-screenshot-line:before{content:"\f0c7"}.ri-sd-card-fill:before{content:"\f0c8"}.ri-sd-card-line:before{content:"\f0c9"}.ri-sd-card-mini-fill:before{content:"\f0ca"}.ri-sd-card-mini-line:before{content:"\f0cb"}.ri-search-2-fill:before{content:"\f0cc"}.ri-search-2-line:before{content:"\f0cd"}.ri-search-eye-fill:before{content:"\f0ce"}.ri-search-eye-line:before{content:"\f0cf"}.ri-search-fill:before{content:"\f0d0"}.ri-search-line:before{content:"\f0d1"}.ri-secure-payment-fill:before{content:"\f0d2"}.ri-secure-payment-line:before{content:"\f0d3"}.ri-seedling-fill:before{content:"\f0d4"}.ri-seedling-line:before{content:"\f0d5"}.ri-send-backward:before{content:"\f0d6"}.ri-send-plane-2-fill:before{content:"\f0d7"}.ri-send-plane-2-line:before{content:"\f0d8"}.ri-send-plane-fill:before{content:"\f0d9"}.ri-send-plane-line:before{content:"\f0da"}.ri-send-to-back:before{content:"\f0db"}.ri-sensor-fill:before{content:"\f0dc"}.ri-sensor-line:before{content:"\f0dd"}.ri-separator:before{content:"\f0de"}.ri-server-fill:before{content:"\f0df"}.ri-server-line:before{content:"\f0e0"}.ri-service-fill:before{content:"\f0e1"}.ri-service-line:before{content:"\f0e2"}.ri-settings-2-fill:before{content:"\f0e3"}.ri-settings-2-line:before{content:"\f0e4"}.ri-settings-3-fill:before{content:"\f0e5"}.ri-settings-3-line:before{content:"\f0e6"}.ri-settings-4-fill:before{content:"\f0e7"}.ri-settings-4-line:before{content:"\f0e8"}.ri-settings-5-fill:before{content:"\f0e9"}.ri-settings-5-line:before{content:"\f0ea"}.ri-settings-6-fill:before{content:"\f0eb"}.ri-settings-6-line:before{content:"\f0ec"}.ri-settings-fill:before{content:"\f0ed"}.ri-settings-line:before{content:"\f0ee"}.ri-shape-2-fill:before{content:"\f0ef"}.ri-shape-2-line:before{content:"\f0f0"}.ri-shape-fill:before{content:"\f0f1"}.ri-shape-line:before{content:"\f0f2"}.ri-share-box-fill:before{content:"\f0f3"}.ri-share-box-line:before{content:"\f0f4"}.ri-share-circle-fill:before{content:"\f0f5"}.ri-share-circle-line:before{content:"\f0f6"}.ri-share-fill:before{content:"\f0f7"}.ri-share-forward-2-fill:before{content:"\f0f8"}.ri-share-forward-2-line:before{content:"\f0f9"}.ri-share-forward-box-fill:before{content:"\f0fa"}.ri-share-forward-box-line:before{content:"\f0fb"}.ri-share-forward-fill:before{content:"\f0fc"}.ri-share-forward-line:before{content:"\f0fd"}.ri-share-line:before{content:"\f0fe"}.ri-shield-check-fill:before{content:"\f0ff"}.ri-shield-check-line:before{content:"\f100"}.ri-shield-cross-fill:before{content:"\f101"}.ri-shield-cross-line:before{content:"\f102"}.ri-shield-fill:before{content:"\f103"}.ri-shield-flash-fill:before{content:"\f104"}.ri-shield-flash-line:before{content:"\f105"}.ri-shield-keyhole-fill:before{content:"\f106"}.ri-shield-keyhole-line:before{content:"\f107"}.ri-shield-line:before{content:"\f108"}.ri-shield-star-fill:before{content:"\f109"}.ri-shield-star-line:before{content:"\f10a"}.ri-shield-user-fill:before{content:"\f10b"}.ri-shield-user-line:before{content:"\f10c"}.ri-ship-2-fill:before{content:"\f10d"}.ri-ship-2-line:before{content:"\f10e"}.ri-ship-fill:before{content:"\f10f"}.ri-ship-line:before{content:"\f110"}.ri-shirt-fill:before{content:"\f111"}.ri-shirt-line:before{content:"\f112"}.ri-shopping-bag-2-fill:before{content:"\f113"}.ri-shopping-bag-2-line:before{content:"\f114"}.ri-shopping-bag-3-fill:before{content:"\f115"}.ri-shopping-bag-3-line:before{content:"\f116"}.ri-shopping-bag-fill:before{content:"\f117"}.ri-shopping-bag-line:before{content:"\f118"}.ri-shopping-basket-2-fill:before{content:"\f119"}.ri-shopping-basket-2-line:before{content:"\f11a"}.ri-shopping-basket-fill:before{content:"\f11b"}.ri-shopping-basket-line:before{content:"\f11c"}.ri-shopping-cart-2-fill:before{content:"\f11d"}.ri-shopping-cart-2-line:before{content:"\f11e"}.ri-shopping-cart-fill:before{content:"\f11f"}.ri-shopping-cart-line:before{content:"\f120"}.ri-showers-fill:before{content:"\f121"}.ri-showers-line:before{content:"\f122"}.ri-shuffle-fill:before{content:"\f123"}.ri-shuffle-line:before{content:"\f124"}.ri-shut-down-fill:before{content:"\f125"}.ri-shut-down-line:before{content:"\f126"}.ri-side-bar-fill:before{content:"\f127"}.ri-side-bar-line:before{content:"\f128"}.ri-signal-tower-fill:before{content:"\f129"}.ri-signal-tower-line:before{content:"\f12a"}.ri-signal-wifi-1-fill:before{content:"\f12b"}.ri-signal-wifi-1-line:before{content:"\f12c"}.ri-signal-wifi-2-fill:before{content:"\f12d"}.ri-signal-wifi-2-line:before{content:"\f12e"}.ri-signal-wifi-3-fill:before{content:"\f12f"}.ri-signal-wifi-3-line:before{content:"\f130"}.ri-signal-wifi-error-fill:before{content:"\f131"}.ri-signal-wifi-error-line:before{content:"\f132"}.ri-signal-wifi-fill:before{content:"\f133"}.ri-signal-wifi-line:before{content:"\f134"}.ri-signal-wifi-off-fill:before{content:"\f135"}.ri-signal-wifi-off-line:before{content:"\f136"}.ri-sim-card-2-fill:before{content:"\f137"}.ri-sim-card-2-line:before{content:"\f138"}.ri-sim-card-fill:before{content:"\f139"}.ri-sim-card-line:before{content:"\f13a"}.ri-single-quotes-l:before{content:"\f13b"}.ri-single-quotes-r:before{content:"\f13c"}.ri-sip-fill:before{content:"\f13d"}.ri-sip-line:before{content:"\f13e"}.ri-skip-back-fill:before{content:"\f13f"}.ri-skip-back-line:before{content:"\f140"}.ri-skip-back-mini-fill:before{content:"\f141"}.ri-skip-back-mini-line:before{content:"\f142"}.ri-skip-forward-fill:before{content:"\f143"}.ri-skip-forward-line:before{content:"\f144"}.ri-skip-forward-mini-fill:before{content:"\f145"}.ri-skip-forward-mini-line:before{content:"\f146"}.ri-skull-2-fill:before{content:"\f147"}.ri-skull-2-line:before{content:"\f148"}.ri-skull-fill:before{content:"\f149"}.ri-skull-line:before{content:"\f14a"}.ri-skype-fill:before{content:"\f14b"}.ri-skype-line:before{content:"\f14c"}.ri-slack-fill:before{content:"\f14d"}.ri-slack-line:before{content:"\f14e"}.ri-slice-fill:before{content:"\f14f"}.ri-slice-line:before{content:"\f150"}.ri-slideshow-2-fill:before{content:"\f151"}.ri-slideshow-2-line:before{content:"\f152"}.ri-slideshow-3-fill:before{content:"\f153"}.ri-slideshow-3-line:before{content:"\f154"}.ri-slideshow-4-fill:before{content:"\f155"}.ri-slideshow-4-line:before{content:"\f156"}.ri-slideshow-fill:before{content:"\f157"}.ri-slideshow-line:before{content:"\f158"}.ri-smartphone-fill:before{content:"\f159"}.ri-smartphone-line:before{content:"\f15a"}.ri-snapchat-fill:before{content:"\f15b"}.ri-snapchat-line:before{content:"\f15c"}.ri-snowy-fill:before{content:"\f15d"}.ri-snowy-line:before{content:"\f15e"}.ri-sort-asc:before{content:"\f15f"}.ri-sort-desc:before{content:"\f160"}.ri-sound-module-fill:before{content:"\f161"}.ri-sound-module-line:before{content:"\f162"}.ri-soundcloud-fill:before{content:"\f163"}.ri-soundcloud-line:before{content:"\f164"}.ri-space-ship-fill:before{content:"\f165"}.ri-space-ship-line:before{content:"\f166"}.ri-space:before{content:"\f167"}.ri-spam-2-fill:before{content:"\f168"}.ri-spam-2-line:before{content:"\f169"}.ri-spam-3-fill:before{content:"\f16a"}.ri-spam-3-line:before{content:"\f16b"}.ri-spam-fill:before{content:"\f16c"}.ri-spam-line:before{content:"\f16d"}.ri-speaker-2-fill:before{content:"\f16e"}.ri-speaker-2-line:before{content:"\f16f"}.ri-speaker-3-fill:before{content:"\f170"}.ri-speaker-3-line:before{content:"\f171"}.ri-speaker-fill:before{content:"\f172"}.ri-speaker-line:before{content:"\f173"}.ri-spectrum-fill:before{content:"\f174"}.ri-spectrum-line:before{content:"\f175"}.ri-speed-fill:before{content:"\f176"}.ri-speed-line:before{content:"\f177"}.ri-speed-mini-fill:before{content:"\f178"}.ri-speed-mini-line:before{content:"\f179"}.ri-split-cells-horizontal:before{content:"\f17a"}.ri-split-cells-vertical:before{content:"\f17b"}.ri-spotify-fill:before{content:"\f17c"}.ri-spotify-line:before{content:"\f17d"}.ri-spy-fill:before{content:"\f17e"}.ri-spy-line:before{content:"\f17f"}.ri-stack-fill:before{content:"\f180"}.ri-stack-line:before{content:"\f181"}.ri-stack-overflow-fill:before{content:"\f182"}.ri-stack-overflow-line:before{content:"\f183"}.ri-stackshare-fill:before{content:"\f184"}.ri-stackshare-line:before{content:"\f185"}.ri-star-fill:before{content:"\f186"}.ri-star-half-fill:before{content:"\f187"}.ri-star-half-line:before{content:"\f188"}.ri-star-half-s-fill:before{content:"\f189"}.ri-star-half-s-line:before{content:"\f18a"}.ri-star-line:before{content:"\f18b"}.ri-star-s-fill:before{content:"\f18c"}.ri-star-s-line:before{content:"\f18d"}.ri-star-smile-fill:before{content:"\f18e"}.ri-star-smile-line:before{content:"\f18f"}.ri-steam-fill:before{content:"\f190"}.ri-steam-line:before{content:"\f191"}.ri-steering-2-fill:before{content:"\f192"}.ri-steering-2-line:before{content:"\f193"}.ri-steering-fill:before{content:"\f194"}.ri-steering-line:before{content:"\f195"}.ri-stethoscope-fill:before{content:"\f196"}.ri-stethoscope-line:before{content:"\f197"}.ri-sticky-note-2-fill:before{content:"\f198"}.ri-sticky-note-2-line:before{content:"\f199"}.ri-sticky-note-fill:before{content:"\f19a"}.ri-sticky-note-line:before{content:"\f19b"}.ri-stock-fill:before{content:"\f19c"}.ri-stock-line:before{content:"\f19d"}.ri-stop-circle-fill:before{content:"\f19e"}.ri-stop-circle-line:before{content:"\f19f"}.ri-stop-fill:before{content:"\f1a0"}.ri-stop-line:before{content:"\f1a1"}.ri-stop-mini-fill:before{content:"\f1a2"}.ri-stop-mini-line:before{content:"\f1a3"}.ri-store-2-fill:before{content:"\f1a4"}.ri-store-2-line:before{content:"\f1a5"}.ri-store-3-fill:before{content:"\f1a6"}.ri-store-3-line:before{content:"\f1a7"}.ri-store-fill:before{content:"\f1a8"}.ri-store-line:before{content:"\f1a9"}.ri-strikethrough-2:before{content:"\f1aa"}.ri-strikethrough:before{content:"\f1ab"}.ri-subscript-2:before{content:"\f1ac"}.ri-subscript:before{content:"\f1ad"}.ri-subtract-fill:before{content:"\f1ae"}.ri-subtract-line:before{content:"\f1af"}.ri-subway-fill:before{content:"\f1b0"}.ri-subway-line:before{content:"\f1b1"}.ri-subway-wifi-fill:before{content:"\f1b2"}.ri-subway-wifi-line:before{content:"\f1b3"}.ri-suitcase-2-fill:before{content:"\f1b4"}.ri-suitcase-2-line:before{content:"\f1b5"}.ri-suitcase-3-fill:before{content:"\f1b6"}.ri-suitcase-3-line:before{content:"\f1b7"}.ri-suitcase-fill:before{content:"\f1b8"}.ri-suitcase-line:before{content:"\f1b9"}.ri-sun-cloudy-fill:before{content:"\f1ba"}.ri-sun-cloudy-line:before{content:"\f1bb"}.ri-sun-fill:before{content:"\f1bc"}.ri-sun-foggy-fill:before{content:"\f1bd"}.ri-sun-foggy-line:before{content:"\f1be"}.ri-sun-line:before{content:"\f1bf"}.ri-superscript-2:before{content:"\f1c0"}.ri-superscript:before{content:"\f1c1"}.ri-surgical-mask-fill:before{content:"\f1c2"}.ri-surgical-mask-line:before{content:"\f1c3"}.ri-surround-sound-fill:before{content:"\f1c4"}.ri-surround-sound-line:before{content:"\f1c5"}.ri-survey-fill:before{content:"\f1c6"}.ri-survey-line:before{content:"\f1c7"}.ri-swap-box-fill:before{content:"\f1c8"}.ri-swap-box-line:before{content:"\f1c9"}.ri-swap-fill:before{content:"\f1ca"}.ri-swap-line:before{content:"\f1cb"}.ri-switch-fill:before{content:"\f1cc"}.ri-switch-line:before{content:"\f1cd"}.ri-sword-fill:before{content:"\f1ce"}.ri-sword-line:before{content:"\f1cf"}.ri-syringe-fill:before{content:"\f1d0"}.ri-syringe-line:before{content:"\f1d1"}.ri-t-box-fill:before{content:"\f1d2"}.ri-t-box-line:before{content:"\f1d3"}.ri-t-shirt-2-fill:before{content:"\f1d4"}.ri-t-shirt-2-line:before{content:"\f1d5"}.ri-t-shirt-air-fill:before{content:"\f1d6"}.ri-t-shirt-air-line:before{content:"\f1d7"}.ri-t-shirt-fill:before{content:"\f1d8"}.ri-t-shirt-line:before{content:"\f1d9"}.ri-table-2:before{content:"\f1da"}.ri-table-alt-fill:before{content:"\f1db"}.ri-table-alt-line:before{content:"\f1dc"}.ri-table-fill:before{content:"\f1dd"}.ri-table-line:before{content:"\f1de"}.ri-tablet-fill:before{content:"\f1df"}.ri-tablet-line:before{content:"\f1e0"}.ri-takeaway-fill:before{content:"\f1e1"}.ri-takeaway-line:before{content:"\f1e2"}.ri-taobao-fill:before{content:"\f1e3"}.ri-taobao-line:before{content:"\f1e4"}.ri-tape-fill:before{content:"\f1e5"}.ri-tape-line:before{content:"\f1e6"}.ri-task-fill:before{content:"\f1e7"}.ri-task-line:before{content:"\f1e8"}.ri-taxi-fill:before{content:"\f1e9"}.ri-taxi-line:before{content:"\f1ea"}.ri-taxi-wifi-fill:before{content:"\f1eb"}.ri-taxi-wifi-line:before{content:"\f1ec"}.ri-team-fill:before{content:"\f1ed"}.ri-team-line:before{content:"\f1ee"}.ri-telegram-fill:before{content:"\f1ef"}.ri-telegram-line:before{content:"\f1f0"}.ri-temp-cold-fill:before{content:"\f1f1"}.ri-temp-cold-line:before{content:"\f1f2"}.ri-temp-hot-fill:before{content:"\f1f3"}.ri-temp-hot-line:before{content:"\f1f4"}.ri-terminal-box-fill:before{content:"\f1f5"}.ri-terminal-box-line:before{content:"\f1f6"}.ri-terminal-fill:before{content:"\f1f7"}.ri-terminal-line:before{content:"\f1f8"}.ri-terminal-window-fill:before{content:"\f1f9"}.ri-terminal-window-line:before{content:"\f1fa"}.ri-test-tube-fill:before{content:"\f1fb"}.ri-test-tube-line:before{content:"\f1fc"}.ri-text-direction-l:before{content:"\f1fd"}.ri-text-direction-r:before{content:"\f1fe"}.ri-text-spacing:before{content:"\f1ff"}.ri-text-wrap:before{content:"\f200"}.ri-text:before{content:"\f201"}.ri-thermometer-fill:before{content:"\f202"}.ri-thermometer-line:before{content:"\f203"}.ri-thumb-down-fill:before{content:"\f204"}.ri-thumb-down-line:before{content:"\f205"}.ri-thumb-up-fill:before{content:"\f206"}.ri-thumb-up-line:before{content:"\f207"}.ri-thunderstorms-fill:before{content:"\f208"}.ri-thunderstorms-line:before{content:"\f209"}.ri-ticket-2-fill:before{content:"\f20a"}.ri-ticket-2-line:before{content:"\f20b"}.ri-ticket-fill:before{content:"\f20c"}.ri-ticket-line:before{content:"\f20d"}.ri-time-fill:before{content:"\f20e"}.ri-time-line:before{content:"\f20f"}.ri-timer-2-fill:before{content:"\f210"}.ri-timer-2-line:before{content:"\f211"}.ri-timer-fill:before{content:"\f212"}.ri-timer-flash-fill:before{content:"\f213"}.ri-timer-flash-line:before{content:"\f214"}.ri-timer-line:before{content:"\f215"}.ri-todo-fill:before{content:"\f216"}.ri-todo-line:before{content:"\f217"}.ri-toggle-fill:before{content:"\f218"}.ri-toggle-line:before{content:"\f219"}.ri-tools-fill:before{content:"\f21a"}.ri-tools-line:before{content:"\f21b"}.ri-tornado-fill:before{content:"\f21c"}.ri-tornado-line:before{content:"\f21d"}.ri-trademark-fill:before{content:"\f21e"}.ri-trademark-line:before{content:"\f21f"}.ri-traffic-light-fill:before{content:"\f220"}.ri-traffic-light-line:before{content:"\f221"}.ri-train-fill:before{content:"\f222"}.ri-train-line:before{content:"\f223"}.ri-train-wifi-fill:before{content:"\f224"}.ri-train-wifi-line:before{content:"\f225"}.ri-translate-2:before{content:"\f226"}.ri-translate:before{content:"\f227"}.ri-travesti-fill:before{content:"\f228"}.ri-travesti-line:before{content:"\f229"}.ri-treasure-map-fill:before{content:"\f22a"}.ri-treasure-map-line:before{content:"\f22b"}.ri-trello-fill:before{content:"\f22c"}.ri-trello-line:before{content:"\f22d"}.ri-trophy-fill:before{content:"\f22e"}.ri-trophy-line:before{content:"\f22f"}.ri-truck-fill:before{content:"\f230"}.ri-truck-line:before{content:"\f231"}.ri-tumblr-fill:before{content:"\f232"}.ri-tumblr-line:before{content:"\f233"}.ri-tv-2-fill:before{content:"\f234"}.ri-tv-2-line:before{content:"\f235"}.ri-tv-fill:before{content:"\f236"}.ri-tv-line:before{content:"\f237"}.ri-twitch-fill:before{content:"\f238"}.ri-twitch-line:before{content:"\f239"}.ri-twitter-fill:before{content:"\f23a"}.ri-twitter-line:before{content:"\f23b"}.ri-typhoon-fill:before{content:"\f23c"}.ri-typhoon-line:before{content:"\f23d"}.ri-u-disk-fill:before{content:"\f23e"}.ri-u-disk-line:before{content:"\f23f"}.ri-ubuntu-fill:before{content:"\f240"}.ri-ubuntu-line:before{content:"\f241"}.ri-umbrella-fill:before{content:"\f242"}.ri-umbrella-line:before{content:"\f243"}.ri-underline:before{content:"\f244"}.ri-uninstall-fill:before{content:"\f245"}.ri-uninstall-line:before{content:"\f246"}.ri-unsplash-fill:before{content:"\f247"}.ri-unsplash-line:before{content:"\f248"}.ri-upload-2-fill:before{content:"\f249"}.ri-upload-2-line:before{content:"\f24a"}.ri-upload-cloud-2-fill:before{content:"\f24b"}.ri-upload-cloud-2-line:before{content:"\f24c"}.ri-upload-cloud-fill:before{content:"\f24d"}.ri-upload-cloud-line:before{content:"\f24e"}.ri-upload-fill:before{content:"\f24f"}.ri-upload-line:before{content:"\f250"}.ri-usb-fill:before{content:"\f251"}.ri-usb-line:before{content:"\f252"}.ri-user-2-fill:before{content:"\f253"}.ri-user-2-line:before{content:"\f254"}.ri-user-3-fill:before{content:"\f255"}.ri-user-3-line:before{content:"\f256"}.ri-user-4-fill:before{content:"\f257"}.ri-user-4-line:before{content:"\f258"}.ri-user-5-fill:before{content:"\f259"}.ri-user-5-line:before{content:"\f25a"}.ri-user-6-fill:before{content:"\f25b"}.ri-user-6-line:before{content:"\f25c"}.ri-user-add-fill:before{content:"\f25d"}.ri-user-add-line:before{content:"\f25e"}.ri-user-fill:before{content:"\f25f"}.ri-user-follow-fill:before{content:"\f260"}.ri-user-follow-line:before{content:"\f261"}.ri-user-heart-fill:before{content:"\f262"}.ri-user-heart-line:before{content:"\f263"}.ri-user-line:before{content:"\f264"}.ri-user-location-fill:before{content:"\f265"}.ri-user-location-line:before{content:"\f266"}.ri-user-received-2-fill:before{content:"\f267"}.ri-user-received-2-line:before{content:"\f268"}.ri-user-received-fill:before{content:"\f269"}.ri-user-received-line:before{content:"\f26a"}.ri-user-search-fill:before{content:"\f26b"}.ri-user-search-line:before{content:"\f26c"}.ri-user-settings-fill:before{content:"\f26d"}.ri-user-settings-line:before{content:"\f26e"}.ri-user-shared-2-fill:before{content:"\f26f"}.ri-user-shared-2-line:before{content:"\f270"}.ri-user-shared-fill:before{content:"\f271"}.ri-user-shared-line:before{content:"\f272"}.ri-user-smile-fill:before{content:"\f273"}.ri-user-smile-line:before{content:"\f274"}.ri-user-star-fill:before{content:"\f275"}.ri-user-star-line:before{content:"\f276"}.ri-user-unfollow-fill:before{content:"\f277"}.ri-user-unfollow-line:before{content:"\f278"}.ri-user-voice-fill:before{content:"\f279"}.ri-user-voice-line:before{content:"\f27a"}.ri-video-add-fill:before{content:"\f27b"}.ri-video-add-line:before{content:"\f27c"}.ri-video-chat-fill:before{content:"\f27d"}.ri-video-chat-line:before{content:"\f27e"}.ri-video-download-fill:before{content:"\f27f"}.ri-video-download-line:before{content:"\f280"}.ri-video-fill:before{content:"\f281"}.ri-video-line:before{content:"\f282"}.ri-video-upload-fill:before{content:"\f283"}.ri-video-upload-line:before{content:"\f284"}.ri-vidicon-2-fill:before{content:"\f285"}.ri-vidicon-2-line:before{content:"\f286"}.ri-vidicon-fill:before{content:"\f287"}.ri-vidicon-line:before{content:"\f288"}.ri-vimeo-fill:before{content:"\f289"}.ri-vimeo-line:before{content:"\f28a"}.ri-vip-crown-2-fill:before{content:"\f28b"}.ri-vip-crown-2-line:before{content:"\f28c"}.ri-vip-crown-fill:before{content:"\f28d"}.ri-vip-crown-line:before{content:"\f28e"}.ri-vip-diamond-fill:before{content:"\f28f"}.ri-vip-diamond-line:before{content:"\f290"}.ri-vip-fill:before{content:"\f291"}.ri-vip-line:before{content:"\f292"}.ri-virus-fill:before{content:"\f293"}.ri-virus-line:before{content:"\f294"}.ri-visa-fill:before{content:"\f295"}.ri-visa-line:before{content:"\f296"}.ri-voice-recognition-fill:before{content:"\f297"}.ri-voice-recognition-line:before{content:"\f298"}.ri-voiceprint-fill:before{content:"\f299"}.ri-voiceprint-line:before{content:"\f29a"}.ri-volume-down-fill:before{content:"\f29b"}.ri-volume-down-line:before{content:"\f29c"}.ri-volume-mute-fill:before{content:"\f29d"}.ri-volume-mute-line:before{content:"\f29e"}.ri-volume-off-vibrate-fill:before{content:"\f29f"}.ri-volume-off-vibrate-line:before{content:"\f2a0"}.ri-volume-up-fill:before{content:"\f2a1"}.ri-volume-up-line:before{content:"\f2a2"}.ri-volume-vibrate-fill:before{content:"\f2a3"}.ri-volume-vibrate-line:before{content:"\f2a4"}.ri-vuejs-fill:before{content:"\f2a5"}.ri-vuejs-line:before{content:"\f2a6"}.ri-walk-fill:before{content:"\f2a7"}.ri-walk-line:before{content:"\f2a8"}.ri-wallet-2-fill:before{content:"\f2a9"}.ri-wallet-2-line:before{content:"\f2aa"}.ri-wallet-3-fill:before{content:"\f2ab"}.ri-wallet-3-line:before{content:"\f2ac"}.ri-wallet-fill:before{content:"\f2ad"}.ri-wallet-line:before{content:"\f2ae"}.ri-water-flash-fill:before{content:"\f2af"}.ri-water-flash-line:before{content:"\f2b0"}.ri-webcam-fill:before{content:"\f2b1"}.ri-webcam-line:before{content:"\f2b2"}.ri-wechat-2-fill:before{content:"\f2b3"}.ri-wechat-2-line:before{content:"\f2b4"}.ri-wechat-fill:before{content:"\f2b5"}.ri-wechat-line:before{content:"\f2b6"}.ri-wechat-pay-fill:before{content:"\f2b7"}.ri-wechat-pay-line:before{content:"\f2b8"}.ri-weibo-fill:before{content:"\f2b9"}.ri-weibo-line:before{content:"\f2ba"}.ri-whatsapp-fill:before{content:"\f2bb"}.ri-whatsapp-line:before{content:"\f2bc"}.ri-wheelchair-fill:before{content:"\f2bd"}.ri-wheelchair-line:before{content:"\f2be"}.ri-wifi-fill:before{content:"\f2bf"}.ri-wifi-line:before{content:"\f2c0"}.ri-wifi-off-fill:before{content:"\f2c1"}.ri-wifi-off-line:before{content:"\f2c2"}.ri-window-2-fill:before{content:"\f2c3"}.ri-window-2-line:before{content:"\f2c4"}.ri-window-fill:before{content:"\f2c5"}.ri-window-line:before{content:"\f2c6"}.ri-windows-fill:before{content:"\f2c7"}.ri-windows-line:before{content:"\f2c8"}.ri-windy-fill:before{content:"\f2c9"}.ri-windy-line:before{content:"\f2ca"}.ri-wireless-charging-fill:before{content:"\f2cb"}.ri-wireless-charging-line:before{content:"\f2cc"}.ri-women-fill:before{content:"\f2cd"}.ri-women-line:before{content:"\f2ce"}.ri-wubi-input:before{content:"\f2cf"}.ri-xbox-fill:before{content:"\f2d0"}.ri-xbox-line:before{content:"\f2d1"}.ri-xing-fill:before{content:"\f2d2"}.ri-xing-line:before{content:"\f2d3"}.ri-youtube-fill:before{content:"\f2d4"}.ri-youtube-line:before{content:"\f2d5"}.ri-zcool-fill:before{content:"\f2d6"}.ri-zcool-line:before{content:"\f2d7"}.ri-zhihu-fill:before{content:"\f2d8"}.ri-zhihu-line:before{content:"\f2d9"}.ri-zoom-in-fill:before{content:"\f2da"}.ri-zoom-in-line:before{content:"\f2db"}.ri-zoom-out-fill:before{content:"\f2dc"}.ri-zoom-out-line:before{content:"\f2dd"}.ri-zzz-fill:before{content:"\f2de"}.ri-zzz-line:before{content:"\f2df"}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes expand{0%{transform:rotateY(90deg)}to{opacity:1;transform:rotateY(0)}}@keyframes slideIn{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes shine{to{background-position-x:-200%}}@keyframes loaderShow{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes entranceLeft{0%{opacity:0;transform:translate(-5px)}to{opacity:1;transform:translate(0)}}@keyframes entranceRight{0%{opacity:0;transform:translate(5px)}to{opacity:1;transform:translate(0)}}@keyframes entranceTop{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}@keyframes entranceBottom{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@media screen and (min-width: 550px){::-webkit-scrollbar{width:8px;height:8px;border-radius:var(--baseRadius)}::-webkit-scrollbar-track{background:transparent;border-radius:var(--baseRadius)}::-webkit-scrollbar-thumb{background-color:var(--baseAlt2Color);border-radius:15px;border:2px solid transparent;background-clip:padding-box}::-webkit-scrollbar-thumb:hover,::-webkit-scrollbar-thumb:active{background-color:var(--baseAlt3Color)}html{scrollbar-color:var(--baseAlt2Color) transparent;scrollbar-width:thin;scroll-behavior:smooth}html *{scrollbar-width:inherit}}:focus-visible{outline-color:var(--primaryColor);outline-style:solid}html,body{line-height:var(--baseLineHeight);font-family:var(--baseFontFamily);font-size:var(--baseFontSize);color:var(--txtPrimaryColor);background:var(--bodyColor)}#app{overflow:auto;display:block;width:100%;height:100vh}.flatpickr-inline-container,.accordion .accordion-content,.accordion,.tabs,.tabs-content,.select .txt-missing,.form-field .form-field-block,.list,.skeleton-loader,.clearfix,.content,.form-field .help-block,.overlay-panel .panel-content,.sub-panel,.panel,.block,.code-block,blockquote,p{display:block;width:100%}h1,h2,.breadcrumbs .breadcrumb-item,h3,h4,h5,h6{margin:0;font-weight:400}h1{font-size:22px;line-height:28px}h2,.breadcrumbs .breadcrumb-item{font-size:20px;line-height:26px}h3{font-size:19px;line-height:24px}h4{font-size:18px;line-height:24px}h5{font-size:17px;line-height:24px}h6{font-size:16px;line-height:22px}em{font-style:italic}ins{color:var(--txtPrimaryColor);background:var(--successAltColor);text-decoration:none}del{color:var(--txtPrimaryColor);background:var(--dangerAltColor);text-decoration:none}strong{font-weight:600}small{font-size:var(--smFontSize);line-height:var(--smLineHeight)}sub,sup{position:relative;font-size:.75em;line-height:1}sup{vertical-align:top}sub{vertical-align:bottom}p{margin:5px 0}blockquote{position:relative;padding-left:var(--smSpacing);font-style:italic;color:var(--txtHintColor)}blockquote:before{content:"";position:absolute;top:0;left:0;width:2px;height:100%;background:var(--baseColor)}code{display:inline-block;font-family:var(--monospaceFontFamily);font-style:normal;font-size:var(--lgFontSize);line-height:1.379rem;padding:0 4px;white-space:nowrap;color:var(--txtPrimaryColor);background:var(--baseAlt2Color);border-radius:var(--baseRadius)}.code-block{overflow:auto;padding:var(--xsSpacing);white-space:pre-wrap;background:var(--baseAlt1Color)}ol,ul{margin:10px 0;list-style:decimal;padding-left:var(--baseSpacing)}ol li,ul li{margin-top:5px;margin-bottom:5px}ul{list-style:disc}img{max-width:100%;vertical-align:top}hr{display:block;border:0;height:1px;width:100%;background:var(--baseAlt1Color);margin:var(--baseSpacing) 0}hr.dark{background:var(--baseAlt2Color)}a{color:inherit}a:hover{text-decoration:none}a i,a .txt{display:inline-block;vertical-align:top}.txt-mono{font-family:var(--monospaceFontFamily)}.txt-nowrap{white-space:nowrap}.txt-ellipsis{display:inline-block;vertical-align:top;flex-shrink:1;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.txt-base{font-size:var(--baseFontSize)!important}.txt-xs{font-size:var(--xsFontSize)!important;line-height:var(--smLineHeight)}.txt-sm{font-size:var(--smFontSize)!important;line-height:var(--smLineHeight)}.txt-lg{font-size:var(--lgFontSize)!important}.txt-xl{font-size:var(--xlFontSize)!important}.txt-bold{font-weight:600!important}.txt-strikethrough{text-decoration:line-through!important}.txt-break{white-space:pre-wrap!important}.txt-center{text-align:center!important}.txt-justify{text-align:justify!important}.txt-left{text-align:left!important}.txt-right{text-align:right!important}.txt-main{color:var(--txtPrimaryColor)!important}.txt-hint{color:var(--txtHintColor)!important}.txt-disabled{color:var(--txtDisabledColor)!important}.link-hint{user-select:none;cursor:pointer;color:var(--txtHintColor)!important;text-decoration:none;transition:color var(--baseAnimationSpeed)}.link-hint:hover,.link-hint:focus-visible,.link-hint:active{color:var(--txtPrimaryColor)!important}.link-fade{opacity:1;user-select:none;cursor:pointer;text-decoration:none;color:var(--txtPrimaryColor);transition:opacity var(--baseAnimationSpeed)}.link-fade:focus-visible,.link-fade:hover,.link-fade:active{opacity:.8}.txt-primary{color:var(--primaryColor)!important}.bg-primary{background:var(--primaryColor)!important}.link-primary{cursor:pointer;color:var(--primaryColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-primary:focus-visible,.link-primary:hover,.link-primary:active{opacity:.8}.txt-info{color:var(--infoColor)!important}.bg-info{background:var(--infoColor)!important}.link-info{cursor:pointer;color:var(--infoColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-info:focus-visible,.link-info:hover,.link-info:active{opacity:.8}.txt-info-alt{color:var(--infoAltColor)!important}.bg-info-alt{background:var(--infoAltColor)!important}.link-info-alt{cursor:pointer;color:var(--infoAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-info-alt:focus-visible,.link-info-alt:hover,.link-info-alt:active{opacity:.8}.txt-success{color:var(--successColor)!important}.bg-success{background:var(--successColor)!important}.link-success{cursor:pointer;color:var(--successColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-success:focus-visible,.link-success:hover,.link-success:active{opacity:.8}.txt-success-alt{color:var(--successAltColor)!important}.bg-success-alt{background:var(--successAltColor)!important}.link-success-alt{cursor:pointer;color:var(--successAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-success-alt:focus-visible,.link-success-alt:hover,.link-success-alt:active{opacity:.8}.txt-danger{color:var(--dangerColor)!important}.bg-danger{background:var(--dangerColor)!important}.link-danger{cursor:pointer;color:var(--dangerColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-danger:focus-visible,.link-danger:hover,.link-danger:active{opacity:.8}.txt-danger-alt{color:var(--dangerAltColor)!important}.bg-danger-alt{background:var(--dangerAltColor)!important}.link-danger-alt{cursor:pointer;color:var(--dangerAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-danger-alt:focus-visible,.link-danger-alt:hover,.link-danger-alt:active{opacity:.8}.txt-warning{color:var(--warningColor)!important}.bg-warning{background:var(--warningColor)!important}.link-warning{cursor:pointer;color:var(--warningColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-warning:focus-visible,.link-warning:hover,.link-warning:active{opacity:.8}.txt-warning-alt{color:var(--warningAltColor)!important}.bg-warning-alt{background:var(--warningAltColor)!important}.link-warning-alt{cursor:pointer;color:var(--warningAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-warning-alt:focus-visible,.link-warning-alt:hover,.link-warning-alt:active{opacity:.8}.fade{opacity:.6}a.fade,.btn.fade,[tabindex].fade,[class*=link-].fade,.handle.fade{transition:all var(--baseAnimationSpeed)}a.fade:hover,.btn.fade:hover,[tabindex].fade:hover,[class*=link-].fade:hover,.handle.fade:hover{opacity:1}.noborder{border:0px!important}.hidden{display:none!important}.hidden-empty:empty{display:none!important}.content,.form-field .help-block,.overlay-panel .panel-content,.sub-panel,.panel{min-width:0}.content>:first-child,.form-field .help-block>:first-child,.overlay-panel .panel-content>:first-child,.sub-panel>:first-child,.panel>:first-child{margin-top:0}.content>:last-child,.form-field .help-block>:last-child,.overlay-panel .panel-content>:last-child,.sub-panel>:last-child,.panel>:last-child{margin-bottom:0}.panel{background:var(--baseColor);border-radius:var(--lgRadius);padding:calc(var(--baseSpacing) - 5px) var(--baseSpacing);box-shadow:0 2px 5px 0 var(--shadowColor)}.sub-panel{background:var(--baseColor);border-radius:var(--baseRadius);padding:calc(var(--smSpacing) - 5px) var(--smSpacing);border:1px solid var(--baseAlt1Color)}.clearfix{clear:both}.clearfix:after{content:"";display:table;clear:both}.flex{position:relative;display:flex;align-items:center;width:100%;min-width:0;gap:var(--smSpacing)}.flex-fill{flex:1 1 auto!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.inline-flex{position:relative;display:inline-flex;align-items:center;flex-wrap:wrap;min-width:0;gap:10px}.flex-order-0{order:0}.flex-order-1{order:1}.flex-order-2{order:2}.flex-order-3{order:3}.flex-order-4{order:4}.flex-order-5{order:5}.flex-order-6{order:6}.flex-gap-base{gap:var(--baseSpacing)!important}.flex-gap-xs{gap:var(--xsSpacing)!important}.flex-gap-sm{gap:var(--smSpacing)!important}.flex-gap-lg{gap:var(--lgSpacing)!important}.flex-gap-xl{gap:var(--xlSpacing)!important}.flex-gap-0{gap:0px!important}.flex-gap-5{gap:5px!important}.flex-gap-10{gap:10px!important}.flex-gap-15{gap:15px!important}.flex-gap-20{gap:20px!important}.flex-gap-25{gap:25px!important}.flex-gap-30{gap:30px!important}.flex-gap-35{gap:35px!important}.flex-gap-40{gap:40px!important}.flex-gap-45{gap:45px!important}.flex-gap-50{gap:50px!important}.flex-gap-55{gap:55px!important}.flex-gap-60{gap:60px!important}.m-base{margin:var(--baseSpacing)!important}.p-base{padding:var(--baseSpacing)!important}.m-xs{margin:var(--xsSpacing)!important}.p-xs{padding:var(--xsSpacing)!important}.m-sm{margin:var(--smSpacing)!important}.p-sm{padding:var(--smSpacing)!important}.m-lg{margin:var(--lgSpacing)!important}.p-lg{padding:var(--lgSpacing)!important}.m-xl{margin:var(--xlSpacing)!important}.p-xl{padding:var(--xlSpacing)!important}.m-t-auto{margin-top:auto!important}.p-t-auto{padding-top:auto!important}.m-t-base{margin-top:var(--baseSpacing)!important}.p-t-base{padding-top:var(--baseSpacing)!important}.m-t-xs{margin-top:var(--xsSpacing)!important}.p-t-xs{padding-top:var(--xsSpacing)!important}.m-t-sm{margin-top:var(--smSpacing)!important}.p-t-sm{padding-top:var(--smSpacing)!important}.m-t-lg{margin-top:var(--lgSpacing)!important}.p-t-lg{padding-top:var(--lgSpacing)!important}.m-t-xl{margin-top:var(--xlSpacing)!important}.p-t-xl{padding-top:var(--xlSpacing)!important}.m-r-auto{margin-right:auto!important}.p-r-auto{padding-right:auto!important}.m-r-base{margin-right:var(--baseSpacing)!important}.p-r-base{padding-right:var(--baseSpacing)!important}.m-r-xs{margin-right:var(--xsSpacing)!important}.p-r-xs{padding-right:var(--xsSpacing)!important}.m-r-sm{margin-right:var(--smSpacing)!important}.p-r-sm{padding-right:var(--smSpacing)!important}.m-r-lg{margin-right:var(--lgSpacing)!important}.p-r-lg{padding-right:var(--lgSpacing)!important}.m-r-xl{margin-right:var(--xlSpacing)!important}.p-r-xl{padding-right:var(--xlSpacing)!important}.m-b-auto{margin-bottom:auto!important}.p-b-auto{padding-bottom:auto!important}.m-b-base{margin-bottom:var(--baseSpacing)!important}.p-b-base{padding-bottom:var(--baseSpacing)!important}.m-b-xs{margin-bottom:var(--xsSpacing)!important}.p-b-xs{padding-bottom:var(--xsSpacing)!important}.m-b-sm{margin-bottom:var(--smSpacing)!important}.p-b-sm{padding-bottom:var(--smSpacing)!important}.m-b-lg{margin-bottom:var(--lgSpacing)!important}.p-b-lg{padding-bottom:var(--lgSpacing)!important}.m-b-xl{margin-bottom:var(--xlSpacing)!important}.p-b-xl{padding-bottom:var(--xlSpacing)!important}.m-l-auto{margin-left:auto!important}.p-l-auto{padding-left:auto!important}.m-l-base{margin-left:var(--baseSpacing)!important}.p-l-base{padding-left:var(--baseSpacing)!important}.m-l-xs{margin-left:var(--xsSpacing)!important}.p-l-xs{padding-left:var(--xsSpacing)!important}.m-l-sm{margin-left:var(--smSpacing)!important}.p-l-sm{padding-left:var(--smSpacing)!important}.m-l-lg{margin-left:var(--lgSpacing)!important}.p-l-lg{padding-left:var(--lgSpacing)!important}.m-l-xl{margin-left:var(--xlSpacing)!important}.p-l-xl{padding-left:var(--xlSpacing)!important}.m-0{margin:0!important}.p-0{padding:0!important}.m-t-0{margin-top:0!important}.p-t-0{padding-top:0!important}.m-r-0{margin-right:0!important}.p-r-0{padding-right:0!important}.m-b-0{margin-bottom:0!important}.p-b-0{padding-bottom:0!important}.m-l-0{margin-left:0!important}.p-l-0{padding-left:0!important}.m-5{margin:5px!important}.p-5{padding:5px!important}.m-t-5{margin-top:5px!important}.p-t-5{padding-top:5px!important}.m-r-5{margin-right:5px!important}.p-r-5{padding-right:5px!important}.m-b-5{margin-bottom:5px!important}.p-b-5{padding-bottom:5px!important}.m-l-5{margin-left:5px!important}.p-l-5{padding-left:5px!important}.m-10{margin:10px!important}.p-10{padding:10px!important}.m-t-10{margin-top:10px!important}.p-t-10{padding-top:10px!important}.m-r-10{margin-right:10px!important}.p-r-10{padding-right:10px!important}.m-b-10{margin-bottom:10px!important}.p-b-10{padding-bottom:10px!important}.m-l-10{margin-left:10px!important}.p-l-10{padding-left:10px!important}.m-15{margin:15px!important}.p-15{padding:15px!important}.m-t-15{margin-top:15px!important}.p-t-15{padding-top:15px!important}.m-r-15{margin-right:15px!important}.p-r-15{padding-right:15px!important}.m-b-15{margin-bottom:15px!important}.p-b-15{padding-bottom:15px!important}.m-l-15{margin-left:15px!important}.p-l-15{padding-left:15px!important}.m-20{margin:20px!important}.p-20{padding:20px!important}.m-t-20{margin-top:20px!important}.p-t-20{padding-top:20px!important}.m-r-20{margin-right:20px!important}.p-r-20{padding-right:20px!important}.m-b-20{margin-bottom:20px!important}.p-b-20{padding-bottom:20px!important}.m-l-20{margin-left:20px!important}.p-l-20{padding-left:20px!important}.m-25{margin:25px!important}.p-25{padding:25px!important}.m-t-25{margin-top:25px!important}.p-t-25{padding-top:25px!important}.m-r-25{margin-right:25px!important}.p-r-25{padding-right:25px!important}.m-b-25{margin-bottom:25px!important}.p-b-25{padding-bottom:25px!important}.m-l-25{margin-left:25px!important}.p-l-25{padding-left:25px!important}.m-30{margin:30px!important}.p-30{padding:30px!important}.m-t-30{margin-top:30px!important}.p-t-30{padding-top:30px!important}.m-r-30{margin-right:30px!important}.p-r-30{padding-right:30px!important}.m-b-30{margin-bottom:30px!important}.p-b-30{padding-bottom:30px!important}.m-l-30{margin-left:30px!important}.p-l-30{padding-left:30px!important}.m-35{margin:35px!important}.p-35{padding:35px!important}.m-t-35{margin-top:35px!important}.p-t-35{padding-top:35px!important}.m-r-35{margin-right:35px!important}.p-r-35{padding-right:35px!important}.m-b-35{margin-bottom:35px!important}.p-b-35{padding-bottom:35px!important}.m-l-35{margin-left:35px!important}.p-l-35{padding-left:35px!important}.m-40{margin:40px!important}.p-40{padding:40px!important}.m-t-40{margin-top:40px!important}.p-t-40{padding-top:40px!important}.m-r-40{margin-right:40px!important}.p-r-40{padding-right:40px!important}.m-b-40{margin-bottom:40px!important}.p-b-40{padding-bottom:40px!important}.m-l-40{margin-left:40px!important}.p-l-40{padding-left:40px!important}.m-45{margin:45px!important}.p-45{padding:45px!important}.m-t-45{margin-top:45px!important}.p-t-45{padding-top:45px!important}.m-r-45{margin-right:45px!important}.p-r-45{padding-right:45px!important}.m-b-45{margin-bottom:45px!important}.p-b-45{padding-bottom:45px!important}.m-l-45{margin-left:45px!important}.p-l-45{padding-left:45px!important}.m-50{margin:50px!important}.p-50{padding:50px!important}.m-t-50{margin-top:50px!important}.p-t-50{padding-top:50px!important}.m-r-50{margin-right:50px!important}.p-r-50{padding-right:50px!important}.m-b-50{margin-bottom:50px!important}.p-b-50{padding-bottom:50px!important}.m-l-50{margin-left:50px!important}.p-l-50{padding-left:50px!important}.m-55{margin:55px!important}.p-55{padding:55px!important}.m-t-55{margin-top:55px!important}.p-t-55{padding-top:55px!important}.m-r-55{margin-right:55px!important}.p-r-55{padding-right:55px!important}.m-b-55{margin-bottom:55px!important}.p-b-55{padding-bottom:55px!important}.m-l-55{margin-left:55px!important}.p-l-55{padding-left:55px!important}.m-60{margin:60px!important}.p-60{padding:60px!important}.m-t-60{margin-top:60px!important}.p-t-60{padding-top:60px!important}.m-r-60{margin-right:60px!important}.p-r-60{padding-right:60px!important}.m-b-60{margin-bottom:60px!important}.p-b-60{padding-bottom:60px!important}.m-l-60{margin-left:60px!important}.p-l-60{padding-left:60px!important}.no-min-width{min-width:0!important}.wrapper{position:relative;width:var(--wrapperWidth);margin:0 auto;max-width:100%}.wrapper.wrapper-sm{width:var(--smWrapperWidth)}.wrapper.wrapper-lg{width:var(--lgWrapperWidth)}.label{--labelVPadding: 3px;--labelHPadding: 8px;display:inline-flex;align-items:center;gap:5px;padding:var(--labelVPadding) var(--labelHPadding);min-height:23px;max-width:100%;text-align:center;font-size:var(--smFontSize);line-height:var(--smLineHeight);border-radius:30px;background:var(--baseAlt2Color);color:var(--txtPrimaryColor);white-space:nowrap}.label .btn:last-child{margin-right:calc(-.5 * var(--labelHPadding))}.label .btn:first-child{margin-left:calc(-.5 * var(--labelHPadding))}.label.label-sm{--labelHPadding: 5px;font-size:var(--xsFontSize);min-height:18px;line-height:1}.label.label-primary{color:var(--baseColor);background:var(--primaryColor)}.label.label-info{background:var(--infoAltColor)}.label.label-success{background:var(--successAltColor)}.label.label-danger{background:var(--dangerAltColor)}.label.label-warning{background:var(--warningAltColor)}.thumb{--thumbSize: 40px;flex-shrink:0;position:relative;display:inline-flex;align-items:center;justify-content:center;line-height:1;width:var(--thumbSize);height:var(--thumbSize);background:var(--baseAlt2Color);border-radius:var(--baseRadius);color:var(--txtPrimaryColor);font-size:1.16rem;box-shadow:0 2px 5px 0 var(--shadowColor)}.thumb i{font-size:inherit}.thumb img{width:100%;height:100%;border-radius:inherit;overflow:hidden}.thumb.thumb-sm{--thumbSize: 32px;font-size:.92rem}.thumb.thumb-lg{--thumbSize: 60px;font-size:1.3rem}.thumb.thumb-xl{--thumbSize: 80px;font-size:1.5rem}.thumb.thumb-circle{border-radius:50%}.thumb.thumb-active{box-shadow:0 0 0 2px var(--primaryColor)}a.thumb:not(.thumb-active){transition:box-shadow var(--baseAnimationSpeed)}a.thumb:not(.thumb-active):hover,a.thumb:not(.thumb-active):focus{box-shadow:0 2px 5px 0 var(--shadowColor),0 2px 4px 1px var(--shadowColor)}.section-title{display:flex;align-items:center;width:100%;column-gap:10px;row-gap:5px;margin:0 0 var(--xsSpacing);font-weight:600;font-size:var(--smFontSize);line-height:var(--smLineHeight);color:var(--txtHintColor);text-transform:uppercase}.drag-handle{outline:0;cursor:pointer;display:inline-flex;align-items:left;color:var(--txtDisabledColor);transition:color var(--baseAnimationSpeed)}.drag-handle:before,.drag-handle:after{content:"\ef77";font-family:var(--iconFontFamily);font-size:18px;line-height:1;width:7px;text-align:center}.drag-handle:focus-visible,.drag-handle:hover,.drag-handle:active{color:var(--txtPrimaryColor)}.logo{position:relative;vertical-align:top;display:inline-flex;align-items:center;gap:10px;font-size:23px;text-decoration:none;color:inherit;user-select:none}.logo strong{font-weight:700}.logo .version{position:absolute;right:0;top:-5px;line-height:1;font-size:10px;font-weight:400;padding:2px 4px;border-radius:var(--baseRadius);background:var(--dangerAltColor);color:var(--txtPrimaryColor)}.logo.logo-sm{font-size:20px}.loader{--loaderSize: 32px;position:relative;display:inline-flex;vertical-align:top;flex-direction:column;align-items:center;justify-content:center;row-gap:10px;margin:0;color:var(--txtDisabledColor);text-align:center;font-weight:400}.loader:before{content:"\eec4";display:inline-block;vertical-align:top;clear:both;width:var(--loaderSize);height:var(--loaderSize);line-height:var(--loaderSize);font-size:var(--loaderSize);font-weight:400;font-family:var(--iconFontFamily);color:inherit;text-align:center;animation:loaderShow var(--baseAnimationSpeed),rotate .9s var(--baseAnimationSpeed) infinite linear}.loader.loader-primary{color:var(--primaryColor)}.loader.loader-info{color:var(--infoColor)}.loader.loader-info-alt{color:var(--infoAltColor)}.loader.loader-success{color:var(--successColor)}.loader.loader-success-alt{color:var(--successAltColor)}.loader.loader-danger{color:var(--dangerColor)}.loader.loader-danger-alt{color:var(--dangerAltColor)}.loader.loader-warning{color:var(--warningColor)}.loader.loader-warning-alt{color:var(--warningAltColor)}.loader.loader-sm{--loaderSize: 24px}.loader.loader-lg{--loaderSize: 42px}.skeleton-loader{position:relative;height:12px;margin:5px 0;border-radius:var(--baseRadius);background:var(--baseAlt1Color);animation:fadeIn .4s}.skeleton-loader:before{content:"";width:100%;height:100%;display:block;border-radius:inherit;background:linear-gradient(90deg,var(--baseAlt1Color) 8%,var(--bodyColor) 18%,var(--baseAlt1Color) 33%);background-size:200% 100%;animation:shine 1s linear infinite}.placeholder-section{display:flex;width:100%;align-items:center;justify-content:center;text-align:center;flex-direction:column;gap:var(--smSpacing);color:var(--txtHintColor)}.placeholder-section .icon{font-size:50px;height:50px;line-height:1;opacity:.3}.placeholder-section .icon i{font-size:inherit;vertical-align:top}.list{position:relative;overflow:auto;overflow:overlay;border:1px solid var(--baseAlt2Color);border-radius:var(--baseRadius)}.list .list-item{word-break:break-word;position:relative;display:flex;align-items:center;width:100%;gap:var(--xsSpacing);outline:0;padding:10px var(--xsSpacing);min-height:50px;border-top:1px solid var(--baseAlt2Color);transition:background var(--baseAnimationSpeed)}.list .list-item:first-child{border-top:0}.list .list-item:last-child{border-radius:inherit}.list .list-item .content,.list .list-item .form-field .help-block,.form-field .list .list-item .help-block,.list .list-item .overlay-panel .panel-content,.overlay-panel .list .list-item .panel-content,.list .list-item .panel,.list .list-item .sub-panel{display:flex;align-items:center;gap:5px;min-width:0;max-width:100%;user-select:text}.list .list-item .actions{gap:10px;flex-shrink:0;display:inline-flex;align-items:center;margin:-1px -5px -1px 0}.list .list-item .actions.nonintrusive{opacity:0;visibility:hidden;transform:translate(5px);transition:transform var(--baseAnimationSpeed),opacity var(--baseAnimationSpeed),visibility var(--baseAnimationSpeed)}.list .list-item:hover .actions.nonintrusive,.list .list-item:active .actions.nonintrusive{opacity:1;visibility:visible;transform:translate(0)}.list .list-item.selected{background:var(--bodyColor)}.list .list-item.handle:not(.disabled){cursor:pointer;user-select:none}.list .list-item.handle:not(.disabled):hover,.list .list-item.handle:not(.disabled):focus-visible{background:var(--baseAlt1Color)}.list .list-item.handle:not(.disabled):active{background:var(--baseAlt2Color)}.list .list-item.disabled:not(.selected){cursor:default;opacity:.6}.list .list-item-btn{padding:5px;min-height:auto}.list.list-compact .list-item{min-height:40px}.entrance-top{animation:entranceTop var(--entranceAnimationSpeed)}.entrance-bottom{animation:entranceBottom var(--entranceAnimationSpeed)}.entrance-left{animation:entranceLeft var(--entranceAnimationSpeed)}.entrance-right{animation:entranceRight var(--entranceAnimationSpeed)}.grid{--gridGap: var(--baseSpacing);position:relative;display:flex;flex-grow:1;flex-wrap:wrap;row-gap:var(--gridGap);margin:0 calc(-.5 * var(--gridGap))}.grid.grid-center{align-items:center}.grid.grid-sm{--gridGap: var(--smSpacing)}.grid .form-field{margin-bottom:0}.grid>*{margin:0 calc(.5 * var(--gridGap))}.col-xxl-1,.col-xxl-2,.col-xxl-3,.col-xxl-4,.col-xxl-5,.col-xxl-6,.col-xxl-7,.col-xxl-8,.col-xxl-9,.col-xxl-10,.col-xxl-11,.col-xxl-12,.col-xl-1,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-10,.col-xl-11,.col-xl-12,.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-1,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12{position:relative;width:100%;min-height:1px}.col-auto{flex:0 0 auto;width:auto}.col-12{width:calc(100% - var(--gridGap))}.col-11{width:calc(91.6666666667% - var(--gridGap))}.col-10{width:calc(83.3333333333% - var(--gridGap))}.col-9{width:calc(75% - var(--gridGap))}.col-8{width:calc(66.6666666667% - var(--gridGap))}.col-7{width:calc(58.3333333333% - var(--gridGap))}.col-6{width:calc(50% - var(--gridGap))}.col-5{width:calc(41.6666666667% - var(--gridGap))}.col-4{width:calc(33.3333333333% - var(--gridGap))}.col-3{width:calc(25% - var(--gridGap))}.col-2{width:calc(16.6666666667% - var(--gridGap))}.col-1{width:calc(8.3333333333% - var(--gridGap))}@media (min-width: 576px){.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-12{width:calc(100% - var(--gridGap))}.col-sm-11{width:calc(91.6666666667% - var(--gridGap))}.col-sm-10{width:calc(83.3333333333% - var(--gridGap))}.col-sm-9{width:calc(75% - var(--gridGap))}.col-sm-8{width:calc(66.6666666667% - var(--gridGap))}.col-sm-7{width:calc(58.3333333333% - var(--gridGap))}.col-sm-6{width:calc(50% - var(--gridGap))}.col-sm-5{width:calc(41.6666666667% - var(--gridGap))}.col-sm-4{width:calc(33.3333333333% - var(--gridGap))}.col-sm-3{width:calc(25% - var(--gridGap))}.col-sm-2{width:calc(16.6666666667% - var(--gridGap))}.col-sm-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 768px){.col-md-auto{flex:0 0 auto;width:auto}.col-md-12{width:calc(100% - var(--gridGap))}.col-md-11{width:calc(91.6666666667% - var(--gridGap))}.col-md-10{width:calc(83.3333333333% - var(--gridGap))}.col-md-9{width:calc(75% - var(--gridGap))}.col-md-8{width:calc(66.6666666667% - var(--gridGap))}.col-md-7{width:calc(58.3333333333% - var(--gridGap))}.col-md-6{width:calc(50% - var(--gridGap))}.col-md-5{width:calc(41.6666666667% - var(--gridGap))}.col-md-4{width:calc(33.3333333333% - var(--gridGap))}.col-md-3{width:calc(25% - var(--gridGap))}.col-md-2{width:calc(16.6666666667% - var(--gridGap))}.col-md-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 992px){.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-12{width:calc(100% - var(--gridGap))}.col-lg-11{width:calc(91.6666666667% - var(--gridGap))}.col-lg-10{width:calc(83.3333333333% - var(--gridGap))}.col-lg-9{width:calc(75% - var(--gridGap))}.col-lg-8{width:calc(66.6666666667% - var(--gridGap))}.col-lg-7{width:calc(58.3333333333% - var(--gridGap))}.col-lg-6{width:calc(50% - var(--gridGap))}.col-lg-5{width:calc(41.6666666667% - var(--gridGap))}.col-lg-4{width:calc(33.3333333333% - var(--gridGap))}.col-lg-3{width:calc(25% - var(--gridGap))}.col-lg-2{width:calc(16.6666666667% - var(--gridGap))}.col-lg-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 1200px){.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-12{width:calc(100% - var(--gridGap))}.col-xl-11{width:calc(91.6666666667% - var(--gridGap))}.col-xl-10{width:calc(83.3333333333% - var(--gridGap))}.col-xl-9{width:calc(75% - var(--gridGap))}.col-xl-8{width:calc(66.6666666667% - var(--gridGap))}.col-xl-7{width:calc(58.3333333333% - var(--gridGap))}.col-xl-6{width:calc(50% - var(--gridGap))}.col-xl-5{width:calc(41.6666666667% - var(--gridGap))}.col-xl-4{width:calc(33.3333333333% - var(--gridGap))}.col-xl-3{width:calc(25% - var(--gridGap))}.col-xl-2{width:calc(16.6666666667% - var(--gridGap))}.col-xl-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 1400px){.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-12{width:calc(100% - var(--gridGap))}.col-xxl-11{width:calc(91.6666666667% - var(--gridGap))}.col-xxl-10{width:calc(83.3333333333% - var(--gridGap))}.col-xxl-9{width:calc(75% - var(--gridGap))}.col-xxl-8{width:calc(66.6666666667% - var(--gridGap))}.col-xxl-7{width:calc(58.3333333333% - var(--gridGap))}.col-xxl-6{width:calc(50% - var(--gridGap))}.col-xxl-5{width:calc(41.6666666667% - var(--gridGap))}.col-xxl-4{width:calc(33.3333333333% - var(--gridGap))}.col-xxl-3{width:calc(25% - var(--gridGap))}.col-xxl-2{width:calc(16.6666666667% - var(--gridGap))}.col-xxl-1{width:calc(8.3333333333% - var(--gridGap))}}.app-tooltip{position:fixed;z-index:999999;top:0;left:0;display:inline-block;vertical-align:top;max-width:275px;padding:3px 5px;color:#fff;text-align:center;font-family:var(--baseFontFamily);font-size:var(--smFontSize);line-height:var(--smLineHeight);border-radius:var(--baseRadius);background:var(--tooltipColor);pointer-events:none;user-select:none;transition:opacity var(--baseAnimationSpeed),visibility var(--baseAnimationSpeed),transform var(--baseAnimationSpeed);transform:translateY(1px);backface-visibility:hidden;white-space:pre-line;word-break:break-word;opacity:0;visibility:hidden}.app-tooltip.code{font-family:monospace;white-space:pre-wrap;text-align:left;min-width:150px;max-width:340px}.app-tooltip.active{transform:scale(1);opacity:1;visibility:visible}.dropdown{position:absolute;z-index:99;right:0;left:auto;top:100%;cursor:default;display:inline-block;vertical-align:top;padding:5px;margin:5px 0 0;width:auto;min-width:140px;max-width:450px;max-height:330px;overflow-x:hidden;overflow-y:auto;background:var(--baseColor);border-radius:var(--baseRadius);border:1px solid var(--baseAlt2Color);box-shadow:0 2px 5px 0 var(--shadowColor)}.dropdown hr{margin:5px 0}.dropdown .dropdown-item{border:0;background:none;position:relative;outline:0;display:flex;align-items:center;column-gap:8px;width:100%;height:auto;min-height:0;text-align:left;padding:8px 10px;margin:0 0 5px;cursor:pointer;color:var(--txtPrimaryColor);font-weight:400;font-size:var(--baseFontSize);font-family:var(--baseFontFamily);line-height:var(--baseLineHeight);border-radius:var(--baseRadius);text-decoration:none;word-break:break-word;user-select:none;transition:background var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.dropdown .dropdown-item:last-child{margin-bottom:0}.dropdown .dropdown-item.selected{background:var(--baseAlt1Color)}.dropdown .dropdown-item:focus-visible,.dropdown .dropdown-item:hover{background:var(--baseAlt2Color)}.dropdown .dropdown-item:active{transition-duration:var(--activeAnimationSpeed);background:var(--baseAlt3Color)}.dropdown .dropdown-item.disabled{color:var(--txtDisabledColor);background:none;pointer-events:none}.dropdown .dropdown-item.separator{cursor:default;background:none;text-transform:uppercase;padding-top:0;padding-bottom:0;margin-top:15px;color:var(--txtDisabledColor);font-weight:600;font-size:var(--smFontSize)}.dropdown.dropdown-upside{top:auto;bottom:100%;margin:0 0 5px}.dropdown.dropdown-left{right:auto;left:0}.dropdown.dropdown-center{right:auto;left:50%;transform:translate(-50%)}.dropdown.dropdown-sm{margin-top:5px;min-width:100px}.dropdown.dropdown-sm .dropdown-item{column-gap:7px;font-size:var(--smFontSize);margin:0 0 2px;padding:5px 7px}.dropdown.dropdown-sm .dropdown-item:last-child{margin-bottom:0}.dropdown.dropdown-sm.dropdown-upside{margin-top:0;margin-bottom:5px}.dropdown.dropdown-block{width:100%;min-width:130px;max-width:100%}.dropdown.dropdown-nowrap{white-space:nowrap}.overlay-panel{position:relative;z-index:1;display:flex;flex-direction:column;align-self:flex-end;margin-left:auto;background:var(--baseColor);height:100%;width:580px;max-width:100%;word-wrap:break-word;box-shadow:0 2px 5px 0 var(--shadowColor)}.overlay-panel .overlay-panel-section{position:relative;width:100%;margin:0;padding:var(--baseSpacing);transition:box-shadow var(--baseAnimationSpeed)}.overlay-panel .overlay-panel-section:empty{display:none}.overlay-panel .overlay-panel-section:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.overlay-panel .overlay-panel-section:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.overlay-panel .overlay-panel-section .btn{flex-grow:0}.overlay-panel img{max-width:100%}.overlay-panel .panel-header{position:relative;z-index:2;display:flex;flex-wrap:wrap;align-items:center;column-gap:10px;row-gap:var(--baseSpacing);padding:calc(var(--baseSpacing) - 7px) var(--baseSpacing)}.overlay-panel .panel-header>*{margin-top:0;margin-bottom:0}.overlay-panel .panel-header .btn-back{margin-left:-10px}.overlay-panel .panel-header .overlay-close{z-index:3;outline:0;position:absolute;right:100%;top:20px;margin:0;display:inline-flex;align-items:center;justify-content:center;width:35px;height:35px;cursor:pointer;text-align:center;font-size:1.6rem;line-height:1;border-radius:50% 0 0 50%;color:#fff;background:var(--primaryColor);opacity:.5;transition:opacity var(--baseAnimationSpeed);user-select:none}.overlay-panel .panel-header .overlay-close i{font-size:inherit}.overlay-panel .panel-header .overlay-close:hover,.overlay-panel .panel-header .overlay-close:focus-visible,.overlay-panel .panel-header .overlay-close:active{opacity:.7}.overlay-panel .panel-header .overlay-close:active{transition-duration:var(--activeAnimationSpeed);opacity:1}.overlay-panel .panel-header .btn-close{margin-right:-10px}.overlay-panel .panel-header .tabs-header{margin-bottom:-24px}.overlay-panel .panel-content{z-index:auto;flex-grow:1;overflow-x:hidden;overflow-y:auto;overflow-y:overlay;scroll-behavior:smooth}.tox-fullscreen .overlay-panel .panel-content{z-index:9}.overlay-panel .panel-header~.panel-content{padding-top:5px}.overlay-panel .panel-footer{z-index:2;column-gap:var(--smSpacing);display:flex;align-items:center;justify-content:flex-end;border-top:1px solid var(--baseAlt2Color);padding:calc(var(--baseSpacing) - 7px) var(--baseSpacing)}.overlay-panel.scrollable .panel-header{box-shadow:0 4px 5px #0000000d}.overlay-panel.scrollable .panel-footer{box-shadow:0 -4px 5px #0000000d}.overlay-panel.scrollable.scroll-top-reached .panel-header,.overlay-panel.scrollable.scroll-bottom-reached .panel-footer{box-shadow:none}.overlay-panel.overlay-panel-xl{width:850px}.overlay-panel.overlay-panel-lg{width:700px}.overlay-panel.overlay-panel-sm{width:460px}.overlay-panel.popup{height:auto;max-height:100%;align-self:center;border-radius:var(--baseRadius);margin:0 auto}.overlay-panel.popup .panel-footer{background:var(--bodyColor)}.overlay-panel.hide-content .panel-content{display:none}.overlay-panel.colored-header .panel-header{background:var(--bodyColor);border-bottom:1px solid var(--baseAlt1Color)}.overlay-panel.colored-header .panel-header .tabs-header{border-bottom:0}.overlay-panel.colored-header .panel-header .tabs-header .tab-item{border:1px solid transparent;border-bottom:0}.overlay-panel.colored-header .panel-header .tabs-header .tab-item:hover,.overlay-panel.colored-header .panel-header .tabs-header .tab-item:focus-visible{background:var(--baseAlt1Color)}.overlay-panel.colored-header .panel-header .tabs-header .tab-item:after{content:none;display:none}.overlay-panel.colored-header .panel-header .tabs-header .tab-item.active{background:var(--baseColor);border-color:var(--baseAlt1Color)}.overlay-panel.colored-header .panel-header~.panel-content{padding-top:calc(var(--baseSpacing) - 5px)}.overlay-panel.compact-header .panel-header{row-gap:var(--smSpacing)}.overlay-panel.full-width-popup{width:100%}.overlay-panel.preview .panel-header{position:absolute;z-index:99;box-shadow:none}.overlay-panel.preview .panel-header .overlay-close{left:100%;right:auto;border-radius:0 50% 50% 0}.overlay-panel.preview .panel-header .overlay-close i{margin-right:5px}.overlay-panel.preview .panel-header,.overlay-panel.preview .panel-footer{padding:10px 15px}.overlay-panel.preview .panel-content{padding:0;text-align:center;display:flex;align-items:center;justify-content:center}.overlay-panel.preview img{max-width:100%;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius)}.overlay-panel.preview object{position:absolute;z-index:1;left:0;top:0;width:100%;height:100%}.overlay-panel.preview.preview-image{width:auto;min-width:320px;min-height:300px;max-width:75%;max-height:90%}.overlay-panel.preview.preview-document,.overlay-panel.preview.preview-video{width:75%;height:90%}.overlay-panel.preview.preview-audio{min-width:320px;min-height:300px;max-width:90%;max-height:90%}@media (max-width: 900px){.overlay-panel .overlay-panel-section{padding:var(--smSpacing)}}.overlay-panel-container{display:flex;position:fixed;z-index:1000;flex-direction:row;align-items:center;top:0;left:0;width:100%;height:100%;overflow:hidden;margin:0;padding:0;outline:0}.overlay-panel-container .overlay{position:absolute;z-index:0;left:0;top:0;width:100%;height:100%;user-select:none;background:var(--overlayColor)}.overlay-panel-container.padded{padding:10px}.overlay-panel-wrapper{position:relative;z-index:1000;outline:0}.alert{position:relative;display:flex;column-gap:15px;align-items:center;width:100%;min-height:50px;max-width:100%;word-break:break-word;margin:0 0 var(--baseSpacing);border-radius:var(--baseRadius);padding:12px 15px;background:var(--baseAlt1Color);color:var(--txtAltColor)}.alert .content,.alert .form-field .help-block,.form-field .alert .help-block,.alert .panel,.alert .sub-panel,.alert .overlay-panel .panel-content,.overlay-panel .alert .panel-content{flex-grow:1}.alert .icon,.alert .close{display:inline-flex;align-items:center;justify-content:center;flex-grow:0;flex-shrink:0;text-align:center}.alert .icon{align-self:stretch;font-size:1.2em;padding-right:15px;font-weight:400;border-right:1px solid rgba(0,0,0,.05);color:var(--txtHintColor)}.alert .close{display:inline-flex;margin-right:-5px;width:30px;height:30px;outline:0;cursor:pointer;text-align:center;font-size:var(--smFontSize);line-height:30px;border-radius:30px;text-decoration:none;color:inherit;opacity:.5;transition:opacity var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.alert .close:hover,.alert .close:focus{opacity:1;background:rgba(255,255,255,.2)}.alert .close:active{opacity:1;background:rgba(255,255,255,.3);transition-duration:var(--activeAnimationSpeed)}.alert code,.alert hr{background:rgba(0,0,0,.1)}.alert.alert-info{background:var(--infoAltColor)}.alert.alert-info .icon{color:var(--infoColor)}.alert.alert-warning{background:var(--warningAltColor)}.alert.alert-warning .icon{color:var(--warningColor)}.alert.alert-success{background:var(--successAltColor)}.alert.alert-success .icon{color:var(--successColor)}.alert.alert-danger{background:var(--dangerAltColor)}.alert.alert-danger .icon{color:var(--dangerColor)}.toasts-wrapper{position:fixed;z-index:999999;bottom:0;left:0;right:0;padding:0 var(--smSpacing);width:auto;display:block;text-align:center;pointer-events:none}.toasts-wrapper .alert{text-align:left;pointer-events:auto;width:var(--smWrapperWidth);margin:var(--baseSpacing) auto;box-shadow:0 2px 5px 0 var(--shadowColor)}body:not(.overlay-active) .app-sidebar~.app-body .toasts-wrapper{left:var(--appSidebarWidth)}body:not(.overlay-active) .app-sidebar~.app-body .page-sidebar~.toasts-wrapper{left:calc(var(--appSidebarWidth) + var(--pageSidebarWidth))}button{outline:0;border:0;background:none;padding:0;text-align:left;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit}.btn{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;outline:0;border:0;margin:0;flex-shrink:0;cursor:pointer;padding:5px 20px;column-gap:7px;user-select:none;min-width:var(--btnHeight);min-height:var(--btnHeight);text-align:center;text-decoration:none;line-height:1;font-weight:600;color:#fff;font-size:var(--baseFontSize);font-family:var(--baseFontFamily);border-radius:var(--btnRadius);background:none;transition:color var(--baseAnimationSpeed)}.btn i{font-size:1.1428em;vertical-align:middle;display:inline-block}.btn:before{content:"";border-radius:inherit;position:absolute;left:0;top:0;z-index:-1;width:100%;height:100%;pointer-events:none;user-select:none;backface-visibility:hidden;background:var(--primaryColor);transition:filter var(--baseAnimationSpeed),opacity var(--baseAnimationSpeed),transform var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.btn:hover:before,.btn:focus-visible:before{opacity:.9}.btn.active,.btn:active{z-index:999}.btn.active:before,.btn:active:before{opacity:.8;transition-duration:var(--activeAnimationSpeed)}.btn.btn-info:before{background:var(--infoColor)}.btn.btn-info:hover:before,.btn.btn-info:focus-visible:before{opacity:.8}.btn.btn-info:active:before{opacity:.7}.btn.btn-success:before{background:var(--successColor)}.btn.btn-success:hover:before,.btn.btn-success:focus-visible:before{opacity:.8}.btn.btn-success:active:before{opacity:.7}.btn.btn-danger:before{background:var(--dangerColor)}.btn.btn-danger:hover:before,.btn.btn-danger:focus-visible:before{opacity:.8}.btn.btn-danger:active:before{opacity:.7}.btn.btn-warning:before{background:var(--warningColor)}.btn.btn-warning:hover:before,.btn.btn-warning:focus-visible:before{opacity:.8}.btn.btn-warning:active:before{opacity:.7}.btn.btn-hint:before{background:var(--baseAlt4Color)}.btn.btn-hint:hover:before,.btn.btn-hint:focus-visible:before{opacity:.8}.btn.btn-hint:active:before{opacity:.7}.btn.btn-outline{border:2px solid currentColor;background:#fff}.btn.btn-secondary,.btn.btn-transparent,.btn.btn-outline{box-shadow:none;color:var(--txtPrimaryColor)}.btn.btn-secondary:before,.btn.btn-transparent:before,.btn.btn-outline:before{opacity:0}.btn.btn-secondary:focus-visible:before,.btn.btn-secondary:hover:before,.btn.btn-transparent:focus-visible:before,.btn.btn-transparent:hover:before,.btn.btn-outline:focus-visible:before,.btn.btn-outline:hover:before{opacity:.3}.btn.btn-secondary.active:before,.btn.btn-secondary:active:before,.btn.btn-transparent.active:before,.btn.btn-transparent:active:before,.btn.btn-outline.active:before,.btn.btn-outline:active:before{opacity:.45}.btn.btn-secondary:before,.btn.btn-transparent:before,.btn.btn-outline:before{background:var(--baseAlt3Color)}.btn.btn-secondary.btn-info,.btn.btn-transparent.btn-info,.btn.btn-outline.btn-info{color:var(--infoColor)}.btn.btn-secondary.btn-info:before,.btn.btn-transparent.btn-info:before,.btn.btn-outline.btn-info:before{opacity:0}.btn.btn-secondary.btn-info:focus-visible:before,.btn.btn-secondary.btn-info:hover:before,.btn.btn-transparent.btn-info:focus-visible:before,.btn.btn-transparent.btn-info:hover:before,.btn.btn-outline.btn-info:focus-visible:before,.btn.btn-outline.btn-info:hover:before{opacity:.15}.btn.btn-secondary.btn-info.active:before,.btn.btn-secondary.btn-info:active:before,.btn.btn-transparent.btn-info.active:before,.btn.btn-transparent.btn-info:active:before,.btn.btn-outline.btn-info.active:before,.btn.btn-outline.btn-info:active:before{opacity:.25}.btn.btn-secondary.btn-info:before,.btn.btn-transparent.btn-info:before,.btn.btn-outline.btn-info:before{background:var(--infoColor)}.btn.btn-secondary.btn-success,.btn.btn-transparent.btn-success,.btn.btn-outline.btn-success{color:var(--successColor)}.btn.btn-secondary.btn-success:before,.btn.btn-transparent.btn-success:before,.btn.btn-outline.btn-success:before{opacity:0}.btn.btn-secondary.btn-success:focus-visible:before,.btn.btn-secondary.btn-success:hover:before,.btn.btn-transparent.btn-success:focus-visible:before,.btn.btn-transparent.btn-success:hover:before,.btn.btn-outline.btn-success:focus-visible:before,.btn.btn-outline.btn-success:hover:before{opacity:.15}.btn.btn-secondary.btn-success.active:before,.btn.btn-secondary.btn-success:active:before,.btn.btn-transparent.btn-success.active:before,.btn.btn-transparent.btn-success:active:before,.btn.btn-outline.btn-success.active:before,.btn.btn-outline.btn-success:active:before{opacity:.25}.btn.btn-secondary.btn-success:before,.btn.btn-transparent.btn-success:before,.btn.btn-outline.btn-success:before{background:var(--successColor)}.btn.btn-secondary.btn-danger,.btn.btn-transparent.btn-danger,.btn.btn-outline.btn-danger{color:var(--dangerColor)}.btn.btn-secondary.btn-danger:before,.btn.btn-transparent.btn-danger:before,.btn.btn-outline.btn-danger:before{opacity:0}.btn.btn-secondary.btn-danger:focus-visible:before,.btn.btn-secondary.btn-danger:hover:before,.btn.btn-transparent.btn-danger:focus-visible:before,.btn.btn-transparent.btn-danger:hover:before,.btn.btn-outline.btn-danger:focus-visible:before,.btn.btn-outline.btn-danger:hover:before{opacity:.15}.btn.btn-secondary.btn-danger.active:before,.btn.btn-secondary.btn-danger:active:before,.btn.btn-transparent.btn-danger.active:before,.btn.btn-transparent.btn-danger:active:before,.btn.btn-outline.btn-danger.active:before,.btn.btn-outline.btn-danger:active:before{opacity:.25}.btn.btn-secondary.btn-danger:before,.btn.btn-transparent.btn-danger:before,.btn.btn-outline.btn-danger:before{background:var(--dangerColor)}.btn.btn-secondary.btn-warning,.btn.btn-transparent.btn-warning,.btn.btn-outline.btn-warning{color:var(--warningColor)}.btn.btn-secondary.btn-warning:before,.btn.btn-transparent.btn-warning:before,.btn.btn-outline.btn-warning:before{opacity:0}.btn.btn-secondary.btn-warning:focus-visible:before,.btn.btn-secondary.btn-warning:hover:before,.btn.btn-transparent.btn-warning:focus-visible:before,.btn.btn-transparent.btn-warning:hover:before,.btn.btn-outline.btn-warning:focus-visible:before,.btn.btn-outline.btn-warning:hover:before{opacity:.15}.btn.btn-secondary.btn-warning.active:before,.btn.btn-secondary.btn-warning:active:before,.btn.btn-transparent.btn-warning.active:before,.btn.btn-transparent.btn-warning:active:before,.btn.btn-outline.btn-warning.active:before,.btn.btn-outline.btn-warning:active:before{opacity:.25}.btn.btn-secondary.btn-warning:before,.btn.btn-transparent.btn-warning:before,.btn.btn-outline.btn-warning:before{background:var(--warningColor)}.btn.btn-secondary.btn-hint,.btn.btn-transparent.btn-hint,.btn.btn-outline.btn-hint{color:var(--baseAlt4Color)}.btn.btn-secondary.btn-hint:before,.btn.btn-transparent.btn-hint:before,.btn.btn-outline.btn-hint:before{opacity:0}.btn.btn-secondary.btn-hint:focus-visible:before,.btn.btn-secondary.btn-hint:hover:before,.btn.btn-transparent.btn-hint:focus-visible:before,.btn.btn-transparent.btn-hint:hover:before,.btn.btn-outline.btn-hint:focus-visible:before,.btn.btn-outline.btn-hint:hover:before{opacity:.15}.btn.btn-secondary.btn-hint.active:before,.btn.btn-secondary.btn-hint:active:before,.btn.btn-transparent.btn-hint.active:before,.btn.btn-transparent.btn-hint:active:before,.btn.btn-outline.btn-hint.active:before,.btn.btn-outline.btn-hint:active:before{opacity:.25}.btn.btn-secondary.btn-hint:before,.btn.btn-transparent.btn-hint:before,.btn.btn-outline.btn-hint:before{background:var(--baseAlt4Color)}.btn.btn-secondary.btn-hint,.btn.btn-transparent.btn-hint,.btn.btn-outline.btn-hint{color:var(--txtHintColor)}.btn.btn-secondary.btn-hint:focus-visible,.btn.btn-secondary.btn-hint:hover,.btn.btn-secondary.btn-hint:active,.btn.btn-secondary.btn-hint.active,.btn.btn-transparent.btn-hint:focus-visible,.btn.btn-transparent.btn-hint:hover,.btn.btn-transparent.btn-hint:active,.btn.btn-transparent.btn-hint.active,.btn.btn-outline.btn-hint:focus-visible,.btn.btn-outline.btn-hint:hover,.btn.btn-outline.btn-hint:active,.btn.btn-outline.btn-hint.active{color:var(--txtPrimaryColor)}.btn.btn-secondary:before{opacity:.35}.btn.btn-secondary:focus-visible:before,.btn.btn-secondary:hover:before{opacity:.5}.btn.btn-secondary.active:before,.btn.btn-secondary:active:before{opacity:.7}.btn.btn-secondary.btn-info:before{opacity:.15}.btn.btn-secondary.btn-info:focus-visible:before,.btn.btn-secondary.btn-info:hover:before{opacity:.25}.btn.btn-secondary.btn-info.active:before,.btn.btn-secondary.btn-info:active:before{opacity:.3}.btn.btn-secondary.btn-success:before{opacity:.15}.btn.btn-secondary.btn-success:focus-visible:before,.btn.btn-secondary.btn-success:hover:before{opacity:.25}.btn.btn-secondary.btn-success.active:before,.btn.btn-secondary.btn-success:active:before{opacity:.3}.btn.btn-secondary.btn-danger:before{opacity:.15}.btn.btn-secondary.btn-danger:focus-visible:before,.btn.btn-secondary.btn-danger:hover:before{opacity:.25}.btn.btn-secondary.btn-danger.active:before,.btn.btn-secondary.btn-danger:active:before{opacity:.3}.btn.btn-secondary.btn-warning:before{opacity:.15}.btn.btn-secondary.btn-warning:focus-visible:before,.btn.btn-secondary.btn-warning:hover:before{opacity:.25}.btn.btn-secondary.btn-warning.active:before,.btn.btn-secondary.btn-warning:active:before{opacity:.3}.btn.btn-secondary.btn-hint:before{opacity:.15}.btn.btn-secondary.btn-hint:focus-visible:before,.btn.btn-secondary.btn-hint:hover:before{opacity:.25}.btn.btn-secondary.btn-hint.active:before,.btn.btn-secondary.btn-hint:active:before{opacity:.3}.btn.btn-disabled,.btn[disabled]{box-shadow:none;cursor:default;background:var(--baseAlt1Color);color:var(--txtDisabledColor)!important}.btn.btn-disabled:before,.btn[disabled]:before{display:none}.btn.btn-disabled.btn-transparent,.btn[disabled].btn-transparent{background:none}.btn.btn-disabled.btn-outline,.btn[disabled].btn-outline{border-color:var(--baseAlt2Color)}.btn.btn-expanded{min-width:150px}.btn.btn-expanded-sm{min-width:90px}.btn.btn-expanded-lg{min-width:170px}.btn.btn-lg{column-gap:10px;font-size:var(--lgFontSize);min-height:var(--lgBtnHeight);min-width:var(--lgBtnHeight);padding-left:30px;padding-right:30px}.btn.btn-lg i{font-size:1.2666em}.btn.btn-lg.btn-expanded{min-width:240px}.btn.btn-lg.btn-expanded-sm{min-width:160px}.btn.btn-lg.btn-expanded-lg{min-width:300px}.btn.btn-sm,.btn.btn-xs{column-gap:5px;font-size:var(--smFontSize);min-height:var(--smBtnHeight);min-width:var(--smBtnHeight);padding-left:12px;padding-right:12px}.btn.btn-sm i,.btn.btn-xs i{font-size:1rem}.btn.btn-sm.btn-expanded,.btn.btn-xs.btn-expanded{min-width:100px}.btn.btn-sm.btn-expanded-sm,.btn.btn-xs.btn-expanded-sm{min-width:80px}.btn.btn-sm.btn-expanded-lg,.btn.btn-xs.btn-expanded-lg{min-width:130px}.btn.btn-xs{min-width:var(--xsBtnHeight);min-height:var(--xsBtnHeight)}.btn.btn-block{display:flex;width:100%}.btn.btn-circle{border-radius:50%;padding:0;gap:0}.btn.btn-circle i{font-size:1.2857rem;text-align:center;width:19px;height:19px;line-height:19px}.btn.btn-circle i:before{margin:0;display:block}.btn.btn-circle.btn-sm i{font-size:1.1rem}.btn.btn-circle.btn-xs i{font-size:1.05rem}.btn.btn-loading{--loaderSize: 24px;cursor:default;pointer-events:none}.btn.btn-loading:after{content:"\eec4";position:absolute;display:inline-block;vertical-align:top;left:50%;top:50%;width:var(--loaderSize);height:var(--loaderSize);line-height:var(--loaderSize);font-size:var(--loaderSize);color:inherit;text-align:center;font-weight:400;margin-left:calc(var(--loaderSize) * -.5);margin-top:calc(var(--loaderSize) * -.5);font-family:var(--iconFontFamily);animation:loaderShow var(--baseAnimationSpeed),rotate .9s var(--baseAnimationSpeed) infinite linear}.btn.btn-loading>*{opacity:0;transform:scale(.9)}.btn.btn-loading.btn-sm,.btn.btn-loading.btn-xs{--loaderSize: 20px}.btn.btn-loading.btn-lg{--loaderSize: 28px}.btn.btn-prev i,.btn.btn-next i{transition:transform var(--baseAnimationSpeed)}.btn.btn-prev:hover i,.btn.btn-prev:focus-within i,.btn.btn-next:hover i,.btn.btn-next:focus-within i{transform:translate(3px)}.btn.btn-prev:hover i,.btn.btn-prev:focus-within i{transform:translate(-3px)}.btns-group{display:inline-flex;align-items:center;gap:var(--xsSpacing)}.tinymce-wrapper,.code-editor,.select .selected-container,input,select,textarea{display:block;width:100%;outline:0;border:0;margin:0;background:none;padding:5px 10px;line-height:20px;min-width:0;min-height:var(--inputHeight);background:var(--baseAlt1Color);color:var(--txtPrimaryColor);font-size:var(--baseFontSize);font-family:var(--baseFontFamily);font-weight:400;border-radius:var(--baseRadius);overflow:auto;overflow:overlay}.tinymce-wrapper::placeholder,.code-editor::placeholder,.select .selected-container::placeholder,input::placeholder,select::placeholder,textarea::placeholder{color:var(--txtDisabledColor)}@media screen and (min-width: 550px){.tinymce-wrapper:focus,.code-editor:focus,.select .selected-container:focus,input:focus,select:focus,textarea:focus,.tinymce-wrapper:focus-within,.code-editor:focus-within,.select .selected-container:focus-within,input:focus-within,select:focus-within,textarea:focus-within{scrollbar-color:var(--baseAlt3Color) transparent;scrollbar-width:thin;scroll-behavior:smooth}.tinymce-wrapper:focus::-webkit-scrollbar,.code-editor:focus::-webkit-scrollbar,.select .selected-container:focus::-webkit-scrollbar,input:focus::-webkit-scrollbar,select:focus::-webkit-scrollbar,textarea:focus::-webkit-scrollbar,.tinymce-wrapper:focus-within::-webkit-scrollbar,.code-editor:focus-within::-webkit-scrollbar,.select .selected-container:focus-within::-webkit-scrollbar,input:focus-within::-webkit-scrollbar,select:focus-within::-webkit-scrollbar,textarea:focus-within::-webkit-scrollbar{width:8px;height:8px;border-radius:var(--baseRadius)}.tinymce-wrapper:focus::-webkit-scrollbar-track,.code-editor:focus::-webkit-scrollbar-track,.select .selected-container:focus::-webkit-scrollbar-track,input:focus::-webkit-scrollbar-track,select:focus::-webkit-scrollbar-track,textarea:focus::-webkit-scrollbar-track,.tinymce-wrapper:focus-within::-webkit-scrollbar-track,.code-editor:focus-within::-webkit-scrollbar-track,.select .selected-container:focus-within::-webkit-scrollbar-track,input:focus-within::-webkit-scrollbar-track,select:focus-within::-webkit-scrollbar-track,textarea:focus-within::-webkit-scrollbar-track{background:transparent;border-radius:var(--baseRadius)}.tinymce-wrapper:focus::-webkit-scrollbar-thumb,.code-editor:focus::-webkit-scrollbar-thumb,.select .selected-container:focus::-webkit-scrollbar-thumb,input:focus::-webkit-scrollbar-thumb,select:focus::-webkit-scrollbar-thumb,textarea:focus::-webkit-scrollbar-thumb,.tinymce-wrapper:focus-within::-webkit-scrollbar-thumb,.code-editor:focus-within::-webkit-scrollbar-thumb,.select .selected-container:focus-within::-webkit-scrollbar-thumb,input:focus-within::-webkit-scrollbar-thumb,select:focus-within::-webkit-scrollbar-thumb,textarea:focus-within::-webkit-scrollbar-thumb{background-color:var(--baseAlt3Color);border-radius:15px;border:2px solid transparent;background-clip:padding-box}.tinymce-wrapper:focus::-webkit-scrollbar-thumb:hover,.code-editor:focus::-webkit-scrollbar-thumb:hover,.select .selected-container:focus::-webkit-scrollbar-thumb:hover,input:focus::-webkit-scrollbar-thumb:hover,select:focus::-webkit-scrollbar-thumb:hover,textarea:focus::-webkit-scrollbar-thumb:hover,.tinymce-wrapper:focus::-webkit-scrollbar-thumb:active,.code-editor:focus::-webkit-scrollbar-thumb:active,.select .selected-container:focus::-webkit-scrollbar-thumb:active,input:focus::-webkit-scrollbar-thumb:active,select:focus::-webkit-scrollbar-thumb:active,textarea:focus::-webkit-scrollbar-thumb:active,.tinymce-wrapper:focus-within::-webkit-scrollbar-thumb:hover,.code-editor:focus-within::-webkit-scrollbar-thumb:hover,.select .selected-container:focus-within::-webkit-scrollbar-thumb:hover,input:focus-within::-webkit-scrollbar-thumb:hover,select:focus-within::-webkit-scrollbar-thumb:hover,textarea:focus-within::-webkit-scrollbar-thumb:hover,.tinymce-wrapper:focus-within::-webkit-scrollbar-thumb:active,.code-editor:focus-within::-webkit-scrollbar-thumb:active,.select .selected-container:focus-within::-webkit-scrollbar-thumb:active,input:focus-within::-webkit-scrollbar-thumb:active,select:focus-within::-webkit-scrollbar-thumb:active,textarea:focus-within::-webkit-scrollbar-thumb:active{background-color:var(--baseAlt4Color)}}[readonly].tinymce-wrapper,[readonly].code-editor,.select [readonly].selected-container,input[readonly],select[readonly],textarea[readonly],.readonly.tinymce-wrapper,.readonly.code-editor,.select .readonly.selected-container,input.readonly,select.readonly,textarea.readonly{cursor:default;color:var(--txtHintColor)}[disabled].tinymce-wrapper,[disabled].code-editor,.select [disabled].selected-container,input[disabled],select[disabled],textarea[disabled],.disabled.tinymce-wrapper,.disabled.code-editor,.select .disabled.selected-container,input.disabled,select.disabled,textarea.disabled{cursor:default;color:var(--txtDisabledColor)}.txt-mono.tinymce-wrapper,.txt-mono.code-editor,.select .txt-mono.selected-container,input.txt-mono,select.txt-mono,textarea.txt-mono{line-height:var(--smLineHeight)}.code.tinymce-wrapper,.code.code-editor,.select .code.selected-container,input.code,select.code,textarea.code{font-size:15px;line-height:1.379rem;font-family:var(--monospaceFontFamily)}input{height:var(--inputHeight)}input:-webkit-autofill{-webkit-text-fill-color:var(--txtPrimaryColor);-webkit-box-shadow:inset 0 0 0 50px var(--baseAlt1Color)}.form-field:focus-within input:-webkit-autofill,input:-webkit-autofill:focus{-webkit-box-shadow:inset 0 0 0 50px var(--baseAlt2Color)}input[type=file]{padding:9px}input[type=checkbox],input[type=radio]{width:auto;height:auto;display:inline}input[type=number]{-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}textarea{min-height:80px;resize:vertical}select{padding-left:8px}.form-field{--hPadding: 15px;position:relative;display:block;width:100%;margin-bottom:var(--baseSpacing)}.form-field .tinymce-wrapper,.form-field .code-editor,.form-field .select .selected-container,.select .form-field .selected-container,.form-field input,.form-field select,.form-field textarea{z-index:0;padding-left:var(--hPadding);padding-right:var(--hPadding)}.form-field select{padding-left:8px}.form-field label{display:flex;width:100%;column-gap:5px;align-items:center;user-select:none;font-weight:600;color:var(--txtHintColor);font-size:var(--xsFontSize);text-transform:uppercase;line-height:1;padding-top:12px;padding-bottom:2px;padding-left:var(--hPadding);padding-right:var(--hPadding);border:0;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius)}.form-field label~.tinymce-wrapper,.form-field label~.code-editor,.form-field .select label~.selected-container,.select .form-field label~.selected-container,.form-field label~input,.form-field label~select,.form-field label~textarea{border-top:0;padding-top:2px;padding-bottom:8px;border-top-left-radius:0;border-top-right-radius:0}.form-field label i{font-size:.96rem;line-height:1;margin-top:-2px;margin-bottom:-2px}.form-field .tinymce-wrapper,.form-field .code-editor,.form-field .select .selected-container,.select .form-field .selected-container,.form-field input,.form-field select,.form-field textarea,.form-field label{background:var(--baseAlt1Color);transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed),box-shadow var(--baseAnimationSpeed)}.form-field:focus-within .tinymce-wrapper,.form-field:focus-within .code-editor,.form-field:focus-within .select .selected-container,.select .form-field:focus-within .selected-container,.form-field:focus-within input,.form-field:focus-within select,.form-field:focus-within textarea,.form-field:focus-within label{background:var(--baseAlt2Color)}.form-field:focus-within label{color:var(--txtPrimaryColor)}.form-field .form-field-addon{position:absolute;display:inline-flex;align-items:center;z-index:1;top:0px;right:var(--hPadding);min-height:var(--inputHeight);color:var(--txtHintColor)}.form-field .form-field-addon .btn{margin-right:-5px}.form-field .form-field-addon~.tinymce-wrapper,.form-field .form-field-addon~.code-editor,.form-field .select .form-field-addon~.selected-container,.select .form-field .form-field-addon~.selected-container,.form-field .form-field-addon~input,.form-field .form-field-addon~select,.form-field .form-field-addon~textarea{padding-right:35px}.form-field label~.form-field-addon{min-height:calc(26px + var(--inputHeight))}.form-field .help-block{margin-top:8px;font-size:var(--smFontSize);line-height:var(--smLineHeight);color:var(--txtHintColor);word-break:break-word}.form-field .help-block pre{white-space:pre-wrap}.form-field .help-block-error{color:var(--dangerColor)}.form-field.error>label,.form-field.invalid>label{color:var(--dangerColor)}.form-field.invalid label,.form-field.invalid .tinymce-wrapper,.form-field.invalid .code-editor,.form-field.invalid .select .selected-container,.select .form-field.invalid .selected-container,.form-field.invalid input,.form-field.invalid select,.form-field.invalid textarea{background:var(--dangerAltColor)}.form-field.required:not(.form-field-toggle)>label:after{content:"*";color:var(--dangerColor);margin-top:-2px;margin-left:-2px}.form-field.disabled>label{color:var(--txtDisabledColor)}.form-field.disabled.required>label:after{opacity:.5}.form-field input[type=radio],.form-field input[type=checkbox]{position:absolute;z-index:-1;left:0;width:0;height:0;min-height:0;min-width:0;border:0;background:none;user-select:none;pointer-events:none;box-shadow:none;opacity:0}.form-field input[type=radio]~label,.form-field input[type=checkbox]~label{border:0;margin:0;outline:0;background:none;display:inline-flex;vertical-align:top;align-items:center;width:auto;column-gap:5px;user-select:none;padding:0 0 0 27px;line-height:20px;min-height:20px;font-weight:400;font-size:var(--baseFontSize);text-transform:none;color:var(--txtPrimaryColor)}.form-field input[type=radio]~label:before,.form-field input[type=checkbox]~label:before{content:"";display:inline-block;vertical-align:top;position:absolute;z-index:0;left:0;top:0;width:20px;height:20px;line-height:16px;font-family:var(--iconFontFamily);font-size:1.2rem;text-align:center;color:var(--baseColor);cursor:pointer;background:var(--baseColor);border-radius:var(--baseRadius);border:2px solid var(--baseAlt3Color);transition:transform var(--baseAnimationSpeed),border-color var(--baseAnimationSpeed),color var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.form-field input[type=radio]~label:active:before,.form-field input[type=checkbox]~label:active:before{transform:scale(.9)}.form-field input[type=radio]:focus~label:before,.form-field input[type=radio]~label:hover:before,.form-field input[type=checkbox]:focus~label:before,.form-field input[type=checkbox]~label:hover:before{border-color:var(--baseAlt4Color)}.form-field input[type=radio]:checked~label:before,.form-field input[type=checkbox]:checked~label:before{content:"\eb7a";box-shadow:none;mix-blend-mode:unset;background:var(--successColor);border-color:var(--successColor)}.form-field input[type=radio]:disabled~label,.form-field input[type=checkbox]:disabled~label{pointer-events:none;cursor:not-allowed;color:var(--txtDisabledColor)}.form-field input[type=radio]:disabled~label:before,.form-field input[type=checkbox]:disabled~label:before{opacity:.5}.form-field input[type=radio]~label:before{border-radius:50%;font-size:1rem}.form-field .form-field-block{position:relative;margin:0 0 var(--xsSpacing)}.form-field .form-field-block:last-child{margin-bottom:0}.form-field.form-field-toggle input[type=radio]~label,.form-field.form-field-toggle input[type=checkbox]~label{position:relative}.form-field.form-field-toggle input[type=radio]~label:before,.form-field.form-field-toggle input[type=checkbox]~label:before{content:"";border:0;box-shadow:none;background:var(--baseAlt3Color);transition:background var(--activeAnimationSpeed)}.form-field.form-field-toggle input[type=radio]~label:after,.form-field.form-field-toggle input[type=checkbox]~label:after{content:"";position:absolute;z-index:1;cursor:pointer;background:var(--baseColor);transition:left var(--activeAnimationSpeed),transform var(--activeAnimationSpeed),background var(--activeAnimationSpeed);box-shadow:0 2px 5px 0 var(--shadowColor)}.form-field.form-field-toggle input[type=radio]~label:active:before,.form-field.form-field-toggle input[type=checkbox]~label:active:before{transform:none}.form-field.form-field-toggle input[type=radio]~label:active:after,.form-field.form-field-toggle input[type=checkbox]~label:active:after{transform:scale(.9)}.form-field.form-field-toggle input[type=radio]:focus-visible~label:before,.form-field.form-field-toggle input[type=checkbox]:focus-visible~label:before{box-shadow:0 0 0 2px var(--baseAlt2Color)}.form-field.form-field-toggle input[type=radio]~label:hover:before,.form-field.form-field-toggle input[type=checkbox]~label:hover:before{background:var(--baseAlt4Color)}.form-field.form-field-toggle input[type=radio]:checked~label:before,.form-field.form-field-toggle input[type=checkbox]:checked~label:before{background:var(--successColor)}.form-field.form-field-toggle input[type=radio]:checked~label:after,.form-field.form-field-toggle input[type=checkbox]:checked~label:after{background:var(--baseColor)}.form-field.form-field-toggle input[type=radio]~label,.form-field.form-field-toggle input[type=checkbox]~label{min-height:24px;padding-left:47px}.form-field.form-field-toggle input[type=radio]~label:empty,.form-field.form-field-toggle input[type=checkbox]~label:empty{padding-left:40px}.form-field.form-field-toggle input[type=radio]~label:before,.form-field.form-field-toggle input[type=checkbox]~label:before{width:40px;height:24px;border-radius:24px}.form-field.form-field-toggle input[type=radio]~label:after,.form-field.form-field-toggle input[type=checkbox]~label:after{top:4px;left:4px;width:16px;height:16px;border-radius:16px}.form-field.form-field-toggle input[type=radio]:checked~label:after,.form-field.form-field-toggle input[type=checkbox]:checked~label:after{left:20px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label{min-height:20px;padding-left:39px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label:empty,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label:empty{padding-left:32px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label:before,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label:before{width:32px;height:20px;border-radius:20px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label:after,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label:after{top:4px;left:4px;width:12px;height:12px;border-radius:12px}.form-field.form-field-toggle.form-field-sm input[type=radio]:checked~label:after,.form-field.form-field-toggle.form-field-sm input[type=checkbox]:checked~label:after{left:16px}.form-field-group{display:flex;width:100%;align-items:center}.form-field-group>.form-field{flex-grow:1;border-left:1px solid var(--baseAlt2Color)}.form-field-group>.form-field:first-child{border-left:0}.form-field-group>.form-field:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.form-field-group>.form-field:not(:first-child)>label{border-top-left-radius:0}.form-field-group>.form-field:not(:first-child)>.tinymce-wrapper,.form-field-group>.form-field:not(:first-child)>.code-editor,.select .form-field-group>.form-field:not(:first-child)>.selected-container,.form-field-group>.form-field:not(:first-child)>input,.form-field-group>.form-field:not(:first-child)>select,.form-field-group>.form-field:not(:first-child)>textarea,.form-field-group>.form-field:not(:first-child)>.select .selected-container{border-bottom-left-radius:0}.form-field-group>.form-field:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.form-field-group>.form-field:not(:last-child)>label{border-top-right-radius:0}.form-field-group>.form-field:not(:last-child)>.tinymce-wrapper,.form-field-group>.form-field:not(:last-child)>.code-editor,.select .form-field-group>.form-field:not(:last-child)>.selected-container,.form-field-group>.form-field:not(:last-child)>input,.form-field-group>.form-field:not(:last-child)>select,.form-field-group>.form-field:not(:last-child)>textarea,.form-field-group>.form-field:not(:last-child)>.select .selected-container{border-bottom-right-radius:0}.form-field-group .form-field.col-12{width:100%}.form-field-group .form-field.col-11{width:91.6666666667%}.form-field-group .form-field.col-10{width:83.3333333333%}.form-field-group .form-field.col-9{width:75%}.form-field-group .form-field.col-8{width:66.6666666667%}.form-field-group .form-field.col-7{width:58.3333333333%}.form-field-group .form-field.col-6{width:50%}.form-field-group .form-field.col-5{width:41.6666666667%}.form-field-group .form-field.col-4{width:33.3333333333%}.form-field-group .form-field.col-3{width:25%}.form-field-group .form-field.col-2{width:16.6666666667%}.form-field-group .form-field.col-1{width:8.3333333333%}.select{position:relative;display:block;outline:0}.select .option{user-select:none;column-gap:5px}.select .option .icon{min-width:20px;text-align:center;line-height:inherit}.select .option .icon i{vertical-align:middle;line-height:inherit}.select .txt-placeholder{color:var(--txtHintColor)}label~.select .selected-container{border-top:0}.select .selected-container{position:relative;display:flex;flex-wrap:wrap;width:100%;align-items:center;padding-top:0;padding-bottom:0;padding-right:35px!important;user-select:none}.select .selected-container:after{content:"\ea4d";position:absolute;right:5px;top:50%;width:20px;height:20px;line-height:20px;text-align:center;margin-top:-10px;display:inline-block;vertical-align:top;font-size:1rem;font-family:var(--iconFontFamily);align-self:flex-end;color:var(--txtHintColor);transition:color var(--baseAnimationSpeed),transform var(--baseAnimationSpeed)}.select .selected-container:active,.select .selected-container.active{border-bottom-left-radius:0;border-bottom-right-radius:0}.select .selected-container:active:after,.select .selected-container.active:after{color:var(--txtPrimaryColor);transform:rotate(180deg)}.select .selected-container .option{display:flex;width:100%;align-items:center;max-width:100%;user-select:text}.select .selected-container .clear{margin-left:auto;cursor:pointer;color:var(--txtHintColor);transition:color var(--baseAnimationSpeed)}.select .selected-container .clear i{display:inline-block;vertical-align:middle;line-height:1}.select .selected-container .clear:hover{color:var(--txtPrimaryColor)}.select.multiple .selected-container{display:flex;align-items:center;padding-left:2px;row-gap:3px;column-gap:4px}.select.multiple .selected-container .txt-placeholder{margin-left:5px}.select.multiple .selected-container .option{display:inline-flex;width:auto;padding:3px 5px;line-height:1;border-radius:var(--baseRadius);background:var(--baseColor)}.select:not(.multiple) .selected-container .label{margin-left:-2px}.select:not(.multiple) .selected-container .option .txt{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:100%;line-height:normal}.select:not(.disabled) .selected-container:hover{cursor:pointer}.select.disabled{color:var(--txtDisabledColor);pointer-events:none}.select.disabled .txt-placeholder,.select.disabled .selected-container{color:inherit}.select.disabled .selected-container .link-hint{pointer-events:auto}.select.disabled .selected-container *:not(.link-hint){color:inherit!important}.select.disabled .selected-container:after,.select.disabled .selected-container .clear{display:none}.select.disabled .selected-container:hover{cursor:inherit}.select .txt-missing{color:var(--txtHintColor);padding:5px 12px;margin:0}.select .options-dropdown{max-height:none;border:0;overflow:auto;border-top-left-radius:0;border-top-right-radius:0;margin-top:-2px;box-shadow:0 2px 5px 0 var(--shadowColor),inset 0 0 0 2px var(--baseAlt2Color)}.select .options-dropdown .input-group:focus-within{box-shadow:none}.select .options-dropdown .form-field.options-search{margin:0 0 5px;padding:0 0 2px;color:var(--txtHintColor);border-bottom:1px solid var(--baseAlt2Color)}.select .options-dropdown .form-field.options-search .input-group{border-radius:0;padding:0 0 0 10px;margin:0;background:none;column-gap:0;border:0}.select .options-dropdown .form-field.options-search input{border:0;padding-left:9px;padding-right:9px;background:none}.select .options-dropdown .options-list{overflow:auto;max-height:240px;width:auto;margin-left:0;margin-right:-5px;padding-right:5px}.select .options-list:not(:empty)~[slot=afterOptions]:not(:empty){margin:5px -5px -5px}.select .options-list:not(:empty)~[slot=afterOptions]:not(:empty) .btn-block{border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:var(--baseRadius);border-bottom-right-radius:var(--baseRadius)}label~.select .selected-container{padding-bottom:4px;border-top-left-radius:0;border-top-right-radius:0}label~.select.multiple .selected-container{padding-top:3px;padding-bottom:3px;padding-left:10px}.select.block-options.multiple .selected-container .option{width:100%;box-shadow:0 2px 5px 0 var(--shadowColor)}.field-type-select .options-dropdown{padding:2px 1px 1px 2px}.field-type-select .options-dropdown .form-field.options-search{margin:0}.field-type-select .options-dropdown .options-list{max-height:490px;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;padding:0}.field-type-select .options-dropdown .dropdown-item{width:50%;margin:0;padding-left:12px;border-radius:0;border-bottom:1px solid var(--baseAlt2Color);border-right:1px solid var(--baseAlt2Color)}.field-type-select .options-dropdown .dropdown-item.selected{background:var(--baseAlt1Color)}.form-field-list label{padding-bottom:10px}.form-field-list .list{background:var(--baseAlt1Color);border:0;border-radius:0;border-bottom-left-radius:var(--baseRadius);border-bottom-right-radius:var(--baseRadius)}.form-field-list .list .list-item{border-top:1px solid var(--baseAlt2Color)}.form-field-list .list .list-item.selected{background:var(--baseAlt2Color)}.form-field-list .list .list-item.handle:not(.disabled):hover,.form-field-list .list .list-item.handle:not(.disabled):focus-visible{background:var(--baseAlt2Color)}.form-field-list .list .list-item.handle:not(.disabled):active{background:var(--baseAlt3Color)}.form-field-list:focus-within .list,.form-field-list:focus-within label{background:var(--baseAlt1Color)}.form-field label~.code-editor{padding-bottom:6px;padding-top:4px}.code-editor .cm-editor{border:0!important;outline:none!important}.code-editor .cm-editor .cm-line{padding-left:0;padding-right:0}.code-editor .cm-editor .cm-tooltip-autocomplete{box-shadow:0 2px 5px 0 var(--shadowColor);border-radius:var(--baseRadius);background:var(--baseColor);border:0;z-index:9999;padding:0 3px;font-size:.92rem}.code-editor .cm-editor .cm-tooltip-autocomplete ul{margin:0;border-radius:inherit}.code-editor .cm-editor .cm-tooltip-autocomplete ul>:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.code-editor .cm-editor .cm-tooltip-autocomplete ul>:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.code-editor .cm-editor .cm-tooltip-autocomplete ul li[aria-selected]{background:var(--infoColor)}.code-editor .cm-editor .cm-scroller{outline:0!important;font-family:var(--monospaceFontFamily);font-size:var(--baseFontSize);line-height:var(--baseLineHeight)}.code-editor .cm-editor .cm-cursorLayer .cm-cursor{margin-left:0!important}.code-editor .cm-editor .cm-placeholder{color:var(--txtDisabledColor);font-family:var(--monospaceFontFamily);font-size:var(--baseFontSize);line-height:var(--baseLineHeight)}.code-editor .cm-editor .cm-selectionMatch{background:var(--infoAltColor)}.code-editor .cm-editor.cm-focused .cm-matchingBracket{background-color:#328c821a}.tinymce-wrapper{min-height:277px}.tinymce-wrapper .tox-tinymce{border-radius:var(--baseRadius);border:0}.form-field label~.tinymce-wrapper{padding:5px 2px 2px}body .tox .tox-tbtn{height:30px}body .tox .tox-tbtn svg{transform:scale(.85)}body .tox .tox-tbtn:not(.tox-tbtn--select){width:30px}body .tox .tox-button,body .tox .tox-button--secondary{font-size:var(--smFontSize)}body .tox .tox-toolbar-overlord{box-shadow:0 2px 5px 0 var(--shadowColor)}body .tox .tox-listboxfield .tox-listbox--select,body .tox .tox-textarea,body .tox .tox-textfield,body .tox .tox-toolbar-textfield{padding:3px 5px}body .tox-swatch:not(.tox-swatch--remove):not(.tox-collection__item--enabled) svg{display:none}.main-menu{--menuItemSize: 45px;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:var(--smSpacing);font-size:var(--xlFontSize);color:var(--txtPrimaryColor)}.main-menu i{font-size:24px;line-height:1}.main-menu .menu-item{position:relative;outline:0;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;text-align:center;justify-content:center;user-select:none;color:inherit;min-width:var(--menuItemSize);min-height:var(--menuItemSize);border:2px solid transparent;border-radius:var(--lgRadius);transition:background var(--baseAnimationSpeed),border var(--baseAnimationSpeed)}.main-menu .menu-item:focus-visible,.main-menu .menu-item:hover{background:var(--baseAlt1Color)}.main-menu .menu-item:active{background:var(--baseAlt2Color);transition-duration:var(--activeAnimationSpeed)}.main-menu .menu-item.active,.main-menu .menu-item.current-route{background:var(--baseColor);border-color:var(--primaryColor)}.app-sidebar{position:relative;z-index:1;display:flex;flex-grow:0;flex-shrink:0;flex-direction:column;align-items:center;width:var(--appSidebarWidth);padding:var(--smSpacing) 0px var(--smSpacing);background:var(--baseColor);border-right:1px solid var(--baseAlt2Color)}.app-sidebar .main-menu{flex-grow:1;justify-content:flex-start;overflow-x:hidden;overflow-y:auto;overflow-y:overlay;margin-top:34px;margin-bottom:var(--baseSpacing)}.app-layout{display:flex;width:100%;height:100vh}.app-layout .app-body{flex-grow:1;min-width:0;height:100%;display:flex;align-items:stretch}.app-layout .app-sidebar~.app-body{min-width:650px}.page-sidebar{--sidebarListItemMargin: 10px;z-index:0;display:flex;flex-direction:column;width:var(--pageSidebarWidth);flex-shrink:0;flex-grow:0;overflow-x:hidden;overflow-y:auto;background:var(--baseColor);padding:calc(var(--baseSpacing) - 5px) 0 var(--smSpacing);border-right:1px solid var(--baseAlt2Color)}.page-sidebar>*{padding:0 var(--smSpacing)}.page-sidebar .sidebar-content{overflow-x:hidden;overflow-y:auto;overflow-y:overlay}.page-sidebar .sidebar-content>:first-child{margin-top:0}.page-sidebar .sidebar-content>:last-child{margin-bottom:0}.page-sidebar .sidebar-footer{margin-top:var(--smSpacing)}.page-sidebar .search{display:flex;align-items:center;width:auto;column-gap:5px;margin:0 0 var(--xsSpacing);color:var(--txtHintColor);opacity:.7;transition:opacity var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.page-sidebar .search input{border:0;background:var(--baseColor);transition:box-shadow var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.page-sidebar .search .btn-clear{margin-right:-8px}.page-sidebar .search:hover,.page-sidebar .search:focus-within,.page-sidebar .search.active{opacity:1;color:var(--txtPrimaryColor)}.page-sidebar .search:hover input,.page-sidebar .search:focus-within input,.page-sidebar .search.active input{background:var(--baseAlt2Color)}.page-sidebar .sidebar-title{display:flex;align-items:center;gap:5px;width:100%;margin:var(--baseSpacing) 0 var(--xsSpacing);font-weight:600;font-size:1rem;line-height:var(--smLineHeight);color:var(--txtHintColor)}.page-sidebar .sidebar-title .label{font-weight:400}.page-sidebar .sidebar-list-item{cursor:pointer;outline:0;text-decoration:none;position:relative;display:flex;width:100%;align-items:center;column-gap:10px;margin:var(--sidebarListItemMargin) 0;padding:3px 10px;font-size:var(--xlFontSize);min-height:var(--btnHeight);min-width:0;color:var(--txtHintColor);border-radius:var(--baseRadius);user-select:none;transition:background var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.page-sidebar .sidebar-list-item i{font-size:18px}.page-sidebar .sidebar-list-item .txt{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.page-sidebar .sidebar-list-item:focus-visible,.page-sidebar .sidebar-list-item:hover,.page-sidebar .sidebar-list-item:active,.page-sidebar .sidebar-list-item.active{color:var(--txtPrimaryColor);background:var(--baseAlt1Color)}.page-sidebar .sidebar-list-item:active{background:var(--baseAlt2Color);transition-duration:var(--activeAnimationSpeed)}.page-sidebar .sidebar-content-compact .sidebar-list-item{--sidebarListItemMargin: 5px}@media screen and (max-height: 600px){.page-sidebar{--sidebarListItemMargin: 5px}}@media screen and (max-width: 1100px){.page-sidebar{--pageSidebarWidth: 190px}.page-sidebar>*{padding-left:10px;padding-right:10px}}.page-header{display:flex;align-items:center;width:100%;min-height:var(--btnHeight);gap:var(--xsSpacing);margin:0 0 var(--baseSpacing)}.page-header .btns-group{margin-left:auto;justify-content:end}@media screen and (max-width: 1050px){.page-header{flex-wrap:wrap}.page-header .btns-group{width:100%}.page-header .btns-group .btn{flex-grow:1;flex-basis:0}}.page-header-wrapper{background:var(--baseColor);width:auto;margin-top:calc(-1 * (var(--baseSpacing) - 5px));margin-left:calc(-1 * var(--baseSpacing));margin-right:calc(-1 * var(--baseSpacing));margin-bottom:var(--baseSpacing);padding:calc(var(--baseSpacing) - 5px) var(--baseSpacing);border-bottom:1px solid var(--baseAlt2Color)}.breadcrumbs{display:flex;align-items:center;gap:30px;color:var(--txtDisabledColor)}.breadcrumbs .breadcrumb-item{position:relative;margin:0;line-height:1;font-weight:400}.breadcrumbs .breadcrumb-item:after{content:"/";position:absolute;right:-20px;top:0;width:10px;text-align:center;pointer-events:none;opacity:.4}.breadcrumbs .breadcrumb-item:last-child{word-break:break-word;color:var(--txtPrimaryColor)}.breadcrumbs .breadcrumb-item:last-child:after{content:none;display:none}.breadcrumbs a{text-decoration:none;color:inherit;transition:color var(--baseAnimationSpeed)}.breadcrumbs a:hover{color:var(--txtPrimaryColor)}.page-content{position:relative;display:block;width:100%;flex-grow:1;padding:calc(var(--baseSpacing) - 5px) var(--baseSpacing)}.page-footer{display:flex;gap:5px;align-items:center;justify-content:right;text-align:right;padding:0px var(--baseSpacing) 15px;color:var(--txtDisabledColor);font-size:var(--xsFontSize);line-height:var(--smLineHeight)}.page-footer i{font-size:1.2em}.page-footer a{color:inherit;text-decoration:none;transition:color var(--baseAnimationSpeed)}.page-footer a:focus-visible,.page-footer a:hover,.page-footer a:active{color:var(--txtPrimaryColor)}.page-wrapper{display:flex;flex-direction:column;flex-grow:1;width:100%;overflow-x:hidden;overflow-y:auto;overflow-y:overlay}.overlay-active .page-wrapper{overflow-y:hidden}.page-wrapper.full-page{background:var(--baseColor)}.page-wrapper.center-content .page-content{display:flex;align-items:center}@keyframes tabChange{0%{opacity:.5}to{opacity:1}}.tabs-header{display:flex;align-items:stretch;justify-content:flex-start;column-gap:10px;width:100%;min-height:50px;user-select:none;margin:0 0 var(--baseSpacing);border-bottom:1px solid var(--baseAlt2Color)}.tabs-header .tab-item{position:relative;outline:0;border:0;background:none;display:inline-flex;align-items:center;justify-content:center;min-width:70px;gap:5px;padding:10px;margin:0;font-size:var(--lgFontSize);line-height:var(--baseLineHeight);font-family:var(--baseFontFamily);color:var(--txtHintColor);text-align:center;text-decoration:none;cursor:pointer;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius);transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.tabs-header .tab-item:after{content:"";position:absolute;display:block;left:0;bottom:-1px;width:100%;height:2px;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius);background:var(--primaryColor);transform:rotateY(90deg);transition:transform .2s}.tabs-header .tab-item .txt,.tabs-header .tab-item i{display:inline-block;vertical-align:top}.tabs-header .tab-item:hover,.tabs-header .tab-item:focus-visible,.tabs-header .tab-item:active{color:var(--txtPrimaryColor)}.tabs-header .tab-item:focus-visible,.tabs-header .tab-item:active{transition-duration:var(--activeAnimationSpeed);background:var(--baseAlt2Color)}.tabs-header .tab-item.active{color:var(--txtPrimaryColor)}.tabs-header .tab-item.active:after{transform:rotateY(0)}.tabs-header .tab-item.disabled{pointer-events:none;color:var(--txtDisabledColor)}.tabs-header .tab-item.disabled:after{display:none}.tabs-header.right{justify-content:flex-end}.tabs-header.center{justify-content:center}.tabs-header.stretched .tab-item{flex-grow:1;flex-basis:0}.tabs-header.compact{min-height:30px;margin-bottom:var(--smSpacing)}.tabs-content{position:relative}.tabs-content>.tab-item{width:100%;display:none}.tabs-content>.tab-item.active{display:block;opacity:0;animation:tabChange .2s forwards}.tabs-content>.tab-item>:first-child{margin-top:0}.tabs-content>.tab-item>:last-child{margin-bottom:0}.tabs{position:relative}.accordion{outline:0;position:relative;border-radius:var(--baseRadius);background:var(--baseColor);border:1px solid var(--baseAlt2Color);transition:box-shadow var(--baseAnimationSpeed),margin var(--baseAnimationSpeed)}.accordion .accordion-header{outline:0;position:relative;display:flex;min-height:52px;align-items:center;row-gap:10px;column-gap:var(--smSpacing);padding:12px 20px 10px;width:100%;user-select:none;color:var(--txtPrimaryColor);border-radius:inherit;transition:background var(--baseAnimationSpeed),box-shadow var(--baseAnimationSpeed)}.accordion .accordion-header .icon{width:18px;text-align:center}.accordion .accordion-header .icon i{display:inline-block;vertical-align:top;font-size:1.1rem}.accordion .accordion-header.interactive{padding-right:50px;cursor:pointer}.accordion .accordion-header.interactive:after{content:"\ea4e";position:absolute;right:15px;top:50%;margin-top:-12.5px;width:25px;height:25px;line-height:25px;color:var(--txtHintColor);font-family:var(--iconFontFamily);font-size:1.3em;text-align:center;transition:color var(--baseAnimationSpeed)}.accordion .accordion-header:hover:after,.accordion .accordion-header.focus:after,.accordion .accordion-header:focus-visible:after{color:var(--txtPrimaryColor)}.accordion .accordion-header:active{transition-duration:var(--activeAnimationSpeed)}.accordion .accordion-content{padding:20px}.accordion:hover,.accordion:focus-visible,.accordion.active{z-index:9}.accordion:hover .accordion-header.interactive,.accordion:focus-visible .accordion-header.interactive,.accordion.active .accordion-header.interactive{background:var(--baseAlt1Color)}.accordion.drag-over .accordion-header{background:var(--bodyColor)}.accordion.active{box-shadow:0 2px 5px 0 var(--shadowColor)}.accordion.active .accordion-header{position:relative;top:0;z-index:9;box-shadow:0 0 0 1px var(--baseAlt2Color);border-bottom-left-radius:0;border-bottom-right-radius:0;background:var(--bodyColor)}.accordion.active .accordion-header.interactive{background:var(--bodyColor)}.accordion.active .accordion-header.interactive:after{color:inherit;content:"\ea78"}.accordion.disabled{z-index:0;border-color:var(--baseAlt1Color)}.accordion.disabled .accordion-header{color:var(--txtDisabledColor)}.accordions .accordion{border-radius:0;margin:-1px 0 0}.accordions>.accordion.active,.accordions>.accordion-wrapper>.accordion.active{margin:var(--smSpacing) 0;border-radius:var(--baseRadius)}.accordions>.accordion:first-child,.accordions>.accordion-wrapper:first-child>.accordion{margin-top:0;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius)}.accordions>.accordion:last-child,.accordions>.accordion-wrapper:last-child>.accordion{margin-bottom:0;border-bottom-left-radius:var(--baseRadius);border-bottom-right-radius:var(--baseRadius)}table{--entranceAnimationSpeed: .3s;border-collapse:separate;min-width:100%;transition:opacity var(--baseAnimationSpeed)}table .form-field{margin:0;line-height:1;text-align:left}table .txt-ellipsis{flex-shrink:0}table td,table th{outline:0;vertical-align:middle;position:relative;text-align:left;padding:5px 10px;border-bottom:1px solid var(--baseAlt2Color)}table td:first-child,table th:first-child{padding-left:20px}table td:last-child,table th:last-child{padding-right:20px}table th{color:var(--txtHintColor);font-weight:600;font-size:1rem;user-select:none;height:50px;line-height:var(--smLineHeight)}table th i{font-size:inherit}table td{height:60px;word-break:break-word}table .min-width{width:1%!important;white-space:nowrap}table .nowrap{white-space:nowrap}table .col-sort{cursor:pointer;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius);padding-right:30px;transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}table .col-sort:after{content:"\ea4c";position:absolute;right:10px;top:50%;margin-top:-12.5px;line-height:25px;height:25px;font-family:var(--iconFontFamily);font-weight:400;color:var(--txtHintColor);opacity:0;transition:color var(--baseAnimationSpeed),opacity var(--baseAnimationSpeed)}table .col-sort.sort-desc:after{content:"\ea4c"}table .col-sort.sort-asc:after{content:"\ea76"}table .col-sort.sort-active:after{opacity:1}table .col-sort:hover,table .col-sort:focus-visible{background:var(--baseAlt1Color)}table .col-sort:hover:after,table .col-sort:focus-visible:after{opacity:1}table .col-sort:active{transition-duration:var(--activeAnimationSpeed);background:var(--baseAlt2Color)}table .col-sort.col-sort-disabled{cursor:default;background:none}table .col-sort.col-sort-disabled:after{display:none}table .col-header-content{display:inline-flex;align-items:center;flex-wrap:nowrap;gap:5px}table .col-header-content .txt{max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}table .col-field-created,table .col-field-updated,table .col-type-action{width:1%!important;white-space:nowrap}table .col-type-action{white-space:nowrap;text-align:right;color:var(--txtHintColor)}table .col-type-action i{display:inline-block;vertical-align:top;transition:transform var(--baseAnimationSpeed)}table td.col-type-json{font-family:monospace;font-size:var(--smFontSize);line-height:var(--smLineHeight);max-width:300px}table .col-type-text{max-width:300px}table .col-type-select{min-width:150px}table .col-type-email{min-width:120px;white-space:nowrap}table .col-type-file{min-width:100px}table td.col-field-id,table td.col-field-username{width:0;white-space:nowrap}table tr{outline:0;background:var(--bodyColor);transition:background var(--baseAnimationSpeed)}table tr.row-handle{cursor:pointer;user-select:none}table tr.row-handle:focus-visible,table tr.row-handle:hover,table tr.row-handle:active{background:var(--baseAlt1Color)}table tr.row-handle:focus-visible .action-col,table tr.row-handle:hover .action-col,table tr.row-handle:active .action-col{color:var(--txtPrimaryColor)}table tr.row-handle:focus-visible .action-col i,table tr.row-handle:hover .action-col i,table tr.row-handle:active .action-col i{transform:translate(3px)}table tr.row-handle:active{transition-duration:var(--activeAnimationSpeed)}table.table-compact td,table.table-compact th{height:auto}table.table-border{border:1px solid var(--baseAlt2Color)}table.table-border tr{background:var(--baseColor)}table.table-border th{background:var(--baseAlt1Color)}table.table-border>:last-child>:last-child th,table.table-border>:last-child>:last-child td{border-bottom:0}table.table-animate tr{animation:entranceTop var(--entranceAnimationSpeed)}table.table-loading{pointer-events:none;opacity:.7}.table-wrapper{width:auto;padding:0;max-width:calc(100% + 2 * var(--baseSpacing));margin-left:calc(var(--baseSpacing) * -1);margin-right:calc(var(--baseSpacing) * -1)}.table-wrapper .bulk-select-col{min-width:70px}.table-wrapper td,.table-wrapper th{position:relative}.table-wrapper td:first-child,.table-wrapper th:first-child{padding-left:calc(var(--baseSpacing) + 3px)}.table-wrapper td:last-child,.table-wrapper th:last-child{padding-right:calc(var(--baseSpacing) + 3px)}.table-wrapper .bulk-select-col,.table-wrapper .col-type-action{position:sticky;z-index:99;transition:box-shadow var(--baseAnimationSpeed)}.table-wrapper .bulk-select-col{left:0px}.table-wrapper .col-type-action{right:0}.table-wrapper .bulk-select-col,.table-wrapper .col-type-action{background:inherit}.table-wrapper th.bulk-select-col,.table-wrapper th.col-type-action{background:var(--bodyColor)}.table-wrapper.scrollable .bulk-select-col{box-shadow:3px 0 5px 0 var(--shadowColor)}.table-wrapper.scrollable .col-type-action{box-shadow:-3px 0 5px 0 var(--shadowColor)}.table-wrapper.scrollable.scroll-start .bulk-select-col,.table-wrapper.scrollable.scroll-end .col-type-action{box-shadow:none}.searchbar{--searchHeight: 44px;outline:0;display:flex;align-items:center;min-height:var(--searchHeight);width:100%;flex-grow:1;padding:5px 7px;margin:0;white-space:nowrap;color:var(--txtHintColor);background:var(--baseAlt1Color);border-radius:var(--btnHeight);transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed),box-shadow var(--baseAnimationSpeed)}.searchbar>:first-child{border-top-left-radius:var(--btnHeight);border-bottom-left-radius:var(--btnHeight)}.searchbar>:last-child{border-top-right-radius:var(--btnHeight);border-bottom-right-radius:var(--btnHeight)}.searchbar .btn{border-radius:var(--btnHeight)}.searchbar .code-editor,.searchbar input,.searchbar input:focus{font-size:var(--baseFontSize);font-family:var(--monospaceFontFamily);border:0;background:none;min-height:0;padding-top:0;padding-bottom:0}.searchbar label>i{line-height:inherit}.searchbar .search-options{flex-shrink:0;width:90px}.searchbar .search-options .selected-container{border-radius:inherit;background:none;padding-right:25px!important}.searchbar .search-options:not(:focus-within) .selected-container{color:var(--txtHintColor)}.searchbar:focus-within{color:var(--txtPrimaryColor);background:var(--baseAlt2Color)}.bulkbar{position:sticky;bottom:var(--baseSpacing);z-index:101;gap:10px;display:flex;justify-content:center;align-items:center;width:var(--smWrapperWidth);max-width:100%;margin:var(--smSpacing) auto;padding:10px var(--smSpacing);border-radius:var(--btnHeight);background:var(--baseColor);border:1px solid var(--baseAlt2Color);box-shadow:0 2px 5px 0 var(--shadowColor)}.flatpickr-calendar{opacity:0;display:none;text-align:center;visibility:hidden;padding:0;animation:none;direction:ltr;border:0;font-size:1rem;line-height:24px;position:absolute;width:298px;box-sizing:border-box;user-select:none;color:var(--txtPrimaryColor);background:var(--baseColor);border-radius:var(--baseRadius);box-shadow:0 2px 5px 0 var(--shadowColor),0 0 0 1px var(--baseAlt2Color)}.flatpickr-calendar input,.flatpickr-calendar select{box-shadow:none;min-height:0;height:var(--inputHeight);background:none;border-radius:var(--baseRadius);border:1px solid var(--baseAlt1Color)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:0;width:100%}.flatpickr-calendar.static{position:absolute;top:100%;margin-top:2px;margin-bottom:10px;width:100%}.flatpickr-calendar.static .flatpickr-days{width:100%}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 var(--baseAlt2Color),5px 0 0 var(--baseAlt2Color);box-shadow:-2px 0 0 var(--baseAlt2Color),5px 0 0 var(--baseAlt2Color)}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid var(--baseAlt2Color)}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:var(--baseColor)}.flatpickr-calendar.arrowTop:after{border-bottom-color:var(--baseColor)}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:var(--baseColor)}.flatpickr-calendar.arrowBottom:after{border-top-color:var(--baseColor)}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative}.flatpickr-months{display:flex;margin:0 0 4px}.flatpickr-months .flatpickr-month{background:transparent;color:var(--txtPrimaryColor);fill:var(--txtPrimaryColor);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:var(--txtPrimaryColor);fill:var(--txtPrimaryColor)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:var(--txtHintColor)}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:#00000080}.numInputWrapper:hover{background:var(--baseAlt2Color)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{line-height:inherit;color:inherit;position:absolute;width:75%;left:12.5%;padding:1px 0;line-height:1;display:flex;align-items:center;justify-content:center;text-align:center}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:var(--baseAlt2Color)}.flatpickr-current-month .numInputWrapper{display:inline-flex;align-items:center;justify-content:center;width:63px;margin:0 5px}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:var(--txtPrimaryColor)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:var(--txtPrimaryColor)}.flatpickr-current-month input.cur-year{background:transparent;box-sizing:border-box;color:inherit;cursor:text;margin:0;display:inline-block;font-size:inherit;font-family:inherit;line-height:inherit;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{color:var(--txtDisabledColor);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;line-height:inherit;outline:none;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:var(--baseAlt2Color)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{display:block;flex:1;margin:0;cursor:default;line-height:1;background:transparent;color:var(--txtHintColor);text-align:center;font-weight:bolder;font-size:var(--smFontSize)}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:100%;box-sizing:border-box;display:inline-block;display:flex;flex-wrap:wrap;transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 var(--baseAlt2Color);box-shadow:-1px 0 0 var(--baseAlt2Color)}.flatpickr-day{background:none;border:1px solid transparent;border-radius:var(--baseRadius);box-sizing:border-box;color:var(--txtPrimaryColor);cursor:pointer;font-weight:400;width:calc(14.2857143% - 2px);flex-basis:calc(14.2857143% - 2px);height:39px;margin:1px;display:inline-flex;align-items:center;justify-content:center;position:relative;text-align:center;flex-direction:column}.flatpickr-day.weekend,.flatpickr-day:nth-child(7n+6),.flatpickr-day:nth-child(7n+7){color:var(--dangerColor)}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:var(--baseAlt2Color);border-color:var(--baseAlt2Color)}.flatpickr-day.today{border-color:var(--baseColor)}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:var(--primaryColor);background:var(--primaryColor);color:var(--baseColor)}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:var(--primaryColor);-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:var(--primaryColor)}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 var(--primaryColor);box-shadow:-10px 0 0 var(--primaryColor)}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;box-shadow:-5px 0 0 var(--baseAlt2Color),5px 0 0 var(--baseAlt2Color)}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:var(--txtDisabledColor);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:var(--txtDisabledColor);background:var(--baseAlt2Color)}.flatpickr-day.week.selected{border-radius:0;box-shadow:-5px 0 0 var(--primaryColor),5px 0 0 var(--primaryColor)}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 var(--baseAlt2Color);box-shadow:1px 0 0 var(--baseAlt2Color)}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:var(--txtHintColor);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:flex;box-sizing:border-box;overflow:hidden;padding:5px}.flatpickr-rContainer{display:inline-block;padding:0;width:100%;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:var(--txtPrimaryColor)}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:var(--txtPrimaryColor)}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;box-shadow:none;border:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:var(--txtPrimaryColor);font-size:14px;position:relative;box-sizing:border-box;background:var(--baseColor);-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:var(--txtPrimaryColor);font-weight:700;width:2%;user-select:none;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:var(--baseAlt1Color)}.flatpickr-input[readonly]{cursor:pointer}@keyframes fpFadeInDown{0%{opacity:0;transform:translate3d(0,10px,0)}to{opacity:1;transform:translateZ(0)}}.flatpickr-hide-prev-next-month-days .flatpickr-calendar .prevMonthDay{visibility:hidden}.flatpickr-hide-prev-next-month-days .flatpickr-calendar .nextMonthDay,.flatpickr-inline-container .flatpickr-input{display:none}.flatpickr-inline-container .flatpickr-calendar{margin:0;box-shadow:none;border:1px solid var(--baseAlt2Color)}.docs-sidebar{--itemsSpacing: 10px;--itemsHeight: 40px;position:relative;min-width:180px;max-width:300px;height:100%;flex-shrink:0;overflow-x:hidden;overflow-y:auto;overflow-y:overlay;background:var(--bodyColor);padding:var(--smSpacing) var(--xsSpacing);border-right:1px solid var(--baseAlt1Color)}.docs-sidebar .sidebar-content{display:block;width:100%}.docs-sidebar .sidebar-item{position:relative;outline:0;cursor:pointer;text-decoration:none;display:flex;width:100%;gap:10px;align-items:center;text-align:right;justify-content:start;padding:5px 15px;margin:0 0 var(--itemsSpacing) 0;font-size:var(--lgFontSize);min-height:var(--itemsHeight);border-radius:var(--baseRadius);user-select:none;color:var(--txtHintColor);transition:background var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.docs-sidebar .sidebar-item:last-child{margin-bottom:0}.docs-sidebar .sidebar-item:focus-visible,.docs-sidebar .sidebar-item:hover,.docs-sidebar .sidebar-item:active,.docs-sidebar .sidebar-item.active{color:var(--txtPrimaryColor);background:var(--baseAlt1Color)}.docs-sidebar .sidebar-item:active{background:var(--baseAlt2Color);transition-duration:var(--activeAnimationSpeed)}.docs-sidebar.compact .sidebar-item{--itemsSpacing: 7px}.docs-content{width:100%;display:block;padding:calc(var(--baseSpacing) - 3px) var(--baseSpacing);overflow:auto}.docs-content-wrapper{display:flex;width:100%;height:100%}.docs-panel{width:960px;height:100%}.docs-panel .overlay-panel-section.panel-header{padding:0;border:0;box-shadow:none}.docs-panel .overlay-panel-section.panel-content{padding:0!important}.docs-panel .overlay-panel-section.panel-footer{display:none}@media screen and (max-width: 1000px){.docs-panel .overlay-panel-section.panel-footer{display:flex}}.panel-wrapper.svelte-lxxzfu{animation:slideIn .2s}@keyframes svelte-1bvelc2-refresh{to{transform:rotate(180deg)}}.btn.refreshing.svelte-1bvelc2 i.svelte-1bvelc2{animation:svelte-1bvelc2-refresh .15s ease-out}.datetime.svelte-zdiknu{width:100%;display:block;line-height:var(--smLineHeight)}.time.svelte-zdiknu{font-size:var(--smFontSize);color:var(--txtHintColor)}.horizontal-scroller.svelte-wc2j9h{width:auto;overflow-x:auto}.horizontal-scroller-wrapper.svelte-wc2j9h{position:relative}.horizontal-scroller-wrapper .columns-dropdown{top:40px;z-index:100;max-height:340px}.chart-wrapper.svelte-vh4sl8.svelte-vh4sl8{position:relative;display:block;width:100%}.chart-wrapper.loading.svelte-vh4sl8 .chart-canvas.svelte-vh4sl8{pointer-events:none;opacity:.5}.chart-loader.svelte-vh4sl8.svelte-vh4sl8{position:absolute;z-index:999;top:50%;left:50%;transform:translate(-50%,-50%)}.prism-light code[class*=language-],.prism-light pre[class*=language-]{color:#111b27;background:0 0;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}.prism-light code[class*=language-] ::-moz-selection,.prism-light code[class*=language-]::-moz-selection,.prism-light pre[class*=language-] ::-moz-selection,.prism-light pre[class*=language-]::-moz-selection{background:#8da1b9}.prism-light code[class*=language-] ::selection,.prism-light code[class*=language-]::selection,.prism-light pre[class*=language-] ::selection,.prism-light pre[class*=language-]::selection{background:#8da1b9}.prism-light pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}.prism-light :not(pre)>code[class*=language-],.prism-light pre[class*=language-]{background:#e3eaf2}.prism-light :not(pre)>code[class*=language-]{padding:.1em .3em;border-radius:.3em;white-space:normal}.prism-light .token.cdata,.prism-light .token.comment,.prism-light .token.doctype,.prism-light .token.prolog{color:#3c526d}.prism-light .token.punctuation{color:#111b27}.prism-light .token.delimiter.important,.prism-light .token.selector .parent,.prism-light .token.tag,.prism-light .token.tag .token.punctuation{color:#006d6d}.prism-light .token.attr-name,.prism-light .token.boolean,.prism-light .token.boolean.important,.prism-light .token.constant,.prism-light .token.number,.prism-light .token.selector .token.attribute{color:#755f00}.prism-light .token.class-name,.prism-light .token.key,.prism-light .token.parameter,.prism-light .token.property,.prism-light .token.property-access,.prism-light .token.variable{color:#005a8e}.prism-light .token.attr-value,.prism-light .token.color,.prism-light .token.inserted,.prism-light .token.selector .token.value,.prism-light .token.string,.prism-light .token.string .token.url-link{color:#116b00}.prism-light .token.builtin,.prism-light .token.keyword-array,.prism-light .token.package,.prism-light .token.regex{color:#af00af}.prism-light .token.function,.prism-light .token.selector .token.class,.prism-light .token.selector .token.id{color:#7c00aa}.prism-light .token.atrule .token.rule,.prism-light .token.combinator,.prism-light .token.keyword,.prism-light .token.operator,.prism-light .token.pseudo-class,.prism-light .token.pseudo-element,.prism-light .token.selector,.prism-light .token.unit{color:#a04900}.prism-light .token.deleted,.prism-light .token.important{color:#c22f2e}.prism-light .token.keyword-this,.prism-light .token.this{color:#005a8e}.prism-light .token.bold,.prism-light .token.important,.prism-light .token.keyword-this,.prism-light .token.this{font-weight:700}.prism-light .token.delimiter.important{font-weight:inherit}.prism-light .token.italic{font-style:italic}.prism-light .token.entity{cursor:help}.prism-light .language-markdown .token.title,.prism-light .language-markdown .token.title .token.punctuation{color:#005a8e;font-weight:700}.prism-light .language-markdown .token.blockquote.punctuation{color:#af00af}.prism-light .language-markdown .token.code{color:#006d6d}.prism-light .language-markdown .token.hr.punctuation{color:#005a8e}.prism-light .language-markdown .token.url>.token.content{color:#116b00}.prism-light .language-markdown .token.url-link{color:#755f00}.prism-light .language-markdown .token.list.punctuation{color:#af00af}.prism-light .language-markdown .token.table-header,.prism-light .language-json .token.operator{color:#111b27}.prism-light .language-scss .token.variable{color:#006d6d}.prism-light .token.token.cr:before,.prism-light .token.token.lf:before,.prism-light .token.token.space:before,.prism-light .token.token.tab:not(:empty):before{color:#3c526d}.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>a,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>button{color:#e3eaf2;background:#005a8e}.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>a:focus,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>a:hover,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>button:focus,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>button:hover{color:#e3eaf2;background:rgba(0,90,142,.8549019608);text-decoration:none}.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>span,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>span:focus,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>span:hover{color:#e3eaf2;background:#3c526d}.prism-light .line-highlight.line-highlight{background:rgba(141,161,185,.1843137255);background:linear-gradient(to right,rgba(141,161,185,.1843137255) 70%,rgba(141,161,185,.1450980392))}.prism-light .line-highlight.line-highlight:before,.prism-light .line-highlight.line-highlight[data-end]:after{background-color:#3c526d;color:#e3eaf2;box-shadow:0 1px #8da1b9}.prism-light pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows>span:hover:before{background-color:#3c526d1f}.prism-light .line-numbers.line-numbers .line-numbers-rows{border-right:1px solid rgba(141,161,185,.4784313725);background:rgba(208,218,231,.4784313725)}.prism-light .line-numbers .line-numbers-rows>span:before{color:#3c526dda}.prism-light .rainbow-braces .token.token.punctuation.brace-level-1,.prism-light .rainbow-braces .token.token.punctuation.brace-level-5,.prism-light .rainbow-braces .token.token.punctuation.brace-level-9{color:#755f00}.prism-light .rainbow-braces .token.token.punctuation.brace-level-10,.prism-light .rainbow-braces .token.token.punctuation.brace-level-2,.prism-light .rainbow-braces .token.token.punctuation.brace-level-6{color:#af00af}.prism-light .rainbow-braces .token.token.punctuation.brace-level-11,.prism-light .rainbow-braces .token.token.punctuation.brace-level-3,.prism-light .rainbow-braces .token.token.punctuation.brace-level-7{color:#005a8e}.prism-light .rainbow-braces .token.token.punctuation.brace-level-12,.prism-light .rainbow-braces .token.token.punctuation.brace-level-4,.prism-light .rainbow-braces .token.token.punctuation.brace-level-8{color:#7c00aa}.prism-light pre.diff-highlight>code .token.token.deleted:not(.prefix),.prism-light pre>code.diff-highlight .token.token.deleted:not(.prefix){background-color:#c22f2e1f}.prism-light pre.diff-highlight>code .token.token.inserted:not(.prefix),.prism-light pre>code.diff-highlight .token.token.inserted:not(.prefix){background-color:#116b001f}.prism-light .command-line .command-line-prompt{border-right:1px solid rgba(141,161,185,.4784313725)}.prism-light .command-line .command-line-prompt>span:before{color:#3c526dda}code.svelte-10s5tkd.svelte-10s5tkd{display:block;width:100%;padding:10px 15px;white-space:pre-wrap;word-break:break-word}.code-wrapper.svelte-10s5tkd.svelte-10s5tkd{display:block;width:100%;max-height:100%;overflow:auto;overflow:overlay}.prism-light.svelte-10s5tkd code.svelte-10s5tkd{color:var(--txtPrimaryColor);background:var(--baseAlt1Color)}.invalid-name-note.svelte-1tpxlm5{position:absolute;right:10px;top:10px;text-transform:none}.title.field-name.svelte-1tpxlm5{max-width:130px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.lock-toggle.svelte-1qbi6vr{position:absolute;right:0px;top:0px;min-width:135px;padding:10px;border-top-left-radius:0;border-bottom-right-radius:0;background:rgba(53,71,104,.1)}.changes-list.svelte-1ghly2p{word-break:break-all}.upsert-panel-title.svelte-1yfp6mj{display:inline-flex;align-items:center;min-height:var(--smBtnHeight)}.tabs-content.svelte-1yfp6mj{z-index:3}.email-visibility-addon.svelte-1751a4d~input.svelte-1751a4d{padding-right:100px}textarea.svelte-1x1pbts{resize:none;padding-top:4px!important;padding-bottom:5px!important;min-height:var(--inputHeight);height:var(--inputHeight)}.clear-btn.svelte-11df51y{margin-top:20px}.draggable.svelte-28orm4{user-select:none;outline:0;min-width:0}.record-info.svelte-1v6tn2p.svelte-1v6tn2p{display:inline-flex;vertical-align:top;align-items:center;max-width:100%;min-width:0;gap:5px;line-height:normal}.record-info.svelte-1v6tn2p>.svelte-1v6tn2p{line-height:inherit}.picker-list.svelte-1u8jhky{max-height:380px}.selected-list.svelte-1u8jhky{display:flex;flex-wrap:wrap;align-items:center;gap:10px;max-height:220px;overflow:auto}.relations-list.svelte-1ynw0pc{max-height:300px;overflow:auto;overflow:overlay}.filename.svelte-4cdww{max-width:200px}.export-preview.svelte-jm5c4z.svelte-jm5c4z{position:relative;height:500px}.export-preview.svelte-jm5c4z .copy-schema.svelte-jm5c4z{position:absolute;right:15px;top:15px}.collections-diff-table.svelte-lmkr38.svelte-lmkr38{color:var(--txtHintColor);border:2px solid var(--primaryColor)}.collections-diff-table.svelte-lmkr38 tr.svelte-lmkr38{background:none}.collections-diff-table.svelte-lmkr38 th.svelte-lmkr38,.collections-diff-table.svelte-lmkr38 td.svelte-lmkr38{height:auto;padding:2px 15px;border-bottom:1px solid rgba(0,0,0,.07)}.collections-diff-table.svelte-lmkr38 th.svelte-lmkr38{height:35px;padding:4px 15px;color:var(--txtPrimaryColor)}.collections-diff-table.svelte-lmkr38 thead tr.svelte-lmkr38{background:var(--primaryColor)}.collections-diff-table.svelte-lmkr38 thead tr th.svelte-lmkr38{color:var(--baseColor);background:none}.collections-diff-table.svelte-lmkr38 .label.svelte-lmkr38{font-weight:400}.collections-diff-table.svelte-lmkr38 .changed-none-col.svelte-lmkr38{color:var(--txtDisabledColor);background:var(--baseAlt1Color)}.collections-diff-table.svelte-lmkr38 .changed-old-col.svelte-lmkr38{color:var(--txtPrimaryColor);background:var(--dangerAltColor)}.collections-diff-table.svelte-lmkr38 .changed-new-col.svelte-lmkr38{color:var(--txtPrimaryColor);background:var(--successAltColor)}.collections-diff-table.svelte-lmkr38 .field-key-col.svelte-lmkr38{padding-left:30px}.list-label.svelte-1jx20fl{min-width:65px} diff --git a/ui/dist/assets/index-a6ccb683.js b/ui/dist/assets/index-a6ccb683.js new file mode 100644 index 00000000..ed0bb1ef --- /dev/null +++ b/ui/dist/assets/index-a6ccb683.js @@ -0,0 +1,13 @@ +class I{constructor(){}lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),He.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let i=[];return this.decompose(e,t,i,0),He.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new ii(this),r=new ii(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new ii(this,e)}iterRange(e,t=this.length){return new rl(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new ol(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?I.empty:e.length<=32?new G(e):He.from(G.split(e,[]))}}class G extends I{constructor(e,t=Ka(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new ja(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new G(vr(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=$i(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new G(l,o.length+r.length));else{let h=l.length>>1;i.push(new G(l.slice(0,h)),new G(l.slice(h)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof G))return super.replace(e,t,i);let s=$i(this.text,$i(i.text,vr(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new G(s,r):He.from(G.split(s,[]),r)}sliceString(e,t=this.length,i=` +`){let s="";for(let r=0,o=0;r<=t&&oe&&o&&(s+=i),er&&(s+=l.slice(Math.max(0,e-r),t-r)),r=h+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],s=-1;for(let r of e)i.push(r),s+=r.length+1,i.length==32&&(t.push(new G(i,s)),i=[],s=-1);return s>-1&&t.push(new G(i,s)),t}}class He extends I{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.children[r],l=s+o.length,h=i+o.lines-1;if((t?h:l)>=e)return o.lineInner(e,t,i,s);s=l+1,i=h+1}}decompose(e,t,i,s){for(let r=0,o=0;o<=t&&r=o){let a=s&((o<=e?1:0)|(h>=t?2:0));o>=e&&h<=t&&!a?i.push(l):l.decompose(e-o,t-o,i,a)}o=h+1}}replace(e,t,i){if(i.lines=r&&t<=l){let h=o.replace(e-r,t-r,i),a=this.lines-o.lines+h.lines;if(h.lines>5-1&&h.lines>a>>5+1){let c=this.children.slice();return c[s]=h,new He(c,this.length-(t-e)+i.length)}return super.replace(r,l,h)}r=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=` +`){let s="";for(let r=0,o=0;re&&r&&(s+=i),eo&&(s+=l.sliceString(e-o,t-o,i)),o=h+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof He))return 0;let i=0,[s,r,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==l)return i;let h=this.children[s],a=e.children[r];if(h!=a)return i+h.scanIdentical(a,t);i+=h.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let p of e)p.flatten(d);return new G(d,t)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],h=0,a=-1,c=[];function f(d){let p;if(d.lines>r&&d instanceof He)for(let g of d.children)f(g);else d.lines>o&&(h>o||!h)?(u(),l.push(d)):d instanceof G&&h&&(p=c[c.length-1])instanceof G&&d.lines+p.lines<=32?(h+=d.lines,a+=d.length+1,c[c.length-1]=new G(p.text.concat(d.text),p.length+1+d.length)):(h+d.lines>s&&u(),h+=d.lines,a+=d.length+1,c.push(d))}function u(){h!=0&&(l.push(c.length==1?c[0]:He.from(c,a)),a=-1,h=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new He(l,t)}}I.empty=new G([""],0);function Ka(n){let e=-1;for(let t of n)e+=t.length+1;return e}function $i(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r=t&&(h>i&&(l=l.slice(0,i-s)),s0?1:(e instanceof G?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof G?s.text.length:s.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(s instanceof G){let h=s.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,h.length>Math.max(0,e))return this.value=e==0?h:t>0?h.slice(e):h.slice(0,h.length-e),this;e-=h.length}else{let h=s.children[o+(t<0?-1:0)];e>h.length?(e-=h.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(h),this.offsets.push(t>0?1:(h instanceof G?h.text.length:h.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class rl{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new ii(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class ol{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=this.inner.next(e);return t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(I.prototype[Symbol.iterator]=function(){return this.iter()},ii.prototype[Symbol.iterator]=rl.prototype[Symbol.iterator]=ol.prototype[Symbol.iterator]=function(){return this});class ja{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}}let Rt="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;nn)return Rt[e-1]<=n;return!1}function Cr(n){return n>=127462&&n<=127487}const Ar=8205;function de(n,e,t=!0,i=!0){return(t?ll:Ga)(n,e,i)}function ll(n,e,t){if(e==n.length)return e;e&&hl(n.charCodeAt(e))&&al(n.charCodeAt(e-1))&&e--;let i=se(n,e);for(e+=Me(i);e=0&&Cr(se(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function Ga(n,e,t){for(;e>0;){let i=ll(n,e-2,t);if(i=56320&&n<57344}function al(n){return n>=55296&&n<56320}function se(n,e){let t=n.charCodeAt(e);if(!al(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return hl(i)?(t-55296<<10)+(i-56320)+65536:t}function Ks(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Me(n){return n<65536?1:2}const Zn=/\r\n?|\n/;var he=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(he||(he={}));class Ke{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return r+(e-s);r+=l}else{if(i!=he.Simple&&a>=e&&(i==he.TrackDel&&se||i==he.TrackBefore&&se))return null;if(a>e||a==e&&t<0&&!l)return e==s||t<0?r:r+h;r+=h}s=a}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let i=0,s=0;i=0&&s<=t&&l>=e)return st?"cover":!0;s=l}return!1}toString(){let e="";for(let t=0;t=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Ke(e)}static create(e){return new Ke(e)}}class Q extends Ke{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return es(this,(t,i,s,r,o)=>e=e.replace(s,s+(i-t),o),!1),e}mapDesc(e,t=!1){return ts(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let s=0,r=0;s=0){t[s]=l,t[s+1]=o;let h=s>>1;for(;i.length0&&tt(i,t,r.text),r.forward(c),l+=c}let a=e[o++];for(;l>1].toJSON()))}return e}static of(e,t,i){let s=[],r=[],o=0,l=null;function h(c=!1){if(!c&&!s.length)return;ou||f<0||u>t)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${t})`);let p=d?typeof d=="string"?I.of(d.split(i||Zn)):d:I.empty,g=p.length;if(f==u&&g==0)return;fo&&le(s,f-o,-1),le(s,u-f,g),tt(r,s,p),o=u}}return a(e),h(!l),l}static empty(e){return new Q(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let s=0;sl&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)t.push(r[0],0);else{for(;i.length=0&&t<=0&&t==n[s+1]?n[s]+=e:e==0&&n[s]==0?n[s+1]+=t:i?(n[s]+=e,n[s+1]+=t):n.push(e,t)}function tt(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],h=n.sections[o++];e(s,a,r,c,f),s=a,r=c}}}function ts(n,e,t,i=!1){let s=[],r=i?[]:null,o=new ri(n),l=new ri(e);for(let h=-1;;)if(o.ins==-1&&l.ins==-1){let a=Math.min(o.len,l.len);le(s,a,-1),o.forward(a),l.forward(a)}else if(l.ins>=0&&(o.ins<0||h==o.i||o.off==0&&(l.len=0&&h=0){let a=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);a+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.lenh||o.ins>=0&&o.len>h)&&(l||i.length>a),r.forward2(h),o.forward(h)}}}}class ri{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?I.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?I.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class gt{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&16?this.to:this.from}get head(){return this.flags&16?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&4?-1:this.flags&8?1:0}get bidiLevel(){let e=this.flags&3;return e==3?null:e}get goalColumn(){let e=this.flags>>5;return e==33554431?void 0:e}map(e,t=-1){let i,s;return this.empty?i=s=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new gt(i,s,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return b.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return b.range(this.anchor,i)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return b.range(e.anchor,e.head)}static create(e,t,i){return new gt(e,t,i)}}class b{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:b.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let t=0;te.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new b(e.ranges.map(t=>gt.fromJSON(t)),e.main)}static single(e,t=e){return new b([b.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;se?4:0)|r)}static normalized(e,t=0){let i=e[t];e.sort((s,r)=>s.from-r.from),t=e.indexOf(i);for(let s=1;sr.head?b.range(h,l):b.range(l,h))}}return new b(e,t)}}function fl(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let js=0;class M{constructor(e,t,i,s,r){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=s,this.id=js++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}static define(e={}){return new M(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:Us),!!e.static,e.enables)}of(e){return new Ki([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ki(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ki(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function Us(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class Ki{constructor(e,t,i,s){this.dependencies=e,this.facet=t,this.type=i,this.value=s,this.id=js++}dynamicSlot(e){var t;let i=this.value,s=this.facet.compareInput,r=this.id,o=e[r]>>1,l=this.type==2,h=!1,a=!1,c=[];for(let f of this.dependencies)f=="doc"?h=!0:f=="selection"?a=!0:((t=e[f.id])!==null&&t!==void 0?t:1)&1||c.push(e[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,u){if(h&&u.docChanged||a&&(u.docChanged||u.selection)||is(f,c)){let d=i(f);if(l?!Mr(d,f.values[o],s):!s(d,f.values[o]))return f.values[o]=d,1}return 0},reconfigure:(f,u)=>{let d,p=u.config.address[r];if(p!=null){let g=Yi(u,p);if(this.dependencies.every(m=>m instanceof M?u.facet(m)===f.facet(m):m instanceof we?u.field(m,!1)==f.field(m,!1):!0)||(l?Mr(d=i(f),g,s):s(d=i(f),g)))return f.values[o]=g,0}else d=i(f);return f.values[o]=d,1}}}}function Mr(n,e,t){if(n.length!=e.length)return!1;for(let i=0;in[h.id]),s=t.map(h=>h.type),r=i.filter(h=>!(h&1)),o=n[e.id]>>1;function l(h){let a=[];for(let c=0;ci===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Dr).find(i=>i.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,s)=>{let r=i.values[t],o=this.updateF(r,s);return this.compareF(r,o)?0:(i.values[t]=o,1)},reconfigure:(i,s)=>s.config.address[this.id]!=null?(i.values[t]=s.field(this),0):(i.values[t]=this.create(i),1)}}init(e){return[this,Dr.of({field:this,create:e})]}get extension(){return this}}const pt={lowest:4,low:3,default:2,high:1,highest:0};function Gt(n){return e=>new ul(e,n)}const Ct={highest:Gt(pt.highest),high:Gt(pt.high),default:Gt(pt.default),low:Gt(pt.low),lowest:Gt(pt.lowest)};class ul{constructor(e,t){this.inner=e,this.prec=t}}class kn{of(e){return new ns(this,e)}reconfigure(e){return kn.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class ns{constructor(e,t){this.compartment=e,this.inner=t}}class Xi{constructor(e,t,i,s,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,i){let s=[],r=Object.create(null),o=new Map;for(let u of _a(e,t,o))u instanceof we?s.push(u):(r[u.facet.id]||(r[u.facet.id]=[])).push(u);let l=Object.create(null),h=[],a=[];for(let u of s)l[u.id]=a.length<<1,a.push(d=>u.slot(d));let c=i==null?void 0:i.config.facets;for(let u in r){let d=r[u],p=d[0].facet,g=c&&c[u]||[];if(d.every(m=>m.type==0))if(l[p.id]=h.length<<1|1,Us(g,d))h.push(i.facet(p));else{let m=p.combine(d.map(y=>y.value));h.push(i&&p.compare(m,i.facet(p))?i.facet(p):m)}else{for(let m of d)m.type==0?(l[m.id]=h.length<<1|1,h.push(m.value)):(l[m.id]=a.length<<1,a.push(y=>m.dynamicSlot(y)));l[p.id]=a.length<<1,a.push(m=>Ja(m,p,d))}}let f=a.map(u=>u(l));return new Xi(e,o,f,l,h,r)}}function _a(n,e,t){let i=[[],[],[],[],[]],s=new Map;function r(o,l){let h=s.get(o);if(h!=null){if(h<=l)return;let a=i[h].indexOf(o);a>-1&&i[h].splice(a,1),o instanceof ns&&t.delete(o.compartment)}if(s.set(o,l),Array.isArray(o))for(let a of o)r(a,l);else if(o instanceof ns){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let a=e.get(o.compartment)||o.inner;t.set(o.compartment,a),r(a,l)}else if(o instanceof ul)r(o.inner,o.prec);else if(o instanceof we)i[l].push(o),o.provides&&r(o.provides,l);else if(o instanceof Ki)i[l].push(o),o.facet.extensions&&r(o.facet.extensions,pt.default);else{let a=o.extension;if(!a)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(a,l)}}return r(n,pt.default),i.reduce((o,l)=>o.concat(l))}function ni(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let s=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|s}function Yi(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const dl=M.define(),pl=M.define({combine:n=>n.some(e=>e),static:!0}),gl=M.define({combine:n=>n.length?n[0]:void 0,static:!0}),ml=M.define(),yl=M.define(),bl=M.define(),wl=M.define({combine:n=>n.length?n[0]:!1});class at{constructor(e,t){this.type=e,this.value=t}static define(){return new Xa}}class Xa{of(e){return new at(this,e)}}class Ya{constructor(e){this.map=e}of(e){return new E(this,e)}}class E{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new E(this.type,t)}is(e){return this.type==e}static define(e={}){return new Ya(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let s of e){let r=s.map(t);r&&i.push(r)}return i}}E.reconfigure=E.define();E.appendConfig=E.define();class Z{constructor(e,t,i,s,r,o){this.startState=e,this.changes=t,this.selection=i,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,i&&fl(i,t.newLength),r.some(l=>l.type==Z.time)||(this.annotations=r.concat(Z.time.of(Date.now())))}static create(e,t,i,s,r,o){return new Z(e,t,i,s,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Z.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}Z.time=at.define();Z.userEvent=at.define();Z.addToHistory=at.define();Z.remote=at.define();function Qa(n,e){let t=[];for(let i=0,s=0;;){let r,o;if(i=n[i]))r=n[i++],o=n[i++];else if(s=0;s--){let r=i[s](n);r instanceof Z?n=r:Array.isArray(r)&&r.length==1&&r[0]instanceof Z?n=r[0]:n=kl(e,Lt(r),!1)}return n}function ec(n){let e=n.startState,t=e.facet(bl),i=n;for(let s=t.length-1;s>=0;s--){let r=t[s](n);r&&Object.keys(r).length&&(i=xl(i,ss(e,r,n.changes.newLength),!0))}return i==n?n:Z.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const tc=[];function Lt(n){return n==null?tc:Array.isArray(n)?n:[n]}var $=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}($||($={}));const ic=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let rs;try{rs=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function nc(n){if(rs)return rs.test(n);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||ic.test(t)))return!0}return!1}function sc(n){return e=>{if(!/\S/.test(e))return $.Space;if(nc(e))return $.Word;for(let t=0;t-1)return $.Word;return $.Other}}class N{constructor(e,t,i,s,r,o){this.config=e,this.doc=t,this.selection=i,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let l=0;ls.set(h,l)),t=null),s.set(o.value.compartment,o.value.extension)):o.is(E.reconfigure)?(t=null,i=o.value):o.is(E.appendConfig)&&(t=null,i=Lt(i).concat(o.value));let r;t?r=e.startState.values.slice():(t=Xi.resolve(i,s,this),r=new N(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(l,h)=>h.reconfigure(l,this),null).values),new N(t,e.newDoc,e.newSelection,r,(o,l)=>l.update(o,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:b.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),s=this.changes(i.changes),r=[i.range],o=Lt(i.effects);for(let l=1;lo.spec.fromJSON(l,h)))}}return N.create({doc:e.doc,selection:b.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=Xi.resolve(e.extensions||[],new Map),i=e.doc instanceof I?e.doc:I.of((e.doc||"").split(t.staticFacet(N.lineSeparator)||Zn)),s=e.selection?e.selection instanceof b?e.selection:b.single(e.selection.anchor,e.selection.head):b.single(0);return fl(s,i.length),t.staticFacet(pl)||(s=s.asSingle()),new N(t,i,s,t.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(N.tabSize)}get lineBreak(){return this.facet(N.lineSeparator)||` +`}get readOnly(){return this.facet(wl)}phrase(e,...t){for(let i of this.facet(N.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>t.length?i:t[r-1]})),e}languageDataAt(e,t,i=-1){let s=[];for(let r of this.facet(dl))for(let o of r(this,t,i))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){return sc(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:i,length:s}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-i,l=e-i;for(;o>0;){let h=de(t,o,!1);if(r(t.slice(h,o))!=$.Word)break;o=h}for(;ln.length?n[0]:4});N.lineSeparator=gl;N.readOnly=wl;N.phrases=M.define({compare(n,e){let t=Object.keys(n),i=Object.keys(e);return t.length==i.length&&t.every(s=>n[s]==e[s])}});N.languageData=dl;N.changeFilter=ml;N.transactionFilter=yl;N.transactionExtender=bl;kn.reconfigure=E.define();function At(n,e,t={}){let i={};for(let s of n)for(let r of Object.keys(s)){let o=s[r],l=i[r];if(l===void 0)i[r]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,r))i[r]=t[r](l,o);else throw new Error("Config merge conflict for field "+r)}for(let s in e)i[s]===void 0&&(i[s]=e[s]);return i}class wt{eq(e){return this==e}range(e,t=e){return os.create(e,t,this)}}wt.prototype.startSide=wt.prototype.endSide=0;wt.prototype.point=!1;wt.prototype.mapMode=he.TrackDel;let os=class Sl{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new Sl(e,t,i)}};function ls(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class Gs{constructor(e,t,i,s){this.from=e,this.to=t,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,s=0){let r=i?this.to:this.from;for(let o=s,l=r.length;;){if(o==l)return o;let h=o+l>>1,a=r[h]-e||(i?this.value[h].endSide:this.value[h].startSide)-t;if(h==o)return a>=0?o:l;a>=0?l=h:o=h+1}}between(e,t,i,s){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(i,1e9,!1,r);rd||u==d&&a.startSide>0&&a.endSide<=0)continue;(d-u||a.endSide-a.startSide)<0||(o<0&&(o=u),a.point&&(l=Math.max(l,d-u)),i.push(a),s.push(u-o),r.push(d-o))}return{mapped:i.length?new Gs(s,r,i,l):null,pos:o}}}class j{constructor(e,t,i,s){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=s}static create(e,t,i,s){return new j(e,t,i,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:s=0,filterTo:r=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(i&&(t=t.slice().sort(ls)),this.isEmpty)return t.length?j.of(t):this;let l=new vl(this,null,-1).goto(0),h=0,a=[],c=new xt;for(;l.value||h=0){let f=t[h++];c.addInner(f.from,f.to,f.value)||a.push(f)}else l.rangeIndex==1&&l.chunkIndexthis.chunkEnd(l.chunkIndex)||rl.to||r=r&&e<=r+o.length&&o.between(r,e-r,t-r,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return oi.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return oi.from(e).goto(t)}static compare(e,t,i,s,r=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),l=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),h=Or(o,l,i),a=new Jt(o,h,r),c=new Jt(l,h,r);i.iterGaps((f,u,d)=>Tr(a,f,c,u,d,s)),i.empty&&i.length==0&&Tr(a,0,c,0,0,s)}static eq(e,t,i=0,s){s==null&&(s=1e9-1);let r=e.filter(c=>!c.isEmpty&&t.indexOf(c)<0),o=t.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(r.length!=o.length)return!1;if(!r.length)return!0;let l=Or(r,o),h=new Jt(r,l,0).goto(i),a=new Jt(o,l,0).goto(i);for(;;){if(h.to!=a.to||!hs(h.active,a.active)||h.point&&(!a.point||!h.point.eq(a.point)))return!1;if(h.to>s)return!0;h.next(),a.next()}}static spans(e,t,i,s,r=-1){let o=new Jt(e,null,r).goto(t),l=t,h=o.openStart;for(;;){let a=Math.min(o.to,i);if(o.point){let c=o.activeForPoint(o.to),f=o.pointFroml&&(s.span(l,a,o.active,h),h=o.openEnd(a));if(o.to>i)return h+(o.point&&o.to>i?1:0);l=o.to,o.next()}}static of(e,t=!1){let i=new xt;for(let s of e instanceof os?[e]:t?rc(e):e)i.add(s.from,s.to,s.value);return i.finish()}}j.empty=new j([],[],null,-1);function rc(n){if(n.length>1)for(let e=n[0],t=1;t0)return n.slice().sort(ls);e=i}return n}j.empty.nextLayer=j.empty;class xt{constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}finishChunk(e){this.chunks.push(new Gs(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}add(e,t,i){this.addInner(e,t,i)||(this.nextLayer||(this.nextLayer=new xt)).add(e,t,i)}addInner(e,t,i){let s=e-this.lastTo||i.startSide-this.last.endSide;if(s<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return s<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(j.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=j.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Or(n,e,t){let i=new Map;for(let r of n)for(let o=0;o=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&s.push(new vl(o,t,i,r));return s.length==1?s[0]:new oi(s)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let i=this.heap.length>>1;i>=0;i--)En(this.heap,i);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let i=this.heap.length>>1;i>=0;i--)En(this.heap,i);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),En(this.heap,0)}}}function En(n,e){for(let t=n[e];;){let i=(e<<1)+1;if(i>=n.length)break;let s=n[i];if(i+1=0&&(s=n[i+1],i++),t.compare(s)<0)break;n[i]=t,n[e]=s,e=i}}class Jt{constructor(e,t,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=oi.from(e,t,i)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){vi(this.active,e),vi(this.activeTo,e),vi(this.activeRank,e),this.minActive=Br(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:s,rank:r}=this.cursor;for(;t-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>e){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),i&&vi(i,s)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let r=this.cursor.value;if(!r.point)this.addActive(i),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&i[s]=0&&!(this.activeRank[i]e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}}function Tr(n,e,t,i,s,r){n.goto(e),t.goto(i);let o=i+s,l=i,h=i-e;for(;;){let a=n.to+h-t.to||n.endSide-t.endSide,c=a<0?n.to+h:t.to,f=Math.min(c,o);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&hs(n.activeForPoint(n.to+h),t.activeForPoint(t.to))||r.comparePoint(l,f,n.point,t.point):f>l&&!hs(n.active,t.active)&&r.compareRange(l,f,n.active,t.active),c>o)break;l=c,a<=0&&n.next(),a>=0&&t.next()}}function hs(n,e){if(n.length!=e.length)return!1;for(let t=0;t=e;i--)n[i+1]=n[i];n[e]=t}function Br(n,e){let t=-1,i=1e9;for(let s=0;s=e)return s;if(s==n.length)break;r+=n.charCodeAt(s)==9?t-r%t:1,s=de(n,s)}return i===!0?-1:n.length}const cs="ͼ",Pr=typeof Symbol>"u"?"__"+cs:Symbol.for(cs),fs=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Rr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class ot{constructor(e,t){this.rules=[];let{finish:i}=t||{};function s(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function r(o,l,h,a){let c=[],f=/^@(\w+)\b/.exec(o[0]),u=f&&f[1]=="keyframes";if(f&&l==null)return h.push(o[0]+";");for(let d in l){let p=l[d];if(/&/.test(d))r(d.split(/,\s*/).map(g=>o.map(m=>g.replace(/&/,m))).reduce((g,m)=>g.concat(m)),p,h);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+d+") should be a primitive value.");r(s(d),p,c,u)}else p!=null&&c.push(d.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+p+";")}(c.length||u)&&h.push((i&&!f&&!a?o.map(i):o).join(", ")+" {"+c.join(" ")+"}")}for(let o in e)r(s(o),e[o],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=Rr[Pr]||1;return Rr[Pr]=e+1,cs+e.toString(36)}static mount(e,t){(e[fs]||new oc(e)).mount(Array.isArray(t)?t:[t])}}let Ai=null;class oc{constructor(e){if(!e.head&&e.adoptedStyleSheets&&typeof CSSStyleSheet<"u"){if(Ai)return e.adoptedStyleSheets=[Ai.sheet].concat(e.adoptedStyleSheets),e[fs]=Ai;this.sheet=new CSSStyleSheet,e.adoptedStyleSheets=[this.sheet].concat(e.adoptedStyleSheets),Ai=this}else{this.styleTag=(e.ownerDocument||e).createElement("style");let t=e.head||e;t.insertBefore(this.styleTag,t.firstChild)}this.modules=[],e[fs]=this}mount(e){let t=this.sheet,i=0,s=0;for(let r=0;r-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,o),t)for(let h=0;h",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Lr=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),lc=typeof navigator<"u"&&/Mac/.test(navigator.platform),hc=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),ac=lc||Lr&&+Lr[1]<57;for(var re=0;re<10;re++)lt[48+re]=lt[96+re]=String(re);for(var re=1;re<=24;re++)lt[re+111]="F"+re;for(var re=65;re<=90;re++)lt[re]=String.fromCharCode(re+32),li[re]=String.fromCharCode(re);for(var In in lt)li.hasOwnProperty(In)||(li[In]=lt[In]);function cc(n){var e=ac&&(n.ctrlKey||n.altKey||n.metaKey)||hc&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?li:lt)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function Qi(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function Ft(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function fc(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function ji(n,e){if(!e.anchorNode)return!1;try{return Ft(n,e.anchorNode)}catch{return!1}}function hi(n){return n.nodeType==3?Vt(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function Zi(n,e,t,i){return t?Er(n,e,t,i,-1)||Er(n,e,t,i,1):!1}function en(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function Er(n,e,t,i,s){for(;;){if(n==t&&e==i)return!0;if(e==(s<0?0:ai(n))){if(n.nodeName=="DIV")return!1;let r=n.parentNode;if(!r||r.nodeType!=1)return!1;e=en(n)+(s<0?0:1),n=r}else if(n.nodeType==1){if(n=n.childNodes[e+(s<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=s<0?ai(n):0}else return!1}}function ai(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}const Cl={left:0,right:0,top:0,bottom:0};function Js(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function uc(n){return{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function dc(n,e,t,i,s,r,o,l){let h=n.ownerDocument,a=h.defaultView||window;for(let c=n;c;)if(c.nodeType==1){let f,u=c==h.body;if(u)f=uc(a);else{if(c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let g=c.getBoundingClientRect();f={left:g.left,right:g.left+c.clientWidth,top:g.top,bottom:g.top+c.clientHeight}}let d=0,p=0;if(s=="nearest")e.top0&&e.bottom>f.bottom+p&&(p=e.bottom-f.bottom+p+o)):e.bottom>f.bottom&&(p=e.bottom-f.bottom+o,t<0&&e.top-p0&&e.right>f.right+d&&(d=e.right-f.right+d+r)):e.right>f.right&&(d=e.right-f.right+r,t<0&&e.leftt.clientHeight||t.scrollWidth>t.clientWidth)return t;t=t.assignedSlot||t.parentNode}else if(t.nodeType==11)t=t.host;else break;return null}class gc{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){this.set(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset)}set(e,t,i,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=s}}let Ot=null;function Al(n){if(n.setActive)return n.setActive();if(Ot)return n.focus(Ot);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(Ot==null?{get preventScroll(){return Ot={preventScroll:!0},!0}}:void 0),!Ot){Ot=!1;for(let t=0;tt)return f.domBoundsAround(e,t,a);if(u>=e&&s==-1&&(s=h,r=a),a>t&&f.dom.parentNode==this.dom){o=h,l=c;break}c=u,a=u+f.breakAfter}return{from:r,to:l<0?i+this.length:l,startDOM:(s?this.children[s-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.dirty|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.dirty|=2),t.dirty&1)return;t.dirty|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.dirty&&this.markParentsDirty(!0))}setDOM(e){this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,i=_s){this.markDirty();for(let s=e;sthis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function Ol(n,e,t,i,s,r,o,l,h){let{children:a}=n,c=a.length?a[e]:null,f=r.length?r[r.length-1]:null,u=f?f.breakAfter:o;if(!(e==i&&c&&!o&&!u&&r.length<2&&c.merge(t,s,r.length?f:null,t==0,l,h))){if(i0&&(!o&&r.length&&c.merge(t,c.length,r[0],!1,l,0)?c.breakAfter=r.shift().breakAfter:(t2);var A={mac:Wr||/Mac/.test(Ce.platform),windows:/Win/.test(Ce.platform),linux:/Linux|X11/.test(Ce.platform),ie:Sn,ie_version:Bl?us.documentMode||6:ps?+ps[1]:ds?+ds[1]:0,gecko:Fr,gecko_version:Fr?+(/Firefox\/(\d+)/.exec(Ce.userAgent)||[0,0])[1]:0,chrome:!!Nn,chrome_version:Nn?+Nn[1]:0,ios:Wr,android:/Android\b/.test(Ce.userAgent),webkit:Vr,safari:Pl,webkit_version:Vr?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:us.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const bc=256;class ht extends q{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,i){return i&&(!(i instanceof ht)||this.length-(t-e)+i.length>bc)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new ht(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new ae(this.dom,e)}domBoundsAround(e,t,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return gs(this.dom,e,t)}}class Ue extends q{constructor(e,t=[],i=0){super(),this.mark=e,this.children=t,this.length=i;for(let s of t)s.setParent(this)}setAttrs(e){if(Ml(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.dirty|=6)}sync(e,t){this.dom?this.dirty&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,i,s,r,o){return i&&(!(i instanceof Ue&&i.mark.eq(this.mark))||e&&r<=0||te&&t.push(i=e&&(s=r),i=h,r++}let o=this.length-e;return this.length=e,s>-1&&(this.children.length=s,this.markDirty()),new Ue(this.mark,t,o)}domAtPos(e){return El(this,e)}coordsAt(e,t){return Nl(this,e,t)}}function gs(n,e,t){let i=n.nodeValue.length;e>i&&(e=i);let s=e,r=e,o=0;e==0&&t<0||e==i&&t>=0?A.chrome||A.gecko||(e?(s--,o=1):r=0)?0:l.length-1];return A.safari&&!o&&h.width==0&&(h=Array.prototype.find.call(l,a=>a.width)||h),o?Js(h,o<0):h||null}class it extends q{constructor(e,t,i){super(),this.widget=e,this.length=t,this.side=i,this.prevWidget=null}static create(e,t,i){return new(e.customView||it)(e,t,i)}split(e){let t=it.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,t,i,s,r,o){return i&&(!(i instanceof it)||!this.widget.compare(i.widget)||e>0&&r<=0||t0?i.length-1:0;s=i[r],!(e>0?r==0:r==i.length-1||s.top0?-1:1);return this.length?s:Js(s,this.side>0)}get isEditable(){return!1}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Rl extends it{domAtPos(e){let{topView:t,text:i}=this.widget;return t?ms(e,0,t,i,(s,r)=>s.domAtPos(r),s=>new ae(i,Math.min(s,i.nodeValue.length))):new ae(i,Math.min(e,i.nodeValue.length))}sync(){this.setDOM(this.widget.toDOM())}localPosFromDOM(e,t){let{topView:i,text:s}=this.widget;return i?Ll(e,t,i,s):Math.min(t,this.length)}ignoreMutation(){return!1}get overrideDOMText(){return null}coordsAt(e,t){let{topView:i,text:s}=this.widget;return i?ms(e,t,i,s,(r,o,l)=>r.coordsAt(o,l),(r,o)=>gs(s,r,o)):gs(s,e,t)}destroy(){var e;super.destroy(),(e=this.widget.topView)===null||e===void 0||e.destroy()}get isEditable(){return!0}canReuseDOM(){return!0}}function ms(n,e,t,i,s,r){if(t instanceof Ue){for(let o=t.dom.firstChild;o;o=o.nextSibling){let l=q.get(o);if(!l)return r(n,e);let h=Ft(o,i),a=l.length+(h?i.nodeValue.length:0);if(n0?-1:1);return i&&i.topt.top?{left:t.left,right:t.right,top:i.top,bottom:i.bottom}:t}get overrideDOMText(){return I.empty}}ht.prototype.children=it.prototype.children=Wt.prototype.children=_s;function wc(n,e){let t=n.parent,i=t?t.children.indexOf(n):-1;for(;t&&i>=0;)if(e<0?i>0:ir&&e0;r--){let o=i[r-1];if(o.dom.parentNode==t)return o.domAtPos(o.length)}for(let r=s;r0&&e instanceof Ue&&s.length&&(i=s[s.length-1])instanceof Ue&&i.mark.eq(e.mark)?Il(i,e.children[0],t-1):(s.push(e),e.setParent(n)),n.length+=e.length}function Nl(n,e,t){let i=null,s=-1,r=null,o=-1;function l(a,c){for(let f=0,u=0;f=c&&(d.children.length?l(d,c-u):!r&&(p>c||u==p&&d.getSide()>0)?(r=d,o=c-u):(u0?3e8:-4e8:t>0?1e8:-1e8,new kt(e,t,t,i,e.widget||null,!1)}static replace(e){let t=!!e.block,i,s;if(e.isBlockGap)i=-5e8,s=4e8;else{let{start:r,end:o}=Fl(e,t);i=(r?t?-3e8:-1:5e8)-1,s=(o?t?2e8:1:-6e8)+1}return new kt(e,i,s,t,e.widget||null,!0)}static line(e){return new bi(e)}static set(e,t=!1){return j.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}T.none=j.empty;class vn extends T{constructor(e){let{start:t,end:i}=Fl(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){return this==e||e instanceof vn&&this.tagName==e.tagName&&this.class==e.class&&Xs(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}vn.prototype.point=!1;class bi extends T{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof bi&&this.spec.class==e.spec.class&&Xs(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}bi.prototype.mapMode=he.TrackBefore;bi.prototype.point=!0;class kt extends T{constructor(e,t,i,s,r,o){super(t,i,r,e),this.block=s,this.isReplace=o,this.mapMode=s?t<=0?he.TrackBefore:he.TrackAfter:he.TrackDel}get type(){return this.startSide=5}eq(e){return e instanceof kt&&kc(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}kt.prototype.point=!0;function Fl(n,e=!1){let{inclusiveStart:t,inclusiveEnd:i}=n;return t==null&&(t=n.inclusive),i==null&&(i=n.inclusive),{start:t??e,end:i??e}}function kc(n,e){return n==e||!!(n&&e&&n.compare(e))}function ws(n,e,t,i=0){let s=t.length-1;s>=0&&t[s]+i>=n?t[s]=Math.max(t[s],e):t.push(n,e)}class pe extends q{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,i,s,r,o){if(i){if(!(i instanceof pe))return!1;this.dom||i.transferDOM(this)}return s&&this.setDeco(i?i.attrs:null),Tl(this,e,t,i?i.children:[],r,o),!0}split(e){let t=new pe;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i,off:s}=this.childPos(e);s&&(t.append(this.children[i].split(s),0),this.children[i].merge(s,this.children[i].length,null,!1,0,0),i++);for(let r=i;r0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Xs(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Il(this,e,t)}addLineDeco(e){let t=e.spec.attributes,i=e.spec.class;t&&(this.attrs=ys(t,this.attrs||{})),i&&(this.attrs=ys({class:i},this.attrs||{}))}domAtPos(e){return El(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.dirty|=6)}sync(e,t){var i;this.dom?this.dirty&4&&(Ml(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(bs(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let s=this.dom.lastChild;for(;s&&q.get(s)instanceof Ue;)s=s.lastChild;if(!s||!this.length||s.nodeName!="BR"&&((i=q.get(s))===null||i===void 0?void 0:i.isEditable)==!1&&(!A.ios||!this.children.some(r=>r instanceof ht))){let r=document.createElement("BR");r.cmIgnore=!0,this.dom.appendChild(r)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0;for(let t of this.children){if(!(t instanceof ht)||/[^ -~]/.test(t.text))return null;let i=hi(t.dom);if(i.length!=1)return null;e+=i[0].width}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length}:null}coordsAt(e,t){return Nl(this,e,t)}become(e){return!1}get type(){return z.Text}static find(e,t){for(let i=0,s=0;i=t){if(r instanceof pe)return r;if(o>t)break}s=o+r.breakAfter}return null}}class bt extends q{constructor(e,t,i){super(),this.widget=e,this.length=t,this.type=i,this.breakAfter=0,this.prevWidget=null}merge(e,t,i,s,r,o){return i&&(!(i instanceof bt)||!this.widget.compare(i.widget)||e>0&&r<=0||t0;){if(this.textOff==this.text.length){let{value:r,lineBreak:o,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=r,this.textOff=0}let s=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-i)),this.getLine().append(Mi(new ht(this.text.slice(this.textOff,this.textOff+s)),t),i),this.atCursorPos=!0,this.textOff+=s,e-=s,i=0}}span(e,t,i,s){this.buildText(t-e,i,s),this.pos=t,this.openStart<0&&(this.openStart=s)}point(e,t,i,s,r,o){if(this.disallowBlockEffectsFor[o]&&i instanceof kt){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=t-e;if(i instanceof kt)if(i.block){let{type:h}=i;h==z.WidgetAfter&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new bt(i.widget||new Hr("div"),l,h))}else{let h=it.create(i.widget||new Hr("span"),l,l?0:i.startSide),a=this.atCursorPos&&!h.isEditable&&r<=s.length&&(e0),c=!h.isEditable&&(es.length||i.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!a&&(this.pendingBuffer=0),this.flushBuffer(s),a&&(f.append(Mi(new Wt(1),s),r),r=s.length+Math.max(0,r-s.length)),f.append(Mi(h,s),r),this.atCursorPos=c,this.pendingBuffer=c?es.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=s.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=r)}static build(e,t,i,s,r){let o=new Ys(e,t,i,r);return o.openEnd=j.spans(s,t,i,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function Mi(n,e){for(let t of e)n=new Ue(t,[n],n.length);return n}class Hr extends ct{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}}const Vl=M.define(),Wl=M.define(),Hl=M.define(),zl=M.define(),xs=M.define(),ql=M.define(),$l=M.define(),Kl=M.define({combine:n=>n.some(e=>e)}),jl=M.define({combine:n=>n.some(e=>e)});class tn{constructor(e,t="nearest",i="nearest",s=5,r=5){this.range=e,this.y=t,this.x=i,this.yMargin=s,this.xMargin=r}map(e){return e.empty?this:new tn(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const zr=E.define({map:(n,e)=>n.map(e)});function Le(n,e,t){let i=n.facet(zl);i.length?i[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const Cn=M.define({combine:n=>n.length?n[0]:!0});let Sc=0;const Qt=M.define();class me{constructor(e,t,i,s){this.id=e,this.create=t,this.domEventHandlers=i,this.extension=s(this)}static define(e,t){const{eventHandlers:i,provide:s,decorations:r}=t||{};return new me(Sc++,e,i,o=>{let l=[Qt.of(o)];return r&&l.push(ci.of(h=>{let a=h.plugin(o);return a?r(a):T.none})),s&&l.push(s(o)),l})}static fromClass(e,t){return me.define(i=>new e(i),t)}}class Fn{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(i){if(Le(t.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Le(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(i){Le(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Ul=M.define(),Qs=M.define(),ci=M.define(),Gl=M.define(),Jl=M.define(),Zt=M.define();class je{constructor(e,t,i,s){this.fromA=e,this.toA=t,this.fromB=i,this.toB=s}join(e){return new je(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,i=this;for(;t>0;t--){let s=e[t-1];if(!(s.fromA>i.toA)){if(s.toAc)break;r+=2}if(!h)return i;new je(h.fromA,h.toA,h.fromB,h.toB).addToSet(i),o=h.toA,l=h.toB}}}class nn{constructor(e,t,i){this.view=e,this.state=t,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=Q.empty(this.startState.doc.length);for(let o of i)this.changes=this.changes.compose(o.changes);let s=[];this.changes.iterChangedRanges((o,l,h,a)=>s.push(new je(o,l,h,a))),this.changedRanges=s;let r=e.hasFocus;r!=e.inputState.notifiedFocused&&(e.inputState.notifiedFocused=r,this.flags|=1)}static create(e,t,i){return new nn(e,t,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}var J=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(J||(J={}));const ks=J.LTR,vc=J.RTL;function _l(n){let e=[];for(let t=0;t=t){if(l.level==i)return o;(r<0||(s!=0?s<0?l.fromt:e[r].level>l.level))&&(r=o)}}if(r<0)throw new RangeError("Index out of range");return r}}const K=[];function Oc(n,e){let t=n.length,i=e==ks?1:2,s=e==ks?2:1;if(!n||i==1&&!Dc.test(n))return Xl(t);for(let o=0,l=i,h=i;o=0;u-=3)if(Ie[u+1]==-c){let d=Ie[u+2],p=d&2?i:d&4?d&1?s:i:0;p&&(K[o]=K[Ie[u]]=p),l=u;break}}else{if(Ie.length==189)break;Ie[l++]=o,Ie[l++]=a,Ie[l++]=h}else if((f=K[o])==2||f==1){let u=f==i;h=u?0:1;for(let d=l-3;d>=0;d-=3){let p=Ie[d+2];if(p&2)break;if(u)Ie[d+2]|=2;else{if(p&4)break;Ie[d+2]|=4}}}for(let o=0;ol;){let c=a,f=K[--a]!=2;for(;a>l&&f==(K[a-1]!=2);)a--;r.push(new It(a,c,f?2:1))}else r.push(new It(l,o,0))}else for(let o=0;o1)for(let h of this.points)h.node==e&&h.pos>this.text.length&&(h.pos-=o-1);i=r+o}}readNode(e){if(e.cmIgnore)return;let t=q.get(e),i=t&&t.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let s=i.iter();!s.next().done;)s.lineBreak?this.lineBreak():this.append(s.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+Math.min(t,i.offset))}}function qr(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}class $r{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class Kr extends q{constructor(e){super(),this.view=e,this.compositionDeco=T.none,this.decorations=[],this.dynamicDecorationMap=[],this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new pe],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new je(0,0,0,e.state.doc.length)],0)}get length(){return this.view.state.doc.length}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every(({fromA:o,toA:l})=>lthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=T.none:(e.transactions.length||this.dirty)&&(this.compositionDeco=Pc(this.view,e.changes)),(A.ie||A.chrome)&&!this.compositionDeco.size&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=this.decorations,s=this.updateDeco(),r=Ic(i,s,e.changes);return t=je.extendWithRanges(t,r),this.dirty==0&&t.length==0?!1:(this.updateInner(t,e.startState.doc.length),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let r=A.chrome||A.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,r),this.dirty=0,r&&(r.written||i.selectionRange.focusNode!=r.node)&&(this.forceSelection=!0),this.dom.style.height=""});let s=[];if(this.view.viewport.from||this.view.viewport.to=0?e[s]:null;if(!r)break;let{fromA:o,toA:l,fromB:h,toB:a}=r,{content:c,breakAtStart:f,openStart:u,openEnd:d}=Ys.build(this.view.state.doc,h,a,this.decorations,this.dynamicDecorationMap),{i:p,off:g}=i.findPos(l,1),{i:m,off:y}=i.findPos(o,-1);Ol(this,m,y,p,g,c,f,u,d)}}updateSelection(e=!1,t=!1){if((e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange(),!(t||this.mayControlSelection()))return;let i=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,r=this.domAtPos(s.anchor),o=s.empty?r:this.domAtPos(s.head);if(A.gecko&&s.empty&&Bc(r)){let h=document.createTextNode("");this.view.observer.ignore(()=>r.node.insertBefore(h,r.node.childNodes[r.offset]||null)),r=o=new ae(h,0),i=!0}let l=this.view.observer.selectionRange;(i||!l.focusNode||!Zi(r.node,r.offset,l.anchorNode,l.anchorOffset)||!Zi(o.node,o.offset,l.focusNode,l.focusOffset))&&(this.view.observer.ignore(()=>{A.android&&A.chrome&&this.dom.contains(l.focusNode)&&Nc(l.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let h=Qi(this.view.root);if(h)if(s.empty){if(A.gecko){let a=Lc(r.node,r.offset);if(a&&a!=3){let c=eh(r.node,r.offset,a==1?1:-1);c&&(r=new ae(c,a==1?0:c.nodeValue.length))}}h.collapse(r.node,r.offset),s.bidiLevel!=null&&l.cursorBidiLevel!=null&&(l.cursorBidiLevel=s.bidiLevel)}else if(h.extend){h.collapse(r.node,r.offset);try{h.extend(o.node,o.offset)}catch{}}else{let a=document.createRange();s.anchor>s.head&&([r,o]=[o,r]),a.setEnd(o.node,o.offset),a.setStart(r.node,r.offset),h.removeAllRanges(),h.addRange(a)}}),this.view.observer.setSelectionRange(r,o)),this.impreciseAnchor=r.precise?null:new ae(l.anchorNode,l.anchorOffset),this.impreciseHead=o.precise?null:new ae(l.focusNode,l.focusOffset)}enforceCursorAssoc(){if(this.compositionDeco.size)return;let{view:e}=this,t=e.state.selection.main,i=Qi(e.root),{anchorNode:s,anchorOffset:r}=e.observer.selectionRange;if(!i||!t.empty||!t.assoc||!i.modify)return;let o=pe.find(this,t.head);if(!o)return;let l=o.posAtStart;if(t.head==l||t.head==l+o.length)return;let h=this.coordsAt(t.head,-1),a=this.coordsAt(t.head,1);if(!h||!a||h.bottom>a.top)return;let c=this.domAtPos(t.head+t.assoc);i.collapse(c.node,c.offset),i.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&i.collapse(s,r)}mayControlSelection(){let e=this.view.root.activeElement;return e==this.dom||ji(this.dom,this.view.observer.selectionRange)&&!(e&&this.dom.contains(e))}nearest(e){for(let t=e;t;){let i=q.get(t);if(i&&i.rootView==this)return i;t=t.parentNode}return null}posFromDOM(e,t){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,t)+i.posAtStart}domAtPos(e){let{i:t,off:i}=this.childCursor().findPos(e,-1);for(;to||e==o&&r.type!=z.WidgetBefore&&r.type!=z.WidgetAfter&&(!s||t==2||this.children[s-1].breakAfter||this.children[s-1].type==z.WidgetBefore&&t>-2))return r.coordsAt(e-o,t);i=o}}measureVisibleLineHeights(e){let t=[],{from:i,to:s}=e,r=this.view.contentDOM.clientWidth,o=r>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,h=this.view.textDirection==J.LTR;for(let a=0,c=0;cs)break;if(a>=i){let d=f.dom.getBoundingClientRect();if(t.push(d.height),o){let p=f.dom.lastChild,g=p?hi(p):[];if(g.length){let m=g[g.length-1],y=h?m.right-d.left:d.right-m.left;y>l&&(l=y,this.minWidth=r,this.minWidthFrom=a,this.minWidthTo=u)}}}a=u+f.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?J.RTL:J.LTR}measureTextSize(){for(let s of this.children)if(s instanceof pe){let r=s.measureTextSize();if(r)return r}let e=document.createElement("div"),t,i;return e.className="cm-line",e.style.width="99999px",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let s=hi(e.firstChild)[0];t=e.getBoundingClientRect().height,i=s?s.width/27:7,e.remove()}),{lineHeight:t,charWidth:i}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new Dl(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,s=0;;s++){let r=s==t.viewports.length?null:t.viewports[s],o=r?r.from-1:this.length;if(o>i){let l=t.lineBlockAt(o).bottom-t.lineBlockAt(i).top;e.push(T.replace({widget:new jr(l),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!r)break;i=r.to+1}return T.set(e)}updateDeco(){let e=this.view.state.facet(ci).map((t,i)=>(this.dynamicDecorationMap[i]=typeof t=="function")?t(this.view):t);for(let t=e.length;tt.anchor?-1:1),s;if(!i)return;!t.empty&&(s=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(i={left:Math.min(i.left,s.left),top:Math.min(i.top,s.top),right:Math.max(i.right,s.right),bottom:Math.max(i.bottom,s.bottom)});let r=0,o=0,l=0,h=0;for(let c of this.view.state.facet(Jl).map(f=>f(this.view)))if(c){let{left:f,right:u,top:d,bottom:p}=c;f!=null&&(r=Math.max(r,f)),u!=null&&(o=Math.max(o,u)),d!=null&&(l=Math.max(l,d)),p!=null&&(h=Math.max(h,p))}let a={left:i.left-r,top:i.top-l,right:i.right+o,bottom:i.bottom+h};dc(this.view.scrollDOM,a,t.head0&&t<=0)n=n.childNodes[e-1],e=ai(n);else if(n.nodeType==1&&e=0)n=n.childNodes[e],e=0;else return null}}function Lc(n,e){return n.nodeType!=1?0:(e&&n.childNodes[e-1].contentEditable=="false"?1:0)|(e0;){let a=de(s.text,o,!1);if(i(s.text.slice(a,o))!=h)break;o=a}for(;ln?e.left-n:Math.max(0,n-e.right)}function Wc(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function Vn(n,e){return n.tope.top+1}function Ur(n,e){return en.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function vs(n,e,t){let i,s,r,o,l=!1,h,a,c,f;for(let p=n.firstChild;p;p=p.nextSibling){let g=hi(p);for(let m=0;mD||o==D&&r>v){i=p,s=y,r=v,o=D;let x=D?t0?m0)}v==0?t>y.bottom&&(!c||c.bottomy.top)&&(a=p,f=y):c&&Vn(c,y)?c=Gr(c,y.bottom):f&&Vn(f,y)&&(f=Ur(f,y.top))}}if(c&&c.bottom>=t?(i=h,s=c):f&&f.top<=t&&(i=a,s=f),!i)return{node:n,offset:0};let u=Math.max(s.left,Math.min(s.right,e));if(i.nodeType==3)return Jr(i,u,t);if(l&&i.contentEditable!="false")return vs(i,u,t);let d=Array.prototype.indexOf.call(n.childNodes,i)+(e>=(s.left+s.right)/2?1:0);return{node:n,offset:d}}function Jr(n,e,t){let i=n.nodeValue.length,s=-1,r=1e9,o=0;for(let l=0;lt?c.top-t:t-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&f=(c.left+c.right)/2,d=u;if((A.chrome||A.gecko)&&Vt(n,l).getBoundingClientRect().left==c.right&&(d=!u),f<=0)return{node:n,offset:l+(d?1:0)};s=l+(d?1:0),r=f}}}return{node:n,offset:s>-1?s:o>0?n.nodeValue.length:0}}function th(n,{x:e,y:t},i,s=-1){var r;let o=n.contentDOM.getBoundingClientRect(),l=o.top+n.viewState.paddingTop,h,{docHeight:a}=n.viewState,c=t-l;if(c<0)return 0;if(c>a)return n.state.doc.length;for(let y=n.defaultLineHeight/2,v=!1;h=n.elementAtHeight(c),h.type!=z.Text;)for(;c=s>0?h.bottom+y:h.top-y,!(c>=0&&c<=a);){if(v)return i?null:0;v=!0,s=-s}t=l+c;let f=h.from;if(fn.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:i?null:_r(n,o,h,e,t);let u=n.dom.ownerDocument,d=n.root.elementFromPoint?n.root:u,p=d.elementFromPoint(e,t);p&&!n.contentDOM.contains(p)&&(p=null),p||(e=Math.max(o.left+1,Math.min(o.right-1,e)),p=d.elementFromPoint(e,t),p&&!n.contentDOM.contains(p)&&(p=null));let g,m=-1;if(p&&((r=n.docView.nearest(p))===null||r===void 0?void 0:r.isEditable)!=!1){if(u.caretPositionFromPoint){let y=u.caretPositionFromPoint(e,t);y&&({offsetNode:g,offset:m}=y)}else if(u.caretRangeFromPoint){let y=u.caretRangeFromPoint(e,t);y&&({startContainer:g,startOffset:m}=y,(!n.contentDOM.contains(g)||A.safari&&Hc(g,m,e)||A.chrome&&zc(g,m,e))&&(g=void 0))}}if(!g||!n.docView.dom.contains(g)){let y=pe.find(n.docView,f);if(!y)return c>h.top+h.height/2?h.to:h.from;({node:g,offset:m}=vs(y.dom,e,t))}return n.docView.posFromDOM(g,m)}function _r(n,e,t,i,s){let r=Math.round((i-e.left)*n.defaultCharacterWidth);if(n.lineWrapping&&t.height>n.defaultLineHeight*1.5){let l=Math.floor((s-t.top)/n.defaultLineHeight);r+=l*n.viewState.heightOracle.lineLength}let o=n.state.sliceDoc(t.from,t.to);return t.from+as(o,r,n.state.tabSize)}function Hc(n,e,t){let i;if(n.nodeType!=3||e!=(i=n.nodeValue.length))return!1;for(let s=n.nextSibling;s;s=s.nextSibling)if(s.nodeType!=1||s.nodeName!="BR")return!1;return Vt(n,i-1,i).getBoundingClientRect().left>t}function zc(n,e,t){if(e!=0)return!1;for(let s=n;;){let r=s.parentNode;if(!r||r.nodeType!=1||r.firstChild!=s)return!1;if(r.classList.contains("cm-line"))break;s=r}let i=n.nodeType==1?n.getBoundingClientRect():Vt(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-i.left>5}function qc(n,e,t,i){let s=n.state.doc.lineAt(e.head),r=!i||!n.lineWrapping?null:n.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head);if(r){let h=n.dom.getBoundingClientRect(),a=n.textDirectionAt(s.from),c=n.posAtCoords({x:t==(a==J.LTR)?h.right-1:h.left+1,y:(r.top+r.bottom)/2});if(c!=null)return b.cursor(c,t?-1:1)}let o=pe.find(n.docView,e.head),l=o?t?o.posAtEnd:o.posAtStart:t?s.to:s.from;return b.cursor(l,t?-1:1)}function Xr(n,e,t,i){let s=n.state.doc.lineAt(e.head),r=n.bidiSpans(s),o=n.textDirectionAt(s.from);for(let l=e,h=null;;){let a=Tc(s,r,o,l,t),c=Yl;if(!a){if(s.number==(t?n.state.doc.lines:1))return l;c=` +`,s=n.state.doc.line(s.number+(t?1:-1)),r=n.bidiSpans(s),a=b.cursor(t?s.from:s.to)}if(h){if(!h(c))return l}else{if(!i)return a;h=i(c)}l=a}}function $c(n,e,t){let i=n.state.charCategorizer(e),s=i(t);return r=>{let o=i(r);return s==$.Space&&(s=o),s==o}}function Kc(n,e,t,i){let s=e.head,r=t?1:-1;if(s==(t?n.state.doc.length:0))return b.cursor(s,e.assoc);let o=e.goalColumn,l,h=n.contentDOM.getBoundingClientRect(),a=n.coordsAtPos(s),c=n.documentTop;if(a)o==null&&(o=a.left-h.left),l=r<0?a.top:a.bottom;else{let d=n.viewState.lineBlockAt(s);o==null&&(o=Math.min(h.right-h.left,n.defaultCharacterWidth*(s-d.from))),l=(r<0?d.top:d.bottom)+c}let f=h.left+o,u=i??n.defaultLineHeight>>1;for(let d=0;;d+=10){let p=l+(u+d)*r,g=th(n,{x:f,y:p},!1,r);if(ph.bottom||(r<0?gs))return b.cursor(g,e.assoc,void 0,o)}}function Wn(n,e,t){let i=n.state.facet(Gl).map(s=>s(n));for(;;){let s=!1;for(let r of i)r.between(t.from-1,t.from+1,(o,l,h)=>{t.from>o&&t.fromt.from?b.cursor(o,1):b.cursor(l,-1),s=!0)});if(!s)return t}}class jc{constructor(e){this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.mouseSelection=null;let t=(i,s)=>{this.ignoreDuringComposition(s)||s.type=="keydown"&&this.keydown(e,s)||(this.mustFlushObserver(s)&&e.observer.forceFlush(),this.runCustomHandlers(s.type,e,s)?s.preventDefault():i(e,s))};for(let i in ee){let s=ee[i];e.contentDOM.addEventListener(i,r=>{Yr(e,r)&&t(s,r)},Cs[i]),this.registeredEvents.push(i)}e.scrollDOM.addEventListener("mousedown",i=>{i.target==e.scrollDOM&&i.clientY>e.contentDOM.getBoundingClientRect().bottom&&t(ee.mousedown,i)}),A.chrome&&A.chrome_version==102&&e.scrollDOM.addEventListener("wheel",()=>{this.chromeScrollHack<0?e.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout(()=>{this.chromeScrollHack=-1,e.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=e.hasFocus,A.safari&&e.contentDOM.addEventListener("input",()=>null)}setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}ensureHandlers(e,t){var i;let s;this.customHandlers=[];for(let r of t)if(s=(i=r.update(e).spec)===null||i===void 0?void 0:i.domEventHandlers){this.customHandlers.push({plugin:r.value,handlers:s});for(let o in s)this.registeredEvents.indexOf(o)<0&&o!="scroll"&&(this.registeredEvents.push(o),e.contentDOM.addEventListener(o,l=>{Yr(e,l)&&this.runCustomHandlers(o,e,l)&&l.preventDefault()}))}}runCustomHandlers(e,t,i){for(let s of this.customHandlers){let r=s.handlers[e];if(r)try{if(r.call(s.plugin,i,t)||i.defaultPrevented)return!0}catch(o){Le(t.state,o)}}return!1}runScrollHandlers(e,t){this.lastScrollTop=e.scrollDOM.scrollTop,this.lastScrollLeft=e.scrollDOM.scrollLeft;for(let i of this.customHandlers){let s=i.handlers.scroll;if(s)try{s.call(i.plugin,t,e)}catch(r){Le(e.state,r)}}}keydown(e,t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),t.keyCode==9&&Date.now()s.keyCode==t.keyCode))&&!t.ctrlKey||Uc.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)?(this.pendingIOSKey=i||t,setTimeout(()=>this.flushIOSKey(e),250),!0):!1}flushIOSKey(e){let t=this.pendingIOSKey;return t?(this.pendingIOSKey=void 0,Et(e.contentDOM,t.key,t.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:A.safari&&!A.ios&&Date.now()-this.compositionEndedAt<100?(this.compositionEndedAt=0,!0):!1:!1}mustFlushObserver(e){return e.type=="keydown"&&e.keyCode!=229}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const ih=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Uc="dthko",nh=[16,17,18,20,91,92,224,225];function Di(n){return n*.7+8}class Gc{constructor(e,t,i,s){this.view=e,this.style=i,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=pc(e.contentDOM);let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(N.allowMultipleSelections)&&Jc(e,t),this.dragMove=_c(e,t),this.dragging=Xc(e,t)&&lh(t)==1?null:!1}start(e){this.dragging===!1&&(e.preventDefault(),this.select(e))}move(e){var t;if(e.buttons==0)return this.destroy();if(this.dragging!==!1)return;this.select(this.lastEvent=e);let i=0,s=0,r=((t=this.scrollParent)===null||t===void 0?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight};e.clientX<=r.left?i=-Di(r.left-e.clientX):e.clientX>=r.right&&(i=Di(e.clientX-r.right)),e.clientY<=r.top?s=-Di(r.top-e.clientY):e.clientY>=r.bottom&&(s=Di(e.clientY-r.bottom)),this.setScrollSpeed(i,s)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),this.dragging===!1&&this.select(this.lastEvent)}select(e){let t=this.style.get(e,this.extend,this.multiple);(this.mustSelect||!t.eq(this.view.state.selection)||t.main.assoc!=this.view.state.selection.main.assoc)&&this.view.dispatch({selection:t,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.docChanged&&this.dragging&&(this.dragging=this.dragging.map(e.changes)),this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function Jc(n,e){let t=n.state.facet(Vl);return t.length?t[0](e):A.mac?e.metaKey:e.ctrlKey}function _c(n,e){let t=n.state.facet(Wl);return t.length?t[0](e):A.mac?!e.altKey:!e.ctrlKey}function Xc(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let i=Qi(n.root);if(!i||i.rangeCount==0)return!0;let s=i.getRangeAt(0).getClientRects();for(let r=0;r=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function Yr(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,i;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(i=q.get(t))&&i.ignoreEvent(e))return!1;return!0}const ee=Object.create(null),Cs=Object.create(null),sh=A.ie&&A.ie_version<15||A.ios&&A.webkit_version<604;function Yc(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),rh(n,t.value)},50)}function rh(n,e){let{state:t}=n,i,s=1,r=t.toText(e),o=r.lines==t.selection.ranges.length;if(As!=null&&t.selection.ranges.every(h=>h.empty)&&As==r.toString()){let h=-1;i=t.changeByRange(a=>{let c=t.doc.lineAt(a.from);if(c.from==h)return{range:a};h=c.from;let f=t.toText((o?r.line(s++).text:e)+t.lineBreak);return{changes:{from:c.from,insert:f},range:b.cursor(a.from+f.length)}})}else o?i=t.changeByRange(h=>{let a=r.line(s++);return{changes:{from:h.from,to:h.to,insert:a.text},range:b.cursor(h.from+a.length)}}):i=t.replaceSelection(r);n.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}ee.keydown=(n,e)=>{n.inputState.setSelectionOrigin("select"),e.keyCode==27?n.inputState.lastEscPress=Date.now():nh.indexOf(e.keyCode)<0&&(n.inputState.lastEscPress=0)};ee.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")};ee.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};Cs.touchstart=Cs.touchmove={passive:!0};ee.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return;let t=null;for(let i of n.state.facet(Hl))if(t=i(n,e),t)break;if(!t&&e.button==0&&(t=ef(n,e)),t){let i=n.root.activeElement!=n.contentDOM;n.inputState.startMouseSelection(new Gc(n,e,t,i)),i&&n.observer.ignore(()=>Al(n.contentDOM)),n.inputState.mouseSelection&&n.inputState.mouseSelection.start(e)}};function Qr(n,e,t,i){if(i==1)return b.cursor(e,t);if(i==2)return Fc(n.state,e,t);{let s=pe.find(n.docView,e),r=n.state.doc.lineAt(s?s.posAtEnd:e),o=s?s.posAtStart:r.from,l=s?s.posAtEnd:r.to;return ln>=e.top&&n<=e.bottom,Zr=(n,e,t)=>oh(e,t)&&n>=t.left&&n<=t.right;function Qc(n,e,t,i){let s=pe.find(n.docView,e);if(!s)return 1;let r=e-s.posAtStart;if(r==0)return 1;if(r==s.length)return-1;let o=s.coordsAt(r,-1);if(o&&Zr(t,i,o))return-1;let l=s.coordsAt(r,1);return l&&Zr(t,i,l)?1:o&&oh(i,o)?-1:1}function eo(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:Qc(n,t,e.clientX,e.clientY)}}const Zc=A.ie&&A.ie_version<=11;let to=null,io=0,no=0;function lh(n){if(!Zc)return n.detail;let e=to,t=no;return to=n,no=Date.now(),io=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(io+1)%3:1}function ef(n,e){let t=eo(n,e),i=lh(e),s=n.state.selection;return{update(r){r.docChanged&&(t.pos=r.changes.mapPos(t.pos),s=s.map(r.changes))},get(r,o,l){let h=eo(n,r),a=Qr(n,h.pos,h.bias,i);if(t.pos!=h.pos&&!o){let c=Qr(n,t.pos,t.bias,i),f=Math.min(c.from,a.from),u=Math.max(c.to,a.to);a=f1&&s.ranges.some(c=>c.eq(a))?tf(s,a):l?s.addRange(a):b.create([a])}}}function tf(n,e){for(let t=0;;t++)if(n.ranges[t].eq(e))return b.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}ee.dragstart=(n,e)=>{let{selection:{main:t}}=n.state,{mouseSelection:i}=n.inputState;i&&(i.dragging=t),e.dataTransfer&&(e.dataTransfer.setData("Text",n.state.sliceDoc(t.from,t.to)),e.dataTransfer.effectAllowed="copyMove")};function so(n,e,t,i){if(!t)return;let s=n.posAtCoords({x:e.clientX,y:e.clientY},!1);e.preventDefault();let{mouseSelection:r}=n.inputState,o=i&&r&&r.dragging&&r.dragMove?{from:r.dragging.from,to:r.dragging.to}:null,l={from:s,insert:t},h=n.state.changes(o?[o,l]:l);n.focus(),n.dispatch({changes:h,selection:{anchor:h.mapPos(s,-1),head:h.mapPos(s,1)},userEvent:o?"move.drop":"input.drop"})}ee.drop=(n,e)=>{if(!e.dataTransfer)return;if(n.state.readOnly)return e.preventDefault();let t=e.dataTransfer.files;if(t&&t.length){e.preventDefault();let i=Array(t.length),s=0,r=()=>{++s==t.length&&so(n,e,i.filter(o=>o!=null).join(n.state.lineBreak),!1)};for(let o=0;o{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(i[o]=l.result),r()},l.readAsText(t[o])}}else so(n,e,e.dataTransfer.getData("Text"),!0)};ee.paste=(n,e)=>{if(n.state.readOnly)return e.preventDefault();n.observer.flush();let t=sh?null:e.clipboardData;t?(rh(n,t.getData("text/plain")),e.preventDefault()):Yc(n)};function nf(n,e){let t=n.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),n.focus()},50)}function sf(n){let e=[],t=[],i=!1;for(let s of n.selection.ranges)s.empty||(e.push(n.sliceDoc(s.from,s.to)),t.push(s));if(!e.length){let s=-1;for(let{from:r}of n.selection.ranges){let o=n.doc.lineAt(r);o.number>s&&(e.push(o.text),t.push({from:o.from,to:Math.min(n.doc.length,o.to+1)})),s=o.number}i=!0}return{text:e.join(n.lineBreak),ranges:t,linewise:i}}let As=null;ee.copy=ee.cut=(n,e)=>{let{text:t,ranges:i,linewise:s}=sf(n.state);if(!t&&!s)return;As=s?t:null;let r=sh?null:e.clipboardData;r?(e.preventDefault(),r.clearData(),r.setData("text/plain",t)):nf(n,t),e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"})};function hh(n){setTimeout(()=>{if(n.hasFocus!=n.inputState.notifiedFocused){let e=[],t=!n.inputState.notifiedFocused;for(let i of n.state.facet($l)){let s=i(n.state,t);s&&e.push(s)}e.length?n.dispatch({effects:e}):n.update([])}},10)}ee.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),hh(n)};ee.blur=n=>{n.observer.clearSelectionRange(),hh(n)};ee.compositionstart=ee.compositionupdate=n=>{n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0)};ee.compositionend=n=>{n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionFirstChange=null,A.chrome&&A.android&&n.observer.flushSoon(),setTimeout(()=>{n.inputState.composing<0&&n.docView.compositionDeco.size&&n.update([])},50)};ee.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};ee.beforeinput=(n,e)=>{var t;let i;if(A.chrome&&A.android&&(i=ih.find(s=>s.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let s=((t=window.visualViewport)===null||t===void 0?void 0:t.height)||0;setTimeout(()=>{var r;(((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0)>s+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}};const ro=["pre-wrap","normal","pre-line","break-spaces"];class rf{constructor(e){this.lineWrapping=e,this.doc=I.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return ro.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i-1,l=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=i,this.lineLength=s,l){this.heightSamples={};for(let h=0;h0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>Ui&&(e.heightChanged=!0),this.height=t)}replace(e,t,i){return ge.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,s){let r=this,o=i.doc;for(let l=s.length-1;l>=0;l--){let{fromA:h,toA:a,fromB:c,toB:f}=s[l],u=r.lineAt(h,H.ByPosNoHeight,i.setDoc(t),0,0),d=u.to>=a?u:r.lineAt(a,H.ByPosNoHeight,i,0,0);for(f+=d.to-a,a=d.to;l>0&&u.from<=s[l-1].toA;)h=s[l-1].fromA,c=s[l-1].fromB,l--,hr*2){let l=e[t-1];l.break?e.splice(--t,1,l.left,null,l.right):e.splice(--t,1,l.left,l.right),i+=1+l.break,s-=l.size}else if(r>s*2){let l=e[i];l.break?e.splice(i,1,l.left,null,l.right):e.splice(i,1,l.left,l.right),i+=2+l.break,r-=l.size}else break;else if(s=r&&o(this.blockAt(0,i,s,r))}updateHeight(e,t=0,i=!1,s){return s&&s.from<=t&&s.more&&this.setHeight(e,s.heights[s.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class ve extends ah{constructor(e,t){super(e,t,z.Text),this.collapsed=0,this.widgetHeight=0}replace(e,t,i){let s=i[0];return i.length==1&&(s instanceof ve||s instanceof ne&&s.flags&4)&&Math.abs(this.length-s.length)<10?(s instanceof ne?s=new ve(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):ge.of(i)}updateHeight(e,t=0,i=!1,s){return s&&s.from<=t&&s.more?this.setHeight(e,s.heights[s.index++]):(i||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class ne extends ge{constructor(e){super(e,0)}heightMetrics(e,t){let i=e.doc.lineAt(t).number,s=e.doc.lineAt(t+this.length).number,r=s-i+1,o,l=0;if(e.lineWrapping){let h=Math.min(this.height,e.lineHeight*r);o=h/r,l=(this.height-h)/(this.length-r-1)}else o=this.height/r;return{firstLine:i,lastLine:s,perLine:o,perChar:l}}blockAt(e,t,i,s){let{firstLine:r,lastLine:o,perLine:l,perChar:h}=this.heightMetrics(t,s);if(t.lineWrapping){let a=s+Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length),c=t.doc.lineAt(a),f=l+c.length*h,u=Math.max(i,e-f/2);return new _e(c.from,c.length,u,f,z.Text)}else{let a=Math.max(0,Math.min(o-r,Math.floor((e-i)/l))),{from:c,length:f}=t.doc.line(r+a);return new _e(c,f,i+l*a,l,z.Text)}}lineAt(e,t,i,s,r){if(t==H.ByHeight)return this.blockAt(e,i,s,r);if(t==H.ByPosNoHeight){let{from:d,to:p}=i.doc.lineAt(e);return new _e(d,p-d,0,0,z.Text)}let{firstLine:o,perLine:l,perChar:h}=this.heightMetrics(i,r),a=i.doc.lineAt(e),c=l+a.length*h,f=a.number-o,u=s+l*f+h*(a.from-r-f);return new _e(a.from,a.length,Math.max(s,Math.min(u,s+this.height-c)),c,z.Text)}forEachLine(e,t,i,s,r,o){e=Math.max(e,r),t=Math.min(t,r+this.length);let{firstLine:l,perLine:h,perChar:a}=this.heightMetrics(i,r);for(let c=e,f=s;c<=t;){let u=i.doc.lineAt(c);if(c==e){let p=u.number-l;f+=h*p+a*(e-r-p)}let d=h+a*u.length;o(new _e(u.from,u.length,f,d,z.Text)),f+=d,c=u.to+1}}replace(e,t,i){let s=this.length-t;if(s>0){let r=i[i.length-1];r instanceof ne?i[i.length-1]=new ne(r.length+s):i.push(null,new ne(s-1))}if(e>0){let r=i[0];r instanceof ne?i[0]=new ne(e+r.length):i.unshift(new ne(e-1),null)}return ge.of(i)}decomposeLeft(e,t){t.push(new ne(e-1),null)}decomposeRight(e,t){t.push(null,new ne(this.length-e-1))}updateHeight(e,t=0,i=!1,s){let r=t+this.length;if(s&&s.from<=t+this.length&&s.more){let o=[],l=Math.max(t,s.from),h=-1;for(s.from>t&&o.push(new ne(s.from-t-1).updateHeight(e,t));l<=r&&s.more;){let c=e.doc.lineAt(l).length;o.length&&o.push(null);let f=s.heights[s.index++];h==-1?h=f:Math.abs(f-h)>=Ui&&(h=-2);let u=new ve(c,f);u.outdated=!1,o.push(u),l+=c+1}l<=r&&o.push(null,new ne(r-l).updateHeight(e,l));let a=ge.of(o);return(h<0||Math.abs(a.height-this.height)>=Ui||Math.abs(h-this.heightMetrics(e,t).perLine)>=Ui)&&(e.heightChanged=!0),a}else(i||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class lf extends ge{constructor(e,t,i){super(e.length+t+i.length,e.height+i.height,t|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,t,i,s){let r=i+this.left.height;return el))return a;let c=t==H.ByPosNoHeight?H.ByPosNoHeight:H.ByPos;return h?a.join(this.right.lineAt(l,c,i,o,l)):this.left.lineAt(l,c,i,s,r).join(a)}forEachLine(e,t,i,s,r,o){let l=s+this.left.height,h=r+this.left.length+this.break;if(this.break)e=h&&this.right.forEachLine(e,t,i,l,h,o);else{let a=this.lineAt(h,H.ByPos,i,s,r);e=e&&a.from<=t&&o(a),t>a.to&&this.right.forEachLine(a.to+1,t,i,l,h,o)}}replace(e,t,i){let s=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-s,t-s,i));let r=[];e>0&&this.decomposeLeft(e,r);let o=r.length;for(let l of i)r.push(l);if(e>0&&oo(r,o-1),t=i&&t.push(null)),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,s=i+this.break;if(e>=s)return this.right.decomposeRight(e-s,t);e2*t.size||t.size>2*e.size?ge.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,i=!1,s){let{left:r,right:o}=this,l=t+r.length+this.break,h=null;return s&&s.from<=t+r.length&&s.more?h=r=r.updateHeight(e,t,i,s):r.updateHeight(e,t,i),s&&s.from<=l+o.length&&s.more?h=o=o.updateHeight(e,l,i,s):o.updateHeight(e,l,i),h?this.balanced(r,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function oo(n,e){let t,i;n[e]==null&&(t=n[e-1])instanceof ne&&(i=n[e+1])instanceof ne&&n.splice(e-1,3,new ne(t.length+1+i.length))}const hf=5;class Zs{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let i=Math.min(t,this.lineEnd),s=this.nodes[this.nodes.length-1];s instanceof ve?s.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new ve(i-this.pos,-1)),this.writtenTo=i,t>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e=hf)&&this.addLineDeco(s,r)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new ve(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let i=new ne(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof ve)return e;let t=new ve(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine(),e.type==z.WidgetAfter&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,e.type!=z.WidgetBefore&&(this.covering=e)}addLineDeco(e,t){let i=this.ensureLine();i.length+=t,i.collapsed+=t,i.widgetHeight=Math.max(i.widgetHeight,e),this.writtenTo=this.pos=this.pos+t}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof ve)&&!this.isCovered?this.nodes.push(new ve(0,-1)):(this.writtenToc.clientHeight||c.scrollWidth>c.clientWidth)&&f.overflow!="visible"){let u=c.getBoundingClientRect();r=Math.max(r,u.left),o=Math.min(o,u.right),l=Math.max(l,u.top),h=a==n.parentNode?u.bottom:Math.min(h,u.bottom)}a=f.position=="absolute"||f.position=="fixed"?c.offsetParent:c.parentNode}else if(a.nodeType==11)a=a.host;else break;return{left:r-t.left,right:Math.max(r,o)-t.left,top:l-(t.top+e),bottom:Math.max(l,h)-(t.top+e)}}function uf(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Hn{constructor(e,t,i){this.from=e,this.to=t,this.size=i}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;itypeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new rf(t),this.stateDeco=e.facet(ci).filter(i=>typeof i!="function"),this.heightMap=ge.empty().applyChanges(this.stateDeco,I.empty,this.heightOracle.setDoc(e.doc),[new je(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=T.set(this.lineGaps.map(i=>i.draw(!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let s=i?t.head:t.anchor;if(!e.some(({from:r,to:o})=>s>=r&&s<=o)){let{from:r,to:o}=this.lineBlockAt(s);e.push(new Oi(r,o))}}this.viewports=e.sort((i,s)=>i.from-s.from),this.scaler=this.heightMap.height<=7e6?ho:new mf(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:ei(e,this.scaler))})}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(ci).filter(a=>typeof a!="function");let s=e.changedRanges,r=je.extendWithRanges(s,af(i,this.stateDeco,e?e.changes:Q.empty(this.state.doc.length))),o=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),r),this.heightMap.height!=o&&(e.flags|=2);let l=r.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,t));let h=!e.changes.empty||e.flags&2||l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,this.updateForViewport(),h&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(jl)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,i=window.getComputedStyle(t),s=this.heightOracle,r=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?J.RTL:J.LTR;let o=this.heightOracle.mustRefreshForWrapping(r),l=t.getBoundingClientRect(),h=o||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let a=0,c=0,f=parseInt(i.paddingTop)||0,u=parseInt(i.paddingBottom)||0;(this.paddingTop!=f||this.paddingBottom!=u)&&(this.paddingTop=f,this.paddingBottom=u,a|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(s.lineWrapping&&(h=!0),this.editorWidth=e.scrollDOM.clientWidth,a|=8);let d=(this.printing?uf:ff)(t,this.paddingTop),p=d.top-this.pixelViewport.top,g=d.bottom-this.pixelViewport.bottom;this.pixelViewport=d;let m=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(m!=this.inView&&(this.inView=m,m&&(h=!0)),!this.inView&&!this.scrollTarget)return 0;let y=l.width;if((this.contentDOMWidth!=y||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,a|=8),h){let D=e.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(D)&&(o=!0),o||s.lineWrapping&&Math.abs(y-this.contentDOMWidth)>s.charWidth){let{lineHeight:x,charWidth:S}=e.docView.measureTextSize();o=x>0&&s.refresh(r,x,S,y/S,D),o&&(e.docView.minWidth=0,a|=8)}p>0&&g>0?c=Math.max(p,g):p<0&&g<0&&(c=Math.min(p,g)),s.heightChanged=!1;for(let x of this.viewports){let S=x.from==this.viewport.from?D:e.docView.measureVisibleLineHeights(x);this.heightMap=(o?ge.empty().applyChanges(this.stateDeco,I.empty,this.heightOracle,[new je(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(s,0,o,new of(x.from,S))}s.heightChanged&&(a|=2)}let v=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return v&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(a&2||v)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),a|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),a}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),s=this.heightMap,r=this.heightOracle,{visibleTop:o,visibleBottom:l}=this,h=new Oi(s.lineAt(o-i*1e3,H.ByHeight,r,0,0).from,s.lineAt(l+(1-i)*1e3,H.ByHeight,r,0,0).to);if(t){let{head:a}=t.range;if(ah.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=s.lineAt(a,H.ByPos,r,0,0),u;t.y=="center"?u=(f.top+f.bottom)/2-c/2:t.y=="start"||t.y=="nearest"&&a=l+Math.max(10,Math.min(i,250)))&&s>o-2*1e3&&r>1,o=s<<1;if(this.defaultTextDirection!=J.LTR&&!i)return[];let l=[],h=(a,c,f,u)=>{if(c-aa&&mm.from>=f.from&&m.to<=f.to&&Math.abs(m.from-a)m.fromy));if(!g){if(cm.from<=c&&m.to>=c)){let m=t.moveToLineBoundary(b.cursor(c),!1,!0).head;m>a&&(c=m)}g=new Hn(a,c,this.gapSize(f,a,c,u))}l.push(g)};for(let a of this.viewportLines){if(a.lengtha.from&&h(a.from,u,a,c),dt.draw(this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];j.spans(e,this.viewport.from,this.viewport.to,{span(s,r){t.push({from:s,to:r})},point(){}},20);let i=t.length!=this.visibleRanges.length||this.visibleRanges.some((s,r)=>s.from!=t[r].from||s.to!=t[r].to);return this.visibleRanges=t,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||ei(this.heightMap.lineAt(e,H.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return ei(this.heightMap.lineAt(this.scaler.fromDOM(e),H.ByHeight,this.heightOracle,0,0),this.scaler)}elementAtHeight(e){return ei(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Oi{constructor(e,t){this.from=e,this.to=t}}function pf(n,e,t){let i=[],s=n,r=0;return j.spans(t,n,e,{span(){},point(o,l){o>s&&(i.push({from:s,to:o}),r+=o-s),s=l}},20),s=1)return e[e.length-1].to;let i=Math.floor(n*t);for(let s=0;;s++){let{from:r,to:o}=e[s],l=o-r;if(i<=l)return r+i;i-=l}}function Bi(n,e){let t=0;for(let{from:i,to:s}of n.ranges){if(e<=s){t+=e-i;break}t+=s-i}return t/n.total}function gf(n,e){for(let t of n)if(e(t))return t}const ho={toDOM(n){return n},fromDOM(n){return n},scale:1};class mf{constructor(e,t,i){let s=0,r=0,o=0;this.viewports=i.map(({from:l,to:h})=>{let a=t.lineAt(l,H.ByPos,e,0,0).top,c=t.lineAt(h,H.ByPos,e,0,0).bottom;return s+=c-a,{from:l,to:h,top:a,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(t.height-s);for(let l of this.viewports)l.domTop=o+(l.top-r)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),r=l.bottom}toDOM(e){for(let t=0,i=0,s=0;;t++){let r=tei(s,e)):n.type)}const Pi=M.define({combine:n=>n.join(" ")}),Ms=M.define({combine:n=>n.indexOf(!0)>-1}),Ds=ot.newName(),ch=ot.newName(),fh=ot.newName(),uh={"&light":"."+ch,"&dark":"."+fh};function Os(n,e,t){return new ot(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,s=>{if(s=="&")return n;if(!t||!t[s])throw new RangeError(`Unsupported selector: ${s}`);return t[s]}):n+" "+i}})}const yf=Os("."+Ds,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},uh);class bf{constructor(e,t,i,s){this.typeOver=s,this.bounds=null,this.text="";let{impreciseHead:r,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,i,0))){let l=r||o?[]:xf(e),h=new Ql(l,e.state);h.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=h.text,this.newSel=kf(l,this.bounds.from)}else{let l=e.observer.selectionRange,h=r&&r.node==l.focusNode&&r.offset==l.focusOffset||!Ft(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),a=o&&o.node==l.anchorNode&&o.offset==l.anchorOffset||!Ft(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset);this.newSel=b.single(a,h)}}}function dh(n,e){let t,{newSel:i}=e,s=n.state.selection.main;if(e.bounds){let{from:r,to:o}=e.bounds,l=s.from,h=null;(n.inputState.lastKeyCode===8&&n.inputState.lastKeyTime>Date.now()-100||A.android&&e.text.length=s.from&&t.to<=s.to&&(t.from!=s.from||t.to!=s.to)&&s.to-s.from-(t.to-t.from)<=4?t={from:s.from,to:s.to,insert:n.state.doc.slice(s.from,t.from).append(t.insert).append(n.state.doc.slice(t.to,s.to))}:(A.mac||A.android)&&t&&t.from==t.to&&t.from==s.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(i&&t.insert.length==2&&(i=b.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:I.of([" "])}):A.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==` + `&&n.lineWrapping&&(i&&(i=b.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:I.of([" "])}),t){let r=n.state;if(A.ios&&n.inputState.flushIOSKey(n)||A.android&&(t.from==s.from&&t.to==s.to&&t.insert.length==1&&t.insert.lines==2&&Et(n.contentDOM,"Enter",13)||t.from==s.from-1&&t.to==s.to&&t.insert.length==0&&Et(n.contentDOM,"Backspace",8)||t.from==s.from&&t.to==s.to+1&&t.insert.length==0&&Et(n.contentDOM,"Delete",46)))return!0;let o=t.insert.toString();if(n.state.facet(ql).some(a=>a(n,t.from,t.to,o)))return!0;n.inputState.composing>=0&&n.inputState.composing++;let l;if(t.from>=s.from&&t.to<=s.to&&t.to-t.from>=(s.to-s.from)/3&&(!i||i.main.empty&&i.main.from==t.from+t.insert.length)&&n.inputState.composing<0){let a=s.fromt.to?r.sliceDoc(t.to,s.to):"";l=r.replaceSelection(n.state.toText(a+t.insert.sliceString(0,void 0,n.state.lineBreak)+c))}else{let a=r.changes(t),c=i&&!r.selection.main.eq(i.main)&&i.main.to<=a.newLength?i.main:void 0;if(r.selection.ranges.length>1&&n.inputState.composing>=0&&t.to<=s.to&&t.to>=s.to-10){let f=n.state.sliceDoc(t.from,t.to),u=Zl(n)||n.state.doc.lineAt(s.head),d=s.to-t.to,p=s.to-s.from;l=r.changeByRange(g=>{if(g.from==s.from&&g.to==s.to)return{changes:a,range:c||g.map(a)};let m=g.to-d,y=m-f.length;if(g.to-g.from!=p||n.state.sliceDoc(y,m)!=f||u&&g.to>=u.from&&g.from<=u.to)return{range:g};let v=r.changes({from:y,to:m,insert:t.insert}),D=g.to-s.to;return{changes:v,range:c?b.range(Math.max(0,c.anchor+D),Math.max(0,c.head+D)):g.map(v)}})}else l={changes:a,selection:c&&r.selection.replaceRange(c)}}let h="input.type";return n.composing&&(h+=".compose",n.inputState.compositionFirstChange&&(h+=".start",n.inputState.compositionFirstChange=!1)),n.dispatch(l,{scrollIntoView:!0,userEvent:h}),!0}else if(i&&!i.main.eq(s)){let r=!1,o="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(r=!0),o=n.inputState.lastSelectionOrigin),n.dispatch({selection:i,scrollIntoView:r,userEvent:o}),!0}else return!1}function wf(n,e,t,i){let s=Math.min(n.length,e.length),r=0;for(;r0&&l>0&&n.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(i=="end"){let h=Math.max(0,r-Math.min(o,l));t-=o+h-r}if(o=o?r-t:0;r-=h,l=r+(l-o),o=r}else if(l=l?r-t:0;r-=h,o=r+(o-l),l=r}return{from:r,toA:o,toB:l}}function xf(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:s,focusOffset:r}=n.observer.selectionRange;return t&&(e.push(new $r(t,i)),(s!=t||r!=i)&&e.push(new $r(s,r))),e}function kf(n,e){if(n.length==0)return null;let t=n[0].pos,i=n.length==2?n[1].pos:t;return t>-1&&i>-1?b.single(t+e,i+e):null}const Sf={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},zn=A.ie&&A.ie_version<=11;class vf{constructor(e){this.view=e,this.active=!1,this.selectionRange=new gc,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let i of t)this.queue.push(i);(A.ie&&A.ie_version<=11||A.ios&&e.composing)&&t.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),zn&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)this.view.requestMeasure()),this.resizeContent.observe(e.contentDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runScrollHandlers(this.view,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,i)=>t!=e[i]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,s=this.selectionRange;if(i.state.facet(Cn)?i.root.activeElement!=this.dom:!ji(i.dom,s))return;let r=s.anchorNode&&i.docView.nearest(s.anchorNode);if(r&&r.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(A.ie&&A.ie_version<=11||A.android&&A.chrome)&&!i.state.selection.main.empty&&s.focusNode&&Zi(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=A.safari&&e.root.nodeType==11&&fc(this.dom.ownerDocument)==this.dom&&Cf(this.view)||Qi(e.root);if(!t||this.selectionRange.eq(t))return!1;let i=ji(this.dom,t);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let r=this.delayedAndroidKey;r&&(this.clearDelayedAndroidKey(),!this.flush()&&r.force&&Et(this.dom,r.key,r.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(s)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}processRecords(){let e=this.queue;for(let r of this.observer.takeRecords())e.push(r);e.length&&(this.queue=[]);let t=-1,i=-1,s=!1;for(let r of e){let o=this.readMutation(r);o&&(o.typeOver&&(s=!0),t==-1?{from:t,to:i}=o:(t=Math.min(o.from,t),i=Math.max(o.to,i)))}return{from:t,to:i,typeOver:s}}readChange(){let{from:e,to:t,typeOver:i}=this.processRecords(),s=this.selectionChanged&&ji(this.dom,this.selectionRange);return e<0&&!s?null:(e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new bf(this.view,e,t,i))}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return!1;let i=this.view.state,s=dh(this.view,t);return this.view.state==i&&this.view.update([]),s}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.dirty|=4),e.type=="childList"){let i=ao(t,e.previousSibling||e.target.previousSibling,-1),s=ao(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:s?t.posBefore(s):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,i,s;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect(),(s=this.resizeContent)===null||s===void 0||s.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function ao(n,e,t){for(;e;){let i=q.get(e);if(i&&i.parent==n)return i;let s=e.parentNode;e=s!=n.dom?s:t>0?e.nextSibling:e.previousSibling}return null}function Cf(n){let e=null;function t(h){h.preventDefault(),h.stopImmediatePropagation(),e=h.getTargetRanges()[0]}if(n.contentDOM.addEventListener("beforeinput",t,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",t,!0),!e)return null;let i=e.startContainer,s=e.startOffset,r=e.endContainer,o=e.endOffset,l=n.docView.domAtPos(n.state.selection.main.anchor);return Zi(l.node,l.offset,r,o)&&([i,s,r,o]=[r,o,i,s]),{anchorNode:i,anchorOffset:s,focusNode:r,focusOffset:o}}class O{constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=e.dispatch||(t=>this.update([t])),this.dispatch=this.dispatch.bind(this),this._root=e.root||mc(e.parent)||document,this.viewState=new lo(e.state||N.create(e)),this.plugins=this.state.facet(Qt).map(t=>new Fn(t));for(let t of this.plugins)t.update(this);this.observer=new vf(this),this.inputState=new jc(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new Kr(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}dispatch(...e){this._dispatch(e.length==1&&e[0]instanceof Z?e[0]:this.state.update(...e))}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,i=!1,s,r=this.state;for(let a of e){if(a.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=a.state}if(this.destroyed){this.viewState.state=r;return}let o=this.observer.delayedAndroidKey,l=null;if(o?(this.observer.clearDelayedAndroidKey(),l=this.observer.readChange(),(l&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(l=null)):this.observer.clear(),r.facet(N.phrases)!=this.state.facet(N.phrases))return this.setState(r);s=nn.create(this,r,e);let h=this.viewState.scrollTarget;try{this.updateState=2;for(let a of e){if(h&&(h=h.map(a.changes)),a.scrollIntoView){let{main:c}=a.state.selection;h=new tn(c.empty?c:b.cursor(c.head,c.head>c.anchor?-1:1))}for(let c of a.effects)c.is(zr)&&(h=c.value)}this.viewState.update(s,h),this.bidiCache=sn.update(this.bidiCache,s.changes),s.empty||(this.updatePlugins(s),this.inputState.update(s)),t=this.docView.update(s),this.state.facet(Zt)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(a=>a.isUserEvent("select.pointer")))}finally{this.updateState=0}if(s.startState.facet(Pi)!=s.state.facet(Pi)&&(this.viewState.mustMeasureContent=!0),(t||i||h||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!s.empty)for(let a of this.state.facet(xs))a(s);l&&!dh(this,l)&&o.force&&Et(this.contentDOM,o.key,o.keyCode)}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new lo(e),this.plugins=e.facet(Qt).map(i=>new Fn(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView=new Kr(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Qt),i=e.state.facet(Qt);if(t!=i){let s=[];for(let r of i){let o=t.indexOf(r);if(o<0)s.push(new Fn(r));else{let l=this.plugins[o];l.mustUpdate=e,s.push(l)}}for(let r of this.plugins)r.mustUpdate!=e&&r.destroy(this);this.plugins=s,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else for(let s of this.plugins)s.mustUpdate=e;for(let s=0;s-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,{scrollHeight:i,scrollTop:s,clientHeight:r}=this.scrollDOM,o=s>i-r-4?i:s;try{for(let l=0;;l++){this.updateState=1;let h=this.viewport,a=this.viewState.lineBlockAtHeight(o),c=this.viewState.measure(this);if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let f=[];c&4||([this.measureRequests,f]=[f,this.measureRequests]);let u=f.map(m=>{try{return m.read(this)}catch(y){return Le(this.state,y),co}}),d=nn.create(this,this.state,[]),p=!1,g=!1;d.flags|=c,t?t.flags|=c:t=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),p=this.docView.update(d));for(let m=0;m1||m<-1)&&(this.scrollDOM.scrollTop+=m,g=!0)}if(p&&this.docView.updateSelection(!0),this.viewport.from==h.from&&this.viewport.to==h.to&&!g&&this.measureRequests.length==0)break}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let l of this.state.facet(xs))l(t)}get themeClasses(){return Ds+" "+(this.state.facet(Ms)?fh:ch)+" "+this.state.facet(Pi)}updateAttrs(){let e=fo(this,Ul,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Cn)?"true":"false",class:"cm-content",style:`${A.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),fo(this,Qs,t);let i=this.observer.ignore(()=>{let s=bs(this.contentDOM,this.contentAttrs,t),r=bs(this.dom,this.editorAttrs,e);return s||r});return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let s of i.effects)if(s.is(O.announce)){t&&(this.announceDOM.textContent=""),t=!1;let r=this.announceDOM.appendChild(document.createElement("div"));r.textContent=s.value}}mountStyles(){this.styleModules=this.state.facet(Zt),ot.mount(this.root,this.styleModules.concat(yf).reverse())}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;ti.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,i){return Wn(this,e,Xr(this,e,t,i))}moveByGroup(e,t){return Wn(this,e,Xr(this,e,t,i=>$c(this,e.head,i)))}moveToLineBoundary(e,t,i=!0){return qc(this,e,t,i)}moveVertically(e,t,i){return Wn(this,e,Kc(this,e,t,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),th(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let i=this.docView.coordsAt(e,t);if(!i||i.left==i.right)return i;let s=this.state.doc.lineAt(e),r=this.bidiSpans(s),o=r[It.find(r,e-s.from,-1,t)];return Js(i,o.dir==J.LTR==t>0)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Kl)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Af)return Xl(e.length);let t=this.textDirectionAt(e.from);for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t)return s.order;let i=Oc(e.text,t);return this.bidiCache.push(new sn(e.from,e.to,t,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||A.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Al(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return zr.of(new tn(typeof e=="number"?b.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}static domEventHandlers(e){return me.define(()=>({}),{eventHandlers:e})}static theme(e,t){let i=ot.newName(),s=[Pi.of(i),Zt.of(Os(`.${i}`,e))];return t&&t.dark&&s.push(Ms.of(!0)),s}static baseTheme(e){return Ct.lowest(Zt.of(Os("."+Ds,e,uh)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),s=i&&q.get(i)||q.get(e);return((t=s==null?void 0:s.rootView)===null||t===void 0?void 0:t.view)||null}}O.styleModule=Zt;O.inputHandler=ql;O.focusChangeEffect=$l;O.perLineTextDirection=Kl;O.exceptionSink=zl;O.updateListener=xs;O.editable=Cn;O.mouseSelectionStyle=Hl;O.dragMovesSelection=Wl;O.clickAddsSelectionRange=Vl;O.decorations=ci;O.atomicRanges=Gl;O.scrollMargins=Jl;O.darkTheme=Ms;O.contentAttributes=Qs;O.editorAttributes=Ul;O.lineWrapping=O.contentAttributes.of({class:"cm-lineWrapping"});O.announce=E.define();const Af=4096,co={};class sn{constructor(e,t,i,s){this.from=e,this.to=t,this.dir=i,this.order=s}static update(e,t){if(t.empty)return e;let i=[],s=e.length?e[e.length-1].dir:J.LTR;for(let r=Math.max(0,e.length-10);r=0;s--){let r=i[s],o=typeof r=="function"?r(n):r;o&&ys(o,t)}return t}const Mf=A.mac?"mac":A.windows?"win":A.linux?"linux":"key";function Df(n,e){const t=n.split(/-(?!$)/);let i=t[t.length-1];i=="Space"&&(i=" ");let s,r,o,l;for(let h=0;hi.concat(s),[]))),t}function Tf(n,e,t){return gh(ph(n.state),e,n,t)}let et=null;const Bf=4e3;function Pf(n,e=Mf){let t=Object.create(null),i=Object.create(null),s=(o,l)=>{let h=i[o];if(h==null)i[o]=l;else if(h!=l)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},r=(o,l,h,a)=>{var c,f;let u=t[o]||(t[o]=Object.create(null)),d=l.split(/ (?!$)/).map(m=>Df(m,e));for(let m=1;m{let D=et={view:v,prefix:y,scope:o};return setTimeout(()=>{et==D&&(et=null)},Bf),!0}]})}let p=d.join(" ");s(p,!1);let g=u[p]||(u[p]={preventDefault:!1,run:((f=(c=u._any)===null||c===void 0?void 0:c.run)===null||f===void 0?void 0:f.slice())||[]});h&&g.run.push(h),a&&(g.preventDefault=!0)};for(let o of n){let l=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let a of l){let c=t[a]||(t[a]=Object.create(null));c._any||(c._any={preventDefault:!1,run:[]});for(let f in c)c[f].run.push(o.any)}let h=o[e]||o.key;if(h)for(let a of l)r(a,h,o.run,o.preventDefault),o.shift&&r(a,"Shift-"+h,o.shift,o.preventDefault)}return t}function gh(n,e,t,i){let s=cc(e),r=se(s,0),o=Me(r)==s.length&&s!=" ",l="",h=!1;et&&et.view==t&&et.scope==i&&(l=et.prefix+" ",(h=nh.indexOf(e.keyCode)<0)&&(et=null));let a=new Set,c=p=>{if(p){for(let g of p.run)if(!a.has(g)&&(a.add(g),g(t,e)))return!0;p.preventDefault&&(h=!0)}return!1},f=n[i],u,d;if(f){if(c(f[l+Ri(s,e,!o)]))return!0;if(o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(A.windows&&e.ctrlKey&&e.altKey)&&(u=lt[e.keyCode])&&u!=s){if(c(f[l+Ri(u,e,!0)]))return!0;if(e.shiftKey&&(d=li[e.keyCode])!=s&&d!=u&&c(f[l+Ri(d,e,!1)]))return!0}else if(o&&e.shiftKey&&c(f[l+Ri(s,e,!0)]))return!0;if(c(f._any))return!0}return h}class wi{constructor(e,t,i,s,r){this.className=e,this.left=t,this.top=i,this.width=s,this.height=r}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,i){if(i.empty){let s=e.coordsAtPos(i.head,i.assoc||1);if(!s)return[];let r=mh(e);return[new wi(t,s.left-r.left,s.top-r.top,null,s.bottom-s.top)]}else return Rf(e,t,i)}}function mh(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==J.LTR?e.left:e.right-n.scrollDOM.clientWidth)-n.scrollDOM.scrollLeft,top:e.top-n.scrollDOM.scrollTop}}function po(n,e,t){let i=b.cursor(e);return{from:Math.max(t.from,n.moveToLineBoundary(i,!1,!0).from),to:Math.min(t.to,n.moveToLineBoundary(i,!0,!0).from),type:z.Text}}function go(n,e){let t=n.lineBlockAt(e);if(Array.isArray(t.type)){for(let i of t.type)if(i.to>e||i.to==e&&(i.to==t.to||i.type==z.Text))return i}return t}function Rf(n,e,t){if(t.to<=n.viewport.from||t.from>=n.viewport.to)return[];let i=Math.max(t.from,n.viewport.from),s=Math.min(t.to,n.viewport.to),r=n.textDirection==J.LTR,o=n.contentDOM,l=o.getBoundingClientRect(),h=mh(n),a=window.getComputedStyle(o.firstChild),c=l.left+parseInt(a.paddingLeft)+Math.min(0,parseInt(a.textIndent)),f=l.right-parseInt(a.paddingRight),u=go(n,i),d=go(n,s),p=u.type==z.Text?u:null,g=d.type==z.Text?d:null;if(n.lineWrapping&&(p&&(p=po(n,i,p)),g&&(g=po(n,s,g))),p&&g&&p.from==g.from)return y(v(t.from,t.to,p));{let x=p?v(t.from,null,p):D(u,!1),S=g?v(null,t.to,g):D(d,!0),C=[];return(p||u).to<(g||d).from-1?C.push(m(c,x.bottom,f,S.top)):x.bottomF&&Y.from=ue)break;_>fe&&R(Math.max(ie,fe),x==null&&ie<=F,Math.min(_,ue),S==null&&_>=X,Ye.dir)}if(fe=te.to+1,fe>=ue)break}return L.length==0&&R(F,x==null,X,S==null,n.textDirection),{top:B,bottom:V,horizontal:L}}function D(x,S){let C=l.top+(S?x.top:x.bottom);return{top:C,bottom:C,horizontal:[]}}}function Lf(n,e){return n.constructor==e.constructor&&n.eq(e)}class Ef{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Gi)!=e.state.facet(Gi)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&e.view.requestMeasure(this.measureReq)}setOrder(e){let t=0,i=e.facet(Gi);for(;t!Lf(t,this.drawn[i]))){let t=this.dom.firstChild,i=0;for(let s of e)s.update&&t&&s.constructor&&this.drawn[i].constructor&&s.update(t,this.drawn[i])?(t=t.nextSibling,i++):this.dom.insertBefore(s.draw(),t);for(;t;){let s=t.nextSibling;t.remove(),t=s}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Gi=M.define();function yh(n){return[me.define(e=>new Ef(e,n)),Gi.of(n)]}const bh=!A.ios,fi=M.define({combine(n){return At(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function Mg(n={}){return[fi.of(n),If,Nf,Ff,jl.of(!0)]}function wh(n){return n.startState.facet(fi)!=n.state.facet(fi)}const If=yh({above:!0,markers(n){let{state:e}=n,t=e.facet(fi),i=[];for(let s of e.selection.ranges){let r=s==e.selection.main;if(s.empty?!r||bh:t.drawRangeCursor){let o=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=s.empty?s:b.cursor(s.head,s.head>s.anchor?-1:1);for(let h of wi.forRange(n,o,l))i.push(h)}}return i},update(n,e){n.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=wh(n);return t&&mo(n.state,e),n.docChanged||n.selectionSet||t},mount(n,e){mo(e.state,n)},class:"cm-cursorLayer"});function mo(n,e){e.style.animationDuration=n.facet(fi).cursorBlinkRate+"ms"}const Nf=yh({above:!1,markers(n){return n.state.selection.ranges.map(e=>e.empty?[]:wi.forRange(n,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(n,e){return n.docChanged||n.selectionSet||n.viewportChanged||wh(n)},class:"cm-selectionLayer"}),xh={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};bh&&(xh[".cm-line"].caretColor="transparent !important");const Ff=Ct.highest(O.theme(xh)),kh=E.define({map(n,e){return n==null?null:e.mapPos(n)}}),ti=we.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,i)=>i.is(kh)?i.value:t,n)}}),Vf=me.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field(ti);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(ti)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let n=this.view.state.field(ti),e=n!=null&&this.view.coordsAtPos(n);if(!e)return null;let t=this.view.scrollDOM.getBoundingClientRect();return{left:e.left-t.left+this.view.scrollDOM.scrollLeft,top:e.top-t.top+this.view.scrollDOM.scrollTop,height:e.bottom-e.top}}drawCursor(n){this.cursor&&(n?(this.cursor.style.left=n.left+"px",this.cursor.style.top=n.top+"px",this.cursor.style.height=n.height+"px"):this.cursor.style.left="-100000px")}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field(ti)!=n&&this.view.dispatch({effects:kh.of(n)})}},{eventHandlers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Dg(){return[ti,Vf]}function yo(n,e,t,i,s){e.lastIndex=0;for(let r=n.iterRange(t,i),o=t,l;!r.next().done;o+=r.value.length)if(!r.lineBreak)for(;l=e.exec(r.value);)s(o+l.index,l)}function Wf(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let i=[];for(let{from:s,to:r}of t)s=Math.max(n.state.doc.lineAt(s).from,s-e),r=Math.min(n.state.doc.lineAt(r).to,r+e),i.length&&i[i.length-1].to>=s?i[i.length-1].to=r:i.push({from:s,to:r});return i}class Hf{constructor(e){const{regexp:t,decoration:i,decorate:s,boundary:r,maxLength:o=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,s)this.addMatch=(l,h,a,c)=>s(c,a,a+l[0].length,l,h);else if(typeof i=="function")this.addMatch=(l,h,a,c)=>{let f=i(l,h,a);f&&c(a,a+l[0].length,f)};else if(i)this.addMatch=(l,h,a,c)=>c(a,a+l[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=r,this.maxLength=o}createDeco(e){let t=new xt,i=t.add.bind(t);for(let{from:s,to:r}of Wf(e,this.maxLength))yo(e.state.doc,this.regexp,s,r,(o,l)=>this.addMatch(l,e,o,i));return t.finish()}updateDeco(e,t){let i=1e9,s=-1;return e.docChanged&&e.changes.iterChanges((r,o,l,h)=>{h>e.view.viewport.from&&l1e3?this.createDeco(e.view):s>-1?this.updateRange(e.view,t.map(e.changes),i,s):t}updateRange(e,t,i,s){for(let r of e.visibleRanges){let o=Math.max(r.from,i),l=Math.min(r.to,s);if(l>o){let h=e.state.doc.lineAt(o),a=h.toh.from;o--)if(this.boundary.test(h.text[o-1-h.from])){c=o;break}for(;lu.push(y.range(g,m));if(h==a)for(this.regexp.lastIndex=c-h.from;(d=this.regexp.exec(h.text))&&d.indexthis.addMatch(m,e,g,p));t=t.update({filterFrom:c,filterTo:f,filter:(g,m)=>gf,add:u})}}return t}}const Ts=/x/.unicode!=null?"gu":"g",zf=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,Ts),qf={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let qn=null;function $f(){var n;if(qn==null&&typeof document<"u"&&document.body){let e=document.body.style;qn=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return qn||!1}const Ji=M.define({combine(n){let e=At(n,{render:null,specialChars:zf,addSpecialChars:null});return(e.replaceTabs=!$f())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Ts)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Ts)),e}});function Og(n={}){return[Ji.of(n),Kf()]}let bo=null;function Kf(){return bo||(bo=me.fromClass(class{constructor(n){this.view=n,this.decorations=T.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Ji)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new Hf({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:s}=t.state,r=se(e[0],0);if(r==9){let o=s.lineAt(i),l=t.state.tabSize,h=yi(o.text,l,i-o.from);return T.replace({widget:new Jf((l-h%l)*this.view.defaultCharacterWidth)})}return this.decorationCache[r]||(this.decorationCache[r]=T.replace({widget:new Gf(n,r)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Ji);n.startState.facet(Ji)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const jf="•";function Uf(n){return n>=32?jf:n==10?"␤":String.fromCharCode(9216+n)}class Gf extends ct{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=Uf(this.code),i=e.state.phrase("Control character")+" "+(qf[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,i,t);if(s)return s;let r=document.createElement("span");return r.textContent=t,r.title=i,r.setAttribute("aria-label",i),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class Jf extends ct{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}class _f extends ct{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}ignoreEvent(){return!1}}function Tg(n){return me.fromClass(class{constructor(e){this.view=e,this.placeholder=T.set([T.widget({widget:new _f(n),side:1}).range(0)])}get decorations(){return this.view.state.doc.length?T.none:this.placeholder}},{decorations:e=>e.decorations})}const Bs=2e3;function Xf(n,e,t){let i=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>Bs||t.off>Bs||e.col<0||t.col<0){let o=Math.min(e.off,t.off),l=Math.max(e.off,t.off);for(let h=i;h<=s;h++){let a=n.doc.line(h);a.length<=l&&r.push(b.range(a.from+o,a.to+l))}}else{let o=Math.min(e.col,t.col),l=Math.max(e.col,t.col);for(let h=i;h<=s;h++){let a=n.doc.line(h),c=as(a.text,o,n.tabSize,!0);if(c<0)r.push(b.cursor(a.to));else{let f=as(a.text,l,n.tabSize);r.push(b.range(a.from+c,a.from+f))}}}return r}function Yf(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function wo(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=n.state.doc.lineAt(t),s=t-i.from,r=s>Bs?-1:s==i.length?Yf(n,e.clientX):yi(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:r,off:s}}function Qf(n,e){let t=wo(n,e),i=n.state.selection;return t?{update(s){if(s.docChanged){let r=s.changes.mapPos(s.startState.doc.line(t.line).from),o=s.state.doc.lineAt(r);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},i=i.map(s.changes)}},get(s,r,o){let l=wo(n,s);if(!l)return i;let h=Xf(n.state,t,l);return h.length?o?b.create(h.concat(i.ranges)):b.create(h):i}}:null}function Bg(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return O.mouseSelectionStyle.of((t,i)=>e(i)?Qf(t,i):null)}const Li="-10000px";class Zf{constructor(e,t,i){this.facet=t,this.createTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(s=>s),this.tooltipViews=this.tooltips.map(i)}update(e){var t;let i=e.state.facet(this.facet),s=i.filter(o=>o);if(i===this.input){for(let o of this.tooltipViews)o.update&&o.update(e);return!1}let r=[];for(let o=0;o{var e,t,i;return{position:A.ios?"absolute":((e=n.find(s=>s.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(s=>s.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((i=n.find(s=>s.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||eu}}}),xo=new WeakMap,Sh=me.fromClass(class{constructor(n){this.view=n,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let e=n.state.facet($n);this.position=e.position,this.parent=e.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new Zf(n,vh,t=>this.createTooltip(t)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n);e&&this.observeIntersection();let t=e||n.geometryChanged,i=n.state.facet($n);if(i.position!=this.position){this.position=i.position;for(let s of this.manager.tooltipViews)s.dom.style.position=this.position;t=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let s of this.manager.tooltipViews)this.container.appendChild(s.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n){let e=n.create(this.view);if(e.dom.classList.add("cm-tooltip"),n.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",e.dom.appendChild(t)}return e.dom.style.position=this.position,e.dom.style.top=Li,this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var n,e;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),(n=t.destroy)===null||n===void 0||n.call(t);(e=this.intersectionObserver)===null||e===void 0||e.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=this.view.dom.getBoundingClientRect();return{editor:n,parent:this.parent?this.container.getBoundingClientRect():n,pos:this.manager.tooltips.map((e,t)=>{let i=this.manager.tooltipViews[t];return i.getCoords?i.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet($n).tooltipSpace(this.view)}}writeMeasure(n){var e;let{editor:t,space:i}=n,s=[];for(let r=0;r=Math.min(t.bottom,i.bottom)||a.rightMath.min(t.right,i.right)+.1){h.style.top=Li;continue}let f=o.arrow?l.dom.querySelector(".cm-tooltip-arrow"):null,u=f?7:0,d=c.right-c.left,p=(e=xo.get(l))!==null&&e!==void 0?e:c.bottom-c.top,g=l.offset||iu,m=this.view.textDirection==J.LTR,y=c.width>i.right-i.left?m?i.left:i.right-c.width:m?Math.min(a.left-(f?14:0)+g.x,i.right-d):Math.max(i.left,a.left-d+(f?14:0)-g.x),v=!!o.above;!o.strictSide&&(v?a.top-(c.bottom-c.top)-g.yi.bottom)&&v==i.bottom-a.bottom>a.top-i.top&&(v=!v);let D=(v?a.top-i.top:i.bottom-a.bottom)-u;if(Dy&&C.topx&&(x=v?C.top-p-2-u:C.bottom+u+2);this.position=="absolute"?(h.style.top=x-n.parent.top+"px",h.style.left=y-n.parent.left+"px"):(h.style.top=x+"px",h.style.left=y+"px"),f&&(f.style.left=`${a.left+(m?g.x:-g.x)-(y+14-7)}px`),l.overlap!==!0&&s.push({left:y,top:x,right:S,bottom:x+p}),h.classList.toggle("cm-tooltip-above",v),h.classList.toggle("cm-tooltip-below",!v),l.positioned&&l.positioned(n.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=Li}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),tu=O.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:`${7}px`,width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:`${7}px solid transparent`,borderRight:`${7}px solid transparent`},".cm-tooltip-above &":{bottom:`-${7}px`,"&:before":{borderTop:`${7}px solid #bbb`},"&:after":{borderTop:`${7}px solid #f5f5f5`,bottom:"1px"}},".cm-tooltip-below &":{top:`-${7}px`,"&:before":{borderBottom:`${7}px solid #bbb`},"&:after":{borderBottom:`${7}px solid #f5f5f5`,top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),iu={x:0,y:0},vh=M.define({enables:[Sh,tu]});function nu(n,e){let t=n.plugin(Sh);if(!t)return null;let i=t.manager.tooltips.indexOf(e);return i<0?null:t.manager.tooltipViews[i]}const ko=M.define({combine(n){let e,t;for(let i of n)e=e||i.topContainer,t=t||i.bottomContainer;return{topContainer:e,bottomContainer:t}}});function rn(n,e){let t=n.plugin(Ch),i=t?t.specs.indexOf(e):-1;return i>-1?t.panels[i]:null}const Ch=me.fromClass(class{constructor(n){this.input=n.state.facet(on),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(ko);this.top=new Ei(n,!0,e.topContainer),this.bottom=new Ei(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(ko);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Ei(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Ei(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(on);if(t!=this.input){let i=t.filter(h=>h),s=[],r=[],o=[],l=[];for(let h of i){let a=this.specs.indexOf(h),c;a<0?(c=h(n.view),l.push(c)):(c=this.panels[a],c.update&&c.update(n)),s.push(c),(c.top?r:o).push(c)}this.specs=i,this.panels=s,this.top.sync(r),this.bottom.sync(o);for(let h of l)h.dom.classList.add("cm-panel"),h.mount&&h.mount()}else for(let i of this.panels)i.update&&i.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>O.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class Ei{constructor(e,t,i){this.view=e,this.top=t,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=So(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=So(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function So(n){let e=n.nextSibling;return n.remove(),e}const on=M.define({enables:Ch});class St extends wt{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}St.prototype.elementClass="";St.prototype.toDOM=void 0;St.prototype.mapMode=he.TrackBefore;St.prototype.startSide=St.prototype.endSide=-1;St.prototype.point=!0;const su=M.define(),ru=new class extends St{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},ou=su.compute(["selection"],n=>{let e=[],t=-1;for(let i of n.selection.ranges){let s=n.doc.lineAt(i.head).from;s>t&&(t=s,e.push(ru.range(s)))}return j.of(e)});function Pg(){return ou}const lu=1024;let hu=0;class De{constructor(e,t){this.from=e,this.to=t}}class P{constructor(e={}){this.id=hu++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=ye.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}P.closedBy=new P({deserialize:n=>n.split(" ")});P.openedBy=new P({deserialize:n=>n.split(" ")});P.group=new P({deserialize:n=>n.split(" ")});P.contextHash=new P({perNode:!0});P.lookAhead=new P({perNode:!0});P.mounted=new P({perNode:!0});class au{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}}const cu=Object.create(null);class ye{constructor(e,t,i,s=0){this.name=e,this.props=t,this.id=i,this.flags=s}static define(e){let t=e.props&&e.props.length?Object.create(null):cu,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),s=new ye(e.name||"",t,e.id,i);if(e.props){for(let r of e.props)if(Array.isArray(r)||(r=r(s)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[r[0].id]=r[1]}}return s}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(P.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let s of i.split(" "))t[s]=e[i];return i=>{for(let s=i.prop(P.group),r=-1;r<(s?s.length:0);r++){let o=t[r<0?i.name:s[r]];if(o)return o}}}}ye.none=new ye("",Object.create(null),0,8);class tr{constructor(e){this.types=e;for(let t=0;t=s&&(o.type.isAnonymous||t(o)!==!1)){if(o.firstChild())continue;l=!0}for(;l&&i&&!o.type.isAnonymous&&i(o),!o.nextSibling();){if(!o.parent())return;l=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:sr(ye.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,s)=>new W(this.type,t,i,s,this.propValues),e.makeTree||((t,i,s)=>new W(ye.none,t,i,s)))}static build(e){return uu(e)}}W.empty=new W(ye.none,[],[],0);class ir{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new ir(this.buffer,this.index)}}class Mt{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return ye.none}toString(){let e=[];for(let t=0;t0));h=o[h+3]);return l}slice(e,t,i){let s=this.buffer,r=new Uint16Array(t-e),o=0;for(let l=e,h=0;l=e&&te;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function Mh(n,e){let t=n.childBefore(e);for(;t;){let i=t.lastChild;if(!i||i.to!=t.to)break;i.type.isError&&i.from==i.to?(n=t,t=i.prevSibling):t=i}return n}function Ht(n,e,t,i){for(var s;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to0?l.length:-1;e!=a;e+=t){let c=l[e],f=h[e]+o.from;if(Ah(s,i,f,f+c.length)){if(c instanceof Mt){if(r&U.ExcludeBuffers)continue;let u=c.findChild(0,c.buffer.length,t,i-f,s);if(u>-1)return new ze(new fu(o,c,e,f),null,u)}else if(r&U.IncludeAnonymous||!c.type.isAnonymous||nr(c)){let u;if(!(r&U.IgnoreMounts)&&c.props&&(u=c.prop(P.mounted))&&!u.overlay)return new Be(u.tree,f,e,o);let d=new Be(c,f,e,o);return r&U.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(t<0?c.children.length-1:0,t,i,s)}}}if(r&U.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let s;if(!(i&U.IgnoreOverlays)&&(s=this._tree.prop(P.mounted))&&s.overlay){let r=e-this.from;for(let{from:o,to:l}of s.overlay)if((t>0?o<=r:o=r:l>r))return new Be(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}cursor(e=0){return new ui(this,e)}get tree(){return this._tree}toTree(){return this._tree}resolve(e,t=0){return Ht(this,e,t,!1)}resolveInner(e,t=0){return Ht(this,e,t,!0)}enterUnfinishedNodesBefore(e){return Mh(this,e)}getChild(e,t=null,i=null){let s=ln(this,e,t,i);return s.length?s[0]:null}getChildren(e,t=null,i=null){return ln(this,e,t,i)}toString(){return this._tree.toString()}get node(){return this}matchContext(e){return hn(this,e)}}function ln(n,e,t,i){let s=n.cursor(),r=[];if(!s.firstChild())return r;if(t!=null){for(;!s.type.is(t);)if(!s.nextSibling())return r}for(;;){if(i!=null&&s.type.is(i))return r;if(s.type.is(e)&&r.push(s.node),!s.nextSibling())return i==null?r:[]}}function hn(n,e,t=e.length-1){for(let i=n.parent;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class fu{constructor(e,t,i,s){this.parent=e,this.buffer=t,this.index=i,this.start=s}}class ze{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.context.start,i);return r<0?null:new ze(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&U.ExcludeBuffers)return null;let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new ze(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new ze(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new ze(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}cursor(e=0){return new ui(this,e)}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,s=this.index+4,r=i.buffer[this.index+3];if(r>s){let o=i.buffer[this.index+1];e.push(i.slice(s,r,o)),t.push(0)}return new W(this.type,e,t,this.to-this.from)}resolve(e,t=0){return Ht(this,e,t,!1)}resolveInner(e,t=0){return Ht(this,e,t,!0)}enterUnfinishedNodesBefore(e){return Mh(this,e)}toString(){return this.context.buffer.childString(this.index)}getChild(e,t=null,i=null){let s=ln(this,e,t,i);return s.length?s[0]:null}getChildren(e,t=null,i=null){return ln(this,e,t,i)}get node(){return this}matchContext(e){return hn(this,e)}}class ui{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Be)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:s}=this.buffer;return this.type=t||s.set.types[s.buffer[e]],this.from=i+s.buffer[e+1],this.to=i+s.buffer[e+2],!0}yield(e){return e?e instanceof Be?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:s}=this.buffer,r=s.findChild(this.index+4,s.buffer[this.index+3],e,t-this.buffer.start,i);return r<0?!1:(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?i&U.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&U.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&U.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let s=i<0?0:this.stack[i]+4;if(this.index!=s)return this.yieldBuf(t.findChild(s,this.index,-1,0,4))}else{let s=t.buffer[this.index+3];if(s<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(s)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:s}=this;if(s){if(e>0){if(this.index-1)for(let r=t+e,o=e<0?-1:i._tree.children.length;r!=o;r+=e){let l=i._tree.children[r];if(this.mode&U.IncludeAnonymous||l instanceof Mt||!l.type.isAnonymous||nr(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==s){if(s==this.index)return o;t=o,i=r+1;break e}s=this.stack[--r]}}for(let s=i;s=0;r--){if(r<0)return hn(this.node,e,s);let o=i[t.buffer[this.stack[r]]];if(!o.isAnonymous){if(e[s]&&e[s]!=o.name)return!1;s--}}return!0}}function nr(n){return n.children.some(e=>e instanceof Mt||!e.type.isAnonymous||nr(e))}function uu(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:s=lu,reused:r=[],minRepeatType:o=i.types.length}=n,l=Array.isArray(t)?new ir(t,t.length):t,h=i.types,a=0,c=0;function f(x,S,C,B,V){let{id:L,start:R,end:F,size:X}=l,Y=c;for(;X<0;)if(l.next(),X==-1){let ie=r[L];C.push(ie),B.push(R-x);return}else if(X==-3){a=L;return}else if(X==-4){c=L;return}else throw new RangeError(`Unrecognized record size: ${X}`);let fe=h[L],ue,te,Ye=R-x;if(F-R<=s&&(te=g(l.pos-S,V))){let ie=new Uint16Array(te.size-te.skip),_=l.pos-te.size,Je=ie.length;for(;l.pos>_;)Je=m(te.start,ie,Je);ue=new Mt(ie,F-te.start,i),Ye=te.start-x}else{let ie=l.pos-X;l.next();let _=[],Je=[],ut=L>=o?L:-1,Dt=0,Si=F;for(;l.pos>ie;)ut>=0&&l.id==ut&&l.size>=0?(l.end<=Si-s&&(d(_,Je,R,Dt,l.end,Si,ut,Y),Dt=_.length,Si=l.end),l.next()):f(R,ie,_,Je,ut);if(ut>=0&&Dt>0&&Dt<_.length&&d(_,Je,R,Dt,R,Si,ut,Y),_.reverse(),Je.reverse(),ut>-1&&Dt>0){let Sr=u(fe);ue=sr(fe,_,Je,0,_.length,0,F-R,Sr,Sr)}else ue=p(fe,_,Je,F-R,Y-F)}C.push(ue),B.push(Ye)}function u(x){return(S,C,B)=>{let V=0,L=S.length-1,R,F;if(L>=0&&(R=S[L])instanceof W){if(!L&&R.type==x&&R.length==B)return R;(F=R.prop(P.lookAhead))&&(V=C[L]+R.length+F)}return p(x,S,C,B,V)}}function d(x,S,C,B,V,L,R,F){let X=[],Y=[];for(;x.length>B;)X.push(x.pop()),Y.push(S.pop()+C-V);x.push(p(i.types[R],X,Y,L-V,F-L)),S.push(V-C)}function p(x,S,C,B,V=0,L){if(a){let R=[P.contextHash,a];L=L?[R].concat(L):[R]}if(V>25){let R=[P.lookAhead,V];L=L?[R].concat(L):[R]}return new W(x,S,C,B,L)}function g(x,S){let C=l.fork(),B=0,V=0,L=0,R=C.end-s,F={size:0,start:0,skip:0};e:for(let X=C.pos-x;C.pos>X;){let Y=C.size;if(C.id==S&&Y>=0){F.size=B,F.start=V,F.skip=L,L+=4,B+=4,C.next();continue}let fe=C.pos-Y;if(Y<0||fe=o?4:0,te=C.start;for(C.next();C.pos>fe;){if(C.size<0)if(C.size==-3)ue+=4;else break e;else C.id>=o&&(ue+=4);C.next()}V=te,B+=Y,L+=ue}return(S<0||B==x)&&(F.size=B,F.start=V,F.skip=L),F.size>4?F:void 0}function m(x,S,C){let{id:B,start:V,end:L,size:R}=l;if(l.next(),R>=0&&B4){let X=l.pos-(R-4);for(;l.pos>X;)C=m(x,S,C)}S[--C]=F,S[--C]=L-x,S[--C]=V-x,S[--C]=B}else R==-3?a=B:R==-4&&(c=B);return C}let y=[],v=[];for(;l.pos>0;)f(n.start||0,n.bufferStart||0,y,v,-1);let D=(e=n.length)!==null&&e!==void 0?e:y.length?v[0]+y[0].length:0;return new W(h[n.topID],y.reverse(),v.reverse(),D)}const Co=new WeakMap;function _i(n,e){if(!n.isAnonymous||e instanceof Mt||e.type!=n)return 1;let t=Co.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof W)){t=1;break}t+=_i(n,i)}Co.set(e,t)}return t}function sr(n,e,t,i,s,r,o,l,h){let a=0;for(let p=i;p=c)break;C+=B}if(D==x+1){if(C>c){let B=p[x];d(B.children,B.positions,0,B.children.length,g[x]+v);continue}f.push(p[x])}else{let B=g[D-1]+p[D-1].length-S;f.push(sr(n,p,g,x,D,S,B,null,h))}u.push(S+v-r)}}return d(e,t,i,s,0),(l||h)(f,u,o)}class Rg{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let s=this.map.get(e);s||this.map.set(e,s=new Map),s.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof ze?this.setBuffer(e.context.buffer,e.index,t):e instanceof Be&&this.map.set(e.tree,t)}get(e){return e instanceof ze?this.getBuffer(e.context.buffer,e.index):e instanceof Be?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Xe{constructor(e,t,i,s,r=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=s,this.open=(r?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let s=[new Xe(0,e.length,e,0,!1,i)];for(let r of t)r.to>e.length&&s.push(r);return s}static applyChanges(e,t,i=128){if(!t.length)return e;let s=[],r=1,o=e.length?e[0]:null;for(let l=0,h=0,a=0;;l++){let c=l=i)for(;o&&o.from=u.from||f<=u.to||a){let d=Math.max(u.from,h)-a,p=Math.min(u.to,f)-a;u=d>=p?null:new Xe(d,p,u.tree,u.offset+a,l>0,!!c)}if(u&&s.push(u),o.to>f)break;o=rnew De(s.from,s.to)):[new De(0,0)]:[new De(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let s=this.startParse(e,t,i);for(;;){let r=s.advance();if(r)return r}}}class du{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function Lg(n){return(e,t,i,s)=>new gu(e,n,t,i,s)}class Ao{constructor(e,t,i,s,r){this.parser=e,this.parse=t,this.overlay=i,this.target=s,this.ranges=r}}class pu{constructor(e,t,i,s,r,o,l){this.parser=e,this.predicate=t,this.mounts=i,this.index=s,this.start=r,this.target=o,this.prev=l,this.depth=0,this.ranges=[]}}const Ps=new P({perNode:!0});class gu{constructor(e,t,i,s,r){this.nest=t,this.input=i,this.fragments=s,this.ranges=r,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let s of this.inner)s.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new W(i.type,i.children,i.positions,i.length,i.propValues.concat([[Ps,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[P.mounted.id]=new au(t,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;tc.frag.from<=s.from&&c.frag.to>=s.to&&c.mount.overlay);if(a)for(let c of a.mount.overlay){let f=c.from+a.pos,u=c.to+a.pos;f>=s.from&&u<=s.to&&!t.ranges.some(d=>d.fromf)&&t.ranges.push({from:f,to:u})}}l=!1}else if(i&&(o=mu(i.ranges,s.from,s.to)))l=o!=2;else if(!s.type.isAnonymous&&s.fromnew De(f.from-s.from,f.to-s.from)):null,s.tree,c)),r.overlay?c.length&&(i={ranges:c,depth:0,prev:i}):l=!1}}else t&&(h=t.predicate(s))&&(h===!0&&(h=new De(s.from,s.to)),h.fromnew De(c.from-t.start,c.to-t.start)),t.target,a)),t=t.prev}i&&!--i.depth&&(i=i.prev)}}}}function mu(n,e,t){for(let i of n){if(i.from>=t)break;if(i.to>e)return i.from<=e&&i.to>=t?2:1}return 0}function Mo(n,e,t,i,s,r){if(e=e.to);i++);let o=s.children[i],l=o.buffer;function h(a,c,f,u,d){let p=a;for(;l[p+2]+r<=e.from;)p=l[p+3];let g=[],m=[];Mo(o,a,p,g,m,u);let y=l[p+1],v=l[p+2],D=y+r==e.from&&v+r==e.to&&l[p]==e.type.id;return g.push(D?e.toTree():h(p+4,l[p+3],o.set.types[l[p]],y,v-y)),m.push(y-u),Mo(o,l[p+3],c,g,m,u),new W(f,g,m,d)}s.children[i]=h(0,l.length,ye.none,0,o.length);for(let a=0;a<=t;a++)n.childAfter(e.from)}class Do{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(U.IncludeAnonymous|U.IgnoreMounts)}moveTo(e){let{cursor:t}=this,i=e-this.offset;for(;!this.done&&t.from=e&&t.enter(i,1,U.IgnoreOverlays|U.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof W)t=t.children[0];else break}return!1}}class bu{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(t=i.tree.prop(Ps))!==null&&t!==void 0?t:i.to,this.inner=new Do(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(Ps))!==null&&e!==void 0?e:t.to,this.inner=new Do(t.tree,-t.offset)}}findMounts(e,t){var i;let s=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let r=this.inner.cursor.node;r;r=r.parent){let o=(i=r.tree)===null||i===void 0?void 0:i.prop(P.mounted);if(o&&o.parser==t)for(let l=this.fragI;l=r.to)break;h.tree==this.curFrag.tree&&s.push({frag:h,pos:r.from-h.offset,mount:o})}}}return s}}function Oo(n,e){let t=null,i=e;for(let s=1,r=0;s=l)break;h.to<=o||(t||(i=t=e.slice()),h.froml&&t.splice(r+1,0,new De(l,h.to))):h.to>l?t[r--]=new De(l,h.to):t.splice(r--,1))}}return i}function wu(n,e,t,i){let s=0,r=0,o=!1,l=!1,h=-1e9,a=[];for(;;){let c=s==n.length?1e9:o?n[s].to:n[s].from,f=r==e.length?1e9:l?e[r].to:e[r].from;if(o!=l){let u=Math.max(h,t),d=Math.min(c,f,i);unew De(u.from+i,u.to+i)),f=wu(e,c,h,a);for(let u=0,d=h;;u++){let p=u==f.length,g=p?a:f[u].from;if(g>d&&t.push(new Xe(d,g,s.tree,-o,r.from>=d||r.openStart,r.to<=g||r.openEnd)),p)break;d=f[u].to}}else t.push(new Xe(h,a,s.tree,-o,r.from>=o||r.openStart,r.to<=l||r.openEnd))}return t}let xu=0;class We{constructor(e,t,i){this.set=e,this.base=t,this.modified=i,this.id=xu++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let t=new We([],null,[]);if(t.set.push(t),e)for(let i of e.set)t.set.push(i);return t}static defineModifier(){let e=new an;return t=>t.modified.indexOf(e)>-1?t:an.get(t.base||t,t.modified.concat(e).sort((i,s)=>i.id-s.id))}}let ku=0;class an{constructor(){this.instances=[],this.id=ku++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(l=>l.base==e&&Su(t,l.modified));if(i)return i;let s=[],r=new We(s,e,t);for(let l of t)l.instances.push(r);let o=vu(t);for(let l of e.set)if(!l.modified.length)for(let h of o)s.push(an.get(l,h));return r}}function Su(n,e){return n.length==e.length&&n.every((t,i)=>t==e[i])}function vu(n){let e=[[]];for(let t=0;ti.length-t.length)}function Cu(n){let e=Object.create(null);for(let t in n){let i=n[t];Array.isArray(i)||(i=[i]);for(let s of t.split(" "))if(s){let r=[],o=2,l=s;for(let f=0;;){if(l=="..."&&f>0&&f+3==s.length){o=1;break}let u=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!u)throw new RangeError("Invalid path: "+s);if(r.push(u[0]=="*"?"":u[0][0]=='"'?JSON.parse(u[0]):u[0]),f+=u[0].length,f==s.length)break;let d=s[f++];if(f==s.length&&d=="!"){o=0;break}if(d!="/")throw new RangeError("Invalid path: "+s);l=s.slice(f)}let h=r.length-1,a=r[h];if(!a)throw new RangeError("Invalid path: "+s);let c=new cn(i,o,h>0?r.slice(0,h):null);e[a]=c.sort(e[a])}}return Oh.add(e)}const Oh=new P;class cn{constructor(e,t,i,s){this.tags=e,this.mode=t,this.context=i,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let o=s;for(let l of r)for(let h of l.set){let a=t[h.id];if(a){o=o?o+" "+a:a;break}}return o},scope:i}}function Au(n,e){let t=null;for(let i of n){let s=i.style(e);s&&(t=t?t+" "+s:s)}return t}function Mu(n,e,t,i=0,s=n.length){let r=new Du(i,Array.isArray(e)?e:[e],t);r.highlightRange(n.cursor(),i,s,"",r.highlighters),r.flush(s)}class Du{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,i,s,r){let{type:o,from:l,to:h}=e;if(l>=i||h<=t)return;o.isTop&&(r=this.highlighters.filter(d=>!d.scope||d.scope(o)));let a=s,c=Ou(e)||cn.empty,f=Au(r,c.tags);if(f&&(a&&(a+=" "),a+=f,c.mode==1&&(s+=(s?" ":"")+f)),this.startSpan(e.from,a),c.opaque)return;let u=e.tree&&e.tree.prop(P.mounted);if(u&&u.overlay){let d=e.node.enter(u.overlay[0].from+l,1),p=this.highlighters.filter(m=>!m.scope||m.scope(u.tree.type)),g=e.firstChild();for(let m=0,y=l;;m++){let v=m=D||!e.nextSibling())););if(!v||D>i)break;y=v.to+l,y>t&&(this.highlightRange(d.cursor(),Math.max(t,v.from+l),Math.min(i,y),s,p),this.startSpan(y,a))}g&&e.parent()}else if(e.firstChild()){do if(!(e.to<=t)){if(e.from>=i)break;this.highlightRange(e,t,i,s,r),this.startSpan(Math.min(i,e.to),a)}while(e.nextSibling());e.parent()}}}function Ou(n){let e=n.type.prop(Oh);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const w=We.define,Ni=w(),Qe=w(),Bo=w(Qe),Po=w(Qe),Ze=w(),Fi=w(Ze),Kn=w(Ze),Ve=w(),dt=w(Ve),Ne=w(),Fe=w(),Rs=w(),_t=w(Rs),Vi=w(),k={comment:Ni,lineComment:w(Ni),blockComment:w(Ni),docComment:w(Ni),name:Qe,variableName:w(Qe),typeName:Bo,tagName:w(Bo),propertyName:Po,attributeName:w(Po),className:w(Qe),labelName:w(Qe),namespace:w(Qe),macroName:w(Qe),literal:Ze,string:Fi,docString:w(Fi),character:w(Fi),attributeValue:w(Fi),number:Kn,integer:w(Kn),float:w(Kn),bool:w(Ze),regexp:w(Ze),escape:w(Ze),color:w(Ze),url:w(Ze),keyword:Ne,self:w(Ne),null:w(Ne),atom:w(Ne),unit:w(Ne),modifier:w(Ne),operatorKeyword:w(Ne),controlKeyword:w(Ne),definitionKeyword:w(Ne),moduleKeyword:w(Ne),operator:Fe,derefOperator:w(Fe),arithmeticOperator:w(Fe),logicOperator:w(Fe),bitwiseOperator:w(Fe),compareOperator:w(Fe),updateOperator:w(Fe),definitionOperator:w(Fe),typeOperator:w(Fe),controlOperator:w(Fe),punctuation:Rs,separator:w(Rs),bracket:_t,angleBracket:w(_t),squareBracket:w(_t),paren:w(_t),brace:w(_t),content:Ve,heading:dt,heading1:w(dt),heading2:w(dt),heading3:w(dt),heading4:w(dt),heading5:w(dt),heading6:w(dt),contentSeparator:w(Ve),list:w(Ve),quote:w(Ve),emphasis:w(Ve),strong:w(Ve),link:w(Ve),monospace:w(Ve),strikethrough:w(Ve),inserted:w(),deleted:w(),changed:w(),invalid:w(),meta:Vi,documentMeta:w(Vi),annotation:w(Vi),processingInstruction:w(Vi),definition:We.defineModifier(),constant:We.defineModifier(),function:We.defineModifier(),standard:We.defineModifier(),local:We.defineModifier(),special:We.defineModifier()};Th([{tag:k.link,class:"tok-link"},{tag:k.heading,class:"tok-heading"},{tag:k.emphasis,class:"tok-emphasis"},{tag:k.strong,class:"tok-strong"},{tag:k.keyword,class:"tok-keyword"},{tag:k.atom,class:"tok-atom"},{tag:k.bool,class:"tok-bool"},{tag:k.url,class:"tok-url"},{tag:k.labelName,class:"tok-labelName"},{tag:k.inserted,class:"tok-inserted"},{tag:k.deleted,class:"tok-deleted"},{tag:k.literal,class:"tok-literal"},{tag:k.string,class:"tok-string"},{tag:k.number,class:"tok-number"},{tag:[k.regexp,k.escape,k.special(k.string)],class:"tok-string2"},{tag:k.variableName,class:"tok-variableName"},{tag:k.local(k.variableName),class:"tok-variableName tok-local"},{tag:k.definition(k.variableName),class:"tok-variableName tok-definition"},{tag:k.special(k.variableName),class:"tok-variableName2"},{tag:k.definition(k.propertyName),class:"tok-propertyName tok-definition"},{tag:k.typeName,class:"tok-typeName"},{tag:k.namespace,class:"tok-namespace"},{tag:k.className,class:"tok-className"},{tag:k.macroName,class:"tok-macroName"},{tag:k.propertyName,class:"tok-propertyName"},{tag:k.operator,class:"tok-operator"},{tag:k.comment,class:"tok-comment"},{tag:k.meta,class:"tok-meta"},{tag:k.invalid,class:"tok-invalid"},{tag:k.punctuation,class:"tok-punctuation"}]);var jn;const mt=new P;function Bh(n){return M.define({combine:n?e=>e.concat(n):void 0})}const Tu=new P;class Oe{constructor(e,t,i=[],s=""){this.data=e,this.name=s,N.prototype.hasOwnProperty("tree")||Object.defineProperty(N.prototype,"tree",{get(){return be(this)}}),this.parser=t,this.extension=[$t.of(this),N.languageData.of((r,o,l)=>{let h=Ro(r,o,l),a=h.type.prop(mt);if(!a)return[];let c=r.facet(a),f=h.type.prop(Tu);if(f){let u=h.resolve(o-h.from,l);for(let d of f)if(d.test(u,r)){let p=r.facet(d.facet);return d.type=="replace"?p:p.concat(c)}}return c})].concat(i)}isActiveAt(e,t,i=-1){return Ro(e,t,i).type.prop(mt)==this.data}findRegions(e){let t=e.facet($t);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],s=(r,o)=>{if(r.prop(mt)==this.data){i.push({from:o,to:o+r.length});return}let l=r.prop(P.mounted);if(l){if(l.tree.prop(mt)==this.data){if(l.overlay)for(let h of l.overlay)i.push({from:h.from+o,to:h.to+o});else i.push({from:o,to:o+r.length});return}else if(l.overlay){let h=i.length;if(s(l.tree,l.overlay[0].from+o),i.length>h)return}}for(let h=0;hi.isTop?t:void 0)]}),e.name)}configure(e,t){return new Ls(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function be(n){let e=n.field(Oe.state,!1);return e?e.tree:W.empty}class Bu{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let i=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}}let Xt=null;class zt{constructor(e,t,i=[],s,r,o,l,h){this.parser=e,this.state=t,this.fragments=i,this.tree=s,this.treeLen=r,this.viewport=o,this.skipped=l,this.scheduleOn=h,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new zt(e,t,[],W.empty,0,i,[],null)}startParse(){return this.parser.startParse(new Bu(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=W.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let s=Date.now()+e;e=()=>Date.now()>s}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Xe.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Xt;Xt=this;try{return e()}finally{Xt=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Lo(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:s,treeLen:r,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let h=[];if(e.iterChangedRanges((a,c,f,u)=>h.push({fromA:a,toA:c,fromB:f,toB:u})),i=Xe.applyChanges(i,h),s=W.empty,r=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let a of this.skipped){let c=e.mapPos(a.from,1),f=e.mapPos(a.to,-1);ce.from&&(this.fragments=Lo(this.fragments,s,r),this.skipped.splice(i--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Dh{createParse(t,i,s){let r=s[0].from,o=s[s.length-1].to;return{parsedPos:r,advance(){let h=Xt;if(h){for(let a of s)h.tempSkipped.push(a);e&&(h.scheduleOn=h.scheduleOn?Promise.all([h.scheduleOn,e]):e)}return this.parsedPos=o,new W(ye.none,[],[],o-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Xt}}function Lo(n,e,t){return Xe.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class qt{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new qt(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=zt.create(e.facet($t).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new qt(i)}}Oe.state=we.define({create:qt.init,update(n,e){for(let t of e.effects)if(t.is(Oe.setState))return t.value;return e.startState.facet($t)!=e.state.facet($t)?qt.init(e.state):n.apply(e)}});let Ph=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Ph=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:500-100})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const Un=typeof navigator<"u"&&(!((jn=navigator.scheduling)===null||jn===void 0)&&jn.isInputPending)?()=>navigator.scheduling.isInputPending():null,Pu=me.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Oe.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),e.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Oe.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=Ph(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnds+1e3,h=r.context.work(()=>Un&&Un()||Date.now()>o,s+(l?0:1e5));this.chunkBudget-=Date.now()-t,(h||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:Oe.setState.of(new qt(r.context))})),this.chunkBudget>0&&!(h&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Le(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),$t=M.define({combine(n){return n.length?n[0]:null},enables:n=>[Oe.state,Pu,O.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class Ig{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const Rh=M.define(),An=M.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function vt(n){let e=n.facet(An);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function fn(n,e){let t="",i=n.tabSize,s=n.facet(An)[0];if(s==" "){for(;e>=i;)t+=" ",e-=i;s=" "}for(let r=0;r=i.from&&s<=i.to?r&&s==e?{text:"",from:e}:(t<0?s-1&&(r+=o-this.countColumn(i,i.search(/\S|$/))),r}countColumn(e,t=e.length){return yi(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:i,from:s}=this.lineAt(e,t),r=this.options.overrideIndentation;if(r){let o=r(s);if(o>-1)return o}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Ru=new P;function Lu(n,e,t){return Eh(e.resolveInner(t).enterUnfinishedNodesBefore(t),t,n)}function Eu(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function Iu(n){let e=n.type.prop(Ru);if(e)return e;let t=n.firstChild,i;if(t&&(i=t.type.prop(P.closedBy))){let s=n.lastChild,r=s&&i.indexOf(s.name)>-1;return o=>Ih(o,!0,1,void 0,r&&!Eu(o)?s.from:void 0)}return n.parent==null?Nu:null}function Eh(n,e,t){for(;n;n=n.parent){let i=Iu(n);if(i)return i(rr.create(t,e,n))}return null}function Nu(){return 0}class rr extends Mn{constructor(e,t,i){super(e.state,e.options),this.base=e,this.pos=t,this.node=i}static create(e,t,i){return new rr(e,t,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){let e=this.state.doc.lineAt(this.node.from);for(;;){let t=this.node.resolve(e.from);for(;t.parent&&t.parent.from==t.from;)t=t.parent;if(Fu(t,this.node))break;e=this.state.doc.lineAt(t.from)}return this.lineIndent(e.from)}continue(){let e=this.node.parent;return e?Eh(e,this.pos,this.base):0}}function Fu(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function Vu(n){let e=n.node,t=e.childAfter(e.from),i=e.lastChild;if(!t)return null;let s=n.options.simulateBreak,r=n.state.doc.lineAt(t.from),o=s==null||s<=r.from?r.to:Math.min(r.to,s);for(let l=t.to;;){let h=e.childAfter(l);if(!h||h==i)return null;if(!h.type.isSkipped)return h.fromIh(i,e,t,n)}function Ih(n,e,t,i,s){let r=n.textAfter,o=r.match(/^\s*/)[0].length,l=i&&r.slice(o,o+i.length)==i||s==n.pos+o,h=e?Vu(n):null;return h?l?n.column(h.from):n.column(h.to):n.baseIndent+(l?0:n.unit*t)}const Fg=n=>n.baseIndent;function Vg({except:n,units:e=1}={}){return t=>{let i=n&&n.test(t.textAfter);return t.baseIndent+(i?0:e*t.unit)}}const Wg=new P;function Hg(n){let e=n.firstChild,t=n.lastChild;return e&&e.tol.prop(mt)==o.data:o?l=>l==o:void 0,this.style=Th(e.map(l=>({tag:l.tag,class:l.class||s(Object.assign({},l,{tag:null}))})),{all:r}).style,this.module=i?new ot(i):null,this.themeType=t.themeType}static define(e,t){return new Dn(e,t||{})}}const Es=M.define(),Nh=M.define({combine(n){return n.length?[n[0]]:null}});function Gn(n){let e=n.facet(Es);return e.length?e:n.facet(Nh)}function zg(n,e){let t=[Hu],i;return n instanceof Dn&&(n.module&&t.push(O.styleModule.of(n.module)),i=n.themeType),e!=null&&e.fallback?t.push(Nh.of(n)):i?t.push(Es.computeN([O.darkTheme],s=>s.facet(O.darkTheme)==(i=="dark")?[n]:[])):t.push(Es.of(n)),t}class Wu{constructor(e){this.markCache=Object.create(null),this.tree=be(e.state),this.decorations=this.buildDeco(e,Gn(e.state))}update(e){let t=be(e.state),i=Gn(e.state),s=i!=Gn(e.startState);t.length{i.add(o,l,this.markCache[h]||(this.markCache[h]=T.mark({class:h})))},s,r);return i.finish()}}const Hu=Ct.high(me.fromClass(Wu,{decorations:n=>n.decorations})),qg=Dn.define([{tag:k.meta,color:"#404740"},{tag:k.link,textDecoration:"underline"},{tag:k.heading,textDecoration:"underline",fontWeight:"bold"},{tag:k.emphasis,fontStyle:"italic"},{tag:k.strong,fontWeight:"bold"},{tag:k.strikethrough,textDecoration:"line-through"},{tag:k.keyword,color:"#708"},{tag:[k.atom,k.bool,k.url,k.contentSeparator,k.labelName],color:"#219"},{tag:[k.literal,k.inserted],color:"#164"},{tag:[k.string,k.deleted],color:"#a11"},{tag:[k.regexp,k.escape,k.special(k.string)],color:"#e40"},{tag:k.definition(k.variableName),color:"#00f"},{tag:k.local(k.variableName),color:"#30a"},{tag:[k.typeName,k.namespace],color:"#085"},{tag:k.className,color:"#167"},{tag:[k.special(k.variableName),k.macroName],color:"#256"},{tag:k.definition(k.propertyName),color:"#00c"},{tag:k.comment,color:"#940"},{tag:k.invalid,color:"#f00"}]),zu=O.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Fh=1e4,Vh="()[]{}",Wh=M.define({combine(n){return At(n,{afterCursor:!0,brackets:Vh,maxScanDistance:Fh,renderMatch:Ku})}}),qu=T.mark({class:"cm-matchingBracket"}),$u=T.mark({class:"cm-nonmatchingBracket"});function Ku(n){let e=[],t=n.matched?qu:$u;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const ju=we.define({create(){return T.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],i=e.state.facet(Wh);for(let s of e.state.selection.ranges){if(!s.empty)continue;let r=qe(e.state,s.head,-1,i)||s.head>0&&qe(e.state,s.head-1,1,i)||i.afterCursor&&(qe(e.state,s.head,1,i)||s.headO.decorations.from(n)}),Uu=[ju,zu];function $g(n={}){return[Wh.of(n),Uu]}const Gu=new P;function Is(n,e,t){let i=n.prop(e<0?P.openedBy:P.closedBy);if(i)return i;if(n.name.length==1){let s=t.indexOf(n.name);if(s>-1&&s%2==(e<0?1:0))return[t[s+e]]}return null}function Ns(n){let e=n.type.prop(Gu);return e?e(n.node):n}function qe(n,e,t,i={}){let s=i.maxScanDistance||Fh,r=i.brackets||Vh,o=be(n),l=o.resolveInner(e,t);for(let h=l;h;h=h.parent){let a=Is(h.type,t,r);if(a&&h.from0?e>=c.from&&ec.from&&e<=c.to))return Ju(n,e,t,h,c,a,r)}}return _u(n,e,t,o,l.type,s,r)}function Ju(n,e,t,i,s,r,o){let l=i.parent,h={from:s.from,to:s.to},a=0,c=l==null?void 0:l.cursor();if(c&&(t<0?c.childBefore(i.from):c.childAfter(i.to)))do if(t<0?c.to<=i.from:c.from>=i.to){if(a==0&&r.indexOf(c.type.name)>-1&&c.from0)return null;let a={from:t<0?e-1:e,to:t>0?e+1:e},c=n.doc.iterRange(e,t>0?n.doc.length:0),f=0;for(let u=0;!c.next().done&&u<=r;){let d=c.value;t<0&&(u+=d.length);let p=e+u*t;for(let g=t>0?0:d.length-1,m=t>0?d.length:-1;g!=m;g+=t){let y=o.indexOf(d[g]);if(!(y<0||i.resolveInner(p+g,1).type!=s))if(y%2==0==t>0)f++;else{if(f==1)return{start:a,end:{from:p+g,to:p+g+1},matched:y>>1==h>>1};f--}}t>0&&(u+=d.length)}return c.done?{start:a,matched:!1}:null}function Eo(n,e,t,i=0,s=0){e==null&&(e=n.search(/[^\s\u00a0]/),e==-1&&(e=n.length));let r=s;for(let o=i;o=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.post}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPosi?o.toLowerCase():o,r=this.string.substr(this.pos,e.length);return s(r)==s(e)?(t!==!1&&(this.pos+=e.length),!0):null}else{let s=this.string.slice(this.pos).match(e);return s&&s.index>0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}}current(){return this.string.slice(this.start,this.pos)}}function Xu(n){return{name:n.name||"",token:n.token,blankLine:n.blankLine||(()=>{}),startState:n.startState||(()=>!0),copyState:n.copyState||Yu,indent:n.indent||(()=>null),languageData:n.languageData||{},tokenTable:n.tokenTable||lr}}function Yu(n){if(typeof n!="object")return n;let e={};for(let t in n){let i=n[t];e[t]=i instanceof Array?i.slice():i}return e}const Io=new WeakMap;class zh extends Oe{constructor(e){let t=Bh(e.languageData),i=Xu(e),s,r=new class extends Dh{createParse(o,l,h){return new Zu(s,o,l,h)}};super(t,r,[Rh.of((o,l)=>this.getIndent(o,l))],e.name),this.topNode=id(t),s=this,this.streamParser=i,this.stateAfter=new P({perNode:!0}),this.tokenTable=e.tokenTable?new jh(i.tokenTable):td}static define(e){return new zh(e)}getIndent(e,t){let i=be(e.state),s=i.resolve(t);for(;s&&s.type!=this.topNode;)s=s.parent;if(!s)return null;let r,{overrideIndentation:o}=e.options;o&&(r=Io.get(e.state),r!=null&&r1e4)return null;for(;h=i&&t+e.length<=s&&e.prop(n.stateAfter);if(r)return{state:n.streamParser.copyState(r),pos:t+e.length};for(let o=e.children.length-1;o>=0;o--){let l=e.children[o],h=t+e.positions[o],a=l instanceof W&&h=e.length)return e;!s&&e.type==n.topNode&&(s=!0);for(let r=e.children.length-1;r>=0;r--){let o=e.positions[r],l=e.children[r],h;if(ot&&or(n,s.tree,0-s.offset,t,o),h;if(l&&(h=qh(n,s.tree,t+s.offset,l.pos+s.offset,!1)))return{state:l.state,tree:h}}return{state:n.streamParser.startState(i?vt(i):4),tree:W.empty}}class Zu{constructor(e,t,i,s){this.lang=e,this.input=t,this.fragments=i,this.ranges=s,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=s[s.length-1].to;let r=zt.get(),o=s[0].from,{state:l,tree:h}=Qu(e,i,o,r==null?void 0:r.state);this.state=l,this.parsedPos=this.chunkStart=o+h.length;for(let a=0;a=t?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,t),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let t=this.input.chunk(e);if(this.input.lineChunks)t==` +`&&(t="");else{let i=t.indexOf(` +`);i>-1&&(t=t.slice(0,i))}return e+t.length<=this.to?t:t.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,t=this.lineAfter(e),i=e+t.length;for(let s=this.rangeIndex;;){let r=this.ranges[s].to;if(r>=i||(t=t.slice(0,r-(i-t.length)),s++,s==this.ranges.length))break;let o=this.ranges[s].from,l=this.lineAfter(o);t+=l,i=o+l.length}return{line:t,end:i}}skipGapsTo(e,t,i){for(;;){let s=this.ranges[this.rangeIndex].to,r=e+t;if(i>0?s>r:s>=r)break;let o=this.ranges[++this.rangeIndex].from;t+=o-s}return t}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){r=this.skipGapsTo(t,r,1),t+=r;let o=this.chunk.length;r=this.skipGapsTo(i,r,-1),i+=r,s+=this.chunk.length-o}return this.chunk.push(e,t,i,s),r}parseLine(e){let{line:t,end:i}=this.nextLine(),s=0,{streamParser:r}=this.lang,o=new Hh(t,e?e.state.tabSize:4,e?vt(e.state):2);if(o.eol())r.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let l=$h(r.token,o,this.state);if(l&&(s=this.emitToken(this.lang.tokenTable.resolve(l),this.parsedPos+o.start,this.parsedPos+o.pos,4,s)),o.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPose.start)return s}throw new Error("Stream parser failed to advance stream.")}const lr=Object.create(null),di=[ye.none],ed=new tr(di),No=[],Kh=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])Kh[n]=Uh(lr,e);class jh{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),Kh)}resolve(e){return e?this.table[e]||(this.table[e]=Uh(this.extra,e)):0}}const td=new jh(lr);function Jn(n,e){No.indexOf(n)>-1||(No.push(n),console.warn(e))}function Uh(n,e){let t=null;for(let r of e.split(".")){let o=n[r]||k[r];o?typeof o=="function"?t?t=o(t):Jn(r,`Modifier ${r} used at start of tag`):t?Jn(r,`Tag ${r} used as modifier`):t=o:Jn(r,`Unknown highlighting tag ${r}`)}if(!t)return 0;let i=e.replace(/ /g,"_"),s=ye.define({id:di.length,name:i,props:[Cu({[i]:t})]});return di.push(s),s.id}function id(n){let e=ye.define({id:di.length,name:"Document",props:[mt.add(()=>n)]});return di.push(e),e}const nd=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.head),i=ar(n.state,t.from);return i.line?sd(n):i.block?od(n):!1};function hr(n,e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let s=n(e,t);return s?(i(t.update(s)),!0):!1}}const sd=hr(ad,0),rd=hr(Gh,0),od=hr((n,e)=>Gh(n,e,hd(e)),0);function ar(n,e){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const Yt=50;function ld(n,{open:e,close:t},i,s){let r=n.sliceDoc(i-Yt,i),o=n.sliceDoc(s,s+Yt),l=/\s*$/.exec(r)[0].length,h=/^\s*/.exec(o)[0].length,a=r.length-l;if(r.slice(a-e.length,a)==e&&o.slice(h,h+t.length)==t)return{open:{pos:i-l,margin:l&&1},close:{pos:s+h,margin:h&&1}};let c,f;s-i<=2*Yt?c=f=n.sliceDoc(i,s):(c=n.sliceDoc(i,i+Yt),f=n.sliceDoc(s-Yt,s));let u=/^\s*/.exec(c)[0].length,d=/\s*$/.exec(f)[0].length,p=f.length-d-t.length;return c.slice(u,u+e.length)==e&&f.slice(p,p+t.length)==t?{open:{pos:i+u+e.length,margin:/\s/.test(c.charAt(u+e.length))?1:0},close:{pos:s-d-t.length,margin:/\s/.test(f.charAt(p-1))?1:0}}:null}function hd(n){let e=[];for(let t of n.selection.ranges){let i=n.doc.lineAt(t.from),s=t.to<=i.to?i:n.doc.lineAt(t.to),r=e.length-1;r>=0&&e[r].to>i.from?e[r].to=s.to:e.push({from:i.from,to:s.to})}return e}function Gh(n,e,t=e.selection.ranges){let i=t.map(r=>ar(e,r.from).block);if(!i.every(r=>r))return null;let s=t.map((r,o)=>ld(e,i[o],r.from,r.to));if(n!=2&&!s.every(r=>r))return{changes:e.changes(t.map((r,o)=>s[o]?[]:[{from:r.from,insert:i[o].open+" "},{from:r.to,insert:" "+i[o].close}]))};if(n!=1&&s.some(r=>r)){let r=[];for(let o=0,l;os&&(r==o||o>c.from)){s=c.from;let f=ar(e,c.from).line;if(!f)continue;let u=/^\s*/.exec(c.text)[0].length,d=u==c.length,p=c.text.slice(u,u+f.length)==f?u:-1;ur.comment<0&&(!r.empty||r.single))){let r=[];for(let{line:l,token:h,indent:a,empty:c,single:f}of i)(f||!c)&&r.push({from:l.from+a,insert:h+" "});let o=e.changes(r);return{changes:o,selection:e.selection.map(o,1)}}else if(n!=1&&i.some(r=>r.comment>=0)){let r=[];for(let{line:o,comment:l,token:h}of i)if(l>=0){let a=o.from+l,c=a+h.length;o.text[c-o.from]==" "&&c++,r.push({from:a,to:c})}return{changes:r}}return null}const Fs=at.define(),cd=at.define(),fd=M.define(),Jh=M.define({combine(n){return At(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(i,s)=>e(i,s)||t(i,s)})}});function ud(n){let e=0;return n.iterChangedRanges((t,i)=>e=i),e}const _h=we.define({create(){return $e.empty},update(n,e){let t=e.state.facet(Jh),i=e.annotation(Fs);if(i){let h=e.docChanged?b.single(ud(e.changes)):void 0,a=ke.fromTransaction(e,h),c=i.side,f=c==0?n.undone:n.done;return a?f=un(f,f.length,t.minDepth,a):f=Qh(f,e.startState.selection),new $e(c==0?i.rest:f,c==0?f:i.rest)}let s=e.annotation(cd);if((s=="full"||s=="before")&&(n=n.isolate()),e.annotation(Z.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let r=ke.fromTransaction(e),o=e.annotation(Z.time),l=e.annotation(Z.userEvent);return r?n=n.addChanges(r,o,l,t,e):e.selection&&(n=n.addSelection(e.startState.selection,o,l,t.newGroupDelay)),(s=="full"||s=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new $e(n.done.map(ke.fromJSON),n.undone.map(ke.fromJSON))}});function Kg(n={}){return[_h,Jh.of(n),O.domEventHandlers({beforeinput(e,t){let i=e.inputType=="historyUndo"?Xh:e.inputType=="historyRedo"?Vs:null;return i?(e.preventDefault(),i(t)):!1}})]}function On(n,e){return function({state:t,dispatch:i}){if(!e&&t.readOnly)return!1;let s=t.field(_h,!1);if(!s)return!1;let r=s.pop(n,t,e);return r?(i(r),!0):!1}}const Xh=On(0,!1),Vs=On(1,!1),dd=On(0,!0),pd=On(1,!0);class ke{constructor(e,t,i,s,r){this.changes=e,this.effects=t,this.mapped=i,this.startSelection=s,this.selectionsAfter=r}setSelAfter(e){return new ke(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(s=>s.toJSON())}}static fromJSON(e){return new ke(e.changes&&Q.fromJSON(e.changes),[],e.mapped&&Ke.fromJSON(e.mapped),e.startSelection&&b.fromJSON(e.startSelection),e.selectionsAfter.map(b.fromJSON))}static fromTransaction(e,t){let i=Te;for(let s of e.startState.facet(fd)){let r=s(e);r.length&&(i=i.concat(r))}return!i.length&&e.changes.empty?null:new ke(e.changes.invert(e.startState.doc),i,void 0,t||e.startState.selection,Te)}static selection(e){return new ke(void 0,Te,void 0,void 0,e)}}function un(n,e,t,i){let s=e+1>t+20?e-t-1:0,r=n.slice(s,e);return r.push(i),r}function gd(n,e){let t=[],i=!1;return n.iterChangedRanges((s,r)=>t.push(s,r)),e.iterChangedRanges((s,r,o,l)=>{for(let h=0;h=a&&o<=c&&(i=!0)}}),i}function md(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,i)=>t.empty!=e.ranges[i].empty).length===0}function Yh(n,e){return n.length?e.length?n.concat(e):n:e}const Te=[],yd=200;function Qh(n,e){if(n.length){let t=n[n.length-1],i=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-yd));return i.length&&i[i.length-1].eq(e)?n:(i.push(e),un(n,n.length-1,1e9,t.setSelAfter(i)))}else return[ke.selection([e])]}function bd(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function _n(n,e){if(!n.length)return n;let t=n.length,i=Te;for(;t;){let s=wd(n[t-1],e,i);if(s.changes&&!s.changes.empty||s.effects.length){let r=n.slice(0,t);return r[t-1]=s,r}else e=s.mapped,t--,i=s.selectionsAfter}return i.length?[ke.selection(i)]:Te}function wd(n,e,t){let i=Yh(n.selectionsAfter.length?n.selectionsAfter.map(l=>l.map(e)):Te,t);if(!n.changes)return ke.selection(i);let s=n.changes.map(e),r=e.mapDesc(n.changes,!0),o=n.mapped?n.mapped.composeDesc(r):r;return new ke(s,E.mapEffects(n.effects,e),o,n.startSelection.map(r),i)}const xd=/^(input\.type|delete)($|\.)/;class $e{constructor(e,t,i=0,s=void 0){this.done=e,this.undone=t,this.prevTime=i,this.prevUserEvent=s}isolate(){return this.prevTime?new $e(this.done,this.undone):this}addChanges(e,t,i,s,r){let o=this.done,l=o[o.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!i||xd.test(i))&&(!l.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?n.moveByChar(t,e):Tn(t,e))}function ce(n){return n.textDirectionAt(n.state.selection.main.head)==J.LTR}const ea=n=>Zh(n,!ce(n)),ta=n=>Zh(n,ce(n));function ia(n,e){return Ee(n,t=>t.empty?n.moveByGroup(t,e):Tn(t,e))}const kd=n=>ia(n,!ce(n)),Sd=n=>ia(n,ce(n));function vd(n,e,t){if(e.type.prop(t))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Bn(n,e,t){let i=be(n).resolveInner(e.head),s=t?P.closedBy:P.openedBy;for(let h=e.head;;){let a=t?i.childAfter(h):i.childBefore(h);if(!a)break;vd(n,a,s)?i=a:h=t?a.to:a.from}let r=i.type.prop(s),o,l;return r&&(o=t?qe(n,i.from,1):qe(n,i.to,-1))&&o.matched?l=t?o.end.to:o.end.from:l=t?i.to:i.from,b.cursor(l,t?-1:1)}const Cd=n=>Ee(n,e=>Bn(n.state,e,!ce(n))),Ad=n=>Ee(n,e=>Bn(n.state,e,ce(n)));function na(n,e){return Ee(n,t=>{if(!t.empty)return Tn(t,e);let i=n.moveVertically(t,e);return i.head!=t.head?i:n.moveToLineBoundary(t,e)})}const sa=n=>na(n,!1),ra=n=>na(n,!0);function oa(n){let e=n.scrollDOM.clientHeighto.empty?n.moveVertically(o,e,t.height):Tn(o,e));if(s.eq(i.selection))return!1;let r;if(t.selfScroll){let o=n.coordsAtPos(i.selection.main.head),l=n.scrollDOM.getBoundingClientRect(),h=l.top+t.marginTop,a=l.bottom-t.marginBottom;o&&o.top>h&&o.bottomla(n,!1),Ws=n=>la(n,!0);function ft(n,e,t){let i=n.lineBlockAt(e.head),s=n.moveToLineBoundary(e,t);if(s.head==e.head&&s.head!=(t?i.to:i.from)&&(s=n.moveToLineBoundary(e,t,!1)),!t&&s.head==i.from&&i.length){let r=/^\s*/.exec(n.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;r&&e.head!=i.from+r&&(s=b.cursor(i.from+r))}return s}const Md=n=>Ee(n,e=>ft(n,e,!0)),Dd=n=>Ee(n,e=>ft(n,e,!1)),Od=n=>Ee(n,e=>ft(n,e,!ce(n))),Td=n=>Ee(n,e=>ft(n,e,ce(n))),Bd=n=>Ee(n,e=>b.cursor(n.lineBlockAt(e.head).from,1)),Pd=n=>Ee(n,e=>b.cursor(n.lineBlockAt(e.head).to,-1));function Rd(n,e,t){let i=!1,s=jt(n.selection,r=>{let o=qe(n,r.head,-1)||qe(n,r.head,1)||r.head>0&&qe(n,r.head-1,1)||r.headRd(n,e,!1);function Re(n,e){let t=jt(n.state.selection,i=>{let s=e(i);return b.range(i.anchor,s.head,s.goalColumn,s.bidiLevel||void 0)});return t.eq(n.state.selection)?!1:(n.dispatch(Ge(n.state,t)),!0)}function ha(n,e){return Re(n,t=>n.moveByChar(t,e))}const aa=n=>ha(n,!ce(n)),ca=n=>ha(n,ce(n));function fa(n,e){return Re(n,t=>n.moveByGroup(t,e))}const Ed=n=>fa(n,!ce(n)),Id=n=>fa(n,ce(n)),Nd=n=>Re(n,e=>Bn(n.state,e,!ce(n))),Fd=n=>Re(n,e=>Bn(n.state,e,ce(n)));function ua(n,e){return Re(n,t=>n.moveVertically(t,e))}const da=n=>ua(n,!1),pa=n=>ua(n,!0);function ga(n,e){return Re(n,t=>n.moveVertically(t,e,oa(n).height))}const Vo=n=>ga(n,!1),Wo=n=>ga(n,!0),Vd=n=>Re(n,e=>ft(n,e,!0)),Wd=n=>Re(n,e=>ft(n,e,!1)),Hd=n=>Re(n,e=>ft(n,e,!ce(n))),zd=n=>Re(n,e=>ft(n,e,ce(n))),qd=n=>Re(n,e=>b.cursor(n.lineBlockAt(e.head).from)),$d=n=>Re(n,e=>b.cursor(n.lineBlockAt(e.head).to)),Ho=({state:n,dispatch:e})=>(e(Ge(n,{anchor:0})),!0),zo=({state:n,dispatch:e})=>(e(Ge(n,{anchor:n.doc.length})),!0),qo=({state:n,dispatch:e})=>(e(Ge(n,{anchor:n.selection.main.anchor,head:0})),!0),$o=({state:n,dispatch:e})=>(e(Ge(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),Kd=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),jd=({state:n,dispatch:e})=>{let t=Rn(n).map(({from:i,to:s})=>b.range(i,Math.min(s+1,n.doc.length)));return e(n.update({selection:b.create(t),userEvent:"select"})),!0},Ud=({state:n,dispatch:e})=>{let t=jt(n.selection,i=>{var s;let r=be(n).resolveInner(i.head,1);for(;!(r.from=i.to||r.to>i.to&&r.from<=i.from||!(!((s=r.parent)===null||s===void 0)&&s.parent));)r=r.parent;return b.range(r.to,r.from)});return e(Ge(n,t)),!0},Gd=({state:n,dispatch:e})=>{let t=n.selection,i=null;return t.ranges.length>1?i=b.create([t.main]):t.main.empty||(i=b.create([b.cursor(t.main.head)])),i?(e(Ge(n,i)),!0):!1};function Pn(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:i}=n,s=i.changeByRange(r=>{let{from:o,to:l}=r;if(o==l){let h=e(o);ho&&(t="delete.forward",h=Wi(n,h,!0)),o=Math.min(o,h),l=Math.max(l,h)}else o=Wi(n,o,!1),l=Wi(n,l,!0);return o==l?{range:r}:{changes:{from:o,to:l},range:b.cursor(o)}});return s.changes.empty?!1:(n.dispatch(i.update(s,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?O.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function Wi(n,e,t){if(n instanceof O)for(let i of n.state.facet(O.atomicRanges).map(s=>s(n)))i.between(e,e,(s,r)=>{se&&(e=t?r:s)});return e}const ma=(n,e)=>Pn(n,t=>{let{state:i}=n,s=i.doc.lineAt(t),r,o;if(!e&&t>s.from&&tma(n,!1),ya=n=>ma(n,!0),ba=(n,e)=>Pn(n,t=>{let i=t,{state:s}=n,r=s.doc.lineAt(i),o=s.charCategorizer(i);for(let l=null;;){if(i==(e?r.to:r.from)){i==t&&r.number!=(e?s.doc.lines:1)&&(i+=e?1:-1);break}let h=de(r.text,i-r.from,e)+r.from,a=r.text.slice(Math.min(i,h)-r.from,Math.max(i,h)-r.from),c=o(a);if(l!=null&&c!=l)break;(a!=" "||i!=t)&&(l=c),i=h}return i}),wa=n=>ba(n,!1),Jd=n=>ba(n,!0),xa=n=>Pn(n,e=>{let t=n.lineBlockAt(e).to;return ePn(n,e=>{let t=n.lineBlockAt(e).from;return e>t?t:Math.max(0,e-1)}),Xd=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:I.of(["",""])},range:b.cursor(i.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},Yd=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>{if(!i.empty||i.from==0||i.from==n.doc.length)return{range:i};let s=i.from,r=n.doc.lineAt(s),o=s==r.from?s-1:de(r.text,s-r.from,!1)+r.from,l=s==r.to?s+1:de(r.text,s-r.from,!0)+r.from;return{changes:{from:o,to:l,insert:n.doc.slice(s,l).append(n.doc.slice(o,s))},range:b.cursor(l)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Rn(n){let e=[],t=-1;for(let i of n.selection.ranges){let s=n.doc.lineAt(i.from),r=n.doc.lineAt(i.to);if(!i.empty&&i.to==r.from&&(r=n.doc.lineAt(i.to-1)),t>=s.number){let o=e[e.length-1];o.to=r.to,o.ranges.push(i)}else e.push({from:s.from,to:r.to,ranges:[i]});t=r.number+1}return e}function ka(n,e,t){if(n.readOnly)return!1;let i=[],s=[];for(let r of Rn(n)){if(t?r.to==n.doc.length:r.from==0)continue;let o=n.doc.lineAt(t?r.to+1:r.from-1),l=o.length+1;if(t){i.push({from:r.to,to:o.to},{from:r.from,insert:o.text+n.lineBreak});for(let h of r.ranges)s.push(b.range(Math.min(n.doc.length,h.anchor+l),Math.min(n.doc.length,h.head+l)))}else{i.push({from:o.from,to:r.from},{from:r.to,insert:n.lineBreak+o.text});for(let h of r.ranges)s.push(b.range(h.anchor-l,h.head-l))}}return i.length?(e(n.update({changes:i,scrollIntoView:!0,selection:b.create(s,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Qd=({state:n,dispatch:e})=>ka(n,e,!1),Zd=({state:n,dispatch:e})=>ka(n,e,!0);function Sa(n,e,t){if(n.readOnly)return!1;let i=[];for(let s of Rn(n))t?i.push({from:s.from,insert:n.doc.slice(s.from,s.to)+n.lineBreak}):i.push({from:s.to,insert:n.lineBreak+n.doc.slice(s.from,s.to)});return e(n.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const ep=({state:n,dispatch:e})=>Sa(n,e,!1),tp=({state:n,dispatch:e})=>Sa(n,e,!0),ip=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(Rn(e).map(({from:s,to:r})=>(s>0?s--:rn.moveVertically(s,!0)).map(t);return n.dispatch({changes:t,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function np(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=be(n).resolveInner(e),i=t.childBefore(e),s=t.childAfter(e),r;return i&&s&&i.to<=e&&s.from>=e&&(r=i.type.prop(P.closedBy))&&r.indexOf(s.name)>-1&&n.doc.lineAt(i.to).from==n.doc.lineAt(s.from).from?{from:i.to,to:s.from}:null}const sp=va(!1),rp=va(!0);function va(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange(s=>{let{from:r,to:o}=s,l=e.doc.lineAt(r),h=!n&&r==o&&np(e,r);n&&(r=o=(o<=l.to?l:e.doc.lineAt(o)).to);let a=new Mn(e,{simulateBreak:r,simulateDoubleBreak:!!h}),c=Lh(a,r);for(c==null&&(c=/^\s*/.exec(e.doc.lineAt(r).text)[0].length);ol.from&&r{let s=[];for(let o=i.from;o<=i.to;){let l=n.doc.lineAt(o);l.number>t&&(i.empty||i.to>l.from)&&(e(l,s,i),t=l.number),o=l.to+1}let r=n.changes(s);return{changes:s,range:b.range(r.mapPos(i.anchor,1),r.mapPos(i.head,1))}})}const op=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),i=new Mn(n,{overrideIndentation:r=>{let o=t[r];return o??-1}}),s=cr(n,(r,o,l)=>{let h=Lh(i,r.from);if(h==null)return;/\S/.test(r.text)||(h=0);let a=/^\s*/.exec(r.text)[0],c=fn(n,h);(a!=c||l.fromn.readOnly?!1:(e(n.update(cr(n,(t,i)=>{i.push({from:t.from,insert:n.facet(An)})}),{userEvent:"input.indent"})),!0),hp=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(cr(n,(t,i)=>{let s=/^\s*/.exec(t.text)[0];if(!s)return;let r=yi(s,n.tabSize),o=0,l=fn(n,Math.max(0,r-vt(n)));for(;o({mac:n.key,run:n.run,shift:n.shift}))),Ug=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:Cd,shift:Nd},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Ad,shift:Fd},{key:"Alt-ArrowUp",run:Qd},{key:"Shift-Alt-ArrowUp",run:ep},{key:"Alt-ArrowDown",run:Zd},{key:"Shift-Alt-ArrowDown",run:tp},{key:"Escape",run:Gd},{key:"Mod-Enter",run:rp},{key:"Alt-l",mac:"Ctrl-l",run:jd},{key:"Mod-i",run:Ud,preventDefault:!0},{key:"Mod-[",run:hp},{key:"Mod-]",run:lp},{key:"Mod-Alt-\\",run:op},{key:"Shift-Mod-k",run:ip},{key:"Shift-Mod-\\",run:Ld},{key:"Mod-/",run:nd},{key:"Alt-A",run:rd}].concat(cp);function oe(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=t[i];typeof s=="string"?n.setAttribute(i,s):s!=null&&(n[i]=s)}e++}for(;en.normalize("NFKD"):n=>n;class Kt{constructor(e,t,i=0,s=e.length,r,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,s),this.bufferStart=i,this.normalize=r?l=>r(Ko(l)):Ko,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return se(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=Ks(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=Me(e);let s=this.normalize(t);for(let r=0,o=i;;r++){let l=s.charCodeAt(r),h=this.match(l,o);if(h)return this.value=h,this;if(r==s.length-1)break;o==i&&rthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let i=this.curLineStart+t.index,s=i+t[0].length;if(this.matchPos=dn(this.text,s+(i==s?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,s,t)))return this.value={from:i,to:s,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=i||s.to<=t){let l=new Nt(t,e.sliceString(t,i));return Xn.set(e,l),l}if(s.from==t&&s.to==i)return s;let{text:r,from:o}=s;return o>t&&(r=e.sliceString(t,o)+r,o=t),s.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let i=this.flat.from+t.index,s=i+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,s,t)))return this.value={from:i,to:s,match:t},this.matchPos=dn(this.text,s+(i==s?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Nt.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(Ma.prototype[Symbol.iterator]=Da.prototype[Symbol.iterator]=function(){return this});function fp(n){try{return new RegExp(n,fr),!0}catch{return!1}}function dn(n,e){if(e>=n.length)return e;let t=n.lineAt(e),i;for(;e=56320&&i<57344;)e++;return e}function zs(n){let e=oe("input",{class:"cm-textfield",name:"line"}),t=oe("form",{class:"cm-gotoLine",onkeydown:s=>{s.keyCode==27?(s.preventDefault(),n.dispatch({effects:pn.of(!1)}),n.focus()):s.keyCode==13&&(s.preventDefault(),i())},onsubmit:s=>{s.preventDefault(),i()}},oe("label",n.state.phrase("Go to line"),": ",e)," ",oe("button",{class:"cm-button",type:"submit"},n.state.phrase("go")));function i(){let s=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!s)return;let{state:r}=n,o=r.doc.lineAt(r.selection.main.head),[,l,h,a,c]=s,f=a?+a.slice(1):0,u=h?+h:o.number;if(h&&c){let p=u/100;l&&(p=p*(l=="-"?-1:1)+o.number/r.doc.lines),u=Math.round(r.doc.lines*p)}else h&&l&&(u=u*(l=="-"?-1:1)+o.number);let d=r.doc.line(Math.max(1,Math.min(r.doc.lines,u)));n.dispatch({effects:pn.of(!1),selection:b.cursor(d.from+Math.max(0,Math.min(f,d.length))),scrollIntoView:!0}),n.focus()}return{dom:t}}const pn=E.define(),jo=we.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(pn)&&(n=t.value);return n},provide:n=>on.from(n,e=>e?zs:null)}),up=n=>{let e=rn(n,zs);if(!e){let t=[pn.of(!0)];n.state.field(jo,!1)==null&&t.push(E.appendConfig.of([jo,dp])),n.dispatch({effects:t}),e=rn(n,zs)}return e&&e.dom.querySelector("input").focus(),!0},dp=O.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),pp={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Oa=M.define({combine(n){return At(n,pp,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Gg(n){let e=[wp,bp];return n&&e.push(Oa.of(n)),e}const gp=T.mark({class:"cm-selectionMatch"}),mp=T.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Uo(n,e,t,i){return(t==0||n(e.sliceDoc(t-1,t))!=$.Word)&&(i==e.doc.length||n(e.sliceDoc(i,i+1))!=$.Word)}function yp(n,e,t,i){return n(e.sliceDoc(t,t+1))==$.Word&&n(e.sliceDoc(i-1,i))==$.Word}const bp=me.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(Oa),{state:t}=n,i=t.selection;if(i.ranges.length>1)return T.none;let s=i.main,r,o=null;if(s.empty){if(!e.highlightWordAroundCursor)return T.none;let h=t.wordAt(s.head);if(!h)return T.none;o=t.charCategorizer(s.head),r=t.sliceDoc(h.from,h.to)}else{let h=s.to-s.from;if(h200)return T.none;if(e.wholeWords){if(r=t.sliceDoc(s.from,s.to),o=t.charCategorizer(s.head),!(Uo(o,t,s.from,s.to)&&yp(o,t,s.from,s.to)))return T.none}else if(r=t.sliceDoc(s.from,s.to).trim(),!r)return T.none}let l=[];for(let h of n.visibleRanges){let a=new Kt(t.doc,r,h.from,h.to);for(;!a.next().done;){let{from:c,to:f}=a.value;if((!o||Uo(o,t,c,f))&&(s.empty&&c<=s.from&&f>=s.to?l.push(mp.range(c,f)):(c>=s.to||f<=s.from)&&l.push(gp.range(c,f)),l.length>e.maxMatches))return T.none}}return T.set(l)}},{decorations:n=>n.decorations}),wp=O.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),xp=({state:n,dispatch:e})=>{let{selection:t}=n,i=b.create(t.ranges.map(s=>n.wordAt(s.head)||b.cursor(s.head)),t.mainIndex);return i.eq(t)?!1:(e(n.update({selection:i})),!0)};function kp(n,e){let{main:t,ranges:i}=n.selection,s=n.wordAt(t.head),r=s&&s.from==t.from&&s.to==t.to;for(let o=!1,l=new Kt(n.doc,e,i[i.length-1].to);;)if(l.next(),l.done){if(o)return null;l=new Kt(n.doc,e,0,Math.max(0,i[i.length-1].from-1)),o=!0}else{if(o&&i.some(h=>h.from==l.value.from))continue;if(r){let h=n.wordAt(l.value.from);if(!h||h.from!=l.value.from||h.to!=l.value.to)continue}return l.value}}const Sp=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(r=>r.from===r.to))return xp({state:n,dispatch:e});let i=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(r=>n.sliceDoc(r.from,r.to)!=i))return!1;let s=kp(n,i);return s?(e(n.update({selection:n.selection.addRange(b.range(s.from,s.to),!1),effects:O.scrollIntoView(s.to)})),!0):!1},ur=M.define({combine(n){return At(n,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:e=>new Lp(e)})}});class Ta{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||fp(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,i)=>i=="n"?` +`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Mp(this):new Cp(this)}getCursor(e,t=0,i){let s=e.doc?e:N.create({doc:e});return i==null&&(i=s.doc.length),this.regexp?Bt(this,s,t,i):Tt(this,s,t,i)}}class Ba{constructor(e){this.spec=e}}function Tt(n,e,t,i){return new Kt(e.doc,n.unquoted,t,i,n.caseSensitive?void 0:s=>s.toLowerCase(),n.wholeWord?vp(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function vp(n,e){return(t,i,s,r)=>((r>t||r+s.length=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Tt(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function Bt(n,e,t,i){return new Ma(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?Ap(e.charCategorizer(e.selection.main.head)):void 0},t,i)}function gn(n,e){return n.slice(de(n,e,!1),e)}function mn(n,e){return n.slice(e,de(n,e))}function Ap(n){return(e,t,i)=>!i[0].length||(n(gn(i.input,i.index))!=$.Word||n(mn(i.input,i.index))!=$.Word)&&(n(mn(i.input,i.index+i[0].length))!=$.Word||n(gn(i.input,i.index+i[0].length))!=$.Word)}class Mp extends Ba{nextMatch(e,t,i){let s=Bt(this.spec,e,i,e.doc.length).next();return s.done&&(s=Bt(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=1;;s++){let r=Math.max(t,i-s*1e4),o=Bt(this.spec,e,r,i),l=null;for(;!o.next().done;)l=o.value;if(l&&(r==t||l.from>r+10))return l;if(r==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(t,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Bt(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const pi=E.define(),dr=E.define(),st=we.define({create(n){return new Yn(qs(n).create(),null)},update(n,e){for(let t of e.effects)t.is(pi)?n=new Yn(t.value.create(),n.panel):t.is(dr)&&(n=new Yn(n.query,t.value?pr:null));return n},provide:n=>on.from(n,e=>e.panel)});class Yn{constructor(e,t){this.query=e,this.panel=t}}const Dp=T.mark({class:"cm-searchMatch"}),Op=T.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Tp=me.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(st))}update(n){let e=n.state.field(st);(e!=n.startState.field(st)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return T.none;let{view:t}=this,i=new xt;for(let s=0,r=t.visibleRanges,o=r.length;sr[s+1].from-2*250;)h=r[++s].to;n.highlight(t.state,l,h,(a,c)=>{let f=t.state.selection.ranges.some(u=>u.from==a&&u.to==c);i.add(a,c,f?Op:Dp)})}return i.finish()}},{decorations:n=>n.decorations});function xi(n){return e=>{let t=e.state.field(st,!1);return t&&t.query.spec.valid?n(e,t):Pa(e)}}const yn=xi((n,{query:e})=>{let{to:t}=n.state.selection.main,i=e.nextMatch(n.state,t,t);return i?(n.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:gr(n,i),userEvent:"select.search"}),!0):!1}),bn=xi((n,{query:e})=>{let{state:t}=n,{from:i}=t.selection.main,s=e.prevMatch(t,i,i);return s?(n.dispatch({selection:{anchor:s.from,head:s.to},scrollIntoView:!0,effects:gr(n,s),userEvent:"select.search"}),!0):!1}),Bp=xi((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:b.create(t.map(i=>b.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),Pp=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:i,to:s}=t.main,r=[],o=0;for(let l=new Kt(n.doc,n.sliceDoc(i,s));!l.next().done;){if(r.length>1e3)return!1;l.value.from==i&&(o=r.length),r.push(b.range(l.value.from,l.value.to))}return e(n.update({selection:b.create(r,o),userEvent:"select.search.matches"})),!0},Go=xi((n,{query:e})=>{let{state:t}=n,{from:i,to:s}=t.selection.main;if(t.readOnly)return!1;let r=e.nextMatch(t,i,i);if(!r)return!1;let o=[],l,h,a=[];if(r.from==i&&r.to==s&&(h=t.toText(e.getReplacement(r)),o.push({from:r.from,to:r.to,insert:h}),r=e.nextMatch(t,r.from,r.to),a.push(O.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(i).number)+"."))),r){let c=o.length==0||o[0].from>=r.to?0:r.to-r.from-h.length;l={anchor:r.from-c,head:r.to-c},a.push(gr(n,r))}return n.dispatch({changes:o,selection:l,scrollIntoView:!!l,effects:a,userEvent:"input.replace"}),!0}),Rp=xi((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(s=>{let{from:r,to:o}=s;return{from:r,to:o,insert:e.getReplacement(s)}});if(!t.length)return!1;let i=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:O.announce.of(i),userEvent:"input.replace.all"}),!0});function pr(n){return n.state.facet(ur).createPanel(n)}function qs(n,e){var t,i,s,r;let o=n.selection.main,l=o.empty||o.to>o.from+100?"":n.sliceDoc(o.from,o.to);if(e&&!l)return e;let h=n.facet(ur);return new Ta({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:h.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:h.caseSensitive,literal:(s=e==null?void 0:e.literal)!==null&&s!==void 0?s:h.literal,wholeWord:(r=e==null?void 0:e.wholeWord)!==null&&r!==void 0?r:h.wholeWord})}const Pa=n=>{let e=n.state.field(st,!1);if(e&&e.panel){let t=rn(n,pr);if(!t)return!1;let i=t.dom.querySelector("[main-field]");if(i&&i!=n.root.activeElement){let s=qs(n.state,e.query.spec);s.valid&&n.dispatch({effects:pi.of(s)}),i.focus(),i.select()}}else n.dispatch({effects:[dr.of(!0),e?pi.of(qs(n.state,e.query.spec)):E.appendConfig.of(Ip)]});return!0},Ra=n=>{let e=n.state.field(st,!1);if(!e||!e.panel)return!1;let t=rn(n,pr);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:dr.of(!1)}),!0},Jg=[{key:"Mod-f",run:Pa,scope:"editor search-panel"},{key:"F3",run:yn,shift:bn,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:yn,shift:bn,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Ra,scope:"editor search-panel"},{key:"Mod-Shift-l",run:Pp},{key:"Alt-g",run:up},{key:"Mod-d",run:Sp,preventDefault:!0}];class Lp{constructor(e){this.view=e;let t=this.query=e.state.field(st).query.spec;this.commit=this.commit.bind(this),this.searchField=oe("input",{value:t.search,placeholder:Se(e,"Find"),"aria-label":Se(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=oe("input",{value:t.replace,placeholder:Se(e,"Replace"),"aria-label":Se(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=oe("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=oe("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=oe("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function i(s,r,o){return oe("button",{class:"cm-button",name:s,onclick:r,type:"button"},o)}this.dom=oe("div",{onkeydown:s=>this.keydown(s),class:"cm-search"},[this.searchField,i("next",()=>yn(e),[Se(e,"next")]),i("prev",()=>bn(e),[Se(e,"previous")]),i("select",()=>Bp(e),[Se(e,"all")]),oe("label",null,[this.caseField,Se(e,"match case")]),oe("label",null,[this.reField,Se(e,"regexp")]),oe("label",null,[this.wordField,Se(e,"by word")]),...e.state.readOnly?[]:[oe("br"),this.replaceField,i("replace",()=>Go(e),[Se(e,"replace")]),i("replaceAll",()=>Rp(e),[Se(e,"replace all")])],oe("button",{name:"close",onclick:()=>Ra(e),"aria-label":Se(e,"close"),type:"button"},["×"])])}commit(){let e=new Ta({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:pi.of(e)}))}keydown(e){Tf(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?bn:yn)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Go(this.view))}update(e){for(let t of e.transactions)for(let i of t.effects)i.is(pi)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(ur).top}}function Se(n,e){return n.state.phrase(e)}const Hi=30,zi=/[\s\.,:;?!]/;function gr(n,{from:e,to:t}){let i=n.state.doc.lineAt(e),s=n.state.doc.lineAt(t).to,r=Math.max(i.from,e-Hi),o=Math.min(s,t+Hi),l=n.state.sliceDoc(r,o);if(r!=i.from){for(let h=0;hl.length-Hi;h--)if(!zi.test(l[h-1])&&zi.test(l[h])){l=l.slice(0,h);break}}return O.announce.of(`${n.state.phrase("current match")}. ${l} ${n.state.phrase("on line")} ${i.number}.`)}const Ep=O.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),Ip=[st,Ct.lowest(Tp),Ep];class La{constructor(e,t,i){this.state=e,this.pos=t,this.explicit=i,this.abortListeners=[]}tokenBefore(e){let t=be(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),i=Math.max(t.from,this.pos-250),s=t.text.slice(i-t.from,this.pos-t.from),r=s.search(Ea(e,!1));return r<0?null:{from:i+r,to:this.pos,text:s.slice(r)}}get aborted(){return this.abortListeners==null}addEventListener(e,t){e=="abort"&&this.abortListeners&&this.abortListeners.push(t)}}function Jo(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Np(n){let e=Object.create(null),t=Object.create(null);for(let{label:s}of n){e[s[0]]=!0;for(let r=1;rtypeof s=="string"?{label:s}:s),[t,i]=e.every(s=>/^\w+$/.test(s.label))?[/\w*$/,/\w+$/]:Np(e);return s=>{let r=s.matchBefore(i);return r||s.explicit?{from:r?r.from:s.pos,options:e,validFor:t}:null}}function _g(n,e){return t=>{for(let i=be(t.state).resolveInner(t.pos,-1);i;i=i.parent){if(n.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(t)}}class _o{constructor(e,t,i){this.completion=e,this.source=t,this.match=i}}function rt(n){return n.selection.main.head}function Ea(n,e){var t;let{source:i}=n,s=e&&i[0]!="^",r=i[i.length-1]!="$";return!s&&!r?n:new RegExp(`${s?"^":""}(?:${i})${r?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}const Vp=at.define();function Wp(n,e,t,i){return Object.assign(Object.assign({},n.changeByRange(s=>{if(s==n.selection.main)return{changes:{from:t,to:i,insert:e},range:b.cursor(t+e.length)};let r=i-t;return!s.empty||r&&n.sliceDoc(s.from-r,s.from)!=n.sliceDoc(t,i)?{range:s}:{changes:{from:s.from-r,to:s.from,insert:e},range:b.cursor(s.from-r+e.length)}})),{userEvent:"input.complete"})}function Ia(n,e){const t=e.completion.apply||e.completion.label;let i=e.source;typeof t=="string"?n.dispatch(Object.assign(Object.assign({},Wp(n.state,t,i.from,i.to)),{annotations:Vp.of(e.completion)})):t(n,e.completion,i.from,i.to)}const Xo=new WeakMap;function Hp(n){if(!Array.isArray(n))return n;let e=Xo.get(n);return e||Xo.set(n,e=Fp(n)),e}class zp{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let t=0;t=48&&S<=57||S>=97&&S<=122?2:S>=65&&S<=90?1:0:(C=Ks(S))!=C.toLowerCase()?1:C!=C.toUpperCase()?2:0;(!v||B==1&&m||x==0&&B!=0)&&(t[f]==S||i[f]==S&&(u=!0)?o[f++]=v:o.length&&(y=!1)),x=B,v+=Me(S)}return f==h&&o[0]==0&&y?this.result(-100+(u?-200:0),o,e):d==h&&p==0?[-200-e.length+(g==e.length?0:-100),0,g]:l>-1?[-700-e.length,l,l+this.pattern.length]:d==h?[-200+-700-e.length,p,g]:f==h?this.result(-100+(u?-200:0)+-700+(y?0:-1100),o,e):t.length==2?null:this.result((s[0]?-700:0)+-200+-1100,s,e)}result(e,t,i){let s=[e-i.length],r=1;for(let o of t){let l=o+(this.astral?Me(se(i,o)):1);r>1&&s[r-1]==o?s[r-1]=l:(s[r++]=o,s[r++]=l)}return s}}const Pe=M.define({combine(n){return At(n,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>i=>Yo(e(i),t(i)),optionClass:(e,t)=>i=>Yo(e(i),t(i)),addToOptions:(e,t)=>e.concat(t)})}});function Yo(n,e){return n?e?n+" "+e:n:e}function qp(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),t.type&&i.classList.add(...t.type.split(/\s+/g).map(s=>"cm-completionIcon-"+s)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(t,i,s){let r=document.createElement("span");r.className="cm-completionLabel";let{label:o}=t,l=0;for(let h=1;hl&&r.appendChild(document.createTextNode(o.slice(l,a)));let f=r.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(o.slice(a,c))),f.className="cm-completionMatchedText",l=c}return lt.position-i.position).map(t=>t.render)}function Qo(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let s=Math.floor(e/t);return{from:s*t,to:(s+1)*t}}let i=Math.floor((n-e)/t);return{from:n-(i+1)*t,to:n-i*t}}class $p{constructor(e,t){this.view=e,this.stateField=t,this.info=null,this.placeInfo={read:()=>this.measureInfo(),write:l=>this.positionInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:s,selected:r}=i.open,o=e.state.facet(Pe);this.optionContent=qp(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=Qo(s.length,r,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{for(let h=l.target,a;h&&h!=this.dom;h=h.parentNode)if(h.nodeName=="LI"&&(a=/-(\d+)$/.exec(h.id))&&+a[1]{this.info&&this.view.requestMeasure(this.placeInfo)})}mount(){this.updateSel()}update(e){var t,i,s;let r=e.state.field(this.stateField),o=e.startState.field(this.stateField);this.updateTooltipClass(e.state),r!=o&&(this.updateSel(),((t=r.open)===null||t===void 0?void 0:t.disabled)!=((i=o.open)===null||i===void 0?void 0:i.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(!((s=r.open)===null||s===void 0)&&s.disabled)))}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of t.split(" "))i&&this.dom.classList.add(i);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfo)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=Qo(t.options.length,t.selected,this.view.state.facet(Pe).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t.options,e.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfo)})),this.updateSelectedOption(t.selected)){this.info&&(this.info.remove(),this.info=null);let{completion:i}=t.options[t.selected],{info:s}=i;if(!s)return;let r=typeof s=="string"?document.createTextNode(s):s(i);if(!r)return;"then"in r?r.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o)}).catch(o=>Le(this.view.state,o,"completion info")):this.addInfoPane(r)}}addInfoPane(e){let t=this.info=document.createElement("div");t.className="cm-tooltip cm-completionInfo",t.appendChild(e),this.dom.appendChild(t),this.view.requestMeasure(this.placeInfo)}updateSelectedOption(e){let t=null;for(let i=this.list.firstChild,s=this.range.from;i;i=i.nextSibling,s++)s==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),t=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return t&&jp(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),s=e.getBoundingClientRect(),r=this.space;if(!r){let p=this.dom.ownerDocument.defaultView||window;r={left:0,top:0,right:p.innerWidth,bottom:p.innerHeight}}if(s.top>Math.min(r.bottom,t.bottom)-10||s.bottom=i.height||p>t.top?c=s.bottom-t.top+"px":f=t.bottom-s.top+"px"}return{top:c,bottom:f,maxWidth:a,class:h?o?"left-narrow":"right-narrow":l?"left":"right"}}positionInfo(e){this.info&&(e?(this.info.style.top=e.top,this.info.style.bottom=e.bottom,this.info.style.maxWidth=e.maxWidth,this.info.className="cm-tooltip cm-completionInfo cm-completionInfo-"+e.class):this.info.style.top="-1e6px")}createListBox(e,t,i){const s=document.createElement("ul");s.id=t,s.setAttribute("role","listbox"),s.setAttribute("aria-expanded","true"),s.setAttribute("aria-label",this.view.state.phrase("Completions"));for(let r=i.from;rnew $p(e,n)}function jp(n,e){let t=n.getBoundingClientRect(),i=e.getBoundingClientRect();i.topt.bottom&&(n.scrollTop+=i.bottom-t.bottom)}function Zo(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function Up(n,e){let t=[],i=0;for(let l of n)if(l.hasResult())if(l.result.filter===!1){let h=l.result.getMatch;for(let a of l.result.options){let c=[1e9-i++];if(h)for(let f of h(a))c.push(f);t.push(new _o(a,l,c))}}else{let h=new zp(e.sliceDoc(l.from,l.to)),a;for(let c of l.result.options)(a=h.match(c.label))&&(c.boost!=null&&(a[0]+=c.boost),t.push(new _o(c,l,a)))}let s=[],r=null,o=e.facet(Pe).compareCompletions;for(let l of t.sort((h,a)=>a.match[0]-h.match[0]||o(h.completion,a.completion)))!r||r.label!=l.completion.label||r.detail!=l.completion.detail||r.type!=null&&l.completion.type!=null&&r.type!=l.completion.type||r.apply!=l.completion.apply?s.push(l):Zo(l.completion)>Zo(r)&&(s[s.length-1]=l),r=l.completion;return s}class Pt{constructor(e,t,i,s,r,o){this.options=e,this.attrs=t,this.tooltip=i,this.timestamp=s,this.selected=r,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Pt(this.options,el(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,i,s,r){let o=Up(e,t);if(!o.length)return s&&e.some(h=>h.state==1)?new Pt(s.options,s.attrs,s.tooltip,s.timestamp,s.selected,!0):null;let l=t.facet(Pe).selectOnOpen?0:-1;if(s&&s.selected!=l&&s.selected!=-1){let h=s.options[s.selected].completion;for(let a=0;aa.hasResult()?Math.min(h,a.from):h,1e8),create:Kp(Ae),above:r.aboveCursor},s?s.timestamp:Date.now(),l,!1)}map(e){return new Pt(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class wn{constructor(e,t,i){this.active=e,this.id=t,this.open=i}static start(){return new wn(_p,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,i=t.facet(Pe),r=(i.override||t.languageDataAt("autocomplete",rt(t)).map(Hp)).map(l=>(this.active.find(a=>a.source==l)||new xe(l,this.active.some(a=>a.state!=0)?1:0)).update(e,i));r.length==this.active.length&&r.every((l,h)=>l==this.active[h])&&(r=this.active);let o=this.open;o&&e.docChanged&&(o=o.map(e.changes)),e.selection||r.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!Gp(r,this.active)?o=Pt.build(r,t,this.id,o,i):o&&o.disabled&&!r.some(l=>l.state==1)&&(o=null),!o&&r.every(l=>l.state!=1)&&r.some(l=>l.hasResult())&&(r=r.map(l=>l.hasResult()?new xe(l.source,0):l));for(let l of e.effects)l.is(Fa)&&(o=o&&o.setSelected(l.value,this.id));return r==this.active&&o==this.open?this:new wn(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:Jp}}function Gp(n,e){if(n==e)return!0;for(let t=0,i=0;;){for(;t-1&&(t["aria-activedescendant"]=n+"-"+e),t}const _p=[];function $s(n){return n.isUserEvent("input.type")?"input":n.isUserEvent("delete.backward")?"delete":null}class xe{constructor(e,t,i=-1){this.source=e,this.state=t,this.explicitPos=i}hasResult(){return!1}update(e,t){let i=$s(e),s=this;i?s=s.handleUserEvent(e,i,t):e.docChanged?s=s.handleChange(e):e.selection&&s.state!=0&&(s=new xe(s.source,0));for(let r of e.effects)if(r.is(mr))s=new xe(s.source,1,r.value?rt(e.state):-1);else if(r.is(xn))s=new xe(s.source,0);else if(r.is(Na))for(let o of r.value)o.source==s.source&&(s=o);return s}handleUserEvent(e,t,i){return t=="delete"||!i.activateOnTyping?this.map(e.changes):new xe(this.source,1)}handleChange(e){return e.changes.touchesRange(rt(e.startState))?new xe(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new xe(this.source,this.state,e.mapPos(this.explicitPos))}}class si extends xe{constructor(e,t,i,s,r){super(e,2,t),this.result=i,this.from=s,this.to=r}hasResult(){return!0}handleUserEvent(e,t,i){var s;let r=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),l=rt(e.state);if((this.explicitPos<0?l<=r:lo||t=="delete"&&rt(e.startState)==this.from)return new xe(this.source,t=="input"&&i.activateOnTyping?1:0);let h=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos),a;return Xp(this.result.validFor,e.state,r,o)?new si(this.source,h,this.result,r,o):this.result.update&&(a=this.result.update(this.result,r,o,new La(e.state,l,h>=0)))?new si(this.source,h,a,a.from,(s=a.to)!==null&&s!==void 0?s:rt(e.state)):new xe(this.source,1,h)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new xe(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new si(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}function Xp(n,e,t,i){if(!n)return!1;let s=e.sliceDoc(t,i);return typeof n=="function"?n(s,t,i,e):Ea(n,!0).test(s)}const mr=E.define(),xn=E.define(),Na=E.define({map(n,e){return n.map(t=>t.map(e))}}),Fa=E.define(),Ae=we.define({create(){return wn.start()},update(n,e){return n.update(e)},provide:n=>[vh.from(n,e=>e.tooltip),O.contentAttributes.from(n,e=>e.attrs)]});function qi(n,e="option"){return t=>{let i=t.state.field(Ae,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp-1?i.open.selected+s*(n?1:-1):n?0:o-1;return l<0?l=e=="page"?0:o-1:l>=o&&(l=e=="page"?o-1:0),t.dispatch({effects:Fa.of(l)}),!0}}const Yp=n=>{let e=n.state.field(Ae,!1);return n.state.readOnly||!e||!e.open||e.open.selected<0||Date.now()-e.open.timestampn.state.field(Ae,!1)?(n.dispatch({effects:mr.of(!0)}),!0):!1,Zp=n=>{let e=n.state.field(Ae,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:xn.of(null)}),!0)};class eg{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const tl=50,tg=50,ig=1e3,ng=me.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let e of n.state.field(Ae).active)e.state==1&&this.startQuery(e)}update(n){let e=n.state.field(Ae);if(!n.selectionSet&&!n.docChanged&&n.startState.field(Ae)==e)return;let t=n.transactions.some(i=>(i.selection||i.docChanged)&&!$s(i));for(let i=0;itg&&Date.now()-s.time>ig){for(let r of s.context.abortListeners)try{r()}catch(o){Le(this.view.state,o)}s.context.abortListeners=null,this.running.splice(i--,1)}else s.updates.push(...n.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some(i=>i.state==1&&!this.running.some(s=>s.active.source==i.source))?setTimeout(()=>this.startUpdate(),tl):-1,this.composing!=0)for(let i of n.transactions)$s(i)=="input"?this.composing=2:this.composing==2&&i.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:n}=this.view,e=n.field(Ae);for(let t of e.active)t.state==1&&!this.running.some(i=>i.active.source==t.source)&&this.startQuery(t)}startQuery(n){let{state:e}=this.view,t=rt(e),i=new La(e,t,n.explicitPos==t),s=new eg(n,i);this.running.push(s),Promise.resolve(n.source(i)).then(r=>{s.context.aborted||(s.done=r||null,this.scheduleAccept())},r=>{this.view.dispatch({effects:xn.of(null)}),Le(this.view.state,r)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),tl))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(Pe);for(let i=0;io.source==s.active.source);if(r&&r.state==1)if(s.done==null){let o=new xe(s.active.source,0);for(let l of s.updates)o=o.update(l,t);o.state!=1&&e.push(o)}else this.startQuery(r)}e.length&&this.view.dispatch({effects:Na.of(e)})}},{eventHandlers:{blur(){let n=this.view.state.field(Ae,!1);n&&n.tooltip&&this.view.state.facet(Pe).closeOnBlur&&this.view.dispatch({effects:xn.of(null)})},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:mr.of(!1)}),20),this.composing=0}}}),Va=O.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:`${400}px`,boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`${30}px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`${30}px`},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class sg{constructor(e,t,i,s){this.field=e,this.line=t,this.from=i,this.to=s}}class yr{constructor(e,t,i){this.field=e,this.from=t,this.to=i}map(e){let t=e.mapPos(this.from,-1,he.TrackDel),i=e.mapPos(this.to,1,he.TrackDel);return t==null||i==null?null:new yr(this.field,t,i)}}class br{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let i=[],s=[t],r=e.doc.lineAt(t),o=/^\s*/.exec(r.text)[0];for(let h of this.lines){if(i.length){let a=o,c=/^\t*/.exec(h)[0].length;for(let f=0;fnew yr(h.field,s[h.line]+h.from,s[h.line]+h.to));return{text:i,ranges:l}}static parse(e){let t=[],i=[],s=[],r;for(let o of e.split(/\r\n?|\n/)){for(;r=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(o);){let l=r[1]?+r[1]:null,h=r[2]||r[3]||"",a=-1;for(let c=0;c=a&&f.field++}s.push(new sg(a,i.length,r.index,r.index+h.length)),o=o.slice(0,r.index)+h+o.slice(r.index+r[0].length)}for(let l;l=/\\([{}])/.exec(o);){o=o.slice(0,l.index)+l[1]+o.slice(l.index+l[0].length);for(let h of s)h.line==i.length&&h.from>l.index&&(h.from--,h.to--)}i.push(o)}return new br(i,s)}}let rg=T.widget({widget:new class extends ct{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),og=T.mark({class:"cm-snippetField"});class Ut{constructor(e,t){this.ranges=e,this.active=t,this.deco=T.set(e.map(i=>(i.from==i.to?rg:og).range(i.from,i.to)))}map(e){let t=[];for(let i of this.ranges){let s=i.map(e);if(!s)return null;t.push(s)}return new Ut(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(i=>i.field==this.active&&i.from<=t.from&&i.to>=t.to))}}const ki=E.define({map(n,e){return n&&n.map(e)}}),lg=E.define(),gi=we.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(ki))return t.value;if(t.is(lg)&&n)return new Ut(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>O.decorations.from(n,e=>e?e.deco:T.none)});function wr(n,e){return b.create(n.filter(t=>t.field==e).map(t=>b.range(t.from,t.to)))}function hg(n){let e=br.parse(n);return(t,i,s,r)=>{let{text:o,ranges:l}=e.instantiate(t.state,s),h={changes:{from:s,to:r,insert:I.of(o)},scrollIntoView:!0};if(l.length&&(h.selection=wr(l,0)),l.length>1){let a=new Ut(l,0),c=h.effects=[ki.of(a)];t.state.field(gi,!1)===void 0&&c.push(E.appendConfig.of([gi,dg,pg,Va]))}t.dispatch(t.state.update(h))}}function Wa(n){return({state:e,dispatch:t})=>{let i=e.field(gi,!1);if(!i||n<0&&i.active==0)return!1;let s=i.active+n,r=n>0&&!i.ranges.some(o=>o.field==s+n);return t(e.update({selection:wr(i.ranges,s),effects:ki.of(r?null:new Ut(i.ranges,s))})),!0}}const ag=({state:n,dispatch:e})=>n.field(gi,!1)?(e(n.update({effects:ki.of(null)})),!0):!1,cg=Wa(1),fg=Wa(-1),ug=[{key:"Tab",run:cg,shift:fg},{key:"Escape",run:ag}],il=M.define({combine(n){return n.length?n[0]:ug}}),dg=Ct.highest(er.compute([il],n=>n.facet(il)));function Xg(n,e){return Object.assign(Object.assign({},e),{apply:hg(n)})}const pg=O.domEventHandlers({mousedown(n,e){let t=e.state.field(gi,!1),i;if(!t||(i=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let s=t.ranges.find(r=>r.from<=i&&r.to>=i);return!s||s.field==t.active?!1:(e.dispatch({selection:wr(t.ranges,s.field),effects:ki.of(t.ranges.some(r=>r.field>s.field)?new Ut(t.ranges,s.field):null)}),!0)}}),mi={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},yt=E.define({map(n,e){let t=e.mapPos(n,-1,he.TrackAfter);return t??void 0}}),xr=E.define({map(n,e){return e.mapPos(n)}}),kr=new class extends wt{};kr.startSide=1;kr.endSide=-1;const Ha=we.define({create(){return j.empty},update(n,e){if(e.selection){let t=e.state.doc.lineAt(e.selection.main.head).from,i=e.startState.doc.lineAt(e.startState.selection.main.head).from;t!=e.changes.mapPos(i,-1)&&(n=j.empty)}n=n.map(e.changes);for(let t of e.effects)t.is(yt)?n=n.update({add:[kr.range(t.value,t.value+1)]}):t.is(xr)&&(n=n.update({filter:i=>i!=t.value}));return n}});function Yg(){return[mg,Ha]}const Qn="()[]{}<>";function za(n){for(let e=0;e{if((gg?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let s=n.state.selection.main;if(i.length>2||i.length==2&&Me(se(i,0))==1||e!=s.from||t!=s.to)return!1;let r=bg(n.state,i);return r?(n.dispatch(r),!0):!1}),yg=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let i=qa(n,n.selection.main.head).brackets||mi.brackets,s=null,r=n.changeByRange(o=>{if(o.empty){let l=wg(n.doc,o.head);for(let h of i)if(h==l&&Ln(n.doc,o.head)==za(se(h,0)))return{changes:{from:o.head-h.length,to:o.head+h.length},range:b.cursor(o.head-h.length)}}return{range:s=o}});return s||e(n.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!s},Qg=[{key:"Backspace",run:yg}];function bg(n,e){let t=qa(n,n.selection.main.head),i=t.brackets||mi.brackets;for(let s of i){let r=za(se(s,0));if(e==s)return r==s?Sg(n,s,i.indexOf(s+s+s)>-1,t):xg(n,s,r,t.before||mi.before);if(e==r&&$a(n,n.selection.main.from))return kg(n,s,r)}return null}function $a(n,e){let t=!1;return n.field(Ha).between(0,n.doc.length,i=>{i==e&&(t=!0)}),t}function Ln(n,e){let t=n.sliceString(e,e+2);return t.slice(0,Me(se(t,0)))}function wg(n,e){let t=n.sliceString(e-2,e);return Me(se(t,0))==t.length?t:t.slice(1)}function xg(n,e,t,i){let s=null,r=n.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:yt.of(o.to+e.length),range:b.range(o.anchor+e.length,o.head+e.length)};let l=Ln(n.doc,o.head);return!l||/\s/.test(l)||i.indexOf(l)>-1?{changes:{insert:e+t,from:o.head},effects:yt.of(o.head+e.length),range:b.cursor(o.head+e.length)}:{range:s=o}});return s?null:n.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function kg(n,e,t){let i=null,s=n.selection.ranges.map(r=>r.empty&&Ln(n.doc,r.head)==t?b.cursor(r.head+t.length):i=r);return i?null:n.update({selection:b.create(s,n.selection.mainIndex),scrollIntoView:!0,effects:n.selection.ranges.map(({from:r})=>xr.of(r))})}function Sg(n,e,t,i){let s=i.stringPrefixes||mi.stringPrefixes,r=null,o=n.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:yt.of(l.to+e.length),range:b.range(l.anchor+e.length,l.head+e.length)};let h=l.head,a=Ln(n.doc,h),c;if(a==e){if(nl(n,h))return{changes:{insert:e+e,from:h},effects:yt.of(h+e.length),range:b.cursor(h+e.length)};if($a(n,h)){let f=t&&n.sliceDoc(h,h+e.length*3)==e+e+e;return{range:b.cursor(h+e.length*(f?3:1)),effects:xr.of(h)}}}else{if(t&&n.sliceDoc(h-2*e.length,h)==e+e&&(c=sl(n,h-2*e.length,s))>-1&&nl(n,c))return{changes:{insert:e+e+e+e,from:h},effects:yt.of(h+e.length),range:b.cursor(h+e.length)};if(n.charCategorizer(h)(a)!=$.Word&&sl(n,h,s)>-1&&!vg(n,h,e,s))return{changes:{insert:e+e,from:h},effects:yt.of(h+e.length),range:b.cursor(h+e.length)}}return{range:r=l}});return r?null:n.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function nl(n,e){let t=be(n).resolveInner(e+1);return t.parent&&t.from==e}function vg(n,e,t,i){let s=be(n).resolveInner(e,-1),r=i.reduce((o,l)=>Math.max(o,l.length),0);for(let o=0;o<5;o++){let l=n.sliceDoc(s.from,Math.min(s.to,s.from+t.length+r)),h=l.indexOf(t);if(!h||h>-1&&i.indexOf(l.slice(0,h))>-1){let c=s.firstChild;for(;c&&c.from==s.from&&c.to-c.from>t.length+h;){if(n.sliceDoc(c.to-t.length,c.to)==t)return!1;c=c.firstChild}return!0}let a=s.to==e&&s.parent;if(!a)break;s=a}return!1}function sl(n,e,t){let i=n.charCategorizer(e);if(i(n.sliceDoc(e-1,e))!=$.Word)return e;for(let s of t){let r=e-s.length;if(n.sliceDoc(r,e)==s&&i(n.sliceDoc(r-1,r))!=$.Word)return r}return-1}function Zg(n={}){return[Ae,Pe.of(n),ng,Ag,Va]}const Cg=[{key:"Ctrl-Space",run:Qp},{key:"Escape",run:Zp},{key:"ArrowDown",run:qi(!0)},{key:"ArrowUp",run:qi(!1)},{key:"PageDown",run:qi(!0,"page")},{key:"PageUp",run:qi(!1,"page")},{key:"Enter",run:Yp}],Ag=Ct.highest(er.computeN([Pe],n=>n.facet(Pe).defaultKeymap?[Cg]:[]));export{Vg as A,Wg as B,kn as C,lu as D,O as E,Hg as F,Ig as G,be as H,U as I,_g as J,Fp as K,Ls as L,b as M,tr as N,Fg as O,Dh as P,Ng as Q,Tu as R,zh as S,W as T,Xg as U,Bh as V,Rg as W,Gu as X,N as a,Og as b,Kg as c,Mg as d,Dg as e,qg as f,$g as g,Pg as h,Yg as i,Gg as j,er as k,Qg as l,Ug as m,Jg as n,jg as o,Cg as p,Zg as q,Bg as r,zg as s,Tg as t,ye as u,P as v,Cu as w,k as x,Lg as y,Ru as z}; diff --git a/ui/dist/assets/index-b8b82b53.css b/ui/dist/assets/index-b8b82b53.css new file mode 100644 index 00000000..d9120008 --- /dev/null +++ b/ui/dist/assets/index-b8b82b53.css @@ -0,0 +1 @@ +@charset "UTF-8";@font-face{font-family:remixicon;src:url(../fonts/remixicon/remixicon.woff2?v=1) format("woff2"),url(../fonts/remixicon/remixicon.woff?v=1) format("woff"),url(../fonts/remixicon/remixicon.ttf?v=1) format("truetype"),url(../fonts/remixicon/remixicon.svg?v=1#remixicon) format("svg");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-regular.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-regular.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-italic.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600italic.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700italic.woff) format("woff")}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:400;src:local(""),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-regular.woff2) format("woff2"),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-regular.woff) format("woff")}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:600;src:local(""),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-600.woff2) format("woff2"),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-600.woff) format("woff")}:root{--baseFontFamily: "Source Sans Pro", sans-serif, emoji;--monospaceFontFamily: "Ubuntu Mono", monospace, emoji;--iconFontFamily: "remixicon";--txtPrimaryColor: #16161a;--txtHintColor: #666f75;--txtDisabledColor: #a0a6ac;--primaryColor: #16161a;--bodyColor: #f8f9fa;--baseColor: #ffffff;--baseAlt1Color: #e4e9ec;--baseAlt2Color: #d7dde4;--baseAlt3Color: #c6cdd7;--baseAlt4Color: #a5b0c0;--infoColor: #3da9fc;--infoAltColor: #d2ecfe;--successColor: #2aac76;--successAltColor: #d2f4e6;--dangerColor: #e13756;--dangerAltColor: #fcdee4;--warningColor: #ff8e3c;--warningAltColor: #ffeadb;--overlayColor: rgba(53, 71, 104, .25);--tooltipColor: rgba(0, 0, 0, .85);--shadowColor: rgba(0, 0, 0, .06);--baseFontSize: 14.5px;--xsFontSize: 12px;--smFontSize: 13px;--lgFontSize: 15px;--xlFontSize: 16px;--baseLineHeight: 22px;--smLineHeight: 16px;--lgLineHeight: 24px;--inputHeight: 34px;--btnHeight: 40px;--xsBtnHeight: 22px;--smBtnHeight: 30px;--lgBtnHeight: 54px;--baseSpacing: 30px;--xsSpacing: 15px;--smSpacing: 20px;--lgSpacing: 50px;--xlSpacing: 60px;--wrapperWidth: 850px;--smWrapperWidth: 420px;--lgWrapperWidth: 1200px;--appSidebarWidth: 75px;--pageSidebarWidth: 220px;--baseAnimationSpeed: .15s;--activeAnimationSpeed: 70ms;--entranceAnimationSpeed: .25s;--baseRadius: 3px;--lgRadius: 12px;--btnRadius: 3px;accent-color:var(--primaryColor)}html,body,div,span,applet,object,iframe,h1,h2,.breadcrumbs .breadcrumb-item,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}i{font-family:remixicon!important;font-style:normal;font-weight:400;font-size:1.1238rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}i:before{vertical-align:top;margin-top:1px;display:inline-block}.ri-24-hours-fill:before{content:"\ea01"}.ri-24-hours-line:before{content:"\ea02"}.ri-4k-fill:before{content:"\ea03"}.ri-4k-line:before{content:"\ea04"}.ri-a-b:before{content:"\ea05"}.ri-account-box-fill:before{content:"\ea06"}.ri-account-box-line:before{content:"\ea07"}.ri-account-circle-fill:before{content:"\ea08"}.ri-account-circle-line:before{content:"\ea09"}.ri-account-pin-box-fill:before{content:"\ea0a"}.ri-account-pin-box-line:before{content:"\ea0b"}.ri-account-pin-circle-fill:before{content:"\ea0c"}.ri-account-pin-circle-line:before{content:"\ea0d"}.ri-add-box-fill:before{content:"\ea0e"}.ri-add-box-line:before{content:"\ea0f"}.ri-add-circle-fill:before{content:"\ea10"}.ri-add-circle-line:before{content:"\ea11"}.ri-add-fill:before{content:"\ea12"}.ri-add-line:before{content:"\ea13"}.ri-admin-fill:before{content:"\ea14"}.ri-admin-line:before{content:"\ea15"}.ri-advertisement-fill:before{content:"\ea16"}.ri-advertisement-line:before{content:"\ea17"}.ri-airplay-fill:before{content:"\ea18"}.ri-airplay-line:before{content:"\ea19"}.ri-alarm-fill:before{content:"\ea1a"}.ri-alarm-line:before{content:"\ea1b"}.ri-alarm-warning-fill:before{content:"\ea1c"}.ri-alarm-warning-line:before{content:"\ea1d"}.ri-album-fill:before{content:"\ea1e"}.ri-album-line:before{content:"\ea1f"}.ri-alert-fill:before{content:"\ea20"}.ri-alert-line:before{content:"\ea21"}.ri-aliens-fill:before{content:"\ea22"}.ri-aliens-line:before{content:"\ea23"}.ri-align-bottom:before{content:"\ea24"}.ri-align-center:before{content:"\ea25"}.ri-align-justify:before{content:"\ea26"}.ri-align-left:before{content:"\ea27"}.ri-align-right:before{content:"\ea28"}.ri-align-top:before{content:"\ea29"}.ri-align-vertically:before{content:"\ea2a"}.ri-alipay-fill:before{content:"\ea2b"}.ri-alipay-line:before{content:"\ea2c"}.ri-amazon-fill:before{content:"\ea2d"}.ri-amazon-line:before{content:"\ea2e"}.ri-anchor-fill:before{content:"\ea2f"}.ri-anchor-line:before{content:"\ea30"}.ri-ancient-gate-fill:before{content:"\ea31"}.ri-ancient-gate-line:before{content:"\ea32"}.ri-ancient-pavilion-fill:before{content:"\ea33"}.ri-ancient-pavilion-line:before{content:"\ea34"}.ri-android-fill:before{content:"\ea35"}.ri-android-line:before{content:"\ea36"}.ri-angularjs-fill:before{content:"\ea37"}.ri-angularjs-line:before{content:"\ea38"}.ri-anticlockwise-2-fill:before{content:"\ea39"}.ri-anticlockwise-2-line:before{content:"\ea3a"}.ri-anticlockwise-fill:before{content:"\ea3b"}.ri-anticlockwise-line:before{content:"\ea3c"}.ri-app-store-fill:before{content:"\ea3d"}.ri-app-store-line:before{content:"\ea3e"}.ri-apple-fill:before{content:"\ea3f"}.ri-apple-line:before{content:"\ea40"}.ri-apps-2-fill:before{content:"\ea41"}.ri-apps-2-line:before{content:"\ea42"}.ri-apps-fill:before{content:"\ea43"}.ri-apps-line:before{content:"\ea44"}.ri-archive-drawer-fill:before{content:"\ea45"}.ri-archive-drawer-line:before{content:"\ea46"}.ri-archive-fill:before{content:"\ea47"}.ri-archive-line:before{content:"\ea48"}.ri-arrow-down-circle-fill:before{content:"\ea49"}.ri-arrow-down-circle-line:before{content:"\ea4a"}.ri-arrow-down-fill:before{content:"\ea4b"}.ri-arrow-down-line:before{content:"\ea4c"}.ri-arrow-down-s-fill:before{content:"\ea4d"}.ri-arrow-down-s-line:before{content:"\ea4e"}.ri-arrow-drop-down-fill:before{content:"\ea4f"}.ri-arrow-drop-down-line:before{content:"\ea50"}.ri-arrow-drop-left-fill:before{content:"\ea51"}.ri-arrow-drop-left-line:before{content:"\ea52"}.ri-arrow-drop-right-fill:before{content:"\ea53"}.ri-arrow-drop-right-line:before{content:"\ea54"}.ri-arrow-drop-up-fill:before{content:"\ea55"}.ri-arrow-drop-up-line:before{content:"\ea56"}.ri-arrow-go-back-fill:before{content:"\ea57"}.ri-arrow-go-back-line:before{content:"\ea58"}.ri-arrow-go-forward-fill:before{content:"\ea59"}.ri-arrow-go-forward-line:before{content:"\ea5a"}.ri-arrow-left-circle-fill:before{content:"\ea5b"}.ri-arrow-left-circle-line:before{content:"\ea5c"}.ri-arrow-left-down-fill:before{content:"\ea5d"}.ri-arrow-left-down-line:before{content:"\ea5e"}.ri-arrow-left-fill:before{content:"\ea5f"}.ri-arrow-left-line:before{content:"\ea60"}.ri-arrow-left-right-fill:before{content:"\ea61"}.ri-arrow-left-right-line:before{content:"\ea62"}.ri-arrow-left-s-fill:before{content:"\ea63"}.ri-arrow-left-s-line:before{content:"\ea64"}.ri-arrow-left-up-fill:before{content:"\ea65"}.ri-arrow-left-up-line:before{content:"\ea66"}.ri-arrow-right-circle-fill:before{content:"\ea67"}.ri-arrow-right-circle-line:before{content:"\ea68"}.ri-arrow-right-down-fill:before{content:"\ea69"}.ri-arrow-right-down-line:before{content:"\ea6a"}.ri-arrow-right-fill:before{content:"\ea6b"}.ri-arrow-right-line:before{content:"\ea6c"}.ri-arrow-right-s-fill:before{content:"\ea6d"}.ri-arrow-right-s-line:before{content:"\ea6e"}.ri-arrow-right-up-fill:before{content:"\ea6f"}.ri-arrow-right-up-line:before{content:"\ea70"}.ri-arrow-up-circle-fill:before{content:"\ea71"}.ri-arrow-up-circle-line:before{content:"\ea72"}.ri-arrow-up-down-fill:before{content:"\ea73"}.ri-arrow-up-down-line:before{content:"\ea74"}.ri-arrow-up-fill:before{content:"\ea75"}.ri-arrow-up-line:before{content:"\ea76"}.ri-arrow-up-s-fill:before{content:"\ea77"}.ri-arrow-up-s-line:before{content:"\ea78"}.ri-artboard-2-fill:before{content:"\ea79"}.ri-artboard-2-line:before{content:"\ea7a"}.ri-artboard-fill:before{content:"\ea7b"}.ri-artboard-line:before{content:"\ea7c"}.ri-article-fill:before{content:"\ea7d"}.ri-article-line:before{content:"\ea7e"}.ri-aspect-ratio-fill:before{content:"\ea7f"}.ri-aspect-ratio-line:before{content:"\ea80"}.ri-asterisk:before{content:"\ea81"}.ri-at-fill:before{content:"\ea82"}.ri-at-line:before{content:"\ea83"}.ri-attachment-2:before{content:"\ea84"}.ri-attachment-fill:before{content:"\ea85"}.ri-attachment-line:before{content:"\ea86"}.ri-auction-fill:before{content:"\ea87"}.ri-auction-line:before{content:"\ea88"}.ri-award-fill:before{content:"\ea89"}.ri-award-line:before{content:"\ea8a"}.ri-baidu-fill:before{content:"\ea8b"}.ri-baidu-line:before{content:"\ea8c"}.ri-ball-pen-fill:before{content:"\ea8d"}.ri-ball-pen-line:before{content:"\ea8e"}.ri-bank-card-2-fill:before{content:"\ea8f"}.ri-bank-card-2-line:before{content:"\ea90"}.ri-bank-card-fill:before{content:"\ea91"}.ri-bank-card-line:before{content:"\ea92"}.ri-bank-fill:before{content:"\ea93"}.ri-bank-line:before{content:"\ea94"}.ri-bar-chart-2-fill:before{content:"\ea95"}.ri-bar-chart-2-line:before{content:"\ea96"}.ri-bar-chart-box-fill:before{content:"\ea97"}.ri-bar-chart-box-line:before{content:"\ea98"}.ri-bar-chart-fill:before{content:"\ea99"}.ri-bar-chart-grouped-fill:before{content:"\ea9a"}.ri-bar-chart-grouped-line:before{content:"\ea9b"}.ri-bar-chart-horizontal-fill:before{content:"\ea9c"}.ri-bar-chart-horizontal-line:before{content:"\ea9d"}.ri-bar-chart-line:before{content:"\ea9e"}.ri-barcode-box-fill:before{content:"\ea9f"}.ri-barcode-box-line:before{content:"\eaa0"}.ri-barcode-fill:before{content:"\eaa1"}.ri-barcode-line:before{content:"\eaa2"}.ri-barricade-fill:before{content:"\eaa3"}.ri-barricade-line:before{content:"\eaa4"}.ri-base-station-fill:before{content:"\eaa5"}.ri-base-station-line:before{content:"\eaa6"}.ri-basketball-fill:before{content:"\eaa7"}.ri-basketball-line:before{content:"\eaa8"}.ri-battery-2-charge-fill:before{content:"\eaa9"}.ri-battery-2-charge-line:before{content:"\eaaa"}.ri-battery-2-fill:before{content:"\eaab"}.ri-battery-2-line:before{content:"\eaac"}.ri-battery-charge-fill:before{content:"\eaad"}.ri-battery-charge-line:before{content:"\eaae"}.ri-battery-fill:before{content:"\eaaf"}.ri-battery-line:before{content:"\eab0"}.ri-battery-low-fill:before{content:"\eab1"}.ri-battery-low-line:before{content:"\eab2"}.ri-battery-saver-fill:before{content:"\eab3"}.ri-battery-saver-line:before{content:"\eab4"}.ri-battery-share-fill:before{content:"\eab5"}.ri-battery-share-line:before{content:"\eab6"}.ri-bear-smile-fill:before{content:"\eab7"}.ri-bear-smile-line:before{content:"\eab8"}.ri-behance-fill:before{content:"\eab9"}.ri-behance-line:before{content:"\eaba"}.ri-bell-fill:before{content:"\eabb"}.ri-bell-line:before{content:"\eabc"}.ri-bike-fill:before{content:"\eabd"}.ri-bike-line:before{content:"\eabe"}.ri-bilibili-fill:before{content:"\eabf"}.ri-bilibili-line:before{content:"\eac0"}.ri-bill-fill:before{content:"\eac1"}.ri-bill-line:before{content:"\eac2"}.ri-billiards-fill:before{content:"\eac3"}.ri-billiards-line:before{content:"\eac4"}.ri-bit-coin-fill:before{content:"\eac5"}.ri-bit-coin-line:before{content:"\eac6"}.ri-blaze-fill:before{content:"\eac7"}.ri-blaze-line:before{content:"\eac8"}.ri-bluetooth-connect-fill:before{content:"\eac9"}.ri-bluetooth-connect-line:before{content:"\eaca"}.ri-bluetooth-fill:before{content:"\eacb"}.ri-bluetooth-line:before{content:"\eacc"}.ri-blur-off-fill:before{content:"\eacd"}.ri-blur-off-line:before{content:"\eace"}.ri-body-scan-fill:before{content:"\eacf"}.ri-body-scan-line:before{content:"\ead0"}.ri-bold:before{content:"\ead1"}.ri-book-2-fill:before{content:"\ead2"}.ri-book-2-line:before{content:"\ead3"}.ri-book-3-fill:before{content:"\ead4"}.ri-book-3-line:before{content:"\ead5"}.ri-book-fill:before{content:"\ead6"}.ri-book-line:before{content:"\ead7"}.ri-book-mark-fill:before{content:"\ead8"}.ri-book-mark-line:before{content:"\ead9"}.ri-book-open-fill:before{content:"\eada"}.ri-book-open-line:before{content:"\eadb"}.ri-book-read-fill:before{content:"\eadc"}.ri-book-read-line:before{content:"\eadd"}.ri-booklet-fill:before{content:"\eade"}.ri-booklet-line:before{content:"\eadf"}.ri-bookmark-2-fill:before{content:"\eae0"}.ri-bookmark-2-line:before{content:"\eae1"}.ri-bookmark-3-fill:before{content:"\eae2"}.ri-bookmark-3-line:before{content:"\eae3"}.ri-bookmark-fill:before{content:"\eae4"}.ri-bookmark-line:before{content:"\eae5"}.ri-boxing-fill:before{content:"\eae6"}.ri-boxing-line:before{content:"\eae7"}.ri-braces-fill:before{content:"\eae8"}.ri-braces-line:before{content:"\eae9"}.ri-brackets-fill:before{content:"\eaea"}.ri-brackets-line:before{content:"\eaeb"}.ri-briefcase-2-fill:before{content:"\eaec"}.ri-briefcase-2-line:before{content:"\eaed"}.ri-briefcase-3-fill:before{content:"\eaee"}.ri-briefcase-3-line:before{content:"\eaef"}.ri-briefcase-4-fill:before{content:"\eaf0"}.ri-briefcase-4-line:before{content:"\eaf1"}.ri-briefcase-5-fill:before{content:"\eaf2"}.ri-briefcase-5-line:before{content:"\eaf3"}.ri-briefcase-fill:before{content:"\eaf4"}.ri-briefcase-line:before{content:"\eaf5"}.ri-bring-forward:before{content:"\eaf6"}.ri-bring-to-front:before{content:"\eaf7"}.ri-broadcast-fill:before{content:"\eaf8"}.ri-broadcast-line:before{content:"\eaf9"}.ri-brush-2-fill:before{content:"\eafa"}.ri-brush-2-line:before{content:"\eafb"}.ri-brush-3-fill:before{content:"\eafc"}.ri-brush-3-line:before{content:"\eafd"}.ri-brush-4-fill:before{content:"\eafe"}.ri-brush-4-line:before{content:"\eaff"}.ri-brush-fill:before{content:"\eb00"}.ri-brush-line:before{content:"\eb01"}.ri-bubble-chart-fill:before{content:"\eb02"}.ri-bubble-chart-line:before{content:"\eb03"}.ri-bug-2-fill:before{content:"\eb04"}.ri-bug-2-line:before{content:"\eb05"}.ri-bug-fill:before{content:"\eb06"}.ri-bug-line:before{content:"\eb07"}.ri-building-2-fill:before{content:"\eb08"}.ri-building-2-line:before{content:"\eb09"}.ri-building-3-fill:before{content:"\eb0a"}.ri-building-3-line:before{content:"\eb0b"}.ri-building-4-fill:before{content:"\eb0c"}.ri-building-4-line:before{content:"\eb0d"}.ri-building-fill:before{content:"\eb0e"}.ri-building-line:before{content:"\eb0f"}.ri-bus-2-fill:before{content:"\eb10"}.ri-bus-2-line:before{content:"\eb11"}.ri-bus-fill:before{content:"\eb12"}.ri-bus-line:before{content:"\eb13"}.ri-bus-wifi-fill:before{content:"\eb14"}.ri-bus-wifi-line:before{content:"\eb15"}.ri-cactus-fill:before{content:"\eb16"}.ri-cactus-line:before{content:"\eb17"}.ri-cake-2-fill:before{content:"\eb18"}.ri-cake-2-line:before{content:"\eb19"}.ri-cake-3-fill:before{content:"\eb1a"}.ri-cake-3-line:before{content:"\eb1b"}.ri-cake-fill:before{content:"\eb1c"}.ri-cake-line:before{content:"\eb1d"}.ri-calculator-fill:before{content:"\eb1e"}.ri-calculator-line:before{content:"\eb1f"}.ri-calendar-2-fill:before{content:"\eb20"}.ri-calendar-2-line:before{content:"\eb21"}.ri-calendar-check-fill:before{content:"\eb22"}.ri-calendar-check-line:before{content:"\eb23"}.ri-calendar-event-fill:before{content:"\eb24"}.ri-calendar-event-line:before{content:"\eb25"}.ri-calendar-fill:before{content:"\eb26"}.ri-calendar-line:before{content:"\eb27"}.ri-calendar-todo-fill:before{content:"\eb28"}.ri-calendar-todo-line:before{content:"\eb29"}.ri-camera-2-fill:before{content:"\eb2a"}.ri-camera-2-line:before{content:"\eb2b"}.ri-camera-3-fill:before{content:"\eb2c"}.ri-camera-3-line:before{content:"\eb2d"}.ri-camera-fill:before{content:"\eb2e"}.ri-camera-lens-fill:before{content:"\eb2f"}.ri-camera-lens-line:before{content:"\eb30"}.ri-camera-line:before{content:"\eb31"}.ri-camera-off-fill:before{content:"\eb32"}.ri-camera-off-line:before{content:"\eb33"}.ri-camera-switch-fill:before{content:"\eb34"}.ri-camera-switch-line:before{content:"\eb35"}.ri-capsule-fill:before{content:"\eb36"}.ri-capsule-line:before{content:"\eb37"}.ri-car-fill:before{content:"\eb38"}.ri-car-line:before{content:"\eb39"}.ri-car-washing-fill:before{content:"\eb3a"}.ri-car-washing-line:before{content:"\eb3b"}.ri-caravan-fill:before{content:"\eb3c"}.ri-caravan-line:before{content:"\eb3d"}.ri-cast-fill:before{content:"\eb3e"}.ri-cast-line:before{content:"\eb3f"}.ri-cellphone-fill:before{content:"\eb40"}.ri-cellphone-line:before{content:"\eb41"}.ri-celsius-fill:before{content:"\eb42"}.ri-celsius-line:before{content:"\eb43"}.ri-centos-fill:before{content:"\eb44"}.ri-centos-line:before{content:"\eb45"}.ri-character-recognition-fill:before{content:"\eb46"}.ri-character-recognition-line:before{content:"\eb47"}.ri-charging-pile-2-fill:before{content:"\eb48"}.ri-charging-pile-2-line:before{content:"\eb49"}.ri-charging-pile-fill:before{content:"\eb4a"}.ri-charging-pile-line:before{content:"\eb4b"}.ri-chat-1-fill:before{content:"\eb4c"}.ri-chat-1-line:before{content:"\eb4d"}.ri-chat-2-fill:before{content:"\eb4e"}.ri-chat-2-line:before{content:"\eb4f"}.ri-chat-3-fill:before{content:"\eb50"}.ri-chat-3-line:before{content:"\eb51"}.ri-chat-4-fill:before{content:"\eb52"}.ri-chat-4-line:before{content:"\eb53"}.ri-chat-check-fill:before{content:"\eb54"}.ri-chat-check-line:before{content:"\eb55"}.ri-chat-delete-fill:before{content:"\eb56"}.ri-chat-delete-line:before{content:"\eb57"}.ri-chat-download-fill:before{content:"\eb58"}.ri-chat-download-line:before{content:"\eb59"}.ri-chat-follow-up-fill:before{content:"\eb5a"}.ri-chat-follow-up-line:before{content:"\eb5b"}.ri-chat-forward-fill:before{content:"\eb5c"}.ri-chat-forward-line:before{content:"\eb5d"}.ri-chat-heart-fill:before{content:"\eb5e"}.ri-chat-heart-line:before{content:"\eb5f"}.ri-chat-history-fill:before{content:"\eb60"}.ri-chat-history-line:before{content:"\eb61"}.ri-chat-new-fill:before{content:"\eb62"}.ri-chat-new-line:before{content:"\eb63"}.ri-chat-off-fill:before{content:"\eb64"}.ri-chat-off-line:before{content:"\eb65"}.ri-chat-poll-fill:before{content:"\eb66"}.ri-chat-poll-line:before{content:"\eb67"}.ri-chat-private-fill:before{content:"\eb68"}.ri-chat-private-line:before{content:"\eb69"}.ri-chat-quote-fill:before{content:"\eb6a"}.ri-chat-quote-line:before{content:"\eb6b"}.ri-chat-settings-fill:before{content:"\eb6c"}.ri-chat-settings-line:before{content:"\eb6d"}.ri-chat-smile-2-fill:before{content:"\eb6e"}.ri-chat-smile-2-line:before{content:"\eb6f"}.ri-chat-smile-3-fill:before{content:"\eb70"}.ri-chat-smile-3-line:before{content:"\eb71"}.ri-chat-smile-fill:before{content:"\eb72"}.ri-chat-smile-line:before{content:"\eb73"}.ri-chat-upload-fill:before{content:"\eb74"}.ri-chat-upload-line:before{content:"\eb75"}.ri-chat-voice-fill:before{content:"\eb76"}.ri-chat-voice-line:before{content:"\eb77"}.ri-check-double-fill:before{content:"\eb78"}.ri-check-double-line:before{content:"\eb79"}.ri-check-fill:before{content:"\eb7a"}.ri-check-line:before{content:"\eb7b"}.ri-checkbox-blank-circle-fill:before{content:"\eb7c"}.ri-checkbox-blank-circle-line:before{content:"\eb7d"}.ri-checkbox-blank-fill:before{content:"\eb7e"}.ri-checkbox-blank-line:before{content:"\eb7f"}.ri-checkbox-circle-fill:before{content:"\eb80"}.ri-checkbox-circle-line:before{content:"\eb81"}.ri-checkbox-fill:before{content:"\eb82"}.ri-checkbox-indeterminate-fill:before{content:"\eb83"}.ri-checkbox-indeterminate-line:before{content:"\eb84"}.ri-checkbox-line:before{content:"\eb85"}.ri-checkbox-multiple-blank-fill:before{content:"\eb86"}.ri-checkbox-multiple-blank-line:before{content:"\eb87"}.ri-checkbox-multiple-fill:before{content:"\eb88"}.ri-checkbox-multiple-line:before{content:"\eb89"}.ri-china-railway-fill:before{content:"\eb8a"}.ri-china-railway-line:before{content:"\eb8b"}.ri-chrome-fill:before{content:"\eb8c"}.ri-chrome-line:before{content:"\eb8d"}.ri-clapperboard-fill:before{content:"\eb8e"}.ri-clapperboard-line:before{content:"\eb8f"}.ri-clipboard-fill:before{content:"\eb90"}.ri-clipboard-line:before{content:"\eb91"}.ri-clockwise-2-fill:before{content:"\eb92"}.ri-clockwise-2-line:before{content:"\eb93"}.ri-clockwise-fill:before{content:"\eb94"}.ri-clockwise-line:before{content:"\eb95"}.ri-close-circle-fill:before{content:"\eb96"}.ri-close-circle-line:before{content:"\eb97"}.ri-close-fill:before{content:"\eb98"}.ri-close-line:before{content:"\eb99"}.ri-closed-captioning-fill:before{content:"\eb9a"}.ri-closed-captioning-line:before{content:"\eb9b"}.ri-cloud-fill:before{content:"\eb9c"}.ri-cloud-line:before{content:"\eb9d"}.ri-cloud-off-fill:before{content:"\eb9e"}.ri-cloud-off-line:before{content:"\eb9f"}.ri-cloud-windy-fill:before{content:"\eba0"}.ri-cloud-windy-line:before{content:"\eba1"}.ri-cloudy-2-fill:before{content:"\eba2"}.ri-cloudy-2-line:before{content:"\eba3"}.ri-cloudy-fill:before{content:"\eba4"}.ri-cloudy-line:before{content:"\eba5"}.ri-code-box-fill:before{content:"\eba6"}.ri-code-box-line:before{content:"\eba7"}.ri-code-fill:before{content:"\eba8"}.ri-code-line:before{content:"\eba9"}.ri-code-s-fill:before{content:"\ebaa"}.ri-code-s-line:before{content:"\ebab"}.ri-code-s-slash-fill:before{content:"\ebac"}.ri-code-s-slash-line:before{content:"\ebad"}.ri-code-view:before{content:"\ebae"}.ri-codepen-fill:before{content:"\ebaf"}.ri-codepen-line:before{content:"\ebb0"}.ri-coin-fill:before{content:"\ebb1"}.ri-coin-line:before{content:"\ebb2"}.ri-coins-fill:before{content:"\ebb3"}.ri-coins-line:before{content:"\ebb4"}.ri-collage-fill:before{content:"\ebb5"}.ri-collage-line:before{content:"\ebb6"}.ri-command-fill:before{content:"\ebb7"}.ri-command-line:before{content:"\ebb8"}.ri-community-fill:before{content:"\ebb9"}.ri-community-line:before{content:"\ebba"}.ri-compass-2-fill:before{content:"\ebbb"}.ri-compass-2-line:before{content:"\ebbc"}.ri-compass-3-fill:before{content:"\ebbd"}.ri-compass-3-line:before{content:"\ebbe"}.ri-compass-4-fill:before{content:"\ebbf"}.ri-compass-4-line:before{content:"\ebc0"}.ri-compass-discover-fill:before{content:"\ebc1"}.ri-compass-discover-line:before{content:"\ebc2"}.ri-compass-fill:before{content:"\ebc3"}.ri-compass-line:before{content:"\ebc4"}.ri-compasses-2-fill:before{content:"\ebc5"}.ri-compasses-2-line:before{content:"\ebc6"}.ri-compasses-fill:before{content:"\ebc7"}.ri-compasses-line:before{content:"\ebc8"}.ri-computer-fill:before{content:"\ebc9"}.ri-computer-line:before{content:"\ebca"}.ri-contacts-book-2-fill:before{content:"\ebcb"}.ri-contacts-book-2-line:before{content:"\ebcc"}.ri-contacts-book-fill:before{content:"\ebcd"}.ri-contacts-book-line:before{content:"\ebce"}.ri-contacts-book-upload-fill:before{content:"\ebcf"}.ri-contacts-book-upload-line:before{content:"\ebd0"}.ri-contacts-fill:before{content:"\ebd1"}.ri-contacts-line:before{content:"\ebd2"}.ri-contrast-2-fill:before{content:"\ebd3"}.ri-contrast-2-line:before{content:"\ebd4"}.ri-contrast-drop-2-fill:before{content:"\ebd5"}.ri-contrast-drop-2-line:before{content:"\ebd6"}.ri-contrast-drop-fill:before{content:"\ebd7"}.ri-contrast-drop-line:before{content:"\ebd8"}.ri-contrast-fill:before{content:"\ebd9"}.ri-contrast-line:before{content:"\ebda"}.ri-copper-coin-fill:before{content:"\ebdb"}.ri-copper-coin-line:before{content:"\ebdc"}.ri-copper-diamond-fill:before{content:"\ebdd"}.ri-copper-diamond-line:before{content:"\ebde"}.ri-copyleft-fill:before{content:"\ebdf"}.ri-copyleft-line:before{content:"\ebe0"}.ri-copyright-fill:before{content:"\ebe1"}.ri-copyright-line:before{content:"\ebe2"}.ri-coreos-fill:before{content:"\ebe3"}.ri-coreos-line:before{content:"\ebe4"}.ri-coupon-2-fill:before{content:"\ebe5"}.ri-coupon-2-line:before{content:"\ebe6"}.ri-coupon-3-fill:before{content:"\ebe7"}.ri-coupon-3-line:before{content:"\ebe8"}.ri-coupon-4-fill:before{content:"\ebe9"}.ri-coupon-4-line:before{content:"\ebea"}.ri-coupon-5-fill:before{content:"\ebeb"}.ri-coupon-5-line:before{content:"\ebec"}.ri-coupon-fill:before{content:"\ebed"}.ri-coupon-line:before{content:"\ebee"}.ri-cpu-fill:before{content:"\ebef"}.ri-cpu-line:before{content:"\ebf0"}.ri-creative-commons-by-fill:before{content:"\ebf1"}.ri-creative-commons-by-line:before{content:"\ebf2"}.ri-creative-commons-fill:before{content:"\ebf3"}.ri-creative-commons-line:before{content:"\ebf4"}.ri-creative-commons-nc-fill:before{content:"\ebf5"}.ri-creative-commons-nc-line:before{content:"\ebf6"}.ri-creative-commons-nd-fill:before{content:"\ebf7"}.ri-creative-commons-nd-line:before{content:"\ebf8"}.ri-creative-commons-sa-fill:before{content:"\ebf9"}.ri-creative-commons-sa-line:before{content:"\ebfa"}.ri-creative-commons-zero-fill:before{content:"\ebfb"}.ri-creative-commons-zero-line:before{content:"\ebfc"}.ri-criminal-fill:before{content:"\ebfd"}.ri-criminal-line:before{content:"\ebfe"}.ri-crop-2-fill:before{content:"\ebff"}.ri-crop-2-line:before{content:"\ec00"}.ri-crop-fill:before{content:"\ec01"}.ri-crop-line:before{content:"\ec02"}.ri-css3-fill:before{content:"\ec03"}.ri-css3-line:before{content:"\ec04"}.ri-cup-fill:before{content:"\ec05"}.ri-cup-line:before{content:"\ec06"}.ri-currency-fill:before{content:"\ec07"}.ri-currency-line:before{content:"\ec08"}.ri-cursor-fill:before{content:"\ec09"}.ri-cursor-line:before{content:"\ec0a"}.ri-customer-service-2-fill:before{content:"\ec0b"}.ri-customer-service-2-line:before{content:"\ec0c"}.ri-customer-service-fill:before{content:"\ec0d"}.ri-customer-service-line:before{content:"\ec0e"}.ri-dashboard-2-fill:before{content:"\ec0f"}.ri-dashboard-2-line:before{content:"\ec10"}.ri-dashboard-3-fill:before{content:"\ec11"}.ri-dashboard-3-line:before{content:"\ec12"}.ri-dashboard-fill:before{content:"\ec13"}.ri-dashboard-line:before{content:"\ec14"}.ri-database-2-fill:before{content:"\ec15"}.ri-database-2-line:before{content:"\ec16"}.ri-database-fill:before{content:"\ec17"}.ri-database-line:before{content:"\ec18"}.ri-delete-back-2-fill:before{content:"\ec19"}.ri-delete-back-2-line:before{content:"\ec1a"}.ri-delete-back-fill:before{content:"\ec1b"}.ri-delete-back-line:before{content:"\ec1c"}.ri-delete-bin-2-fill:before{content:"\ec1d"}.ri-delete-bin-2-line:before{content:"\ec1e"}.ri-delete-bin-3-fill:before{content:"\ec1f"}.ri-delete-bin-3-line:before{content:"\ec20"}.ri-delete-bin-4-fill:before{content:"\ec21"}.ri-delete-bin-4-line:before{content:"\ec22"}.ri-delete-bin-5-fill:before{content:"\ec23"}.ri-delete-bin-5-line:before{content:"\ec24"}.ri-delete-bin-6-fill:before{content:"\ec25"}.ri-delete-bin-6-line:before{content:"\ec26"}.ri-delete-bin-7-fill:before{content:"\ec27"}.ri-delete-bin-7-line:before{content:"\ec28"}.ri-delete-bin-fill:before{content:"\ec29"}.ri-delete-bin-line:before{content:"\ec2a"}.ri-delete-column:before{content:"\ec2b"}.ri-delete-row:before{content:"\ec2c"}.ri-device-fill:before{content:"\ec2d"}.ri-device-line:before{content:"\ec2e"}.ri-device-recover-fill:before{content:"\ec2f"}.ri-device-recover-line:before{content:"\ec30"}.ri-dingding-fill:before{content:"\ec31"}.ri-dingding-line:before{content:"\ec32"}.ri-direction-fill:before{content:"\ec33"}.ri-direction-line:before{content:"\ec34"}.ri-disc-fill:before{content:"\ec35"}.ri-disc-line:before{content:"\ec36"}.ri-discord-fill:before{content:"\ec37"}.ri-discord-line:before{content:"\ec38"}.ri-discuss-fill:before{content:"\ec39"}.ri-discuss-line:before{content:"\ec3a"}.ri-dislike-fill:before{content:"\ec3b"}.ri-dislike-line:before{content:"\ec3c"}.ri-disqus-fill:before{content:"\ec3d"}.ri-disqus-line:before{content:"\ec3e"}.ri-divide-fill:before{content:"\ec3f"}.ri-divide-line:before{content:"\ec40"}.ri-donut-chart-fill:before{content:"\ec41"}.ri-donut-chart-line:before{content:"\ec42"}.ri-door-closed-fill:before{content:"\ec43"}.ri-door-closed-line:before{content:"\ec44"}.ri-door-fill:before{content:"\ec45"}.ri-door-line:before{content:"\ec46"}.ri-door-lock-box-fill:before{content:"\ec47"}.ri-door-lock-box-line:before{content:"\ec48"}.ri-door-lock-fill:before{content:"\ec49"}.ri-door-lock-line:before{content:"\ec4a"}.ri-door-open-fill:before{content:"\ec4b"}.ri-door-open-line:before{content:"\ec4c"}.ri-dossier-fill:before{content:"\ec4d"}.ri-dossier-line:before{content:"\ec4e"}.ri-douban-fill:before{content:"\ec4f"}.ri-douban-line:before{content:"\ec50"}.ri-double-quotes-l:before{content:"\ec51"}.ri-double-quotes-r:before{content:"\ec52"}.ri-download-2-fill:before{content:"\ec53"}.ri-download-2-line:before{content:"\ec54"}.ri-download-cloud-2-fill:before{content:"\ec55"}.ri-download-cloud-2-line:before{content:"\ec56"}.ri-download-cloud-fill:before{content:"\ec57"}.ri-download-cloud-line:before{content:"\ec58"}.ri-download-fill:before{content:"\ec59"}.ri-download-line:before{content:"\ec5a"}.ri-draft-fill:before{content:"\ec5b"}.ri-draft-line:before{content:"\ec5c"}.ri-drag-drop-fill:before{content:"\ec5d"}.ri-drag-drop-line:before{content:"\ec5e"}.ri-drag-move-2-fill:before{content:"\ec5f"}.ri-drag-move-2-line:before{content:"\ec60"}.ri-drag-move-fill:before{content:"\ec61"}.ri-drag-move-line:before{content:"\ec62"}.ri-dribbble-fill:before{content:"\ec63"}.ri-dribbble-line:before{content:"\ec64"}.ri-drive-fill:before{content:"\ec65"}.ri-drive-line:before{content:"\ec66"}.ri-drizzle-fill:before{content:"\ec67"}.ri-drizzle-line:before{content:"\ec68"}.ri-drop-fill:before{content:"\ec69"}.ri-drop-line:before{content:"\ec6a"}.ri-dropbox-fill:before{content:"\ec6b"}.ri-dropbox-line:before{content:"\ec6c"}.ri-dual-sim-1-fill:before{content:"\ec6d"}.ri-dual-sim-1-line:before{content:"\ec6e"}.ri-dual-sim-2-fill:before{content:"\ec6f"}.ri-dual-sim-2-line:before{content:"\ec70"}.ri-dv-fill:before{content:"\ec71"}.ri-dv-line:before{content:"\ec72"}.ri-dvd-fill:before{content:"\ec73"}.ri-dvd-line:before{content:"\ec74"}.ri-e-bike-2-fill:before{content:"\ec75"}.ri-e-bike-2-line:before{content:"\ec76"}.ri-e-bike-fill:before{content:"\ec77"}.ri-e-bike-line:before{content:"\ec78"}.ri-earth-fill:before{content:"\ec79"}.ri-earth-line:before{content:"\ec7a"}.ri-earthquake-fill:before{content:"\ec7b"}.ri-earthquake-line:before{content:"\ec7c"}.ri-edge-fill:before{content:"\ec7d"}.ri-edge-line:before{content:"\ec7e"}.ri-edit-2-fill:before{content:"\ec7f"}.ri-edit-2-line:before{content:"\ec80"}.ri-edit-box-fill:before{content:"\ec81"}.ri-edit-box-line:before{content:"\ec82"}.ri-edit-circle-fill:before{content:"\ec83"}.ri-edit-circle-line:before{content:"\ec84"}.ri-edit-fill:before{content:"\ec85"}.ri-edit-line:before{content:"\ec86"}.ri-eject-fill:before{content:"\ec87"}.ri-eject-line:before{content:"\ec88"}.ri-emotion-2-fill:before{content:"\ec89"}.ri-emotion-2-line:before{content:"\ec8a"}.ri-emotion-fill:before{content:"\ec8b"}.ri-emotion-happy-fill:before{content:"\ec8c"}.ri-emotion-happy-line:before{content:"\ec8d"}.ri-emotion-laugh-fill:before{content:"\ec8e"}.ri-emotion-laugh-line:before{content:"\ec8f"}.ri-emotion-line:before{content:"\ec90"}.ri-emotion-normal-fill:before{content:"\ec91"}.ri-emotion-normal-line:before{content:"\ec92"}.ri-emotion-sad-fill:before{content:"\ec93"}.ri-emotion-sad-line:before{content:"\ec94"}.ri-emotion-unhappy-fill:before{content:"\ec95"}.ri-emotion-unhappy-line:before{content:"\ec96"}.ri-empathize-fill:before{content:"\ec97"}.ri-empathize-line:before{content:"\ec98"}.ri-emphasis-cn:before{content:"\ec99"}.ri-emphasis:before{content:"\ec9a"}.ri-english-input:before{content:"\ec9b"}.ri-equalizer-fill:before{content:"\ec9c"}.ri-equalizer-line:before{content:"\ec9d"}.ri-eraser-fill:before{content:"\ec9e"}.ri-eraser-line:before{content:"\ec9f"}.ri-error-warning-fill:before{content:"\eca0"}.ri-error-warning-line:before{content:"\eca1"}.ri-evernote-fill:before{content:"\eca2"}.ri-evernote-line:before{content:"\eca3"}.ri-exchange-box-fill:before{content:"\eca4"}.ri-exchange-box-line:before{content:"\eca5"}.ri-exchange-cny-fill:before{content:"\eca6"}.ri-exchange-cny-line:before{content:"\eca7"}.ri-exchange-dollar-fill:before{content:"\eca8"}.ri-exchange-dollar-line:before{content:"\eca9"}.ri-exchange-fill:before{content:"\ecaa"}.ri-exchange-funds-fill:before{content:"\ecab"}.ri-exchange-funds-line:before{content:"\ecac"}.ri-exchange-line:before{content:"\ecad"}.ri-external-link-fill:before{content:"\ecae"}.ri-external-link-line:before{content:"\ecaf"}.ri-eye-2-fill:before{content:"\ecb0"}.ri-eye-2-line:before{content:"\ecb1"}.ri-eye-close-fill:before{content:"\ecb2"}.ri-eye-close-line:before{content:"\ecb3"}.ri-eye-fill:before{content:"\ecb4"}.ri-eye-line:before{content:"\ecb5"}.ri-eye-off-fill:before{content:"\ecb6"}.ri-eye-off-line:before{content:"\ecb7"}.ri-facebook-box-fill:before{content:"\ecb8"}.ri-facebook-box-line:before{content:"\ecb9"}.ri-facebook-circle-fill:before{content:"\ecba"}.ri-facebook-circle-line:before{content:"\ecbb"}.ri-facebook-fill:before{content:"\ecbc"}.ri-facebook-line:before{content:"\ecbd"}.ri-fahrenheit-fill:before{content:"\ecbe"}.ri-fahrenheit-line:before{content:"\ecbf"}.ri-feedback-fill:before{content:"\ecc0"}.ri-feedback-line:before{content:"\ecc1"}.ri-file-2-fill:before{content:"\ecc2"}.ri-file-2-line:before{content:"\ecc3"}.ri-file-3-fill:before{content:"\ecc4"}.ri-file-3-line:before{content:"\ecc5"}.ri-file-4-fill:before{content:"\ecc6"}.ri-file-4-line:before{content:"\ecc7"}.ri-file-add-fill:before{content:"\ecc8"}.ri-file-add-line:before{content:"\ecc9"}.ri-file-chart-2-fill:before{content:"\ecca"}.ri-file-chart-2-line:before{content:"\eccb"}.ri-file-chart-fill:before{content:"\eccc"}.ri-file-chart-line:before{content:"\eccd"}.ri-file-cloud-fill:before{content:"\ecce"}.ri-file-cloud-line:before{content:"\eccf"}.ri-file-code-fill:before{content:"\ecd0"}.ri-file-code-line:before{content:"\ecd1"}.ri-file-copy-2-fill:before{content:"\ecd2"}.ri-file-copy-2-line:before{content:"\ecd3"}.ri-file-copy-fill:before{content:"\ecd4"}.ri-file-copy-line:before{content:"\ecd5"}.ri-file-damage-fill:before{content:"\ecd6"}.ri-file-damage-line:before{content:"\ecd7"}.ri-file-download-fill:before{content:"\ecd8"}.ri-file-download-line:before{content:"\ecd9"}.ri-file-edit-fill:before{content:"\ecda"}.ri-file-edit-line:before{content:"\ecdb"}.ri-file-excel-2-fill:before{content:"\ecdc"}.ri-file-excel-2-line:before{content:"\ecdd"}.ri-file-excel-fill:before{content:"\ecde"}.ri-file-excel-line:before{content:"\ecdf"}.ri-file-fill:before{content:"\ece0"}.ri-file-forbid-fill:before{content:"\ece1"}.ri-file-forbid-line:before{content:"\ece2"}.ri-file-gif-fill:before{content:"\ece3"}.ri-file-gif-line:before{content:"\ece4"}.ri-file-history-fill:before{content:"\ece5"}.ri-file-history-line:before{content:"\ece6"}.ri-file-hwp-fill:before{content:"\ece7"}.ri-file-hwp-line:before{content:"\ece8"}.ri-file-info-fill:before{content:"\ece9"}.ri-file-info-line:before{content:"\ecea"}.ri-file-line:before{content:"\eceb"}.ri-file-list-2-fill:before{content:"\ecec"}.ri-file-list-2-line:before{content:"\eced"}.ri-file-list-3-fill:before{content:"\ecee"}.ri-file-list-3-line:before{content:"\ecef"}.ri-file-list-fill:before{content:"\ecf0"}.ri-file-list-line:before{content:"\ecf1"}.ri-file-lock-fill:before{content:"\ecf2"}.ri-file-lock-line:before{content:"\ecf3"}.ri-file-mark-fill:before{content:"\ecf4"}.ri-file-mark-line:before{content:"\ecf5"}.ri-file-music-fill:before{content:"\ecf6"}.ri-file-music-line:before{content:"\ecf7"}.ri-file-paper-2-fill:before{content:"\ecf8"}.ri-file-paper-2-line:before{content:"\ecf9"}.ri-file-paper-fill:before{content:"\ecfa"}.ri-file-paper-line:before{content:"\ecfb"}.ri-file-pdf-fill:before{content:"\ecfc"}.ri-file-pdf-line:before{content:"\ecfd"}.ri-file-ppt-2-fill:before{content:"\ecfe"}.ri-file-ppt-2-line:before{content:"\ecff"}.ri-file-ppt-fill:before{content:"\ed00"}.ri-file-ppt-line:before{content:"\ed01"}.ri-file-reduce-fill:before{content:"\ed02"}.ri-file-reduce-line:before{content:"\ed03"}.ri-file-search-fill:before{content:"\ed04"}.ri-file-search-line:before{content:"\ed05"}.ri-file-settings-fill:before{content:"\ed06"}.ri-file-settings-line:before{content:"\ed07"}.ri-file-shield-2-fill:before{content:"\ed08"}.ri-file-shield-2-line:before{content:"\ed09"}.ri-file-shield-fill:before{content:"\ed0a"}.ri-file-shield-line:before{content:"\ed0b"}.ri-file-shred-fill:before{content:"\ed0c"}.ri-file-shred-line:before{content:"\ed0d"}.ri-file-text-fill:before{content:"\ed0e"}.ri-file-text-line:before{content:"\ed0f"}.ri-file-transfer-fill:before{content:"\ed10"}.ri-file-transfer-line:before{content:"\ed11"}.ri-file-unknow-fill:before{content:"\ed12"}.ri-file-unknow-line:before{content:"\ed13"}.ri-file-upload-fill:before{content:"\ed14"}.ri-file-upload-line:before{content:"\ed15"}.ri-file-user-fill:before{content:"\ed16"}.ri-file-user-line:before{content:"\ed17"}.ri-file-warning-fill:before{content:"\ed18"}.ri-file-warning-line:before{content:"\ed19"}.ri-file-word-2-fill:before{content:"\ed1a"}.ri-file-word-2-line:before{content:"\ed1b"}.ri-file-word-fill:before{content:"\ed1c"}.ri-file-word-line:before{content:"\ed1d"}.ri-file-zip-fill:before{content:"\ed1e"}.ri-file-zip-line:before{content:"\ed1f"}.ri-film-fill:before{content:"\ed20"}.ri-film-line:before{content:"\ed21"}.ri-filter-2-fill:before{content:"\ed22"}.ri-filter-2-line:before{content:"\ed23"}.ri-filter-3-fill:before{content:"\ed24"}.ri-filter-3-line:before{content:"\ed25"}.ri-filter-fill:before{content:"\ed26"}.ri-filter-line:before{content:"\ed27"}.ri-filter-off-fill:before{content:"\ed28"}.ri-filter-off-line:before{content:"\ed29"}.ri-find-replace-fill:before{content:"\ed2a"}.ri-find-replace-line:before{content:"\ed2b"}.ri-finder-fill:before{content:"\ed2c"}.ri-finder-line:before{content:"\ed2d"}.ri-fingerprint-2-fill:before{content:"\ed2e"}.ri-fingerprint-2-line:before{content:"\ed2f"}.ri-fingerprint-fill:before{content:"\ed30"}.ri-fingerprint-line:before{content:"\ed31"}.ri-fire-fill:before{content:"\ed32"}.ri-fire-line:before{content:"\ed33"}.ri-firefox-fill:before{content:"\ed34"}.ri-firefox-line:before{content:"\ed35"}.ri-first-aid-kit-fill:before{content:"\ed36"}.ri-first-aid-kit-line:before{content:"\ed37"}.ri-flag-2-fill:before{content:"\ed38"}.ri-flag-2-line:before{content:"\ed39"}.ri-flag-fill:before{content:"\ed3a"}.ri-flag-line:before{content:"\ed3b"}.ri-flashlight-fill:before{content:"\ed3c"}.ri-flashlight-line:before{content:"\ed3d"}.ri-flask-fill:before{content:"\ed3e"}.ri-flask-line:before{content:"\ed3f"}.ri-flight-land-fill:before{content:"\ed40"}.ri-flight-land-line:before{content:"\ed41"}.ri-flight-takeoff-fill:before{content:"\ed42"}.ri-flight-takeoff-line:before{content:"\ed43"}.ri-flood-fill:before{content:"\ed44"}.ri-flood-line:before{content:"\ed45"}.ri-flow-chart:before{content:"\ed46"}.ri-flutter-fill:before{content:"\ed47"}.ri-flutter-line:before{content:"\ed48"}.ri-focus-2-fill:before{content:"\ed49"}.ri-focus-2-line:before{content:"\ed4a"}.ri-focus-3-fill:before{content:"\ed4b"}.ri-focus-3-line:before{content:"\ed4c"}.ri-focus-fill:before{content:"\ed4d"}.ri-focus-line:before{content:"\ed4e"}.ri-foggy-fill:before{content:"\ed4f"}.ri-foggy-line:before{content:"\ed50"}.ri-folder-2-fill:before{content:"\ed51"}.ri-folder-2-line:before{content:"\ed52"}.ri-folder-3-fill:before{content:"\ed53"}.ri-folder-3-line:before{content:"\ed54"}.ri-folder-4-fill:before{content:"\ed55"}.ri-folder-4-line:before{content:"\ed56"}.ri-folder-5-fill:before{content:"\ed57"}.ri-folder-5-line:before{content:"\ed58"}.ri-folder-add-fill:before{content:"\ed59"}.ri-folder-add-line:before{content:"\ed5a"}.ri-folder-chart-2-fill:before{content:"\ed5b"}.ri-folder-chart-2-line:before{content:"\ed5c"}.ri-folder-chart-fill:before{content:"\ed5d"}.ri-folder-chart-line:before{content:"\ed5e"}.ri-folder-download-fill:before{content:"\ed5f"}.ri-folder-download-line:before{content:"\ed60"}.ri-folder-fill:before{content:"\ed61"}.ri-folder-forbid-fill:before{content:"\ed62"}.ri-folder-forbid-line:before{content:"\ed63"}.ri-folder-history-fill:before{content:"\ed64"}.ri-folder-history-line:before{content:"\ed65"}.ri-folder-info-fill:before{content:"\ed66"}.ri-folder-info-line:before{content:"\ed67"}.ri-folder-keyhole-fill:before{content:"\ed68"}.ri-folder-keyhole-line:before{content:"\ed69"}.ri-folder-line:before{content:"\ed6a"}.ri-folder-lock-fill:before{content:"\ed6b"}.ri-folder-lock-line:before{content:"\ed6c"}.ri-folder-music-fill:before{content:"\ed6d"}.ri-folder-music-line:before{content:"\ed6e"}.ri-folder-open-fill:before{content:"\ed6f"}.ri-folder-open-line:before{content:"\ed70"}.ri-folder-received-fill:before{content:"\ed71"}.ri-folder-received-line:before{content:"\ed72"}.ri-folder-reduce-fill:before{content:"\ed73"}.ri-folder-reduce-line:before{content:"\ed74"}.ri-folder-settings-fill:before{content:"\ed75"}.ri-folder-settings-line:before{content:"\ed76"}.ri-folder-shared-fill:before{content:"\ed77"}.ri-folder-shared-line:before{content:"\ed78"}.ri-folder-shield-2-fill:before{content:"\ed79"}.ri-folder-shield-2-line:before{content:"\ed7a"}.ri-folder-shield-fill:before{content:"\ed7b"}.ri-folder-shield-line:before{content:"\ed7c"}.ri-folder-transfer-fill:before{content:"\ed7d"}.ri-folder-transfer-line:before{content:"\ed7e"}.ri-folder-unknow-fill:before{content:"\ed7f"}.ri-folder-unknow-line:before{content:"\ed80"}.ri-folder-upload-fill:before{content:"\ed81"}.ri-folder-upload-line:before{content:"\ed82"}.ri-folder-user-fill:before{content:"\ed83"}.ri-folder-user-line:before{content:"\ed84"}.ri-folder-warning-fill:before{content:"\ed85"}.ri-folder-warning-line:before{content:"\ed86"}.ri-folder-zip-fill:before{content:"\ed87"}.ri-folder-zip-line:before{content:"\ed88"}.ri-folders-fill:before{content:"\ed89"}.ri-folders-line:before{content:"\ed8a"}.ri-font-color:before{content:"\ed8b"}.ri-font-size-2:before{content:"\ed8c"}.ri-font-size:before{content:"\ed8d"}.ri-football-fill:before{content:"\ed8e"}.ri-football-line:before{content:"\ed8f"}.ri-footprint-fill:before{content:"\ed90"}.ri-footprint-line:before{content:"\ed91"}.ri-forbid-2-fill:before{content:"\ed92"}.ri-forbid-2-line:before{content:"\ed93"}.ri-forbid-fill:before{content:"\ed94"}.ri-forbid-line:before{content:"\ed95"}.ri-format-clear:before{content:"\ed96"}.ri-fridge-fill:before{content:"\ed97"}.ri-fridge-line:before{content:"\ed98"}.ri-fullscreen-exit-fill:before{content:"\ed99"}.ri-fullscreen-exit-line:before{content:"\ed9a"}.ri-fullscreen-fill:before{content:"\ed9b"}.ri-fullscreen-line:before{content:"\ed9c"}.ri-function-fill:before{content:"\ed9d"}.ri-function-line:before{content:"\ed9e"}.ri-functions:before{content:"\ed9f"}.ri-funds-box-fill:before{content:"\eda0"}.ri-funds-box-line:before{content:"\eda1"}.ri-funds-fill:before{content:"\eda2"}.ri-funds-line:before{content:"\eda3"}.ri-gallery-fill:before{content:"\eda4"}.ri-gallery-line:before{content:"\eda5"}.ri-gallery-upload-fill:before{content:"\eda6"}.ri-gallery-upload-line:before{content:"\eda7"}.ri-game-fill:before{content:"\eda8"}.ri-game-line:before{content:"\eda9"}.ri-gamepad-fill:before{content:"\edaa"}.ri-gamepad-line:before{content:"\edab"}.ri-gas-station-fill:before{content:"\edac"}.ri-gas-station-line:before{content:"\edad"}.ri-gatsby-fill:before{content:"\edae"}.ri-gatsby-line:before{content:"\edaf"}.ri-genderless-fill:before{content:"\edb0"}.ri-genderless-line:before{content:"\edb1"}.ri-ghost-2-fill:before{content:"\edb2"}.ri-ghost-2-line:before{content:"\edb3"}.ri-ghost-fill:before{content:"\edb4"}.ri-ghost-line:before{content:"\edb5"}.ri-ghost-smile-fill:before{content:"\edb6"}.ri-ghost-smile-line:before{content:"\edb7"}.ri-gift-2-fill:before{content:"\edb8"}.ri-gift-2-line:before{content:"\edb9"}.ri-gift-fill:before{content:"\edba"}.ri-gift-line:before{content:"\edbb"}.ri-git-branch-fill:before{content:"\edbc"}.ri-git-branch-line:before{content:"\edbd"}.ri-git-commit-fill:before{content:"\edbe"}.ri-git-commit-line:before{content:"\edbf"}.ri-git-merge-fill:before{content:"\edc0"}.ri-git-merge-line:before{content:"\edc1"}.ri-git-pull-request-fill:before{content:"\edc2"}.ri-git-pull-request-line:before{content:"\edc3"}.ri-git-repository-commits-fill:before{content:"\edc4"}.ri-git-repository-commits-line:before{content:"\edc5"}.ri-git-repository-fill:before{content:"\edc6"}.ri-git-repository-line:before{content:"\edc7"}.ri-git-repository-private-fill:before{content:"\edc8"}.ri-git-repository-private-line:before{content:"\edc9"}.ri-github-fill:before{content:"\edca"}.ri-github-line:before{content:"\edcb"}.ri-gitlab-fill:before{content:"\edcc"}.ri-gitlab-line:before{content:"\edcd"}.ri-global-fill:before{content:"\edce"}.ri-global-line:before{content:"\edcf"}.ri-globe-fill:before{content:"\edd0"}.ri-globe-line:before{content:"\edd1"}.ri-goblet-fill:before{content:"\edd2"}.ri-goblet-line:before{content:"\edd3"}.ri-google-fill:before{content:"\edd4"}.ri-google-line:before{content:"\edd5"}.ri-google-play-fill:before{content:"\edd6"}.ri-google-play-line:before{content:"\edd7"}.ri-government-fill:before{content:"\edd8"}.ri-government-line:before{content:"\edd9"}.ri-gps-fill:before{content:"\edda"}.ri-gps-line:before{content:"\eddb"}.ri-gradienter-fill:before{content:"\eddc"}.ri-gradienter-line:before{content:"\eddd"}.ri-grid-fill:before{content:"\edde"}.ri-grid-line:before{content:"\eddf"}.ri-group-2-fill:before{content:"\ede0"}.ri-group-2-line:before{content:"\ede1"}.ri-group-fill:before{content:"\ede2"}.ri-group-line:before{content:"\ede3"}.ri-guide-fill:before{content:"\ede4"}.ri-guide-line:before{content:"\ede5"}.ri-h-1:before{content:"\ede6"}.ri-h-2:before{content:"\ede7"}.ri-h-3:before{content:"\ede8"}.ri-h-4:before{content:"\ede9"}.ri-h-5:before{content:"\edea"}.ri-h-6:before{content:"\edeb"}.ri-hail-fill:before{content:"\edec"}.ri-hail-line:before{content:"\eded"}.ri-hammer-fill:before{content:"\edee"}.ri-hammer-line:before{content:"\edef"}.ri-hand-coin-fill:before{content:"\edf0"}.ri-hand-coin-line:before{content:"\edf1"}.ri-hand-heart-fill:before{content:"\edf2"}.ri-hand-heart-line:before{content:"\edf3"}.ri-hand-sanitizer-fill:before{content:"\edf4"}.ri-hand-sanitizer-line:before{content:"\edf5"}.ri-handbag-fill:before{content:"\edf6"}.ri-handbag-line:before{content:"\edf7"}.ri-hard-drive-2-fill:before{content:"\edf8"}.ri-hard-drive-2-line:before{content:"\edf9"}.ri-hard-drive-fill:before{content:"\edfa"}.ri-hard-drive-line:before{content:"\edfb"}.ri-hashtag:before{content:"\edfc"}.ri-haze-2-fill:before{content:"\edfd"}.ri-haze-2-line:before{content:"\edfe"}.ri-haze-fill:before{content:"\edff"}.ri-haze-line:before{content:"\ee00"}.ri-hd-fill:before{content:"\ee01"}.ri-hd-line:before{content:"\ee02"}.ri-heading:before{content:"\ee03"}.ri-headphone-fill:before{content:"\ee04"}.ri-headphone-line:before{content:"\ee05"}.ri-health-book-fill:before{content:"\ee06"}.ri-health-book-line:before{content:"\ee07"}.ri-heart-2-fill:before{content:"\ee08"}.ri-heart-2-line:before{content:"\ee09"}.ri-heart-3-fill:before{content:"\ee0a"}.ri-heart-3-line:before{content:"\ee0b"}.ri-heart-add-fill:before{content:"\ee0c"}.ri-heart-add-line:before{content:"\ee0d"}.ri-heart-fill:before{content:"\ee0e"}.ri-heart-line:before{content:"\ee0f"}.ri-heart-pulse-fill:before{content:"\ee10"}.ri-heart-pulse-line:before{content:"\ee11"}.ri-hearts-fill:before{content:"\ee12"}.ri-hearts-line:before{content:"\ee13"}.ri-heavy-showers-fill:before{content:"\ee14"}.ri-heavy-showers-line:before{content:"\ee15"}.ri-history-fill:before{content:"\ee16"}.ri-history-line:before{content:"\ee17"}.ri-home-2-fill:before{content:"\ee18"}.ri-home-2-line:before{content:"\ee19"}.ri-home-3-fill:before{content:"\ee1a"}.ri-home-3-line:before{content:"\ee1b"}.ri-home-4-fill:before{content:"\ee1c"}.ri-home-4-line:before{content:"\ee1d"}.ri-home-5-fill:before{content:"\ee1e"}.ri-home-5-line:before{content:"\ee1f"}.ri-home-6-fill:before{content:"\ee20"}.ri-home-6-line:before{content:"\ee21"}.ri-home-7-fill:before{content:"\ee22"}.ri-home-7-line:before{content:"\ee23"}.ri-home-8-fill:before{content:"\ee24"}.ri-home-8-line:before{content:"\ee25"}.ri-home-fill:before{content:"\ee26"}.ri-home-gear-fill:before{content:"\ee27"}.ri-home-gear-line:before{content:"\ee28"}.ri-home-heart-fill:before{content:"\ee29"}.ri-home-heart-line:before{content:"\ee2a"}.ri-home-line:before{content:"\ee2b"}.ri-home-smile-2-fill:before{content:"\ee2c"}.ri-home-smile-2-line:before{content:"\ee2d"}.ri-home-smile-fill:before{content:"\ee2e"}.ri-home-smile-line:before{content:"\ee2f"}.ri-home-wifi-fill:before{content:"\ee30"}.ri-home-wifi-line:before{content:"\ee31"}.ri-honor-of-kings-fill:before{content:"\ee32"}.ri-honor-of-kings-line:before{content:"\ee33"}.ri-honour-fill:before{content:"\ee34"}.ri-honour-line:before{content:"\ee35"}.ri-hospital-fill:before{content:"\ee36"}.ri-hospital-line:before{content:"\ee37"}.ri-hotel-bed-fill:before{content:"\ee38"}.ri-hotel-bed-line:before{content:"\ee39"}.ri-hotel-fill:before{content:"\ee3a"}.ri-hotel-line:before{content:"\ee3b"}.ri-hotspot-fill:before{content:"\ee3c"}.ri-hotspot-line:before{content:"\ee3d"}.ri-hq-fill:before{content:"\ee3e"}.ri-hq-line:before{content:"\ee3f"}.ri-html5-fill:before{content:"\ee40"}.ri-html5-line:before{content:"\ee41"}.ri-ie-fill:before{content:"\ee42"}.ri-ie-line:before{content:"\ee43"}.ri-image-2-fill:before{content:"\ee44"}.ri-image-2-line:before{content:"\ee45"}.ri-image-add-fill:before{content:"\ee46"}.ri-image-add-line:before{content:"\ee47"}.ri-image-edit-fill:before{content:"\ee48"}.ri-image-edit-line:before{content:"\ee49"}.ri-image-fill:before{content:"\ee4a"}.ri-image-line:before{content:"\ee4b"}.ri-inbox-archive-fill:before{content:"\ee4c"}.ri-inbox-archive-line:before{content:"\ee4d"}.ri-inbox-fill:before{content:"\ee4e"}.ri-inbox-line:before{content:"\ee4f"}.ri-inbox-unarchive-fill:before{content:"\ee50"}.ri-inbox-unarchive-line:before{content:"\ee51"}.ri-increase-decrease-fill:before{content:"\ee52"}.ri-increase-decrease-line:before{content:"\ee53"}.ri-indent-decrease:before{content:"\ee54"}.ri-indent-increase:before{content:"\ee55"}.ri-indeterminate-circle-fill:before{content:"\ee56"}.ri-indeterminate-circle-line:before{content:"\ee57"}.ri-information-fill:before{content:"\ee58"}.ri-information-line:before{content:"\ee59"}.ri-infrared-thermometer-fill:before{content:"\ee5a"}.ri-infrared-thermometer-line:before{content:"\ee5b"}.ri-ink-bottle-fill:before{content:"\ee5c"}.ri-ink-bottle-line:before{content:"\ee5d"}.ri-input-cursor-move:before{content:"\ee5e"}.ri-input-method-fill:before{content:"\ee5f"}.ri-input-method-line:before{content:"\ee60"}.ri-insert-column-left:before{content:"\ee61"}.ri-insert-column-right:before{content:"\ee62"}.ri-insert-row-bottom:before{content:"\ee63"}.ri-insert-row-top:before{content:"\ee64"}.ri-instagram-fill:before{content:"\ee65"}.ri-instagram-line:before{content:"\ee66"}.ri-install-fill:before{content:"\ee67"}.ri-install-line:before{content:"\ee68"}.ri-invision-fill:before{content:"\ee69"}.ri-invision-line:before{content:"\ee6a"}.ri-italic:before{content:"\ee6b"}.ri-kakao-talk-fill:before{content:"\ee6c"}.ri-kakao-talk-line:before{content:"\ee6d"}.ri-key-2-fill:before{content:"\ee6e"}.ri-key-2-line:before{content:"\ee6f"}.ri-key-fill:before{content:"\ee70"}.ri-key-line:before{content:"\ee71"}.ri-keyboard-box-fill:before{content:"\ee72"}.ri-keyboard-box-line:before{content:"\ee73"}.ri-keyboard-fill:before{content:"\ee74"}.ri-keyboard-line:before{content:"\ee75"}.ri-keynote-fill:before{content:"\ee76"}.ri-keynote-line:before{content:"\ee77"}.ri-knife-blood-fill:before{content:"\ee78"}.ri-knife-blood-line:before{content:"\ee79"}.ri-knife-fill:before{content:"\ee7a"}.ri-knife-line:before{content:"\ee7b"}.ri-landscape-fill:before{content:"\ee7c"}.ri-landscape-line:before{content:"\ee7d"}.ri-layout-2-fill:before{content:"\ee7e"}.ri-layout-2-line:before{content:"\ee7f"}.ri-layout-3-fill:before{content:"\ee80"}.ri-layout-3-line:before{content:"\ee81"}.ri-layout-4-fill:before{content:"\ee82"}.ri-layout-4-line:before{content:"\ee83"}.ri-layout-5-fill:before{content:"\ee84"}.ri-layout-5-line:before{content:"\ee85"}.ri-layout-6-fill:before{content:"\ee86"}.ri-layout-6-line:before{content:"\ee87"}.ri-layout-bottom-2-fill:before{content:"\ee88"}.ri-layout-bottom-2-line:before{content:"\ee89"}.ri-layout-bottom-fill:before{content:"\ee8a"}.ri-layout-bottom-line:before{content:"\ee8b"}.ri-layout-column-fill:before{content:"\ee8c"}.ri-layout-column-line:before{content:"\ee8d"}.ri-layout-fill:before{content:"\ee8e"}.ri-layout-grid-fill:before{content:"\ee8f"}.ri-layout-grid-line:before{content:"\ee90"}.ri-layout-left-2-fill:before{content:"\ee91"}.ri-layout-left-2-line:before{content:"\ee92"}.ri-layout-left-fill:before{content:"\ee93"}.ri-layout-left-line:before{content:"\ee94"}.ri-layout-line:before{content:"\ee95"}.ri-layout-masonry-fill:before{content:"\ee96"}.ri-layout-masonry-line:before{content:"\ee97"}.ri-layout-right-2-fill:before{content:"\ee98"}.ri-layout-right-2-line:before{content:"\ee99"}.ri-layout-right-fill:before{content:"\ee9a"}.ri-layout-right-line:before{content:"\ee9b"}.ri-layout-row-fill:before{content:"\ee9c"}.ri-layout-row-line:before{content:"\ee9d"}.ri-layout-top-2-fill:before{content:"\ee9e"}.ri-layout-top-2-line:before{content:"\ee9f"}.ri-layout-top-fill:before{content:"\eea0"}.ri-layout-top-line:before{content:"\eea1"}.ri-leaf-fill:before{content:"\eea2"}.ri-leaf-line:before{content:"\eea3"}.ri-lifebuoy-fill:before{content:"\eea4"}.ri-lifebuoy-line:before{content:"\eea5"}.ri-lightbulb-fill:before{content:"\eea6"}.ri-lightbulb-flash-fill:before{content:"\eea7"}.ri-lightbulb-flash-line:before{content:"\eea8"}.ri-lightbulb-line:before{content:"\eea9"}.ri-line-chart-fill:before{content:"\eeaa"}.ri-line-chart-line:before{content:"\eeab"}.ri-line-fill:before{content:"\eeac"}.ri-line-height:before{content:"\eead"}.ri-line-line:before{content:"\eeae"}.ri-link-m:before{content:"\eeaf"}.ri-link-unlink-m:before{content:"\eeb0"}.ri-link-unlink:before{content:"\eeb1"}.ri-link:before{content:"\eeb2"}.ri-linkedin-box-fill:before{content:"\eeb3"}.ri-linkedin-box-line:before{content:"\eeb4"}.ri-linkedin-fill:before{content:"\eeb5"}.ri-linkedin-line:before{content:"\eeb6"}.ri-links-fill:before{content:"\eeb7"}.ri-links-line:before{content:"\eeb8"}.ri-list-check-2:before{content:"\eeb9"}.ri-list-check:before{content:"\eeba"}.ri-list-ordered:before{content:"\eebb"}.ri-list-settings-fill:before{content:"\eebc"}.ri-list-settings-line:before{content:"\eebd"}.ri-list-unordered:before{content:"\eebe"}.ri-live-fill:before{content:"\eebf"}.ri-live-line:before{content:"\eec0"}.ri-loader-2-fill:before{content:"\eec1"}.ri-loader-2-line:before{content:"\eec2"}.ri-loader-3-fill:before{content:"\eec3"}.ri-loader-3-line:before{content:"\eec4"}.ri-loader-4-fill:before{content:"\eec5"}.ri-loader-4-line:before{content:"\eec6"}.ri-loader-5-fill:before{content:"\eec7"}.ri-loader-5-line:before{content:"\eec8"}.ri-loader-fill:before{content:"\eec9"}.ri-loader-line:before{content:"\eeca"}.ri-lock-2-fill:before{content:"\eecb"}.ri-lock-2-line:before{content:"\eecc"}.ri-lock-fill:before{content:"\eecd"}.ri-lock-line:before{content:"\eece"}.ri-lock-password-fill:before{content:"\eecf"}.ri-lock-password-line:before{content:"\eed0"}.ri-lock-unlock-fill:before{content:"\eed1"}.ri-lock-unlock-line:before{content:"\eed2"}.ri-login-box-fill:before{content:"\eed3"}.ri-login-box-line:before{content:"\eed4"}.ri-login-circle-fill:before{content:"\eed5"}.ri-login-circle-line:before{content:"\eed6"}.ri-logout-box-fill:before{content:"\eed7"}.ri-logout-box-line:before{content:"\eed8"}.ri-logout-box-r-fill:before{content:"\eed9"}.ri-logout-box-r-line:before{content:"\eeda"}.ri-logout-circle-fill:before{content:"\eedb"}.ri-logout-circle-line:before{content:"\eedc"}.ri-logout-circle-r-fill:before{content:"\eedd"}.ri-logout-circle-r-line:before{content:"\eede"}.ri-luggage-cart-fill:before{content:"\eedf"}.ri-luggage-cart-line:before{content:"\eee0"}.ri-luggage-deposit-fill:before{content:"\eee1"}.ri-luggage-deposit-line:before{content:"\eee2"}.ri-lungs-fill:before{content:"\eee3"}.ri-lungs-line:before{content:"\eee4"}.ri-mac-fill:before{content:"\eee5"}.ri-mac-line:before{content:"\eee6"}.ri-macbook-fill:before{content:"\eee7"}.ri-macbook-line:before{content:"\eee8"}.ri-magic-fill:before{content:"\eee9"}.ri-magic-line:before{content:"\eeea"}.ri-mail-add-fill:before{content:"\eeeb"}.ri-mail-add-line:before{content:"\eeec"}.ri-mail-check-fill:before{content:"\eeed"}.ri-mail-check-line:before{content:"\eeee"}.ri-mail-close-fill:before{content:"\eeef"}.ri-mail-close-line:before{content:"\eef0"}.ri-mail-download-fill:before{content:"\eef1"}.ri-mail-download-line:before{content:"\eef2"}.ri-mail-fill:before{content:"\eef3"}.ri-mail-forbid-fill:before{content:"\eef4"}.ri-mail-forbid-line:before{content:"\eef5"}.ri-mail-line:before{content:"\eef6"}.ri-mail-lock-fill:before{content:"\eef7"}.ri-mail-lock-line:before{content:"\eef8"}.ri-mail-open-fill:before{content:"\eef9"}.ri-mail-open-line:before{content:"\eefa"}.ri-mail-send-fill:before{content:"\eefb"}.ri-mail-send-line:before{content:"\eefc"}.ri-mail-settings-fill:before{content:"\eefd"}.ri-mail-settings-line:before{content:"\eefe"}.ri-mail-star-fill:before{content:"\eeff"}.ri-mail-star-line:before{content:"\ef00"}.ri-mail-unread-fill:before{content:"\ef01"}.ri-mail-unread-line:before{content:"\ef02"}.ri-mail-volume-fill:before{content:"\ef03"}.ri-mail-volume-line:before{content:"\ef04"}.ri-map-2-fill:before{content:"\ef05"}.ri-map-2-line:before{content:"\ef06"}.ri-map-fill:before{content:"\ef07"}.ri-map-line:before{content:"\ef08"}.ri-map-pin-2-fill:before{content:"\ef09"}.ri-map-pin-2-line:before{content:"\ef0a"}.ri-map-pin-3-fill:before{content:"\ef0b"}.ri-map-pin-3-line:before{content:"\ef0c"}.ri-map-pin-4-fill:before{content:"\ef0d"}.ri-map-pin-4-line:before{content:"\ef0e"}.ri-map-pin-5-fill:before{content:"\ef0f"}.ri-map-pin-5-line:before{content:"\ef10"}.ri-map-pin-add-fill:before{content:"\ef11"}.ri-map-pin-add-line:before{content:"\ef12"}.ri-map-pin-fill:before{content:"\ef13"}.ri-map-pin-line:before{content:"\ef14"}.ri-map-pin-range-fill:before{content:"\ef15"}.ri-map-pin-range-line:before{content:"\ef16"}.ri-map-pin-time-fill:before{content:"\ef17"}.ri-map-pin-time-line:before{content:"\ef18"}.ri-map-pin-user-fill:before{content:"\ef19"}.ri-map-pin-user-line:before{content:"\ef1a"}.ri-mark-pen-fill:before{content:"\ef1b"}.ri-mark-pen-line:before{content:"\ef1c"}.ri-markdown-fill:before{content:"\ef1d"}.ri-markdown-line:before{content:"\ef1e"}.ri-markup-fill:before{content:"\ef1f"}.ri-markup-line:before{content:"\ef20"}.ri-mastercard-fill:before{content:"\ef21"}.ri-mastercard-line:before{content:"\ef22"}.ri-mastodon-fill:before{content:"\ef23"}.ri-mastodon-line:before{content:"\ef24"}.ri-medal-2-fill:before{content:"\ef25"}.ri-medal-2-line:before{content:"\ef26"}.ri-medal-fill:before{content:"\ef27"}.ri-medal-line:before{content:"\ef28"}.ri-medicine-bottle-fill:before{content:"\ef29"}.ri-medicine-bottle-line:before{content:"\ef2a"}.ri-medium-fill:before{content:"\ef2b"}.ri-medium-line:before{content:"\ef2c"}.ri-men-fill:before{content:"\ef2d"}.ri-men-line:before{content:"\ef2e"}.ri-mental-health-fill:before{content:"\ef2f"}.ri-mental-health-line:before{content:"\ef30"}.ri-menu-2-fill:before{content:"\ef31"}.ri-menu-2-line:before{content:"\ef32"}.ri-menu-3-fill:before{content:"\ef33"}.ri-menu-3-line:before{content:"\ef34"}.ri-menu-4-fill:before{content:"\ef35"}.ri-menu-4-line:before{content:"\ef36"}.ri-menu-5-fill:before{content:"\ef37"}.ri-menu-5-line:before{content:"\ef38"}.ri-menu-add-fill:before{content:"\ef39"}.ri-menu-add-line:before{content:"\ef3a"}.ri-menu-fill:before{content:"\ef3b"}.ri-menu-fold-fill:before{content:"\ef3c"}.ri-menu-fold-line:before{content:"\ef3d"}.ri-menu-line:before{content:"\ef3e"}.ri-menu-unfold-fill:before{content:"\ef3f"}.ri-menu-unfold-line:before{content:"\ef40"}.ri-merge-cells-horizontal:before{content:"\ef41"}.ri-merge-cells-vertical:before{content:"\ef42"}.ri-message-2-fill:before{content:"\ef43"}.ri-message-2-line:before{content:"\ef44"}.ri-message-3-fill:before{content:"\ef45"}.ri-message-3-line:before{content:"\ef46"}.ri-message-fill:before{content:"\ef47"}.ri-message-line:before{content:"\ef48"}.ri-messenger-fill:before{content:"\ef49"}.ri-messenger-line:before{content:"\ef4a"}.ri-meteor-fill:before{content:"\ef4b"}.ri-meteor-line:before{content:"\ef4c"}.ri-mic-2-fill:before{content:"\ef4d"}.ri-mic-2-line:before{content:"\ef4e"}.ri-mic-fill:before{content:"\ef4f"}.ri-mic-line:before{content:"\ef50"}.ri-mic-off-fill:before{content:"\ef51"}.ri-mic-off-line:before{content:"\ef52"}.ri-mickey-fill:before{content:"\ef53"}.ri-mickey-line:before{content:"\ef54"}.ri-microscope-fill:before{content:"\ef55"}.ri-microscope-line:before{content:"\ef56"}.ri-microsoft-fill:before{content:"\ef57"}.ri-microsoft-line:before{content:"\ef58"}.ri-mind-map:before{content:"\ef59"}.ri-mini-program-fill:before{content:"\ef5a"}.ri-mini-program-line:before{content:"\ef5b"}.ri-mist-fill:before{content:"\ef5c"}.ri-mist-line:before{content:"\ef5d"}.ri-money-cny-box-fill:before{content:"\ef5e"}.ri-money-cny-box-line:before{content:"\ef5f"}.ri-money-cny-circle-fill:before{content:"\ef60"}.ri-money-cny-circle-line:before{content:"\ef61"}.ri-money-dollar-box-fill:before{content:"\ef62"}.ri-money-dollar-box-line:before{content:"\ef63"}.ri-money-dollar-circle-fill:before{content:"\ef64"}.ri-money-dollar-circle-line:before{content:"\ef65"}.ri-money-euro-box-fill:before{content:"\ef66"}.ri-money-euro-box-line:before{content:"\ef67"}.ri-money-euro-circle-fill:before{content:"\ef68"}.ri-money-euro-circle-line:before{content:"\ef69"}.ri-money-pound-box-fill:before{content:"\ef6a"}.ri-money-pound-box-line:before{content:"\ef6b"}.ri-money-pound-circle-fill:before{content:"\ef6c"}.ri-money-pound-circle-line:before{content:"\ef6d"}.ri-moon-clear-fill:before{content:"\ef6e"}.ri-moon-clear-line:before{content:"\ef6f"}.ri-moon-cloudy-fill:before{content:"\ef70"}.ri-moon-cloudy-line:before{content:"\ef71"}.ri-moon-fill:before{content:"\ef72"}.ri-moon-foggy-fill:before{content:"\ef73"}.ri-moon-foggy-line:before{content:"\ef74"}.ri-moon-line:before{content:"\ef75"}.ri-more-2-fill:before{content:"\ef76"}.ri-more-2-line:before{content:"\ef77"}.ri-more-fill:before{content:"\ef78"}.ri-more-line:before{content:"\ef79"}.ri-motorbike-fill:before{content:"\ef7a"}.ri-motorbike-line:before{content:"\ef7b"}.ri-mouse-fill:before{content:"\ef7c"}.ri-mouse-line:before{content:"\ef7d"}.ri-movie-2-fill:before{content:"\ef7e"}.ri-movie-2-line:before{content:"\ef7f"}.ri-movie-fill:before{content:"\ef80"}.ri-movie-line:before{content:"\ef81"}.ri-music-2-fill:before{content:"\ef82"}.ri-music-2-line:before{content:"\ef83"}.ri-music-fill:before{content:"\ef84"}.ri-music-line:before{content:"\ef85"}.ri-mv-fill:before{content:"\ef86"}.ri-mv-line:before{content:"\ef87"}.ri-navigation-fill:before{content:"\ef88"}.ri-navigation-line:before{content:"\ef89"}.ri-netease-cloud-music-fill:before{content:"\ef8a"}.ri-netease-cloud-music-line:before{content:"\ef8b"}.ri-netflix-fill:before{content:"\ef8c"}.ri-netflix-line:before{content:"\ef8d"}.ri-newspaper-fill:before{content:"\ef8e"}.ri-newspaper-line:before{content:"\ef8f"}.ri-node-tree:before{content:"\ef90"}.ri-notification-2-fill:before{content:"\ef91"}.ri-notification-2-line:before{content:"\ef92"}.ri-notification-3-fill:before{content:"\ef93"}.ri-notification-3-line:before{content:"\ef94"}.ri-notification-4-fill:before{content:"\ef95"}.ri-notification-4-line:before{content:"\ef96"}.ri-notification-badge-fill:before{content:"\ef97"}.ri-notification-badge-line:before{content:"\ef98"}.ri-notification-fill:before{content:"\ef99"}.ri-notification-line:before{content:"\ef9a"}.ri-notification-off-fill:before{content:"\ef9b"}.ri-notification-off-line:before{content:"\ef9c"}.ri-npmjs-fill:before{content:"\ef9d"}.ri-npmjs-line:before{content:"\ef9e"}.ri-number-0:before{content:"\ef9f"}.ri-number-1:before{content:"\efa0"}.ri-number-2:before{content:"\efa1"}.ri-number-3:before{content:"\efa2"}.ri-number-4:before{content:"\efa3"}.ri-number-5:before{content:"\efa4"}.ri-number-6:before{content:"\efa5"}.ri-number-7:before{content:"\efa6"}.ri-number-8:before{content:"\efa7"}.ri-number-9:before{content:"\efa8"}.ri-numbers-fill:before{content:"\efa9"}.ri-numbers-line:before{content:"\efaa"}.ri-nurse-fill:before{content:"\efab"}.ri-nurse-line:before{content:"\efac"}.ri-oil-fill:before{content:"\efad"}.ri-oil-line:before{content:"\efae"}.ri-omega:before{content:"\efaf"}.ri-open-arm-fill:before{content:"\efb0"}.ri-open-arm-line:before{content:"\efb1"}.ri-open-source-fill:before{content:"\efb2"}.ri-open-source-line:before{content:"\efb3"}.ri-opera-fill:before{content:"\efb4"}.ri-opera-line:before{content:"\efb5"}.ri-order-play-fill:before{content:"\efb6"}.ri-order-play-line:before{content:"\efb7"}.ri-organization-chart:before{content:"\efb8"}.ri-outlet-2-fill:before{content:"\efb9"}.ri-outlet-2-line:before{content:"\efba"}.ri-outlet-fill:before{content:"\efbb"}.ri-outlet-line:before{content:"\efbc"}.ri-page-separator:before{content:"\efbd"}.ri-pages-fill:before{content:"\efbe"}.ri-pages-line:before{content:"\efbf"}.ri-paint-brush-fill:before{content:"\efc0"}.ri-paint-brush-line:before{content:"\efc1"}.ri-paint-fill:before{content:"\efc2"}.ri-paint-line:before{content:"\efc3"}.ri-palette-fill:before{content:"\efc4"}.ri-palette-line:before{content:"\efc5"}.ri-pantone-fill:before{content:"\efc6"}.ri-pantone-line:before{content:"\efc7"}.ri-paragraph:before{content:"\efc8"}.ri-parent-fill:before{content:"\efc9"}.ri-parent-line:before{content:"\efca"}.ri-parentheses-fill:before{content:"\efcb"}.ri-parentheses-line:before{content:"\efcc"}.ri-parking-box-fill:before{content:"\efcd"}.ri-parking-box-line:before{content:"\efce"}.ri-parking-fill:before{content:"\efcf"}.ri-parking-line:before{content:"\efd0"}.ri-passport-fill:before{content:"\efd1"}.ri-passport-line:before{content:"\efd2"}.ri-patreon-fill:before{content:"\efd3"}.ri-patreon-line:before{content:"\efd4"}.ri-pause-circle-fill:before{content:"\efd5"}.ri-pause-circle-line:before{content:"\efd6"}.ri-pause-fill:before{content:"\efd7"}.ri-pause-line:before{content:"\efd8"}.ri-pause-mini-fill:before{content:"\efd9"}.ri-pause-mini-line:before{content:"\efda"}.ri-paypal-fill:before{content:"\efdb"}.ri-paypal-line:before{content:"\efdc"}.ri-pen-nib-fill:before{content:"\efdd"}.ri-pen-nib-line:before{content:"\efde"}.ri-pencil-fill:before{content:"\efdf"}.ri-pencil-line:before{content:"\efe0"}.ri-pencil-ruler-2-fill:before{content:"\efe1"}.ri-pencil-ruler-2-line:before{content:"\efe2"}.ri-pencil-ruler-fill:before{content:"\efe3"}.ri-pencil-ruler-line:before{content:"\efe4"}.ri-percent-fill:before{content:"\efe5"}.ri-percent-line:before{content:"\efe6"}.ri-phone-camera-fill:before{content:"\efe7"}.ri-phone-camera-line:before{content:"\efe8"}.ri-phone-fill:before{content:"\efe9"}.ri-phone-find-fill:before{content:"\efea"}.ri-phone-find-line:before{content:"\efeb"}.ri-phone-line:before{content:"\efec"}.ri-phone-lock-fill:before{content:"\efed"}.ri-phone-lock-line:before{content:"\efee"}.ri-picture-in-picture-2-fill:before{content:"\efef"}.ri-picture-in-picture-2-line:before{content:"\eff0"}.ri-picture-in-picture-exit-fill:before{content:"\eff1"}.ri-picture-in-picture-exit-line:before{content:"\eff2"}.ri-picture-in-picture-fill:before{content:"\eff3"}.ri-picture-in-picture-line:before{content:"\eff4"}.ri-pie-chart-2-fill:before{content:"\eff5"}.ri-pie-chart-2-line:before{content:"\eff6"}.ri-pie-chart-box-fill:before{content:"\eff7"}.ri-pie-chart-box-line:before{content:"\eff8"}.ri-pie-chart-fill:before{content:"\eff9"}.ri-pie-chart-line:before{content:"\effa"}.ri-pin-distance-fill:before{content:"\effb"}.ri-pin-distance-line:before{content:"\effc"}.ri-ping-pong-fill:before{content:"\effd"}.ri-ping-pong-line:before{content:"\effe"}.ri-pinterest-fill:before{content:"\efff"}.ri-pinterest-line:before{content:"\f000"}.ri-pinyin-input:before{content:"\f001"}.ri-pixelfed-fill:before{content:"\f002"}.ri-pixelfed-line:before{content:"\f003"}.ri-plane-fill:before{content:"\f004"}.ri-plane-line:before{content:"\f005"}.ri-plant-fill:before{content:"\f006"}.ri-plant-line:before{content:"\f007"}.ri-play-circle-fill:before{content:"\f008"}.ri-play-circle-line:before{content:"\f009"}.ri-play-fill:before{content:"\f00a"}.ri-play-line:before{content:"\f00b"}.ri-play-list-2-fill:before{content:"\f00c"}.ri-play-list-2-line:before{content:"\f00d"}.ri-play-list-add-fill:before{content:"\f00e"}.ri-play-list-add-line:before{content:"\f00f"}.ri-play-list-fill:before{content:"\f010"}.ri-play-list-line:before{content:"\f011"}.ri-play-mini-fill:before{content:"\f012"}.ri-play-mini-line:before{content:"\f013"}.ri-playstation-fill:before{content:"\f014"}.ri-playstation-line:before{content:"\f015"}.ri-plug-2-fill:before{content:"\f016"}.ri-plug-2-line:before{content:"\f017"}.ri-plug-fill:before{content:"\f018"}.ri-plug-line:before{content:"\f019"}.ri-polaroid-2-fill:before{content:"\f01a"}.ri-polaroid-2-line:before{content:"\f01b"}.ri-polaroid-fill:before{content:"\f01c"}.ri-polaroid-line:before{content:"\f01d"}.ri-police-car-fill:before{content:"\f01e"}.ri-police-car-line:before{content:"\f01f"}.ri-price-tag-2-fill:before{content:"\f020"}.ri-price-tag-2-line:before{content:"\f021"}.ri-price-tag-3-fill:before{content:"\f022"}.ri-price-tag-3-line:before{content:"\f023"}.ri-price-tag-fill:before{content:"\f024"}.ri-price-tag-line:before{content:"\f025"}.ri-printer-cloud-fill:before{content:"\f026"}.ri-printer-cloud-line:before{content:"\f027"}.ri-printer-fill:before{content:"\f028"}.ri-printer-line:before{content:"\f029"}.ri-product-hunt-fill:before{content:"\f02a"}.ri-product-hunt-line:before{content:"\f02b"}.ri-profile-fill:before{content:"\f02c"}.ri-profile-line:before{content:"\f02d"}.ri-projector-2-fill:before{content:"\f02e"}.ri-projector-2-line:before{content:"\f02f"}.ri-projector-fill:before{content:"\f030"}.ri-projector-line:before{content:"\f031"}.ri-psychotherapy-fill:before{content:"\f032"}.ri-psychotherapy-line:before{content:"\f033"}.ri-pulse-fill:before{content:"\f034"}.ri-pulse-line:before{content:"\f035"}.ri-pushpin-2-fill:before{content:"\f036"}.ri-pushpin-2-line:before{content:"\f037"}.ri-pushpin-fill:before{content:"\f038"}.ri-pushpin-line:before{content:"\f039"}.ri-qq-fill:before{content:"\f03a"}.ri-qq-line:before{content:"\f03b"}.ri-qr-code-fill:before{content:"\f03c"}.ri-qr-code-line:before{content:"\f03d"}.ri-qr-scan-2-fill:before{content:"\f03e"}.ri-qr-scan-2-line:before{content:"\f03f"}.ri-qr-scan-fill:before{content:"\f040"}.ri-qr-scan-line:before{content:"\f041"}.ri-question-answer-fill:before{content:"\f042"}.ri-question-answer-line:before{content:"\f043"}.ri-question-fill:before{content:"\f044"}.ri-question-line:before{content:"\f045"}.ri-question-mark:before{content:"\f046"}.ri-questionnaire-fill:before{content:"\f047"}.ri-questionnaire-line:before{content:"\f048"}.ri-quill-pen-fill:before{content:"\f049"}.ri-quill-pen-line:before{content:"\f04a"}.ri-radar-fill:before{content:"\f04b"}.ri-radar-line:before{content:"\f04c"}.ri-radio-2-fill:before{content:"\f04d"}.ri-radio-2-line:before{content:"\f04e"}.ri-radio-button-fill:before{content:"\f04f"}.ri-radio-button-line:before{content:"\f050"}.ri-radio-fill:before{content:"\f051"}.ri-radio-line:before{content:"\f052"}.ri-rainbow-fill:before{content:"\f053"}.ri-rainbow-line:before{content:"\f054"}.ri-rainy-fill:before{content:"\f055"}.ri-rainy-line:before{content:"\f056"}.ri-reactjs-fill:before{content:"\f057"}.ri-reactjs-line:before{content:"\f058"}.ri-record-circle-fill:before{content:"\f059"}.ri-record-circle-line:before{content:"\f05a"}.ri-record-mail-fill:before{content:"\f05b"}.ri-record-mail-line:before{content:"\f05c"}.ri-recycle-fill:before{content:"\f05d"}.ri-recycle-line:before{content:"\f05e"}.ri-red-packet-fill:before{content:"\f05f"}.ri-red-packet-line:before{content:"\f060"}.ri-reddit-fill:before{content:"\f061"}.ri-reddit-line:before{content:"\f062"}.ri-refresh-fill:before{content:"\f063"}.ri-refresh-line:before{content:"\f064"}.ri-refund-2-fill:before{content:"\f065"}.ri-refund-2-line:before{content:"\f066"}.ri-refund-fill:before{content:"\f067"}.ri-refund-line:before{content:"\f068"}.ri-registered-fill:before{content:"\f069"}.ri-registered-line:before{content:"\f06a"}.ri-remixicon-fill:before{content:"\f06b"}.ri-remixicon-line:before{content:"\f06c"}.ri-remote-control-2-fill:before{content:"\f06d"}.ri-remote-control-2-line:before{content:"\f06e"}.ri-remote-control-fill:before{content:"\f06f"}.ri-remote-control-line:before{content:"\f070"}.ri-repeat-2-fill:before{content:"\f071"}.ri-repeat-2-line:before{content:"\f072"}.ri-repeat-fill:before{content:"\f073"}.ri-repeat-line:before{content:"\f074"}.ri-repeat-one-fill:before{content:"\f075"}.ri-repeat-one-line:before{content:"\f076"}.ri-reply-all-fill:before{content:"\f077"}.ri-reply-all-line:before{content:"\f078"}.ri-reply-fill:before{content:"\f079"}.ri-reply-line:before{content:"\f07a"}.ri-reserved-fill:before{content:"\f07b"}.ri-reserved-line:before{content:"\f07c"}.ri-rest-time-fill:before{content:"\f07d"}.ri-rest-time-line:before{content:"\f07e"}.ri-restart-fill:before{content:"\f07f"}.ri-restart-line:before{content:"\f080"}.ri-restaurant-2-fill:before{content:"\f081"}.ri-restaurant-2-line:before{content:"\f082"}.ri-restaurant-fill:before{content:"\f083"}.ri-restaurant-line:before{content:"\f084"}.ri-rewind-fill:before{content:"\f085"}.ri-rewind-line:before{content:"\f086"}.ri-rewind-mini-fill:before{content:"\f087"}.ri-rewind-mini-line:before{content:"\f088"}.ri-rhythm-fill:before{content:"\f089"}.ri-rhythm-line:before{content:"\f08a"}.ri-riding-fill:before{content:"\f08b"}.ri-riding-line:before{content:"\f08c"}.ri-road-map-fill:before{content:"\f08d"}.ri-road-map-line:before{content:"\f08e"}.ri-roadster-fill:before{content:"\f08f"}.ri-roadster-line:before{content:"\f090"}.ri-robot-fill:before{content:"\f091"}.ri-robot-line:before{content:"\f092"}.ri-rocket-2-fill:before{content:"\f093"}.ri-rocket-2-line:before{content:"\f094"}.ri-rocket-fill:before{content:"\f095"}.ri-rocket-line:before{content:"\f096"}.ri-rotate-lock-fill:before{content:"\f097"}.ri-rotate-lock-line:before{content:"\f098"}.ri-rounded-corner:before{content:"\f099"}.ri-route-fill:before{content:"\f09a"}.ri-route-line:before{content:"\f09b"}.ri-router-fill:before{content:"\f09c"}.ri-router-line:before{content:"\f09d"}.ri-rss-fill:before{content:"\f09e"}.ri-rss-line:before{content:"\f09f"}.ri-ruler-2-fill:before{content:"\f0a0"}.ri-ruler-2-line:before{content:"\f0a1"}.ri-ruler-fill:before{content:"\f0a2"}.ri-ruler-line:before{content:"\f0a3"}.ri-run-fill:before{content:"\f0a4"}.ri-run-line:before{content:"\f0a5"}.ri-safari-fill:before{content:"\f0a6"}.ri-safari-line:before{content:"\f0a7"}.ri-safe-2-fill:before{content:"\f0a8"}.ri-safe-2-line:before{content:"\f0a9"}.ri-safe-fill:before{content:"\f0aa"}.ri-safe-line:before{content:"\f0ab"}.ri-sailboat-fill:before{content:"\f0ac"}.ri-sailboat-line:before{content:"\f0ad"}.ri-save-2-fill:before{content:"\f0ae"}.ri-save-2-line:before{content:"\f0af"}.ri-save-3-fill:before{content:"\f0b0"}.ri-save-3-line:before{content:"\f0b1"}.ri-save-fill:before{content:"\f0b2"}.ri-save-line:before{content:"\f0b3"}.ri-scales-2-fill:before{content:"\f0b4"}.ri-scales-2-line:before{content:"\f0b5"}.ri-scales-3-fill:before{content:"\f0b6"}.ri-scales-3-line:before{content:"\f0b7"}.ri-scales-fill:before{content:"\f0b8"}.ri-scales-line:before{content:"\f0b9"}.ri-scan-2-fill:before{content:"\f0ba"}.ri-scan-2-line:before{content:"\f0bb"}.ri-scan-fill:before{content:"\f0bc"}.ri-scan-line:before{content:"\f0bd"}.ri-scissors-2-fill:before{content:"\f0be"}.ri-scissors-2-line:before{content:"\f0bf"}.ri-scissors-cut-fill:before{content:"\f0c0"}.ri-scissors-cut-line:before{content:"\f0c1"}.ri-scissors-fill:before{content:"\f0c2"}.ri-scissors-line:before{content:"\f0c3"}.ri-screenshot-2-fill:before{content:"\f0c4"}.ri-screenshot-2-line:before{content:"\f0c5"}.ri-screenshot-fill:before{content:"\f0c6"}.ri-screenshot-line:before{content:"\f0c7"}.ri-sd-card-fill:before{content:"\f0c8"}.ri-sd-card-line:before{content:"\f0c9"}.ri-sd-card-mini-fill:before{content:"\f0ca"}.ri-sd-card-mini-line:before{content:"\f0cb"}.ri-search-2-fill:before{content:"\f0cc"}.ri-search-2-line:before{content:"\f0cd"}.ri-search-eye-fill:before{content:"\f0ce"}.ri-search-eye-line:before{content:"\f0cf"}.ri-search-fill:before{content:"\f0d0"}.ri-search-line:before{content:"\f0d1"}.ri-secure-payment-fill:before{content:"\f0d2"}.ri-secure-payment-line:before{content:"\f0d3"}.ri-seedling-fill:before{content:"\f0d4"}.ri-seedling-line:before{content:"\f0d5"}.ri-send-backward:before{content:"\f0d6"}.ri-send-plane-2-fill:before{content:"\f0d7"}.ri-send-plane-2-line:before{content:"\f0d8"}.ri-send-plane-fill:before{content:"\f0d9"}.ri-send-plane-line:before{content:"\f0da"}.ri-send-to-back:before{content:"\f0db"}.ri-sensor-fill:before{content:"\f0dc"}.ri-sensor-line:before{content:"\f0dd"}.ri-separator:before{content:"\f0de"}.ri-server-fill:before{content:"\f0df"}.ri-server-line:before{content:"\f0e0"}.ri-service-fill:before{content:"\f0e1"}.ri-service-line:before{content:"\f0e2"}.ri-settings-2-fill:before{content:"\f0e3"}.ri-settings-2-line:before{content:"\f0e4"}.ri-settings-3-fill:before{content:"\f0e5"}.ri-settings-3-line:before{content:"\f0e6"}.ri-settings-4-fill:before{content:"\f0e7"}.ri-settings-4-line:before{content:"\f0e8"}.ri-settings-5-fill:before{content:"\f0e9"}.ri-settings-5-line:before{content:"\f0ea"}.ri-settings-6-fill:before{content:"\f0eb"}.ri-settings-6-line:before{content:"\f0ec"}.ri-settings-fill:before{content:"\f0ed"}.ri-settings-line:before{content:"\f0ee"}.ri-shape-2-fill:before{content:"\f0ef"}.ri-shape-2-line:before{content:"\f0f0"}.ri-shape-fill:before{content:"\f0f1"}.ri-shape-line:before{content:"\f0f2"}.ri-share-box-fill:before{content:"\f0f3"}.ri-share-box-line:before{content:"\f0f4"}.ri-share-circle-fill:before{content:"\f0f5"}.ri-share-circle-line:before{content:"\f0f6"}.ri-share-fill:before{content:"\f0f7"}.ri-share-forward-2-fill:before{content:"\f0f8"}.ri-share-forward-2-line:before{content:"\f0f9"}.ri-share-forward-box-fill:before{content:"\f0fa"}.ri-share-forward-box-line:before{content:"\f0fb"}.ri-share-forward-fill:before{content:"\f0fc"}.ri-share-forward-line:before{content:"\f0fd"}.ri-share-line:before{content:"\f0fe"}.ri-shield-check-fill:before{content:"\f0ff"}.ri-shield-check-line:before{content:"\f100"}.ri-shield-cross-fill:before{content:"\f101"}.ri-shield-cross-line:before{content:"\f102"}.ri-shield-fill:before{content:"\f103"}.ri-shield-flash-fill:before{content:"\f104"}.ri-shield-flash-line:before{content:"\f105"}.ri-shield-keyhole-fill:before{content:"\f106"}.ri-shield-keyhole-line:before{content:"\f107"}.ri-shield-line:before{content:"\f108"}.ri-shield-star-fill:before{content:"\f109"}.ri-shield-star-line:before{content:"\f10a"}.ri-shield-user-fill:before{content:"\f10b"}.ri-shield-user-line:before{content:"\f10c"}.ri-ship-2-fill:before{content:"\f10d"}.ri-ship-2-line:before{content:"\f10e"}.ri-ship-fill:before{content:"\f10f"}.ri-ship-line:before{content:"\f110"}.ri-shirt-fill:before{content:"\f111"}.ri-shirt-line:before{content:"\f112"}.ri-shopping-bag-2-fill:before{content:"\f113"}.ri-shopping-bag-2-line:before{content:"\f114"}.ri-shopping-bag-3-fill:before{content:"\f115"}.ri-shopping-bag-3-line:before{content:"\f116"}.ri-shopping-bag-fill:before{content:"\f117"}.ri-shopping-bag-line:before{content:"\f118"}.ri-shopping-basket-2-fill:before{content:"\f119"}.ri-shopping-basket-2-line:before{content:"\f11a"}.ri-shopping-basket-fill:before{content:"\f11b"}.ri-shopping-basket-line:before{content:"\f11c"}.ri-shopping-cart-2-fill:before{content:"\f11d"}.ri-shopping-cart-2-line:before{content:"\f11e"}.ri-shopping-cart-fill:before{content:"\f11f"}.ri-shopping-cart-line:before{content:"\f120"}.ri-showers-fill:before{content:"\f121"}.ri-showers-line:before{content:"\f122"}.ri-shuffle-fill:before{content:"\f123"}.ri-shuffle-line:before{content:"\f124"}.ri-shut-down-fill:before{content:"\f125"}.ri-shut-down-line:before{content:"\f126"}.ri-side-bar-fill:before{content:"\f127"}.ri-side-bar-line:before{content:"\f128"}.ri-signal-tower-fill:before{content:"\f129"}.ri-signal-tower-line:before{content:"\f12a"}.ri-signal-wifi-1-fill:before{content:"\f12b"}.ri-signal-wifi-1-line:before{content:"\f12c"}.ri-signal-wifi-2-fill:before{content:"\f12d"}.ri-signal-wifi-2-line:before{content:"\f12e"}.ri-signal-wifi-3-fill:before{content:"\f12f"}.ri-signal-wifi-3-line:before{content:"\f130"}.ri-signal-wifi-error-fill:before{content:"\f131"}.ri-signal-wifi-error-line:before{content:"\f132"}.ri-signal-wifi-fill:before{content:"\f133"}.ri-signal-wifi-line:before{content:"\f134"}.ri-signal-wifi-off-fill:before{content:"\f135"}.ri-signal-wifi-off-line:before{content:"\f136"}.ri-sim-card-2-fill:before{content:"\f137"}.ri-sim-card-2-line:before{content:"\f138"}.ri-sim-card-fill:before{content:"\f139"}.ri-sim-card-line:before{content:"\f13a"}.ri-single-quotes-l:before{content:"\f13b"}.ri-single-quotes-r:before{content:"\f13c"}.ri-sip-fill:before{content:"\f13d"}.ri-sip-line:before{content:"\f13e"}.ri-skip-back-fill:before{content:"\f13f"}.ri-skip-back-line:before{content:"\f140"}.ri-skip-back-mini-fill:before{content:"\f141"}.ri-skip-back-mini-line:before{content:"\f142"}.ri-skip-forward-fill:before{content:"\f143"}.ri-skip-forward-line:before{content:"\f144"}.ri-skip-forward-mini-fill:before{content:"\f145"}.ri-skip-forward-mini-line:before{content:"\f146"}.ri-skull-2-fill:before{content:"\f147"}.ri-skull-2-line:before{content:"\f148"}.ri-skull-fill:before{content:"\f149"}.ri-skull-line:before{content:"\f14a"}.ri-skype-fill:before{content:"\f14b"}.ri-skype-line:before{content:"\f14c"}.ri-slack-fill:before{content:"\f14d"}.ri-slack-line:before{content:"\f14e"}.ri-slice-fill:before{content:"\f14f"}.ri-slice-line:before{content:"\f150"}.ri-slideshow-2-fill:before{content:"\f151"}.ri-slideshow-2-line:before{content:"\f152"}.ri-slideshow-3-fill:before{content:"\f153"}.ri-slideshow-3-line:before{content:"\f154"}.ri-slideshow-4-fill:before{content:"\f155"}.ri-slideshow-4-line:before{content:"\f156"}.ri-slideshow-fill:before{content:"\f157"}.ri-slideshow-line:before{content:"\f158"}.ri-smartphone-fill:before{content:"\f159"}.ri-smartphone-line:before{content:"\f15a"}.ri-snapchat-fill:before{content:"\f15b"}.ri-snapchat-line:before{content:"\f15c"}.ri-snowy-fill:before{content:"\f15d"}.ri-snowy-line:before{content:"\f15e"}.ri-sort-asc:before{content:"\f15f"}.ri-sort-desc:before{content:"\f160"}.ri-sound-module-fill:before{content:"\f161"}.ri-sound-module-line:before{content:"\f162"}.ri-soundcloud-fill:before{content:"\f163"}.ri-soundcloud-line:before{content:"\f164"}.ri-space-ship-fill:before{content:"\f165"}.ri-space-ship-line:before{content:"\f166"}.ri-space:before{content:"\f167"}.ri-spam-2-fill:before{content:"\f168"}.ri-spam-2-line:before{content:"\f169"}.ri-spam-3-fill:before{content:"\f16a"}.ri-spam-3-line:before{content:"\f16b"}.ri-spam-fill:before{content:"\f16c"}.ri-spam-line:before{content:"\f16d"}.ri-speaker-2-fill:before{content:"\f16e"}.ri-speaker-2-line:before{content:"\f16f"}.ri-speaker-3-fill:before{content:"\f170"}.ri-speaker-3-line:before{content:"\f171"}.ri-speaker-fill:before{content:"\f172"}.ri-speaker-line:before{content:"\f173"}.ri-spectrum-fill:before{content:"\f174"}.ri-spectrum-line:before{content:"\f175"}.ri-speed-fill:before{content:"\f176"}.ri-speed-line:before{content:"\f177"}.ri-speed-mini-fill:before{content:"\f178"}.ri-speed-mini-line:before{content:"\f179"}.ri-split-cells-horizontal:before{content:"\f17a"}.ri-split-cells-vertical:before{content:"\f17b"}.ri-spotify-fill:before{content:"\f17c"}.ri-spotify-line:before{content:"\f17d"}.ri-spy-fill:before{content:"\f17e"}.ri-spy-line:before{content:"\f17f"}.ri-stack-fill:before{content:"\f180"}.ri-stack-line:before{content:"\f181"}.ri-stack-overflow-fill:before{content:"\f182"}.ri-stack-overflow-line:before{content:"\f183"}.ri-stackshare-fill:before{content:"\f184"}.ri-stackshare-line:before{content:"\f185"}.ri-star-fill:before{content:"\f186"}.ri-star-half-fill:before{content:"\f187"}.ri-star-half-line:before{content:"\f188"}.ri-star-half-s-fill:before{content:"\f189"}.ri-star-half-s-line:before{content:"\f18a"}.ri-star-line:before{content:"\f18b"}.ri-star-s-fill:before{content:"\f18c"}.ri-star-s-line:before{content:"\f18d"}.ri-star-smile-fill:before{content:"\f18e"}.ri-star-smile-line:before{content:"\f18f"}.ri-steam-fill:before{content:"\f190"}.ri-steam-line:before{content:"\f191"}.ri-steering-2-fill:before{content:"\f192"}.ri-steering-2-line:before{content:"\f193"}.ri-steering-fill:before{content:"\f194"}.ri-steering-line:before{content:"\f195"}.ri-stethoscope-fill:before{content:"\f196"}.ri-stethoscope-line:before{content:"\f197"}.ri-sticky-note-2-fill:before{content:"\f198"}.ri-sticky-note-2-line:before{content:"\f199"}.ri-sticky-note-fill:before{content:"\f19a"}.ri-sticky-note-line:before{content:"\f19b"}.ri-stock-fill:before{content:"\f19c"}.ri-stock-line:before{content:"\f19d"}.ri-stop-circle-fill:before{content:"\f19e"}.ri-stop-circle-line:before{content:"\f19f"}.ri-stop-fill:before{content:"\f1a0"}.ri-stop-line:before{content:"\f1a1"}.ri-stop-mini-fill:before{content:"\f1a2"}.ri-stop-mini-line:before{content:"\f1a3"}.ri-store-2-fill:before{content:"\f1a4"}.ri-store-2-line:before{content:"\f1a5"}.ri-store-3-fill:before{content:"\f1a6"}.ri-store-3-line:before{content:"\f1a7"}.ri-store-fill:before{content:"\f1a8"}.ri-store-line:before{content:"\f1a9"}.ri-strikethrough-2:before{content:"\f1aa"}.ri-strikethrough:before{content:"\f1ab"}.ri-subscript-2:before{content:"\f1ac"}.ri-subscript:before{content:"\f1ad"}.ri-subtract-fill:before{content:"\f1ae"}.ri-subtract-line:before{content:"\f1af"}.ri-subway-fill:before{content:"\f1b0"}.ri-subway-line:before{content:"\f1b1"}.ri-subway-wifi-fill:before{content:"\f1b2"}.ri-subway-wifi-line:before{content:"\f1b3"}.ri-suitcase-2-fill:before{content:"\f1b4"}.ri-suitcase-2-line:before{content:"\f1b5"}.ri-suitcase-3-fill:before{content:"\f1b6"}.ri-suitcase-3-line:before{content:"\f1b7"}.ri-suitcase-fill:before{content:"\f1b8"}.ri-suitcase-line:before{content:"\f1b9"}.ri-sun-cloudy-fill:before{content:"\f1ba"}.ri-sun-cloudy-line:before{content:"\f1bb"}.ri-sun-fill:before{content:"\f1bc"}.ri-sun-foggy-fill:before{content:"\f1bd"}.ri-sun-foggy-line:before{content:"\f1be"}.ri-sun-line:before{content:"\f1bf"}.ri-superscript-2:before{content:"\f1c0"}.ri-superscript:before{content:"\f1c1"}.ri-surgical-mask-fill:before{content:"\f1c2"}.ri-surgical-mask-line:before{content:"\f1c3"}.ri-surround-sound-fill:before{content:"\f1c4"}.ri-surround-sound-line:before{content:"\f1c5"}.ri-survey-fill:before{content:"\f1c6"}.ri-survey-line:before{content:"\f1c7"}.ri-swap-box-fill:before{content:"\f1c8"}.ri-swap-box-line:before{content:"\f1c9"}.ri-swap-fill:before{content:"\f1ca"}.ri-swap-line:before{content:"\f1cb"}.ri-switch-fill:before{content:"\f1cc"}.ri-switch-line:before{content:"\f1cd"}.ri-sword-fill:before{content:"\f1ce"}.ri-sword-line:before{content:"\f1cf"}.ri-syringe-fill:before{content:"\f1d0"}.ri-syringe-line:before{content:"\f1d1"}.ri-t-box-fill:before{content:"\f1d2"}.ri-t-box-line:before{content:"\f1d3"}.ri-t-shirt-2-fill:before{content:"\f1d4"}.ri-t-shirt-2-line:before{content:"\f1d5"}.ri-t-shirt-air-fill:before{content:"\f1d6"}.ri-t-shirt-air-line:before{content:"\f1d7"}.ri-t-shirt-fill:before{content:"\f1d8"}.ri-t-shirt-line:before{content:"\f1d9"}.ri-table-2:before{content:"\f1da"}.ri-table-alt-fill:before{content:"\f1db"}.ri-table-alt-line:before{content:"\f1dc"}.ri-table-fill:before{content:"\f1dd"}.ri-table-line:before{content:"\f1de"}.ri-tablet-fill:before{content:"\f1df"}.ri-tablet-line:before{content:"\f1e0"}.ri-takeaway-fill:before{content:"\f1e1"}.ri-takeaway-line:before{content:"\f1e2"}.ri-taobao-fill:before{content:"\f1e3"}.ri-taobao-line:before{content:"\f1e4"}.ri-tape-fill:before{content:"\f1e5"}.ri-tape-line:before{content:"\f1e6"}.ri-task-fill:before{content:"\f1e7"}.ri-task-line:before{content:"\f1e8"}.ri-taxi-fill:before{content:"\f1e9"}.ri-taxi-line:before{content:"\f1ea"}.ri-taxi-wifi-fill:before{content:"\f1eb"}.ri-taxi-wifi-line:before{content:"\f1ec"}.ri-team-fill:before{content:"\f1ed"}.ri-team-line:before{content:"\f1ee"}.ri-telegram-fill:before{content:"\f1ef"}.ri-telegram-line:before{content:"\f1f0"}.ri-temp-cold-fill:before{content:"\f1f1"}.ri-temp-cold-line:before{content:"\f1f2"}.ri-temp-hot-fill:before{content:"\f1f3"}.ri-temp-hot-line:before{content:"\f1f4"}.ri-terminal-box-fill:before{content:"\f1f5"}.ri-terminal-box-line:before{content:"\f1f6"}.ri-terminal-fill:before{content:"\f1f7"}.ri-terminal-line:before{content:"\f1f8"}.ri-terminal-window-fill:before{content:"\f1f9"}.ri-terminal-window-line:before{content:"\f1fa"}.ri-test-tube-fill:before{content:"\f1fb"}.ri-test-tube-line:before{content:"\f1fc"}.ri-text-direction-l:before{content:"\f1fd"}.ri-text-direction-r:before{content:"\f1fe"}.ri-text-spacing:before{content:"\f1ff"}.ri-text-wrap:before{content:"\f200"}.ri-text:before{content:"\f201"}.ri-thermometer-fill:before{content:"\f202"}.ri-thermometer-line:before{content:"\f203"}.ri-thumb-down-fill:before{content:"\f204"}.ri-thumb-down-line:before{content:"\f205"}.ri-thumb-up-fill:before{content:"\f206"}.ri-thumb-up-line:before{content:"\f207"}.ri-thunderstorms-fill:before{content:"\f208"}.ri-thunderstorms-line:before{content:"\f209"}.ri-ticket-2-fill:before{content:"\f20a"}.ri-ticket-2-line:before{content:"\f20b"}.ri-ticket-fill:before{content:"\f20c"}.ri-ticket-line:before{content:"\f20d"}.ri-time-fill:before{content:"\f20e"}.ri-time-line:before{content:"\f20f"}.ri-timer-2-fill:before{content:"\f210"}.ri-timer-2-line:before{content:"\f211"}.ri-timer-fill:before{content:"\f212"}.ri-timer-flash-fill:before{content:"\f213"}.ri-timer-flash-line:before{content:"\f214"}.ri-timer-line:before{content:"\f215"}.ri-todo-fill:before{content:"\f216"}.ri-todo-line:before{content:"\f217"}.ri-toggle-fill:before{content:"\f218"}.ri-toggle-line:before{content:"\f219"}.ri-tools-fill:before{content:"\f21a"}.ri-tools-line:before{content:"\f21b"}.ri-tornado-fill:before{content:"\f21c"}.ri-tornado-line:before{content:"\f21d"}.ri-trademark-fill:before{content:"\f21e"}.ri-trademark-line:before{content:"\f21f"}.ri-traffic-light-fill:before{content:"\f220"}.ri-traffic-light-line:before{content:"\f221"}.ri-train-fill:before{content:"\f222"}.ri-train-line:before{content:"\f223"}.ri-train-wifi-fill:before{content:"\f224"}.ri-train-wifi-line:before{content:"\f225"}.ri-translate-2:before{content:"\f226"}.ri-translate:before{content:"\f227"}.ri-travesti-fill:before{content:"\f228"}.ri-travesti-line:before{content:"\f229"}.ri-treasure-map-fill:before{content:"\f22a"}.ri-treasure-map-line:before{content:"\f22b"}.ri-trello-fill:before{content:"\f22c"}.ri-trello-line:before{content:"\f22d"}.ri-trophy-fill:before{content:"\f22e"}.ri-trophy-line:before{content:"\f22f"}.ri-truck-fill:before{content:"\f230"}.ri-truck-line:before{content:"\f231"}.ri-tumblr-fill:before{content:"\f232"}.ri-tumblr-line:before{content:"\f233"}.ri-tv-2-fill:before{content:"\f234"}.ri-tv-2-line:before{content:"\f235"}.ri-tv-fill:before{content:"\f236"}.ri-tv-line:before{content:"\f237"}.ri-twitch-fill:before{content:"\f238"}.ri-twitch-line:before{content:"\f239"}.ri-twitter-fill:before{content:"\f23a"}.ri-twitter-line:before{content:"\f23b"}.ri-typhoon-fill:before{content:"\f23c"}.ri-typhoon-line:before{content:"\f23d"}.ri-u-disk-fill:before{content:"\f23e"}.ri-u-disk-line:before{content:"\f23f"}.ri-ubuntu-fill:before{content:"\f240"}.ri-ubuntu-line:before{content:"\f241"}.ri-umbrella-fill:before{content:"\f242"}.ri-umbrella-line:before{content:"\f243"}.ri-underline:before{content:"\f244"}.ri-uninstall-fill:before{content:"\f245"}.ri-uninstall-line:before{content:"\f246"}.ri-unsplash-fill:before{content:"\f247"}.ri-unsplash-line:before{content:"\f248"}.ri-upload-2-fill:before{content:"\f249"}.ri-upload-2-line:before{content:"\f24a"}.ri-upload-cloud-2-fill:before{content:"\f24b"}.ri-upload-cloud-2-line:before{content:"\f24c"}.ri-upload-cloud-fill:before{content:"\f24d"}.ri-upload-cloud-line:before{content:"\f24e"}.ri-upload-fill:before{content:"\f24f"}.ri-upload-line:before{content:"\f250"}.ri-usb-fill:before{content:"\f251"}.ri-usb-line:before{content:"\f252"}.ri-user-2-fill:before{content:"\f253"}.ri-user-2-line:before{content:"\f254"}.ri-user-3-fill:before{content:"\f255"}.ri-user-3-line:before{content:"\f256"}.ri-user-4-fill:before{content:"\f257"}.ri-user-4-line:before{content:"\f258"}.ri-user-5-fill:before{content:"\f259"}.ri-user-5-line:before{content:"\f25a"}.ri-user-6-fill:before{content:"\f25b"}.ri-user-6-line:before{content:"\f25c"}.ri-user-add-fill:before{content:"\f25d"}.ri-user-add-line:before{content:"\f25e"}.ri-user-fill:before{content:"\f25f"}.ri-user-follow-fill:before{content:"\f260"}.ri-user-follow-line:before{content:"\f261"}.ri-user-heart-fill:before{content:"\f262"}.ri-user-heart-line:before{content:"\f263"}.ri-user-line:before{content:"\f264"}.ri-user-location-fill:before{content:"\f265"}.ri-user-location-line:before{content:"\f266"}.ri-user-received-2-fill:before{content:"\f267"}.ri-user-received-2-line:before{content:"\f268"}.ri-user-received-fill:before{content:"\f269"}.ri-user-received-line:before{content:"\f26a"}.ri-user-search-fill:before{content:"\f26b"}.ri-user-search-line:before{content:"\f26c"}.ri-user-settings-fill:before{content:"\f26d"}.ri-user-settings-line:before{content:"\f26e"}.ri-user-shared-2-fill:before{content:"\f26f"}.ri-user-shared-2-line:before{content:"\f270"}.ri-user-shared-fill:before{content:"\f271"}.ri-user-shared-line:before{content:"\f272"}.ri-user-smile-fill:before{content:"\f273"}.ri-user-smile-line:before{content:"\f274"}.ri-user-star-fill:before{content:"\f275"}.ri-user-star-line:before{content:"\f276"}.ri-user-unfollow-fill:before{content:"\f277"}.ri-user-unfollow-line:before{content:"\f278"}.ri-user-voice-fill:before{content:"\f279"}.ri-user-voice-line:before{content:"\f27a"}.ri-video-add-fill:before{content:"\f27b"}.ri-video-add-line:before{content:"\f27c"}.ri-video-chat-fill:before{content:"\f27d"}.ri-video-chat-line:before{content:"\f27e"}.ri-video-download-fill:before{content:"\f27f"}.ri-video-download-line:before{content:"\f280"}.ri-video-fill:before{content:"\f281"}.ri-video-line:before{content:"\f282"}.ri-video-upload-fill:before{content:"\f283"}.ri-video-upload-line:before{content:"\f284"}.ri-vidicon-2-fill:before{content:"\f285"}.ri-vidicon-2-line:before{content:"\f286"}.ri-vidicon-fill:before{content:"\f287"}.ri-vidicon-line:before{content:"\f288"}.ri-vimeo-fill:before{content:"\f289"}.ri-vimeo-line:before{content:"\f28a"}.ri-vip-crown-2-fill:before{content:"\f28b"}.ri-vip-crown-2-line:before{content:"\f28c"}.ri-vip-crown-fill:before{content:"\f28d"}.ri-vip-crown-line:before{content:"\f28e"}.ri-vip-diamond-fill:before{content:"\f28f"}.ri-vip-diamond-line:before{content:"\f290"}.ri-vip-fill:before{content:"\f291"}.ri-vip-line:before{content:"\f292"}.ri-virus-fill:before{content:"\f293"}.ri-virus-line:before{content:"\f294"}.ri-visa-fill:before{content:"\f295"}.ri-visa-line:before{content:"\f296"}.ri-voice-recognition-fill:before{content:"\f297"}.ri-voice-recognition-line:before{content:"\f298"}.ri-voiceprint-fill:before{content:"\f299"}.ri-voiceprint-line:before{content:"\f29a"}.ri-volume-down-fill:before{content:"\f29b"}.ri-volume-down-line:before{content:"\f29c"}.ri-volume-mute-fill:before{content:"\f29d"}.ri-volume-mute-line:before{content:"\f29e"}.ri-volume-off-vibrate-fill:before{content:"\f29f"}.ri-volume-off-vibrate-line:before{content:"\f2a0"}.ri-volume-up-fill:before{content:"\f2a1"}.ri-volume-up-line:before{content:"\f2a2"}.ri-volume-vibrate-fill:before{content:"\f2a3"}.ri-volume-vibrate-line:before{content:"\f2a4"}.ri-vuejs-fill:before{content:"\f2a5"}.ri-vuejs-line:before{content:"\f2a6"}.ri-walk-fill:before{content:"\f2a7"}.ri-walk-line:before{content:"\f2a8"}.ri-wallet-2-fill:before{content:"\f2a9"}.ri-wallet-2-line:before{content:"\f2aa"}.ri-wallet-3-fill:before{content:"\f2ab"}.ri-wallet-3-line:before{content:"\f2ac"}.ri-wallet-fill:before{content:"\f2ad"}.ri-wallet-line:before{content:"\f2ae"}.ri-water-flash-fill:before{content:"\f2af"}.ri-water-flash-line:before{content:"\f2b0"}.ri-webcam-fill:before{content:"\f2b1"}.ri-webcam-line:before{content:"\f2b2"}.ri-wechat-2-fill:before{content:"\f2b3"}.ri-wechat-2-line:before{content:"\f2b4"}.ri-wechat-fill:before{content:"\f2b5"}.ri-wechat-line:before{content:"\f2b6"}.ri-wechat-pay-fill:before{content:"\f2b7"}.ri-wechat-pay-line:before{content:"\f2b8"}.ri-weibo-fill:before{content:"\f2b9"}.ri-weibo-line:before{content:"\f2ba"}.ri-whatsapp-fill:before{content:"\f2bb"}.ri-whatsapp-line:before{content:"\f2bc"}.ri-wheelchair-fill:before{content:"\f2bd"}.ri-wheelchair-line:before{content:"\f2be"}.ri-wifi-fill:before{content:"\f2bf"}.ri-wifi-line:before{content:"\f2c0"}.ri-wifi-off-fill:before{content:"\f2c1"}.ri-wifi-off-line:before{content:"\f2c2"}.ri-window-2-fill:before{content:"\f2c3"}.ri-window-2-line:before{content:"\f2c4"}.ri-window-fill:before{content:"\f2c5"}.ri-window-line:before{content:"\f2c6"}.ri-windows-fill:before{content:"\f2c7"}.ri-windows-line:before{content:"\f2c8"}.ri-windy-fill:before{content:"\f2c9"}.ri-windy-line:before{content:"\f2ca"}.ri-wireless-charging-fill:before{content:"\f2cb"}.ri-wireless-charging-line:before{content:"\f2cc"}.ri-women-fill:before{content:"\f2cd"}.ri-women-line:before{content:"\f2ce"}.ri-wubi-input:before{content:"\f2cf"}.ri-xbox-fill:before{content:"\f2d0"}.ri-xbox-line:before{content:"\f2d1"}.ri-xing-fill:before{content:"\f2d2"}.ri-xing-line:before{content:"\f2d3"}.ri-youtube-fill:before{content:"\f2d4"}.ri-youtube-line:before{content:"\f2d5"}.ri-zcool-fill:before{content:"\f2d6"}.ri-zcool-line:before{content:"\f2d7"}.ri-zhihu-fill:before{content:"\f2d8"}.ri-zhihu-line:before{content:"\f2d9"}.ri-zoom-in-fill:before{content:"\f2da"}.ri-zoom-in-line:before{content:"\f2db"}.ri-zoom-out-fill:before{content:"\f2dc"}.ri-zoom-out-line:before{content:"\f2dd"}.ri-zzz-fill:before{content:"\f2de"}.ri-zzz-line:before{content:"\f2df"}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes expand{0%{transform:rotateY(90deg)}to{opacity:1;transform:rotateY(0)}}@keyframes slideIn{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes shine{to{background-position-x:-200%}}@keyframes loaderShow{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes entranceLeft{0%{opacity:0;transform:translate(-5px)}to{opacity:1;transform:translate(0)}}@keyframes entranceRight{0%{opacity:0;transform:translate(5px)}to{opacity:1;transform:translate(0)}}@keyframes entranceTop{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}@keyframes entranceBottom{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@media screen and (min-width: 550px){::-webkit-scrollbar{width:8px;height:8px;border-radius:var(--baseRadius)}::-webkit-scrollbar-track{background:transparent;border-radius:var(--baseRadius)}::-webkit-scrollbar-thumb{background-color:var(--baseAlt2Color);border-radius:15px;border:2px solid transparent;background-clip:padding-box}::-webkit-scrollbar-thumb:hover,::-webkit-scrollbar-thumb:active{background-color:var(--baseAlt3Color)}html{scrollbar-color:var(--baseAlt2Color) transparent;scrollbar-width:thin;scroll-behavior:smooth}html *{scrollbar-width:inherit}}:focus-visible{outline-color:var(--primaryColor);outline-style:solid}html,body{line-height:var(--baseLineHeight);font-family:var(--baseFontFamily);font-size:var(--baseFontSize);color:var(--txtPrimaryColor);background:var(--bodyColor)}#app{overflow:auto;display:block;width:100%;height:100vh}.flatpickr-inline-container,.accordion .accordion-content,.accordion,.tabs,.tabs-content,.select .txt-missing,.form-field .form-field-block,.list,.skeleton-loader,.clearfix,.content,.form-field .help-block,.overlay-panel .panel-content,.sub-panel,.panel,.block,.code-block,blockquote,p{display:block;width:100%}h1,h2,.breadcrumbs .breadcrumb-item,h3,h4,h5,h6{margin:0;font-weight:400}h1{font-size:22px;line-height:28px}h2,.breadcrumbs .breadcrumb-item{font-size:20px;line-height:26px}h3{font-size:19px;line-height:24px}h4{font-size:18px;line-height:24px}h5{font-size:17px;line-height:24px}h6{font-size:16px;line-height:22px}em{font-style:italic}ins{color:var(--txtPrimaryColor);background:var(--successAltColor);text-decoration:none}del{color:var(--txtPrimaryColor);background:var(--dangerAltColor);text-decoration:none}strong{font-weight:600}small{font-size:var(--smFontSize);line-height:var(--smLineHeight)}sub,sup{position:relative;font-size:.75em;line-height:1}sup{vertical-align:top}sub{vertical-align:bottom}p{margin:5px 0}blockquote{position:relative;padding-left:var(--smSpacing);font-style:italic;color:var(--txtHintColor)}blockquote:before{content:"";position:absolute;top:0;left:0;width:2px;height:100%;background:var(--baseColor)}code{display:inline-block;font-family:var(--monospaceFontFamily);font-style:normal;font-size:1em;line-height:1.379rem;padding:0 4px;white-space:nowrap;color:var(--txtPrimaryColor);background:var(--baseAlt2Color);border-radius:var(--baseRadius)}.code-block{overflow:auto;padding:var(--xsSpacing);white-space:pre-wrap;background:var(--baseAlt1Color)}ol,ul{margin:10px 0;list-style:decimal;padding-left:var(--baseSpacing)}ol li,ul li{margin-top:5px;margin-bottom:5px}ul{list-style:disc}img{max-width:100%;vertical-align:top}hr{display:block;border:0;height:1px;width:100%;background:var(--baseAlt1Color);margin:var(--baseSpacing) 0}hr.dark{background:var(--baseAlt2Color)}a{color:inherit}a:hover{text-decoration:none}a i,a .txt{display:inline-block;vertical-align:top}.txt-mono{font-family:var(--monospaceFontFamily)}.txt-nowrap{white-space:nowrap}.txt-ellipsis{display:inline-block;vertical-align:top;flex-shrink:1;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.txt-base{font-size:var(--baseFontSize)!important}.txt-xs{font-size:var(--xsFontSize)!important;line-height:var(--smLineHeight)}.txt-sm{font-size:var(--smFontSize)!important;line-height:var(--smLineHeight)}.txt-lg{font-size:var(--lgFontSize)!important}.txt-xl{font-size:var(--xlFontSize)!important}.txt-bold{font-weight:600!important}.txt-strikethrough{text-decoration:line-through!important}.txt-break{white-space:pre-wrap!important}.txt-center{text-align:center!important}.txt-justify{text-align:justify!important}.txt-left{text-align:left!important}.txt-right{text-align:right!important}.txt-main{color:var(--txtPrimaryColor)!important}.txt-hint{color:var(--txtHintColor)!important}.txt-disabled{color:var(--txtDisabledColor)!important}.link-hint{user-select:none;cursor:pointer;color:var(--txtHintColor)!important;text-decoration:none;transition:color var(--baseAnimationSpeed)}.link-hint:hover,.link-hint:focus-visible,.link-hint:active{color:var(--txtPrimaryColor)!important}.link-fade{opacity:1;user-select:none;cursor:pointer;text-decoration:none;color:var(--txtPrimaryColor);transition:opacity var(--baseAnimationSpeed)}.link-fade:focus-visible,.link-fade:hover,.link-fade:active{opacity:.8}.txt-primary{color:var(--primaryColor)!important}.bg-primary{background:var(--primaryColor)!important}.link-primary{cursor:pointer;color:var(--primaryColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-primary:focus-visible,.link-primary:hover,.link-primary:active{opacity:.8}.txt-info{color:var(--infoColor)!important}.bg-info{background:var(--infoColor)!important}.link-info{cursor:pointer;color:var(--infoColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-info:focus-visible,.link-info:hover,.link-info:active{opacity:.8}.txt-info-alt{color:var(--infoAltColor)!important}.bg-info-alt{background:var(--infoAltColor)!important}.link-info-alt{cursor:pointer;color:var(--infoAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-info-alt:focus-visible,.link-info-alt:hover,.link-info-alt:active{opacity:.8}.txt-success{color:var(--successColor)!important}.bg-success{background:var(--successColor)!important}.link-success{cursor:pointer;color:var(--successColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-success:focus-visible,.link-success:hover,.link-success:active{opacity:.8}.txt-success-alt{color:var(--successAltColor)!important}.bg-success-alt{background:var(--successAltColor)!important}.link-success-alt{cursor:pointer;color:var(--successAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-success-alt:focus-visible,.link-success-alt:hover,.link-success-alt:active{opacity:.8}.txt-danger{color:var(--dangerColor)!important}.bg-danger{background:var(--dangerColor)!important}.link-danger{cursor:pointer;color:var(--dangerColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-danger:focus-visible,.link-danger:hover,.link-danger:active{opacity:.8}.txt-danger-alt{color:var(--dangerAltColor)!important}.bg-danger-alt{background:var(--dangerAltColor)!important}.link-danger-alt{cursor:pointer;color:var(--dangerAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-danger-alt:focus-visible,.link-danger-alt:hover,.link-danger-alt:active{opacity:.8}.txt-warning{color:var(--warningColor)!important}.bg-warning{background:var(--warningColor)!important}.link-warning{cursor:pointer;color:var(--warningColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-warning:focus-visible,.link-warning:hover,.link-warning:active{opacity:.8}.txt-warning-alt{color:var(--warningAltColor)!important}.bg-warning-alt{background:var(--warningAltColor)!important}.link-warning-alt{cursor:pointer;color:var(--warningAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-warning-alt:focus-visible,.link-warning-alt:hover,.link-warning-alt:active{opacity:.8}.fade{opacity:.6}a.fade,.btn.fade,[tabindex].fade,[class*=link-].fade,.handle.fade{transition:all var(--baseAnimationSpeed)}a.fade:hover,.btn.fade:hover,[tabindex].fade:hover,[class*=link-].fade:hover,.handle.fade:hover{opacity:1}.noborder{border:0px!important}.hidden{display:none!important}.hidden-empty:empty{display:none!important}.content,.form-field .help-block,.overlay-panel .panel-content,.sub-panel,.panel{min-width:0}.content>:first-child,.form-field .help-block>:first-child,.overlay-panel .panel-content>:first-child,.sub-panel>:first-child,.panel>:first-child{margin-top:0}.content>:last-child,.form-field .help-block>:last-child,.overlay-panel .panel-content>:last-child,.sub-panel>:last-child,.panel>:last-child{margin-bottom:0}.panel{background:var(--baseColor);border-radius:var(--lgRadius);padding:calc(var(--baseSpacing) - 5px) var(--baseSpacing);box-shadow:0 2px 5px 0 var(--shadowColor)}.sub-panel{background:var(--baseColor);border-radius:var(--baseRadius);padding:calc(var(--smSpacing) - 5px) var(--smSpacing);border:1px solid var(--baseAlt1Color)}.clearfix{clear:both}.clearfix:after{content:"";display:table;clear:both}.flex{position:relative;display:flex;align-items:center;width:100%;min-width:0;gap:var(--smSpacing)}.flex-fill{flex:1 1 auto!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.inline-flex{position:relative;display:inline-flex;align-items:center;flex-wrap:wrap;min-width:0;gap:10px}.flex-order-0{order:0}.flex-order-1{order:1}.flex-order-2{order:2}.flex-order-3{order:3}.flex-order-4{order:4}.flex-order-5{order:5}.flex-order-6{order:6}.flex-gap-base{gap:var(--baseSpacing)!important}.flex-gap-xs{gap:var(--xsSpacing)!important}.flex-gap-sm{gap:var(--smSpacing)!important}.flex-gap-lg{gap:var(--lgSpacing)!important}.flex-gap-xl{gap:var(--xlSpacing)!important}.flex-gap-0{gap:0px!important}.flex-gap-5{gap:5px!important}.flex-gap-10{gap:10px!important}.flex-gap-15{gap:15px!important}.flex-gap-20{gap:20px!important}.flex-gap-25{gap:25px!important}.flex-gap-30{gap:30px!important}.flex-gap-35{gap:35px!important}.flex-gap-40{gap:40px!important}.flex-gap-45{gap:45px!important}.flex-gap-50{gap:50px!important}.flex-gap-55{gap:55px!important}.flex-gap-60{gap:60px!important}.m-base{margin:var(--baseSpacing)!important}.p-base{padding:var(--baseSpacing)!important}.m-xs{margin:var(--xsSpacing)!important}.p-xs{padding:var(--xsSpacing)!important}.m-sm{margin:var(--smSpacing)!important}.p-sm{padding:var(--smSpacing)!important}.m-lg{margin:var(--lgSpacing)!important}.p-lg{padding:var(--lgSpacing)!important}.m-xl{margin:var(--xlSpacing)!important}.p-xl{padding:var(--xlSpacing)!important}.m-t-auto{margin-top:auto!important}.p-t-auto{padding-top:auto!important}.m-t-base{margin-top:var(--baseSpacing)!important}.p-t-base{padding-top:var(--baseSpacing)!important}.m-t-xs{margin-top:var(--xsSpacing)!important}.p-t-xs{padding-top:var(--xsSpacing)!important}.m-t-sm{margin-top:var(--smSpacing)!important}.p-t-sm{padding-top:var(--smSpacing)!important}.m-t-lg{margin-top:var(--lgSpacing)!important}.p-t-lg{padding-top:var(--lgSpacing)!important}.m-t-xl{margin-top:var(--xlSpacing)!important}.p-t-xl{padding-top:var(--xlSpacing)!important}.m-r-auto{margin-right:auto!important}.p-r-auto{padding-right:auto!important}.m-r-base{margin-right:var(--baseSpacing)!important}.p-r-base{padding-right:var(--baseSpacing)!important}.m-r-xs{margin-right:var(--xsSpacing)!important}.p-r-xs{padding-right:var(--xsSpacing)!important}.m-r-sm{margin-right:var(--smSpacing)!important}.p-r-sm{padding-right:var(--smSpacing)!important}.m-r-lg{margin-right:var(--lgSpacing)!important}.p-r-lg{padding-right:var(--lgSpacing)!important}.m-r-xl{margin-right:var(--xlSpacing)!important}.p-r-xl{padding-right:var(--xlSpacing)!important}.m-b-auto{margin-bottom:auto!important}.p-b-auto{padding-bottom:auto!important}.m-b-base{margin-bottom:var(--baseSpacing)!important}.p-b-base{padding-bottom:var(--baseSpacing)!important}.m-b-xs{margin-bottom:var(--xsSpacing)!important}.p-b-xs{padding-bottom:var(--xsSpacing)!important}.m-b-sm{margin-bottom:var(--smSpacing)!important}.p-b-sm{padding-bottom:var(--smSpacing)!important}.m-b-lg{margin-bottom:var(--lgSpacing)!important}.p-b-lg{padding-bottom:var(--lgSpacing)!important}.m-b-xl{margin-bottom:var(--xlSpacing)!important}.p-b-xl{padding-bottom:var(--xlSpacing)!important}.m-l-auto{margin-left:auto!important}.p-l-auto{padding-left:auto!important}.m-l-base{margin-left:var(--baseSpacing)!important}.p-l-base{padding-left:var(--baseSpacing)!important}.m-l-xs{margin-left:var(--xsSpacing)!important}.p-l-xs{padding-left:var(--xsSpacing)!important}.m-l-sm{margin-left:var(--smSpacing)!important}.p-l-sm{padding-left:var(--smSpacing)!important}.m-l-lg{margin-left:var(--lgSpacing)!important}.p-l-lg{padding-left:var(--lgSpacing)!important}.m-l-xl{margin-left:var(--xlSpacing)!important}.p-l-xl{padding-left:var(--xlSpacing)!important}.m-0{margin:0!important}.p-0{padding:0!important}.m-t-0{margin-top:0!important}.p-t-0{padding-top:0!important}.m-r-0{margin-right:0!important}.p-r-0{padding-right:0!important}.m-b-0{margin-bottom:0!important}.p-b-0{padding-bottom:0!important}.m-l-0{margin-left:0!important}.p-l-0{padding-left:0!important}.m-5{margin:5px!important}.p-5{padding:5px!important}.m-t-5{margin-top:5px!important}.p-t-5{padding-top:5px!important}.m-r-5{margin-right:5px!important}.p-r-5{padding-right:5px!important}.m-b-5{margin-bottom:5px!important}.p-b-5{padding-bottom:5px!important}.m-l-5{margin-left:5px!important}.p-l-5{padding-left:5px!important}.m-10{margin:10px!important}.p-10{padding:10px!important}.m-t-10{margin-top:10px!important}.p-t-10{padding-top:10px!important}.m-r-10{margin-right:10px!important}.p-r-10{padding-right:10px!important}.m-b-10{margin-bottom:10px!important}.p-b-10{padding-bottom:10px!important}.m-l-10{margin-left:10px!important}.p-l-10{padding-left:10px!important}.m-15{margin:15px!important}.p-15{padding:15px!important}.m-t-15{margin-top:15px!important}.p-t-15{padding-top:15px!important}.m-r-15{margin-right:15px!important}.p-r-15{padding-right:15px!important}.m-b-15{margin-bottom:15px!important}.p-b-15{padding-bottom:15px!important}.m-l-15{margin-left:15px!important}.p-l-15{padding-left:15px!important}.m-20{margin:20px!important}.p-20{padding:20px!important}.m-t-20{margin-top:20px!important}.p-t-20{padding-top:20px!important}.m-r-20{margin-right:20px!important}.p-r-20{padding-right:20px!important}.m-b-20{margin-bottom:20px!important}.p-b-20{padding-bottom:20px!important}.m-l-20{margin-left:20px!important}.p-l-20{padding-left:20px!important}.m-25{margin:25px!important}.p-25{padding:25px!important}.m-t-25{margin-top:25px!important}.p-t-25{padding-top:25px!important}.m-r-25{margin-right:25px!important}.p-r-25{padding-right:25px!important}.m-b-25{margin-bottom:25px!important}.p-b-25{padding-bottom:25px!important}.m-l-25{margin-left:25px!important}.p-l-25{padding-left:25px!important}.m-30{margin:30px!important}.p-30{padding:30px!important}.m-t-30{margin-top:30px!important}.p-t-30{padding-top:30px!important}.m-r-30{margin-right:30px!important}.p-r-30{padding-right:30px!important}.m-b-30{margin-bottom:30px!important}.p-b-30{padding-bottom:30px!important}.m-l-30{margin-left:30px!important}.p-l-30{padding-left:30px!important}.m-35{margin:35px!important}.p-35{padding:35px!important}.m-t-35{margin-top:35px!important}.p-t-35{padding-top:35px!important}.m-r-35{margin-right:35px!important}.p-r-35{padding-right:35px!important}.m-b-35{margin-bottom:35px!important}.p-b-35{padding-bottom:35px!important}.m-l-35{margin-left:35px!important}.p-l-35{padding-left:35px!important}.m-40{margin:40px!important}.p-40{padding:40px!important}.m-t-40{margin-top:40px!important}.p-t-40{padding-top:40px!important}.m-r-40{margin-right:40px!important}.p-r-40{padding-right:40px!important}.m-b-40{margin-bottom:40px!important}.p-b-40{padding-bottom:40px!important}.m-l-40{margin-left:40px!important}.p-l-40{padding-left:40px!important}.m-45{margin:45px!important}.p-45{padding:45px!important}.m-t-45{margin-top:45px!important}.p-t-45{padding-top:45px!important}.m-r-45{margin-right:45px!important}.p-r-45{padding-right:45px!important}.m-b-45{margin-bottom:45px!important}.p-b-45{padding-bottom:45px!important}.m-l-45{margin-left:45px!important}.p-l-45{padding-left:45px!important}.m-50{margin:50px!important}.p-50{padding:50px!important}.m-t-50{margin-top:50px!important}.p-t-50{padding-top:50px!important}.m-r-50{margin-right:50px!important}.p-r-50{padding-right:50px!important}.m-b-50{margin-bottom:50px!important}.p-b-50{padding-bottom:50px!important}.m-l-50{margin-left:50px!important}.p-l-50{padding-left:50px!important}.m-55{margin:55px!important}.p-55{padding:55px!important}.m-t-55{margin-top:55px!important}.p-t-55{padding-top:55px!important}.m-r-55{margin-right:55px!important}.p-r-55{padding-right:55px!important}.m-b-55{margin-bottom:55px!important}.p-b-55{padding-bottom:55px!important}.m-l-55{margin-left:55px!important}.p-l-55{padding-left:55px!important}.m-60{margin:60px!important}.p-60{padding:60px!important}.m-t-60{margin-top:60px!important}.p-t-60{padding-top:60px!important}.m-r-60{margin-right:60px!important}.p-r-60{padding-right:60px!important}.m-b-60{margin-bottom:60px!important}.p-b-60{padding-bottom:60px!important}.m-l-60{margin-left:60px!important}.p-l-60{padding-left:60px!important}.no-min-width{min-width:0!important}.wrapper{position:relative;width:var(--wrapperWidth);margin:0 auto;max-width:100%}.wrapper.wrapper-sm{width:var(--smWrapperWidth)}.wrapper.wrapper-lg{width:var(--lgWrapperWidth)}.label{--labelVPadding: 3px;--labelHPadding: 8px;display:inline-flex;align-items:center;gap:5px;padding:var(--labelVPadding) var(--labelHPadding);min-height:23px;max-width:100%;text-align:center;font-size:var(--smFontSize);line-height:var(--smLineHeight);border-radius:30px;background:var(--baseAlt2Color);color:var(--txtPrimaryColor);white-space:nowrap}.label .btn:last-child{margin-right:calc(-.5 * var(--labelHPadding))}.label .btn:first-child{margin-left:calc(-.5 * var(--labelHPadding))}.label.label-sm{--labelHPadding: 5px;font-size:var(--xsFontSize);min-height:18px;line-height:1}.label.label-primary{color:var(--baseColor);background:var(--primaryColor)}.label.label-info{background:var(--infoAltColor)}.label.label-success{background:var(--successAltColor)}.label.label-danger{background:var(--dangerAltColor)}.label.label-warning{background:var(--warningAltColor)}.thumb{--thumbSize: 40px;flex-shrink:0;position:relative;display:inline-flex;align-items:center;justify-content:center;line-height:1;width:var(--thumbSize);height:var(--thumbSize);background:var(--baseAlt2Color);border-radius:var(--baseRadius);color:var(--txtPrimaryColor);font-size:1.16rem;box-shadow:0 2px 5px 0 var(--shadowColor)}.thumb i{font-size:inherit}.thumb img{width:100%;height:100%;border-radius:inherit;overflow:hidden}.thumb.thumb-xs{--thumbSize: 24px;font-size:.85rem}.thumb.thumb-sm{--thumbSize: 32px;font-size:.92rem}.thumb.thumb-lg{--thumbSize: 60px;font-size:1.3rem}.thumb.thumb-xl{--thumbSize: 80px;font-size:1.5rem}.thumb.thumb-circle{border-radius:50%}.thumb.thumb-active{box-shadow:0 0 0 2px var(--primaryColor)}a.thumb:not(.thumb-active){transition:box-shadow var(--baseAnimationSpeed)}a.thumb:not(.thumb-active):hover,a.thumb:not(.thumb-active):focus{box-shadow:0 2px 5px 0 var(--shadowColor),0 2px 4px 1px var(--shadowColor)}.section-title{display:flex;align-items:center;width:100%;column-gap:10px;row-gap:5px;margin:0 0 var(--xsSpacing);font-weight:600;font-size:var(--smFontSize);line-height:var(--smLineHeight);color:var(--txtHintColor);text-transform:uppercase}.drag-handle{outline:0;cursor:pointer;display:inline-flex;align-items:left;color:var(--txtDisabledColor);transition:color var(--baseAnimationSpeed)}.drag-handle:before,.drag-handle:after{content:"\ef77";font-family:var(--iconFontFamily);font-size:18px;line-height:1;width:7px;text-align:center}.drag-handle:focus-visible,.drag-handle:hover,.drag-handle:active{color:var(--txtPrimaryColor)}.logo{position:relative;vertical-align:top;display:inline-flex;align-items:center;gap:10px;font-size:23px;text-decoration:none;color:inherit;user-select:none}.logo strong{font-weight:700}.logo .version{position:absolute;right:0;top:-5px;line-height:1;font-size:10px;font-weight:400;padding:2px 4px;border-radius:var(--baseRadius);background:var(--dangerAltColor);color:var(--txtPrimaryColor)}.logo.logo-sm{font-size:20px}.loader{--loaderSize: 32px;position:relative;display:inline-flex;vertical-align:top;flex-direction:column;align-items:center;justify-content:center;row-gap:10px;margin:0;color:var(--txtDisabledColor);text-align:center;font-weight:400}.loader:before{content:"\eec4";display:inline-block;vertical-align:top;clear:both;width:var(--loaderSize);height:var(--loaderSize);line-height:var(--loaderSize);font-size:var(--loaderSize);font-weight:400;font-family:var(--iconFontFamily);color:inherit;text-align:center;animation:loaderShow var(--baseAnimationSpeed),rotate .9s var(--baseAnimationSpeed) infinite linear}.loader.loader-primary{color:var(--primaryColor)}.loader.loader-info{color:var(--infoColor)}.loader.loader-info-alt{color:var(--infoAltColor)}.loader.loader-success{color:var(--successColor)}.loader.loader-success-alt{color:var(--successAltColor)}.loader.loader-danger{color:var(--dangerColor)}.loader.loader-danger-alt{color:var(--dangerAltColor)}.loader.loader-warning{color:var(--warningColor)}.loader.loader-warning-alt{color:var(--warningAltColor)}.loader.loader-sm{--loaderSize: 24px}.loader.loader-lg{--loaderSize: 42px}.skeleton-loader{position:relative;height:12px;margin:5px 0;border-radius:var(--baseRadius);background:var(--baseAlt1Color);animation:fadeIn .4s}.skeleton-loader:before{content:"";width:100%;height:100%;display:block;border-radius:inherit;background:linear-gradient(90deg,var(--baseAlt1Color) 8%,var(--bodyColor) 18%,var(--baseAlt1Color) 33%);background-size:200% 100%;animation:shine 1s linear infinite}.placeholder-section{display:flex;width:100%;align-items:center;justify-content:center;text-align:center;flex-direction:column;gap:var(--smSpacing);color:var(--txtHintColor)}.placeholder-section .icon{font-size:50px;height:50px;line-height:1;opacity:.3}.placeholder-section .icon i{font-size:inherit;vertical-align:top}.list{position:relative;overflow:auto;overflow:overlay;border:1px solid var(--baseAlt2Color);border-radius:var(--baseRadius)}.list .list-item{word-break:break-word;position:relative;display:flex;align-items:center;width:100%;gap:var(--xsSpacing);outline:0;padding:10px var(--xsSpacing);min-height:50px;border-top:1px solid var(--baseAlt2Color);transition:background var(--baseAnimationSpeed)}.list .list-item:first-child{border-top:0}.list .list-item:last-child{border-radius:inherit}.list .list-item .content,.list .list-item .form-field .help-block,.form-field .list .list-item .help-block,.list .list-item .overlay-panel .panel-content,.overlay-panel .list .list-item .panel-content,.list .list-item .panel,.list .list-item .sub-panel{display:flex;align-items:center;gap:5px;min-width:0;max-width:100%;user-select:text}.list .list-item .actions{gap:10px;flex-shrink:0;display:inline-flex;align-items:center;margin:-1px -5px -1px 0}.list .list-item .actions.nonintrusive{opacity:0;visibility:hidden;transform:translate(5px);transition:transform var(--baseAnimationSpeed),opacity var(--baseAnimationSpeed),visibility var(--baseAnimationSpeed)}.list .list-item:hover .actions.nonintrusive,.list .list-item:active .actions.nonintrusive{opacity:1;visibility:visible;transform:translate(0)}.list .list-item.selected{background:var(--bodyColor)}.list .list-item.handle:not(.disabled){cursor:pointer;user-select:none}.list .list-item.handle:not(.disabled):hover,.list .list-item.handle:not(.disabled):focus-visible{background:var(--baseAlt1Color)}.list .list-item.handle:not(.disabled):active{background:var(--baseAlt2Color)}.list .list-item.disabled:not(.selected){cursor:default;opacity:.6}.list .list-item-btn{padding:5px;min-height:auto}.list.list-compact .list-item{min-height:40px}.entrance-top{animation:entranceTop var(--entranceAnimationSpeed)}.entrance-bottom{animation:entranceBottom var(--entranceAnimationSpeed)}.entrance-left{animation:entranceLeft var(--entranceAnimationSpeed)}.entrance-right{animation:entranceRight var(--entranceAnimationSpeed)}.grid{--gridGap: var(--baseSpacing);position:relative;display:flex;flex-grow:1;flex-wrap:wrap;row-gap:var(--gridGap);margin:0 calc(-.5 * var(--gridGap))}.grid.grid-center{align-items:center}.grid.grid-sm{--gridGap: var(--smSpacing)}.grid .form-field{margin-bottom:0}.grid>*{margin:0 calc(.5 * var(--gridGap))}.col-xxl-1,.col-xxl-2,.col-xxl-3,.col-xxl-4,.col-xxl-5,.col-xxl-6,.col-xxl-7,.col-xxl-8,.col-xxl-9,.col-xxl-10,.col-xxl-11,.col-xxl-12,.col-xl-1,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-10,.col-xl-11,.col-xl-12,.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-1,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12{position:relative;width:100%;min-height:1px}.col-auto{flex:0 0 auto;width:auto}.col-12{width:calc(100% - var(--gridGap))}.col-11{width:calc(91.6666666667% - var(--gridGap))}.col-10{width:calc(83.3333333333% - var(--gridGap))}.col-9{width:calc(75% - var(--gridGap))}.col-8{width:calc(66.6666666667% - var(--gridGap))}.col-7{width:calc(58.3333333333% - var(--gridGap))}.col-6{width:calc(50% - var(--gridGap))}.col-5{width:calc(41.6666666667% - var(--gridGap))}.col-4{width:calc(33.3333333333% - var(--gridGap))}.col-3{width:calc(25% - var(--gridGap))}.col-2{width:calc(16.6666666667% - var(--gridGap))}.col-1{width:calc(8.3333333333% - var(--gridGap))}@media (min-width: 576px){.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-12{width:calc(100% - var(--gridGap))}.col-sm-11{width:calc(91.6666666667% - var(--gridGap))}.col-sm-10{width:calc(83.3333333333% - var(--gridGap))}.col-sm-9{width:calc(75% - var(--gridGap))}.col-sm-8{width:calc(66.6666666667% - var(--gridGap))}.col-sm-7{width:calc(58.3333333333% - var(--gridGap))}.col-sm-6{width:calc(50% - var(--gridGap))}.col-sm-5{width:calc(41.6666666667% - var(--gridGap))}.col-sm-4{width:calc(33.3333333333% - var(--gridGap))}.col-sm-3{width:calc(25% - var(--gridGap))}.col-sm-2{width:calc(16.6666666667% - var(--gridGap))}.col-sm-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 768px){.col-md-auto{flex:0 0 auto;width:auto}.col-md-12{width:calc(100% - var(--gridGap))}.col-md-11{width:calc(91.6666666667% - var(--gridGap))}.col-md-10{width:calc(83.3333333333% - var(--gridGap))}.col-md-9{width:calc(75% - var(--gridGap))}.col-md-8{width:calc(66.6666666667% - var(--gridGap))}.col-md-7{width:calc(58.3333333333% - var(--gridGap))}.col-md-6{width:calc(50% - var(--gridGap))}.col-md-5{width:calc(41.6666666667% - var(--gridGap))}.col-md-4{width:calc(33.3333333333% - var(--gridGap))}.col-md-3{width:calc(25% - var(--gridGap))}.col-md-2{width:calc(16.6666666667% - var(--gridGap))}.col-md-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 992px){.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-12{width:calc(100% - var(--gridGap))}.col-lg-11{width:calc(91.6666666667% - var(--gridGap))}.col-lg-10{width:calc(83.3333333333% - var(--gridGap))}.col-lg-9{width:calc(75% - var(--gridGap))}.col-lg-8{width:calc(66.6666666667% - var(--gridGap))}.col-lg-7{width:calc(58.3333333333% - var(--gridGap))}.col-lg-6{width:calc(50% - var(--gridGap))}.col-lg-5{width:calc(41.6666666667% - var(--gridGap))}.col-lg-4{width:calc(33.3333333333% - var(--gridGap))}.col-lg-3{width:calc(25% - var(--gridGap))}.col-lg-2{width:calc(16.6666666667% - var(--gridGap))}.col-lg-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 1200px){.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-12{width:calc(100% - var(--gridGap))}.col-xl-11{width:calc(91.6666666667% - var(--gridGap))}.col-xl-10{width:calc(83.3333333333% - var(--gridGap))}.col-xl-9{width:calc(75% - var(--gridGap))}.col-xl-8{width:calc(66.6666666667% - var(--gridGap))}.col-xl-7{width:calc(58.3333333333% - var(--gridGap))}.col-xl-6{width:calc(50% - var(--gridGap))}.col-xl-5{width:calc(41.6666666667% - var(--gridGap))}.col-xl-4{width:calc(33.3333333333% - var(--gridGap))}.col-xl-3{width:calc(25% - var(--gridGap))}.col-xl-2{width:calc(16.6666666667% - var(--gridGap))}.col-xl-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 1400px){.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-12{width:calc(100% - var(--gridGap))}.col-xxl-11{width:calc(91.6666666667% - var(--gridGap))}.col-xxl-10{width:calc(83.3333333333% - var(--gridGap))}.col-xxl-9{width:calc(75% - var(--gridGap))}.col-xxl-8{width:calc(66.6666666667% - var(--gridGap))}.col-xxl-7{width:calc(58.3333333333% - var(--gridGap))}.col-xxl-6{width:calc(50% - var(--gridGap))}.col-xxl-5{width:calc(41.6666666667% - var(--gridGap))}.col-xxl-4{width:calc(33.3333333333% - var(--gridGap))}.col-xxl-3{width:calc(25% - var(--gridGap))}.col-xxl-2{width:calc(16.6666666667% - var(--gridGap))}.col-xxl-1{width:calc(8.3333333333% - var(--gridGap))}}.app-tooltip{position:fixed;z-index:999999;top:0;left:0;display:inline-block;vertical-align:top;max-width:275px;padding:3px 5px;color:#fff;text-align:center;font-family:var(--baseFontFamily);font-size:var(--smFontSize);line-height:var(--smLineHeight);border-radius:var(--baseRadius);background:var(--tooltipColor);pointer-events:none;user-select:none;transition:opacity var(--baseAnimationSpeed),visibility var(--baseAnimationSpeed),transform var(--baseAnimationSpeed);transform:translateY(1px);backface-visibility:hidden;white-space:pre-line;word-break:break-word;opacity:0;visibility:hidden}.app-tooltip.code{font-family:monospace;white-space:pre-wrap;text-align:left;min-width:150px;max-width:340px}.app-tooltip.active{transform:scale(1);opacity:1;visibility:visible}.dropdown{position:absolute;z-index:99;right:0;left:auto;top:100%;cursor:default;display:inline-block;vertical-align:top;padding:5px;margin:5px 0 0;width:auto;min-width:140px;max-width:450px;max-height:330px;overflow-x:hidden;overflow-y:auto;background:var(--baseColor);border-radius:var(--baseRadius);border:1px solid var(--baseAlt2Color);box-shadow:0 2px 5px 0 var(--shadowColor)}.dropdown hr{margin:5px 0}.dropdown .dropdown-item{border:0;background:none;position:relative;outline:0;display:flex;align-items:center;column-gap:8px;width:100%;height:auto;min-height:0;text-align:left;padding:8px 10px;margin:0 0 5px;cursor:pointer;color:var(--txtPrimaryColor);font-weight:400;font-size:var(--baseFontSize);font-family:var(--baseFontFamily);line-height:var(--baseLineHeight);border-radius:var(--baseRadius);text-decoration:none;word-break:break-word;user-select:none;transition:background var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.dropdown .dropdown-item:last-child{margin-bottom:0}.dropdown .dropdown-item.selected{background:var(--baseAlt1Color)}.dropdown .dropdown-item:focus-visible,.dropdown .dropdown-item:hover{background:var(--baseAlt2Color)}.dropdown .dropdown-item:active{transition-duration:var(--activeAnimationSpeed);background:var(--baseAlt3Color)}.dropdown .dropdown-item.disabled{color:var(--txtDisabledColor);background:none;pointer-events:none}.dropdown .dropdown-item.separator{cursor:default;background:none;text-transform:uppercase;padding-top:0;padding-bottom:0;margin-top:15px;color:var(--txtDisabledColor);font-weight:600;font-size:var(--smFontSize)}.dropdown.dropdown-upside{top:auto;bottom:100%;margin:0 0 5px}.dropdown.dropdown-left{right:auto;left:0}.dropdown.dropdown-center{right:auto;left:50%;transform:translate(-50%)}.dropdown.dropdown-sm{margin-top:5px;min-width:100px}.dropdown.dropdown-sm .dropdown-item{column-gap:7px;font-size:var(--smFontSize);margin:0 0 2px;padding:5px 7px}.dropdown.dropdown-sm .dropdown-item:last-child{margin-bottom:0}.dropdown.dropdown-sm.dropdown-upside{margin-top:0;margin-bottom:5px}.dropdown.dropdown-block{width:100%;min-width:130px;max-width:100%}.dropdown.dropdown-nowrap{white-space:nowrap}.overlay-panel{position:relative;z-index:1;display:flex;flex-direction:column;align-self:flex-end;margin-left:auto;background:var(--baseColor);height:100%;width:580px;max-width:100%;word-wrap:break-word;box-shadow:0 2px 5px 0 var(--shadowColor)}.overlay-panel .overlay-panel-section{position:relative;width:100%;margin:0;padding:var(--baseSpacing);transition:box-shadow var(--baseAnimationSpeed)}.overlay-panel .overlay-panel-section:empty{display:none}.overlay-panel .overlay-panel-section:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.overlay-panel .overlay-panel-section:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.overlay-panel .overlay-panel-section .btn{flex-grow:0}.overlay-panel img{max-width:100%}.overlay-panel .panel-header{position:relative;z-index:2;display:flex;flex-wrap:wrap;align-items:center;column-gap:10px;row-gap:var(--baseSpacing);padding:calc(var(--baseSpacing) - 7px) var(--baseSpacing)}.overlay-panel .panel-header>*{margin-top:0;margin-bottom:0}.overlay-panel .panel-header .btn-back{margin-left:-10px}.overlay-panel .panel-header .overlay-close{z-index:3;outline:0;position:absolute;right:100%;top:20px;margin:0;display:inline-flex;align-items:center;justify-content:center;width:35px;height:35px;cursor:pointer;text-align:center;font-size:1.6rem;line-height:1;border-radius:50% 0 0 50%;color:#fff;background:var(--primaryColor);opacity:.5;transition:opacity var(--baseAnimationSpeed);user-select:none}.overlay-panel .panel-header .overlay-close i{font-size:inherit}.overlay-panel .panel-header .overlay-close:hover,.overlay-panel .panel-header .overlay-close:focus-visible,.overlay-panel .panel-header .overlay-close:active{opacity:.7}.overlay-panel .panel-header .overlay-close:active{transition-duration:var(--activeAnimationSpeed);opacity:1}.overlay-panel .panel-header .btn-close{margin-right:-10px}.overlay-panel .panel-header .tabs-header{margin-bottom:-24px}.overlay-panel .panel-content{z-index:auto;flex-grow:1;overflow-x:hidden;overflow-y:auto;overflow-y:overlay;scroll-behavior:smooth}.tox-fullscreen .overlay-panel .panel-content{z-index:9}.overlay-panel .panel-header~.panel-content{padding-top:5px}.overlay-panel .panel-footer{z-index:2;column-gap:var(--smSpacing);display:flex;align-items:center;justify-content:flex-end;border-top:1px solid var(--baseAlt2Color);padding:calc(var(--baseSpacing) - 7px) var(--baseSpacing)}.overlay-panel.scrollable .panel-header{box-shadow:0 4px 5px #0000000d}.overlay-panel.scrollable .panel-footer{box-shadow:0 -4px 5px #0000000d}.overlay-panel.scrollable.scroll-top-reached .panel-header,.overlay-panel.scrollable.scroll-bottom-reached .panel-footer{box-shadow:none}.overlay-panel.overlay-panel-xl{width:850px}.overlay-panel.overlay-panel-lg{width:700px}.overlay-panel.overlay-panel-sm{width:460px}.overlay-panel.popup{height:auto;max-height:100%;align-self:center;border-radius:var(--baseRadius);margin:0 auto}.overlay-panel.popup .panel-footer{background:var(--bodyColor)}.overlay-panel.hide-content .panel-content{display:none}.overlay-panel.colored-header .panel-header{background:var(--bodyColor);border-bottom:1px solid var(--baseAlt1Color)}.overlay-panel.colored-header .panel-header .tabs-header{border-bottom:0}.overlay-panel.colored-header .panel-header .tabs-header .tab-item{border:1px solid transparent;border-bottom:0}.overlay-panel.colored-header .panel-header .tabs-header .tab-item:hover,.overlay-panel.colored-header .panel-header .tabs-header .tab-item:focus-visible{background:var(--baseAlt1Color)}.overlay-panel.colored-header .panel-header .tabs-header .tab-item:after{content:none;display:none}.overlay-panel.colored-header .panel-header .tabs-header .tab-item.active{background:var(--baseColor);border-color:var(--baseAlt1Color)}.overlay-panel.colored-header .panel-header~.panel-content{padding-top:calc(var(--baseSpacing) - 5px)}.overlay-panel.compact-header .panel-header{row-gap:var(--smSpacing)}.overlay-panel.full-width-popup{width:100%}.overlay-panel.preview .panel-header{position:absolute;z-index:99;box-shadow:none}.overlay-panel.preview .panel-header .overlay-close{left:100%;right:auto;border-radius:0 50% 50% 0}.overlay-panel.preview .panel-header .overlay-close i{margin-right:5px}.overlay-panel.preview .panel-header,.overlay-panel.preview .panel-footer{padding:10px 15px}.overlay-panel.preview .panel-content{padding:0;text-align:center;display:flex;align-items:center;justify-content:center}.overlay-panel.preview img{max-width:100%;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius)}.overlay-panel.preview object{position:absolute;z-index:1;left:0;top:0;width:100%;height:100%}.overlay-panel.preview.preview-image{width:auto;min-width:320px;min-height:300px;max-width:75%;max-height:90%}.overlay-panel.preview.preview-document,.overlay-panel.preview.preview-video{width:75%;height:90%}.overlay-panel.preview.preview-audio{min-width:320px;min-height:300px;max-width:90%;max-height:90%}@media (max-width: 900px){.overlay-panel .overlay-panel-section{padding:var(--smSpacing)}}.overlay-panel-container{display:flex;position:fixed;z-index:1000;flex-direction:row;align-items:center;top:0;left:0;width:100%;height:100%;overflow:hidden;margin:0;padding:0;outline:0}.overlay-panel-container .overlay{position:absolute;z-index:0;left:0;top:0;width:100%;height:100%;user-select:none;background:var(--overlayColor)}.overlay-panel-container.padded{padding:10px}.overlay-panel-wrapper{position:relative;z-index:1000;outline:0}.alert{position:relative;display:flex;column-gap:15px;align-items:center;width:100%;min-height:50px;max-width:100%;word-break:break-word;margin:0 0 var(--baseSpacing);border-radius:var(--baseRadius);padding:12px 15px;background:var(--baseAlt1Color);color:var(--txtAltColor)}.alert .content,.alert .form-field .help-block,.form-field .alert .help-block,.alert .panel,.alert .sub-panel,.alert .overlay-panel .panel-content,.overlay-panel .alert .panel-content{flex-grow:1}.alert .icon,.alert .close{display:inline-flex;align-items:center;justify-content:center;flex-grow:0;flex-shrink:0;text-align:center}.alert .icon{align-self:stretch;font-size:1.2em;padding-right:15px;font-weight:400;border-right:1px solid rgba(0,0,0,.05);color:var(--txtHintColor)}.alert .close{display:inline-flex;margin-right:-5px;width:30px;height:30px;outline:0;cursor:pointer;text-align:center;font-size:var(--smFontSize);line-height:30px;border-radius:30px;text-decoration:none;color:inherit;opacity:.5;transition:opacity var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.alert .close:hover,.alert .close:focus{opacity:1;background:rgba(255,255,255,.2)}.alert .close:active{opacity:1;background:rgba(255,255,255,.3);transition-duration:var(--activeAnimationSpeed)}.alert code,.alert hr{background:rgba(0,0,0,.1)}.alert.alert-info{background:var(--infoAltColor)}.alert.alert-info .icon{color:var(--infoColor)}.alert.alert-warning{background:var(--warningAltColor)}.alert.alert-warning .icon{color:var(--warningColor)}.alert.alert-success{background:var(--successAltColor)}.alert.alert-success .icon{color:var(--successColor)}.alert.alert-danger{background:var(--dangerAltColor)}.alert.alert-danger .icon{color:var(--dangerColor)}.toasts-wrapper{position:fixed;z-index:999999;bottom:0;left:0;right:0;padding:0 var(--smSpacing);width:auto;display:block;text-align:center;pointer-events:none}.toasts-wrapper .alert{text-align:left;pointer-events:auto;width:var(--smWrapperWidth);margin:var(--baseSpacing) auto;box-shadow:0 2px 5px 0 var(--shadowColor)}body:not(.overlay-active) .app-sidebar~.app-body .toasts-wrapper{left:var(--appSidebarWidth)}body:not(.overlay-active) .app-sidebar~.app-body .page-sidebar~.toasts-wrapper{left:calc(var(--appSidebarWidth) + var(--pageSidebarWidth))}button{outline:0;border:0;background:none;padding:0;text-align:left;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit}.btn{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;outline:0;border:0;margin:0;flex-shrink:0;cursor:pointer;padding:5px 20px;column-gap:7px;user-select:none;min-width:var(--btnHeight);min-height:var(--btnHeight);text-align:center;text-decoration:none;line-height:1;font-weight:600;color:#fff;font-size:var(--baseFontSize);font-family:var(--baseFontFamily);border-radius:var(--btnRadius);background:none;transition:color var(--baseAnimationSpeed)}.btn i{font-size:1.1428em;vertical-align:middle;display:inline-block}.btn:before{content:"";border-radius:inherit;position:absolute;left:0;top:0;z-index:-1;width:100%;height:100%;pointer-events:none;user-select:none;backface-visibility:hidden;background:var(--primaryColor);transition:filter var(--baseAnimationSpeed),opacity var(--baseAnimationSpeed),transform var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.btn:hover:before,.btn:focus-visible:before{opacity:.9}.btn.active,.btn:active{z-index:999}.btn.active:before,.btn:active:before{opacity:.8;transition-duration:var(--activeAnimationSpeed)}.btn.btn-info:before{background:var(--infoColor)}.btn.btn-info:hover:before,.btn.btn-info:focus-visible:before{opacity:.8}.btn.btn-info:active:before{opacity:.7}.btn.btn-success:before{background:var(--successColor)}.btn.btn-success:hover:before,.btn.btn-success:focus-visible:before{opacity:.8}.btn.btn-success:active:before{opacity:.7}.btn.btn-danger:before{background:var(--dangerColor)}.btn.btn-danger:hover:before,.btn.btn-danger:focus-visible:before{opacity:.8}.btn.btn-danger:active:before{opacity:.7}.btn.btn-warning:before{background:var(--warningColor)}.btn.btn-warning:hover:before,.btn.btn-warning:focus-visible:before{opacity:.8}.btn.btn-warning:active:before{opacity:.7}.btn.btn-hint:before{background:var(--baseAlt4Color)}.btn.btn-hint:hover:before,.btn.btn-hint:focus-visible:before{opacity:.8}.btn.btn-hint:active:before{opacity:.7}.btn.btn-outline{border:2px solid currentColor;background:#fff}.btn.btn-secondary,.btn.btn-transparent,.btn.btn-outline{box-shadow:none;color:var(--txtPrimaryColor)}.btn.btn-secondary:before,.btn.btn-transparent:before,.btn.btn-outline:before{opacity:0}.btn.btn-secondary:focus-visible:before,.btn.btn-secondary:hover:before,.btn.btn-transparent:focus-visible:before,.btn.btn-transparent:hover:before,.btn.btn-outline:focus-visible:before,.btn.btn-outline:hover:before{opacity:.3}.btn.btn-secondary.active:before,.btn.btn-secondary:active:before,.btn.btn-transparent.active:before,.btn.btn-transparent:active:before,.btn.btn-outline.active:before,.btn.btn-outline:active:before{opacity:.45}.btn.btn-secondary:before,.btn.btn-transparent:before,.btn.btn-outline:before{background:var(--baseAlt3Color)}.btn.btn-secondary.btn-info,.btn.btn-transparent.btn-info,.btn.btn-outline.btn-info{color:var(--infoColor)}.btn.btn-secondary.btn-info:before,.btn.btn-transparent.btn-info:before,.btn.btn-outline.btn-info:before{opacity:0}.btn.btn-secondary.btn-info:focus-visible:before,.btn.btn-secondary.btn-info:hover:before,.btn.btn-transparent.btn-info:focus-visible:before,.btn.btn-transparent.btn-info:hover:before,.btn.btn-outline.btn-info:focus-visible:before,.btn.btn-outline.btn-info:hover:before{opacity:.15}.btn.btn-secondary.btn-info.active:before,.btn.btn-secondary.btn-info:active:before,.btn.btn-transparent.btn-info.active:before,.btn.btn-transparent.btn-info:active:before,.btn.btn-outline.btn-info.active:before,.btn.btn-outline.btn-info:active:before{opacity:.25}.btn.btn-secondary.btn-info:before,.btn.btn-transparent.btn-info:before,.btn.btn-outline.btn-info:before{background:var(--infoColor)}.btn.btn-secondary.btn-success,.btn.btn-transparent.btn-success,.btn.btn-outline.btn-success{color:var(--successColor)}.btn.btn-secondary.btn-success:before,.btn.btn-transparent.btn-success:before,.btn.btn-outline.btn-success:before{opacity:0}.btn.btn-secondary.btn-success:focus-visible:before,.btn.btn-secondary.btn-success:hover:before,.btn.btn-transparent.btn-success:focus-visible:before,.btn.btn-transparent.btn-success:hover:before,.btn.btn-outline.btn-success:focus-visible:before,.btn.btn-outline.btn-success:hover:before{opacity:.15}.btn.btn-secondary.btn-success.active:before,.btn.btn-secondary.btn-success:active:before,.btn.btn-transparent.btn-success.active:before,.btn.btn-transparent.btn-success:active:before,.btn.btn-outline.btn-success.active:before,.btn.btn-outline.btn-success:active:before{opacity:.25}.btn.btn-secondary.btn-success:before,.btn.btn-transparent.btn-success:before,.btn.btn-outline.btn-success:before{background:var(--successColor)}.btn.btn-secondary.btn-danger,.btn.btn-transparent.btn-danger,.btn.btn-outline.btn-danger{color:var(--dangerColor)}.btn.btn-secondary.btn-danger:before,.btn.btn-transparent.btn-danger:before,.btn.btn-outline.btn-danger:before{opacity:0}.btn.btn-secondary.btn-danger:focus-visible:before,.btn.btn-secondary.btn-danger:hover:before,.btn.btn-transparent.btn-danger:focus-visible:before,.btn.btn-transparent.btn-danger:hover:before,.btn.btn-outline.btn-danger:focus-visible:before,.btn.btn-outline.btn-danger:hover:before{opacity:.15}.btn.btn-secondary.btn-danger.active:before,.btn.btn-secondary.btn-danger:active:before,.btn.btn-transparent.btn-danger.active:before,.btn.btn-transparent.btn-danger:active:before,.btn.btn-outline.btn-danger.active:before,.btn.btn-outline.btn-danger:active:before{opacity:.25}.btn.btn-secondary.btn-danger:before,.btn.btn-transparent.btn-danger:before,.btn.btn-outline.btn-danger:before{background:var(--dangerColor)}.btn.btn-secondary.btn-warning,.btn.btn-transparent.btn-warning,.btn.btn-outline.btn-warning{color:var(--warningColor)}.btn.btn-secondary.btn-warning:before,.btn.btn-transparent.btn-warning:before,.btn.btn-outline.btn-warning:before{opacity:0}.btn.btn-secondary.btn-warning:focus-visible:before,.btn.btn-secondary.btn-warning:hover:before,.btn.btn-transparent.btn-warning:focus-visible:before,.btn.btn-transparent.btn-warning:hover:before,.btn.btn-outline.btn-warning:focus-visible:before,.btn.btn-outline.btn-warning:hover:before{opacity:.15}.btn.btn-secondary.btn-warning.active:before,.btn.btn-secondary.btn-warning:active:before,.btn.btn-transparent.btn-warning.active:before,.btn.btn-transparent.btn-warning:active:before,.btn.btn-outline.btn-warning.active:before,.btn.btn-outline.btn-warning:active:before{opacity:.25}.btn.btn-secondary.btn-warning:before,.btn.btn-transparent.btn-warning:before,.btn.btn-outline.btn-warning:before{background:var(--warningColor)}.btn.btn-secondary.btn-hint,.btn.btn-transparent.btn-hint,.btn.btn-outline.btn-hint{color:var(--baseAlt4Color)}.btn.btn-secondary.btn-hint:before,.btn.btn-transparent.btn-hint:before,.btn.btn-outline.btn-hint:before{opacity:0}.btn.btn-secondary.btn-hint:focus-visible:before,.btn.btn-secondary.btn-hint:hover:before,.btn.btn-transparent.btn-hint:focus-visible:before,.btn.btn-transparent.btn-hint:hover:before,.btn.btn-outline.btn-hint:focus-visible:before,.btn.btn-outline.btn-hint:hover:before{opacity:.15}.btn.btn-secondary.btn-hint.active:before,.btn.btn-secondary.btn-hint:active:before,.btn.btn-transparent.btn-hint.active:before,.btn.btn-transparent.btn-hint:active:before,.btn.btn-outline.btn-hint.active:before,.btn.btn-outline.btn-hint:active:before{opacity:.25}.btn.btn-secondary.btn-hint:before,.btn.btn-transparent.btn-hint:before,.btn.btn-outline.btn-hint:before{background:var(--baseAlt4Color)}.btn.btn-secondary.btn-hint,.btn.btn-transparent.btn-hint,.btn.btn-outline.btn-hint{color:var(--txtHintColor)}.btn.btn-secondary.btn-hint:focus-visible,.btn.btn-secondary.btn-hint:hover,.btn.btn-secondary.btn-hint:active,.btn.btn-secondary.btn-hint.active,.btn.btn-transparent.btn-hint:focus-visible,.btn.btn-transparent.btn-hint:hover,.btn.btn-transparent.btn-hint:active,.btn.btn-transparent.btn-hint.active,.btn.btn-outline.btn-hint:focus-visible,.btn.btn-outline.btn-hint:hover,.btn.btn-outline.btn-hint:active,.btn.btn-outline.btn-hint.active{color:var(--txtPrimaryColor)}.btn.btn-secondary:before{opacity:.35}.btn.btn-secondary:focus-visible:before,.btn.btn-secondary:hover:before{opacity:.5}.btn.btn-secondary.active:before,.btn.btn-secondary:active:before{opacity:.7}.btn.btn-secondary.btn-info:before{opacity:.15}.btn.btn-secondary.btn-info:focus-visible:before,.btn.btn-secondary.btn-info:hover:before{opacity:.25}.btn.btn-secondary.btn-info.active:before,.btn.btn-secondary.btn-info:active:before{opacity:.3}.btn.btn-secondary.btn-success:before{opacity:.15}.btn.btn-secondary.btn-success:focus-visible:before,.btn.btn-secondary.btn-success:hover:before{opacity:.25}.btn.btn-secondary.btn-success.active:before,.btn.btn-secondary.btn-success:active:before{opacity:.3}.btn.btn-secondary.btn-danger:before{opacity:.15}.btn.btn-secondary.btn-danger:focus-visible:before,.btn.btn-secondary.btn-danger:hover:before{opacity:.25}.btn.btn-secondary.btn-danger.active:before,.btn.btn-secondary.btn-danger:active:before{opacity:.3}.btn.btn-secondary.btn-warning:before{opacity:.15}.btn.btn-secondary.btn-warning:focus-visible:before,.btn.btn-secondary.btn-warning:hover:before{opacity:.25}.btn.btn-secondary.btn-warning.active:before,.btn.btn-secondary.btn-warning:active:before{opacity:.3}.btn.btn-secondary.btn-hint:before{opacity:.15}.btn.btn-secondary.btn-hint:focus-visible:before,.btn.btn-secondary.btn-hint:hover:before{opacity:.25}.btn.btn-secondary.btn-hint.active:before,.btn.btn-secondary.btn-hint:active:before{opacity:.3}.btn.btn-disabled,.btn[disabled]{box-shadow:none;cursor:default;background:var(--baseAlt1Color);color:var(--txtDisabledColor)!important}.btn.btn-disabled:before,.btn[disabled]:before{display:none}.btn.btn-disabled.btn-transparent,.btn[disabled].btn-transparent{background:none}.btn.btn-disabled.btn-outline,.btn[disabled].btn-outline{border-color:var(--baseAlt2Color)}.btn.btn-expanded{min-width:150px}.btn.btn-expanded-sm{min-width:90px}.btn.btn-expanded-lg{min-width:170px}.btn.btn-lg{column-gap:10px;font-size:var(--lgFontSize);min-height:var(--lgBtnHeight);min-width:var(--lgBtnHeight);padding-left:30px;padding-right:30px}.btn.btn-lg i{font-size:1.2666em}.btn.btn-lg.btn-expanded{min-width:240px}.btn.btn-lg.btn-expanded-sm{min-width:160px}.btn.btn-lg.btn-expanded-lg{min-width:300px}.btn.btn-sm,.btn.btn-xs{column-gap:5px;font-size:var(--smFontSize);min-height:var(--smBtnHeight);min-width:var(--smBtnHeight);padding-left:12px;padding-right:12px}.btn.btn-sm i,.btn.btn-xs i{font-size:1rem}.btn.btn-sm.btn-expanded,.btn.btn-xs.btn-expanded{min-width:100px}.btn.btn-sm.btn-expanded-sm,.btn.btn-xs.btn-expanded-sm{min-width:80px}.btn.btn-sm.btn-expanded-lg,.btn.btn-xs.btn-expanded-lg{min-width:130px}.btn.btn-xs{min-width:var(--xsBtnHeight);min-height:var(--xsBtnHeight)}.btn.btn-block{display:flex;width:100%}.btn.btn-circle{border-radius:50%;padding:0;gap:0}.btn.btn-circle i{font-size:1.2857rem;text-align:center;width:19px;height:19px;line-height:19px}.btn.btn-circle i:before{margin:0;display:block}.btn.btn-circle.btn-sm i{font-size:1.1rem}.btn.btn-circle.btn-xs i{font-size:1.05rem}.btn.btn-loading{--loaderSize: 24px;cursor:default;pointer-events:none}.btn.btn-loading:after{content:"\eec4";position:absolute;display:inline-block;vertical-align:top;left:50%;top:50%;width:var(--loaderSize);height:var(--loaderSize);line-height:var(--loaderSize);font-size:var(--loaderSize);color:inherit;text-align:center;font-weight:400;margin-left:calc(var(--loaderSize) * -.5);margin-top:calc(var(--loaderSize) * -.5);font-family:var(--iconFontFamily);animation:loaderShow var(--baseAnimationSpeed),rotate .9s var(--baseAnimationSpeed) infinite linear}.btn.btn-loading>*{opacity:0;transform:scale(.9)}.btn.btn-loading.btn-sm,.btn.btn-loading.btn-xs{--loaderSize: 20px}.btn.btn-loading.btn-lg{--loaderSize: 28px}.btn.btn-prev i,.btn.btn-next i{transition:transform var(--baseAnimationSpeed)}.btn.btn-prev:hover i,.btn.btn-prev:focus-within i,.btn.btn-next:hover i,.btn.btn-next:focus-within i{transform:translate(3px)}.btn.btn-prev:hover i,.btn.btn-prev:focus-within i{transform:translate(-3px)}.btns-group{display:inline-flex;align-items:center;gap:var(--xsSpacing)}.tinymce-wrapper,.code-editor,.select .selected-container,input,select,textarea{display:block;width:100%;outline:0;border:0;margin:0;background:none;padding:5px 10px;line-height:20px;min-width:0;min-height:var(--inputHeight);background:var(--baseAlt1Color);color:var(--txtPrimaryColor);font-size:var(--baseFontSize);font-family:var(--baseFontFamily);font-weight:400;border-radius:var(--baseRadius);overflow:auto;overflow:overlay}.tinymce-wrapper::placeholder,.code-editor::placeholder,.select .selected-container::placeholder,input::placeholder,select::placeholder,textarea::placeholder{color:var(--txtDisabledColor)}@media screen and (min-width: 550px){.tinymce-wrapper:focus,.code-editor:focus,.select .selected-container:focus,input:focus,select:focus,textarea:focus,.tinymce-wrapper:focus-within,.code-editor:focus-within,.select .selected-container:focus-within,input:focus-within,select:focus-within,textarea:focus-within{scrollbar-color:var(--baseAlt3Color) transparent;scrollbar-width:thin;scroll-behavior:smooth}.tinymce-wrapper:focus::-webkit-scrollbar,.code-editor:focus::-webkit-scrollbar,.select .selected-container:focus::-webkit-scrollbar,input:focus::-webkit-scrollbar,select:focus::-webkit-scrollbar,textarea:focus::-webkit-scrollbar,.tinymce-wrapper:focus-within::-webkit-scrollbar,.code-editor:focus-within::-webkit-scrollbar,.select .selected-container:focus-within::-webkit-scrollbar,input:focus-within::-webkit-scrollbar,select:focus-within::-webkit-scrollbar,textarea:focus-within::-webkit-scrollbar{width:8px;height:8px;border-radius:var(--baseRadius)}.tinymce-wrapper:focus::-webkit-scrollbar-track,.code-editor:focus::-webkit-scrollbar-track,.select .selected-container:focus::-webkit-scrollbar-track,input:focus::-webkit-scrollbar-track,select:focus::-webkit-scrollbar-track,textarea:focus::-webkit-scrollbar-track,.tinymce-wrapper:focus-within::-webkit-scrollbar-track,.code-editor:focus-within::-webkit-scrollbar-track,.select .selected-container:focus-within::-webkit-scrollbar-track,input:focus-within::-webkit-scrollbar-track,select:focus-within::-webkit-scrollbar-track,textarea:focus-within::-webkit-scrollbar-track{background:transparent;border-radius:var(--baseRadius)}.tinymce-wrapper:focus::-webkit-scrollbar-thumb,.code-editor:focus::-webkit-scrollbar-thumb,.select .selected-container:focus::-webkit-scrollbar-thumb,input:focus::-webkit-scrollbar-thumb,select:focus::-webkit-scrollbar-thumb,textarea:focus::-webkit-scrollbar-thumb,.tinymce-wrapper:focus-within::-webkit-scrollbar-thumb,.code-editor:focus-within::-webkit-scrollbar-thumb,.select .selected-container:focus-within::-webkit-scrollbar-thumb,input:focus-within::-webkit-scrollbar-thumb,select:focus-within::-webkit-scrollbar-thumb,textarea:focus-within::-webkit-scrollbar-thumb{background-color:var(--baseAlt3Color);border-radius:15px;border:2px solid transparent;background-clip:padding-box}.tinymce-wrapper:focus::-webkit-scrollbar-thumb:hover,.code-editor:focus::-webkit-scrollbar-thumb:hover,.select .selected-container:focus::-webkit-scrollbar-thumb:hover,input:focus::-webkit-scrollbar-thumb:hover,select:focus::-webkit-scrollbar-thumb:hover,textarea:focus::-webkit-scrollbar-thumb:hover,.tinymce-wrapper:focus::-webkit-scrollbar-thumb:active,.code-editor:focus::-webkit-scrollbar-thumb:active,.select .selected-container:focus::-webkit-scrollbar-thumb:active,input:focus::-webkit-scrollbar-thumb:active,select:focus::-webkit-scrollbar-thumb:active,textarea:focus::-webkit-scrollbar-thumb:active,.tinymce-wrapper:focus-within::-webkit-scrollbar-thumb:hover,.code-editor:focus-within::-webkit-scrollbar-thumb:hover,.select .selected-container:focus-within::-webkit-scrollbar-thumb:hover,input:focus-within::-webkit-scrollbar-thumb:hover,select:focus-within::-webkit-scrollbar-thumb:hover,textarea:focus-within::-webkit-scrollbar-thumb:hover,.tinymce-wrapper:focus-within::-webkit-scrollbar-thumb:active,.code-editor:focus-within::-webkit-scrollbar-thumb:active,.select .selected-container:focus-within::-webkit-scrollbar-thumb:active,input:focus-within::-webkit-scrollbar-thumb:active,select:focus-within::-webkit-scrollbar-thumb:active,textarea:focus-within::-webkit-scrollbar-thumb:active{background-color:var(--baseAlt4Color)}}[readonly].tinymce-wrapper,[readonly].code-editor,.select [readonly].selected-container,input[readonly],select[readonly],textarea[readonly],.readonly.tinymce-wrapper,.readonly.code-editor,.select .readonly.selected-container,input.readonly,select.readonly,textarea.readonly{cursor:default;color:var(--txtHintColor)}[disabled].tinymce-wrapper,[disabled].code-editor,.select [disabled].selected-container,input[disabled],select[disabled],textarea[disabled],.disabled.tinymce-wrapper,.disabled.code-editor,.select .disabled.selected-container,input.disabled,select.disabled,textarea.disabled{cursor:default;color:var(--txtDisabledColor)}.txt-mono.tinymce-wrapper,.txt-mono.code-editor,.select .txt-mono.selected-container,input.txt-mono,select.txt-mono,textarea.txt-mono{line-height:var(--smLineHeight)}.code.tinymce-wrapper,.code.code-editor,.select .code.selected-container,input.code,select.code,textarea.code{font-size:15px;line-height:1.379rem;font-family:var(--monospaceFontFamily)}input{height:var(--inputHeight)}input:-webkit-autofill{-webkit-text-fill-color:var(--txtPrimaryColor);-webkit-box-shadow:inset 0 0 0 50px var(--baseAlt1Color)}.form-field:focus-within input:-webkit-autofill,input:-webkit-autofill:focus{-webkit-box-shadow:inset 0 0 0 50px var(--baseAlt2Color)}input[type=file]{padding:9px}input[type=checkbox],input[type=radio]{width:auto;height:auto;display:inline}input[type=number]{-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}textarea{min-height:80px;resize:vertical}select{padding-left:8px}.form-field{--hPadding: 15px;position:relative;display:block;width:100%;margin-bottom:var(--baseSpacing)}.form-field .tinymce-wrapper,.form-field .code-editor,.form-field .select .selected-container,.select .form-field .selected-container,.form-field input,.form-field select,.form-field textarea{z-index:0;padding-left:var(--hPadding);padding-right:var(--hPadding)}.form-field select{padding-left:8px}.form-field label{display:flex;width:100%;column-gap:5px;align-items:center;user-select:none;font-weight:600;color:var(--txtHintColor);font-size:var(--smFontSize);line-height:1;padding-top:12px;padding-bottom:3px;padding-left:var(--hPadding);padding-right:var(--hPadding);border:0;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius)}.form-field label~.tinymce-wrapper,.form-field label~.code-editor,.form-field .select label~.selected-container,.select .form-field label~.selected-container,.form-field label~input,.form-field label~select,.form-field label~textarea{border-top:0;padding-top:2px;padding-bottom:8px;border-top-left-radius:0;border-top-right-radius:0}.form-field label i{font-size:.96rem;line-height:1;margin-top:-1px;margin-bottom:-1px}.form-field label i:before{margin:0}.form-field .tinymce-wrapper,.form-field .code-editor,.form-field .select .selected-container,.select .form-field .selected-container,.form-field input,.form-field select,.form-field textarea,.form-field label{background:var(--baseAlt1Color);transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed),box-shadow var(--baseAnimationSpeed)}.form-field:focus-within .tinymce-wrapper,.form-field:focus-within .code-editor,.form-field:focus-within .select .selected-container,.select .form-field:focus-within .selected-container,.form-field:focus-within input,.form-field:focus-within select,.form-field:focus-within textarea,.form-field:focus-within label{background:var(--baseAlt2Color)}.form-field:focus-within label{color:var(--txtPrimaryColor)}.form-field .form-field-addon{position:absolute;display:inline-flex;align-items:center;z-index:1;top:0px;right:var(--hPadding);min-height:var(--inputHeight);color:var(--txtHintColor)}.form-field .form-field-addon .btn{margin-right:-5px}.form-field .form-field-addon~.tinymce-wrapper,.form-field .form-field-addon~.code-editor,.form-field .select .form-field-addon~.selected-container,.select .form-field .form-field-addon~.selected-container,.form-field .form-field-addon~input,.form-field .form-field-addon~select,.form-field .form-field-addon~textarea{padding-right:35px}.form-field label~.form-field-addon{min-height:calc(26px + var(--inputHeight))}.form-field .help-block{margin-top:8px;font-size:var(--smFontSize);line-height:var(--smLineHeight);color:var(--txtHintColor);word-break:break-word}.form-field .help-block pre{white-space:pre-wrap}.form-field .help-block-error{color:var(--dangerColor)}.form-field.error>label,.form-field.invalid>label{color:var(--dangerColor)}.form-field.invalid label,.form-field.invalid .tinymce-wrapper,.form-field.invalid .code-editor,.form-field.invalid .select .selected-container,.select .form-field.invalid .selected-container,.form-field.invalid input,.form-field.invalid select,.form-field.invalid textarea{background:var(--dangerAltColor)}.form-field.required:not(.form-field-toggle)>label:after{content:"*";color:var(--dangerColor);margin-top:-2px;margin-left:-2px}.form-field.readonly label,.form-field.readonly .tinymce-wrapper,.form-field.readonly .code-editor,.form-field.readonly .select .selected-container,.select .form-field.readonly .selected-container,.form-field.readonly input,.form-field.readonly select,.form-field.readonly textarea,.form-field.disabled label,.form-field.disabled .tinymce-wrapper,.form-field.disabled .code-editor,.form-field.disabled .select .selected-container,.select .form-field.disabled .selected-container,.form-field.disabled input,.form-field.disabled select,.form-field.disabled textarea{background:var(--baseAlt1Color)}.form-field.readonly>label,.form-field.disabled>label{color:var(--txtHintColor)}.form-field.readonly.required>label:after,.form-field.disabled.required>label:after{opacity:.5}.form-field.disabled>label{color:var(--txtDisabledColor)}.form-field input[type=radio],.form-field input[type=checkbox]{position:absolute;z-index:-1;left:0;width:0;height:0;min-height:0;min-width:0;border:0;background:none;user-select:none;pointer-events:none;box-shadow:none;opacity:0}.form-field input[type=radio]~label,.form-field input[type=checkbox]~label{border:0;margin:0;outline:0;background:none;display:inline-flex;vertical-align:top;align-items:center;width:auto;column-gap:5px;user-select:none;padding:0 0 0 27px;line-height:20px;min-height:20px;font-weight:400;font-size:var(--baseFontSize);text-transform:none;color:var(--txtPrimaryColor)}.form-field input[type=radio]~label:before,.form-field input[type=checkbox]~label:before{content:"";display:inline-block;vertical-align:top;position:absolute;z-index:0;left:0;top:0;width:20px;height:20px;line-height:16px;font-family:var(--iconFontFamily);font-size:1.2rem;text-align:center;color:var(--baseColor);cursor:pointer;background:var(--baseColor);border-radius:var(--baseRadius);border:2px solid var(--baseAlt3Color);transition:transform var(--baseAnimationSpeed),border-color var(--baseAnimationSpeed),color var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.form-field input[type=radio]~label:active:before,.form-field input[type=checkbox]~label:active:before{transform:scale(.9)}.form-field input[type=radio]:focus~label:before,.form-field input[type=radio]~label:hover:before,.form-field input[type=checkbox]:focus~label:before,.form-field input[type=checkbox]~label:hover:before{border-color:var(--baseAlt4Color)}.form-field input[type=radio]:checked~label:before,.form-field input[type=checkbox]:checked~label:before{content:"\eb7a";box-shadow:none;mix-blend-mode:unset;background:var(--successColor);border-color:var(--successColor)}.form-field input[type=radio]:disabled~label,.form-field input[type=checkbox]:disabled~label{pointer-events:none;cursor:not-allowed;color:var(--txtDisabledColor)}.form-field input[type=radio]:disabled~label:before,.form-field input[type=checkbox]:disabled~label:before{opacity:.5}.form-field input[type=radio]~label:before{border-radius:50%;font-size:1rem}.form-field .form-field-block{position:relative;margin:0 0 var(--xsSpacing)}.form-field .form-field-block:last-child{margin-bottom:0}.form-field.form-field-toggle input[type=radio]~label,.form-field.form-field-toggle input[type=checkbox]~label{position:relative}.form-field.form-field-toggle input[type=radio]~label:before,.form-field.form-field-toggle input[type=checkbox]~label:before{content:"";border:0;box-shadow:none;background:var(--baseAlt3Color);transition:background var(--activeAnimationSpeed)}.form-field.form-field-toggle input[type=radio]~label:after,.form-field.form-field-toggle input[type=checkbox]~label:after{content:"";position:absolute;z-index:1;cursor:pointer;background:var(--baseColor);transition:left var(--activeAnimationSpeed),transform var(--activeAnimationSpeed),background var(--activeAnimationSpeed);box-shadow:0 2px 5px 0 var(--shadowColor)}.form-field.form-field-toggle input[type=radio]~label:active:before,.form-field.form-field-toggle input[type=checkbox]~label:active:before{transform:none}.form-field.form-field-toggle input[type=radio]~label:active:after,.form-field.form-field-toggle input[type=checkbox]~label:active:after{transform:scale(.9)}.form-field.form-field-toggle input[type=radio]:focus-visible~label:before,.form-field.form-field-toggle input[type=checkbox]:focus-visible~label:before{box-shadow:0 0 0 2px var(--baseAlt2Color)}.form-field.form-field-toggle input[type=radio]~label:hover:before,.form-field.form-field-toggle input[type=checkbox]~label:hover:before{background:var(--baseAlt4Color)}.form-field.form-field-toggle input[type=radio]:checked~label:before,.form-field.form-field-toggle input[type=checkbox]:checked~label:before{background:var(--successColor)}.form-field.form-field-toggle input[type=radio]:checked~label:after,.form-field.form-field-toggle input[type=checkbox]:checked~label:after{background:var(--baseColor)}.form-field.form-field-toggle input[type=radio]~label,.form-field.form-field-toggle input[type=checkbox]~label{min-height:24px;padding-left:47px}.form-field.form-field-toggle input[type=radio]~label:empty,.form-field.form-field-toggle input[type=checkbox]~label:empty{padding-left:40px}.form-field.form-field-toggle input[type=radio]~label:before,.form-field.form-field-toggle input[type=checkbox]~label:before{width:40px;height:24px;border-radius:24px}.form-field.form-field-toggle input[type=radio]~label:after,.form-field.form-field-toggle input[type=checkbox]~label:after{top:4px;left:4px;width:16px;height:16px;border-radius:16px}.form-field.form-field-toggle input[type=radio]:checked~label:after,.form-field.form-field-toggle input[type=checkbox]:checked~label:after{left:20px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label{min-height:20px;padding-left:39px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label:empty,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label:empty{padding-left:32px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label:before,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label:before{width:32px;height:20px;border-radius:20px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label:after,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label:after{top:4px;left:4px;width:12px;height:12px;border-radius:12px}.form-field.form-field-toggle.form-field-sm input[type=radio]:checked~label:after,.form-field.form-field-toggle.form-field-sm input[type=checkbox]:checked~label:after{left:16px}.form-field-group{display:flex;width:100%;align-items:center}.form-field-group>.form-field{flex-grow:1;border-left:1px solid var(--baseAlt2Color)}.form-field-group>.form-field:first-child{border-left:0}.form-field-group>.form-field:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.form-field-group>.form-field:not(:first-child)>label{border-top-left-radius:0}.form-field-group>.form-field:not(:first-child)>.tinymce-wrapper,.form-field-group>.form-field:not(:first-child)>.code-editor,.select .form-field-group>.form-field:not(:first-child)>.selected-container,.form-field-group>.form-field:not(:first-child)>input,.form-field-group>.form-field:not(:first-child)>select,.form-field-group>.form-field:not(:first-child)>textarea,.form-field-group>.form-field:not(:first-child)>.select .selected-container{border-bottom-left-radius:0}.form-field-group>.form-field:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.form-field-group>.form-field:not(:last-child)>label{border-top-right-radius:0}.form-field-group>.form-field:not(:last-child)>.tinymce-wrapper,.form-field-group>.form-field:not(:last-child)>.code-editor,.select .form-field-group>.form-field:not(:last-child)>.selected-container,.form-field-group>.form-field:not(:last-child)>input,.form-field-group>.form-field:not(:last-child)>select,.form-field-group>.form-field:not(:last-child)>textarea,.form-field-group>.form-field:not(:last-child)>.select .selected-container{border-bottom-right-radius:0}.form-field-group .form-field.col-12{width:100%}.form-field-group .form-field.col-11{width:91.6666666667%}.form-field-group .form-field.col-10{width:83.3333333333%}.form-field-group .form-field.col-9{width:75%}.form-field-group .form-field.col-8{width:66.6666666667%}.form-field-group .form-field.col-7{width:58.3333333333%}.form-field-group .form-field.col-6{width:50%}.form-field-group .form-field.col-5{width:41.6666666667%}.form-field-group .form-field.col-4{width:33.3333333333%}.form-field-group .form-field.col-3{width:25%}.form-field-group .form-field.col-2{width:16.6666666667%}.form-field-group .form-field.col-1{width:8.3333333333%}.select{position:relative;display:block;outline:0}.select .option{user-select:none;column-gap:5px}.select .option .icon{min-width:20px;text-align:center;line-height:inherit}.select .option .icon i{vertical-align:middle;line-height:inherit}.select .txt-placeholder{color:var(--txtHintColor)}label~.select .selected-container{border-top:0}.select .selected-container{position:relative;display:flex;flex-wrap:wrap;width:100%;align-items:center;padding-top:0;padding-bottom:0;padding-right:35px!important;user-select:none}.select .selected-container:after{content:"\ea4d";position:absolute;right:5px;top:50%;width:20px;height:20px;line-height:20px;text-align:center;margin-top:-10px;display:inline-block;vertical-align:top;font-size:1rem;font-family:var(--iconFontFamily);align-self:flex-end;color:var(--txtHintColor);transition:color var(--baseAnimationSpeed),transform var(--baseAnimationSpeed)}.select .selected-container:active,.select .selected-container.active{border-bottom-left-radius:0;border-bottom-right-radius:0}.select .selected-container:active:after,.select .selected-container.active:after{color:var(--txtPrimaryColor);transform:rotate(180deg)}.select .selected-container .option{display:flex;width:100%;align-items:center;max-width:100%;user-select:text}.select .selected-container .clear{margin-left:auto;cursor:pointer;color:var(--txtHintColor);transition:color var(--baseAnimationSpeed)}.select .selected-container .clear i{display:inline-block;vertical-align:middle;line-height:1}.select .selected-container .clear:hover{color:var(--txtPrimaryColor)}.select.multiple .selected-container{display:flex;align-items:center;padding-left:2px;row-gap:3px;column-gap:4px}.select.multiple .selected-container .txt-placeholder{margin-left:5px}.select.multiple .selected-container .option{display:inline-flex;width:auto;padding:3px 5px;line-height:1;border-radius:var(--baseRadius);background:var(--baseColor)}.select:not(.multiple) .selected-container .label{margin-left:-2px}.select:not(.multiple) .selected-container .option .txt{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:100%;line-height:normal}.select:not(.disabled) .selected-container:hover{cursor:pointer}.select.disabled{color:var(--txtDisabledColor);pointer-events:none}.select.disabled .txt-placeholder,.select.disabled .selected-container{color:inherit}.select.disabled .selected-container .link-hint{pointer-events:auto}.select.disabled .selected-container *:not(.link-hint){color:inherit!important}.select.disabled .selected-container:after,.select.disabled .selected-container .clear{display:none}.select.disabled .selected-container:hover{cursor:inherit}.select .txt-missing{color:var(--txtHintColor);padding:5px 12px;margin:0}.select .options-dropdown{max-height:none;border:0;overflow:auto;border-top-left-radius:0;border-top-right-radius:0;margin-top:-2px;box-shadow:0 2px 5px 0 var(--shadowColor),inset 0 0 0 2px var(--baseAlt2Color)}.select .options-dropdown .input-group:focus-within{box-shadow:none}.select .options-dropdown .form-field.options-search{margin:0 0 5px;padding:0 0 2px;color:var(--txtHintColor);border-bottom:1px solid var(--baseAlt2Color)}.select .options-dropdown .form-field.options-search .input-group{border-radius:0;padding:0 0 0 10px;margin:0;background:none;column-gap:0;border:0}.select .options-dropdown .form-field.options-search input{border:0;padding-left:9px;padding-right:9px;background:none}.select .options-dropdown .options-list{overflow:auto;max-height:240px;width:auto;margin-left:0;margin-right:-5px;padding-right:5px}.select .options-list:not(:empty)~[slot=afterOptions]:not(:empty){margin:5px -5px -5px}.select .options-list:not(:empty)~[slot=afterOptions]:not(:empty) .btn-block{border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:var(--baseRadius);border-bottom-right-radius:var(--baseRadius)}label~.select .selected-container{padding-bottom:4px;border-top-left-radius:0;border-top-right-radius:0}label~.select.multiple .selected-container{padding-top:3px;padding-bottom:3px;padding-left:10px}.select.block-options.multiple .selected-container .option{width:100%;box-shadow:0 2px 5px 0 var(--shadowColor)}.field-type-select .options-dropdown{padding:2px 1px 1px 2px}.field-type-select .options-dropdown .form-field.options-search{margin:0}.field-type-select .options-dropdown .options-list{max-height:490px;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;padding:0}.field-type-select .options-dropdown .dropdown-item{width:50%;margin:0;padding-left:12px;border-radius:0;border-bottom:1px solid var(--baseAlt2Color);border-right:1px solid var(--baseAlt2Color)}.field-type-select .options-dropdown .dropdown-item.selected{background:var(--baseAlt1Color)}.form-field-list label{padding-bottom:10px}.form-field-list .list{background:var(--baseAlt1Color);border:0;border-radius:0;border-bottom-left-radius:var(--baseRadius);border-bottom-right-radius:var(--baseRadius)}.form-field-list .list .list-item{border-top:1px solid var(--baseAlt2Color)}.form-field-list .list .list-item.selected{background:var(--baseAlt2Color)}.form-field-list .list .list-item.handle:not(.disabled):hover,.form-field-list .list .list-item.handle:not(.disabled):focus-visible{background:var(--baseAlt2Color)}.form-field-list .list .list-item.handle:not(.disabled):active{background:var(--baseAlt3Color)}.form-field-list:focus-within .list,.form-field-list:focus-within label{background:var(--baseAlt1Color)}.code-editor{display:flex;flex-direction:column;width:100%}.form-field label~.code-editor{padding-bottom:6px;padding-top:4px}.code-editor .cm-editor{flex-grow:1;border:0!important;outline:none!important}.code-editor .cm-editor .cm-line{padding-left:0;padding-right:0}.code-editor .cm-editor .cm-tooltip-autocomplete{box-shadow:0 2px 5px 0 var(--shadowColor);border-radius:var(--baseRadius);background:var(--baseColor);border:0;z-index:9999;padding:0 3px;font-size:.92rem}.code-editor .cm-editor .cm-tooltip-autocomplete ul{margin:0;border-radius:inherit}.code-editor .cm-editor .cm-tooltip-autocomplete ul>:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.code-editor .cm-editor .cm-tooltip-autocomplete ul>:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.code-editor .cm-editor .cm-tooltip-autocomplete ul li[aria-selected]{background:var(--infoColor)}.code-editor .cm-editor .cm-scroller{flex-grow:1;outline:0!important;font-family:var(--monospaceFontFamily);font-size:var(--baseFontSize);line-height:var(--baseLineHeight)}.code-editor .cm-editor .cm-cursorLayer .cm-cursor{margin-left:0!important}.code-editor .cm-editor .cm-placeholder{color:var(--txtDisabledColor);font-family:var(--monospaceFontFamily);font-size:var(--baseFontSize);line-height:var(--baseLineHeight)}.code-editor .cm-editor .cm-selectionMatch{background:var(--infoAltColor)}.code-editor .cm-editor.cm-focused .cm-matchingBracket{background-color:#328c821a}.code-editor .\37c f{color:var(--dangerColor)}.tinymce-wrapper{min-height:277px}.tinymce-wrapper .tox-tinymce{border-radius:var(--baseRadius);border:0}.form-field label~.tinymce-wrapper{padding:5px 2px 2px}body .tox .tox-tbtn{height:30px}body .tox .tox-tbtn svg{transform:scale(.85)}body .tox .tox-tbtn:not(.tox-tbtn--select){width:30px}body .tox .tox-button,body .tox .tox-button--secondary{font-size:var(--smFontSize)}body .tox .tox-toolbar-overlord{box-shadow:0 2px 5px 0 var(--shadowColor)}body .tox .tox-listboxfield .tox-listbox--select,body .tox .tox-textarea,body .tox .tox-textfield,body .tox .tox-toolbar-textfield{padding:3px 5px}body .tox-swatch:not(.tox-swatch--remove):not(.tox-collection__item--enabled) svg{display:none}.main-menu{--menuItemSize: 45px;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:var(--smSpacing);font-size:var(--xlFontSize);color:var(--txtPrimaryColor)}.main-menu i{font-size:24px;line-height:1}.main-menu .menu-item{position:relative;outline:0;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;text-align:center;justify-content:center;user-select:none;color:inherit;min-width:var(--menuItemSize);min-height:var(--menuItemSize);border:2px solid transparent;border-radius:var(--lgRadius);transition:background var(--baseAnimationSpeed),border var(--baseAnimationSpeed)}.main-menu .menu-item:focus-visible,.main-menu .menu-item:hover{background:var(--baseAlt1Color)}.main-menu .menu-item:active{background:var(--baseAlt2Color);transition-duration:var(--activeAnimationSpeed)}.main-menu .menu-item.active,.main-menu .menu-item.current-route{background:var(--baseColor);border-color:var(--primaryColor)}.app-sidebar{position:relative;z-index:1;display:flex;flex-grow:0;flex-shrink:0;flex-direction:column;align-items:center;width:var(--appSidebarWidth);padding:var(--smSpacing) 0px var(--smSpacing);background:var(--baseColor);border-right:1px solid var(--baseAlt2Color)}.app-sidebar .main-menu{flex-grow:1;justify-content:flex-start;overflow-x:hidden;overflow-y:auto;overflow-y:overlay;margin-top:34px;margin-bottom:var(--baseSpacing)}.app-layout{display:flex;width:100%;height:100vh}.app-layout .app-body{flex-grow:1;min-width:0;height:100%;display:flex;align-items:stretch}.app-layout .app-sidebar~.app-body{min-width:650px}.page-sidebar{--sidebarListItemMargin: 10px;z-index:0;display:flex;flex-direction:column;width:var(--pageSidebarWidth);flex-shrink:0;flex-grow:0;overflow-x:hidden;overflow-y:auto;background:var(--baseColor);padding:calc(var(--baseSpacing) - 5px) 0 var(--smSpacing);border-right:1px solid var(--baseAlt2Color)}.page-sidebar>*{padding:0 var(--smSpacing)}.page-sidebar .sidebar-content{overflow-x:hidden;overflow-y:auto;overflow-y:overlay}.page-sidebar .sidebar-content>:first-child{margin-top:0}.page-sidebar .sidebar-content>:last-child{margin-bottom:0}.page-sidebar .sidebar-footer{margin-top:var(--smSpacing)}.page-sidebar .search{display:flex;align-items:center;width:auto;column-gap:5px;margin:0 0 var(--xsSpacing);color:var(--txtHintColor);opacity:.7;transition:opacity var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.page-sidebar .search input{border:0;background:var(--baseColor);transition:box-shadow var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.page-sidebar .search .btn-clear{margin-right:-8px}.page-sidebar .search:hover,.page-sidebar .search:focus-within,.page-sidebar .search.active{opacity:1;color:var(--txtPrimaryColor)}.page-sidebar .search:hover input,.page-sidebar .search:focus-within input,.page-sidebar .search.active input{background:var(--baseAlt2Color)}.page-sidebar .sidebar-title{display:flex;align-items:center;gap:5px;width:100%;margin:var(--baseSpacing) 0 var(--xsSpacing);font-weight:600;font-size:1rem;line-height:var(--smLineHeight);color:var(--txtHintColor)}.page-sidebar .sidebar-title .label{font-weight:400}.page-sidebar .sidebar-list-item{cursor:pointer;outline:0;text-decoration:none;position:relative;display:flex;width:100%;align-items:center;column-gap:10px;margin:var(--sidebarListItemMargin) 0;padding:3px 10px;font-size:var(--xlFontSize);min-height:var(--btnHeight);min-width:0;color:var(--txtHintColor);border-radius:var(--baseRadius);user-select:none;transition:background var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.page-sidebar .sidebar-list-item i{font-size:18px}.page-sidebar .sidebar-list-item .txt{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.page-sidebar .sidebar-list-item:focus-visible,.page-sidebar .sidebar-list-item:hover,.page-sidebar .sidebar-list-item:active,.page-sidebar .sidebar-list-item.active{color:var(--txtPrimaryColor);background:var(--baseAlt1Color)}.page-sidebar .sidebar-list-item:active{background:var(--baseAlt2Color);transition-duration:var(--activeAnimationSpeed)}.page-sidebar .sidebar-content-compact .sidebar-list-item{--sidebarListItemMargin: 5px}@media screen and (max-height: 600px){.page-sidebar{--sidebarListItemMargin: 5px}}@media screen and (max-width: 1100px){.page-sidebar{--pageSidebarWidth: 190px}.page-sidebar>*{padding-left:10px;padding-right:10px}}.page-header{display:flex;align-items:center;width:100%;min-height:var(--btnHeight);gap:var(--xsSpacing);margin:0 0 var(--baseSpacing)}.page-header .btns-group{margin-left:auto;justify-content:end}@media screen and (max-width: 1050px){.page-header{flex-wrap:wrap}.page-header .btns-group{width:100%}.page-header .btns-group .btn{flex-grow:1;flex-basis:0}}.page-header-wrapper{background:var(--baseColor);width:auto;margin-top:calc(-1 * (var(--baseSpacing) - 5px));margin-left:calc(-1 * var(--baseSpacing));margin-right:calc(-1 * var(--baseSpacing));margin-bottom:var(--baseSpacing);padding:calc(var(--baseSpacing) - 5px) var(--baseSpacing);border-bottom:1px solid var(--baseAlt2Color)}.breadcrumbs{display:flex;align-items:center;gap:30px;color:var(--txtDisabledColor)}.breadcrumbs .breadcrumb-item{position:relative;margin:0;line-height:1;font-weight:400}.breadcrumbs .breadcrumb-item:after{content:"/";position:absolute;right:-20px;top:0;width:10px;text-align:center;pointer-events:none;opacity:.4}.breadcrumbs .breadcrumb-item:last-child{word-break:break-word;color:var(--txtPrimaryColor)}.breadcrumbs .breadcrumb-item:last-child:after{content:none;display:none}.breadcrumbs a{text-decoration:none;color:inherit;transition:color var(--baseAnimationSpeed)}.breadcrumbs a:hover{color:var(--txtPrimaryColor)}.page-content{position:relative;display:block;width:100%;flex-grow:1;padding:calc(var(--baseSpacing) - 5px) var(--baseSpacing)}.page-footer{display:flex;gap:5px;align-items:center;justify-content:right;text-align:right;padding:0px var(--baseSpacing) 15px;color:var(--txtDisabledColor);font-size:var(--xsFontSize);line-height:var(--smLineHeight)}.page-footer i{font-size:1.2em}.page-footer a{color:inherit;text-decoration:none;transition:color var(--baseAnimationSpeed)}.page-footer a:focus-visible,.page-footer a:hover,.page-footer a:active{color:var(--txtPrimaryColor)}.page-wrapper{display:flex;flex-direction:column;flex-grow:1;width:100%;overflow-x:hidden;overflow-y:auto;overflow-y:overlay}.overlay-active .page-wrapper{overflow-y:hidden}.page-wrapper.full-page{background:var(--baseColor)}.page-wrapper.center-content .page-content{display:flex;align-items:center}@keyframes tabChange{0%{opacity:.5}to{opacity:1}}.tabs-header{display:flex;align-items:stretch;justify-content:flex-start;column-gap:10px;width:100%;min-height:50px;user-select:none;margin:0 0 var(--baseSpacing);border-bottom:1px solid var(--baseAlt2Color)}.tabs-header .tab-item{position:relative;outline:0;border:0;background:none;display:inline-flex;align-items:center;justify-content:center;min-width:70px;gap:5px;padding:10px;margin:0;font-size:var(--lgFontSize);line-height:var(--baseLineHeight);font-family:var(--baseFontFamily);color:var(--txtHintColor);text-align:center;text-decoration:none;cursor:pointer;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius);transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.tabs-header .tab-item:after{content:"";position:absolute;display:block;left:0;bottom:-1px;width:100%;height:2px;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius);background:var(--primaryColor);transform:rotateY(90deg);transition:transform .2s}.tabs-header .tab-item .txt,.tabs-header .tab-item i{display:inline-block;vertical-align:top}.tabs-header .tab-item:hover,.tabs-header .tab-item:focus-visible,.tabs-header .tab-item:active{color:var(--txtPrimaryColor)}.tabs-header .tab-item:focus-visible,.tabs-header .tab-item:active{transition-duration:var(--activeAnimationSpeed);background:var(--baseAlt2Color)}.tabs-header .tab-item.active{color:var(--txtPrimaryColor)}.tabs-header .tab-item.active:after{transform:rotateY(0)}.tabs-header .tab-item.disabled{pointer-events:none;color:var(--txtDisabledColor)}.tabs-header .tab-item.disabled:after{display:none}.tabs-header.right{justify-content:flex-end}.tabs-header.center{justify-content:center}.tabs-header.stretched .tab-item{flex-grow:1;flex-basis:0}.tabs-header.compact{min-height:30px;margin-bottom:var(--smSpacing)}.tabs-content{position:relative}.tabs-content>.tab-item{width:100%;display:none}.tabs-content>.tab-item.active{display:block;opacity:0;animation:tabChange .2s forwards}.tabs-content>.tab-item>:first-child{margin-top:0}.tabs-content>.tab-item>:last-child{margin-bottom:0}.tabs{position:relative}.accordion{outline:0;position:relative;border-radius:var(--baseRadius);background:var(--baseColor);border:1px solid var(--baseAlt2Color);transition:box-shadow var(--baseAnimationSpeed),margin var(--baseAnimationSpeed)}.accordion .accordion-header{outline:0;position:relative;display:flex;min-height:52px;align-items:center;row-gap:10px;column-gap:var(--smSpacing);padding:12px 20px 10px;width:100%;user-select:none;color:var(--txtPrimaryColor);border-radius:inherit;transition:background var(--baseAnimationSpeed),box-shadow var(--baseAnimationSpeed)}.accordion .accordion-header .icon{width:18px;text-align:center}.accordion .accordion-header .icon i{display:inline-block;vertical-align:top;font-size:1.1rem}.accordion .accordion-header.interactive{padding-right:50px;cursor:pointer}.accordion .accordion-header.interactive:after{content:"\ea4e";position:absolute;right:15px;top:50%;margin-top:-12.5px;width:25px;height:25px;line-height:25px;color:var(--txtHintColor);font-family:var(--iconFontFamily);font-size:1.3em;text-align:center;transition:color var(--baseAnimationSpeed)}.accordion .accordion-header:hover:after,.accordion .accordion-header.focus:after,.accordion .accordion-header:focus-visible:after{color:var(--txtPrimaryColor)}.accordion .accordion-header:active{transition-duration:var(--activeAnimationSpeed)}.accordion .accordion-content{padding:20px}.accordion:hover,.accordion:focus-visible,.accordion.active{z-index:9}.accordion:hover .accordion-header.interactive,.accordion:focus-visible .accordion-header.interactive,.accordion.active .accordion-header.interactive{background:var(--baseAlt1Color)}.accordion.drag-over .accordion-header{background:var(--bodyColor)}.accordion.active{box-shadow:0 2px 5px 0 var(--shadowColor)}.accordion.active .accordion-header{position:relative;top:0;z-index:9;box-shadow:0 0 0 1px var(--baseAlt2Color);border-bottom-left-radius:0;border-bottom-right-radius:0;background:var(--bodyColor)}.accordion.active .accordion-header.interactive{background:var(--bodyColor)}.accordion.active .accordion-header.interactive:after{color:inherit;content:"\ea78"}.accordion.disabled{z-index:0;border-color:var(--baseAlt1Color)}.accordion.disabled .accordion-header{color:var(--txtDisabledColor)}.accordions .accordion{border-radius:0;margin:-1px 0 0}.accordions>.accordion.active,.accordions>.accordion-wrapper>.accordion.active{margin:var(--smSpacing) 0;border-radius:var(--baseRadius)}.accordions>.accordion:first-child,.accordions>.accordion-wrapper:first-child>.accordion{margin-top:0;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius)}.accordions>.accordion:last-child,.accordions>.accordion-wrapper:last-child>.accordion{margin-bottom:0;border-bottom-left-radius:var(--baseRadius);border-bottom-right-radius:var(--baseRadius)}table{--entranceAnimationSpeed: .3s;border-collapse:separate;min-width:100%;transition:opacity var(--baseAnimationSpeed)}table .form-field{margin:0;line-height:1;text-align:left}table .txt-ellipsis{flex-shrink:0}table td,table th{outline:0;vertical-align:middle;position:relative;text-align:left;padding:10px;border-bottom:1px solid var(--baseAlt2Color)}table td:first-child,table th:first-child{padding-left:20px}table td:last-child,table th:last-child{padding-right:20px}table th{color:var(--txtHintColor);font-weight:600;font-size:1rem;user-select:none;height:50px;line-height:var(--smLineHeight)}table th i{font-size:inherit}table td{height:60px;word-break:break-word}table .min-width{width:1%!important;white-space:nowrap}table .nowrap{white-space:nowrap}table .col-sort{cursor:pointer;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius);padding-right:30px;transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}table .col-sort:after{content:"\ea4c";position:absolute;right:10px;top:50%;margin-top:-12.5px;line-height:25px;height:25px;font-family:var(--iconFontFamily);font-weight:400;color:var(--txtHintColor);opacity:0;transition:color var(--baseAnimationSpeed),opacity var(--baseAnimationSpeed)}table .col-sort.sort-desc:after{content:"\ea4c"}table .col-sort.sort-asc:after{content:"\ea76"}table .col-sort.sort-active:after{opacity:1}table .col-sort:hover,table .col-sort:focus-visible{background:var(--baseAlt1Color)}table .col-sort:hover:after,table .col-sort:focus-visible:after{opacity:1}table .col-sort:active{transition-duration:var(--activeAnimationSpeed);background:var(--baseAlt2Color)}table .col-sort.col-sort-disabled{cursor:default;background:none}table .col-sort.col-sort-disabled:after{display:none}table .col-header-content{display:inline-flex;align-items:center;flex-wrap:nowrap;gap:5px}table .col-header-content .txt{max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}table .col-field-created,table .col-field-updated,table .col-type-action{width:1%!important;white-space:nowrap}table .col-type-action{white-space:nowrap;text-align:right;color:var(--txtHintColor)}table .col-type-action i{display:inline-block;vertical-align:top;transition:transform var(--baseAnimationSpeed)}table td.col-type-json{font-family:monospace;font-size:var(--smFontSize);line-height:var(--smLineHeight);max-width:300px}table .col-type-text{max-width:300px}table .col-type-select{min-width:150px}table .col-type-email{min-width:120px;white-space:nowrap}table .col-type-file{min-width:100px}table td.col-field-id,table td.col-field-username{width:0;white-space:nowrap}table tr{outline:0;background:var(--bodyColor);transition:background var(--baseAnimationSpeed)}table tr.row-handle{cursor:pointer;user-select:none}table tr.row-handle:focus-visible,table tr.row-handle:hover,table tr.row-handle:active{background:var(--baseAlt1Color)}table tr.row-handle:focus-visible .action-col,table tr.row-handle:hover .action-col,table tr.row-handle:active .action-col{color:var(--txtPrimaryColor)}table tr.row-handle:focus-visible .action-col i,table tr.row-handle:hover .action-col i,table tr.row-handle:active .action-col i{transform:translate(3px)}table tr.row-handle:active{transition-duration:var(--activeAnimationSpeed)}table.table-border{border:1px solid var(--baseAlt2Color);border-radius:var(--baseRadius)}table.table-border tr{background:var(--baseColor)}table.table-border td,table.table-border th{height:45px}table.table-border th{background:var(--baseAlt1Color)}table.table-border>:last-child>:last-child th,table.table-border>:last-child>:last-child td{border-bottom:0}table.table-border>tr:first-child>:first-child,table.table-border>:first-child>tr:first-child>:first-child{border-top-left-radius:var(--baseRadius)}table.table-border>tr:first-child>:last-child,table.table-border>:first-child>tr:first-child>:last-child{border-top-right-radius:var(--baseRadius)}table.table-border>tr:last-child>:first-child,table.table-border>:last-child>tr:last-child>:first-child{border-bottom-left-radius:var(--baseRadius)}table.table-border>tr:last-child>:last-child,table.table-border>:last-child>tr:last-child>:last-child{border-bottom-right-radius:var(--baseRadius)}table.table-compact td,table.table-compact th{height:auto}table.table-animate tr{animation:entranceTop var(--entranceAnimationSpeed)}table.table-loading{pointer-events:none;opacity:.7}.table-wrapper{width:auto;padding:0;max-width:calc(100% + 2 * var(--baseSpacing));margin-left:calc(var(--baseSpacing) * -1);margin-right:calc(var(--baseSpacing) * -1)}.table-wrapper .bulk-select-col{min-width:70px}.table-wrapper td,.table-wrapper th{position:relative}.table-wrapper td:first-child,.table-wrapper th:first-child{padding-left:calc(var(--baseSpacing) + 3px)}.table-wrapper td:last-child,.table-wrapper th:last-child{padding-right:calc(var(--baseSpacing) + 3px)}.table-wrapper .bulk-select-col,.table-wrapper .col-type-action{position:sticky;z-index:99;transition:box-shadow var(--baseAnimationSpeed)}.table-wrapper .bulk-select-col{left:0px}.table-wrapper .col-type-action{right:0}.table-wrapper .bulk-select-col,.table-wrapper .col-type-action{background:inherit}.table-wrapper th.bulk-select-col,.table-wrapper th.col-type-action{background:var(--bodyColor)}.table-wrapper.scrollable .bulk-select-col{box-shadow:3px 0 5px 0 var(--shadowColor)}.table-wrapper.scrollable .col-type-action{box-shadow:-3px 0 5px 0 var(--shadowColor)}.table-wrapper.scrollable.scroll-start .bulk-select-col,.table-wrapper.scrollable.scroll-end .col-type-action{box-shadow:none}.searchbar{--searchHeight: 44px;outline:0;display:flex;align-items:center;min-height:var(--searchHeight);width:100%;flex-grow:1;padding:5px 7px;margin:0;white-space:nowrap;color:var(--txtHintColor);background:var(--baseAlt1Color);border-radius:var(--btnHeight);transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed),box-shadow var(--baseAnimationSpeed)}.searchbar>:first-child{border-top-left-radius:var(--btnHeight);border-bottom-left-radius:var(--btnHeight)}.searchbar>:last-child{border-top-right-radius:var(--btnHeight);border-bottom-right-radius:var(--btnHeight)}.searchbar .btn{border-radius:var(--btnHeight)}.searchbar .code-editor,.searchbar input,.searchbar input:focus{font-size:var(--baseFontSize);font-family:var(--monospaceFontFamily);border:0;background:none;min-height:0;padding-top:0;padding-bottom:0}.searchbar label>i{line-height:inherit}.searchbar .search-options{flex-shrink:0;width:90px}.searchbar .search-options .selected-container{border-radius:inherit;background:none;padding-right:25px!important}.searchbar .search-options:not(:focus-within) .selected-container{color:var(--txtHintColor)}.searchbar:focus-within{color:var(--txtPrimaryColor);background:var(--baseAlt2Color)}.bulkbar{position:sticky;bottom:var(--baseSpacing);z-index:101;gap:10px;display:flex;justify-content:center;align-items:center;width:var(--smWrapperWidth);max-width:100%;margin:var(--smSpacing) auto;padding:10px var(--smSpacing);border-radius:var(--btnHeight);background:var(--baseColor);border:1px solid var(--baseAlt2Color);box-shadow:0 2px 5px 0 var(--shadowColor)}.flatpickr-calendar{opacity:0;display:none;text-align:center;visibility:hidden;padding:0;animation:none;direction:ltr;border:0;font-size:1rem;line-height:24px;position:absolute;width:298px;box-sizing:border-box;user-select:none;color:var(--txtPrimaryColor);background:var(--baseColor);border-radius:var(--baseRadius);box-shadow:0 2px 5px 0 var(--shadowColor),0 0 0 1px var(--baseAlt2Color)}.flatpickr-calendar input,.flatpickr-calendar select{box-shadow:none;min-height:0;height:var(--inputHeight);background:none;border-radius:var(--baseRadius);border:1px solid var(--baseAlt1Color)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:0;width:100%}.flatpickr-calendar.static{position:absolute;top:100%;margin-top:2px;margin-bottom:10px;width:100%}.flatpickr-calendar.static .flatpickr-days{width:100%}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 var(--baseAlt2Color),5px 0 0 var(--baseAlt2Color);box-shadow:-2px 0 0 var(--baseAlt2Color),5px 0 0 var(--baseAlt2Color)}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid var(--baseAlt2Color)}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:var(--baseColor)}.flatpickr-calendar.arrowTop:after{border-bottom-color:var(--baseColor)}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:var(--baseColor)}.flatpickr-calendar.arrowBottom:after{border-top-color:var(--baseColor)}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative}.flatpickr-months{display:flex;margin:0 0 4px}.flatpickr-months .flatpickr-month{background:transparent;color:var(--txtPrimaryColor);fill:var(--txtPrimaryColor);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:var(--txtPrimaryColor);fill:var(--txtPrimaryColor)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:var(--txtHintColor)}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:#00000080}.numInputWrapper:hover{background:var(--baseAlt2Color)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{line-height:inherit;color:inherit;position:absolute;width:75%;left:12.5%;padding:1px 0;line-height:1;display:flex;align-items:center;justify-content:center;text-align:center}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:var(--baseAlt2Color)}.flatpickr-current-month .numInputWrapper{display:inline-flex;align-items:center;justify-content:center;width:63px;margin:0 5px}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:var(--txtPrimaryColor)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:var(--txtPrimaryColor)}.flatpickr-current-month input.cur-year{background:transparent;box-sizing:border-box;color:inherit;cursor:text;margin:0;display:inline-block;font-size:inherit;font-family:inherit;line-height:inherit;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{color:var(--txtDisabledColor);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;line-height:inherit;outline:none;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:var(--baseAlt2Color)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{display:block;flex:1;margin:0;cursor:default;line-height:1;background:transparent;color:var(--txtHintColor);text-align:center;font-weight:bolder;font-size:var(--smFontSize)}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:100%;box-sizing:border-box;display:inline-block;display:flex;flex-wrap:wrap;transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 var(--baseAlt2Color);box-shadow:-1px 0 0 var(--baseAlt2Color)}.flatpickr-day{background:none;border:1px solid transparent;border-radius:var(--baseRadius);box-sizing:border-box;color:var(--txtPrimaryColor);cursor:pointer;font-weight:400;width:calc(14.2857143% - 2px);flex-basis:calc(14.2857143% - 2px);height:39px;margin:1px;display:inline-flex;align-items:center;justify-content:center;position:relative;text-align:center;flex-direction:column}.flatpickr-day.weekend,.flatpickr-day:nth-child(7n+6),.flatpickr-day:nth-child(7n+7){color:var(--dangerColor)}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:var(--baseAlt2Color);border-color:var(--baseAlt2Color)}.flatpickr-day.today{border-color:var(--baseColor)}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:var(--primaryColor);background:var(--primaryColor);color:var(--baseColor)}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:var(--primaryColor);-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:var(--primaryColor)}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 var(--primaryColor);box-shadow:-10px 0 0 var(--primaryColor)}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;box-shadow:-5px 0 0 var(--baseAlt2Color),5px 0 0 var(--baseAlt2Color)}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:var(--txtDisabledColor);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:var(--txtDisabledColor);background:var(--baseAlt2Color)}.flatpickr-day.week.selected{border-radius:0;box-shadow:-5px 0 0 var(--primaryColor),5px 0 0 var(--primaryColor)}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 var(--baseAlt2Color);box-shadow:1px 0 0 var(--baseAlt2Color)}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:var(--txtHintColor);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:flex;box-sizing:border-box;overflow:hidden;padding:5px}.flatpickr-rContainer{display:inline-block;padding:0;width:100%;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:var(--txtPrimaryColor)}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:var(--txtPrimaryColor)}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;box-shadow:none;border:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:var(--txtPrimaryColor);font-size:14px;position:relative;box-sizing:border-box;background:var(--baseColor);-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:var(--txtPrimaryColor);font-weight:700;width:2%;user-select:none;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:var(--baseAlt1Color)}.flatpickr-input[readonly]{cursor:pointer}@keyframes fpFadeInDown{0%{opacity:0;transform:translate3d(0,10px,0)}to{opacity:1;transform:translateZ(0)}}.flatpickr-hide-prev-next-month-days .flatpickr-calendar .prevMonthDay{visibility:hidden}.flatpickr-hide-prev-next-month-days .flatpickr-calendar .nextMonthDay,.flatpickr-inline-container .flatpickr-input{display:none}.flatpickr-inline-container .flatpickr-calendar{margin:0;box-shadow:none;border:1px solid var(--baseAlt2Color)}.docs-sidebar{--itemsSpacing: 10px;--itemsHeight: 40px;position:relative;min-width:180px;max-width:300px;height:100%;flex-shrink:0;overflow-x:hidden;overflow-y:auto;overflow-y:overlay;background:var(--bodyColor);padding:var(--smSpacing) var(--xsSpacing);border-right:1px solid var(--baseAlt1Color)}.docs-sidebar .sidebar-content{display:block;width:100%}.docs-sidebar .sidebar-item{position:relative;outline:0;cursor:pointer;text-decoration:none;display:flex;width:100%;gap:10px;align-items:center;text-align:right;justify-content:start;padding:5px 15px;margin:0 0 var(--itemsSpacing) 0;font-size:var(--lgFontSize);min-height:var(--itemsHeight);border-radius:var(--baseRadius);user-select:none;color:var(--txtHintColor);transition:background var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.docs-sidebar .sidebar-item:last-child{margin-bottom:0}.docs-sidebar .sidebar-item:focus-visible,.docs-sidebar .sidebar-item:hover,.docs-sidebar .sidebar-item:active,.docs-sidebar .sidebar-item.active{color:var(--txtPrimaryColor);background:var(--baseAlt1Color)}.docs-sidebar .sidebar-item:active{background:var(--baseAlt2Color);transition-duration:var(--activeAnimationSpeed)}.docs-sidebar.compact .sidebar-item{--itemsSpacing: 7px}.docs-content{width:100%;display:block;padding:calc(var(--baseSpacing) - 3px) var(--baseSpacing);overflow:auto}.docs-content-wrapper{display:flex;width:100%;height:100%}.docs-panel{width:960px;height:100%}.docs-panel .overlay-panel-section.panel-header{padding:0;border:0;box-shadow:none}.docs-panel .overlay-panel-section.panel-content{padding:0!important}.docs-panel .overlay-panel-section.panel-footer{display:none}@media screen and (max-width: 1000px){.docs-panel .overlay-panel-section.panel-footer{display:flex}}.panel-wrapper.svelte-lxxzfu{animation:slideIn .2s}@keyframes svelte-1bvelc2-refresh{to{transform:rotate(180deg)}}.btn.refreshing.svelte-1bvelc2 i.svelte-1bvelc2{animation:svelte-1bvelc2-refresh .15s ease-out}.datetime.svelte-zdiknu{width:100%;display:block;line-height:var(--smLineHeight)}.time.svelte-zdiknu{font-size:var(--smFontSize);color:var(--txtHintColor)}.horizontal-scroller.svelte-wc2j9h{width:auto;overflow-x:auto}.horizontal-scroller-wrapper.svelte-wc2j9h{position:relative}.horizontal-scroller-wrapper .columns-dropdown{top:40px;z-index:100;max-height:340px}.chart-wrapper.svelte-vh4sl8.svelte-vh4sl8{position:relative;display:block;width:100%}.chart-wrapper.loading.svelte-vh4sl8 .chart-canvas.svelte-vh4sl8{pointer-events:none;opacity:.5}.chart-loader.svelte-vh4sl8.svelte-vh4sl8{position:absolute;z-index:999;top:50%;left:50%;transform:translate(-50%,-50%)}.prism-light code[class*=language-],.prism-light pre[class*=language-]{color:#111b27;background:0 0;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}.prism-light code[class*=language-] ::-moz-selection,.prism-light code[class*=language-]::-moz-selection,.prism-light pre[class*=language-] ::-moz-selection,.prism-light pre[class*=language-]::-moz-selection{background:#8da1b9}.prism-light code[class*=language-] ::selection,.prism-light code[class*=language-]::selection,.prism-light pre[class*=language-] ::selection,.prism-light pre[class*=language-]::selection{background:#8da1b9}.prism-light pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}.prism-light :not(pre)>code[class*=language-],.prism-light pre[class*=language-]{background:#e3eaf2}.prism-light :not(pre)>code[class*=language-]{padding:.1em .3em;border-radius:.3em;white-space:normal}.prism-light .token.cdata,.prism-light .token.comment,.prism-light .token.doctype,.prism-light .token.prolog{color:#3c526d}.prism-light .token.punctuation{color:#111b27}.prism-light .token.delimiter.important,.prism-light .token.selector .parent,.prism-light .token.tag,.prism-light .token.tag .token.punctuation{color:#006d6d}.prism-light .token.attr-name,.prism-light .token.boolean,.prism-light .token.boolean.important,.prism-light .token.constant,.prism-light .token.number,.prism-light .token.selector .token.attribute{color:#755f00}.prism-light .token.class-name,.prism-light .token.key,.prism-light .token.parameter,.prism-light .token.property,.prism-light .token.property-access,.prism-light .token.variable{color:#005a8e}.prism-light .token.attr-value,.prism-light .token.color,.prism-light .token.inserted,.prism-light .token.selector .token.value,.prism-light .token.string,.prism-light .token.string .token.url-link{color:#116b00}.prism-light .token.builtin,.prism-light .token.keyword-array,.prism-light .token.package,.prism-light .token.regex{color:#af00af}.prism-light .token.function,.prism-light .token.selector .token.class,.prism-light .token.selector .token.id{color:#7c00aa}.prism-light .token.atrule .token.rule,.prism-light .token.combinator,.prism-light .token.keyword,.prism-light .token.operator,.prism-light .token.pseudo-class,.prism-light .token.pseudo-element,.prism-light .token.selector,.prism-light .token.unit{color:#a04900}.prism-light .token.deleted,.prism-light .token.important{color:#c22f2e}.prism-light .token.keyword-this,.prism-light .token.this{color:#005a8e}.prism-light .token.bold,.prism-light .token.important,.prism-light .token.keyword-this,.prism-light .token.this{font-weight:700}.prism-light .token.delimiter.important{font-weight:inherit}.prism-light .token.italic{font-style:italic}.prism-light .token.entity{cursor:help}.prism-light .language-markdown .token.title,.prism-light .language-markdown .token.title .token.punctuation{color:#005a8e;font-weight:700}.prism-light .language-markdown .token.blockquote.punctuation{color:#af00af}.prism-light .language-markdown .token.code{color:#006d6d}.prism-light .language-markdown .token.hr.punctuation{color:#005a8e}.prism-light .language-markdown .token.url>.token.content{color:#116b00}.prism-light .language-markdown .token.url-link{color:#755f00}.prism-light .language-markdown .token.list.punctuation{color:#af00af}.prism-light .language-markdown .token.table-header,.prism-light .language-json .token.operator{color:#111b27}.prism-light .language-scss .token.variable{color:#006d6d}.prism-light .token.token.cr:before,.prism-light .token.token.lf:before,.prism-light .token.token.space:before,.prism-light .token.token.tab:not(:empty):before{color:#3c526d}.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>a,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>button{color:#e3eaf2;background:#005a8e}.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>a:focus,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>a:hover,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>button:focus,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>button:hover{color:#e3eaf2;background:rgba(0,90,142,.8549019608);text-decoration:none}.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>span,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>span:focus,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>span:hover{color:#e3eaf2;background:#3c526d}.prism-light .line-highlight.line-highlight{background:rgba(141,161,185,.1843137255);background:linear-gradient(to right,rgba(141,161,185,.1843137255) 70%,rgba(141,161,185,.1450980392))}.prism-light .line-highlight.line-highlight:before,.prism-light .line-highlight.line-highlight[data-end]:after{background-color:#3c526d;color:#e3eaf2;box-shadow:0 1px #8da1b9}.prism-light pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows>span:hover:before{background-color:#3c526d1f}.prism-light .line-numbers.line-numbers .line-numbers-rows{border-right:1px solid rgba(141,161,185,.4784313725);background:rgba(208,218,231,.4784313725)}.prism-light .line-numbers .line-numbers-rows>span:before{color:#3c526dda}.prism-light .rainbow-braces .token.token.punctuation.brace-level-1,.prism-light .rainbow-braces .token.token.punctuation.brace-level-5,.prism-light .rainbow-braces .token.token.punctuation.brace-level-9{color:#755f00}.prism-light .rainbow-braces .token.token.punctuation.brace-level-10,.prism-light .rainbow-braces .token.token.punctuation.brace-level-2,.prism-light .rainbow-braces .token.token.punctuation.brace-level-6{color:#af00af}.prism-light .rainbow-braces .token.token.punctuation.brace-level-11,.prism-light .rainbow-braces .token.token.punctuation.brace-level-3,.prism-light .rainbow-braces .token.token.punctuation.brace-level-7{color:#005a8e}.prism-light .rainbow-braces .token.token.punctuation.brace-level-12,.prism-light .rainbow-braces .token.token.punctuation.brace-level-4,.prism-light .rainbow-braces .token.token.punctuation.brace-level-8{color:#7c00aa}.prism-light pre.diff-highlight>code .token.token.deleted:not(.prefix),.prism-light pre>code.diff-highlight .token.token.deleted:not(.prefix){background-color:#c22f2e1f}.prism-light pre.diff-highlight>code .token.token.inserted:not(.prefix),.prism-light pre>code.diff-highlight .token.token.inserted:not(.prefix){background-color:#116b001f}.prism-light .command-line .command-line-prompt{border-right:1px solid rgba(141,161,185,.4784313725)}.prism-light .command-line .command-line-prompt>span:before{color:#3c526dda}code.svelte-10s5tkd.svelte-10s5tkd{display:block;width:100%;padding:10px 15px;white-space:pre-wrap;word-break:break-word}.code-wrapper.svelte-10s5tkd.svelte-10s5tkd{display:block;width:100%;max-height:100%;overflow:auto;overflow:overlay}.prism-light.svelte-10s5tkd code.svelte-10s5tkd{color:var(--txtPrimaryColor);background:var(--baseAlt1Color)}.invalid-name-note.svelte-1tpxlm5{position:absolute;right:10px;top:10px;text-transform:none}.title.field-name.svelte-1tpxlm5{max-width:130px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.lock-toggle.svelte-i0txfh{position:absolute;right:0px;top:0px;min-width:135px;padding:10px;border-top-left-radius:0;border-bottom-right-radius:0;background:rgba(53,71,104,.08)}.changes-list.svelte-1ghly2p{word-break:break-all}.upsert-panel-title.svelte-12y0yzb{display:inline-flex;align-items:center;min-height:var(--smBtnHeight)}.tabs-content.svelte-12y0yzb:focus-within{z-index:9}.email-visibility-addon.svelte-1751a4d~input.svelte-1751a4d{padding-right:100px}textarea.svelte-1x1pbts{resize:none;padding-top:4px!important;padding-bottom:5px!important;min-height:var(--inputHeight);height:var(--inputHeight)}.clear-btn.svelte-11df51y{margin-top:20px}.draggable.svelte-28orm4{user-select:none;outline:0;min-width:0}.record-info.svelte-fhw3qk.svelte-fhw3qk{display:inline-flex;vertical-align:top;align-items:center;max-width:100%;min-width:0;gap:5px;line-height:normal}.record-info.svelte-fhw3qk>.svelte-fhw3qk{line-height:inherit}.record-info.svelte-fhw3qk .thumb{box-shadow:none}.picker-list.svelte-1u8jhky{max-height:380px}.selected-list.svelte-1u8jhky{display:flex;flex-wrap:wrap;align-items:center;gap:10px;max-height:220px;overflow:auto}.relations-list.svelte-1ynw0pc{max-height:300px;overflow:auto;overflow:overlay}.export-preview.svelte-jm5c4z.svelte-jm5c4z{position:relative;height:500px}.export-preview.svelte-jm5c4z .copy-schema.svelte-jm5c4z{position:absolute;right:15px;top:15px}.collections-diff-table.svelte-lmkr38.svelte-lmkr38{color:var(--txtHintColor);border:2px solid var(--primaryColor)}.collections-diff-table.svelte-lmkr38 tr.svelte-lmkr38{background:none}.collections-diff-table.svelte-lmkr38 th.svelte-lmkr38,.collections-diff-table.svelte-lmkr38 td.svelte-lmkr38{height:auto;padding:2px 15px;border-bottom:1px solid rgba(0,0,0,.07)}.collections-diff-table.svelte-lmkr38 th.svelte-lmkr38{height:35px;padding:4px 15px;color:var(--txtPrimaryColor)}.collections-diff-table.svelte-lmkr38 thead tr.svelte-lmkr38{background:var(--primaryColor)}.collections-diff-table.svelte-lmkr38 thead tr th.svelte-lmkr38{color:var(--baseColor);background:none}.collections-diff-table.svelte-lmkr38 .label.svelte-lmkr38{font-weight:400}.collections-diff-table.svelte-lmkr38 .changed-none-col.svelte-lmkr38{color:var(--txtDisabledColor);background:var(--baseAlt1Color)}.collections-diff-table.svelte-lmkr38 .changed-old-col.svelte-lmkr38{color:var(--txtPrimaryColor);background:var(--dangerAltColor)}.collections-diff-table.svelte-lmkr38 .changed-new-col.svelte-lmkr38{color:var(--txtPrimaryColor);background:var(--successAltColor)}.collections-diff-table.svelte-lmkr38 .field-key-col.svelte-lmkr38{padding-left:30px}.list-label.svelte-1jx20fl{min-width:65px} diff --git a/ui/dist/assets/index-ffbb9561.js b/ui/dist/assets/index-ffbb9561.js new file mode 100644 index 00000000..08406e2b --- /dev/null +++ b/ui/dist/assets/index-ffbb9561.js @@ -0,0 +1,204 @@ +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerpolicy&&(l.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?l.credentials="include":s.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=t(s);fetch(s.href,l)}})();function Z(){}const kl=n=>n;function Je(n,e){for(const t in e)n[t]=e[t];return n}function zb(n){return!!n&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"}function ig(n){return n()}function lu(){return Object.create(null)}function Pe(n){n.forEach(ig)}function Bt(n){return typeof n=="function"}function he(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Rl;function Vn(n,e){return Rl||(Rl=document.createElement("a")),Rl.href=e,n===Rl.href}function Bb(n){return Object.keys(n).length===0}function sg(n,...e){if(n==null)return Z;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function Ye(n,e,t){n.$$.on_destroy.push(sg(e,t))}function Nt(n,e,t,i){if(n){const s=lg(n,e,t,i);return n[0](s)}}function lg(n,e,t,i){return n[1]&&i?Je(t.ctx.slice(),n[1](i(e))):t.ctx}function Ft(n,e,t,i){if(n[2]&&i){const s=n[2](i(t));if(e.dirty===void 0)return s;if(typeof s=="object"){const l=[],o=Math.max(e.dirty.length,s.length);for(let r=0;r32){const e=[],t=n.ctx.length/32;for(let i=0;iwindow.performance.now():()=>Date.now(),fa=og?n=>requestAnimationFrame(n):Z;const _s=new Set;function rg(n){_s.forEach(e=>{e.c(n)||(_s.delete(e),e.f())}),_s.size!==0&&fa(rg)}function Fo(n){let e;return _s.size===0&&fa(rg),{promise:new Promise(t=>{_s.add(e={c:n,f:t})}),abort(){_s.delete(e)}}}function _(n,e){n.appendChild(e)}function ag(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function Ub(n){const e=v("style");return Wb(ag(n),e),e.sheet}function Wb(n,e){return _(n.head||n,e),e.sheet}function S(n,e,t){n.insertBefore(e,t||null)}function w(n){n.parentNode&&n.parentNode.removeChild(n)}function mt(n,e){for(let t=0;tn.removeEventListener(e,t,i)}function dt(n){return function(e){return e.preventDefault(),n.call(this,e)}}function kn(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function p(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function Xn(n,e){const t=Object.getOwnPropertyDescriptors(n.__proto__);for(const i in e)e[i]==null?n.removeAttribute(i):i==="style"?n.style.cssText=e[i]:i==="__value"?n.value=n[i]=e[i]:t[i]&&t[i].set?n[i]=e[i]:p(n,i,e[i])}function ht(n){return n===""?null:+n}function Yb(n){return Array.from(n.childNodes)}function le(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function ce(n,e){n.value=e??""}function Ir(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function Q(n,e,t){n.classList[t?"add":"remove"](e)}function ug(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}function jt(n,e){return new n(e)}const po=new Map;let mo=0;function Kb(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function Jb(n,e){const t={stylesheet:Ub(e),rules:{}};return po.set(n,t),t}function rl(n,e,t,i,s,l,o,r=0){const a=16.666/i;let u=`{ +`;for(let b=0;b<=1;b+=a){const k=e+(t-e)*l(b);u+=b*100+`%{${o(k,1-k)}} +`}const f=u+`100% {${o(t,1-t)}} +}`,c=`__svelte_${Kb(f)}_${r}`,d=ag(n),{stylesheet:m,rules:h}=po.get(d)||Jb(d,n);h[c]||(h[c]=!0,m.insertRule(`@keyframes ${c} ${f}`,m.cssRules.length));const g=n.style.animation||"";return n.style.animation=`${g?`${g}, `:""}${c} ${i}ms linear ${s}ms 1 both`,mo+=1,c}function al(n,e){const t=(n.style.animation||"").split(", "),i=t.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),s=t.length-i.length;s&&(n.style.animation=i.join(", "),mo-=s,mo||Zb())}function Zb(){fa(()=>{mo||(po.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&w(e)}),po.clear())})}function Gb(n,e,t,i){if(!e)return Z;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return Z;const{delay:l=0,duration:o=300,easing:r=kl,start:a=No()+l,end:u=a+o,tick:f=Z,css:c}=t(n,{from:e,to:s},i);let d=!0,m=!1,h;function g(){c&&(h=rl(n,0,1,o,l,r,c)),l||(m=!0)}function b(){c&&al(n,h),d=!1}return Fo(k=>{if(!m&&k>=a&&(m=!0),m&&k>=u&&(f(1,0),b()),!d)return!1;if(m){const y=k-a,T=0+1*r(y/o);f(T,1-T)}return!0}),g(),f(0,1),b}function Xb(n){const e=getComputedStyle(n);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:i}=e,s=n.getBoundingClientRect();n.style.position="absolute",n.style.width=t,n.style.height=i,fg(n,s)}}function fg(n,e){const t=n.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const i=getComputedStyle(n),s=i.transform==="none"?"":i.transform;n.style.transform=`${s} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}let ul;function oi(n){ul=n}function wl(){if(!ul)throw new Error("Function called outside component initialization");return ul}function Zt(n){wl().$$.on_mount.push(n)}function Qb(n){wl().$$.after_update.push(n)}function cg(n){wl().$$.on_destroy.push(n)}function Ct(){const n=wl();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=ug(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function ze(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const hs=[],ie=[],oo=[],Pr=[],dg=Promise.resolve();let Lr=!1;function pg(){Lr||(Lr=!0,dg.then(ca))}function sn(){return pg(),dg}function xe(n){oo.push(n)}function ke(n){Pr.push(n)}const xo=new Set;let us=0;function ca(){if(us!==0)return;const n=ul;do{try{for(;us{Rs=null})),Rs}function Ki(n,e,t){n.dispatchEvent(ug(`${e?"intro":"outro"}${t}`))}const ro=new Set;let Jn;function ae(){Jn={r:0,c:[],p:Jn}}function ue(){Jn.r||Pe(Jn.c),Jn=Jn.p}function A(n,e){n&&n.i&&(ro.delete(n),n.i(e))}function I(n,e,t,i){if(n&&n.o){if(ro.has(n))return;ro.add(n),Jn.c.push(()=>{ro.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const pa={duration:0};function mg(n,e,t){const i={direction:"in"};let s=e(n,t,i),l=!1,o,r,a=0;function u(){o&&al(n,o)}function f(){const{delay:d=0,duration:m=300,easing:h=kl,tick:g=Z,css:b}=s||pa;b&&(o=rl(n,0,1,m,d,h,b,a++)),g(0,1);const k=No()+d,y=k+m;r&&r.abort(),l=!0,xe(()=>Ki(n,!0,"start")),r=Fo(T=>{if(l){if(T>=y)return g(1,0),Ki(n,!0,"end"),u(),l=!1;if(T>=k){const $=h((T-k)/m);g($,1-$)}}return l})}let c=!1;return{start(){c||(c=!0,al(n),Bt(s)?(s=s(i),da().then(f)):f())},invalidate(){c=!1},end(){l&&(u(),l=!1)}}}function hg(n,e,t){const i={direction:"out"};let s=e(n,t,i),l=!0,o;const r=Jn;r.r+=1;function a(){const{delay:u=0,duration:f=300,easing:c=kl,tick:d=Z,css:m}=s||pa;m&&(o=rl(n,1,0,f,u,c,m));const h=No()+u,g=h+f;xe(()=>Ki(n,!1,"start")),Fo(b=>{if(l){if(b>=g)return d(0,1),Ki(n,!1,"end"),--r.r||Pe(r.c),!1;if(b>=h){const k=c((b-h)/f);d(1-k,k)}}return l})}return Bt(s)?da().then(()=>{s=s(i),a()}):a(),{end(u){u&&s.tick&&s.tick(1,0),l&&(o&&al(n,o),l=!1)}}}function je(n,e,t,i){const s={direction:"both"};let l=e(n,t,s),o=i?0:1,r=null,a=null,u=null;function f(){u&&al(n,u)}function c(m,h){const g=m.b-o;return h*=Math.abs(g),{a:o,b:m.b,d:g,duration:h,start:m.start,end:m.start+h,group:m.group}}function d(m){const{delay:h=0,duration:g=300,easing:b=kl,tick:k=Z,css:y}=l||pa,T={start:No()+h,b:m};m||(T.group=Jn,Jn.r+=1),r||a?a=T:(y&&(f(),u=rl(n,o,m,g,h,b,y)),m&&k(0,1),r=c(T,g),xe(()=>Ki(n,m,"start")),Fo($=>{if(a&&$>a.start&&(r=c(a,g),a=null,Ki(n,r.b,"start"),y&&(f(),u=rl(n,o,r.b,r.duration,0,b,l.css))),r){if($>=r.end)k(o=r.b,1-o),Ki(n,r.b,"end"),a||(r.b?f():--r.group.r||Pe(r.group.c)),r=null;else if($>=r.start){const M=$-r.start;o=r.a+r.d*b(M/r.duration),k(o,1-o)}}return!!(r||a)}))}return{run(m){Bt(l)?da().then(()=>{l=l(s),d(m)}):d(m)},end(){f(),r=a=null}}}function ou(n,e){const t=e.token={};function i(s,l,o,r){if(e.token!==t)return;e.resolved=r;let a=e.ctx;o!==void 0&&(a=a.slice(),a[o]=r);const u=s&&(e.current=s)(a);let f=!1;e.block&&(e.blocks?e.blocks.forEach((c,d)=>{d!==l&&c&&(ae(),I(c,1,1,()=>{e.blocks[d]===c&&(e.blocks[d]=null)}),ue())}):e.block.d(1),u.c(),A(u,1),u.m(e.mount(),e.anchor),f=!0),e.block=u,e.blocks&&(e.blocks[l]=u),f&&ca()}if(zb(n)){const s=wl();if(n.then(l=>{oi(s),i(e.then,1,e.value,l),oi(null)},l=>{if(oi(s),i(e.catch,2,e.error,l),oi(null),!e.hasCatch)throw l}),e.current!==e.pending)return i(e.pending,0),!0}else{if(e.current!==e.then)return i(e.then,1,e.value,n),!0;e.resolved=n}}function e1(n,e,t){const i=e.slice(),{resolved:s}=n;n.current===n.then&&(i[n.value]=s),n.current===n.catch&&(i[n.error]=s),n.block.p(i,t)}function es(n,e){n.d(1),e.delete(n.key)}function ln(n,e){I(n,1,1,()=>{e.delete(n.key)})}function t1(n,e){n.f(),ln(n,e)}function wt(n,e,t,i,s,l,o,r,a,u,f,c){let d=n.length,m=l.length,h=d;const g={};for(;h--;)g[n[h].key]=h;const b=[],k=new Map,y=new Map;for(h=m;h--;){const C=c(s,l,h),D=t(C);let E=o.get(D);E?i&&E.p(C,e):(E=u(D,C),E.c()),k.set(D,b[h]=E),D in g&&y.set(D,Math.abs(h-g[D]))}const T=new Set,$=new Set;function M(C){A(C,1),C.m(r,f),o.set(C.key,C),f=C.first,m--}for(;d&&m;){const C=b[m-1],D=n[d-1],E=C.key,P=D.key;C===D?(f=C.first,d--,m--):k.has(P)?!o.has(E)||T.has(E)?M(C):$.has(P)?d--:y.get(E)>y.get(P)?($.add(E),M(C)):(T.add(P),d--):(a(D,o),d--)}for(;d--;){const C=n[d];k.has(C.key)||a(C,o)}for(;m;)M(b[m-1]);return b}function on(n,e){const t={},i={},s={$$scope:1};let l=n.length;for(;l--;){const o=n[l],r=e[l];if(r){for(const a in o)a in r||(i[a]=1);for(const a in r)s[a]||(t[a]=r[a],s[a]=1);n[l]=r}else for(const a in o)s[a]=1}for(const o in i)o in t||(t[o]=void 0);return t}function xn(n){return typeof n=="object"&&n!==null?n:{}}function ge(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function H(n){n&&n.c()}function q(n,e,t,i){const{fragment:s,after_update:l}=n.$$;s&&s.m(e,t),i||xe(()=>{const o=n.$$.on_mount.map(ig).filter(Bt);n.$$.on_destroy?n.$$.on_destroy.push(...o):Pe(o),n.$$.on_mount=[]}),l.forEach(xe)}function j(n,e){const t=n.$$;t.fragment!==null&&(Pe(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function n1(n,e){n.$$.dirty[0]===-1&&(hs.push(n),pg(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const h=m.length?m[0]:d;return u.ctx&&s(u.ctx[c],u.ctx[c]=h)&&(!u.skip_bound&&u.bound[c]&&u.bound[c](h),f&&n1(n,c)),d}):[],u.update(),f=!0,Pe(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const c=Yb(e.target);u.fragment&&u.fragment.l(c),c.forEach(w)}else u.fragment&&u.fragment.c();e.intro&&A(n.$$.fragment),q(n,e.target,e.anchor,e.customElement),ca()}oi(a)}class ye{$destroy(){j(this,1),this.$destroy=Z}$on(e,t){if(!Bt(t))return Z;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const s=i.indexOf(t);s!==-1&&i.splice(s,1)}}$set(e){this.$$set&&!Bb(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function Mt(n){if(!n)throw Error("Parameter args is required");if(!n.component==!n.asyncComponent)throw Error("One and only one of component and asyncComponent is required");if(n.component&&(n.asyncComponent=()=>Promise.resolve(n.component)),typeof n.asyncComponent!="function")throw Error("Parameter asyncComponent must be a function");if(n.conditions){Array.isArray(n.conditions)||(n.conditions=[n.conditions]);for(let t=0;t{i.delete(u),i.size===0&&(t(),t=null)}}return{set:s,update:l,subscribe:o}}function _g(n,e,t){const i=!Array.isArray(n),s=i?[n]:n,l=e.length<2;return gg(t,o=>{let r=!1;const a=[];let u=0,f=Z;const c=()=>{if(u)return;f();const m=e(i?a[0]:a,o);l?o(m):f=Bt(m)?m:Z},d=s.map((m,h)=>sg(m,g=>{a[h]=g,u&=~(1<{u|=1<{j(f,1)}),ue()}l?(e=jt(l,o()),e.$on("routeEvent",r[7]),H(e.$$.fragment),A(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&I(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&j(e,r)}}}function s1(n){let e,t,i;const s=[{params:n[1]},n[2]];var l=n[0];function o(r){let a={};for(let u=0;u{j(f,1)}),ue()}l?(e=jt(l,o()),e.$on("routeEvent",r[6]),H(e.$$.fragment),A(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&I(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&j(e,r)}}}function l1(n){let e,t,i,s;const l=[s1,i1],o=[];function r(a,u){return a[1]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Me()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(ae(),I(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){I(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function ru(){const n=window.location.href.indexOf("#/");let e=n>-1?window.location.href.substr(n+1):"/";const t=e.indexOf("?");let i="";return t>-1&&(i=e.substr(t+1),e=e.substr(0,t)),{location:e,querystring:i}}const Ro=gg(null,function(e){e(ru());const t=()=>{e(ru())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}});_g(Ro,n=>n.location);const ma=_g(Ro,n=>n.querystring),au=Ln(void 0);async function Di(n){if(!n||n.length<1||n.charAt(0)!="/"&&n.indexOf("#/")!==0)throw Error("Invalid parameter location");await sn();const e=(n.charAt(0)=="#"?"":"#")+n;try{const t={...history.state};delete t.__svelte_spa_router_scrollX,delete t.__svelte_spa_router_scrollY,window.history.replaceState(t,void 0,e)}catch{console.warn("Caught exception while replacing the current page. If you're running this in the Svelte REPL, please note that the `replace` method might not work in this environment.")}window.dispatchEvent(new Event("hashchange"))}function xt(n,e){if(e=fu(e),!n||!n.tagName||n.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with tags');return uu(n,e),{update(t){t=fu(t),uu(n,t)}}}function o1(n){n?window.scrollTo(n.__svelte_spa_router_scrollX,n.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function uu(n,e){let t=e.href||n.getAttribute("href");if(t&&t.charAt(0)=="/")t="#"+t;else if(!t||t.length<2||t.slice(0,2)!="#/")throw Error('Invalid value for "href" attribute: '+t);n.setAttribute("href",t),n.addEventListener("click",i=>{i.preventDefault(),e.disabled||r1(i.currentTarget.getAttribute("href"))})}function fu(n){return n&&typeof n=="string"?{href:n}:n||{}}function r1(n){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=n}function a1(n,e,t){let{routes:i={}}=e,{prefix:s=""}=e,{restoreScrollState:l=!1}=e;class o{constructor(M,C){if(!C||typeof C!="function"&&(typeof C!="object"||C._sveltesparouter!==!0))throw Error("Invalid component object");if(!M||typeof M=="string"&&(M.length<1||M.charAt(0)!="/"&&M.charAt(0)!="*")||typeof M=="object"&&!(M instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:D,keys:E}=bg(M);this.path=M,typeof C=="object"&&C._sveltesparouter===!0?(this.component=C.component,this.conditions=C.conditions||[],this.userData=C.userData,this.props=C.props||{}):(this.component=()=>Promise.resolve(C),this.conditions=[],this.props={}),this._pattern=D,this._keys=E}match(M){if(s){if(typeof s=="string")if(M.startsWith(s))M=M.substr(s.length)||"/";else return null;else if(s instanceof RegExp){const P=M.match(s);if(P&&P[0])M=M.substr(P[0].length)||"/";else return null}}const C=this._pattern.exec(M);if(C===null)return null;if(this._keys===!1)return C;const D={};let E=0;for(;E{r.push(new o(M,$))}):Object.keys(i).forEach($=>{r.push(new o($,i[$]))});let a=null,u=null,f={};const c=Ct();async function d($,M){await sn(),c($,M)}let m=null,h=null;l&&(h=$=>{$.state&&($.state.__svelte_spa_router_scrollY||$.state.__svelte_spa_router_scrollX)?m=$.state:m=null},window.addEventListener("popstate",h),Qb(()=>{o1(m)}));let g=null,b=null;const k=Ro.subscribe(async $=>{g=$;let M=0;for(;M{au.set(u)});return}t(0,a=null),b=null,au.set(void 0)});cg(()=>{k(),h&&window.removeEventListener("popstate",h)});function y($){ze.call(this,n,$)}function T($){ze.call(this,n,$)}return n.$$set=$=>{"routes"in $&&t(3,i=$.routes),"prefix"in $&&t(4,s=$.prefix),"restoreScrollState"in $&&t(5,l=$.restoreScrollState)},n.$$.update=()=>{n.$$.dirty&32&&(history.scrollRestoration=l?"manual":"auto")},[a,u,f,i,s,l,y,T]}class u1 extends ye{constructor(e){super(),ve(this,e,a1,l1,he,{routes:3,prefix:4,restoreScrollState:5})}}const ao=[];let vg;function yg(n){const e=n.pattern.test(vg);cu(n,n.className,e),cu(n,n.inactiveClassName,!e)}function cu(n,e,t){(e||"").split(" ").forEach(i=>{i&&(n.node.classList.remove(i),t&&n.node.classList.add(i))})}Ro.subscribe(n=>{vg=n.location+(n.querystring?"?"+n.querystring:""),ao.map(yg)});function qn(n,e){if(e&&(typeof e=="string"||typeof e=="object"&&e instanceof RegExp)?e={path:e}:e=e||{},!e.path&&n.hasAttribute("href")&&(e.path=n.getAttribute("href"),e.path&&e.path.length>1&&e.path.charAt(0)=="#"&&(e.path=e.path.substring(1))),e.className||(e.className="active"),!e.path||typeof e.path=="string"&&(e.path.length<1||e.path.charAt(0)!="/"&&e.path.charAt(0)!="*"))throw Error('Invalid value for "path" argument');const{pattern:t}=typeof e.path=="string"?bg(e.path):{pattern:e.path},i={node:n,className:e.className,inactiveClassName:e.inactiveClassName,pattern:t};return ao.push(i),yg(i),{destroy(){ao.splice(ao.indexOf(i),1)}}}const f1="modulepreload",c1=function(n,e){return new URL(n,e).href},du={},rt=function(e,t,i){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(l=>{if(l=c1(l,i),l in du)return;du[l]=!0;const o=l.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(!!i)for(let f=s.length-1;f>=0;f--){const c=s[f];if(c.href===l&&(!o||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${r}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":f1,o||(u.as="script",u.crossOrigin=""),u.href=l,document.head.appendChild(u),o)return new Promise((f,c)=>{u.addEventListener("load",f),u.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e())};var Nr=function(n,e){return Nr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])},Nr(n,e)};function Jt(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=n}Nr(n,e),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Fr=function(){return Fr=Object.assign||function(e){for(var t,i=1,s=arguments.length;i0&&s[s.length-1])||c[0]!==6&&c[0]!==2)){o=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};var Sl=function(){function n(e){e===void 0&&(e={}),this.load(e||{})}return n.prototype.load=function(e){for(var t=0,i=Object.entries(e);t0&&(!s.exp||s.exp-i>Date.now()/1e3))}(this.token)},enumerable:!1,configurable:!0}),n.prototype.save=function(e,t){this.baseToken=e||"",this.baseModel=t!==null&&typeof t=="object"?t.collectionId!==void 0?new Ti(t):new Xi(t):null,this.triggerChange()},n.prototype.clear=function(){this.baseToken="",this.baseModel=null,this.triggerChange()},n.prototype.loadFromCookie=function(e,t){t===void 0&&(t="pb_auth");var i=function(o,r){var a={};if(typeof o!="string")return a;for(var u=Object.assign({},r||{}).decode||d1,f=0;f4096&&(a.model={id:(s=a==null?void 0:a.model)===null||s===void 0?void 0:s.id,email:(l=a==null?void 0:a.model)===null||l===void 0?void 0:l.email},this.model instanceof Ti&&(a.model.username=this.model.username,a.model.verified=this.model.verified,a.model.collectionId=this.model.collectionId),u=pu(t,JSON.stringify(a),e)),u},n.prototype.onChange=function(e,t){var i=this;return t===void 0&&(t=!1),this._onChangeCallbacks.push(e),t&&e(this.token,this.model),function(){for(var s=i._onChangeCallbacks.length-1;s>=0;s--)if(i._onChangeCallbacks[s]==e)return delete i._onChangeCallbacks[s],void i._onChangeCallbacks.splice(s,1)}},n.prototype.triggerChange=function(){for(var e=0,t=this._onChangeCallbacks;e0?e:1,this.perPage=t>=0?t:0,this.totalItems=i>=0?i:0,this.totalPages=s>=0?s:0,this.items=l||[]},ha=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return Jt(e,n),e.prototype.getFullList=function(t,i){return t===void 0&&(t=200),i===void 0&&(i={}),this._getFullList(this.baseCrudPath,t,i)},e.prototype.getList=function(t,i,s){return t===void 0&&(t=1),i===void 0&&(i=30),s===void 0&&(s={}),this._getList(this.baseCrudPath,t,i,s)},e.prototype.getFirstListItem=function(t,i){return i===void 0&&(i={}),this._getFirstListItem(this.baseCrudPath,t,i)},e.prototype.getOne=function(t,i){return i===void 0&&(i={}),this._getOne(this.baseCrudPath,t,i)},e.prototype.create=function(t,i){return t===void 0&&(t={}),i===void 0&&(i={}),this._create(this.baseCrudPath,t,i)},e.prototype.update=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),this._update(this.baseCrudPath,t,i,s)},e.prototype.delete=function(t,i){return i===void 0&&(i={}),this._delete(this.baseCrudPath,t,i)},e}(function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return Jt(e,n),e.prototype._getFullList=function(t,i,s){var l=this;i===void 0&&(i=100),s===void 0&&(s={});var o=[],r=function(a){return en(l,void 0,void 0,function(){return tn(this,function(u){return[2,this._getList(t,a,i,s).then(function(f){var c=f,d=c.items,m=c.totalItems;return o=o.concat(d),d.length&&m>o.length?r(a+1):o})]})})};return r(1)},e.prototype._getList=function(t,i,s,l){var o=this;return i===void 0&&(i=1),s===void 0&&(s=30),l===void 0&&(l={}),l=Object.assign({page:i,perPage:s},l),this.client.send(t,{method:"GET",params:l}).then(function(r){var a=[];if(r!=null&&r.items){r.items=r.items||[];for(var u=0,f=r.items;u=0;o--)this.subscriptions[t][o]===i&&(l=!0,delete this.subscriptions[t][o],this.subscriptions[t].splice(o,1),(s=this.eventSource)===null||s===void 0||s.removeEventListener(t,i));return l?(this.subscriptions[t].length||delete this.subscriptions[t],this.hasSubscriptionListeners()?[3,1]:(this.disconnect(),[3,3])):[2];case 1:return this.hasSubscriptionListeners(t)?[3,3]:[4,this.submitSubscriptions()];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.hasSubscriptionListeners=function(t){var i,s;if(this.subscriptions=this.subscriptions||{},t)return!!(!((i=this.subscriptions[t])===null||i===void 0)&&i.length);for(var l in this.subscriptions)if(!((s=this.subscriptions[l])===null||s===void 0)&&s.length)return!0;return!1},e.prototype.submitSubscriptions=function(){return en(this,void 0,void 0,function(){return tn(this,function(t){return this.clientId?(this.addAllSubscriptionListeners(),this.lastSentTopics=this.getNonEmptySubscriptionTopics(),[2,this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentTopics},params:{$cancelKey:"realtime_"+this.clientId}}).catch(function(i){if(!(i!=null&&i.isAbort))throw i})]):[2]})})},e.prototype.getNonEmptySubscriptionTopics=function(){var t=[];for(var i in this.subscriptions)this.subscriptions[i].length&&t.push(i);return t},e.prototype.addAllSubscriptionListeners=function(){if(this.eventSource)for(var t in this.removeAllSubscriptionListeners(),this.subscriptions)for(var i=0,s=this.subscriptions[t];i0?[2]:[2,new Promise(function(s,l){t.pendingConnects.push({resolve:s,reject:l}),t.pendingConnects.length>1||t.initConnect()})]})})},e.prototype.initConnect=function(){var t=this;this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(function(){t.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildUrl("/api/realtime")),this.eventSource.onerror=function(i){t.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",function(i){var s=i;t.clientId=s==null?void 0:s.lastEventId,t.submitSubscriptions().then(function(){return en(t,void 0,void 0,function(){var l;return tn(this,function(o){switch(o.label){case 0:l=3,o.label=1;case 1:return this.hasUnsentSubscriptions()&&l>0?(l--,[4,this.submitSubscriptions()]):[3,3];case 2:return o.sent(),[3,1];case 3:return[2]}})})}).then(function(){for(var l=0,o=t.pendingConnects;lthis.maxReconnectAttempts){for(var s=0,l=this.pendingConnects;s=400)throw new fl({url:y.url,status:y.status,data:T});return[2,T]}})})}).catch(function(y){throw new fl(y)})]})})},n.prototype.getFileUrl=function(e,t,i){i===void 0&&(i={});var s=[];s.push("api"),s.push("files"),s.push(encodeURIComponent(e.collectionId||e.collectionName)),s.push(encodeURIComponent(e.id)),s.push(encodeURIComponent(t));var l=this.buildUrl(s.join("/"));if(Object.keys(i).length){var o=new URLSearchParams(i);l+=(l.includes("?")?"&":"?")+o}return l},n.prototype.buildUrl=function(e){var t=this.baseUrl+(this.baseUrl.endsWith("/")?"":"/");return e&&(t+=e.startsWith("/")?e.substring(1):e),t},n.prototype.serializeQueryParams=function(e){var t=[];for(var i in e)if(e[i]!==null){var s=e[i],l=encodeURIComponent(i);if(Array.isArray(s))for(var o=0,r=s;o"u"}function Ji(n){return typeof n=="number"}function qo(n){return typeof n=="number"&&n%1===0}function D1(n){return typeof n=="string"}function O1(n){return Object.prototype.toString.call(n)==="[object Date]"}function Ug(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function E1(n){return Array.isArray(n)?n:[n]}function hu(n,e,t){if(n.length!==0)return n.reduce((i,s)=>{const l=[e(s),s];return i&&t(i[0],l[0])===i[0]?i:l},null)[1]}function A1(n,e){return e.reduce((t,i)=>(t[i]=n[i],t),{})}function Ts(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function ri(n,e,t){return qo(n)&&n>=e&&n<=t}function I1(n,e){return n-e*Math.floor(n/e)}function Dt(n,e=2){const t=n<0;let i;return t?i="-"+(""+-n).padStart(e,"0"):i=(""+n).padStart(e,"0"),i}function gi(n){if(!(Ge(n)||n===null||n===""))return parseInt(n,10)}function Fi(n){if(!(Ge(n)||n===null||n===""))return parseFloat(n)}function _a(n){if(!(Ge(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function ba(n,e,t=!1){const i=10**e;return(t?Math.trunc:Math.round)(n*i)/i}function $l(n){return n%4===0&&(n%100!==0||n%400===0)}function xs(n){return $l(n)?366:365}function ho(n,e){const t=I1(e-1,12)+1,i=n+(e-t)/12;return t===2?$l(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function va(n){let e=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function go(n){const e=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7,t=n-1,i=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7;return e===4||i===3?53:52}function jr(n){return n>99?n:n>60?1900+n:2e3+n}function Wg(n,e,t,i=null){const s=new Date(n),l={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(l.timeZone=i);const o={timeZoneName:e,...l},r=new Intl.DateTimeFormat(t,o).formatToParts(s).find(a=>a.type.toLowerCase()==="timezonename");return r?r.value:null}function jo(n,e){let t=parseInt(n,10);Number.isNaN(t)&&(t=0);const i=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-i:i;return t*60+s}function Yg(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new Dn(`Invalid unit value ${n}`);return e}function _o(n,e){const t={};for(const i in n)if(Ts(n,i)){const s=n[i];if(s==null)continue;t[e(i)]=Yg(s)}return t}function el(n,e){const t=Math.trunc(Math.abs(n/60)),i=Math.trunc(Math.abs(n%60)),s=n>=0?"+":"-";switch(e){case"short":return`${s}${Dt(t,2)}:${Dt(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${Dt(t,2)}${Dt(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Ho(n){return A1(n,["hour","minute","second","millisecond"])}const Kg=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,P1=["January","February","March","April","May","June","July","August","September","October","November","December"],Jg=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],L1=["J","F","M","A","M","J","J","A","S","O","N","D"];function Zg(n){switch(n){case"narrow":return[...L1];case"short":return[...Jg];case"long":return[...P1];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Gg=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Xg=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],N1=["M","T","W","T","F","S","S"];function Qg(n){switch(n){case"narrow":return[...N1];case"short":return[...Xg];case"long":return[...Gg];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const xg=["AM","PM"],F1=["Before Christ","Anno Domini"],R1=["BC","AD"],q1=["B","A"];function e_(n){switch(n){case"narrow":return[...q1];case"short":return[...R1];case"long":return[...F1];default:return null}}function j1(n){return xg[n.hour<12?0:1]}function H1(n,e){return Qg(e)[n.weekday-1]}function V1(n,e){return Zg(e)[n.month-1]}function z1(n,e){return e_(e)[n.year<0?0:1]}function B1(n,e,t="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},l=["hours","minutes","seconds"].indexOf(n)===-1;if(t==="auto"&&l){const c=n==="days";switch(e){case 1:return c?"tomorrow":`next ${s[n][0]}`;case-1:return c?"yesterday":`last ${s[n][0]}`;case 0:return c?"today":`this ${s[n][0]}`}}const o=Object.is(e,-0)||e<0,r=Math.abs(e),a=r===1,u=s[n],f=i?a?u[1]:u[2]||u[1]:a?s[n][0]:n;return o?`${r} ${f} ago`:`in ${r} ${f}`}function gu(n,e){let t="";for(const i of n)i.literal?t+=i.val:t+=e(i.val);return t}const U1={D:qr,DD:$g,DDD:Cg,DDDD:Mg,t:Dg,tt:Og,ttt:Eg,tttt:Ag,T:Ig,TT:Pg,TTT:Lg,TTTT:Ng,f:Fg,ff:qg,fff:Hg,ffff:zg,F:Rg,FF:jg,FFF:Vg,FFFF:Bg};class dn{static create(e,t={}){return new dn(e,t)}static parseFormat(e){let t=null,i="",s=!1;const l=[];for(let o=0;o0&&l.push({literal:s,val:i}),t=null,i="",s=!s):s||r===t?i+=r:(i.length>0&&l.push({literal:!1,val:i}),i=r,t=r)}return i.length>0&&l.push({literal:s,val:i}),l}static macroTokenToFormatOpts(e){return U1[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTime(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTimeParts(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).formatToParts()}resolvedOptions(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return Dt(e,t);const i={...this.opts};return t>0&&(i.padTo=t),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",l=(m,h)=>this.loc.extract(e,m,h),o=m=>e.isOffsetFixed&&e.offset===0&&m.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,m.format):"",r=()=>i?j1(e):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(m,h)=>i?V1(e,m):l(h?{month:m}:{month:m,day:"numeric"},"month"),u=(m,h)=>i?H1(e,m):l(h?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),f=m=>{const h=dn.macroTokenToFormatOpts(m);return h?this.formatWithSystemDefault(e,h):m},c=m=>i?z1(e,m):l({era:m},"era"),d=m=>{switch(m){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return r();case"d":return s?l({day:"numeric"},"day"):this.num(e.day);case"dd":return s?l({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return s?l({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?l({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return s?l({month:"numeric"},"month"):this.num(e.month);case"MM":return s?l({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return s?l({year:"numeric"},"year"):this.num(e.year);case"yy":return s?l({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?l({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?l({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(m)}};return gu(dn.parseFormat(t),d)}formatDurationFromString(e,t){const i=a=>{switch(a[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=a=>u=>{const f=i(u);return f?this.num(a.get(f),u.length):u},l=dn.parseFormat(t),o=l.reduce((a,{literal:u,val:f})=>u?a:a.concat(f),[]),r=e.shiftTo(...o.map(i).filter(a=>a));return gu(l,s(r))}}class jn{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Cl{get type(){throw new mi}get name(){throw new mi}get ianaName(){return this.name}get isUniversal(){throw new mi}offsetName(e,t){throw new mi}formatOffset(e,t){throw new mi}offset(e){throw new mi}equals(e){throw new mi}get isValid(){throw new mi}}let er=null;class ya extends Cl{static get instance(){return er===null&&(er=new ya),er}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return Wg(e,t,i)}formatOffset(e,t){return el(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let uo={};function W1(n){return uo[n]||(uo[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),uo[n]}const Y1={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function K1(n,e){const t=n.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,l,o,r,a,u,f]=i;return[o,s,l,r,a,u,f]}function J1(n,e){const t=n.formatToParts(e),i=[];for(let s=0;s=0?h:1e3+h,(d-m)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let tr=null;class nn extends Cl{static get utcInstance(){return tr===null&&(tr=new nn(0)),tr}static instance(e){return e===0?nn.utcInstance:new nn(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new nn(jo(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${el(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${el(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return el(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class Z1 extends Cl{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function _i(n,e){if(Ge(n)||n===null)return e;if(n instanceof Cl)return n;if(D1(n)){const t=n.toLowerCase();return t==="local"||t==="system"?e:t==="utc"||t==="gmt"?nn.utcInstance:nn.parseSpecifier(t)||ai.create(n)}else return Ji(n)?nn.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new Z1(n)}let _u=()=>Date.now(),bu="system",vu=null,yu=null,ku=null,wu;class Lt{static get now(){return _u}static set now(e){_u=e}static set defaultZone(e){bu=e}static get defaultZone(){return _i(bu,ya.instance)}static get defaultLocale(){return vu}static set defaultLocale(e){vu=e}static get defaultNumberingSystem(){return yu}static set defaultNumberingSystem(e){yu=e}static get defaultOutputCalendar(){return ku}static set defaultOutputCalendar(e){ku=e}static get throwOnInvalid(){return wu}static set throwOnInvalid(e){wu=e}static resetCaches(){_t.resetCache(),ai.resetCache()}}let Su={};function G1(n,e={}){const t=JSON.stringify([n,e]);let i=Su[t];return i||(i=new Intl.ListFormat(n,e),Su[t]=i),i}let Hr={};function Vr(n,e={}){const t=JSON.stringify([n,e]);let i=Hr[t];return i||(i=new Intl.DateTimeFormat(n,e),Hr[t]=i),i}let zr={};function X1(n,e={}){const t=JSON.stringify([n,e]);let i=zr[t];return i||(i=new Intl.NumberFormat(n,e),zr[t]=i),i}let Br={};function Q1(n,e={}){const{base:t,...i}=e,s=JSON.stringify([n,i]);let l=Br[s];return l||(l=new Intl.RelativeTimeFormat(n,e),Br[s]=l),l}let Gs=null;function x1(){return Gs||(Gs=new Intl.DateTimeFormat().resolvedOptions().locale,Gs)}function e0(n){const e=n.indexOf("-u-");if(e===-1)return[n];{let t;const i=n.substring(0,e);try{t=Vr(n).resolvedOptions()}catch{t=Vr(i).resolvedOptions()}const{numberingSystem:s,calendar:l}=t;return[i,s,l]}}function t0(n,e,t){return(t||e)&&(n+="-u",t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function n0(n){const e=[];for(let t=1;t<=12;t++){const i=qe.utc(2016,t,1);e.push(n(i))}return e}function i0(n){const e=[];for(let t=1;t<=7;t++){const i=qe.utc(2016,11,13+t);e.push(n(i))}return e}function Hl(n,e,t,i,s){const l=n.listingMode(t);return l==="error"?null:l==="en"?i(e):s(e)}function s0(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||new Intl.DateTimeFormat(n.intl).resolvedOptions().numberingSystem==="latn"}class l0{constructor(e,t,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:l,...o}=i;if(!t||Object.keys(o).length>0){const r={useGrouping:!1,...i};i.padTo>0&&(r.minimumIntegerDigits=i.padTo),this.inf=X1(e,r)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):ba(e,3);return Dt(t,this.padTo)}}}class o0{constructor(e,t,i){this.opts=i;let s;if(e.zone.isUniversal){const o=-1*(e.offset/60),r=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&ai.create(r).valid?(s=r,this.dt=e):(s="UTC",i.timeZoneName?this.dt=e:this.dt=e.offset===0?e:qe.fromMillis(e.ts+e.offset*60*1e3))}else e.zone.type==="system"?this.dt=e:(this.dt=e,s=e.zone.name);const l={...this.opts};s&&(l.timeZone=s),this.dtf=Vr(t,l)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class r0{constructor(e,t,i){this.opts={style:"long",...i},!t&&Ug()&&(this.rtf=Q1(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):B1(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class _t{static fromOpts(e){return _t.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){const l=e||Lt.defaultLocale,o=l||(s?"en-US":x1()),r=t||Lt.defaultNumberingSystem,a=i||Lt.defaultOutputCalendar;return new _t(o,r,a,l)}static resetCache(){Gs=null,Hr={},zr={},Br={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return _t.create(e,t,i)}constructor(e,t,i,s){const[l,o,r]=e0(e);this.locale=l,this.numberingSystem=t||o||null,this.outputCalendar=i||r||null,this.intl=t0(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=s0(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:_t.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1,i=!0){return Hl(this,e,i,Zg,()=>{const s=t?{month:e,day:"numeric"}:{month:e},l=t?"format":"standalone";return this.monthsCache[l][e]||(this.monthsCache[l][e]=n0(o=>this.extract(o,s,"month"))),this.monthsCache[l][e]})}weekdays(e,t=!1,i=!0){return Hl(this,e,i,Qg,()=>{const s=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},l=t?"format":"standalone";return this.weekdaysCache[l][e]||(this.weekdaysCache[l][e]=i0(o=>this.extract(o,s,"weekday"))),this.weekdaysCache[l][e]})}meridiems(e=!0){return Hl(this,void 0,e,()=>xg,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[qe.utc(2016,11,13,9),qe.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return Hl(this,e,t,e_,()=>{const i={era:e};return this.eraCache[e]||(this.eraCache[e]=[qe.utc(-40,1,1),qe.utc(2017,1,1)].map(s=>this.extract(s,i,"era"))),this.eraCache[e]})}extract(e,t,i){const s=this.dtFormatter(e,t),l=s.formatToParts(),o=l.find(r=>r.type.toLowerCase()===i);return o?o.value:null}numberFormatter(e={}){return new l0(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new o0(e,this.intl,t)}relFormatter(e={}){return new r0(this.intl,this.isEnglish(),e)}listFormatter(e={}){return G1(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}function Es(...n){const e=n.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function As(...n){return e=>n.reduce(([t,i,s],l)=>{const[o,r,a]=l(e,s);return[{...t,...o},r||i,a]},[{},null,1]).slice(0,2)}function Is(n,...e){if(n==null)return[null,null];for(const[t,i]of e){const s=t.exec(n);if(s)return i(s)}return[null,null]}function t_(...n){return(e,t)=>{const i={};let s;for(s=0;sm!==void 0&&(h||m&&f)?-m:m;return[{years:d(Fi(t)),months:d(Fi(i)),weeks:d(Fi(s)),days:d(Fi(l)),hours:d(Fi(o)),minutes:d(Fi(r)),seconds:d(Fi(a),a==="-0"),milliseconds:d(_a(u),c)}]}const y0={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Sa(n,e,t,i,s,l,o){const r={year:e.length===2?jr(gi(e)):gi(e),month:Jg.indexOf(t)+1,day:gi(i),hour:gi(s),minute:gi(l)};return o&&(r.second=gi(o)),n&&(r.weekday=n.length>3?Gg.indexOf(n)+1:Xg.indexOf(n)+1),r}const k0=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function w0(n){const[,e,t,i,s,l,o,r,a,u,f,c]=n,d=Sa(e,s,i,t,l,o,r);let m;return a?m=y0[a]:u?m=0:m=jo(f,c),[d,new nn(m)]}function S0(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const T0=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,$0=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,C0=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Tu(n){const[,e,t,i,s,l,o,r]=n;return[Sa(e,s,i,t,l,o,r),nn.utcInstance]}function M0(n){const[,e,t,i,s,l,o,r]=n;return[Sa(e,r,t,i,s,l,o),nn.utcInstance]}const D0=Es(u0,wa),O0=Es(f0,wa),E0=Es(c0,wa),A0=Es(i_),l_=As(g0,Ps,Ml,Dl),I0=As(d0,Ps,Ml,Dl),P0=As(p0,Ps,Ml,Dl),L0=As(Ps,Ml,Dl);function N0(n){return Is(n,[D0,l_],[O0,I0],[E0,P0],[A0,L0])}function F0(n){return Is(S0(n),[k0,w0])}function R0(n){return Is(n,[T0,Tu],[$0,Tu],[C0,M0])}function q0(n){return Is(n,[b0,v0])}const j0=As(Ps);function H0(n){return Is(n,[_0,j0])}const V0=Es(m0,h0),z0=Es(s_),B0=As(Ps,Ml,Dl);function U0(n){return Is(n,[V0,l_],[z0,B0])}const W0="Invalid Duration",o_={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Y0={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...o_},Sn=146097/400,cs=146097/4800,K0={years:{quarters:4,months:12,weeks:Sn/7,days:Sn,hours:Sn*24,minutes:Sn*24*60,seconds:Sn*24*60*60,milliseconds:Sn*24*60*60*1e3},quarters:{months:3,weeks:Sn/28,days:Sn/4,hours:Sn*24/4,minutes:Sn*24*60/4,seconds:Sn*24*60*60/4,milliseconds:Sn*24*60*60*1e3/4},months:{weeks:cs/7,days:cs,hours:cs*24,minutes:cs*24*60,seconds:cs*24*60*60,milliseconds:cs*24*60*60*1e3},...o_},zi=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],J0=zi.slice(0).reverse();function Ri(n,e,t=!1){const i={values:t?e.values:{...n.values,...e.values||{}},loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy};return new tt(i)}function Z0(n){return n<0?Math.floor(n):Math.ceil(n)}function r_(n,e,t,i,s){const l=n[s][t],o=e[t]/l,r=Math.sign(o)===Math.sign(i[s]),a=!r&&i[s]!==0&&Math.abs(o)<=1?Z0(o):Math.trunc(o);i[s]+=a,e[t]-=a*l}function G0(n,e){J0.reduce((t,i)=>Ge(e[i])?t:(t&&r_(n,e,t,e,i),i),null)}class tt{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;this.values=e.values,this.loc=e.loc||_t.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?K0:Y0,this.isLuxonDuration=!0}static fromMillis(e,t){return tt.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new Dn(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new tt({values:_o(e,tt.normalizeUnit),loc:_t.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(Ji(e))return tt.fromMillis(e);if(tt.isDuration(e))return e;if(typeof e=="object")return tt.fromObject(e);throw new Dn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=q0(e);return i?tt.fromObject(i,t):tt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=H0(e);return i?tt.fromObject(i,t):tt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Dn("need to specify a reason the Duration is invalid");const i=e instanceof jn?e:new jn(e,t);if(Lt.throwOnInvalid)throw new $1(i);return new tt({invalid:i})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new Tg(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const i={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?dn.create(this.loc,i).formatDurationFromString(this,e):W0}toHuman(e={}){const t=zi.map(i=>{const s=this.values[i];return Ge(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=ba(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let s=e.format==="basic"?"hhmm":"hh:mm";(!e.suppressSeconds||i.seconds!==0||i.milliseconds!==0)&&(s+=e.format==="basic"?"ss":":ss",(!e.suppressMilliseconds||i.milliseconds!==0)&&(s+=".SSS"));let l=i.toFormat(s);return e.includePrefix&&(l="T"+l),l}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=tt.fromDurationLike(e),i={};for(const s of zi)(Ts(t.values,s)||Ts(this.values,s))&&(i[s]=t.get(s)+this.get(s));return Ri(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=tt.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const i of Object.keys(this.values))t[i]=Yg(e(this.values[i],i));return Ri(this,{values:t},!0)}get(e){return this[tt.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,..._o(e,tt.normalizeUnit)};return Ri(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t}),l={loc:s};return i&&(l.conversionAccuracy=i),Ri(this,l)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return G0(this.matrix,e),Ri(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>tt.normalizeUnit(o));const t={},i={},s=this.toObject();let l;for(const o of zi)if(e.indexOf(o)>=0){l=o;let r=0;for(const u in i)r+=this.matrix[u][o]*i[u],i[u]=0;Ji(s[o])&&(r+=s[o]);const a=Math.trunc(r);t[o]=a,i[o]=(r*1e3-a*1e3)/1e3;for(const u in s)zi.indexOf(u)>zi.indexOf(o)&&r_(this.matrix,s,u,t,o)}else Ji(s[o])&&(i[o]=s[o]);for(const o in i)i[o]!==0&&(t[l]+=o===l?i[o]:i[o]/this.matrix[l][o]);return Ri(this,{values:t},!0).normalize()}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Ri(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of zi)if(!t(this.values[i],e.values[i]))return!1;return!0}}const qs="Invalid Interval";function X0(n,e){return!n||!n.isValid?vt.invalid("missing or invalid start"):!e||!e.isValid?vt.invalid("missing or invalid end"):ee:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?vt.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Vs).filter(o=>this.contains(o)).sort(),i=[];let{s}=this,l=0;for(;s+this.e?this.e:o;i.push(vt.fromDateTimes(s,r)),s=r,l+=1}return i}splitBy(e){const t=tt.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:i}=this,s=1,l;const o=[];for(;ia*s));l=+r>+this.e?this.e:r,o.push(vt.fromDateTimes(i,l)),i=l,s+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,i=this.e=i?null:vt.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return vt.fromDateTimes(t,i)}static merge(e){const[t,i]=e.sort((s,l)=>s.s-l.s).reduce(([s,l],o)=>l?l.overlaps(o)||l.abutsStart(o)?[s,l.union(o)]:[s.concat([l]),o]:[s,o],[[],null]);return i&&t.push(i),t}static xor(e){let t=null,i=0;const s=[],l=e.map(a=>[{time:a.s,type:"s"},{time:a.e,type:"e"}]),o=Array.prototype.concat(...l),r=o.sort((a,u)=>a.time-u.time);for(const a of r)i+=a.type==="s"?1:-1,i===1?t=a.time:(t&&+t!=+a.time&&s.push(vt.fromDateTimes(t,a.time)),t=null);return vt.merge(s)}difference(...e){return vt.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:qs}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:qs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:qs}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:qs}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:qs}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):tt.invalid(this.invalidReason)}mapEndpoints(e){return vt.fromDateTimes(e(this.s),e(this.e))}}class Vl{static hasDST(e=Lt.defaultZone){const t=qe.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return ai.isValidZone(e)}static normalizeZone(e){return _i(e,Lt.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||_t.create(t,i,l)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||_t.create(t,i,l)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||_t.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||_t.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return _t.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return _t.create(t,null,"gregory").eras(e)}static features(){return{relative:Ug()}}}function $u(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(n);return Math.floor(tt.fromMillis(i).as("days"))}function Q0(n,e,t){const i=[["years",(r,a)=>a.year-r.year],["quarters",(r,a)=>a.quarter-r.quarter],["months",(r,a)=>a.month-r.month+(a.year-r.year)*12],["weeks",(r,a)=>{const u=$u(r,a);return(u-u%7)/7}],["days",$u]],s={};let l,o;for(const[r,a]of i)if(t.indexOf(r)>=0){l=r;let u=a(n,e);o=n.plus({[r]:u}),o>e?(n=n.plus({[r]:u-1}),u-=1):n=o,s[r]=u}return[n,s,o,l]}function x0(n,e,t,i){let[s,l,o,r]=Q0(n,e,t);const a=e-s,u=t.filter(c=>["hours","minutes","seconds","milliseconds"].indexOf(c)>=0);u.length===0&&(o0?tt.fromMillis(a,i).shiftTo(...u).plus(f):f}const Ta={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Cu={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},ev=Ta.hanidec.replace(/[\[|\]]/g,"").split("");function tv(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t=l&&i<=o&&(e+=i-l)}}return parseInt(e,10)}else return e}function Fn({numberingSystem:n},e=""){return new RegExp(`${Ta[n||"latn"]}${e}`)}const nv="missing Intl.DateTimeFormat.formatToParts support";function it(n,e=t=>t){return{regex:n,deser:([t])=>e(tv(t))}}const iv=String.fromCharCode(160),a_=`[ ${iv}]`,u_=new RegExp(a_,"g");function sv(n){return n.replace(/\./g,"\\.?").replace(u_,a_)}function Mu(n){return n.replace(/\./g,"").replace(u_," ").toLowerCase()}function Rn(n,e){return n===null?null:{regex:RegExp(n.map(sv).join("|")),deser:([t])=>n.findIndex(i=>Mu(t)===Mu(i))+e}}function Du(n,e){return{regex:n,deser:([,t,i])=>jo(t,i),groups:e}}function nr(n){return{regex:n,deser:([e])=>e}}function lv(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function ov(n,e){const t=Fn(e),i=Fn(e,"{2}"),s=Fn(e,"{3}"),l=Fn(e,"{4}"),o=Fn(e,"{6}"),r=Fn(e,"{1,2}"),a=Fn(e,"{1,3}"),u=Fn(e,"{1,6}"),f=Fn(e,"{1,9}"),c=Fn(e,"{2,4}"),d=Fn(e,"{4,6}"),m=b=>({regex:RegExp(lv(b.val)),deser:([k])=>k,literal:!0}),g=(b=>{if(n.literal)return m(b);switch(b.val){case"G":return Rn(e.eras("short",!1),0);case"GG":return Rn(e.eras("long",!1),0);case"y":return it(u);case"yy":return it(c,jr);case"yyyy":return it(l);case"yyyyy":return it(d);case"yyyyyy":return it(o);case"M":return it(r);case"MM":return it(i);case"MMM":return Rn(e.months("short",!0,!1),1);case"MMMM":return Rn(e.months("long",!0,!1),1);case"L":return it(r);case"LL":return it(i);case"LLL":return Rn(e.months("short",!1,!1),1);case"LLLL":return Rn(e.months("long",!1,!1),1);case"d":return it(r);case"dd":return it(i);case"o":return it(a);case"ooo":return it(s);case"HH":return it(i);case"H":return it(r);case"hh":return it(i);case"h":return it(r);case"mm":return it(i);case"m":return it(r);case"q":return it(r);case"qq":return it(i);case"s":return it(r);case"ss":return it(i);case"S":return it(a);case"SSS":return it(s);case"u":return nr(f);case"uu":return nr(r);case"uuu":return it(t);case"a":return Rn(e.meridiems(),0);case"kkkk":return it(l);case"kk":return it(c,jr);case"W":return it(r);case"WW":return it(i);case"E":case"c":return it(t);case"EEE":return Rn(e.weekdays("short",!1,!1),1);case"EEEE":return Rn(e.weekdays("long",!1,!1),1);case"ccc":return Rn(e.weekdays("short",!0,!1),1);case"cccc":return Rn(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Du(new RegExp(`([+-]${r.source})(?::(${i.source}))?`),2);case"ZZZ":return Du(new RegExp(`([+-]${r.source})(${i.source})?`),2);case"z":return nr(/[a-z_+-/]{1,256}?/i);default:return m(b)}})(n)||{invalidReason:nv};return g.token=n,g}const rv={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function av(n,e,t){const{type:i,value:s}=n;if(i==="literal")return{literal:!0,val:s};const l=t[i];let o=rv[i];if(typeof o=="object"&&(o=o[l]),o)return{literal:!1,val:o}}function uv(n){return[`^${n.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,n]}function fv(n,e,t){const i=n.match(e);if(i){const s={};let l=1;for(const o in t)if(Ts(t,o)){const r=t[o],a=r.groups?r.groups+1:1;!r.literal&&r.token&&(s[r.token.val[0]]=r.deser(i.slice(l,l+a))),l+=a}return[i,s]}else return[i,{}]}function cv(n){const e=l=>{switch(l){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let t=null,i;return Ge(n.z)||(t=ai.create(n.z)),Ge(n.Z)||(t||(t=new nn(n.Z)),i=n.Z),Ge(n.q)||(n.M=(n.q-1)*3+1),Ge(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),Ge(n.u)||(n.S=_a(n.u)),[Object.keys(n).reduce((l,o)=>{const r=e(o);return r&&(l[r]=n[o]),l},{}),t,i]}let ir=null;function dv(){return ir||(ir=qe.fromMillis(1555555555555)),ir}function pv(n,e){if(n.literal)return n;const t=dn.macroTokenToFormatOpts(n.val);if(!t)return n;const l=dn.create(e,t).formatDateTimeParts(dv()).map(o=>av(o,e,t));return l.includes(void 0)?n:l}function mv(n,e){return Array.prototype.concat(...n.map(t=>pv(t,e)))}function f_(n,e,t){const i=mv(dn.parseFormat(t),n),s=i.map(o=>ov(o,n)),l=s.find(o=>o.invalidReason);if(l)return{input:e,tokens:i,invalidReason:l.invalidReason};{const[o,r]=uv(s),a=RegExp(o,"i"),[u,f]=fv(e,a,r),[c,d,m]=f?cv(f):[null,null,void 0];if(Ts(f,"a")&&Ts(f,"H"))throw new Zs("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:a,rawMatches:u,matches:f,result:c,zone:d,specificOffset:m}}}function hv(n,e,t){const{result:i,zone:s,specificOffset:l,invalidReason:o}=f_(n,e,t);return[i,s,l,o]}const c_=[0,31,59,90,120,151,181,212,243,273,304,334],d_=[0,31,60,91,121,152,182,213,244,274,305,335];function En(n,e){return new jn("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function p_(n,e,t){const i=new Date(Date.UTC(n,e-1,t));n<100&&n>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function m_(n,e,t){return t+($l(n)?d_:c_)[e-1]}function h_(n,e){const t=$l(n)?d_:c_,i=t.findIndex(l=>lgo(e)?(r=e+1,o=1):r=e,{weekYear:r,weekNumber:o,weekday:l,...Ho(n)}}function Ou(n){const{weekYear:e,weekNumber:t,weekday:i}=n,s=p_(e,1,4),l=xs(e);let o=t*7+i-s-3,r;o<1?(r=e-1,o+=xs(r)):o>l?(r=e+1,o-=xs(e)):r=e;const{month:a,day:u}=h_(r,o);return{year:r,month:a,day:u,...Ho(n)}}function sr(n){const{year:e,month:t,day:i}=n,s=m_(e,t,i);return{year:e,ordinal:s,...Ho(n)}}function Eu(n){const{year:e,ordinal:t}=n,{month:i,day:s}=h_(e,t);return{year:e,month:i,day:s,...Ho(n)}}function gv(n){const e=qo(n.weekYear),t=ri(n.weekNumber,1,go(n.weekYear)),i=ri(n.weekday,1,7);return e?t?i?!1:En("weekday",n.weekday):En("week",n.week):En("weekYear",n.weekYear)}function _v(n){const e=qo(n.year),t=ri(n.ordinal,1,xs(n.year));return e?t?!1:En("ordinal",n.ordinal):En("year",n.year)}function g_(n){const e=qo(n.year),t=ri(n.month,1,12),i=ri(n.day,1,ho(n.year,n.month));return e?t?i?!1:En("day",n.day):En("month",n.month):En("year",n.year)}function __(n){const{hour:e,minute:t,second:i,millisecond:s}=n,l=ri(e,0,23)||e===24&&t===0&&i===0&&s===0,o=ri(t,0,59),r=ri(i,0,59),a=ri(s,0,999);return l?o?r?a?!1:En("millisecond",s):En("second",i):En("minute",t):En("hour",e)}const lr="Invalid DateTime",Au=864e13;function zl(n){return new jn("unsupported zone",`the zone "${n.name}" is not supported`)}function or(n){return n.weekData===null&&(n.weekData=Ur(n.c)),n.weekData}function js(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new qe({...t,...e,old:t})}function b_(n,e,t){let i=n-e*60*1e3;const s=t.offset(i);if(e===s)return[i,e];i-=(s-e)*60*1e3;const l=t.offset(i);return s===l?[i,s]:[n-Math.min(s,l)*60*1e3,Math.max(s,l)]}function Iu(n,e){n+=e*60*1e3;const t=new Date(n);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function fo(n,e,t){return b_(va(n),e,t)}function Pu(n,e){const t=n.o,i=n.c.year+Math.trunc(e.years),s=n.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,l={...n.c,year:i,month:s,day:Math.min(n.c.day,ho(i,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=tt.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),r=va(l);let[a,u]=b_(r,t,n.zone);return o!==0&&(a+=o,u=n.zone.offset(a)),{ts:a,o:u}}function Hs(n,e,t,i,s,l){const{setZone:o,zone:r}=t;if(n&&Object.keys(n).length!==0){const a=e||r,u=qe.fromObject(n,{...t,zone:a,specificOffset:l});return o?u:u.setZone(r)}else return qe.invalid(new jn("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Bl(n,e,t=!0){return n.isValid?dn.create(_t.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function rr(n,e){const t=n.c.year>9999||n.c.year<0;let i="";return t&&n.c.year>=0&&(i+="+"),i+=Dt(n.c.year,t?6:4),e?(i+="-",i+=Dt(n.c.month),i+="-",i+=Dt(n.c.day)):(i+=Dt(n.c.month),i+=Dt(n.c.day)),i}function Lu(n,e,t,i,s,l){let o=Dt(n.c.hour);return e?(o+=":",o+=Dt(n.c.minute),(n.c.second!==0||!t)&&(o+=":")):o+=Dt(n.c.minute),(n.c.second!==0||!t)&&(o+=Dt(n.c.second),(n.c.millisecond!==0||!i)&&(o+=".",o+=Dt(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!l?o+="Z":n.o<0?(o+="-",o+=Dt(Math.trunc(-n.o/60)),o+=":",o+=Dt(Math.trunc(-n.o%60))):(o+="+",o+=Dt(Math.trunc(n.o/60)),o+=":",o+=Dt(Math.trunc(n.o%60)))),l&&(o+="["+n.zone.ianaName+"]"),o}const v_={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},bv={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},vv={ordinal:1,hour:0,minute:0,second:0,millisecond:0},y_=["year","month","day","hour","minute","second","millisecond"],yv=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],kv=["year","ordinal","hour","minute","second","millisecond"];function Nu(n){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[n.toLowerCase()];if(!e)throw new Tg(n);return e}function Fu(n,e){const t=_i(e.zone,Lt.defaultZone),i=_t.fromObject(e),s=Lt.now();let l,o;if(Ge(n.year))l=s;else{for(const u of y_)Ge(n[u])&&(n[u]=v_[u]);const r=g_(n)||__(n);if(r)return qe.invalid(r);const a=t.offset(s);[l,o]=fo(n,a,t)}return new qe({ts:l,zone:t,loc:i,o})}function Ru(n,e,t){const i=Ge(t.round)?!0:t.round,s=(o,r)=>(o=ba(o,i||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(o,r)),l=o=>t.calendary?e.hasSame(n,o)?0:e.startOf(o).diff(n.startOf(o),o).get(o):e.diff(n,o).get(o);if(t.unit)return s(l(t.unit),t.unit);for(const o of t.units){const r=l(o);if(Math.abs(r)>=1)return s(r,o)}return s(n>e?-0:0,t.units[t.units.length-1])}function qu(n){let e={},t;return n.length>0&&typeof n[n.length-1]=="object"?(e=n[n.length-1],t=Array.from(n).slice(0,n.length-1)):t=Array.from(n),[e,t]}class qe{constructor(e){const t=e.zone||Lt.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new jn("invalid input"):null)||(t.isValid?null:zl(t));this.ts=Ge(e.ts)?Lt.now():e.ts;let s=null,l=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,l]=[e.old.c,e.old.o];else{const r=t.offset(this.ts);s=Iu(this.ts,r),i=Number.isNaN(s.year)?new jn("invalid input"):null,s=i?null:s,l=i?null:r}this._zone=t,this.loc=e.loc||_t.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=l,this.isLuxonDateTime=!0}static now(){return new qe({})}static local(){const[e,t]=qu(arguments),[i,s,l,o,r,a,u]=t;return Fu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static utc(){const[e,t]=qu(arguments),[i,s,l,o,r,a,u]=t;return e.zone=nn.utcInstance,Fu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const i=O1(e)?e.valueOf():NaN;if(Number.isNaN(i))return qe.invalid("invalid input");const s=_i(t.zone,Lt.defaultZone);return s.isValid?new qe({ts:i,zone:s,loc:_t.fromObject(t)}):qe.invalid(zl(s))}static fromMillis(e,t={}){if(Ji(e))return e<-Au||e>Au?qe.invalid("Timestamp out of range"):new qe({ts:e,zone:_i(t.zone,Lt.defaultZone),loc:_t.fromObject(t)});throw new Dn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(Ji(e))return new qe({ts:e*1e3,zone:_i(t.zone,Lt.defaultZone),loc:_t.fromObject(t)});throw new Dn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=_i(t.zone,Lt.defaultZone);if(!i.isValid)return qe.invalid(zl(i));const s=Lt.now(),l=Ge(t.specificOffset)?i.offset(s):t.specificOffset,o=_o(e,Nu),r=!Ge(o.ordinal),a=!Ge(o.year),u=!Ge(o.month)||!Ge(o.day),f=a||u,c=o.weekYear||o.weekNumber,d=_t.fromObject(t);if((f||r)&&c)throw new Zs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&r)throw new Zs("Can't mix ordinal dates with month/day");const m=c||o.weekday&&!f;let h,g,b=Iu(s,l);m?(h=yv,g=bv,b=Ur(b)):r?(h=kv,g=vv,b=sr(b)):(h=y_,g=v_);let k=!1;for(const E of h){const P=o[E];Ge(P)?k?o[E]=g[E]:o[E]=b[E]:k=!0}const y=m?gv(o):r?_v(o):g_(o),T=y||__(o);if(T)return qe.invalid(T);const $=m?Ou(o):r?Eu(o):o,[M,C]=fo($,l,i),D=new qe({ts:M,zone:i,o:C,loc:d});return o.weekday&&f&&e.weekday!==D.weekday?qe.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${D.toISO()}`):D}static fromISO(e,t={}){const[i,s]=N0(e);return Hs(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,s]=F0(e);return Hs(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,s]=R0(e);return Hs(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(Ge(e)||Ge(t))throw new Dn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:l=null}=i,o=_t.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),[r,a,u,f]=hv(o,e,t);return f?qe.invalid(f):Hs(r,a,i,`format ${t}`,e,u)}static fromString(e,t,i={}){return qe.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,s]=U0(e);return Hs(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new Dn("need to specify a reason the DateTime is invalid");const i=e instanceof jn?e:new jn(e,t);if(Lt.throwOnInvalid)throw new S1(i);return new qe({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?or(this).weekYear:NaN}get weekNumber(){return this.isValid?or(this).weekNumber:NaN}get weekday(){return this.isValid?or(this).weekday:NaN}get ordinal(){return this.isValid?sr(this.c).ordinal:NaN}get monthShort(){return this.isValid?Vl.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Vl.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Vl.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Vl.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return $l(this.year)}get daysInMonth(){return ho(this.year,this.month)}get daysInYear(){return this.isValid?xs(this.year):NaN}get weeksInWeekYear(){return this.isValid?go(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:s}=dn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(nn.instance(e),t)}toLocal(){return this.setZone(Lt.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=_i(e,Lt.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||i){const l=e.offset(this.ts),o=this.toObject();[s]=fo(o,l,e)}return js(this,{ts:s,zone:e})}else return qe.invalid(zl(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return js(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=_o(e,Nu),i=!Ge(t.weekYear)||!Ge(t.weekNumber)||!Ge(t.weekday),s=!Ge(t.ordinal),l=!Ge(t.year),o=!Ge(t.month)||!Ge(t.day),r=l||o,a=t.weekYear||t.weekNumber;if((r||s)&&a)throw new Zs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new Zs("Can't mix ordinal dates with month/day");let u;i?u=Ou({...Ur(this.c),...t}):Ge(t.ordinal)?(u={...this.toObject(),...t},Ge(t.day)&&(u.day=Math.min(ho(u.year,u.month),u.day))):u=Eu({...sr(this.c),...t});const[f,c]=fo(u,this.o,this.zone);return js(this,{ts:f,o:c})}plus(e){if(!this.isValid)return this;const t=tt.fromDurationLike(e);return js(this,Pu(this,t))}minus(e){if(!this.isValid)return this;const t=tt.fromDurationLike(e).negate();return js(this,Pu(this,t))}startOf(e){if(!this.isValid)return this;const t={},i=tt.normalizeUnit(e);switch(i){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0;break}if(i==="weeks"&&(t.weekday=1),i==="quarters"){const s=Math.ceil(this.month/3);t.month=(s-1)*3+1}return this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?dn.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):lr}toLocaleString(e=qr,t={}){return this.isValid?dn.create(this.loc.clone(t),e).formatDateTime(this):lr}toLocaleParts(e={}){return this.isValid?dn.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:l=!1}={}){if(!this.isValid)return null;const o=e==="extended";let r=rr(this,o);return r+="T",r+=Lu(this,o,t,i,s,l),r}toISODate({format:e="extended"}={}){return this.isValid?rr(this,e==="extended"):null}toISOWeekDate(){return Bl(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:l=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+Lu(this,o==="extended",t,e,i,l):null}toRFC2822(){return Bl(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Bl(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?rr(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(i&&(s+=" "),t?s+="z":e&&(s+="ZZ")),Bl(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():lr}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",i={}){if(!this.isValid||!e.isValid)return tt.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=E1(t).map(tt.normalizeUnit),o=e.valueOf()>this.valueOf(),r=o?this:e,a=o?e:this,u=x0(r,a,l,s);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(qe.now(),e,t)}until(e){return this.isValid?vt.fromDateTimes(this,e):this}hasSame(e,t){if(!this.isValid)return!1;const i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t)<=i&&i<=s.endOf(t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||qe.fromObject({},{zone:this.zone}),i=e.padding?thist.valueOf(),Math.min)}static max(...e){if(!e.every(qe.isDateTime))throw new Dn("max requires all arguments be DateTimes");return hu(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:s=null,numberingSystem:l=null}=i,o=_t.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0});return f_(o,e,t)}static fromStringExplain(e,t,i={}){return qe.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return qr}static get DATE_MED(){return $g}static get DATE_MED_WITH_WEEKDAY(){return C1}static get DATE_FULL(){return Cg}static get DATE_HUGE(){return Mg}static get TIME_SIMPLE(){return Dg}static get TIME_WITH_SECONDS(){return Og}static get TIME_WITH_SHORT_OFFSET(){return Eg}static get TIME_WITH_LONG_OFFSET(){return Ag}static get TIME_24_SIMPLE(){return Ig}static get TIME_24_WITH_SECONDS(){return Pg}static get TIME_24_WITH_SHORT_OFFSET(){return Lg}static get TIME_24_WITH_LONG_OFFSET(){return Ng}static get DATETIME_SHORT(){return Fg}static get DATETIME_SHORT_WITH_SECONDS(){return Rg}static get DATETIME_MED(){return qg}static get DATETIME_MED_WITH_SECONDS(){return jg}static get DATETIME_MED_WITH_WEEKDAY(){return M1}static get DATETIME_FULL(){return Hg}static get DATETIME_FULL_WITH_SECONDS(){return Vg}static get DATETIME_HUGE(){return zg}static get DATETIME_HUGE_WITH_SECONDS(){return Bg}}function Vs(n){if(qe.isDateTime(n))return n;if(n&&n.valueOf&&Ji(n.valueOf()))return qe.fromJSDate(n);if(n&&typeof n=="object")return qe.fromObject(n);throw new Dn(`Unknown datetime argument: ${n}, of type ${typeof n}`)}const wv=[".jpg",".jpeg",".png",".svg",".gif",".jfif",".webp",".avif"],Sv=[".mp4",".avi",".mov",".3gp",".wmv"],Tv=[".aa",".aac",".m4v",".mp3",".ogg",".oga",".mogg",".amr"],$v=[".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odp",".odt",".ods",".txt"];class z{static isObject(e){return e!==null&&typeof e=="object"&&e.constructor===Object}static isEmpty(e){return e===""||e===null||e==="00000000-0000-0000-0000-000000000000"||e==="0001-01-01 00:00:00.000Z"||e==="0001-01-01"||typeof e>"u"||Array.isArray(e)&&e.length===0||z.isObject(e)&&Object.keys(e).length===0}static isInput(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return t==="input"||t==="select"||t==="textarea"||e.isContentEditable}static isFocusable(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return z.isInput(e)||t==="button"||t==="a"||t==="details"||e.tabIndex>=0}static hasNonEmptyProps(e){for(let t in e)if(!z.isEmpty(e[t]))return!0;return!1}static toArray(e,t=!1){return Array.isArray(e)?e.slice():(t||!z.isEmpty(e))&&typeof e<"u"?[e]:[]}static inArray(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t)return!0;return!1}static removeByValue(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t){e.splice(i,1);break}}static pushUnique(e,t){z.inArray(e,t)||e.push(t)}static findByKey(e,t,i){e=Array.isArray(e)?e:[];for(let s in e)if(e[s][t]==i)return e[s];return null}static groupByKey(e,t){e=Array.isArray(e)?e:[];const i={};for(let s in e)i[e[s][t]]=i[e[s][t]]||[],i[e[s][t]].push(e[s]);return i}static removeByKey(e,t,i){for(let s in e)if(e[s][t]==i){e.splice(s,1);break}}static pushOrReplaceByKey(e,t,i="id"){for(let s=e.length-1;s>=0;s--)if(e[s][i]==t[i]){e[s]=t;return}e.push(t)}static filterDuplicatesByKey(e,t="id"){e=Array.isArray(e)?e:[];const i={};for(const s of e)i[s[t]]=s;return Object.values(i)}static filterRedactedProps(e,t="******"){const i=JSON.parse(JSON.stringify(e||{}));for(let s in i)typeof i[s]=="object"&&i[s]!==null?i[s]=z.filterRedactedProps(i[s],t):i[s]===t&&delete i[s];return i}static getNestedVal(e,t,i=null,s="."){let l=e||{},o=(t||"").split(s);for(const r of o){if(!z.isObject(l)&&!Array.isArray(l)||typeof l[r]>"u")return i;l=l[r]}return l}static setByPath(e,t,i,s="."){if(e===null||typeof e!="object"){console.warn("setByPath: data not an object or array.");return}let l=e,o=t.split(s),r=o.pop();for(const a of o)(!z.isObject(l)&&!Array.isArray(l)||!z.isObject(l[a])&&!Array.isArray(l[a]))&&(l[a]={}),l=l[a];l[r]=i}static deleteByPath(e,t,i="."){let s=e||{},l=(t||"").split(i),o=l.pop();for(const r of l)(!z.isObject(s)&&!Array.isArray(s)||!z.isObject(s[r])&&!Array.isArray(s[r]))&&(s[r]={}),s=s[r];Array.isArray(s)?s.splice(o,1):z.isObject(s)&&delete s[o],l.length>0&&(Array.isArray(s)&&!s.length||z.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||z.isObject(e)&&Object.keys(e).length>0)&&z.deleteByPath(e,l.join(i),i)}static randomString(e){e=e||10;let t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s{console.warn("Failed to copy.",i)})}static downloadJson(e,t){const i="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e,null,2)),s=document.createElement("a");s.setAttribute("href",i),s.setAttribute("download",t+".json"),s.click(),s.remove()}static getJWTPayload(e){const t=(e||"").split(".")[1]||"";if(t==="")return{};try{const i=decodeURIComponent(atob(t));return JSON.parse(i)||{}}catch(i){console.warn("Failed to parse JWT payload data.",i)}return{}}static hasImageExtension(e){return!!wv.find(t=>e.toLowerCase().endsWith(t))}static hasVideoExtension(e){return!!Sv.find(t=>e.toLowerCase().endsWith(t))}static hasAudioExtension(e){return!!Tv.find(t=>e.toLowerCase().endsWith(t))}static hasDocumentExtension(e){return!!$v.find(t=>e.toLowerCase().endsWith(t))}static getFileType(e){return z.hasImageExtension(e)?"image":z.hasDocumentExtension(e)?"document":z.hasVideoExtension(e)?"video":z.hasAudioExtension(e)?"audio":"file"}static generateThumb(e,t=100,i=100){return new Promise(s=>{let l=new FileReader;l.onload=function(o){let r=new Image;r.onload=function(){let a=document.createElement("canvas"),u=a.getContext("2d"),f=r.width,c=r.height;return a.width=t,a.height=i,u.drawImage(r,f>c?(f-c)/2:0,0,f>c?c:f,f>c?c:f,0,0,t,i),s(a.toDataURL(e.type))},r.src=o.target.result},l.readAsDataURL(e)})}static addValueToFormData(e,t,i){if(!(typeof i>"u"))if(z.isEmpty(i))e.append(t,"");else if(Array.isArray(i))for(const s of i)z.addValueToFormData(e,t,s);else i instanceof File?e.append(t,i):i instanceof Date?e.append(t,i.toISOString()):z.isObject(i)?e.append(t,JSON.stringify(i)):e.append(t,""+i)}static dummyCollectionRecord(e){var s,l,o,r,a;const t=(e==null?void 0:e.schema)||[],i={id:"RECORD_ID",collectionId:e==null?void 0:e.id,collectionName:e==null?void 0:e.name,created:"2022-01-01 01:00:00.123Z",updated:"2022-01-01 23:59:59.456Z"};e!=null&&e.isAuth&&(i.username="username123",i.verified=!1,i.emailVisibility=!0,i.email="test@example.com");for(const u of t){let f=null;u.type==="number"?f=123:u.type==="date"?f="2022-01-01 10:00:00.123Z":u.type==="bool"?f=!0:u.type==="email"?f="test@example.com":u.type==="url"?f="https://example.com":u.type==="json"?f="JSON":u.type==="file"?(f="filename.jpg",((s=u.options)==null?void 0:s.maxSelect)!==1&&(f=[f])):u.type==="select"?(f=(o=(l=u.options)==null?void 0:l.values)==null?void 0:o[0],((r=u.options)==null?void 0:r.maxSelect)!==1&&(f=[f])):u.type==="relation"?(f="RELATION_RECORD_ID",((a=u.options)==null?void 0:a.maxSelect)!==1&&(f=[f])):f="test",i[u.name]=f}return i}static dummyCollectionSchemaData(e){var s,l,o,r;const t=(e==null?void 0:e.schema)||[],i={};for(const a of t){let u=null;if(a.type==="number")u=123;else if(a.type==="date")u="2022-01-01 10:00:00.123Z";else if(a.type==="bool")u=!0;else if(a.type==="email")u="test@example.com";else if(a.type==="url")u="https://example.com";else if(a.type==="json")u="JSON";else{if(a.type==="file")continue;a.type==="select"?(u=(l=(s=a.options)==null?void 0:s.values)==null?void 0:l[0],((o=a.options)==null?void 0:o.maxSelect)!==1&&(u=[u])):a.type==="relation"?(u="RELATION_RECORD_ID",((r=a.options)==null?void 0:r.maxSelect)!==1&&(u=[u])):u="test"}i[a.name]=u}return i}static getCollectionTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"auth":return"ri-group-line";case"view":return"ri-terminal-box-line";default:return"ri-folder-2-line"}}static getFieldTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"primary":return"ri-key-line";case"text":return"ri-text";case"number":return"ri-hashtag";case"date":return"ri-calendar-line";case"bool":return"ri-toggle-line";case"email":return"ri-mail-line";case"url":return"ri-link";case"editor":return"ri-edit-2-line";case"select":return"ri-list-check";case"json":return"ri-braces-line";case"file":return"ri-image-line";case"relation":return"ri-mind-map";case"user":return"ri-user-line";default:return"ri-star-s-line"}}static getFieldValueType(e){var t;switch(e==null?void 0:e.type){case"bool":return"Boolean";case"number":return"Number";case"file":return"File";case"select":case"relation":return((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)===1?"String":"Array";default:return"String"}}static zeroDefaultStr(e){var t;return(e==null?void 0:e.type)==="number"?"0":(e==null?void 0:e.type)==="bool"?"false":(e==null?void 0:e.type)==="json"?'null, "", [], {}':["select","relation","file"].includes(e==null?void 0:e.type)&&((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)!=1?"[]":'""'}static getApiExampleUrl(e){return(window.location.href.substring(0,window.location.href.indexOf("/_"))||e||"/").replace("//localhost","//127.0.0.1")}static hasCollectionChanges(e,t,i=!1){if(e=e||{},t=t||{},e.id!=t.id)return!0;for(let u in e)if(u!=="schema"&&JSON.stringify(e[u])!==JSON.stringify(t[u]))return!0;const s=Array.isArray(e.schema)?e.schema:[],l=Array.isArray(t.schema)?t.schema:[],o=s.filter(u=>(u==null?void 0:u.id)&&!z.findByKey(l,"id",u.id)),r=l.filter(u=>(u==null?void 0:u.id)&&!z.findByKey(s,"id",u.id)),a=l.filter(u=>{const f=z.isObject(u)&&z.findByKey(s,"id",u.id);if(!f)return!1;for(let c in f)if(JSON.stringify(u[c])!=JSON.stringify(f[c]))return!0;return!1});return!!(r.length||a.length||i&&o.length)}static sortCollections(e=[]){const t=[],i=[],s=[];for(const l of e)l.type==="auth"?t.push(l):l.type==="base"?i.push(l):s.push(l);return[].concat(t,i,s)}static yieldToMain(){return new Promise(e=>{setTimeout(e,0)})}static defaultFlatpickrOptions(){return{dateFormat:"Y-m-d H:i:S",disableMobile:!0,allowInput:!0,enableTime:!0,time_24hr:!0,locale:{firstDayOfWeek:1}}}static defaultEditorOptions(){return{branding:!1,promotion:!1,menubar:!1,min_height:270,height:270,max_height:700,autoresize_bottom_margin:30,skin:"pocketbase",content_style:"body { font-size: 14px }",plugins:["autoresize","autolink","lists","link","image","searchreplace","fullscreen","media","table","code","codesample"],toolbar:"undo redo | styles | alignleft aligncenter alignright | bold italic forecolor backcolor | bullist numlist | link image table codesample | code fullscreen",file_picker_types:"image",file_picker_callback:(e,t,i)=>{const s=document.createElement("input");s.setAttribute("type","file"),s.setAttribute("accept","image/*"),s.addEventListener("change",l=>{const o=l.target.files[0],r=new FileReader;r.addEventListener("load",()=>{if(!tinymce)return;const a="blobid"+new Date().getTime(),u=tinymce.activeEditor.editorUpload.blobCache,f=r.result.split(",")[1],c=u.create(a,o,f);u.add(c),e(c.blobUri(),{title:o.name})}),r.readAsDataURL(o)}),s.click()}}}static displayValue(e,t,i="N/A"){e=e||{},t=t||[];let s=[];for(const o of t){let r=e[o];typeof r>"u"||(z.isEmpty(r)?s.push(i):typeof r=="boolean"?s.push(r?"True":"False"):typeof r=="string"?(r=r.indexOf("<")>=0?z.plainText(r):r,s.push(z.truncate(r))):s.push(r))}if(s.length>0)return s.join(", ");const l=["title","name","email","username","heading","label","key","id"];for(const o of l)if(!z.isEmpty(e[o]))return e[o];return i}static extractColumnsFromQuery(e){var o;const t="__GROUP__";e=(e||"").replace(/\([\s\S]+?\)/gm,t).replace(/[\t\r\n]|(?:\s\s)+/g," ");const i=e.match(/select\s+([\s\S]+)\s+from/),s=((o=i==null?void 0:i[1])==null?void 0:o.split(","))||[],l=[];for(let r of s){const a=r.trim().split(" ").pop();a!=""&&a!=t&&l.push(a)}return l}static getAllCollectionIdentifiers(e,t=""){if(!e)return;let i=[t+"id"];if(e.isView)for(let l of z.extractColumnsFromQuery(e.options.query))z.pushUnique(i,t+l);else e.isAuth?(i.push(t+"username"),i.push(t+"email"),i.push(t+"emailVisibility"),i.push(t+"verified"),i.push(t+"created"),i.push(t+"updated")):(i.push(t+"created"),i.push(t+"updated"));const s=e.schema||[];for(const l of s)z.pushUnique(i,t+l.name);return i}}const Vo=Ln([]);function k_(n,e=4e3){return zo(n,"info",e)}function zt(n,e=3e3){return zo(n,"success",e)}function cl(n,e=4500){return zo(n,"error",e)}function Cv(n,e=4500){return zo(n,"warning",e)}function zo(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{w_(i)},t)};Vo.update(s=>(Ca(s,i.message),z.pushOrReplaceByKey(s,i,"message"),s))}function w_(n){Vo.update(e=>(Ca(e,n),e))}function $a(){Vo.update(n=>{for(let e of n)Ca(n,e);return[]})}function Ca(n,e){let t;typeof e=="string"?t=z.findByKey(n,"message",e):t=e,t&&(clearTimeout(t.timeout),z.removeByKey(n,"message",t.message))}const fi=Ln({});function Bn(n){fi.set(n||{})}function Qi(n){fi.update(e=>(z.deleteByPath(e,n),e))}const Ma=Ln({});function Wr(n){Ma.set(n||{})}ga.prototype.logout=function(n=!0){this.authStore.clear(),n&&Di("/login")};ga.prototype.errorResponseHandler=function(n,e=!0,t=""){if(!n||!(n instanceof Error)||n.isAbort)return;const i=(n==null?void 0:n.status)<<0||400,s=(n==null?void 0:n.data)||{};if(e&&i!==404){let l=s.message||n.message||t;l&&cl(l)}if(z.isEmpty(s.data)||Bn(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),Di("/")};class Mv extends wg{save(e,t){super.save(e,t),t instanceof Xi&&Wr(t)}clear(){super.clear(),Wr(null)}}const pe=new ga("../",new Mv("pb_admin_auth"));pe.authStore.model instanceof Xi&&Wr(pe.authStore.model);function Dv(n){let e,t,i,s,l,o,r,a,u,f,c,d;const m=n[3].default,h=Nt(m,n,n[2],null);return{c(){e=v("div"),t=v("main"),h&&h.c(),i=O(),s=v("footer"),l=v("a"),l.innerHTML='Docs',o=O(),r=v("span"),r.textContent="|",a=O(),u=v("a"),f=v("span"),f.textContent="PocketBase v0.13.0",p(t,"class","page-content"),p(l,"href","https://pocketbase.io/docs/"),p(l,"target","_blank"),p(l,"rel","noopener noreferrer"),p(r,"class","delimiter"),p(f,"class","txt"),p(u,"href","https://github.com/pocketbase/pocketbase/releases"),p(u,"target","_blank"),p(u,"rel","noopener noreferrer"),p(u,"title","Releases"),p(s,"class","page-footer"),p(e,"class",c="page-wrapper "+n[1]),Q(e,"center-content",n[0])},m(g,b){S(g,e,b),_(e,t),h&&h.m(t,null),_(e,i),_(e,s),_(s,l),_(s,o),_(s,r),_(s,a),_(s,u),_(u,f),d=!0},p(g,[b]){h&&h.p&&(!d||b&4)&&Rt(h,m,g,g[2],d?Ft(m,g[2],b,null):qt(g[2]),null),(!d||b&2&&c!==(c="page-wrapper "+g[1]))&&p(e,"class",c),(!d||b&3)&&Q(e,"center-content",g[0])},i(g){d||(A(h,g),d=!0)},o(g){I(h,g),d=!1},d(g){g&&w(e),h&&h.d(g)}}}function Ov(n,e,t){let{$$slots:i={},$$scope:s}=e,{center:l=!1}=e,{class:o=""}=e;return n.$$set=r=>{"center"in r&&t(0,l=r.center),"class"in r&&t(1,o=r.class),"$$scope"in r&&t(2,s=r.$$scope)},[l,o,s,i]}class wn extends ye{constructor(e){super(),ve(this,e,Ov,Dv,he,{center:0,class:1})}}function ju(n){let e,t,i;return{c(){e=v("div"),e.innerHTML=``,t=O(),i=v("div"),p(e,"class","block txt-center m-b-lg"),p(i,"class","clearfix")},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},d(s){s&&w(e),s&&w(t),s&&w(i)}}}function Ev(n){let e,t,i,s=!n[0]&&ju();const l=n[1].default,o=Nt(l,n,n[2],null);return{c(){e=v("div"),s&&s.c(),t=O(),o&&o.c(),p(e,"class","wrapper wrapper-sm m-b-xl panel-wrapper svelte-lxxzfu")},m(r,a){S(r,e,a),s&&s.m(e,null),_(e,t),o&&o.m(e,null),i=!0},p(r,a){r[0]?s&&(s.d(1),s=null):s||(s=ju(),s.c(),s.m(e,t)),o&&o.p&&(!i||a&4)&&Rt(o,l,r,r[2],i?Ft(l,r[2],a,null):qt(r[2]),null)},i(r){i||(A(o,r),i=!0)},o(r){I(o,r),i=!1},d(r){r&&w(e),s&&s.d(),o&&o.d(r)}}}function Av(n){let e,t;return e=new wn({props:{class:"full-page",center:!0,$$slots:{default:[Ev]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,[s]){const l={};s&5&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function Iv(n,e,t){let{$$slots:i={},$$scope:s}=e,{nobranding:l=!1}=e;return n.$$set=o=>{"nobranding"in o&&t(0,l=o.nobranding),"$$scope"in o&&t(2,s=o.$$scope)},[l,i,s]}class S_ extends ye{constructor(e){super(),ve(this,e,Iv,Av,he,{nobranding:0})}}function Hu(n,e,t){const i=n.slice();return i[11]=e[t],i}const Pv=n=>({}),Vu=n=>({uniqueId:n[3]});function Lv(n){let e=(n[11]||bo)+"",t;return{c(){t=B(e)},m(i,s){S(i,t,s)},p(i,s){s&4&&e!==(e=(i[11]||bo)+"")&&le(t,e)},d(i){i&&w(t)}}}function Nv(n){var s,l;let e,t=(((s=n[11])==null?void 0:s.message)||((l=n[11])==null?void 0:l.code)||bo)+"",i;return{c(){e=v("pre"),i=B(t)},m(o,r){S(o,e,r),_(e,i)},p(o,r){var a,u;r&4&&t!==(t=(((a=o[11])==null?void 0:a.message)||((u=o[11])==null?void 0:u.code)||bo)+"")&&le(i,t)},d(o){o&&w(e)}}}function zu(n){let e,t;function i(o,r){return typeof o[11]=="object"?Nv:Lv}let s=i(n),l=s(n);return{c(){e=v("div"),l.c(),t=O(),p(e,"class","help-block help-block-error")},m(o,r){S(o,e,r),l.m(e,null),_(e,t)},p(o,r){s===(s=i(o))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,t)))},d(o){o&&w(e),l.d()}}}function Fv(n){let e,t,i,s,l;const o=n[7].default,r=Nt(o,n,n[6],Vu);let a=n[2],u=[];for(let f=0;ft(5,i=h));let{$$slots:s={},$$scope:l}=e;const o="field_"+z.randomString(7);let{name:r=""}=e,{class:a=void 0}=e,u,f=[];function c(){Qi(r)}Zt(()=>(u.addEventListener("input",c),u.addEventListener("change",c),()=>{u.removeEventListener("input",c),u.removeEventListener("change",c)}));function d(h){ze.call(this,n,h)}function m(h){ie[h?"unshift":"push"](()=>{u=h,t(1,u)})}return n.$$set=h=>{"name"in h&&t(4,r=h.name),"class"in h&&t(0,a=h.class),"$$scope"in h&&t(6,l=h.$$scope)},n.$$.update=()=>{n.$$.dirty&48&&t(2,f=z.toArray(z.getNestedVal(i,r)))},[a,u,f,o,r,i,l,s,d,m]}class me extends ye{constructor(e){super(),ve(this,e,Rv,Fv,he,{name:4,class:0})}}function qv(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Email"),s=O(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","email"),p(l,"autocomplete","off"),p(l,"id",o=n[9]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0]),l.focus(),r||(a=Y(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&l.value!==u[0]&&ce(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function jv(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Password"),s=O(),l=v("input"),r=O(),a=v("div"),a.textContent="Minimum 10 characters.",p(e,"for",i=n[9]),p(l,"type","password"),p(l,"autocomplete","new-password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),ce(l,n[1]),S(c,r,d),S(c,a,d),u||(f=Y(l,"input",n[6]),u=!0)},p(c,d){d&512&&i!==(i=c[9])&&p(e,"for",i),d&512&&o!==(o=c[9])&&p(l,"id",o),d&2&&l.value!==c[1]&&ce(l,c[1])},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function Hv(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Password confirm"),s=O(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[2]),r||(a=Y(l,"input",n[7]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&4&&l.value!==u[2]&&ce(l,u[2])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function Vv(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;return s=new me({props:{class:"form-field required",name:"email",$$slots:{default:[qv,({uniqueId:h})=>({9:h}),({uniqueId:h})=>h?512:0]},$$scope:{ctx:n}}}),o=new me({props:{class:"form-field required",name:"password",$$slots:{default:[jv,({uniqueId:h})=>({9:h}),({uniqueId:h})=>h?512:0]},$$scope:{ctx:n}}}),a=new me({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[Hv,({uniqueId:h})=>({9:h}),({uniqueId:h})=>h?512:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

    Create your first admin account in order to continue

    ",i=O(),H(s.$$.fragment),l=O(),H(o.$$.fragment),r=O(),H(a.$$.fragment),u=O(),f=v("button"),f.innerHTML=`Create and login + `,p(t,"class","content txt-center m-b-base"),p(f,"type","submit"),p(f,"class","btn btn-lg btn-block btn-next"),Q(f,"btn-disabled",n[3]),Q(f,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(h,g){S(h,e,g),_(e,t),_(e,i),q(s,e,null),_(e,l),q(o,e,null),_(e,r),q(a,e,null),_(e,u),_(e,f),c=!0,d||(m=Y(e,"submit",dt(n[4])),d=!0)},p(h,[g]){const b={};g&1537&&(b.$$scope={dirty:g,ctx:h}),s.$set(b);const k={};g&1538&&(k.$$scope={dirty:g,ctx:h}),o.$set(k);const y={};g&1540&&(y.$$scope={dirty:g,ctx:h}),a.$set(y),(!c||g&8)&&Q(f,"btn-disabled",h[3]),(!c||g&8)&&Q(f,"btn-loading",h[3])},i(h){c||(A(s.$$.fragment,h),A(o.$$.fragment,h),A(a.$$.fragment,h),c=!0)},o(h){I(s.$$.fragment,h),I(o.$$.fragment,h),I(a.$$.fragment,h),c=!1},d(h){h&&w(e),j(s),j(o),j(a),d=!1,m()}}}function zv(n,e,t){const i=Ct();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await pe.admins.create({email:s,password:l,passwordConfirm:o}),await pe.admins.authWithPassword(s,l),i("submit")}catch(d){pe.errorResponseHandler(d)}t(3,r=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function c(){o=this.value,t(2,o)}return[s,l,o,r,a,u,f,c]}class Bv extends ye{constructor(e){super(),ve(this,e,zv,Vv,he,{})}}function Bu(n){let e,t;return e=new S_({props:{$$slots:{default:[Uv]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function Uv(n){let e,t;return e=new Bv({}),e.$on("submit",n[1]),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p:Z,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function Wv(n){let e,t,i=n[0]&&Bu(n);return{c(){i&&i.c(),e=Me()},m(s,l){i&&i.m(s,l),S(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&A(i,1)):(i=Bu(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(ae(),I(i,1,1,()=>{i=null}),ue())},i(s){t||(A(i),t=!0)},o(s){I(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function Yv(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){pe.logout(!1),t(0,i=!0);return}pe.authStore.isValid?Di("/collections"):pe.logout()}return[i,async()=>{t(0,i=!1),await sn(),window.location.search=""}]}class Kv extends ye{constructor(e){super(),ve(this,e,Yv,Wv,he,{})}}const St=Ln(""),vo=Ln(""),$s=Ln(!1);function Bo(n){const e=n-1;return e*e*e+1}function yo(n,{delay:e=0,duration:t=400,easing:i=kl}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function An(n,{delay:e=0,duration:t=400,easing:i=Bo,x:s=0,y:l=0,opacity:o=0}={}){const r=getComputedStyle(n),a=+r.opacity,u=r.transform==="none"?"":r.transform,f=a*(1-o);return{delay:e,duration:t,easing:i,css:(c,d)=>` + transform: ${u} translate(${(1-c)*s}px, ${(1-c)*l}px); + opacity: ${a-f*d}`}}function At(n,{delay:e=0,duration:t=400,easing:i=Bo}={}){const s=getComputedStyle(n),l=+s.opacity,o=parseFloat(s.height),r=parseFloat(s.paddingTop),a=parseFloat(s.paddingBottom),u=parseFloat(s.marginTop),f=parseFloat(s.marginBottom),c=parseFloat(s.borderTopWidth),d=parseFloat(s.borderBottomWidth);return{delay:e,duration:t,easing:i,css:m=>`overflow: hidden;opacity: ${Math.min(m*20,1)*l};height: ${m*o}px;padding-top: ${m*r}px;padding-bottom: ${m*a}px;margin-top: ${m*u}px;margin-bottom: ${m*f}px;border-top-width: ${m*c}px;border-bottom-width: ${m*d}px;`}}function It(n,{delay:e=0,duration:t=400,easing:i=Bo,start:s=0,opacity:l=0}={}){const o=getComputedStyle(n),r=+o.opacity,a=o.transform==="none"?"":o.transform,u=1-s,f=r*(1-l);return{delay:e,duration:t,easing:i,css:(c,d)=>` + transform: ${a} scale(${1-u*d}); + opacity: ${r-f*d} + `}}function Jv(n){let e,t,i,s;return{c(){e=v("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(l,o){S(l,e,o),n[13](e),ce(e,n[7]),i||(s=Y(e,"input",n[14]),i=!0)},p(l,o){o&3&&t!==(t=l[0]||l[1])&&p(e,"placeholder",t),o&128&&e.value!==l[7]&&ce(e,l[7])},i:Z,o:Z,d(l){l&&w(e),n[13](null),i=!1,s()}}}function Zv(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a){let u={id:a[8],singleLine:!0,disableRequestKeys:!0,disableIndirectCollectionsKeys:!0,extraAutocompleteKeys:a[3],baseCollection:a[2],placeholder:a[0]||a[1]};return a[7]!==void 0&&(u.value=a[7]),{props:u}}return o&&(e=jt(o,r(n)),ie.push(()=>ge(e,"value",l)),e.$on("submit",n[10])),{c(){e&&H(e.$$.fragment),i=Me()},m(a,u){e&&q(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u&8&&(f.extraAutocompleteKeys=a[3]),u&4&&(f.baseCollection=a[2]),u&3&&(f.placeholder=a[0]||a[1]),!t&&u&128&&(t=!0,f.value=a[7],ke(()=>t=!1)),o!==(o=a[4])){if(e){ae();const c=e;I(c.$$.fragment,1,0,()=>{j(c,1)}),ue()}o?(e=jt(o,r(a)),ie.push(()=>ge(e,"value",l)),e.$on("submit",a[10]),H(e.$$.fragment),A(e.$$.fragment,1),q(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&I(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&j(e,a)}}}function Uu(n){let e,t,i,s,l,o,r=n[7]!==n[0]&&Wu();return{c(){r&&r.c(),e=O(),t=v("button"),t.innerHTML='Clear',p(t,"type","button"),p(t,"class","btn btn-transparent btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(a,u){r&&r.m(a,u),S(a,e,u),S(a,t,u),s=!0,l||(o=Y(t,"click",n[15]),l=!0)},p(a,u){a[7]!==a[0]?r?u&129&&A(r,1):(r=Wu(),r.c(),A(r,1),r.m(e.parentNode,e)):r&&(ae(),I(r,1,1,()=>{r=null}),ue())},i(a){s||(A(r),a&&xe(()=>{i||(i=je(t,An,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){I(r),a&&(i||(i=je(t,An,{duration:150,x:5},!1)),i.run(0)),s=!1},d(a){r&&r.d(a),a&&w(e),a&&w(t),a&&i&&i.end(),l=!1,o()}}}function Wu(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Search',p(e,"type","submit"),p(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&xe(()=>{t||(t=je(e,An,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=je(e,An,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function Gv(n){let e,t,i,s,l,o,r,a,u,f;const c=[Zv,Jv],d=[];function m(g,b){return g[4]&&!g[5]?0:1}l=m(n),o=d[l]=c[l](n);let h=(n[0].length||n[7].length)&&Uu(n);return{c(){e=v("form"),t=v("label"),i=v("i"),s=O(),o.c(),r=O(),h&&h.c(),p(i,"class","ri-search-line"),p(t,"for",n[8]),p(t,"class","m-l-10 txt-xl"),p(e,"class","searchbar")},m(g,b){S(g,e,b),_(e,t),_(t,i),_(e,s),d[l].m(e,null),_(e,r),h&&h.m(e,null),a=!0,u||(f=[Y(e,"click",kn(n[11])),Y(e,"submit",dt(n[10]))],u=!0)},p(g,[b]){let k=l;l=m(g),l===k?d[l].p(g,b):(ae(),I(d[k],1,1,()=>{d[k]=null}),ue(),o=d[l],o?o.p(g,b):(o=d[l]=c[l](g),o.c()),A(o,1),o.m(e,r)),g[0].length||g[7].length?h?(h.p(g,b),b&129&&A(h,1)):(h=Uu(g),h.c(),A(h,1),h.m(e,null)):h&&(ae(),I(h,1,1,()=>{h=null}),ue())},i(g){a||(A(o),A(h),a=!0)},o(g){I(o),I(h),a=!1},d(g){g&&w(e),d[l].d(),h&&h.d(),u=!1,Pe(f)}}}function Xv(n,e,t){const i=Ct(),s="search_"+z.randomString(7);let{value:l=""}=e,{placeholder:o='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:r=new pn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function m(M=!0){t(7,d=""),M&&(c==null||c.focus()),i("clear")}function h(){t(0,l=d),i("submit",l)}async function g(){u||f||(t(5,f=!0),t(4,u=(await rt(()=>import("./FilterAutocompleteInput-80716b22.js"),["./FilterAutocompleteInput-80716b22.js","./index-a6ccb683.js"],import.meta.url)).default),t(5,f=!1))}Zt(()=>{g()});function b(M){ze.call(this,n,M)}function k(M){d=M,t(7,d),t(0,l)}function y(M){ie[M?"unshift":"push"](()=>{c=M,t(6,c)})}function T(){d=this.value,t(7,d),t(0,l)}const $=()=>{m(!1),h()};return n.$$set=M=>{"value"in M&&t(0,l=M.value),"placeholder"in M&&t(1,o=M.placeholder),"autocompleteCollection"in M&&t(2,r=M.autocompleteCollection),"extraAutocompleteKeys"in M&&t(3,a=M.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,o,r,a,u,f,c,d,s,m,h,b,k,y,T,$]}class Uo extends ye{constructor(e){super(),ve(this,e,Xv,Gv,he,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}let Yr,qi;const Kr="app-tooltip";function Yu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function ki(){return qi=qi||document.querySelector("."+Kr),qi||(qi=document.createElement("div"),qi.classList.add(Kr),document.body.appendChild(qi)),qi}function T_(n,e){let t=ki();if(!t.classList.contains("active")||!(e!=null&&e.text)){Jr();return}t.textContent=e.text,t.className=Kr+" active",e.class&&t.classList.add(e.class),e.position&&t.classList.add(e.position),t.style.top="0px",t.style.left="0px";let i=t.offsetHeight,s=t.offsetWidth,l=n.getBoundingClientRect(),o=0,r=0,a=5;e.position=="left"?(o=l.top+l.height/2-i/2,r=l.left-s-a):e.position=="right"?(o=l.top+l.height/2-i/2,r=l.right+a):e.position=="top"?(o=l.top-i-a,r=l.left+l.width/2-s/2):e.position=="top-left"?(o=l.top-i-a,r=l.left):e.position=="top-right"?(o=l.top-i-a,r=l.right-s):e.position=="bottom-left"?(o=l.top+l.height+a,r=l.left):e.position=="bottom-right"?(o=l.top+l.height+a,r=l.right-s):(o=l.top+l.height+a,r=l.left+l.width/2-s/2),r+s>document.documentElement.clientWidth&&(r=document.documentElement.clientWidth-s),r=r>=0?r:0,o+i>document.documentElement.clientHeight&&(o=document.documentElement.clientHeight-i),o=o>=0?o:0,t.style.top=o+"px",t.style.left=r+"px"}function Jr(){clearTimeout(Yr),ki().classList.remove("active"),ki().activeNode=void 0}function Qv(n,e){ki().activeNode=n,clearTimeout(Yr),Yr=setTimeout(()=>{ki().classList.add("active"),T_(n,e)},isNaN(e.delay)?0:e.delay)}function Be(n,e){let t=Yu(e);function i(){Qv(n,t)}function s(){Jr()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&z.isFocusable(n))&&n.addEventListener("click",s),ki(),{update(l){var o,r;t=Yu(l),(r=(o=ki())==null?void 0:o.activeNode)!=null&&r.contains(n)&&T_(n,t)},destroy(){var l,o;(o=(l=ki())==null?void 0:l.activeNode)!=null&&o.contains(n)&&Jr(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function xv(n){let e,t,i,s;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"aria-label","Refresh"),p(e,"class","btn btn-transparent btn-circle svelte-1bvelc2"),Q(e,"refreshing",n[1])},m(l,o){S(l,e,o),i||(s=[Ie(t=Be.call(null,e,n[0])),Y(e,"click",n[2])],i=!0)},p(l,[o]){t&&Bt(t.update)&&o&1&&t.update.call(null,l[0]),o&2&&Q(e,"refreshing",l[1])},i:Z,o:Z,d(l){l&&w(e),i=!1,Pe(s)}}}function ey(n,e,t){const i=Ct();let{tooltip:s={text:"Refresh",position:"right"}}=e,l=null;function o(){i("refresh");const r=s;t(0,s=null),clearTimeout(l),t(1,l=setTimeout(()=>{t(1,l=null),t(0,s=r)},150))}return Zt(()=>()=>clearTimeout(l)),n.$$set=r=>{"tooltip"in r&&t(0,s=r.tooltip)},[s,l,o]}class Da extends ye{constructor(e){super(),ve(this,e,ey,xv,he,{tooltip:0})}}function ty(n){let e,t,i,s,l;const o=n[6].default,r=Nt(o,n,n[5],null);return{c(){e=v("th"),r&&r.c(),p(e,"tabindex","0"),p(e,"title",n[2]),p(e,"class",t="col-sort "+n[1]),Q(e,"col-sort-disabled",n[3]),Q(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),Q(e,"sort-desc",n[0]==="-"+n[2]),Q(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){S(a,e,u),r&&r.m(e,null),i=!0,s||(l=[Y(e,"click",n[7]),Y(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&Rt(r,o,a,a[5],i?Ft(o,a[5],u,null):qt(a[5]),null),(!i||u&4)&&p(e,"title",a[2]),(!i||u&2&&t!==(t="col-sort "+a[1]))&&p(e,"class",t),(!i||u&10)&&Q(e,"col-sort-disabled",a[3]),(!i||u&7)&&Q(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&Q(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&Q(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(A(r,a),i=!0)},o(a){I(r,a),i=!1},d(a){a&&w(e),r&&r.d(a),s=!1,Pe(l)}}}function ny(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{name:o}=e,{sort:r=""}=e,{disable:a=!1}=e;function u(){a||("-"+o===r?t(0,r="+"+o):t(0,r="-"+o))}const f=()=>u(),c=d=>{(d.code==="Enter"||d.code==="Space")&&(d.preventDefault(),u())};return n.$$set=d=>{"class"in d&&t(1,l=d.class),"name"in d&&t(2,o=d.name),"sort"in d&&t(0,r=d.sort),"disable"in d&&t(3,a=d.disable),"$$scope"in d&&t(5,s=d.$$scope)},[r,l,o,a,u,s,i,f,c]}class Wt extends ye{constructor(e){super(),ve(this,e,ny,ty,he,{class:1,name:2,sort:0,disable:3})}}function iy(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function sy(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("div"),i=B(n[2]),s=O(),l=v("div"),o=B(n[1]),r=B(" UTC"),p(t,"class","date"),p(l,"class","time svelte-zdiknu"),p(e,"class","datetime svelte-zdiknu")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(e,s),_(e,l),_(l,o),_(l,r)},p(a,u){u&4&&le(i,a[2]),u&2&&le(o,a[1])},d(a){a&&w(e)}}}function ly(n){let e;function t(l,o){return l[0]?sy:iy}let i=t(n),s=i(n);return{c(){s.c(),e=Me()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:Z,o:Z,d(l){s.d(l),l&&w(e)}}}function oy(n,e,t){let i,s,{date:l=""}=e;return n.$$set=o=>{"date"in o&&t(0,l=o.date)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=l?l.substring(0,10):null),n.$$.dirty&1&&t(1,s=l?l.substring(10,19):null)},[l,s,i]}class ui extends ye{constructor(e){super(),ve(this,e,oy,ly,he,{date:0})}}const ry=n=>({}),Ku=n=>({}),ay=n=>({}),Ju=n=>({});function uy(n){let e,t,i,s,l,o,r,a;const u=n[5].before,f=Nt(u,n,n[4],Ju),c=n[5].default,d=Nt(c,n,n[4],null),m=n[5].after,h=Nt(m,n,n[4],Ku);return{c(){e=v("div"),f&&f.c(),t=O(),i=v("div"),d&&d.c(),l=O(),h&&h.c(),p(i,"class",s="horizontal-scroller "+n[0]+" "+n[3]+" svelte-wc2j9h"),p(e,"class","horizontal-scroller-wrapper svelte-wc2j9h")},m(g,b){S(g,e,b),f&&f.m(e,null),_(e,t),_(e,i),d&&d.m(i,null),n[6](i),_(e,l),h&&h.m(e,null),o=!0,r||(a=[Y(window,"resize",n[1]),Y(i,"scroll",n[1])],r=!0)},p(g,[b]){f&&f.p&&(!o||b&16)&&Rt(f,u,g,g[4],o?Ft(u,g[4],b,ay):qt(g[4]),Ju),d&&d.p&&(!o||b&16)&&Rt(d,c,g,g[4],o?Ft(c,g[4],b,null):qt(g[4]),null),(!o||b&9&&s!==(s="horizontal-scroller "+g[0]+" "+g[3]+" svelte-wc2j9h"))&&p(i,"class",s),h&&h.p&&(!o||b&16)&&Rt(h,m,g,g[4],o?Ft(m,g[4],b,ry):qt(g[4]),Ku)},i(g){o||(A(f,g),A(d,g),A(h,g),o=!0)},o(g){I(f,g),I(d,g),I(h,g),o=!1},d(g){g&&w(e),f&&f.d(g),d&&d.d(g),n[6](null),h&&h.d(g),r=!1,Pe(a)}}}function fy(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,o=null,r="",a=null,u;function f(){o&&(clearTimeout(a),a=setTimeout(()=>{const d=o.offsetWidth,m=o.scrollWidth;m-d?(t(3,r="scrollable"),o.scrollLeft===0?t(3,r+=" scroll-start"):o.scrollLeft+d==m&&t(3,r+=" scroll-end")):t(3,r="")},100))}Zt(()=>(f(),u=new MutationObserver(()=>{f()}),u.observe(o,{attributeFilter:["width"],childList:!0,subtree:!0}),()=>{u==null||u.disconnect(),clearTimeout(a)}));function c(d){ie[d?"unshift":"push"](()=>{o=d,t(2,o)})}return n.$$set=d=>{"class"in d&&t(0,l=d.class),"$$scope"in d&&t(4,s=d.$$scope)},[l,f,o,r,s,i,c]}class Oa extends ye{constructor(e){super(),ve(this,e,fy,uy,he,{class:0,refresh:1})}get refresh(){return this.$$.ctx[1]}}function Zu(n,e,t){const i=n.slice();return i[23]=e[t],i}function cy(n){let e;return{c(){e=v("div"),e.innerHTML=` + method`,p(e,"class","col-header-content")},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function dy(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="url",p(t,"class",z.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:Z,d(l){l&&w(e)}}}function py(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="referer",p(t,"class",z.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:Z,d(l){l&&w(e)}}}function my(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="User IP",p(t,"class",z.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:Z,d(l){l&&w(e)}}}function hy(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="status",p(t,"class",z.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:Z,d(l){l&&w(e)}}}function gy(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="created",p(t,"class",z.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:Z,d(l){l&&w(e)}}}function Gu(n){let e;function t(l,o){return l[6]?by:_y}let i=t(n),s=i(n);return{c(){s.c(),e=Me()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function _y(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&Xu(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No logs found.",s=O(),o&&o.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(t,s),o&&o.m(t,null),_(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=Xu(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function by(n){let e;return{c(){e=v("tr"),e.innerHTML=` + `},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function Xu(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=Y(e,"click",n[19]),t=!0)},p:Z,d(s){s&&w(e),t=!1,i()}}}function Qu(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),p(e,"title","Error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function xu(n,e){var Se,We,lt;let t,i,s,l=((Se=e[23].method)==null?void 0:Se.toUpperCase())+"",o,r,a,u,f,c=e[23].url+"",d,m,h,g,b,k,y=(e[23].referer||"N/A")+"",T,$,M,C,D,E=(e[23].userIp||"N/A")+"",P,L,N,F,R,X=e[23].status+"",se,W,G,te,K,re,J,de,_e,$e,Ne=(((We=e[23].meta)==null?void 0:We.errorMessage)||((lt=e[23].meta)==null?void 0:lt.errorData))&&Qu();te=new ui({props:{date:e[23].created}});function Re(){return e[17](e[23])}function be(...fe){return e[18](e[23],...fe)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("span"),o=B(l),a=O(),u=v("td"),f=v("span"),d=B(c),h=O(),Ne&&Ne.c(),g=O(),b=v("td"),k=v("span"),T=B(y),M=O(),C=v("td"),D=v("span"),P=B(E),N=O(),F=v("td"),R=v("span"),se=B(X),W=O(),G=v("td"),H(te.$$.fragment),K=O(),re=v("td"),re.innerHTML='',J=O(),p(s,"class",r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]),p(i,"class","col-type-text col-field-method min-width"),p(f,"class","txt txt-ellipsis"),p(f,"title",m=e[23].url),p(u,"class","col-type-text col-field-url"),p(k,"class","txt txt-ellipsis"),p(k,"title",$=e[23].referer),Q(k,"txt-hint",!e[23].referer),p(b,"class","col-type-text col-field-referer"),p(D,"class","txt txt-ellipsis"),p(D,"title",L=e[23].userIp),Q(D,"txt-hint",!e[23].userIp),p(C,"class","col-type-number col-field-userIp"),p(R,"class","label"),Q(R,"label-danger",e[23].status>=400),p(F,"class","col-type-number col-field-status"),p(G,"class","col-type-date col-field-created"),p(re,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(fe,Ve){S(fe,t,Ve),_(t,i),_(i,s),_(s,o),_(t,a),_(t,u),_(u,f),_(f,d),_(u,h),Ne&&Ne.m(u,null),_(t,g),_(t,b),_(b,k),_(k,T),_(t,M),_(t,C),_(C,D),_(D,P),_(t,N),_(t,F),_(F,R),_(R,se),_(t,W),_(t,G),q(te,G,null),_(t,K),_(t,re),_(t,J),de=!0,_e||($e=[Y(t,"click",Re),Y(t,"keydown",be)],_e=!0)},p(fe,Ve){var Fe,ot,Ht;e=fe,(!de||Ve&8)&&l!==(l=((Fe=e[23].method)==null?void 0:Fe.toUpperCase())+"")&&le(o,l),(!de||Ve&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&p(s,"class",r),(!de||Ve&8)&&c!==(c=e[23].url+"")&&le(d,c),(!de||Ve&8&&m!==(m=e[23].url))&&p(f,"title",m),(ot=e[23].meta)!=null&&ot.errorMessage||(Ht=e[23].meta)!=null&&Ht.errorData?Ne||(Ne=Qu(),Ne.c(),Ne.m(u,null)):Ne&&(Ne.d(1),Ne=null),(!de||Ve&8)&&y!==(y=(e[23].referer||"N/A")+"")&&le(T,y),(!de||Ve&8&&$!==($=e[23].referer))&&p(k,"title",$),(!de||Ve&8)&&Q(k,"txt-hint",!e[23].referer),(!de||Ve&8)&&E!==(E=(e[23].userIp||"N/A")+"")&&le(P,E),(!de||Ve&8&&L!==(L=e[23].userIp))&&p(D,"title",L),(!de||Ve&8)&&Q(D,"txt-hint",!e[23].userIp),(!de||Ve&8)&&X!==(X=e[23].status+"")&&le(se,X),(!de||Ve&8)&&Q(R,"label-danger",e[23].status>=400);const ee={};Ve&8&&(ee.date=e[23].created),te.$set(ee)},i(fe){de||(A(te.$$.fragment,fe),de=!0)},o(fe){I(te.$$.fragment,fe),de=!1},d(fe){fe&&w(t),Ne&&Ne.d(),j(te),_e=!1,Pe($e)}}}function vy(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,k,y,T,$,M,C,D,E,P=[],L=new Map,N;function F(be){n[11](be)}let R={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[cy]},$$scope:{ctx:n}};n[1]!==void 0&&(R.sort=n[1]),s=new Wt({props:R}),ie.push(()=>ge(s,"sort",F));function X(be){n[12](be)}let se={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[dy]},$$scope:{ctx:n}};n[1]!==void 0&&(se.sort=n[1]),r=new Wt({props:se}),ie.push(()=>ge(r,"sort",X));function W(be){n[13](be)}let G={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[py]},$$scope:{ctx:n}};n[1]!==void 0&&(G.sort=n[1]),f=new Wt({props:G}),ie.push(()=>ge(f,"sort",W));function te(be){n[14](be)}let K={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[my]},$$scope:{ctx:n}};n[1]!==void 0&&(K.sort=n[1]),m=new Wt({props:K}),ie.push(()=>ge(m,"sort",te));function re(be){n[15](be)}let J={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[hy]},$$scope:{ctx:n}};n[1]!==void 0&&(J.sort=n[1]),b=new Wt({props:J}),ie.push(()=>ge(b,"sort",re));function de(be){n[16](be)}let _e={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[gy]},$$scope:{ctx:n}};n[1]!==void 0&&(_e.sort=n[1]),T=new Wt({props:_e}),ie.push(()=>ge(T,"sort",de));let $e=n[3];const Ne=be=>be[23].id;for(let be=0;be<$e.length;be+=1){let Se=Zu(n,$e,be),We=Ne(Se);L.set(We,P[be]=xu(We,Se))}let Re=null;return $e.length||(Re=Gu(n)),{c(){e=v("table"),t=v("thead"),i=v("tr"),H(s.$$.fragment),o=O(),H(r.$$.fragment),u=O(),H(f.$$.fragment),d=O(),H(m.$$.fragment),g=O(),H(b.$$.fragment),y=O(),H(T.$$.fragment),M=O(),C=v("th"),D=O(),E=v("tbody");for(let be=0;bel=!1)),s.$set(We);const lt={};Se&67108864&&(lt.$$scope={dirty:Se,ctx:be}),!a&&Se&2&&(a=!0,lt.sort=be[1],ke(()=>a=!1)),r.$set(lt);const fe={};Se&67108864&&(fe.$$scope={dirty:Se,ctx:be}),!c&&Se&2&&(c=!0,fe.sort=be[1],ke(()=>c=!1)),f.$set(fe);const Ve={};Se&67108864&&(Ve.$$scope={dirty:Se,ctx:be}),!h&&Se&2&&(h=!0,Ve.sort=be[1],ke(()=>h=!1)),m.$set(Ve);const ee={};Se&67108864&&(ee.$$scope={dirty:Se,ctx:be}),!k&&Se&2&&(k=!0,ee.sort=be[1],ke(()=>k=!1)),b.$set(ee);const Fe={};Se&67108864&&(Fe.$$scope={dirty:Se,ctx:be}),!$&&Se&2&&($=!0,Fe.sort=be[1],ke(()=>$=!1)),T.$set(Fe),Se&841&&($e=be[3],ae(),P=wt(P,Se,Ne,1,be,$e,L,E,ln,xu,null,Zu),ue(),!$e.length&&Re?Re.p(be,Se):$e.length?Re&&(Re.d(1),Re=null):(Re=Gu(be),Re.c(),Re.m(E,null))),(!N||Se&64)&&Q(e,"table-loading",be[6])},i(be){if(!N){A(s.$$.fragment,be),A(r.$$.fragment,be),A(f.$$.fragment,be),A(m.$$.fragment,be),A(b.$$.fragment,be),A(T.$$.fragment,be);for(let Se=0;Se<$e.length;Se+=1)A(P[Se]);N=!0}},o(be){I(s.$$.fragment,be),I(r.$$.fragment,be),I(f.$$.fragment,be),I(m.$$.fragment,be),I(b.$$.fragment,be),I(T.$$.fragment,be);for(let Se=0;Se{if(L<=1&&g(),t(6,d=!1),t(5,f=F.page),t(4,c=F.totalItems),s("load",u.concat(F.items)),N){const R=++m;for(;F.items.length&&m==R;)t(3,u=u.concat(F.items.splice(0,10))),await z.yieldToMain()}else t(3,u=u.concat(F.items))}).catch(F=>{F!=null&&F.isAbort||(t(6,d=!1),console.warn(F),g(),pe.errorResponseHandler(F,!1))})}function g(){t(3,u=[]),t(5,f=1),t(4,c=0)}function b(L){a=L,t(1,a)}function k(L){a=L,t(1,a)}function y(L){a=L,t(1,a)}function T(L){a=L,t(1,a)}function $(L){a=L,t(1,a)}function M(L){a=L,t(1,a)}const C=L=>s("select",L),D=(L,N)=>{N.code==="Enter"&&(N.preventDefault(),s("select",L))},E=()=>t(0,o=""),P=()=>h(f+1);return n.$$set=L=>{"filter"in L&&t(0,o=L.filter),"presets"in L&&t(10,r=L.presets),"sort"in L&&t(1,a=L.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a<"u"||typeof o<"u"||typeof r<"u")&&(g(),h(1)),n.$$.dirty&24&&t(7,i=c>u.length)},[o,a,h,u,c,f,d,i,s,l,r,b,k,y,T,$,M,C,D,E,P]}class wy extends ye{constructor(e){super(),ve(this,e,ky,yy,he,{filter:0,presets:10,sort:1,load:2})}get load(){return this.$$.ctx[2]}}/*! + * Chart.js v3.9.1 + * https://www.chartjs.org + * (c) 2022 Chart.js Contributors + * Released under the MIT License + */function ni(){}const Sy=function(){let n=0;return function(){return n++}}();function at(n){return n===null||typeof n>"u"}function gt(n){if(Array.isArray&&Array.isArray(n))return!0;const e=Object.prototype.toString.call(n);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function Ke(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const $t=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function $n(n,e){return $t(n)?n:e}function Xe(n,e){return typeof n>"u"?e:n}const Ty=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,$_=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function yt(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function ut(n,e,t,i){let s,l,o;if(gt(n))if(l=n.length,i)for(s=l-1;s>=0;s--)e.call(t,n[s],s);else for(s=0;sn,x:n=>n.x,y:n=>n.y};function $i(n,e){return(nf[e]||(nf[e]=My(e)))(n)}function My(n){const e=Dy(n);return t=>{for(const i of e){if(i==="")break;t=t&&t[i]}return t}}function Dy(n){const e=n.split("."),t=[];let i="";for(const s of e)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(t.push(i),i="");return t}function Ea(n){return n.charAt(0).toUpperCase()+n.slice(1)}const In=n=>typeof n<"u",Ci=n=>typeof n=="function",sf=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function Oy(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Tt=Math.PI,ct=2*Tt,Ey=ct+Tt,So=Number.POSITIVE_INFINITY,Ay=Tt/180,kt=Tt/2,zs=Tt/4,lf=Tt*2/3,On=Math.log10,Gn=Math.sign;function of(n){const e=Math.round(n);n=nl(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(On(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function Iy(n){const e=[],t=Math.sqrt(n);let i;for(i=1;is-l).pop(),e}function Cs(n){return!isNaN(parseFloat(n))&&isFinite(n)}function nl(n,e,t){return Math.abs(n-e)=n}function M_(n,e,t){let i,s,l;for(i=0,s=n.length;ia&&u=Math.min(e,t)-i&&n<=Math.max(e,t)+i}function Ia(n,e,t){t=t||(o=>n[o]1;)l=s+i>>1,t(l)?s=l:i=l;return{lo:s,hi:i}}const Yi=(n,e,t,i)=>Ia(n,t,i?s=>n[s][e]<=t:s=>n[s][e]Ia(n,t,i=>n[i][e]>=t);function Ry(n,e,t){let i=0,s=n.length;for(;ii&&n[s-1]>t;)s--;return i>0||s{const i="_onData"+Ea(t),s=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...l){const o=s.apply(this,l);return n._chartjs.listeners.forEach(r=>{typeof r[i]=="function"&&r[i](...l)}),o}})})}function af(n,e){const t=n._chartjs;if(!t)return;const i=t.listeners,s=i.indexOf(e);s!==-1&&i.splice(s,1),!(i.length>0)&&(O_.forEach(l=>{delete n[l]}),delete n._chartjs)}function E_(n){const e=new Set;let t,i;for(t=0,i=n.length;t"u"?function(n){return n()}:window.requestAnimationFrame}();function I_(n,e,t){const i=t||(o=>Array.prototype.slice.call(o));let s=!1,l=[];return function(...o){l=i(o),s||(s=!0,A_.call(window,()=>{s=!1,n.apply(e,l)}))}}function jy(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}const Hy=n=>n==="start"?"left":n==="end"?"right":"center",uf=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2;function P_(n,e,t){const i=e.length;let s=0,l=i;if(n._sorted){const{iScale:o,_parsed:r}=n,a=o.axis,{min:u,max:f,minDefined:c,maxDefined:d}=o.getUserBounds();c&&(s=Yt(Math.min(Yi(r,o.axis,u).lo,t?i:Yi(e,a,o.getPixelForValue(u)).lo),0,i-1)),d?l=Yt(Math.max(Yi(r,o.axis,f,!0).hi+1,t?0:Yi(e,a,o.getPixelForValue(f),!0).hi+1),s,i)-s:l=i-s}return{start:s,count:l}}function L_(n){const{xScale:e,yScale:t,_scaleRanges:i}=n,s={xmin:e.min,xmax:e.max,ymin:t.min,ymax:t.max};if(!i)return n._scaleRanges=s,!0;const l=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==t.min||i.ymax!==t.max;return Object.assign(i,s),l}const Ul=n=>n===0||n===1,ff=(n,e,t)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*ct/t)),cf=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*ct/t)+1,il={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*kt)+1,easeOutSine:n=>Math.sin(n*kt),easeInOutSine:n=>-.5*(Math.cos(Tt*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>Ul(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>Ul(n)?n:ff(n,.075,.3),easeOutElastic:n=>Ul(n)?n:cf(n,.075,.3),easeInOutElastic(n){return Ul(n)?n:n<.5?.5*ff(n*2,.1125,.45):.5+.5*cf(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let e=1.70158;return(n/=.5)<1?.5*(n*n*(((e*=1.525)+1)*n-e)):.5*((n-=2)*n*(((e*=1.525)+1)*n+e)+2)},easeInBounce:n=>1-il.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?il.easeInBounce(n*2)*.5:il.easeOutBounce(n*2-1)*.5+.5};/*! + * @kurkle/color v0.2.1 + * https://github.com/kurkle/color#readme + * (c) 2022 Jukka Kurkela + * Released under the MIT License + */function Ol(n){return n+.5|0}const bi=(n,e,t)=>Math.max(Math.min(n,t),e);function Xs(n){return bi(Ol(n*2.55),0,255)}function wi(n){return bi(Ol(n*255),0,255)}function li(n){return bi(Ol(n/2.55)/100,0,1)}function df(n){return bi(Ol(n*100),0,100)}const Tn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Gr=[..."0123456789ABCDEF"],Vy=n=>Gr[n&15],zy=n=>Gr[(n&240)>>4]+Gr[n&15],Wl=n=>(n&240)>>4===(n&15),By=n=>Wl(n.r)&&Wl(n.g)&&Wl(n.b)&&Wl(n.a);function Uy(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&Tn[n[1]]*17,g:255&Tn[n[2]]*17,b:255&Tn[n[3]]*17,a:e===5?Tn[n[4]]*17:255}:(e===7||e===9)&&(t={r:Tn[n[1]]<<4|Tn[n[2]],g:Tn[n[3]]<<4|Tn[n[4]],b:Tn[n[5]]<<4|Tn[n[6]],a:e===9?Tn[n[7]]<<4|Tn[n[8]]:255})),t}const Wy=(n,e)=>n<255?e(n):"";function Yy(n){var e=By(n)?Vy:zy;return n?"#"+e(n.r)+e(n.g)+e(n.b)+Wy(n.a,e):void 0}const Ky=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function N_(n,e,t){const i=e*Math.min(t,1-t),s=(l,o=(l+n/30)%12)=>t-i*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function Jy(n,e,t){const i=(s,l=(s+n/60)%6)=>t-t*e*Math.max(Math.min(l,4-l,1),0);return[i(5),i(3),i(1)]}function Zy(n,e,t){const i=N_(n,1,.5);let s;for(e+t>1&&(s=1/(e+t),e*=s,t*=s),s=0;s<3;s++)i[s]*=1-e-t,i[s]+=e;return i}function Gy(n,e,t,i,s){return n===s?(e-t)/i+(e.5?f/(2-l-o):f/(l+o),a=Gy(t,i,s,f,l),a=a*60+.5),[a|0,u||0,r]}function La(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(wi)}function Na(n,e,t){return La(N_,n,e,t)}function Xy(n,e,t){return La(Zy,n,e,t)}function Qy(n,e,t){return La(Jy,n,e,t)}function F_(n){return(n%360+360)%360}function xy(n){const e=Ky.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?Xs(+e[5]):wi(+e[5]));const s=F_(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=Xy(s,l,o):e[1]==="hsv"?i=Qy(s,l,o):i=Na(s,l,o),{r:i[0],g:i[1],b:i[2],a:t}}function e2(n,e){var t=Pa(n);t[0]=F_(t[0]+e),t=Na(t),n.r=t[0],n.g=t[1],n.b=t[2]}function t2(n){if(!n)return;const e=Pa(n),t=e[0],i=df(e[1]),s=df(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${li(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const pf={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},mf={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function n2(){const n={},e=Object.keys(mf),t=Object.keys(pf);let i,s,l,o,r;for(i=0;i>16&255,l>>8&255,l&255]}return n}let Yl;function i2(n){Yl||(Yl=n2(),Yl.transparent=[0,0,0,0]);const e=Yl[n.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const s2=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function l2(n){const e=s2.exec(n);let t=255,i,s,l;if(e){if(e[7]!==i){const o=+e[7];t=e[8]?Xs(o):bi(o*255,0,255)}return i=+e[1],s=+e[3],l=+e[5],i=255&(e[2]?Xs(i):bi(i,0,255)),s=255&(e[4]?Xs(s):bi(s,0,255)),l=255&(e[6]?Xs(l):bi(l,0,255)),{r:i,g:s,b:l,a:t}}}function o2(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${li(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const ar=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,ds=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function r2(n,e,t){const i=ds(li(n.r)),s=ds(li(n.g)),l=ds(li(n.b));return{r:wi(ar(i+t*(ds(li(e.r))-i))),g:wi(ar(s+t*(ds(li(e.g))-s))),b:wi(ar(l+t*(ds(li(e.b))-l))),a:n.a+t*(e.a-n.a)}}function Kl(n,e,t){if(n){let i=Pa(n);i[e]=Math.max(0,Math.min(i[e]+i[e]*t,e===0?360:1)),i=Na(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function R_(n,e){return n&&Object.assign(e||{},n)}function hf(n){var e={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(e={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(e.a=wi(n[3]))):(e=R_(n,{r:0,g:0,b:0,a:1}),e.a=wi(e.a)),e}function a2(n){return n.charAt(0)==="r"?l2(n):xy(n)}class To{constructor(e){if(e instanceof To)return e;const t=typeof e;let i;t==="object"?i=hf(e):t==="string"&&(i=Uy(e)||i2(e)||a2(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=R_(this._rgb);return e&&(e.a=li(e.a)),e}set rgb(e){this._rgb=hf(e)}rgbString(){return this._valid?o2(this._rgb):void 0}hexString(){return this._valid?Yy(this._rgb):void 0}hslString(){return this._valid?t2(this._rgb):void 0}mix(e,t){if(e){const i=this.rgb,s=e.rgb;let l;const o=t===l?.5:t,r=2*o-1,a=i.a-s.a,u=((r*a===-1?r:(r+a)/(1+r*a))+1)/2;l=1-u,i.r=255&u*i.r+l*s.r+.5,i.g=255&u*i.g+l*s.g+.5,i.b=255&u*i.b+l*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(e,t){return e&&(this._rgb=r2(this._rgb,e._rgb,t)),this}clone(){return new To(this.rgb)}alpha(e){return this._rgb.a=wi(e),this}clearer(e){const t=this._rgb;return t.a*=1-e,this}greyscale(){const e=this._rgb,t=Ol(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=t,this}opaquer(e){const t=this._rgb;return t.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Kl(this._rgb,2,e),this}darken(e){return Kl(this._rgb,2,-e),this}saturate(e){return Kl(this._rgb,1,e),this}desaturate(e){return Kl(this._rgb,1,-e),this}rotate(e){return e2(this._rgb,e),this}}function q_(n){return new To(n)}function j_(n){if(n&&typeof n=="object"){const e=n.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function gf(n){return j_(n)?n:q_(n)}function ur(n){return j_(n)?n:q_(n).saturate(.5).darken(.1).hexString()}const xi=Object.create(null),Xr=Object.create(null);function sl(n,e){if(!e)return n;const t=e.split(".");for(let i=0,s=t.length;it.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,i)=>ur(i.backgroundColor),this.hoverBorderColor=(t,i)=>ur(i.borderColor),this.hoverColor=(t,i)=>ur(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e)}set(e,t){return fr(this,e,t)}get(e){return sl(this,e)}describe(e,t){return fr(Xr,e,t)}override(e,t){return fr(xi,e,t)}route(e,t,i,s){const l=sl(this,e),o=sl(this,i),r="_"+t;Object.defineProperties(l,{[r]:{value:l[t],writable:!0},[t]:{enumerable:!0,get(){const a=this[r],u=o[s];return Ke(a)?Object.assign({},u,a):Xe(a,u)},set(a){this[r]=a}}})}}var Qe=new u2({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function f2(n){return!n||at(n.size)||at(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function $o(n,e,t,i,s){let l=e[s];return l||(l=e[s]=n.measureText(s).width,t.push(s)),l>i&&(i=l),i}function c2(n,e,t,i){i=i||{};let s=i.data=i.data||{},l=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(s=i.data={},l=i.garbageCollect=[],i.font=e),n.save(),n.font=e;let o=0;const r=t.length;let a,u,f,c,d;for(a=0;at.length){for(a=0;a0&&n.stroke()}}function hl(n,e,t){return t=t||.5,!e||n&&n.x>e.left-t&&n.xe.top-t&&n.y0&&l.strokeColor!=="";let a,u;for(n.save(),n.font=s.string,h2(n,l),a=0;a+n||0;function qa(n,e){const t={},i=Ke(e),s=i?Object.keys(e):e,l=Ke(n)?i?o=>Xe(n[o],n[e[o]]):o=>n[o]:()=>n;for(const o of s)t[o]=y2(l(o));return t}function H_(n){return qa(n,{top:"y",right:"x",bottom:"y",left:"x"})}function vs(n){return qa(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Pn(n){const e=H_(n);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function vn(n,e){n=n||{},e=e||Qe.font;let t=Xe(n.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let i=Xe(n.style,e.style);i&&!(""+i).match(b2)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const s={family:Xe(n.family,e.family),lineHeight:v2(Xe(n.lineHeight,e.lineHeight),t),size:t,style:i,weight:Xe(n.weight,e.weight),string:""};return s.string=f2(s),s}function Jl(n,e,t,i){let s=!0,l,o,r;for(l=0,o=n.length;lt&&r===0?0:r+a;return{min:o(i,-Math.abs(l)),max:o(s,l)}}function Oi(n,e){return Object.assign(Object.create(n),e)}function ja(n,e=[""],t=n,i,s=()=>n[0]){In(i)||(i=U_("_fallback",n));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:t,_fallback:i,_getTarget:s,override:o=>ja([o,...n],e,t,i)};return new Proxy(l,{deleteProperty(o,r){return delete o[r],delete o._keys,delete n[0][r],!0},get(o,r){return z_(o,r,()=>O2(r,e,n,o))},getOwnPropertyDescriptor(o,r){return Reflect.getOwnPropertyDescriptor(o._scopes[0],r)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(o,r){return vf(o).includes(r)},ownKeys(o){return vf(o)},set(o,r,a){const u=o._storage||(o._storage=s());return o[r]=u[r]=a,delete o._keys,!0}})}function Ms(n,e,t,i){const s={_cacheable:!1,_proxy:n,_context:e,_subProxy:t,_stack:new Set,_descriptors:V_(n,i),setContext:l=>Ms(n,l,t,i),override:l=>Ms(n.override(l),e,t,i)};return new Proxy(s,{deleteProperty(l,o){return delete l[o],delete n[o],!0},get(l,o,r){return z_(l,o,()=>S2(l,o,r))},getOwnPropertyDescriptor(l,o){return l._descriptors.allKeys?Reflect.has(n,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,o)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(l,o){return Reflect.has(n,o)},ownKeys(){return Reflect.ownKeys(n)},set(l,o,r){return n[o]=r,delete l[o],!0}})}function V_(n,e={scriptable:!0,indexable:!0}){const{_scriptable:t=e.scriptable,_indexable:i=e.indexable,_allKeys:s=e.allKeys}=n;return{allKeys:s,scriptable:t,indexable:i,isScriptable:Ci(t)?t:()=>t,isIndexable:Ci(i)?i:()=>i}}const w2=(n,e)=>n?n+Ea(e):e,Ha=(n,e)=>Ke(e)&&n!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function z_(n,e,t){if(Object.prototype.hasOwnProperty.call(n,e))return n[e];const i=t();return n[e]=i,i}function S2(n,e,t){const{_proxy:i,_context:s,_subProxy:l,_descriptors:o}=n;let r=i[e];return Ci(r)&&o.isScriptable(e)&&(r=T2(e,r,n,t)),gt(r)&&r.length&&(r=$2(e,r,n,o.isIndexable)),Ha(e,r)&&(r=Ms(r,s,l&&l[e],o)),r}function T2(n,e,t,i){const{_proxy:s,_context:l,_subProxy:o,_stack:r}=t;if(r.has(n))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+n);return r.add(n),e=e(l,o||i),r.delete(n),Ha(n,e)&&(e=Va(s._scopes,s,n,e)),e}function $2(n,e,t,i){const{_proxy:s,_context:l,_subProxy:o,_descriptors:r}=t;if(In(l.index)&&i(n))e=e[l.index%e.length];else if(Ke(e[0])){const a=e,u=s._scopes.filter(f=>f!==a);e=[];for(const f of a){const c=Va(u,s,n,f);e.push(Ms(c,l,o&&o[n],r))}}return e}function B_(n,e,t){return Ci(n)?n(e,t):n}const C2=(n,e)=>n===!0?e:typeof n=="string"?$i(e,n):void 0;function M2(n,e,t,i,s){for(const l of e){const o=C2(t,l);if(o){n.add(o);const r=B_(o._fallback,t,s);if(In(r)&&r!==t&&r!==i)return r}else if(o===!1&&In(i)&&t!==i)return null}return!1}function Va(n,e,t,i){const s=e._rootScopes,l=B_(e._fallback,t,i),o=[...n,...s],r=new Set;r.add(i);let a=bf(r,o,t,l||t,i);return a===null||In(l)&&l!==t&&(a=bf(r,o,l,a,i),a===null)?!1:ja(Array.from(r),[""],s,l,()=>D2(e,t,i))}function bf(n,e,t,i,s){for(;t;)t=M2(n,e,t,i,s);return t}function D2(n,e,t){const i=n._getTarget();e in i||(i[e]={});const s=i[e];return gt(s)&&Ke(t)?t:s}function O2(n,e,t,i){let s;for(const l of e)if(s=U_(w2(l,n),t),In(s))return Ha(n,s)?Va(t,i,n,s):s}function U_(n,e){for(const t of e){if(!t)continue;const i=t[n];if(In(i))return i}}function vf(n){let e=n._keys;return e||(e=n._keys=E2(n._scopes)),e}function E2(n){const e=new Set;for(const t of n)for(const i of Object.keys(t).filter(s=>!s.startsWith("_")))e.add(i);return Array.from(e)}function W_(n,e,t,i){const{iScale:s}=n,{key:l="r"}=this._parsing,o=new Array(i);let r,a,u,f;for(r=0,a=i;ren==="x"?"y":"x";function I2(n,e,t,i){const s=n.skip?e:n,l=e,o=t.skip?e:t,r=Zr(l,s),a=Zr(o,l);let u=r/(r+a),f=a/(r+a);u=isNaN(u)?0:u,f=isNaN(f)?0:f;const c=i*u,d=i*f;return{previous:{x:l.x-c*(o.x-s.x),y:l.y-c*(o.y-s.y)},next:{x:l.x+d*(o.x-s.x),y:l.y+d*(o.y-s.y)}}}function P2(n,e,t){const i=n.length;let s,l,o,r,a,u=Ds(n,0);for(let f=0;f!u.skip)),e.cubicInterpolationMode==="monotone")N2(n,s);else{let u=i?n[n.length-1]:n[0];for(l=0,o=n.length;lwindow.getComputedStyle(n,null);function q2(n,e){return Wo(n).getPropertyValue(e)}const j2=["top","right","bottom","left"];function Zi(n,e,t){const i={};t=t?"-"+t:"";for(let s=0;s<4;s++){const l=j2[s];i[l]=parseFloat(n[e+"-"+l+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const H2=(n,e,t)=>(n>0||e>0)&&(!t||!t.shadowRoot);function V2(n,e){const t=n.touches,i=t&&t.length?t[0]:n,{offsetX:s,offsetY:l}=i;let o=!1,r,a;if(H2(s,l,n.target))r=s,a=l;else{const u=e.getBoundingClientRect();r=i.clientX-u.left,a=i.clientY-u.top,o=!0}return{x:r,y:a,box:o}}function Bi(n,e){if("native"in n)return n;const{canvas:t,currentDevicePixelRatio:i}=e,s=Wo(t),l=s.boxSizing==="border-box",o=Zi(s,"padding"),r=Zi(s,"border","width"),{x:a,y:u,box:f}=V2(n,t),c=o.left+(f&&r.left),d=o.top+(f&&r.top);let{width:m,height:h}=e;return l&&(m-=o.width+r.width,h-=o.height+r.height),{x:Math.round((a-c)/m*t.width/i),y:Math.round((u-d)/h*t.height/i)}}function z2(n,e,t){let i,s;if(e===void 0||t===void 0){const l=za(n);if(!l)e=n.clientWidth,t=n.clientHeight;else{const o=l.getBoundingClientRect(),r=Wo(l),a=Zi(r,"border","width"),u=Zi(r,"padding");e=o.width-u.width-a.width,t=o.height-u.height-a.height,i=Do(r.maxWidth,l,"clientWidth"),s=Do(r.maxHeight,l,"clientHeight")}}return{width:e,height:t,maxWidth:i||So,maxHeight:s||So}}const cr=n=>Math.round(n*10)/10;function B2(n,e,t,i){const s=Wo(n),l=Zi(s,"margin"),o=Do(s.maxWidth,n,"clientWidth")||So,r=Do(s.maxHeight,n,"clientHeight")||So,a=z2(n,e,t);let{width:u,height:f}=a;if(s.boxSizing==="content-box"){const c=Zi(s,"border","width"),d=Zi(s,"padding");u-=d.width+c.width,f-=d.height+c.height}return u=Math.max(0,u-l.width),f=Math.max(0,i?Math.floor(u/i):f-l.height),u=cr(Math.min(u,o,a.maxWidth)),f=cr(Math.min(f,r,a.maxHeight)),u&&!f&&(f=cr(u/2)),{width:u,height:f}}function yf(n,e,t){const i=e||1,s=Math.floor(n.height*i),l=Math.floor(n.width*i);n.height=s/i,n.width=l/i;const o=n.canvas;return o.style&&(t||!o.style.height&&!o.style.width)&&(o.style.height=`${n.height}px`,o.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||o.height!==s||o.width!==l?(n.currentDevicePixelRatio=i,o.height=s,o.width=l,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const U2=function(){let n=!1;try{const e={get passive(){return n=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return n}();function kf(n,e){const t=q2(n,e),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Ui(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)}}function W2(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:i==="middle"?t<.5?n.y:e.y:i==="after"?t<1?n.y:e.y:t>0?e.y:n.y}}function Y2(n,e,t,i){const s={x:n.cp2x,y:n.cp2y},l={x:e.cp1x,y:e.cp1y},o=Ui(n,s,t),r=Ui(s,l,t),a=Ui(l,e,t),u=Ui(o,r,t),f=Ui(r,a,t);return Ui(u,f,t)}const wf=new Map;function K2(n,e){e=e||{};const t=n+JSON.stringify(e);let i=wf.get(t);return i||(i=new Intl.NumberFormat(n,e),wf.set(t,i)),i}function El(n,e,t){return K2(e,t).format(n)}const J2=function(n,e){return{x(t){return n+n+e-t},setWidth(t){e=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,i){return t-i},leftForLtr(t,i){return t-i}}},Z2=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,e){return n+e},leftForLtr(n,e){return n}}};function dr(n,e,t){return n?J2(e,t):Z2()}function G2(n,e){let t,i;(e==="ltr"||e==="rtl")&&(t=n.canvas.style,i=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",e,"important"),n.prevTextDirection=i)}function X2(n,e){e!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",e[0],e[1]))}function J_(n){return n==="angle"?{between:pl,compare:Ly,normalize:bn}:{between:ml,compare:(e,t)=>e-t,normalize:e=>e}}function Sf({start:n,end:e,count:t,loop:i,style:s}){return{start:n%t,end:e%t,loop:i&&(e-n+1)%t===0,style:s}}function Q2(n,e,t){const{property:i,start:s,end:l}=t,{between:o,normalize:r}=J_(i),a=e.length;let{start:u,end:f,loop:c}=n,d,m;if(c){for(u+=a,f+=a,d=0,m=a;da(s,T,k)&&r(s,T)!==0,M=()=>r(l,k)===0||a(l,T,k),C=()=>g||$(),D=()=>!g||M();for(let E=f,P=f;E<=c;++E)y=e[E%o],!y.skip&&(k=u(y[i]),k!==T&&(g=a(k,s,l),b===null&&C()&&(b=r(k,s)===0?E:P),b!==null&&D()&&(h.push(Sf({start:b,end:E,loop:d,count:o,style:m})),b=null),P=E,T=k));return b!==null&&h.push(Sf({start:b,end:c,loop:d,count:o,style:m})),h}function G_(n,e){const t=[],i=n.segments;for(let s=0;ss&&n[l%e].skip;)l--;return l%=e,{start:s,end:l}}function ek(n,e,t,i){const s=n.length,l=[];let o=e,r=n[e],a;for(a=e+1;a<=t;++a){const u=n[a%s];u.skip||u.stop?r.skip||(i=!1,l.push({start:e%s,end:(a-1)%s,loop:i}),e=o=u.stop?a:null):(o=a,r.skip&&(e=a)),r=u}return o!==null&&l.push({start:e%s,end:o%s,loop:i}),l}function tk(n,e){const t=n.points,i=n.options.spanGaps,s=t.length;if(!s)return[];const l=!!n._loop,{start:o,end:r}=x2(t,s,l,i);if(i===!0)return Tf(n,[{start:o,end:r,loop:l}],t,e);const a=rr({chart:e,initial:t.initial,numSteps:o,currentStep:Math.min(i-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=A_.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const l=i.items;let o=l.length-1,r=!1,a;for(;o>=0;--o)a=l[o],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(e),r=!0):(l[o]=l[l.length-1],l.pop());r&&(s.draw(),this._notify(s,i,e,"progress")),l.length||(i.running=!1,this._notify(s,i,e,"complete"),i.initial=!1),t+=l.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){const t=this._charts;let i=t.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,i)),i}listen(e,t,i){this._getAnims(e).listeners[t].push(i)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const i=t.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var ii=new sk;const Cf="transparent",lk={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=gf(n||Cf),s=i.valid&&gf(e||Cf);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class ok{constructor(e,t,i,s){const l=t[i];s=Jl([e.to,s,l,e.from]);const o=Jl([e.from,l,s]);this._active=!0,this._fn=e.fn||lk[e.type||typeof o],this._easing=il[e.easing]||il.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);const s=this._target[this._prop],l=i-this._start,o=this._duration-l;this._start=i,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=l,this._loop=!!e.loop,this._to=Jl([e.to,t,s,e.from]),this._from=Jl([e.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,i=this._duration,s=this._prop,l=this._from,o=this._loop,r=this._to;let a;if(this._active=l!==r&&(o||t1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[s]=this._fn(l,r,a)}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,i)=>{e.push({res:t,rej:i})})}_notify(e){const t=e?"res":"rej",i=this._promises||[];for(let s=0;sn!=="onProgress"&&n!=="onComplete"&&n!=="fn"});Qe.set("animations",{colors:{type:"color",properties:ak},numbers:{type:"number",properties:rk}});Qe.describe("animations",{_fallback:"animation"});Qe.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:n=>n|0}}}});class X_{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!Ke(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!Ke(s))return;const l={};for(const o of uk)l[o]=s[o];(gt(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=ck(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&fk(e.options.$animations,i).then(()=>{e.options=i},()=>{}),l}_createAnimations(e,t){const i=this._properties,s=[],l=e.$animations||(e.$animations={}),o=Object.keys(t),r=Date.now();let a;for(a=o.length-1;a>=0;--a){const u=o[a];if(u.charAt(0)==="$")continue;if(u==="options"){s.push(...this._animateOptions(e,t));continue}const f=t[u];let c=l[u];const d=i.get(u);if(c)if(d&&c.active()){c.update(d,f,r);continue}else c.cancel();if(!d||!d.duration){e[u]=f;continue}l[u]=c=new ok(d,e,u,f),s.push(c)}return s}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}const i=this._createAnimations(e,t);if(i.length)return ii.add(this._chart,i),!0}}function fk(n,e){const t=[],i=Object.keys(e);for(let s=0;s0||!t&&l<0)return s.index}return null}function Af(n,e){const{chart:t,_cachedMeta:i}=n,s=t._stacks||(t._stacks={}),{iScale:l,vScale:o,index:r}=i,a=l.axis,u=o.axis,f=hk(l,o,i),c=e.length;let d;for(let m=0;mt[i].axis===e).shift()}function bk(n,e){return Oi(n,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function vk(n,e,t){return Oi(n,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function Bs(n,e){const t=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){e=e||n._parsed;for(const s of e){const l=s._stacks;if(!l||l[i]===void 0||l[i][t]===void 0)return;delete l[i][t]}}}const mr=n=>n==="reset"||n==="none",If=(n,e)=>e?n:Object.assign({},n),yk=(n,e,t)=>n&&!e.hidden&&e._stacked&&{keys:Q_(t,!0),values:null};class Un{constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Of(e.vScale,e),this.addElements()}updateIndex(e){this.index!==e&&Bs(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,i=this.getDataset(),s=(c,d,m,h)=>c==="x"?d:c==="r"?h:m,l=t.xAxisID=Xe(i.xAxisID,pr(e,"x")),o=t.yAxisID=Xe(i.yAxisID,pr(e,"y")),r=t.rAxisID=Xe(i.rAxisID,pr(e,"r")),a=t.indexAxis,u=t.iAxisID=s(a,l,o,r),f=t.vAxisID=s(a,o,l,r);t.xScale=this.getScaleForId(l),t.yScale=this.getScaleForId(o),t.rScale=this.getScaleForId(r),t.iScale=this.getScaleForId(u),t.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&af(this._data,this),e._stacked&&Bs(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),i=this._data;if(Ke(t))this._data=mk(t);else if(i!==t){if(i){af(i,this);const s=this._cachedMeta;Bs(s),s._parsed=[]}t&&Object.isExtensible(t)&&qy(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const l=t._stacked;t._stacked=Of(t.vScale,t),t.stack!==i.stack&&(s=!0,Bs(t),t.stack=i.stack),this._resyncElements(e),(s||l!==t._stacked)&&Af(this,t._parsed)}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:i,_data:s}=this,{iScale:l,_stacked:o}=i,r=l.axis;let a=e===0&&t===s.length?!0:i._sorted,u=e>0&&i._parsed[e-1],f,c,d;if(this._parsing===!1)i._parsed=s,i._sorted=!0,d=s;else{gt(s[e])?d=this.parseArrayData(i,s,e,t):Ke(s[e])?d=this.parseObjectData(i,s,e,t):d=this.parsePrimitiveData(i,s,e,t);const m=()=>c[r]===null||u&&c[r]g||c=0;--d)if(!h()){this.updateRangeFromParsed(u,e,m,a);break}}return u}getAllParsedValues(e){const t=this._cachedMeta._parsed,i=[];let s,l,o;for(s=0,l=t.length;s=0&&ethis.getContext(i,s),g=u.resolveNamedOptions(d,m,h,c);return g.$shared&&(g.$shared=a,l[o]=Object.freeze(If(g,a))),g}_resolveAnimations(e,t,i){const s=this.chart,l=this._cachedDataOpts,o=`animation-${t}`,r=l[o];if(r)return r;let a;if(s.options.animation!==!1){const f=this.chart.config,c=f.datasetAnimationScopeKeys(this._type,t),d=f.getOptionScopes(this.getDataset(),c);a=f.createResolver(d,this.getContext(e,i,t))}const u=new X_(s,a&&a.animations);return a&&a._cacheable&&(l[o]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||mr(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const i=this.resolveDataElementOptions(e,t),s=this._sharedOptions,l=this.getSharedOptions(i),o=this.includeOptions(t,l)||l!==s;return this.updateSharedOptions(l,t,i),{sharedOptions:l,includeOptions:o}}updateElement(e,t,i,s){mr(s)?Object.assign(e,i):this._resolveAnimations(t,s).update(e,i)}updateSharedOptions(e,t,i){e&&!mr(t)&&this._resolveAnimations(void 0,t).update(e,i)}_setStyle(e,t,i,s){e.active=s;const l=this.getStyle(t,s);this._resolveAnimations(t,i,s).update(e,{options:!s&&this.getSharedOptions(l)||l})}removeHoverStyle(e,t,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,t,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,i=this._cachedMeta.data;for(const[r,a,u]of this._syncList)this[r](a,u);this._syncList=[];const s=i.length,l=t.length,o=Math.min(l,s);o&&this.parse(0,o),l>s?this._insertElements(s,l-s,e):l{for(u.length+=t,r=u.length-1;r>=o;r--)u[r]=u[r-t]};for(a(l),r=e;rs-l))}return n._cache.$bar}function wk(n){const e=n.iScale,t=kk(e,n.type);let i=e._length,s,l,o,r;const a=()=>{o===32767||o===-32768||(In(r)&&(i=Math.min(i,Math.abs(o-r)||i)),r=o)};for(s=0,l=t.length;s0?s[n-1]:null,r=nMath.abs(r)&&(a=r,u=o),e[t.axis]=u,e._custom={barStart:a,barEnd:u,start:s,end:l,min:o,max:r}}function x_(n,e,t,i){return gt(n)?$k(n,e,t,i):e[t.axis]=t.parse(n,i),e}function Pf(n,e,t,i){const s=n.iScale,l=n.vScale,o=s.getLabels(),r=s===l,a=[];let u,f,c,d;for(u=t,f=t+i;u=t?1:-1)}function Mk(n){let e,t,i,s,l;return n.horizontal?(e=n.base>n.x,t="left",i="right"):(e=n.basea.controller.options.grouped),l=i.options.stacked,o=[],r=a=>{const u=a.controller.getParsed(t),f=u&&u[a.vScale.axis];if(at(f)||isNaN(f))return!0};for(const a of s)if(!(t!==void 0&&r(a))&&((l===!1||o.indexOf(a.stack)===-1||l===void 0&&a.stack===void 0)&&o.push(a.stack),a.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,t,i){const s=this._getStacks(e,i),l=t!==void 0?s.indexOf(t):-1;return l===-1?s.length-1:l}_getRuler(){const e=this.options,t=this._cachedMeta,i=t.iScale,s=[];let l,o;for(l=0,o=t.data.length;l=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}getLabelAndValue(e){const t=this._cachedMeta,{xScale:i,yScale:s}=t,l=this.getParsed(e),o=i.getLabelForValue(l.x),r=s.getLabelForValue(l.y),a=l._custom;return{label:t.label,value:"("+o+", "+r+(a?", "+a:"")+")"}}update(e){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,i,s){const l=s==="reset",{iScale:o,vScale:r}=this._cachedMeta,{sharedOptions:a,includeOptions:u}=this._getSharedOptions(t,s),f=o.axis,c=r.axis;for(let d=t;dpl(T,r,a,!0)?1:Math.max($,$*t,M,M*t),h=(T,$,M)=>pl(T,r,a,!0)?-1:Math.min($,$*t,M,M*t),g=m(0,u,c),b=m(kt,f,d),k=h(Tt,u,c),y=h(Tt+kt,f,d);i=(g-k)/2,s=(b-y)/2,l=-(g+k)/2,o=-(b+y)/2}return{ratioX:i,ratioY:s,offsetX:l,offsetY:o}}class Al extends Un{constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let l=a=>+i[a];if(Ke(i[e])){const{key:a="value"}=this._parsing;l=u=>+$i(i[u],a)}let o,r;for(o=e,r=e+t;o0&&!isNaN(e)?ct*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=El(t._parsed[e],i.options.locale);return{label:s[e]||"",value:l}}getMaxBorderWidth(e){let t=0;const i=this.chart;let s,l,o,r,a;if(!e){for(s=0,l=i.data.datasets.length;sn!=="spacing",_indexable:n=>n!=="spacing"};Al.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const e=n.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:t}}=n.legend.options;return e.labels.map((i,s)=>{const o=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:t,hidden:!n.getDataVisibility(s),index:s}})}return[]}},onClick(n,e,t){t.chart.toggleDataVisibility(e.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){let e=n.label;const t=": "+n.formattedValue;return gt(e)?(e=e.slice(),e[0]+=t):e+=t,e}}}}};class Yo extends Un{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:i,data:s=[],_dataset:l}=t,o=this.chart._animationsDisabled;let{start:r,count:a}=P_(t,s,o);this._drawStart=r,this._drawCount=a,L_(t)&&(r=0,a=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!l._decimated,i.points=s;const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:u},e),this.updateElements(s,r,a,e)}updateElements(e,t,i,s){const l=s==="reset",{iScale:o,vScale:r,_stacked:a,_dataset:u}=this._cachedMeta,{sharedOptions:f,includeOptions:c}=this._getSharedOptions(t,s),d=o.axis,m=r.axis,{spanGaps:h,segment:g}=this.options,b=Cs(h)?h:Number.POSITIVE_INFINITY,k=this.chart._animationsDisabled||l||s==="none";let y=t>0&&this.getParsed(t-1);for(let T=t;T0&&Math.abs(M[d]-y[d])>b,g&&(C.parsed=M,C.raw=u.data[T]),c&&(C.options=f||this.resolveDataElementOptions(T,$.active?"active":s)),k||this.updateElement($,T,C,s),y=M}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,i=t.options&&t.options.borderWidth||0,s=e.data||[];if(!s.length)return i;const l=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,l,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Yo.id="line";Yo.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};Yo.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Wa extends Un{constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=El(t._parsed[e].r,i.options.locale);return{label:s[e]||"",value:l}}parseObjectData(e,t,i,s){return W_.bind(this)(e,t,i,s)}update(e){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){const e=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((i,s)=>{const l=this.getParsed(s).r;!isNaN(l)&&this.chart.getDataVisibility(s)&&(lt.max&&(t.max=l))}),t}_updateRadius(){const e=this.chart,t=e.chartArea,i=e.options,s=Math.min(t.right-t.left,t.bottom-t.top),l=Math.max(s/2,0),o=Math.max(i.cutoutPercentage?l/100*i.cutoutPercentage:1,0),r=(l-o)/e.getVisibleDatasetCount();this.outerRadius=l-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(e,t,i,s){const l=s==="reset",o=this.chart,a=o.options.animation,u=this._cachedMeta.rScale,f=u.xCenter,c=u.yCenter,d=u.getIndexAngle(0)-.5*Tt;let m=d,h;const g=360/this.countVisibleElements();for(h=0;h{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&t++}),t}_computeAngle(e,t,i){return this.chart.getDataVisibility(e)?Hn(this.resolveDataElementOptions(e,t).angle||i):0}}Wa.id="polarArea";Wa.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};Wa.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const e=n.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:t}}=n.legend.options;return e.labels.map((i,s)=>{const o=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:t,hidden:!n.getDataVisibility(s),index:s}})}return[]}},onClick(n,e,t){t.chart.toggleDataVisibility(e.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){return n.chart.data.labels[n.dataIndex]+": "+n.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class eb extends Al{}eb.id="pie";eb.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Ya extends Un{getLabelAndValue(e){const t=this._cachedMeta.vScale,i=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(i[t.axis])}}parseObjectData(e,t,i,s){return W_.bind(this)(e,t,i,s)}update(e){const t=this._cachedMeta,i=t.dataset,s=t.data||[],l=t.iScale.getLabels();if(i.points=s,e!=="resize"){const o=this.resolveDatasetElementOptions(e);this.options.showLine||(o.borderWidth=0);const r={_loop:!0,_fullLoop:l.length===s.length,options:o};this.updateElement(i,void 0,r,e)}this.updateElements(s,0,s.length,e)}updateElements(e,t,i,s){const l=this._cachedMeta.rScale,o=s==="reset";for(let r=t;r{s[l]=i[l]&&i[l].active()?i[l]._to:this[l]}),s}};ci.defaults={};ci.defaultRoutes=void 0;const tb={values(n){return gt(n)?n:""+n},numeric(n,e,t){if(n===0)return"0";const i=this.chart.options.locale;let s,l=n;if(t.length>1){const u=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(u<1e-4||u>1e15)&&(s="scientific"),l=Ik(n,t)}const o=On(Math.abs(l)),r=Math.max(Math.min(-1*Math.floor(o),20),0),a={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(a,this.options.ticks.format),El(n,i,a)},logarithmic(n,e,t){if(n===0)return"0";const i=n/Math.pow(10,Math.floor(On(n)));return i===1||i===2||i===5?tb.numeric.call(this,n,e,t):""}};function Ik(n,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&n!==Math.floor(n)&&(t=n-Math.floor(n)),t}var Ko={formatters:tb};Qe.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(n,e)=>e.lineWidth,tickColor:(n,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ko.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});Qe.route("scale.ticks","color","","color");Qe.route("scale.grid","color","","borderColor");Qe.route("scale.grid","borderColor","","borderColor");Qe.route("scale.title","color","","color");Qe.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"});Qe.describe("scales",{_fallback:"scale"});Qe.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"});function Pk(n,e){const t=n.options.ticks,i=t.maxTicksLimit||Lk(n),s=t.major.enabled?Fk(e):[],l=s.length,o=s[0],r=s[l-1],a=[];if(l>i)return Rk(e,a,s,l/i),a;const u=Nk(s,e,i);if(l>0){let f,c;const d=l>1?Math.round((r-o)/(l-1)):null;for(Gl(e,a,u,at(d)?0:o-d,o),f=0,c=l-1;fs)return a}return Math.max(s,1)}function Fk(n){const e=[];let t,i;for(t=0,i=n.length;tn==="left"?"right":n==="right"?"left":n,Ff=(n,e,t)=>e==="top"||e==="left"?n[e]+t:n[e]-t;function Rf(n,e){const t=[],i=n.length/e,s=n.length;let l=0;for(;lo+r)))return a}function Vk(n,e){ut(n,t=>{const i=t.gc,s=i.length/2;let l;if(s>e){for(l=0;li?i:t,i=s&&t>i?t:i,{min:$n(t,$n(i,t)),max:$n(i,$n(t,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){yt(this.options.beforeUpdate,[this])}update(e,t,i){const{beginAtZero:s,grace:l,ticks:o}=this.options,r=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=k2(this,l,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=r=l||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const f=this._getLabelSizes(),c=f.widest.width,d=f.highest.height,m=Yt(this.chart.width-c,0,this.maxWidth);r=e.offset?this.maxWidth/i:m/(i-1),c+6>r&&(r=m/(i-(e.offset?.5:1)),a=this.maxHeight-Us(e.grid)-t.padding-qf(e.title,this.chart.options.font),u=Math.sqrt(c*c+d*d),o=Aa(Math.min(Math.asin(Yt((f.highest.height+6)/r,-1,1)),Math.asin(Yt(a/u,-1,1))-Math.asin(Yt(d/u,-1,1)))),o=Math.max(s,Math.min(l,o))),this.labelRotation=o}afterCalculateLabelRotation(){yt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){yt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:i,title:s,grid:l}}=this,o=this._isVisible(),r=this.isHorizontal();if(o){const a=qf(s,t.options.font);if(r?(e.width=this.maxWidth,e.height=Us(l)+a):(e.height=this.maxHeight,e.width=Us(l)+a),i.display&&this.ticks.length){const{first:u,last:f,widest:c,highest:d}=this._getLabelSizes(),m=i.padding*2,h=Hn(this.labelRotation),g=Math.cos(h),b=Math.sin(h);if(r){const k=i.mirror?0:b*c.width+g*d.height;e.height=Math.min(this.maxHeight,e.height+k+m)}else{const k=i.mirror?0:g*c.width+b*d.height;e.width=Math.min(this.maxWidth,e.width+k+m)}this._calculatePadding(u,f,b,g)}}this._handleMargins(),r?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,i,s){const{ticks:{align:l,padding:o},position:r}=this.options,a=this.labelRotation!==0,u=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,m=0;a?u?(d=s*e.width,m=i*t.height):(d=i*e.height,m=s*t.width):l==="start"?m=t.width:l==="end"?d=e.width:l!=="inner"&&(d=e.width/2,m=t.width/2),this.paddingLeft=Math.max((d-f+o)*this.width/(this.width-f),0),this.paddingRight=Math.max((m-c+o)*this.width/(this.width-c),0)}else{let f=t.height/2,c=e.height/2;l==="start"?(f=0,c=e.height):l==="end"&&(f=t.height,c=0),this.paddingTop=f+o,this.paddingBottom=c+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){yt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return t==="top"||t==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,i;for(t=0,i=e.length;t({width:l[D]||0,height:o[D]||0});return{first:C(0),last:C(t-1),widest:C($),highest:C(M),widths:l,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return Ny(this._alignToPixels?ji(this.chart,t,0):t)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&er*s?r/i:a/s:a*s0}_computeGridLineItems(e){const t=this.axis,i=this.chart,s=this.options,{grid:l,position:o}=s,r=l.offset,a=this.isHorizontal(),f=this.ticks.length+(r?1:0),c=Us(l),d=[],m=l.setContext(this.getContext()),h=m.drawBorder?m.borderWidth:0,g=h/2,b=function(se){return ji(i,se,h)};let k,y,T,$,M,C,D,E,P,L,N,F;if(o==="top")k=b(this.bottom),C=this.bottom-c,E=k-g,L=b(e.top)+g,F=e.bottom;else if(o==="bottom")k=b(this.top),L=e.top,F=b(e.bottom)-g,C=k+g,E=this.top+c;else if(o==="left")k=b(this.right),M=this.right-c,D=k-g,P=b(e.left)+g,N=e.right;else if(o==="right")k=b(this.left),P=e.left,N=b(e.right)-g,M=k+g,D=this.left+c;else if(t==="x"){if(o==="center")k=b((e.top+e.bottom)/2+.5);else if(Ke(o)){const se=Object.keys(o)[0],W=o[se];k=b(this.chart.scales[se].getPixelForValue(W))}L=e.top,F=e.bottom,C=k+g,E=C+c}else if(t==="y"){if(o==="center")k=b((e.left+e.right)/2);else if(Ke(o)){const se=Object.keys(o)[0],W=o[se];k=b(this.chart.scales[se].getPixelForValue(W))}M=k-g,D=M-c,P=e.left,N=e.right}const R=Xe(s.ticks.maxTicksLimit,f),X=Math.max(1,Math.ceil(f/R));for(y=0;yl.value===e);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const t=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let l,o;const r=(a,u,f)=>{!f.width||!f.color||(i.save(),i.lineWidth=f.width,i.strokeStyle=f.color,i.setLineDash(f.borderDash||[]),i.lineDashOffset=f.borderDashOffset,i.beginPath(),i.moveTo(a.x,a.y),i.lineTo(u.x,u.y),i.stroke(),i.restore())};if(t.display)for(l=0,o=s.length;l{this.draw(s)}}]:[{z:i,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:t,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let l,o;for(l=0,o=t.length;l{const i=t.split("."),s=i.pop(),l=[n].concat(i).join("."),o=e[t].split("."),r=o.pop(),a=o.join(".");Qe.route(l,s,a,r)})}function Jk(n){return"id"in n&&"defaults"in n}class Zk{constructor(){this.controllers=new Xl(Un,"datasets",!0),this.elements=new Xl(ci,"elements"),this.plugins=new Xl(Object,"plugins"),this.scales=new Xl(ns,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,i){[...t].forEach(s=>{const l=i||this._getRegistryForType(s);i||l.isForType(s)||l===this.plugins&&s.id?this._exec(e,l,s):ut(s,o=>{const r=i||this._getRegistryForType(o);this._exec(e,r,o)})})}_exec(e,t,i){const s=Ea(e);yt(i["before"+s],[],i),t[e](i),yt(i["after"+s],[],i)}_getRegistryForType(e){for(let t=0;t0&&this.getParsed(t-1);for(let $=t;$0&&Math.abs(C[m]-T[m])>k,b&&(D.parsed=C,D.raw=u.data[$]),d&&(D.options=c||this.resolveDataElementOptions($,M.active?"active":s)),y||this.updateElement(M,$,D,s),T=C}this.updateSharedOptions(c,s,f)}getMaxOverflow(){const e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let r=0;for(let a=t.length-1;a>=0;--a)r=Math.max(r,t[a].size(this.resolveDataElementOptions(a))/2);return r>0&&r}const i=e.dataset,s=i.options&&i.options.borderWidth||0;if(!t.length)return s;const l=t[0].size(this.resolveDataElementOptions(0)),o=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(s,l,o)/2}}Ka.id="scatter";Ka.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};Ka.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(n){return"("+n.label+", "+n.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function Hi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class xr{constructor(e){this.options=e||{}}init(e){}formats(){return Hi()}parse(e,t){return Hi()}format(e,t){return Hi()}add(e,t,i){return Hi()}diff(e,t,i){return Hi()}startOf(e,t,i){return Hi()}endOf(e,t){return Hi()}}xr.override=function(n){Object.assign(xr.prototype,n)};var nb={_date:xr};function Gk(n,e,t,i){const{controller:s,data:l,_sorted:o}=n,r=s._cachedMeta.iScale;if(r&&e===r.axis&&e!=="r"&&o&&l.length){const a=r._reversePixels?Fy:Yi;if(i){if(s._sharedOptions){const u=l[0],f=typeof u.getRange=="function"&&u.getRange(e);if(f){const c=a(l,e,t-f),d=a(l,e,t+f);return{lo:c.lo,hi:d.hi}}}}else return a(l,e,t)}return{lo:0,hi:l.length-1}}function Il(n,e,t,i,s){const l=n.getSortedVisibleDatasetMetas(),o=t[e];for(let r=0,a=l.length;r{a[o](e[t],s)&&(l.push({element:a,datasetIndex:u,index:f}),r=r||a.inRange(e.x,e.y,s))}),i&&!r?[]:l}var ew={evaluateInteractionItems:Il,modes:{index(n,e,t,i){const s=Bi(e,n),l=t.axis||"x",o=t.includeInvisible||!1,r=t.intersect?gr(n,s,l,i,o):_r(n,s,l,!1,i,o),a=[];return r.length?(n.getSortedVisibleDatasetMetas().forEach(u=>{const f=r[0].index,c=u.data[f];c&&!c.skip&&a.push({element:c,datasetIndex:u.index,index:f})}),a):[]},dataset(n,e,t,i){const s=Bi(e,n),l=t.axis||"xy",o=t.includeInvisible||!1;let r=t.intersect?gr(n,s,l,i,o):_r(n,s,l,!1,i,o);if(r.length>0){const a=r[0].datasetIndex,u=n.getDatasetMeta(a).data;r=[];for(let f=0;ft.pos===e)}function Hf(n,e){return n.filter(t=>ib.indexOf(t.pos)===-1&&t.box.axis===e)}function Ys(n,e){return n.sort((t,i)=>{const s=e?i:t,l=e?t:i;return s.weight===l.weight?s.index-l.index:s.weight-l.weight})}function tw(n){const e=[];let t,i,s,l,o,r;for(t=0,i=(n||[]).length;tu.box.fullSize),!0),i=Ys(Ws(e,"left"),!0),s=Ys(Ws(e,"right")),l=Ys(Ws(e,"top"),!0),o=Ys(Ws(e,"bottom")),r=Hf(e,"x"),a=Hf(e,"y");return{fullSize:t,leftAndTop:i.concat(l),rightAndBottom:s.concat(a).concat(o).concat(r),chartArea:Ws(e,"chartArea"),vertical:i.concat(s).concat(a),horizontal:l.concat(o).concat(r)}}function Vf(n,e,t,i){return Math.max(n[t],e[t])+Math.max(n[i],e[i])}function sb(n,e){n.top=Math.max(n.top,e.top),n.left=Math.max(n.left,e.left),n.bottom=Math.max(n.bottom,e.bottom),n.right=Math.max(n.right,e.right)}function lw(n,e,t,i){const{pos:s,box:l}=t,o=n.maxPadding;if(!Ke(s)){t.size&&(n[s]-=t.size);const c=i[t.stack]||{size:0,count:1};c.size=Math.max(c.size,t.horizontal?l.height:l.width),t.size=c.size/c.count,n[s]+=t.size}l.getPadding&&sb(o,l.getPadding());const r=Math.max(0,e.outerWidth-Vf(o,n,"left","right")),a=Math.max(0,e.outerHeight-Vf(o,n,"top","bottom")),u=r!==n.w,f=a!==n.h;return n.w=r,n.h=a,t.horizontal?{same:u,other:f}:{same:f,other:u}}function ow(n){const e=n.maxPadding;function t(i){const s=Math.max(e[i]-n[i],0);return n[i]+=s,s}n.y+=t("top"),n.x+=t("left"),t("right"),t("bottom")}function rw(n,e){const t=e.maxPadding;function i(s){const l={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{l[o]=Math.max(e[o],t[o])}),l}return i(n?["left","right"]:["top","bottom"])}function Qs(n,e,t,i){const s=[];let l,o,r,a,u,f;for(l=0,o=n.length,u=0;l{typeof g.beforeLayout=="function"&&g.beforeLayout()});const f=a.reduce((g,b)=>b.box.options&&b.box.options.display===!1?g:g+1,0)||1,c=Object.freeze({outerWidth:e,outerHeight:t,padding:s,availableWidth:l,availableHeight:o,vBoxMaxWidth:l/2/f,hBoxMaxHeight:o/2}),d=Object.assign({},s);sb(d,Pn(i));const m=Object.assign({maxPadding:d,w:l,h:o,x:s.left,y:s.top},s),h=iw(a.concat(u),c);Qs(r.fullSize,m,c,h),Qs(a,m,c,h),Qs(u,m,c,h)&&Qs(a,m,c,h),ow(m),zf(r.leftAndTop,m,c,h),m.x+=m.w,m.y+=m.h,zf(r.rightAndBottom,m,c,h),n.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},ut(r.chartArea,g=>{const b=g.box;Object.assign(b,n.chartArea),b.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class lb{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,i){}removeEventListener(e,t,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,i,s){return t=Math.max(0,t||e.width),i=i||e.height,{width:t,height:Math.max(0,s?Math.floor(t/s):i)}}isAttached(e){return!0}updateConfig(e){}}class aw extends lb{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const co="$chartjs",uw={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Bf=n=>n===null||n==="";function fw(n,e){const t=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[co]={initial:{height:i,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",Bf(s)){const l=kf(n,"width");l!==void 0&&(n.width=l)}if(Bf(i))if(n.style.height==="")n.height=n.width/(e||2);else{const l=kf(n,"height");l!==void 0&&(n.height=l)}return n}const ob=U2?{passive:!0}:!1;function cw(n,e,t){n.addEventListener(e,t,ob)}function dw(n,e,t){n.canvas.removeEventListener(e,t,ob)}function pw(n,e){const t=uw[n.type]||n.type,{x:i,y:s}=Bi(n,e);return{type:t,chart:e,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Oo(n,e){for(const t of n)if(t===e||t.contains(e))return!0}function mw(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||Oo(r.addedNodes,i),o=o&&!Oo(r.removedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function hw(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||Oo(r.removedNodes,i),o=o&&!Oo(r.addedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const gl=new Map;let Uf=0;function rb(){const n=window.devicePixelRatio;n!==Uf&&(Uf=n,gl.forEach((e,t)=>{t.currentDevicePixelRatio!==n&&e()}))}function gw(n,e){gl.size||window.addEventListener("resize",rb),gl.set(n,e)}function _w(n){gl.delete(n),gl.size||window.removeEventListener("resize",rb)}function bw(n,e,t){const i=n.canvas,s=i&&za(i);if(!s)return;const l=I_((r,a)=>{const u=s.clientWidth;t(r,a),u{const a=r[0],u=a.contentRect.width,f=a.contentRect.height;u===0&&f===0||l(u,f)});return o.observe(s),gw(n,l),o}function br(n,e,t){t&&t.disconnect(),e==="resize"&&_w(n)}function vw(n,e,t){const i=n.canvas,s=I_(l=>{n.ctx!==null&&t(pw(l,n))},n,l=>{const o=l[0];return[o,o.offsetX,o.offsetY]});return cw(i,e,s),s}class yw extends lb{acquireContext(e,t){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(fw(e,t),i):null}releaseContext(e){const t=e.canvas;if(!t[co])return!1;const i=t[co].initial;["height","width"].forEach(l=>{const o=i[l];at(o)?t.removeAttribute(l):t.setAttribute(l,o)});const s=i.style||{};return Object.keys(s).forEach(l=>{t.style[l]=s[l]}),t.width=t.width,delete t[co],!0}addEventListener(e,t,i){this.removeEventListener(e,t);const s=e.$proxies||(e.$proxies={}),o={attach:mw,detach:hw,resize:bw}[t]||vw;s[t]=o(e,t,i)}removeEventListener(e,t){const i=e.$proxies||(e.$proxies={}),s=i[t];if(!s)return;({attach:br,detach:br,resize:br}[t]||dw)(e,t,s),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,s){return B2(e,t,i,s)}isAttached(e){const t=za(e);return!!(t&&t.isConnected)}}function kw(n){return!K_()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?aw:yw}class ww{constructor(){this._init=[]}notify(e,t,i,s){t==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const l=s?this._descriptors(e).filter(s):this._descriptors(e),o=this._notify(l,e,t,i);return t==="afterDestroy"&&(this._notify(l,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,t,i,s){s=s||{};for(const l of e){const o=l.plugin,r=o[i],a=[t,s,l.options];if(yt(r,a,o)===!1&&s.cancelable)return!1}return!0}invalidate(){at(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const i=e&&e.config,s=Xe(i.options&&i.options.plugins,{}),l=Sw(i);return s===!1&&!t?[]:$w(e,l,s,t)}_notifyStateChanges(e){const t=this._oldCache||[],i=this._cache,s=(l,o)=>l.filter(r=>!o.some(a=>r.plugin.id===a.plugin.id));this._notify(s(t,i),e,"stop"),this._notify(s(i,t),e,"start")}}function Sw(n){const e={},t=[],i=Object.keys(Zn.plugins.items);for(let l=0;l{const a=i[r];if(!Ke(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const u=ta(r,a),f=Dw(u,s),c=t.scales||{};l[u]=l[u]||r,o[r]=tl(Object.create(null),[{axis:u},a,c[u],c[f]])}),n.data.datasets.forEach(r=>{const a=r.type||n.type,u=r.indexAxis||ea(a,e),c=(xi[a]||{}).scales||{};Object.keys(c).forEach(d=>{const m=Mw(d,u),h=r[m+"AxisID"]||l[m]||m;o[h]=o[h]||Object.create(null),tl(o[h],[{axis:m},i[h],c[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];tl(a,[Qe.scales[a.type],Qe.scale])}),o}function ab(n){const e=n.options||(n.options={});e.plugins=Xe(e.plugins,{}),e.scales=Ew(n,e)}function ub(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function Aw(n){return n=n||{},n.data=ub(n.data),ab(n),n}const Wf=new Map,fb=new Set;function eo(n,e){let t=Wf.get(n);return t||(t=e(),Wf.set(n,t),fb.add(t)),t}const Ks=(n,e,t)=>{const i=$i(e,t);i!==void 0&&n.add(i)};class Iw{constructor(e){this._config=Aw(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=ub(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),ab(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return eo(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return eo(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return eo(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id,i=this.type;return eo(`${i}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){const i=this._scopeCache;let s=i.get(e);return(!s||t)&&(s=new Map,i.set(e,s)),s}getOptionScopes(e,t,i){const{options:s,type:l}=this,o=this._cachedScopes(e,i),r=o.get(t);if(r)return r;const a=new Set;t.forEach(f=>{e&&(a.add(e),f.forEach(c=>Ks(a,e,c))),f.forEach(c=>Ks(a,s,c)),f.forEach(c=>Ks(a,xi[l]||{},c)),f.forEach(c=>Ks(a,Qe,c)),f.forEach(c=>Ks(a,Xr,c))});const u=Array.from(a);return u.length===0&&u.push(Object.create(null)),fb.has(t)&&o.set(t,u),u}chartOptionScopes(){const{options:e,type:t}=this;return[e,xi[t]||{},Qe.datasets[t]||{},{type:t},Qe,Xr]}resolveNamedOptions(e,t,i,s=[""]){const l={$shared:!0},{resolver:o,subPrefixes:r}=Yf(this._resolverCache,e,s);let a=o;if(Lw(o,t)){l.$shared=!1,i=Ci(i)?i():i;const u=this.createResolver(e,i,r);a=Ms(o,i,u)}for(const u of t)l[u]=a[u];return l}createResolver(e,t,i=[""],s){const{resolver:l}=Yf(this._resolverCache,e,i);return Ke(t)?Ms(l,t,void 0,s):l}}function Yf(n,e,t){let i=n.get(e);i||(i=new Map,n.set(e,i));const s=t.join();let l=i.get(s);return l||(l={resolver:ja(e,t),subPrefixes:t.filter(r=>!r.toLowerCase().includes("hover"))},i.set(s,l)),l}const Pw=n=>Ke(n)&&Object.getOwnPropertyNames(n).reduce((e,t)=>e||Ci(n[t]),!1);function Lw(n,e){const{isScriptable:t,isIndexable:i}=V_(n);for(const s of e){const l=t(s),o=i(s),r=(o||l)&&n[s];if(l&&(Ci(r)||Pw(r))||o&>(r))return!0}return!1}var Nw="3.9.1";const Fw=["top","bottom","left","right","chartArea"];function Kf(n,e){return n==="top"||n==="bottom"||Fw.indexOf(n)===-1&&e==="x"}function Jf(n,e){return function(t,i){return t[n]===i[n]?t[e]-i[e]:t[n]-i[n]}}function Zf(n){const e=n.chart,t=e.options.animation;e.notifyPlugins("afterRender"),yt(t&&t.onComplete,[n],e)}function Rw(n){const e=n.chart,t=e.options.animation;yt(t&&t.onProgress,[n],e)}function cb(n){return K_()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Eo={},db=n=>{const e=cb(n);return Object.values(Eo).filter(t=>t.canvas===e).pop()};function qw(n,e,t){const i=Object.keys(n);for(const s of i){const l=+s;if(l>=e){const o=n[s];delete n[s],(t>0||l>e)&&(n[l+t]=o)}}}function jw(n,e,t,i){return!t||n.type==="mouseout"?null:i?e:n}class Ao{constructor(e,t){const i=this.config=new Iw(t),s=cb(e),l=db(s);if(l)throw new Error("Canvas is already in use. Chart with ID '"+l.id+"' must be destroyed before the canvas with ID '"+l.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||kw(s)),this.platform.updateConfig(i);const r=this.platform.acquireContext(s,o.aspectRatio),a=r&&r.canvas,u=a&&a.height,f=a&&a.width;if(this.id=Sy(),this.ctx=r,this.canvas=a,this.width=f,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new ww,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=jy(c=>this.update(c),o.resizeDelay||0),this._dataChanges=[],Eo[this.id]=this,!r||!a){console.error("Failed to create chart: can't acquire context from the given item");return}ii.listen(this,"complete",Zf),ii.listen(this,"progress",Rw),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:s,_aspectRatio:l}=this;return at(e)?t&&l?l:s?i/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():yf(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return _f(this.canvas,this.ctx),this}stop(){return ii.stop(this),this}resize(e,t){ii.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const i=this.options,s=this.canvas,l=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,e,t,l),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,yf(this,r,!0)&&(this.notifyPlugins("resize",{size:o}),yt(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};ut(t,(i,s)=>{i.id=s})}buildOrUpdateScales(){const e=this.options,t=e.scales,i=this.scales,s=Object.keys(i).reduce((o,r)=>(o[r]=!1,o),{});let l=[];t&&(l=l.concat(Object.keys(t).map(o=>{const r=t[o],a=ta(o,r),u=a==="r",f=a==="x";return{options:r,dposition:u?"chartArea":f?"bottom":"left",dtype:u?"radialLinear":f?"category":"linear"}}))),ut(l,o=>{const r=o.options,a=r.id,u=ta(a,r),f=Xe(r.type,o.dtype);(r.position===void 0||Kf(r.position,u)!==Kf(o.dposition))&&(r.position=o.dposition),s[a]=!0;let c=null;if(a in i&&i[a].type===f)c=i[a];else{const d=Zn.getScale(f);c=new d({id:a,type:f,ctx:this.ctx,chart:this}),i[c.id]=c}c.init(r,e)}),ut(s,(o,r)=>{o||delete i[r]}),ut(i,o=>{xl.configure(this,o,o.options),xl.addBox(this,o)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,i=e.length;if(e.sort((s,l)=>s.index-l.index),i>t){for(let s=t;st.length&&delete this._stacks,e.forEach((i,s)=>{t.filter(l=>l===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=t.length;i{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const i=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const l=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,f=this.data.datasets.length;u{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Jf("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){ut(this.scales,e=>{xl.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!sf(t,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:l}of t){const o=i==="_removeElements"?-l:l;qw(e,s,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,i=l=>new Set(e.filter(o=>o[0]===l).map((o,r)=>r+","+o.splice(1).join(","))),s=i(0);for(let l=1;ll.split(",")).map(l=>({method:l[1],start:+l[2],count:+l[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;xl.update(this,this.width,this.height,e);const t=this.chartArea,i=t.width<=0||t.height<=0;this._layers=[],ut(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,l)=>{s._idx=l}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let t=0,i=this.data.datasets.length;t=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,i=e._clip,s=!i.disabled,l=this.chartArea,o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&Fa(t,{left:i.left===!1?0:l.left-i.left,right:i.right===!1?this.width:l.right+i.right,top:i.top===!1?0:l.top-i.top,bottom:i.bottom===!1?this.height:l.bottom+i.bottom}),e.controller.draw(),s&&Ra(t),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return hl(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,i,s){const l=ew.modes[t];return typeof l=="function"?l(this,e,i,s):[]}getDatasetMeta(e){const t=this.data.datasets[e],i=this._metasets;let s=i.filter(l=>l&&l._dataset===t).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Oi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!t.hidden}setDatasetVisibility(e,t){const i=this.getDatasetMeta(e);i.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,i){const s=i?"show":"hide",l=this.getDatasetMeta(e),o=l.controller._resolveAnimations(void 0,s);In(t)?(l.data[t].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),o.update(l,{visible:i}),this.update(r=>r.datasetIndex===e?s:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),ii.remove(this),e=0,t=this.data.datasets.length;e{t.addEventListener(this,l,o),e[l]=o},s=(l,o,r)=>{l.offsetX=o,l.offsetY=r,this._eventHandler(l)};ut(this.options.events,l=>i(l,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,i=(a,u)=>{t.addEventListener(this,a,u),e[a]=u},s=(a,u)=>{e[a]&&(t.removeEventListener(this,a,u),delete e[a])},l=(a,u)=>{this.canvas&&this.resize(a,u)};let o;const r=()=>{s("attach",r),this.attached=!0,this.resize(),i("resize",l),i("detach",o)};o=()=>{this.attached=!1,s("resize",l),this._stop(),this._resize(0,0),i("attach",r)},t.isAttached(this.canvas)?r():o()}unbindEvents(){ut(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},ut(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,i){const s=i?"set":"remove";let l,o,r,a;for(t==="dataset"&&(l=this.getDatasetMeta(e[0].datasetIndex),l.controller["_"+s+"DatasetHoverStyle"]()),r=0,a=e.length;r{const r=this.getDatasetMeta(l);if(!r)throw new Error("No dataset found at index "+l);return{datasetIndex:l,element:r.data[o],index:o}});!ko(i,t)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,t))}notifyPlugins(e,t,i){return this._plugins.notify(this,e,t,i)}_updateHoverStyles(e,t,i){const s=this.options.hover,l=(a,u)=>a.filter(f=>!u.some(c=>f.datasetIndex===c.datasetIndex&&f.index===c.index)),o=l(t,e),r=i?e:l(e,t);o.length&&this.updateHoverStyle(o,s.mode,!1),r.length&&s.mode&&this.updateHoverStyle(r,s.mode,!0)}_eventHandler(e,t){const i={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},s=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const l=this._handleEvent(e,t,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(l||i.changed)&&this.render(),this}_handleEvent(e,t,i){const{_active:s=[],options:l}=this,o=t,r=this._getActiveElements(e,s,i,o),a=Oy(e),u=jw(e,this._lastEvent,i,a);i&&(this._lastEvent=null,yt(l.onHover,[e,r,this],this),a&&yt(l.onClick,[e,r,this],this));const f=!ko(r,s);return(f||t)&&(this._active=r,this._updateHoverStyles(r,s,t)),this._lastEvent=u,f}_getActiveElements(e,t,i,s){if(e.type==="mouseout")return[];if(!i)return t;const l=this.options.hover;return this.getElementsAtEventForMode(e,l.mode,l,s)}}const Gf=()=>ut(Ao.instances,n=>n._plugins.invalidate()),hi=!0;Object.defineProperties(Ao,{defaults:{enumerable:hi,value:Qe},instances:{enumerable:hi,value:Eo},overrides:{enumerable:hi,value:xi},registry:{enumerable:hi,value:Zn},version:{enumerable:hi,value:Nw},getChart:{enumerable:hi,value:db},register:{enumerable:hi,value:(...n)=>{Zn.add(...n),Gf()}},unregister:{enumerable:hi,value:(...n)=>{Zn.remove(...n),Gf()}}});function pb(n,e,t){const{startAngle:i,pixelMargin:s,x:l,y:o,outerRadius:r,innerRadius:a}=e;let u=s/r;n.beginPath(),n.arc(l,o,r,i-u,t+u),a>s?(u=s/a,n.arc(l,o,a,t+u,i-u,!0)):n.arc(l,o,s,t+kt,i-kt),n.closePath(),n.clip()}function Hw(n){return qa(n,["outerStart","outerEnd","innerStart","innerEnd"])}function Vw(n,e,t,i){const s=Hw(n.options.borderRadius),l=(t-e)/2,o=Math.min(l,i*e/2),r=a=>{const u=(t-Math.min(l,a))*i/2;return Yt(a,0,Math.min(l,u))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:Yt(s.innerStart,0,o),innerEnd:Yt(s.innerEnd,0,o)}}function ps(n,e,t,i){return{x:t+n*Math.cos(e),y:i+n*Math.sin(e)}}function na(n,e,t,i,s,l){const{x:o,y:r,startAngle:a,pixelMargin:u,innerRadius:f}=e,c=Math.max(e.outerRadius+i+t-u,0),d=f>0?f+i+t+u:0;let m=0;const h=s-a;if(i){const se=f>0?f-i:0,W=c>0?c-i:0,G=(se+W)/2,te=G!==0?h*G/(G+i):h;m=(h-te)/2}const g=Math.max(.001,h*c-t/Tt)/c,b=(h-g)/2,k=a+b+m,y=s-b-m,{outerStart:T,outerEnd:$,innerStart:M,innerEnd:C}=Vw(e,d,c,y-k),D=c-T,E=c-$,P=k+T/D,L=y-$/E,N=d+M,F=d+C,R=k+M/N,X=y-C/F;if(n.beginPath(),l){if(n.arc(o,r,c,P,L),$>0){const G=ps(E,L,o,r);n.arc(G.x,G.y,$,L,y+kt)}const se=ps(F,y,o,r);if(n.lineTo(se.x,se.y),C>0){const G=ps(F,X,o,r);n.arc(G.x,G.y,C,y+kt,X+Math.PI)}if(n.arc(o,r,d,y-C/d,k+M/d,!0),M>0){const G=ps(N,R,o,r);n.arc(G.x,G.y,M,R+Math.PI,k-kt)}const W=ps(D,k,o,r);if(n.lineTo(W.x,W.y),T>0){const G=ps(D,P,o,r);n.arc(G.x,G.y,T,k-kt,P)}}else{n.moveTo(o,r);const se=Math.cos(P)*c+o,W=Math.sin(P)*c+r;n.lineTo(se,W);const G=Math.cos(L)*c+o,te=Math.sin(L)*c+r;n.lineTo(G,te)}n.closePath()}function zw(n,e,t,i,s){const{fullCircles:l,startAngle:o,circumference:r}=e;let a=e.endAngle;if(l){na(n,e,t,i,o+ct,s);for(let u=0;u=ct||pl(l,r,a),g=ml(o,u+d,f+d);return h&&g}getCenterPoint(e){const{x:t,y:i,startAngle:s,endAngle:l,innerRadius:o,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:a,spacing:u}=this.options,f=(s+l)/2,c=(o+r+u+a)/2;return{x:t+Math.cos(f)*c,y:i+Math.sin(f)*c}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:i}=this,s=(t.offset||0)/2,l=(t.spacing||0)/2,o=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=i>ct?Math.floor(i/ct):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let r=0;if(s){r=s/2;const u=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(u)*r,Math.sin(u)*r),this.circumference>=Tt&&(r=s)}e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor;const a=zw(e,this,r,l,o);Uw(e,this,r,l,a,o),e.restore()}}Ja.id="arc";Ja.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};Ja.defaultRoutes={backgroundColor:"backgroundColor"};function mb(n,e,t=e){n.lineCap=Xe(t.borderCapStyle,e.borderCapStyle),n.setLineDash(Xe(t.borderDash,e.borderDash)),n.lineDashOffset=Xe(t.borderDashOffset,e.borderDashOffset),n.lineJoin=Xe(t.borderJoinStyle,e.borderJoinStyle),n.lineWidth=Xe(t.borderWidth,e.borderWidth),n.strokeStyle=Xe(t.borderColor,e.borderColor)}function Ww(n,e,t){n.lineTo(t.x,t.y)}function Yw(n){return n.stepped?p2:n.tension||n.cubicInterpolationMode==="monotone"?m2:Ww}function hb(n,e,t={}){const i=n.length,{start:s=0,end:l=i-1}=t,{start:o,end:r}=e,a=Math.max(s,o),u=Math.min(l,r),f=sr&&l>r;return{count:i,start:a,loop:e.loop,ilen:u(o+(u?r-$:$))%l,T=()=>{g!==b&&(n.lineTo(f,b),n.lineTo(f,g),n.lineTo(f,k))};for(a&&(m=s[y(0)],n.moveTo(m.x,m.y)),d=0;d<=r;++d){if(m=s[y(d)],m.skip)continue;const $=m.x,M=m.y,C=$|0;C===h?(Mb&&(b=M),f=(c*f+$)/++c):(T(),n.lineTo($,M),h=C,c=0,g=b=M),k=M}T()}function ia(n){const e=n.options,t=e.borderDash&&e.borderDash.length;return!n._decimated&&!n._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!t?Jw:Kw}function Zw(n){return n.stepped?W2:n.tension||n.cubicInterpolationMode==="monotone"?Y2:Ui}function Gw(n,e,t,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,t,i)&&s.closePath()),mb(n,e.options),n.stroke(s)}function Xw(n,e,t,i){const{segments:s,options:l}=e,o=ia(e);for(const r of s)mb(n,l,r.style),n.beginPath(),o(n,e,r,{start:t,end:t+i-1})&&n.closePath(),n.stroke()}const Qw=typeof Path2D=="function";function xw(n,e,t,i){Qw&&!e.options.segment?Gw(n,e,t,i):Xw(n,e,t,i)}class Ei extends ci{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;R2(this._points,i,e,s,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=tk(this,this.options.segment))}first(){const e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){const e=this.segments,t=this.points,i=e.length;return i&&t[e[i-1].end]}interpolate(e,t){const i=this.options,s=e[t],l=this.points,o=G_(this,{property:t,start:s,end:s});if(!o.length)return;const r=[],a=Zw(i);let u,f;for(u=0,f=o.length;un!=="borderDash"&&n!=="fill"};function Xf(n,e,t,i){const s=n.options,{[t]:l}=n.getProps([t],i);return Math.abs(e-l){r=Ga(o,r,s);const a=s[o],u=s[r];i!==null?(l.push({x:a.x,y:i}),l.push({x:u.x,y:i})):t!==null&&(l.push({x:t,y:a.y}),l.push({x:t,y:u.y}))}),l}function Ga(n,e,t){for(;e>n;e--){const i=t[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function Qf(n,e,t,i){return n&&e?i(n[t],e[t]):n?n[t]:e?e[t]:0}function _b(n,e){let t=[],i=!1;return gt(n)?(i=!0,t=n):t=oS(n,e),t.length?new Ei({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function xf(n){return n&&n.fill!==!1}function rS(n,e,t){let s=n[e].fill;const l=[e];let o;if(!t)return s;for(;s!==!1&&l.indexOf(s)===-1;){if(!$t(s))return s;if(o=n[s],!o)return!1;if(o.visible)return s;l.push(s),s=o.fill}return!1}function aS(n,e,t){const i=dS(n);if(Ke(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return $t(s)&&Math.floor(s)===s?uS(i[0],e,s,t):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function uS(n,e,t,i){return(n==="-"||n==="+")&&(t=e+t),t===e||t<0||t>=i?!1:t}function fS(n,e){let t=null;return n==="start"?t=e.bottom:n==="end"?t=e.top:Ke(n)?t=e.getPixelForValue(n.value):e.getBasePixel&&(t=e.getBasePixel()),t}function cS(n,e,t){let i;return n==="start"?i=t:n==="end"?i=e.options.reverse?e.min:e.max:Ke(n)?i=n.value:i=e.getBaseValue(),i}function dS(n){const e=n.options,t=e.fill;let i=Xe(t&&t.target,t);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function pS(n){const{scale:e,index:t,line:i}=n,s=[],l=i.segments,o=i.points,r=mS(e,t);r.push(_b({x:null,y:e.bottom},i));for(let a=0;a=0;--o){const r=s[o].$filler;r&&(r.line.updateControlPoints(l,r.axis),i&&r.fill&&kr(n.ctx,r,l))}},beforeDatasetsDraw(n,e,t){if(t.drawTime!=="beforeDatasetsDraw")return;const i=n.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const l=i[s].$filler;xf(l)&&kr(n.ctx,l,n.chartArea)}},beforeDatasetDraw(n,e,t){const i=e.meta.$filler;!xf(i)||t.drawTime!=="beforeDatasetDraw"||kr(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ll={average(n){if(!n.length)return!1;let e,t,i=0,s=0,l=0;for(e=0,t=n.length;e-1?n.split(` +`):n}function $S(n,e){const{element:t,datasetIndex:i,index:s}=e,l=n.getDatasetMeta(i).controller,{label:o,value:r}=l.getLabelAndValue(s);return{chart:n,label:o,parsed:l.getParsed(s),raw:n.data.datasets[i].data[s],formattedValue:r,dataset:l.getDataset(),dataIndex:s,datasetIndex:i,element:t}}function ic(n,e){const t=n.chart.ctx,{body:i,footer:s,title:l}=n,{boxWidth:o,boxHeight:r}=e,a=vn(e.bodyFont),u=vn(e.titleFont),f=vn(e.footerFont),c=l.length,d=s.length,m=i.length,h=Pn(e.padding);let g=h.height,b=0,k=i.reduce(($,M)=>$+M.before.length+M.lines.length+M.after.length,0);if(k+=n.beforeBody.length+n.afterBody.length,c&&(g+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),k){const $=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;g+=m*$+(k-m)*a.lineHeight+(k-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*f.lineHeight+(d-1)*e.footerSpacing);let y=0;const T=function($){b=Math.max(b,t.measureText($).width+y)};return t.save(),t.font=u.string,ut(n.title,T),t.font=a.string,ut(n.beforeBody.concat(n.afterBody),T),y=e.displayColors?o+2+e.boxPadding:0,ut(i,$=>{ut($.before,T),ut($.lines,T),ut($.after,T)}),y=0,t.font=f.string,ut(n.footer,T),t.restore(),b+=h.width,{width:b,height:g}}function CS(n,e){const{y:t,height:i}=e;return tn.height-i/2?"bottom":"center"}function MS(n,e,t,i){const{x:s,width:l}=i,o=t.caretSize+t.caretPadding;if(n==="left"&&s+l+o>e.width||n==="right"&&s-l-o<0)return!0}function DS(n,e,t,i){const{x:s,width:l}=t,{width:o,chartArea:{left:r,right:a}}=n;let u="center";return i==="center"?u=s<=(r+a)/2?"left":"right":s<=l/2?u="left":s>=o-l/2&&(u="right"),MS(u,n,e,t)&&(u="center"),u}function sc(n,e,t){const i=t.yAlign||e.yAlign||CS(n,t);return{xAlign:t.xAlign||e.xAlign||DS(n,e,t,i),yAlign:i}}function OS(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function ES(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function lc(n,e,t,i){const{caretSize:s,caretPadding:l,cornerRadius:o}=n,{xAlign:r,yAlign:a}=t,u=s+l,{topLeft:f,topRight:c,bottomLeft:d,bottomRight:m}=vs(o);let h=OS(e,r);const g=ES(e,a,u);return a==="center"?r==="left"?h+=u:r==="right"&&(h-=u):r==="left"?h-=Math.max(f,d)+s:r==="right"&&(h+=Math.max(c,m)+s),{x:Yt(h,0,i.width-e.width),y:Yt(g,0,i.height-e.height)}}function to(n,e,t){const i=Pn(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function oc(n){return Kn([],si(n))}function AS(n,e,t){return Oi(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function rc(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class la extends ci{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart||e._chart,this._chart=this.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&t.options.animation&&i.animations,l=new X_(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=AS(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,t){const{callbacks:i}=t,s=i.beforeTitle.apply(this,[e]),l=i.title.apply(this,[e]),o=i.afterTitle.apply(this,[e]);let r=[];return r=Kn(r,si(s)),r=Kn(r,si(l)),r=Kn(r,si(o)),r}getBeforeBody(e,t){return oc(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return ut(e,l=>{const o={before:[],lines:[],after:[]},r=rc(i,l);Kn(o.before,si(r.beforeLabel.call(this,l))),Kn(o.lines,r.label.call(this,l)),Kn(o.after,si(r.afterLabel.call(this,l))),s.push(o)}),s}getAfterBody(e,t){return oc(t.callbacks.afterBody.apply(this,[e]))}getFooter(e,t){const{callbacks:i}=t,s=i.beforeFooter.apply(this,[e]),l=i.footer.apply(this,[e]),o=i.afterFooter.apply(this,[e]);let r=[];return r=Kn(r,si(s)),r=Kn(r,si(l)),r=Kn(r,si(o)),r}_createItems(e){const t=this._active,i=this.chart.data,s=[],l=[],o=[];let r=[],a,u;for(a=0,u=t.length;ae.filter(f,c,d,i))),e.itemSort&&(r=r.sort((f,c)=>e.itemSort(f,c,i))),ut(r,f=>{const c=rc(e.callbacks,f);s.push(c.labelColor.call(this,f)),l.push(c.labelPointStyle.call(this,f)),o.push(c.labelTextColor.call(this,f))}),this.labelColors=s,this.labelPointStyles=l,this.labelTextColors=o,this.dataPoints=r,r}update(e,t){const i=this.options.setContext(this.getContext()),s=this._active;let l,o=[];if(!s.length)this.opacity!==0&&(l={opacity:0});else{const r=ll[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const a=this._size=ic(this,i),u=Object.assign({},r,a),f=sc(this.chart,i,u),c=lc(i,u,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,l={opacity:1,x:c.x,y:c.y,width:a.width,height:a.height,caretX:r.x,caretY:r.y}}this._tooltipItems=o,this.$context=void 0,l&&this._resolveAnimations().update(this,l),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,i,s){const l=this.getCaretPosition(e,i,s);t.lineTo(l.x1,l.y1),t.lineTo(l.x2,l.y2),t.lineTo(l.x3,l.y3)}getCaretPosition(e,t,i){const{xAlign:s,yAlign:l}=this,{caretSize:o,cornerRadius:r}=i,{topLeft:a,topRight:u,bottomLeft:f,bottomRight:c}=vs(r),{x:d,y:m}=e,{width:h,height:g}=t;let b,k,y,T,$,M;return l==="center"?($=m+g/2,s==="left"?(b=d,k=b-o,T=$+o,M=$-o):(b=d+h,k=b+o,T=$-o,M=$+o),y=b):(s==="left"?k=d+Math.max(a,f)+o:s==="right"?k=d+h-Math.max(u,c)-o:k=this.caretX,l==="top"?(T=m,$=T-o,b=k-o,y=k+o):(T=m+g,$=T+o,b=k+o,y=k-o),M=T),{x1:b,x2:k,x3:y,y1:T,y2:$,y3:M}}drawTitle(e,t,i){const s=this.title,l=s.length;let o,r,a;if(l){const u=dr(i.rtl,this.x,this.width);for(e.x=to(this,i.titleAlign,i),t.textAlign=u.textAlign(i.titleAlign),t.textBaseline="middle",o=vn(i.titleFont),r=i.titleSpacing,t.fillStyle=i.titleColor,t.font=o.string,a=0;aT!==0)?(e.beginPath(),e.fillStyle=l.multiKeyBackground,Mo(e,{x:b,y:g,w:u,h:a,radius:y}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),Mo(e,{x:k,y:g+1,w:u-2,h:a-2,radius:y}),e.fill()):(e.fillStyle=l.multiKeyBackground,e.fillRect(b,g,u,a),e.strokeRect(b,g,u,a),e.fillStyle=o.backgroundColor,e.fillRect(k,g+1,u-2,a-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,t,i){const{body:s}=this,{bodySpacing:l,bodyAlign:o,displayColors:r,boxHeight:a,boxWidth:u,boxPadding:f}=i,c=vn(i.bodyFont);let d=c.lineHeight,m=0;const h=dr(i.rtl,this.x,this.width),g=function(E){t.fillText(E,h.x(e.x+m),e.y+d/2),e.y+=d+l},b=h.textAlign(o);let k,y,T,$,M,C,D;for(t.textAlign=o,t.textBaseline="middle",t.font=c.string,e.x=to(this,b,i),t.fillStyle=i.bodyColor,ut(this.beforeBody,g),m=r&&b!=="right"?o==="center"?u/2+f:u+2+f:0,$=0,C=s.length;$0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,i=this.$animations,s=i&&i.x,l=i&&i.y;if(s||l){const o=ll[e.position].call(this,this._active,this._eventPosition);if(!o)return;const r=this._size=ic(this,e),a=Object.assign({},o,this._size),u=sc(t,e,a),f=lc(e,a,u,t);(s._to!==f.x||l._to!==f.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=r.width,this.height=r.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(t);const s={width:this.width,height:this.height},l={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=Pn(t.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&r&&(e.save(),e.globalAlpha=i,this.drawBackground(l,e,s,t),G2(e,t.textDirection),l.y+=o.top,this.drawTitle(l,e,t),this.drawBody(l,e,t),this.drawFooter(l,e,t),X2(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const i=this._active,s=e.map(({datasetIndex:r,index:a})=>{const u=this.chart.getDatasetMeta(r);if(!u)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:u.data[a],index:a}}),l=!ko(i,s),o=this._positionChanged(s,t);(l||o)&&(this._active=s,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,i=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,l=this._active||[],o=this._getActiveElements(e,l,t,i),r=this._positionChanged(o,e),a=t||!ko(o,l)||r;return a&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),a}_getActiveElements(e,t,i,s){const l=this.options;if(e.type==="mouseout")return[];if(!s)return t;const o=this.chart.getElementsAtEventForMode(e,l.mode,l,i);return l.reverse&&o.reverse(),o}_positionChanged(e,t){const{caretX:i,caretY:s,options:l}=this,o=ll[l.position].call(this,e,t);return o!==!1&&(i!==o.x||s!==o.y)}}la.positioners=ll;var IS={id:"tooltip",_element:la,positioners:ll,afterInit(n,e,t){t&&(n.tooltip=new la({chart:n,options:t}))},beforeUpdate(n,e,t){n.tooltip&&n.tooltip.initialize(t)},reset(n,e,t){n.tooltip&&n.tooltip.initialize(t)},afterDraw(n){const e=n.tooltip;if(e&&e._willRender()){const t={tooltip:e};if(n.notifyPlugins("beforeTooltipDraw",t)===!1)return;e.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",t)}},afterEvent(n,e){if(n.tooltip){const t=e.replay;n.tooltip.handleEvent(e.event,t,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(n,e)=>e.bodyFont.size,boxWidth:(n,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:ni,title(n){if(n.length>0){const e=n[0],t=e.chart.data.labels,i=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndexn!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const PS=(n,e,t,i)=>(typeof e=="string"?(t=n.push(e)-1,i.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function LS(n,e,t,i){const s=n.indexOf(e);if(s===-1)return PS(n,e,t,i);const l=n.lastIndexOf(e);return s!==l?t:s}const NS=(n,e)=>n===null?null:Yt(Math.round(n),0,e);class oa extends ns{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const i=this.getLabels();for(const{index:s,label:l}of t)i[s]===l&&i.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(at(e))return null;const i=this.getLabels();return t=isFinite(t)&&i[t]===e?t:LS(i,e,Xe(t,e),this._addedLabels),NS(t,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(i=0),t||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const e=this.min,t=this.max,i=this.options.offset,s=[];let l=this.getLabels();l=e===0&&t===l.length-1?l:l.slice(e,t+1),this._valueRange=Math.max(l.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=e;o<=t;o++)s.push({value:o});return s}getLabelForValue(e){const t=this.getLabels();return e>=0&&et.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}oa.id="category";oa.defaults={ticks:{callback:oa.prototype.getLabelForValue}};function FS(n,e){const t=[],{bounds:s,step:l,min:o,max:r,precision:a,count:u,maxTicks:f,maxDigits:c,includeBounds:d}=n,m=l||1,h=f-1,{min:g,max:b}=e,k=!at(o),y=!at(r),T=!at(u),$=(b-g)/(c+1);let M=of((b-g)/h/m)*m,C,D,E,P;if(M<1e-14&&!k&&!y)return[{value:g},{value:b}];P=Math.ceil(b/M)-Math.floor(g/M),P>h&&(M=of(P*M/h/m)*m),at(a)||(C=Math.pow(10,a),M=Math.ceil(M*C)/C),s==="ticks"?(D=Math.floor(g/M)*M,E=Math.ceil(b/M)*M):(D=g,E=b),k&&y&&l&&Py((r-o)/l,M/1e3)?(P=Math.round(Math.min((r-o)/M,f)),M=(r-o)/P,D=o,E=r):T?(D=k?o:D,E=y?r:E,P=u-1,M=(E-D)/P):(P=(E-D)/M,nl(P,Math.round(P),M/1e3)?P=Math.round(P):P=Math.ceil(P));const L=Math.max(rf(M),rf(D));C=Math.pow(10,at(a)?L:a),D=Math.round(D*C)/C,E=Math.round(E*C)/C;let N=0;for(k&&(d&&D!==o?(t.push({value:o}),Ds=t?s:a,r=a=>l=i?l:a;if(e){const a=Gn(s),u=Gn(l);a<0&&u<0?r(0):a>0&&u>0&&o(0)}if(s===l){let a=1;(l>=Number.MAX_SAFE_INTEGER||s<=Number.MIN_SAFE_INTEGER)&&(a=Math.abs(l*.05)),r(l+a),e||o(s-a)}this.min=s,this.max=l}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:t,stepSize:i}=e,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},l=this._range||this,o=FS(s,l);return e.bounds==="ticks"&&M_(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let t=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const s=(i-t)/Math.max(e.length-1,1)/2;t-=s,i+=s}this._startValue=t,this._endValue=i,this._valueRange=i-t}getLabelForValue(e){return El(e,this.chart.options.locale,this.options.ticks.format)}}class Xa extends Io{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=$t(e)?e:0,this.max=$t(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,i=Hn(this.options.ticks.minRotation),s=(e?Math.sin(i):Math.cos(i))||.001,l=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,l.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}Xa.id="linear";Xa.defaults={ticks:{callback:Ko.formatters.numeric}};function uc(n){return n/Math.pow(10,Math.floor(On(n)))===1}function RS(n,e){const t=Math.floor(On(e.max)),i=Math.ceil(e.max/Math.pow(10,t)),s=[];let l=$n(n.min,Math.pow(10,Math.floor(On(e.min)))),o=Math.floor(On(l)),r=Math.floor(l/Math.pow(10,o)),a=o<0?Math.pow(10,Math.abs(o)):1;do s.push({value:l,major:uc(l)}),++r,r===10&&(r=1,++o,a=o>=0?1:a),l=Math.round(r*Math.pow(10,o)*a)/a;while(o0?i:null}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=$t(e)?Math.max(0,e):null,this.max=$t(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let i=this.min,s=this.max;const l=a=>i=e?i:a,o=a=>s=t?s:a,r=(a,u)=>Math.pow(10,Math.floor(On(a))+u);i===s&&(i<=0?(l(1),o(10)):(l(r(i,-1)),o(r(s,1)))),i<=0&&l(r(s,-1)),s<=0&&o(r(i,1)),this._zero&&this.min!==this._suggestedMin&&i===r(this.min,0)&&l(r(i,-1)),this.min=i,this.max=s}buildTicks(){const e=this.options,t={min:this._userMin,max:this._userMax},i=RS(t,this);return e.bounds==="ticks"&&M_(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":El(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=On(e),this._valueRange=On(this.max)-On(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(On(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}vb.id="logarithmic";vb.defaults={ticks:{callback:Ko.formatters.logarithmic,major:{enabled:!0}}};function ra(n){const e=n.ticks;if(e.display&&n.display){const t=Pn(e.backdropPadding);return Xe(e.font&&e.font.size,Qe.font.size)+t.height}return 0}function qS(n,e,t){return t=gt(t)?t:[t],{w:c2(n,e.string,t),h:t.length*e.lineHeight}}function fc(n,e,t,i,s){return n===i||n===s?{start:e-t/2,end:e+t/2}:ns?{start:e-t,end:e}:{start:e,end:e+t}}function jS(n){const e={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},t=Object.assign({},e),i=[],s=[],l=n._pointLabels.length,o=n.options.pointLabels,r=o.centerPointLabels?Tt/l:0;for(let a=0;ae.r&&(r=(i.end-e.r)/l,n.r=Math.max(n.r,e.r+r)),s.starte.b&&(a=(s.end-e.b)/o,n.b=Math.max(n.b,e.b+a))}function VS(n,e,t){const i=[],s=n._pointLabels.length,l=n.options,o=ra(l)/2,r=n.drawingArea,a=l.pointLabels.centerPointLabels?Tt/s:0;for(let u=0;u270||t<90)&&(n-=e),n}function WS(n,e){const{ctx:t,options:{pointLabels:i}}=n;for(let s=e-1;s>=0;s--){const l=i.setContext(n.getPointLabelContext(s)),o=vn(l.font),{x:r,y:a,textAlign:u,left:f,top:c,right:d,bottom:m}=n._pointLabelItems[s],{backdropColor:h}=l;if(!at(h)){const g=vs(l.borderRadius),b=Pn(l.backdropPadding);t.fillStyle=h;const k=f-b.left,y=c-b.top,T=d-f+b.width,$=m-c+b.height;Object.values(g).some(M=>M!==0)?(t.beginPath(),Mo(t,{x:k,y,w:T,h:$,radius:g}),t.fill()):t.fillRect(k,y,T,$)}Co(t,n._pointLabels[s],r,a+o.lineHeight/2,o,{color:l.color,textAlign:u,textBaseline:"middle"})}}function yb(n,e,t,i){const{ctx:s}=n;if(t)s.arc(n.xCenter,n.yCenter,e,0,ct);else{let l=n.getPointPosition(0,e);s.moveTo(l.x,l.y);for(let o=1;o{const s=yt(this.options.pointLabels.callback,[t,i],this);return s||s===0?s:""}).filter((t,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?jS(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,i,s){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,i,s))}getIndexAngle(e){const t=ct/(this._pointLabels.length||1),i=this.options.startAngle||0;return bn(e*t+Hn(i))}getDistanceFromCenterForValue(e){if(at(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(at(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e{if(f!==0){r=this.getDistanceFromCenterForValue(u.value);const c=s.setContext(this.getContext(f-1));YS(this,c,r,l)}}),i.display){for(e.save(),o=l-1;o>=0;o--){const u=i.setContext(this.getPointLabelContext(o)),{color:f,lineWidth:c}=u;!c||!f||(e.lineWidth=c,e.strokeStyle=f,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,r=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,r),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(a.x,a.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,t=this.options,i=t.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let l,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((r,a)=>{if(a===0&&!t.reverse)return;const u=i.setContext(this.getContext(a)),f=vn(u.font);if(l=this.getDistanceFromCenterForValue(this.ticks[a].value),u.showLabelBackdrop){e.font=f.string,o=e.measureText(r.label).width,e.fillStyle=u.backdropColor;const c=Pn(u.backdropPadding);e.fillRect(-o/2-c.left,-l-f.size/2-c.top,o+c.width,f.size+c.height)}Co(e,r.label,0,-l,f,{color:u.color})}),e.restore()}drawTitle(){}}Zo.id="radialLinear";Zo.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ko.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(n){return n},padding:5,centerPointLabels:!1}};Zo.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};Zo.descriptors={angleLines:{_fallback:"grid"}};const Go={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},fn=Object.keys(Go);function JS(n,e){return n-e}function cc(n,e){if(at(e))return null;const t=n._adapter,{parser:i,round:s,isoWeekday:l}=n._parseOpts;let o=e;return typeof i=="function"&&(o=i(o)),$t(o)||(o=typeof i=="string"?t.parse(o,i):t.parse(o)),o===null?null:(s&&(o=s==="week"&&(Cs(l)||l===!0)?t.startOf(o,"isoWeek",l):t.startOf(o,s)),+o)}function dc(n,e,t,i){const s=fn.length;for(let l=fn.indexOf(n);l=fn.indexOf(t);l--){const o=fn[l];if(Go[o].common&&n._adapter.diff(s,i,o)>=e-1)return o}return fn[t?fn.indexOf(t):0]}function GS(n){for(let e=fn.indexOf(n)+1,t=fn.length;e=e?t[i]:t[s];n[l]=!0}}function XS(n,e,t,i){const s=n._adapter,l=+s.startOf(e[0].value,i),o=e[e.length-1].value;let r,a;for(r=l;r<=o;r=+s.add(r,1,i))a=t[r],a>=0&&(e[a].major=!0);return e}function mc(n,e,t){const i=[],s={},l=e.length;let o,r;for(o=0;o+e.value))}initOffsets(e){let t=0,i=0,s,l;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?t=1-s:t=(this.getDecimalForValue(e[1])-s)/2,l=this.getDecimalForValue(e[e.length-1]),e.length===1?i=l:i=(l-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;t=Yt(t,0,o),i=Yt(i,0,o),this._offsets={start:t,end:i,factor:1/(t+1+i)}}_generate(){const e=this._adapter,t=this.min,i=this.max,s=this.options,l=s.time,o=l.unit||dc(l.minUnit,t,i,this._getLabelCapacity(t)),r=Xe(l.stepSize,1),a=o==="week"?l.isoWeekday:!1,u=Cs(a)||a===!0,f={};let c=t,d,m;if(u&&(c=+e.startOf(c,"isoWeek",a)),c=+e.startOf(c,u?"day":o),e.diff(i,t,o)>1e5*r)throw new Error(t+" and "+i+" are too far apart with stepSize of "+r+" "+o);const h=s.ticks.source==="data"&&this.getDataTimestamps();for(d=c,m=0;dg-b).map(g=>+g)}getLabelForValue(e){const t=this._adapter,i=this.options.time;return i.tooltipFormat?t.format(e,i.tooltipFormat):t.format(e,i.displayFormats.datetime)}_tickFormatFunction(e,t,i,s){const l=this.options,o=l.time.displayFormats,r=this._unit,a=this._majorUnit,u=r&&o[r],f=a&&o[a],c=i[t],d=a&&f&&c&&c.major,m=this._adapter.format(e,s||(d?f:u)),h=l.ticks.callback;return h?yt(h,[m,t,i],this):m}generateTickLabels(e){let t,i,s;for(t=0,i=e.length;t0?r:1}getDataTimestamps(){let e=this._cache.data||[],t,i;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,i=s.length;t=n[i].pos&&e<=n[s].pos&&({lo:i,hi:s}=Yi(n,"pos",e)),{pos:l,time:r}=n[i],{pos:o,time:a}=n[s]):(e>=n[i].time&&e<=n[s].time&&({lo:i,hi:s}=Yi(n,"time",e)),{time:l,pos:r}=n[i],{time:o,pos:a}=n[s]);const u=o-l;return u?r+(a-r)*(e-l)/u:r}class kb extends Pl{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=no(t,this.min),this._tableRange=no(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:i}=this,s=[],l=[];let o,r,a,u,f;for(o=0,r=e.length;o=t&&u<=i&&s.push(u);if(s.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(o=0,r=s.length;o{t||(t=je(e,It,{duration:150},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=je(e,It,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function xS(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=B(n[1]),t=O(),s=B(i)},m(l,o){S(l,e,o),S(l,t,o),S(l,s,o)},p(l,o){o&2&&le(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&le(s,i)},d(l){l&&w(e),l&&w(t),l&&w(s)}}}function e3(n){let e;return{c(){e=B("Loading...")},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function t3(n){let e,t,i,s,l,o=n[2]&&hc();function r(f,c){return f[2]?e3:xS}let a=r(n),u=a(n);return{c(){e=v("div"),o&&o.c(),t=O(),i=v("canvas"),s=O(),l=v("div"),u.c(),p(i,"class","chart-canvas svelte-vh4sl8"),Ir(i,"height","250px"),Ir(i,"width","100%"),p(e,"class","chart-wrapper svelte-vh4sl8"),Q(e,"loading",n[2]),p(l,"class","txt-hint m-t-xs txt-right")},m(f,c){S(f,e,c),o&&o.m(e,null),_(e,t),_(e,i),n[8](i),S(f,s,c),S(f,l,c),u.m(l,null)},p(f,[c]){f[2]?o?c&4&&A(o,1):(o=hc(),o.c(),A(o,1),o.m(e,t)):o&&(ae(),I(o,1,1,()=>{o=null}),ue()),c&4&&Q(e,"loading",f[2]),a===(a=r(f))&&u?u.p(f,c):(u.d(1),u=a(f),u&&(u.c(),u.m(l,null)))},i(f){A(o)},o(f){I(o)},d(f){f&&w(e),o&&o.d(),n[8](null),f&&w(s),f&&w(l),u.d()}}}function n3(n,e,t){let{filter:i=""}=e,{presets:s=""}=e,l,o,r=[],a=0,u=!1;async function f(){return t(2,u=!0),pe.logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(m=>{c();for(let h of m)r.push({x:new Date(h.date),y:h.total}),t(1,a+=h.total);r.push({x:new Date,y:void 0})}).catch(m=>{m!=null&&m.isAbort||(c(),console.warn(m),pe.errorResponseHandler(m,!1))}).finally(()=>{t(2,u=!1)})}function c(){t(1,a=0),t(7,r=[])}Zt(()=>(Ao.register(Ei,Jo,Yo,Xa,Pl,TS,IS),t(6,o=new Ao(l,{type:"line",data:{datasets:[{label:"Total requests",data:r,borderColor:"#ef4565",pointBackgroundColor:"#ef4565",backgroundColor:"rgb(239,69,101,0.05)",borderWidth:2,pointRadius:1,pointBorderWidth:0,fill:!0}]},options:{animation:!1,interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,grid:{color:"#edf0f3",borderColor:"#dee3e8"},ticks:{precision:0,maxTicksLimit:6,autoSkip:!0,color:"#666f75"}},x:{type:"time",time:{unit:"hour",tooltipFormat:"DD h a"},grid:{borderColor:"#dee3e8",color:m=>m.tick.major?"#edf0f3":""},ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:m=>m.tick.major?"#16161a":"#666f75"}}},plugins:{legend:{display:!1}}}})),()=>o==null?void 0:o.destroy()));function d(m){ie[m?"unshift":"push"](()=>{l=m,t(0,l)})}return n.$$set=m=>{"filter"in m&&t(3,i=m.filter),"presets"in m&&t(4,s=m.presets)},n.$$.update=()=>{n.$$.dirty&24&&(typeof i<"u"||typeof s<"u")&&f(),n.$$.dirty&192&&typeof r<"u"&&o&&(t(6,o.data.datasets[0].data=r,o),o.update())},[l,a,u,i,s,f,o,r,d]}class i3 extends ye{constructor(e){super(),ve(this,e,n3,t3,he,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var gc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},aa={},s3={get exports(){return aa},set exports(n){aa=n}};(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** + * Prism: Lightweight, robust, elegant syntax highlighting + * + * @license MIT + * @author Lea Verou + * @namespace + * @public + */var t=function(i){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,l=0,o={},r={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function y(T){return T instanceof a?new a(T.type,y(T.content),T.alias):Array.isArray(T)?T.map(y):T.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(M){var y=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(M.stack)||[])[1];if(y){var T=document.getElementsByTagName("script");for(var $ in T)if(T[$].src==y)return T[$]}return null}},isActive:function(y,T,$){for(var M="no-"+T;y;){var C=y.classList;if(C.contains(T))return!0;if(C.contains(M))return!1;y=y.parentElement}return!!$}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(y,T){var $=r.util.clone(r.languages[y]);for(var M in T)$[M]=T[M];return $},insertBefore:function(y,T,$,M){M=M||r.languages;var C=M[y],D={};for(var E in C)if(C.hasOwnProperty(E)){if(E==T)for(var P in $)$.hasOwnProperty(P)&&(D[P]=$[P]);$.hasOwnProperty(E)||(D[E]=C[E])}var L=M[y];return M[y]=D,r.languages.DFS(r.languages,function(N,F){F===L&&N!=y&&(this[N]=D)}),D},DFS:function y(T,$,M,C){C=C||{};var D=r.util.objId;for(var E in T)if(T.hasOwnProperty(E)){$.call(T,E,T[E],M||E);var P=T[E],L=r.util.type(P);L==="Object"&&!C[D(P)]?(C[D(P)]=!0,y(P,$,null,C)):L==="Array"&&!C[D(P)]&&(C[D(P)]=!0,y(P,$,E,C))}}},plugins:{},highlightAll:function(y,T){r.highlightAllUnder(document,y,T)},highlightAllUnder:function(y,T,$){var M={callback:$,container:y,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",M),M.elements=Array.prototype.slice.apply(M.container.querySelectorAll(M.selector)),r.hooks.run("before-all-elements-highlight",M);for(var C=0,D;D=M.elements[C++];)r.highlightElement(D,T===!0,M.callback)},highlightElement:function(y,T,$){var M=r.util.getLanguage(y),C=r.languages[M];r.util.setLanguage(y,M);var D=y.parentElement;D&&D.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(D,M);var E=y.textContent,P={element:y,language:M,grammar:C,code:E};function L(F){P.highlightedCode=F,r.hooks.run("before-insert",P),P.element.innerHTML=P.highlightedCode,r.hooks.run("after-highlight",P),r.hooks.run("complete",P),$&&$.call(P.element)}if(r.hooks.run("before-sanity-check",P),D=P.element.parentElement,D&&D.nodeName.toLowerCase()==="pre"&&!D.hasAttribute("tabindex")&&D.setAttribute("tabindex","0"),!P.code){r.hooks.run("complete",P),$&&$.call(P.element);return}if(r.hooks.run("before-highlight",P),!P.grammar){L(r.util.encode(P.code));return}if(T&&i.Worker){var N=new Worker(r.filename);N.onmessage=function(F){L(F.data)},N.postMessage(JSON.stringify({language:P.language,code:P.code,immediateClose:!0}))}else L(r.highlight(P.code,P.grammar,P.language))},highlight:function(y,T,$){var M={code:y,grammar:T,language:$};if(r.hooks.run("before-tokenize",M),!M.grammar)throw new Error('The language "'+M.language+'" has no grammar.');return M.tokens=r.tokenize(M.code,M.grammar),r.hooks.run("after-tokenize",M),a.stringify(r.util.encode(M.tokens),M.language)},tokenize:function(y,T){var $=T.rest;if($){for(var M in $)T[M]=$[M];delete T.rest}var C=new c;return d(C,C.head,y),f(y,C,T,C.head,0),h(C)},hooks:{all:{},add:function(y,T){var $=r.hooks.all;$[y]=$[y]||[],$[y].push(T)},run:function(y,T){var $=r.hooks.all[y];if(!(!$||!$.length))for(var M=0,C;C=$[M++];)C(T)}},Token:a};i.Prism=r;function a(y,T,$,M){this.type=y,this.content=T,this.alias=$,this.length=(M||"").length|0}a.stringify=function y(T,$){if(typeof T=="string")return T;if(Array.isArray(T)){var M="";return T.forEach(function(L){M+=y(L,$)}),M}var C={type:T.type,content:y(T.content,$),tag:"span",classes:["token",T.type],attributes:{},language:$},D=T.alias;D&&(Array.isArray(D)?Array.prototype.push.apply(C.classes,D):C.classes.push(D)),r.hooks.run("wrap",C);var E="";for(var P in C.attributes)E+=" "+P+'="'+(C.attributes[P]||"").replace(/"/g,""")+'"';return"<"+C.tag+' class="'+C.classes.join(" ")+'"'+E+">"+C.content+""};function u(y,T,$,M){y.lastIndex=T;var C=y.exec($);if(C&&M&&C[1]){var D=C[1].length;C.index+=D,C[0]=C[0].slice(D)}return C}function f(y,T,$,M,C,D){for(var E in $)if(!(!$.hasOwnProperty(E)||!$[E])){var P=$[E];P=Array.isArray(P)?P:[P];for(var L=0;L=D.reach);K+=te.value.length,te=te.next){var re=te.value;if(T.length>y.length)return;if(!(re instanceof a)){var J=1,de;if(X){if(de=u(G,K,y,R),!de||de.index>=y.length)break;var Re=de.index,_e=de.index+de[0].length,$e=K;for($e+=te.value.length;Re>=$e;)te=te.next,$e+=te.value.length;if($e-=te.value.length,K=$e,te.value instanceof a)continue;for(var Ne=te;Ne!==T.tail&&($e<_e||typeof Ne.value=="string");Ne=Ne.next)J++,$e+=Ne.value.length;J--,re=y.slice(K,$e),de.index-=K}else if(de=u(G,0,re,R),!de)continue;var Re=de.index,be=de[0],Se=re.slice(0,Re),We=re.slice(Re+be.length),lt=K+re.length;D&<>D.reach&&(D.reach=lt);var fe=te.prev;Se&&(fe=d(T,fe,Se),K+=Se.length),m(T,fe,J);var Ve=new a(E,F?r.tokenize(be,F):be,se,be);if(te=d(T,fe,Ve),We&&d(T,te,We),J>1){var ee={cause:E+","+L,reach:lt};f(y,T,$,te.prev,K,ee),D&&ee.reach>D.reach&&(D.reach=ee.reach)}}}}}}function c(){var y={value:null,prev:null,next:null},T={value:null,prev:y,next:null};y.next=T,this.head=y,this.tail=T,this.length=0}function d(y,T,$){var M=T.next,C={value:$,prev:T,next:M};return T.next=C,M.prev=C,y.length++,C}function m(y,T,$){for(var M=T.next,C=0;C<$&&M!==y.tail;C++)M=M.next;T.next=M,M.prev=T,y.length-=C}function h(y){for(var T=[],$=y.head.next;$!==y.tail;)T.push($.value),$=$.next;return T}if(!i.document)return i.addEventListener&&(r.disableWorkerMessageHandler||i.addEventListener("message",function(y){var T=JSON.parse(y.data),$=T.language,M=T.code,C=T.immediateClose;i.postMessage(r.highlight(M,r.languages[$],$)),C&&i.close()},!1)),r;var g=r.util.currentScript();g&&(r.filename=g.src,g.hasAttribute("data-manual")&&(r.manual=!0));function b(){r.manual||r.highlightAll()}if(!r.manual){var k=document.readyState;k==="loading"||k==="interactive"&&g&&g.defer?document.addEventListener("DOMContentLoaded",b):window.requestAnimationFrame?window.requestAnimationFrame(b):window.setTimeout(b,16)}return r}(e);n.exports&&(n.exports=t),typeof gc<"u"&&(gc.Prism=t),t.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(i){i.type==="entity"&&(i.attributes.title=i.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(s,l){var o={};o["language-"+l]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[l]},o.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:o}};r["language-"+l]={pattern:/[\s\S]+/,inside:t.languages[l]};var a={};a[s]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return s}),"i"),lookbehind:!0,greedy:!0,inside:r},t.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(i,s){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+i+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[s,"language-"+s],inside:t.languages[s]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(i){var s=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;i.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+s.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+s.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+s.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+s.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:s,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},i.languages.css.atrule.inside.rest=i.languages.css;var l=i.languages.markup;l&&(l.tag.addInlined("style","css"),l.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(typeof t>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i="Loading…",s=function(g,b){return"✖ Error "+g+" while fetching file: "+b},l="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},r="data-src-status",a="loading",u="loaded",f="failed",c="pre[data-src]:not(["+r+'="'+u+'"]):not(['+r+'="'+a+'"])';function d(g,b,k){var y=new XMLHttpRequest;y.open("GET",g,!0),y.onreadystatechange=function(){y.readyState==4&&(y.status<400&&y.responseText?b(y.responseText):y.status>=400?k(s(y.status,y.statusText)):k(l))},y.send(null)}function m(g){var b=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(g||"");if(b){var k=Number(b[1]),y=b[2],T=b[3];return y?T?[k,Number(T)]:[k,void 0]:[k,k]}}t.hooks.add("before-highlightall",function(g){g.selector+=", "+c}),t.hooks.add("before-sanity-check",function(g){var b=g.element;if(b.matches(c)){g.code="",b.setAttribute(r,a);var k=b.appendChild(document.createElement("CODE"));k.textContent=i;var y=b.getAttribute("data-src"),T=g.language;if(T==="none"){var $=(/\.(\w+)$/.exec(y)||[,"none"])[1];T=o[$]||$}t.util.setLanguage(k,T),t.util.setLanguage(b,T);var M=t.plugins.autoloader;M&&M.loadLanguages(T),d(y,function(C){b.setAttribute(r,u);var D=m(b.getAttribute("data-range"));if(D){var E=C.split(/\r\n?|\n/g),P=D[0],L=D[1]==null?E.length:D[1];P<0&&(P+=E.length),P=Math.max(0,Math.min(P-1,E.length)),L<0&&(L+=E.length),L=Math.max(0,Math.min(L,E.length)),C=E.slice(P,L).join(` +`),b.hasAttribute("data-start")||b.setAttribute("data-start",String(P+1))}k.textContent=C,t.highlightElement(k)},function(C){b.setAttribute(r,f),k.textContent=C})}}),t.plugins.fileHighlight={highlight:function(b){for(var k=(b||document).querySelectorAll(c),y=0,T;T=k[y++];)t.highlightElement(T)}};var h=!1;t.fileHighlight=function(){h||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),h=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(s3);const Js=aa;var _c={},l3={get exports(){return _c},set exports(n){_c=n}};(function(n){(function(){if(typeof Prism>"u")return;var e=Object.assign||function(o,r){for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);return o};function t(o){this.defaults=e({},o)}function i(o){return o.replace(/-(\w)/g,function(r,a){return a.toUpperCase()})}function s(o){for(var r=0,a=0;ar&&(f[d]=` +`+f[d],c=m)}a[u]=f.join("")}return a.join(` +`)}},n.exports&&(n.exports=t),Prism.plugins.NormalizeWhitespace=new t({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.hooks.add("before-sanity-check",function(o){var r=Prism.plugins.NormalizeWhitespace;if(!(o.settings&&o.settings["whitespace-normalization"]===!1)&&Prism.util.isActive(o.element,"whitespace-normalization",!0)){if((!o.element||!o.element.parentNode)&&o.code){o.code=r.normalize(o.code,o.settings);return}var a=o.element.parentNode;if(!(!o.code||!a||a.nodeName.toLowerCase()!=="pre")){o.settings==null&&(o.settings={});for(var u in l)if(Object.hasOwnProperty.call(l,u)){var f=l[u];if(a.hasAttribute("data-"+u))try{var c=JSON.parse(a.getAttribute("data-"+u)||"true");typeof c===f&&(o.settings[u]=c)}catch{}}for(var d=a.childNodes,m="",h="",g=!1,b=0;b>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),n.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:n.languages.dart}}},string:/[\s\S]+/}},string:void 0}),n.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),n.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":i,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})})(Prism);function o3(n){let e,t,i;return{c(){e=v("div"),t=v("code"),p(t,"class","svelte-10s5tkd"),p(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){S(s,e,l),_(e,t),t.innerHTML=n[1]},p(s,[l]){l&2&&(t.innerHTML=s[1]),l&1&&i!==(i="code-wrapper prism-light "+s[0]+" svelte-10s5tkd")&&p(e,"class",i)},i:Z,o:Z,d(s){s&&w(e)}}}function r3(n,e,t){let{class:i=""}=e,{content:s=""}=e,{language:l="javascript"}=e,o="";function r(a){return a=typeof a=="string"?a:"",a=Js.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Js.highlight(a,Js.languages[l]||Js.languages.javascript,l)}return n.$$set=a=>{"class"in a&&t(0,i=a.class),"content"in a&&t(2,s=a.content),"language"in a&&t(3,l=a.language)},n.$$.update=()=>{n.$$.dirty&4&&typeof Js<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class wb extends ye{constructor(e){super(),ve(this,e,r3,o3,he,{class:0,content:2,language:3})}}const a3=n=>({}),bc=n=>({}),u3=n=>({}),vc=n=>({});function yc(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,k,y,T=n[4]&&!n[2]&&kc(n);const $=n[19].header,M=Nt($,n,n[18],vc);let C=n[4]&&n[2]&&wc(n);const D=n[19].default,E=Nt(D,n,n[18],null),P=n[19].footer,L=Nt(P,n,n[18],bc);return{c(){e=v("div"),t=v("div"),s=O(),l=v("div"),o=v("div"),T&&T.c(),r=O(),M&&M.c(),a=O(),C&&C.c(),u=O(),f=v("div"),E&&E.c(),c=O(),d=v("div"),L&&L.c(),p(t,"class","overlay"),p(o,"class","overlay-panel-section panel-header"),p(f,"class","overlay-panel-section panel-content"),p(d,"class","overlay-panel-section panel-footer"),p(l,"class",m="overlay-panel "+n[1]+" "+n[8]),Q(l,"popup",n[2]),p(e,"class","overlay-panel-container"),Q(e,"padded",n[2]),Q(e,"active",n[0])},m(N,F){S(N,e,F),_(e,t),_(e,s),_(e,l),_(l,o),T&&T.m(o,null),_(o,r),M&&M.m(o,null),_(o,a),C&&C.m(o,null),_(l,u),_(l,f),E&&E.m(f,null),n[21](f),_(l,c),_(l,d),L&&L.m(d,null),b=!0,k||(y=[Y(t,"click",dt(n[20])),Y(f,"scroll",n[22])],k=!0)},p(N,F){n=N,n[4]&&!n[2]?T?T.p(n,F):(T=kc(n),T.c(),T.m(o,r)):T&&(T.d(1),T=null),M&&M.p&&(!b||F[0]&262144)&&Rt(M,$,n,n[18],b?Ft($,n[18],F,u3):qt(n[18]),vc),n[4]&&n[2]?C?C.p(n,F):(C=wc(n),C.c(),C.m(o,null)):C&&(C.d(1),C=null),E&&E.p&&(!b||F[0]&262144)&&Rt(E,D,n,n[18],b?Ft(D,n[18],F,null):qt(n[18]),null),L&&L.p&&(!b||F[0]&262144)&&Rt(L,P,n,n[18],b?Ft(P,n[18],F,a3):qt(n[18]),bc),(!b||F[0]&258&&m!==(m="overlay-panel "+n[1]+" "+n[8]))&&p(l,"class",m),(!b||F[0]&262)&&Q(l,"popup",n[2]),(!b||F[0]&4)&&Q(e,"padded",n[2]),(!b||F[0]&1)&&Q(e,"active",n[0])},i(N){b||(N&&xe(()=>{i||(i=je(t,yo,{duration:ms,opacity:0},!0)),i.run(1)}),A(M,N),A(E,N),A(L,N),xe(()=>{g&&g.end(1),h=mg(l,An,n[2]?{duration:ms,y:-10}:{duration:ms,x:50}),h.start()}),b=!0)},o(N){N&&(i||(i=je(t,yo,{duration:ms,opacity:0},!1)),i.run(0)),I(M,N),I(E,N),I(L,N),h&&h.invalidate(),g=hg(l,An,n[2]?{duration:ms,y:10}:{duration:ms,x:50}),b=!1},d(N){N&&w(e),N&&i&&i.end(),T&&T.d(),M&&M.d(N),C&&C.d(),E&&E.d(N),n[21](null),L&&L.d(N),N&&g&&g.end(),k=!1,Pe(y)}}}function kc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=Y(e,"click",dt(n[5])),t=!0)},p:Z,d(s){s&&w(e),t=!1,i()}}}function wc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-transparent btn-close m-l-auto")},m(s,l){S(s,e,l),t||(i=Y(e,"click",dt(n[5])),t=!0)},p:Z,d(s){s&&w(e),t=!1,i()}}}function f3(n){let e,t,i,s,l=n[0]&&yc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","overlay-panel-wrapper")},m(o,r){S(o,e,r),l&&l.m(e,null),n[23](e),t=!0,i||(s=[Y(window,"resize",n[10]),Y(window,"keydown",n[9])],i=!0)},p(o,r){o[0]?l?(l.p(o,r),r[0]&1&&A(l,1)):(l=yc(o),l.c(),A(l,1),l.m(e,null)):l&&(ae(),I(l,1,1,()=>{l=null}),ue())},i(o){t||(A(l),t=!0)},o(o){I(l),t=!1},d(o){o&&w(e),l&&l.d(),n[23](null),i=!1,Pe(s)}}}let Vi,wr=[];function Sb(){return Vi=Vi||document.querySelector(".overlays"),Vi||(Vi=document.createElement("div"),Vi.classList.add("overlays"),document.body.appendChild(Vi)),Vi}let ms=150;function Sc(){return 1e3+Sb().querySelectorAll(".overlay-panel-container.active").length}function c3(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{active:o=!1}=e,{popup:r=!1}=e,{overlayClose:a=!0}=e,{btnClose:u=!0}=e,{escClose:f=!0}=e,{beforeOpen:c=void 0}=e,{beforeHide:d=void 0}=e;const m=Ct(),h="op_"+z.randomString(10);let g,b,k,y,T="",$=o;function M(){typeof c=="function"&&c()===!1||t(0,o=!0)}function C(){typeof d=="function"&&d()===!1||t(0,o=!1)}function D(){return o}async function E(K){t(17,$=K),K?(k=document.activeElement,g==null||g.focus(),m("show")):(clearTimeout(y),k==null||k.focus(),m("hide")),await sn(),P()}function P(){g&&(o?t(6,g.style.zIndex=Sc(),g):t(6,g.style="",g))}function L(){z.pushUnique(wr,h),document.body.classList.add("overlay-active")}function N(){z.removeByValue(wr,h),wr.length||document.body.classList.remove("overlay-active")}function F(K){o&&f&&K.code=="Escape"&&!z.isInput(K.target)&&g&&g.style.zIndex==Sc()&&(K.preventDefault(),C())}function R(K){o&&X(b)}function X(K,re){re&&t(8,T=""),K&&(y||(y=setTimeout(()=>{if(clearTimeout(y),y=null,!K)return;if(K.scrollHeight-K.offsetHeight>0)t(8,T="scrollable");else{t(8,T="");return}K.scrollTop==0?t(8,T+=" scroll-top-reached"):K.scrollTop+K.offsetHeight==K.scrollHeight&&t(8,T+=" scroll-bottom-reached")},100)))}Zt(()=>(Sb().appendChild(g),()=>{var K;clearTimeout(y),N(),(K=g==null?void 0:g.classList)==null||K.add("hidden"),setTimeout(()=>{g==null||g.remove()},0)}));const se=()=>a?C():!0;function W(K){ie[K?"unshift":"push"](()=>{b=K,t(7,b)})}const G=K=>X(K.target);function te(K){ie[K?"unshift":"push"](()=>{g=K,t(6,g)})}return n.$$set=K=>{"class"in K&&t(1,l=K.class),"active"in K&&t(0,o=K.active),"popup"in K&&t(2,r=K.popup),"overlayClose"in K&&t(3,a=K.overlayClose),"btnClose"in K&&t(4,u=K.btnClose),"escClose"in K&&t(12,f=K.escClose),"beforeOpen"in K&&t(13,c=K.beforeOpen),"beforeHide"in K&&t(14,d=K.beforeHide),"$$scope"in K&&t(18,s=K.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&131073&&$!=o&&E(o),n.$$.dirty[0]&128&&X(b,!0),n.$$.dirty[0]&64&&g&&P(),n.$$.dirty[0]&1&&(o?L():N())},[o,l,r,a,u,C,g,b,T,F,R,X,f,c,d,M,D,$,s,i,se,W,G,te]}class Nn extends ye{constructor(e){super(),ve(this,e,c3,f3,he,{class:1,active:0,popup:2,overlayClose:3,btnClose:4,escClose:12,beforeOpen:13,beforeHide:14,show:15,hide:5,isActive:16},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[5]}get isActive(){return this.$$.ctx[16]}}function d3(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function p3(n){let e,t=n[2].referer+"",i,s;return{c(){e=v("a"),i=B(t),p(e,"href",s=n[2].referer),p(e,"target","_blank"),p(e,"rel","noopener noreferrer")},m(l,o){S(l,e,o),_(e,i)},p(l,o){o&4&&t!==(t=l[2].referer+"")&&le(i,t),o&4&&s!==(s=l[2].referer)&&p(e,"href",s)},d(l){l&&w(e)}}}function m3(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Z,i:Z,o:Z,d(t){t&&w(e)}}}function h3(n){let e,t;return e=new wb({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,s){const l={};s&4&&(l.content=JSON.stringify(i[2].meta,null,2)),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function g3(n){var Oe;let e,t,i,s,l,o,r=n[2].id+"",a,u,f,c,d,m,h,g=n[2].status+"",b,k,y,T,$,M,C=((Oe=n[2].method)==null?void 0:Oe.toUpperCase())+"",D,E,P,L,N,F,R=n[2].auth+"",X,se,W,G,te,K,re=n[2].url+"",J,de,_e,$e,Ne,Re,be,Se,We,lt,fe,Ve=n[2].remoteIp+"",ee,Fe,ot,Ht,Ae,ne,we=n[2].userIp+"",nt,et,bt,Gt,di,ft,Wn=n[2].userAgent+"",is,Ll,pi,ss,Nl,Pi,ls,rn,Ze,os,ti,rs,Li,Ni,Vt,Xt;function Fl(Ee,Ce){return Ee[2].referer?p3:d3}let V=Fl(n),U=V(n);const x=[h3,m3],oe=[];function Te(Ee,Ce){return Ce&4&&(ls=null),ls==null&&(ls=!z.isEmpty(Ee[2].meta)),ls?0:1}return rn=Te(n,-1),Ze=oe[rn]=x[rn](n),Vt=new ui({props:{date:n[2].created}}),{c(){e=v("table"),t=v("tbody"),i=v("tr"),s=v("td"),s.textContent="ID",l=O(),o=v("td"),a=B(r),u=O(),f=v("tr"),c=v("td"),c.textContent="Status",d=O(),m=v("td"),h=v("span"),b=B(g),k=O(),y=v("tr"),T=v("td"),T.textContent="Method",$=O(),M=v("td"),D=B(C),E=O(),P=v("tr"),L=v("td"),L.textContent="Auth",N=O(),F=v("td"),X=B(R),se=O(),W=v("tr"),G=v("td"),G.textContent="URL",te=O(),K=v("td"),J=B(re),de=O(),_e=v("tr"),$e=v("td"),$e.textContent="Referer",Ne=O(),Re=v("td"),U.c(),be=O(),Se=v("tr"),We=v("td"),We.textContent="Remote IP",lt=O(),fe=v("td"),ee=B(Ve),Fe=O(),ot=v("tr"),Ht=v("td"),Ht.textContent="User IP",Ae=O(),ne=v("td"),nt=B(we),et=O(),bt=v("tr"),Gt=v("td"),Gt.textContent="UserAgent",di=O(),ft=v("td"),is=B(Wn),Ll=O(),pi=v("tr"),ss=v("td"),ss.textContent="Meta",Nl=O(),Pi=v("td"),Ze.c(),os=O(),ti=v("tr"),rs=v("td"),rs.textContent="Created",Li=O(),Ni=v("td"),H(Vt.$$.fragment),p(s,"class","min-width txt-hint txt-bold"),p(c,"class","min-width txt-hint txt-bold"),p(h,"class","label"),Q(h,"label-danger",n[2].status>=400),p(T,"class","min-width txt-hint txt-bold"),p(L,"class","min-width txt-hint txt-bold"),p(G,"class","min-width txt-hint txt-bold"),p($e,"class","min-width txt-hint txt-bold"),p(We,"class","min-width txt-hint txt-bold"),p(Ht,"class","min-width txt-hint txt-bold"),p(Gt,"class","min-width txt-hint txt-bold"),p(ss,"class","min-width txt-hint txt-bold"),p(rs,"class","min-width txt-hint txt-bold"),p(e,"class","table-border")},m(Ee,Ce){S(Ee,e,Ce),_(e,t),_(t,i),_(i,s),_(i,l),_(i,o),_(o,a),_(t,u),_(t,f),_(f,c),_(f,d),_(f,m),_(m,h),_(h,b),_(t,k),_(t,y),_(y,T),_(y,$),_(y,M),_(M,D),_(t,E),_(t,P),_(P,L),_(P,N),_(P,F),_(F,X),_(t,se),_(t,W),_(W,G),_(W,te),_(W,K),_(K,J),_(t,de),_(t,_e),_(_e,$e),_(_e,Ne),_(_e,Re),U.m(Re,null),_(t,be),_(t,Se),_(Se,We),_(Se,lt),_(Se,fe),_(fe,ee),_(t,Fe),_(t,ot),_(ot,Ht),_(ot,Ae),_(ot,ne),_(ne,nt),_(t,et),_(t,bt),_(bt,Gt),_(bt,di),_(bt,ft),_(ft,is),_(t,Ll),_(t,pi),_(pi,ss),_(pi,Nl),_(pi,Pi),oe[rn].m(Pi,null),_(t,os),_(t,ti),_(ti,rs),_(ti,Li),_(ti,Ni),q(Vt,Ni,null),Xt=!0},p(Ee,Ce){var He;(!Xt||Ce&4)&&r!==(r=Ee[2].id+"")&&le(a,r),(!Xt||Ce&4)&&g!==(g=Ee[2].status+"")&&le(b,g),(!Xt||Ce&4)&&Q(h,"label-danger",Ee[2].status>=400),(!Xt||Ce&4)&&C!==(C=((He=Ee[2].method)==null?void 0:He.toUpperCase())+"")&&le(D,C),(!Xt||Ce&4)&&R!==(R=Ee[2].auth+"")&&le(X,R),(!Xt||Ce&4)&&re!==(re=Ee[2].url+"")&&le(J,re),V===(V=Fl(Ee))&&U?U.p(Ee,Ce):(U.d(1),U=V(Ee),U&&(U.c(),U.m(Re,null))),(!Xt||Ce&4)&&Ve!==(Ve=Ee[2].remoteIp+"")&&le(ee,Ve),(!Xt||Ce&4)&&we!==(we=Ee[2].userIp+"")&&le(nt,we),(!Xt||Ce&4)&&Wn!==(Wn=Ee[2].userAgent+"")&&le(is,Wn);let Ue=rn;rn=Te(Ee,Ce),rn===Ue?oe[rn].p(Ee,Ce):(ae(),I(oe[Ue],1,1,()=>{oe[Ue]=null}),ue(),Ze=oe[rn],Ze?Ze.p(Ee,Ce):(Ze=oe[rn]=x[rn](Ee),Ze.c()),A(Ze,1),Ze.m(Pi,null));const Le={};Ce&4&&(Le.date=Ee[2].created),Vt.$set(Le)},i(Ee){Xt||(A(Ze),A(Vt.$$.fragment,Ee),Xt=!0)},o(Ee){I(Ze),I(Vt.$$.fragment,Ee),Xt=!1},d(Ee){Ee&&w(e),U.d(),oe[rn].d(),j(Vt)}}}function _3(n){let e;return{c(){e=v("h4"),e.textContent="Request log"},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function b3(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Close',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=Y(e,"click",n[4]),t=!0)},p:Z,d(s){s&&w(e),t=!1,i()}}}function v3(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[b3],header:[_3],default:[g3]},$$scope:{ctx:n}};return e=new Nn({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){H(e.$$.fragment)},m(s,l){q(e,s,l),t=!0},p(s,[l]){const o={};l&260&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[5](null),j(e,s)}}}function y3(n,e,t){let i,s=new Rr;function l(c){return t(2,s=c),i==null?void 0:i.show()}function o(){return i==null?void 0:i.hide()}const r=()=>o();function a(c){ie[c?"unshift":"push"](()=>{i=c,t(1,i)})}function u(c){ze.call(this,n,c)}function f(c){ze.call(this,n,c)}return[o,i,s,l,r,a,u,f]}class k3 extends ye{constructor(e){super(),ve(this,e,y3,v3,he,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function w3(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Include requests by admins"),p(e,"type","checkbox"),p(e,"id",t=n[14]),p(s,"for",o=n[14])},m(u,f){S(u,e,f),e.checked=n[0],S(u,i,f),S(u,s,f),_(s,l),r||(a=Y(e,"change",n[8]),r=!0)},p(u,f){f&16384&&t!==(t=u[14])&&p(e,"id",t),f&1&&(e.checked=u[0]),f&16384&&o!==(o=u[14])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Tc(n){let e,t,i;function s(o){n[10](o)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new i3({props:l}),ie.push(()=>ge(e,"filter",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){const a={};r&16&&(a.presets=o[4]),!t&&r&4&&(t=!0,a.filter=o[2],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function $c(n){let e,t,i;function s(o){n[11](o)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new wy({props:l}),ie.push(()=>ge(e,"filter",s)),e.$on("select",n[12]),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){const a={};r&16&&(a.presets=o[4]),!t&&r&4&&(t=!0,a.filter=o[2],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function S3(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,k,y=n[3],T,$=n[3],M,C;r=new Da({}),r.$on("refresh",n[7]),d=new me({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[w3,({uniqueId:P})=>({14:P}),({uniqueId:P})=>P?16384:0]},$$scope:{ctx:n}}}),h=new Uo({props:{value:n[2],placeholder:"Search logs, ex. status > 200",extraAutocompleteKeys:["method","url","remoteIp","userIp","referer","status","auth","userAgent"]}}),h.$on("submit",n[9]);let D=Tc(n),E=$c(n);return{c(){e=v("div"),t=v("header"),i=v("nav"),s=v("div"),l=B(n[5]),o=O(),H(r.$$.fragment),a=O(),u=v("div"),f=O(),c=v("div"),H(d.$$.fragment),m=O(),H(h.$$.fragment),g=O(),b=v("div"),k=O(),D.c(),T=O(),E.c(),M=Me(),p(s,"class","breadcrumb-item"),p(i,"class","breadcrumbs"),p(u,"class","flex-fill"),p(c,"class","inline-flex"),p(t,"class","page-header"),p(b,"class","clearfix m-b-base"),p(e,"class","page-header-wrapper m-b-0")},m(P,L){S(P,e,L),_(e,t),_(t,i),_(i,s),_(s,l),_(t,o),q(r,t,null),_(t,a),_(t,u),_(t,f),_(t,c),q(d,c,null),_(e,m),q(h,e,null),_(e,g),_(e,b),_(e,k),D.m(e,null),S(P,T,L),E.m(P,L),S(P,M,L),C=!0},p(P,L){(!C||L&32)&&le(l,P[5]);const N={};L&49153&&(N.$$scope={dirty:L,ctx:P}),d.$set(N);const F={};L&4&&(F.value=P[2]),h.$set(F),L&8&&he(y,y=P[3])?(ae(),I(D,1,1,Z),ue(),D=Tc(P),D.c(),A(D,1),D.m(e,null)):D.p(P,L),L&8&&he($,$=P[3])?(ae(),I(E,1,1,Z),ue(),E=$c(P),E.c(),A(E,1),E.m(M.parentNode,M)):E.p(P,L)},i(P){C||(A(r.$$.fragment,P),A(d.$$.fragment,P),A(h.$$.fragment,P),A(D),A(E),C=!0)},o(P){I(r.$$.fragment,P),I(d.$$.fragment,P),I(h.$$.fragment,P),I(D),I(E),C=!1},d(P){P&&w(e),j(r),j(d),j(h),D.d(P),P&&w(T),P&&w(M),E.d(P)}}}function T3(n){let e,t,i,s;e=new wn({props:{$$slots:{default:[S3]},$$scope:{ctx:n}}});let l={};return i=new k3({props:l}),n[13](i),{c(){H(e.$$.fragment),t=O(),H(i.$$.fragment)},m(o,r){q(e,o,r),S(o,t,r),q(i,o,r),s=!0},p(o,[r]){const a={};r&32831&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){I(e.$$.fragment,o),I(i.$$.fragment,o),s=!1},d(o){j(e,o),o&&w(t),n[13](null),j(i,o)}}}const Cc="includeAdminLogs";function $3(n,e,t){var k;let i,s;Ye(n,St,y=>t(5,s=y)),Kt(St,s="Request logs",s);let l,o="",r=((k=window.localStorage)==null?void 0:k.getItem(Cc))<<0,a=1;function u(){t(3,a++,a)}const f=()=>u();function c(){r=this.checked,t(0,r)}const d=y=>t(2,o=y.detail);function m(y){o=y,t(2,o)}function h(y){o=y,t(2,o)}const g=y=>l==null?void 0:l.show(y==null?void 0:y.detail);function b(y){ie[y?"unshift":"push"](()=>{l=y,t(1,l)})}return n.$$.update=()=>{n.$$.dirty&1&&t(4,i=r?"":'auth!="admin"'),n.$$.dirty&1&&typeof r<"u"&&window.localStorage&&window.localStorage.setItem(Cc,r<<0)},[r,l,o,a,i,s,u,f,c,d,m,h,g,b]}class C3 extends ye{constructor(e){super(),ve(this,e,$3,T3,he,{})}}const Ai=Ln([]),Mi=Ln({}),Po=Ln(!1);function M3(n){Ai.update(e=>{const t=z.findByKey(e,"id",n);return t?Mi.set(t):e.length&&Mi.set(e[0]),e})}function D3(n){Ai.update(e=>(z.removeByKey(e,"id",n.id),Mi.update(t=>t.id===n.id?e[0]:t),e))}async function Tb(n=null){Po.set(!0);try{let e=await pe.collections.getFullList(200,{sort:"+created"});e=z.sortCollections(e),Ai.set(e);const t=n&&z.findByKey(e,"id",n);t?Mi.set(t):e.length&&Mi.set(e[0])}catch(e){pe.errorResponseHandler(e)}Po.set(!1)}const Qa=Ln({});function cn(n,e,t){Qa.set({text:n,yesCallback:e,noCallback:t})}function $b(){Qa.set({})}function Mc(n){let e,t,i,s;const l=n[14].default,o=Nt(l,n,n[13],null);return{c(){e=v("div"),o&&o.c(),p(e,"class",n[1]),Q(e,"active",n[0])},m(r,a){S(r,e,a),o&&o.m(e,null),s=!0},p(r,a){o&&o.p&&(!s||a&8192)&&Rt(o,l,r,r[13],s?Ft(l,r[13],a,null):qt(r[13]),null),(!s||a&2)&&p(e,"class",r[1]),(!s||a&3)&&Q(e,"active",r[0])},i(r){s||(A(o,r),r&&xe(()=>{i&&i.end(1),t=mg(e,An,{duration:150,y:-5}),t.start()}),s=!0)},o(r){I(o,r),t&&t.invalidate(),r&&(i=hg(e,An,{duration:150,y:2})),s=!1},d(r){r&&w(e),o&&o.d(r),r&&i&&i.end()}}}function O3(n){let e,t,i,s,l=n[0]&&Mc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","toggler-container")},m(o,r){S(o,e,r),l&&l.m(e,null),n[15](e),t=!0,i||(s=[Y(window,"click",n[3]),Y(window,"keydown",n[4]),Y(window,"focusin",n[5])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&A(l,1)):(l=Mc(o),l.c(),A(l,1),l.m(e,null)):l&&(ae(),I(l,1,1,()=>{l=null}),ue())},i(o){t||(A(l),t=!0)},o(o){I(l),t=!1},d(o){o&&w(e),l&&l.d(),n[15](null),i=!1,Pe(s)}}}function E3(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:o=!1}=e,{escClose:r=!0}=e,{closableClass:a="closable"}=e,{class:u=""}=e,f,c;const d=Ct();function m(){t(0,o=!1)}function h(){t(0,o=!0)}function g(){o?m():h()}function b(P){return!f||P.classList.contains(a)||(c==null?void 0:c.contains(P))&&!f.contains(P)||f.contains(P)&&P.closest&&P.closest("."+a)}function k(P){(!o||b(P.target))&&(P.preventDefault(),P.stopPropagation(),g())}function y(P){(P.code==="Enter"||P.code==="Space")&&(!o||b(P.target))&&(P.preventDefault(),P.stopPropagation(),g())}function T(P){o&&!(f!=null&&f.contains(P.target))&&!(c!=null&&c.contains(P.target))&&m()}function $(P){o&&r&&P.code==="Escape"&&(P.preventDefault(),m())}function M(P){return T(P)}function C(P){D(),t(12,c=P||(f==null?void 0:f.parentNode)),c&&(f==null||f.addEventListener("click",k),c.addEventListener("click",k),c.addEventListener("keydown",y))}function D(){c&&(f==null||f.removeEventListener("click",k),c.removeEventListener("click",k),c.removeEventListener("keydown",y))}Zt(()=>(C(),()=>D()));function E(P){ie[P?"unshift":"push"](()=>{f=P,t(2,f)})}return n.$$set=P=>{"trigger"in P&&t(6,l=P.trigger),"active"in P&&t(0,o=P.active),"escClose"in P&&t(7,r=P.escClose),"closableClass"in P&&t(8,a=P.closableClass),"class"in P&&t(1,u=P.class),"$$scope"in P&&t(13,s=P.$$scope)},n.$$.update=()=>{var P,L;n.$$.dirty&68&&f&&C(l),n.$$.dirty&4097&&(o?((P=c==null?void 0:c.classList)==null||P.add("active"),d("show")):((L=c==null?void 0:c.classList)==null||L.remove("active"),d("hide")))},[o,u,f,T,$,M,l,r,a,m,h,g,c,s,i,E]}class ei extends ye{constructor(e){super(),ve(this,e,E3,O3,he,{trigger:6,active:0,escClose:7,closableClass:8,class:1,hide:9,show:10,toggle:11})}get hide(){return this.$$.ctx[9]}get show(){return this.$$.ctx[10]}get toggle(){return this.$$.ctx[11]}}const A3=n=>({active:n&1}),Dc=n=>({active:n[0]});function Oc(n){let e,t,i;const s=n[15].default,l=Nt(s,n,n[14],null);return{c(){e=v("div"),l&&l.c(),p(e,"class","accordion-content")},m(o,r){S(o,e,r),l&&l.m(e,null),i=!0},p(o,r){l&&l.p&&(!i||r&16384)&&Rt(l,s,o,o[14],i?Ft(s,o[14],r,null):qt(o[14]),null)},i(o){i||(A(l,o),o&&xe(()=>{t||(t=je(e,At,{duration:150},!0)),t.run(1)}),i=!0)},o(o){I(l,o),o&&(t||(t=je(e,At,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),o&&t&&t.end()}}}function I3(n){let e,t,i,s,l,o,r;const a=n[15].header,u=Nt(a,n,n[14],Dc);let f=n[0]&&Oc(n);return{c(){e=v("div"),t=v("button"),u&&u.c(),i=O(),f&&f.c(),p(t,"type","button"),p(t,"class","accordion-header"),p(t,"draggable",n[2]),Q(t,"interactive",n[3]),p(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),Q(e,"active",n[0])},m(c,d){S(c,e,d),_(e,t),u&&u.m(t,null),_(e,i),f&&f.m(e,null),n[22](e),l=!0,o||(r=[Y(t,"click",dt(n[17])),Y(t,"drop",dt(n[18])),Y(t,"dragstart",n[19]),Y(t,"dragenter",n[20]),Y(t,"dragleave",n[21]),Y(t,"dragover",dt(n[16]))],o=!0)},p(c,[d]){u&&u.p&&(!l||d&16385)&&Rt(u,a,c,c[14],l?Ft(a,c[14],d,A3):qt(c[14]),Dc),(!l||d&4)&&p(t,"draggable",c[2]),(!l||d&8)&&Q(t,"interactive",c[3]),c[0]?f?(f.p(c,d),d&1&&A(f,1)):(f=Oc(c),f.c(),A(f,1),f.m(e,null)):f&&(ae(),I(f,1,1,()=>{f=null}),ue()),(!l||d&130&&s!==(s="accordion "+(c[7]?"drag-over":"")+" "+c[1]))&&p(e,"class",s),(!l||d&131)&&Q(e,"active",c[0])},i(c){l||(A(u,c),A(f),l=!0)},o(c){I(u,c),I(f),l=!1},d(c){c&&w(e),u&&u.d(c),f&&f.d(),n[22](null),o=!1,Pe(r)}}}function P3(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=Ct();let o,r,{class:a=""}=e,{draggable:u=!1}=e,{active:f=!1}=e,{interactive:c=!0}=e,{single:d=!1}=e,m=!1;function h(){return!!f}function g(){y(),t(0,f=!0),l("expand")}function b(){t(0,f=!1),clearTimeout(r),l("collapse")}function k(){l("toggle"),f?b():g()}function y(){if(d&&o.closest(".accordions")){const L=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const N of L)N.click()}}Zt(()=>()=>clearTimeout(r));function T(L){ze.call(this,n,L)}const $=()=>c&&k(),M=L=>{u&&(t(7,m=!1),y(),l("drop",L))},C=L=>u&&l("dragstart",L),D=L=>{u&&(t(7,m=!0),l("dragenter",L))},E=L=>{u&&(t(7,m=!1),l("dragleave",L))};function P(L){ie[L?"unshift":"push"](()=>{o=L,t(6,o)})}return n.$$set=L=>{"class"in L&&t(1,a=L.class),"draggable"in L&&t(2,u=L.draggable),"active"in L&&t(0,f=L.active),"interactive"in L&&t(3,c=L.interactive),"single"in L&&t(9,d=L.single),"$$scope"in L&&t(14,s=L.$$scope)},n.$$.update=()=>{n.$$.dirty&8257&&f&&(clearTimeout(r),t(13,r=setTimeout(()=>{o!=null&&o.scrollIntoViewIfNeeded?o==null||o.scrollIntoViewIfNeeded():o!=null&&o.scrollIntoView&&(o==null||o.scrollIntoView({behavior:"smooth",block:"nearest"}))},200)))},[f,a,u,c,k,y,o,m,l,d,h,g,b,r,s,i,T,$,M,C,D,E,P]}class ys extends ye{constructor(e){super(),ve(this,e,P3,I3,he,{class:1,draggable:2,active:0,interactive:3,single:9,isExpanded:10,expand:11,collapse:12,toggle:4,collapseSiblings:5})}get isExpanded(){return this.$$.ctx[10]}get expand(){return this.$$.ctx[11]}get collapse(){return this.$$.ctx[12]}get toggle(){return this.$$.ctx[4]}get collapseSiblings(){return this.$$.ctx[5]}}const L3=n=>({}),Ec=n=>({});function Ac(n,e,t){const i=n.slice();return i[46]=e[t],i}const N3=n=>({}),Ic=n=>({});function Pc(n,e,t){const i=n.slice();return i[46]=e[t],i[50]=t,i}function Lc(n){let e,t,i;return{c(){e=v("div"),t=B(n[2]),i=O(),p(e,"class","block txt-placeholder"),Q(e,"link-hint",!n[5])},m(s,l){S(s,e,l),_(e,t),_(e,i)},p(s,l){l[0]&4&&le(t,s[2]),l[0]&32&&Q(e,"link-hint",!s[5])},d(s){s&&w(e)}}}function F3(n){let e,t=n[46]+"",i;return{c(){e=v("span"),i=B(t),p(e,"class","txt")},m(s,l){S(s,e,l),_(e,i)},p(s,l){l[0]&1&&t!==(t=s[46]+"")&&le(i,t)},i:Z,o:Z,d(s){s&&w(e)}}}function R3(n){let e,t,i;const s=[{item:n[46]},n[9]];var l=n[8];function o(r){let a={};for(let u=0;u{j(f,1)}),ue()}l?(e=jt(l,o()),H(e.$$.fragment),A(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&I(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&j(e,r)}}}function Nc(n){let e,t,i;function s(){return n[34](n[46])}return{c(){e=v("span"),e.innerHTML='',p(e,"class","clear")},m(l,o){S(l,e,o),t||(i=[Ie(Be.call(null,e,"Clear")),Y(e,"click",kn(dt(s)))],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Pe(i)}}}function Fc(n){let e,t,i,s,l,o;const r=[R3,F3],a=[];function u(c,d){return c[8]?0:1}t=u(n),i=a[t]=r[t](n);let f=(n[4]||n[6])&&Nc(n);return{c(){e=v("div"),i.c(),s=O(),f&&f.c(),l=O(),p(e,"class","option")},m(c,d){S(c,e,d),a[t].m(e,null),_(e,s),f&&f.m(e,null),_(e,l),o=!0},p(c,d){let m=t;t=u(c),t===m?a[t].p(c,d):(ae(),I(a[m],1,1,()=>{a[m]=null}),ue(),i=a[t],i?i.p(c,d):(i=a[t]=r[t](c),i.c()),A(i,1),i.m(e,s)),c[4]||c[6]?f?f.p(c,d):(f=Nc(c),f.c(),f.m(e,l)):f&&(f.d(1),f=null)},i(c){o||(A(i),o=!0)},o(c){I(i),o=!1},d(c){c&&w(e),a[t].d(),f&&f.d()}}}function Rc(n){let e,t,i={class:"dropdown dropdown-block options-dropdown dropdown-left",trigger:n[18],$$slots:{default:[H3]},$$scope:{ctx:n}};return e=new ei({props:i}),n[39](e),e.$on("show",n[24]),e.$on("hide",n[40]),{c(){H(e.$$.fragment)},m(s,l){q(e,s,l),t=!0},p(s,l){const o={};l[0]&262144&&(o.trigger=s[18]),l[0]&1612938|l[1]&2048&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[39](null),j(e,s)}}}function qc(n){let e,t,i,s,l,o,r,a,u=n[15].length&&jc(n);return{c(){e=v("div"),t=v("label"),i=v("div"),i.innerHTML='',s=O(),l=v("input"),o=O(),u&&u.c(),p(i,"class","addon p-r-0"),l.autofocus=!0,p(l,"type","text"),p(l,"placeholder",n[3]),p(t,"class","input-group"),p(e,"class","form-field form-field-sm options-search")},m(f,c){S(f,e,c),_(e,t),_(t,i),_(t,s),_(t,l),ce(l,n[15]),_(t,o),u&&u.m(t,null),l.focus(),r||(a=Y(l,"input",n[36]),r=!0)},p(f,c){c[0]&8&&p(l,"placeholder",f[3]),c[0]&32768&&l.value!==f[15]&&ce(l,f[15]),f[15].length?u?u.p(f,c):(u=jc(f),u.c(),u.m(t,null)):u&&(u.d(1),u=null)},d(f){f&&w(e),u&&u.d(),r=!1,a()}}}function jc(n){let e,t,i,s;return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","btn btn-sm btn-circle btn-transparent clear"),p(e,"class","addon suffix p-r-5")},m(l,o){S(l,e,o),_(e,t),i||(s=Y(t,"click",kn(dt(n[21]))),i=!0)},p:Z,d(l){l&&w(e),i=!1,s()}}}function Hc(n){let e,t=n[1]&&Vc(n);return{c(){t&&t.c(),e=Me()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1]?t?t.p(i,s):(t=Vc(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function Vc(n){let e,t;return{c(){e=v("div"),t=B(n[1]),p(e,"class","txt-missing")},m(i,s){S(i,e,s),_(e,t)},p(i,s){s[0]&2&&le(t,i[1])},d(i){i&&w(e)}}}function q3(n){let e=n[46]+"",t;return{c(){t=B(e)},m(i,s){S(i,t,s)},p(i,s){s[0]&1048576&&e!==(e=i[46]+"")&&le(t,e)},i:Z,o:Z,d(i){i&&w(t)}}}function j3(n){let e,t,i;const s=[{item:n[46]},n[11]];var l=n[10];function o(r){let a={};for(let u=0;u{j(f,1)}),ue()}l?(e=jt(l,o()),H(e.$$.fragment),A(e.$$.fragment,1),q(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&I(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&j(e,r)}}}function zc(n){let e,t,i,s,l,o,r;const a=[j3,q3],u=[];function f(m,h){return m[10]?0:1}t=f(n),i=u[t]=a[t](n);function c(...m){return n[37](n[46],...m)}function d(...m){return n[38](n[46],...m)}return{c(){e=v("div"),i.c(),s=O(),p(e,"tabindex","0"),p(e,"class","dropdown-item option"),Q(e,"closable",n[7]),Q(e,"selected",n[19](n[46]))},m(m,h){S(m,e,h),u[t].m(e,null),_(e,s),l=!0,o||(r=[Y(e,"click",c),Y(e,"keydown",d)],o=!0)},p(m,h){n=m;let g=t;t=f(n),t===g?u[t].p(n,h):(ae(),I(u[g],1,1,()=>{u[g]=null}),ue(),i=u[t],i?i.p(n,h):(i=u[t]=a[t](n),i.c()),A(i,1),i.m(e,s)),(!l||h[0]&128)&&Q(e,"closable",n[7]),(!l||h[0]&1572864)&&Q(e,"selected",n[19](n[46]))},i(m){l||(A(i),l=!0)},o(m){I(i),l=!1},d(m){m&&w(e),u[t].d(),o=!1,Pe(r)}}}function H3(n){let e,t,i,s,l,o=n[12]&&qc(n);const r=n[33].beforeOptions,a=Nt(r,n,n[42],Ic);let u=n[20],f=[];for(let g=0;gI(f[g],1,1,()=>{f[g]=null});let d=null;u.length||(d=Hc(n));const m=n[33].afterOptions,h=Nt(m,n,n[42],Ec);return{c(){o&&o.c(),e=O(),a&&a.c(),t=O(),i=v("div");for(let g=0;gI(a[d],1,1,()=>{a[d]=null});let f=null;r.length||(f=Lc(n));let c=!n[5]&&Rc(n);return{c(){e=v("div"),t=v("div");for(let d=0;d{c=null}),ue()):c?(c.p(d,m),m[0]&32&&A(c,1)):(c=Rc(d),c.c(),A(c,1),c.m(e,null)),(!o||m[0]&8192&&l!==(l="select "+d[13]))&&p(e,"class",l),(!o||m[0]&8208)&&Q(e,"multiple",d[4]),(!o||m[0]&8224)&&Q(e,"disabled",d[5])},i(d){if(!o){for(let m=0;mot(Ht,Fe))||[]}function J(ee,Fe){ee.preventDefault(),g&&d?X(Fe):R(Fe)}function de(ee,Fe){(ee.code==="Enter"||ee.code==="Space")&&J(ee,Fe)}function _e(){K(),setTimeout(()=>{const ee=L==null?void 0:L.querySelector(".dropdown-item.option.selected");ee&&(ee.focus(),ee.scrollIntoView({block:"nearest"}))},0)}function $e(ee){ee.stopPropagation(),!m&&(E==null||E.toggle())}Zt(()=>{const ee=document.querySelectorAll(`label[for="${r}"]`);for(const Fe of ee)Fe.addEventListener("click",$e);return()=>{for(const Fe of ee)Fe.removeEventListener("click",$e)}});const Ne=ee=>F(ee);function Re(ee){ie[ee?"unshift":"push"](()=>{N=ee,t(18,N)})}function be(){P=this.value,t(15,P)}const Se=(ee,Fe)=>J(Fe,ee),We=(ee,Fe)=>de(Fe,ee);function lt(ee){ie[ee?"unshift":"push"](()=>{E=ee,t(16,E)})}function fe(ee){ze.call(this,n,ee)}function Ve(ee){ie[ee?"unshift":"push"](()=>{L=ee,t(17,L)})}return n.$$set=ee=>{"id"in ee&&t(25,r=ee.id),"noOptionsText"in ee&&t(1,a=ee.noOptionsText),"selectPlaceholder"in ee&&t(2,u=ee.selectPlaceholder),"searchPlaceholder"in ee&&t(3,f=ee.searchPlaceholder),"items"in ee&&t(26,c=ee.items),"multiple"in ee&&t(4,d=ee.multiple),"disabled"in ee&&t(5,m=ee.disabled),"selected"in ee&&t(0,h=ee.selected),"toggle"in ee&&t(6,g=ee.toggle),"closable"in ee&&t(7,b=ee.closable),"labelComponent"in ee&&t(8,k=ee.labelComponent),"labelComponentProps"in ee&&t(9,y=ee.labelComponentProps),"optionComponent"in ee&&t(10,T=ee.optionComponent),"optionComponentProps"in ee&&t(11,$=ee.optionComponentProps),"searchable"in ee&&t(12,M=ee.searchable),"searchFunc"in ee&&t(27,C=ee.searchFunc),"class"in ee&&t(13,D=ee.class),"$$scope"in ee&&t(42,o=ee.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&67108864&&c&&(te(),K()),n.$$.dirty[0]&67141632&&t(20,i=re(c,P)),n.$$.dirty[0]&1&&t(19,s=function(ee){const Fe=z.toArray(h);return z.inArray(Fe,ee)})},[h,a,u,f,d,m,g,b,k,y,T,$,M,D,F,P,E,L,N,s,i,K,J,de,_e,r,c,C,R,X,se,W,G,l,Ne,Re,be,Se,We,lt,fe,Ve,o]}class xa extends ye{constructor(e){super(),ve(this,e,B3,V3,he,{id:25,noOptionsText:1,selectPlaceholder:2,searchPlaceholder:3,items:26,multiple:4,disabled:5,selected:0,toggle:6,closable:7,labelComponent:8,labelComponentProps:9,optionComponent:10,optionComponentProps:11,searchable:12,searchFunc:27,class:13,deselectItem:14,selectItem:28,toggleItem:29,reset:30,showDropdown:31,hideDropdown:32},null,[-1,-1])}get deselectItem(){return this.$$.ctx[14]}get selectItem(){return this.$$.ctx[28]}get toggleItem(){return this.$$.ctx[29]}get reset(){return this.$$.ctx[30]}get showDropdown(){return this.$$.ctx[31]}get hideDropdown(){return this.$$.ctx[32]}}function Bc(n){let e,t;return{c(){e=v("i"),p(e,"class",t="icon "+n[0].icon)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t="icon "+i[0].icon)&&p(e,"class",t)},d(i){i&&w(e)}}}function U3(n){let e,t,i=(n[0].label||n[0].name||n[0].title||n[0].id||n[0].value)+"",s,l=n[0].icon&&Bc(n);return{c(){l&&l.c(),e=O(),t=v("span"),s=B(i),p(t,"class","txt")},m(o,r){l&&l.m(o,r),S(o,e,r),S(o,t,r),_(t,s)},p(o,[r]){o[0].icon?l?l.p(o,r):(l=Bc(o),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null),r&1&&i!==(i=(o[0].label||o[0].name||o[0].title||o[0].id||o[0].value)+"")&&le(s,i)},i:Z,o:Z,d(o){l&&l.d(o),o&&w(e),o&&w(t)}}}function W3(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class Uc extends ye{constructor(e){super(),ve(this,e,W3,U3,he,{item:0})}}const Y3=n=>({}),Wc=n=>({});function K3(n){let e;const t=n[8].afterOptions,i=Nt(t,n,n[12],Wc);return{c(){i&&i.c()},m(s,l){i&&i.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l&4096)&&Rt(i,t,s,s[12],e?Ft(t,s[12],l,Y3):qt(s[12]),Wc)},i(s){e||(A(i,s),e=!0)},o(s){I(i,s),e=!1},d(s){i&&i.d(s)}}}function J3(n){let e,t,i;const s=[{items:n[1]},{multiple:n[2]},{labelComponent:n[3]},{optionComponent:n[4]},n[5]];function l(r){n[9](r)}let o={$$slots:{afterOptions:[K3]},$$scope:{ctx:n}};for(let r=0;rge(e,"selected",l)),e.$on("show",n[10]),e.$on("hide",n[11]),{c(){H(e.$$.fragment)},m(r,a){q(e,r,a),i=!0},p(r,[a]){const u=a&62?on(s,[a&2&&{items:r[1]},a&4&&{multiple:r[2]},a&8&&{labelComponent:r[3]},a&16&&{optionComponent:r[4]},a&32&&xn(r[5])]):{};a&4096&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.selected=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){j(e,r)}}}function Z3(n,e,t){const i=["items","multiple","selected","labelComponent","optionComponent","selectionKey","keyOfSelected"];let s=Et(e,i),{$$slots:l={},$$scope:o}=e,{items:r=[]}=e,{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{labelComponent:f=Uc}=e,{optionComponent:c=Uc}=e,{selectionKey:d="value"}=e,{keyOfSelected:m=a?[]:void 0}=e;function h(T){T=z.toArray(T,!0);let $=[];for(let M of T){const C=z.findByKey(r,d,M);C&&$.push(C)}T.length&&!$.length||t(0,u=a?$:$[0])}async function g(T){let $=z.toArray(T,!0).map(M=>M[d]);r.length&&t(6,m=a?$:$[0])}function b(T){u=T,t(0,u)}function k(T){ze.call(this,n,T)}function y(T){ze.call(this,n,T)}return n.$$set=T=>{e=Je(Je({},e),Qn(T)),t(5,s=Et(e,i)),"items"in T&&t(1,r=T.items),"multiple"in T&&t(2,a=T.multiple),"selected"in T&&t(0,u=T.selected),"labelComponent"in T&&t(3,f=T.labelComponent),"optionComponent"in T&&t(4,c=T.optionComponent),"selectionKey"in T&&t(7,d=T.selectionKey),"keyOfSelected"in T&&t(6,m=T.keyOfSelected),"$$scope"in T&&t(12,o=T.$$scope)},n.$$.update=()=>{n.$$.dirty&66&&r&&h(m),n.$$.dirty&1&&g(u)},[u,r,a,f,c,s,m,d,l,b,k,y,o]}class Ls extends ye{constructor(e){super(),ve(this,e,Z3,J3,he,{items:1,multiple:2,selected:0,labelComponent:3,optionComponent:4,selectionKey:7,keyOfSelected:6})}}function G3(n){let e,t,i;const s=[{class:"field-type-select "+n[1]},{items:n[2]},n[3]];function l(r){n[4](r)}let o={};for(let r=0;rge(e,"keyOfSelected",l)),{c(){H(e.$$.fragment)},m(r,a){q(e,r,a),i=!0},p(r,[a]){const u=a&14?on(s,[a&2&&{class:"field-type-select "+r[1]},a&4&&{items:r[2]},a&8&&xn(r[3])]):{};!t&&a&1&&(t=!0,u.keyOfSelected=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){j(e,r)}}}function X3(n,e,t){const i=["value","class"];let s=Et(e,i),{value:l="text"}=e,{class:o=""}=e;const r=[{label:"Plain text",value:"text",icon:z.getFieldTypeIcon("text")},{label:"Rich editor",value:"editor",icon:z.getFieldTypeIcon("editor")},{label:"Number",value:"number",icon:z.getFieldTypeIcon("number")},{label:"Bool",value:"bool",icon:z.getFieldTypeIcon("bool")},{label:"Email",value:"email",icon:z.getFieldTypeIcon("email")},{label:"Url",value:"url",icon:z.getFieldTypeIcon("url")},{label:"DateTime",value:"date",icon:z.getFieldTypeIcon("date")},{label:"Select",value:"select",icon:z.getFieldTypeIcon("select")},{label:"File",value:"file",icon:z.getFieldTypeIcon("file")},{label:"Relation",value:"relation",icon:z.getFieldTypeIcon("relation")},{label:"JSON",value:"json",icon:z.getFieldTypeIcon("json")}];function a(u){l=u,t(0,l)}return n.$$set=u=>{e=Je(Je({},e),Qn(u)),t(3,s=Et(e,i)),"value"in u&&t(0,l=u.value),"class"in u&&t(1,o=u.class)},[l,o,r,s,a]}class Q3 extends ye{constructor(e){super(),ve(this,e,X3,G3,he,{value:0,class:1})}}function x3(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Min length"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",o=n[5]),p(l,"step","1"),p(l,"min","0")},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].min),r||(a=Y(l,"input",n[2]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].min&&ce(l,u[0].min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function eT(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=B("Max length"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",o=n[5]),p(l,"step","1"),p(l,"min",r=n[0].min||0)},m(f,c){S(f,e,c),_(e,t),S(f,s,c),S(f,l,c),ce(l,n[0].max),a||(u=Y(l,"input",n[3]),a=!0)},p(f,c){c&32&&i!==(i=f[5])&&p(e,"for",i),c&32&&o!==(o=f[5])&&p(l,"id",o),c&1&&r!==(r=f[0].min||0)&&p(l,"min",r),c&1&&ht(l.value)!==f[0].max&&ce(l,f[0].max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function tT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Regex pattern"),s=O(),l=v("input"),r=O(),a=v("div"),a.innerHTML="Valid Go regular expression, eg. ^\\w+$.",p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5]),p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),ce(l,n[0].pattern),S(c,r,d),S(c,a,d),u||(f=Y(l,"input",n[4]),u=!0)},p(c,d){d&32&&i!==(i=c[5])&&p(e,"for",i),d&32&&o!==(o=c[5])&&p(l,"id",o),d&1&&l.value!==c[0].pattern&&ce(l,c[0].pattern)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function nT(n){let e,t,i,s,l,o,r,a,u,f;return i=new me({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[x3,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),o=new me({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[eT,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),u=new me({props:{class:"form-field",name:"schema."+n[1]+".options.pattern",$$slots:{default:[tT,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=O(),l=v("div"),H(o.$$.fragment),r=O(),a=v("div"),H(u.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(a,"class","col-sm-12"),p(e,"class","grid")},m(c,d){S(c,e,d),_(e,t),q(i,t,null),_(e,s),_(e,l),q(o,l,null),_(e,r),_(e,a),q(u,a,null),f=!0},p(c,[d]){const m={};d&2&&(m.name="schema."+c[1]+".options.min"),d&97&&(m.$$scope={dirty:d,ctx:c}),i.$set(m);const h={};d&2&&(h.name="schema."+c[1]+".options.max"),d&97&&(h.$$scope={dirty:d,ctx:c}),o.$set(h);const g={};d&2&&(g.name="schema."+c[1]+".options.pattern"),d&97&&(g.$$scope={dirty:d,ctx:c}),u.$set(g)},i(c){f||(A(i.$$.fragment,c),A(o.$$.fragment,c),A(u.$$.fragment,c),f=!0)},o(c){I(i.$$.fragment,c),I(o.$$.fragment,c),I(u.$$.fragment,c),f=!1},d(c){c&&w(e),j(i),j(o),j(u)}}}function iT(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.min=ht(this.value),t(0,s)}function o(){s.max=ht(this.value),t(0,s)}function r(){s.pattern=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"options"in a&&t(0,s=a.options)},[s,i,l,o,r]}class sT extends ye{constructor(e){super(),ve(this,e,iT,nT,he,{key:1,options:0})}}function lT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Min"),s=O(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].min),r||(a=Y(l,"input",n[2]),r=!0)},p(u,f){f&16&&i!==(i=u[4])&&p(e,"for",i),f&16&&o!==(o=u[4])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].min&&ce(l,u[0].min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function oT(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=B("Max"),s=O(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4]),p(l,"min",r=n[0].min)},m(f,c){S(f,e,c),_(e,t),S(f,s,c),S(f,l,c),ce(l,n[0].max),a||(u=Y(l,"input",n[3]),a=!0)},p(f,c){c&16&&i!==(i=f[4])&&p(e,"for",i),c&16&&o!==(o=f[4])&&p(l,"id",o),c&1&&r!==(r=f[0].min)&&p(l,"min",r),c&1&&ht(l.value)!==f[0].max&&ce(l,f[0].max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function rT(n){let e,t,i,s,l,o,r;return i=new me({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[lT,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new me({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[oT,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=O(),l=v("div"),H(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),q(i,t,null),_(e,s),_(e,l),q(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){I(i.$$.fragment,a),I(o.$$.fragment,a),r=!1},d(a){a&&w(e),j(i),j(o)}}}function aT(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.min=ht(this.value),t(0,s)}function o(){s.max=ht(this.value),t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class uT extends ye{constructor(e){super(),ve(this,e,aT,rT,he,{key:1,options:0})}}function fT(n,e,t){let{key:i=""}=e,{options:s={}}=e;return n.$$set=l=>{"key"in l&&t(0,i=l.key),"options"in l&&t(1,s=l.options)},[i,s]}class cT extends ye{constructor(e){super(),ve(this,e,fT,null,he,{key:0,options:1})}}function dT(n){let e,t,i,s,l=[{type:t=n[3].type||"text"},{value:n[2]},n[3]],o={};for(let r=0;r{t(0,o=z.splitNonEmpty(u.target.value,r))};return n.$$set=u=>{e=Je(Je({},e),Qn(u)),t(3,l=Et(e,s)),"value"in u&&t(0,o=u.value),"separator"in u&&t(1,r=u.separator)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=(o||[]).join(", "))},[o,r,i,l,a]}class Ns extends ye{constructor(e){super(),ve(this,e,pT,dT,he,{value:0,separator:1})}}function mT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function h(b){n[2](b)}let g={id:n[4],disabled:!z.isEmpty(n[0].onlyDomains)};return n[0].exceptDomains!==void 0&&(g.value=n[0].exceptDomains),r=new Ns({props:g}),ie.push(()=>ge(r,"value",h)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=O(),s=v("i"),o=O(),H(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[4]),p(f,"class","help-block")},m(b,k){S(b,e,k),_(e,t),_(e,i),_(e,s),S(b,o,k),q(r,b,k),S(b,u,k),S(b,f,k),c=!0,d||(m=Ie(Be.call(null,s,{text:`List of domains that are NOT allowed. + This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,k){(!c||k&16&&l!==(l=b[4]))&&p(e,"for",l);const y={};k&16&&(y.id=b[4]),k&1&&(y.disabled=!z.isEmpty(b[0].onlyDomains)),!a&&k&1&&(a=!0,y.value=b[0].exceptDomains,ke(()=>a=!1)),r.$set(y)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){I(r.$$.fragment,b),c=!1},d(b){b&&w(e),b&&w(o),j(r,b),b&&w(u),b&&w(f),d=!1,m()}}}function hT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function h(b){n[3](b)}let g={id:n[4]+".options.onlyDomains",disabled:!z.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(g.value=n[0].onlyDomains),r=new Ns({props:g}),ie.push(()=>ge(r,"value",h)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=O(),s=v("i"),o=O(),H(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[4]+".options.onlyDomains"),p(f,"class","help-block")},m(b,k){S(b,e,k),_(e,t),_(e,i),_(e,s),S(b,o,k),q(r,b,k),S(b,u,k),S(b,f,k),c=!0,d||(m=Ie(Be.call(null,s,{text:`List of domains that are ONLY allowed. + This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,k){(!c||k&16&&l!==(l=b[4]+".options.onlyDomains"))&&p(e,"for",l);const y={};k&16&&(y.id=b[4]+".options.onlyDomains"),k&1&&(y.disabled=!z.isEmpty(b[0].exceptDomains)),!a&&k&1&&(a=!0,y.value=b[0].onlyDomains,ke(()=>a=!1)),r.$set(y)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){I(r.$$.fragment,b),c=!1},d(b){b&&w(e),b&&w(o),j(r,b),b&&w(u),b&&w(f),d=!1,m()}}}function gT(n){let e,t,i,s,l,o,r;return i=new me({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[mT,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new me({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[hT,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=O(),l=v("div"),H(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),q(i,t,null),_(e,s),_(e,l),q(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.onlyDomains"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){I(i.$$.fragment,a),I(o.$$.fragment,a),r=!1},d(a){a&&w(e),j(i),j(o)}}}function _T(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.exceptDomains,r)&&(s.exceptDomains=r,t(0,s))}function o(r){n.$$.not_equal(s.onlyDomains,r)&&(s.onlyDomains=r,t(0,s))}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class Cb extends ye{constructor(e){super(),ve(this,e,_T,gT,he,{key:1,options:0})}}function bT(n){let e,t,i,s;function l(a){n[2](a)}function o(a){n[3](a)}let r={};return n[0]!==void 0&&(r.key=n[0]),n[1]!==void 0&&(r.options=n[1]),e=new Cb({props:r}),ie.push(()=>ge(e,"key",l)),ie.push(()=>ge(e,"options",o)),{c(){H(e.$$.fragment)},m(a,u){q(e,a,u),s=!0},p(a,[u]){const f={};!t&&u&1&&(t=!0,f.key=a[0],ke(()=>t=!1)),!i&&u&2&&(i=!0,f.options=a[1],ke(()=>i=!1)),e.$set(f)},i(a){s||(A(e.$$.fragment,a),s=!0)},o(a){I(e.$$.fragment,a),s=!1},d(a){j(e,a)}}}function vT(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){i=r,t(0,i)}function o(r){s=r,t(1,s)}return n.$$set=r=>{"key"in r&&t(0,i=r.key),"options"in r&&t(1,s=r.options)},[i,s,l,o]}class yT extends ye{constructor(e){super(),ve(this,e,vT,bT,he,{key:0,options:1})}}function kT(n,e,t){let{key:i=""}=e,{options:s={}}=e;return n.$$set=l=>{"key"in l&&t(0,i=l.key),"options"in l&&t(1,s=l.options)},[i,s]}class wT extends ye{constructor(e){super(),ve(this,e,kT,null,he,{key:0,options:1})}}var Sr=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ks={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},_l={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var e=n%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},an=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},Cn=function(n){return n===!0?1:0};function Yc(n,e){var t;return function(){var i=this,s=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,s)},e)}}var Tr=function(n){return n instanceof Array?n:[n]};function Qt(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function st(n,e,t){var i=window.document.createElement(n);return e=e||"",t=t||"",i.className=e,t!==void 0&&(i.textContent=t),i}function io(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function Mb(n,e){if(e(n))return n;if(n.parentNode)return Mb(n.parentNode,e)}function so(n,e){var t=st("div","numInputWrapper"),i=st("input","numInput "+n),s=st("span","arrowUp"),l=st("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?i.type="number":(i.type="text",i.pattern="\\d*"),e!==void 0)for(var o in e)i.setAttribute(o,e[o]);return t.appendChild(i),t.appendChild(s),t.appendChild(l),t}function gn(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var $r=function(){},Lo=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},ST={D:$r,F:function(n,e,t){n.setMonth(t.months.longhand.indexOf(e))},G:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},H:function(n,e){n.setHours(parseFloat(e))},J:function(n,e){n.setDate(parseFloat(e))},K:function(n,e,t){n.setHours(n.getHours()%12+12*Cn(new RegExp(t.amPM[1],"i").test(e)))},M:function(n,e,t){n.setMonth(t.months.shorthand.indexOf(e))},S:function(n,e){n.setSeconds(parseFloat(e))},U:function(n,e){return new Date(parseFloat(e)*1e3)},W:function(n,e,t){var i=parseInt(e),s=new Date(n.getFullYear(),0,2+(i-1)*7,0,0,0,0);return s.setDate(s.getDate()-s.getDay()+t.firstDayOfWeek),s},Y:function(n,e){n.setFullYear(parseFloat(e))},Z:function(n,e){return new Date(e)},d:function(n,e){n.setDate(parseFloat(e))},h:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},i:function(n,e){n.setMinutes(parseFloat(e))},j:function(n,e){n.setDate(parseFloat(e))},l:$r,m:function(n,e){n.setMonth(parseFloat(e)-1)},n:function(n,e){n.setMonth(parseFloat(e)-1)},s:function(n,e){n.setSeconds(parseFloat(e))},u:function(n,e){return new Date(parseFloat(e))},w:$r,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},Wi={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},ol={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[ol.w(n,e,t)]},F:function(n,e,t){return Lo(ol.n(n,e,t)-1,!1,e)},G:function(n,e,t){return an(ol.h(n,e,t))},H:function(n){return an(n.getHours())},J:function(n,e){return e.ordinal!==void 0?n.getDate()+e.ordinal(n.getDate()):n.getDate()},K:function(n,e){return e.amPM[Cn(n.getHours()>11)]},M:function(n,e){return Lo(n.getMonth(),!0,e)},S:function(n){return an(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return an(n.getFullYear(),4)},d:function(n){return an(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return an(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return an(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}},Db=function(n){var e=n.config,t=e===void 0?ks:e,i=n.l10n,s=i===void 0?_l:i,l=n.isMobile,o=l===void 0?!1:l;return function(r,a,u){var f=u||s;return t.formatDate!==void 0&&!o?t.formatDate(r,a,f):a.split("").map(function(c,d,m){return ol[c]&&m[d-1]!=="\\"?ol[c](r,f,t):c!=="\\"?c:""}).join("")}},ua=function(n){var e=n.config,t=e===void 0?ks:e,i=n.l10n,s=i===void 0?_l:i;return function(l,o,r,a){if(!(l!==0&&!l)){var u=a||s,f,c=l;if(l instanceof Date)f=new Date(l.getTime());else if(typeof l!="string"&&l.toFixed!==void 0)f=new Date(l);else if(typeof l=="string"){var d=o||(t||ks).dateFormat,m=String(l).trim();if(m==="today")f=new Date,r=!0;else if(t&&t.parseDate)f=t.parseDate(l,d);else if(/Z$/.test(m)||/GMT$/.test(m))f=new Date(l);else{for(var h=void 0,g=[],b=0,k=0,y="";bMath.min(e,t)&&n=0?new Date:new Date(t.config.minDate.getTime()),x=Mr(t.config);U.setHours(x.hours,x.minutes,x.seconds,U.getMilliseconds()),t.selectedDates=[U],t.latestSelectedDateObj=U}V!==void 0&&V.type!=="blur"&&Fl(V);var oe=t._input.value;c(),Vt(),t._input.value!==oe&&t._debouncedChange()}function u(V,U){return V%12+12*Cn(U===t.l10n.amPM[1])}function f(V){switch(V%24){case 0:case 12:return 12;default:return V%12}}function c(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var V=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,U=(parseInt(t.minuteElement.value,10)||0)%60,x=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(V=u(V,t.amPM.textContent));var oe=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&_n(t.latestSelectedDateObj,t.config.minDate,!0)===0,Te=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&_n(t.latestSelectedDateObj,t.config.maxDate,!0)===0;if(t.config.maxTime!==void 0&&t.config.minTime!==void 0&&t.config.minTime>t.config.maxTime){var Oe=Cr(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Ee=Cr(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),Ce=Cr(V,U,x);if(Ce>Ee&&Ce=12)]),t.secondElement!==void 0&&(t.secondElement.value=an(x)))}function h(V){var U=gn(V),x=parseInt(U.value)+(V.delta||0);(x/1e3>1||V.key==="Enter"&&!/[^\d]/.test(x.toString()))&&be(x)}function g(V,U,x,oe){if(U instanceof Array)return U.forEach(function(Te){return g(V,Te,x,oe)});if(V instanceof Array)return V.forEach(function(Te){return g(Te,U,x,oe)});V.addEventListener(U,x,oe),t._handlers.push({remove:function(){return V.removeEventListener(U,x,oe)}})}function b(){Ze("onChange")}function k(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(x){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+x+"]"),function(oe){return g(oe,"click",t[x])})}),t.isMobile){ls();return}var V=Yc(ee,50);if(t._debouncedChange=Yc(b,MT),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&g(t.daysContainer,"mouseover",function(x){t.config.mode==="range"&&Ve(gn(x))}),g(t._input,"keydown",fe),t.calendarContainer!==void 0&&g(t.calendarContainer,"keydown",fe),!t.config.inline&&!t.config.static&&g(window,"resize",V),window.ontouchstart!==void 0?g(window.document,"touchstart",Re):g(window.document,"mousedown",Re),g(window.document,"focus",Re,{capture:!0}),t.config.clickOpens===!0&&(g(t._input,"focus",t.open),g(t._input,"click",t.open)),t.daysContainer!==void 0&&(g(t.monthNav,"click",Xt),g(t.monthNav,["keyup","increment"],h),g(t.daysContainer,"click",di)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var U=function(x){return gn(x).select()};g(t.timeContainer,["increment"],a),g(t.timeContainer,"blur",a,{capture:!0}),g(t.timeContainer,"click",T),g([t.hourElement,t.minuteElement],["focus","click"],U),t.secondElement!==void 0&&g(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&g(t.amPM,"click",function(x){a(x)})}t.config.allowInput&&g(t._input,"blur",lt)}function y(V,U){var x=V!==void 0?t.parseDate(V):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate1),t.calendarContainer.appendChild(V);var Te=t.config.appendTo!==void 0&&t.config.appendTo.nodeType!==void 0;if((t.config.inline||t.config.static)&&(t.calendarContainer.classList.add(t.config.inline?"inline":"static"),t.config.inline&&(!Te&&t.element.parentNode?t.element.parentNode.insertBefore(t.calendarContainer,t._input.nextSibling):t.config.appendTo!==void 0&&t.config.appendTo.appendChild(t.calendarContainer)),t.config.static)){var Oe=st("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(Oe,t.element),Oe.appendChild(t.element),t.altInput&&Oe.appendChild(t.altInput),Oe.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function C(V,U,x,oe){var Te=Se(U,!0),Oe=st("span",V,U.getDate().toString());return Oe.dateObj=U,Oe.$i=oe,Oe.setAttribute("aria-label",t.formatDate(U,t.config.ariaDateFormat)),V.indexOf("hidden")===-1&&_n(U,t.now)===0&&(t.todayDateElem=Oe,Oe.classList.add("today"),Oe.setAttribute("aria-current","date")),Te?(Oe.tabIndex=-1,ti(U)&&(Oe.classList.add("selected"),t.selectedDateElem=Oe,t.config.mode==="range"&&(Qt(Oe,"startRange",t.selectedDates[0]&&_n(U,t.selectedDates[0],!0)===0),Qt(Oe,"endRange",t.selectedDates[1]&&_n(U,t.selectedDates[1],!0)===0),V==="nextMonthDay"&&Oe.classList.add("inRange")))):Oe.classList.add("flatpickr-disabled"),t.config.mode==="range"&&rs(U)&&!ti(U)&&Oe.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&V!=="prevMonthDay"&&oe%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend",""+t.config.getWeek(U)+""),Ze("onDayCreate",Oe),Oe}function D(V){V.focus(),t.config.mode==="range"&&Ve(V)}function E(V){for(var U=V>0?0:t.config.showMonths-1,x=V>0?t.config.showMonths:-1,oe=U;oe!=x;oe+=V)for(var Te=t.daysContainer.children[oe],Oe=V>0?0:Te.children.length-1,Ee=V>0?Te.children.length:-1,Ce=Oe;Ce!=Ee;Ce+=V){var Ue=Te.children[Ce];if(Ue.className.indexOf("hidden")===-1&&Se(Ue.dateObj))return Ue}}function P(V,U){for(var x=V.className.indexOf("Month")===-1?V.dateObj.getMonth():t.currentMonth,oe=U>0?t.config.showMonths:-1,Te=U>0?1:-1,Oe=x-t.currentMonth;Oe!=oe;Oe+=Te)for(var Ee=t.daysContainer.children[Oe],Ce=x-t.currentMonth===Oe?V.$i+U:U<0?Ee.children.length-1:0,Ue=Ee.children.length,Le=Ce;Le>=0&&Le0?Ue:-1);Le+=Te){var He=Ee.children[Le];if(He.className.indexOf("hidden")===-1&&Se(He.dateObj)&&Math.abs(V.$i-Le)>=Math.abs(U))return D(He)}t.changeMonth(Te),L(E(Te),0)}function L(V,U){var x=l(),oe=We(x||document.body),Te=V!==void 0?V:oe?x:t.selectedDateElem!==void 0&&We(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&We(t.todayDateElem)?t.todayDateElem:E(U>0?1:-1);Te===void 0?t._input.focus():oe?P(Te,U):D(Te)}function N(V,U){for(var x=(new Date(V,U,1).getDay()-t.l10n.firstDayOfWeek+7)%7,oe=t.utils.getDaysInMonth((U-1+12)%12,V),Te=t.utils.getDaysInMonth(U,V),Oe=window.document.createDocumentFragment(),Ee=t.config.showMonths>1,Ce=Ee?"prevMonthDay hidden":"prevMonthDay",Ue=Ee?"nextMonthDay hidden":"nextMonthDay",Le=oe+1-x,He=0;Le<=oe;Le++,He++)Oe.appendChild(C("flatpickr-day "+Ce,new Date(V,U-1,Le),Le,He));for(Le=1;Le<=Te;Le++,He++)Oe.appendChild(C("flatpickr-day",new Date(V,U,Le),Le,He));for(var pt=Te+1;pt<=42-x&&(t.config.showMonths===1||He%7!==0);pt++,He++)Oe.appendChild(C("flatpickr-day "+Ue,new Date(V,U+1,pt%Te),pt,He));var Yn=st("div","dayContainer");return Yn.appendChild(Oe),Yn}function F(){if(t.daysContainer!==void 0){io(t.daysContainer),t.weekNumbers&&io(t.weekNumbers);for(var V=document.createDocumentFragment(),U=0;U1||t.config.monthSelectorType!=="dropdown")){var V=function(oe){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&oet.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var U=0;U<12;U++)if(V(U)){var x=st("option","flatpickr-monthDropdown-month");x.value=new Date(t.currentYear,U).getMonth().toString(),x.textContent=Lo(U,t.config.shorthandCurrentMonth,t.l10n),x.tabIndex=-1,t.currentMonth===U&&(x.selected=!0),t.monthsDropdownContainer.appendChild(x)}}}function X(){var V=st("div","flatpickr-month"),U=window.document.createDocumentFragment(),x;t.config.showMonths>1||t.config.monthSelectorType==="static"?x=st("span","cur-month"):(t.monthsDropdownContainer=st("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),g(t.monthsDropdownContainer,"change",function(Ee){var Ce=gn(Ee),Ue=parseInt(Ce.value,10);t.changeMonth(Ue-t.currentMonth),Ze("onMonthChange")}),R(),x=t.monthsDropdownContainer);var oe=so("cur-year",{tabindex:"-1"}),Te=oe.getElementsByTagName("input")[0];Te.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&Te.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(Te.setAttribute("max",t.config.maxDate.getFullYear().toString()),Te.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Oe=st("div","flatpickr-current-month");return Oe.appendChild(x),Oe.appendChild(oe),U.appendChild(Oe),V.appendChild(U),{container:V,yearElement:Te,monthElement:x}}function se(){io(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var V=t.config.showMonths;V--;){var U=X();t.yearElements.push(U.yearElement),t.monthElements.push(U.monthElement),t.monthNav.appendChild(U.container)}t.monthNav.appendChild(t.nextMonthNav)}function W(){return t.monthNav=st("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=st("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=st("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,se(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(V){t.__hidePrevMonthArrow!==V&&(Qt(t.prevMonthNav,"flatpickr-disabled",V),t.__hidePrevMonthArrow=V)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(V){t.__hideNextMonthArrow!==V&&(Qt(t.nextMonthNav,"flatpickr-disabled",V),t.__hideNextMonthArrow=V)}}),t.currentYearElement=t.yearElements[0],Li(),t.monthNav}function G(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var V=Mr(t.config);t.timeContainer=st("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var U=st("span","flatpickr-time-separator",":"),x=so("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=x.getElementsByTagName("input")[0];var oe=so("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=oe.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=an(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?V.hours:f(V.hours)),t.minuteElement.value=an(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():V.minutes),t.hourElement.setAttribute("step",t.config.hourIncrement.toString()),t.minuteElement.setAttribute("step",t.config.minuteIncrement.toString()),t.hourElement.setAttribute("min",t.config.time_24hr?"0":"1"),t.hourElement.setAttribute("max",t.config.time_24hr?"23":"12"),t.hourElement.setAttribute("maxlength","2"),t.minuteElement.setAttribute("min","0"),t.minuteElement.setAttribute("max","59"),t.minuteElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(x),t.timeContainer.appendChild(U),t.timeContainer.appendChild(oe),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var Te=so("flatpickr-second");t.secondElement=Te.getElementsByTagName("input")[0],t.secondElement.value=an(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():V.seconds),t.secondElement.setAttribute("step",t.minuteElement.getAttribute("step")),t.secondElement.setAttribute("min","0"),t.secondElement.setAttribute("max","59"),t.secondElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(st("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(Te)}return t.config.time_24hr||(t.amPM=st("span","flatpickr-am-pm",t.l10n.amPM[Cn((t.latestSelectedDateObj?t.hourElement.value:t.config.defaultHour)>11)]),t.amPM.title=t.l10n.toggleTitle,t.amPM.tabIndex=-1,t.timeContainer.appendChild(t.amPM)),t.timeContainer}function te(){t.weekdayContainer?io(t.weekdayContainer):t.weekdayContainer=st("div","flatpickr-weekdays");for(var V=t.config.showMonths;V--;){var U=st("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(U)}return K(),t.weekdayContainer}function K(){if(t.weekdayContainer){var V=t.l10n.firstDayOfWeek,U=Kc(t.l10n.weekdays.shorthand);V>0&&V + `+U.join("")+` + + `}}function re(){t.calendarContainer.classList.add("hasWeeks");var V=st("div","flatpickr-weekwrapper");V.appendChild(st("span","flatpickr-weekday",t.l10n.weekAbbreviation));var U=st("div","flatpickr-weeks");return V.appendChild(U),{weekWrapper:V,weekNumbers:U}}function J(V,U){U===void 0&&(U=!0);var x=U?V:V-t.currentMonth;x<0&&t._hidePrevMonthArrow===!0||x>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=x,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Ze("onYearChange"),R()),F(),Ze("onMonthChange"),Li())}function de(V,U){if(V===void 0&&(V=!0),U===void 0&&(U=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,U===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var x=Mr(t.config),oe=x.hours,Te=x.minutes,Oe=x.seconds;m(oe,Te,Oe)}t.redraw(),V&&Ze("onChange")}function _e(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Ze("onClose")}function $e(){t.config!==void 0&&Ze("onDestroy");for(var V=t._handlers.length;V--;)t._handlers[V].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var U=t.calendarContainer.parentNode;if(U.lastChild&&U.removeChild(U.lastChild),U.parentNode){for(;U.firstChild;)U.parentNode.insertBefore(U.firstChild,U);U.parentNode.removeChild(U)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(x){try{delete t[x]}catch{}})}function Ne(V){return t.calendarContainer.contains(V)}function Re(V){if(t.isOpen&&!t.config.inline){var U=gn(V),x=Ne(U),oe=U===t.input||U===t.altInput||t.element.contains(U)||V.path&&V.path.indexOf&&(~V.path.indexOf(t.input)||~V.path.indexOf(t.altInput)),Te=!oe&&!x&&!Ne(V.relatedTarget),Oe=!t.config.ignoredFocusElements.some(function(Ee){return Ee.contains(U)});Te&&Oe&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&a(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function be(V){if(!(!V||t.config.minDate&&Vt.config.maxDate.getFullYear())){var U=V,x=t.currentYear!==U;t.currentYear=U||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),x&&(t.redraw(),Ze("onYearChange"),R())}}function Se(V,U){var x;U===void 0&&(U=!0);var oe=t.parseDate(V,void 0,U);if(t.config.minDate&&oe&&_n(oe,t.config.minDate,U!==void 0?U:!t.minDateHasTime)<0||t.config.maxDate&&oe&&_n(oe,t.config.maxDate,U!==void 0?U:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(oe===void 0)return!1;for(var Te=!!t.config.enable,Oe=(x=t.config.enable)!==null&&x!==void 0?x:t.config.disable,Ee=0,Ce=void 0;Ee=Ce.from.getTime()&&oe.getTime()<=Ce.to.getTime())return Te}return!Te}function We(V){return t.daysContainer!==void 0?V.className.indexOf("hidden")===-1&&V.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(V):!1}function lt(V){var U=V.target===t._input,x=t._input.value.trimEnd()!==Ni();U&&x&&!(V.relatedTarget&&Ne(V.relatedTarget))&&t.setDate(t._input.value,!0,V.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function fe(V){var U=gn(V),x=t.config.wrap?n.contains(U):U===t._input,oe=t.config.allowInput,Te=t.isOpen&&(!oe||!x),Oe=t.config.inline&&x&&!oe;if(V.keyCode===13&&x){if(oe)return t.setDate(t._input.value,!0,U===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),U.blur();t.open()}else if(Ne(U)||Te||Oe){var Ee=!!t.timeContainer&&t.timeContainer.contains(U);switch(V.keyCode){case 13:Ee?(V.preventDefault(),a(),Gt()):di(V);break;case 27:V.preventDefault(),Gt();break;case 8:case 46:x&&!t.config.allowInput&&(V.preventDefault(),t.clear());break;case 37:case 39:if(!Ee&&!x){V.preventDefault();var Ce=l();if(t.daysContainer!==void 0&&(oe===!1||Ce&&We(Ce))){var Ue=V.keyCode===39?1:-1;V.ctrlKey?(V.stopPropagation(),J(Ue),L(E(1),0)):L(void 0,Ue)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:V.preventDefault();var Le=V.keyCode===40?1:-1;t.daysContainer&&U.$i!==void 0||U===t.input||U===t.altInput?V.ctrlKey?(V.stopPropagation(),be(t.currentYear-Le),L(E(1),0)):Ee||L(void 0,Le*7):U===t.currentYearElement?be(t.currentYear-Le):t.config.enableTime&&(!Ee&&t.hourElement&&t.hourElement.focus(),a(V),t._debouncedChange());break;case 9:if(Ee){var He=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(hn){return hn}),pt=He.indexOf(U);if(pt!==-1){var Yn=He[pt+(V.shiftKey?-1:1)];V.preventDefault(),(Yn||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(U)&&V.shiftKey&&(V.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&U===t.amPM)switch(V.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],c(),Vt();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],c(),Vt();break}(x||Ne(U))&&Ze("onKeyDown",V)}function Ve(V,U){if(U===void 0&&(U="flatpickr-day"),!(t.selectedDates.length!==1||V&&(!V.classList.contains(U)||V.classList.contains("flatpickr-disabled")))){for(var x=V?V.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),oe=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Te=Math.min(x,t.selectedDates[0].getTime()),Oe=Math.max(x,t.selectedDates[0].getTime()),Ee=!1,Ce=0,Ue=0,Le=Te;LeTe&&LeCe)?Ce=Le:Le>oe&&(!Ue||Le ."+U));He.forEach(function(pt){var Yn=pt.dateObj,hn=Yn.getTime(),Fs=Ce>0&&hn0&&hn>Ue;if(Fs){pt.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(as){pt.classList.remove(as)});return}else if(Ee&&!Fs)return;["startRange","inRange","endRange","notAllowed"].forEach(function(as){pt.classList.remove(as)}),V!==void 0&&(V.classList.add(x<=t.selectedDates[0].getTime()?"startRange":"endRange"),oex&&hn===oe&&pt.classList.add("endRange"),hn>=Ce&&(Ue===0||hn<=Ue)&&TT(hn,oe,x)&&pt.classList.add("inRange"))})}}function ee(){t.isOpen&&!t.config.static&&!t.config.inline&&we()}function Fe(V,U){if(U===void 0&&(U=t._positionElement),t.isMobile===!0){if(V){V.preventDefault();var x=gn(V);x&&x.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),Ze("onOpen");return}else if(t._input.disabled||t.config.inline)return;var oe=t.isOpen;t.isOpen=!0,oe||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),Ze("onOpen"),we(U)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(V===void 0||!t.timeContainer.contains(V.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function ot(V){return function(U){var x=t.config["_"+V+"Date"]=t.parseDate(U,t.config.dateFormat),oe=t.config["_"+(V==="min"?"max":"min")+"Date"];x!==void 0&&(t[V==="min"?"minDateHasTime":"maxDateHasTime"]=x.getHours()>0||x.getMinutes()>0||x.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Te){return Se(Te)}),!t.selectedDates.length&&V==="min"&&d(x),Vt()),t.daysContainer&&(bt(),x!==void 0?t.currentYearElement[V]=x.getFullYear().toString():t.currentYearElement.removeAttribute(V),t.currentYearElement.disabled=!!oe&&x!==void 0&&oe.getFullYear()===x.getFullYear())}}function Ht(){var V=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],U=Ut(Ut({},JSON.parse(JSON.stringify(n.dataset||{}))),e),x={};t.config.parseDate=U.parseDate,t.config.formatDate=U.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(He){t.config._enable=pi(He)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(He){t.config._disable=pi(He)}});var oe=U.mode==="time";if(!U.dateFormat&&(U.enableTime||oe)){var Te=Ot.defaultConfig.dateFormat||ks.dateFormat;x.dateFormat=U.noCalendar||oe?"H:i"+(U.enableSeconds?":S":""):Te+" H:i"+(U.enableSeconds?":S":"")}if(U.altInput&&(U.enableTime||oe)&&!U.altFormat){var Oe=Ot.defaultConfig.altFormat||ks.altFormat;x.altFormat=U.noCalendar||oe?"h:i"+(U.enableSeconds?":S K":" K"):Oe+(" h:i"+(U.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:ot("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:ot("max")});var Ee=function(He){return function(pt){t.config[He==="min"?"_minTime":"_maxTime"]=t.parseDate(pt,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:Ee("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:Ee("max")}),U.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,x,U);for(var Ce=0;Ce-1?t.config[Le]=Tr(Ue[Le]).map(o).concat(t.config[Le]):typeof U[Le]>"u"&&(t.config[Le]=Ue[Le])}U.altInputClass||(t.config.altInputClass=Ae().className+" "+t.config.altInputClass),Ze("onParseConfig")}function Ae(){return t.config.wrap?n.querySelector("[data-input]"):n}function ne(){typeof t.config.locale!="object"&&typeof Ot.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=Ut(Ut({},Ot.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?Ot.l10ns[t.config.locale]:void 0),Wi.D="("+t.l10n.weekdays.shorthand.join("|")+")",Wi.l="("+t.l10n.weekdays.longhand.join("|")+")",Wi.M="("+t.l10n.months.shorthand.join("|")+")",Wi.F="("+t.l10n.months.longhand.join("|")+")",Wi.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var V=Ut(Ut({},e),JSON.parse(JSON.stringify(n.dataset||{})));V.time_24hr===void 0&&Ot.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=Db(t),t.parseDate=ua({config:t.config,l10n:t.l10n})}function we(V){if(typeof t.config.position=="function")return void t.config.position(t,V);if(t.calendarContainer!==void 0){Ze("onPreCalendarPosition");var U=V||t._positionElement,x=Array.prototype.reduce.call(t.calendarContainer.children,function(Hb,Vb){return Hb+Vb.offsetHeight},0),oe=t.calendarContainer.offsetWidth,Te=t.config.position.split(" "),Oe=Te[0],Ee=Te.length>1?Te[1]:null,Ce=U.getBoundingClientRect(),Ue=window.innerHeight-Ce.bottom,Le=Oe==="above"||Oe!=="below"&&Uex,He=window.pageYOffset+Ce.top+(Le?-x-2:U.offsetHeight+2);if(Qt(t.calendarContainer,"arrowTop",!Le),Qt(t.calendarContainer,"arrowBottom",Le),!t.config.inline){var pt=window.pageXOffset+Ce.left,Yn=!1,hn=!1;Ee==="center"?(pt-=(oe-Ce.width)/2,Yn=!0):Ee==="right"&&(pt-=oe-Ce.width,hn=!0),Qt(t.calendarContainer,"arrowLeft",!Yn&&!hn),Qt(t.calendarContainer,"arrowCenter",Yn),Qt(t.calendarContainer,"arrowRight",hn);var Fs=window.document.body.offsetWidth-(window.pageXOffset+Ce.right),as=pt+oe>window.document.body.offsetWidth,Pb=Fs+oe>window.document.body.offsetWidth;if(Qt(t.calendarContainer,"rightMost",as),!t.config.static)if(t.calendarContainer.style.top=He+"px",!as)t.calendarContainer.style.left=pt+"px",t.calendarContainer.style.right="auto";else if(!Pb)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=Fs+"px";else{var Qo=nt();if(Qo===void 0)return;var Lb=window.document.body.offsetWidth,Nb=Math.max(0,Lb/2-oe/2),Fb=".flatpickr-calendar.centerMost:before",Rb=".flatpickr-calendar.centerMost:after",qb=Qo.cssRules.length,jb="{left:"+Ce.left+"px;right:auto;}";Qt(t.calendarContainer,"rightMost",!1),Qt(t.calendarContainer,"centerMost",!0),Qo.insertRule(Fb+","+Rb+jb,qb),t.calendarContainer.style.left=Nb+"px",t.calendarContainer.style.right="auto"}}}}function nt(){for(var V=null,U=0;Ut.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=oe,t.config.mode==="single")t.selectedDates=[Te];else if(t.config.mode==="multiple"){var Ee=ti(Te);Ee?t.selectedDates.splice(parseInt(Ee),1):t.selectedDates.push(Te)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Te,t.selectedDates.push(Te),_n(Te,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(He,pt){return He.getTime()-pt.getTime()}));if(c(),Oe){var Ce=t.currentYear!==Te.getFullYear();t.currentYear=Te.getFullYear(),t.currentMonth=Te.getMonth(),Ce&&(Ze("onYearChange"),R()),Ze("onMonthChange")}if(Li(),F(),Vt(),!Oe&&t.config.mode!=="range"&&t.config.showMonths===1?D(oe):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var Ue=t.config.mode==="single"&&!t.config.enableTime,Le=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(Ue||Le)&&Gt()}b()}}var ft={locale:[ne,K],showMonths:[se,r,te],minDate:[y],maxDate:[y],positionElement:[Pi],clickOpens:[function(){t.config.clickOpens===!0?(g(t._input,"focus",t.open),g(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function Wn(V,U){if(V!==null&&typeof V=="object"){Object.assign(t.config,V);for(var x in V)ft[x]!==void 0&&ft[x].forEach(function(oe){return oe()})}else t.config[V]=U,ft[V]!==void 0?ft[V].forEach(function(oe){return oe()}):Sr.indexOf(V)>-1&&(t.config[V]=Tr(U));t.redraw(),Vt(!0)}function is(V,U){var x=[];if(V instanceof Array)x=V.map(function(oe){return t.parseDate(oe,U)});else if(V instanceof Date||typeof V=="number")x=[t.parseDate(V,U)];else if(typeof V=="string")switch(t.config.mode){case"single":case"time":x=[t.parseDate(V,U)];break;case"multiple":x=V.split(t.config.conjunction).map(function(oe){return t.parseDate(oe,U)});break;case"range":x=V.split(t.l10n.rangeSeparator).map(function(oe){return t.parseDate(oe,U)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(V)));t.selectedDates=t.config.allowInvalidPreload?x:x.filter(function(oe){return oe instanceof Date&&Se(oe,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(oe,Te){return oe.getTime()-Te.getTime()})}function Ll(V,U,x){if(U===void 0&&(U=!1),x===void 0&&(x=t.config.dateFormat),V!==0&&!V||V instanceof Array&&V.length===0)return t.clear(U);is(V,x),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),y(void 0,U),d(),t.selectedDates.length===0&&t.clear(!1),Vt(U),U&&Ze("onChange")}function pi(V){return V.slice().map(function(U){return typeof U=="string"||typeof U=="number"||U instanceof Date?t.parseDate(U,void 0,!0):U&&typeof U=="object"&&U.from&&U.to?{from:t.parseDate(U.from,void 0),to:t.parseDate(U.to,void 0)}:U}).filter(function(U){return U})}function ss(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var V=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);V&&is(V,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function Nl(){if(t.input=Ae(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=st(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),Pi()}function Pi(){t._positionElement=t.config.positionElement||t._input}function ls(){var V=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=st("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=V,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=V==="datetime-local"?"Y-m-d\\TH:i:S":V==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}g(t.mobileInput,"change",function(U){t.setDate(gn(U).value,!1,t.mobileFormatStr),Ze("onChange"),Ze("onClose")})}function rn(V){if(t.isOpen===!0)return t.close();t.open(V)}function Ze(V,U){if(t.config!==void 0){var x=t.config[V];if(x!==void 0&&x.length>0)for(var oe=0;x[oe]&&oe=0&&_n(V,t.selectedDates[1])<=0}function Li(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(V,U){var x=new Date(t.currentYear,t.currentMonth,1);x.setMonth(t.currentMonth+U),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[U].textContent=Lo(x.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=x.getMonth().toString(),V.value=x.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYeart.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function Ni(V){var U=V||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(x){return t.formatDate(x,U)}).filter(function(x,oe,Te){return t.config.mode!=="range"||t.config.enableTime||Te.indexOf(x)===oe}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function Vt(V){V===void 0&&(V=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=Ni(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Ni(t.config.altFormat)),V!==!1&&Ze("onValueUpdate")}function Xt(V){var U=gn(V),x=t.prevMonthNav.contains(U),oe=t.nextMonthNav.contains(U);x||oe?J(x?-1:1):t.yearElements.indexOf(U)>=0?U.select():U.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):U.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Fl(V){V.preventDefault();var U=V.type==="keydown",x=gn(V),oe=x;t.amPM!==void 0&&x===t.amPM&&(t.amPM.textContent=t.l10n.amPM[Cn(t.amPM.textContent===t.l10n.amPM[0])]);var Te=parseFloat(oe.getAttribute("min")),Oe=parseFloat(oe.getAttribute("max")),Ee=parseFloat(oe.getAttribute("step")),Ce=parseInt(oe.value,10),Ue=V.delta||(U?V.which===38?1:-1:0),Le=Ce+Ee*Ue;if(typeof oe.value<"u"&&oe.value.length===2){var He=oe===t.hourElement,pt=oe===t.minuteElement;LeOe&&(Le=oe===t.hourElement?Le-Oe-Cn(!t.amPM):Te,pt&&$(void 0,1,t.hourElement)),t.amPM&&He&&(Ee===1?Le+Ce===23:Math.abs(Le-Ce)>Ee)&&(t.amPM.textContent=t.l10n.amPM[Cn(t.amPM.textContent===t.l10n.amPM[0])]),oe.value=an(Le)}}return s(),t}function ws(n,e){for(var t=Array.prototype.slice.call(n).filter(function(o){return o instanceof HTMLElement}),i=[],s=0;st===e[i]))}function IT(n,e,t){const i=["value","formattedValue","element","dateFormat","options","input","flatpickr"];let s=Et(e,i),{$$slots:l={},$$scope:o}=e;const r=new Set(["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"]);let{value:a=void 0,formattedValue:u="",element:f=void 0,dateFormat:c=void 0}=e,{options:d={}}=e,m=!1,{input:h=void 0,flatpickr:g=void 0}=e;Zt(()=>{const $=f??h,M=k(d);return M.onReady.push((C,D,E)=>{a===void 0&&y(C,D,E),sn().then(()=>{t(8,m=!0)})}),t(3,g=Ot($,Object.assign(M,f?{wrap:!0}:{}))),()=>{g.destroy()}});const b=Ct();function k($={}){$=Object.assign({},$);for(const M of r){const C=(D,E,P)=>{b(AT(M),[D,E,P])};M in $?(Array.isArray($[M])||($[M]=[$[M]]),$[M].push(C)):$[M]=[C]}return $.onChange&&!$.onChange.includes(y)&&$.onChange.push(y),$}function y($,M,C){const D=Jc(C,$);!Zc(a,D)&&(a||D)&&t(2,a=D),t(4,u=M)}function T($){ie[$?"unshift":"push"](()=>{h=$,t(0,h)})}return n.$$set=$=>{e=Je(Je({},e),Qn($)),t(1,s=Et(e,i)),"value"in $&&t(2,a=$.value),"formattedValue"in $&&t(4,u=$.formattedValue),"element"in $&&t(5,f=$.element),"dateFormat"in $&&t(6,c=$.dateFormat),"options"in $&&t(7,d=$.options),"input"in $&&t(0,h=$.input),"flatpickr"in $&&t(3,g=$.flatpickr),"$$scope"in $&&t(9,o=$.$$scope)},n.$$.update=()=>{if(n.$$.dirty&332&&g&&m&&(Zc(a,Jc(g,g.selectedDates))||g.setDate(a,!0,c)),n.$$.dirty&392&&g&&m)for(const[$,M]of Object.entries(k(d)))g.set($,M)},[h,s,a,g,u,f,c,d,m,o,l,T]}class eu extends ye{constructor(e){super(),ve(this,e,IT,ET,he,{value:2,formattedValue:4,element:5,dateFormat:6,options:7,input:0,flatpickr:3})}}function PT(n){let e,t,i,s,l,o,r;function a(f){n[2](f)}let u={id:n[4],options:z.defaultFlatpickrOptions(),value:n[0].min};return n[0].min!==void 0&&(u.formattedValue=n[0].min),l=new eu({props:u}),ie.push(()=>ge(l,"formattedValue",a)),{c(){e=v("label"),t=B("Min date (UTC)"),s=O(),H(l.$$.fragment),p(e,"for",i=n[4])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),q(l,f,c),r=!0},p(f,c){(!r||c&16&&i!==(i=f[4]))&&p(e,"for",i);const d={};c&16&&(d.id=f[4]),c&1&&(d.value=f[0].min),!o&&c&1&&(o=!0,d.formattedValue=f[0].min,ke(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),j(l,f)}}}function LT(n){let e,t,i,s,l,o,r;function a(f){n[3](f)}let u={id:n[4],options:z.defaultFlatpickrOptions(),value:n[0].max};return n[0].max!==void 0&&(u.formattedValue=n[0].max),l=new eu({props:u}),ie.push(()=>ge(l,"formattedValue",a)),{c(){e=v("label"),t=B("Max date (UTC)"),s=O(),H(l.$$.fragment),p(e,"for",i=n[4])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),q(l,f,c),r=!0},p(f,c){(!r||c&16&&i!==(i=f[4]))&&p(e,"for",i);const d={};c&16&&(d.id=f[4]),c&1&&(d.value=f[0].max),!o&&c&1&&(o=!0,d.formattedValue=f[0].max,ke(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),j(l,f)}}}function NT(n){let e,t,i,s,l,o,r;return i=new me({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[PT,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new me({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[LT,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=O(),l=v("div"),H(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),q(i,t,null),_(e,s),_(e,l),q(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){I(i.$$.fragment,a),I(o.$$.fragment,a),r=!1},d(a){a&&w(e),j(i),j(o)}}}function FT(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.min,r)&&(s.min=r,t(0,s))}function o(r){n.$$.not_equal(s.max,r)&&(s.max=r,t(0,s))}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class RT extends ye{constructor(e){super(),ve(this,e,FT,NT,he,{key:1,options:0})}}function qT(n){let e,t,i,s,l,o,r,a,u;function f(d){n[2](d)}let c={id:n[4],placeholder:"eg. optionA, optionB",required:!0};return n[0].values!==void 0&&(c.value=n[0].values),l=new Ns({props:c}),ie.push(()=>ge(l,"value",f)),{c(){e=v("label"),t=B("Choices"),s=O(),H(l.$$.fragment),r=O(),a=v("div"),a.textContent="Use comma as separator.",p(e,"for",i=n[4]),p(a,"class","help-block")},m(d,m){S(d,e,m),_(e,t),S(d,s,m),q(l,d,m),S(d,r,m),S(d,a,m),u=!0},p(d,m){(!u||m&16&&i!==(i=d[4]))&&p(e,"for",i);const h={};m&16&&(h.id=d[4]),!o&&m&1&&(o=!0,h.value=d[0].values,ke(()=>o=!1)),l.$set(h)},i(d){u||(A(l.$$.fragment,d),u=!0)},o(d){I(l.$$.fragment,d),u=!1},d(d){d&&w(e),d&&w(s),j(l,d),d&&w(r),d&&w(a)}}}function jT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Max select"),s=O(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4]),p(l,"step","1"),p(l,"min","1"),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].maxSelect),r||(a=Y(l,"input",n[3]),r=!0)},p(u,f){f&16&&i!==(i=u[4])&&p(e,"for",i),f&16&&o!==(o=u[4])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].maxSelect&&ce(l,u[0].maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function HT(n){let e,t,i,s,l,o,r;return i=new me({props:{class:"form-field required",name:"schema."+n[1]+".options.values",$$slots:{default:[qT,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new me({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[jT,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=O(),l=v("div"),H(o.$$.fragment),p(t,"class","col-sm-9"),p(l,"class","col-sm-3"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),q(i,t,null),_(e,s),_(e,l),q(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.values"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.maxSelect"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){I(i.$$.fragment,a),I(o.$$.fragment,a),r=!1},d(a){a&&w(e),j(i),j(o)}}}function VT(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.values,r)&&(s.values=r,t(0,s))}function o(){s.maxSelect=ht(this.value),t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},n.$$.update=()=>{n.$$.dirty&1&&z.isEmpty(s)&&t(0,s={maxSelect:1,values:[]})},[s,i,l,o]}class zT extends ye{constructor(e){super(),ve(this,e,VT,HT,he,{key:1,options:0})}}function BT(n){let e;return{c(){e=v("i"),p(e,"class","ri-arrow-down-s-line txt-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function UT(n){let e;return{c(){e=v("i"),p(e,"class","ri-arrow-up-s-line txt-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Gc(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,k,y,T,$,M,C,D='"{"a":1,"b":2}"',E,P,L,N,F,R,X,se,W,G,te,K,re;return{c(){e=v("div"),t=v("div"),i=v("div"),s=B("In order to support seamlessly both "),l=v("code"),l.textContent="application/json",o=B(` and + `),r=v("code"),r.textContent="multipart/form-data",a=B(` + requests, the following normalization rules are applied if the `),u=v("code"),u.textContent="json",f=B(` field is a + `),c=v("strong"),c.textContent="plain string",d=B(`: + `),m=v("ul"),h=v("li"),h.innerHTML=""true" is converted to the json true",g=O(),b=v("li"),b.innerHTML=""false" is converted to the json false",k=O(),y=v("li"),y.innerHTML=""null" is converted to the json null",T=O(),$=v("li"),$.innerHTML=""[1,2,3]" is converted to the json [1,2,3]",M=O(),C=v("li"),E=B(D),P=B(" is converted to the json "),L=v("code"),L.textContent='{"a":1,"b":2}',N=O(),F=v("li"),F.textContent="numeric strings are converted to json number",R=O(),X=v("li"),X.textContent="double quoted strings are left as they are (aka. without normalizations)",se=O(),W=v("li"),W.textContent="any other string (empty string too) is double quoted",G=B(` + Alternatively, if you want to avoid the string value normalizations, you can wrap your data inside + an object, eg.`),te=v("code"),te.textContent='{"data": anything}',p(i,"class","content"),p(t,"class","alert alert-warning m-b-0 m-t-10"),p(e,"class","block")},m(J,de){S(J,e,de),_(e,t),_(t,i),_(i,s),_(i,l),_(i,o),_(i,r),_(i,a),_(i,u),_(i,f),_(i,c),_(i,d),_(i,m),_(m,h),_(m,g),_(m,b),_(m,k),_(m,y),_(m,T),_(m,$),_(m,M),_(m,C),_(C,E),_(C,P),_(C,L),_(m,N),_(m,F),_(m,R),_(m,X),_(m,se),_(m,W),_(i,G),_(i,te),re=!0},i(J){re||(J&&xe(()=>{K||(K=je(e,At,{duration:150},!0)),K.run(1)}),re=!0)},o(J){J&&(K||(K=je(e,At,{duration:150},!1)),K.run(0)),re=!1},d(J){J&&w(e),J&&K&&K.end()}}}function WT(n){let e,t,i,s,l,o,r;function a(d,m){return d[0]?UT:BT}let u=a(n),f=u(n),c=n[0]&&Gc();return{c(){e=v("button"),t=v("strong"),t.textContent="String value normalizations",i=O(),f.c(),s=O(),c&&c.c(),l=Me(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","inline-flex txt-sm flex-gap-5 link-hint")},m(d,m){S(d,e,m),_(e,t),_(e,i),f.m(e,null),S(d,s,m),c&&c.m(d,m),S(d,l,m),o||(r=Y(e,"click",n[3]),o=!0)},p(d,[m]){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(e,null))),d[0]?c?m&1&&A(c,1):(c=Gc(),c.c(),A(c,1),c.m(l.parentNode,l)):c&&(ae(),I(c,1,1,()=>{c=null}),ue())},i(d){A(c)},o(d){I(c)},d(d){d&&w(e),f.d(),d&&w(s),c&&c.d(d),d&&w(l),o=!1,r()}}}function YT(n,e,t){const i="",s={};let l=!1;return[l,i,s,()=>{t(0,l=!l)}]}class KT extends ye{constructor(e){super(),ve(this,e,YT,WT,he,{key:1,options:2})}get key(){return this.$$.ctx[1]}get options(){return this.$$.ctx[2]}}function JT(n){let e,t=(n[0].ext||"N/A")+"",i,s,l,o=n[0].mimeType+"",r;return{c(){e=v("span"),i=B(t),s=O(),l=v("small"),r=B(o),p(e,"class","txt"),p(l,"class","txt-hint")},m(a,u){S(a,e,u),_(e,i),S(a,s,u),S(a,l,u),_(l,r)},p(a,[u]){u&1&&t!==(t=(a[0].ext||"N/A")+"")&&le(i,t),u&1&&o!==(o=a[0].mimeType+"")&&le(r,o)},i:Z,o:Z,d(a){a&&w(e),a&&w(s),a&&w(l)}}}function ZT(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class Xc extends ye{constructor(e){super(),ve(this,e,ZT,JT,he,{item:0})}}const GT=[{ext:".xpm",mimeType:"image/x-xpixmap"},{ext:".7z",mimeType:"application/x-7z-compressed"},{ext:".zip",mimeType:"application/zip"},{ext:".xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{ext:".docx",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{ext:".pptx",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{ext:".epub",mimeType:"application/epub+zip"},{ext:".jar",mimeType:"application/jar"},{ext:".odt",mimeType:"application/vnd.oasis.opendocument.text"},{ext:".ott",mimeType:"application/vnd.oasis.opendocument.text-template"},{ext:".ods",mimeType:"application/vnd.oasis.opendocument.spreadsheet"},{ext:".ots",mimeType:"application/vnd.oasis.opendocument.spreadsheet-template"},{ext:".odp",mimeType:"application/vnd.oasis.opendocument.presentation"},{ext:".otp",mimeType:"application/vnd.oasis.opendocument.presentation-template"},{ext:".odg",mimeType:"application/vnd.oasis.opendocument.graphics"},{ext:".otg",mimeType:"application/vnd.oasis.opendocument.graphics-template"},{ext:".odf",mimeType:"application/vnd.oasis.opendocument.formula"},{ext:".odc",mimeType:"application/vnd.oasis.opendocument.chart"},{ext:".sxc",mimeType:"application/vnd.sun.xml.calc"},{ext:".pdf",mimeType:"application/pdf"},{ext:".fdf",mimeType:"application/vnd.fdf"},{ext:"",mimeType:"application/x-ole-storage"},{ext:".msi",mimeType:"application/x-ms-installer"},{ext:".aaf",mimeType:"application/octet-stream"},{ext:".msg",mimeType:"application/vnd.ms-outlook"},{ext:".xls",mimeType:"application/vnd.ms-excel"},{ext:".pub",mimeType:"application/vnd.ms-publisher"},{ext:".ppt",mimeType:"application/vnd.ms-powerpoint"},{ext:".doc",mimeType:"application/msword"},{ext:".ps",mimeType:"application/postscript"},{ext:".psd",mimeType:"image/vnd.adobe.photoshop"},{ext:".p7s",mimeType:"application/pkcs7-signature"},{ext:".ogg",mimeType:"application/ogg"},{ext:".oga",mimeType:"audio/ogg"},{ext:".ogv",mimeType:"video/ogg"},{ext:".png",mimeType:"image/png"},{ext:".png",mimeType:"image/vnd.mozilla.apng"},{ext:".jpg",mimeType:"image/jpeg"},{ext:".jxl",mimeType:"image/jxl"},{ext:".jp2",mimeType:"image/jp2"},{ext:".jpf",mimeType:"image/jpx"},{ext:".jpm",mimeType:"image/jpm"},{ext:".jxs",mimeType:"image/jxs"},{ext:".gif",mimeType:"image/gif"},{ext:".webp",mimeType:"image/webp"},{ext:".exe",mimeType:"application/vnd.microsoft.portable-executable"},{ext:"",mimeType:"application/x-elf"},{ext:"",mimeType:"application/x-object"},{ext:"",mimeType:"application/x-executable"},{ext:".so",mimeType:"application/x-sharedlib"},{ext:"",mimeType:"application/x-coredump"},{ext:".a",mimeType:"application/x-archive"},{ext:".deb",mimeType:"application/vnd.debian.binary-package"},{ext:".tar",mimeType:"application/x-tar"},{ext:".xar",mimeType:"application/x-xar"},{ext:".bz2",mimeType:"application/x-bzip2"},{ext:".fits",mimeType:"application/fits"},{ext:".tiff",mimeType:"image/tiff"},{ext:".bmp",mimeType:"image/bmp"},{ext:".ico",mimeType:"image/x-icon"},{ext:".mp3",mimeType:"audio/mpeg"},{ext:".flac",mimeType:"audio/flac"},{ext:".midi",mimeType:"audio/midi"},{ext:".ape",mimeType:"audio/ape"},{ext:".mpc",mimeType:"audio/musepack"},{ext:".amr",mimeType:"audio/amr"},{ext:".wav",mimeType:"audio/wav"},{ext:".aiff",mimeType:"audio/aiff"},{ext:".au",mimeType:"audio/basic"},{ext:".mpeg",mimeType:"video/mpeg"},{ext:".mov",mimeType:"video/quicktime"},{ext:".mqv",mimeType:"video/quicktime"},{ext:".mp4",mimeType:"video/mp4"},{ext:".webm",mimeType:"video/webm"},{ext:".3gp",mimeType:"video/3gpp"},{ext:".3g2",mimeType:"video/3gpp2"},{ext:".avi",mimeType:"video/x-msvideo"},{ext:".flv",mimeType:"video/x-flv"},{ext:".mkv",mimeType:"video/x-matroska"},{ext:".asf",mimeType:"video/x-ms-asf"},{ext:".aac",mimeType:"audio/aac"},{ext:".voc",mimeType:"audio/x-unknown"},{ext:".mp4",mimeType:"audio/mp4"},{ext:".m4a",mimeType:"audio/x-m4a"},{ext:".m3u",mimeType:"application/vnd.apple.mpegurl"},{ext:".m4v",mimeType:"video/x-m4v"},{ext:".rmvb",mimeType:"application/vnd.rn-realmedia-vbr"},{ext:".gz",mimeType:"application/gzip"},{ext:".class",mimeType:"application/x-java-applet"},{ext:".swf",mimeType:"application/x-shockwave-flash"},{ext:".crx",mimeType:"application/x-chrome-extension"},{ext:".ttf",mimeType:"font/ttf"},{ext:".woff",mimeType:"font/woff"},{ext:".woff2",mimeType:"font/woff2"},{ext:".otf",mimeType:"font/otf"},{ext:".ttc",mimeType:"font/collection"},{ext:".eot",mimeType:"application/vnd.ms-fontobject"},{ext:".wasm",mimeType:"application/wasm"},{ext:".shx",mimeType:"application/vnd.shx"},{ext:".shp",mimeType:"application/vnd.shp"},{ext:".dbf",mimeType:"application/x-dbf"},{ext:".dcm",mimeType:"application/dicom"},{ext:".rar",mimeType:"application/x-rar-compressed"},{ext:".djvu",mimeType:"image/vnd.djvu"},{ext:".mobi",mimeType:"application/x-mobipocket-ebook"},{ext:".lit",mimeType:"application/x-ms-reader"},{ext:".bpg",mimeType:"image/bpg"},{ext:".sqlite",mimeType:"application/vnd.sqlite3"},{ext:".dwg",mimeType:"image/vnd.dwg"},{ext:".nes",mimeType:"application/vnd.nintendo.snes.rom"},{ext:".lnk",mimeType:"application/x-ms-shortcut"},{ext:".macho",mimeType:"application/x-mach-binary"},{ext:".qcp",mimeType:"audio/qcelp"},{ext:".icns",mimeType:"image/x-icns"},{ext:".heic",mimeType:"image/heic"},{ext:".heic",mimeType:"image/heic-sequence"},{ext:".heif",mimeType:"image/heif"},{ext:".heif",mimeType:"image/heif-sequence"},{ext:".hdr",mimeType:"image/vnd.radiance"},{ext:".mrc",mimeType:"application/marc"},{ext:".mdb",mimeType:"application/x-msaccess"},{ext:".accdb",mimeType:"application/x-msaccess"},{ext:".zst",mimeType:"application/zstd"},{ext:".cab",mimeType:"application/vnd.ms-cab-compressed"},{ext:".rpm",mimeType:"application/x-rpm"},{ext:".xz",mimeType:"application/x-xz"},{ext:".lz",mimeType:"application/lzip"},{ext:".torrent",mimeType:"application/x-bittorrent"},{ext:".cpio",mimeType:"application/x-cpio"},{ext:"",mimeType:"application/tzif"},{ext:".xcf",mimeType:"image/x-xcf"},{ext:".pat",mimeType:"image/x-gimp-pat"},{ext:".gbr",mimeType:"image/x-gimp-gbr"},{ext:".glb",mimeType:"model/gltf-binary"},{ext:".avif",mimeType:"image/avif"},{ext:".cab",mimeType:"application/x-installshield"},{ext:".jxr",mimeType:"image/jxr"},{ext:".txt",mimeType:"text/plain"},{ext:".html",mimeType:"text/html"},{ext:".svg",mimeType:"image/svg+xml"},{ext:".xml",mimeType:"text/xml"},{ext:".rss",mimeType:"application/rss+xml"},{ext:".atom",mimeType:"applicatiotom+xml"},{ext:".x3d",mimeType:"model/x3d+xml"},{ext:".kml",mimeType:"application/vnd.google-earth.kml+xml"},{ext:".xlf",mimeType:"application/x-xliff+xml"},{ext:".dae",mimeType:"model/vnd.collada+xml"},{ext:".gml",mimeType:"application/gml+xml"},{ext:".gpx",mimeType:"application/gpx+xml"},{ext:".tcx",mimeType:"application/vnd.garmin.tcx+xml"},{ext:".amf",mimeType:"application/x-amf"},{ext:".3mf",mimeType:"application/vnd.ms-package.3dmanufacturing-3dmodel+xml"},{ext:".xfdf",mimeType:"application/vnd.adobe.xfdf"},{ext:".owl",mimeType:"application/owl+xml"},{ext:".php",mimeType:"text/x-php"},{ext:".js",mimeType:"application/javascript"},{ext:".lua",mimeType:"text/x-lua"},{ext:".pl",mimeType:"text/x-perl"},{ext:".py",mimeType:"text/x-python"},{ext:".json",mimeType:"application/json"},{ext:".geojson",mimeType:"application/geo+json"},{ext:".har",mimeType:"application/json"},{ext:".ndjson",mimeType:"application/x-ndjson"},{ext:".rtf",mimeType:"text/rtf"},{ext:".srt",mimeType:"application/x-subrip"},{ext:".tcl",mimeType:"text/x-tcl"},{ext:".csv",mimeType:"text/csv"},{ext:".tsv",mimeType:"text/tab-separated-values"},{ext:".vcf",mimeType:"text/vcard"},{ext:".ics",mimeType:"text/calendar"},{ext:".warc",mimeType:"application/warc"},{ext:".vtt",mimeType:"text/vtt"},{ext:"",mimeType:"application/octet-stream"}];function XT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Max file size (bytes)"),s=O(),l=v("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",o=n[12]),p(l,"step","1"),p(l,"min","0")},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].maxSize),r||(a=Y(l,"input",n[3]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&o!==(o=u[12])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].maxSize&&ce(l,u[0].maxSize)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function QT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Max files"),s=O(),l=v("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",o=n[12]),p(l,"step","1"),p(l,"min",""),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].maxSelect),r||(a=Y(l,"input",n[4]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&o!==(o=u[12])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].maxSelect&&ce(l,u[0].maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function xT(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("button"),e.innerHTML='Images (jpg, png, svg, gif, webp)',t=O(),i=v("button"),i.innerHTML='Documents (pdf, doc/docx, xls/xlsx)',s=O(),l=v("button"),l.innerHTML='Videos (mp4, avi, mov, 3gp)',o=O(),r=v("button"),r.innerHTML='Archives (zip, 7zip, rar)',p(e,"type","button"),p(e,"class","dropdown-item closable"),p(i,"type","button"),p(i,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable"),p(r,"type","button"),p(r,"class","dropdown-item closable")},m(f,c){S(f,e,c),S(f,t,c),S(f,i,c),S(f,s,c),S(f,l,c),S(f,o,c),S(f,r,c),a||(u=[Y(e,"click",n[6]),Y(i,"click",n[7]),Y(l,"click",n[8]),Y(r,"click",n[9])],a=!0)},p:Z,d(f){f&&w(e),f&&w(t),f&&w(i),f&&w(s),f&&w(l),f&&w(o),f&&w(r),a=!1,Pe(u)}}}function e$(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,k,y,T;function $(C){n[5](C)}let M={id:n[12],multiple:!0,searchable:!0,closable:!1,selectionKey:"mimeType",selectPlaceholder:"No restriction",items:n[2],labelComponent:Xc,optionComponent:Xc};return n[0].mimeTypes!==void 0&&(M.keyOfSelected=n[0].mimeTypes),r=new Ls({props:M}),ie.push(()=>ge(r,"keyOfSelected",$)),b=new ei({props:{class:"dropdown dropdown-sm dropdown-nowrap dropdown-left",$$slots:{default:[xT]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Allowed mime types",i=O(),s=v("i"),o=O(),H(r.$$.fragment),u=O(),f=v("div"),c=v("button"),d=v("span"),d.textContent="Choose presets",m=O(),h=v("i"),g=O(),H(b.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(d,"class","txt link-primary"),p(h,"class","ri-arrow-drop-down-fill"),p(c,"type","button"),p(c,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(C,D){S(C,e,D),_(e,t),_(e,i),_(e,s),S(C,o,D),q(r,C,D),S(C,u,D),S(C,f,D),_(f,c),_(c,d),_(c,m),_(c,h),_(c,g),q(b,c,null),k=!0,y||(T=Ie(Be.call(null,s,{text:`Allow files ONLY with the listed mime types. + Leave empty for no restriction.`,position:"top"})),y=!0)},p(C,D){(!k||D&4096&&l!==(l=C[12]))&&p(e,"for",l);const E={};D&4096&&(E.id=C[12]),D&4&&(E.items=C[2]),!a&&D&1&&(a=!0,E.keyOfSelected=C[0].mimeTypes,ke(()=>a=!1)),r.$set(E);const P={};D&8193&&(P.$$scope={dirty:D,ctx:C}),b.$set(P)},i(C){k||(A(r.$$.fragment,C),A(b.$$.fragment,C),k=!0)},o(C){I(r.$$.fragment,C),I(b.$$.fragment,C),k=!1},d(C){C&&w(e),C&&w(o),j(r,C),C&&w(u),C&&w(f),j(b),y=!1,T()}}}function t$(n){let e;return{c(){e=v("ul"),e.innerHTML=`
  • WxH + (eg. 100x50) - crop to WxH viewbox (from center)
  • +
  • WxHt + (eg. 100x50t) - crop to WxH viewbox (from top)
  • +
  • WxHb + (eg. 100x50b) - crop to WxH viewbox (from bottom)
  • +
  • WxHf + (eg. 100x50f) - fit inside a WxH viewbox (without cropping)
  • +
  • 0xH + (eg. 0x50) - resize to H height preserving the aspect ratio
  • +
  • Wx0 + (eg. 100x0) - resize to W width preserving the aspect ratio
  • `,p(e,"class","m-0")},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function n$(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,k,y,T,$,M;function C(E){n[10](E)}let D={id:n[12],placeholder:"eg. 50x50, 480x720"};return n[0].thumbs!==void 0&&(D.value=n[0].thumbs),r=new Ns({props:D}),ie.push(()=>ge(r,"value",C)),y=new ei({props:{class:"dropdown dropdown-sm dropdown-center dropdown-nowrap p-r-10",$$slots:{default:[t$]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Thumb sizes",i=O(),s=v("i"),o=O(),H(r.$$.fragment),u=O(),f=v("div"),c=v("span"),c.textContent="Use comma as separator.",d=O(),m=v("button"),h=v("span"),h.textContent="Supported formats",g=O(),b=v("i"),k=O(),H(y.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(c,"class","txt"),p(h,"class","txt link-primary"),p(b,"class","ri-arrow-drop-down-fill"),p(m,"type","button"),p(m,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(E,P){S(E,e,P),_(e,t),_(e,i),_(e,s),S(E,o,P),q(r,E,P),S(E,u,P),S(E,f,P),_(f,c),_(f,d),_(f,m),_(m,h),_(m,g),_(m,b),_(m,k),q(y,m,null),T=!0,$||(M=Ie(Be.call(null,s,{text:"List of additional thumb sizes for image files, along with the default thumb size of 100x100. The thumbs are generated lazily on first access.",position:"top"})),$=!0)},p(E,P){(!T||P&4096&&l!==(l=E[12]))&&p(e,"for",l);const L={};P&4096&&(L.id=E[12]),!a&&P&1&&(a=!0,L.value=E[0].thumbs,ke(()=>a=!1)),r.$set(L);const N={};P&8192&&(N.$$scope={dirty:P,ctx:E}),y.$set(N)},i(E){T||(A(r.$$.fragment,E),A(y.$$.fragment,E),T=!0)},o(E){I(r.$$.fragment,E),I(y.$$.fragment,E),T=!1},d(E){E&&w(e),E&&w(o),j(r,E),E&&w(u),E&&w(f),j(y),$=!1,M()}}}function i$(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;return i=new me({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[XT,({uniqueId:h})=>({12:h}),({uniqueId:h})=>h?4096:0]},$$scope:{ctx:n}}}),o=new me({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[QT,({uniqueId:h})=>({12:h}),({uniqueId:h})=>h?4096:0]},$$scope:{ctx:n}}}),u=new me({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[e$,({uniqueId:h})=>({12:h}),({uniqueId:h})=>h?4096:0]},$$scope:{ctx:n}}}),d=new me({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[n$,({uniqueId:h})=>({12:h}),({uniqueId:h})=>h?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=O(),l=v("div"),H(o.$$.fragment),r=O(),a=v("div"),H(u.$$.fragment),f=O(),c=v("div"),H(d.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(a,"class","col-sm-12"),p(c,"class","col-sm-12"),p(e,"class","grid")},m(h,g){S(h,e,g),_(e,t),q(i,t,null),_(e,s),_(e,l),q(o,l,null),_(e,r),_(e,a),q(u,a,null),_(e,f),_(e,c),q(d,c,null),m=!0},p(h,[g]){const b={};g&2&&(b.name="schema."+h[1]+".options.maxSize"),g&12289&&(b.$$scope={dirty:g,ctx:h}),i.$set(b);const k={};g&2&&(k.name="schema."+h[1]+".options.maxSelect"),g&12289&&(k.$$scope={dirty:g,ctx:h}),o.$set(k);const y={};g&2&&(y.name="schema."+h[1]+".options.mimeTypes"),g&12293&&(y.$$scope={dirty:g,ctx:h}),u.$set(y);const T={};g&2&&(T.name="schema."+h[1]+".options.thumbs"),g&12289&&(T.$$scope={dirty:g,ctx:h}),d.$set(T)},i(h){m||(A(i.$$.fragment,h),A(o.$$.fragment,h),A(u.$$.fragment,h),A(d.$$.fragment,h),m=!0)},o(h){I(i.$$.fragment,h),I(o.$$.fragment,h),I(u.$$.fragment,h),I(d.$$.fragment,h),m=!1},d(h){h&&w(e),j(i),j(o),j(u),j(d)}}}function s$(n,e,t){let{key:i=""}=e,{options:s={}}=e,l=GT.slice();function o(){if(z.isEmpty(s.mimeTypes))return;const g=[];for(const b of s.mimeTypes)l.find(k=>k.mimeType===b)||g.push({mimeType:b});g.length&&t(2,l=l.concat(g))}function r(){s.maxSize=ht(this.value),t(0,s)}function a(){s.maxSelect=ht(this.value),t(0,s)}function u(g){n.$$.not_equal(s.mimeTypes,g)&&(s.mimeTypes=g,t(0,s))}const f=()=>{t(0,s.mimeTypes=["image/jpeg","image/png","image/svg+xml","image/gif","image/webp"],s)},c=()=>{t(0,s.mimeTypes=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],s)},d=()=>{t(0,s.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],s)},m=()=>{t(0,s.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],s)};function h(g){n.$$.not_equal(s.thumbs,g)&&(s.thumbs=g,t(0,s))}return n.$$set=g=>{"key"in g&&t(1,i=g.key),"options"in g&&t(0,s=g.options)},n.$$.update=()=>{n.$$.dirty&1&&(z.isEmpty(s)?t(0,s={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]}):o())},[s,i,l,r,a,u,f,c,d,m,h]}class l$ extends ye{constructor(e){super(),ve(this,e,s$,i$,he,{key:1,options:0})}}function o$(n){let e,t,i,s,l;return{c(){e=v("hr"),t=O(),i=v("button"),i.innerHTML=` + New collection`,p(i,"type","button"),p(i,"class","btn btn-transparent btn-block btn-sm")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=Y(i,"click",n[7]),s=!0)},p:Z,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function r$(n){let e,t,i,s,l,o,r;function a(f){n[8](f)}let u={searchable:n[2].length>5,selectPlaceholder:"Select collection",noOptionsText:"No collections found",selectionKey:"id",items:n[2],$$slots:{afterOptions:[o$]},$$scope:{ctx:n}};return n[0].collectionId!==void 0&&(u.keyOfSelected=n[0].collectionId),l=new Ls({props:u}),ie.push(()=>ge(l,"keyOfSelected",a)),{c(){e=v("label"),t=B("Collection"),s=O(),H(l.$$.fragment),p(e,"for",i=n[18])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),q(l,f,c),r=!0},p(f,c){(!r||c&262144&&i!==(i=f[18]))&&p(e,"for",i);const d={};c&4&&(d.searchable=f[2].length>5),c&4&&(d.items=f[2]),c&524296&&(d.$$scope={dirty:c,ctx:f}),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].collectionId,ke(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),j(l,f)}}}function a$(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("span"),t.textContent="Max select",i=O(),s=v("i"),o=O(),r=v("input"),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[18]),p(r,"type","number"),p(r,"id",a=n[18]),p(r,"step","1"),p(r,"min","1")},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),ce(r,n[0].maxSelect),u||(f=[Ie(Be.call(null,s,{text:"Leave empty for no limit.",position:"top"})),Y(r,"input",n[9])],u=!0)},p(c,d){d&262144&&l!==(l=c[18])&&p(e,"for",l),d&262144&&a!==(a=c[18])&&p(r,"id",a),d&1&&ht(r.value)!==c[0].maxSelect&&ce(r,c[0].maxSelect)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,Pe(f)}}}function u$(n){let e,t,i,s,l,o,r,a,u,f,c;function d(h){n[10](h)}let m={multiple:!0,searchable:!0,id:n[18],selectPlaceholder:"Auto",items:n[4]};return n[0].displayFields!==void 0&&(m.selected=n[0].displayFields),r=new xa({props:m}),ie.push(()=>ge(r,"selected",d)),{c(){e=v("label"),t=v("span"),t.textContent="Display fields",i=O(),s=v("i"),o=O(),H(r.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[18])},m(h,g){S(h,e,g),_(e,t),_(e,i),_(e,s),S(h,o,g),q(r,h,g),u=!0,f||(c=Ie(Be.call(null,s,{text:"Optionally select the field(s) that will be used in the listings UI. Leave empty for auto.",position:"top"})),f=!0)},p(h,g){(!u||g&262144&&l!==(l=h[18]))&&p(e,"for",l);const b={};g&262144&&(b.id=h[18]),g&16&&(b.items=h[4]),!a&&g&1&&(a=!0,b.selected=h[0].displayFields,ke(()=>a=!1)),r.$set(b)},i(h){u||(A(r.$$.fragment,h),u=!0)},o(h){I(r.$$.fragment,h),u=!1},d(h){h&&w(e),h&&w(o),j(r,h),f=!1,c()}}}function f$(n){let e,t,i,s,l,o,r;function a(f){n[11](f)}let u={id:n[18],items:n[5]};return n[0].cascadeDelete!==void 0&&(u.keyOfSelected=n[0].cascadeDelete),l=new Ls({props:u}),ie.push(()=>ge(l,"keyOfSelected",a)),{c(){e=v("label"),t=B("Cascade delete"),s=O(),H(l.$$.fragment),p(e,"for",i=n[18])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),q(l,f,c),r=!0},p(f,c){(!r||c&262144&&i!==(i=f[18]))&&p(e,"for",i);const d={};c&262144&&(d.id=f[18]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].cascadeDelete,ke(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),j(l,f)}}}function c$(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;i=new me({props:{class:"form-field required",name:"schema."+n[1]+".options.collectionId",$$slots:{default:[r$,({uniqueId:k})=>({18:k}),({uniqueId:k})=>k?262144:0]},$$scope:{ctx:n}}}),o=new me({props:{class:"form-field",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[a$,({uniqueId:k})=>({18:k}),({uniqueId:k})=>k?262144:0]},$$scope:{ctx:n}}}),u=new me({props:{class:"form-field",name:"schema."+n[1]+".options.displayFields",$$slots:{default:[u$,({uniqueId:k})=>({18:k}),({uniqueId:k})=>k?262144:0]},$$scope:{ctx:n}}}),d=new me({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[f$,({uniqueId:k})=>({18:k}),({uniqueId:k})=>k?262144:0]},$$scope:{ctx:n}}});let b={};return h=new tu({props:b}),n[12](h),h.$on("save",n[13]),{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=O(),l=v("div"),H(o.$$.fragment),r=O(),a=v("div"),H(u.$$.fragment),f=O(),c=v("div"),H(d.$$.fragment),m=O(),H(h.$$.fragment),p(t,"class","col-sm-9"),p(l,"class","col-sm-3"),p(a,"class","col-sm-9"),p(c,"class","col-sm-3"),p(e,"class","grid")},m(k,y){S(k,e,y),_(e,t),q(i,t,null),_(e,s),_(e,l),q(o,l,null),_(e,r),_(e,a),q(u,a,null),_(e,f),_(e,c),q(d,c,null),S(k,m,y),q(h,k,y),g=!0},p(k,[y]){const T={};y&2&&(T.name="schema."+k[1]+".options.collectionId"),y&786445&&(T.$$scope={dirty:y,ctx:k}),i.$set(T);const $={};y&2&&($.name="schema."+k[1]+".options.maxSelect"),y&786433&&($.$$scope={dirty:y,ctx:k}),o.$set($);const M={};y&2&&(M.name="schema."+k[1]+".options.displayFields"),y&786449&&(M.$$scope={dirty:y,ctx:k}),u.$set(M);const C={};y&2&&(C.name="schema."+k[1]+".options.cascadeDelete"),y&786433&&(C.$$scope={dirty:y,ctx:k}),d.$set(C);const D={};h.$set(D)},i(k){g||(A(i.$$.fragment,k),A(o.$$.fragment,k),A(u.$$.fragment,k),A(d.$$.fragment,k),A(h.$$.fragment,k),g=!0)},o(k){I(i.$$.fragment,k),I(o.$$.fragment,k),I(u.$$.fragment,k),I(d.$$.fragment,k),I(h.$$.fragment,k),g=!1},d(k){k&&w(e),j(i),j(o),j(u),j(d),k&&w(m),n[12](null),j(h,k)}}}function d$(n,e,t){let i,s;Ye(n,Ai,M=>t(2,s=M));let{key:l=""}=e,{options:o={}}=e;const r=[{label:"False",value:!1},{label:"True",value:!0}],a=["id","created","updated"],u=["username","email","emailVisibility","verified"];let f=null,c=[],d=null;function m(){var M;if(t(4,c=a.slice(0)),!!i){i.isAuth&&t(4,c=c.concat(u));for(const C of i.schema)c.push(C.name);if(((M=o==null?void 0:o.displayFields)==null?void 0:M.length)>0)for(let C=o.displayFields.length-1;C>=0;C--)c.includes(o.displayFields[C])||o.displayFields.splice(C,1)}}const h=()=>f==null?void 0:f.show();function g(M){n.$$.not_equal(o.collectionId,M)&&(o.collectionId=M,t(0,o))}function b(){o.maxSelect=ht(this.value),t(0,o)}function k(M){n.$$.not_equal(o.displayFields,M)&&(o.displayFields=M,t(0,o))}function y(M){n.$$.not_equal(o.cascadeDelete,M)&&(o.cascadeDelete=M,t(0,o))}function T(M){ie[M?"unshift":"push"](()=>{f=M,t(3,f)})}const $=M=>{var C,D;(D=(C=M==null?void 0:M.detail)==null?void 0:C.collection)!=null&&D.id&&t(0,o.collectionId=M.detail.collection.id,o)};return n.$$set=M=>{"key"in M&&t(1,l=M.key),"options"in M&&t(0,o=M.options)},n.$$.update=()=>{n.$$.dirty&1&&z.isEmpty(o)&&t(0,o={maxSelect:1,collectionId:null,cascadeDelete:!1,displayFields:[]}),n.$$.dirty&5&&(i=s.find(M=>M.id==o.collectionId)||null),n.$$.dirty&65&&d!=o.collectionId&&(t(6,d=o.collectionId),m())},[o,l,s,f,c,r,d,h,g,b,k,y,T,$]}class p$ extends ye{constructor(e){super(),ve(this,e,d$,c$,he,{key:1,options:0})}}function m$(n){let e,t,i,s,l,o,r;function a(f){n[17](f)}let u={id:n[43],disabled:n[0].id};return n[0].type!==void 0&&(u.value=n[0].type),l=new Q3({props:u}),ie.push(()=>ge(l,"value",a)),{c(){e=v("label"),t=B("Type"),s=O(),H(l.$$.fragment),p(e,"for",i=n[43])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),q(l,f,c),r=!0},p(f,c){(!r||c[1]&4096&&i!==(i=f[43]))&&p(e,"for",i);const d={};c[1]&4096&&(d.id=f[43]),c[0]&1&&(d.disabled=f[0].id),!o&&c[0]&1&&(o=!0,d.value=f[0].type,ke(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),j(l,f)}}}function Qc(n){let e,t,i;return{c(){e=v("span"),e.textContent="Duplicated or invalid name",p(e,"class","txt invalid-name-note svelte-1tpxlm5")},m(s,l){S(s,e,l),i=!0},i(s){i||(xe(()=>{t||(t=je(e,An,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){t||(t=je(e,An,{duration:150,x:5},!1)),t.run(0),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function h$(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h=!n[5]&&Qc();return{c(){e=v("label"),t=v("span"),t.textContent="Name",i=O(),h&&h.c(),l=O(),o=v("input"),p(t,"class","txt"),p(e,"for",s=n[43]),p(o,"type","text"),p(o,"id",r=n[43]),o.required=!0,o.disabled=a=n[0].id&&n[0].system,p(o,"spellcheck","false"),o.autofocus=u=!n[0].id,o.value=f=n[0].name},m(g,b){S(g,e,b),_(e,t),_(e,i),h&&h.m(e,null),S(g,l,b),S(g,o,b),c=!0,n[0].id||o.focus(),d||(m=Y(o,"input",n[18]),d=!0)},p(g,b){g[5]?h&&(ae(),I(h,1,1,()=>{h=null}),ue()):h?b[0]&32&&A(h,1):(h=Qc(),h.c(),A(h,1),h.m(e,null)),(!c||b[1]&4096&&s!==(s=g[43]))&&p(e,"for",s),(!c||b[1]&4096&&r!==(r=g[43]))&&p(o,"id",r),(!c||b[0]&1&&a!==(a=g[0].id&&g[0].system))&&(o.disabled=a),(!c||b[0]&1&&u!==(u=!g[0].id))&&(o.autofocus=u),(!c||b[0]&1&&f!==(f=g[0].name)&&o.value!==f)&&(o.value=f)},i(g){c||(A(h),c=!0)},o(g){I(h),c=!1},d(g){g&&w(e),h&&h.d(),g&&w(l),g&&w(o),d=!1,m()}}}function g$(n){let e,t,i;function s(o){n[29](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new p$({props:l}),ie.push(()=>ge(e,"options",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function _$(n){let e,t,i;function s(o){n[28](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new l$({props:l}),ie.push(()=>ge(e,"options",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function b$(n){let e,t,i;function s(o){n[27](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new KT({props:l}),ie.push(()=>ge(e,"options",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function v$(n){let e,t,i;function s(o){n[26](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new zT({props:l}),ie.push(()=>ge(e,"options",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function y$(n){let e,t,i;function s(o){n[25](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new RT({props:l}),ie.push(()=>ge(e,"options",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function k$(n){let e,t,i;function s(o){n[24](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new wT({props:l}),ie.push(()=>ge(e,"options",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function w$(n){let e,t,i;function s(o){n[23](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new yT({props:l}),ie.push(()=>ge(e,"options",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function S$(n){let e,t,i;function s(o){n[22](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new Cb({props:l}),ie.push(()=>ge(e,"options",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function T$(n){let e,t,i;function s(o){n[21](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new cT({props:l}),ie.push(()=>ge(e,"options",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function $$(n){let e,t,i;function s(o){n[20](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new uT({props:l}),ie.push(()=>ge(e,"options",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function C$(n){let e,t,i;function s(o){n[19](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new sT({props:l}),ie.push(()=>ge(e,"options",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function M$(n){let e,t,i,s,l,o=gs(n[0])+"",r,a,u,f,c,d,m;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),r=B(o),a=O(),u=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[43]),p(l,"class","txt"),p(u,"class","ri-information-line link-hint"),p(s,"for",c=n[43])},m(h,g){S(h,e,g),e.checked=n[0].required,S(h,i,g),S(h,s,g),_(s,l),_(l,r),_(s,a),_(s,u),d||(m=[Y(e,"change",n[30]),Ie(f=Be.call(null,u,{text:`Requires the field value to be ${gs(n[0])} +(aka. not ${z.zeroDefaultStr(n[0])}).`,position:"right"}))],d=!0)},p(h,g){g[1]&4096&&t!==(t=h[43])&&p(e,"id",t),g[0]&1&&(e.checked=h[0].required),g[0]&1&&o!==(o=gs(h[0])+"")&&le(r,o),f&&Bt(f.update)&&g[0]&1&&f.update.call(null,{text:`Requires the field value to be ${gs(h[0])} +(aka. not ${z.zeroDefaultStr(h[0])}).`,position:"right"}),g[1]&4096&&c!==(c=h[43])&&p(s,"for",c)},d(h){h&&w(e),h&&w(i),h&&w(s),d=!1,Pe(m)}}}function xc(n){let e,t;return e=new me({props:{class:"form-field form-field-toggle m-0",name:"unique",$$slots:{default:[D$,({uniqueId:i})=>({43:i}),({uniqueId:i})=>[0,i?4096:0]]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,s){const l={};s[0]&1|s[1]&12288&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function D$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Unique"),p(e,"type","checkbox"),p(e,"id",t=n[43]),p(s,"for",o=n[43])},m(u,f){S(u,e,f),e.checked=n[0].unique,S(u,i,f),S(u,s,f),_(s,l),r||(a=Y(e,"change",n[31]),r=!0)},p(u,f){f[1]&4096&&t!==(t=u[43])&&p(e,"id",t),f[0]&1&&(e.checked=u[0].unique),f[1]&4096&&o!==(o=u[43])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function ed(n){let e,t,i,s,l,o,r,a,u,f;a=new ei({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[O$]},$$scope:{ctx:n}}});let c=n[8]&&td(n);return{c(){e=v("div"),t=v("div"),i=O(),s=v("div"),l=v("button"),o=v("i"),r=O(),H(a.$$.fragment),u=O(),c&&c.c(),p(t,"class","flex-fill"),p(o,"class","ri-more-line"),p(l,"type","button"),p(l,"aria-label","More"),p(l,"class","btn btn-circle btn-sm btn-transparent"),p(s,"class","inline-flex flex-gap-sm flex-nowrap"),p(e,"class","col-sm-4 txt-right")},m(d,m){S(d,e,m),_(e,t),_(e,i),_(e,s),_(s,l),_(l,o),_(l,r),q(a,l,null),_(s,u),c&&c.m(s,null),f=!0},p(d,m){const h={};m[1]&8192&&(h.$$scope={dirty:m,ctx:d}),a.$set(h),d[8]?c?c.p(d,m):(c=td(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i(d){f||(A(a.$$.fragment,d),f=!0)},o(d){I(a.$$.fragment,d),f=!1},d(d){d&&w(e),j(a),c&&c.d()}}}function O$(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Remove',p(e,"type","button"),p(e,"class","dropdown-item txt-right")},m(s,l){S(s,e,l),t||(i=Y(e,"click",n[9]),t=!0)},p:Z,d(s){s&&w(e),t=!1,i()}}}function td(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Done',p(e,"type","button"),p(e,"class","btn btn-sm btn-outline btn-expanded-sm")},m(s,l){S(s,e,l),t||(i=Y(e,"click",kn(n[3])),t=!0)},p:Z,d(s){s&&w(e),t=!1,i()}}}function E$(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,k,y,T,$,M,C;s=new me({props:{class:"form-field required "+(n[0].id?"readonly":""),name:"schema."+n[1]+".type",$$slots:{default:[m$,({uniqueId:F})=>({43:F}),({uniqueId:F})=>[0,F?4096:0]]},$$scope:{ctx:n}}}),r=new me({props:{class:` + form-field + required + `+(n[5]?"":"invalid")+` + `+(n[0].id&&n[0].system?"disabled":"")+` + `,name:"schema."+n[1]+".name",$$slots:{default:[h$,({uniqueId:F})=>({43:F}),({uniqueId:F})=>[0,F?4096:0]]},$$scope:{ctx:n}}});const D=[C$,$$,T$,S$,w$,k$,y$,v$,b$,_$,g$],E=[];function P(F,R){return F[0].type==="text"?0:F[0].type==="number"?1:F[0].type==="bool"?2:F[0].type==="email"?3:F[0].type==="url"?4:F[0].type==="editor"?5:F[0].type==="date"?6:F[0].type==="select"?7:F[0].type==="json"?8:F[0].type==="file"?9:F[0].type==="relation"?10:-1}~(f=P(n))&&(c=E[f]=D[f](n)),h=new me({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[M$,({uniqueId:F})=>({43:F}),({uniqueId:F})=>[0,F?4096:0]]},$$scope:{ctx:n}}});let L=n[0].type!=="file"&&xc(n),N=!n[0].toDelete&&ed(n);return{c(){e=v("form"),t=v("div"),i=v("div"),H(s.$$.fragment),l=O(),o=v("div"),H(r.$$.fragment),a=O(),u=v("div"),c&&c.c(),d=O(),m=v("div"),H(h.$$.fragment),g=O(),b=v("div"),L&&L.c(),k=O(),N&&N.c(),y=O(),T=v("input"),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(u,"class","col-sm-12 hidden-empty"),p(m,"class","col-sm-4 flex"),p(b,"class","col-sm-4 flex"),p(t,"class","grid"),p(T,"type","submit"),p(T,"class","hidden"),p(T,"tabindex","-1"),p(e,"class","field-form")},m(F,R){S(F,e,R),_(e,t),_(t,i),q(s,i,null),_(t,l),_(t,o),q(r,o,null),_(t,a),_(t,u),~f&&E[f].m(u,null),_(t,d),_(t,m),q(h,m,null),_(t,g),_(t,b),L&&L.m(b,null),_(t,k),N&&N.m(t,null),_(e,y),_(e,T),$=!0,M||(C=[Y(e,"dragstart",P$),Y(e,"submit",dt(n[32]))],M=!0)},p(F,R){const X={};R[0]&1&&(X.class="form-field required "+(F[0].id?"readonly":"")),R[0]&2&&(X.name="schema."+F[1]+".type"),R[0]&1|R[1]&12288&&(X.$$scope={dirty:R,ctx:F}),s.$set(X);const se={};R[0]&33&&(se.class=` + form-field + required + `+(F[5]?"":"invalid")+` + `+(F[0].id&&F[0].system?"disabled":"")+` + `),R[0]&2&&(se.name="schema."+F[1]+".name"),R[0]&33|R[1]&12288&&(se.$$scope={dirty:R,ctx:F}),r.$set(se);let W=f;f=P(F),f===W?~f&&E[f].p(F,R):(c&&(ae(),I(E[W],1,1,()=>{E[W]=null}),ue()),~f?(c=E[f],c?c.p(F,R):(c=E[f]=D[f](F),c.c()),A(c,1),c.m(u,null)):c=null);const G={};R[0]&1|R[1]&12288&&(G.$$scope={dirty:R,ctx:F}),h.$set(G),F[0].type!=="file"?L?(L.p(F,R),R[0]&1&&A(L,1)):(L=xc(F),L.c(),A(L,1),L.m(b,null)):L&&(ae(),I(L,1,1,()=>{L=null}),ue()),F[0].toDelete?N&&(ae(),I(N,1,1,()=>{N=null}),ue()):N?(N.p(F,R),R[0]&1&&A(N,1)):(N=ed(F),N.c(),A(N,1),N.m(t,null))},i(F){$||(A(s.$$.fragment,F),A(r.$$.fragment,F),A(c),A(h.$$.fragment,F),A(L),A(N),$=!0)},o(F){I(s.$$.fragment,F),I(r.$$.fragment,F),I(c),I(h.$$.fragment,F),I(L),I(N),$=!1},d(F){F&&w(e),j(s),j(r),~f&&E[f].d(),j(h),L&&L.d(),N&&N.d(),M=!1,Pe(C)}}}function nd(n){let e,t,i,s,l=n[0].system&&id(),o=!n[0].id&&sd(n),r=n[0].required&&ld(n),a=n[0].unique&&od();return{c(){e=v("div"),l&&l.c(),t=O(),o&&o.c(),i=O(),r&&r.c(),s=O(),a&&a.c(),p(e,"class","inline-flex")},m(u,f){S(u,e,f),l&&l.m(e,null),_(e,t),o&&o.m(e,null),_(e,i),r&&r.m(e,null),_(e,s),a&&a.m(e,null)},p(u,f){u[0].system?l||(l=id(),l.c(),l.m(e,t)):l&&(l.d(1),l=null),u[0].id?o&&(o.d(1),o=null):o?o.p(u,f):(o=sd(u),o.c(),o.m(e,i)),u[0].required?r?r.p(u,f):(r=ld(u),r.c(),r.m(e,s)):r&&(r.d(1),r=null),u[0].unique?a||(a=od(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(u){u&&w(e),l&&l.d(),o&&o.d(),r&&r.d(),a&&a.d()}}}function id(n){let e;return{c(){e=v("span"),e.textContent="System",p(e,"class","label label-danger")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function sd(n){let e;return{c(){e=v("span"),e.textContent="New",p(e,"class","label"),Q(e,"label-warning",n[8]&&!n[0].toDelete)},m(t,i){S(t,e,i)},p(t,i){i[0]&257&&Q(e,"label-warning",t[8]&&!t[0].toDelete)},d(t){t&&w(e)}}}function ld(n){let e,t=gs(n[0])+"",i;return{c(){e=v("span"),i=B(t),p(e,"class","label label-success")},m(s,l){S(s,e,l),_(e,i)},p(s,l){l[0]&1&&t!==(t=gs(s[0])+"")&&le(i,t)},d(s){s&&w(e)}}}function od(n){let e;return{c(){e=v("span"),e.textContent="Unique",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function rd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ie(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(xe(()=>{t||(t=je(e,It,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,It,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function ad(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-transparent")},m(s,l){S(s,e,l),t||(i=Y(e,"click",kn(n[16])),t=!0)},p:Z,d(s){s&&w(e),t=!1,i()}}}function A$(n){let e,t,i,s,l,o,r=(n[0].name||"-")+"",a,u,f,c,d,m,h,g,b,k=!n[0].toDelete&&nd(n),y=n[7]&&!n[0].system&&rd(),T=n[0].toDelete&&ad(n);return{c(){e=v("div"),t=v("span"),i=v("i"),l=O(),o=v("strong"),a=B(r),f=O(),k&&k.c(),c=O(),d=v("div"),m=O(),y&&y.c(),h=O(),T&&T.c(),g=Me(),p(i,"class",s=Si(z.getFieldTypeIcon(n[0].type))+" svelte-1tpxlm5"),p(t,"class","icon field-type"),p(o,"class","title field-name svelte-1tpxlm5"),p(o,"title",u=n[0].name),Q(o,"txt-strikethrough",n[0].toDelete),p(e,"class","inline-flex"),p(d,"class","flex-fill")},m($,M){S($,e,M),_(e,t),_(t,i),_(e,l),_(e,o),_(o,a),S($,f,M),k&&k.m($,M),S($,c,M),S($,d,M),S($,m,M),y&&y.m($,M),S($,h,M),T&&T.m($,M),S($,g,M),b=!0},p($,M){(!b||M[0]&1&&s!==(s=Si(z.getFieldTypeIcon($[0].type))+" svelte-1tpxlm5"))&&p(i,"class",s),(!b||M[0]&1)&&r!==(r=($[0].name||"-")+"")&&le(a,r),(!b||M[0]&1&&u!==(u=$[0].name))&&p(o,"title",u),(!b||M[0]&1)&&Q(o,"txt-strikethrough",$[0].toDelete),$[0].toDelete?k&&(k.d(1),k=null):k?k.p($,M):(k=nd($),k.c(),k.m(c.parentNode,c)),$[7]&&!$[0].system?y?M[0]&129&&A(y,1):(y=rd(),y.c(),A(y,1),y.m(h.parentNode,h)):y&&(ae(),I(y,1,1,()=>{y=null}),ue()),$[0].toDelete?T?T.p($,M):(T=ad($),T.c(),T.m(g.parentNode,g)):T&&(T.d(1),T=null)},i($){b||(A(y),b=!0)},o($){I(y),b=!1},d($){$&&w(e),$&&w(f),k&&k.d($),$&&w(c),$&&w(d),$&&w(m),y&&y.d($),$&&w(h),T&&T.d($),$&&w(g)}}}function I$(n){let e,t;const i=[{draggable:!0},{single:!0},{interactive:n[8]},{class:n[2]||n[0].toDelete||n[0].system?"field-accordion disabled":"field-accordion"},n[11]];let s={$$slots:{header:[A$],default:[E$]},$$scope:{ctx:n}};for(let l=0;l{n.stopPropagation(),n.preventDefault(),n.stopImmediatePropagation()};function L$(n,e,t){let i,s,l,o;const r=["key","field","disabled","excludeNames","expand","collapse"];let a=Et(e,r),u;Ye(n,fi,fe=>t(15,u=fe));const f=Ct();let{key:c="0"}=e,{field:d=new mn}=e,{disabled:m=!1}=e,{excludeNames:h=[]}=e,g,b=d.type;function k(){g==null||g.expand()}function y(){g==null||g.collapse()}function T(){d.id?t(0,d.toDelete=!0,d):(y(),f("remove"))}function $(fe){if(fe=(""+fe).toLowerCase(),!fe)return!1;for(const Ve of h)if(Ve.toLowerCase()===fe)return!1;return!0}function M(fe){return z.slugify(fe)}Zt(()=>{d!=null&&d.onMountExpand&&(t(0,d.onMountExpand=!1,d),k())});const C=()=>{t(0,d.toDelete=!1,d)};function D(fe){n.$$.not_equal(d.type,fe)&&(d.type=fe,t(0,d),t(14,b),t(4,g))}const E=fe=>{t(0,d.name=M(fe.target.value),d),fe.target.value=d.name};function P(fe){n.$$.not_equal(d.options,fe)&&(d.options=fe,t(0,d),t(14,b),t(4,g))}function L(fe){n.$$.not_equal(d.options,fe)&&(d.options=fe,t(0,d),t(14,b),t(4,g))}function N(fe){n.$$.not_equal(d.options,fe)&&(d.options=fe,t(0,d),t(14,b),t(4,g))}function F(fe){n.$$.not_equal(d.options,fe)&&(d.options=fe,t(0,d),t(14,b),t(4,g))}function R(fe){n.$$.not_equal(d.options,fe)&&(d.options=fe,t(0,d),t(14,b),t(4,g))}function X(fe){n.$$.not_equal(d.options,fe)&&(d.options=fe,t(0,d),t(14,b),t(4,g))}function se(fe){n.$$.not_equal(d.options,fe)&&(d.options=fe,t(0,d),t(14,b),t(4,g))}function W(fe){n.$$.not_equal(d.options,fe)&&(d.options=fe,t(0,d),t(14,b),t(4,g))}function G(fe){n.$$.not_equal(d.options,fe)&&(d.options=fe,t(0,d),t(14,b),t(4,g))}function te(fe){n.$$.not_equal(d.options,fe)&&(d.options=fe,t(0,d),t(14,b),t(4,g))}function K(fe){n.$$.not_equal(d.options,fe)&&(d.options=fe,t(0,d),t(14,b),t(4,g))}function re(){d.required=this.checked,t(0,d),t(14,b),t(4,g)}function J(){d.unique=this.checked,t(0,d),t(14,b),t(4,g)}const de=()=>{i&&y()};function _e(fe){ie[fe?"unshift":"push"](()=>{g=fe,t(4,g)})}function $e(fe){ze.call(this,n,fe)}function Ne(fe){ze.call(this,n,fe)}function Re(fe){ze.call(this,n,fe)}function be(fe){ze.call(this,n,fe)}function Se(fe){ze.call(this,n,fe)}function We(fe){ze.call(this,n,fe)}function lt(fe){ze.call(this,n,fe)}return n.$$set=fe=>{e=Je(Je({},e),Qn(fe)),t(11,a=Et(e,r)),"key"in fe&&t(1,c=fe.key),"field"in fe&&t(0,d=fe.field),"disabled"in fe&&t(2,m=fe.disabled),"excludeNames"in fe&&t(12,h=fe.excludeNames)},n.$$.update=()=>{n.$$.dirty[0]&16385&&b!=d.type&&(t(14,b=d.type),t(0,d.options={},d),t(0,d.unique=!1,d)),n.$$.dirty[0]&17&&d.toDelete&&(g&&y(),d.originalName&&d.name!==d.originalName&&t(0,d.name=d.originalName,d)),n.$$.dirty[0]&1&&!d.originalName&&d.name&&t(0,d.originalName=d.name,d),n.$$.dirty[0]&1&&typeof d.toDelete>"u"&&t(0,d.toDelete=!1,d),n.$$.dirty[0]&1&&d.required&&t(0,d.nullable=!1,d),n.$$.dirty[0]&1&&t(6,i=!z.isEmpty(d.name)&&d.type),n.$$.dirty[0]&80&&(i||g&&k()),n.$$.dirty[0]&69&&t(8,s=!m&&!d.system&&!d.toDelete&&i),n.$$.dirty[0]&1&&t(5,l=$(d.name)),n.$$.dirty[0]&32802&&t(7,o=!l||!z.isEmpty(z.getNestedVal(u,`schema.${c}`)))},[d,c,m,y,g,l,i,o,s,T,M,a,h,k,b,u,C,D,E,P,L,N,F,R,X,se,W,G,te,K,re,J,de,_e,$e,Ne,Re,be,Se,We,lt]}class N$ extends ye{constructor(e){super(),ve(this,e,L$,I$,he,{key:1,field:0,disabled:2,excludeNames:12,expand:13,collapse:3},null,[-1,-1])}get expand(){return this.$$.ctx[13]}get collapse(){return this.$$.ctx[3]}}function ud(n,e,t){const i=n.slice();return i[13]=e[t],i[14]=e,i[15]=t,i}function fd(n){let e,t,i,s,l,o,r,a;return{c(){e=B(`, + `),t=v("code"),t.textContent="username",i=B(` , + `),s=v("code"),s.textContent="email",l=B(` , + `),o=v("code"),o.textContent="emailVisibility",r=B(` , + `),a=v("code"),a.textContent="verified",p(t,"class","txt-sm"),p(s,"class","txt-sm"),p(o,"class","txt-sm"),p(a,"class","txt-sm")},m(u,f){S(u,e,f),S(u,t,f),S(u,i,f),S(u,s,f),S(u,l,f),S(u,o,f),S(u,r,f),S(u,a,f)},d(u){u&&w(e),u&&w(t),u&&w(i),u&&w(s),u&&w(l),u&&w(o),u&&w(r),u&&w(a)}}}function cd(n,e){let t,i,s,l;function o(c){e[6](c,e[13],e[14],e[15])}function r(){return e[7](e[15])}function a(...c){return e[8](e[15],...c)}function u(...c){return e[9](e[15],...c)}let f={key:e[15],excludeNames:e[1].concat(e[4](e[13]))};return e[13]!==void 0&&(f.field=e[13]),i=new N$({props:f}),ie.push(()=>ge(i,"field",o)),i.$on("remove",r),i.$on("dragstart",a),i.$on("drop",u),{key:n,first:null,c(){t=Me(),H(i.$$.fragment),this.first=t},m(c,d){S(c,t,d),q(i,c,d),l=!0},p(c,d){e=c;const m={};d&1&&(m.key=e[15]),d&3&&(m.excludeNames=e[1].concat(e[4](e[13]))),!s&&d&1&&(s=!0,m.field=e[13],ke(()=>s=!1)),i.$set(m)},i(c){l||(A(i.$$.fragment,c),l=!0)},o(c){I(i.$$.fragment,c),l=!1},d(c){c&&w(t),j(i,c)}}}function F$(n){let e,t,i,s,l,o,r,a,u,f,c,d,m=[],h=new Map,g,b,k,y,T,$,M,C,D,E,P,L=n[0].isAuth&&fd(),N=n[0].schema;const F=R=>R[13];for(let R=0;Rk.name===b)}function f(b){let k=[];if(b.toDelete)return k;for(let y of i.schema)y===b||y.toDelete||k.push(y.name);return k}function c(b,k){if(!b)return;b.dataTransfer.dropEffect="move";const y=parseInt(b.dataTransfer.getData("text/plain")),T=i.schema;yo(b),h=(b,k)=>R$(k==null?void 0:k.detail,b),g=(b,k)=>c(k==null?void 0:k.detail,b);return n.$$set=b=>{"collection"in b&&t(0,i=b.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof i.schema>"u"&&(t(0,i=i||new pn),t(0,i.schema=[],i)),n.$$.dirty&1&&(i.isAuth?t(1,l=s.concat(["username","email","emailVisibility","verified","tokenKey","passwordHash","lastResetSentAt","lastVerificationSentAt","password","passwordConfirm","oldPassword"])):t(1,l=s.slice(0)))},[i,l,o,r,f,c,d,m,h,g]}class j$ extends ye{constructor(e){super(),ve(this,e,q$,F$,he,{collection:0})}}const H$=n=>({isAdminOnly:n&256}),dd=n=>({isAdminOnly:n[8]});function V$(n){let e,t;return e=new me({props:{class:"form-field rule-field m-0 "+(n[4]?"requied":"")+" "+(n[8]?"disabled":""),name:n[3],$$slots:{default:[J$,({uniqueId:i})=>({17:i}),({uniqueId:i})=>i?131072:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,s){const l={};s&272&&(l.class="form-field rule-field m-0 "+(i[4]?"requied":"")+" "+(i[8]?"disabled":"")),s&8&&(l.name=i[3]),s&147815&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function z$(n){let e;return{c(){e=v("div"),e.innerHTML='',p(e,"class","txt-center")},m(t,i){S(t,e,i)},p:Z,i:Z,o:Z,d(t){t&&w(e)}}}function B$(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + Set Admins only`,p(e,"type","button"),p(e,"class","btn btn-sm btn-transparent btn-hint lock-toggle svelte-i0txfh")},m(s,l){S(s,e,l),t||(i=Y(e,"click",n[10]),t=!0)},p:Z,d(s){s&&w(e),t=!1,i()}}}function U$(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + Set custom rule`,p(e,"type","button"),p(e,"class","btn btn-sm btn-transparent btn-success lock-toggle svelte-i0txfh")},m(s,l){S(s,e,l),t||(i=Y(e,"click",n[9]),t=!0)},p:Z,d(s){s&&w(e),t=!1,i()}}}function W$(n){let e;return{c(){e=B("Leave empty to grant everyone access.")},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function Y$(n){let e,t,i,s,l;return{c(){e=B(`Only admins will be able to perform this action ( + `),t=v("button"),t.textContent="unlock to change",i=B(` + ).`),p(t,"type","button"),p(t,"class","link-hint")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=Y(t,"click",n[9]),s=!0)},p:Z,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function K$(n){let e;function t(l,o){return l[8]?Y$:W$}let i=t(n),s=i(n);return{c(){e=v("p"),s.c()},m(l,o){S(l,e,o),s.m(e,null)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null)))},d(l){l&&w(e),s.d()}}}function J$(n){let e,t,i,s,l=n[8]?"Admins only":"Custom rule",o,r,a,u,f,c,d,m,h;function g(E,P){return E[8]?U$:B$}let b=g(n),k=b(n);function y(E){n[13](E)}var T=n[6];function $(E){let P={id:E[17],baseCollection:E[1],disabled:E[8]};return E[0]!==void 0&&(P.value=E[0]),{props:P}}T&&(f=jt(T,$(n)),n[12](f),ie.push(()=>ge(f,"value",y)));const M=n[11].default,C=Nt(M,n,n[14],dd),D=C||K$(n);return{c(){e=v("label"),t=v("span"),i=B(n[2]),s=B(" - "),o=B(l),r=O(),k.c(),u=O(),f&&H(f.$$.fragment),d=O(),m=v("div"),D&&D.c(),p(t,"class","txt"),p(e,"for",a=n[17]),p(m,"class","help-block")},m(E,P){S(E,e,P),_(e,t),_(t,i),_(t,s),_(t,o),_(e,r),k.m(e,null),S(E,u,P),f&&q(f,E,P),S(E,d,P),S(E,m,P),D&&D.m(m,null),h=!0},p(E,P){(!h||P&4)&&le(i,E[2]),(!h||P&256)&&l!==(l=E[8]?"Admins only":"Custom rule")&&le(o,l),b===(b=g(E))&&k?k.p(E,P):(k.d(1),k=b(E),k&&(k.c(),k.m(e,null))),(!h||P&131072&&a!==(a=E[17]))&&p(e,"for",a);const L={};if(P&131072&&(L.id=E[17]),P&2&&(L.baseCollection=E[1]),P&256&&(L.disabled=E[8]),!c&&P&1&&(c=!0,L.value=E[0],ke(()=>c=!1)),T!==(T=E[6])){if(f){ae();const N=f;I(N.$$.fragment,1,0,()=>{j(N,1)}),ue()}T?(f=jt(T,$(E)),E[12](f),ie.push(()=>ge(f,"value",y)),H(f.$$.fragment),A(f.$$.fragment,1),q(f,d.parentNode,d)):f=null}else T&&f.$set(L);C?C.p&&(!h||P&16640)&&Rt(C,M,E,E[14],h?Ft(M,E[14],P,H$):qt(E[14]),dd):D&&D.p&&(!h||P&256)&&D.p(E,h?P:-1)},i(E){h||(f&&A(f.$$.fragment,E),A(D,E),h=!0)},o(E){f&&I(f.$$.fragment,E),I(D,E),h=!1},d(E){E&&w(e),k.d(),E&&w(u),n[12](null),f&&j(f,E),E&&w(d),E&&w(m),D&&D.d(E)}}}function Z$(n){let e,t,i,s;const l=[z$,V$],o=[];function r(a,u){return a[7]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Me()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(ae(),I(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){I(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}let pd;function G$(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:u="rule"}=e,{required:f=!1}=e,c=null,d=null,m=pd,h=!1;g();async function g(){m||h||(t(7,h=!0),t(6,m=(await rt(()=>import("./FilterAutocompleteInput-80716b22.js"),["./FilterAutocompleteInput-80716b22.js","./index-a6ccb683.js"],import.meta.url)).default),pd=m,t(7,h=!1))}async function b(){t(0,r=d||""),await sn(),c==null||c.focus()}async function k(){d=r,t(0,r=null)}function y($){ie[$?"unshift":"push"](()=>{c=$,t(5,c)})}function T($){r=$,t(0,r)}return n.$$set=$=>{"collection"in $&&t(1,o=$.collection),"rule"in $&&t(0,r=$.rule),"label"in $&&t(2,a=$.label),"formKey"in $&&t(3,u=$.formKey),"required"in $&&t(4,f=$.required),"$$scope"in $&&t(14,l=$.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(8,i=r===null)},[r,o,a,u,f,c,m,h,i,b,k,s,y,T,l]}class Ss extends ye{constructor(e){super(),ve(this,e,G$,Z$,he,{collection:1,rule:0,label:2,formKey:3,required:4})}}function md(n,e,t){const i=n.slice();return i[10]=e[t],i}function hd(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,k,y,T,$,M,C,D,E,P=n[2],L=[];for(let N=0;N@request filter:",c=O(),d=v("div"),d.innerHTML=`@request.method + @request.query.* + @request.data.* + @request.auth.*`,m=O(),h=v("hr"),g=O(),b=v("p"),b.innerHTML="You could also add constraints and query other collections using the @collection filter:",k=O(),y=v("div"),y.innerHTML="@collection.ANY_COLLECTION_NAME.*",T=O(),$=v("hr"),M=O(),C=v("p"),C.innerHTML=`Example rule: +
    + @request.auth.id != "" && created > "2022-01-01 00:00:00"`,p(s,"class","m-b-0"),p(o,"class","inline-flex flex-gap-5"),p(a,"class","m-t-10 m-b-5"),p(f,"class","m-b-0"),p(d,"class","inline-flex flex-gap-5"),p(h,"class","m-t-10 m-b-5"),p(b,"class","m-b-0"),p(y,"class","inline-flex flex-gap-5"),p($,"class","m-t-10 m-b-5"),p(i,"class","content"),p(t,"class","alert alert-warning m-0")},m(N,F){S(N,e,F),_(e,t),_(t,i),_(i,s),_(i,l),_(i,o);for(let R=0;R{D||(D=je(e,At,{duration:150},!0)),D.run(1)}),E=!0)},o(N){N&&(D||(D=je(e,At,{duration:150},!1)),D.run(0)),E=!1},d(N){N&&w(e),mt(L,N),N&&D&&D.end()}}}function gd(n){let e,t=n[10]+"",i;return{c(){e=v("code"),i=B(t)},m(s,l){S(s,e,l),_(e,i)},p(s,l){l&4&&t!==(t=s[10]+"")&&le(i,t)},d(s){s&&w(e)}}}function _d(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;function b(C){n[6](C)}let k={label:"Create action",formKey:"createRule",collection:n[0]};n[0].createRule!==void 0&&(k.rule=n[0].createRule),i=new Ss({props:k}),ie.push(()=>ge(i,"rule",b));function y(C){n[7](C)}let T={label:"Update action",formKey:"updateRule",collection:n[0]};n[0].updateRule!==void 0&&(T.rule=n[0].updateRule),a=new Ss({props:T}),ie.push(()=>ge(a,"rule",y));function $(C){n[8](C)}let M={label:"Delete action",formKey:"deleteRule",collection:n[0]};return n[0].deleteRule!==void 0&&(M.rule=n[0].deleteRule),m=new Ss({props:M}),ie.push(()=>ge(m,"rule",$)),{c(){e=v("hr"),t=O(),H(i.$$.fragment),l=O(),o=v("hr"),r=O(),H(a.$$.fragment),f=O(),c=v("hr"),d=O(),H(m.$$.fragment),p(e,"class","m-t-sm m-b-sm"),p(o,"class","m-t-sm m-b-sm"),p(c,"class","m-t-sm m-b-sm")},m(C,D){S(C,e,D),S(C,t,D),q(i,C,D),S(C,l,D),S(C,o,D),S(C,r,D),q(a,C,D),S(C,f,D),S(C,c,D),S(C,d,D),q(m,C,D),g=!0},p(C,D){const E={};D&1&&(E.collection=C[0]),!s&&D&1&&(s=!0,E.rule=C[0].createRule,ke(()=>s=!1)),i.$set(E);const P={};D&1&&(P.collection=C[0]),!u&&D&1&&(u=!0,P.rule=C[0].updateRule,ke(()=>u=!1)),a.$set(P);const L={};D&1&&(L.collection=C[0]),!h&&D&1&&(h=!0,L.rule=C[0].deleteRule,ke(()=>h=!1)),m.$set(L)},i(C){g||(A(i.$$.fragment,C),A(a.$$.fragment,C),A(m.$$.fragment,C),g=!0)},o(C){I(i.$$.fragment,C),I(a.$$.fragment,C),I(m.$$.fragment,C),g=!1},d(C){C&&w(e),C&&w(t),j(i,C),C&&w(l),C&&w(o),C&&w(r),j(a,C),C&&w(f),C&&w(c),C&&w(d),j(m,C)}}}function bd(n){let e,t,i,s,l;function o(a){n[9](a)}let r={label:"Manage action",formKey:"options.manageRule",collection:n[0],$$slots:{default:[X$]},$$scope:{ctx:n}};return n[0].options.manageRule!==void 0&&(r.rule=n[0].options.manageRule),i=new Ss({props:r}),ie.push(()=>ge(i,"rule",o)),{c(){e=v("hr"),t=O(),H(i.$$.fragment),p(e,"class","m-t-sm m-b-sm")},m(a,u){S(a,e,u),S(a,t,u),q(i,a,u),l=!0},p(a,u){const f={};u&1&&(f.collection=a[0]),u&8192&&(f.$$scope={dirty:u,ctx:a}),!s&&u&1&&(s=!0,f.rule=a[0].options.manageRule,ke(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){I(i.$$.fragment,a),l=!1},d(a){a&&w(e),a&&w(t),j(i,a)}}}function X$(n){let e,t,i;return{c(){e=v("p"),e.textContent=`This API rule gives admin-like permissions to allow fully managing the auth record(s), eg. + changing the password without requiring to enter the old one, directly updating the verified + state or email, etc.`,t=O(),i=v("p"),i.innerHTML="This rule is executed in addition to the create and update API rules."},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},p:Z,d(s){s&&w(e),s&&w(t),s&&w(i)}}}function Q$(n){var X,se;let e,t,i,s,l,o=n[1]?"Hide available fields":"Show available fields",r,a,u,f,c,d,m,h,g,b,k,y,T,$,M,C,D=n[1]&&hd(n);function E(W){n[4](W)}let P={label:"List/Search action",formKey:"listRule",collection:n[0]};n[0].listRule!==void 0&&(P.rule=n[0].listRule),f=new Ss({props:P}),ie.push(()=>ge(f,"rule",E));function L(W){n[5](W)}let N={label:"View action",formKey:"viewRule",collection:n[0]};n[0].viewRule!==void 0&&(N.rule=n[0].viewRule),g=new Ss({props:N}),ie.push(()=>ge(g,"rule",L));let F=!((X=n[0])!=null&&X.isView)&&_d(n),R=((se=n[0])==null?void 0:se.isAuth)&&bd(n);return{c(){e=v("div"),t=v("div"),i=v("p"),i.innerHTML=`All rules follow the +
    PocketBase filter syntax and operators + .`,s=O(),l=v("button"),r=B(o),a=O(),D&&D.c(),u=O(),H(f.$$.fragment),d=O(),m=v("hr"),h=O(),H(g.$$.fragment),k=O(),F&&F.c(),y=O(),R&&R.c(),T=Me(),p(l,"type","button"),p(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),p(t,"class","flex txt-sm txt-hint m-b-5"),p(e,"class","block m-b-base"),p(m,"class","m-t-sm m-b-sm")},m(W,G){S(W,e,G),_(e,t),_(t,i),_(t,s),_(t,l),_(l,r),_(e,a),D&&D.m(e,null),S(W,u,G),q(f,W,G),S(W,d,G),S(W,m,G),S(W,h,G),q(g,W,G),S(W,k,G),F&&F.m(W,G),S(W,y,G),R&&R.m(W,G),S(W,T,G),$=!0,M||(C=Y(l,"click",n[3]),M=!0)},p(W,[G]){var re,J;(!$||G&2)&&o!==(o=W[1]?"Hide available fields":"Show available fields")&&le(r,o),W[1]?D?(D.p(W,G),G&2&&A(D,1)):(D=hd(W),D.c(),A(D,1),D.m(e,null)):D&&(ae(),I(D,1,1,()=>{D=null}),ue());const te={};G&1&&(te.collection=W[0]),!c&&G&1&&(c=!0,te.rule=W[0].listRule,ke(()=>c=!1)),f.$set(te);const K={};G&1&&(K.collection=W[0]),!b&&G&1&&(b=!0,K.rule=W[0].viewRule,ke(()=>b=!1)),g.$set(K),(re=W[0])!=null&&re.isView?F&&(ae(),I(F,1,1,()=>{F=null}),ue()):F?(F.p(W,G),G&1&&A(F,1)):(F=_d(W),F.c(),A(F,1),F.m(y.parentNode,y)),(J=W[0])!=null&&J.isAuth?R?(R.p(W,G),G&1&&A(R,1)):(R=bd(W),R.c(),A(R,1),R.m(T.parentNode,T)):R&&(ae(),I(R,1,1,()=>{R=null}),ue())},i(W){$||(A(D),A(f.$$.fragment,W),A(g.$$.fragment,W),A(F),A(R),$=!0)},o(W){I(D),I(f.$$.fragment,W),I(g.$$.fragment,W),I(F),I(R),$=!1},d(W){W&&w(e),D&&D.d(),W&&w(u),j(f,W),W&&w(d),W&&w(m),W&&w(h),j(g,W),W&&w(k),F&&F.d(W),W&&w(y),R&&R.d(W),W&&w(T),M=!1,C()}}}function x$(n,e,t){let i,{collection:s=new pn}=e,l=!1;const o=()=>t(1,l=!l);function r(m){n.$$.not_equal(s.listRule,m)&&(s.listRule=m,t(0,s))}function a(m){n.$$.not_equal(s.viewRule,m)&&(s.viewRule=m,t(0,s))}function u(m){n.$$.not_equal(s.createRule,m)&&(s.createRule=m,t(0,s))}function f(m){n.$$.not_equal(s.updateRule,m)&&(s.updateRule=m,t(0,s))}function c(m){n.$$.not_equal(s.deleteRule,m)&&(s.deleteRule=m,t(0,s))}function d(m){n.$$.not_equal(s.options.manageRule,m)&&(s.options.manageRule=m,t(0,s))}return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=z.getAllCollectionIdentifiers(s))},[s,l,i,o,r,a,u,f,c,d]}class eC extends ye{constructor(e){super(),ve(this,e,x$,Q$,he,{collection:0})}}function vd(n,e,t){const i=n.slice();return i[9]=e[t],i}function tC(n){let e,t,i,s;function l(a){n[5](a)}var o=n[1];function r(a){let u={id:a[8],placeholder:"eg. SELECT id, name from posts",language:"sql",minHeight:"150"};return a[0].options.query!==void 0&&(u.value=a[0].options.query),{props:u}}return o&&(e=jt(o,r(n)),ie.push(()=>ge(e,"value",l)),e.$on("change",n[6])),{c(){e&&H(e.$$.fragment),i=Me()},m(a,u){e&&q(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u&256&&(f.id=a[8]),!t&&u&1&&(t=!0,f.value=a[0].options.query,ke(()=>t=!1)),o!==(o=a[1])){if(e){ae();const c=e;I(c.$$.fragment,1,0,()=>{j(c,1)}),ue()}o?(e=jt(o,r(a)),ie.push(()=>ge(e,"value",l)),e.$on("change",a[6]),H(e.$$.fragment),A(e.$$.fragment,1),q(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&I(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&j(e,a)}}}function nC(n){let e;return{c(){e=v("textarea"),e.disabled=!0,p(e,"rows","7"),p(e,"placeholder","Loading...")},m(t,i){S(t,e,i)},p:Z,i:Z,o:Z,d(t){t&&w(e)}}}function yd(n){let e,t,i=n[3],s=[];for(let l=0;l
  • Wildcard (*) columns are not supported.
  • +
  • The query must have a unique id column. +
    + If your query doesn't have a suitable one, you can use + (ROW_NUMBER() OVER()) as id.
  • `,u=O(),g&&g.c(),f=Me(),p(e,"for",i=n[8]),p(a,"class","help-block")},m(b,k){S(b,e,k),_(e,t),S(b,s,k),m[l].m(b,k),S(b,r,k),S(b,a,k),S(b,u,k),g&&g.m(b,k),S(b,f,k),c=!0},p(b,k){(!c||k&256&&i!==(i=b[8]))&&p(e,"for",i);let y=l;l=h(b),l===y?m[l].p(b,k):(ae(),I(m[y],1,1,()=>{m[y]=null}),ue(),o=m[l],o?o.p(b,k):(o=m[l]=d[l](b),o.c()),A(o,1),o.m(r.parentNode,r)),b[3].length?g?g.p(b,k):(g=yd(b),g.c(),g.m(f.parentNode,f)):g&&(g.d(1),g=null)},i(b){c||(A(o),c=!0)},o(b){I(o),c=!1},d(b){b&&w(e),b&&w(s),m[l].d(b),b&&w(r),b&&w(a),b&&w(u),g&&g.d(b),b&&w(f)}}}function sC(n){let e,t;return e=new me({props:{class:"form-field required "+(n[3].length?"error":""),name:"options.query",$$slots:{default:[iC,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field required "+(i[3].length?"error":"")),s&4367&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function lC(n,e,t){let i;Ye(n,fi,c=>t(4,i=c));let{collection:s=new pn}=e,l,o=!1,r=[];function a(c){var h;t(3,r=[]);const d=z.getNestedVal(c,"schema",null);if(z.isEmpty(d))return;if(d!=null&&d.message){r.push(d==null?void 0:d.message);return}const m=z.extractColumnsFromQuery((h=s==null?void 0:s.options)==null?void 0:h.query);z.removeByValue(m,"id"),z.removeByValue(m,"created"),z.removeByValue(m,"updated");for(let g in d)for(let b in d[g]){const k=d[g][b].message,y=m[g]||g;r.push(z.sentenize(y+": "+k))}}Zt(async()=>{t(2,o=!0);try{t(1,l=(await rt(()=>import("./CodeEditor-4caff52a.js"),["./CodeEditor-4caff52a.js","./index-a6ccb683.js"],import.meta.url)).default)}catch(c){console.warn(c)}t(2,o=!1)});function u(c){n.$$.not_equal(s.options.query,c)&&(s.options.query=c,t(0,s))}const f=()=>{r.length&&Qi("schema")};return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{n.$$.dirty&16&&a(i)},[s,l,o,r,i,u,f]}class oC extends ye{constructor(e){super(),ve(this,e,lC,sC,he,{collection:0})}}function rC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowUsernameAuth,S(u,i,f),S(u,s,f),_(s,l),r||(a=Y(e,"change",n[5]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowUsernameAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function aC(n){let e,t;return e=new me({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[rC,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,s){const l={};s&12289&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function uC(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function fC(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function wd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ie(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(xe(()=>{t||(t=je(e,It,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,It,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function cC(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].options.allowUsernameAuth?fC:uC}let u=a(n),f=u(n),c=n[3]&&wd();return{c(){e=v("div"),e.innerHTML=` + Username/Password`,t=O(),i=v("div"),s=O(),f.c(),l=O(),c&&c.c(),o=Me(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,m){S(d,e,m),S(d,t,m),S(d,i,m),S(d,s,m),f.m(d,m),S(d,l,m),c&&c.m(d,m),S(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[3]?c?m&8&&A(c,1):(c=wd(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(ae(),I(c,1,1,()=>{c=null}),ue())},i(d){r||(A(c),r=!0)},o(d){I(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function dC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowEmailAuth,S(u,i,f),S(u,s,f),_(s,l),r||(a=Y(e,"change",n[6]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowEmailAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Sd(n){let e,t,i,s,l,o,r,a;return i=new me({props:{class:"form-field "+(z.isEmpty(n[0].options.onlyEmailDomains)?"":"disabled"),name:"options.exceptEmailDomains",$$slots:{default:[pC,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),o=new me({props:{class:"form-field "+(z.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[mC,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=O(),l=v("div"),H(o.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid grid-sm p-t-sm")},m(u,f){S(u,e,f),_(e,t),q(i,t,null),_(e,s),_(e,l),q(o,l,null),a=!0},p(u,f){const c={};f&1&&(c.class="form-field "+(z.isEmpty(u[0].options.onlyEmailDomains)?"":"disabled")),f&12289&&(c.$$scope={dirty:f,ctx:u}),i.$set(c);const d={};f&1&&(d.class="form-field "+(z.isEmpty(u[0].options.exceptEmailDomains)?"":"disabled")),f&12289&&(d.$$scope={dirty:f,ctx:u}),o.$set(d)},i(u){a||(A(i.$$.fragment,u),A(o.$$.fragment,u),u&&xe(()=>{r||(r=je(e,At,{duration:150},!0)),r.run(1)}),a=!0)},o(u){I(i.$$.fragment,u),I(o.$$.fragment,u),u&&(r||(r=je(e,At,{duration:150},!1)),r.run(0)),a=!1},d(u){u&&w(e),j(i),j(o),u&&r&&r.end()}}}function pC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function h(b){n[7](b)}let g={id:n[12],disabled:!z.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(g.value=n[0].options.exceptEmailDomains),r=new Ns({props:g}),ie.push(()=>ge(r,"value",h)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=O(),s=v("i"),o=O(),H(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(b,k){S(b,e,k),_(e,t),_(e,i),_(e,s),S(b,o,k),q(r,b,k),S(b,u,k),S(b,f,k),c=!0,d||(m=Ie(Be.call(null,s,{text:`Email domains that are NOT allowed to sign up. + This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,k){(!c||k&4096&&l!==(l=b[12]))&&p(e,"for",l);const y={};k&4096&&(y.id=b[12]),k&1&&(y.disabled=!z.isEmpty(b[0].options.onlyEmailDomains)),!a&&k&1&&(a=!0,y.value=b[0].options.exceptEmailDomains,ke(()=>a=!1)),r.$set(y)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){I(r.$$.fragment,b),c=!1},d(b){b&&w(e),b&&w(o),j(r,b),b&&w(u),b&&w(f),d=!1,m()}}}function mC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function h(b){n[8](b)}let g={id:n[12],disabled:!z.isEmpty(n[0].options.exceptEmailDomains)};return n[0].options.onlyEmailDomains!==void 0&&(g.value=n[0].options.onlyEmailDomains),r=new Ns({props:g}),ie.push(()=>ge(r,"value",h)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=O(),s=v("i"),o=O(),H(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(b,k){S(b,e,k),_(e,t),_(e,i),_(e,s),S(b,o,k),q(r,b,k),S(b,u,k),S(b,f,k),c=!0,d||(m=Ie(Be.call(null,s,{text:`Email domains that are ONLY allowed to sign up. + This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,k){(!c||k&4096&&l!==(l=b[12]))&&p(e,"for",l);const y={};k&4096&&(y.id=b[12]),k&1&&(y.disabled=!z.isEmpty(b[0].options.exceptEmailDomains)),!a&&k&1&&(a=!0,y.value=b[0].options.onlyEmailDomains,ke(()=>a=!1)),r.$set(y)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){I(r.$$.fragment,b),c=!1},d(b){b&&w(e),b&&w(o),j(r,b),b&&w(u),b&&w(f),d=!1,m()}}}function hC(n){let e,t,i,s;e=new me({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[dC,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&Sd(n);return{c(){H(e.$$.fragment),t=O(),l&&l.c(),i=Me()},m(o,r){q(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowEmailAuth?l?(l.p(o,r),r&1&&A(l,1)):(l=Sd(o),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),I(l,1,1,()=>{l=null}),ue())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){I(e.$$.fragment,o),I(l),s=!1},d(o){j(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function gC(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function _C(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Td(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ie(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(xe(()=>{t||(t=je(e,It,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,It,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function bC(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].options.allowEmailAuth?_C:gC}let u=a(n),f=u(n),c=n[2]&&Td();return{c(){e=v("div"),e.innerHTML=` + Email/Password`,t=O(),i=v("div"),s=O(),f.c(),l=O(),c&&c.c(),o=Me(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,m){S(d,e,m),S(d,t,m),S(d,i,m),S(d,s,m),f.m(d,m),S(d,l,m),c&&c.m(d,m),S(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[2]?c?m&4&&A(c,1):(c=Td(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(ae(),I(c,1,1,()=>{c=null}),ue())},i(d){r||(A(c),r=!0)},o(d){I(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function vC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowOAuth2Auth,S(u,i,f),S(u,s,f),_(s,l),r||(a=Y(e,"change",n[9]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowOAuth2Auth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function $d(n){let e,t,i;return{c(){e=v("div"),e.innerHTML='',p(e,"class","block")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&xe(()=>{t||(t=je(e,At,{duration:150},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=je(e,At,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function yC(n){let e,t,i,s;e=new me({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowOAuth2Auth",$$slots:{default:[vC,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowOAuth2Auth&&$d();return{c(){H(e.$$.fragment),t=O(),l&&l.c(),i=Me()},m(o,r){q(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowOAuth2Auth?l?r&1&&A(l,1):(l=$d(),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),I(l,1,1,()=>{l=null}),ue())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){I(e.$$.fragment,o),I(l),s=!1},d(o){j(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function kC(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function wC(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Cd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ie(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(xe(()=>{t||(t=je(e,It,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,It,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function SC(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].options.allowOAuth2Auth?wC:kC}let u=a(n),f=u(n),c=n[1]&&Cd();return{c(){e=v("div"),e.innerHTML=` + OAuth2`,t=O(),i=v("div"),s=O(),f.c(),l=O(),c&&c.c(),o=Me(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,m){S(d,e,m),S(d,t,m),S(d,i,m),S(d,s,m),f.m(d,m),S(d,l,m),c&&c.m(d,m),S(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[1]?c?m&2&&A(c,1):(c=Cd(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(ae(),I(c,1,1,()=>{c=null}),ue())},i(d){r||(A(c),r=!0)},o(d){I(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function TC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Minimum password length"),s=O(),l=v("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",o=n[12]),l.required=!0,p(l,"min","6"),p(l,"max","72")},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].options.minPasswordLength),r||(a=Y(l,"input",n[10]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&o!==(o=u[12])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].options.minPasswordLength&&ce(l,u[0].options.minPasswordLength)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function $C(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Always require email",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(l,"class","txt"),p(r,"class","ri-information-line txt-sm link-hint"),p(s,"for",a=n[12])},m(c,d){S(c,e,d),e.checked=n[0].options.requireEmail,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[Y(e,"change",n[11]),Ie(Be.call(null,r,{text:`The constraint is applied only for new records. +Also note that some OAuth2 providers (like Twitter), don't return an email and the authentication may fail if the email field is required.`,position:"right"}))],u=!0)},p(c,d){d&4096&&t!==(t=c[12])&&p(e,"id",t),d&1&&(e.checked=c[0].options.requireEmail),d&4096&&a!==(a=c[12])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function CC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,k;return s=new ys({props:{single:!0,$$slots:{header:[cC],default:[aC]},$$scope:{ctx:n}}}),o=new ys({props:{single:!0,$$slots:{header:[bC],default:[hC]},$$scope:{ctx:n}}}),a=new ys({props:{single:!0,$$slots:{header:[SC],default:[yC]},$$scope:{ctx:n}}}),h=new me({props:{class:"form-field required",name:"options.minPasswordLength",$$slots:{default:[TC,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}}),b=new me({props:{class:"form-field form-field-toggle m-b-sm",name:"options.requireEmail",$$slots:{default:[$C,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("h4"),e.textContent="Auth methods",t=O(),i=v("div"),H(s.$$.fragment),l=O(),H(o.$$.fragment),r=O(),H(a.$$.fragment),u=O(),f=v("hr"),c=O(),d=v("h4"),d.textContent="General",m=O(),H(h.$$.fragment),g=O(),H(b.$$.fragment),p(e,"class","section-title"),p(i,"class","accordions"),p(d,"class","section-title")},m(y,T){S(y,e,T),S(y,t,T),S(y,i,T),q(s,i,null),_(i,l),q(o,i,null),_(i,r),q(a,i,null),S(y,u,T),S(y,f,T),S(y,c,T),S(y,d,T),S(y,m,T),q(h,y,T),S(y,g,T),q(b,y,T),k=!0},p(y,[T]){const $={};T&8201&&($.$$scope={dirty:T,ctx:y}),s.$set($);const M={};T&8197&&(M.$$scope={dirty:T,ctx:y}),o.$set(M);const C={};T&8195&&(C.$$scope={dirty:T,ctx:y}),a.$set(C);const D={};T&12289&&(D.$$scope={dirty:T,ctx:y}),h.$set(D);const E={};T&12289&&(E.$$scope={dirty:T,ctx:y}),b.$set(E)},i(y){k||(A(s.$$.fragment,y),A(o.$$.fragment,y),A(a.$$.fragment,y),A(h.$$.fragment,y),A(b.$$.fragment,y),k=!0)},o(y){I(s.$$.fragment,y),I(o.$$.fragment,y),I(a.$$.fragment,y),I(h.$$.fragment,y),I(b.$$.fragment,y),k=!1},d(y){y&&w(e),y&&w(t),y&&w(i),j(s),j(o),j(a),y&&w(u),y&&w(f),y&&w(c),y&&w(d),y&&w(m),j(h,y),y&&w(g),j(b,y)}}}function MC(n,e,t){let i,s,l,o;Ye(n,fi,g=>t(4,o=g));let{collection:r=new pn}=e;function a(){r.options.allowUsernameAuth=this.checked,t(0,r)}function u(){r.options.allowEmailAuth=this.checked,t(0,r)}function f(g){n.$$.not_equal(r.options.exceptEmailDomains,g)&&(r.options.exceptEmailDomains=g,t(0,r))}function c(g){n.$$.not_equal(r.options.onlyEmailDomains,g)&&(r.options.onlyEmailDomains=g,t(0,r))}function d(){r.options.allowOAuth2Auth=this.checked,t(0,r)}function m(){r.options.minPasswordLength=ht(this.value),t(0,r)}function h(){r.options.requireEmail=this.checked,t(0,r)}return n.$$set=g=>{"collection"in g&&t(0,r=g.collection)},n.$$.update=()=>{var g,b,k,y;n.$$.dirty&1&&r.isAuth&&z.isEmpty(r.options)&&t(0,r.options={allowEmailAuth:!0,allowUsernameAuth:!0,allowOAuth2Auth:!0,minPasswordLength:8},r),n.$$.dirty&16&&t(2,s=!z.isEmpty((g=o==null?void 0:o.options)==null?void 0:g.allowEmailAuth)||!z.isEmpty((b=o==null?void 0:o.options)==null?void 0:b.onlyEmailDomains)||!z.isEmpty((k=o==null?void 0:o.options)==null?void 0:k.exceptEmailDomains)),n.$$.dirty&16&&t(1,l=!z.isEmpty((y=o==null?void 0:o.options)==null?void 0:y.allowOAuth2Auth))},t(3,i=!1),[r,l,s,i,o,a,u,f,c,d,m,h]}class DC extends ye{constructor(e){super(),ve(this,e,MC,CC,he,{collection:0})}}function Md(n,e,t){const i=n.slice();return i[15]=e[t],i}function Dd(n,e,t){const i=n.slice();return i[15]=e[t],i}function Od(n){let e;return{c(){e=v("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Ed(n){var r;let e,t,i,s,l=n[2]&&Ad(n),o=!((r=n[1])!=null&&r.isView)&&Id(n);return{c(){e=v("h6"),e.textContent="Changes:",t=O(),i=v("ul"),l&&l.c(),s=O(),o&&o.c(),p(i,"class","changes-list svelte-1ghly2p")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),l&&l.m(i,null),_(i,s),o&&o.m(i,null)},p(a,u){var f;a[2]?l?l.p(a,u):(l=Ad(a),l.c(),l.m(i,s)):l&&(l.d(1),l=null),(f=a[1])!=null&&f.isView?o&&(o.d(1),o=null):o?o.p(a,u):(o=Id(a),o.c(),o.m(i,null))},d(a){a&&w(e),a&&w(t),a&&w(i),l&&l.d(),o&&o.d()}}}function Ad(n){let e,t,i,s,l=n[1].originalName+"",o,r,a,u,f,c=n[1].name+"",d;return{c(){e=v("li"),t=v("div"),i=B(`Renamed collection + `),s=v("strong"),o=B(l),r=O(),a=v("i"),u=O(),f=v("strong"),d=B(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(m,h){S(m,e,h),_(e,t),_(t,i),_(t,s),_(s,o),_(t,r),_(t,a),_(t,u),_(t,f),_(f,d)},p(m,h){h&2&&l!==(l=m[1].originalName+"")&&le(o,l),h&2&&c!==(c=m[1].name+"")&&le(d,c)},d(m){m&&w(e)}}}function Id(n){let e,t,i=n[5],s=[];for(let r=0;r
    ',i=O(),s=v("div"),l=v("p"),l.textContent=`If any of the collection changes is part of another collection rule, filter or view query, + you'll have to update it manually!`,o=O(),u&&u.c(),r=O(),f&&f.c(),a=Me(),p(t,"class","icon"),p(s,"class","content txt-bold"),p(e,"class","alert alert-warning")},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),_(s,l),_(s,o),u&&u.m(s,null),S(c,r,d),f&&f.m(c,d),S(c,a,d)},p(c,d){c[4].length?u||(u=Od(),u.c(),u.m(s,null)):u&&(u.d(1),u=null),c[6]?f?f.p(c,d):(f=Ed(c),f.c(),f.m(a.parentNode,a)):f&&(f.d(1),f=null)},d(c){c&&w(e),u&&u.d(),c&&w(r),f&&f.d(c),c&&w(a)}}}function EC(n){let e;return{c(){e=v("h4"),e.textContent="Confirm collection changes"},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function AC(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='Cancel',t=O(),i=v("button"),i.innerHTML='Confirm',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-transparent"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),e.focus(),s||(l=[Y(e,"click",n[9]),Y(i,"click",n[10])],s=!0)},p:Z,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Pe(l)}}}function IC(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[AC],header:[EC],default:[OC]},$$scope:{ctx:n}};return e=new Nn({props:i}),n[11](e),e.$on("hide",n[12]),e.$on("show",n[13]),{c(){H(e.$$.fragment)},m(s,l){q(e,s,l),t=!0},p(s,[l]){const o={};l&1048694&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[11](null),j(e,s)}}}function PC(n,e,t){let i,s,l,o;const r=Ct();let a,u;async function f(y){t(1,u=y),await sn(),!i&&!s.length&&!l.length?d():a==null||a.show()}function c(){a==null||a.hide()}function d(){c(),r("confirm")}const m=()=>c(),h=()=>d();function g(y){ie[y?"unshift":"push"](()=>{a=y,t(3,a)})}function b(y){ze.call(this,n,y)}function k(y){ze.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&2&&t(2,i=(u==null?void 0:u.originalName)!=(u==null?void 0:u.name)),n.$$.dirty&2&&t(5,s=(u==null?void 0:u.schema.filter(y=>y.id&&!y.toDelete&&y.originalName!=y.name))||[]),n.$$.dirty&2&&t(4,l=(u==null?void 0:u.schema.filter(y=>y.id&&y.toDelete))||[]),n.$$.dirty&6&&t(6,o=i||!(u!=null&&u.isView))},[c,u,i,a,l,s,o,d,f,m,h,g,b,k]}class LC extends ye{constructor(e){super(),ve(this,e,PC,IC,he,{show:8,hide:0})}get show(){return this.$$.ctx[8]}get hide(){return this.$$.ctx[0]}}function Nd(n,e,t){const i=n.slice();return i[47]=e[t][0],i[48]=e[t][1],i}function NC(n){let e,t,i;function s(o){n[32](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new j$({props:l}),ie.push(()=>ge(e,"collection",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function FC(n){let e,t,i;function s(o){n[31](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new oC({props:l}),ie.push(()=>ge(e,"collection",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function Fd(n){let e,t,i,s;function l(r){n[33](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new eC({props:o}),ie.push(()=>ge(t,"collection",l)),{c(){e=v("div"),H(t.$$.fragment),p(e,"class","tab-item active")},m(r,a){S(r,e,a),q(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],ke(()=>i=!1)),t.$set(u)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){I(t.$$.fragment,r),s=!1},d(r){r&&w(e),j(t)}}}function Rd(n){let e,t,i,s;function l(r){n[34](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new DC({props:o}),ie.push(()=>ge(t,"collection",l)),{c(){e=v("div"),H(t.$$.fragment),p(e,"class","tab-item"),Q(e,"active",n[3]===Os)},m(r,a){S(r,e,a),q(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],ke(()=>i=!1)),t.$set(u),(!s||a[0]&8)&&Q(e,"active",r[3]===Os)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){I(t.$$.fragment,r),s=!1},d(r){r&&w(e),j(t)}}}function RC(n){let e,t,i,s,l,o,r;const a=[FC,NC],u=[];function f(m,h){return m[2].isView?0:1}i=f(n),s=u[i]=a[i](n);let c=n[3]===bl&&Fd(n),d=n[2].isAuth&&Rd(n);return{c(){e=v("div"),t=v("div"),s.c(),l=O(),c&&c.c(),o=O(),d&&d.c(),p(t,"class","tab-item"),Q(t,"active",n[3]===yi),p(e,"class","tabs-content svelte-12y0yzb")},m(m,h){S(m,e,h),_(e,t),u[i].m(t,null),_(e,l),c&&c.m(e,null),_(e,o),d&&d.m(e,null),r=!0},p(m,h){let g=i;i=f(m),i===g?u[i].p(m,h):(ae(),I(u[g],1,1,()=>{u[g]=null}),ue(),s=u[i],s?s.p(m,h):(s=u[i]=a[i](m),s.c()),A(s,1),s.m(t,null)),(!r||h[0]&8)&&Q(t,"active",m[3]===yi),m[3]===bl?c?(c.p(m,h),h[0]&8&&A(c,1)):(c=Fd(m),c.c(),A(c,1),c.m(e,o)):c&&(ae(),I(c,1,1,()=>{c=null}),ue()),m[2].isAuth?d?(d.p(m,h),h[0]&4&&A(d,1)):(d=Rd(m),d.c(),A(d,1),d.m(e,null)):d&&(ae(),I(d,1,1,()=>{d=null}),ue())},i(m){r||(A(s),A(c),A(d),r=!0)},o(m){I(s),I(c),I(d),r=!1},d(m){m&&w(e),u[i].d(),c&&c.d(),d&&d.d()}}}function qd(n){let e,t,i,s,l,o,r;return o=new ei({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[qC]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=O(),i=v("button"),s=v("i"),l=O(),H(o.$$.fragment),p(e,"class","flex-fill"),p(s,"class","ri-more-line"),p(i,"type","button"),p(i,"aria-label","More"),p(i,"class","btn btn-sm btn-circle btn-transparent flex-gap-0")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),_(i,s),_(i,l),q(o,i,null),r=!0},p(a,u){const f={};u[1]&1048576&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(A(o.$$.fragment,a),r=!0)},o(a){I(o.$$.fragment,a),r=!1},d(a){a&&w(e),a&&w(t),a&&w(i),j(o)}}}function qC(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML=` + Duplicate`,t=O(),i=v("button"),i.innerHTML=` + Delete`,p(e,"type","button"),p(e,"class","dropdown-item closable"),p(i,"type","button"),p(i,"class","dropdown-item txt-danger closable")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=[Y(e,"click",n[23]),Y(i,"click",kn(dt(n[24])))],s=!0)},p:Z,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Pe(l)}}}function jd(n){let e,t,i,s;return i=new ei({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[jC]},$$scope:{ctx:n}}}),{c(){e=v("i"),t=O(),H(i.$$.fragment),p(e,"class","ri-arrow-down-s-fill")},m(l,o){S(l,e,o),S(l,t,o),q(i,l,o),s=!0},p(l,o){const r={};o[0]&68|o[1]&1048576&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){I(i.$$.fragment,l),s=!1},d(l){l&&w(e),l&&w(t),j(i,l)}}}function Hd(n){let e,t,i,s,l,o=n[48]+"",r,a,u,f,c;function d(){return n[26](n[47])}return{c(){e=v("button"),t=v("i"),s=O(),l=v("span"),r=B(o),a=B(" collection"),u=O(),p(t,"class",i=Si(z.getCollectionTypeIcon(n[47]))+" svelte-12y0yzb"),p(l,"class","txt"),p(e,"type","button"),p(e,"class","dropdown-item closable"),Q(e,"selected",n[47]==n[2].type)},m(m,h){S(m,e,h),_(e,t),_(e,s),_(e,l),_(l,r),_(l,a),_(e,u),f||(c=Y(e,"click",d),f=!0)},p(m,h){n=m,h[0]&64&&i!==(i=Si(z.getCollectionTypeIcon(n[47]))+" svelte-12y0yzb")&&p(t,"class",i),h[0]&64&&o!==(o=n[48]+"")&&le(r,o),h[0]&68&&Q(e,"selected",n[47]==n[2].type)},d(m){m&&w(e),f=!1,c()}}}function jC(n){let e,t=Object.entries(n[6]),i=[];for(let s=0;s{N=null}),ue()),(!E||X[0]&4&&$!==($="btn btn-sm p-r-10 p-l-10 "+(R[2].isNew?"btn-outline":"btn-transparent")))&&p(d,"class",$),(!E||X[0]&4&&M!==(M=!R[2].isNew))&&(d.disabled=M),R[2].system?F||(F=Vd(),F.c(),F.m(D.parentNode,D)):F&&(F.d(1),F=null)},i(R){E||(A(N),E=!0)},o(R){I(N),E=!1},d(R){R&&w(e),R&&w(s),R&&w(l),R&&w(f),R&&w(c),N&&N.d(),R&&w(C),F&&F.d(R),R&&w(D),P=!1,L()}}}function zd(n){let e,t,i,s,l,o;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(r,a){S(r,e,a),s=!0,l||(o=Ie(t=Be.call(null,e,n[11])),l=!0)},p(r,a){t&&Bt(t.update)&&a[0]&2048&&t.update.call(null,r[11])},i(r){s||(r&&xe(()=>{i||(i=je(e,It,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(r){r&&(i||(i=je(e,It,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&w(e),r&&i&&i.end(),l=!1,o()}}}function Bd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ie(Be.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&xe(()=>{t||(t=je(e,It,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=je(e,It,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function Ud(n){var a,u,f;let e,t,i,s=!z.isEmpty((a=n[5])==null?void 0:a.options)&&!((f=(u=n[5])==null?void 0:u.options)!=null&&f.manageRule),l,o,r=s&&Wd();return{c(){e=v("button"),t=v("span"),t.textContent="Options",i=O(),r&&r.c(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","tab-item"),Q(e,"active",n[3]===Os)},m(c,d){S(c,e,d),_(e,t),_(e,i),r&&r.m(e,null),l||(o=Y(e,"click",n[30]),l=!0)},p(c,d){var m,h,g;d[0]&32&&(s=!z.isEmpty((m=c[5])==null?void 0:m.options)&&!((g=(h=c[5])==null?void 0:h.options)!=null&&g.manageRule)),s?r?d[0]&32&&A(r,1):(r=Wd(),r.c(),A(r,1),r.m(e,null)):r&&(ae(),I(r,1,1,()=>{r=null}),ue()),d[0]&8&&Q(e,"active",c[3]===Os)},d(c){c&&w(e),r&&r.d(),l=!1,o()}}}function Wd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ie(Be.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&xe(()=>{t||(t=je(e,It,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=je(e,It,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function VC(n){var se,W,G,te,K,re,J,de;let e,t=n[2].isNew?"New collection":"Edit collection",i,s,l,o,r,a,u,f,c,d,m,h=(se=n[2])!=null&&se.isView?"Query":"Fields",g,b,k=!z.isEmpty(n[11]),y,T,$,M,C=!z.isEmpty((W=n[5])==null?void 0:W.listRule)||!z.isEmpty((G=n[5])==null?void 0:G.viewRule)||!z.isEmpty((te=n[5])==null?void 0:te.createRule)||!z.isEmpty((K=n[5])==null?void 0:K.updateRule)||!z.isEmpty((re=n[5])==null?void 0:re.deleteRule)||!z.isEmpty((de=(J=n[5])==null?void 0:J.options)==null?void 0:de.manageRule),D,E,P,L,N=!n[2].isNew&&!n[2].system&&qd(n);r=new me({props:{class:"form-field collection-field-name required m-b-0 "+(n[13]?"disabled":""),name:"name",$$slots:{default:[HC,({uniqueId:_e})=>({46:_e}),({uniqueId:_e})=>[0,_e?32768:0]]},$$scope:{ctx:n}}});let F=k&&zd(n),R=C&&Bd(),X=n[2].isAuth&&Ud(n);return{c(){e=v("h4"),i=B(t),s=O(),N&&N.c(),l=O(),o=v("form"),H(r.$$.fragment),a=O(),u=v("input"),f=O(),c=v("div"),d=v("button"),m=v("span"),g=B(h),b=O(),F&&F.c(),y=O(),T=v("button"),$=v("span"),$.textContent="API Rules",M=O(),R&&R.c(),D=O(),X&&X.c(),p(e,"class","upsert-panel-title svelte-12y0yzb"),p(u,"type","submit"),p(u,"class","hidden"),p(u,"tabindex","-1"),p(o,"class","block"),p(m,"class","txt"),p(d,"type","button"),p(d,"class","tab-item"),Q(d,"active",n[3]===yi),p($,"class","txt"),p(T,"type","button"),p(T,"class","tab-item"),Q(T,"active",n[3]===bl),p(c,"class","tabs-header stretched")},m(_e,$e){S(_e,e,$e),_(e,i),S(_e,s,$e),N&&N.m(_e,$e),S(_e,l,$e),S(_e,o,$e),q(r,o,null),_(o,a),_(o,u),S(_e,f,$e),S(_e,c,$e),_(c,d),_(d,m),_(m,g),_(d,b),F&&F.m(d,null),_(c,y),_(c,T),_(T,$),_(T,M),R&&R.m(T,null),_(c,D),X&&X.m(c,null),E=!0,P||(L=[Y(o,"submit",dt(n[27])),Y(d,"click",n[28]),Y(T,"click",n[29])],P=!0)},p(_e,$e){var Re,be,Se,We,lt,fe,Ve,ee;(!E||$e[0]&4)&&t!==(t=_e[2].isNew?"New collection":"Edit collection")&&le(i,t),!_e[2].isNew&&!_e[2].system?N?(N.p(_e,$e),$e[0]&4&&A(N,1)):(N=qd(_e),N.c(),A(N,1),N.m(l.parentNode,l)):N&&(ae(),I(N,1,1,()=>{N=null}),ue());const Ne={};$e[0]&8192&&(Ne.class="form-field collection-field-name required m-b-0 "+(_e[13]?"disabled":"")),$e[0]&8260|$e[1]&1081344&&(Ne.$$scope={dirty:$e,ctx:_e}),r.$set(Ne),(!E||$e[0]&4)&&h!==(h=(Re=_e[2])!=null&&Re.isView?"Query":"Fields")&&le(g,h),$e[0]&2048&&(k=!z.isEmpty(_e[11])),k?F?(F.p(_e,$e),$e[0]&2048&&A(F,1)):(F=zd(_e),F.c(),A(F,1),F.m(d,null)):F&&(ae(),I(F,1,1,()=>{F=null}),ue()),(!E||$e[0]&8)&&Q(d,"active",_e[3]===yi),$e[0]&32&&(C=!z.isEmpty((be=_e[5])==null?void 0:be.listRule)||!z.isEmpty((Se=_e[5])==null?void 0:Se.viewRule)||!z.isEmpty((We=_e[5])==null?void 0:We.createRule)||!z.isEmpty((lt=_e[5])==null?void 0:lt.updateRule)||!z.isEmpty((fe=_e[5])==null?void 0:fe.deleteRule)||!z.isEmpty((ee=(Ve=_e[5])==null?void 0:Ve.options)==null?void 0:ee.manageRule)),C?R?$e[0]&32&&A(R,1):(R=Bd(),R.c(),A(R,1),R.m(T,null)):R&&(ae(),I(R,1,1,()=>{R=null}),ue()),(!E||$e[0]&8)&&Q(T,"active",_e[3]===bl),_e[2].isAuth?X?X.p(_e,$e):(X=Ud(_e),X.c(),X.m(c,null)):X&&(X.d(1),X=null)},i(_e){E||(A(N),A(r.$$.fragment,_e),A(F),A(R),E=!0)},o(_e){I(N),I(r.$$.fragment,_e),I(F),I(R),E=!1},d(_e){_e&&w(e),_e&&w(s),N&&N.d(_e),_e&&w(l),_e&&w(o),j(r),_e&&w(f),_e&&w(c),F&&F.d(),R&&R.d(),X&&X.d(),P=!1,Pe(L)}}}function zC(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),s=v("button"),l=v("span"),r=B(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[9],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-expanded"),s.disabled=a=!n[12]||n[9],Q(s,"btn-loading",n[9])},m(c,d){S(c,e,d),_(e,t),S(c,i,d),S(c,s,d),_(s,l),_(l,r),u||(f=[Y(e,"click",n[21]),Y(s,"click",n[22])],u=!0)},p(c,d){d[0]&512&&(e.disabled=c[9]),d[0]&4&&o!==(o=c[2].isNew?"Create":"Save changes")&&le(r,o),d[0]&4608&&a!==(a=!c[12]||c[9])&&(s.disabled=a),d[0]&512&&Q(s,"btn-loading",c[9])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function BC(n){let e,t,i,s,l={class:"overlay-panel-lg colored-header collection-panel",beforeHide:n[35],$$slots:{footer:[zC],header:[VC],default:[RC]},$$scope:{ctx:n}};e=new Nn({props:l}),n[36](e),e.$on("hide",n[37]),e.$on("show",n[38]);let o={};return i=new LC({props:o}),n[39](i),i.$on("confirm",n[40]),{c(){H(e.$$.fragment),t=O(),H(i.$$.fragment)},m(r,a){q(e,r,a),S(r,t,a),q(i,r,a),s=!0},p(r,a){const u={};a[0]&1040&&(u.beforeHide=r[35]),a[0]&14956|a[1]&1048576&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};i.$set(f)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){I(e.$$.fragment,r),I(i.$$.fragment,r),s=!1},d(r){n[36](null),j(e,r),r&&w(t),n[39](null),j(i,r)}}}const yi="schema",bl="api_rules",Os="options",UC="base",Yd="auth",WC="view";function Dr(n){return JSON.stringify(n)}function YC(n,e,t){let i,s,l,o;Ye(n,fi,ee=>t(5,o=ee));const r={};r[UC]="Base",r[WC]="View",r[Yd]="Auth";const a=Ct();let u,f,c=null,d=new pn,m=!1,h=!1,g=yi,b=Dr(d),k="";function y(ee){t(3,g=ee)}function T(ee){return M(ee),t(10,h=!0),y(yi),u==null?void 0:u.show()}function $(){return u==null?void 0:u.hide()}async function M(ee){Bn({}),typeof ee<"u"?(c=ee,t(2,d=ee==null?void 0:ee.clone())):(c=null,t(2,d=new pn)),t(2,d.schema=d.schema||[],d),t(2,d.originalName=d.name||"",d),await sn(),t(20,b=Dr(d))}function C(){if(d.isNew)return D();f==null||f.show(d)}function D(){if(m)return;t(9,m=!0);const ee=E();let Fe;d.isNew?Fe=pe.collections.create(ee):Fe=pe.collections.update(d.id,ee),Fe.then(ot=>{$a(),Tb(ot.id),t(10,h=!1),$(),zt(d.isNew?"Successfully created collection.":"Successfully updated collection."),a("save",{isNew:d.isNew,collection:ot})}).catch(ot=>{pe.errorResponseHandler(ot)}).finally(()=>{t(9,m=!1)})}function E(){const ee=d.export();ee.schema=ee.schema.slice(0);for(let Fe=ee.schema.length-1;Fe>=0;Fe--)ee.schema[Fe].toDelete&&ee.schema.splice(Fe,1);return ee}function P(){c!=null&&c.id&&cn(`Do you really want to delete collection "${c==null?void 0:c.name}" and all its records?`,()=>pe.collections.delete(c==null?void 0:c.id).then(()=>{$(),zt(`Successfully deleted collection "${c==null?void 0:c.name}".`),a("delete",c),D3(c)}).catch(ee=>{pe.errorResponseHandler(ee)}))}function L(ee){t(2,d.type=ee,d),Qi("schema")}function N(){s?cn("You have unsaved changes. Do you really want to discard them?",()=>{F()}):F()}async function F(){const ee=c==null?void 0:c.clone();if(ee&&(ee.id="",ee.created="",ee.updated="",ee.name+="_duplicate",!z.isEmpty(ee.schema)))for(const Fe of ee.schema)Fe.id="";T(ee),await sn(),t(20,b="")}const R=()=>$(),X=()=>C(),se=()=>N(),W=()=>P(),G=ee=>{t(2,d.name=z.slugify(ee.target.value),d),ee.target.value=d.name},te=ee=>L(ee),K=()=>{l&&C()},re=()=>y(yi),J=()=>y(bl),de=()=>y(Os);function _e(ee){d=ee,t(2,d)}function $e(ee){d=ee,t(2,d)}function Ne(ee){d=ee,t(2,d)}function Re(ee){d=ee,t(2,d)}const be=()=>s&&h?(cn("You have unsaved changes. Do you really want to close the panel?",()=>{t(10,h=!1),$()}),!1):!0;function Se(ee){ie[ee?"unshift":"push"](()=>{u=ee,t(7,u)})}function We(ee){ze.call(this,n,ee)}function lt(ee){ze.call(this,n,ee)}function fe(ee){ie[ee?"unshift":"push"](()=>{f=ee,t(8,f)})}const Ve=()=>D();return n.$$.update=()=>{var ee;n.$$.dirty[0]&32&&(o.schema||(ee=o.options)!=null&&ee.query?t(11,k=z.getNestedVal(o,"schema.message")||"Has errors"):t(11,k="")),n.$$.dirty[0]&4&&t(13,i=!d.isNew&&d.system),n.$$.dirty[0]&1048580&&t(4,s=b!=Dr(d)),n.$$.dirty[0]&20&&t(12,l=d.isNew||s),n.$$.dirty[0]&12&&g===Os&&d.type!==Yd&&y(yi)},[y,$,d,g,s,o,r,u,f,m,h,k,l,i,C,D,P,L,N,T,b,R,X,se,W,G,te,K,re,J,de,_e,$e,Ne,Re,be,Se,We,lt,fe,Ve]}class tu extends ye{constructor(e){super(),ve(this,e,YC,BC,he,{changeTab:0,show:19,hide:1},null,[-1,-1])}get changeTab(){return this.$$.ctx[0]}get show(){return this.$$.ctx[19]}get hide(){return this.$$.ctx[1]}}function Kd(n,e,t){const i=n.slice();return i[15]=e[t],i}function Jd(n){let e,t=n[1].length&&Zd();return{c(){t&&t.c(),e=Me()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1].length?t||(t=Zd(),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function Zd(n){let e;return{c(){e=v("p"),e.textContent="No collections found.",p(e,"class","txt-hint m-t-10 m-b-10 txt-center")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Gd(n,e){let t,i,s,l,o,r=e[15].name+"",a,u,f,c,d;return{key:n,first:null,c(){var m;t=v("a"),i=v("i"),l=O(),o=v("span"),a=B(r),u=O(),p(i,"class",s=z.getCollectionTypeIcon(e[15].type)),p(o,"class","txt"),p(t,"href",f="/collections?collectionId="+e[15].id),p(t,"class","sidebar-list-item"),Q(t,"active",((m=e[5])==null?void 0:m.id)===e[15].id),this.first=t},m(m,h){S(m,t,h),_(t,i),_(t,l),_(t,o),_(o,a),_(t,u),c||(d=Ie(xt.call(null,t)),c=!0)},p(m,h){var g;e=m,h&8&&s!==(s=z.getCollectionTypeIcon(e[15].type))&&p(i,"class",s),h&8&&r!==(r=e[15].name+"")&&le(a,r),h&8&&f!==(f="/collections?collectionId="+e[15].id)&&p(t,"href",f),h&40&&Q(t,"active",((g=e[5])==null?void 0:g.id)===e[15].id)},d(m){m&&w(t),c=!1,d()}}}function Xd(n){let e,t,i,s;return{c(){e=v("footer"),t=v("button"),t.innerHTML=` + New collection`,p(t,"type","button"),p(t,"class","btn btn-block btn-outline"),p(e,"class","sidebar-footer")},m(l,o){S(l,e,o),_(e,t),i||(s=Y(t,"click",n[12]),i=!0)},p:Z,d(l){l&&w(e),i=!1,s()}}}function KC(n){let e,t,i,s,l,o,r,a,u,f,c,d=[],m=new Map,h,g,b,k,y,T,$=n[3];const M=P=>P[15].id;for(let P=0;P<$.length;P+=1){let L=Kd(n,$,P),N=M(L);m.set(N,d[P]=Gd(N,L))}let C=null;$.length||(C=Jd(n));let D=!n[7]&&Xd(n),E={};return b=new tu({props:E}),n[13](b),b.$on("save",n[14]),{c(){e=v("aside"),t=v("header"),i=v("div"),s=v("div"),l=v("button"),l.innerHTML='',o=O(),r=v("input"),a=O(),u=v("hr"),f=O(),c=v("div");for(let P=0;P20),p(e,"class","page-sidebar collection-sidebar")},m(P,L){S(P,e,L),_(e,t),_(t,i),_(i,s),_(s,l),_(i,o),_(i,r),ce(r,n[0]),_(e,a),_(e,u),_(e,f),_(e,c);for(let N=0;N20),P[7]?D&&(D.d(1),D=null):D?D.p(P,L):(D=Xd(P),D.c(),D.m(e,null));const N={};b.$set(N)},i(P){k||(A(b.$$.fragment,P),k=!0)},o(P){I(b.$$.fragment,P),k=!1},d(P){P&&w(e);for(let L=0;L{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function ZC(n,e,t){let i,s,l,o,r,a,u;Ye(n,Mi,y=>t(5,o=y)),Ye(n,Ai,y=>t(9,r=y)),Ye(n,Po,y=>t(6,a=y)),Ye(n,$s,y=>t(7,u=y));let f,c="";function d(y){Kt(Mi,o=y,o)}const m=()=>t(0,c="");function h(){c=this.value,t(0,c)}const g=()=>f==null?void 0:f.show();function b(y){ie[y?"unshift":"push"](()=>{f=y,t(2,f)})}const k=y=>{var T;(T=y.detail)!=null&&T.isNew&&y.detail.collection&&d(y.detail.collection)};return n.$$.update=()=>{n.$$.dirty&512&&r&&JC(),n.$$.dirty&1&&t(1,i=c.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=c!==""),n.$$.dirty&515&&t(3,l=r.filter(y=>y.id==c||y.name.replace(/\s+/g,"").toLowerCase().includes(i)))},[c,i,f,l,s,o,a,u,d,r,m,h,g,b,k]}class GC extends ye{constructor(e){super(),ve(this,e,ZC,KC,he,{})}}function Qd(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function xd(n){n[18]=n[19].default}function ep(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function tp(n){let e;return{c(){e=v("hr"),p(e,"class","m-t-sm m-b-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function np(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,c=i&&tp();function d(){return e[9](e[14])}return{key:n,first:null,c(){t=Me(),c&&c.c(),s=O(),l=v("button"),r=B(o),a=O(),p(l,"type","button"),p(l,"class","sidebar-item"),Q(l,"active",e[5]===e[14]),this.first=t},m(m,h){S(m,t,h),c&&c.m(m,h),S(m,s,h),S(m,l,h),_(l,r),_(l,a),u||(f=Y(l,"click",d),u=!0)},p(m,h){e=m,h&8&&(i=e[21]===Object.keys(e[6]).length),i?c||(c=tp(),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null),h&8&&o!==(o=e[15].label+"")&&le(r,o),h&40&&Q(l,"active",e[5]===e[14])},d(m){m&&w(t),c&&c.d(m),m&&w(s),m&&w(l),u=!1,f()}}}function ip(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:xC,then:QC,catch:XC,value:19,blocks:[,,,]};return ou(t=n[15].component,s),{c(){e=Me(),s.block.c()},m(l,o){S(l,e,o),s.block.m(l,s.anchor=o),s.mount=()=>e.parentNode,s.anchor=e,i=!0},p(l,o){n=l,s.ctx=n,o&8&&t!==(t=n[15].component)&&ou(t,s)||e1(s,n,o)},i(l){i||(A(s.block),i=!0)},o(l){for(let o=0;o<3;o+=1){const r=s.blocks[o];I(r)}i=!1},d(l){l&&w(e),s.block.d(l),s.token=null,s=null}}}function XC(n){return{c:Z,m:Z,p:Z,i:Z,o:Z,d:Z}}function QC(n){xd(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){H(e.$$.fragment),t=O()},m(s,l){q(e,s,l),S(s,t,l),i=!0},p(s,l){xd(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(A(e.$$.fragment,s),i=!0)},o(s){I(e.$$.fragment,s),i=!1},d(s){j(e,s),s&&w(t)}}}function xC(n){return{c:Z,m:Z,p:Z,i:Z,o:Z,d:Z}}function sp(n,e){let t,i,s,l=e[5]===e[14]&&ip(e);return{key:n,first:null,c(){t=Me(),l&&l.c(),i=Me(),this.first=t},m(o,r){S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){e=o,e[5]===e[14]?l?(l.p(e,r),r&40&&A(l,1)):(l=ip(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),I(l,1,1,()=>{l=null}),ue())},i(o){s||(A(l),s=!0)},o(o){I(l),s=!1},d(o){o&&w(t),l&&l.d(o),o&&w(i)}}}function e4(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,c=Object.entries(n[3]);const d=g=>g[14];for(let g=0;gg[14];for(let g=0;gClose',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=Y(e,"click",n[8]),t=!0)},p:Z,d(s){s&&w(e),t=!1,i()}}}function n4(n){let e,t,i={class:"docs-panel",$$slots:{footer:[t4],default:[e4]},$$scope:{ctx:n}};return e=new Nn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){H(e.$$.fragment)},m(s,l){q(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[10](null),j(e,s)}}}function i4(n,e,t){const i={list:{label:"List/Search",component:rt(()=>import("./ListApiDocs-d17d7325.js"),["./ListApiDocs-d17d7325.js","./SdkTabs-5b973c0d.js","./SdkTabs-9b0b7a06.css","./ListApiDocs-68f52edd.css"],import.meta.url)},view:{label:"View",component:rt(()=>import("./ViewApiDocs-da1553a5.js"),["./ViewApiDocs-da1553a5.js","./SdkTabs-5b973c0d.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},create:{label:"Create",component:rt(()=>import("./CreateApiDocs-32d5a929.js"),["./CreateApiDocs-32d5a929.js","./SdkTabs-5b973c0d.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},update:{label:"Update",component:rt(()=>import("./UpdateApiDocs-66c52be5.js"),["./UpdateApiDocs-66c52be5.js","./SdkTabs-5b973c0d.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},delete:{label:"Delete",component:rt(()=>import("./DeleteApiDocs-3a858be4.js"),["./DeleteApiDocs-3a858be4.js","./SdkTabs-5b973c0d.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:rt(()=>import("./RealtimeApiDocs-bab3bf58.js"),["./RealtimeApiDocs-bab3bf58.js","./SdkTabs-5b973c0d.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:rt(()=>import("./AuthWithPasswordDocs-f5651e67.js"),["./AuthWithPasswordDocs-f5651e67.js","./SdkTabs-5b973c0d.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:rt(()=>import("./AuthWithOAuth2Docs-08a04f0f.js"),["./AuthWithOAuth2Docs-08a04f0f.js","./SdkTabs-5b973c0d.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},refresh:{label:"Auth refresh",component:rt(()=>import("./AuthRefreshDocs-82bf2d4d.js"),["./AuthRefreshDocs-82bf2d4d.js","./SdkTabs-5b973c0d.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-verification":{label:"Request verification",component:rt(()=>import("./RequestVerificationDocs-fa3c623a.js"),["./RequestVerificationDocs-fa3c623a.js","./SdkTabs-5b973c0d.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:rt(()=>import("./ConfirmVerificationDocs-4f3afd09.js"),["./ConfirmVerificationDocs-4f3afd09.js","./SdkTabs-5b973c0d.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:rt(()=>import("./RequestPasswordResetDocs-aa324f13.js"),["./RequestPasswordResetDocs-aa324f13.js","./SdkTabs-5b973c0d.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:rt(()=>import("./ConfirmPasswordResetDocs-d848311f.js"),["./ConfirmPasswordResetDocs-d848311f.js","./SdkTabs-5b973c0d.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:rt(()=>import("./RequestEmailChangeDocs-327245a0.js"),["./RequestEmailChangeDocs-327245a0.js","./SdkTabs-5b973c0d.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:rt(()=>import("./ConfirmEmailChangeDocs-d42af417.js"),["./ConfirmEmailChangeDocs-d42af417.js","./SdkTabs-5b973c0d.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:rt(()=>import("./AuthMethodsDocs-97cd7d05.js"),["./AuthMethodsDocs-97cd7d05.js","./SdkTabs-5b973c0d.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:rt(()=>import("./ListExternalAuthsDocs-d4af9a48.js"),["./ListExternalAuthsDocs-d4af9a48.js","./SdkTabs-5b973c0d.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:rt(()=>import("./UnlinkExternalAuthDocs-6ceca8bb.js"),["./UnlinkExternalAuthDocs-6ceca8bb.js","./SdkTabs-5b973c0d.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}};let l,o=new pn,r,a=[];a.length&&(r=Object.keys(a)[0]);function u(k){return t(2,o=k),c(Object.keys(a)[0]),l==null?void 0:l.show()}function f(){return l==null?void 0:l.hide()}function c(k){t(5,r=k)}const d=()=>f(),m=k=>c(k);function h(k){ie[k?"unshift":"push"](()=>{l=k,t(4,l)})}function g(k){ze.call(this,n,k)}function b(k){ze.call(this,n,k)}return n.$$.update=()=>{n.$$.dirty&12&&(o.isAuth?(t(3,a=Object.assign({},i,s)),!(o!=null&&o.options.allowUsernameAuth)&&!(o!=null&&o.options.allowEmailAuth)&&delete a["auth-with-password"],o!=null&&o.options.allowOAuth2Auth||delete a["auth-with-oauth2"]):o.isView?(t(3,a=Object.assign({},i)),delete a.create,delete a.update,delete a.delete,delete a.realtime):t(3,a=Object.assign({},i)))},[f,c,o,a,l,r,i,u,d,m,h,g,b]}class s4 extends ye{constructor(e){super(),ve(this,e,i4,n4,he,{show:7,hide:0,changeTab:1})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}get changeTab(){return this.$$.ctx[1]}}function l4(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Username",o=O(),r=v("input"),p(t,"class",z.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","text"),p(r,"requried",a=!n[0].isNew),p(r,"placeholder",u=n[0].isNew?"Leave empty to auto generate...":n[3]),p(r,"id",f=n[12])},m(m,h){S(m,e,h),_(e,t),_(e,i),_(e,s),S(m,o,h),S(m,r,h),ce(r,n[0].username),c||(d=Y(r,"input",n[4]),c=!0)},p(m,h){h&4096&&l!==(l=m[12])&&p(e,"for",l),h&1&&a!==(a=!m[0].isNew)&&p(r,"requried",a),h&1&&u!==(u=m[0].isNew?"Leave empty to auto generate...":m[3])&&p(r,"placeholder",u),h&4096&&f!==(f=m[12])&&p(r,"id",f),h&1&&r.value!==m[0].username&&ce(r,m[0].username)},d(m){m&&w(e),m&&w(o),m&&w(r),c=!1,d()}}}function o4(n){let e,t,i,s,l,o,r,a,u,f,c=n[0].emailVisibility?"On":"Off",d,m,h,g,b,k,y,T,$;return{c(){var M;e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Email",o=O(),r=v("div"),a=v("button"),u=v("span"),f=B("Public: "),d=B(c),h=O(),g=v("input"),p(t,"class",z.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[12]),p(u,"class","txt"),p(a,"type","button"),p(a,"class",m="btn btn-sm btn-transparent "+(n[0].emailVisibility?"btn-success":"btn-hint")),p(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),p(g,"type","email"),g.autofocus=b=n[0].isNew,p(g,"autocomplete","off"),p(g,"id",k=n[12]),g.required=y=(M=n[1].options)==null?void 0:M.requireEmail,p(g,"class","svelte-1751a4d")},m(M,C){S(M,e,C),_(e,t),_(e,i),_(e,s),S(M,o,C),S(M,r,C),_(r,a),_(a,u),_(u,f),_(u,d),S(M,h,C),S(M,g,C),ce(g,n[0].email),n[0].isNew&&g.focus(),T||($=[Ie(Be.call(null,a,{text:"Make email public or private",position:"top-right"})),Y(a,"click",n[5]),Y(g,"input",n[6])],T=!0)},p(M,C){var D;C&4096&&l!==(l=M[12])&&p(e,"for",l),C&1&&c!==(c=M[0].emailVisibility?"On":"Off")&&le(d,c),C&1&&m!==(m="btn btn-sm btn-transparent "+(M[0].emailVisibility?"btn-success":"btn-hint"))&&p(a,"class",m),C&1&&b!==(b=M[0].isNew)&&(g.autofocus=b),C&4096&&k!==(k=M[12])&&p(g,"id",k),C&2&&y!==(y=(D=M[1].options)==null?void 0:D.requireEmail)&&(g.required=y),C&1&&g.value!==M[0].email&&ce(g,M[0].email)},d(M){M&&w(e),M&&w(o),M&&w(r),M&&w(h),M&&w(g),T=!1,Pe($)}}}function lp(n){let e,t;return e=new me({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[r4,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,s){const l={};s&12292&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function r4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[2],S(u,i,f),S(u,s,f),_(s,l),r||(a=Y(e,"change",n[7]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&4&&(e.checked=u[2]),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function op(n){let e,t,i,s,l,o,r,a,u;return s=new me({props:{class:"form-field required",name:"password",$$slots:{default:[a4,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),r=new me({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[u4,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),H(s.$$.fragment),l=O(),o=v("div"),H(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),Q(t,"p-t-xs",n[2]),p(e,"class","block")},m(f,c){S(f,e,c),_(e,t),_(t,i),q(s,i,null),_(t,l),_(t,o),q(r,o,null),u=!0},p(f,c){const d={};c&12289&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const m={};c&12289&&(m.$$scope={dirty:c,ctx:f}),r.$set(m),(!u||c&4)&&Q(t,"p-t-xs",f[2])},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&xe(()=>{a||(a=je(e,At,{duration:150},!0)),a.run(1)}),u=!0)},o(f){I(s.$$.fragment,f),I(r.$$.fragment,f),f&&(a||(a=je(e,At,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),j(s),j(r),f&&a&&a.end()}}}function a4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[12]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),ce(r,n[0].password),u||(f=Y(r,"input",n[8]),u=!0)},p(c,d){d&4096&&l!==(l=c[12])&&p(e,"for",l),d&4096&&a!==(a=c[12])&&p(r,"id",a),d&1&&r.value!==c[0].password&&ce(r,c[0].password)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function u4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password confirm",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[12]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),ce(r,n[0].passwordConfirm),u||(f=Y(r,"input",n[9]),u=!0)},p(c,d){d&4096&&l!==(l=c[12])&&p(e,"for",l),d&4096&&a!==(a=c[12])&&p(r,"id",a),d&1&&r.value!==c[0].passwordConfirm&&ce(r,c[0].passwordConfirm)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function f4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Verified"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].verified,S(u,i,f),S(u,s,f),_(s,l),r||(a=[Y(e,"change",n[10]),Y(e,"change",dt(n[11]))],r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].verified),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Pe(a)}}}function c4(n){var b;let e,t,i,s,l,o,r,a,u,f,c,d,m;i=new me({props:{class:"form-field "+(n[0].isNew?"":"required"),name:"username",$$slots:{default:[l4,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}}),o=new me({props:{class:"form-field "+((b=n[1].options)!=null&&b.requireEmail?"required":""),name:"email",$$slots:{default:[o4,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}});let h=!n[0].isNew&&lp(n),g=(n[0].isNew||n[2])&&op(n);return d=new me({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[f4,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=O(),l=v("div"),H(o.$$.fragment),r=O(),a=v("div"),h&&h.c(),u=O(),g&&g.c(),f=O(),c=v("div"),H(d.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(a,"class","col-lg-12"),p(c,"class","col-lg-12"),p(e,"class","grid m-b-base")},m(k,y){S(k,e,y),_(e,t),q(i,t,null),_(e,s),_(e,l),q(o,l,null),_(e,r),_(e,a),h&&h.m(a,null),_(a,u),g&&g.m(a,null),_(e,f),_(e,c),q(d,c,null),m=!0},p(k,[y]){var C;const T={};y&1&&(T.class="form-field "+(k[0].isNew?"":"required")),y&12289&&(T.$$scope={dirty:y,ctx:k}),i.$set(T);const $={};y&2&&($.class="form-field "+((C=k[1].options)!=null&&C.requireEmail?"required":"")),y&12291&&($.$$scope={dirty:y,ctx:k}),o.$set($),k[0].isNew?h&&(ae(),I(h,1,1,()=>{h=null}),ue()):h?(h.p(k,y),y&1&&A(h,1)):(h=lp(k),h.c(),A(h,1),h.m(a,u)),k[0].isNew||k[2]?g?(g.p(k,y),y&5&&A(g,1)):(g=op(k),g.c(),A(g,1),g.m(a,null)):g&&(ae(),I(g,1,1,()=>{g=null}),ue());const M={};y&12289&&(M.$$scope={dirty:y,ctx:k}),d.$set(M)},i(k){m||(A(i.$$.fragment,k),A(o.$$.fragment,k),A(h),A(g),A(d.$$.fragment,k),m=!0)},o(k){I(i.$$.fragment,k),I(o.$$.fragment,k),I(h),I(g),I(d.$$.fragment,k),m=!1},d(k){k&&w(e),j(i),j(o),h&&h.d(),g&&g.d(),j(d)}}}function d4(n,e,t){let{collection:i=new pn}=e,{record:s=new Ti}=e,l=s.username||null,o=!1;function r(){s.username=this.value,t(0,s),t(2,o)}const a=()=>t(0,s.emailVisibility=!s.emailVisibility,s);function u(){s.email=this.value,t(0,s),t(2,o)}function f(){o=this.checked,t(2,o)}function c(){s.password=this.value,t(0,s),t(2,o)}function d(){s.passwordConfirm=this.value,t(0,s),t(2,o)}function m(){s.verified=this.checked,t(0,s),t(2,o)}const h=g=>{s.isNew||cn("Do you really want to manually change the verified account state?",()=>{},()=>{t(0,s.verified=!g.target.checked,s)})};return n.$$set=g=>{"collection"in g&&t(1,i=g.collection),"record"in g&&t(0,s=g.record)},n.$$.update=()=>{n.$$.dirty&1&&!s.username&&s.username!==null&&t(0,s.username=null,s),n.$$.dirty&4&&(o||(t(0,s.password=null,s),t(0,s.passwordConfirm=null,s),Qi("password"),Qi("passwordConfirm")))},[s,i,o,l,r,a,u,f,c,d,m,h]}class p4 extends ye{constructor(e){super(),ve(this,e,d4,c4,he,{collection:1,record:0})}}function m4(n){let e,t,i,s=[n[3]],l={};for(let o=0;o{r&&(t(1,r.style.height="",r),t(1,r.style.height=Math.min(r.scrollHeight+2,o)+"px",r))},0)}function f(m){if((m==null?void 0:m.code)==="Enter"&&!(m!=null&&m.shiftKey)&&!(m!=null&&m.isComposing)){m.preventDefault();const h=r.closest("form");h!=null&&h.requestSubmit&&h.requestSubmit()}}Zt(()=>(u(),()=>clearTimeout(a)));function c(m){ie[m?"unshift":"push"](()=>{r=m,t(1,r)})}function d(){l=this.value,t(0,l)}return n.$$set=m=>{e=Je(Je({},e),Qn(m)),t(3,s=Et(e,i)),"value"in m&&t(0,l=m.value),"maxHeight"in m&&t(4,o=m.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof l!==void 0&&u()},[l,r,f,s,o,c,d]}class g4 extends ye{constructor(e){super(),ve(this,e,h4,m4,he,{value:0,maxHeight:4})}}function _4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d;function m(g){n[2](g)}let h={id:n[3],required:n[1].required};return n[0]!==void 0&&(h.value=n[0]),f=new g4({props:h}),ie.push(()=>ge(f,"value",m)),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),H(f.$$.fragment),p(t,"class",i=z.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(g,b){S(g,e,b),_(e,t),_(e,s),_(e,l),_(l,r),S(g,u,b),q(f,g,b),d=!0},p(g,b){(!d||b&2&&i!==(i=z.getFieldTypeIcon(g[1].type)))&&p(t,"class",i),(!d||b&2)&&o!==(o=g[1].name+"")&&le(r,o),(!d||b&8&&a!==(a=g[3]))&&p(e,"for",a);const k={};b&8&&(k.id=g[3]),b&2&&(k.required=g[1].required),!c&&b&1&&(c=!0,k.value=g[0],ke(()=>c=!1)),f.$set(k)},i(g){d||(A(f.$$.fragment,g),d=!0)},o(g){I(f.$$.fragment,g),d=!1},d(g){g&&w(e),g&&w(u),j(f,g)}}}function b4(n){let e,t;return e=new me({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[_4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function v4(n,e,t){let{field:i=new mn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class y4 extends ye{constructor(e){super(),ve(this,e,v4,b4,he,{field:1,value:0})}}function k4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h,g,b;return{c(){var k,y;e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),f=v("input"),p(t,"class",i=z.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","number"),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"min",m=(k=n[1].options)==null?void 0:k.min),p(f,"max",h=(y=n[1].options)==null?void 0:y.max),p(f,"step","any")},m(k,y){S(k,e,y),_(e,t),_(e,s),_(e,l),_(l,r),S(k,u,y),S(k,f,y),ce(f,n[0]),g||(b=Y(f,"input",n[2]),g=!0)},p(k,y){var T,$;y&2&&i!==(i=z.getFieldTypeIcon(k[1].type))&&p(t,"class",i),y&2&&o!==(o=k[1].name+"")&&le(r,o),y&8&&a!==(a=k[3])&&p(e,"for",a),y&8&&c!==(c=k[3])&&p(f,"id",c),y&2&&d!==(d=k[1].required)&&(f.required=d),y&2&&m!==(m=(T=k[1].options)==null?void 0:T.min)&&p(f,"min",m),y&2&&h!==(h=($=k[1].options)==null?void 0:$.max)&&p(f,"max",h),y&1&&ht(f.value)!==k[0]&&ce(f,k[0])},d(k){k&&w(e),k&&w(u),k&&w(f),g=!1,b()}}}function w4(n){let e,t;return e=new me({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[k4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function S4(n,e,t){let{field:i=new mn}=e,{value:s=void 0}=e;function l(){s=ht(this.value),t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class T4 extends ye{constructor(e){super(),ve(this,e,S4,w4,he,{field:1,value:0})}}function $4(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=v("input"),i=O(),s=v("label"),o=B(l),p(e,"type","checkbox"),p(e,"id",t=n[3]),p(s,"for",r=n[3])},m(f,c){S(f,e,c),e.checked=n[0],S(f,i,c),S(f,s,c),_(s,o),a||(u=Y(e,"change",n[2]),a=!0)},p(f,c){c&8&&t!==(t=f[3])&&p(e,"id",t),c&1&&(e.checked=f[0]),c&2&&l!==(l=f[1].name+"")&&le(o,l),c&8&&r!==(r=f[3])&&p(s,"for",r)},d(f){f&&w(e),f&&w(i),f&&w(s),a=!1,u()}}}function C4(n){let e,t;return e=new me({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[$4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function M4(n,e,t){let{field:i=new mn}=e,{value:s=!1}=e;function l(){s=this.checked,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class D4 extends ye{constructor(e){super(),ve(this,e,M4,C4,he,{field:1,value:0})}}function O4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h;return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),f=v("input"),p(t,"class",i=z.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","email"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(g,b){S(g,e,b),_(e,t),_(e,s),_(e,l),_(l,r),S(g,u,b),S(g,f,b),ce(f,n[0]),m||(h=Y(f,"input",n[2]),m=!0)},p(g,b){b&2&&i!==(i=z.getFieldTypeIcon(g[1].type))&&p(t,"class",i),b&2&&o!==(o=g[1].name+"")&&le(r,o),b&8&&a!==(a=g[3])&&p(e,"for",a),b&8&&c!==(c=g[3])&&p(f,"id",c),b&2&&d!==(d=g[1].required)&&(f.required=d),b&1&&f.value!==g[0]&&ce(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,h()}}}function E4(n){let e,t;return e=new me({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[O4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function A4(n,e,t){let{field:i=new mn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class I4 extends ye{constructor(e){super(),ve(this,e,A4,E4,he,{field:1,value:0})}}function P4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h;return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),f=v("input"),p(t,"class",i=z.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","url"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(g,b){S(g,e,b),_(e,t),_(e,s),_(e,l),_(l,r),S(g,u,b),S(g,f,b),ce(f,n[0]),m||(h=Y(f,"input",n[2]),m=!0)},p(g,b){b&2&&i!==(i=z.getFieldTypeIcon(g[1].type))&&p(t,"class",i),b&2&&o!==(o=g[1].name+"")&&le(r,o),b&8&&a!==(a=g[3])&&p(e,"for",a),b&8&&c!==(c=g[3])&&p(f,"id",c),b&2&&d!==(d=g[1].required)&&(f.required=d),b&1&&ce(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,h()}}}function L4(n){let e,t;return e=new me({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[P4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function N4(n,e,t){let{field:i=new mn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class F4 extends ye{constructor(e){super(),ve(this,e,N4,L4,he,{field:1,value:0})}}function rp(n){let e,t,i,s;return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","link-hint clear-btn svelte-11df51y"),p(e,"class","form-field-addon")},m(l,o){S(l,e,o),_(e,t),i||(s=[Ie(Be.call(null,t,"Clear")),Y(t,"click",n[5])],i=!0)},p:Z,d(l){l&&w(e),i=!1,Pe(s)}}}function R4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h,g,b=n[0]&&!n[1].required&&rp(n);function k($){n[6]($)}function y($){n[7]($)}let T={id:n[8],options:z.defaultFlatpickrOptions()};return n[2]!==void 0&&(T.value=n[2]),n[0]!==void 0&&(T.formattedValue=n[0]),d=new eu({props:T}),ie.push(()=>ge(d,"value",k)),ie.push(()=>ge(d,"formattedValue",y)),d.$on("close",n[3]),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),a=B(" (UTC)"),f=O(),b&&b.c(),c=O(),H(d.$$.fragment),p(t,"class",i=Si(z.getFieldTypeIcon(n[1].type))+" svelte-11df51y"),p(l,"class","txt"),p(e,"for",u=n[8])},m($,M){S($,e,M),_(e,t),_(e,s),_(e,l),_(l,r),_(l,a),S($,f,M),b&&b.m($,M),S($,c,M),q(d,$,M),g=!0},p($,M){(!g||M&2&&i!==(i=Si(z.getFieldTypeIcon($[1].type))+" svelte-11df51y"))&&p(t,"class",i),(!g||M&2)&&o!==(o=$[1].name+"")&&le(r,o),(!g||M&256&&u!==(u=$[8]))&&p(e,"for",u),$[0]&&!$[1].required?b?b.p($,M):(b=rp($),b.c(),b.m(c.parentNode,c)):b&&(b.d(1),b=null);const C={};M&256&&(C.id=$[8]),!m&&M&4&&(m=!0,C.value=$[2],ke(()=>m=!1)),!h&&M&1&&(h=!0,C.formattedValue=$[0],ke(()=>h=!1)),d.$set(C)},i($){g||(A(d.$$.fragment,$),g=!0)},o($){I(d.$$.fragment,$),g=!1},d($){$&&w(e),$&&w(f),b&&b.d($),$&&w(c),j(d,$)}}}function q4(n){let e,t;return e=new me({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[R4,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&775&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function j4(n,e,t){let{field:i=new mn}=e,{value:s=void 0}=e,l=s;function o(c){c.detail&&c.detail.length==3&&t(0,s=c.detail[1])}function r(){t(0,s="")}const a=()=>r();function u(c){l=c,t(2,l),t(0,s)}function f(c){s=c,t(0,s)}return n.$$set=c=>{"field"in c&&t(1,i=c.field),"value"in c&&t(0,s=c.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19)),n.$$.dirty&5&&l!=s&&t(2,l=s)},[s,i,l,o,r,a,u,f]}class H4 extends ye{constructor(e){super(),ve(this,e,j4,q4,he,{field:1,value:0})}}function ap(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=v("div"),t=B("Select up to "),s=B(i),l=B(" items."),p(e,"class","help-block")},m(o,r){S(o,e,r),_(e,t),_(e,s),_(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&le(s,i)},d(o){o&&w(e)}}}function V4(n){var y,T,$,M,C;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h;function g(D){n[3](D)}let b={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],closable:!n[2]||((y=n[0])==null?void 0:y.length)>=((T=n[1].options)==null?void 0:T.maxSelect),items:($=n[1].options)==null?void 0:$.values,searchable:((M=n[1].options)==null?void 0:M.values)>5};n[0]!==void 0&&(b.selected=n[0]),f=new xa({props:b}),ie.push(()=>ge(f,"selected",g));let k=((C=n[1].options)==null?void 0:C.maxSelect)>1&&ap(n);return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),H(f.$$.fragment),d=O(),k&&k.c(),m=Me(),p(t,"class",i=z.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(D,E){S(D,e,E),_(e,t),_(e,s),_(e,l),_(l,r),S(D,u,E),q(f,D,E),S(D,d,E),k&&k.m(D,E),S(D,m,E),h=!0},p(D,E){var L,N,F,R,X;(!h||E&2&&i!==(i=z.getFieldTypeIcon(D[1].type)))&&p(t,"class",i),(!h||E&2)&&o!==(o=D[1].name+"")&&le(r,o),(!h||E&16&&a!==(a=D[4]))&&p(e,"for",a);const P={};E&16&&(P.id=D[4]),E&6&&(P.toggle=!D[1].required||D[2]),E&4&&(P.multiple=D[2]),E&7&&(P.closable=!D[2]||((L=D[0])==null?void 0:L.length)>=((N=D[1].options)==null?void 0:N.maxSelect)),E&2&&(P.items=(F=D[1].options)==null?void 0:F.values),E&2&&(P.searchable=((R=D[1].options)==null?void 0:R.values)>5),!c&&E&1&&(c=!0,P.selected=D[0],ke(()=>c=!1)),f.$set(P),((X=D[1].options)==null?void 0:X.maxSelect)>1?k?k.p(D,E):(k=ap(D),k.c(),k.m(m.parentNode,m)):k&&(k.d(1),k=null)},i(D){h||(A(f.$$.fragment,D),h=!0)},o(D){I(f.$$.fragment,D),h=!1},d(D){D&&w(e),D&&w(u),j(f,D),D&&w(d),k&&k.d(D),D&&w(m)}}}function z4(n){let e,t;return e=new me({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[V4,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function B4(n,e,t){let i,{field:s=new mn}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l),t(2,i),t(1,s)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r;n.$$.dirty&2&&t(2,i=((r=s.options)==null?void 0:r.maxSelect)>1),n.$$.dirty&5&&typeof l>"u"&&t(0,l=i?[]:""),n.$$.dirty&7&&i&&Array.isArray(l)&&l.length>s.options.maxSelect&&t(0,l=l.slice(l.length-s.options.maxSelect))},[l,s,i,o]}class U4 extends ye{constructor(e){super(),ve(this,e,B4,z4,he,{field:1,value:0})}}function W4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,h;return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),f=v("textarea"),p(t,"class",i=z.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4]),p(f,"id",c=n[4]),p(f,"class","txt-mono"),f.required=d=n[1].required,f.value=n[2]},m(g,b){S(g,e,b),_(e,t),_(e,s),_(e,l),_(l,r),S(g,u,b),S(g,f,b),m||(h=Y(f,"input",n[3]),m=!0)},p(g,b){b&2&&i!==(i=z.getFieldTypeIcon(g[1].type))&&p(t,"class",i),b&2&&o!==(o=g[1].name+"")&&le(r,o),b&16&&a!==(a=g[4])&&p(e,"for",a),b&16&&c!==(c=g[4])&&p(f,"id",c),b&2&&d!==(d=g[1].required)&&(f.required=d),b&4&&(f.value=g[2])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,h()}}}function Y4(n){let e,t;return e=new me({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[W4,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function K4(n,e,t){let{field:i=new mn}=e,{value:s=void 0}=e,l=JSON.stringify(typeof s>"u"?null:s,null,2);const o=r=>{t(2,l=r.target.value),t(0,s=r.target.value.trim())};return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},n.$$.update=()=>{n.$$.dirty&5&&s!==(l==null?void 0:l.trim())&&(t(2,l=JSON.stringify(typeof s>"u"?null:s,null,2)),t(0,s=l))},[s,i,l,o]}class J4 extends ye{constructor(e){super(),ve(this,e,K4,Y4,he,{field:1,value:0})}}function Z4(n){let e,t;return{c(){e=v("i"),p(e,"class","ri-file-line"),p(e,"alt",t=n[0].name)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&p(e,"alt",t)},d(i){i&&w(e)}}}function G4(n){let e,t,i;return{c(){e=v("img"),Vn(e.src,t=n[2])||p(e,"src",t),p(e,"width",n[1]),p(e,"height",n[1]),p(e,"alt",i=n[0].name)},m(s,l){S(s,e,l)},p(s,l){l&4&&!Vn(e.src,t=s[2])&&p(e,"src",t),l&2&&p(e,"width",s[1]),l&2&&p(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&p(e,"alt",i)},d(s){s&&w(e)}}}function X4(n){let e;function t(l,o){return l[2]?G4:Z4}let i=t(n),s=i(n);return{c(){s.c(),e=Me()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:Z,o:Z,d(l){s.d(l),l&&w(e)}}}function Q4(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){t(2,i=""),z.hasImageExtension(s==null?void 0:s.name)&&z.generateThumb(s,l,l).then(r=>{t(2,i=r)}).catch(r=>{console.warn("Unable to generate thumb: ",r)})}return n.$$set=r=>{"file"in r&&t(0,s=r.file),"size"in r&&t(1,l=r.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&o()},t(2,i=""),[s,l,i]}class x4 extends ye{constructor(e){super(),ve(this,e,Q4,X4,he,{file:0,size:1})}}function up(n){let e;function t(l,o){return l[4]==="image"?tM:eM}let i=t(n),s=i(n);return{c(){s.c(),e=Me()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function eM(n){let e,t;return{c(){e=v("object"),t=B("Cannot preview the file."),p(e,"title",n[2]),p(e,"data",n[1])},m(i,s){S(i,e,s),_(e,t)},p(i,s){s&4&&p(e,"title",i[2]),s&2&&p(e,"data",i[1])},d(i){i&&w(e)}}}function tM(n){let e,t,i;return{c(){e=v("img"),Vn(e.src,t=n[1])||p(e,"src",t),p(e,"alt",i="Preview "+n[2])},m(s,l){S(s,e,l)},p(s,l){l&2&&!Vn(e.src,t=s[1])&&p(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&p(e,"alt",i)},d(s){s&&w(e)}}}function nM(n){var s;let e=(s=n[3])==null?void 0:s.isActive(),t,i=e&&up(n);return{c(){i&&i.c(),t=Me()},m(l,o){i&&i.m(l,o),S(l,t,o)},p(l,o){var r;o&8&&(e=(r=l[3])==null?void 0:r.isActive()),e?i?i.p(l,o):(i=up(l),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(l){i&&i.d(l),l&&w(t)}}}function iM(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=Y(e,"click",dt(n[0])),t=!0)},p:Z,d(s){s&&w(e),t=!1,i()}}}function sM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("a"),t=B(n[2]),i=O(),s=v("i"),l=O(),o=v("div"),r=O(),a=v("button"),a.textContent="Close",p(s,"class","ri-external-link-line"),p(e,"href",n[1]),p(e,"title",n[2]),p(e,"target","_blank"),p(e,"rel","noreferrer noopener"),p(e,"class","link-hint txt-ellipsis inline-flex"),p(o,"class","flex-fill"),p(a,"type","button"),p(a,"class","btn btn-transparent")},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,l,d),S(c,o,d),S(c,r,d),S(c,a,d),u||(f=Y(a,"click",n[0]),u=!0)},p(c,d){d&4&&le(t,c[2]),d&2&&p(e,"href",c[1]),d&4&&p(e,"title",c[2])},d(c){c&&w(e),c&&w(l),c&&w(o),c&&w(r),c&&w(a),u=!1,f()}}}function lM(n){let e,t,i={class:"preview preview-"+n[4],btnClose:!1,popup:!0,$$slots:{footer:[sM],header:[iM],default:[nM]},$$scope:{ctx:n}};return e=new Nn({props:i}),n[6](e),e.$on("show",n[7]),e.$on("hide",n[8]),{c(){H(e.$$.fragment)},m(s,l){q(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="preview preview-"+s[4]),l&542&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[6](null),j(e,s)}}}function oM(n,e,t){let i,s,l,o="";function r(d){d!==""&&(t(1,o=d),l==null||l.show())}function a(){return l==null?void 0:l.hide()}function u(d){ie[d?"unshift":"push"](()=>{l=d,t(3,l)})}function f(d){ze.call(this,n,d)}function c(d){ze.call(this,n,d)}return n.$$.update=()=>{n.$$.dirty&2&&t(2,i=o.substring(o.lastIndexOf("/")+1)),n.$$.dirty&4&&t(4,s=z.getFileType(i))},[a,o,i,l,s,r,u,f,c]}class rM extends ye{constructor(e){super(),ve(this,e,oM,lM,he,{show:5,hide:0})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[0]}}function aM(n){let e;return{c(){e=v("i"),p(e,"class","ri-file-3-line")},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function uM(n){let e;return{c(){e=v("i"),p(e,"class","ri-video-line")},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function fM(n){let e,t,i,s,l;return{c(){e=v("img"),Vn(e.src,t=n[4])||p(e,"src",t),p(e,"alt",n[0]),p(e,"title",i="Preview "+n[0])},m(o,r){S(o,e,r),s||(l=Y(e,"error",n[7]),s=!0)},p(o,r){r&16&&!Vn(e.src,t=o[4])&&p(e,"src",t),r&1&&p(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&p(e,"title",i)},d(o){o&&w(e),s=!1,l()}}}function cM(n){let e,t,i,s,l,o,r,a;function u(m,h){return m[2]==="image"?fM:m[2]==="video"||m[2]==="audio"?uM:aM}let f=u(n),c=f(n),d={};return l=new rM({props:d}),n[10](l),{c(){e=v("a"),c.c(),s=O(),H(l.$$.fragment),p(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:"")),p(e,"href",n[6]),p(e,"target","_blank"),p(e,"rel","noreferrer"),p(e,"title",i=(n[5]?"Preview":"Download")+" "+n[0])},m(m,h){S(m,e,h),c.m(e,null),S(m,s,h),q(l,m,h),o=!0,r||(a=Y(e,"click",kn(n[9])),r=!0)},p(m,[h]){f===(f=u(m))&&c?c.p(m,h):(c.d(1),c=f(m),c&&(c.c(),c.m(e,null))),(!o||h&2&&t!==(t="thumb "+(m[1]?`thumb-${m[1]}`:"")))&&p(e,"class",t),(!o||h&33&&i!==(i=(m[5]?"Preview":"Download")+" "+m[0]))&&p(e,"title",i);const g={};l.$set(g)},i(m){o||(A(l.$$.fragment,m),o=!0)},o(m){I(l.$$.fragment,m),o=!1},d(m){m&&w(e),c.d(),m&&w(s),n[10](null),j(l,m),r=!1,a()}}}function dM(n,e,t){let i,s,{record:l=null}=e,{filename:o=""}=e,{size:r=""}=e,a,u="",f=pe.getFileUrl(l,o);function c(){t(4,u="")}const d=h=>{s&&(h.preventDefault(),a==null||a.show(f))};function m(h){ie[h?"unshift":"push"](()=>{a=h,t(3,a)})}return n.$$set=h=>{"record"in h&&t(8,l=h.record),"filename"in h&&t(0,o=h.filename),"size"in h&&t(1,r=h.size)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=z.getFileType(o)),n.$$.dirty&5&&t(5,s=["image","audio","video"].includes(i)||o.endsWith(".pdf"))},t(4,u=f?f+"?thumb=100x100":""),[o,r,i,a,u,s,f,c,l,d,m]}class nu extends ye{constructor(e){super(),ve(this,e,dM,cM,he,{record:8,filename:0,size:1})}}function fp(n,e,t){const i=n.slice();return i[22]=e[t],i[24]=t,i}function cp(n,e,t){const i=n.slice();i[25]=e[t],i[24]=t;const s=i[1].includes(i[24]);return i[26]=s,i}function pM(n){let e,t,i;function s(){return n[14](n[24])}return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove")},m(l,o){S(l,e,o),t||(i=[Ie(Be.call(null,e,"Remove file")),Y(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Pe(i)}}}function mM(n){let e,t,i;function s(){return n[13](n[24])}return{c(){e=v("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-transparent")},m(l,o){S(l,e,o),t||(i=Y(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,i()}}}function dp(n,e){let t,i,s,l,o,r,a=e[25]+"",u,f,c,d,m,h,g;s=new nu({props:{record:e[2],filename:e[25]}});function b(T,$){return $&18&&(h=null),h==null&&(h=!!T[1].includes(T[24])),h?mM:pM}let k=b(e,-1),y=k(e);return{key:n,first:null,c(){t=v("div"),i=v("div"),H(s.$$.fragment),l=O(),o=v("div"),r=v("a"),u=B(a),d=O(),m=v("div"),y.c(),Q(i,"fade",e[1].includes(e[24])),p(r,"href",f=pe.getFileUrl(e[2],e[25])),p(r,"class",c="txt-ellipsis "+(e[26]?"txt-strikethrough txt-hint":"link-primary")),p(r,"title","Download"),p(r,"target","_blank"),p(r,"rel","noopener noreferrer"),p(o,"class","content"),p(m,"class","actions"),p(t,"class","list-item"),this.first=t},m(T,$){S(T,t,$),_(t,i),q(s,i,null),_(t,l),_(t,o),_(o,r),_(r,u),_(t,d),_(t,m),y.m(m,null),g=!0},p(T,$){e=T;const M={};$&4&&(M.record=e[2]),$&16&&(M.filename=e[25]),s.$set(M),(!g||$&18)&&Q(i,"fade",e[1].includes(e[24])),(!g||$&16)&&a!==(a=e[25]+"")&&le(u,a),(!g||$&20&&f!==(f=pe.getFileUrl(e[2],e[25])))&&p(r,"href",f),(!g||$&18&&c!==(c="txt-ellipsis "+(e[26]?"txt-strikethrough txt-hint":"link-primary")))&&p(r,"class",c),k===(k=b(e,$))&&y?y.p(e,$):(y.d(1),y=k(e),y&&(y.c(),y.m(m,null)))},i(T){g||(A(s.$$.fragment,T),g=!0)},o(T){I(s.$$.fragment,T),g=!1},d(T){T&&w(t),j(s),y.d()}}}function pp(n){let e,t,i,s,l,o,r,a,u=n[22].name+"",f,c,d,m,h,g,b;i=new x4({props:{file:n[22]}});function k(){return n[15](n[24])}return{c(){e=v("div"),t=v("figure"),H(i.$$.fragment),s=O(),l=v("div"),o=v("small"),o.textContent="New",r=O(),a=v("span"),f=B(u),d=O(),m=v("button"),m.innerHTML='',p(t,"class","thumb"),p(o,"class","label label-success m-r-5"),p(a,"class","txt"),p(l,"class","filename"),p(l,"title",c=n[22].name),p(m,"type","button"),p(m,"class","btn btn-transparent btn-sm btn-circle btn-remove"),p(e,"class","list-item")},m(y,T){S(y,e,T),_(e,t),q(i,t,null),_(e,s),_(e,l),_(l,o),_(l,r),_(l,a),_(a,f),_(e,d),_(e,m),h=!0,g||(b=[Ie(Be.call(null,m,"Remove file")),Y(m,"click",k)],g=!0)},p(y,T){n=y;const $={};T&1&&($.file=n[22]),i.$set($),(!h||T&1)&&u!==(u=n[22].name+"")&&le(f,u),(!h||T&1&&c!==(c=n[22].name))&&p(l,"title",c)},i(y){h||(A(i.$$.fragment,y),h=!0)},o(y){I(i.$$.fragment,y),h=!1},d(y){y&&w(e),j(i),g=!1,Pe(b)}}}function mp(n){let e,t,i,s,l,o;return{c(){e=v("div"),t=v("input"),i=O(),s=v("button"),s.innerHTML=` + Upload new file`,p(t,"type","file"),p(t,"class","hidden"),t.multiple=n[5],p(s,"type","button"),p(s,"class","btn btn-transparent btn-sm btn-block"),p(e,"class","list-item list-item-btn")},m(r,a){S(r,e,a),_(e,t),n[16](t),_(e,i),_(e,s),l||(o=[Y(t,"change",n[17]),Y(s,"click",n[18])],l=!0)},p(r,a){a&32&&(t.multiple=r[5])},d(r){r&&w(e),n[16](null),l=!1,Pe(o)}}}function hM(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,c=[],d=new Map,m,h,g,b=n[4];const k=C=>C[25]+C[2].id;for(let C=0;CI(T[C],1,1,()=>{T[C]=null});let M=!n[8]&&mp(n);return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),f=v("div");for(let C=0;C({21:i}),({uniqueId:i})=>i?2097152:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field form-field-list form-field-file "+(i[3].required?"required":"")),s&8&&(l.name=i[3].name),s&270533119&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function _M(n,e,t){let i,s,l,{record:o}=e,{value:r=""}=e,{uploadedFiles:a=[]}=e,{deletedFileIndexes:u=[]}=e,{field:f=new mn}=e,c,d;function m(E){z.removeByValue(u,E),t(1,u)}function h(E){z.pushUnique(u,E),t(1,u)}function g(E){z.isEmpty(a[E])||a.splice(E,1),t(0,a)}function b(){d==null||d.dispatchEvent(new CustomEvent("change",{detail:{value:r,uploadedFiles:a,deletedFileIndexes:u},bubbles:!0}))}const k=E=>m(E),y=E=>h(E),T=E=>g(E);function $(E){ie[E?"unshift":"push"](()=>{c=E,t(6,c)})}const M=()=>{for(let E of c.files)a.push(E);t(0,a),t(6,c.value=null,c)},C=()=>c==null?void 0:c.click();function D(E){ie[E?"unshift":"push"](()=>{d=E,t(7,d)})}return n.$$set=E=>{"record"in E&&t(2,o=E.record),"value"in E&&t(12,r=E.value),"uploadedFiles"in E&&t(0,a=E.uploadedFiles),"deletedFileIndexes"in E&&t(1,u=E.deletedFileIndexes),"field"in E&&t(3,f=E.field)},n.$$.update=()=>{var E,P;n.$$.dirty&1&&(Array.isArray(a)||t(0,a=z.toArray(a))),n.$$.dirty&2&&(Array.isArray(u)||t(1,u=z.toArray(u))),n.$$.dirty&8&&t(5,i=((E=f.options)==null?void 0:E.maxSelect)>1),n.$$.dirty&4128&&z.isEmpty(r)&&t(12,r=i?[]:""),n.$$.dirty&4096&&t(4,s=z.toArray(r)),n.$$.dirty&27&&t(8,l=(s.length||a.length)&&((P=f.options)==null?void 0:P.maxSelect)<=s.length+a.length-u.length),n.$$.dirty&3&&(a!==-1||u!==-1)&&b()},[a,u,o,f,s,i,c,d,l,m,h,g,r,k,y,T,$,M,C,D]}class bM extends ye{constructor(e){super(),ve(this,e,_M,gM,he,{record:2,value:12,uploadedFiles:0,deletedFileIndexes:1,field:3})}}function hp(n){return typeof n=="function"?{threshold:100,callback:n}:n||{}}function vM(n,e){e=hp(e),e!=null&&e.callback&&e.callback();function t(i){if(!(e!=null&&e.callback))return;i.target.scrollHeight-i.target.clientHeight-i.target.scrollTop<=e.threshold&&e.callback()}return n.addEventListener("scroll",t),n.addEventListener("resize",t),{update(i){e=hp(i)},destroy(){n.removeEventListener("scroll",t),n.removeEventListener("resize",t)}}}const yM=n=>({dragging:n&2,dragover:n&4}),gp=n=>({dragging:n[1],dragover:n[2]});function kM(n){let e,t,i,s;const l=n[8].default,o=Nt(l,n,n[7],gp);return{c(){e=v("div"),o&&o.c(),p(e,"draggable",!0),p(e,"class","draggable svelte-28orm4"),Q(e,"dragging",n[1]),Q(e,"dragover",n[2])},m(r,a){S(r,e,a),o&&o.m(e,null),t=!0,i||(s=[Y(e,"dragover",dt(n[9])),Y(e,"dragleave",dt(n[10])),Y(e,"dragend",n[11]),Y(e,"dragstart",n[12]),Y(e,"drop",n[13])],i=!0)},p(r,[a]){o&&o.p&&(!t||a&134)&&Rt(o,l,r,r[7],t?Ft(l,r[7],a,yM):qt(r[7]),gp),(!t||a&2)&&Q(e,"dragging",r[1]),(!t||a&4)&&Q(e,"dragover",r[2])},i(r){t||(A(o,r),t=!0)},o(r){I(o,r),t=!1},d(r){r&&w(e),o&&o.d(r),i=!1,Pe(s)}}}function wM(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=Ct();let{index:o}=e,{list:r=[]}=e,{disabled:a=!1}=e,u=!1,f=!1;function c(y,T){!y&&!a||(t(1,u=!0),y.dataTransfer.effectAllowed="move",y.dataTransfer.dropEffect="move",y.dataTransfer.setData("text/plain",T))}function d(y,T){if(!y&&!a)return;t(2,f=!1),t(1,u=!1),y.dataTransfer.dropEffect="move";const $=parseInt(y.dataTransfer.getData("text/plain"));${t(2,f=!0)},h=()=>{t(2,f=!1)},g=()=>{t(2,f=!1),t(1,u=!1)},b=y=>c(y,o),k=y=>d(y,o);return n.$$set=y=>{"index"in y&&t(0,o=y.index),"list"in y&&t(5,r=y.list),"disabled"in y&&t(6,a=y.disabled),"$$scope"in y&&t(7,s=y.$$scope)},[o,u,f,c,d,r,a,s,i,m,h,g,b,k]}class SM extends ye{constructor(e){super(),ve(this,e,wM,kM,he,{index:0,list:5,disabled:6})}}function _p(n,e,t){const i=n.slice();return i[6]=e[t],i}function bp(n){let e,t;return e=new nu({props:{record:n[0],filename:n[0][n[6]],size:"xs"}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,s){const l={};s&1&&(l.record=i[0]),s&3&&(l.filename=i[0][i[6]]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function vp(n){let e,t,i=n[0][n[6]]&&bp(n);return{c(){i&&i.c(),e=Me()},m(s,l){i&&i.m(s,l),S(s,e,l),t=!0},p(s,l){s[0][s[6]]?i?(i.p(s,l),l&3&&A(i,1)):(i=bp(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(ae(),I(i,1,1,()=>{i=null}),ue())},i(s){t||(A(i),t=!0)},o(s){I(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function TM(n){let e,t,i,s,l,o,r=z.truncate(z.displayValue(n[0],n[2]),70)+"",a,u,f,c,d=n[1],m=[];for(let g=0;gI(m[g],1,1,()=>{m[g]=null});return{c(){e=v("div"),t=v("i"),s=O();for(let g=0;gt(5,o=u));let{record:r}=e,{displayFields:a=[]}=e;return n.$$set=u=>{"record"in u&&t(0,r=u.record),"displayFields"in u&&t(3,a=u.displayFields)},n.$$.update=()=>{n.$$.dirty&33&&t(4,i=o==null?void 0:o.find(u=>u.id==(r==null?void 0:r.collectionId))),n.$$.dirty&24&&t(1,s=(a==null?void 0:a.filter(u=>{var f;return!!((f=i==null?void 0:i.schema)!=null&&f.find(c=>c.name==u&&c.type=="file"))}))||[]),n.$$.dirty&10&&t(2,l=(s.length?a==null?void 0:a.filter(u=>!s.includes(u)):a)||[])},[r,s,l,a,i,o]}class Xo extends ye{constructor(e){super(),ve(this,e,$M,TM,he,{record:0,displayFields:3})}}function yp(n,e,t){const i=n.slice();return i[49]=e[t],i[51]=t,i}function kp(n,e,t){const i=n.slice();i[49]=e[t];const s=i[8](i[49]);return i[6]=s,i}function wp(n){let e,t;function i(o,r){return o[11]?MM:CM}let s=i(n),l=s(n);return{c(){e=v("div"),l.c(),t=O(),p(e,"class","list-item")},m(o,r){S(o,e,r),l.m(e,null),_(e,t)},p(o,r){s===(s=i(o))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,t)))},d(o){o&&w(e),l.d()}}}function CM(n){var l;let e,t,i,s=((l=n[2])==null?void 0:l.length)&&Sp(n);return{c(){e=v("span"),e.textContent="No records found.",t=O(),s&&s.c(),i=Me(),p(e,"class","txt txt-hint")},m(o,r){S(o,e,r),S(o,t,r),s&&s.m(o,r),S(o,i,r)},p(o,r){var a;(a=o[2])!=null&&a.length?s?s.p(o,r):(s=Sp(o),s.c(),s.m(i.parentNode,i)):s&&(s.d(1),s=null)},d(o){o&&w(e),o&&w(t),s&&s.d(o),o&&w(i)}}}function MM(n){let e;return{c(){e=v("div"),e.innerHTML='',p(e,"class","block txt-center")},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function Sp(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-sm")},m(s,l){S(s,e,l),t||(i=Y(e,"click",n[35]),t=!0)},p:Z,d(s){s&&w(e),t=!1,i()}}}function DM(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-blank-circle-line txt-disabled")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function OM(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Tp(n,e){let t,i,s,l,o,r,a,u,f,c,d;function m(T,$){return T[6]?OM:DM}let h=m(e),g=h(e);l=new Xo({props:{record:e[49],displayFields:e[13]}});function b(){return e[32](e[49])}function k(){return e[33](e[49])}function y(...T){return e[34](e[49],...T)}return{key:n,first:null,c(){t=v("div"),g.c(),i=O(),s=v("div"),H(l.$$.fragment),o=O(),r=v("div"),a=v("button"),a.innerHTML='',u=O(),p(s,"class","content"),p(a,"type","button"),p(a,"class","btn btn-sm btn-circle btn-transparent btn-hint m-l-auto"),p(r,"class","actions nonintrusive"),p(t,"tabindex","0"),p(t,"class","list-item handle"),Q(t,"selected",e[6]),Q(t,"disabled",!e[6]&&e[5]>1&&!e[9]),this.first=t},m(T,$){S(T,t,$),g.m(t,null),_(t,i),_(t,s),q(l,s,null),_(t,o),_(t,r),_(r,a),_(t,u),f=!0,c||(d=[Ie(Be.call(null,a,"Edit")),Y(a,"keydown",kn(e[27])),Y(a,"click",kn(b)),Y(t,"click",k),Y(t,"keydown",y)],c=!0)},p(T,$){e=T,h!==(h=m(e))&&(g.d(1),g=h(e),g&&(g.c(),g.m(t,i)));const M={};$[0]&8&&(M.record=e[49]),$[0]&8192&&(M.displayFields=e[13]),l.$set(M),(!f||$[0]&264)&&Q(t,"selected",e[6]),(!f||$[0]&808)&&Q(t,"disabled",!e[6]&&e[5]>1&&!e[9])},i(T){f||(A(l.$$.fragment,T),f=!0)},o(T){I(l.$$.fragment,T),f=!1},d(T){T&&w(t),g.d(),j(l),c=!1,Pe(d)}}}function $p(n){let e,t=n[6].length+"",i,s,l,o;return{c(){e=B("("),i=B(t),s=B(" of MAX "),l=B(n[5]),o=B(")")},m(r,a){S(r,e,a),S(r,i,a),S(r,s,a),S(r,l,a),S(r,o,a)},p(r,a){a[0]&64&&t!==(t=r[6].length+"")&&le(i,t),a[0]&32&&le(l,r[5])},d(r){r&&w(e),r&&w(i),r&&w(s),r&&w(l),r&&w(o)}}}function EM(n){let e;return{c(){e=v("p"),e.textContent="No selected records.",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Z,i:Z,o:Z,d(t){t&&w(e)}}}function AM(n){let e,t,i=n[6],s=[];for(let o=0;oI(s[o],1,1,()=>{s[o]=null});return{c(){e=v("div");for(let o=0;o',l=O(),p(s,"type","button"),p(s,"title","Remove"),p(s,"class","btn btn-circle btn-transparent btn-hint btn-xs"),p(e,"class","label"),Q(e,"label-danger",n[52]),Q(e,"label-warning",n[53])},m(f,c){S(f,e,c),q(t,e,null),_(e,i),_(e,s),S(f,l,c),o=!0,r||(a=Y(s,"click",u),r=!0)},p(f,c){n=f;const d={};c[0]&64&&(d.record=n[49]),c[0]&8192&&(d.displayFields=n[13]),t.$set(d),(!o||c[1]&2097152)&&Q(e,"label-danger",n[52]),(!o||c[1]&4194304)&&Q(e,"label-warning",n[53])},i(f){o||(A(t.$$.fragment,f),o=!0)},o(f){I(t.$$.fragment,f),o=!1},d(f){f&&w(e),j(t),f&&w(l),r=!1,a()}}}function Cp(n){let e,t,i;function s(o){n[38](o)}let l={index:n[51],$$slots:{default:[IM,({dragging:o,dragover:r})=>({52:o,53:r}),({dragging:o,dragover:r})=>[0,(o?2097152:0)|(r?4194304:0)]]},$$scope:{ctx:n}};return n[6]!==void 0&&(l.list=n[6]),e=new SM({props:l}),ie.push(()=>ge(e,"list",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){const a={};r[0]&8256|r[1]&39845888&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&64&&(t=!0,a.list=o[6],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function PM(n){let e,t,i,s,l,o,r=[],a=new Map,u,f,c,d,m,h,g,b,k,y,T;t=new Uo({props:{value:n[2],autocompleteCollection:n[12]}}),t.$on("submit",n[30]);let $=n[3];const M=N=>N[49].id;for(let N=0;N<$.length;N+=1){let F=kp(n,$,N),R=M(F);a.set(R,r[N]=Tp(R,F))}let C=null;$.length||(C=wp(n));let D=n[5]>1&&$p(n);const E=[AM,EM],P=[];function L(N,F){return N[6].length?0:1}return h=L(n),g=P[h]=E[h](n),{c(){e=v("div"),H(t.$$.fragment),i=O(),s=v("button"),s.innerHTML='
    New record
    ',l=O(),o=v("div");for(let N=0;N1?D?D.p(N,F):(D=$p(N),D.c(),D.m(c,null)):D&&(D.d(1),D=null);let X=h;h=L(N),h===X?P[h].p(N,F):(ae(),I(P[X],1,1,()=>{P[X]=null}),ue(),g=P[h],g?g.p(N,F):(g=P[h]=E[h](N),g.c()),A(g,1),g.m(b.parentNode,b))},i(N){if(!k){A(t.$$.fragment,N);for(let F=0;F<$.length;F+=1)A(r[F]);A(g),k=!0}},o(N){I(t.$$.fragment,N);for(let F=0;FCancel',t=O(),i=v("button"),i.innerHTML='Save selection',p(e,"type","button"),p(e,"class","btn btn-transparent"),p(i,"type","button"),p(i,"class","btn")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=[Y(e,"click",n[28]),Y(i,"click",n[29])],s=!0)},p:Z,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Pe(l)}}}function FM(n){let e,t,i,s;const l=[{popup:!0},{class:"overlay-panel-xl"},n[19]];let o={$$slots:{footer:[NM],header:[LM],default:[PM]},$$scope:{ctx:n}};for(let a=0;at(26,m=Ae));const h=Ct(),g="picker_"+z.randomString(5);let{value:b}=e,{field:k}=e,y,T,$="",M=[],C=[],D=1,E=0,P=!1,L=!1;function N(){return t(2,$=""),t(3,M=[]),t(6,C=[]),R(),X(!0),y==null?void 0:y.show()}function F(){return y==null?void 0:y.hide()}async function R(){const Ae=z.toArray(b);if(!s||!Ae.length)return;t(24,L=!0);let ne=[];const we=Ae.slice(),nt=[];for(;we.length>0;){const et=[];for(const bt of we.splice(0,Or))et.push(`id="${bt}"`);nt.push(pe.collection(s).getFullList(Or,{filter:et.join("||"),$autoCancel:!1}))}try{await Promise.all(nt).then(et=>{ne=ne.concat(...et)}),t(6,C=[]);for(const et of Ae){const bt=z.findByKey(ne,"id",et);bt&&C.push(bt)}$.trim()||t(3,M=z.filterDuplicatesByKey(C.concat(M)))}catch(et){pe.errorResponseHandler(et)}t(24,L=!1)}async function X(Ae=!1){if(s){t(4,P=!0),Ae&&($.trim()?t(3,M=[]):t(3,M=z.toArray(C).slice()));try{const ne=Ae?1:D+1,we=await pe.collection(s).getList(ne,Or,{filter:$,sort:"-created",$cancelKey:g+"loadList"});t(3,M=z.filterDuplicatesByKey(M.concat(we.items))),D=we.page,t(23,E=we.totalItems)}catch(ne){pe.errorResponseHandler(ne)}t(4,P=!1)}}function se(Ae){i==1?t(6,C=[Ae]):u&&(z.pushOrReplaceByKey(C,Ae),t(6,C))}function W(Ae){z.removeByKey(C,"id",Ae.id),t(6,C)}function G(Ae){f(Ae)?W(Ae):se(Ae)}function te(){var Ae;i!=1?t(20,b=C.map(ne=>ne.id)):t(20,b=((Ae=C==null?void 0:C[0])==null?void 0:Ae.id)||""),h("save",C),F()}function K(Ae){ze.call(this,n,Ae)}const re=()=>F(),J=()=>te(),de=Ae=>t(2,$=Ae.detail),_e=()=>T==null?void 0:T.show(),$e=Ae=>T==null?void 0:T.show(Ae),Ne=Ae=>G(Ae),Re=(Ae,ne)=>{(ne.code==="Enter"||ne.code==="Space")&&(ne.preventDefault(),ne.stopPropagation(),G(Ae))},be=()=>t(2,$=""),Se=()=>{a&&!P&&X()},We=Ae=>W(Ae);function lt(Ae){C=Ae,t(6,C)}function fe(Ae){ie[Ae?"unshift":"push"](()=>{y=Ae,t(1,y)})}function Ve(Ae){ze.call(this,n,Ae)}function ee(Ae){ze.call(this,n,Ae)}function Fe(Ae){ie[Ae?"unshift":"push"](()=>{T=Ae,t(7,T)})}const ot=Ae=>{z.removeByKey(M,"id",Ae.detail.id),M.unshift(Ae.detail),t(3,M),se(Ae.detail)},Ht=Ae=>{z.removeByKey(M,"id",Ae.detail.id),t(3,M),W(Ae.detail)};return n.$$set=Ae=>{e=Je(Je({},e),Qn(Ae)),t(19,d=Et(e,c)),"value"in Ae&&t(20,b=Ae.value),"field"in Ae&&t(21,k=Ae.field)},n.$$.update=()=>{var Ae,ne,we;n.$$.dirty[0]&2097152&&t(5,i=((Ae=k==null?void 0:k.options)==null?void 0:Ae.maxSelect)||null),n.$$.dirty[0]&2097152&&t(25,s=(ne=k==null?void 0:k.options)==null?void 0:ne.collectionId),n.$$.dirty[0]&2097152&&t(13,l=(we=k==null?void 0:k.options)==null?void 0:we.displayFields),n.$$.dirty[0]&100663296&&t(12,o=m.find(nt=>nt.id==s)||null),n.$$.dirty[0]&16777222&&typeof $<"u"&&!L&&y!=null&&y.isActive()&&X(!0),n.$$.dirty[0]&16777232&&t(11,r=P||L),n.$$.dirty[0]&8388616&&t(10,a=E>M.length),n.$$.dirty[0]&96&&t(9,u=i===null||i>C.length),n.$$.dirty[0]&64&&t(8,f=function(nt){return z.findByKey(C,"id",nt.id)})},[F,y,$,M,P,i,C,T,f,u,a,r,o,l,X,se,W,G,te,d,b,k,N,E,L,s,m,K,re,J,de,_e,$e,Ne,Re,be,Se,We,lt,fe,Ve,ee,Fe,ot,Ht]}class qM extends ye{constructor(e){super(),ve(this,e,RM,FM,he,{value:20,field:21,show:22,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[22]}get hide(){return this.$$.ctx[0]}}function Mp(n,e,t){const i=n.slice();return i[13]=e[t],i}function Dp(n,e,t){const i=n.slice();return i[16]=e[t],i}function Op(n){let e,t=n[4]&&Ep(n);return{c(){t&&t.c(),e=Me()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[4]?t?t.p(i,s):(t=Ep(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function Ep(n){let e,t=z.toArray(n[0]).slice(0,10),i=[];for(let s=0;s
    + `,p(e,"class","list-item")},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function Ip(n){var d;let e,t,i,s,l,o,r,a,u,f;i=new Xo({props:{record:n[13],displayFields:(d=n[2].options)==null?void 0:d.displayFields}});function c(){return n[7](n[13])}return{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=O(),l=v("div"),o=v("button"),o.innerHTML='',r=O(),p(t,"class","content"),p(o,"type","button"),p(o,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),p(l,"class","actions"),p(e,"class","list-item")},m(m,h){S(m,e,h),_(e,t),q(i,t,null),_(e,s),_(e,l),_(l,o),_(e,r),a=!0,u||(f=[Ie(Be.call(null,o,"Remove")),Y(o,"click",c)],u=!0)},p(m,h){var b;n=m;const g={};h&8&&(g.record=n[13]),h&4&&(g.displayFields=(b=n[2].options)==null?void 0:b.displayFields),i.$set(g)},i(m){a||(A(i.$$.fragment,m),a=!0)},o(m){I(i.$$.fragment,m),a=!1},d(m){m&&w(e),j(i),u=!1,Pe(f)}}}function jM(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,c,d,m,h,g,b,k,y=n[3],T=[];for(let C=0;CI(T[C],1,1,()=>{T[C]=null});let M=null;return y.length||(M=Op(n)),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),f=v("div"),c=v("div");for(let C=0;C + + Open picker`,p(t,"class",i=Si(z.getFieldTypeIcon(n[2].type))+" svelte-1ynw0pc"),p(l,"class","txt"),p(e,"for",a=n[12]),p(c,"class","relations-list svelte-1ynw0pc"),p(h,"type","button"),p(h,"class","btn btn-transparent btn-sm btn-block"),p(m,"class","list-item list-item-btn"),p(f,"class","list")},m(C,D){S(C,e,D),_(e,t),_(e,s),_(e,l),_(l,r),S(C,u,D),S(C,f,D),_(f,c);for(let E=0;E({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l={value:n[0],field:n[2]};return i=new qM({props:l}),n[9](i),i.$on("save",n[10]),{c(){H(e.$$.fragment),t=O(),H(i.$$.fragment)},m(o,r){q(e,o,r),S(o,t,r),q(i,o,r),s=!0},p(o,[r]){const a={};r&4&&(a.class="form-field form-field-list "+(o[2].required?"required":"")),r&4&&(a.name=o[2].name),r&528415&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};r&1&&(u.value=o[0]),r&4&&(u.field=o[2]),i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){I(e.$$.fragment,o),I(i.$$.fragment,o),s=!1},d(o){j(e,o),o&&w(t),n[9](null),j(i,o)}}}const Pp=100;function VM(n,e,t){let i,{value:s}=e,{picker:l}=e,{field:o=new mn}=e,r=[],a=!1;u();async function u(){var y,T;const g=z.toArray(s);if(!((y=o==null?void 0:o.options)!=null&&y.collectionId)||!g.length){t(3,r=[]),t(4,a=!1);return}t(4,a=!0);const b=g.slice(),k=[];for(;b.length>0;){const $=[];for(const M of b.splice(0,Pp))$.push(`id="${M}"`);k.push(pe.collection((T=o==null?void 0:o.options)==null?void 0:T.collectionId).getFullList(Pp,{filter:$.join("||"),$autoCancel:!1}))}try{let $=[];await Promise.all(k).then(M=>{$=$.concat(...M)});for(const M of g){const C=z.findByKey($,"id",M);C&&r.push(C)}t(3,r)}catch($){pe.errorResponseHandler($)}t(4,a=!1)}function f(g){var b;z.removeByKey(r,"id",g.id),t(3,r),i?t(0,s=r.map(k=>k.id)):t(0,s=((b=r[0])==null?void 0:b.id)||"")}const c=g=>f(g),d=()=>l==null?void 0:l.show();function m(g){ie[g?"unshift":"push"](()=>{l=g,t(1,l)})}const h=g=>{var b;t(3,r=g.detail||[]),t(0,s=i?r.map(k=>k.id):((b=r[0])==null?void 0:b.id)||"")};return n.$$set=g=>{"value"in g&&t(0,s=g.value),"picker"in g&&t(1,l=g.picker),"field"in g&&t(2,o=g.field)},n.$$.update=()=>{var g;n.$$.dirty&4&&t(5,i=((g=o.options)==null?void 0:g.maxSelect)!=1)},[s,l,o,r,a,i,f,c,d,m,h]}class zM extends ye{constructor(e){super(),ve(this,e,VM,HM,he,{value:0,picker:1,field:2})}}const BM=["Activate","AddUndo","BeforeAddUndo","BeforeExecCommand","BeforeGetContent","BeforeRenderUI","BeforeSetContent","BeforePaste","Blur","Change","ClearUndos","Click","ContextMenu","Copy","Cut","Dblclick","Deactivate","Dirty","Drag","DragDrop","DragEnd","DragGesture","DragOver","Drop","ExecCommand","Focus","FocusIn","FocusOut","GetContent","Hide","Init","KeyDown","KeyPress","KeyUp","LoadContent","MouseDown","MouseEnter","MouseLeave","MouseMove","MouseOut","MouseOver","MouseUp","NodeChange","ObjectResizeStart","ObjectResized","ObjectSelected","Paste","PostProcess","PostRender","PreProcess","ProgressState","Redo","Remove","Reset","ResizeEditor","SaveContent","SelectionChange","SetAttrib","SetContent","Show","Submit","Undo","VisualAid"],UM=(n,e)=>{BM.forEach(t=>{n.on(t,i=>{e(t.toLowerCase(),{eventName:t,event:i,editor:n})})})};function WM(n){let e;return{c(){e=v("textarea"),p(e,"id",n[0]),Ir(e,"visibility","hidden")},m(t,i){S(t,e,i),n[18](e)},p(t,i){i&1&&p(e,"id",t[0])},d(t){t&&w(e),n[18](null)}}}function YM(n){let e;return{c(){e=v("div"),p(e,"id",n[0])},m(t,i){S(t,e,i),n[17](e)},p(t,i){i&1&&p(e,"id",t[0])},d(t){t&&w(e),n[17](null)}}}function KM(n){let e;function t(l,o){return l[1]?YM:WM}let i=t(n),s=i(n);return{c(){e=v("div"),s.c(),p(e,"class",n[2])},m(l,o){S(l,e,o),s.m(e,null),n[19](e)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null))),o&4&&p(e,"class",l[2])},i:Z,o:Z,d(l){l&&w(e),s.d(),n[19](null)}}}const Ob=n=>n+"_"+Math.floor(Math.random()*1e9)+String(Date.now()),JM=()=>{let n={listeners:[],scriptId:Ob("tiny-script"),scriptLoaded:!1,injected:!1};const e=(i,s,l,o)=>{n.injected=!0;const r=s.createElement("script");r.referrerPolicy="origin",r.type="application/javascript",r.src=l,r.onload=()=>{o()},s.head&&s.head.appendChild(r)};return{load:(i,s,l)=>{n.scriptLoaded?l():(n.listeners.push(l),n.injected||e(n.scriptId,i,s,()=>{n.listeners.forEach(o=>o()),n.scriptLoaded=!0}))}}};let ZM=JM();function GM(n,e,t){var i;let{id:s=Ob("tinymce-svelte")}=e,{inline:l=void 0}=e,{disabled:o=!1}=e,{apiKey:r="no-api-key"}=e,{channel:a="6"}=e,{scriptSrc:u=void 0}=e,{conf:f={}}=e,{modelEvents:c="change input undo redo"}=e,{value:d=""}=e,{text:m=""}=e,{cssClass:h="tinymce-wrapper"}=e,g,b,k,y="",T=o;const $=Ct(),M=()=>{const N=(()=>typeof window<"u"?window:global)();return N&&N.tinymce?N.tinymce:null},C=()=>{const L=Object.assign(Object.assign({},f),{target:b,inline:l!==void 0?l:f.inline!==void 0?f.inline:!1,readonly:o,setup:N=>{t(14,k=N),N.on("init",()=>{N.setContent(d),N.on(c,()=>{t(15,y=N.getContent()),y!==d&&(t(5,d=y),t(6,m=N.getContent({format:"text"})))})}),UM(N,$),typeof f.setup=="function"&&f.setup(N)}});t(4,b.style.visibility="",b),M().init(L)};Zt(()=>{if(M()!==null)C();else{const L=u||`https://cdn.tiny.cloud/1/${r}/tinymce/${a}/tinymce.min.js`;ZM.load(g.ownerDocument,L,()=>{C()})}}),cg(()=>{var L;k&&((L=M())===null||L===void 0||L.remove(k))});function D(L){ie[L?"unshift":"push"](()=>{b=L,t(4,b)})}function E(L){ie[L?"unshift":"push"](()=>{b=L,t(4,b)})}function P(L){ie[L?"unshift":"push"](()=>{g=L,t(3,g)})}return n.$$set=L=>{"id"in L&&t(0,s=L.id),"inline"in L&&t(1,l=L.inline),"disabled"in L&&t(7,o=L.disabled),"apiKey"in L&&t(8,r=L.apiKey),"channel"in L&&t(9,a=L.channel),"scriptSrc"in L&&t(10,u=L.scriptSrc),"conf"in L&&t(11,f=L.conf),"modelEvents"in L&&t(12,c=L.modelEvents),"value"in L&&t(5,d=L.value),"text"in L&&t(6,m=L.text),"cssClass"in L&&t(2,h=L.cssClass)},n.$$.update=()=>{n.$$.dirty&123040&&(k&&y!==d&&(k.setContent(d),t(6,m=k.getContent({format:"text"}))),k&&o!==T&&(t(16,T=o),typeof(t(13,i=k.mode)===null||i===void 0?void 0:i.set)=="function"?k.mode.set(o?"readonly":"design"):k.setMode(o?"readonly":"design")))},[s,l,h,g,b,d,m,o,r,a,u,f,c,i,k,y,T,D,E,P]}class Eb extends ye{constructor(e){super(),ve(this,e,GM,KM,he,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function XM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d;function m(g){n[2](g)}let h={id:n[3],scriptSrc:"./libs/tinymce/tinymce.min.js",conf:z.defaultEditorOptions()};return n[0]!==void 0&&(h.value=n[0]),f=new Eb({props:h}),ie.push(()=>ge(f,"value",m)),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),H(f.$$.fragment),p(t,"class",i=z.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(g,b){S(g,e,b),_(e,t),_(e,s),_(e,l),_(l,r),S(g,u,b),q(f,g,b),d=!0},p(g,b){(!d||b&2&&i!==(i=z.getFieldTypeIcon(g[1].type)))&&p(t,"class",i),(!d||b&2)&&o!==(o=g[1].name+"")&&le(r,o),(!d||b&8&&a!==(a=g[3]))&&p(e,"for",a);const k={};b&8&&(k.id=g[3]),!c&&b&1&&(c=!0,k.value=g[0],ke(()=>c=!1)),f.$set(k)},i(g){d||(A(f.$$.fragment,g),d=!0)},o(g){I(f.$$.fragment,g),d=!1},d(g){g&&w(e),g&&w(u),j(f,g)}}}function QM(n){let e,t;return e=new me({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[XM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function xM(n,e,t){let{field:i=new mn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class e5 extends ye{constructor(e){super(),ve(this,e,xM,QM,he,{field:1,value:0})}}function t5(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Auth URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].authUrl),r||(a=Y(l,"input",n[2]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&ce(l,u[0].authUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function n5(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Token URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].tokenUrl),r||(a=Y(l,"input",n[3]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&l.value!==u[0].tokenUrl&&ce(l,u[0].tokenUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function i5(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("User API URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].userApiUrl),r||(a=Y(l,"input",n[4]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&l.value!==u[0].userApiUrl&&ce(l,u[0].userApiUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function s5(n){let e,t,i,s,l,o,r,a,u,f,c,d;return l=new me({props:{class:"form-field",name:n[1]+".authUrl",$$slots:{default:[t5,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),a=new me({props:{class:"form-field",name:n[1]+".tokenUrl",$$slots:{default:[n5,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),c=new me({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[i5,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Selfhosted endpoints (optional)",t=O(),i=v("div"),s=v("div"),H(l.$$.fragment),o=O(),r=v("div"),H(a.$$.fragment),u=O(),f=v("div"),H(c.$$.fragment),p(e,"class","section-title"),p(s,"class","col-lg-4"),p(r,"class","col-lg-4"),p(f,"class","col-lg-4"),p(i,"class","grid")},m(m,h){S(m,e,h),S(m,t,h),S(m,i,h),_(i,s),q(l,s,null),_(i,o),_(i,r),q(a,r,null),_(i,u),_(i,f),q(c,f,null),d=!0},p(m,[h]){const g={};h&2&&(g.name=m[1]+".authUrl"),h&97&&(g.$$scope={dirty:h,ctx:m}),l.$set(g);const b={};h&2&&(b.name=m[1]+".tokenUrl"),h&97&&(b.$$scope={dirty:h,ctx:m}),a.$set(b);const k={};h&2&&(k.name=m[1]+".userApiUrl"),h&97&&(k.$$scope={dirty:h,ctx:m}),c.$set(k)},i(m){d||(A(l.$$.fragment,m),A(a.$$.fragment,m),A(c.$$.fragment,m),d=!0)},o(m){I(l.$$.fragment,m),I(a.$$.fragment,m),I(c.$$.fragment,m),d=!1},d(m){m&&w(e),m&&w(t),m&&w(i),j(l),j(a),j(c)}}}function l5(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}function r(){s.userApiUrl=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"config"in a&&t(0,s=a.config)},[s,i,l,o,r]}class Lp extends ye{constructor(e){super(),ve(this,e,l5,s5,he,{key:1,config:0})}}function o5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Auth URL"),s=O(),l=v("input"),r=O(),a=v("div"),a.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize",p(e,"for",i=n[4]),p(l,"type","url"),p(l,"id",o=n[4]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),ce(l,n[0].authUrl),S(c,r,d),S(c,a,d),u||(f=Y(l,"input",n[2]),u=!0)},p(c,d){d&16&&i!==(i=c[4])&&p(e,"for",i),d&16&&o!==(o=c[4])&&p(l,"id",o),d&1&&ce(l,c[0].authUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function r5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Token URL"),s=O(),l=v("input"),r=O(),a=v("div"),a.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token",p(e,"for",i=n[4]),p(l,"type","text"),p(l,"id",o=n[4]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),ce(l,n[0].tokenUrl),S(c,r,d),S(c,a,d),u||(f=Y(l,"input",n[3]),u=!0)},p(c,d){d&16&&i!==(i=c[4])&&p(e,"for",i),d&16&&o!==(o=c[4])&&p(l,"id",o),d&1&&l.value!==c[0].tokenUrl&&ce(l,c[0].tokenUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function a5(n){let e,t,i,s,l,o,r,a,u;return l=new me({props:{class:"form-field required",name:n[1]+".authUrl",$$slots:{default:[o5,({uniqueId:f})=>({4:f}),({uniqueId:f})=>f?16:0]},$$scope:{ctx:n}}}),a=new me({props:{class:"form-field required",name:n[1]+".tokenUrl",$$slots:{default:[r5,({uniqueId:f})=>({4:f}),({uniqueId:f})=>f?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Azure AD endpoints",t=O(),i=v("div"),s=v("div"),H(l.$$.fragment),o=O(),r=v("div"),H(a.$$.fragment),p(e,"class","section-title"),p(s,"class","col-lg-12"),p(r,"class","col-lg-12"),p(i,"class","grid")},m(f,c){S(f,e,c),S(f,t,c),S(f,i,c),_(i,s),q(l,s,null),_(i,o),_(i,r),q(a,r,null),u=!0},p(f,[c]){const d={};c&2&&(d.name=f[1]+".authUrl"),c&49&&(d.$$scope={dirty:c,ctx:f}),l.$set(d);const m={};c&2&&(m.name=f[1]+".tokenUrl"),c&49&&(m.$$scope={dirty:c,ctx:f}),a.$set(m)},i(f){u||(A(l.$$.fragment,f),A(a.$$.fragment,f),u=!0)},o(f){I(l.$$.fragment,f),I(a.$$.fragment,f),u=!1},d(f){f&&w(e),f&&w(t),f&&w(i),j(l),j(a)}}}function u5(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"config"in r&&t(0,s=r.config)},[s,i,l,o]}class f5 extends ye{constructor(e){super(),ve(this,e,u5,a5,he,{key:1,config:0})}}function c5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Auth URL"),s=O(),l=v("input"),r=O(),a=v("div"),a.textContent="Eg. https://YOUR_AUTHENTIK_URL/application/o/authorize/",p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),ce(l,n[0].authUrl),S(c,r,d),S(c,a,d),u||(f=Y(l,"input",n[2]),u=!0)},p(c,d){d&32&&i!==(i=c[5])&&p(e,"for",i),d&32&&o!==(o=c[5])&&p(l,"id",o),d&1&&ce(l,c[0].authUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function d5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Token URL"),s=O(),l=v("input"),r=O(),a=v("div"),a.textContent="Eg. https://YOUR_AUTHENTIK_URL/application/o/token/",p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),ce(l,n[0].tokenUrl),S(c,r,d),S(c,a,d),u||(f=Y(l,"input",n[3]),u=!0)},p(c,d){d&32&&i!==(i=c[5])&&p(e,"for",i),d&32&&o!==(o=c[5])&&p(l,"id",o),d&1&&l.value!==c[0].tokenUrl&&ce(l,c[0].tokenUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function p5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("User API URL"),s=O(),l=v("input"),r=O(),a=v("div"),a.textContent="Eg. https://YOUR_AUTHENTIK_URL/application/o/userinfo/",p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),ce(l,n[0].userApiUrl),S(c,r,d),S(c,a,d),u||(f=Y(l,"input",n[4]),u=!0)},p(c,d){d&32&&i!==(i=c[5])&&p(e,"for",i),d&32&&o!==(o=c[5])&&p(l,"id",o),d&1&&l.value!==c[0].userApiUrl&&ce(l,c[0].userApiUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function m5(n){let e,t,i,s,l,o,r,a,u,f,c,d;return l=new me({props:{class:"form-field required",name:n[1]+".authUrl",$$slots:{default:[c5,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),a=new me({props:{class:"form-field required",name:n[1]+".tokenUrl",$$slots:{default:[d5,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),c=new me({props:{class:"form-field required",name:n[1]+".userApiUrl",$$slots:{default:[p5,({uniqueId:m})=>({5:m}),({uniqueId:m})=>m?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Authentik endpoints",t=O(),i=v("div"),s=v("div"),H(l.$$.fragment),o=O(),r=v("div"),H(a.$$.fragment),u=O(),f=v("div"),H(c.$$.fragment),p(e,"class","section-title"),p(s,"class","col-lg-12"),p(r,"class","col-lg-12"),p(f,"class","col-lg-12"),p(i,"class","grid")},m(m,h){S(m,e,h),S(m,t,h),S(m,i,h),_(i,s),q(l,s,null),_(i,o),_(i,r),q(a,r,null),_(i,u),_(i,f),q(c,f,null),d=!0},p(m,[h]){const g={};h&2&&(g.name=m[1]+".authUrl"),h&97&&(g.$$scope={dirty:h,ctx:m}),l.$set(g);const b={};h&2&&(b.name=m[1]+".tokenUrl"),h&97&&(b.$$scope={dirty:h,ctx:m}),a.$set(b);const k={};h&2&&(k.name=m[1]+".userApiUrl"),h&97&&(k.$$scope={dirty:h,ctx:m}),c.$set(k)},i(m){d||(A(l.$$.fragment,m),A(a.$$.fragment,m),A(c.$$.fragment,m),d=!0)},o(m){I(l.$$.fragment,m),I(a.$$.fragment,m),I(c.$$.fragment,m),d=!1},d(m){m&&w(e),m&&w(t),m&&w(i),j(l),j(a),j(c)}}}function h5(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}function r(){s.userApiUrl=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"config"in a&&t(0,s=a.config)},[s,i,l,o,r]}class g5 extends ye{constructor(e){super(),ve(this,e,h5,m5,he,{key:1,config:0})}}const vl={googleAuth:{title:"Google",icon:"ri-google-fill"},facebookAuth:{title:"Facebook",icon:"ri-facebook-fill"},twitterAuth:{title:"Twitter",icon:"ri-twitter-fill"},githubAuth:{title:"GitHub",icon:"ri-github-fill"},gitlabAuth:{title:"GitLab",icon:"ri-gitlab-fill",optionsComponent:Lp},discordAuth:{title:"Discord",icon:"ri-discord-fill"},microsoftAuth:{title:"Microsoft",icon:"ri-microsoft-fill",optionsComponent:f5},spotifyAuth:{title:"Spotify",icon:"ri-spotify-fill"},kakaoAuth:{title:"Kakao",icon:"ri-kakao-talk-fill"},twitchAuth:{title:"Twitch",icon:"ri-twitch-fill"},stravaAuth:{title:"Strava",icon:"ri-riding-fill"},giteeAuth:{title:"Gitee",icon:"ri-git-repository-fill"},giteaAuth:{title:"Gitea",icon:"ri-cup-fill",optionsComponent:Lp},livechatAuth:{title:"LiveChat",icon:"ri-chat-1-fill"},authentikAuth:{title:"Authentik",icon:"ri-lock-fill",optionsComponent:g5}};function Np(n,e,t){const i=n.slice();return i[9]=e[t],i}function _5(n){let e;return{c(){e=v("h6"),e.textContent="No linked OAuth2 providers.",p(e,"class","txt-hint txt-center m-t-sm m-b-sm")},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function b5(n){let e,t=n[1],i=[];for(let s=0;s',p(e,"class","block txt-center")},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function Fp(n){let e,t,i,s,l,o=n[3](n[9].provider)+"",r,a,u,f,c=n[9].providerId+"",d,m,h,g,b,k;function y(){return n[6](n[9])}return{c(){e=v("div"),t=v("i"),s=O(),l=v("span"),r=B(o),a=O(),u=v("div"),f=B("ID: "),d=B(c),m=O(),h=v("button"),h.innerHTML='',g=O(),p(t,"class",i=n[4](n[9].provider)),p(l,"class","txt"),p(u,"class","txt-hint"),p(h,"type","button"),p(h,"class","btn btn-transparent link-hint btn-circle btn-sm m-l-auto"),p(e,"class","list-item")},m(T,$){S(T,e,$),_(e,t),_(e,s),_(e,l),_(l,r),_(e,a),_(e,u),_(u,f),_(u,d),_(e,m),_(e,h),_(e,g),b||(k=Y(h,"click",y),b=!0)},p(T,$){n=T,$&2&&i!==(i=n[4](n[9].provider))&&p(t,"class",i),$&2&&o!==(o=n[3](n[9].provider)+"")&&le(r,o),$&2&&c!==(c=n[9].providerId+"")&&le(d,c)},d(T){T&&w(e),b=!1,k()}}}function y5(n){let e;function t(l,o){var r;return l[2]?v5:(r=l[0])!=null&&r.id&&l[1].length?b5:_5}let i=t(n),s=i(n);return{c(){s.c(),e=Me()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:Z,o:Z,d(l){s.d(l),l&&w(e)}}}function k5(n,e,t){const i=Ct();let{record:s}=e,l=[],o=!1;function r(d){var m;return((m=vl[d+"Auth"])==null?void 0:m.title)||z.sentenize(d,!1)}function a(d){var m;return((m=vl[d+"Auth"])==null?void 0:m.icon)||`ri-${d}-line`}async function u(){if(!(s!=null&&s.id)){t(1,l=[]),t(2,o=!1);return}t(2,o=!0);try{t(1,l=await pe.collection(s.collectionId).listExternalAuths(s.id))}catch(d){pe.errorResponseHandler(d)}t(2,o=!1)}function f(d){!(s!=null&&s.id)||!d||cn(`Do you really want to unlink the ${r(d)} provider?`,()=>pe.collection(s.collectionId).unlinkExternalAuth(s.id,d).then(()=>{zt(`Successfully unlinked the ${r(d)} provider.`),i("unlink",d),u()}).catch(m=>{pe.errorResponseHandler(m)}))}u();const c=d=>f(d.provider);return n.$$set=d=>{"record"in d&&t(0,s=d.record)},[s,l,o,r,a,f,c]}class w5 extends ye{constructor(e){super(),ve(this,e,k5,y5,he,{record:0})}}function Rp(n,e,t){const i=n.slice();return i[51]=e[t],i[52]=e,i[53]=t,i}function qp(n){let e,t;return e=new me({props:{class:"form-field readonly",name:"id",$$slots:{default:[S5,({uniqueId:i})=>({54:i}),({uniqueId:i})=>[0,i?8388608:0]]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,s){const l={};s[0]&4|s[1]&25165824&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function S5(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,k;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="id",l=O(),o=v("span"),a=O(),u=v("div"),f=v("i"),d=O(),m=v("input"),p(t,"class",z.getFieldTypeIcon("primary")),p(s,"class","txt"),p(o,"class","flex-fill"),p(e,"for",r=n[54]),p(f,"class","ri-calendar-event-line txt-disabled"),p(u,"class","form-field-addon"),p(m,"type","text"),p(m,"id",h=n[54]),m.value=g=n[2].id,m.readOnly=!0},m(y,T){S(y,e,T),_(e,t),_(e,i),_(e,s),_(e,l),_(e,o),S(y,a,T),S(y,u,T),_(u,f),S(y,d,T),S(y,m,T),b||(k=Ie(c=Be.call(null,f,{text:`Created: ${n[2].created} +Updated: ${n[2].updated}`,position:"left"})),b=!0)},p(y,T){T[1]&8388608&&r!==(r=y[54])&&p(e,"for",r),c&&Bt(c.update)&&T[0]&4&&c.update.call(null,{text:`Created: ${y[2].created} +Updated: ${y[2].updated}`,position:"left"}),T[1]&8388608&&h!==(h=y[54])&&p(m,"id",h),T[0]&4&&g!==(g=y[2].id)&&m.value!==g&&(m.value=g)},d(y){y&&w(e),y&&w(a),y&&w(u),y&&w(d),y&&w(m),b=!1,k()}}}function jp(n){var u,f;let e,t,i,s,l;function o(c){n[29](c)}let r={collection:n[0]};n[2]!==void 0&&(r.record=n[2]),e=new p4({props:r}),ie.push(()=>ge(e,"record",o));let a=((f=(u=n[0])==null?void 0:u.schema)==null?void 0:f.length)&&Hp();return{c(){H(e.$$.fragment),i=O(),a&&a.c(),s=Me()},m(c,d){q(e,c,d),S(c,i,d),a&&a.m(c,d),S(c,s,d),l=!0},p(c,d){var h,g;const m={};d[0]&1&&(m.collection=c[0]),!t&&d[0]&4&&(t=!0,m.record=c[2],ke(()=>t=!1)),e.$set(m),(g=(h=c[0])==null?void 0:h.schema)!=null&&g.length?a||(a=Hp(),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null)},i(c){l||(A(e.$$.fragment,c),l=!0)},o(c){I(e.$$.fragment,c),l=!1},d(c){j(e,c),c&&w(i),a&&a.d(c),c&&w(s)}}}function Hp(n){let e;return{c(){e=v("hr")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function T5(n){let e,t,i;function s(o){n[42](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new zM({props:l}),ie.push(()=>ge(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function $5(n){let e,t,i,s,l;function o(f){n[39](f,n[51])}function r(f){n[40](f,n[51])}function a(f){n[41](f,n[51])}let u={field:n[51],record:n[2]};return n[2][n[51].name]!==void 0&&(u.value=n[2][n[51].name]),n[3][n[51].name]!==void 0&&(u.uploadedFiles=n[3][n[51].name]),n[4][n[51].name]!==void 0&&(u.deletedFileIndexes=n[4][n[51].name]),e=new bM({props:u}),ie.push(()=>ge(e,"value",o)),ie.push(()=>ge(e,"uploadedFiles",r)),ie.push(()=>ge(e,"deletedFileIndexes",a)),{c(){H(e.$$.fragment)},m(f,c){q(e,f,c),l=!0},p(f,c){n=f;const d={};c[0]&1&&(d.field=n[51]),c[0]&4&&(d.record=n[2]),!t&&c[0]&5&&(t=!0,d.value=n[2][n[51].name],ke(()=>t=!1)),!i&&c[0]&9&&(i=!0,d.uploadedFiles=n[3][n[51].name],ke(()=>i=!1)),!s&&c[0]&17&&(s=!0,d.deletedFileIndexes=n[4][n[51].name],ke(()=>s=!1)),e.$set(d)},i(f){l||(A(e.$$.fragment,f),l=!0)},o(f){I(e.$$.fragment,f),l=!1},d(f){j(e,f)}}}function C5(n){let e,t,i;function s(o){n[38](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new J4({props:l}),ie.push(()=>ge(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function M5(n){let e,t,i;function s(o){n[37](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new U4({props:l}),ie.push(()=>ge(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function D5(n){let e,t,i;function s(o){n[36](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new H4({props:l}),ie.push(()=>ge(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function O5(n){let e,t,i;function s(o){n[35](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new e5({props:l}),ie.push(()=>ge(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function E5(n){let e,t,i;function s(o){n[34](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new F4({props:l}),ie.push(()=>ge(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function A5(n){let e,t,i;function s(o){n[33](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new I4({props:l}),ie.push(()=>ge(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function I5(n){let e,t,i;function s(o){n[32](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new D4({props:l}),ie.push(()=>ge(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function P5(n){let e,t,i;function s(o){n[31](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new T4({props:l}),ie.push(()=>ge(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function L5(n){let e,t,i;function s(o){n[30](o,n[51])}let l={field:n[51]};return n[2][n[51].name]!==void 0&&(l.value=n[2][n[51].name]),e=new y4({props:l}),ie.push(()=>ge(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[51]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[51].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function Vp(n,e){let t,i,s,l,o;const r=[L5,P5,I5,A5,E5,O5,D5,M5,C5,$5,T5],a=[];function u(f,c){return f[51].type==="text"?0:f[51].type==="number"?1:f[51].type==="bool"?2:f[51].type==="email"?3:f[51].type==="url"?4:f[51].type==="editor"?5:f[51].type==="date"?6:f[51].type==="select"?7:f[51].type==="json"?8:f[51].type==="file"?9:f[51].type==="relation"?10:-1}return~(i=u(e))&&(s=a[i]=r[i](e)),{key:n,first:null,c(){t=Me(),s&&s.c(),l=Me(),this.first=t},m(f,c){S(f,t,c),~i&&a[i].m(f,c),S(f,l,c),o=!0},p(f,c){e=f;let d=i;i=u(e),i===d?~i&&a[i].p(e,c):(s&&(ae(),I(a[d],1,1,()=>{a[d]=null}),ue()),~i?(s=a[i],s?s.p(e,c):(s=a[i]=r[i](e),s.c()),A(s,1),s.m(l.parentNode,l)):s=null)},i(f){o||(A(s),o=!0)},o(f){I(s),o=!1},d(f){f&&w(t),~i&&a[i].d(f),f&&w(l)}}}function zp(n){let e,t,i;return t=new w5({props:{record:n[2]}}),{c(){e=v("div"),H(t.$$.fragment),p(e,"class","tab-item"),Q(e,"active",n[10]===yl)},m(s,l){S(s,e,l),q(t,e,null),i=!0},p(s,l){const o={};l[0]&4&&(o.record=s[2]),t.$set(o),(!i||l[0]&1024)&&Q(e,"active",s[10]===yl)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){I(t.$$.fragment,s),i=!1},d(s){s&&w(e),j(t)}}}function N5(n){var b,k;let e,t,i,s,l=[],o=new Map,r,a,u,f,c=!n[2].isNew&&qp(n),d=((b=n[0])==null?void 0:b.isAuth)&&jp(n),m=((k=n[0])==null?void 0:k.schema)||[];const h=y=>y[51].name;for(let y=0;y{c=null}),ue()):c?(c.p(y,T),T[0]&4&&A(c,1)):(c=qp(y),c.c(),A(c,1),c.m(t,i)),($=y[0])!=null&&$.isAuth?d?(d.p(y,T),T[0]&1&&A(d,1)):(d=jp(y),d.c(),A(d,1),d.m(t,s)):d&&(ae(),I(d,1,1,()=>{d=null}),ue()),T[0]&29&&(m=((M=y[0])==null?void 0:M.schema)||[],ae(),l=wt(l,T,h,1,y,m,o,t,ln,Vp,null,Rp),ue()),(!a||T[0]&1024)&&Q(t,"active",y[10]===Gi),y[0].isAuth&&!y[2].isNew?g?(g.p(y,T),T[0]&5&&A(g,1)):(g=zp(y),g.c(),A(g,1),g.m(e,null)):g&&(ae(),I(g,1,1,()=>{g=null}),ue())},i(y){if(!a){A(c),A(d);for(let T=0;T + Send verification email`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=Y(e,"click",n[23]),t=!0)},p:Z,d(s){s&&w(e),t=!1,i()}}}function Wp(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + Send password reset email`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=Y(e,"click",n[24]),t=!0)},p:Z,d(s){s&&w(e),t=!1,i()}}}function F5(n){let e,t,i,s,l,o,r,a=n[0].isAuth&&!n[7].verified&&n[7].email&&Up(n),u=n[0].isAuth&&n[7].email&&Wp(n);return{c(){a&&a.c(),e=O(),u&&u.c(),t=O(),i=v("button"),i.innerHTML=` + Duplicate`,s=O(),l=v("button"),l.innerHTML=` + Delete`,p(i,"type","button"),p(i,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item txt-danger closable")},m(f,c){a&&a.m(f,c),S(f,e,c),u&&u.m(f,c),S(f,t,c),S(f,i,c),S(f,s,c),S(f,l,c),o||(r=[Y(i,"click",n[25]),Y(l,"click",kn(dt(n[26])))],o=!0)},p(f,c){f[0].isAuth&&!f[7].verified&&f[7].email?a?a.p(f,c):(a=Up(f),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null),f[0].isAuth&&f[7].email?u?u.p(f,c):(u=Wp(f),u.c(),u.m(t.parentNode,t)):u&&(u.d(1),u=null)},d(f){a&&a.d(f),f&&w(e),u&&u.d(f),f&&w(t),f&&w(i),f&&w(s),f&&w(l),o=!1,Pe(r)}}}function Yp(n){let e,t,i,s,l,o;return{c(){e=v("div"),t=v("button"),t.textContent="Account",i=O(),s=v("button"),s.textContent="Authorized providers",p(t,"type","button"),p(t,"class","tab-item"),Q(t,"active",n[10]===Gi),p(s,"type","button"),p(s,"class","tab-item"),Q(s,"active",n[10]===yl),p(e,"class","tabs-header stretched")},m(r,a){S(r,e,a),_(e,t),_(e,i),_(e,s),l||(o=[Y(t,"click",n[27]),Y(s,"click",n[28])],l=!0)},p(r,a){a[0]&1024&&Q(t,"active",r[10]===Gi),a[0]&1024&&Q(s,"active",r[10]===yl)},d(r){r&&w(e),l=!1,Pe(o)}}}function R5(n){var g;let e,t=n[2].isNew?"New":"Edit",i,s,l,o=((g=n[0])==null?void 0:g.name)+"",r,a,u,f,c,d,m=!n[2].isNew&&Bp(n),h=n[0].isAuth&&!n[2].isNew&&Yp(n);return{c(){e=v("h4"),i=B(t),s=O(),l=v("strong"),r=B(o),a=B(" record"),u=O(),m&&m.c(),f=O(),h&&h.c(),c=Me()},m(b,k){S(b,e,k),_(e,i),_(e,s),_(e,l),_(l,r),_(e,a),S(b,u,k),m&&m.m(b,k),S(b,f,k),h&&h.m(b,k),S(b,c,k),d=!0},p(b,k){var y;(!d||k[0]&4)&&t!==(t=b[2].isNew?"New":"Edit")&&le(i,t),(!d||k[0]&1)&&o!==(o=((y=b[0])==null?void 0:y.name)+"")&&le(r,o),b[2].isNew?m&&(ae(),I(m,1,1,()=>{m=null}),ue()):m?(m.p(b,k),k[0]&4&&A(m,1)):(m=Bp(b),m.c(),A(m,1),m.m(f.parentNode,f)),b[0].isAuth&&!b[2].isNew?h?h.p(b,k):(h=Yp(b),h.c(),h.m(c.parentNode,c)):h&&(h.d(1),h=null)},i(b){d||(A(m),d=!0)},o(b){I(m),d=!1},d(b){b&&w(e),b&&w(u),m&&m.d(b),b&&w(f),h&&h.d(b),b&&w(c)}}}function q5(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),s=v("button"),l=v("span"),r=B(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[8],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[13]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[11]||n[8],Q(s,"btn-loading",n[8])},m(c,d){S(c,e,d),_(e,t),S(c,i,d),S(c,s,d),_(s,l),_(l,r),u||(f=Y(e,"click",n[22]),u=!0)},p(c,d){d[0]&256&&(e.disabled=c[8]),d[0]&4&&o!==(o=c[2].isNew?"Create":"Save changes")&&le(r,o),d[0]&2304&&a!==(a=!c[11]||c[8])&&(s.disabled=a),d[0]&256&&Q(s,"btn-loading",c[8])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,f()}}}function j5(n){var s;let e,t,i={class:` + record-panel + `+(n[12]?"overlay-panel-xl":"overlay-panel-lg")+` + `+((s=n[0])!=null&&s.isAuth&&!n[2].isNew?"colored-header":"")+` + `,beforeHide:n[43],$$slots:{footer:[q5],header:[R5],default:[N5]},$$scope:{ctx:n}};return e=new Nn({props:i}),n[44](e),e.$on("hide",n[45]),e.$on("show",n[46]),{c(){H(e.$$.fragment)},m(l,o){q(e,l,o),t=!0},p(l,o){var a;const r={};o[0]&4101&&(r.class=` + record-panel + `+(l[12]?"overlay-panel-xl":"overlay-panel-lg")+` + `+((a=l[0])!=null&&a.isAuth&&!l[2].isNew?"colored-header":"")+` + `),o[0]&544&&(r.beforeHide=l[43]),o[0]&3485|o[1]&16777216&&(r.$$scope={dirty:o,ctx:l}),e.$set(r)},i(l){t||(A(e.$$.fragment,l),t=!0)},o(l){I(e.$$.fragment,l),t=!1},d(l){n[44](null),j(e,l)}}}const Gi="form",yl="providers";function Kp(n){return JSON.stringify(n)}function H5(n,e,t){let i,s,l,o;const r=Ct(),a="record_"+z.randomString(5);let{collection:u}=e,f,c=null,d=new Ti,m=!1,h=!1,g={},b={},k="",y=Gi;function T(ne){return M(ne),t(9,h=!0),t(10,y=Gi),f==null?void 0:f.show()}function $(){return f==null?void 0:f.hide()}async function M(ne){Bn({}),t(7,c=ne||{}),ne!=null&&ne.clone?t(2,d=ne.clone()):t(2,d=new Ti),t(3,g={}),t(4,b={}),await sn(),t(20,k=Kp(d))}function C(){if(m||!o||!(u!=null&&u.id))return;t(8,m=!0);const ne=E();let we;d.isNew?we=pe.collection(u.id).create(ne):we=pe.collection(u.id).update(d.id,ne),we.then(nt=>{zt(d.isNew?"Successfully created record.":"Successfully updated record."),t(9,h=!1),$(),r("save",nt)}).catch(nt=>{pe.errorResponseHandler(nt)}).finally(()=>{t(8,m=!1)})}function D(){c!=null&&c.id&&cn("Do you really want to delete the selected record?",()=>pe.collection(c.collectionId).delete(c.id).then(()=>{$(),zt("Successfully deleted record."),r("delete",c)}).catch(ne=>{pe.errorResponseHandler(ne)}))}function E(){const ne=(d==null?void 0:d.export())||{},we=new FormData,nt={};for(const et of(u==null?void 0:u.schema)||[])nt[et.name]=!0;u!=null&&u.isAuth&&(nt.username=!0,nt.email=!0,nt.emailVisibility=!0,nt.password=!0,nt.passwordConfirm=!0,nt.verified=!0);for(const et in ne)nt[et]&&(typeof ne[et]>"u"&&(ne[et]=null),z.addValueToFormData(we,et,ne[et]));for(const et in g){const bt=z.toArray(g[et]);for(const Gt of bt)we.append(et,Gt)}for(const et in b){const bt=z.toArray(b[et]);for(const Gt of bt)we.append(et+"."+Gt,"")}return we}function P(){!(u!=null&&u.id)||!(c!=null&&c.email)||cn(`Do you really want to sent verification email to ${c.email}?`,()=>pe.collection(u.id).requestVerification(c.email).then(()=>{zt(`Successfully sent verification email to ${c.email}.`)}).catch(ne=>{pe.errorResponseHandler(ne)}))}function L(){!(u!=null&&u.id)||!(c!=null&&c.email)||cn(`Do you really want to sent password reset email to ${c.email}?`,()=>pe.collection(u.id).requestPasswordReset(c.email).then(()=>{zt(`Successfully sent password reset email to ${c.email}.`)}).catch(ne=>{pe.errorResponseHandler(ne)}))}function N(){l?cn("You have unsaved changes. Do you really want to discard them?",()=>{F()}):F()}async function F(){const ne=c==null?void 0:c.clone();if(ne){ne.id="",ne.created="",ne.updated="";const we=(u==null?void 0:u.schema)||[];for(const nt of we)nt.type==="file"&&delete ne[nt.name]}T(ne),await sn(),t(20,k="")}const R=()=>$(),X=()=>P(),se=()=>L(),W=()=>N(),G=()=>D(),te=()=>t(10,y=Gi),K=()=>t(10,y=yl);function re(ne){d=ne,t(2,d)}function J(ne,we){n.$$.not_equal(d[we.name],ne)&&(d[we.name]=ne,t(2,d))}function de(ne,we){n.$$.not_equal(d[we.name],ne)&&(d[we.name]=ne,t(2,d))}function _e(ne,we){n.$$.not_equal(d[we.name],ne)&&(d[we.name]=ne,t(2,d))}function $e(ne,we){n.$$.not_equal(d[we.name],ne)&&(d[we.name]=ne,t(2,d))}function Ne(ne,we){n.$$.not_equal(d[we.name],ne)&&(d[we.name]=ne,t(2,d))}function Re(ne,we){n.$$.not_equal(d[we.name],ne)&&(d[we.name]=ne,t(2,d))}function be(ne,we){n.$$.not_equal(d[we.name],ne)&&(d[we.name]=ne,t(2,d))}function Se(ne,we){n.$$.not_equal(d[we.name],ne)&&(d[we.name]=ne,t(2,d))}function We(ne,we){n.$$.not_equal(d[we.name],ne)&&(d[we.name]=ne,t(2,d))}function lt(ne,we){n.$$.not_equal(d[we.name],ne)&&(d[we.name]=ne,t(2,d))}function fe(ne,we){n.$$.not_equal(g[we.name],ne)&&(g[we.name]=ne,t(3,g))}function Ve(ne,we){n.$$.not_equal(b[we.name],ne)&&(b[we.name]=ne,t(4,b))}function ee(ne,we){n.$$.not_equal(d[we.name],ne)&&(d[we.name]=ne,t(2,d))}const Fe=()=>l&&h?(cn("You have unsaved changes. Do you really want to close the panel?",()=>{t(9,h=!1),$()}),!1):(Bn({}),!0);function ot(ne){ie[ne?"unshift":"push"](()=>{f=ne,t(6,f)})}function Ht(ne){ze.call(this,n,ne)}function Ae(ne){ze.call(this,n,ne)}return n.$$set=ne=>{"collection"in ne&&t(0,u=ne.collection)},n.$$.update=()=>{var ne;n.$$.dirty[0]&1&&t(12,i=!!((ne=u==null?void 0:u.schema)!=null&&ne.find(we=>we.type==="editor"))),n.$$.dirty[0]&24&&t(21,s=z.hasNonEmptyProps(g)||z.hasNonEmptyProps(b)),n.$$.dirty[0]&3145732&&t(5,l=s||k!=Kp(d)),n.$$.dirty[0]&36&&t(11,o=d.isNew||l)},[u,$,d,g,b,l,f,c,m,h,y,o,i,a,C,D,P,L,N,T,k,s,R,X,se,W,G,te,K,re,J,de,_e,$e,Ne,Re,be,Se,We,lt,fe,Ve,ee,Fe,ot,Ht,Ae]}class Ab extends ye{constructor(e){super(),ve(this,e,H5,j5,he,{collection:0,show:19,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[19]}get hide(){return this.$$.ctx[1]}}function Jp(n,e,t){const i=n.slice();return i[15]=e[t],i[7]=t,i}function Zp(n,e,t){const i=n.slice();return i[12]=e[t],i}function Gp(n,e,t){const i=n.slice();return i[5]=e[t],i[7]=t,i}function Xp(n,e,t){const i=n.slice();return i[5]=e[t],i[7]=t,i}function V5(n){const e=n.slice(),t=z.toArray(e[3]);e[8]=t;const i=z.toArray(e[0].expand[e[1].name]);e[9]=i;const s=e[2]?20:200;return e[10]=s,e}function z5(n){let e,t=z.truncate(n[3],2e3)+"",i;return{c(){e=v("span"),i=B(t),p(e,"class","block txt-break")},m(s,l){S(s,e,l),_(e,i)},p(s,l){l&8&&t!==(t=z.truncate(s[3],2e3)+"")&&le(i,t)},i:Z,o:Z,d(s){s&&w(e)}}}function B5(n){let e,t=z.truncate(n[3])+"",i,s;return{c(){e=v("span"),i=B(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=z.truncate(n[3]))},m(l,o){S(l,e,o),_(e,i)},p(l,o){o&8&&t!==(t=z.truncate(l[3])+"")&&le(i,t),o&8&&s!==(s=z.truncate(l[3]))&&p(e,"title",s)},i:Z,o:Z,d(l){l&&w(e)}}}function U5(n){let e,t=[],i=new Map,s,l=z.toArray(n[3]);const o=r=>r[7]+r[15];for(let r=0;rn[10]&&tm();return{c(){e=v("div"),i.c(),s=O(),u&&u.c(),p(e,"class","inline-flex")},m(f,c){S(f,e,c),r[t].m(e,null),_(e,s),u&&u.m(e,null),l=!0},p(f,c){let d=t;t=a(f),t===d?r[t].p(f,c):(ae(),I(r[d],1,1,()=>{r[d]=null}),ue(),i=r[t],i?i.p(f,c):(i=r[t]=o[t](f),i.c()),A(i,1),i.m(e,s)),f[8].length>f[10]?u||(u=tm(),u.c(),u.m(e,null)):u&&(u.d(1),u=null)},i(f){l||(A(i),l=!0)},o(f){I(i),l=!1},d(f){f&&w(e),r[t].d(),u&&u.d()}}}function Y5(n){let e,t=[],i=new Map,s=z.toArray(n[3]);const l=o=>o[7]+o[5];for(let o=0;o{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){I(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function Z5(n){let e,t=z.truncate(n[3])+"",i,s,l;return{c(){e=v("a"),i=B(t),p(e,"class","txt-ellipsis"),p(e,"href",n[3]),p(e,"target","_blank"),p(e,"rel","noopener noreferrer")},m(o,r){S(o,e,r),_(e,i),s||(l=[Ie(Be.call(null,e,"Open in new tab")),Y(e,"click",kn(n[4]))],s=!0)},p(o,r){r&8&&t!==(t=z.truncate(o[3])+"")&&le(i,t),r&8&&p(e,"href",o[3])},i:Z,o:Z,d(o){o&&w(e),s=!1,Pe(l)}}}function G5(n){let e,t;return{c(){e=v("span"),t=B(n[3]),p(e,"class","txt")},m(i,s){S(i,e,s),_(e,t)},p(i,s){s&8&&le(t,i[3])},i:Z,o:Z,d(i){i&&w(e)}}}function X5(n){let e,t=n[3]?"True":"False",i;return{c(){e=v("span"),i=B(t),p(e,"class","txt")},m(s,l){S(s,e,l),_(e,i)},p(s,l){l&8&&t!==(t=s[3]?"True":"False")&&le(i,t)},i:Z,o:Z,d(s){s&&w(e)}}}function Q5(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Z,i:Z,o:Z,d(t){t&&w(e)}}}function x5(n){let e,t=(n[2]?z.truncate(JSON.stringify(n[3])):z.truncate(JSON.stringify(n[3],null,2),2e3,!0))+"",i;return{c(){e=v("span"),i=B(t),p(e,"class","txt txt-ellipsis")},m(s,l){S(s,e,l),_(e,i)},p(s,l){l&12&&t!==(t=(s[2]?z.truncate(JSON.stringify(s[3])):z.truncate(JSON.stringify(s[3],null,2),2e3,!0))+"")&&le(i,t)},i:Z,o:Z,d(s){s&&w(e)}}}function Qp(n,e){let t,i,s;return i=new nu({props:{record:e[0],filename:e[15],size:"sm"}}),{key:n,first:null,c(){t=Me(),H(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),q(i,l,o),s=!0},p(l,o){e=l;const r={};o&1&&(r.record=e[0]),o&8&&(r.filename=e[15]),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){I(i.$$.fragment,l),s=!1},d(l){l&&w(t),j(i,l)}}}function eD(n){let e,t=n[8].slice(0,n[10]),i=[];for(let s=0;sr[7]+r[5];for(let r=0;r{r[d]=null}),ue(),i=r[t],i?i.p(u(f,t),c):(i=r[t]=o[t](u(f,t)),i.c()),A(i,1),i.m(s.parentNode,s))},i(f){l||(A(i),l=!0)},o(f){I(i),l=!1},d(f){r[t].d(f),f&&w(s)}}}function lD(n,e,t){let i,{record:s}=e,{field:l}=e,{short:o=!1}=e;function r(a){ze.call(this,n,a)}return n.$$set=a=>{"record"in a&&t(0,s=a.record),"field"in a&&t(1,l=a.field),"short"in a&&t(2,o=a.short)},n.$$.update=()=>{n.$$.dirty&3&&t(3,i=s[l.name])},[s,l,o,i,r]}class Ib extends ye{constructor(e){super(),ve(this,e,lD,sD,he,{record:0,field:1,short:2})}}function oD(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class",t=n[2]?n[1]:n[0])},m(o,r){S(o,e,r),s||(l=[Ie(i=Be.call(null,e,n[2]?"":"Copy")),Y(e,"click",kn(n[3]))],s=!0)},p(o,[r]){r&7&&t!==(t=o[2]?o[1]:o[0])&&p(e,"class",t),i&&Bt(i.update)&&r&4&&i.update.call(null,o[2]?"":"Copy")},i:Z,o:Z,d(o){o&&w(e),s=!1,Pe(l)}}}function rD(n,e,t){let{value:i=""}=e,{idleClasses:s="ri-file-copy-line txt-sm link-hint"}=e,{successClasses:l="ri-check-line txt-sm txt-success"}=e,{successDuration:o=500}=e,r;function a(){i&&(z.copyToClipboard(i),clearTimeout(r),t(2,r=setTimeout(()=>{clearTimeout(r),t(2,r=null)},o)))}return Zt(()=>()=>{r&&clearTimeout(r)}),n.$$set=u=>{"value"in u&&t(4,i=u.value),"idleClasses"in u&&t(0,s=u.idleClasses),"successClasses"in u&&t(1,l=u.successClasses),"successDuration"in u&&t(5,o=u.successDuration)},[s,l,r,a,i,o]}class iu extends ye{constructor(e){super(),ve(this,e,rD,oD,he,{value:4,idleClasses:0,successClasses:1,successDuration:5})}}function im(n,e,t){const i=n.slice();return i[10]=e[t],i}function sm(n){let e,t,i=n[10].name+"",s,l,o,r,a;return r=new Ib({props:{field:n[10],record:n[3]}}),{c(){e=v("tr"),t=v("td"),s=B(i),l=O(),o=v("td"),H(r.$$.fragment),p(t,"class","min-width txt-hint txt-bold")},m(u,f){S(u,e,f),_(e,t),_(t,s),_(e,l),_(e,o),q(r,o,null),a=!0},p(u,f){(!a||f&1)&&i!==(i=u[10].name+"")&&le(s,i);const c={};f&1&&(c.field=u[10]),f&8&&(c.record=u[3]),r.$set(c)},i(u){a||(A(r.$$.fragment,u),a=!0)},o(u){I(r.$$.fragment,u),a=!1},d(u){u&&w(e),j(r)}}}function lm(n){let e,t,i,s,l,o;return l=new ui({props:{date:n[3].created}}),{c(){e=v("tr"),t=v("td"),t.textContent="created",i=O(),s=v("td"),H(l.$$.fragment),p(t,"class","min-width txt-hint txt-bold")},m(r,a){S(r,e,a),_(e,t),_(e,i),_(e,s),q(l,s,null),o=!0},p(r,a){const u={};a&8&&(u.date=r[3].created),l.$set(u)},i(r){o||(A(l.$$.fragment,r),o=!0)},o(r){I(l.$$.fragment,r),o=!1},d(r){r&&w(e),j(l)}}}function om(n){let e,t,i,s,l,o;return l=new ui({props:{date:n[3].updated}}),{c(){e=v("tr"),t=v("td"),t.textContent="updated",i=O(),s=v("td"),H(l.$$.fragment),p(t,"class","min-width txt-hint txt-bold")},m(r,a){S(r,e,a),_(e,t),_(e,i),_(e,s),q(l,s,null),o=!0},p(r,a){const u={};a&8&&(u.date=r[3].updated),l.$set(u)},i(r){o||(A(l.$$.fragment,r),o=!0)},o(r){I(l.$$.fragment,r),o=!1},d(r){r&&w(e),j(l)}}}function aD(n){var C;let e,t,i,s,l,o,r,a,u,f,c=n[3].id+"",d,m,h,g,b;a=new iu({props:{value:n[3].id}});let k=(C=n[0])==null?void 0:C.schema,y=[];for(let D=0;DI(y[D],1,1,()=>{y[D]=null});let $=n[3].created&&lm(n),M=n[3].updated&&om(n);return{c(){e=v("table"),t=v("tbody"),i=v("tr"),s=v("td"),s.textContent="id",l=O(),o=v("td"),r=v("div"),H(a.$$.fragment),u=O(),f=v("span"),d=B(c),m=O();for(let D=0;D{$=null}),ue()),D[3].updated?M?(M.p(D,E),E&8&&A(M,1)):(M=om(D),M.c(),A(M,1),M.m(t,null)):M&&(ae(),I(M,1,1,()=>{M=null}),ue())},i(D){if(!b){A(a.$$.fragment,D);for(let E=0;EClose',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=Y(e,"click",n[6]),t=!0)},p:Z,d(s){s&&w(e),t=!1,i()}}}function cD(n){let e,t,i={class:"record-preview-panel "+(n[4]?"overlay-panel-xl":"overlay-panel-lg"),$$slots:{footer:[fD],header:[uD],default:[aD]},$$scope:{ctx:n}};return e=new Nn({props:i}),n[7](e),e.$on("hide",n[8]),e.$on("show",n[9]),{c(){H(e.$$.fragment)},m(s,l){q(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="record-preview-panel "+(s[4]?"overlay-panel-xl":"overlay-panel-lg")),l&8201&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[7](null),j(e,s)}}}function dD(n,e,t){let i,{collection:s}=e,l,o=new Ti;function r(m){return t(3,o=m),l==null?void 0:l.show()}function a(){return l==null?void 0:l.hide()}const u=()=>a();function f(m){ie[m?"unshift":"push"](()=>{l=m,t(2,l)})}function c(m){ze.call(this,n,m)}function d(m){ze.call(this,n,m)}return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},n.$$.update=()=>{var m;n.$$.dirty&1&&t(4,i=!!((m=s==null?void 0:s.schema)!=null&&m.find(h=>h.type==="editor")))},[s,a,l,o,i,r,u,f,c,d]}class pD extends ye{constructor(e){super(),ve(this,e,dD,cD,he,{collection:0,show:5,hide:1})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[1]}}function rm(n,e,t){const i=n.slice();return i[55]=e[t],i}function am(n,e,t){const i=n.slice();return i[58]=e[t],i}function um(n,e,t){const i=n.slice();return i[58]=e[t],i}function fm(n,e,t){const i=n.slice();return i[51]=e[t],i}function cm(n){let e;function t(l,o){return l[12]?hD:mD}let i=t(n),s=i(n);return{c(){e=v("th"),s.c(),p(e,"class","bulk-select-col min-width")},m(l,o){S(l,e,o),s.m(e,null)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null)))},d(l){l&&w(e),s.d()}}}function mD(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("input"),s=O(),l=v("label"),p(t,"type","checkbox"),p(t,"id","checkbox_0"),t.disabled=i=!n[4].length,t.checked=n[16],p(l,"for","checkbox_0"),p(e,"class","form-field")},m(a,u){S(a,e,u),_(e,t),_(e,s),_(e,l),o||(r=Y(t,"change",n[28]),o=!0)},p(a,u){u[0]&16&&i!==(i=!a[4].length)&&(t.disabled=i),u[0]&65536&&(t.checked=a[16])},d(a){a&&w(e),o=!1,r()}}}function hD(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function dm(n){let e,t,i;function s(o){n[29](o)}let l={class:"col-type-text col-field-id",name:"id",$$slots:{default:[gD]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Wt({props:l}),ie.push(()=>ge(e,"sort",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function gD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="id",p(t,"class",z.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:Z,d(l){l&&w(e)}}}function pm(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l,o=e&&mm(n),r=i&&hm(n);return{c(){o&&o.c(),t=O(),r&&r.c(),s=Me()},m(a,u){o&&o.m(a,u),S(a,t,u),r&&r.m(a,u),S(a,s,u),l=!0},p(a,u){u[0]&128&&(e=!a[7].includes("@username")),e?o?(o.p(a,u),u[0]&128&&A(o,1)):(o=mm(a),o.c(),A(o,1),o.m(t.parentNode,t)):o&&(ae(),I(o,1,1,()=>{o=null}),ue()),u[0]&128&&(i=!a[7].includes("@email")),i?r?(r.p(a,u),u[0]&128&&A(r,1)):(r=hm(a),r.c(),A(r,1),r.m(s.parentNode,s)):r&&(ae(),I(r,1,1,()=>{r=null}),ue())},i(a){l||(A(o),A(r),l=!0)},o(a){I(o),I(r),l=!1},d(a){o&&o.d(a),a&&w(t),r&&r.d(a),a&&w(s)}}}function mm(n){let e,t,i;function s(o){n[30](o)}let l={class:"col-type-text col-field-id",name:"username",$$slots:{default:[_D]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Wt({props:l}),ie.push(()=>ge(e,"sort",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function _D(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="username",p(t,"class",z.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:Z,d(l){l&&w(e)}}}function hm(n){let e,t,i;function s(o){n[31](o)}let l={class:"col-type-email col-field-email",name:"email",$$slots:{default:[bD]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Wt({props:l}),ie.push(()=>ge(e,"sort",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function bD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="email",p(t,"class",z.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:Z,d(l){l&&w(e)}}}function vD(n){let e,t,i,s,l,o=n[58].name+"",r;return{c(){e=v("div"),t=v("i"),s=O(),l=v("span"),r=B(o),p(t,"class",i=z.getFieldTypeIcon(n[58].type)),p(l,"class","txt"),p(e,"class","col-header-content")},m(a,u){S(a,e,u),_(e,t),_(e,s),_(e,l),_(l,r)},p(a,u){u[0]&262144&&i!==(i=z.getFieldTypeIcon(a[58].type))&&p(t,"class",i),u[0]&262144&&o!==(o=a[58].name+"")&&le(r,o)},d(a){a&&w(e)}}}function gm(n,e){let t,i,s,l;function o(a){e[32](a)}let r={class:"col-type-"+e[58].type+" col-field-"+e[58].name,name:e[58].name,$$slots:{default:[vD]},$$scope:{ctx:e}};return e[0]!==void 0&&(r.sort=e[0]),i=new Wt({props:r}),ie.push(()=>ge(i,"sort",o)),{key:n,first:null,c(){t=Me(),H(i.$$.fragment),this.first=t},m(a,u){S(a,t,u),q(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&262144&&(f.class="col-type-"+e[58].type+" col-field-"+e[58].name),u[0]&262144&&(f.name=e[58].name),u[0]&262144|u[2]&2&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.sort=e[0],ke(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){I(i.$$.fragment,a),l=!1},d(a){a&&w(t),j(i,a)}}}function _m(n){let e,t,i;function s(o){n[33](o)}let l={class:"col-type-date col-field-created",name:"created",$$slots:{default:[yD]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Wt({props:l}),ie.push(()=>ge(e,"sort",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function yD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="created",p(t,"class",z.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:Z,d(l){l&&w(e)}}}function bm(n){let e,t,i;function s(o){n[34](o)}let l={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[kD]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Wt({props:l}),ie.push(()=>ge(e,"sort",s)),{c(){H(e.$$.fragment)},m(o,r){q(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function kD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="updated",p(t,"class",z.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:Z,d(l){l&&w(e)}}}function vm(n){let e;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"aria-label","Toggle columns"),p(e,"class","btn btn-sm btn-transparent p-0")},m(t,i){S(t,e,i),n[35](e)},p:Z,d(t){t&&w(e),n[35](null)}}}function ym(n){let e;function t(l,o){return l[12]?SD:wD}let i=t(n),s=i(n);return{c(){s.c(),e=Me()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function wD(n){let e,t,i,s,l;function o(u,f){var c;return(c=u[1])!=null&&c.length?$D:TD}let r=o(n),a=r(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No records found.",s=O(),a.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(u,f){S(u,e,f),_(e,t),_(t,i),_(t,s),a.m(t,null),_(e,l)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a.d(1),a=r(u),a&&(a.c(),a.m(t,null)))},d(u){u&&w(e),a.d()}}}function SD(n){let e;return{c(){e=v("tr"),e.innerHTML=` + `},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function TD(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + New record`,p(e,"type","button"),p(e,"class","btn btn-secondary btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=Y(e,"click",n[40]),t=!0)},p:Z,d(s){s&&w(e),t=!1,i()}}}function $D(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=Y(e,"click",n[39]),t=!0)},p:Z,d(s){s&&w(e),t=!1,i()}}}function km(n){let e,t,i,s,l,o,r,a,u,f;function c(){return n[36](n[55])}return{c(){e=v("td"),t=v("div"),i=v("input"),o=O(),r=v("label"),p(i,"type","checkbox"),p(i,"id",s="checkbox_"+n[55].id),i.checked=l=n[6][n[55].id],p(r,"for",a="checkbox_"+n[55].id),p(t,"class","form-field"),p(e,"class","bulk-select-col min-width")},m(d,m){S(d,e,m),_(e,t),_(t,i),_(t,o),_(t,r),u||(f=[Y(i,"change",c),Y(t,"click",kn(n[26]))],u=!0)},p(d,m){n=d,m[0]&16&&s!==(s="checkbox_"+n[55].id)&&p(i,"id",s),m[0]&80&&l!==(l=n[6][n[55].id])&&(i.checked=l),m[0]&16&&a!==(a="checkbox_"+n[55].id)&&p(r,"for",a)},d(d){d&&w(e),u=!1,Pe(f)}}}function wm(n){let e,t,i,s,l,o,r=n[55].id+"",a,u,f;s=new iu({props:{value:n[55].id}});let c=n[2].isAuth&&Sm(n);return{c(){e=v("td"),t=v("div"),i=v("div"),H(s.$$.fragment),l=O(),o=v("div"),a=B(r),u=O(),c&&c.c(),p(o,"class","txt"),p(i,"class","label"),p(t,"class","flex flex-gap-5"),p(e,"class","col-type-text col-field-id")},m(d,m){S(d,e,m),_(e,t),_(t,i),q(s,i,null),_(i,l),_(i,o),_(o,a),_(t,u),c&&c.m(t,null),f=!0},p(d,m){const h={};m[0]&16&&(h.value=d[55].id),s.$set(h),(!f||m[0]&16)&&r!==(r=d[55].id+"")&&le(a,r),d[2].isAuth?c?c.p(d,m):(c=Sm(d),c.c(),c.m(t,null)):c&&(c.d(1),c=null)},i(d){f||(A(s.$$.fragment,d),f=!0)},o(d){I(s.$$.fragment,d),f=!1},d(d){d&&w(e),j(s),c&&c.d()}}}function Sm(n){let e;function t(l,o){return l[55].verified?MD:CD}let i=t(n),s=i(n);return{c(){s.c(),e=Me()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i!==(i=t(l))&&(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function CD(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-sm txt-hint")},m(s,l){S(s,e,l),t||(i=Ie(Be.call(null,e,"Unverified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function MD(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-sm txt-success")},m(s,l){S(s,e,l),t||(i=Ie(Be.call(null,e,"Verified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function Tm(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l=e&&$m(n),o=i&&Cm(n);return{c(){l&&l.c(),t=O(),o&&o.c(),s=Me()},m(r,a){l&&l.m(r,a),S(r,t,a),o&&o.m(r,a),S(r,s,a)},p(r,a){a[0]&128&&(e=!r[7].includes("@username")),e?l?l.p(r,a):(l=$m(r),l.c(),l.m(t.parentNode,t)):l&&(l.d(1),l=null),a[0]&128&&(i=!r[7].includes("@email")),i?o?o.p(r,a):(o=Cm(r),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},d(r){l&&l.d(r),r&&w(t),o&&o.d(r),r&&w(s)}}}function $m(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!z.isEmpty(o[55].username)),t?OD:DD}let s=i(n,[-1,-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-username")},m(o,r){S(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&w(e),l.d()}}}function DD(n){let e,t=n[55].username+"",i,s;return{c(){e=v("span"),i=B(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[55].username)},m(l,o){S(l,e,o),_(e,i)},p(l,o){o[0]&16&&t!==(t=l[55].username+"")&&le(i,t),o[0]&16&&s!==(s=l[55].username)&&p(e,"title",s)},d(l){l&&w(e)}}}function OD(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function Cm(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!z.isEmpty(o[55].email)),t?AD:ED}let s=i(n,[-1,-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-email")},m(o,r){S(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&w(e),l.d()}}}function ED(n){let e,t=n[55].email+"",i,s;return{c(){e=v("span"),i=B(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[55].email)},m(l,o){S(l,e,o),_(e,i)},p(l,o){o[0]&16&&t!==(t=l[55].email+"")&&le(i,t),o[0]&16&&s!==(s=l[55].email)&&p(e,"title",s)},d(l){l&&w(e)}}}function AD(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function Mm(n,e){let t,i,s,l;return i=new Ib({props:{short:!0,record:e[55],field:e[58]}}),{key:n,first:null,c(){t=v("td"),H(i.$$.fragment),p(t,"class",s="col-type-"+e[58].type+" col-field-"+e[58].name),this.first=t},m(o,r){S(o,t,r),q(i,t,null),l=!0},p(o,r){e=o;const a={};r[0]&16&&(a.record=e[55]),r[0]&262144&&(a.field=e[58]),i.$set(a),(!l||r[0]&262144&&s!==(s="col-type-"+e[58].type+" col-field-"+e[58].name))&&p(t,"class",s)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){I(i.$$.fragment,o),l=!1},d(o){o&&w(t),j(i)}}}function Dm(n){let e,t,i;return t=new ui({props:{date:n[55].created}}),{c(){e=v("td"),H(t.$$.fragment),p(e,"class","col-type-date col-field-created")},m(s,l){S(s,e,l),q(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[55].created),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){I(t.$$.fragment,s),i=!1},d(s){s&&w(e),j(t)}}}function Om(n){let e,t,i;return t=new ui({props:{date:n[55].updated}}),{c(){e=v("td"),H(t.$$.fragment),p(e,"class","col-type-date col-field-updated")},m(s,l){S(s,e,l),q(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[55].updated),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){I(t.$$.fragment,s),i=!1},d(s){s&&w(e),j(t)}}}function Em(n,e){let t,i,s=!e[7].includes("@id"),l,o,r=[],a=new Map,u,f=e[10]&&!e[7].includes("@created"),c,d=e[9]&&!e[7].includes("@updated"),m,h,g,b,k,y,T=!e[2].isView&&km(e),$=s&&wm(e),M=e[2].isAuth&&Tm(e),C=e[18];const D=F=>F[58].name;for(let F=0;F',g=O(),p(h,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(F,R){S(F,t,R),T&&T.m(t,null),_(t,i),$&&$.m(t,null),_(t,l),M&&M.m(t,null),_(t,o);for(let X=0;X{$=null}),ue()),e[2].isAuth?M?M.p(e,R):(M=Tm(e),M.c(),M.m(t,o)):M&&(M.d(1),M=null),R[0]&262160&&(C=e[18],ae(),r=wt(r,R,D,1,e,C,a,t,ln,Mm,u,am),ue()),R[0]&1152&&(f=e[10]&&!e[7].includes("@created")),f?E?(E.p(e,R),R[0]&1152&&A(E,1)):(E=Dm(e),E.c(),A(E,1),E.m(t,c)):E&&(ae(),I(E,1,1,()=>{E=null}),ue()),R[0]&640&&(d=e[9]&&!e[7].includes("@updated")),d?P?(P.p(e,R),R[0]&640&&A(P,1)):(P=Om(e),P.c(),A(P,1),P.m(t,m)):P&&(ae(),I(P,1,1,()=>{P=null}),ue())},i(F){if(!b){A($);for(let R=0;RW[58].name;for(let W=0;WW[2].isView?W[55]:W[55].id;for(let W=0;W{C=null}),ue()),W[2].isAuth?D?(D.p(W,G),G[0]&4&&A(D,1)):(D=pm(W),D.c(),A(D,1),D.m(i,r)):D&&(ae(),I(D,1,1,()=>{D=null}),ue()),G[0]&262145&&(E=W[18],ae(),a=wt(a,G,P,1,W,E,u,i,ln,gm,f,um),ue()),G[0]&1152&&(c=W[10]&&!W[7].includes("@created")),c?L?(L.p(W,G),G[0]&1152&&A(L,1)):(L=_m(W),L.c(),A(L,1),L.m(i,d)):L&&(ae(),I(L,1,1,()=>{L=null}),ue()),G[0]&640&&(m=W[9]&&!W[7].includes("@updated")),m?N?(N.p(W,G),G[0]&640&&A(N,1)):(N=bm(W),N.c(),A(N,1),N.m(i,h)):N&&(ae(),I(N,1,1,()=>{N=null}),ue()),W[15].length?F?F.p(W,G):(F=vm(W),F.c(),F.m(g,null)):F&&(F.d(1),F=null),G[0]&4986582&&(R=W[4],ae(),y=wt(y,G,X,1,W,R,T,k,ln,Em,null,rm),ue(),!R.length&&se?se.p(W,G):R.length?se&&(se.d(1),se=null):(se=ym(W),se.c(),se.m(k,null))),(!$||G[0]&4096)&&Q(e,"table-loading",W[12])},i(W){if(!$){A(C),A(D);for(let G=0;G({54:l}),({uniqueId:l})=>[0,l?8388608:0]]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=Me(),H(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),q(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&32896|o[1]&8388608|o[2]&2&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){I(i.$$.fragment,l),s=!1},d(l){l&&w(t),j(i,l)}}}function LD(n){let e,t,i=[],s=new Map,l,o,r=n[15];const a=u=>u[51].id+u[51].name;for(let u=0;u{i=null}),ue())},i(s){t||(A(i),t=!0)},o(s){I(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function Pm(n){let e,t,i=n[4].length+"",s,l,o;return{c(){e=v("small"),t=B("Showing "),s=B(i),l=B(" of "),o=B(n[5]),p(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){S(r,e,a),_(e,t),_(e,s),_(e,l),_(e,o)},p(r,a){a[0]&16&&i!==(i=r[4].length+"")&&le(s,i),a[0]&32&&le(o,r[5])},d(r){r&&w(e)}}}function Lm(n){let e,t,i,s,l=n[5]-n[4].length+"",o,r,a,u;return{c(){e=v("div"),t=v("button"),i=v("span"),s=B("Load more ("),o=B(l),r=B(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),Q(t,"btn-loading",n[12]),Q(t,"btn-disabled",n[12]),p(e,"class","block txt-center m-t-xs")},m(f,c){S(f,e,c),_(e,t),_(t,i),_(i,s),_(i,o),_(i,r),a||(u=Y(t,"click",n[41]),a=!0)},p(f,c){c[0]&48&&l!==(l=f[5]-f[4].length+"")&&le(o,l),c[0]&4096&&Q(t,"btn-loading",f[12]),c[0]&4096&&Q(t,"btn-disabled",f[12])},d(f){f&&w(e),a=!1,u()}}}function Nm(n){let e,t,i,s,l,o,r=n[8]===1?"record":"records",a,u,f,c,d,m,h,g,b,k,y;return{c(){e=v("div"),t=v("div"),i=B("Selected "),s=v("strong"),l=B(n[8]),o=O(),a=B(r),u=O(),f=v("button"),f.innerHTML='Reset',c=O(),d=v("div"),m=O(),h=v("button"),h.innerHTML='Delete selected',p(t,"class","txt"),p(f,"type","button"),p(f,"class","btn btn-xs btn-transparent btn-outline p-l-5 p-r-5"),Q(f,"btn-disabled",n[13]),p(d,"class","flex-fill"),p(h,"type","button"),p(h,"class","btn btn-sm btn-transparent btn-danger"),Q(h,"btn-loading",n[13]),Q(h,"btn-disabled",n[13]),p(e,"class","bulkbar")},m(T,$){S(T,e,$),_(e,t),_(t,i),_(t,s),_(s,l),_(t,o),_(t,a),_(e,u),_(e,f),_(e,c),_(e,d),_(e,m),_(e,h),b=!0,k||(y=[Y(f,"click",n[42]),Y(h,"click",n[43])],k=!0)},p(T,$){(!b||$[0]&256)&&le(l,T[8]),(!b||$[0]&256)&&r!==(r=T[8]===1?"record":"records")&&le(a,r),(!b||$[0]&8192)&&Q(f,"btn-disabled",T[13]),(!b||$[0]&8192)&&Q(h,"btn-loading",T[13]),(!b||$[0]&8192)&&Q(h,"btn-disabled",T[13])},i(T){b||(T&&xe(()=>{g||(g=je(e,An,{duration:150,y:5},!0)),g.run(1)}),b=!0)},o(T){T&&(g||(g=je(e,An,{duration:150,y:5},!1)),g.run(0)),b=!1},d(T){T&&w(e),T&&g&&g.end(),k=!1,Pe(y)}}}function FD(n){let e,t,i,s,l,o;e=new Oa({props:{class:"table-wrapper",$$slots:{before:[ND],default:[ID]},$$scope:{ctx:n}}});let r=n[4].length&&Pm(n),a=n[4].length&&n[17]&&Lm(n),u=n[8]&&Nm(n);return{c(){H(e.$$.fragment),t=O(),r&&r.c(),i=O(),a&&a.c(),s=O(),u&&u.c(),l=Me()},m(f,c){q(e,f,c),S(f,t,c),r&&r.m(f,c),S(f,i,c),a&&a.m(f,c),S(f,s,c),u&&u.m(f,c),S(f,l,c),o=!0},p(f,c){const d={};c[0]&382679|c[2]&2&&(d.$$scope={dirty:c,ctx:f}),e.$set(d),f[4].length?r?r.p(f,c):(r=Pm(f),r.c(),r.m(i.parentNode,i)):r&&(r.d(1),r=null),f[4].length&&f[17]?a?a.p(f,c):(a=Lm(f),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null),f[8]?u?(u.p(f,c),c[0]&256&&A(u,1)):(u=Nm(f),u.c(),A(u,1),u.m(l.parentNode,l)):u&&(ae(),I(u,1,1,()=>{u=null}),ue())},i(f){o||(A(e.$$.fragment,f),A(u),o=!0)},o(f){I(e.$$.fragment,f),I(u),o=!1},d(f){j(e,f),f&&w(t),r&&r.d(f),f&&w(i),a&&a.d(f),f&&w(s),u&&u.d(f),f&&w(l)}}}const RD=/^([\+\-])?(\w+)$/;function qD(n,e,t){let i,s,l,o,r,a,u,f;const c=Ct();let{collection:d}=e,{sort:m=""}=e,{filter:h=""}=e,g=[],b=1,k=0,y={},T=!0,$=!1,M=0,C,D=[],E=[];function P(){d!=null&&d.id&&localStorage.setItem((d==null?void 0:d.id)+"@hiddenCollumns",JSON.stringify(D))}function L(){if(t(7,D=[]),!!(d!=null&&d.id))try{const ne=localStorage.getItem(d.id+"@hiddenCollumns");ne&&t(7,D=JSON.parse(ne)||[])}catch{}}async function N(){const ne=b;for(let we=1;we<=ne;we++)(we===1||o)&&await F(we,!1)}async function F(ne=1,we=!0){var Gt,di;if(!(d!=null&&d.id))return;t(12,T=!0);let nt=m;const et=nt.match(RD),bt=et?s.find(ft=>ft.name===et[2]):null;if(et&&((di=(Gt=bt==null?void 0:bt.options)==null?void 0:Gt.displayFields)==null?void 0:di.length)>0){const ft=[];for(const Wn of bt.options.displayFields)ft.push((et[1]||"")+et[2]+"."+Wn);nt=ft.join(",")}return pe.collection(d.id).getList(ne,30,{sort:nt,filter:h,expand:s.map(ft=>ft.name).join(",")}).then(async ft=>{if(ne<=1&&R(),t(12,T=!1),t(11,b=ft.page),t(5,k=ft.totalItems),c("load",g.concat(ft.items)),we){const Wn=++M;for(;ft.items.length&&M==Wn;)t(4,g=g.concat(ft.items.splice(0,15))),await z.yieldToMain()}else t(4,g=g.concat(ft.items))}).catch(ft=>{ft!=null&&ft.isAbort||(t(12,T=!1),console.warn(ft),R(),pe.errorResponseHandler(ft,!1))})}function R(){t(4,g=[]),t(11,b=1),t(5,k=0),t(6,y={})}function X(){a?se():W()}function se(){t(6,y={})}function W(){for(const ne of g)t(6,y[ne.id]=ne,y);t(6,y)}function G(ne){y[ne.id]?delete y[ne.id]:t(6,y[ne.id]=ne,y),t(6,y)}function te(){cn(`Do you really want to delete the selected ${r===1?"record":"records"}?`,K)}async function K(){if($||!r||!(d!=null&&d.id))return;let ne=[];for(const we of Object.keys(y))ne.push(pe.collection(d.id).delete(we));return t(13,$=!0),Promise.all(ne).then(()=>{zt(`Successfully deleted the selected ${r===1?"record":"records"}.`),se()}).catch(we=>{pe.errorResponseHandler(we)}).finally(()=>(t(13,$=!1),N()))}function re(ne){ze.call(this,n,ne)}const J=(ne,we)=>{we.target.checked?z.removeByValue(D,ne.id):z.pushUnique(D,ne.id),t(7,D)},de=()=>X();function _e(ne){m=ne,t(0,m)}function $e(ne){m=ne,t(0,m)}function Ne(ne){m=ne,t(0,m)}function Re(ne){m=ne,t(0,m)}function be(ne){m=ne,t(0,m)}function Se(ne){m=ne,t(0,m)}function We(ne){ie[ne?"unshift":"push"](()=>{C=ne,t(14,C)})}const lt=ne=>G(ne),fe=ne=>c("select",ne),Ve=(ne,we)=>{we.code==="Enter"&&(we.preventDefault(),c("select",ne))},ee=()=>t(1,h=""),Fe=()=>c("new"),ot=()=>F(b+1),Ht=()=>se(),Ae=()=>te();return n.$$set=ne=>{"collection"in ne&&t(2,d=ne.collection),"sort"in ne&&t(0,m=ne.sort),"filter"in ne&&t(1,h=ne.filter)},n.$$.update=()=>{n.$$.dirty[0]&4&&d!=null&&d.id&&(L(),R()),n.$$.dirty[0]&4&&t(25,i=(d==null?void 0:d.schema)||[]),n.$$.dirty[0]&33554432&&(s=i.filter(ne=>ne.type==="relation")),n.$$.dirty[0]&33554560&&t(18,l=i.filter(ne=>!D.includes(ne.id))),n.$$.dirty[0]&7&&d!=null&&d.id&&m!==-1&&h!==-1&&F(1),n.$$.dirty[0]&48&&t(17,o=k>g.length),n.$$.dirty[0]&64&&t(8,r=Object.keys(y).length),n.$$.dirty[0]&272&&t(16,a=g.length&&r===g.length),n.$$.dirty[0]&128&&D!==-1&&P(),n.$$.dirty[0]&20&&t(10,u=!(d!=null&&d.isView)||g.length>0&&g[0].created!=""),n.$$.dirty[0]&20&&t(9,f=!(d!=null&&d.isView)||g.length>0&&g[0].updated!=""),n.$$.dirty[0]&33555972&&t(15,E=[].concat(d.isAuth?[{id:"@username",name:"username"},{id:"@email",name:"email"}]:[],i.map(ne=>({id:ne.id,name:ne.name})),u?{id:"@created",name:"created"}:[],f?{id:"@updated",name:"updated"}:[]))},[m,h,d,F,g,k,y,D,r,f,u,b,T,$,C,E,a,o,l,c,X,se,G,te,N,i,re,J,de,_e,$e,Ne,Re,be,Se,We,lt,fe,Ve,ee,Fe,ot,Ht,Ae]}class jD extends ye{constructor(e){super(),ve(this,e,qD,FD,he,{collection:2,sort:0,filter:1,reloadLoadedPages:24,load:3},null,[-1,-1,-1])}get reloadLoadedPages(){return this.$$.ctx[24]}get load(){return this.$$.ctx[3]}}function HD(n){let e,t,i,s;return e=new GC({}),i=new wn({props:{$$slots:{default:[BD]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=O(),H(i.$$.fragment)},m(l,o){q(e,l,o),S(l,t,o),q(i,l,o),s=!0},p(l,o){const r={};o[0]&1527|o[1]&8&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){j(e,l),l&&w(t),j(i,l)}}}function VD(n){let e,t;return e=new wn({props:{center:!0,$$slots:{default:[YD]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,s){const l={};s[0]&1040|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function zD(n){let e,t;return e=new wn({props:{center:!0,$$slots:{default:[KD]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,s){const l={};s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function Fm(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"aria-label","Edit collection"),p(e,"class","btn btn-transparent btn-circle")},m(s,l){S(s,e,l),t||(i=[Ie(Be.call(null,e,{text:"Edit collection",position:"right"})),Y(e,"click",n[15])],t=!0)},p:Z,d(s){s&&w(e),t=!1,Pe(i)}}}function Rm(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + New record`,p(e,"type","button"),p(e,"class","btn btn-expanded")},m(s,l){S(s,e,l),t||(i=Y(e,"click",n[18]),t=!0)},p:Z,d(s){s&&w(e),t=!1,i()}}}function BD(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,c,d,m,h,g,b,k,y,T,$,M,C,D,E,P,L,N=!n[10]&&Fm(n);c=new Da({}),c.$on("refresh",n[16]);let F=!n[2].isView&&Rm(n);k=new Uo({props:{value:n[0],autocompleteCollection:n[2]}}),k.$on("submit",n[19]);function R(W){n[21](W)}function X(W){n[22](W)}let se={collection:n[2]};return n[0]!==void 0&&(se.filter=n[0]),n[1]!==void 0&&(se.sort=n[1]),M=new jD({props:se}),n[20](M),ie.push(()=>ge(M,"filter",R)),ie.push(()=>ge(M,"sort",X)),M.$on("select",n[23]),M.$on("new",n[24]),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Collections",s=O(),l=v("div"),r=B(o),a=O(),u=v("div"),N&&N.c(),f=O(),H(c.$$.fragment),d=O(),m=v("div"),h=v("button"),h.innerHTML=` + API Preview`,g=O(),F&&F.c(),b=O(),H(k.$$.fragment),y=O(),T=v("div"),$=O(),H(M.$$.fragment),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(u,"class","inline-flex gap-5"),p(h,"type","button"),p(h,"class","btn btn-outline"),p(m,"class","btns-group"),p(e,"class","page-header"),p(T,"class","clearfix m-b-base")},m(W,G){S(W,e,G),_(e,t),_(t,i),_(t,s),_(t,l),_(l,r),_(e,a),_(e,u),N&&N.m(u,null),_(u,f),q(c,u,null),_(e,d),_(e,m),_(m,h),_(m,g),F&&F.m(m,null),S(W,b,G),q(k,W,G),S(W,y,G),S(W,T,G),S(W,$,G),q(M,W,G),E=!0,P||(L=Y(h,"click",n[17]),P=!0)},p(W,G){(!E||G[0]&4)&&o!==(o=W[2].name+"")&&le(r,o),W[10]?N&&(N.d(1),N=null):N?N.p(W,G):(N=Fm(W),N.c(),N.m(u,f)),W[2].isView?F&&(F.d(1),F=null):F?F.p(W,G):(F=Rm(W),F.c(),F.m(m,null));const te={};G[0]&1&&(te.value=W[0]),G[0]&4&&(te.autocompleteCollection=W[2]),k.$set(te);const K={};G[0]&4&&(K.collection=W[2]),!C&&G[0]&1&&(C=!0,K.filter=W[0],ke(()=>C=!1)),!D&&G[0]&2&&(D=!0,K.sort=W[1],ke(()=>D=!1)),M.$set(K)},i(W){E||(A(c.$$.fragment,W),A(k.$$.fragment,W),A(M.$$.fragment,W),E=!0)},o(W){I(c.$$.fragment,W),I(k.$$.fragment,W),I(M.$$.fragment,W),E=!1},d(W){W&&w(e),N&&N.d(),j(c),F&&F.d(),W&&w(b),j(k,W),W&&w(y),W&&w(T),W&&w($),n[20](null),j(M,W),P=!1,L()}}}function UD(n){let e,t,i,s,l;return{c(){e=v("h1"),e.textContent="Create your first collection to add records!",t=O(),i=v("button"),i.innerHTML=` + Create new collection`,p(e,"class","m-b-10"),p(i,"type","button"),p(i,"class","btn btn-expanded-lg btn-lg")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=Y(i,"click",n[14]),s=!0)},p:Z,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function WD(n){let e;return{c(){e=v("h1"),e.textContent="You don't have any collections yet.",p(e,"class","m-b-10")},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function YD(n){let e,t,i;function s(r,a){return r[10]?WD:UD}let l=s(n),o=l(n);return{c(){e=v("div"),t=v("div"),t.innerHTML='',i=O(),o.c(),p(t,"class","icon"),p(e,"class","placeholder-section m-b-base")},m(r,a){S(r,e,a),_(e,t),_(e,i),o.m(e,null)},p(r,a){l===(l=s(r))&&o?o.p(r,a):(o.d(1),o=l(r),o&&(o.c(),o.m(e,null)))},d(r){r&&w(e),o.d()}}}function KD(n){let e;return{c(){e=v("div"),e.innerHTML=` +

    Loading collections...

    `,p(e,"class","placeholder-section m-b-base")},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function JD(n){let e,t,i,s,l,o,r,a,u,f,c;const d=[zD,VD,HD],m=[];function h(T,$){return T[3]&&!T[9].length?0:T[9].length?2:1}e=h(n),t=m[e]=d[e](n);let g={};s=new tu({props:g}),n[25](s);let b={};o=new s4({props:b}),n[26](o);let k={collection:n[2]};a=new Ab({props:k}),n[27](a),a.$on("save",n[28]),a.$on("delete",n[29]);let y={collection:n[2]};return f=new pD({props:y}),n[30](f),{c(){t.c(),i=O(),H(s.$$.fragment),l=O(),H(o.$$.fragment),r=O(),H(a.$$.fragment),u=O(),H(f.$$.fragment)},m(T,$){m[e].m(T,$),S(T,i,$),q(s,T,$),S(T,l,$),q(o,T,$),S(T,r,$),q(a,T,$),S(T,u,$),q(f,T,$),c=!0},p(T,$){let M=e;e=h(T),e===M?m[e].p(T,$):(ae(),I(m[M],1,1,()=>{m[M]=null}),ue(),t=m[e],t?t.p(T,$):(t=m[e]=d[e](T),t.c()),A(t,1),t.m(i.parentNode,i));const C={};s.$set(C);const D={};o.$set(D);const E={};$[0]&4&&(E.collection=T[2]),a.$set(E);const P={};$[0]&4&&(P.collection=T[2]),f.$set(P)},i(T){c||(A(t),A(s.$$.fragment,T),A(o.$$.fragment,T),A(a.$$.fragment,T),A(f.$$.fragment,T),c=!0)},o(T){I(t),I(s.$$.fragment,T),I(o.$$.fragment,T),I(a.$$.fragment,T),I(f.$$.fragment,T),c=!1},d(T){m[e].d(T),T&&w(i),n[25](null),j(s,T),T&&w(l),n[26](null),j(o,T),T&&w(r),n[27](null),j(a,T),T&&w(u),n[30](null),j(f,T)}}}function ZD(n,e,t){let i,s,l,o,r,a,u;Ye(n,Mi,J=>t(2,s=J)),Ye(n,St,J=>t(31,l=J)),Ye(n,Po,J=>t(3,o=J)),Ye(n,ma,J=>t(13,r=J)),Ye(n,Ai,J=>t(9,a=J)),Ye(n,$s,J=>t(10,u=J));const f=new URLSearchParams(r);let c,d,m,h,g,b=f.get("filter")||"",k=f.get("sort")||"",y=f.get("collectionId")||(s==null?void 0:s.id);function T(){t(11,y=s==null?void 0:s.id),t(0,b=""),t(1,k="-created"),s!=null&&s.isView&&!z.extractColumnsFromQuery(s.options.query).includes("created")&&t(1,k="")}Tb(y);const $=()=>c==null?void 0:c.show(),M=()=>c==null?void 0:c.show(s),C=()=>g==null?void 0:g.load(),D=()=>d==null?void 0:d.show(s),E=()=>m==null?void 0:m.show(),P=J=>t(0,b=J.detail);function L(J){ie[J?"unshift":"push"](()=>{g=J,t(8,g)})}function N(J){b=J,t(0,b)}function F(J){k=J,t(1,k)}const R=J=>{s.isView?h.show(J==null?void 0:J.detail):m==null||m.show(J==null?void 0:J.detail)},X=()=>m==null?void 0:m.show();function se(J){ie[J?"unshift":"push"](()=>{c=J,t(4,c)})}function W(J){ie[J?"unshift":"push"](()=>{d=J,t(5,d)})}function G(J){ie[J?"unshift":"push"](()=>{m=J,t(6,m)})}const te=()=>g==null?void 0:g.reloadLoadedPages(),K=()=>g==null?void 0:g.reloadLoadedPages();function re(J){ie[J?"unshift":"push"](()=>{h=J,t(7,h)})}return n.$$.update=()=>{if(n.$$.dirty[0]&8192&&t(12,i=new URLSearchParams(r)),n.$$.dirty[0]&6152&&!o&&i.get("collectionId")&&i.get("collectionId")!=y&&M3(i.get("collectionId")),n.$$.dirty[0]&2052&&s!=null&&s.id&&y!=s.id&&T(),n.$$.dirty[0]&7&&(k||b||s!=null&&s.id)){const J=new URLSearchParams({collectionId:(s==null?void 0:s.id)||"",filter:b,sort:k}).toString();Di("/collections?"+J)}n.$$.dirty[0]&4&&Kt(St,l=(s==null?void 0:s.name)||"Collections",l)},[b,k,s,o,c,d,m,h,g,a,u,y,i,r,$,M,C,D,E,P,L,N,F,R,X,se,W,G,te,K,re]}class GD extends ye{constructor(e){super(),ve(this,e,ZD,JD,he,{},null,[-1,-1])}}function XD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,k,y,T,$,M,C,D,E,P;return{c(){e=v("aside"),t=v("div"),i=v("div"),i.textContent="System",s=O(),l=v("a"),l.innerHTML=` + Application`,o=O(),r=v("a"),r.innerHTML=` + Mail settings`,a=O(),u=v("a"),u.innerHTML=` + Files storage`,f=O(),c=v("div"),c.innerHTML='Sync',d=O(),m=v("a"),m.innerHTML=` + Export collections`,h=O(),g=v("a"),g.innerHTML=` + Import collections`,b=O(),k=v("div"),k.textContent="Authentication",y=O(),T=v("a"),T.innerHTML=` + Auth providers`,$=O(),M=v("a"),M.innerHTML=` + Token options`,C=O(),D=v("a"),D.innerHTML=` + Admins`,p(i,"class","sidebar-title"),p(l,"href","/settings"),p(l,"class","sidebar-list-item"),p(r,"href","/settings/mail"),p(r,"class","sidebar-list-item"),p(u,"href","/settings/storage"),p(u,"class","sidebar-list-item"),p(c,"class","sidebar-title"),p(m,"href","/settings/export-collections"),p(m,"class","sidebar-list-item"),p(g,"href","/settings/import-collections"),p(g,"class","sidebar-list-item"),p(k,"class","sidebar-title"),p(T,"href","/settings/auth-providers"),p(T,"class","sidebar-list-item"),p(M,"href","/settings/tokens"),p(M,"class","sidebar-list-item"),p(D,"href","/settings/admins"),p(D,"class","sidebar-list-item"),p(t,"class","sidebar-content"),p(e,"class","page-sidebar settings-sidebar")},m(L,N){S(L,e,N),_(e,t),_(t,i),_(t,s),_(t,l),_(t,o),_(t,r),_(t,a),_(t,u),_(t,f),_(t,c),_(t,d),_(t,m),_(t,h),_(t,g),_(t,b),_(t,k),_(t,y),_(t,T),_(t,$),_(t,M),_(t,C),_(t,D),E||(P=[Ie(qn.call(null,l,{path:"/settings"})),Ie(xt.call(null,l)),Ie(qn.call(null,r,{path:"/settings/mail/?.*"})),Ie(xt.call(null,r)),Ie(qn.call(null,u,{path:"/settings/storage/?.*"})),Ie(xt.call(null,u)),Ie(qn.call(null,m,{path:"/settings/export-collections/?.*"})),Ie(xt.call(null,m)),Ie(qn.call(null,g,{path:"/settings/import-collections/?.*"})),Ie(xt.call(null,g)),Ie(qn.call(null,T,{path:"/settings/auth-providers/?.*"})),Ie(xt.call(null,T)),Ie(qn.call(null,M,{path:"/settings/tokens/?.*"})),Ie(xt.call(null,M)),Ie(qn.call(null,D,{path:"/settings/admins/?.*"})),Ie(xt.call(null,D))],E=!0)},p:Z,i:Z,o:Z,d(L){L&&w(e),E=!1,Pe(P)}}}class Ii extends ye{constructor(e){super(),ve(this,e,null,XD,he,{})}}function qm(n,e,t){const i=n.slice();return i[30]=e[t],i}function jm(n){let e,t;return e=new me({props:{class:"form-field readonly",name:"id",$$slots:{default:[QD,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,s){const l={};s[0]&536870914|s[1]&4&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function QD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="id",o=O(),r=v("div"),a=v("i"),f=O(),c=v("input"),p(t,"class",z.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"for",l=n[29]),p(a,"class","ri-calendar-event-line txt-disabled"),p(r,"class","form-field-addon"),p(c,"type","text"),p(c,"id",d=n[29]),c.value=m=n[1].id,c.readOnly=!0},m(b,k){S(b,e,k),_(e,t),_(e,i),_(e,s),S(b,o,k),S(b,r,k),_(r,a),S(b,f,k),S(b,c,k),h||(g=Ie(u=Be.call(null,a,{text:`Created: ${n[1].created} +Updated: ${n[1].updated}`,position:"left"})),h=!0)},p(b,k){k[0]&536870912&&l!==(l=b[29])&&p(e,"for",l),u&&Bt(u.update)&&k[0]&2&&u.update.call(null,{text:`Created: ${b[1].created} +Updated: ${b[1].updated}`,position:"left"}),k[0]&536870912&&d!==(d=b[29])&&p(c,"id",d),k[0]&2&&m!==(m=b[1].id)&&c.value!==m&&(c.value=m)},d(b){b&&w(e),b&&w(o),b&&w(r),b&&w(f),b&&w(c),h=!1,g()}}}function Hm(n){let e,t,i,s,l,o,r;function a(){return n[17](n[30])}return{c(){e=v("button"),t=v("img"),s=O(),Vn(t.src,i="./images/avatars/avatar"+n[30]+".svg")||p(t,"src",i),p(t,"alt","Avatar "+n[30]),p(e,"type","button"),p(e,"class",l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))},m(u,f){S(u,e,f),_(e,t),_(e,s),o||(r=Y(e,"click",a),o=!0)},p(u,f){n=u,f[0]&4&&l!==(l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))&&p(e,"class",l)},d(u){u&&w(e),o=!1,r()}}}function xD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Email",o=O(),r=v("input"),p(t,"class",z.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","email"),p(r,"autocomplete","off"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),ce(r,n[3]),u||(f=Y(r,"input",n[18]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&8&&r.value!==c[3]&&ce(r,c[3])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function Vm(n){let e,t;return e=new me({props:{class:"form-field form-field-toggle",$$slots:{default:[eO,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,s){const l={};s[0]&536870928|s[1]&4&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function eO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[29]),p(s,"for",o=n[29])},m(u,f){S(u,e,f),e.checked=n[4],S(u,i,f),S(u,s,f),_(s,l),r||(a=Y(e,"change",n[19]),r=!0)},p(u,f){f[0]&536870912&&t!==(t=u[29])&&p(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&536870912&&o!==(o=u[29])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function zm(n){let e,t,i,s,l,o,r,a,u;return s=new me({props:{class:"form-field required",name:"password",$$slots:{default:[tO,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),r=new me({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[nO,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),H(s.$$.fragment),l=O(),o=v("div"),H(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),p(e,"class","col-12")},m(f,c){S(f,e,c),_(e,t),_(t,i),q(s,i,null),_(t,l),_(t,o),q(r,o,null),u=!0},p(f,c){const d={};c[0]&536871168|c[1]&4&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const m={};c[0]&536871424|c[1]&4&&(m.$$scope={dirty:c,ctx:f}),r.$set(m)},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&xe(()=>{a||(a=je(t,At,{duration:150},!0)),a.run(1)}),u=!0)},o(f){I(s.$$.fragment,f),I(r.$$.fragment,f),f&&(a||(a=je(t,At,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),j(s),j(r),f&&a&&a.end()}}}function tO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),ce(r,n[8]),u||(f=Y(r,"input",n[20]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&256&&r.value!==c[8]&&ce(r,c[8])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function nO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password confirm",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),ce(r,n[9]),u||(f=Y(r,"input",n[21]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&512&&r.value!==c[9]&&ce(r,c[9])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function iO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h=!n[1].isNew&&jm(n),g=[0,1,2,3,4,5,6,7,8,9],b=[];for(let T=0;T<10;T+=1)b[T]=Hm(qm(n,g,T));a=new me({props:{class:"form-field required",name:"email",$$slots:{default:[xD,({uniqueId:T})=>({29:T}),({uniqueId:T})=>[T?536870912:0]]},$$scope:{ctx:n}}});let k=!n[1].isNew&&Vm(n),y=(n[1].isNew||n[4])&&zm(n);return{c(){e=v("form"),h&&h.c(),t=O(),i=v("div"),s=v("p"),s.textContent="Avatar",l=O(),o=v("div");for(let T=0;T<10;T+=1)b[T].c();r=O(),H(a.$$.fragment),u=O(),k&&k.c(),f=O(),y&&y.c(),p(s,"class","section-title"),p(o,"class","flex flex-gap-xs flex-wrap"),p(i,"class","content"),p(e,"id",n[11]),p(e,"class","grid"),p(e,"autocomplete","off")},m(T,$){S(T,e,$),h&&h.m(e,null),_(e,t),_(e,i),_(i,s),_(i,l),_(i,o);for(let M=0;M<10;M+=1)b[M].m(o,null);_(e,r),q(a,e,null),_(e,u),k&&k.m(e,null),_(e,f),y&&y.m(e,null),c=!0,d||(m=Y(e,"submit",dt(n[12])),d=!0)},p(T,$){if(T[1].isNew?h&&(ae(),I(h,1,1,()=>{h=null}),ue()):h?(h.p(T,$),$[0]&2&&A(h,1)):(h=jm(T),h.c(),A(h,1),h.m(e,t)),$[0]&4){g=[0,1,2,3,4,5,6,7,8,9];let C;for(C=0;C<10;C+=1){const D=qm(T,g,C);b[C]?b[C].p(D,$):(b[C]=Hm(D),b[C].c(),b[C].m(o,null))}for(;C<10;C+=1)b[C].d(1)}const M={};$[0]&536870920|$[1]&4&&(M.$$scope={dirty:$,ctx:T}),a.$set(M),T[1].isNew?k&&(ae(),I(k,1,1,()=>{k=null}),ue()):k?(k.p(T,$),$[0]&2&&A(k,1)):(k=Vm(T),k.c(),A(k,1),k.m(e,f)),T[1].isNew||T[4]?y?(y.p(T,$),$[0]&18&&A(y,1)):(y=zm(T),y.c(),A(y,1),y.m(e,null)):y&&(ae(),I(y,1,1,()=>{y=null}),ue())},i(T){c||(A(h),A(a.$$.fragment,T),A(k),A(y),c=!0)},o(T){I(h),I(a.$$.fragment,T),I(k),I(y),c=!1},d(T){T&&w(e),h&&h.d(),mt(b,T),j(a),k&&k.d(),y&&y.d(),d=!1,m()}}}function sO(n){let e,t=n[1].isNew?"New admin":"Edit admin",i;return{c(){e=v("h4"),i=B(t)},m(s,l){S(s,e,l),_(e,i)},p(s,l){l[0]&2&&t!==(t=s[1].isNew?"New admin":"Edit admin")&&le(i,t)},d(s){s&&w(e)}}}function Bm(n){let e,t,i,s,l,o,r,a,u;return o=new ei({props:{class:"dropdown dropdown-upside dropdown-left dropdown-nowrap",$$slots:{default:[lO]},$$scope:{ctx:n}}}),{c(){e=v("button"),t=v("span"),i=O(),s=v("i"),l=O(),H(o.$$.fragment),r=O(),a=v("div"),p(s,"class","ri-more-line"),p(e,"type","button"),p(e,"aria-label","More"),p(e,"class","btn btn-sm btn-circle btn-transparent"),p(a,"class","flex-fill")},m(f,c){S(f,e,c),_(e,t),_(e,i),_(e,s),_(e,l),q(o,e,null),S(f,r,c),S(f,a,c),u=!0},p(f,c){const d={};c[1]&4&&(d.$$scope={dirty:c,ctx:f}),o.$set(d)},i(f){u||(A(o.$$.fragment,f),u=!0)},o(f){I(o.$$.fragment,f),u=!1},d(f){f&&w(e),j(o),f&&w(r),f&&w(a)}}}function lO(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + Delete`,p(e,"type","button"),p(e,"class","dropdown-item txt-danger")},m(s,l){S(s,e,l),t||(i=Y(e,"click",n[15]),t=!0)},p:Z,d(s){s&&w(e),t=!1,i()}}}function oO(n){let e,t,i,s,l,o,r=n[1].isNew?"Create":"Save changes",a,u,f,c,d,m=!n[1].isNew&&Bm(n);return{c(){m&&m.c(),e=O(),t=v("button"),i=v("span"),i.textContent="Cancel",s=O(),l=v("button"),o=v("span"),a=B(r),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-transparent"),t.disabled=n[6],p(o,"class","txt"),p(l,"type","submit"),p(l,"form",n[11]),p(l,"class","btn btn-expanded"),l.disabled=u=!n[10]||n[6],Q(l,"btn-loading",n[6])},m(h,g){m&&m.m(h,g),S(h,e,g),S(h,t,g),_(t,i),S(h,s,g),S(h,l,g),_(l,o),_(o,a),f=!0,c||(d=Y(t,"click",n[16]),c=!0)},p(h,g){h[1].isNew?m&&(ae(),I(m,1,1,()=>{m=null}),ue()):m?(m.p(h,g),g[0]&2&&A(m,1)):(m=Bm(h),m.c(),A(m,1),m.m(e.parentNode,e)),(!f||g[0]&64)&&(t.disabled=h[6]),(!f||g[0]&2)&&r!==(r=h[1].isNew?"Create":"Save changes")&&le(a,r),(!f||g[0]&1088&&u!==(u=!h[10]||h[6]))&&(l.disabled=u),(!f||g[0]&64)&&Q(l,"btn-loading",h[6])},i(h){f||(A(m),f=!0)},o(h){I(m),f=!1},d(h){m&&m.d(h),h&&w(e),h&&w(t),h&&w(s),h&&w(l),c=!1,d()}}}function rO(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[22],$$slots:{footer:[oO],header:[sO],default:[iO]},$$scope:{ctx:n}};return e=new Nn({props:i}),n[23](e),e.$on("hide",n[24]),e.$on("show",n[25]),{c(){H(e.$$.fragment)},m(s,l){q(e,s,l),t=!0},p(s,l){const o={};l[0]&1152&&(o.beforeHide=s[22]),l[0]&1886|l[1]&4&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[23](null),j(e,s)}}}function aO(n,e,t){let i;const s=Ct(),l="admin_"+z.randomString(5);let o,r=new Xi,a=!1,u=!1,f=0,c="",d="",m="",h=!1;function g(W){return k(W),t(7,u=!0),o==null?void 0:o.show()}function b(){return o==null?void 0:o.hide()}function k(W){t(1,r=W!=null&&W.clone?W.clone():new Xi),y()}function y(){t(4,h=!1),t(3,c=(r==null?void 0:r.email)||""),t(2,f=(r==null?void 0:r.avatar)||0),t(8,d=""),t(9,m=""),Bn({})}function T(){if(a||!i)return;t(6,a=!0);const W={email:c,avatar:f};(r.isNew||h)&&(W.password=d,W.passwordConfirm=m);let G;r.isNew?G=pe.admins.create(W):G=pe.admins.update(r.id,W),G.then(async te=>{var K;t(7,u=!1),b(),zt(r.isNew?"Successfully created admin.":"Successfully updated admin."),s("save",te),((K=pe.authStore.model)==null?void 0:K.id)===te.id&&pe.authStore.save(pe.authStore.token,te)}).catch(te=>{pe.errorResponseHandler(te)}).finally(()=>{t(6,a=!1)})}function $(){r!=null&&r.id&&cn("Do you really want to delete the selected admin?",()=>pe.admins.delete(r.id).then(()=>{t(7,u=!1),b(),zt("Successfully deleted admin."),s("delete",r)}).catch(W=>{pe.errorResponseHandler(W)}))}const M=()=>$(),C=()=>b(),D=W=>t(2,f=W);function E(){c=this.value,t(3,c)}function P(){h=this.checked,t(4,h)}function L(){d=this.value,t(8,d)}function N(){m=this.value,t(9,m)}const F=()=>i&&u?(cn("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),b()}),!1):!0;function R(W){ie[W?"unshift":"push"](()=>{o=W,t(5,o)})}function X(W){ze.call(this,n,W)}function se(W){ze.call(this,n,W)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=r.isNew&&c!=""||h||c!==r.email||f!==r.avatar)},[b,r,f,c,h,o,a,u,d,m,i,l,T,$,g,M,C,D,E,P,L,N,F,R,X,se]}class uO extends ye{constructor(e){super(),ve(this,e,aO,rO,he,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function Um(n,e,t){const i=n.slice();return i[24]=e[t],i}function fO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="id",p(t,"class",z.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:Z,d(l){l&&w(e)}}}function cO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="email",p(t,"class",z.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:Z,d(l){l&&w(e)}}}function dO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="created",p(t,"class",z.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:Z,d(l){l&&w(e)}}}function pO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="updated",p(t,"class",z.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:Z,d(l){l&&w(e)}}}function Wm(n){let e;function t(l,o){return l[5]?hO:mO}let i=t(n),s=i(n);return{c(){s.c(),e=Me()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function mO(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&Ym(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No admins found.",s=O(),o&&o.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(t,s),o&&o.m(t,null),_(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?o?o.p(a,u):(o=Ym(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function hO(n){let e;return{c(){e=v("tr"),e.innerHTML=` + `},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function Ym(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=Y(e,"click",n[17]),t=!0)},p:Z,d(s){s&&w(e),t=!1,i()}}}function Km(n){let e;return{c(){e=v("span"),e.textContent="You",p(e,"class","label label-warning m-l-5")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Jm(n,e){let t,i,s,l,o,r,a,u,f,c,d,m=e[24].id+"",h,g,b,k,y,T=e[24].email+"",$,M,C,D,E,P,L,N,F,R,X,se,W,G;f=new iu({props:{value:e[24].id}});let te=e[24].id===e[7].id&&Km();E=new ui({props:{date:e[24].created}}),N=new ui({props:{date:e[24].updated}});function K(){return e[15](e[24])}function re(...J){return e[16](e[24],...J)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("figure"),l=v("img"),r=O(),a=v("td"),u=v("div"),H(f.$$.fragment),c=O(),d=v("span"),h=B(m),g=O(),te&&te.c(),b=O(),k=v("td"),y=v("span"),$=B(T),C=O(),D=v("td"),H(E.$$.fragment),P=O(),L=v("td"),H(N.$$.fragment),F=O(),R=v("td"),R.innerHTML='',X=O(),Vn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg")||p(l,"src",o),p(l,"alt","Admin avatar"),p(s,"class","thumb thumb-sm thumb-circle"),p(i,"class","min-width"),p(d,"class","txt"),p(u,"class","label"),p(a,"class","col-type-text col-field-id"),p(y,"class","txt txt-ellipsis"),p(y,"title",M=e[24].email),p(k,"class","col-type-email col-field-email"),p(D,"class","col-type-date col-field-created"),p(L,"class","col-type-date col-field-updated"),p(R,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(J,de){S(J,t,de),_(t,i),_(i,s),_(s,l),_(t,r),_(t,a),_(a,u),q(f,u,null),_(u,c),_(u,d),_(d,h),_(a,g),te&&te.m(a,null),_(t,b),_(t,k),_(k,y),_(y,$),_(t,C),_(t,D),q(E,D,null),_(t,P),_(t,L),q(N,L,null),_(t,F),_(t,R),_(t,X),se=!0,W||(G=[Y(t,"click",K),Y(t,"keydown",re)],W=!0)},p(J,de){e=J,(!se||de&16&&!Vn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&p(l,"src",o);const _e={};de&16&&(_e.value=e[24].id),f.$set(_e),(!se||de&16)&&m!==(m=e[24].id+"")&&le(h,m),e[24].id===e[7].id?te||(te=Km(),te.c(),te.m(a,null)):te&&(te.d(1),te=null),(!se||de&16)&&T!==(T=e[24].email+"")&&le($,T),(!se||de&16&&M!==(M=e[24].email))&&p(y,"title",M);const $e={};de&16&&($e.date=e[24].created),E.$set($e);const Ne={};de&16&&(Ne.date=e[24].updated),N.$set(Ne)},i(J){se||(A(f.$$.fragment,J),A(E.$$.fragment,J),A(N.$$.fragment,J),se=!0)},o(J){I(f.$$.fragment,J),I(E.$$.fragment,J),I(N.$$.fragment,J),se=!1},d(J){J&&w(t),j(f),te&&te.d(),j(E),j(N),W=!1,Pe(G)}}}function gO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,k,y,T,$,M=[],C=new Map,D;function E(K){n[11](K)}let P={class:"col-type-text",name:"id",$$slots:{default:[fO]},$$scope:{ctx:n}};n[2]!==void 0&&(P.sort=n[2]),o=new Wt({props:P}),ie.push(()=>ge(o,"sort",E));function L(K){n[12](K)}let N={class:"col-type-email col-field-email",name:"email",$$slots:{default:[cO]},$$scope:{ctx:n}};n[2]!==void 0&&(N.sort=n[2]),u=new Wt({props:N}),ie.push(()=>ge(u,"sort",L));function F(K){n[13](K)}let R={class:"col-type-date col-field-created",name:"created",$$slots:{default:[dO]},$$scope:{ctx:n}};n[2]!==void 0&&(R.sort=n[2]),d=new Wt({props:R}),ie.push(()=>ge(d,"sort",F));function X(K){n[14](K)}let se={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[pO]},$$scope:{ctx:n}};n[2]!==void 0&&(se.sort=n[2]),g=new Wt({props:se}),ie.push(()=>ge(g,"sort",X));let W=n[4];const G=K=>K[24].id;for(let K=0;Kr=!1)),o.$set(J);const de={};re&134217728&&(de.$$scope={dirty:re,ctx:K}),!f&&re&4&&(f=!0,de.sort=K[2],ke(()=>f=!1)),u.$set(de);const _e={};re&134217728&&(_e.$$scope={dirty:re,ctx:K}),!m&&re&4&&(m=!0,_e.sort=K[2],ke(()=>m=!1)),d.$set(_e);const $e={};re&134217728&&($e.$$scope={dirty:re,ctx:K}),!b&&re&4&&(b=!0,$e.sort=K[2],ke(()=>b=!1)),g.$set($e),re&186&&(W=K[4],ae(),M=wt(M,re,G,1,K,W,C,$,ln,Jm,null,Um),ue(),!W.length&&te?te.p(K,re):W.length?te&&(te.d(1),te=null):(te=Wm(K),te.c(),te.m($,null))),(!D||re&32)&&Q(e,"table-loading",K[5])},i(K){if(!D){A(o.$$.fragment,K),A(u.$$.fragment,K),A(d.$$.fragment,K),A(g.$$.fragment,K);for(let re=0;re + New admin`,m=O(),H(h.$$.fragment),g=O(),b=v("div"),k=O(),H(y.$$.fragment),T=O(),E&&E.c(),$=Me(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(f,"class","flex-fill"),p(d,"type","button"),p(d,"class","btn btn-expanded"),p(e,"class","page-header"),p(b,"class","clearfix m-b-base")},m(P,L){S(P,e,L),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),_(e,r),q(a,e,null),_(e,u),_(e,f),_(e,c),_(e,d),S(P,m,L),q(h,P,L),S(P,g,L),S(P,b,L),S(P,k,L),q(y,P,L),S(P,T,L),E&&E.m(P,L),S(P,$,L),M=!0,C||(D=Y(d,"click",n[9]),C=!0)},p(P,L){(!M||L&64)&&le(o,P[6]);const N={};L&2&&(N.value=P[1]),h.$set(N);const F={};L&134217918&&(F.$$scope={dirty:L,ctx:P}),y.$set(F),P[4].length?E?E.p(P,L):(E=Zm(P),E.c(),E.m($.parentNode,$)):E&&(E.d(1),E=null)},i(P){M||(A(a.$$.fragment,P),A(h.$$.fragment,P),A(y.$$.fragment,P),M=!0)},o(P){I(a.$$.fragment,P),I(h.$$.fragment,P),I(y.$$.fragment,P),M=!1},d(P){P&&w(e),j(a),P&&w(m),j(h,P),P&&w(g),P&&w(b),P&&w(k),j(y,P),P&&w(T),E&&E.d(P),P&&w($),C=!1,D()}}}function bO(n){let e,t,i,s,l,o;e=new Ii({}),i=new wn({props:{$$slots:{default:[_O]},$$scope:{ctx:n}}});let r={};return l=new uO({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){H(e.$$.fragment),t=O(),H(i.$$.fragment),s=O(),H(l.$$.fragment)},m(a,u){q(e,a,u),S(a,t,u),q(i,a,u),S(a,s,u),q(l,a,u),o=!0},p(a,[u]){const f={};u&134217982&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){I(e.$$.fragment,a),I(i.$$.fragment,a),I(l.$$.fragment,a),o=!1},d(a){j(e,a),a&&w(t),j(i,a),a&&w(s),n[18](null),j(l,a)}}}function vO(n,e,t){let i,s,l;Ye(n,ma,N=>t(21,i=N)),Ye(n,St,N=>t(6,s=N)),Ye(n,Ma,N=>t(7,l=N)),Kt(St,s="Admins",s);const o=new URLSearchParams(i);let r,a=[],u=!1,f=o.get("filter")||"",c=o.get("sort")||"-created";function d(){return t(5,u=!0),t(4,a=[]),pe.admins.getFullList(100,{sort:c||"-created",filter:f}).then(N=>{t(4,a=N),t(5,u=!1)}).catch(N=>{N!=null&&N.isAbort||(t(5,u=!1),console.warn(N),m(),pe.errorResponseHandler(N,!1))})}function m(){t(4,a=[])}const h=()=>d(),g=()=>r==null?void 0:r.show(),b=N=>t(1,f=N.detail);function k(N){c=N,t(2,c)}function y(N){c=N,t(2,c)}function T(N){c=N,t(2,c)}function $(N){c=N,t(2,c)}const M=N=>r==null?void 0:r.show(N),C=(N,F)=>{(F.code==="Enter"||F.code==="Space")&&(F.preventDefault(),r==null||r.show(N))},D=()=>t(1,f="");function E(N){ie[N?"unshift":"push"](()=>{r=N,t(3,r)})}const P=()=>d(),L=()=>d();return n.$$.update=()=>{if(n.$$.dirty&6&&c!==-1&&f!==-1){const N=new URLSearchParams({filter:f,sort:c}).toString();Di("/settings/admins?"+N),d()}},[d,f,c,r,a,u,s,l,h,g,b,k,y,T,$,M,C,D,E,P,L]}class yO extends ye{constructor(e){super(),ve(this,e,vO,bO,he,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function kO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Email"),s=O(),l=v("input"),p(e,"for",i=n[8]),p(l,"type","email"),p(l,"id",o=n[8]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0]),l.focus(),r||(a=Y(l,"input",n[4]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(l,"id",o),f&1&&l.value!==u[0]&&ce(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function wO(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=B("Password"),s=O(),l=v("input"),r=O(),a=v("div"),u=v("a"),u.textContent="Forgotten password?",p(e,"for",i=n[8]),p(l,"type","password"),p(l,"id",o=n[8]),l.required=!0,p(u,"href","/request-password-reset"),p(u,"class","link-hint"),p(a,"class","help-block")},m(d,m){S(d,e,m),_(e,t),S(d,s,m),S(d,l,m),ce(l,n[1]),S(d,r,m),S(d,a,m),_(a,u),f||(c=[Y(l,"input",n[5]),Ie(xt.call(null,u))],f=!0)},p(d,m){m&256&&i!==(i=d[8])&&p(e,"for",i),m&256&&o!==(o=d[8])&&p(l,"id",o),m&2&&l.value!==d[1]&&ce(l,d[1])},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),f=!1,Pe(c)}}}function SO(n){let e,t,i,s,l,o,r,a,u,f,c;return s=new me({props:{class:"form-field required",name:"identity",$$slots:{default:[kO,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),o=new me({props:{class:"form-field required",name:"password",$$slots:{default:[wO,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

    Admin sign in

    ",i=O(),H(s.$$.fragment),l=O(),H(o.$$.fragment),r=O(),a=v("button"),a.innerHTML=`Login + `,p(t,"class","content txt-center m-b-base"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block btn-next"),Q(a,"btn-disabled",n[2]),Q(a,"btn-loading",n[2]),p(e,"class","block")},m(d,m){S(d,e,m),_(e,t),_(e,i),q(s,e,null),_(e,l),q(o,e,null),_(e,r),_(e,a),u=!0,f||(c=Y(e,"submit",dt(n[3])),f=!0)},p(d,m){const h={};m&769&&(h.$$scope={dirty:m,ctx:d}),s.$set(h);const g={};m&770&&(g.$$scope={dirty:m,ctx:d}),o.$set(g),(!u||m&4)&&Q(a,"btn-disabled",d[2]),(!u||m&4)&&Q(a,"btn-loading",d[2])},i(d){u||(A(s.$$.fragment,d),A(o.$$.fragment,d),u=!0)},o(d){I(s.$$.fragment,d),I(o.$$.fragment,d),u=!1},d(d){d&&w(e),j(s),j(o),f=!1,c()}}}function TO(n){let e,t;return e=new S_({props:{$$slots:{default:[SO]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,[s]){const l={};s&519&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function $O(n,e,t){let i;Ye(n,ma,c=>t(6,i=c));const s=new URLSearchParams(i);let l=s.get("demoEmail")||"",o=s.get("demoPassword")||"",r=!1;function a(){if(!r)return t(2,r=!0),pe.admins.authWithPassword(l,o).then(()=>{$a(),Di("/")}).catch(()=>{cl("Invalid login credentials.")}).finally(()=>{t(2,r=!1)})}function u(){l=this.value,t(0,l)}function f(){o=this.value,t(1,o)}return[l,o,r,a,u,f]}class CO extends ye{constructor(e){super(),ve(this,e,$O,TO,he,{})}}function MO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,k,y,T,$,M;i=new me({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[OO,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}}),o=new me({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[EO,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}}),a=new me({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[AO,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}}),f=new me({props:{class:"form-field form-field-toggle",name:"meta.hideControls",$$slots:{default:[IO,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}});let C=n[3]&&Gm(n);return{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=O(),l=v("div"),H(o.$$.fragment),r=O(),H(a.$$.fragment),u=O(),H(f.$$.fragment),c=O(),d=v("div"),m=v("div"),h=O(),C&&C.c(),g=O(),b=v("button"),k=v("span"),k.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(m,"class","flex-fill"),p(k,"class","txt"),p(b,"type","submit"),p(b,"class","btn btn-expanded"),b.disabled=y=!n[3]||n[2],Q(b,"btn-loading",n[2]),p(d,"class","col-lg-12 flex"),p(e,"class","grid")},m(D,E){S(D,e,E),_(e,t),q(i,t,null),_(e,s),_(e,l),q(o,l,null),_(e,r),q(a,e,null),_(e,u),q(f,e,null),_(e,c),_(e,d),_(d,m),_(d,h),C&&C.m(d,null),_(d,g),_(d,b),_(b,k),T=!0,$||(M=Y(b,"click",n[13]),$=!0)},p(D,E){const P={};E&1572865&&(P.$$scope={dirty:E,ctx:D}),i.$set(P);const L={};E&1572865&&(L.$$scope={dirty:E,ctx:D}),o.$set(L);const N={};E&1572865&&(N.$$scope={dirty:E,ctx:D}),a.$set(N);const F={};E&1572865&&(F.$$scope={dirty:E,ctx:D}),f.$set(F),D[3]?C?C.p(D,E):(C=Gm(D),C.c(),C.m(d,g)):C&&(C.d(1),C=null),(!T||E&12&&y!==(y=!D[3]||D[2]))&&(b.disabled=y),(!T||E&4)&&Q(b,"btn-loading",D[2])},i(D){T||(A(i.$$.fragment,D),A(o.$$.fragment,D),A(a.$$.fragment,D),A(f.$$.fragment,D),T=!0)},o(D){I(i.$$.fragment,D),I(o.$$.fragment,D),I(a.$$.fragment,D),I(f.$$.fragment,D),T=!1},d(D){D&&w(e),j(i),j(o),j(a),j(f),C&&C.d(),$=!1,M()}}}function DO(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:Z,i:Z,o:Z,d(t){t&&w(e)}}}function OO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Application name"),s=O(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].meta.appName),r||(a=Y(l,"input",n[8]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].meta.appName&&ce(l,u[0].meta.appName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function EO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Application url"),s=O(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].meta.appUrl),r||(a=Y(l,"input",n[9]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].meta.appUrl&&ce(l,u[0].meta.appUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function AO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Logs max days retention"),s=O(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","number"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].logs.maxDays),r||(a=Y(l,"input",n[10]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&ht(l.value)!==u[0].logs.maxDays&&ce(l,u[0].logs.maxDays)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function IO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Hide collection create and edit controls",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[19]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[19])},m(c,d){S(c,e,d),e.checked=n[0].meta.hideControls,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[Y(e,"change",n[11]),Ie(Be.call(null,r,{text:"This could prevent making accidental schema changes when in production environment.",position:"right"}))],u=!0)},p(c,d){d&524288&&t!==(t=c[19])&&p(e,"id",t),d&1&&(e.checked=c[0].meta.hideControls),d&524288&&a!==(a=c[19])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function Gm(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),_(e,t),i||(s=Y(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function PO(n){let e,t,i,s,l,o,r,a,u;const f=[DO,MO],c=[];function d(m,h){return m[1]?0:1}return l=d(n),o=c[l]=f[l](n),{c(){e=v("header"),e.innerHTML=``,t=O(),i=v("div"),s=v("form"),o.c(),p(e,"class","page-header"),p(s,"class","panel"),p(s,"autocomplete","off"),p(i,"class","wrapper")},m(m,h){S(m,e,h),S(m,t,h),S(m,i,h),_(i,s),c[l].m(s,null),r=!0,a||(u=Y(s,"submit",dt(n[4])),a=!0)},p(m,h){let g=l;l=d(m),l===g?c[l].p(m,h):(ae(),I(c[g],1,1,()=>{c[g]=null}),ue(),o=c[l],o?o.p(m,h):(o=c[l]=f[l](m),o.c()),A(o,1),o.m(s,null))},i(m){r||(A(o),r=!0)},o(m){I(o),r=!1},d(m){m&&w(e),m&&w(t),m&&w(i),c[l].d(),a=!1,u()}}}function LO(n){let e,t,i,s;return e=new Ii({}),i=new wn({props:{$$slots:{default:[PO]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=O(),H(i.$$.fragment)},m(l,o){q(e,l,o),S(l,t,o),q(i,l,o),s=!0},p(l,[o]){const r={};o&1048591&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){j(e,l),l&&w(t),j(i,l)}}}function NO(n,e,t){let i,s,l,o;Ye(n,$s,C=>t(14,s=C)),Ye(n,vo,C=>t(15,l=C)),Ye(n,St,C=>t(16,o=C)),Kt(St,o="Application settings",o);let r={},a={},u=!1,f=!1,c="";d();async function d(){t(1,u=!0);try{const C=await pe.settings.getAll()||{};h(C)}catch(C){pe.errorResponseHandler(C)}t(1,u=!1)}async function m(){if(!(f||!i)){t(2,f=!0);try{const C=await pe.settings.update(z.filterRedactedProps(a));h(C),zt("Successfully saved application settings.")}catch(C){pe.errorResponseHandler(C)}t(2,f=!1)}}function h(C={}){var D,E;Kt(vo,l=(D=C==null?void 0:C.meta)==null?void 0:D.appName,l),Kt($s,s=!!((E=C==null?void 0:C.meta)!=null&&E.hideControls),s),t(0,a={meta:(C==null?void 0:C.meta)||{},logs:(C==null?void 0:C.logs)||{}}),t(6,r=JSON.parse(JSON.stringify(a)))}function g(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function b(){a.meta.appName=this.value,t(0,a)}function k(){a.meta.appUrl=this.value,t(0,a)}function y(){a.logs.maxDays=ht(this.value),t(0,a)}function T(){a.meta.hideControls=this.checked,t(0,a)}const $=()=>g(),M=()=>m();return n.$$.update=()=>{n.$$.dirty&64&&t(7,c=JSON.stringify(r)),n.$$.dirty&129&&t(3,i=c!=JSON.stringify(a))},[a,u,f,i,m,g,r,c,b,k,y,T,$,M]}class FO extends ye{constructor(e){super(),ve(this,e,NO,LO,he,{})}}function RO(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o',i=O(),s=v("input"),p(t,"type","button"),p(t,"class","btn btn-transparent btn-circle"),p(e,"class","form-field-addon"),Xn(s,a)},m(u,f){S(u,e,f),_(e,t),S(u,i,f),S(u,s,f),s.autofocus&&s.focus(),l||(o=[Ie(Be.call(null,t,{position:"left",text:"Set new value"})),Y(t,"click",n[6])],l=!0)},p(u,f){Xn(s,a=on(r,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&w(e),u&&w(i),u&&w(s),l=!1,Pe(o)}}}function jO(n){let e;function t(l,o){return l[3]?qO:RO}let i=t(n),s=i(n);return{c(){s.c(),e=Me()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:Z,o:Z,d(l){s.d(l),l&&w(e)}}}function HO(n,e,t){const i=["value","mask"];let s=Et(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function u(){t(0,l=""),t(3,a=!1),await sn(),r==null||r.focus()}const f=()=>u();function c(m){ie[m?"unshift":"push"](()=>{r=m,t(2,r)})}function d(){l=this.value,t(0,l)}return n.$$set=m=>{e=Je(Je({},e),Qn(m)),t(5,s=Et(e,i)),"value"in m&&t(0,l=m.value),"mask"in m&&t(1,o=m.mask)},n.$$.update=()=>{n.$$.dirty&3&&l===o&&t(3,a=!0)},[l,o,r,a,u,s,f,c,d]}class su extends ye{constructor(e){super(),ve(this,e,HO,jO,he,{value:0,mask:1})}}function VO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;return{c(){e=v("label"),t=B("Subject"),s=O(),l=v("input"),r=O(),a=v("div"),u=B(`Available placeholder parameters: + `),f=v("button"),f.textContent=`{APP_NAME} + `,c=B(`, + `),d=v("button"),d.textContent=`{APP_URL} + `,m=B("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(a,"class","help-block")},m(b,k){S(b,e,k),_(e,t),S(b,s,k),S(b,l,k),ce(l,n[0].subject),S(b,r,k),S(b,a,k),_(a,u),_(a,f),_(a,c),_(a,d),_(a,m),h||(g=[Y(l,"input",n[13]),Y(f,"click",n[14]),Y(d,"click",n[15])],h=!0)},p(b,k){k[1]&1&&i!==(i=b[31])&&p(e,"for",i),k[1]&1&&o!==(o=b[31])&&p(l,"id",o),k[0]&1&&l.value!==b[0].subject&&ce(l,b[0].subject)},d(b){b&&w(e),b&&w(s),b&&w(l),b&&w(r),b&&w(a),h=!1,Pe(g)}}}function zO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,k;return{c(){e=v("label"),t=B("Action URL"),s=O(),l=v("input"),r=O(),a=v("div"),u=B(`Available placeholder parameters: + `),f=v("button"),f.textContent=`{APP_NAME} + `,c=B(`, + `),d=v("button"),d.textContent=`{APP_URL} + `,m=B(`, + `),h=v("button"),h.textContent=`{TOKEN} + `,g=B("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(h,"type","button"),p(h,"class","label label-sm link-primary txt-mono"),p(h,"title","Required parameter"),p(a,"class","help-block")},m(y,T){S(y,e,T),_(e,t),S(y,s,T),S(y,l,T),ce(l,n[0].actionUrl),S(y,r,T),S(y,a,T),_(a,u),_(a,f),_(a,c),_(a,d),_(a,m),_(a,h),_(a,g),b||(k=[Y(l,"input",n[16]),Y(f,"click",n[17]),Y(d,"click",n[18]),Y(h,"click",n[19])],b=!0)},p(y,T){T[1]&1&&i!==(i=y[31])&&p(e,"for",i),T[1]&1&&o!==(o=y[31])&&p(l,"id",o),T[0]&1&&l.value!==y[0].actionUrl&&ce(l,y[0].actionUrl)},d(y){y&&w(e),y&&w(s),y&&w(l),y&&w(r),y&&w(a),b=!1,Pe(k)}}}function BO(n){let e,t,i,s;return{c(){e=v("textarea"),p(e,"id",t=n[31]),p(e,"class","txt-mono"),p(e,"spellcheck","false"),p(e,"rows","14"),e.required=!0},m(l,o){S(l,e,o),ce(e,n[0].body),i||(s=Y(e,"input",n[21]),i=!0)},p(l,o){o[1]&1&&t!==(t=l[31])&&p(e,"id",t),o[0]&1&&ce(e,l[0].body)},i:Z,o:Z,d(l){l&&w(e),i=!1,s()}}}function UO(n){let e,t,i,s;function l(a){n[20](a)}var o=n[4];function r(a){let u={id:a[31],language:"html"};return a[0].body!==void 0&&(u.value=a[0].body),{props:u}}return o&&(e=jt(o,r(n)),ie.push(()=>ge(e,"value",l))),{c(){e&&H(e.$$.fragment),i=Me()},m(a,u){e&&q(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u[1]&1&&(f.id=a[31]),!t&&u[0]&1&&(t=!0,f.value=a[0].body,ke(()=>t=!1)),o!==(o=a[4])){if(e){ae();const c=e;I(c.$$.fragment,1,0,()=>{j(c,1)}),ue()}o?(e=jt(o,r(a)),ie.push(()=>ge(e,"value",l)),H(e.$$.fragment),A(e.$$.fragment,1),q(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&I(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&j(e,a)}}}function WO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,k,y,T,$;const M=[UO,BO],C=[];function D(E,P){return E[4]&&!E[5]?0:1}return l=D(n),o=C[l]=M[l](n),{c(){e=v("label"),t=B("Body (HTML)"),s=O(),o.c(),r=O(),a=v("div"),u=B(`Available placeholder parameters: + `),f=v("button"),f.textContent=`{APP_NAME} + `,c=B(`, + `),d=v("button"),d.textContent=`{APP_URL} + `,m=B(`, + `),h=v("button"),h.textContent=`{TOKEN} + `,g=B(`, + `),b=v("button"),b.textContent=`{ACTION_URL} + `,k=B("."),p(e,"for",i=n[31]),p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(h,"type","button"),p(h,"class","label label-sm link-primary txt-mono"),p(b,"type","button"),p(b,"class","label label-sm link-primary txt-mono"),p(b,"title","Required parameter"),p(a,"class","help-block")},m(E,P){S(E,e,P),_(e,t),S(E,s,P),C[l].m(E,P),S(E,r,P),S(E,a,P),_(a,u),_(a,f),_(a,c),_(a,d),_(a,m),_(a,h),_(a,g),_(a,b),_(a,k),y=!0,T||($=[Y(f,"click",n[22]),Y(d,"click",n[23]),Y(h,"click",n[24]),Y(b,"click",n[25])],T=!0)},p(E,P){(!y||P[1]&1&&i!==(i=E[31]))&&p(e,"for",i);let L=l;l=D(E),l===L?C[l].p(E,P):(ae(),I(C[L],1,1,()=>{C[L]=null}),ue(),o=C[l],o?o.p(E,P):(o=C[l]=M[l](E),o.c()),A(o,1),o.m(r.parentNode,r))},i(E){y||(A(o),y=!0)},o(E){I(o),y=!1},d(E){E&&w(e),E&&w(s),C[l].d(E),E&&w(r),E&&w(a),T=!1,Pe($)}}}function YO(n){let e,t,i,s,l,o;return e=new me({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[VO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new me({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[zO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new me({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[WO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=O(),H(i.$$.fragment),s=O(),H(l.$$.fragment)},m(r,a){q(e,r,a),S(r,t,a),q(i,r,a),S(r,s,a),q(l,r,a),o=!0},p(r,a){const u={};a[0]&2&&(u.name=r[1]+".subject"),a[0]&1|a[1]&3&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a[0]&2&&(f.name=r[1]+".actionUrl"),a[0]&1|a[1]&3&&(f.$$scope={dirty:a,ctx:r}),i.$set(f);const c={};a[0]&2&&(c.name=r[1]+".body"),a[0]&49|a[1]&3&&(c.$$scope={dirty:a,ctx:r}),l.$set(c)},i(r){o||(A(e.$$.fragment,r),A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){I(e.$$.fragment,r),I(i.$$.fragment,r),I(l.$$.fragment,r),o=!1},d(r){j(e,r),r&&w(t),j(i,r),r&&w(s),j(l,r)}}}function Xm(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ie(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&xe(()=>{t||(t=je(e,It,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=je(e,It,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function KO(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Xm();return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),l=B(n[2]),o=O(),r=v("div"),a=O(),f&&f.c(),u=Me(),p(t,"class","ri-draft-line"),p(s,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),_(s,l),S(c,o,d),S(c,r,d),S(c,a,d),f&&f.m(c,d),S(c,u,d)},p(c,d){d[0]&4&&le(l,c[2]),c[6]?f?d[0]&64&&A(f,1):(f=Xm(),f.c(),A(f,1),f.m(u.parentNode,u)):f&&(ae(),I(f,1,1,()=>{f=null}),ue())},d(c){c&&w(e),c&&w(o),c&&w(r),c&&w(a),f&&f.d(c),c&&w(u)}}}function JO(n){let e,t;const i=[n[8]];let s={$$slots:{header:[KO],default:[YO]},$$scope:{ctx:n}};for(let l=0;lt(12,o=K));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,c=Qm,d=!1;function m(){f==null||f.expand()}function h(){f==null||f.collapse()}function g(){f==null||f.collapseSiblings()}async function b(){c||d||(t(5,d=!0),t(4,c=(await rt(()=>import("./CodeEditor-4caff52a.js"),["./CodeEditor-4caff52a.js","./index-a6ccb683.js"],import.meta.url)).default),Qm=c,t(5,d=!1))}function k(K){z.copyToClipboard(K),k_(`Copied ${K} to clipboard`,2e3)}b();function y(){u.subject=this.value,t(0,u)}const T=()=>k("{APP_NAME}"),$=()=>k("{APP_URL}");function M(){u.actionUrl=this.value,t(0,u)}const C=()=>k("{APP_NAME}"),D=()=>k("{APP_URL}"),E=()=>k("{TOKEN}");function P(K){n.$$.not_equal(u.body,K)&&(u.body=K,t(0,u))}function L(){u.body=this.value,t(0,u)}const N=()=>k("{APP_NAME}"),F=()=>k("{APP_URL}"),R=()=>k("{TOKEN}"),X=()=>k("{ACTION_URL}");function se(K){ie[K?"unshift":"push"](()=>{f=K,t(3,f)})}function W(K){ze.call(this,n,K)}function G(K){ze.call(this,n,K)}function te(K){ze.call(this,n,K)}return n.$$set=K=>{e=Je(Je({},e),Qn(K)),t(8,l=Et(e,s)),"key"in K&&t(1,r=K.key),"title"in K&&t(2,a=K.title),"config"in K&&t(0,u=K.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!z.isEmpty(z.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||Qi(r))},[u,r,a,f,c,d,i,k,l,m,h,g,o,y,T,$,M,C,D,E,P,L,N,F,R,X,se,W,G,te]}class Er extends ye{constructor(e){super(),ve(this,e,ZO,JO,he,{key:1,title:2,config:0,expand:9,collapse:10,collapseSiblings:11},null,[-1,-1])}get expand(){return this.$$.ctx[9]}get collapse(){return this.$$.ctx[10]}get collapseSiblings(){return this.$$.ctx[11]}}function xm(n,e,t){const i=n.slice();return i[22]=e[t],i}function eh(n,e){let t,i,s,l,o,r=e[22].label+"",a,u,f,c,d;return{key:n,first:null,c(){t=v("div"),i=v("input"),l=O(),o=v("label"),a=B(r),f=O(),p(i,"type","radio"),p(i,"name","template"),p(i,"id",s=e[21]+e[22].value),i.__value=e[22].value,i.value=i.__value,e[12][0].push(i),p(o,"for",u=e[21]+e[22].value),p(t,"class","form-field-block"),this.first=t},m(m,h){S(m,t,h),_(t,i),i.checked=i.__value===e[2],_(t,l),_(t,o),_(o,a),_(t,f),c||(d=Y(i,"change",e[11]),c=!0)},p(m,h){e=m,h&2097152&&s!==(s=e[21]+e[22].value)&&p(i,"id",s),h&4&&(i.checked=i.__value===e[2]),h&2097152&&u!==(u=e[21]+e[22].value)&&p(o,"for",u)},d(m){m&&w(t),e[12][0].splice(e[12][0].indexOf(i),1),c=!1,d()}}}function GO(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[22].value;for(let o=0;o({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),s=new me({props:{class:"form-field required m-0",name:"email",$$slots:{default:[XO,({uniqueId:a})=>({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),H(t.$$.fragment),i=O(),H(s.$$.fragment),p(e,"id",n[6]),p(e,"autocomplete","off")},m(a,u){S(a,e,u),q(t,e,null),_(e,i),q(s,e,null),l=!0,o||(r=Y(e,"submit",dt(n[14])),o=!0)},p(a,u){const f={};u&35651588&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const c={};u&35651586&&(c.$$scope={dirty:u,ctx:a}),s.$set(c)},i(a){l||(A(t.$$.fragment,a),A(s.$$.fragment,a),l=!0)},o(a){I(t.$$.fragment,a),I(s.$$.fragment,a),l=!1},d(a){a&&w(e),j(t),j(s),o=!1,r()}}}function xO(n){let e;return{c(){e=v("h4"),e.textContent="Send test email",p(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function eE(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("button"),t=B("Close"),i=O(),s=v("button"),l=v("i"),o=O(),r=v("span"),r.textContent="Send",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[4],p(l,"class","ri-mail-send-line"),p(r,"class","txt"),p(s,"type","submit"),p(s,"form",n[6]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[5]||n[4],Q(s,"btn-loading",n[4])},m(c,d){S(c,e,d),_(e,t),S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[Y(e,"click",n[0]),Y(s,"click",n[10])],u=!0)},p(c,d){d&16&&(e.disabled=c[4]),d&48&&a!==(a=!c[5]||c[4])&&(s.disabled=a),d&16&&Q(s,"btn-loading",c[4])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function tE(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[15],popup:!0,$$slots:{footer:[eE],header:[xO],default:[QO]},$$scope:{ctx:n}};return e=new Nn({props:i}),n[16](e),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){H(e.$$.fragment)},m(s,l){q(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[15]),l&33554486&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[16](null),j(e,s)}}}const Ar="last_email_test",th="email_test_request";function nE(n,e,t){let i;const s=Ct(),l="email_test_"+z.randomString(5),o=[{label:'"Verification" template',value:"verification"},{label:'"Password reset" template',value:"password-reset"},{label:'"Confirm email change" template',value:"email-change"}];let r,a=localStorage.getItem(Ar),u=o[0].value,f=!1,c=null;function d(E="",P=""){t(1,a=E||localStorage.getItem(Ar)),t(2,u=P||o[0].value),Bn({}),r==null||r.show()}function m(){return clearTimeout(c),r==null?void 0:r.hide()}async function h(){if(!(!i||f)){t(4,f=!0),localStorage==null||localStorage.setItem(Ar,a),clearTimeout(c),c=setTimeout(()=>{pe.cancelRequest(th),cl("Test email send timeout.")},3e4);try{await pe.settings.testEmail(a,u,{$cancelKey:th}),zt("Successfully sent test email."),s("submit"),t(4,f=!1),await sn(),m()}catch(E){t(4,f=!1),pe.errorResponseHandler(E)}clearTimeout(c)}}const g=[[]],b=()=>h();function k(){u=this.__value,t(2,u)}function y(){a=this.value,t(1,a)}const T=()=>h(),$=()=>!f;function M(E){ie[E?"unshift":"push"](()=>{r=E,t(3,r)})}function C(E){ze.call(this,n,E)}function D(E){ze.call(this,n,E)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[m,a,u,r,f,i,l,o,h,d,b,k,g,y,T,$,M,C,D]}class iE extends ye{constructor(e){super(),ve(this,e,nE,tE,he,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function sE(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,k,y,T,$,M,C,D,E,P,L;i=new me({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[oE,({uniqueId:J})=>({31:J}),({uniqueId:J})=>[0,J?1:0]]},$$scope:{ctx:n}}}),o=new me({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[rE,({uniqueId:J})=>({31:J}),({uniqueId:J})=>[0,J?1:0]]},$$scope:{ctx:n}}});function N(J){n[14](J)}let F={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(F.config=n[0].meta.verificationTemplate),u=new Er({props:F}),ie.push(()=>ge(u,"config",N));function R(J){n[15](J)}let X={single:!0,key:"meta.resetPasswordTemplate",title:'Default "Password reset" email template'};n[0].meta.resetPasswordTemplate!==void 0&&(X.config=n[0].meta.resetPasswordTemplate),d=new Er({props:X}),ie.push(()=>ge(d,"config",R));function se(J){n[16](J)}let W={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(W.config=n[0].meta.confirmEmailChangeTemplate),g=new Er({props:W}),ie.push(()=>ge(g,"config",se)),$=new me({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[aE,({uniqueId:J})=>({31:J}),({uniqueId:J})=>[0,J?1:0]]},$$scope:{ctx:n}}});let G=n[0].smtp.enabled&&nh(n);function te(J,de){return J[4]?gE:hE}let K=te(n),re=K(n);return{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=O(),l=v("div"),H(o.$$.fragment),r=O(),a=v("div"),H(u.$$.fragment),c=O(),H(d.$$.fragment),h=O(),H(g.$$.fragment),k=O(),y=v("hr"),T=O(),H($.$$.fragment),M=O(),G&&G.c(),C=O(),D=v("div"),E=v("div"),P=O(),re.c(),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid m-b-base"),p(a,"class","accordions"),p(E,"class","flex-fill"),p(D,"class","flex")},m(J,de){S(J,e,de),_(e,t),q(i,t,null),_(e,s),_(e,l),q(o,l,null),S(J,r,de),S(J,a,de),q(u,a,null),_(a,c),q(d,a,null),_(a,h),q(g,a,null),S(J,k,de),S(J,y,de),S(J,T,de),q($,J,de),S(J,M,de),G&&G.m(J,de),S(J,C,de),S(J,D,de),_(D,E),_(D,P),re.m(D,null),L=!0},p(J,de){const _e={};de[0]&1|de[1]&3&&(_e.$$scope={dirty:de,ctx:J}),i.$set(_e);const $e={};de[0]&1|de[1]&3&&($e.$$scope={dirty:de,ctx:J}),o.$set($e);const Ne={};!f&&de[0]&1&&(f=!0,Ne.config=J[0].meta.verificationTemplate,ke(()=>f=!1)),u.$set(Ne);const Re={};!m&&de[0]&1&&(m=!0,Re.config=J[0].meta.resetPasswordTemplate,ke(()=>m=!1)),d.$set(Re);const be={};!b&&de[0]&1&&(b=!0,be.config=J[0].meta.confirmEmailChangeTemplate,ke(()=>b=!1)),g.$set(be);const Se={};de[0]&1|de[1]&3&&(Se.$$scope={dirty:de,ctx:J}),$.$set(Se),J[0].smtp.enabled?G?(G.p(J,de),de[0]&1&&A(G,1)):(G=nh(J),G.c(),A(G,1),G.m(C.parentNode,C)):G&&(ae(),I(G,1,1,()=>{G=null}),ue()),K===(K=te(J))&&re?re.p(J,de):(re.d(1),re=K(J),re&&(re.c(),re.m(D,null)))},i(J){L||(A(i.$$.fragment,J),A(o.$$.fragment,J),A(u.$$.fragment,J),A(d.$$.fragment,J),A(g.$$.fragment,J),A($.$$.fragment,J),A(G),L=!0)},o(J){I(i.$$.fragment,J),I(o.$$.fragment,J),I(u.$$.fragment,J),I(d.$$.fragment,J),I(g.$$.fragment,J),I($.$$.fragment,J),I(G),L=!1},d(J){J&&w(e),j(i),j(o),J&&w(r),J&&w(a),j(u),j(d),j(g),J&&w(k),J&&w(y),J&&w(T),j($,J),J&&w(M),G&&G.d(J),J&&w(C),J&&w(D),re.d()}}}function lE(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:Z,i:Z,o:Z,d(t){t&&w(e)}}}function oE(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Sender name"),s=O(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].meta.senderName),r||(a=Y(l,"input",n[12]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderName&&ce(l,u[0].meta.senderName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function rE(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Sender address"),s=O(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","email"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].meta.senderAddress),r||(a=Y(l,"input",n[13]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderAddress&&ce(l,u[0].meta.senderAddress)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function aE(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.innerHTML="Use SMTP mail server (recommended)",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[31]),e.required=!0,p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[31])},m(c,d){S(c,e,d),e.checked=n[0].smtp.enabled,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[Y(e,"change",n[17]),Ie(Be.call(null,r,{text:'By default PocketBase uses the unix "sendmail" command for sending emails. For better emails deliverability it is recommended to use a SMTP mail server.',position:"top"}))],u=!0)},p(c,d){d[1]&1&&t!==(t=c[31])&&p(e,"id",t),d[0]&1&&(e.checked=c[0].smtp.enabled),d[1]&1&&a!==(a=c[31])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function nh(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,k,y,T,$,M,C;return i=new me({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[uE,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),o=new me({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[fE,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),u=new me({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[cE,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),d=new me({props:{class:"form-field",name:"smtp.authMethod",$$slots:{default:[dE,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),g=new me({props:{class:"form-field",name:"smtp.username",$$slots:{default:[pE,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),y=new me({props:{class:"form-field",name:"smtp.password",$$slots:{default:[mE,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=O(),l=v("div"),H(o.$$.fragment),r=O(),a=v("div"),H(u.$$.fragment),f=O(),c=v("div"),H(d.$$.fragment),m=O(),h=v("div"),H(g.$$.fragment),b=O(),k=v("div"),H(y.$$.fragment),T=O(),$=v("div"),p(t,"class","col-lg-4"),p(l,"class","col-lg-2"),p(a,"class","col-lg-3"),p(c,"class","col-lg-3"),p(h,"class","col-lg-6"),p(k,"class","col-lg-6"),p($,"class","col-lg-12"),p(e,"class","grid")},m(D,E){S(D,e,E),_(e,t),q(i,t,null),_(e,s),_(e,l),q(o,l,null),_(e,r),_(e,a),q(u,a,null),_(e,f),_(e,c),q(d,c,null),_(e,m),_(e,h),q(g,h,null),_(e,b),_(e,k),q(y,k,null),_(e,T),_(e,$),C=!0},p(D,E){const P={};E[0]&1|E[1]&3&&(P.$$scope={dirty:E,ctx:D}),i.$set(P);const L={};E[0]&1|E[1]&3&&(L.$$scope={dirty:E,ctx:D}),o.$set(L);const N={};E[0]&1|E[1]&3&&(N.$$scope={dirty:E,ctx:D}),u.$set(N);const F={};E[0]&1|E[1]&3&&(F.$$scope={dirty:E,ctx:D}),d.$set(F);const R={};E[0]&1|E[1]&3&&(R.$$scope={dirty:E,ctx:D}),g.$set(R);const X={};E[0]&1|E[1]&3&&(X.$$scope={dirty:E,ctx:D}),y.$set(X)},i(D){C||(A(i.$$.fragment,D),A(o.$$.fragment,D),A(u.$$.fragment,D),A(d.$$.fragment,D),A(g.$$.fragment,D),A(y.$$.fragment,D),D&&xe(()=>{M||(M=je(e,At,{duration:150},!0)),M.run(1)}),C=!0)},o(D){I(i.$$.fragment,D),I(o.$$.fragment,D),I(u.$$.fragment,D),I(d.$$.fragment,D),I(g.$$.fragment,D),I(y.$$.fragment,D),D&&(M||(M=je(e,At,{duration:150},!1)),M.run(0)),C=!1},d(D){D&&w(e),j(i),j(o),j(u),j(d),j(g),j(y),D&&M&&M.end()}}}function uE(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("SMTP server host"),s=O(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].smtp.host),r||(a=Y(l,"input",n[18]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].smtp.host&&ce(l,u[0].smtp.host)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function fE(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Port"),s=O(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","number"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].smtp.port),r||(a=Y(l,"input",n[19]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&ht(l.value)!==u[0].smtp.port&&ce(l,u[0].smtp.port)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function cE(n){let e,t,i,s,l,o,r;function a(f){n[20](f)}let u={id:n[31],items:n[6]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new Ls({props:u}),ie.push(()=>ge(l,"keyOfSelected",a)),{c(){e=v("label"),t=B("TLS encryption"),s=O(),H(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),q(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=f[0].smtp.tls,ke(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),j(l,f)}}}function dE(n){let e,t,i,s,l,o,r;function a(f){n[21](f)}let u={id:n[31],items:n[7]};return n[0].smtp.authMethod!==void 0&&(u.keyOfSelected=n[0].smtp.authMethod),l=new Ls({props:u}),ie.push(()=>ge(l,"keyOfSelected",a)),{c(){e=v("label"),t=B("AUTH method"),s=O(),H(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),q(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=f[0].smtp.authMethod,ke(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),j(l,f)}}}function pE(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Username"),s=O(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].smtp.username),r||(a=Y(l,"input",n[22]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].smtp.username&&ce(l,u[0].smtp.username)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function mE(n){let e,t,i,s,l,o,r;function a(f){n[23](f)}let u={id:n[31]};return n[0].smtp.password!==void 0&&(u.value=n[0].smtp.password),l=new su({props:u}),ie.push(()=>ge(l,"value",a)),{c(){e=v("label"),t=B("Password"),s=O(),H(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),q(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.value=f[0].smtp.password,ke(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),j(l,f)}}}function hE(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + Send test email`,p(e,"type","button"),p(e,"class","btn btn-expanded btn-outline")},m(s,l){S(s,e,l),t||(i=Y(e,"click",n[26]),t=!0)},p:Z,d(s){s&&w(e),t=!1,i()}}}function gE(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),s=v("button"),l=v("span"),l.textContent="Save changes",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3],p(l,"class","txt"),p(s,"type","submit"),p(s,"class","btn btn-expanded"),s.disabled=o=!n[4]||n[3],Q(s,"btn-loading",n[3])},m(u,f){S(u,e,f),_(e,t),S(u,i,f),S(u,s,f),_(s,l),r||(a=[Y(e,"click",n[24]),Y(s,"click",n[25])],r=!0)},p(u,f){f[0]&8&&(e.disabled=u[3]),f[0]&24&&o!==(o=!u[4]||u[3])&&(s.disabled=o),f[0]&8&&Q(s,"btn-loading",u[3])},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Pe(a)}}}function _E(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b;const k=[lE,sE],y=[];function T($,M){return $[2]?0:1}return d=T(n),m=y[d]=k[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=B(n[5]),r=O(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Configure common settings for sending emails.

    ",c=O(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m($,M){S($,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S($,r,M),S($,a,M),_(a,u),_(u,f),_(u,c),y[d].m(u,null),h=!0,g||(b=Y(u,"submit",dt(n[27])),g=!0)},p($,M){(!h||M[0]&32)&&le(o,$[5]);let C=d;d=T($),d===C?y[d].p($,M):(ae(),I(y[C],1,1,()=>{y[C]=null}),ue(),m=y[d],m?m.p($,M):(m=y[d]=k[d]($),m.c()),A(m,1),m.m(u,null))},i($){h||(A(m),h=!0)},o($){I(m),h=!1},d($){$&&w(e),$&&w(r),$&&w(a),y[d].d(),g=!1,b()}}}function bE(n){let e,t,i,s,l,o;e=new Ii({}),i=new wn({props:{$$slots:{default:[_E]},$$scope:{ctx:n}}});let r={};return l=new iE({props:r}),n[28](l),{c(){H(e.$$.fragment),t=O(),H(i.$$.fragment),s=O(),H(l.$$.fragment)},m(a,u){q(e,a,u),S(a,t,u),q(i,a,u),S(a,s,u),q(l,a,u),o=!0},p(a,u){const f={};u[0]&63|u[1]&2&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){I(e.$$.fragment,a),I(i.$$.fragment,a),I(l.$$.fragment,a),o=!1},d(a){j(e,a),a&&w(t),j(i,a),a&&w(s),n[28](null),j(l,a)}}}function vE(n,e,t){let i,s,l;Ye(n,St,te=>t(5,l=te));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}],r=[{label:"PLAIN (default)",value:"PLAIN"},{label:"LOGIN",value:"LOGIN"}];Kt(St,l="Mail settings",l);let a,u={},f={},c=!1,d=!1;m();async function m(){t(2,c=!0);try{const te=await pe.settings.getAll()||{};g(te)}catch(te){pe.errorResponseHandler(te)}t(2,c=!1)}async function h(){if(!(d||!s)){t(3,d=!0);try{const te=await pe.settings.update(z.filterRedactedProps(f));g(te),Bn({}),zt("Successfully saved mail settings.")}catch(te){pe.errorResponseHandler(te)}t(3,d=!1)}}function g(te={}){t(0,f={meta:(te==null?void 0:te.meta)||{},smtp:(te==null?void 0:te.smtp)||{}}),f.smtp.authMethod||t(0,f.smtp.authMethod=r[0].value,f),t(10,u=JSON.parse(JSON.stringify(f)))}function b(){t(0,f=JSON.parse(JSON.stringify(u||{})))}function k(){f.meta.senderName=this.value,t(0,f)}function y(){f.meta.senderAddress=this.value,t(0,f)}function T(te){n.$$.not_equal(f.meta.verificationTemplate,te)&&(f.meta.verificationTemplate=te,t(0,f))}function $(te){n.$$.not_equal(f.meta.resetPasswordTemplate,te)&&(f.meta.resetPasswordTemplate=te,t(0,f))}function M(te){n.$$.not_equal(f.meta.confirmEmailChangeTemplate,te)&&(f.meta.confirmEmailChangeTemplate=te,t(0,f))}function C(){f.smtp.enabled=this.checked,t(0,f)}function D(){f.smtp.host=this.value,t(0,f)}function E(){f.smtp.port=ht(this.value),t(0,f)}function P(te){n.$$.not_equal(f.smtp.tls,te)&&(f.smtp.tls=te,t(0,f))}function L(te){n.$$.not_equal(f.smtp.authMethod,te)&&(f.smtp.authMethod=te,t(0,f))}function N(){f.smtp.username=this.value,t(0,f)}function F(te){n.$$.not_equal(f.smtp.password,te)&&(f.smtp.password=te,t(0,f))}const R=()=>b(),X=()=>h(),se=()=>a==null?void 0:a.show(),W=()=>h();function G(te){ie[te?"unshift":"push"](()=>{a=te,t(1,a)})}return n.$$.update=()=>{n.$$.dirty[0]&1024&&t(11,i=JSON.stringify(u)),n.$$.dirty[0]&2049&&t(4,s=i!=JSON.stringify(f))},[f,a,c,d,s,l,o,r,h,b,u,i,k,y,T,$,M,C,D,E,P,L,N,F,R,X,se,W,G]}class yE extends ye{constructor(e){super(),ve(this,e,vE,bE,he,{},null,[-1,-1])}}function kE(n){var $,M;let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g;e=new me({props:{class:"form-field form-field-toggle",$$slots:{default:[SE,({uniqueId:C})=>({25:C}),({uniqueId:C})=>C?33554432:0]},$$scope:{ctx:n}}});let b=(($=n[0].s3)==null?void 0:$.enabled)!=n[1].s3.enabled&&ih(n),k=n[1].s3.enabled&&sh(n),y=((M=n[1].s3)==null?void 0:M.enabled)&&!n[6]&&!n[3]&&lh(n),T=n[6]&&oh(n);return{c(){H(e.$$.fragment),t=O(),b&&b.c(),i=O(),k&&k.c(),s=O(),l=v("div"),o=v("div"),r=O(),y&&y.c(),a=O(),T&&T.c(),u=O(),f=v("button"),c=v("span"),c.textContent="Save changes",p(o,"class","flex-fill"),p(c,"class","txt"),p(f,"type","submit"),p(f,"class","btn btn-expanded"),f.disabled=d=!n[6]||n[3],Q(f,"btn-loading",n[3]),p(l,"class","flex")},m(C,D){q(e,C,D),S(C,t,D),b&&b.m(C,D),S(C,i,D),k&&k.m(C,D),S(C,s,D),S(C,l,D),_(l,o),_(l,r),y&&y.m(l,null),_(l,a),T&&T.m(l,null),_(l,u),_(l,f),_(f,c),m=!0,h||(g=Y(f,"click",n[19]),h=!0)},p(C,D){var P,L;const E={};D&100663298&&(E.$$scope={dirty:D,ctx:C}),e.$set(E),((P=C[0].s3)==null?void 0:P.enabled)!=C[1].s3.enabled?b?(b.p(C,D),D&3&&A(b,1)):(b=ih(C),b.c(),A(b,1),b.m(i.parentNode,i)):b&&(ae(),I(b,1,1,()=>{b=null}),ue()),C[1].s3.enabled?k?(k.p(C,D),D&2&&A(k,1)):(k=sh(C),k.c(),A(k,1),k.m(s.parentNode,s)):k&&(ae(),I(k,1,1,()=>{k=null}),ue()),(L=C[1].s3)!=null&&L.enabled&&!C[6]&&!C[3]?y?y.p(C,D):(y=lh(C),y.c(),y.m(l,a)):y&&(y.d(1),y=null),C[6]?T?T.p(C,D):(T=oh(C),T.c(),T.m(l,u)):T&&(T.d(1),T=null),(!m||D&72&&d!==(d=!C[6]||C[3]))&&(f.disabled=d),(!m||D&8)&&Q(f,"btn-loading",C[3])},i(C){m||(A(e.$$.fragment,C),A(b),A(k),m=!0)},o(C){I(e.$$.fragment,C),I(b),I(k),m=!1},d(C){j(e,C),C&&w(t),b&&b.d(C),C&&w(i),k&&k.d(C),C&&w(s),C&&w(l),y&&y.d(),T&&T.d(),h=!1,g()}}}function wE(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:Z,i:Z,o:Z,d(t){t&&w(e)}}}function SE(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Use S3 storage"),p(e,"type","checkbox"),p(e,"id",t=n[25]),e.required=!0,p(s,"for",o=n[25])},m(u,f){S(u,e,f),e.checked=n[1].s3.enabled,S(u,i,f),S(u,s,f),_(s,l),r||(a=Y(e,"change",n[11]),r=!0)},p(u,f){f&33554432&&t!==(t=u[25])&&p(e,"id",t),f&2&&(e.checked=u[1].s3.enabled),f&33554432&&o!==(o=u[25])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function ih(n){var P;let e,t,i,s,l,o,r,a=(P=n[0].s3)!=null&&P.enabled?"S3 storage":"local file system",u,f,c,d=n[1].s3.enabled?"S3 storage":"local file system",m,h,g,b,k,y,T,$,M,C,D,E;return{c(){e=v("div"),t=v("div"),i=v("div"),i.innerHTML='',s=O(),l=v("div"),o=B(`If you have existing uploaded files, you'll have to migrate them manually from + the + `),r=v("strong"),u=B(a),f=B(` + to the + `),c=v("strong"),m=B(d),h=B(`. + `),g=v("br"),b=B(` + There are numerous command line tools that can help you, such as: + `),k=v("a"),k.textContent=`rclone + `,y=B(`, + `),T=v("a"),T.textContent=`s5cmd + `,$=B(", etc."),M=O(),C=v("div"),p(i,"class","icon"),p(k,"href","https://github.com/rclone/rclone"),p(k,"target","_blank"),p(k,"rel","noopener noreferrer"),p(k,"class","txt-bold"),p(T,"href","https://github.com/peak/s5cmd"),p(T,"target","_blank"),p(T,"rel","noopener noreferrer"),p(T,"class","txt-bold"),p(l,"class","content"),p(t,"class","alert alert-warning m-0"),p(C,"class","clearfix m-t-base")},m(L,N){S(L,e,N),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),_(l,r),_(r,u),_(l,f),_(l,c),_(c,m),_(l,h),_(l,g),_(l,b),_(l,k),_(l,y),_(l,T),_(l,$),_(e,M),_(e,C),E=!0},p(L,N){var F;(!E||N&1)&&a!==(a=(F=L[0].s3)!=null&&F.enabled?"S3 storage":"local file system")&&le(u,a),(!E||N&2)&&d!==(d=L[1].s3.enabled?"S3 storage":"local file system")&&le(m,d)},i(L){E||(L&&xe(()=>{D||(D=je(e,At,{duration:150},!0)),D.run(1)}),E=!0)},o(L){L&&(D||(D=je(e,At,{duration:150},!1)),D.run(0)),E=!1},d(L){L&&w(e),L&&D&&D.end()}}}function sh(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,k,y,T,$,M,C;return i=new me({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[TE,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),o=new me({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[$E,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),u=new me({props:{class:"form-field required",name:"s3.region",$$slots:{default:[CE,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),d=new me({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[ME,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),g=new me({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[DE,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),y=new me({props:{class:"form-field",name:"s3.forcePathStyle",$$slots:{default:[OE,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=O(),l=v("div"),H(o.$$.fragment),r=O(),a=v("div"),H(u.$$.fragment),f=O(),c=v("div"),H(d.$$.fragment),m=O(),h=v("div"),H(g.$$.fragment),b=O(),k=v("div"),H(y.$$.fragment),T=O(),$=v("div"),p(t,"class","col-lg-6"),p(l,"class","col-lg-3"),p(a,"class","col-lg-3"),p(c,"class","col-lg-6"),p(h,"class","col-lg-6"),p(k,"class","col-lg-12"),p($,"class","col-lg-12"),p(e,"class","grid")},m(D,E){S(D,e,E),_(e,t),q(i,t,null),_(e,s),_(e,l),q(o,l,null),_(e,r),_(e,a),q(u,a,null),_(e,f),_(e,c),q(d,c,null),_(e,m),_(e,h),q(g,h,null),_(e,b),_(e,k),q(y,k,null),_(e,T),_(e,$),C=!0},p(D,E){const P={};E&100663298&&(P.$$scope={dirty:E,ctx:D}),i.$set(P);const L={};E&100663298&&(L.$$scope={dirty:E,ctx:D}),o.$set(L);const N={};E&100663298&&(N.$$scope={dirty:E,ctx:D}),u.$set(N);const F={};E&100663298&&(F.$$scope={dirty:E,ctx:D}),d.$set(F);const R={};E&100663298&&(R.$$scope={dirty:E,ctx:D}),g.$set(R);const X={};E&100663298&&(X.$$scope={dirty:E,ctx:D}),y.$set(X)},i(D){C||(A(i.$$.fragment,D),A(o.$$.fragment,D),A(u.$$.fragment,D),A(d.$$.fragment,D),A(g.$$.fragment,D),A(y.$$.fragment,D),D&&xe(()=>{M||(M=je(e,At,{duration:150},!0)),M.run(1)}),C=!0)},o(D){I(i.$$.fragment,D),I(o.$$.fragment,D),I(u.$$.fragment,D),I(d.$$.fragment,D),I(g.$$.fragment,D),I(y.$$.fragment,D),D&&(M||(M=je(e,At,{duration:150},!1)),M.run(0)),C=!1},d(D){D&&w(e),j(i),j(o),j(u),j(d),j(g),j(y),D&&M&&M.end()}}}function TE(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Endpoint"),s=O(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[1].s3.endpoint),r||(a=Y(l,"input",n[12]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.endpoint&&ce(l,u[1].s3.endpoint)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function $E(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Bucket"),s=O(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[1].s3.bucket),r||(a=Y(l,"input",n[13]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.bucket&&ce(l,u[1].s3.bucket)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function CE(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Region"),s=O(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[1].s3.region),r||(a=Y(l,"input",n[14]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.region&&ce(l,u[1].s3.region)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function ME(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Access key"),s=O(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[1].s3.accessKey),r||(a=Y(l,"input",n[15]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.accessKey&&ce(l,u[1].s3.accessKey)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function DE(n){let e,t,i,s,l,o,r;function a(f){n[16](f)}let u={id:n[25],required:!0};return n[1].s3.secret!==void 0&&(u.value=n[1].s3.secret),l=new su({props:u}),ie.push(()=>ge(l,"value",a)),{c(){e=v("label"),t=B("Secret"),s=O(),H(l.$$.fragment),p(e,"for",i=n[25])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),q(l,f,c),r=!0},p(f,c){(!r||c&33554432&&i!==(i=f[25]))&&p(e,"for",i);const d={};c&33554432&&(d.id=f[25]),!o&&c&2&&(o=!0,d.value=f[1].s3.secret,ke(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),j(l,f)}}}function OE(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Force path-style addressing",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[25]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[25])},m(c,d){S(c,e,d),e.checked=n[1].s3.forcePathStyle,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[Y(e,"change",n[17]),Ie(Be.call(null,r,{text:'Forces the request to use path-style addressing, eg. "https://s3.amazonaws.com/BUCKET/KEY" instead of the default "https://BUCKET.s3.amazonaws.com/KEY".',position:"top"}))],u=!0)},p(c,d){d&33554432&&t!==(t=c[25])&&p(e,"id",t),d&2&&(e.checked=c[1].s3.forcePathStyle),d&33554432&&a!==(a=c[25])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function lh(n){let e;function t(l,o){return l[4]?IE:l[5]?AE:EE}let i=t(n),s=i(n);return{c(){s.c(),e=Me()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function EE(n){let e;return{c(){e=v("div"),e.innerHTML=` + S3 connected successfully`,p(e,"class","label label-sm label-success entrance-right")},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function AE(n){let e,t,i,s;return{c(){e=v("div"),e.innerHTML=` + Failed to establish S3 connection`,p(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;S(l,e,o),i||(s=Ie(t=Be.call(null,e,(r=n[5].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&Bt(t.update)&&o&32&&t.update.call(null,(r=l[5].data)==null?void 0:r.message)},d(l){l&&w(e),i=!1,s()}}}function IE(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:Z,d(t){t&&w(e)}}}function oh(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3]},m(l,o){S(l,e,o),_(e,t),i||(s=Y(e,"click",n[18]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&w(e),i=!1,s()}}}function PE(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b;const k=[wE,kE],y=[];function T($,M){return $[2]?0:1}return d=T(n),m=y[d]=k[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=B(n[7]),r=O(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML=`

    By default PocketBase uses the local file system to store uploaded files.

    +

    If you have limited disk space, you could optionally connect to a S3 compatible storage.

    `,c=O(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m($,M){S($,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S($,r,M),S($,a,M),_(a,u),_(u,f),_(u,c),y[d].m(u,null),h=!0,g||(b=Y(u,"submit",dt(n[20])),g=!0)},p($,M){(!h||M&128)&&le(o,$[7]);let C=d;d=T($),d===C?y[d].p($,M):(ae(),I(y[C],1,1,()=>{y[C]=null}),ue(),m=y[d],m?m.p($,M):(m=y[d]=k[d]($),m.c()),A(m,1),m.m(u,null))},i($){h||(A(m),h=!0)},o($){I(m),h=!1},d($){$&&w(e),$&&w(r),$&&w(a),y[d].d(),g=!1,b()}}}function LE(n){let e,t,i,s;return e=new Ii({}),i=new wn({props:{$$slots:{default:[PE]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=O(),H(i.$$.fragment)},m(l,o){q(e,l,o),S(l,t,o),q(i,l,o),s=!0},p(l,[o]){const r={};o&67109119&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){j(e,l),l&&w(t),j(i,l)}}}const lo="s3_test_request";function NE(n,e,t){let i,s,l;Ye(n,St,F=>t(7,l=F)),Kt(St,l="Files storage",l);let o={},r={},a=!1,u=!1,f=!1,c=null,d=null;m();async function m(){t(2,a=!0);try{const F=await pe.settings.getAll()||{};g(F)}catch(F){pe.errorResponseHandler(F)}t(2,a=!1)}async function h(){if(!(u||!s)){t(3,u=!0);try{pe.cancelRequest(lo);const F=await pe.settings.update(z.filterRedactedProps(r));Bn({}),await g(F),$a(),c?Cv("Successfully saved but failed to establish S3 connection."):zt("Successfully saved files storage settings.")}catch(F){pe.errorResponseHandler(F)}t(3,u=!1)}}async function g(F={}){t(1,r={s3:(F==null?void 0:F.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r))),await k()}async function b(){t(1,r=JSON.parse(JSON.stringify(o||{}))),await k()}async function k(){if(t(5,c=null),!!r.s3.enabled){pe.cancelRequest(lo),clearTimeout(d),d=setTimeout(()=>{pe.cancelRequest(lo),addErrorToast("S3 test connection timeout.")},3e4),t(4,f=!0);try{await pe.settings.testS3({$cancelKey:lo})}catch(F){t(5,c=F)}t(4,f=!1),clearTimeout(d)}}Zt(()=>()=>{clearTimeout(d)});function y(){r.s3.enabled=this.checked,t(1,r)}function T(){r.s3.endpoint=this.value,t(1,r)}function $(){r.s3.bucket=this.value,t(1,r)}function M(){r.s3.region=this.value,t(1,r)}function C(){r.s3.accessKey=this.value,t(1,r)}function D(F){n.$$.not_equal(r.s3.secret,F)&&(r.s3.secret=F,t(1,r))}function E(){r.s3.forcePathStyle=this.checked,t(1,r)}const P=()=>b(),L=()=>h(),N=()=>h();return n.$$.update=()=>{n.$$.dirty&1&&t(10,i=JSON.stringify(o)),n.$$.dirty&1026&&t(6,s=i!=JSON.stringify(r))},[o,r,a,u,f,c,s,l,h,b,i,y,T,$,M,C,D,E,P,L,N]}class FE extends ye{constructor(e){super(),ve(this,e,NE,LE,he,{})}}function RE(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[20]),p(s,"for",o=n[20])},m(u,f){S(u,e,f),e.checked=n[0].enabled,S(u,i,f),S(u,s,f),_(s,l),r||(a=Y(e,"change",n[12]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&1048576&&o!==(o=u[20])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function qE(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Client ID"),s=O(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].clientId),r||(a=Y(l,"input",n[13]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].clientId&&ce(l,u[0].clientId)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function jE(n){let e,t,i,s,l,o,r;function a(f){n[14](f)}let u={id:n[20],required:!0};return n[0].clientSecret!==void 0&&(u.value=n[0].clientSecret),l=new su({props:u}),ie.push(()=>ge(l,"value",a)),{c(){e=v("label"),t=B("Client Secret"),s=O(),H(l.$$.fragment),p(e,"for",i=n[20])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),q(l,f,c),r=!0},p(f,c){(!r||c&1048576&&i!==(i=f[20]))&&p(e,"for",i);const d={};c&1048576&&(d.id=f[20]),!o&&c&1&&(o=!0,d.value=f[0].clientSecret,ke(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),j(l,f)}}}function rh(n){let e,t,i,s;function l(a){n[15](a)}var o=n[4];function r(a){let u={key:a[1]};return a[0]!==void 0&&(u.config=a[0]),{props:u}}return o&&(t=jt(o,r(n)),ie.push(()=>ge(t,"config",l))),{c(){e=v("div"),t&&H(t.$$.fragment),p(e,"class","col-lg-12")},m(a,u){S(a,e,u),t&&q(t,e,null),s=!0},p(a,u){const f={};if(u&2&&(f.key=a[1]),!i&&u&1&&(i=!0,f.config=a[0],ke(()=>i=!1)),o!==(o=a[4])){if(t){ae();const c=t;I(c.$$.fragment,1,0,()=>{j(c,1)}),ue()}o?(t=jt(o,r(a)),ie.push(()=>ge(t,"config",l)),H(t.$$.fragment),A(t.$$.fragment,1),q(t,e,null)):t=null}else o&&t.$set(f)},i(a){s||(t&&A(t.$$.fragment,a),s=!0)},o(a){t&&I(t.$$.fragment,a),s=!1},d(a){a&&w(e),t&&j(t)}}}function HE(n){let e,t,i,s,l,o,r,a,u,f,c,d;e=new me({props:{class:"form-field form-field-toggle m-b-0",name:n[1]+".enabled",$$slots:{default:[RE,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}}),r=new me({props:{class:"form-field required",name:n[1]+".clientId",$$slots:{default:[qE,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}}),f=new me({props:{class:"form-field required",name:n[1]+".clientSecret",$$slots:{default:[jE,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}});let m=n[4]&&rh(n);return{c(){H(e.$$.fragment),t=O(),i=v("div"),s=v("div"),l=O(),o=v("div"),H(r.$$.fragment),a=O(),u=v("div"),H(f.$$.fragment),c=O(),m&&m.c(),p(s,"class","col-12 spacing"),p(o,"class","col-lg-6"),p(u,"class","col-lg-6"),p(i,"class","grid")},m(h,g){q(e,h,g),S(h,t,g),S(h,i,g),_(i,s),_(i,l),_(i,o),q(r,o,null),_(i,a),_(i,u),q(f,u,null),_(i,c),m&&m.m(i,null),d=!0},p(h,g){const b={};g&2&&(b.name=h[1]+".enabled"),g&3145729&&(b.$$scope={dirty:g,ctx:h}),e.$set(b);const k={};g&2&&(k.name=h[1]+".clientId"),g&3145729&&(k.$$scope={dirty:g,ctx:h}),r.$set(k);const y={};g&2&&(y.name=h[1]+".clientSecret"),g&3145729&&(y.$$scope={dirty:g,ctx:h}),f.$set(y),h[4]?m?(m.p(h,g),g&16&&A(m,1)):(m=rh(h),m.c(),A(m,1),m.m(i,null)):m&&(ae(),I(m,1,1,()=>{m=null}),ue())},i(h){d||(A(e.$$.fragment,h),A(r.$$.fragment,h),A(f.$$.fragment,h),A(m),d=!0)},o(h){I(e.$$.fragment,h),I(r.$$.fragment,h),I(f.$$.fragment,h),I(m),d=!1},d(h){j(e,h),h&&w(t),h&&w(i),j(r),j(f),m&&m.d()}}}function ah(n){let e;return{c(){e=v("i"),p(e,"class",n[3])},m(t,i){S(t,e,i)},p(t,i){i&8&&p(e,"class",t[3])},d(t){t&&w(e)}}}function uh(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ie(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&xe(()=>{t||(t=je(e,It,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=je(e,It,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function VE(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label label-hint")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function zE(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function BE(n){let e,t,i,s,l,o,r,a,u,f=n[3]&&ah(n),c=n[6]&&uh();function d(g,b){return g[0].enabled?zE:VE}let m=d(n),h=m(n);return{c(){e=v("div"),f&&f.c(),t=O(),i=v("span"),s=B(n[2]),l=O(),o=v("div"),r=O(),c&&c.c(),a=O(),h.c(),u=Me(),p(i,"class","txt"),p(e,"class","inline-flex"),p(o,"class","flex-fill")},m(g,b){S(g,e,b),f&&f.m(e,null),_(e,t),_(e,i),_(i,s),S(g,l,b),S(g,o,b),S(g,r,b),c&&c.m(g,b),S(g,a,b),h.m(g,b),S(g,u,b)},p(g,b){g[3]?f?f.p(g,b):(f=ah(g),f.c(),f.m(e,t)):f&&(f.d(1),f=null),b&4&&le(s,g[2]),g[6]?c?b&64&&A(c,1):(c=uh(),c.c(),A(c,1),c.m(a.parentNode,a)):c&&(ae(),I(c,1,1,()=>{c=null}),ue()),m!==(m=d(g))&&(h.d(1),h=m(g),h&&(h.c(),h.m(u.parentNode,u)))},d(g){g&&w(e),f&&f.d(),g&&w(l),g&&w(o),g&&w(r),c&&c.d(g),g&&w(a),h.d(g),g&&w(u)}}}function UE(n){let e,t;const i=[n[7]];let s={$$slots:{header:[BE],default:[HE]},$$scope:{ctx:n}};for(let l=0;lt(11,o=E));let{key:r}=e,{title:a}=e,{icon:u=""}=e,{config:f={}}=e,{optionsComponent:c}=e,d;function m(){d==null||d.expand()}function h(){d==null||d.collapse()}function g(){d==null||d.collapseSiblings()}function b(){f.enabled=this.checked,t(0,f)}function k(){f.clientId=this.value,t(0,f)}function y(E){n.$$.not_equal(f.clientSecret,E)&&(f.clientSecret=E,t(0,f))}function T(E){f=E,t(0,f)}function $(E){ie[E?"unshift":"push"](()=>{d=E,t(5,d)})}function M(E){ze.call(this,n,E)}function C(E){ze.call(this,n,E)}function D(E){ze.call(this,n,E)}return n.$$set=E=>{e=Je(Je({},e),Qn(E)),t(7,l=Et(e,s)),"key"in E&&t(1,r=E.key),"title"in E&&t(2,a=E.title),"icon"in E&&t(3,u=E.icon),"config"in E&&t(0,f=E.config),"optionsComponent"in E&&t(4,c=E.optionsComponent)},n.$$.update=()=>{n.$$.dirty&2050&&t(6,i=!z.isEmpty(z.getNestedVal(o,r))),n.$$.dirty&3&&(f.enabled||Qi(r))},[f,r,a,u,c,d,i,l,m,h,g,o,b,k,y,T,$,M,C,D]}class YE extends ye{constructor(e){super(),ve(this,e,WE,UE,he,{key:1,title:2,icon:3,config:0,optionsComponent:4,expand:8,collapse:9,collapseSiblings:10})}get expand(){return this.$$.ctx[8]}get collapse(){return this.$$.ctx[9]}get collapseSiblings(){return this.$$.ctx[10]}}function fh(n,e,t){const i=n.slice();return i[15]=e[t][0],i[16]=e[t][1],i[17]=e,i[18]=t,i}function KE(n){let e,t,i,s,l,o,r,a,u,f,c=Object.entries(vl),d=[];for(let g=0;gI(d[g],1,1,()=>{d[g]=null});let h=n[4]&&dh(n);return{c(){e=v("div");for(let g=0;gn[10](e,t),o=()=>n[10](null,t);function r(u){n[11](u,n[15])}let a={single:!0,key:n[15],title:n[16].title,icon:n[16].icon||"ri-fingerprint-line",optionsComponent:n[16].optionsComponent};return n[0][n[15]]!==void 0&&(a.config=n[0][n[15]]),e=new YE({props:a}),l(),ie.push(()=>ge(e,"config",r)),{c(){H(e.$$.fragment)},m(u,f){q(e,u,f),s=!0},p(u,f){n=u,t!==n[15]&&(o(),t=n[15],l());const c={};!i&&f&1&&(i=!0,c.config=n[0][n[15]],ke(()=>i=!1)),e.$set(c)},i(u){s||(A(e.$$.fragment,u),s=!0)},o(u){I(e.$$.fragment,u),s=!1},d(u){o(),j(e,u)}}}function dh(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3]},m(l,o){S(l,e,o),_(e,t),i||(s=Y(e,"click",n[12]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&w(e),i=!1,s()}}}function ZE(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b;const k=[JE,KE],y=[];function T($,M){return $[2]?0:1}return d=T(n),m=y[d]=k[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=B(n[5]),r=O(),a=v("div"),u=v("form"),f=v("h6"),f.textContent="Manage the allowed users OAuth2 sign-in/sign-up methods.",c=O(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m($,M){S($,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S($,r,M),S($,a,M),_(a,u),_(u,f),_(u,c),y[d].m(u,null),h=!0,g||(b=Y(u,"submit",dt(n[6])),g=!0)},p($,M){(!h||M&32)&&le(o,$[5]);let C=d;d=T($),d===C?y[d].p($,M):(ae(),I(y[C],1,1,()=>{y[C]=null}),ue(),m=y[d],m?m.p($,M):(m=y[d]=k[d]($),m.c()),A(m,1),m.m(u,null))},i($){h||(A(m),h=!0)},o($){I(m),h=!1},d($){$&&w(e),$&&w(r),$&&w(a),y[d].d(),g=!1,b()}}}function GE(n){let e,t,i,s;return e=new Ii({}),i=new wn({props:{$$slots:{default:[ZE]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=O(),H(i.$$.fragment)},m(l,o){q(e,l,o),S(l,t,o),q(i,l,o),s=!0},p(l,[o]){const r={};o&524351&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){j(e,l),l&&w(t),j(i,l)}}}function XE(n,e,t){let i,s,l;Ye(n,St,y=>t(5,l=y)),Kt(St,l="Auth providers",l);let o={},r={},a={},u=!1,f=!1;c();async function c(){t(2,u=!0);try{const y=await pe.settings.getAll()||{};m(y)}catch(y){pe.errorResponseHandler(y)}t(2,u=!1)}async function d(){var y;if(!(f||!s)){t(3,f=!0);try{const T=await pe.settings.update(z.filterRedactedProps(a));m(T),Bn({}),(y=o[Object.keys(o)[0]])==null||y.collapseSiblings(),zt("Successfully updated auth providers.")}catch(T){pe.errorResponseHandler(T)}t(3,f=!1)}}function m(y){y=y||{},t(0,a={});for(const T in vl)t(0,a[T]=Object.assign({enabled:!1},y[T]),a);t(8,r=JSON.parse(JSON.stringify(a)))}function h(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function g(y,T){ie[y?"unshift":"push"](()=>{o[T]=y,t(1,o)})}function b(y,T){n.$$.not_equal(a[T],y)&&(a[T]=y,t(0,a))}const k=()=>h();return n.$$.update=()=>{n.$$.dirty&256&&t(9,i=JSON.stringify(r)),n.$$.dirty&513&&t(4,s=i!=JSON.stringify(a))},[a,o,u,f,s,l,d,h,r,i,g,b,k]}class QE extends ye{constructor(e){super(),ve(this,e,XE,GE,he,{})}}function ph(n,e,t){const i=n.slice();return i[16]=e[t],i[17]=e,i[18]=t,i}function xE(n){let e=[],t=new Map,i,s,l,o,r,a,u,f,c,d,m,h=n[5];const g=k=>k[16].key;for(let k=0;k({19:l}),({uniqueId:l})=>l?524288:0]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=Me(),H(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),q(i,l,o),s=!0},p(l,o){e=l;const r={};o&1572865&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){I(i.$$.fragment,l),s=!1},d(l){l&&w(t),j(i,l)}}}function hh(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),_(e,t),i||(s=Y(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function nA(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b;const k=[eA,xE],y=[];function T($,M){return $[1]?0:1}return d=T(n),m=y[d]=k[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=B(n[4]),r=O(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Adjust common token options.

    ",c=O(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content m-b-sm txt-xl"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m($,M){S($,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S($,r,M),S($,a,M),_(a,u),_(u,f),_(u,c),y[d].m(u,null),h=!0,g||(b=Y(u,"submit",dt(n[6])),g=!0)},p($,M){(!h||M&16)&&le(o,$[4]);let C=d;d=T($),d===C?y[d].p($,M):(ae(),I(y[C],1,1,()=>{y[C]=null}),ue(),m=y[d],m?m.p($,M):(m=y[d]=k[d]($),m.c()),A(m,1),m.m(u,null))},i($){h||(A(m),h=!0)},o($){I(m),h=!1},d($){$&&w(e),$&&w(r),$&&w(a),y[d].d(),g=!1,b()}}}function iA(n){let e,t,i,s;return e=new Ii({}),i=new wn({props:{$$slots:{default:[nA]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=O(),H(i.$$.fragment)},m(l,o){q(e,l,o),S(l,t,o),q(i,l,o),s=!0},p(l,[o]){const r={};o&1048607&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){j(e,l),l&&w(t),j(i,l)}}}function sA(n,e,t){let i,s,l;Ye(n,St,T=>t(4,l=T));const o=[{key:"recordAuthToken",label:"Auth record authentication token"},{key:"recordVerificationToken",label:"Auth record email verification token"},{key:"recordPasswordResetToken",label:"Auth record password reset token"},{key:"recordEmailChangeToken",label:"Auth record email change token"},{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"}];Kt(St,l="Token options",l);let r={},a={},u=!1,f=!1;c();async function c(){t(1,u=!0);try{const T=await pe.settings.getAll()||{};m(T)}catch(T){pe.errorResponseHandler(T)}t(1,u=!1)}async function d(){if(!(f||!s)){t(2,f=!0);try{const T=await pe.settings.update(z.filterRedactedProps(a));m(T),zt("Successfully saved tokens options.")}catch(T){pe.errorResponseHandler(T)}t(2,f=!1)}}function m(T){var $;T=T||{},t(0,a={});for(const M of o)t(0,a[M.key]={duration:(($=T[M.key])==null?void 0:$.duration)||0},a);t(8,r=JSON.parse(JSON.stringify(a)))}function h(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function g(T){a[T.key].duration=ht(this.value),t(0,a)}const b=T=>{a[T.key].secret?(delete a[T.key].secret,t(0,a)):t(0,a[T.key].secret=z.randomString(50),a)},k=()=>h(),y=()=>d();return n.$$.update=()=>{n.$$.dirty&256&&t(9,i=JSON.stringify(r)),n.$$.dirty&513&&t(3,s=i!=JSON.stringify(a))},[a,u,f,s,l,o,d,h,r,i,g,b,k,y]}class lA extends ye{constructor(e){super(),ve(this,e,sA,iA,he,{})}}function oA(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h;return o=new wb({props:{content:n[2]}}),{c(){e=v("div"),e.innerHTML=`

    Below you'll find your current collections configuration that you could import in + another PocketBase environment.

    `,t=O(),i=v("div"),s=v("button"),s.innerHTML='Copy',l=O(),H(o.$$.fragment),r=O(),a=v("div"),u=v("div"),f=O(),c=v("button"),c.innerHTML=` + Download as JSON`,p(e,"class","content txt-xl m-b-base"),p(s,"type","button"),p(s,"class","btn btn-sm btn-transparent fade copy-schema svelte-jm5c4z"),p(i,"tabindex","0"),p(i,"class","export-preview svelte-jm5c4z"),p(u,"class","flex-fill"),p(c,"type","button"),p(c,"class","btn btn-expanded"),p(a,"class","flex m-t-base")},m(g,b){S(g,e,b),S(g,t,b),S(g,i,b),_(i,s),_(i,l),q(o,i,null),n[8](i),S(g,r,b),S(g,a,b),_(a,u),_(a,f),_(a,c),d=!0,m||(h=[Y(s,"click",n[7]),Y(i,"keydown",n[9]),Y(c,"click",n[10])],m=!0)},p(g,b){const k={};b&4&&(k.content=g[2]),o.$set(k)},i(g){d||(A(o.$$.fragment,g),d=!0)},o(g){I(o.$$.fragment,g),d=!1},d(g){g&&w(e),g&&w(t),g&&w(i),j(o),n[8](null),g&&w(r),g&&w(a),m=!1,Pe(h)}}}function rA(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:Z,i:Z,o:Z,d(t){t&&w(e)}}}function aA(n){let e,t,i,s,l,o,r,a,u,f,c,d;const m=[rA,oA],h=[];function g(b,k){return b[1]?0:1}return f=g(n),c=h[f]=m[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=B(n[3]),r=O(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(b,k){S(b,e,k),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(b,r,k),S(b,a,k),_(a,u),h[f].m(u,null),d=!0},p(b,k){(!d||k&8)&&le(o,b[3]);let y=f;f=g(b),f===y?h[f].p(b,k):(ae(),I(h[y],1,1,()=>{h[y]=null}),ue(),c=h[f],c?c.p(b,k):(c=h[f]=m[f](b),c.c()),A(c,1),c.m(u,null))},i(b){d||(A(c),d=!0)},o(b){I(c),d=!1},d(b){b&&w(e),b&&w(r),b&&w(a),h[f].d()}}}function uA(n){let e,t,i,s;return e=new Ii({}),i=new wn({props:{$$slots:{default:[aA]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=O(),H(i.$$.fragment)},m(l,o){q(e,l,o),S(l,t,o),q(i,l,o),s=!0},p(l,[o]){const r={};o&8207&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){j(e,l),l&&w(t),j(i,l)}}}function fA(n,e,t){let i,s;Ye(n,St,b=>t(3,s=b)),Kt(St,s="Export collections",s);const l="export_"+z.randomString(5);let o,r=[],a=!1;u();async function u(){t(1,a=!0);try{t(6,r=await pe.collections.getFullList(100,{$cancelKey:l}));for(let b of r)delete b.created,delete b.updated}catch(b){pe.errorResponseHandler(b)}t(1,a=!1)}function f(){z.downloadJson(r,"pb_schema")}function c(){z.copyToClipboard(i),k_("The configuration was copied to your clipboard!",3e3)}const d=()=>c();function m(b){ie[b?"unshift":"push"](()=>{o=b,t(0,o)})}const h=b=>{if(b.ctrlKey&&b.code==="KeyA"){b.preventDefault();const k=window.getSelection(),y=document.createRange();y.selectNodeContents(o),k.removeAllRanges(),k.addRange(y)}},g=()=>f();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,4))},[o,a,i,s,f,c,r,d,m,h,g]}class cA extends ye{constructor(e){super(),ve(this,e,fA,uA,he,{})}}function gh(n,e,t){const i=n.slice();return i[14]=e[t],i}function _h(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function bh(n,e,t){const i=n.slice();return i[14]=e[t],i}function vh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[23]=e[t][1],i}function yh(n,e,t){const i=n.slice();return i[14]=e[t],i}function kh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function wh(n,e,t){const i=n.slice();return i[30]=e[t],i}function dA(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&Sh(),a=n[0].name!==n[1].name&&Th(n);return{c(){e=v("div"),r&&r.c(),t=O(),a&&a.c(),i=O(),s=v("strong"),o=B(l),p(s,"class","txt"),p(e,"class","inline-flex fleg-gap-5")},m(u,f){S(u,e,f),r&&r.m(e,null),_(e,t),a&&a.m(e,null),_(e,i),_(e,s),_(s,o)},p(u,f){u[9]?r||(r=Sh(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),u[0].name!==u[1].name?a?a.p(u,f):(a=Th(u),a.c(),a.m(e,i)):a&&(a.d(1),a=null),f[0]&2&&l!==(l=u[1].name+"")&&le(o,l)},d(u){u&&w(e),r&&r.d(),a&&a.d()}}}function pA(n){var o;let e,t,i,s=((o=n[0])==null?void 0:o.name)+"",l;return{c(){e=v("span"),e.textContent="Deleted",t=O(),i=v("strong"),l=B(s),p(e,"class","label label-danger")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),_(i,l)},p(r,a){var u;a[0]&1&&s!==(s=((u=r[0])==null?void 0:u.name)+"")&&le(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function mA(n){var o;let e,t,i,s=((o=n[1])==null?void 0:o.name)+"",l;return{c(){e=v("span"),e.textContent="Added",t=O(),i=v("strong"),l=B(s),p(e,"class","label label-success")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),_(i,l)},p(r,a){var u;a[0]&2&&s!==(s=((u=r[1])==null?void 0:u.name)+"")&&le(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function Sh(n){let e;return{c(){e=v("span"),e.textContent="Changed",p(e,"class","label label-warning")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Th(n){let e,t=n[0].name+"",i,s,l;return{c(){e=v("strong"),i=B(t),s=O(),l=v("i"),p(e,"class","txt-strikethrough txt-hint"),p(l,"class","ri-arrow-right-line txt-sm")},m(o,r){S(o,e,r),_(e,i),S(o,s,r),S(o,l,r)},p(o,r){r[0]&1&&t!==(t=o[0].name+"")&&le(i,t)},d(o){o&&w(e),o&&w(s),o&&w(l)}}}function $h(n){var b,k;let e,t,i,s=n[30]+"",l,o,r,a,u=n[12]((b=n[0])==null?void 0:b[n[30]])+"",f,c,d,m,h=n[12]((k=n[1])==null?void 0:k[n[30]])+"",g;return{c(){var y,T,$,M,C,D;e=v("tr"),t=v("td"),i=v("span"),l=B(s),o=O(),r=v("td"),a=v("pre"),f=B(u),c=O(),d=v("td"),m=v("pre"),g=B(h),p(t,"class","min-width svelte-lmkr38"),p(a,"class","txt"),p(r,"class","svelte-lmkr38"),Q(r,"changed-old-col",!n[10]&&un((y=n[0])==null?void 0:y[n[30]],(T=n[1])==null?void 0:T[n[30]])),Q(r,"changed-none-col",n[10]),p(m,"class","txt"),p(d,"class","svelte-lmkr38"),Q(d,"changed-new-col",!n[5]&&un(($=n[0])==null?void 0:$[n[30]],(M=n[1])==null?void 0:M[n[30]])),Q(d,"changed-none-col",n[5]),p(e,"class","svelte-lmkr38"),Q(e,"txt-primary",un((C=n[0])==null?void 0:C[n[30]],(D=n[1])==null?void 0:D[n[30]]))},m(y,T){S(y,e,T),_(e,t),_(t,i),_(i,l),_(e,o),_(e,r),_(r,a),_(a,f),_(e,c),_(e,d),_(d,m),_(m,g)},p(y,T){var $,M,C,D,E,P,L,N;T[0]&1&&u!==(u=y[12](($=y[0])==null?void 0:$[y[30]])+"")&&le(f,u),T[0]&3075&&Q(r,"changed-old-col",!y[10]&&un((M=y[0])==null?void 0:M[y[30]],(C=y[1])==null?void 0:C[y[30]])),T[0]&1024&&Q(r,"changed-none-col",y[10]),T[0]&2&&h!==(h=y[12]((D=y[1])==null?void 0:D[y[30]])+"")&&le(g,h),T[0]&2083&&Q(d,"changed-new-col",!y[5]&&un((E=y[0])==null?void 0:E[y[30]],(P=y[1])==null?void 0:P[y[30]])),T[0]&32&&Q(d,"changed-none-col",y[5]),T[0]&2051&&Q(e,"txt-primary",un((L=y[0])==null?void 0:L[y[30]],(N=y[1])==null?void 0:N[y[30]]))},d(y){y&&w(e)}}}function Ch(n){let e,t=n[6],i=[];for(let s=0;sProps + Old + New`,l=O(),o=v("tbody");for(let $=0;$!["schema","created","updated"].includes(k));function g(){t(4,f=Array.isArray(r==null?void 0:r.schema)?r==null?void 0:r.schema.concat():[]),a||t(4,f=f.concat(u.filter(k=>!f.find(y=>k.id==y.id))))}function b(k){return typeof k>"u"?"":z.isObject(k)?JSON.stringify(k,null,4):k}return n.$$set=k=>{"collectionA"in k&&t(0,o=k.collectionA),"collectionB"in k&&t(1,r=k.collectionB),"deleteMissing"in k&&t(2,a=k.deleteMissing)},n.$$.update=()=>{n.$$.dirty[0]&2&&t(5,i=!(r!=null&&r.id)&&!(r!=null&&r.name)),n.$$.dirty[0]&33&&t(10,s=!i&&!(o!=null&&o.id)),n.$$.dirty[0]&1&&t(3,u=Array.isArray(o==null?void 0:o.schema)?o==null?void 0:o.schema.concat():[]),n.$$.dirty[0]&7&&(typeof(o==null?void 0:o.schema)<"u"||typeof(r==null?void 0:r.schema)<"u"||typeof a<"u")&&g(),n.$$.dirty[0]&24&&t(6,c=u.filter(k=>!f.find(y=>k.id==y.id))),n.$$.dirty[0]&24&&t(7,d=f.filter(k=>u.find(y=>y.id==k.id))),n.$$.dirty[0]&24&&t(8,m=f.filter(k=>!u.find(y=>y.id==k.id))),n.$$.dirty[0]&7&&t(9,l=z.hasCollectionChanges(o,r,a))},[o,r,a,u,f,i,c,d,m,l,s,h,b]}class _A extends ye{constructor(e){super(),ve(this,e,gA,hA,he,{collectionA:0,collectionB:1,deleteMissing:2},null,[-1,-1])}}function Lh(n,e,t){const i=n.slice();return i[17]=e[t],i}function Nh(n){let e,t;return e=new _A({props:{collectionA:n[17].old,collectionB:n[17].new,deleteMissing:n[3]}}),{c(){H(e.$$.fragment)},m(i,s){q(e,i,s),t=!0},p(i,s){const l={};s&4&&(l.collectionA=i[17].old),s&4&&(l.collectionB=i[17].new),s&8&&(l.deleteMissing=i[3]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function bA(n){let e,t,i=n[2],s=[];for(let o=0;oI(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o{h()}):h()}async function h(){if(!u){t(4,u=!0);try{await pe.collections.import(o,a),zt("Successfully imported collections configuration."),i("submit")}catch($){pe.errorResponseHandler($)}t(4,u=!1),c()}}const g=()=>m(),b=()=>!u;function k($){ie[$?"unshift":"push"](()=>{s=$,t(1,s)})}function y($){ze.call(this,n,$)}function T($){ze.call(this,n,$)}return n.$$.update=()=>{n.$$.dirty&384&&Array.isArray(l)&&Array.isArray(o)&&d()},[c,s,r,a,u,m,f,l,o,g,b,k,y,T]}class SA extends ye{constructor(e){super(),ve(this,e,wA,kA,he,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function Fh(n,e,t){const i=n.slice();return i[32]=e[t],i}function Rh(n,e,t){const i=n.slice();return i[35]=e[t],i}function qh(n,e,t){const i=n.slice();return i[32]=e[t],i}function TA(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,k,y,T,$,M,C,D;a=new me({props:{class:"form-field "+(n[6]?"":"field-error"),name:"collections",$$slots:{default:[CA,({uniqueId:R})=>({40:R}),({uniqueId:R})=>[0,R?512:0]]},$$scope:{ctx:n}}});let E=!1,P=n[6]&&n[1].length&&!n[7]&&Hh(),L=n[6]&&n[1].length&&n[7]&&Vh(n),N=n[13].length&&Qh(n),F=!!n[0]&&xh(n);return{c(){e=v("input"),t=O(),i=v("div"),s=v("p"),l=B(`Paste below the collections configuration you want to import or + `),o=v("button"),o.innerHTML='Load from JSON file',r=O(),H(a.$$.fragment),u=O(),f=O(),P&&P.c(),c=O(),L&&L.c(),d=O(),N&&N.c(),m=O(),h=v("div"),F&&F.c(),g=O(),b=v("div"),k=O(),y=v("button"),T=v("span"),T.textContent="Review",p(e,"type","file"),p(e,"class","hidden"),p(e,"accept",".json"),p(o,"class","btn btn-outline btn-sm m-l-5"),Q(o,"btn-loading",n[12]),p(i,"class","content txt-xl m-b-base"),p(b,"class","flex-fill"),p(T,"class","txt"),p(y,"type","button"),p(y,"class","btn btn-expanded btn-warning m-l-auto"),y.disabled=$=!n[14],p(h,"class","flex m-t-base")},m(R,X){S(R,e,X),n[19](e),S(R,t,X),S(R,i,X),_(i,s),_(s,l),_(s,o),S(R,r,X),q(a,R,X),S(R,u,X),S(R,f,X),P&&P.m(R,X),S(R,c,X),L&&L.m(R,X),S(R,d,X),N&&N.m(R,X),S(R,m,X),S(R,h,X),F&&F.m(h,null),_(h,g),_(h,b),_(h,k),_(h,y),_(y,T),M=!0,C||(D=[Y(e,"change",n[20]),Y(o,"click",n[21]),Y(y,"click",n[26])],C=!0)},p(R,X){(!M||X[0]&4096)&&Q(o,"btn-loading",R[12]);const se={};X[0]&64&&(se.class="form-field "+(R[6]?"":"field-error")),X[0]&65|X[1]&1536&&(se.$$scope={dirty:X,ctx:R}),a.$set(se),R[6]&&R[1].length&&!R[7]?P||(P=Hh(),P.c(),P.m(c.parentNode,c)):P&&(P.d(1),P=null),R[6]&&R[1].length&&R[7]?L?L.p(R,X):(L=Vh(R),L.c(),L.m(d.parentNode,d)):L&&(L.d(1),L=null),R[13].length?N?N.p(R,X):(N=Qh(R),N.c(),N.m(m.parentNode,m)):N&&(N.d(1),N=null),R[0]?F?F.p(R,X):(F=xh(R),F.c(),F.m(h,g)):F&&(F.d(1),F=null),(!M||X[0]&16384&&$!==($=!R[14]))&&(y.disabled=$)},i(R){M||(A(a.$$.fragment,R),A(E),M=!0)},o(R){I(a.$$.fragment,R),I(E),M=!1},d(R){R&&w(e),n[19](null),R&&w(t),R&&w(i),R&&w(r),j(a,R),R&&w(u),R&&w(f),P&&P.d(R),R&&w(c),L&&L.d(R),R&&w(d),N&&N.d(R),R&&w(m),R&&w(h),F&&F.d(),C=!1,Pe(D)}}}function $A(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:Z,i:Z,o:Z,d(t){t&&w(e)}}}function jh(n){let e;return{c(){e=v("div"),e.textContent="Invalid collections configuration.",p(e,"class","help-block help-block-error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function CA(n){let e,t,i,s,l,o,r,a,u,f,c=!!n[0]&&!n[6]&&jh();return{c(){e=v("label"),t=B("Collections"),s=O(),l=v("textarea"),r=O(),c&&c.c(),a=Me(),p(e,"for",i=n[40]),p(e,"class","p-b-10"),p(l,"id",o=n[40]),p(l,"class","code"),p(l,"spellcheck","false"),p(l,"rows","15"),l.required=!0},m(d,m){S(d,e,m),_(e,t),S(d,s,m),S(d,l,m),ce(l,n[0]),S(d,r,m),c&&c.m(d,m),S(d,a,m),u||(f=Y(l,"input",n[22]),u=!0)},p(d,m){m[1]&512&&i!==(i=d[40])&&p(e,"for",i),m[1]&512&&o!==(o=d[40])&&p(l,"id",o),m[0]&1&&ce(l,d[0]),d[0]&&!d[6]?c||(c=jh(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),c&&c.d(d),d&&w(a),u=!1,f()}}}function Hh(n){let e;return{c(){e=v("div"),e.innerHTML=`
    +
    Your collections configuration is already up-to-date!
    `,p(e,"class","alert alert-info")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Vh(n){let e,t,i,s,l,o=n[9].length&&zh(n),r=n[4].length&&Wh(n),a=n[8].length&&Zh(n);return{c(){e=v("h5"),e.textContent="Detected changes",t=O(),i=v("div"),o&&o.c(),s=O(),r&&r.c(),l=O(),a&&a.c(),p(e,"class","section-title"),p(i,"class","list")},m(u,f){S(u,e,f),S(u,t,f),S(u,i,f),o&&o.m(i,null),_(i,s),r&&r.m(i,null),_(i,l),a&&a.m(i,null)},p(u,f){u[9].length?o?o.p(u,f):(o=zh(u),o.c(),o.m(i,s)):o&&(o.d(1),o=null),u[4].length?r?r.p(u,f):(r=Wh(u),r.c(),r.m(i,l)):r&&(r.d(1),r=null),u[8].length?a?a.p(u,f):(a=Zh(u),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},d(u){u&&w(e),u&&w(t),u&&w(i),o&&o.d(),r&&r.d(),a&&a.d()}}}function zh(n){let e=[],t=new Map,i,s=n[9];const l=o=>o[32].id;for(let o=0;oo[35].old.id+o[35].new.id;for(let o=0;oo[32].id;for(let o=0;o',i=O(),s=v("div"),s.innerHTML=`Some of the imported collections shares the same name and/or fields but are + imported with different IDs. You can replace them in the import if you want + to.`,l=O(),o=v("button"),o.innerHTML='Replace with original ids',p(t,"class","icon"),p(s,"class","content"),p(o,"type","button"),p(o,"class","btn btn-warning btn-sm btn-outline"),p(e,"class","alert alert-warning m-t-base")},m(u,f){S(u,e,f),_(e,t),_(e,i),_(e,s),_(e,l),_(e,o),r||(a=Y(o,"click",n[24]),r=!0)},p:Z,d(u){u&&w(e),r=!1,a()}}}function xh(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear',p(e,"type","button"),p(e,"class","btn btn-transparent link-hint")},m(s,l){S(s,e,l),t||(i=Y(e,"click",n[25]),t=!0)},p:Z,d(s){s&&w(e),t=!1,i()}}}function MA(n){let e,t,i,s,l,o,r,a,u,f,c,d;const m=[$A,TA],h=[];function g(b,k){return b[5]?0:1}return f=g(n),c=h[f]=m[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=B(n[15]),r=O(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(b,k){S(b,e,k),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(b,r,k),S(b,a,k),_(a,u),h[f].m(u,null),d=!0},p(b,k){(!d||k[0]&32768)&&le(o,b[15]);let y=f;f=g(b),f===y?h[f].p(b,k):(ae(),I(h[y],1,1,()=>{h[y]=null}),ue(),c=h[f],c?c.p(b,k):(c=h[f]=m[f](b),c.c()),A(c,1),c.m(u,null))},i(b){d||(A(c),d=!0)},o(b){I(c),d=!1},d(b){b&&w(e),b&&w(r),b&&w(a),h[f].d()}}}function DA(n){let e,t,i,s,l,o;e=new Ii({}),i=new wn({props:{$$slots:{default:[MA]},$$scope:{ctx:n}}});let r={};return l=new SA({props:r}),n[27](l),l.$on("submit",n[28]),{c(){H(e.$$.fragment),t=O(),H(i.$$.fragment),s=O(),H(l.$$.fragment)},m(a,u){q(e,a,u),S(a,t,u),q(i,a,u),S(a,s,u),q(l,a,u),o=!0},p(a,u){const f={};u[0]&65535|u[1]&1024&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){I(e.$$.fragment,a),I(i.$$.fragment,a),I(l.$$.fragment,a),o=!1},d(a){j(e,a),a&&w(t),j(i,a),a&&w(s),n[27](null),j(l,a)}}}function OA(n,e,t){let i,s,l,o,r,a,u;Ye(n,St,K=>t(15,u=K)),Kt(St,u="Import collections",u);let f,c,d="",m=!1,h=[],g=[],b=!0,k=[],y=!1;T();async function T(){t(5,y=!0);try{t(2,g=await pe.collections.getFullList(200));for(let K of g)delete K.created,delete K.updated}catch(K){pe.errorResponseHandler(K)}t(5,y=!1)}function $(){if(t(4,k=[]),!!i)for(let K of h){const re=z.findByKey(g,"id",K.id);!(re!=null&&re.id)||!z.hasCollectionChanges(re,K,b)||k.push({new:K,old:re})}}function M(){t(1,h=[]);try{t(1,h=JSON.parse(d))}catch{}Array.isArray(h)?t(1,h=z.filterDuplicatesByKey(h)):t(1,h=[]);for(let K of h)delete K.created,delete K.updated,K.schema=z.filterDuplicatesByKey(K.schema)}function C(){var K,re;for(let J of h){const de=z.findByKey(g,"name",J.name)||z.findByKey(g,"id",J.id);if(!de)continue;const _e=J.id,$e=de.id;J.id=$e;const Ne=Array.isArray(de.schema)?de.schema:[],Re=Array.isArray(J.schema)?J.schema:[];for(const be of Re){const Se=z.findByKey(Ne,"name",be.name);Se&&Se.id&&(be.id=Se.id)}for(let be of h)if(Array.isArray(be.schema))for(let Se of be.schema)(K=Se.options)!=null&&K.collectionId&&((re=Se.options)==null?void 0:re.collectionId)===_e&&(Se.options.collectionId=$e)}t(0,d=JSON.stringify(h,null,4))}function D(K){t(12,m=!0);const re=new FileReader;re.onload=async J=>{t(12,m=!1),t(10,f.value="",f),t(0,d=J.target.result),await sn(),h.length||(cl("Invalid collections configuration."),E())},re.onerror=J=>{console.warn(J),cl("Failed to load the imported JSON."),t(12,m=!1),t(10,f.value="",f)},re.readAsText(K)}function E(){t(0,d=""),t(10,f.value="",f),Bn({})}function P(K){ie[K?"unshift":"push"](()=>{f=K,t(10,f)})}const L=()=>{f.files.length&&D(f.files[0])},N=()=>{f.click()};function F(){d=this.value,t(0,d)}function R(){b=this.checked,t(3,b)}const X=()=>C(),se=()=>E(),W=()=>c==null?void 0:c.show(g,h,b);function G(K){ie[K?"unshift":"push"](()=>{c=K,t(11,c)})}const te=()=>E();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof d<"u"&&M(),n.$$.dirty[0]&3&&t(6,i=!!d&&h.length&&h.length===h.filter(K=>!!K.id&&!!K.name).length),n.$$.dirty[0]&78&&t(9,s=g.filter(K=>i&&b&&!z.findByKey(h,"id",K.id))),n.$$.dirty[0]&70&&t(8,l=h.filter(K=>i&&!z.findByKey(g,"id",K.id))),n.$$.dirty[0]&10&&(typeof h<"u"||typeof b<"u")&&$(),n.$$.dirty[0]&785&&t(7,o=!!d&&(s.length||l.length||k.length)),n.$$.dirty[0]&224&&t(14,r=!y&&i&&o),n.$$.dirty[0]&6&&t(13,a=h.filter(K=>{let re=z.findByKey(g,"name",K.name)||z.findByKey(g,"id",K.id);if(!re)return!1;if(re.id!=K.id)return!0;const J=Array.isArray(re.schema)?re.schema:[],de=Array.isArray(K.schema)?K.schema:[];for(const _e of de){if(z.findByKey(J,"id",_e.id))continue;const Ne=z.findByKey(J,"name",_e.name);if(Ne&&_e.id!=Ne.id)return!0}return!1}))},[d,h,g,b,k,y,i,o,l,s,f,c,m,a,r,u,C,D,E,P,L,N,F,R,X,se,W,G,te]}class EA extends ye{constructor(e){super(),ve(this,e,OA,DA,he,{},null,[-1,-1])}}const Pt=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?Di("/"):!0}],AA={"/login":Mt({component:CO,conditions:Pt.concat([n=>!pe.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":Mt({asyncComponent:()=>rt(()=>import("./PageAdminRequestPasswordReset-e202dd28.js"),[],import.meta.url),conditions:Pt.concat([n=>!pe.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":Mt({asyncComponent:()=>rt(()=>import("./PageAdminConfirmPasswordReset-18b0e4d7.js"),[],import.meta.url),conditions:Pt.concat([n=>!pe.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":Mt({component:GD,conditions:Pt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":Mt({component:C3,conditions:Pt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":Mt({component:FO,conditions:Pt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":Mt({component:yO,conditions:Pt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":Mt({component:yE,conditions:Pt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":Mt({component:FE,conditions:Pt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":Mt({component:QE,conditions:Pt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":Mt({component:lA,conditions:Pt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":Mt({component:cA,conditions:Pt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":Mt({component:EA,conditions:Pt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":Mt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmPasswordReset-d3cfe2c2.js"),[],import.meta.url),conditions:Pt,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":Mt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmPasswordReset-d3cfe2c2.js"),[],import.meta.url),conditions:Pt,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":Mt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmVerification-3f096be7.js"),[],import.meta.url),conditions:Pt,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":Mt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmVerification-3f096be7.js"),[],import.meta.url),conditions:Pt,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":Mt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmEmailChange-ec412fef.js"),[],import.meta.url),conditions:Pt,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":Mt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmEmailChange-ec412fef.js"),[],import.meta.url),conditions:Pt,userData:{showAppSidebar:!1}}),"*":Mt({component:Kv,userData:{showAppSidebar:!1}})};function IA(n,{from:e,to:t},i={}){const s=getComputedStyle(n),l=s.transform==="none"?"":s.transform,[o,r]=s.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*o/t.width-(t.left+o),u=e.top+e.height*r/t.height-(t.top+r),{delay:f=0,duration:c=m=>Math.sqrt(m)*120,easing:d=Bo}=i;return{delay:f,duration:Bt(c)?c(Math.sqrt(a*a+u*u)):c,easing:d,css:(m,h)=>{const g=h*a,b=h*u,k=m+h*e.width/t.width,y=m+h*e.height/t.height;return`transform: ${l} translate(${g}px, ${b}px) scale(${k}, ${y});`}}}function eg(n,e,t){const i=n.slice();return i[2]=e[t],i}function PA(n){let e;return{c(){e=v("i"),p(e,"class","ri-alert-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function LA(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function NA(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function FA(n){let e;return{c(){e=v("i"),p(e,"class","ri-information-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function tg(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,c,d,m=Z,h,g,b;function k(M,C){return M[2].type==="info"?FA:M[2].type==="success"?NA:M[2].type==="warning"?LA:PA}let y=k(e),T=y(e);function $(){return e[1](e[2])}return{key:n,first:null,c(){t=v("div"),i=v("div"),T.c(),s=O(),l=v("div"),r=B(o),a=O(),u=v("button"),u.innerHTML='',f=O(),p(i,"class","icon"),p(l,"class","content"),p(u,"type","button"),p(u,"class","close"),p(t,"class","alert txt-break"),Q(t,"alert-info",e[2].type=="info"),Q(t,"alert-success",e[2].type=="success"),Q(t,"alert-danger",e[2].type=="error"),Q(t,"alert-warning",e[2].type=="warning"),this.first=t},m(M,C){S(M,t,C),_(t,i),T.m(i,null),_(t,s),_(t,l),_(l,r),_(t,a),_(t,u),_(t,f),h=!0,g||(b=Y(u,"click",dt($)),g=!0)},p(M,C){e=M,y!==(y=k(e))&&(T.d(1),T=y(e),T&&(T.c(),T.m(i,null))),(!h||C&1)&&o!==(o=e[2].message+"")&&le(r,o),(!h||C&1)&&Q(t,"alert-info",e[2].type=="info"),(!h||C&1)&&Q(t,"alert-success",e[2].type=="success"),(!h||C&1)&&Q(t,"alert-danger",e[2].type=="error"),(!h||C&1)&&Q(t,"alert-warning",e[2].type=="warning")},r(){d=t.getBoundingClientRect()},f(){Xb(t),m(),fg(t,d)},a(){m(),m=Gb(t,d,IA,{duration:150})},i(M){h||(xe(()=>{c||(c=je(t,yo,{duration:150},!0)),c.run(1)}),h=!0)},o(M){c||(c=je(t,yo,{duration:150},!1)),c.run(0),h=!1},d(M){M&&w(t),T.d(),M&&c&&c.end(),g=!1,b()}}}function RA(n){let e,t=[],i=new Map,s,l=n[0];const o=r=>r[2].message;for(let r=0;rt(0,i=l)),[i,l=>w_(l)]}class jA extends ye{constructor(e){super(),ve(this,e,qA,RA,he,{})}}function HA(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=v("h4"),i=B(t),p(e,"class","block center txt-break"),p(e,"slot","header")},m(l,o){S(l,e,o),_(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&le(i,t)},d(l){l&&w(e)}}}function VA(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="No",i=O(),s=v("button"),l=v("span"),l.textContent="Yes",p(t,"class","txt"),e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-transparent btn-expanded-sm"),e.disabled=n[2],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],Q(s,"btn-loading",n[2])},m(a,u){S(a,e,u),_(e,t),S(a,i,u),S(a,s,u),_(s,l),e.focus(),o||(r=[Y(e,"click",n[4]),Y(s,"click",n[5])],o=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&Q(s,"btn-loading",a[2])},d(a){a&&w(e),a&&w(i),a&&w(s),o=!1,Pe(r)}}}function zA(n){let e,t,i={class:"confirm-popup hide-content overlay-panel-sm",overlayClose:!n[2],escClose:!n[2],btnClose:!1,popup:!0,$$slots:{footer:[VA],header:[HA]},$$scope:{ctx:n}};return e=new Nn({props:i}),n[6](e),e.$on("hide",n[7]),{c(){H(e.$$.fragment)},m(s,l){q(e,s,l),t=!0},p(s,[l]){const o={};l&4&&(o.overlayClose=!s[2]),l&4&&(o.escClose=!s[2]),l&271&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[6](null),j(e,s)}}}function BA(n,e,t){let i;Ye(n,Qa,c=>t(1,i=c));let s,l=!1,o=!1;const r=()=>{t(3,o=!1),s==null||s.hide()},a=async()=>{i!=null&&i.yesCallback&&(t(2,l=!0),await Promise.resolve(i.yesCallback()),t(2,l=!1)),t(3,o=!0),s==null||s.hide()};function u(c){ie[c?"unshift":"push"](()=>{s=c,t(0,s)})}const f=async()=>{!o&&(i!=null&&i.noCallback)&&i.noCallback(),await sn(),t(3,o=!1),$b()};return n.$$.update=()=>{n.$$.dirty&3&&i!=null&&i.text&&(t(3,o=!1),s==null||s.show())},[s,i,l,o,r,a,u,f]}class UA extends ye{constructor(e){super(),ve(this,e,BA,zA,he,{})}}function ng(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,h,g,b,k,y;return g=new ei({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[WA]},$$scope:{ctx:n}}}),{c(){var T;e=v("aside"),t=v("a"),t.innerHTML='PocketBase logo',i=O(),s=v("nav"),l=v("a"),l.innerHTML='',o=O(),r=v("a"),r.innerHTML='',a=O(),u=v("a"),u.innerHTML='',f=O(),c=v("figure"),d=v("img"),h=O(),H(g.$$.fragment),p(t,"href","/"),p(t,"class","logo logo-sm"),p(l,"href","/collections"),p(l,"class","menu-item"),p(l,"aria-label","Collections"),p(r,"href","/logs"),p(r,"class","menu-item"),p(r,"aria-label","Logs"),p(u,"href","/settings"),p(u,"class","menu-item"),p(u,"aria-label","Settings"),p(s,"class","main-menu"),Vn(d.src,m="./images/avatars/avatar"+(((T=n[0])==null?void 0:T.avatar)||0)+".svg")||p(d,"src",m),p(d,"alt","Avatar"),p(c,"class","thumb thumb-circle link-hint closable"),p(e,"class","app-sidebar")},m(T,$){S(T,e,$),_(e,t),_(e,i),_(e,s),_(s,l),_(s,o),_(s,r),_(s,a),_(s,u),_(e,f),_(e,c),_(c,d),_(c,h),q(g,c,null),b=!0,k||(y=[Ie(xt.call(null,t)),Ie(xt.call(null,l)),Ie(qn.call(null,l,{path:"/collections/?.*",className:"current-route"})),Ie(Be.call(null,l,{text:"Collections",position:"right"})),Ie(xt.call(null,r)),Ie(qn.call(null,r,{path:"/logs/?.*",className:"current-route"})),Ie(Be.call(null,r,{text:"Logs",position:"right"})),Ie(xt.call(null,u)),Ie(qn.call(null,u,{path:"/settings/?.*",className:"current-route"})),Ie(Be.call(null,u,{text:"Settings",position:"right"}))],k=!0)},p(T,$){var C;(!b||$&1&&!Vn(d.src,m="./images/avatars/avatar"+(((C=T[0])==null?void 0:C.avatar)||0)+".svg"))&&p(d,"src",m);const M={};$&1024&&(M.$$scope={dirty:$,ctx:T}),g.$set(M)},i(T){b||(A(g.$$.fragment,T),b=!0)},o(T){I(g.$$.fragment,T),b=!1},d(T){T&&w(e),j(g),k=!1,Pe(y)}}}function WA(n){let e,t,i,s,l,o,r;return{c(){e=v("a"),e.innerHTML=` + Manage admins`,t=O(),i=v("hr"),s=O(),l=v("button"),l.innerHTML=` + Logout`,p(e,"href","/settings/admins"),p(e,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),S(a,s,u),S(a,l,u),o||(r=[Ie(xt.call(null,e)),Y(l,"click",n[6])],o=!0)},p:Z,d(a){a&&w(e),a&&w(t),a&&w(i),a&&w(s),a&&w(l),o=!1,Pe(r)}}}function YA(n){var m;let e,t,i,s,l,o,r,a,u,f,c;document.title=e=z.joinNonEmpty([n[3],n[2],"PocketBase"]," - ");let d=((m=n[0])==null?void 0:m.id)&&n[1]&&ng(n);return o=new u1({props:{routes:AA}}),o.$on("routeLoading",n[4]),o.$on("conditionsFailed",n[5]),a=new jA({}),f=new UA({}),{c(){t=O(),i=v("div"),d&&d.c(),s=O(),l=v("div"),H(o.$$.fragment),r=O(),H(a.$$.fragment),u=O(),H(f.$$.fragment),p(l,"class","app-body"),p(i,"class","app-layout")},m(h,g){S(h,t,g),S(h,i,g),d&&d.m(i,null),_(i,s),_(i,l),q(o,l,null),_(l,r),q(a,l,null),S(h,u,g),q(f,h,g),c=!0},p(h,[g]){var b;(!c||g&12)&&e!==(e=z.joinNonEmpty([h[3],h[2],"PocketBase"]," - "))&&(document.title=e),(b=h[0])!=null&&b.id&&h[1]?d?(d.p(h,g),g&3&&A(d,1)):(d=ng(h),d.c(),A(d,1),d.m(i,s)):d&&(ae(),I(d,1,1,()=>{d=null}),ue())},i(h){c||(A(d),A(o.$$.fragment,h),A(a.$$.fragment,h),A(f.$$.fragment,h),c=!0)},o(h){I(d),I(o.$$.fragment,h),I(a.$$.fragment,h),I(f.$$.fragment,h),c=!1},d(h){h&&w(t),h&&w(i),d&&d.d(),j(o),j(a),h&&w(u),j(f,h)}}}function KA(n,e,t){let i,s,l,o;Ye(n,$s,m=>t(8,i=m)),Ye(n,vo,m=>t(2,s=m)),Ye(n,Ma,m=>t(0,l=m)),Ye(n,St,m=>t(3,o=m));let r,a=!1;function u(m){var h,g,b,k;((h=m==null?void 0:m.detail)==null?void 0:h.location)!==r&&(t(1,a=!!((b=(g=m==null?void 0:m.detail)==null?void 0:g.userData)!=null&&b.showAppSidebar)),r=(k=m==null?void 0:m.detail)==null?void 0:k.location,Kt(St,o="",o),Bn({}),$b())}function f(){Di("/")}async function c(){var m,h;if(l!=null&&l.id)try{const g=await pe.settings.getAll({$cancelKey:"initialAppSettings"});Kt(vo,s=((m=g==null?void 0:g.meta)==null?void 0:m.appName)||"",s),Kt($s,i=!!((h=g==null?void 0:g.meta)!=null&&h.hideControls),i)}catch(g){g!=null&&g.isAbort||console.warn("Failed to load app settings.",g)}}function d(){pe.logout()}return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&c()},[l,a,s,o,u,f,d]}class JA extends ye{constructor(e){super(),ve(this,e,KA,YA,he,{})}}new JA({target:document.getElementById("app")});export{Pe as A,zt as B,z as C,Di as D,Me as E,S_ as F,ga as G,mu as H,Ye as I,Ai as J,Ct as K,Zt as L,ie as M,wb as N,wt as O,es as P,ln as Q,pn as R,ye as S,Ir as T,I as a,O as b,H as c,j as d,v as e,p as f,S as g,_ as h,ve as i,Ie as j,ae as k,xt as l,q as m,ue as n,w as o,pe as p,me as q,Q as r,he as s,A as t,Y as u,dt as v,B as w,le as x,Z as y,ce as z}; diff --git a/ui/dist/index.html b/ui/dist/index.html index c06b0a09..b8cb903f 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -17,15 +17,35 @@ - + + + + + + + + + + + + + + + + + + + + + - - + +
    diff --git a/ui/index.html b/ui/index.html index 9d5c07f2..782de991 100644 --- a/ui/index.html +++ b/ui/index.html @@ -10,16 +10,36 @@ PocketBase - - - - - - + + + + + + - + + + + + + + + + + + + + + + + + + + + + -
    +
    diff --git a/ui/src/components/base/FilterAutocompleteInput.svelte b/ui/src/components/base/FilterAutocompleteInput.svelte index 5870c462..4e8e6c0d 100644 --- a/ui/src/components/base/FilterAutocompleteInput.svelte +++ b/ui/src/components/base/FilterAutocompleteInput.svelte @@ -217,25 +217,11 @@ return []; } - let result = [ - // base model fields - prefix + "id", - prefix + "created", - prefix + "updated", - ]; - - if (collection.isAuth) { - result.push(prefix + "username"); - result.push(prefix + "email"); - result.push(prefix + "emailVisibility"); - result.push(prefix + "verified"); - } + let result = CommonHelper.getAllCollectionIdentifiers(collection, prefix); for (const field of collection.schema) { const key = prefix + field.name; - result.push(key); - // add relation fields if (field.type === "relation" && field.options?.collectionId) { const subKeys = getCollectionFieldKeys(field.options.collectionId, key + ".", level + 1); diff --git a/ui/src/components/collections/CollectionDocsPanel.svelte b/ui/src/components/collections/CollectionDocsPanel.svelte index 81c8b16b..f694223b 100644 --- a/ui/src/components/collections/CollectionDocsPanel.svelte +++ b/ui/src/components/collections/CollectionDocsPanel.svelte @@ -93,6 +93,12 @@ if (!collection?.options.allowOAuth2Auth) { delete tabs["auth-with-oauth2"]; } + } else if (collection.isView) { + tabs = Object.assign({}, baseTabs); + delete tabs.create; + delete tabs.update; + delete tabs.delete; + delete tabs.realtime; } else { tabs = Object.assign({}, baseTabs); } diff --git a/ui/src/components/collections/CollectionQueryTab.svelte b/ui/src/components/collections/CollectionQueryTab.svelte new file mode 100644 index 00000000..de858123 --- /dev/null +++ b/ui/src/components/collections/CollectionQueryTab.svelte @@ -0,0 +1,105 @@ + + + + + + {#if isCodeEditorComponentLoading} +